from fractions import Fraction def rank(matrix): a=[[Fraction(x) for x in row] for row in matrix];r=0 for c in range(len(a[0])): p=next((j for j in range(r,len(a)) if a[j][c]),None) if p is None:continue a[r],a[p]=a[p],a[r];v=a[r][c];a[r]=[x/v for x in a[r]] for j in range(len(a)): if j!=r: v=a[j][c];a[j]=[x-v*y for x,y in zip(a[j],a[r])] r+=1 if r==len(a):break return r def run(load,check): raw=[(0,1,2),(0,2,17),(0,3,19),(1,2,15),(1,3,17),(2,3,2)] inc=[];scaled=[] for a,b,k in raw: row=[0]*4;row[a]=-1;row[b]=1;inc.append(row);scaled.append(row+[-k]) family=load('C287_DATA.json');complete=[r for r in family['rows'] if r['complete']] for r in complete: x=[r['S'],r['F'],r['R'],r['Noah_required']] check('six source widths row'+str(r['i']),all(x[b]-x[a]==k*529 for a,b,k in raw)) check('six fixedK equations rank3',rank(inc)==3) check('unknownK system rank3two freeparameters',rank(scaled)==3) check('fixedK pin leavesone translation',rank(scaled+[[0,0,0,0,1]])==4) check('one absolute source pin closesmodel',rank(scaled+[[0,0,0,0,1],[1,0,0,0,0]])==5) check('four complete coordinate rows sixlabeled Noahbindings',len(complete)==4 and sum(len(r['Noah_records']) for r in complete)==6) hits=load('C286_DATA.json')['all_K_hits'];unique={(h['S'],h['F'],h['target']['center']) for h in hits} check('twelveKpaths ten coordinatepaths',len(hits)==12 and len(unique)==10) check('fixedreflection andallK disjoint',load('C295_DATA.json')['counts']=={'fixed8K':1,'allK':4,'both':0}) check('exactfixedreflection gaps include twoannual offsets',load('C294_DATA.json')['gaps']==[1060,1058,1060]) check('local interface598 dependent',load('C307_DATA.json')['base_rank']==load('C307_DATA.json')['rank_with598']==4) anchors=load('C308_DATA.json')['anchor_cases'] check('pointcoverage contrastedwithpathcoverage',[(a['labeled_points'],a['labeled_segments']) for a in anchors]==[(28,12),(11,0)]) check('storedroutes notnew discoveries',load('C304_DATA.json')['both_joint_comparisons_already_stored'] and not load('C304_DATA.json')['new_graph_paths_added']) check('baselineplacement notderived',load('C289_DATA.json')['baseline']=='u=0 is retained, not derived anew') claims=[ {'claim':'529 source-qualified motif','status':'established within finite retained domain','support':['C285','C286','C287'],'unit':'12 labeled paths /10 coordinate paths; four complete coordinate rows','limit':'Cumulative and regular contexts are selected and retained explicitly.'}, {'claim':'six four-node duration equations','status':'rank3 at fixedK','support':['C309'],'unit':'three independent scalar constraints','limit':'Domain membership and source provenance remain additional obligations.'}, {'claim':'absolute origin or placement','status':'not derived from duration motif','support':['C276','C289','C309'],'unit':'one free common translation at fixedK','limit':'Source placement pins and retained map intercepts are separate premises.'}, {'claim':'fixed8K reflection andpureK rectangle','status':'separately realizable but disjoint in tested complete source domain','support':['C294','C295'],'unit':'one fixed-reflection configuration, four allK configurations, zero joint','limit':'Do not combine the strongest features of different configurations.'}, {'claim':'cross-bridge complete600 comparisons','status':'partial and source-qualified','support':['C301','C302','C308'],'unit':'12 labels/eight coordinate segments atQ1406; zero atQ1446','limit':'Seven-of-eightLXX annual segment coverage differs from eight-of-eightSP point coverage.'}, {'claim':'N01/N02 joint overlap','status':'new identification of overlap with existing graph routes','support':['C303','C304','C307'],'unit':'two stored routes; their598 relation and interior residuals are algebraically dependent','limit':'No additional historical witness or new graph edge is claimed.'}, {'claim':'historical intention, global z-law, statistical rarity','status':'not established by this batch','support':['C309'],'unit':'no calibrated probability or independent historical model comparison','limit':'Exact arithmetic alone does not answer these questions.'} ] return {'core_nodes':['S','F','R','N'],'six_edges':[{'from':['S','F','R','N'][a],'to':['S','F','R','N'][b],'K_multiple':k} for a,b,k in raw],'fixedK_incidence_matrix':inc,'unknownK_matrix':scaled,'fixedK_rank':rank(inc),'fixedK_translation_freedom':1,'unknownK_rank':rank(scaled),'unknownK_dimensions':2,'Kplus_source_pin_rank':rank(scaled+[[0,0,0,0,1],[1,0,0,0,0]]),'claim_register':claims,'author_interpretation_separate_from_calculation':True}