#!/usr/bin/env python3
"""Small, source-selected packets for C1585–C1634; no endpoint search."""
import json
from pathlib import Path
checks = []
def check(label, actual, expected):
assert actual == expected, (label, actual, expected)
checks.append({"label": label, "actual": actual, "expected": expected})
def edges(nodes):
return [a-b for a,b in zip(nodes,nodes[1:])]
def q_bc(year):
return 1-year
def q_ad(year):
return year-1
def inverse(n):
core, place = n, 1
while core % 10 == 0:
core //= 10
place *= 10
out = 0
while core:
core, digit = divmod(core,10)
out = 10*out+digit
return out*place
# These inputs were already admitted in the comparative study §4.1, C1583,
# and C1584; target selections are source appointments, not a numeric scan.
original_flood = {"MT":4836,"LXX":5746,"SP":4716}
held_flood = {m:1406+inverse(f-1406) for m,f in original_flood.items()}
complete_flood = {m:f+2700 for m,f in held_flood.items()}
check("Held cumulative inverse Floods", held_flood,
{"MT":4836,"LXX":5746,"SP":2736})
check("Completed cumulative inverse Floods", complete_flood,
{"MT":7536,"LXX":8446,"SP":5436})
# Packet one: MT and LXX preserve every named edge under one 910 translation.
mt_packet = [7536,5436,4836,536]
lxx_packet = [8446,6346,5746,1446]
check("Four named-node offsets", [b-a for a,b in zip(mt_packet,lxx_packet)],
[910,910,910,910])
check("MT packet edge partition", edges(mt_packet), [2100,600,4300])
check("LXX packet edge partition", edges(lxx_packet), [2100,600,4300])
check("MT full packet width", mt_packet[0]-mt_packet[-1],7000)
check("LXX full packet width", lxx_packet[0]-lxx_packet[-1],7000)
check("Shem-target paired widths", [5436-536,6346-1446],[4900,4900])
check("Flood-target paired widths", [4836-536,5746-1446],[4300,4300])
check("Inverse-extension versus Shem edge",2700-600,2100)
check("Same edge from MT/SP reversed lower legs",3430-1330,2100)
check("Completed SP Flood is ordinary MT Shem",complete_flood["SP"],5436)
# Full triangle closure inside each four-node packet, without new targets.
for manuscript,packet in [("MT",mt_packet),("LXX",lxx_packet)]:
widths = {(str(i)+str(j)):packet[i]-packet[j]
for i in range(4) for j in range(i+1,4)}
check(manuscript+" six internal widths",widths,
{"01":2100,"02":2700,"03":7000,
"12":600,"13":4900,"23":4300})
# Packet two: all three inverse families share one appointed restoration target.
restoration_packet = [13136,7536,5436,536]
check("Three-manuscript restoration packet",edges(restoration_packet),
[5600,2100,4900])
check("Restoration packet total",sum(edges(restoration_packet)),12600)
check("Preserved 7700 refined",5600+2100,7700)
check("New 7000 refined",2100+4900,7000)
check("12600 partition at MT inverse Flood",5600+7000,12600)
check("Restoration packet 700 units",[n//700 for n in edges(restoration_packet)],
[8,3,7])
# C1584's approved limited Rounded transfer, and no deeper mirror branch.
restoration_q = [q_bc(n) for n in restoration_packet]
transported_q = [q+2700 for q in restoration_q]
expected_q = [q_bc(10436),q_bc(4836),q_bc(2736),q_ad(2166)]
check("Whole packet under approved Rounded transport",transported_q,expected_q)
check("Transported ordered widths",
[b-a for a,b in zip(transported_q,transported_q[1:])],
[5600,2100,4900])
check("12600 width after transport",q_ad(2166)-q_bc(10436),12600)
check("7000 width after transport",q_ad(2166)-q_bc(4836),7000)
check("4900 width after transport",q_ad(2166)-q_bc(2736),4900)
# Existing SP Jubilee chain remains in its expressly civil convention.
check("SP Jubilee chain, civil final leg",
[11206-4836,4836-1406,1406+65-1],
[13*490,7*490,3*490])
check("SP Flood to Conquest",11206-1406,20*490)
check("SP Flood to AD65, civil",11206+65-1,23*490)
check("Civil/rounded distinction at held MT Flood and AD2166",
[4836+2166-1,4836+2166-2],[7001,7000])
result = {"status":"PASS", "check_count":len(checks), "checks":checks,
"scope":"Source-selected whole-node packets; no endpoint scan, deeper mirror branch, or second decimal reversal."}
out = Path(__file__).with_name("target_algebra_checks.json")
out.write_text(json.dumps(result,indent=2)+"\n")
print(json.dumps({"status":result["status"],"check_count":len(checks),"output":str(out)}))
Evidence
These inputs were already admitted in the comparative study §4.1, C1583,
Edition and provenance
target_algebra.py
SHA-256 23dec352be7d67477fb9073484b26dc70adcc13257a71af30a0fbb6a0d1707cc
C480–C1634/Research_Cycles/C1585_C1634/agents/target_algebra.py