from research import *
s=begin(806,'Recover the complete BJ bookend path','Do both460-year intervals and the wilderness completion fit one labelled path?',{},['File20 §7A.10; literal bookend inputs'])
p=json.loads((ROOT/'model/jubilees_inputs.json').read_text())['literal_inputs']['bookends'];names=['creation','jared','call','exodus','conquest'];coords=[p[n] for n in names];gaps=[coords[i]-coords[i+1] for i in range(4)]
out={'names':names,'BC':coords,'gaps':gaps,'translation_pair':[p['creation']-p['call'],p['jared']-p['exodus']]}
a=artifact('model/BJ_bookend_path.json',json.dumps(out,indent=2)+'\n')
finish(s,{'path':a,**out,'early_begetting_sum':sum(p['first_begetting_chain'])},'The whole path is460|1490|460|40. The two460 intervals are translated1950 apart, and the early460 comes from the supplied SP-derived begetting chain. These are connected components of one2450 construction.','Apply the Key only to the declared terminal460 component.',{'two460':gaps[0]==gaps[2]==sum(p['first_begetting_chain'])==460,'translation':out['translation_pair']==[1950,1950],'total':sum(gaps)==2450})
