from research import *
p=json.loads((ROOT/'model/file18_rows.json').read_text()); rr=p['regular_source_rows']['MT']; cmap={r['name']:r['Moses_Nisan_BC'] for r in p['MT_cumulative_literal_rows']}
s=begin(734,'Reconstruct the entire MT mode-bridge field','Does one terminal displacement and the row remainder rule recover every Adam-to-Abraham boundary?',{'packet_sha256':hashlib.sha256((ROOT/'model/file18_rows.json').read_bytes()).hexdigest(),'regular_frame':'+215 full430','cumulative_frame':'Moses/Nisan centers; AdamYear6 role retained','Noah_edge_correction':2},['File18 §§2.1.3,2.2,6A'])
names=[r['name'] for r in rr]+['Abraham']; R=[r['birth_BC']+215 for r in rr]+[2166]; C=[cmap[n] for n in names]
eff=[r['b_ledger']+(2 if r['name']=='Noah' else 0) for r in rr]; h=[r['L_ledger']-b for r,b in zip(rr,eff)]; G=[c-r for c,r in zip(C,R)]
generated=[G[-1]+sum(h[i:]) for i in range(len(h))]+[G[-1]]
finish(s,{'names':names,'center_mode_bridge':G,'row_generators':h,'terminal_bridge':G[-1],'head_role':'9892 pairs cumulativeYear6 with regularCreation-completion; not the established9890 completion bridge'},'The same remainder-plus-binding rule reconstructs all20 MT mode comparisons from terminal269. The mixed Adam-label displacement9892 is explicitly a center-profile quantity; it is not silently substituted for the established completion bridge9890.','Change the entire cumulative profile to its source lower-envelope members and test what is preserved.',{'regular_edges':[R[i]-R[i+1] for i in range(len(rr))]==eff,'cumulative_edges':[C[i]-C[i+1] for i in range(len(rr))]==[r['L_ledger'] for r in rr],'whole_field':G==generated})
