from fractions import Fraction as Q def run(load,check): E=Q(25,23);J=Q(300,299);P=Q(70,69);reg=load('C286_DATA.json')['target_register'];out=[] scale={'Noah_to_MT_Noah':230,'Noah_to_Shem':250,'Noah_to_target_next_Flood':299,'E_image_target_Flood':325,'Noah_to_original_J_Flood':529,'Noah_to_transported_J_death':549,'next_Noah_to_death':550,'E_image_original_J_Flood':575,'second_E_Flood':625} check('primitive E factors',E*230==250 and E*299==325 and E*529==575 and E*575==625) check('primitive P J and square identity',P*69==70 and J*299==300 and 230+299==529==23**2 and 550-529==21) seen=set() for k,hit in enumerate(load('PREVIOUS_DATA.json')['hits']): rr=hit['records'];v={key:Q(value['center']) for key,value in rr.items()};x,y,N,N1,z,w,A,D=[v[key] for key in ['x','y','N','N_next','z','w','A','D']];h=y-x;a=N-z;L=w-D;d=N-x check('source forces scale '+str(k),L==600 and a==500 and h==L/300==2 and a==250*h and d==a/E==230*h) check('529 side derived '+str(k),x-A==299*h and N-A==d+299*h==529*h and N1-D==550*h) tf=hit['target_family'];bs=[r for r in reg if r['role']=='Flood start' and r['gear']==hit['input_Gear']+1 and all(r.get(key)==val for key,val in tf.items() if key!='rail')] check('existing target Flood pivot '+str(k),len(bs)==1 and bs[0]['center']==N-299*h) B=Q(bs[0]['center']);check('recovered original P J '+str(k),x-B==69*h and B+P*(x-B)==y and B-A==230*h) check('required P image still absent '+str(k),not any(Q(r['center'])==z-69*h for r in reg)) basis={name:str(N-coeff*h) for name,coeff in scale.items() if name!='next_Noah_to_death'} key=(int(A),int(B),int(x),int(y),int(N),tf['tradition']);seen.add(key) out.append({'input_Gear':hit['input_Gear'],'target_family':tf,'source_tuple':[int(t) for t in [A,B,x,y,N]],'target_Flood_record':bs[0],'gain':str(h),'source_Noah_Shem_gap':str(a),'Shem_lifespan':str(L),'derived_original_side':str(529*h),'derived_target_side':str(550*h),'side_difference':str(21*h),'Noah_held_scaled_coordinates':basis}) old=set() for row in load('C385_DATA.json')['rows']: for lift in row['source_context_lifts']:old.add(tuple(row['original_tuple'])+(lift['tradition'],)) check('bidirectional finite context correspondence',seen==old and len(seen)==8) return {'step':'C391','source_derivations':out,'normalized_distances_from_first_Noah_in_units_h':scale,'counts':{'E_J_contexts':8,'matched_original_P_J_contexts':8,'coordinate_configurations':4,'contexts_outside_correspondence':0},'derivation':'Shem600 and J forceh2. Noah-to-Shem500=250h and E forceNoah-to-input230h. Original Flood J gap299h then gives outer side(230+299)h=529h. The already sourced next-Gear target Flood has distance299h from Noah, leaving input-to-P-pivot69h, hence P gives the sameh.','interpretation':'Within the fixed coherent-family domain, the admitted E/J source motif and prior common-P/J529-side contexts coincide. The529 side is a consequence of the chosen source500/600 geometry and exact ratios, not a new independent datum. The transported P pivot remains absent, and the target550h side differs by21h.'}