"""Reconstruct the whole selected network from source-local inputs only."""
from pathlib import Path
from fractions import Fraction as F
import json
HERE=Path(__file__).resolve().parent
p=json.loads((HERE/'source_packet.json').read_text())
v={x['name']:F(x['value']) for x in p['source_local_parameters']}
Q=v['Q'];r={'Q':Q,'Ishmael_birth':Q-v['qI'],'Isaac_birth':Q-v['qX'],'terminal':v['T']}
r['Ishmael_death']=r['Ishmael_birth']-v['L_I'];r['Jacob_birth']=r['Isaac_birth']-v['xJ'];r['Jacob_call']=r['Jacob_birth']-v['jCall'];r['Jacob_death']=r['Jacob_birth']-v['L_J'];r['Levi_birth']=r['Jacob_call']-v['callL'];r['Levi_death']=r['Levi_birth']-v['L_L'];r['Joseph_birth']=r['Jacob_call']-v['callZ'];r['Joseph_death']=r['Joseph_birth']-v['L_Z']
order=['Abraham','Isaac','Jacob','Levi','Kohath','Amram','Moses'];ls=[v[k] for k in ['L_A','L_Isaac','L_J','L_L','L_Kohath','L_Amram']]
base=[v['Moses_birth']+sum(ls[i:]) for i in range(7)]
full_ld=r['Levi_death']+v['full_state_shift'];clutch=base[4]-full_ld;half=clutch/2
rails=[{'phase_index':j,'clutch_index':k,'values':{n:base[i]+j*v['phase']-k*half for i,n in enumerate(order)}} for j in [0,1] for k in [0,1,2]]
def clean(x):
if isinstance(x,F):return int(x) if x.denominator==1 else str(x)
if isinstance(x,dict):return {k:clean(v) for k,v in x.items()}
if isinstance(x,list):return [clean(v) for v in x]
return x
out=clean({'status':'Derived reproduction, not new numbered research','regular_network':r,'cumulative_order':order,'original_cumulative':base,'derived_clutch':clutch,'derived_half_clutch':half,'six_rails':rails,'derived_old_pattern_values':{'Ishmael_Levi_birth_gap':r['Ishmael_birth']-r['Levi_birth'],'Levi_terminal_gap':r['Levi_death']-r['terminal'],'Covenant_Levi_span':Q-r['Levi_death'],'Covenant_Joseph_span':Q-r['Joseph_death']}})
(HERE/'source_only_reproduction.json').write_text(json.dumps(out,indent=2,ensure_ascii=False)+'\n')
print(json.dumps({'regular_nodes':len(r),'cumulative_coordinates':sum(len(x['values']) for x in rails),'clutch':str(clutch),'half':str(half)}))
Evidence
regenerate.py
Edition and provenance
regenerate.py
SHA-256 c502832b370d6e30be28e2348157295eaea14b302d6ef3e1504657b806f5f3e5
C480–C1634/Research_Cycles/C0932_C1131/prep/covenant_constraints/regenerate.py