from fractions import Fraction as F def run(load,check): before=load('PREVIOUS_DATA.json'); reg=load('C286_DATA.json')['target_register'] comp={x['i'] for x in load('C287_DATA.json')['rows'] if x['complete']} domain=list(range(3,8)); phases=[F(-1,4),F(1,4)]; rows=[] check('five inherited indices',before['parameters']['annual_indices']==domain) for old in before['rows']: j=old['index']; i=10-j; n=3703+i; s=3213-j; d=s-600 gear=old['normalized_Shem_birth']['gear']; rail=old['normalized_Shem_birth']['rail'] records={} for role,center in [('Noah birth',n),('Shem birth',s),('Shem death',d)]: hits=[r for r in reg if r['tradition']=='SP' and r['gear']==gear and r.get('rail')==rail and r['role']==role and r['center']==center and r['Cainan']==0 and r['Terah60']==0 and r['full430']==1] check(f'j{j} unique source {role}',len(hits)==1);records[role]=hits[0] check(f'j{j} full biography',n-s==500 and s-d==600 and n-d==1100) check(f'j{j} inherited match',records['Noah birth']==old['source_matched_Noah']) components=[] for e in phases: matches=[(k,f) for k in domain for f in phases if F(3703+k)+f-(F(s)-e)==500] check(f'j{j} {e} unique reversal',matches==[(i,-e)]) nc=F(n)-e;sc=F(s)-e;dc=F(d)-e check(f'j{j} {e} phase spans',nc-sc==500 and sc-dc==600 and nc-dc==1100) check(f'j{j} {e} local involution',(10-i,e)==(j,e) and (-5290+i-e)+(-5290+j+e)==-10570) components.append({'Shem_ancestry_phase':str(e),'Noah_ancestry_phase':str(-e),'Noah':str(nc),'Shem_birth':str(sc),'Shem_death':str(dc)}) rows.append({'j':j,'i':i,'gear':gear,'rail':rail,'biography_BC':[n,s,d],'source_records':records,'components':components,'C287_at_i':i in comp,'C287_at_j':j in comp,'C287_at_both':i in comp and j in comp}) points={(j,e) for j in domain for e in phases};mapped={(10-j,-e) for j,e in points} check('finite closure',points==mapped) check('no fixed exact component',all((10-j,-e)!=(j,e) for j,e in points)) check('full eight-index field is not closed',{10-j for j in range(8)}!=set(range(8))) check('both-side C287 only center',[r['j'] for r in rows if r['C287_at_both']]==[5]) return {'step':'C314','formulas':{'J':'(j,e) -> (10-j,-e)','local_R':'-10570-q','global_axis_unchanged':True},'rows':rows,'counts':{'biographies':5,'phase_biographies':10,'component_comparisons':100,'phase_two_cycles':5,'phase_fixed_points':0,'C287_at_i':sum(r['C287_at_i'] for r in rows),'C287_at_j':sum(r['C287_at_j'] for r in rows),'C287_at_both':sum(r['C287_at_both'] for r in rows)},'interpretation':'Conditional local correspondence on five selected source states, not a source-prescribed selector.'}