from research import *
s=begin(801,'Close the BJ paths at their common completion','Does the surface adjustment repartition a retained whole span?',{'Conquest_BC':1406,'Conquest_AM':2451},['C799–800; File20 Conquest anchor'])
p=json.loads((ROOT/'model/BJ_spine_residuals.json').read_text());r=p['reconstructed_AM']+[2451];u=p['surface_AM']+[2451]
gaps=lambda a:[a[i+1]-a[i] for i in range(len(a)-1)];rg,ug=gaps(r),gaps(u);delta=[b-a for a,b in zip(rg,ug)]
finish(s,{'reconstructed_intervals':rg,'surface_intervals':ug,'changes':delta,'retained_total':r[-1]-r[0]},'Both complete paths retain575 years. The surface path redistributes them by+11,−1,−5,−5; its Egypt→Conquest280 is one component of a conserved whole, not a global70-year conversion.','Extend through Jacob’s retained terminal17 years.',{'total575':sum(rg)==sum(ug)==575,'zero_sum':sum(delta)==0,'surface280':ug[-1]==4*70})
