from research import *
s=begin(552,'Generate the cumulative root family','Does one affine rule reconstruct all six source rails?',{'base':[2435,2260,2080,1933,1796,1663,1526],'phases':[0,F(7,2)],'clutch':[0,7,14]},['File62 §§1.2–1.4; File61 §§7.3A–7.6'])
t=json.loads((ROOT/'prep/file61_62_tables.json').read_text())['root_rails'];base=s['inputs']['base'];out=[]
for row in t:
 p=F(row['phase_offset']);d=row['clutch'];v=[x+p-d for x in base]
 assert v==[F(x) for x in row['coordinates'].values()]
 out.append(v)
finish(s,{'rails':out,'coordinate_matches':42},'C(p,d)=C0+p−d reconstructs all42 source coordinates. This is one family generated from seven inputs and two local state parameters, not42 independent successes.','Establish why the source clutch is14 and whether its three envelopes are independent.',{'six_rails':len(out)==6,'invariant_spans':all([a-b for a,b in zip(v,v[1:])]==[175,180,147,137,133,137] for v in out)})
