from research import *
s=begin(1163,'Identify a source-realized two-stage row factorization','Does the late conserved-remainder operation pass through the suppliedSP biography?',{},['C1162','File18 §§2.2,3.2.1,4.2'])
d=json.loads((ROOT/'model/postflood_rows.json').read_text());index={t:{r['name']:r for r in rows} for t,rows in d.items()};triangles=[]
for n in ['Peleg','Reu','Serug']:
 mt=index['MT_native_OFF'][n];sp=index['SP_native_OFF_official145'][n];lx=index['LXX_native_ON'][n]
 first=[mt['b']+100,mt['r']-100,mt['L']];second=[first[0],first[1]+100,first[2]+100]
 triangles.append({'name':n,'MT':[mt[k] for k in ['b','r','L']],'after_R100':first,'after_A100':second,'SP_source':[sp[k] for k in ['b','r','L']],'LXX_source':[lx[k] for k in ['b','r','L']]})
a=artifact('model/postflood_late_source_triangles.json',json.dumps({'triangles':triangles,'claim':'source-realized mathematical factorization, not a historical sequence of redactions'},indent=2)+'\n')
finish(s,{'source_triangles':a},'For all three late rows, the intermediate R100 result is the suppliedSP row, and the following A100 result is the suppliedLXX row. This gives a concrete connection between three source families while leaving historical direction open.','Extend the source-realized factorization to all nine common post-Flood rows.',{'SP_intermediates':all(x['after_R100']==x['SP_source'] for x in triangles),'LXX_completions':all(x['after_A100']==x['LXX_source'] for x in triangles)})
