from research import *
s=begin(600,'Derive the weekly overlap correction','Does the excess660 arise from six repeated overlaps?',{'weeks':7,'rail':110,'carriers':[70,72]},['File68 §§8.8–8.10'])
rows=[]
for g in [70,72]:
 intervals=[(k*7*g,k*7*g+7*g+110) for k in range(7)]
 overlaps=[intervals[k][1]-intervals[k+1][0] for k in range(6)];summed=sum(b-a for a,b in intervals);union=intervals[-1][1]-intervals[0][0]
 rows.append({'g':g,'sum':summed,'union':union,'overlaps':overlaps})
finish(s,{'interval_accounts':rows},'Seven weekly diagonals overlap their neighbours by110 six times. Their summed length exceeds the continuous field union by660. This accounts for the resolution difference without treating summed intervals as one chronological distance.','Reconstruct every full-resolution weekly boundary and its companion convergence.',{'overlaps':all(r['overlaps']==[110]*6 for r in rows),'union_identity':all(r['sum']-sum(r['overlaps'])==r['union'] for r in rows)})
