"""Exact original-span partition comparisons; no second reversal is executed."""
from pathlib import Path
import hashlib
import json
ROOT = Path('/workspace/scratch/1b40da62dcbd')
OUT = Path(__file__).resolve().parent
def reverse_original(n):
assert isinstance(n, int) and n > 0
scale = 1
while n % 10 == 0:
scale *= 10
n //= 10
return scale * int(str(n)[::-1])
rows = [
# name, source head, Flood, named alternate, alternate coordinate,
# expected primary, alternate and refined transformed totals, dL, dU
('MT_regular', 4106, 2456, 'Noah', 3056, 10620, 10620, 10620, 0, 0),
('LXX_regular', 5486, 3236, 'Noah', 3836, 9030, 9030, 10020, -990, -990),
('SP_regular_Fall', 4406, 3106, 'Noah', 3706, 10200, 3900, 8400, -4500, 1800),
('MT_cumulative', 14006, 4836, 'Shem', 5436, 10620, 10620, 11610, -990, -990),
('LXX_cumulative', 14896, 5746, 'Shem', 6346, 9530, 10520, 10520, 0, -990),
('SP_cumulative_Fall', 13396, 4716, 'Shem', 5316, 10010, 10010, 10010, 0, 0),
]
checks=[]
results=[]
def check(label, observed, expected):
checks.append({'label': label, 'observed': observed, 'expected': expected, 'passed': observed == expected})
assert observed == expected, label
for name, C, F, node, N, ep, ea, ef, edl, edu in rows:
a,b = F-1406, C-F
check(name+' named 600 leg', N-F, 600)
p = [a,b]
alt = [a+600,b-600]
fine = [a,600,b-600]
ip, ia, iff = [list(map(reverse_original, seq)) for seq in (p,alt,fine)]
tp,ta,tf = map(sum,(ip,ia,iff))
check(name+' transformed totals', [tp,ta,tf], [ep,ea,ef])
dl=reverse_original(a+600)-reverse_original(a)-600
du=reverse_original(b)-600-reverse_original(b-600)
check(name+' local merging defects', [dl,du], [edl,edu])
check(name+' coarse difference law', ta-tp, dl-du)
check(name+' refinement difference law', tf-tp, -du)
results.append({'name':name,'source_head':C,'source_flood':F,'alternate_node_name':node,'alternate_node':N,
'original_source_paths':{'Flood':[1406,F,C],node:[1406,N,C],'refined':[1406,F,N,C]},
'original_legs':{'Flood':p,node:alt,'refined':fine},
'reversed_legs':{'Flood':ip,node:ia,'refined':iff},
'transformed_totals':{'Flood':tp,node:ta,'refined':tf},
'held_Conquest_heads':{'Flood':1406+tp,node:1406+ta,'refined':1406+tf},
'held_Nativity_heads':{'Flood':4106+tp,node:4106+ta,'refined':4106+tf},
'dL':dl,'dU':du,'alternate_minus_primary':ta-tp,'refined_minus_primary':tf-tp})
check('MT Regular and SP Cumulative both locally additive',
[r['name'] for r in results if r['dL']==r['dU']==0], ['MT_regular','SP_cumulative_Fall'])
check('LXX Regular and MT Cumulative share balanced nonadditivity',
[r['name'] for r in results if r['dL']==r['dU']==-990], ['LXX_regular','MT_cumulative'])
subpath_translations=[]
for name, expected_two, expected_three in [('SP_regular_Fall', 5400, 8100), ('SP_cumulative_Fall', -1980, 720)]:
r=next(x for x in results if x['name']==name)
source=[r['source_flood'],r['alternate_node'],r['source_head']]
legs=r['reversed_legs']['refined']
rebuilt=[1406+sum(legs[:i]) for i in (1,2,3)]
completed=[v+2700 for v in rebuilt]
check(name+' upper refined source legs fixed', legs[1:], r['original_legs']['refined'][1:])
check(name+' upper subpath two-stage translation', [v-u for u,v in zip(source,rebuilt)], [expected_two]*3)
check(name+' upper subpath completed translation', [v-u for u,v in zip(source,completed)], [expected_three]*3)
check(name+' held Conquest excludes whole-path translation', 1406-1406 == expected_two, False)
subpath_translations.append({'name':name,'source_upper_subpath':source,'refined_two_stage_upper_subpath':rebuilt,
'refined_completed_upper_subpath':completed,'two_stage_translation':expected_two,
'completed_translation':expected_three,'scope':'Selected upper three-node branch only; held Conquest is excluded'})
lxx_model=json.loads((ROOT/'audit_cancel_20260928/recovered/evidence/model/Moses_LXX_native_complete_path.json').read_text())
lxx_nodes={r['name']:r['rounded_BC'] for r in lxx_model['rows']}
check('LXX nodes already reconstructed in declared native Rounded field',
[lxx_nodes[n] for n in ('Adam','Noah','Shem','Arphaxad')], [5486,3836,3336,3236])
sources=[
'upload/490d_LXX_Reversed_Spines_and_Accepted_SP_Solution_20260928(1).md',
'project_sources/38-File_18.Chronological_Data_Tables-20260919-141048-.md',
'project_sources/39-File_51a.Rounded_Scaffold_Mod5_Architecture.md',
'three_tradition_bridge_20260928/prep/sources/File52c_latest.md',
'audit_cancel_20260928/recovered/evidence/model/Moses_LXX_native_complete_path.json',
'project_sources/29-File_47.Patriarchal_Pairing_Six_Birth_Pairs-1-.md',
'project_sources/03-File_53.Jubilees_22Fold_Creation_Genealogy_Witness-4-.md',
]
bindings=[{'path':p,'sha256':hashlib.sha256((ROOT/p).read_bytes()).hexdigest()} for p in sources]
record={'status':'PASS','checks':len(checks),'second_decimal_reversal':False,
'purpose':'Six predeclared named 600-year partition comparisons; not a broad partition scan',
'notation':'dL=I(a+600)-I(a)-600; dU=I(b)-600-I(b-600); alternate-primary=dL-dU; refined-primary=-dU',
'sources':bindings,'results':results,'upper_subpath_translations':subpath_translations,'verification':checks}
(OUT/'partition_verification.json').write_text(json.dumps(record,indent=2)+'\n')
print(json.dumps({'status':record['status'],'checks':len(checks),'file':str(OUT/'partition_verification.json')}))
Evidence
verify partitions.py
Linked sources and evidence
Edition and provenance
verify_partitions.py
SHA-256 8865ed01510415c4b90a9bf5402e55f42b9c741e83ed2d3a5c3a82b05a0ee7f4
C480–C1634/Research_Cycles/C1433_C1482/agents/structure/verify_partitions.py