from fractions import Fraction as Q from itertools import product def run(load,check): rows=[];phases=[];internal=[];K=529;bridge=19*K for old in load('C366_DATA.json')['matched_rows']: i=old['i'];k=old['native_index'];e=int(old['rail']=='companion');X,_,S,_=old['cumulative_records'];N,M,D,B=old['regular_records'] check('fixed19K two source endpoints '+str(i),X['coordinate']+bridge==D['center'] and S['coordinate']+bridge==N['center'] and S['coordinate']-X['coordinate']==N['center']-D['center']==950) rows.append({'i':i,'native_index':k,'rail':old['rail'],'source_birth':X,'source_death_seam':S,'image_of_birth':D,'image_of_death':N,'translation':bridge,'lifespan':950,'source_roles_reversed':True}) for u,v in product([-Q(1,4),Q(1,4)],repeat=2): ok=X['coordinate']+u+bridge==D['center']+v and S['coordinate']+u+bridge==N['center']+v check('translation phases '+str((i,u,v)),ok==(u==v));phases.append({'i':i,'source_offset':str(u),'target_offset':str(v),'exact':ok}) for j in range(8): Y=next(x for x in load('C365_DATA.json')['cumulative_register'] if x['role']=='Noah birth' and x['Cainan']==0 and x['annual_index']==j) image=Y['coordinate']+bridge;err=M['center']-image check('OFF interior obstruction '+str((i,j)),err==30+e+k-j and err!=0) internal.append({'i':i,'OFF_index':j,'OFF_Noah':Y,'image_coordinate':image,'required_MT_Noah':M,'target_minus_image':err,'required_OFF_index':k+30+e,'C366_matched_index':j==k-e}) check('fixed source and phase totals',len(rows)==4 and len(phases)==16 and sum(x['exact'] for x in phases)==8 and len(internal)==32) check('retained interval reversal does not commute with19K interior',all(x['target_minus_image']==(32 if x['i'] in [2,4] else 30) for x in internal if x['C366_matched_index'])) return {'step':'C367','rows':rows,'phase_controls':phases,'OFF_interior_controls':internal,'counts':{'complete950_lifts':4,'same_phase_components':8,'OFF_interior_trials':32,'OFF_interior_hits':0},'normal_form':'T_19K(X)=D and T_19K(S)=N; S-X=N-D=950. Required OFF index for M is k+30+e, outside0..7.','interpretation':'The existing19K translates the whole native cumulative Noah lifespan to the reflected SP950 interval, reversing birth/death roles while preserving coordinate orientation and inherited phase. It does not carry the OFF internal vertex to restored-MT Noah birth. No new translation is adopted.'}