from fractions import Fraction as Q from itertools import product def run(load,check): d=load('C370_DATA.json');reg=load('C286_DATA.json')['target_register'];rows=[];phases=[] for rr in d['regular_rows']: i=rr['i'];cc=next(x for x in d['cumulative_rows'] if x['i']==i);old=next(x for x in load('C364_DATA.json')['rows'] if x['i']==i);S=old['S_ON']['coordinate'];N=rr['SP_Noah']['center'];C=S+N;e=int(rr['rail']=='companion') u=cc['input_OFF_Shem']['coordinate'];v=cc['output_OFF_Shem']['coordinate'];M=rr['input_MT_Noah']['center'];Y=rr['candidate_next_Gear_MT_Noah']['center'];q=cc['J_pivot_OFF_Flood']['coordinate'];f=cc['P_pivot_ON_Flood']['coordinate'];A=rr['J_pivot_MT_Flood']['center'];B=rr['P_pivot_SP_Flood']['center'] check('source outer and pivot correspondence '+str(i),C-q==A and C-f==B and C-S==N and C== -2645+2*i) check('middle source membership condition '+str(i),C-u==M-e and C-v==Y-e and ((C-u==M and C-v==Y)==(e==0))) typed=[z for z in reg if z['tradition']=='MT' and z['role']=='Noah birth' and z['Cainan']==z['Terah60']==z['full430']==1 and z['center'] in [C-u,C-v]] check('no invented MT person companion '+str(i),len(typed)==(0 if e else 2)) coeff=[] for name,ratio,a,ar in [('J',Q(300,299),q,A),('P',Q(70,69),f,B)]: left=(-ratio,Q(C)-(1-ratio)*a);right=(-ratio,ratio*C+(1-ratio)*ar) check('affine coefficient conjugacy '+str((i,name)),left==right) check('repaired point commutation '+str((i,name)),C-(a+ratio*(u-a))==ar+ratio*((C-u)-ar)==C-v) coeff.append({'operator':name,'cumulative_pivot':a,'regular_pivot':ar,'left_coefficients':list(map(str,left)),'right_coefficients':list(map(str,right))}) for uo,vo in product([-Q(1,4),Q(1,4)],repeat=2): ok=C-(u+uo)==(C-u)+vo check('phase orientation under fixed source-corner sum '+str((i,uo,vo)),ok==(vo==-uo)) phases.append({'i':i,'cumulative_offset':str(uo),'regular_offset':str(vo),'center_exchange_exact':ok,'same_inherited_offset':uo==vo,'same_offset_would_require_sum':str(Q(C)+2*uo)}) rows.append({'i':i,'rail':rr['rail'],'corner_sum_diagnostic':C,'paired_pivots':{'cumulative_OFF_to_MT':[q,A],'cumulative_ON_to_SP':[f,B]},'cumulative_input_output':[u,v],'exchanged_input_output':[C-u,C-v],'actual_MT_input_output':[M,Y],'actual_source_input_output_carried':e==0,'typed_MT_matches':typed,'operator_coefficients':coeff}) check('primary only source lift',[r['i'] for r in rows if r['actual_source_input_output_carried']]==[3,5]) check('no common sum for four retained rows',len({r['corner_sum_diagnostic'] for r in rows})==4) check('phase totals',len(phases)==16 and sum(p['center_exchange_exact'] for p in phases)==8 and not any(p['center_exchange_exact'] and p['same_inherited_offset'] for p in phases)) return {'step':'C375','rows':rows,'phase_controls':phases,'counts':{'paired_pivot_rows':4,'conjugate_operator_pairs':8,'source_supported_primary_rows':2,'companion_typed_source_failures':2,'opposite_phase_pairs':8,'same_phase_pairs':0},'identity':'For r_C(x)=C-x and F_a^lambda(x)=a+lambda(x-a), r_C o F_a^lambda = F_(C-a)^lambda o r_C. Existing source corners determine C; no new global axis is adopted.','interpretation':'The two local fields are exact conjugate affine comparisons at their paired source Flood pivots. Only primary rows carry the actual MT Noah records. The correspondence reverses inherited phase, so it does not turn same-offset component comparisons into one global physical-time reflection.'}