from fractions import Fraction as Q def run(load,check): E=Q(25,23);targets=load('C286_DATA.json')['target_register'];regular={t['center'] for t in targets} cumulative={-b+j for b in [5290,5750,5890,6350] for j in range(8)} rows=[] for r in load('C287_DATA.json')['rows']: i=r['i'];nodes={k:r[k] for k in ['S','F','R']} if r['complete']:nodes['N']=r['Noah_required'] for role,q in nodes.items(): glob=E*q;local=Q(i)+E*(q-i);domain=cumulative if role in ['S','F'] else regular phases=[Q(i)+E*(Q(q)+e-i) for e in [Q(-1,4),Q(1,4)]] check(f'physical width dilation {i}{role}',phases[1]-phases[0]==Q(25,46)) rows.append({'i':i,'role':role,'source':q,'global_dilation':str(glob),'global_source_center_match':glob in domain,'offset_anchored_dilation':str(local),'anchored_source_center_match':local in domain,'anchored_components':[str(x) for x in phases]}) hits=[r for r in rows if r['anchored_source_center_match']] check('only FloodOFF-to-ON center matches',len(hits)==6 and all(r['role']=='F' and Q(r['offset_anchored_dilation'])==-5750+r['i'] for r in hits)) check('global center match only opening',[(r['i'],r['role']) for r in rows if r['global_source_center_match']]==[(0,'F')]) check('noncanonical pair width',Q(25,46)!=Q(1,2)) check('phase discrepancy at center hit',E*Q(1,4)-Q(1,4)==Q(1,46)) check('single affine map cannot preserve annual steps',E!=1) return {'rows':rows,'numerical_source_instances':len(rows),'anchored_center_hits':len(hits),'global_center_hits':1,'physical_pair_hits':0,'center_only_Cainan_match':'F_OFF at i maps to F_ON at i only with anchor i; i varies across rows','ordinary_Cainan_translation':'q->q-460 preserves annual steps and halfyear pairs','dilation_halfyear_width':'25/46'}