from fractions import Fraction as Q from itertools import product def run(load,check): k=Q(25,23);edges=sorted({(h['records']['higher_Shem']['center'],h['records']['lower_Shem']['center'],h['records']['held_Shem']['center']) for h in load('C406_DATA.json')['hits']});paths=[] def aff(a):return(k,(1-k)*a) def comp(a,b):return(a[0]*b[0],a[0]*b[1]+a[1]) for first in edges: for second in edges: if first[1]==second[0]: T=comp(aff(second[2]),aff(first[2]));V=T[1]/(1-T[0]);paths.append({'input':first[0],'intermediate':first[1],'output':second[1],'first_pivot':first[2],'second_pivot':second[2],'affine_coefficients':list(map(str,T)),'effective_fixed_point':str(V)}) check('exactly three two E candidate paths',len(paths)==3) targets=load('C361_DATA.json')['rows'];comparisons=[];phases=[] for j,h in enumerate(targets): sq=h['squared_E'];V=sq['pivot']['center'];u=sq['input']['center'];v=sq['output']['center'];target=comp(aff(V),aff(V)) check('retained target endpoint identity '+str(j),target[0]*u+target[1]==v and not sq['intermediate_matches']) for i,p in enumerate(paths): T=tuple(map(Q,p['affine_coefficients']));delta=T[1]-target[1];matches=T==target check('whole map replacement obstruction '+str((j,i)),not matches and T[0]==target[0]) comparisons.append({'target_i':h['i'],'target_pivot':V,'target_input':u,'target_output':v,'candidate_path':i,'candidate_effective_fixed_point':p['effective_fixed_point'],'constant_output_error':str(delta),'candidate_output_at_target_input':str(T[0]*u+T[1]),'same_whole_affine_map':matches}) for e1,e2,et in product([-Q(1,4),Q(1,4)],repeat=3): A=comp(aff(p['second_pivot']+e2),aff(p['first_pivot']+e1));B=comp(aff(V+et),aff(V+et));eq=A==B check('phase cannot repair whole map '+str((j,i,e1,e2,et)),not eq) phases.append({'target_i':h['i'],'candidate_path':i,'offsets':list(map(str,[e1,e2,et])),'same_whole_affine_map':eq,'candidate_source_coherent_phases':e1==e2}) vals=load('C400_DATA.json')['prime_valuation_certificate'];check('positive word slope certificate',vals=={'7':[0,1,0],'13':[0,0,-1],'5':[2,1,2]}) nearest=min(comparisons,key=lambda r:abs(Q(r['constant_output_error']))) check('closest companion path still differs',nearest['target_i']==3 and abs(Q(nearest['constant_output_error']))==Q(4,529)) return {'step':'C408','candidate_two_E_paths':paths,'whole_map_comparisons':comparisons,'phase_comparisons':phases,'closest_comparison':nearest,'counts':{'candidate_two_E_paths':len(paths),'target_squared_E_ladders':len(targets),'whole_map_comparisons':len(comparisons),'exact_whole_map_matches':0,'phase_comparisons':len(phases),'phase_exact_matches':0},'all_finite_word_proof':'Any positive E/P/J word with slope625/529 must havep=0 by prime7,j=0 by prime13, ande=2 by prime5. Thus these three admitted EE paths exhaust possible slope-compatible replacements within the C406 coordinate graph; longer circuits cannot repair the map.','prior_art':'C361/C363 already established the−500 translated squared-E endpoints and the absent2056/2058 intermediate. They are retained dependencies, not a new discovery or rerun of the historical batch.','interpretation':'Even after relaxing the target endpoint labels and independently assigning existing pivot phases, the whole affine maps differ. The closest4/529 discrepancy does not authorize a new phase or anchor.'}