from pathlib import Path
import sys,json,hashlib
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from runner import *
def bindings():
rows={p.name:{'bytes':p.stat().st_size,'sha256':hashlib.sha256(p.read_bytes()).hexdigest()} for p in sorted((ROOT/'evidence').iterdir()) if p.is_file()}
return model('source_bindings',rows)
run('Bind the remaining source controls','Are the inheritedMTNoah excerpt andSP source corroboration preserved alongside the fullcontrollers?',bindings,
'The source register now includes the exactFile52a secondary-branch excerpt andFile53, completing the portable input set.',
'Compress the seven named outputs by their local merge differences.')
def defect(x,y):return inverse(x+y)-inverse(x)-inverse(y)
def merge_model():
out={}
for m,a,c in [('MT',3430,7620),('LXX',4340,7600),('SP',3310,7130)]:
out[m]={'full_total':inverse(a)+600+590+inverse(c),'D_a_600':defect(a,600),'D_600_950':defect(600,950),'D_950_c':defect(950,c),'D_a_1550':defect(a,1550),'D_1550_c':defect(1550,c),'D_a600_950':defect(a+600,950)}
return model('merge_defect_grammar',out)
run('Compress the partition family by local merges','Can one local quantity describe every retained-boundary choice?',merge_model,
'Define D(x,y)=I(x+y)−I(x)−I(y). The same merge rule covers all named partitions, with the sharedD(600,950)=4320 andD(a,1550)=0.',
'Check the relation between two different orders of merging the same three source legs.')
run('Verify consistency of merge order','Do the two routes through the lower three original legs have the same total local effect?',
lambda:{m:{'left':v['D_a_600']+v['D_a600_950'],'right':v['D_600_950']+v['D_a_1550']} for m,v in model('merge_defect_grammar').items()},
'Both routes give4320 in all three cases. The identity D(x,y)+D(x+y,z)=D(y,z)+D(x,y+z) follows by cancellation for any fixedI.',
'Use that general relation as explanation of path consistency, not another independentnumerical result.')
def regenerate():
out={}
for m,v in model('merge_defect_grammar').items():
q=v['full_total'];ab=v['D_a_600'];bc=v['D_600_950'];cd=v['D_950_c'];ad=v['D_a_1550'];bd=v['D_1550_c']
pred={'FSN':q,'FS':q+cd,'FN':q+bc,'SN':q+ab,'N':q+bc+ad,'S':q+ab+cd,'F':q+bc+bd}
actual={p:r['total'] for p,r in model('partitions_'+m).items()}
assert pred==actual
out[m]={'reconstructed_totals':pred,'matches_all_seven':pred==actual}
return out
run('Regenerate the complete named family from local laws','Do the merge differences reproduce all21 path totals without separate fitted corrections?',regenerate,
'All21 totals follow from the full word and the same local merge law. This is a compact reconstruction ledger for the cumulative family.',
'Review source and arithmetic results together before producing the final continuation document.')
run('Review the independent source conclusions','Do the source reviews warrant the interpretations now present in the mainreader?',
lambda:{'source_review':'agents/editorial_source_review.md','verifier_portability':'agents/portable_verifier_check.json','whole_edge':'matched600 biography','5366':'explicitYear6/CainanOFF target','Noah':'serial950+600; selectedroundedLamech rows','sources_unchanged':all(hashlib.sha256((ROOT/'evidence'/n).read_bytes()).hexdigest()==v['sha256'] for n,v in model('source_bindings').items())},
'The reviews support both new sections and the exact source-state labels. The frozen source copies still match their hashes.',
'Ensure the opening and ending of the reader emphasize how the families connect.')
def reader_focus():
p=ROOT/'deliverables/490d_Chronological_Families_Explanation_C1431.md';s=p.read_text()
marker='## What the common explanation achieves\n\n'
addition='The new inverse comparisons make the connecting structure more visible. The SP construction carries a complete LXX Shem life interval into a junction with MT Cumulative Shem; its shared7700 edge links the9900 and12600 families. Named Shem and Covenant cuts recover different partitions of the same12600 interval. The Noah extension then shows how common source lives generate both shared refinement effects and manuscript-specific heads. These are complementary parts of one explanation: source rows determine the paths, local operations explain their changes, and appointed junctions connect the families.\n\n'
assert marker in s;s=s.replace(marker,marker+addition.replace('shared7700','shared 7700').replace('the9900','the 9900').replace('and12600','and 12600').replace('same12600','same 12600'))
p.write_text(s);return {'reader':p.name,'bytes':p.stat().st_size,'new_main_synthesis_words':len(addition.split())}
run('Make the larger result explicit in the reader','Does the reader explain what the new relations contribute to the Strategy’s objective?',reader_focus,
'The final synthesis now states how source rows, local operations and named junctions explain the families together.',
'Build the continuation record with complete outputs, reassessments and the limited claim scope.')
Evidence
phase9.py
Edition and provenance
phase9.py
SHA-256 50bfbdd3e99d75cce94120867fcc6aed034041d0a097ec712f404b0855838d81
C480–C1634/Research_Cycles/C1483_C1582/c1483_c1582/prep/phase9.py