"""Finite C266 endpoint ledger. Standard library only; no upload or source mutation. Run from any cwd: python evidence/check_c266.py [--output DIR] Uses frozen source snapshots and rational phase coordinates. No historical search. """ from pathlib import Path from fractions import Fraction as F import argparse, csv, hashlib, json, re ROOT = Path(__file__).resolve().parents[1] parser = argparse.ArgumentParser() parser.add_argument('--output', type=Path, default=ROOT/'evidence') args = parser.parse_args() OUT = args.output OUT.mkdir(parents=True, exist_ok=True) checks=[] def check(name, condition): if not condition: raise AssertionError(name) checks.append(name) def dump(name,obj): (OUT/name).write_text(json.dumps(obj,indent=2,ensure_ascii=False,default=str)+'\n') def sha(p): return hashlib.sha256(p.read_bytes()).hexdigest() manifest=json.loads((ROOT/'SOURCE_MANIFEST.json').read_text()) for name,row in manifest.items(): p=ROOT/'sources'/name check('frozen input '+name,sha(p)==row['sha256'] and p.stat().st_size==row['bytes']) check('File18 controlling identity',sha(ROOT/'sources/FILE_18.md')=='68301ab760bfbe2e874aedc5c8d943ced7a6219d34bc2859332a70713f9630d5') check('File09 controlling identity',sha(ROOT/'sources/FILE_09.md')=='45851004c5864229ebf6a896f9099819a08d8926715d3e97e4bc3985c4a3876e') check('frozen graph identity',sha(ROOT/'sources/C127_GRAPH.json')=='d7be8886117c8c550e39f8846862ec613f621c0ed560d4c9d8c89446fae53503') text=(ROOT/'sources/FILE_18.md').read_text() def field(section,label,col): body=text.split(section,1)[1].split('\n### ',1)[0] rows=[l for l in body.splitlines() if l.startswith('| '+label+' |')] check('unique source row '+section+' '+label,len(rows)==1) cell=rows[0].split('|')[col].strip() nums=re.search(r'(\d+)–(\d+)',cell) check('seven-year source field '+label,nums is not None) a,b=map(int,nums.groups()) check('source envelope width '+section+' '+label,a-b==7) return (a,b) mt=field('### 6A. MT Cumulative Chronology','The Flood',5) mt_s=field('### 6A. MT Cumulative Chronology','Shem',5) mt_on=field('### 6B. MT Cumulative + 2nd Cainan','Flood',5) sp=field('### 6C. SP Cumulative Chronology','Flood',4) lxx_on=field('### 6D. LXX Cumulative Chronology','Flood',4) lxx=tuple(x-460 for x in lxx_on) check('MT ON is restored +460',mt_on==tuple(x+460 for x in mt)) check('matched MT Shem600',mt_s==tuple(x+600 for x in mt)) K,E,P=529,F(25,23),F(70,69) def pair(x): return (F(x)-F(1,4),F(x)+F(1,4)) def bc_pair(b): return (-F(b)-F(1,4),-F(b)+F(1,4)) def reflected_pair(p): return tuple(sorted(-x for x in p)) def label(x): if x<0: b=-x; return f'{b+1}t/{b}n BC' if x==0: return '1t BC / AD 1n' return f'AD {x}t/{x+1}n' def transform_field(ab,w,reflect=False): xs=[w-b for b in range(ab[0],ab[1]-1,-1)] return sorted(-x for x in xs) if reflect else xs profiles={ 'MT_ON': {'flood':mt_on,'translation':5290,'state':'restored ON'}, 'SP_OFF': {'flood':sp,'translation':4715,'state':'native OFF; official Terah145'}, 'LXX_OFF': {'flood':lxx,'translation':5290,'state':'derived OFF from native ON minus460'}, } expected={'MT_ON':([-6,1],[-8,-1],[1,8]),'SP_OFF':([-1,6],[-3,4],[-4,3]),'LXX_OFF':([0,7],[-2,5],[-5,2])} records=[] for name,row in profiles.items(): a,b=row['flood'];w=row['translation'];shem=(a+600,b+600) ff=transform_field((a,b),w) hh=transform_field(shem,w+598) rh=transform_field(shem,w+598,True) row.update(shem=shem,shem_translation=w+598,F=ff,H=hh,RH=rh) check(name+' three transformed whole fields',tuple([xs[0],xs[-1]] for xs in (ff,hh,rh))==expected[name]) check(name+' residual600-598',hh==[x-2 for x in ff]) check(name+' J1 matches reflected Shem',rh==sorted(2-x for x in ff)) for role,ab,t,reflection in [('Flood',(a,b),w,False),('Shem',shem,w+598,False),('Shem',shem,w+598,True)]: for i,base in enumerate(range(ab[0],ab[1]-1,-1)): src=bc_pair(base); moved=tuple(x+t for x in src) dst=reflected_pair(moved) if reflection else moved center= -(-base+t) if reflection else -base+t check(f'{name} {role} {i} reflection={reflection} exact phase',dst==pair(center)) records.append({'profile':name,'mode':'cumulative','Cainan':row['state'],'regular_Gear':None,'source_role':role,'source_index':i,'source_BC_base':base,'source_pair':label(-base),'translation':t,'reflection_after_translation':reflection,'pair_center':center,'phase_pair':label(center),'exact_components':list(dst),'source_identity_preserved':True}) check('MT/SP reflected Flood correspondence',profiles['MT_ON']['F']==sorted(-x for x in profiles['SP_OFF']['F'])) check('MT full7+7 join',profiles['MT_ON']['F'][-1]==profiles['MT_ON']['RH'][0]==1) check('SP ON normalization leaves fields',transform_field(tuple(x+460 for x in sp),4715+460)==profiles['SP_OFF']['F']) # The chosen chronological partition retains all three Flood roles. path=[-6,-1,0,1,6,7,8] gaps=[b-a for a,b in zip(path,path[1:])] check('chronological partition5+1+1 twice',gaps==[5,1,1,5,1,1]) contract=[-6,-1,0,1,7,8] check('contract SP closing interior gives5+1+1+6+1',[b-a for a,b in zip(contract,contract[1:])]==[5,1,1,6,1]) check('completion14',path[-1]-path[0]==14) selected=[('MT_ON','Flood',0,False),('SP_OFF','Flood',0,False),('LXX_OFF','Flood',0,False),('MT_ON','Flood',7,False),('SP_OFF','Flood',7,False),('LXX_OFF','Flood',7,False),('MT_ON','Shem',0,True)] def select(spec): n,role,i,rf=spec candidates=[r for r in records if (r['profile'],r['source_role'],r['source_index'],r['reflection_after_translation'])==(n,role,i,rf)] check('unique tagged endpoint '+str(spec),len(candidates)==1) return candidates[0] seq=[select(s) for s in selected] check('tagged chronology matches path',[r['pair_center'] for r in seq]==path) check('joined MT Flood close and reflected Shem source-close co-locate',select(('MT_ON','Flood',7,False))['exact_components']==select(('MT_ON','Shem',7,True))['exact_components']) # Cross-tradition radius pairs, already in the admitted six transformed fields. sym_specs=[('MT_ON','Flood',0,False),('LXX_OFF','Shem',7,True),('SP_OFF','Shem',7,True),('MT_ON','Flood',7,False),('SP_OFF','Flood',7,False),('LXX_OFF','Flood',7,False),('MT_ON','Shem',0,True)] sym=[select(s) for s in sym_specs] sym_centers=[r['pair_center'] for r in sym] check('symmetric selected scaffold',sym_centers==[-6,-5,-4,1,6,7,8]) check('symmetric endpoint pairing',all(a+b==2 for a,b in zip(sym_centers,reversed(sym_centers)))) h=lambda x:1000*(x-1) check('explicit symbolic local chart',list(map(h,sym_centers))==[-7000,-6000,-5000,0,5000,6000,7000]) check('chronology and radial traversals distinct',sym_centers!=path) check('chart does not fix global origin',h(0)==-1000) check('local reflection intertwines sign reflection',all(h(2-x)==-h(x) for x in sym_centers)) check('chronological scale image keeps original order',list(map(h,path))==[-7000,-2000,-1000,0,5000,6000,7000]) unit_links={'translation_difference':5290-4715,'carrier_image':K*E,'MT_SP_source_difference':mt_on[0]-sp[0],'LXX_SP_source_difference':lxx[0]-sp[0]} check('575 equals expanded529',unit_links['translation_difference']==unit_links['carrier_image']==575) check('5 and1 residual split',(mt_on[0]-sp[0])-575==5 and 575-(lxx[0]-sp[0])==1) check('ON normalization reveals120 and115',mt_on[0]-(sp[0]+460)==120 and 5290-(4715+460)==115 and 575==115+460) # Keep phase-envelope length, summed lengths and union distinct. first=(pair(-6)[0],pair(1)[1]);second=(pair(1)[0],pair(8)[1]) lens=(first[1]-first[0],second[1]-second[0]) overlap=min(first[1],second[1])-max(first[0],second[0]) union=max(first[1],second[1])-min(first[0],second[0]) check('two7.5 outer seasonal envelopes',lens==(F(15,2),F(15,2))) check('seasonal sum15 overlap0.5 union14.5',sum(lens)==15 and overlap==F(1,2) and union==F(29,2)) check('1000 calendar phase dilation differs from restored-pair lift',tuple(1000*(x-1) for x in pair(1))!=pair(h(1))) # Radius conversions are durations; their zero-centered coordinates are diagram labels. radius_rows=[] for rho in (2116,4232,5290,6348): check('radius in529 lattice '+str(rho),rho%K==0) radius_rows.append({'radius':rho,'K_units':rho//K,'width':2*rho,'E':rho*E,'EE':rho*E*E}) check('two outer completions',6348*E*P==7000 and 6348*E*E==7500) check('5000 radial completion',4232*E*E==5000) check('6000 supplied duration realization',5520*E==6000 and 8464-2458-6==6000) check('7500 summed bridges vs union',2*7500==15000 and 1000*union==14500) check('fixed landing 2BC carries four central years',7002+7002==14004 and 7502+7502==15004) # Existing source-supported Creation path. All six admitted selectors are retained. creation_paths=[] for i in range(2,8): shem=5316-i; flood=4718-i;conq=1406-i;reg=4114+i;cum=14004+i xs=[-shem,-flood,-conq,reg,cum] ds=[b-a for a,b in zip(xs,xs[1:])] check('Creation source field membership '+str(i),5309<=shem<=5316 and 4709<=flood<=4716 and 1399<=conq<=1406 and 4114<=reg<=4121 and 14004<=cum<=14011) check('Creation connected support '+str(i),ds==[598,3312,5520,9890] and sum(ds)==19320) check('Creation mixed sourcephase widths '+str(i),all(pair(b)[j]-pair(a)[j]==d for a,b,d in zip(xs,xs[1:],ds) for j in (0,1))) creation_paths.append({'selector':i,'centers':xs,'phase_pairs':[label(x) for x in xs],'gaps':ds,'scaled_gaps':[E*d for d in ds],'status':'existing sourced comparison; not identified with central transformed chain'}) check('creation scaled support differs from target motif',[E*d for d in [598,3312,5520,9890]]==[650,3600,6000,10750]) # The newly supplied macro branches keep their companion anchors and operations. macro=[] for i in range(8): conq=1399+i check('MT/LXX regular Creation common-terminal widths '+str(i),(4121-i)+conq==5520 and (5501-i)+conq==6900) flood=12696-(5296-i);cainan=12696-(4858-i);shelah=12696-(4398-i) check('macro companion offsets '+str(i),flood-6000==conq+1 and cainan-6440==conq-1 and shelah-6900==conq-1) check('Cainan macro lifespan preserved '+str(i),shelah-cainan==460) macro.append({'index':i,'primary_Conquest_center':conq,'Flood_ON_landing':flood,'Flood6000_comparator':flood-6000,'Cainan_landing':cainan,'Cainan6440_comparator':cainan-6440,'Shelah_landing':shelah,'Shelah6900_comparator':shelah-6900}) check('common7000 converted durations',6440*E==6900*P==7000) check('uniformE preserves500 while mixedkeys collapse scalar difference',6900*E-6440*E==500 and 6900*P-6440*E==0) check('Creation split460',1768-1446==322 and 1446-1308==138 and 322+138==460) check('Creation completed490',322*E==350 and 138*P==140 and 350+140==490) check('Creation transported complete envelope',1803-1796==1313-1306==7 and 1796-1446==350 and 1446-1313==133 and 1803-1306==497) check('composite27-carrier',26*490+490==27*490 and F(14464-1446)*P!=27*490) check('uniform envelope scaling not transport',7*E-7==F(14,23) and 7*P-7==F(7,69)) joins=[ {'join':'MT Flood to reflected MT Shem','status':'verified_transformed_coordinate_join','center':1,'scope':'full pair; independent source provenance retained'}, {'join':'SP and LXX interior Flood boundaries','status':'verified_source_labelled_partition','centers':[-1,0,6,7]}, {'join':'final+1','status':'verified','from':'AD 7t/8n','to':'AD 8t/9n'}, {'join':'three Flood↔reflected Shem partner fields','status':'verified_J1_symmetry','operator':'x -> 2-x'}, {'join':'local5/6/7 radii to5000/6000/7000','status':'verified_conditional_symbolic_chart','operator':'h(x)=1000(x-1)','limit':'center/duration comparison; no assertion of identical macro source events'}, {'join':'selected chronological partition equals radial traversal','status':'not_identical','reason':'different source boundaries on negative arm'}, {'join':'converted-radius provenance equals original chronological-source provenance','status':'unestablished','reason':'numeric/relational image does not equate source lineage'}, {'join':'entire cumulativeCreation route equals central motif','status':'unestablished','reason':'source-supported19320 path has different endpoints and segment widths'}, {'join':'15000 is the union of central scaled seasonal envelopes','status':'false_in_declared_union_model','reason':'sum15000; overlap500; union14500'}, {'join':'Flood6000 companion equals Cainan6440/Shelah6900 companion','status':'not_identical','reason':'all corresponding annual members are two years apart'}, {'join':'Exodus-centered350+133+7','status':'verified_generated_endpoint_chain','source_center':'Exodus1446BC','endpoints_BC':[1796,1446,1313,1306],'limit':'endpoint-calibrated envelope transport, not global dilation'}, ] dump('TRANSFORMED_ENDPOINTS.json',records) dump('CHRONOLOGICAL_LEDGER.json',{'endpoints':seq,'gaps':gaps,'contracted_centers':contract}) dump('RADIAL_LEDGER.json',{'endpoints':sym,'center':1,'radii':[5,6,7],'comparison_map':'1000*(x-1)','macro_centers':list(map(h,sym_centers)),'source_event_identity_transferred':False,'unit_links':unit_links,'radius_conversions':radius_rows}) dump('CREATION_SUPPORT.json',creation_paths) dump('MACRO_BRANCHES.json',macro) dump('JOIN_STATUS.json',joins) dump('RESULTS.json',{'step':'C266','status':'passed','check_count':len(checks),'checks':checks,'research_result':'central sequence and local5/6/7 symmetry verified; symbolic7000 chart explicit; cross-scale source identity remains unestablished','old_AD1905_1911_proposal_executed':False}) with (OUT/'ENDPOINT_LEDGER.csv').open('w',newline='') as f: fields=['profile','mode','Cainan','regular_Gear','source_role','source_index','source_BC_base','source_pair','translation','reflection_after_translation','pair_center','phase_pair'] writer=csv.DictWriter(f,fields,extrasaction='ignore');writer.writeheader();writer.writerows(records) print(json.dumps({'step':'C266','status':'passed','checks':len(checks),'output':str(OUT)}))