from research import *
f=json.loads((ROOT/'model/native_mode_fields.json').read_text()); S={r['name']:r for r in f['SP']}; L={r['name']:r for r in f['LXX']}; names=['Noah','Shem','Arphaxad','Cainan2','Shelah','Eber','Peleg','Reu','Serug','Nahor','Terah']
s=begin(744,'Explain death differences within identical birthpaths','What remains different afterSPCainan-ON births align with nativeLXX?',{'shared_births':'C743','Cainan_inserted_lifespan':460,'nodes':names},['File18 source rows; C743'])
rows=[]
for n in names:
    birth=L[n]['R']; ls=460 if n=='Cainan2' else S[n]['L']; ll=L[n]['L']
    rows.append({'name':n,'SP_death':birth-ls,'LXX_death':birth-ll,'LXX_minus_SP_death':ls-ll})
finish(s,{'death_comparison':rows},'With the whole birthpath fixed, each death difference is exactly the negative lifespan difference. Noah,Shem and insertedCainan deaths coincide; the other differences follow locally. Birthpath agreement therefore transfers a specific projection of the sources, not every chronological measure.','Compare matchedCainan cumulativefields to locate the maximal translation blocks.',{'death_law':all(r['LXX_death']-r['SP_death']==r['LXX_minus_SP_death'] for r in rows),'profile':[r['LXX_minus_SP_death'] for r in rows]==[0,0,-27,0,-27,-100,-100,-100,-100,-60,-60],'coincident_names':[r['name'] for r in rows if r['LXX_minus_SP_death']==0]==['Noah','Shem','Cainan2']})
