diff --git a/docs/ci-verification.md b/docs/ci-verification.md index 63ba3e9aa8..52b62d0481 100644 --- a/docs/ci-verification.md +++ b/docs/ci-verification.md @@ -1,8 +1,25 @@ # CI verification -## Current selected-family replay: #6030 +## Current selected-family replay: #7000 with #7001 The [selected record](../certificates/selected-result.json) binds conditional +κ = 0.00363005817 to the [application review](research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md), +[validation receipts](research/pr-intake-evidence/pr7000-application/VALIDATION.json), +and [explicit source closure](../certificates/frontier7000-source.json). +`make frontier7000-verify` follows that exact-source selected replay. The review +reuses eleven authenticated preceding executions and records seven fresh serial +application, scalar and complete native-catalogue executions. The earlier +monolithic timeout is retained separately and is not completed coverage. +Consult the receipts for exact commands, source heads and limits. + +The five inherited framework assumptions remain. No complete uniform word, +literal multiplier execution, independent human proof or formal-kernel proof +is asserted. Routine research submissions do not need to rerun this +selected-family replay. The sections below preserve historical checkpoints. + +## Historical selected-family replay: #6030 + +The [historical checkpoint](../certificates/checkpoints/frontier6030.json) binds conditional κ = 0.003125804 to the [proof review](research/pr-intake-evidence/pr6030-audit/PROOF-REVIEW.md), [validation receipts](research/pr-intake-evidence/pr6030-audit/VALIDATION.json), and [explicit source closure](../certificates/frontier6030-source.json). diff --git a/research/historical-selected-replay-gap/README.md b/research/historical-selected-replay-gap/README.md index 55d8cc3b49..36d9a873ca 100644 --- a/research/historical-selected-replay-gap/README.md +++ b/research/historical-selected-replay-gap/README.md @@ -69,7 +69,11 @@ python3 -B scripts/research_package.py --package research/historical-selected-re The direct command prints `PASS_HISTORICAL_SELECTED_REPLAY_GAP`. A registered replay prints `PASS_REGISTERED_RESEARCH_PACKAGE`. Both require Git history -containing the two inspected commits. +containing the two inspected commits and the source and manifest objects at +`2485805a6d47f36ea83ddde6327d453ac82d44dc`. The verifier uses a temporary +sparse checkout of that commit, checks the declared source digests there, and +uses its planner and manifest inventory. The recorded rejections and selection +therefore remain reproducible after later changes to the live Makefile or CI guide. ## Open next questions diff --git a/research/historical-selected-replay-gap/SOURCES.json b/research/historical-selected-replay-gap/SOURCES.json index c1010eec95..62bb8b3950 100644 --- a/research/historical-selected-replay-gap/SOURCES.json +++ b/research/historical-selected-replay-gap/SOURCES.json @@ -4,13 +4,13 @@ "files": [ { "path": "Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "0d683a06b9e7ee162496108ce9a7c5d2ee94fccf", "sha256": "4f2d4f2dcd15139ec82658a975f85ed300897385f85799218539f4c8d60567da" }, { "path": "certificates/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "eccafa830c16170c36faf93045ddf1f638f7bcd4", "sha256": "4c0b9d37e1034b2076e30a70f8e514416298c462d9ee98bc87fe6556b14df786" }, @@ -22,7 +22,7 @@ }, { "path": "docs/ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "63ba3e9aa8bdc5e942b56e34244b92b16f854085", "sha256": "c7d3027e9ad8bcbff68f07aa9576b30fb2f3c76c44d876d40c7fdbf4a3e2228a" }, @@ -34,163 +34,163 @@ }, { "path": "research/clifford-state-performance/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "6f98a0061a5104dfab82c9e806f819b41811f684", "sha256": "396d0f08df24952248140d5c65c51b8c902ef1c580892ff7ea182890530f67ee" }, { "path": "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "5e0f92af463ec12c5e1dcc3effd44081a88af647", "sha256": "07a9daeaf2bda308a92e9a4684f13d5fc766c7772d74801fceb7f4599fdab226" }, { "path": "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "9e13266bf85e627f1b7dc225e9530ea69fd2c7f0", "sha256": "421e1211fb1897c45621dc6801c276e53f2e6f335583c9c9049e535f87c0a3b1" }, { "path": "research/community-batch932-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "cc4d03eb59b9ab3f952735f7e88ff18c2d15d7af", "sha256": "184629cac91a5cfaca50330a88596008b824221433867dcf8117539c913c284a" }, { "path": "research/community-batch970-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8b9f4111badf7de5d97684799560b55110e9da79", "sha256": "23188ed920e38a54006cb883e181585620821c63bf7e8b5e05d32719417cc37e" }, { "path": "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "a5300d4e7a5381a3f443fc54c768ca6f0f236d68", "sha256": "3c820fb30e1b4d9bcfc6a7ab524375e5b2abd66b940af2c509146104f0bcd79c" }, { "path": "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "d7ff6d777b01d69b6ce84caf25d3b7e4a4d2f211", "sha256": "6b185a9902652f893f3ebd8ada92d2f11b6de6533a9a4d11718a8a4496101128" }, { "path": "research/community-hyperplane599-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "546f37d326d10a99910ae8f908e71ef768524d98", "sha256": "65099d764bfcc39bda5e4d9966783611b094c3522dbdd1435cd498d657a8ef8e" }, { "path": "research/community-k492-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "e538481e4cb16ed936d3195f2dfb5b5a9ca0a76b", "sha256": "2c0f4fa5bc150d05658af2e7c54c4d2c337dd52b7efd3d69530ae73bcbdf452a" }, { "path": "research/community-reconciliation92-audit/MANIFEST.json", - "usage": "input", + "usage": "provenance", "git_blob": "2a2e93685173d5f13cbb5abe740f5d90352e0228", "sha256": "5f501f3c118131e7d069f30ad77186eb2ad6961f9680a0ef105f4514ed41808a" }, { "path": "research/partial-swap-digest/baseline.py", - "usage": "input", + "usage": "provenance", "git_blob": "a2f0190704db83bd8ef48e46e723c49b925804fe", "sha256": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34" }, { "path": "research/r420-two-sided-basis/SOURCES.json", - "usage": "input", + "usage": "provenance", "git_blob": "5d718e11e62f4bcadecf1e02d6b61f87dbe190b0", "sha256": "d9810b0d139c5a1211fd2c1f0d142187cc1fca30026e1e7bc4f9ecfacf1596d1" }, { "path": "research/skip-clones/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8d1bb3b9c8189e35e5d8bfdfa632d7473e8be0d5", "sha256": "0b68e63e35a97ce6b0cdb6e291b88ebaa8f2dd4afb70b2498f10ee89428258dc" }, { "path": "research/split-skip/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "2ab610b6ea2edd2865fda793ef2168b0c76afb4f", "sha256": "7c2b4646a3ecfef6f881da5c43e4bd0fa9a4d1b00548b8ab458d897e16735134" }, { "path": "scripts/historical-ci-inputs/Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "aff68409021c9d401a6f8013b9dfd7dbcc30f2a8", "sha256": "ea8830dd79da493e2d75baf753d733ff7efbcf2b4794afe41fae0ac8f3055646" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "65db599ab0b1dea0312c4ca048e0bd0f44c3736f", "sha256": "96ea543e6c707424afe247e77bd86c82152f90fc76a0773c4232145da5cdf8d1" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "34820a8f24678f918f4d0e7a35380d8013fc3495", "sha256": "628391b6abfbc8674ceec1751867a4392f2cc0b5b66886243e139af86cf355ac" }, { "path": "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "c755b76e0d44ba4917aa94440ebe54daefce5b2a", "sha256": "d7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199" }, { "path": "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "7f3c012504187917a728b9fe87043f0fc8cd006a", "sha256": "a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0" }, { "path": "scripts/historical-ci-inputs/partial-swap-context.json", - "usage": "input", + "usage": "provenance", "git_blob": "ad65114886bf34a4fd27e79f3be502389e689faa", "sha256": "833a9642f33aeab2ffea17ec9c6b82e0a953f90192b2c82e10bef21538dccba9" }, { "path": "scripts/historical-ci-inputs/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "52075f2463f60af5e16571347f24274fce73a1ea", "sha256": "f3c4be597b2f2136da4ae2cc80c7454f63c90aa01f84e5b8131cee4dd55de815" }, { "path": "scripts/partial_swap/shared.py", - "usage": "input", + "usage": "provenance", "git_blob": "44a0e454c70f9c4b98e258b8443612e6a119904b", "sha256": "5a0646a50b9f3e8ea55168620a78e8853b0ab810517cefc8cfb8696aedee278a" }, { "path": "scripts/replay_historical_check.py", - "usage": "input", + "usage": "provenance", "git_blob": "1e92fff2782970ef71378f594f2350d245a4db26", "sha256": "5467619c78183d3adc82b0cb55af28e5c1a01fca2b0588677816244b53e2bafd" }, { "path": "scripts/research_package.py", - "usage": "input", + "usage": "provenance", "git_blob": "091b4c8f58bac9a9580d76025b887dc5c873d05f", "sha256": "e1256016e7f51827d04fa2179255989f639ae1d97afaa9c16265f85a0c6abd70" }, { "path": "scripts/run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "a96ab35b315ce492e7fbbfd6c5ae211aa066b541", "sha256": "49eb56dd0fc0d8d8ffdb209970a7adf2176223580646f575d5c22e59543b381c" }, { "path": "scripts/verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "6882a4700e410dec569b51ae2eaf1a19cc019195", "sha256": "d6b305eac5b9bdb8172c469ad30a1655a60fa0aceac8b1bf610e1b73f51babd8" }, { "path": "tests/test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "343b24abf6719b81805eba5a84c74e57634c8288", "sha256": "3a5470d0b139828b90e19bf9583ddeafcd69f8e34f2824664eb3a2958a52e34d" } diff --git a/research/historical-selected-replay-gap/VERIFY.json b/research/historical-selected-replay-gap/VERIFY.json index 98553e72ed..ab7efa3471 100644 --- a/research/historical-selected-replay-gap/VERIFY.json +++ b/research/historical-selected-replay-gap/VERIFY.json @@ -4,36 +4,7 @@ "python": "3.12", "requirements": [], "inputs": [ - "Makefile", - "certificates/partial-swap-network.json", - "docs/ci-verification.md", - "research/clifford-state-performance/SOURCE.json", - "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "research/community-batch932-audit/CONTENT-COVERAGE.json", - "research/community-batch970-audit/CONTENT-COVERAGE.json", - "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "research/community-hyperplane599-audit/SOURCE.json", - "research/community-k492-audit/SOURCE.json", - "research/community-reconciliation92-audit/MANIFEST.json", - "research/partial-swap-digest/baseline.py", - "research/r420-two-sided-basis/SOURCES.json", - "research/skip-clones/SOURCE.json", - "research/split-skip/SOURCE.json", - "scripts/historical-ci-inputs/Makefile", - "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "scripts/historical-ci-inputs/partial-swap-context.json", - "scripts/historical-ci-inputs/partial-swap-network.json", - "scripts/partial_swap/shared.py", - "scripts/replay_historical_check.py", - "scripts/research_package.py", - "scripts/run_isolated_tests.py", - "scripts/verify_selected_result.py", - "tests/test_isolated_test_runner.py" + "scripts/research_package.py" ], "commands": [ { diff --git a/research/historical-selected-replay-gap/verify.py b/research/historical-selected-replay-gap/verify.py index 83b995941a..9d266c5a4e 100644 --- a/research/historical-selected-replay-gap/verify.py +++ b/research/historical-selected-replay-gap/verify.py @@ -6,8 +6,10 @@ """ import hashlib import importlib.util +import json import subprocess import sys +import tempfile from pathlib import Path ROOT = Path(__file__).resolve().parents[2] @@ -61,31 +63,47 @@ def require(ok, message): raise SystemExit(message) -def load_checker(): - path = ROOT / "scripts/replay_historical_check.py" - spec = importlib.util.spec_from_file_location("historical_selected_replay_gap_checker", path) +def load_module(path): + spec = importlib.util.spec_from_file_location(path.stem, path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module +def checkout_snapshot(snapshot, sources, runner, env): + paths = [runner.canonical_relative_path(row["path"]) for row in sources["files"]] + git = ["git", "-c", "maintenance.auto=false", "-c", "gc.auto=0", + "-c", "core.autocrlf=false"] + subprocess.run([*git, "clone", "--quiet", "--shared", "--no-tags", "--no-checkout", + "--", str(ROOT), str(snapshot)], cwd=ROOT, env=env, check=True) + subprocess.run([*git, "update-ref", "--no-deref", "HEAD", INSPECTED], + cwd=snapshot, env=env, check=True) + # The pinned planner reads omitted manifests from the sparse HEAD/index. + patterns = "".join(f"/{path.as_posix()}\n" for path in paths) + subprocess.run([*git, "sparse-checkout", "set", "--no-cone", "--stdin"], + cwd=snapshot, env=env, input=patterns.encode("utf-8"), check=True) + subprocess.run([*git, "read-tree", "-mu", "HEAD"], cwd=snapshot, env=env, check=True) + for path, row in zip(paths, sources["files"], strict=True): + require(hashlib.sha256((snapshot / path).read_bytes()).hexdigest() == row["sha256"], + "historical checkout source digest changed: " + path.as_posix()) + + def entries(checker): for name, config in checker.CONFIG.items(): for entry in [config, *config.get("additional_inputs", [])]: yield name, entry -def reject(checker, entry): +def reject(root, checker, entry): try: - checker.authenticated_input(ROOT, entry) + checker.authenticated_input(root, entry) except ValueError as exc: return str(exc) raise SystemExit("historical input was admitted: " + entry["path"]) -def main(): - require(not sys.flags.optimize, "assertions must stay enabled") - checker = load_checker() +def check_snapshot(root, env): + checker = load_module(root / "scripts/replay_historical_check.py") selected = [entry for name, entry in entries(checker) if name == "tooling-ledger" and entry["path"] == SELECTED_PATH] require(len(selected) == 1, "selected-result checker overlay is not unique") @@ -94,7 +112,7 @@ def main(): require(entry["accepted_live_sha256"] == [SELECTED_ACCEPTED], "accepted selected-checker successors changed") frozen = (checker.INPUTS / entry["input"]).read_bytes() - live = (ROOT / SELECTED_PATH).read_bytes() + live = (root / SELECTED_PATH).read_bytes() require(hashlib.sha256(frozen).hexdigest() == SELECTED_PIN, "frozen selected checker bytes changed") require(hashlib.sha256(live).hexdigest() == SELECTED_LIVE, "live selected checker digest changed") require(SELECTED_LIVE not in (SELECTED_PIN, SELECTED_ACCEPTED), "live checker was already admitted") @@ -102,7 +120,7 @@ def main(): # live successor, not a broken comparison. require(SELECTED_PIN in (SELECTED_PIN, *entry["accepted_live_sha256"]), "pin membership control failed") - require(reject(checker, entry) == REJECTIONS[SELECTED_PATH][1], + require(reject(root, checker, entry) == REJECTIONS[SELECTED_PATH][1], "selected checker rejection text changed") counts = {path: 0 for path in REJECTIONS} @@ -110,7 +128,7 @@ def main(): for _name, item in entries(checker): if item["path"] not in REJECTIONS: continue - message = reject(checker, item) + message = reject(root, checker, item) counts[item["path"]] += 1 messages.setdefault(item["path"], message) for path, (count, message) in REJECTIONS.items(): @@ -118,20 +136,31 @@ def main(): require(messages[path] == message, "rejection text changed for " + path) require(sum(counts.values()) == 19, "rejection total changed") ci = [item for _name, item in entries(checker) if item["path"] == CI_PATH] - require(len(ci) == 1 and hashlib.sha256((ROOT / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, + require(len(ci) == 1 and hashlib.sha256((root / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, "selected CI note digest changed") diff = subprocess.check_output( - ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=ROOT, text=True) + ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=root, env=env, text=True) changed = sorted(name for name in diff.splitlines() if name) require(changed == CHANGED, "inspected commit diff changed") - sys.path.insert(0, str(ROOT / "scripts")) - from research_package import plan_details - details = plan_details(ROOT, set(changed)) + planner = load_module(root / "scripts/research_package.py") + details = planner.plan_details(root, set(changed)) require([row["package"] for row in details] == PLAN_PACKAGES, "helper plan selection changed") matched = {name for row in details for names in row["causes"].values() for name in names} require(sorted(set(changed) - matched) == UNMATCHED, "unmatched plan paths changed") - require(plan_details(ROOT, set()) == [], "empty change set selected a package") + require(planner.plan_details(root, set()) == [], "empty change set selected a package") + + +def main(): + require(not sys.flags.optimize, "assertions must stay enabled") + sources = json.loads(Path(__file__).with_name("SOURCES.json").read_bytes()) + require(sources["base_commit"] == INSPECTED, "historical checkout base changed") + runner = load_module(ROOT / "scripts/research_package.py") + env = runner.git_source_env() + with tempfile.TemporaryDirectory(prefix="historical-selected-replay-") as temporary: + snapshot = Path(temporary) / "snapshot" + checkout_snapshot(snapshot, sources, runner, env) + check_snapshot(snapshot, env) print("PASS_HISTORICAL_SELECTED_REPLAY_GAP") print("selected_checker_live=" + SELECTED_LIVE) print("rejections=19 distinct_paths=7 plan_packages=9") diff --git a/research/p104-banked-chart595-split/.gitattributes b/research/p104-banked-chart595-split/.gitattributes new file mode 100644 index 0000000000..d2f03c8025 --- /dev/null +++ b/research/p104-banked-chart595-split/.gitattributes @@ -0,0 +1 @@ +credits/PR7669-PROVENANCE.md -text !eol whitespace=cr-at-eol diff --git a/research/p104-banked-chart595-split/ASSETS.json b/research/p104-banked-chart595-split/ASSETS.json new file mode 100644 index 0000000000..21228a0d64 --- /dev/null +++ b/research/p104-banked-chart595-split/ASSETS.json @@ -0,0 +1,466 @@ +{ + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "caller_sha256": "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf", + "ci_bridge_commit": "0eabc624a9bc9ed2847719efd63390db4d297df4", + "files": [ + { + "bytes": 61, + "path": ".gitattributes", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "df132c7b9b59c1039cd707e90c4a4b5228823cd6399be6e890a4b0072448d927" + }, + { + "bytes": 8636, + "path": "CALLER.md", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "fd8ab72ff4dbca1caae4a01bb5224b908c195b79b7f27954866cd218530d1721" + }, + { + "bytes": 4521, + "path": "EDIT.json", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "c8a914049eb36f5f307dfabef080169bbee06c024eab77b75249566028ca3fcf" + }, + { + "bytes": 11357, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "path": "LICENSE", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/LICENSE", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "upstream_path": "research/p104-role230-banked/LICENSE" + }, + { + "bytes": 1628, + "path": "NOTICE", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "5b6226956ac93b15d88b95aaabb40d80f912f97a52ffea2a7068fd3c7074b179" + }, + { + "bytes": 14000, + "path": "PHYSICAL.md", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "d954c404b38a4ad705c5d8d9cac5ea12c0084bddc36859413cec7d11109c0a11" + }, + { + "bytes": 8887, + "path": "PROOF.md", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "d7e35cdcc6cf8029c62c7fb8d3d61a610e431b8b491790a93545c69c8f32c91d" + }, + { + "bytes": 4771, + "path": "README.md", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "affba06a8aa9171e72f16a4697462e082e514e5a049caff98ed2a9c5dd22cb1b" + }, + { + "bytes": 584, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "e8c2f265cd6bafc32905d4b2fb1823abed32db99", + "path": "SOURCES.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/SOURCES.json", + "sha256": "5ae4cfc96aa890b1b06aa0de688e03d9713b2772fb0f9c6ae7e23ad7d49c479d", + "upstream_path": "research/p104-role230-banked/SOURCES.json" + }, + { + "bytes": 8302, + "path": "TASK.json", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "e902d5c773cb06a3112b0de87410bf4d119a080b7797468026fe7d1aa34a91b7" + }, + { + "bytes": 1156, + "path": "VERIFY.json", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "3d7c5e83d977215d65f11ec010e05defad45db2e5a0c7c2731852f757e85fd31" + }, + { + "bytes": 18291, + "path": "caller.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "e8309f5462df962bbcb81991f9293587002674b48a19b1ea2585e942a654e815" + }, + { + "bytes": 9066, + "path": "construct.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "d21d6a13e72ad78c876efe0ebcd3d719b2a6d206d7939eefe14c03a33b374537" + }, + { + "bytes": 1238, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "1bc9b4da2b8398954cd7a49356eb9d397785d0a6", + "path": "credits/OUTER-GATE-NOTICE", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/source/gate-NOTICE", + "sha256": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "upstream_path": "research/p104-role230-banked/peer/source/gate-NOTICE" + }, + { + "bytes": 1326, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803", + "path": "credits/PR7663-NOTICE", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/source/7663-NOTICE", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40", + "upstream_path": "research/p104-role230-banked/peer/source/7663-NOTICE" + }, + { + "bytes": 7588, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "bbee2437f012c3268eb5cd920adfa37394c1de72", + "path": "credits/PR7669-PROVENANCE.md", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/source/7669-CREDITS.md", + "sha256": "706c6c852e87e371ddf1828244b2f0c2b00279728818023aa911c8947d69ab83", + "upstream_path": "research/p104-role230-banked/peer/source/7669-CREDITS.md" + }, + { + "bytes": 1697, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "951f081717e0769f3bcc0f442f133965c064d2ce", + "path": "credits/PR7674-NOTICE", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/NOTICE", + "sha256": "382537634a3d9fa0a8089d6121a506a399382f9310088b1f29586dcc93eec92d", + "upstream_path": "research/p104-role230-banked/peer/NOTICE" + }, + { + "bytes": 1955, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "4654631de087fe5034d30abc17e9d57582e5ed9c", + "path": "credits/PR7682-NOTICE", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/NOTICE", + "sha256": "7590f71de481c424d2315e9ea4884bea1557481676fa5f930f7a0bed637a56a1", + "upstream_path": "research/p104-role230-banked/NOTICE" + }, + { + "bytes": 1984, + "path": "data/CALLER-LAYOUT.json", + "provenance": "Role layout from the pinned original native source, with the exact caller source and graph metadata checked in caller.py.", + "sha256": "622c6f458eba2dab0fdfd6050303cbc16ad684ab8b834c7df568264e4cf01db6" + }, + { + "bytes": 3702, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "3e4aa383a5e3343c4688bff62bd39587b90c31b4", + "path": "data/CALLER-PHASE-BASES.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/application/data/PHASE-BASES.json", + "sha256": "325a1eb4aa7fe5f918b1d8344b88ad132ef4606268bccec20f223ace5feda18b", + "upstream_path": "research/p104-role230-banked/engines/application/data/PHASE-BASES.json" + }, + { + "bytes": 11854, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "26a75a1ae32cb4944a65281cfb08775967cb39a0", + "path": "data/CALLER.json.gz", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/source/caller.json.gz", + "sha256": "d889996a337f648087208ab51c98eaf052705d4fca88b5d01b6e9257a829897a", + "upstream_path": "research/p104-role230-banked/peer/source/caller.json.gz" + }, + { + "bytes": 431542, + "path": "data/CANDIDATE-GRAPH.json.gz", + "provenance": "Reconstructed from the pinned parent and EDIT.json by construct.py. Replay checks the canonical decompressed bytes.", + "sha256": "789c51223158f816b4046321e28449e1db540d20b75ce57e0699a20706bc3510" + }, + { + "bytes": 425821, + "path": "data/PARENT-GRAPH.json.gz", + "provenance": "Materialized by the fixed fifteen-pivot and role-230 reconstruction at the exact #7682 head. Its canonical digest is the comparator in that package.", + "sha256": "8e28c1d403145ca5d72521f4acd7e068603598334c87f18f2fefb738844a1970" + }, + { + "bytes": 2338, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "eb3730cd37d5113c756c4d74c97e7d16d97584a4", + "path": "data/PARENT-INVOICES.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/evidence/INVOICES.json", + "sha256": "a9aecf52d99d5370506b9dc6d03799241bebd2c03bbdcfa2dd5f45ec03c9d70d", + "upstream_path": "research/p104-role230-banked/evidence/INVOICES.json" + }, + { + "bytes": 8477, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "feede77664be2de84437dc1ef144ab6974b1e44c", + "path": "data/PARENT-PIVOTS.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/PIVOTS.json", + "sha256": "fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85", + "upstream_path": "research/p104-role230-banked/peer/PIVOTS.json" + }, + { + "bytes": 16880, + "path": "dense.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "6cd914aa6b1ad982aeefab30f014cca864957520404f4ce977d1e45aef1e38ce" + }, + { + "bytes": 12483, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "4872d370db37965f84872e9b66ef60923abce15a", + "path": "dense_support/field_interpreter.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/field_interpreter.py", + "sha256": "e76bc78b132607890b2d9ea234d3a52e608e0e919bdc48308cc0727a2a07c73e", + "upstream_path": "research/p104-role230-banked/engines/frozen/field_interpreter.py" + }, + { + "bytes": 14024, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "d07341b81719d96e336a47907d48c73772ec1ccb", + "path": "engines/caller/binding16.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/application/vendor/binding16.py", + "sha256": "589058311e44f2d8909495c005bee6d54828ebe561d4673b599193d269006170", + "upstream_path": "research/p104-role230-banked/engines/application/vendor/binding16.py" + }, + { + "bytes": 7783, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "2865530b7878dec54286a67e82b83093911ec43c", + "path": "engines/caller/caller16.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/application/vendor/caller16.py", + "sha256": "ced48867f07ca0143604aa98cfd74fa7453696b9d3221f7c230d73e9ab9ba81f", + "upstream_path": "research/p104-role230-banked/engines/application/vendor/caller16.py" + }, + { + "bytes": 8469, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "8785a1337d1e1c90a55a614a611e4ed57877c545", + "path": "engines/caller/directed_price.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/check_price.py", + "sha256": "446c8ebddf5b1e56d43b8d7f2ad3c1c9ba018a18105b207a0ac9e30386878a10", + "upstream_path": "research/p104-role230-banked/engines/check_price.py" + }, + { + "bytes": 6886, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "e24dc46079b4c25152f5afc096dda2ce8ee58ff5", + "path": "engines/caller/interval_gate.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/source/interval_gate.py", + "sha256": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "upstream_path": "research/p104-role230-banked/peer/source/interval_gate.py" + }, + { + "bytes": 4786, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "3e09f65fe33e162e1a5e2e0433b7ea4483759b3a", + "path": "engines/caller/native.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/native.py", + "sha256": "788465324eb8693a698c75cb3dfdf1b82297324d5583910107ecad4600645e43", + "upstream_path": "research/p104-role230-banked/peer/native.py" + }, + { + "bytes": 8209, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "0ebc1925c40cc6c11af59e405221ea51801a6e92", + "path": "engines/caller/network.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/network.py", + "sha256": "a9169fd6ad0a13c69cf39bd32649d53256f6d6fa2ed2ceda854f848b64f4c546", + "upstream_path": "research/p104-role230-banked/peer/network.py" + }, + { + "bytes": 5804, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "945c27d8c49b206f4deeb48eaf88df74c4042b3b", + "path": "engines/caller/reference_caller.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/peer/caller.py", + "sha256": "9bfb77250ca4826c1098b896769dc504b587c8c0dac634dd07012150fc8dde37", + "upstream_path": "research/p104-role230-banked/peer/caller.py" + }, + { + "bytes": 10059, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "cd19f356a5549f6b70557095e7745cdddde0485c", + "path": "engines/caller/selected-bit-ambient.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/selected-bit-ambient.json", + "sha256": "437ad2f9e7956e7f2b477b546f53a6c8cfa0567e207024300e9a7e58d3c0202c", + "upstream_path": "research/p104-role230-banked/engines/frozen/selected-bit-ambient.json" + }, + { + "bytes": 2891, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "c9b816f8445be9dc19b2259e03e9d8709d18c87a", + "path": "engines/caller/selected-claim.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/selected-claim.json", + "sha256": "3f8add8252adb223b60418ec69351a69b6b5edfe601ec1c6b4b65cd9e2afd9b2", + "upstream_path": "research/p104-role230-banked/engines/frozen/selected-claim.json" + }, + { + "bytes": 10887, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "7291ce5ab9c59f07ead921fbad9966b4a54e3292", + "path": "engines/caller/selected-validation.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/selected-validation.json", + "sha256": "e1374a98b240d7f9f2cca2a1e74b93f240b1bfc94b8cc4b94a385a50281d494e", + "upstream_path": "research/p104-role230-banked/engines/frozen/selected-validation.json" + }, + { + "bytes": 19068, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "1a6d358cbec88e70615e5314cdfca9e123124f83", + "path": "engines/caller/upstream_application.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/application/vendor/upstream_application.py", + "sha256": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "upstream_path": "research/p104-role230-banked/engines/application/vendor/upstream_application.py" + }, + { + "bytes": 41512, + "path": "evidence/CALLER.json", + "provenance": "Fresh two-engine literal signed 16-stage caller replay and complete invoices.", + "sha256": "cbef124e8b495b4bec9a1343500766af33b245121a486fff4a619c8eb284f2ad" + }, + { + "bytes": 1427, + "path": "evidence/CROSSPRICE.json", + "provenance": "Fresh independent directed calculation and extra-paid-call negative control.", + "sha256": "75a482a5d73b6fd06a181246cb5d5c431c3ba473106af9135c7dceccb38126b1" + }, + { + "bytes": 8827, + "path": "evidence/DENSE.json", + "provenance": "Fresh two-seed, two-prime held-array and actual phase/sign mutation replay.", + "sha256": "277bcf98dcbce1f986d5a9d8c0f16d87242105605fcf4d23bab2003a6f7aaed2" + }, + { + "bytes": 6049, + "path": "evidence/INDEPENDENT-REVIEW.json", + "provenance": "Independent checks on the literal early cut, phase sectors, complete caller bill and the exact outer price receipts.", + "sha256": "6dcee0fb3484fda738e802e33095510df49db40a479ec5ad05487726ea011ad7" + }, + { + "bytes": 10021, + "path": "evidence/OPERATOR.json", + "provenance": "Fresh exact independent paired forward and adjoint output table and preserved pivot observations.", + "sha256": "3f1c36c5c2614d99369b935ef8ba4acd26fb480884f9447ed5d293e27ef8bbb5" + }, + { + "bytes": 2603, + "path": "evidence/PHASE-RESULT.json", + "provenance": "Fresh native phase and operation recipe binding on the paired graphs.", + "sha256": "ba11941a6246b6094bca81da63b52f242a1e229f1b5f707af2091e978809df2b" + }, + { + "bytes": 12259, + "path": "evidence/PHYSICAL.json", + "provenance": "Fresh paired exact grid, ordinary counts and complete owned-storage replay.", + "sha256": "e9feb2cb3528182980aa773fc47be134cc5dd73f36f01eb7bb71d62e3aaddac4" + }, + { + "bytes": 32439, + "path": "evidence/PRICE.json", + "provenance": "Fresh joined comparison on the actual caller and physical receipts with directed price, compiler and outer checks.", + "sha256": "8b897bea0ae60ca9e93c0d14196fe6fedf5079cac889f31107ed337f55bf4220" + }, + { + "bytes": 2601, + "path": "evidence/SPLIT-RECIPES.json", + "provenance": "Fresh split map forward and adjoint certificates bound by the native phase replay.", + "sha256": "ef734ad7cc3c4a7b9c89146a7ffa9c6cb3039edcc3899b9b22e55bd811f7a015" + }, + { + "bytes": 22289, + "path": "native.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "99f8957af7b6bef6b6e7a3c90547612c6d0640e0653efd2bc027a6ddf0c6fa65" + }, + { + "bytes": 24317, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "bd49207c9b54b41ca8ee2e498bd5d18fcb4e061a", + "path": "native_support/PR7682-ASSETS.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/ASSETS.json", + "sha256": "f2d187f1c65f16947593ad1a78bd9d18beb0594c13202839901c7cd30a131065", + "upstream_path": "research/p104-role230-banked/ASSETS.json" + }, + { + "bytes": 160924, + "path": "native_support/PR7682-BANK-RECIPES.json.gz", + "provenance": "Full ordered paid recipe archive from the exact #7682 release replay. native.py binds it to the committed parent phase receipt and verifies use at every occurrence.", + "sha256": "06dbe8d913627dbfef6cfe6599fd8eaa7fd82daddf72253b1f9bc5cb5a4eb0e9" + }, + { + "bytes": 1238, + "path": "native_support/PR7682-HOSTED-READBACK.json", + "provenance": "Observed scientific workflow receipt at exact #7682 head, authenticated by native.py.", + "sha256": "5f9fd60011c100426a3dde09eeda9e0a65e337465083ec68ec712cf1af59ae73" + }, + { + "bytes": 47178, + "path": "native_support/PR7682-MAIN-BOUNDARIES.json", + "provenance": "Original 104 native main boundary proofs from the #7682 release replay bound to the committed phase result in native.py.", + "sha256": "52f7260cf935ce523f5e899c7f384765b56a257bce93bdc4427417df3ba971e0" + }, + { + "bytes": 2300, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "a2b53090983c393004497ccec018e72bed7b14d2", + "path": "native_support/PR7682-PHASE-RESULT.json", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/evidence/PHASE-RESULT.json", + "sha256": "50b05bdc2805d709761ce5c4b42e7ec352141366f5cc6031df9f8779e8872735", + "upstream_path": "research/p104-role230-banked/evidence/PHASE-RESULT.json" + }, + { + "bytes": 6824, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "path": "native_support/clifford_exact.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/clifford_exact.py", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "upstream_path": "research/p104-role230-banked/engines/frozen/clifford_exact.py" + }, + { + "bytes": 12323, + "commit": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "path": "native_support/native_verify.py", + "provenance": "https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/frozen/native_verify.py", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "upstream_path": "research/p104-role230-banked/engines/frozen/native_verify.py" + }, + { + "bytes": 25258, + "path": "operator.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "a3c161b55b7ed47fa8b762969380494c3135747d4759fb32a70873411d1205ae" + }, + { + "bytes": 38575, + "path": "physical.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "99086ace7b514267c18f14971d25d871ee33e8f4924292a0c460d4f63e92518f" + }, + { + "bytes": 13600, + "path": "price.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "5ef6fc20f98deda0f363744f9ad11ac49bef2370ccfe26dc635595ef6afd26a0" + }, + { + "bytes": 5702, + "path": "price_crosscheck.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "d2440f54cac09ea51da1e51fbcaa79f6c6fd10d4324ebc8022382b54b4d32fb4" + }, + { + "bytes": 943, + "path": "review/README.md", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "821357e060f83dae68317dad4085ad515e4d38bf4c160dc00e2a40b677e0b9cd" + }, + { + "bytes": 19541, + "path": "review/check_cut_and_price.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "a17a0c23996c6d1f81b04cf6433faa6e49f2294f069f488425fe791b11489887" + }, + { + "bytes": 15203, + "path": "verify.py", + "provenance": "Chart-595 source, authority or evidence in this contribution.", + "sha256": "0c7da19bf1231164e21f118d36dc3b94c527d1c55ee65a6da3e7f1c7a62b07f6" + } + ], + "graph_pins": { + "candidate": "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b", + "peer": "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" + }, + "parent_head": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "schema_version": 1 +} diff --git a/research/p104-banked-chart595-split/CALLER.md b/research/p104-banked-chart595-split/CALLER.md new file mode 100644 index 0000000000..0d5f9ac65e --- /dev/null +++ b/research/p104-banked-chart595-split/CALLER.md @@ -0,0 +1,147 @@ +# Actual signed 16-stage application and price + +The exact chart-595 graph gives conditional κ ≥ **0.0037266288**. The +directed crossing lies in **(0.0037266288769, 0.0037266288770)**. The lower +point exceeds the compatible #7682 upper, 0.0037261023901, by the exact +fraction 5,264,099 / 10,000,000,000,000. The two comparisons use the same +literal 4,192-event caller on ambient rank 137. The application checker +binds the parent head `1b4a4d6f9370b8c93b3f769a6229a9111ef3940e`, parent +graph `1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150`, +child graph `d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b` +and literal caller digest `62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf`. +[Frozen parent contract](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/PROOF.md) + +## Operator and owner verification + +Across the sixteen actual joint events, there are 96 A ports and eight B +ports. Each binds the exact 400 main slots, including the 96 distinct +second planes. The two Gaussian group-ring replays use the printed joint +coefficients, the old two B operands at each butterfly, the chronological +stage powers and each signed head operation. Both get the declared +diagonal on all 68 formal root rows. Replicated on the actual ports these +are 3,536 independent same-owner root returns. The checked ordinary head +translation count is also 3,536. + +The role-230 phase routines check all 12,800 forward and return contacts +in the sixteen complete charts. Each contact exchanges its eight stage +directions, fixes its head direction and preserves every spectator, with +the exact phase correction. An aliased joint owner and an omitted +translation both fail. Exact native row replay proves all 1,501 parent +and 1,502 child outputs on independent normalized input basis vectors. +The native terminal rows realize the two A shears, the B butterfly and +the identity in each helper's own normalized row. Substituting the 400 +fixed native main operators into the sixteen checked stage maps therefore +gives the same literal signed root operator. + +For a helper supplied with actual input x at entrance E, its independent +normalized input is T_E⁻¹x. Its physical same-owner return at G is +T_G T_E⁻¹x, tensorized at the active multiplicity and with the identity +on spectators. The parent role 281 returns at chart 127 from chart 3. +The child role 281 returns at 595 from 3, and the new independent role +1501 returns at 127 from 595. Stage and role tags distinguish both owners +on every call. The checker also verifies the two retained arbitrary +rank-four helpers, roles 325 and 1087. The exact phase of the changed +native boundary maps belongs to the native operator replay. +[Caller checker](caller.py) · [Construction proof](PROOF.md) + +## Complete signed invoice + +| Quantity | #7682 | Chart-595 split | +| --- | ---: | ---: | +| Positive paid native slots per call | 6,142 | 6,142 | +| Paid placements in the whole caller | 101,824 | 101,824 | +| Independent native helper owners across sixteen calls | 17,616 | 17,632 | +| Root owners | 3,536 | 3,536 | +| Total productive placements | 21,152 | 21,168 | +| Productive minus paid rank mass | 1,328 | 1,328 | + +The ordered native paid keys and their endpoint frames are identical. +The complete caller invoice replays the fixed QUERY and both kinds of +IDLE charges. The literal changes at ranks 1, 8 and 9 in the productive +histogram are +16, +16 and −16. This gives strict gain +16[1 + 8^(1−κ) − 9^(1−κ)] in target-minus-paid moment. The invoice +counts each of the new helper's two complete ordinary boundary maps and +each of its two odd scale conversions at all sixteen stages. If an extra +paid rank-one operation were needed anywhere in the whole signed caller, +the directed comparison at the parent upper would fail. +[Exact parent invoice](data/PARENT-INVOICES.json) · [Price checker](price.py) + +## Compiler and ordinary lift + +Two independent directed power enclosures verify the signs at each +endpoint and give a strictly decreasing moment through the selected +BIT floor. The fixed compiler has product power 1,920, paid cutoff 11, +target floor 12, power offset 1/7 and conservative ambient cap 153. At +0.00372662880007 the price ratio is below 1 − 10⁻²⁷ and both tail ratios +are below 31/32. The input-lift tests pass. The ambient-corrected selected +BIT at 134 axes supplies floor 0.00376669. The compiler writes log power +2,287 and H = 14,558,800,000,000,000,000. All 54 strict and four functional +outer predicates pass, with exact minimum margin 10⁻¹⁵. + +The joined proof checks both graphs against their actual path grids. +They use odd factors 2,025 and 2,083,725 and binary height 18. The signed +caller uses odd factor 2,025 and binary height 9. The paired ordinary +schedule uses 9,149 and 9,151 numerical homes per call, below the published +15,290-home cap, with four separate guarded streams on both sides. The +complete conversion counts are 55,104 and 55,136 and the ordinary map +positions are 280,480 and 280,512. The joined receipt checks the finite +ownership, reset, selection, ordinary work and complete return charges and +compares the newly calibrated H against the exact root depth guard. With +c = 1,176, the bit length of c·1,920·153^1920·(H+1)^2 is 14,083, strictly +below H. Use the retained width W = p+h+2D+3 and the physical proof's +additional signed component allowance for ordinary scalar service. + +The complete compiler stock O includes the simultaneous owner tuples, +selectors, guides, guarded streams, phase and child views, retained parent +contexts and BIT backing. The complete ordinary cost G includes the full +workspace setup and retirement, exact coefficient work, root changes and +charged copies. With compiled productive width W_p, paid rank-one mass P +and N = 2^H, substitute Z = W_p+O, E_0 = 64(Z+N+P+G+1)^3, B_0 = P+E_0 +and C_0 = 32NB_0². The strict outer margins absorb the finite template +constants after increasing the eventual input cutoff. +[Physical proof](PHYSICAL.md) · [Selected finite-template lift](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md) + +The claim uses the five named assumptions from the selected framework +`native_all_columns`, `owned_erasure`, `compiler`, `precision_tape` and +`analytic_recovery`. + +## Source and replay + +The literal caller and vendor code come from #7682's exact published +package. The original caller lineage credits Rohan Arun's #7113 and +SYLforge's #7669. Ali Romman's #7674 supplies the normalized banked +network interpreter, a separate Gaussian caller replay and exact +decimal interval gate. Douglas Colkitt supplies the upstream signed +contact geometry. The binary rational evaluator and the actual +16-stage phase projection come from the retained #7682 role-230 +qualification. The selected BIT inputs remain source-pinned to +canonical main at `e54523517d0f03e58352e647c403a5af3e525a57`. +[Exact #7682 archive](https://github.com/Clear1nsight/integer-mult-bounds/tree/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked) + +`data/CALLER-LAYOUT.json` projects `public`, `live`, `ports` and `hosted` +from the exact `source_word()` in that archive's peer network loader. +The loader applies the twelve #7669 edits to the original K372 archive +and authenticates the resulting word hash +`ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d`. +The replay uses the complete boundary and frame arrays from the pinned +bank graphs. The vendored application modules are byte-identical to +`engines/application/vendor` at #7682. Under `engines/caller`, the +independent `reference_caller.py` is `peer/caller.py`, `interval_gate.py` +is `peer/source/interval_gate.py`, and `directed_price.py` is +`engines/check_price.py` at the same head. The native row and scheduling +engines are `peer/native.py` and `peer/network.py`. + +From this package, with CPython 3.12 and fresh output paths: + +```sh +python3.12 -I -B caller.py \ + --parent data/PARENT-GRAPH.json.gz --candidate data/CANDIDATE-GRAPH.json.gz \ + --caller data/CALLER.json.gz \ + --candidate-sha256 d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b \ + --out /tmp/chart595-caller.json +python3.12 -I -B price.py --caller-proof /tmp/chart595-caller.json \ + --physical /tmp/chart595-physical.json --out /tmp/chart595-price.json +``` + +The `--physical` input is the same-graph output of the physical checker. +A price run without this input records the numerical gate on its own. diff --git a/research/p104-banked-chart595-split/EDIT.json b/research/p104-banked-chart595-split/EDIT.json new file mode 100644 index 0000000000..e470e9f570 --- /dev/null +++ b/research/p104-banked-chart595-split/EDIT.json @@ -0,0 +1 @@ +{"caller_sha256":"62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf","charts":[3,595,127],"fixed_special_helpers":[325,1087],"fresh_role":1501,"functional":[[281,"-1/2"],[417,"1/4"],[419,"1/4"],[430,"-1/16"],[442,"-1/16"],[479,"-1/2"],[548,"-1/4"],[549,"-1/4"],[582,"1/8"],[583,"1/8"],[1172,"-1/2"],[1187,"1/2"],[1214,"-1/2"],[1215,"-1/2"],[1245,"1/8"],[1343,"1/3"],[1473,"1/2"]],"group_roles":[3,21,34,39,61,126,133,151,173,188,205,226,228,229,230,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,260,262,263,264,265,266,267,268,269,270,271,272,274,276,278,279,280,281,283,284,285,286,287,288,290,292,294,295,296,297,299,300,301,302,303,304,306,311,312,313,315,316,317,319,320,328,329,331,332,334,335,336,338,340,342,343,344,347,348,349,350,351,352,354,356,358,359,360,363,364,365,366,367,370,372,376,377,379,380,382,383,384,388,392,393,395,396,397,398,399,402,404,407,408,409,411,413,414,415,416,417,418,419,420,421,423,424,425,426,427,428,429,430,431,433,434,436,437,438,439,440,441,442,443,444,445,446,447,448,449,456,458,460,461,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,482,483,484,485,486,487,488,489,490,491,492,494,495,496,497,498,499,500,501,502,504,505,506,507,508,510,511,512,513,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,580,581,582,583,586,587,589,590,591,592,599,600,608,609,611,617,619,624,625,627,632,635,640,641,643,655,659,664,665,671,672,679,680,681,688,689,691,695,697,704,707,709,711,716,726,732,733,752,756,757,758,760,761,767,775,789,791,793,802,806,810,811,812,830,896,901,913,917,924,929,952,969,988,990,991,992,993,994,995,996,997,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1024,1025,1026,1027,1029,1030,1031,1032,1033,1034,1035,1037,1039,1041,1042,1043,1044,1046,1047,1048,1049,1050,1051,1053,1055,1057,1058,1059,1060,1062,1063,1064,1065,1066,1068,1070,1072,1073,1074,1075,1077,1078,1079,1080,1081,1084,1086,1088,1089,1090,1091,1093,1094,1095,1096,1097,1098,1100,1102,1104,1105,1106,1109,1110,1111,1112,1113,1114,1116,1118,1120,1121,1122,1125,1126,1127,1128,1129,1132,1134,1136,1137,1138,1139,1141,1142,1143,1144,1145,1146,1148,1150,1152,1153,1154,1155,1157,1158,1159,1160,1161,1162,1164,1166,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1180,1181,1182,1183,1184,1186,1187,1188,1190,1191,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1210,1212,1214,1215,1216,1221,1222,1224,1227,1228,1229,1230,1232,1233,1234,1235,1236,1238,1240,1241,1242,1243,1244,1245,1247,1248,1249,1250,1253,1255,1256,1257,1258,1259,1260,1262,1263,1264,1265,1272,1273,1274,1277,1279,1281,1283,1284,1286,1287,1289,1293,1294,1295,1298,1300,1302,1306,1307,1309,1310,1311,1317,1318,1319,1321,1322,1328,1329,1331,1334,1340,1341,1343,1349,1445,1449,1453,1461,1463,1464,1465,1466,1469,1470,1471,1472,1473,1477,1479],"injection":[[93859,"8/7"],[96158,"-4/7"],[96162,"-4/7"],[96302,"8/7"],[96335,"32/7"],[97328,"-40/21"],[97329,"-8/7"],[98085,"-4/7"],[98090,"-4/7"],[102698,"8/21"]],"old_public_roles":1501,"prefix":[[87424,"1/4"],[89521,"1/2"],[93088,"-1/4"],[93090,"-1/4"],[94042,"-1/8"],[95204,"-1/2"],[95206,"-1/2"],[95743,"1"]],"protected_slots":[87457,87508,87678,87777,88940,88983,89622,89623,89629,89630,89639,90064,93636,93637,94756,95049,96713,97031,97185,97405,97471,97473,97475,97479,99123,99169,99190,101174,101176,102393,102653,102748,103275],"ranks":[1,8],"reference_cut":[995,1473],"retired_role":281,"return_direction":[[396,"-4/7"],[397,"-4/7"],[417,"2/7"],[419,"2/7"],[430,"-8/7"],[442,"-8/7"],[479,"-8/7"],[578,"-8/7"],[580,"2/7"],[581,"2/7"],[672,"8/7"],[679,"-8/7"],[680,"-8/7"],[1007,"-4/7"],[1039,"-8/7"],[1095,"-8/7"],[1175,"-4/7"],[1176,"-4/7"],[1181,"4/7"],[1216,"-1/14"],[1234,"4/7"],[1243,"1/7"],[1245,"-24/7"],[1263,"8/7"],[1273,"-8/7"],[1306,"1/7"],[1317,"-4/7"],[1343,"16/7"],[1449,"8/7"],[1473,"-8/21"]],"schema":"p104-banked-chart595-split/v1","source_graph_sha256":"1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150","source_head":"1b4a4d6f9370b8c93b3f769a6229a9111ef3940e","source_pr":7682,"source_witness_sha256":"1430fe7318a6ada80a46683bca42444facaaca020ffe871d13518bf32095cfa9","source_word_sha256":"ab5653d6b6007f8a7987e7ffc6ebab24c662ba852a0d0b446c3a1be19b88db8a"} diff --git a/research/p104-banked-chart595-split/LICENSE b/research/p104-banked-chart595-split/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-banked-chart595-split/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/p104-banked-chart595-split/NOTICE b/research/p104-banked-chart595-split/NOTICE new file mode 100644 index 0000000000..9405484426 --- /dev/null +++ b/research/p104-banked-chart595-split/NOTICE @@ -0,0 +1,7 @@ +Apache License 2.0. Research prepared for Clear1nsight with substantial OpenAI Codex and ChatGPT Pro assistance. + +The chart-595 cut, arbitrary-helper encoder and decoder, exact changed graph and matched application are the contribution. Ali Romman supplied the joint helper-basis mechanism and the fifteen banked transfer pivots of PR #7674. Clear1nsight supplied the role-230 rechart and its paired chart graph in PR #7682. SYLforge supplied the signed sixteen-call caller and the preceding exact native source in PR #7669. DreamingOfClouds and Rohan Arun supplied retained native and signed-caller lineage. Jerry Chen (CubeJerry) supplied the selected #7000 and #7001 framework applications. Douglas Colkitt and the credited authors supplied the inherited operator engines, power evaluator, compiler and package infrastructure. + +The exact predecessor notices and inherited source attributions are in `credits/`. `ASSETS.json` binds the borrowed bytes and the reconstructed inputs. Direct reuse is identified against its exact published path when the bytes are present at that head. The physical guide and exact-grid approach also draw on Ali Romman's #7663, #7666, #7670 and #7674. The selected applications and earlier #5599 helper split remain separately credited in the proof. + +The branch carries ToikY's existing workflow bridge at `0eabc624a9bc9ed2847719efd63390db4d297df4` above canonical `e54523517d0f03e58352e647c403a5af3e525a57`. Its five changed blobs are Clear1nsight's #7257 guide and historical source repair and preserve the earlier published credit. The workflow commit is separate from the scientific package. diff --git a/research/p104-banked-chart595-split/PHYSICAL.md b/research/p104-banked-chart595-split/PHYSICAL.md new file mode 100644 index 0000000000..f1696778af --- /dev/null +++ b/research/p104-banked-chart595-split/PHYSICAL.md @@ -0,0 +1,55 @@ +# Exact precision and complete bank costs + +The parent is #7682 at `1b4a4d6f9370b8c93b3f769a6229a9111ef3940e`. The child graph has decoded SHA-256 `d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b`. Both use the literal #7669 signed caller with decoded SHA-256 `62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf`. The candidate fixes the ordered chart atlas and paid edges, changes the folded scalar source forms, installs owner 281's short return at chart 595 before the suffix, and supplies a distinct new owner 1501 with entrance 595 and final chart 127. The 400 main ports and both rank-four protected helper boundaries retain their original binding. The complete native operator supplies the physical chart maps and the independent grid check covers every scalar incidence on both graphs. [#7682 paired bank construction](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/PROOF.md) + +| Checked quantity | #7682 | Chart-595 split | +| --- | ---: | ---: | +| Literal scalar terms per native call | 169,349 | 170,652 | +| Independent basis products per native call | 8,535,132 | 8,738,317 | +| Sufficient path grid | $2025\cdot2^{18}$ | $2083725\cdot2^{18}$ | +| Minimum product grid | 921,600 | 45,158,400 | +| Minimum stored-snapshot grid | 23,040 | 161,280 | +| Numerical homes per native call, then per raw caller | 9,149 / 146,384 | 9,151 / 146,416 | +| Complete guarded streams per raw caller | 64 | 64 | +| Complete array conversions per raw caller | 55,104 | 55,136 | +| Reset services per native call | 1,452,522 | 1,462,963 | +| Selected copy legs per native call | 396,840 | 399,454 | +| Scalar services per raw caller | 120,428,544 | 121,101,312 | +| Ordinary monomial map slots per raw caller | 280,480 | 280,512 | +| Conservative elementary monomial records at ambient 153 | 26,607,454,720 | 26,610,490,368 | + +The child has 166,789 coefficient products with a literal denominator divisible by seven. Removing the full factor $7^3$ from its sufficient path grid produces remainder 12 at row 87424, donor −282 and independent input column 281, with coefficient $-40/21$. Both matched scalar tariffs use 21 literal bits and $2^{29}$ steps per padded payload cell per scalar service. The conservative common depth parameters are $A=336$, $B=588$ and $c=1176$. At the checked common $H=14558800000000000000$, $cK_*$ has bit length 14,083. The signed verification binds this guard and the ordinary counts to its price and compiler receipt. + +## Finite path grids and root induction + +For an entrance donor let $g_r=1$. For a calculated row let $g_v=\operatorname{lcm}_{u\to v}(g_u\,\operatorname{den}q_{vu})$, where each exact scalar $q_{vu}$ is reduced and the empty row uses one. The product $g_u\,\operatorname{den}q_{vu}$ clears the coefficients of the literal product before it is added. The row $g_v$ therefore clears the entire prefix and every completed coefficient. The global lcm is a sufficient coefficient grid $G=2^{a}S$ for the ordered native schedule. The odd factor $S$ is a finite integer and applies to any prime or prime power in the denominators. The implementation multiplies at each actual entrance and divides at its complete return. There is one scale and one unscale per same-owner full array in each native invocation. The exact forward checker also computes the minimum grid for the actual reduced product coefficients and the separate stored-row minimum. It locates a real product in the child whose divisor has nonzero remainder on the same sufficient grid with its factor of seven removed. + +The graph recurrence is a proof about arbitrary independent entrance coefficients. In a cocharted physical row each entrance column has the factor $T_{\rm current}T_{\rm input}^{-1}$ on the normalized rational coefficient. Any physical MOVE or helper endpoint is composed with its exact ordered-basis map, including absolute phase and all spectator coordinates. An exact completed native and compiler child joins the Clifford factor on the original root, including earlier debt at entrance. Hence odd divisibility for the actual physical numerator follows from the coefficient proof on the common binary grid and the dyadic nature of the Clifford factor. Both root formats allow every exact product, prefix, and completed row. The unscaled native endpoint has the signed main coefficients and an identity normalized row on each helper owner. This gives the same dyadic representation at completed return, so its unscale also has zero remainder. Extending the theorem to a factor of seven uses the same lcm and remainder invariants as other fixed odd factors. A single outer scaling would leave a nested exact division without this guarantee. [Selected odd-grid induction](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/odd-native-common-grid/PROOF.md) + +For a conservative mass bound propagate the sum of $\lvert q\rvert$ times the donor bound, starting at mass one. This bounds every materialized prefix and quotient regardless of cancellation. The caller's own exact formal replay uses odd scale 2025 and dyadic height 9. A second caller pass follows the actual signed order with no cancellation or commutation, maintaining the $v_2$ height and $\ell_1$ mass of the expansion in products of Cliffords. LAMBDA uses its two signed half terms, raising height by one and at most doubling the mass. At a J event read all six old main roles before assigning the two signed shears and the B butterfly. Fresh helper inputs have mass one locally. The maxima over caller cuts and the composition of pre-J cuts with the native paths give $A$ exterior binary bits and $B$ mass bits per unfinished raw context on both graphs. The receipt reports both. This conservative envelope is independent of the tighter cancellation in the exact caller polynomial and uses the same executed odd conversions. + +Use $c=2\max(A,B)$. The selected compiler bound $K_*=1920\cdot153^{1920}(H+1)^2$ passes the depth guard when $\operatorname{bitlength}(cK_*) editorially normalized SHA-256): + +- `evidence/BUILD.json`: `4744201691120223ded62a3e0d55ea1029203f3ea996305163e7db8d9e3679a4` -> `a0bafbb3f44920ed6ac1ed3d83385f025f5bbbcf5e9c8013ab1ca55ccf23c32d`. + +- `evidence/NATIVE-EVIDENCE-REUSE.json`: `6615b8a051ac9e4d8c73b5decf8a70d2a33d14da0c4c369574dec946984aa351` -> `84bab14d5c584aa8853b8e1025b562541ac6657e458d120ec803f2bc149c3eb8`. + +- `evidence/ROLE770-BUILD.json`: `c4ee72317678791d4b801479df0af052f3a50662c11ce3f3393b2151368fc92d` -> `1c400f16efbc427c40c811a57dc656fe97c2c84f94c71529e2c5c0598b146369`. + +- `evidence/PRICE-SUMMARY.json`: `c2777382c677634f7017b68c55dbd831a40945b77057f26b738f857c17ee8759` -> `d13741fe3217a01edd0b79b40dad037e644e441fbbc300838df99c0b050a5f42`. diff --git a/research/p104-banked-chart595-split/credits/PR7674-NOTICE b/research/p104-banked-chart595-split/credits/PR7674-NOTICE new file mode 100644 index 0000000000..951f081717 --- /dev/null +++ b/research/p104-banked-chart595-split/credits/PR7674-NOTICE @@ -0,0 +1,7 @@ +Apache License 2.0. Research prepared for Ali Romman with substantial OpenAI Codex assistance. + +New work includes the fifteen certified sender/receiver pivots, the forward and transposed communication construction, the complete native row checker, and the finite stock and precision application for this 16-call program. + +SYLforge supplied the composition, native word reconstruction, published invoice and exact 16-stage caller bytes from PR #7669. Their original PROVENANCE.md is preserved in source/7669-CREDITS.md. It credits the H5B work of SYLforge, DreamingOfClouds' joint native reconstructions, Clear1nsight's coefficient splitting, role-379 and helper work, Rohan Arun's signed caller lineage, and prior contributions from CubeJerry, Douglas Colkitt and others. The source/ directory holds the exact file bytes identified in SOURCE-PINS.json. + +The group-ring caller checker, independent operator checks, bit service, finite-cost method and field guide adapt the corresponding code and arguments of Ali Romman's PR #7663. That package in turn builds on the contributors named in its preserved source/7663-NOTICE. The unchanged directed log/exp gate retains its listed sources in source/gate-NOTICE. Earlier paid-transfer and bank-support constructions include PRs #7434 and #7576. Jerry Chen (CubeJerry) supplied the selected PRs #7000 and #7001 and the typed initializer in PR #7586. The per-call odd-grid induction and the selected application review provide the complete-root realization and finite-cost substitution. Douglas Colkitt and the credited repository authors supplied the pinned operator engines, price evaluator and research workflow. The license accompanies this package. diff --git a/research/p104-banked-chart595-split/credits/PR7682-NOTICE b/research/p104-banked-chart595-split/credits/PR7682-NOTICE new file mode 100644 index 0000000000..4654631de0 --- /dev/null +++ b/research/p104-banked-chart595-split/credits/PR7682-NOTICE @@ -0,0 +1,9 @@ +Apache License 2.0. Research prepared for Clear1nsight with substantial OpenAI Codex assistance. + +Ali Romman supplied the fifteen exact banked pivots and the frozen #7674 baseline, along with the complete signed 16-call graph and application method. The original notices remain at peer/NOTICE, peer/source/7663-NOTICE and peer/source/gate-NOTICE. Read peer/SOURCE-PINS.json for each ancestry binding and ASSETS.json for the exact vendored bytes at scientific commit 26b6c469aa6c4aa04322ce25a22150f90e5fb14e and refreshed head 28b2af322a1fab01b3734365988930920f9dda48. + +SYLforge supplied the #7669 composition, native source pins and literal caller. Its preserved parent provenance is peer/source/7669-CREDITS.md. Retain DreamingOfClouds' #7641/#7658 lineage, Clear1nsight's integer scalar/contact work including #7612, ToikY's #7643 contact-rechart precedent, Rohan Arun's #7113 signed-caller lineage, 5080's helper work, and all other contributors named in the original records. Ali Romman's #7663 exact-grid and extent proof and #7666/#7670 selection and guide work supply relevant implementation precedents. Jerry Chen (CubeJerry) supplied the selected #7000/#7001 applications and #7586 typed initialization. Douglas Colkitt and the authors in the original notices supplied the frozen native compiler, independent checker, price evaluator and package infrastructure. + +The release base reuses ToikY's exact shared CI and historical replay sync 0eabc624a9bc9ed2847719efd63390db4d297df4 above canonical e54523517d0f03e58352e647c403a5af3e525a57. This workflow provenance is separate from the banked construction and its mathematical comparison. + +This package credits the original role-230 splice and its same-contract transfer to the unchanged fifteen-pivot graph, the independent exact wire and price replays, matched complete resource accounting and source-bound native and caller verification. The original works retain their authorships and licenses. diff --git a/research/p104-banked-chart595-split/data/CALLER-LAYOUT.json b/research/p104-banked-chart595-split/data/CALLER-LAYOUT.json new file mode 100644 index 0000000000..2889874f82 --- /dev/null +++ b/research/p104-banked-chart595-split/data/CALLER-LAYOUT.json @@ -0,0 +1 @@ +{"hosted":{"Dports":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,36,37,38,39,40,41,43,44,45,46,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],"X2":[772,773,774,776,777,778,779,780,781,782,783,784,785,787,788,790,792,794,795,796,797,798,799,800,801,803,804,805,807,808,809,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,832,833,834,835,836,837,838,839,840,841,842,843,844,845,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881],"Y2":[882,883,884,886,887,888,889,890,891,892,893,894,895,897,898,899,900,902,903,904,905,906,907,908,909,910,911,912,914,915,916,918,919,920,921,922,923,925,926,927,928,930,931,932,933,934,935,936,938,939,940,941,942,943,944,945,946,947,948,949,950,951,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987],"alpha":"-1","alpha2":"-1","beta":"1/2","beta2":"0","mode":"mix-t0"},"live":[0,1,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,62,63,64,65,66,67,68,69,70,71,72,73,74,75,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"ports":[11,19,35,131,259,13,21,37,69,133,261,41,73,265,49,81,145,273,161,193,321,385,14,22,38,70,134,262,26,74,138,50,146,274,98,290,194,322,386,28,44,140,268,84,148,276,100,164,292,196,324,388,56,88,152,280,168,296,200,328,392,112,176,304,208,336,400,224,352,416,508,506,502,494,478,446,382,254,505,501,493,477,445,381,253,499,475,443,379,251,487,471,439,375,247,463,431,367,239,415,351,223,319,191],"public":1501,"source_word_sha256":"ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d"} diff --git a/research/p104-banked-chart595-split/data/CALLER-PHASE-BASES.json b/research/p104-banked-chart595-split/data/CALLER-PHASE-BASES.json new file mode 100644 index 0000000000..3e4aa383a5 --- /dev/null +++ b/research/p104-banked-chart595-split/data/CALLER-PHASE-BASES.json @@ -0,0 +1 @@ +{"by_q":{"100":[2,97,8,16,69,37,128,256],"11":[13,14,7,16,32,64,128,256],"112":[2,4,8,97,81,49,128,256],"13":[14,11,7,16,32,64,128,256],"131":[133,134,8,16,32,64,7,256],"133":[134,131,8,16,32,64,7,256],"134":[133,131,8,16,32,64,7,256],"138":[137,4,131,16,32,64,11,256],"14":[13,11,7,16,32,64,128,256],"140":[2,137,133,16,32,64,13,256],"145":[146,4,8,131,32,64,19,256],"146":[145,4,8,131,32,64,19,256],"148":[2,145,8,133,32,64,21,256],"152":[2,4,145,137,32,64,25,256],"161":[162,4,8,16,131,64,35,256],"164":[2,161,8,16,133,64,37,256],"168":[2,4,161,16,137,64,41,256],"176":[2,4,8,161,145,64,49,256],"19":[21,22,8,7,32,64,128,256],"191":[253,251,247,239,223,254,127,256],"193":[194,4,8,16,32,131,67,256],"194":[193,4,8,16,32,131,67,256],"196":[2,193,8,16,32,133,69,256],"200":[2,4,193,16,32,137,73,256],"208":[2,4,8,193,32,145,81,256],"21":[22,19,8,7,32,64,128,256],"22":[21,19,8,7,32,64,128,256],"223":[253,251,247,239,254,191,127,256],"224":[2,4,8,16,193,161,97,256],"239":[253,251,247,254,223,191,127,256],"247":[253,251,254,239,223,191,127,256],"251":[253,254,247,239,223,191,127,256],"253":[254,251,247,239,223,191,127,256],"254":[253,251,247,239,223,191,127,256],"259":[261,262,8,16,32,64,128,7],"26":[25,4,19,11,32,64,128,256],"261":[262,259,8,16,32,64,128,7],"262":[261,259,8,16,32,64,128,7],"265":[266,4,259,16,32,64,128,11],"268":[2,265,261,16,32,64,128,13],"273":[274,4,8,259,32,64,128,19],"274":[273,4,8,259,32,64,128,19],"276":[2,273,8,261,32,64,128,21],"28":[2,25,21,13,32,64,128,256],"280":[2,4,273,265,32,64,128,25],"290":[289,4,8,16,259,64,128,35],"292":[2,289,8,16,261,64,128,37],"296":[2,4,289,16,265,64,128,41],"304":[2,4,8,289,273,64,128,49],"319":[381,379,375,367,351,382,128,127],"321":[322,4,8,16,32,259,128,67],"322":[321,4,8,16,32,259,128,67],"324":[2,321,8,16,32,261,128,69],"328":[2,4,321,16,32,265,128,73],"336":[2,4,8,321,32,273,128,81],"35":[37,38,8,16,7,64,128,256],"351":[381,379,375,367,382,319,128,127],"352":[2,4,8,16,321,289,128,97],"367":[381,379,375,382,351,319,128,127],"37":[38,35,8,16,7,64,128,256],"375":[381,379,382,367,351,319,128,127],"379":[381,382,375,367,351,319,128,127],"38":[37,35,8,16,7,64,128,256],"381":[382,379,375,367,351,319,128,127],"382":[381,379,375,367,351,319,128,127],"385":[386,4,8,16,32,64,259,131],"386":[385,4,8,16,32,64,259,131],"388":[2,385,8,16,32,64,261,133],"392":[2,4,385,16,32,64,265,137],"400":[2,4,8,385,32,64,273,145],"41":[42,4,35,16,11,64,128,256],"415":[445,443,439,431,446,64,319,191],"416":[2,4,8,16,385,64,289,161],"431":[445,443,439,446,415,64,319,191],"439":[445,443,446,431,415,64,319,191],"44":[2,41,37,16,13,64,128,256],"443":[445,446,439,431,415,64,319,191],"445":[446,443,439,431,415,64,319,191],"446":[445,443,439,431,415,64,319,191],"463":[477,475,471,478,32,415,351,223],"471":[477,475,478,463,32,415,351,223],"475":[477,478,471,463,32,415,351,223],"477":[478,475,471,463,32,415,351,223],"478":[477,475,471,463,32,415,351,223],"487":[493,491,494,16,463,431,367,239],"49":[50,4,8,35,19,64,128,256],"493":[494,491,487,16,463,431,367,239],"494":[493,491,487,16,463,431,367,239],"499":[501,502,8,487,471,439,375,247],"50":[49,4,8,35,19,64,128,256],"501":[502,499,8,487,471,439,375,247],"502":[501,499,8,487,471,439,375,247],"505":[506,4,499,491,475,443,379,251],"506":[505,4,499,491,475,443,379,251],"508":[2,505,501,493,477,445,381,253],"56":[2,4,49,41,25,64,128,256],"69":[70,67,8,16,32,7,128,256],"70":[69,67,8,16,32,7,128,256],"73":[74,4,67,16,32,11,128,256],"74":[73,4,67,16,32,11,128,256],"81":[82,4,8,67,32,19,128,256],"84":[2,81,8,69,32,21,128,256],"88":[2,4,81,73,32,25,128,256],"98":[97,4,8,16,67,35,128,256]},"full_phase_table_sha256":"c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa"} diff --git a/research/p104-banked-chart595-split/data/CALLER.json.gz b/research/p104-banked-chart595-split/data/CALLER.json.gz new file mode 100644 index 0000000000..26a75a1ae3 Binary files /dev/null and b/research/p104-banked-chart595-split/data/CALLER.json.gz differ diff --git a/research/p104-banked-chart595-split/data/CANDIDATE-GRAPH.json.gz b/research/p104-banked-chart595-split/data/CANDIDATE-GRAPH.json.gz new file mode 100644 index 0000000000..8c23cc1422 Binary files /dev/null and b/research/p104-banked-chart595-split/data/CANDIDATE-GRAPH.json.gz differ diff --git a/research/p104-banked-chart595-split/data/PARENT-GRAPH.json.gz b/research/p104-banked-chart595-split/data/PARENT-GRAPH.json.gz new file mode 100644 index 0000000000..0433088373 Binary files /dev/null and b/research/p104-banked-chart595-split/data/PARENT-GRAPH.json.gz differ diff --git a/research/p104-banked-chart595-split/data/PARENT-INVOICES.json b/research/p104-banked-chart595-split/data/PARENT-INVOICES.json new file mode 100644 index 0000000000..eb3730cd37 --- /dev/null +++ b/research/p104-banked-chart595-split/data/PARENT-INVOICES.json @@ -0,0 +1,127 @@ +{ + "candidate": { + "contract": { + "ambient_rank": 137, + "boundary": "actual signed caller research candidate with 16 native calls", + "model": "mixed-target-unnormalized-power-v1", + "rank_semantics": "H_r costs r^(1-C); debit surrendered productive fields" + }, + "paid": { + "1": 63408, + "16": 416, + "2": 14112, + "24": 416, + "3": 9680, + "32": 416, + "4": 3920, + "40": 416, + "48": 416, + "5": 5792, + "56": 416, + "6": 1392, + "7": 176, + "8": 752, + "9": 96 + }, + "schema": "integer-mult-recursive-invoice/v1", + "targets": { + "1": 288, + "129": 208, + "17": 416, + "2": 336, + "25": 416, + "3": 752, + "33": 416, + "4": 3632, + "41": 416, + "49": 416, + "5": 1248, + "57": 416, + "6": 704, + "65": 416, + "7": 304, + "8": 512, + "9": 10256 + } + }, + "native_helper_targets": { + "1": 18, + "2": 21, + "3": 47, + "4": 227, + "5": 78, + "6": 44, + "7": 19, + "8": 32, + "9": 615 + }, + "native_paid": { + "candidate": { + "1": 3939, + "2": 882, + "3": 605, + "4": 245, + "5": 362, + "6": 87, + "7": 11, + "8": 7, + "9": 4 + }, + "peer": { + "1": 3939, + "2": 881, + "3": 607, + "4": 244, + "5": 362, + "6": 87, + "7": 11, + "8": 7, + "9": 4 + } + }, + "peer": { + "contract": { + "ambient_rank": 137, + "boundary": "actual signed caller research candidate with 16 native calls", + "model": "mixed-target-unnormalized-power-v1", + "rank_semantics": "H_r costs r^(1-C); debit surrendered productive fields" + }, + "paid": { + "1": 63408, + "16": 416, + "2": 14096, + "24": 416, + "3": 9712, + "32": 416, + "4": 3904, + "40": 416, + "48": 416, + "5": 5792, + "56": 416, + "6": 1392, + "7": 176, + "8": 752, + "9": 96 + }, + "schema": "integer-mult-recursive-invoice/v1", + "targets": { + "1": 288, + "129": 208, + "17": 416, + "2": 336, + "25": 416, + "3": 752, + "33": 416, + "4": 3632, + "41": 416, + "49": 416, + "5": 1248, + "57": 416, + "6": 704, + "65": 416, + "7": 304, + "8": 512, + "9": 10256 + } + } +} diff --git a/research/p104-banked-chart595-split/data/PARENT-PIVOTS.json b/research/p104-banked-chart595-split/data/PARENT-PIVOTS.json new file mode 100644 index 0000000000..feede77664 --- /dev/null +++ b/research/p104-banked-chart595-split/data/PARENT-PIVOTS.json @@ -0,0 +1,17 @@ +[ + {"direction": "forward","remove": 99123,"pivot": 103275,"source_chart": 1031,"combination": [[103275,"10"],[103472,"-3"]],"sender": [[-1499,"1"]],"receiver": [[102595,"2"],[102596,"-11/2"],[102600,"-11/2"],[102604,"3/4"],[102624,"-5/2"],[102625,"-5/2"],[102744,"3/4"],[102745,"9/2"],[102885,"2"],[102891,"-1"],[102892,"-3/4"],[102952,"-1"],[102953,"-2"],[102954,"-1"],[102955,"2"],[103036,"1"],[103037,"2"],[103085,"-4"],[103086,"1"],[103270,"5/2"],[103432,"-3/4"],[103433,"9/2"]]}, + {"direction": "forward","remove": 97031,"pivot": 102748,"source_chart": 549,"combination": [[102748,"1"]],"sender": [[94976,"-1/2"],[96385,"-1/2"],[97049,"1"]],"receiver": [[103160,"1/2"]]}, + {"direction": "transpose","remove": 89622,"pivot": 88983,"source_chart": 318,"combination": [[88983,"1"]],"sender": [[97185,"2"],[97393,"1"]],"receiver": [[88940,"-1"],[88954,"1"],[88987,"-1"],[88989,"-1"],[89118,"1"],[96568,"-1"]]}, + {"direction": "transpose","remove": 89629,"pivot": 87777,"source_chart": 336,"combination": [[87777,"1/2"]],"sender": [[97386,"1"],[97405,"1/2"]],"receiver": [[87457,"1/2"],[87459,"-1/2"],[87747,"-1/2"],[87784,"-1/2"],[87820,"-1/2"],[90056,"1/2"]]}, + {"direction": "transpose","remove": 93636,"pivot": 87508,"source_chart": 412,"combination": [[87508,"1/2"]],"sender": [[96713,"1/2"],[97697,"1"]],"receiver": [[87510,"-1/2"],[87678,"1/2"],[87686,"-1/2"],[87704,"-1/2"],[87722,"-1/2"],[96707,"1/2"]]}, + {"direction": "transpose","remove": 99190,"pivot": 99169,"source_chart": 603,"combination": [[99169,"-1/4"]],"sender": [[99597,"1"]],"receiver": [[95743,"1/2"]]}, + {"direction": "forward","remove": 87508,"pivot": 96713,"source_chart": 3,"combination": [[96713,"1"]],"sender": [[-1117,"1"],[-1095,"1"],[-969,"1/2"],[-964,"-1/2"],[-935,"1/2"],[-908,"-1/2"]],"receiver": [[97628,"1/2"]]}, + {"direction": "forward","remove": 87777,"pivot": 97405,"source_chart": 3,"combination": [[97405,"2"]],"sender": [[-1474,"1"],[-1472,"4"],[-1471,"3/2"],[-1470,"2"],[-1450,"2"],[-1344,"2/3"],[-1341,"-1"],[-1329,"2"],[-1319,"-1"],[-1312,"1"],[-1308,"-1/2"],[-1288,"1/4"],[-1285,"-1/2"],[-1280,"-1/2"],[-1266,"-1/8"],[-1256,"-1/2"],[-1251,"1/2"],[-1250,"-1/4"],[-1249,"-1/2"],[-1246,"1/2"],[-1243,"-1/2"],[-1241,"1/4"],[-1239,"-1/2"],[-1237,"1"],[-1236,"1/2"],[-1235,"-1/2"],[-1234,"-1/2"],[-1230,"-1/2"],[-1229,"-1/2"],[-1228,"1/2"],[-1223,"-1/2"],[-1216,"-1"],[-1215,"-1"],[-1209,"-2"],[-1203,"-1"],[-1202,"-1"],[-1191,"1/4"],[-1189,"1/4"],[-1188,"1"],[-1185,"-1/2"],[-1177,"-1/2"],[-1176,"-1/2"],[-1173,"1"],[-1172,"-8"],[-1171,"2"],[-1114,"1/2"],[-1107,"1/2"],[-1106,"1/2"],[-1096,"-1/4"],[-1082,"2"],[-1080,"-1/4"],[-1075,"1/4"],[-1074,"1/4"],[-1071,"-1"],[-1069,"-1"],[-1066,"1"],[-1047,"-1"],[-1044,"2"],[-1043,"1/2"],[-1040,"1"],[-1038,"-1"],[-1036,"2"],[-1035,"1/2"],[-1033,"2"],[-1028,"-1"],[-1020,"-2"],[-1014,"-2"],[-1010,"2"],[-964,"-1"],[-958,"-1"],[-914,"-1/2"],[-908,"-1"],[-890,"-1"],[-813,"-1/4"],[-811,"4"],[-790,"-1"],[-757,"-2"],[-753,"1/2"],[-734,"-8"],[-733,"-4"],[-705,"5/2"],[-698,"1/4"],[-660,"-1/2"],[-656,"-1/4"],[-644,"-1/4"],[-642,"-1/4"],[-641,"1/8"],[-636,"-1/4"],[-625,"1/4"],[-620,"1/4"],[-618,"-1/4"],[-612,"-1/2"],[-610,"1/8"],[-609,"1/8"],[-600,"1/2"],[-591,"-1/4"],[-590,"-2"],[-588,"-1/4"],[-584,"-1/4"],[-583,"-1/4"],[-569,"1/2"],[-565,"1/2"],[-564,"1/2"],[-545,"7/2"],[-544,"4"],[-539,"1/2"],[-538,"-2"],[-537,"4"],[-532,"-2"],[-531,"1"],[-529,"7/4"],[-528,"2"],[-523,"-1"],[-518,"2"],[-513,"2"],[-512,"2"],[-498,"1/4"],[-497,"-1"],[-492,"2"],[-480,"1"],[-471,"1"],[-470,"1"],[-449,"2"],[-443,"-1/2"],[-442,"2"],[-441,"-2"],[-440,"-5/4"],[-435,"1/2"],[-430,"-8"],[-418,"-2"],[-415,"2"],[-400,"2"],[-384,"1"],[-364,"-1"],[-361,"2"],[-349,"1/2"],[-337,"3/2"],[-321,"-1/2"],[-320,"-1"],[-317,"3/4"],[-314,"2"],[-312,"1"],[-307,"1/2"],[-284,"3"],[-282,"-1"],[-281,"2"],[-277,"1/4"],[-273,"5/2"],[-269,"4"],[-265,"2"],[-258,"-1"],[-256,"-1/4"],[-237,"-3/2"],[-231,"2"],[-174,"1"],[-151,"1/2"],[-130,"1/2"],[-22,"-1"]],"receiver": [[97385,"-2"]]}, + {"direction": "forward","remove": 88983,"pivot": 97185,"source_chart": 3,"combination": [[97185,"1"]],"sender": [[-1046,"1"],[-1000,"1"],[-972,"1"],[-943,"-1"]],"receiver": [[97188,"-1"]]}, + {"direction": "transpose","remove": 89623,"pivot": 88940,"source_chart": 318,"combination": [[88940,"1"]],"sender": [[90092,"1"],[95202,"-1"]],"receiver": [[88954,"-1"],[89118,"-1"],[89639,"-1"],[90058,"1/2"],[96568,"1/2"]]}, + {"direction": "transpose","remove": 89630,"pivot": 87457,"source_chart": 336,"combination": [[87457,"-2"]],"sender": [[95049,"2"],[95162,"1"]],"receiver": [[87459,"2"],[87747,"2"],[90056,"-1"],[95094,"-1"]]}, + {"direction": "transpose","remove": 93637,"pivot": 87678,"source_chart": 412,"combination": [[87678,"-2"]],"sender": [[94756,"2"],[94777,"1"]],"receiver": [[87686,"2"],[87704,"2"],[94749,"-1"],[96707,"-1"]]}, + {"direction": "forward","remove": 87457,"pivot": 95049,"source_chart": 3,"combination": [[95049,"1"]],"sender": [[-1062,"1"],[-1019,"1"],[-974,"-1"],[-941,"1"]],"receiver": [[95052,"-1"]]}, + {"direction": "forward","remove": 87678,"pivot": 94756,"source_chart": 3,"combination": [[94756,"1/2"]],"sender": [[-1474,"1"],[-1473,"1/16"],[-1467,"1/4"],[-1344,"2/3"],[-1320,"-1/8"],[-1319,"-1/2"],[-1312,"-1/4"],[-1310,"-1/8"],[-1285,"-1/8"],[-1280,"-1/4"],[-1273,"1/2"],[-1266,"1/16"],[-1265,"-1/2"],[-1261,"-1/4"],[-1260,"1/2"],[-1257,"1/2"],[-1256,"-1/4"],[-1254,"1/4"],[-1250,"-1/4"],[-1249,"-1/2"],[-1248,"1/2"],[-1246,"1/2"],[-1245,"3/4"],[-1237,"-1/4"],[-1236,"1/4"],[-1235,"-1/2"],[-1234,"-1/2"],[-1231,"-1/8"],[-1230,"-1/4"],[-1229,"1/4"],[-1211,"-1/2"],[-1209,"1/2"],[-1204,"-1/2"],[-1200,"-1/4"],[-1199,"1/2"],[-1197,"-1/4"],[-1195,"-1/2"],[-1194,"-1/8"],[-1192,"1/4"],[-1189,"1/8"],[-1188,"1"],[-1187,"1/4"],[-1183,"-1/8"],[-1182,"-1/4"],[-1181,"-1/4"],[-1179,"-1/2"],[-1178,"-1/4"],[-1177,"-1/2"],[-1176,"-1/2"],[-1175,"1/4"],[-1174,"1/2"],[-1173,"-1"],[-1170,"-1/4"],[-1167,"-1/4"],[-1165,"1/2"],[-1162,"1"],[-1161,"1/2"],[-1145,"-1/2"],[-1143,"-1/2"],[-1140,"-1/2"],[-1129,"-1/8"],[-1127,"1/2"],[-1125,"1/2"],[-1123,"1/2"],[-1111,"-1/8"],[-1106,"-1/4"],[-1105,"-1/4"],[-1096,"-1/4"],[-1095,"-1/2"],[-1085,"1/8"],[-1078,"-1/2"],[-1073,"1/8"],[-1069,"-1/2"],[-1066,"1/4"],[-1063,"-1/2"],[-1059,"1/2"],[-1056,"1/2"],[-1049,"1/2"],[-1043,"-1/2"],[-1040,"1"],[-1034,"-1/4"],[-1033,"1/2"],[-1028,"-1"],[-1027,"-1/2"],[-1023,"-1/2"],[-1018,"1/2"],[-1012,"1/2"],[-1004,"1/8"],[-1000,"-1/4"],[-992,"-1/2"],[-988,"1/2"],[-985,"1/2"],[-984,"1/2"],[-983,"1/2"],[-982,"1/2"],[-981,"1/2"],[-976,"-1/2"],[-975,"-1/2"],[-974,"1/2"],[-973,"1/2"],[-972,"1/2"],[-969,"-1/2"],[-965,"-1/2"],[-964,"-1/2"],[-962,"-1/2"],[-958,"1/2"],[-957,"-1/2"],[-955,"-1/2"],[-946,"-1/2"],[-945,"-1/2"],[-944,"-1/2"],[-943,"1/2"],[-942,"1/2"],[-941,"1/2"],[-935,"1/2"],[-931,"-1/2"],[-929,"-1/2"],[-928,"-1"],[-927,"-1/2"],[-926,"-1/2"],[-923,"1/2"],[-922,"1/2"],[-921,"1/2"],[-920,"1/2"],[-919,"1/2"],[-917,"-1/2"],[-915,"1/2"],[-914,"-1/4"],[-913,"-1/2"],[-912,"-1/2"],[-908,"1/2"],[-907,"1/2"],[-905,"1/2"],[-904,"1/2"],[-903,"1"],[-901,"-1/2"],[-899,"1/2"],[-898,"-1/2"],[-897,"1/2"],[-896,"-1/2"],[-891,"1/2"],[-890,"-1/2"],[-888,"-1/2"],[-887,"-1/2"],[-883,"-1/2"],[-831,"1/2"],[-813,"1/4"],[-794,"-1/2"],[-761,"1/4"],[-733,"-4"],[-680,"-1/8"],[-665,"-1/2"],[-660,"-3/4"],[-656,"-1/4"],[-644,"-1/4"],[-642,"1/8"],[-641,"1/16"],[-636,"-1/4"],[-618,"1/8"],[-612,"1/4"],[-610,"-1/16"],[-593,"-1/8"],[-591,"1/8"],[-568,"1/4"],[-566,"1/8"],[-563,"-1/4"],[-562,"1/8"],[-561,"-1/2"],[-559,"1/2"],[-553,"-1/4"],[-552,"1/8"],[-551,"1/64"],[-548,"-1"],[-546,"1"],[-544,"-1/2"],[-540,"-1/2"],[-537,"1"],[-526,"-1/4"],[-524,"-1/4"],[-523,"1/2"],[-520,"-1/2"],[-519,"1/2"],[-514,"1/2"],[-509,"-1/2"],[-503,"1/4"],[-495,"1/2"],[-491,"-1/2"],[-485,"-1/16"],[-480,"-1"],[-471,"1"],[-470,"-1"],[-465,"-1/8"],[-462,"-1/4"],[-440,"-1/8"],[-429,"1/4"],[-419,"1/4"],[-408,"1/4"],[-405,"1/4"],[-365,"-1/4"],[-364,"-1"],[-361,"1/4"],[-357,"1/8"],[-355,"-1/16"],[-353,"1/8"],[-349,"1/2"],[-343,"-1/4"],[-335,"-1/16"],[-314,"1/2"],[-303,"1/16"],[-285,"-3/4"],[-284,"1"],[-282,"-1"],[-277,"1/4"],[-273,"1/4"],[-270,"1/8"],[-269,"4"],[-266,"1/128"],[-253,"1/64"],[-248,"-1/4"],[-244,"1/4"],[-243,"-1/4"],[-206,"-1/8"],[-174,"-1"],[-165,"1/4"],[-160,"-1/4"],[-4,"1/32"]],"receiver": []}, + {"direction": "transpose","remove": 90064,"pivot": 89639,"source_chart": 533,"combination": [[89639,"1"]],"sender": [[90844,"-1/2"],[98420,"1"],[98422,"1/2"]],"receiver": [[88940,"1"],[90095,"-1"]]} +] diff --git a/research/p104-banked-chart595-split/dense.py b/research/p104-banked-chart595-split/dense.py new file mode 100644 index 0000000000..134c18c641 --- /dev/null +++ b/research/p104-banked-chart595-split/dense.py @@ -0,0 +1,335 @@ +#!/usr/bin/env python3 +"""Replay the parent and split's complete scheduled physical bank maps over two primes.""" + +from collections import defaultdict +from fractions import Fraction +from functools import cache +import gzip +from hashlib import sha256 +import json +from pathlib import Path +from random import Random +import runpy + + +HERE = Path(__file__).resolve().parent +SOURCE_HEAD = "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e" +PARENT = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +CANDIDATE = "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b" +CALLER = "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf" +PINS = { + "data/PARENT-GRAPH.json.gz": "8e28c1d403145ca5d72521f4acd7e068603598334c87f18f2fefb738844a1970", + "data/CANDIDATE-GRAPH.json.gz": "789c51223158f816b4046321e28449e1db540d20b75ce57e0699a20706bc3510", + "data/CALLER-LAYOUT.json": "622c6f458eba2dab0fdfd6050303cbc16ad684ab8b834c7df568264e4cf01db6", + "EDIT.json": "c8a914049eb36f5f307dfabef080169bbee06c024eab77b75249566028ca3fcf", + "native_support/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "native_support/PR7682-PHASE-RESULT.json": "50b05bdc2805d709761ce5c4b42e7ec352141366f5cc6031df9f8779e8872735", + "native_support/PR7682-BANK-RECIPES.json.gz": "06dbe8d913627dbfef6cfe6599fd8eaa7fd82daddf72253b1f9bc5cb5a4eb0e9", + "dense_support/field_interpreter.py": "e76bc78b132607890b2d9ea234d3a52e608e0e919bdc48308cc0727a2a07c73e", +} +SAMPLES = {1000000009: (4171, 8663), 998244353: (5147, 9631)} +WIDTH = 512 +OLD_ROLES = 1501 +CUT_ROLE = 281 +FRESH = 1501 +INJECTION_SLOT = 102698 +PREFIX_SLOT = 95743 +NAMES = ("injection_coefficient_sign", "prefix_return_quarter_phase") + + +def need(condition, explanation): + if not condition: + raise ValueError(explanation) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def pinned_inputs(): + files = {name: (HERE / name).read_bytes() for name in PINS} + for name, raw in files.items(): + need(sha256(raw).hexdigest() == PINS[name], f"frozen input {name}") + return files + + +def graph(raw, pin, public): + blob = gzip.decompress(raw) + need(sha256(blob).hexdigest() == pin, "decoded graph custody") + word = json.loads(blob) + need(canonical(word) == blob, "canonical banked word") + initial, final, first = word["initial"], word["final"], word["first_output"] + moves = {key: (a, b) for key, a, b in word["moves"]} + forms = dict(word["forms"]) + schedule = word["schedule"] + need(len(initial) == len(final) == public and first == 150522, "public owner inventory") + need(len(word["moves"]) == len(moves) == 6142, "full paid bank inventory") + need(len(word["forms"]) == len(forms) == len(schedule) == 6142 + public + and set(schedule) == forms.keys() == moves.keys() | set(range(first, first + public)), + "complete literal scheduled banks") + available_charts = {~r: a for r, a in enumerate(initial)} + for key in schedule: + row = forms[key] + a, b = moves[key] if key in moves else (final[key - first], None) + need(len({donor for donor, _ in row}) == len(row) + and all(available_charts.get(donor) == a for donor, _ in row), + f"ordered cocharted donors for scheduled bank {key}") + if b is not None: + available_charts[key] = b + return word, moves, forms + + +def paid_recipes(files, moves, frames): + phase = json.loads(files["native_support/PR7682-PHASE-RESULT.json"]) + name = "native_support/PR7682-BANK-RECIPES.json.gz" + need(phase["graph_pins"]["candidate"] == PARENT and phase["caller_sha256"] == CALLER + and phase["status"] == "PASS_PAIRED_BANK24_EXACT_NATIVE_MAPS" + and phase["artifact_sha256"]["BANK-RECIPES.json.gz"] == PINS[name], + "exact parent compiled recipe archive") + keys = defaultdict(list) + for slot, pair in sorted(moves.items()): + keys[pair].append(slot) + recipes = {} + for row in json.loads(gzip.decompress(files[name])): + pair = tuple(row["pair"]) + if pair in keys: + a, b = pair + recipe = row["recipe"] + need(pair not in recipes and row["in_forward_union"] + and row["candidate_moves"] == keys[pair] + and row["compared_signed_pauli_and_absolute_phase"] + and recipe["rank"] == abs(len(frames[b]) - len(frames[a])) > 0, + f"bound archived physical body for paid pair {pair}") + recipes[pair] = recipe + need(recipes.keys() == keys.keys() and len(recipes) == 2977, + "physical bodies for all 6,142 paid banks") + return recipes + + +def direct_outputs(word, layout, inputs, raw, add, factor, scalar): + """Use the signed public block formulas and direct ordered chart maps.""" + hosted = layout["hosted"] + live, x2, y2, dport = layout["live"], hosted["X2"], hosted["Y2"], set(hosted["Dports"]) + need(len(live) == 104 and len(x2) == len(y2) == len(dport) == 96, + "actual 104/96 paired main blocks") + rows = [None] * OLD_ROLES + + def mapped(target, donor): + return raw(word["initial"][donor], word["final"][target], inputs[donor]) + + def block(x, y, alpha, beta): + need(rows[x] is None and rows[y] is None, "distinct main roles") + rows[x] = add(mapped(x, x), scalar(alpha), mapped(x, y)) + rows[y] = add(factor(scalar(beta), mapped(y, x)), scalar(1 + alpha * beta), mapped(y, y)) + + alpha, beta, alpha2, beta2 = (Fraction(hosted[key]) for key in ("alpha", "beta", "alpha2", "beta2")) + for j, x in enumerate(live): + a, b = (0, 1) if j in dport else (alpha, beta) + block(x, x + 112, a, b) + for x, y in zip(x2, y2, strict=True): + block(x, y, alpha2, beta2) + mains = {r for r, row in enumerate(rows) if row is not None} + need(len(mains) == 400 and CUT_ROLE not in mains, "complete main and helper separation") + for role in range(OLD_ROLES): + if role not in mains: + rows[role] = mapped(role, role) + return rows, mains + + +def descendants(word, forms, slot): + reached = {slot} + for key in word["schedule"]: + if any(donor in reached for donor, _ in forms[key]): + reached.add(key) + first = word["first_output"] + return {key - first for key in reached if key >= first} + + +def test_field(specification, parent, candidate, layout, recipes, prime, seeds): + source, moves, _ = parent + target, _, target_forms = candidate + frames = source["frames"] + interpreter, checker = specification + field = interpreter["GateInterpreter"](prime, need) + digest = interpreter["digest"] + + @cache + def chart(a): + return checker["frame"](frames[a], 9) + + @cache + def raw_gates(a, b): + return () if a == b else checker["adjoint"](chart(a)) + chart(b) + + @cache + def lowered(a, b): + return checker["recipe"](recipes[a, b]) + + @cache + def prepared(circuit): + return tuple(field.gate(gate) for gate in circuit) + + def raw(a, b, value): + return field.apply(prepared(raw_gates(a, b)), value) + + scalar = cache(field.coefficient) + + def add(dst, q, src): + if q == 1: + return [(a + b) % prime for a, b in zip(dst, src, strict=True)] + return [(a + q*b) % prime for a, b in zip(dst, src, strict=True)] + + def factor(q, src): + return [q*a % prime for a in src] + + exact_columns = [] + for a, b in ((3, 595), (595, 127)): + compiled, ideal = lowered(a, b), raw_gates(a, b) + for direction in ("forward", "adjoint"): + for col in (0, 17, 511): + unit = [0] * WIDTH + unit[col] = 1 + actual = field.apply(prepared(compiled), unit) + expected = field.column_residue(checker["state"](ideal, col)) + need(actual == expected, "finite physical orientation against exact Gaussian column") + exact_columns.append([a, b, direction, col]) + compiled, ideal = checker["adjoint"](compiled), checker["adjoint"](ideal) + + def replay(bundle, inputs, fault=None): + word, word_moves, forms = bundle + first = word["first_output"] + borrowed = digest(inputs) + bars = {~key: value for key, value in enumerate(inputs)} + sources, returns, terminals = {}, {}, {} + changes = 0 + for key in word["schedule"]: + value = [0] * WIDTH + for donor, coefficient in forms[key]: + q = scalar(coefficient) + if fault == NAMES[0] and key == INJECTION_SLOT and donor == ~FRESH: + q = -q + changes += 1 + value = add(value, q, bars[donor]) + sources[key] = value + if key in word_moves: + returned = field.apply(prepared(lowered(*word_moves[key])), value) + if fault == NAMES[1] and key == PREFIX_SLOT: + returned = factor(field.i, returned) + changes += 1 + bars[key] = returns[key] = returned + else: + terminals[key - first] = value + need(changes == int(fault is not None), "one actual fault occurrence per mutation") + need(len(returns) == 6142 and terminals.keys() == set(range(len(inputs))), + "full actual paid returns and terminal arrays") + held = [*inputs, *sources.values(), *returns.values()] + need(len({id(row) for row in held}) == len(held) == 12284 + 2*len(inputs), + "distinct actually held entry, source, returned and terminal arrays") + need(digest(inputs) == borrowed, "borrowed public arrays remain intact") + rows = [terminals[role] for role in range(len(inputs))] + return rows, {"scheduled_banks": len(sources), "paid_slots": len(returns), + "local_scalar_terms": sum(map(len, forms.values())), + "terminal_rows": len(rows), "held_arrays": len(held), + "terminal_sha256": digest(rows), "returned_sha256": digest(returns[k] for k in sorted(returns))}, { + k: returns[k] for k in (PREFIX_SLOT, INJECTION_SLOT) + } + + cases = [] + for seed in seeds: + random = Random(seed) + entries = [[random.randrange(prime) for _ in range(WIDTH)] for _ in range(OLD_ROLES + 1)] + need(any(entries[CUT_ROLE]) and any(entries[FRESH]) and entries[CUT_ROLE] != entries[FRESH], + "nontrivial separate cut and fresh owner input banks") + expected_old, mains = direct_outputs(source, layout, entries, raw, add, factor, scalar) + expected = expected_old.copy() + expected[CUT_ROLE] = raw(3, 595, entries[CUT_ROLE]) + expected.append(raw(595, 127, entries[FRESH])) + old, old_report, _ = replay(parent, entries[:OLD_ROLES]) + actual, report, cut_slots = replay(candidate, entries) + bad_old = [r for r, row in enumerate(old) if row != expected_old[r]] + bad_new = [r for r, row in enumerate(actual) if row != expected[r]] + need(not bad_old and not bad_new, f"whole-word physical oracle mismatch: source {bad_old[:8]}, candidate {bad_new[:8]}") + changed = [r for r, row in enumerate(old) if row != actual[r]] + need(changed == [CUT_ROLE] and raw(127, 595, old[CUT_ROLE]) == actual[CUT_ROLE], + "shared digits preserve every old endpoint except the exact typed chart-595 return") + + controls = {} + if prime == next(iter(SAMPLES)) and seed == seeds[0]: + for name, slot in zip(NAMES, (INJECTION_SLOT, PREFIX_SLOT), strict=True): + faulty, fault_report, fault_slots = replay(candidate, entries, name) + mismatches = {r for r, row in enumerate(faulty) if row != expected[r]} + reachable = descendants(target, target_forms, slot) + need(mismatches and mismatches <= reachable, "actual physical fault is detected inside its descendants") + if name == NAMES[0]: + q = scalar(dict(target_forms[slot])[~FRESH]) + delta = factor(-2*q, raw(*moves[slot], entries[FRESH])) + need(FRESH in mismatches and CUT_ROLE not in mismatches, + "unsigned earlier return survives while the cold injected owner fails") + else: + delta = factor(field.i - 1, cut_slots[slot]) + need(CUT_ROLE in mismatches, "prefix MOVE phase fault reaches the chart-595 return") + need(fault_slots[slot] == add(cut_slots[slot], 1, delta), "isolated actual paid return fault delta") + controls[name] = {"slot": slot, "pair": list(moves[slot]), + "changed_roles": sorted(mismatches), "reachable_roles": len(reachable), + "changed_main_roles": len(mismatches & mains), + "faulty_terminal_sha256": fault_report["terminal_sha256"], + "one_actual_mutation_verified": True} + cases.append({"seed": seed, "input_sha256": digest(entries), + "shared_external_inputs_sha256": digest(entries[:OLD_ROLES]), + "independent_parent_oracle_sha256": digest(expected_old), + "independent_candidate_oracle_sha256": digest(expected), + "changed_shared_roles_before_chart_typing": changed, + "all_shared_roles_match_after_chart_typing": True, + "changed_role_chart595_sha256": digest([actual[CUT_ROLE]]), + "fresh_input_sha256": digest([entries[FRESH]]), + "fresh_output_sha256": digest([actual[FRESH]]), + "parent": old_report, "candidate": report, "actual_negative_controls": controls}) + need(cases[0]["fresh_input_sha256"] != cases[1]["fresh_input_sha256"] + and cases[0]["fresh_output_sha256"] != cases[1]["fresh_output_sha256"], + "fresh coordinate remains variable across independent held arrays") + return {"prime": prime, "imaginary_root": field.i, "literal_modular_column_links": exact_columns, "cases": cases} + + +def main(): + files = pinned_inputs() + parent = graph(files["data/PARENT-GRAPH.json.gz"], PARENT, OLD_ROLES) + candidate = graph(files["data/CANDIDATE-GRAPH.json.gz"], CANDIDATE, OLD_ROLES + 1) + source, moves, _ = parent + target, target_moves, target_forms = candidate + edit = json.loads(files["EDIT.json"]) + layout = json.loads(files["data/CALLER-LAYOUT.json"]) + need(target["metadata"]["source_bank_graph_sha256"] == edit["source_graph_sha256"] == PARENT + and target["metadata"]["source_pr_head"] == edit["source_head"] == SOURCE_HEAD + and source["metadata"]["caller_sha256"] == target["metadata"]["caller_sha256"] == CALLER + and source["metadata"]["source_word_sha256"] == layout["source_word_sha256"], + "exact common source lineage and caller role layout") + new_final = source["final"].copy() + new_final[CUT_ROLE] = 595 + need(target["frames"] == source["frames"] and target_moves == moves + and target["initial"] == source["initial"] + [595] and target["final"] == new_final + [127] + and (source["initial"][CUT_ROLE], source["final"][CUT_ROLE]) == (3, 127), + "exact typed endpoints and unchanged 6,142 physical MOVE bodies") + need(moves[INJECTION_SLOT] == (595, 127) and moves[PREFIX_SLOT] == (3, 595) + and dict(target_forms[INJECTION_SLOT])[~FRESH] == dict(edit["injection"])[INJECTION_SLOT] == "8/21" + and dict(edit["prefix"])[PREFIX_SLOT] == "1", "actual single-site injection and phase controls") + recipes = paid_recipes(files, moves, source["frames"]) + specification = tuple(runpy.run_path(str(HERE / name)) for name in ( + "dense_support/field_interpreter.py", "native_support/native_verify.py" + )) + fields = [test_field(specification, parent, candidate, layout, recipes, prime, seeds) + for prime, seeds in SAMPLES.items()] + pinned_inputs() + print(canonical({ + "status": "PASS_P104_CHART595_DENSE_HELD_ARRAYS", + "scope": "Full compiled forward paid-bank replay and independent direct ordered public boundaries on held finite fields.", + "source_pr": 7682, "source_head": SOURCE_HEAD, "caller_sha256": CALLER, + "graph_pins": {"parent": PARENT, "candidate": CANDIDATE}, "field_width": WIDTH, + "packed_inputs_sha256": PINS, + "main_outputs": 400, "candidate_helper_outputs": 1102, + "candidate_split_boundaries": {str(CUT_ROLE): [3, 595], str(FRESH): [595, 127]}, + "paid_ordered_bodies": len(recipes), "paid_slots_per_word": len(moves), "fields": fields, + }).decode(), flush=True) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/dense_support/field_interpreter.py b/research/p104-banked-chart595-split/dense_support/field_interpreter.py new file mode 100644 index 0000000000..4872d370db --- /dev/null +++ b/research/p104-banked-chart595-split/dense_support/field_interpreter.py @@ -0,0 +1,306 @@ +"""Dense all-event finite replay adapted from the exact #7660 interpreter.""" + +from fractions import Fraction +from functools import cache +import hashlib +from math import isqrt +from random import Random +from struct import Struct +from time import monotonic_ns + + +DIM = 512 +ADDRESS = range(DIM) +PACK_ROW = Struct("<512I") + + +class GateInterpreter: + def __init__(self, prime, require): + require(type(prime) is int and 5 <= prime < 2**31 and prime % 4 == 1, + "modulus range and fourth root") + require(all(prime % f for f in range(3, isqrt(prime) + 1, 2)), "modulus is not prime") + self.p = prime + for x in range(2, prime): + root = pow(x, (prime - 1) // 4, prime) + if root * root % prime == prime - 1: + self.i = root + break + self.powers = (1, self.i, prime - 1, prime - self.i) + self.zero = [0] * DIM + self.gates = {} + self.require = require + + def coefficient(self, script): + q = Fraction(script) + self.require(q.denominator % self.p != 0, "literal denominator vanishes in F_p") + return q.numerator * pow(q.denominator, -1, self.p) % self.p + + def gate(self, spec): + if spec in self.gates: + return self.gates[spec] + op, *params = spec + if op == "P": + rows, = params + perm = [None] * DIM + for prev in ADDRESS: + after = sum(((prev & row).bit_count() % 2) << j for j, row in enumerate(rows)) + self.require(perm[after] is None, "non-permutation gate") + perm[after] = prev + gate = ("gather", perm) + elif op == "X": + offset, = params + gate = ("gather", [x ^ offset for x in ADDRESS]) + elif op == "D": + rows, linear = params + weights = [] + for mask in ADDRESS: + phase = 0 + for j, (row, weight) in enumerate(zip(rows, linear)): + if mask >> j & 1: + phase += weight + 2 * ((row & mask) >> (j + 1)).bit_count() + weights.append(self.powers[phase % 4]) + gate = ("weights", weights) + elif op == "phase": + exponent, = params + gate = ("phase", self.powers[exponent % 4]) + elif op == "C": + line, sign = params + half = (self.p + 1) // 2 + gate = ("mix", (1 + sign * self.i) * half % self.p, + (1 - sign * self.i) * half % self.p, [x ^ line for x in ADDRESS]) + else: + raise ValueError(f"unknown physical gate {op}") + self.gates[spec] = gate + return gate + + def apply(self, gates, value): + p = self.p + for op, *spec in gates: + if op == "gather": + indices, = spec + value = [value[j] for j in indices] + elif op == "weights": + weights, = spec + value = [a * b % p for a, b in zip(value, weights)] + elif op == "phase": + weight, = spec + if weight != 1: + value = [a * weight % p for a in value] + else: + c, d, indices = spec + value = [(c * a + d * value[j]) % p for a, j in zip(value, indices)] + return value + + def column_residue(self, exact): + sparse, denominator = exact + inverse = pow(2, -denominator, self.p) + target = [0] * DIM + for x, (re, im) in sparse.items(): + target[x] = (re + self.i * im) * inverse % self.p + return target + + +def raw_ports(phase, w, require): + """The 104 hosted parent-port equations, plus opposite-sign controls.""" + frames = w["frames"] + require(len(w["live"]) == len(w["ports"]) == 104 and len(set(w["live"])) == 104, + "raw port count") + + @cache + def frame(i): + return phase.frame_op(frames[i]) + + def same(x, y): + return x.tab == y.tab and all(phase.column(x.circ, j) == phase.column(y.circ, j) for j in (0, 1)) + + full = phase.op_four(range(9)) + for r, q in zip(w["live"], w["ports"]): + y = r + 112 + low_x, low_y = w["initial"][r], w["initial"][y] + high_x, high_y = w["final"][r], w["final"][y] + require(frames[low_x] == [q] and frames[low_y] == [] + and len(frames[high_x]) == 9 and len(frames[high_y]) == 8, f"port chart dimensions {r}") + p, v, z = frame(high_y), frame(high_x), frame(low_y) + qp, qm = phase.op_c(q, 1), phase.op_c(q, -1) + d = qm.then(full) + low_adapter = phase.lower(qp.dag().then(frame(low_x))) + high_adapter = phase.lower(p.dag().then(d)) + require(low_adapter["rank"] == high_adapter["rank"] == 0, f"port adapter rank {r}") + circ = phase.recipe_circuit(high_adapter) + mp = phase.Op(phase.tableau(circ), circ) + xx = qp.dag().then(v) + yy = z.dag().then(p).then(mp) + yx = qp.dag().then(p).then(mp) + xy = z.dag().then(v) + require(same(xx, d) and same(yy, d) and same(yx, qm.then(d)) and same(xy, qp.then(d)), + f"raw port operator identity {r}") + require(not same(xy, qm.then(d)) and not same(yx, qp.then(d)), + f"raw port operator sign control {r}") + return {"ports": 104, "directions": 4, "opposite_sign_rejections": 208, + "comparisons": "signed Pauli action and Gaussian absolute phase"} + + +def digest(rows): + value = hashlib.sha256() + for row in rows: + value.update(PACK_ROW.pack(*row)) + return value.hexdigest() + + +def evaluate(phase, source, candidate, prime, seed, altered_clock, test_wrong_phase, require): + """Evaluate dense finite fields. Compiled MOVEs and oracle frame maps differ.""" + t0 = monotonic_ns() + field = GateInterpreter(prime, require) + frames, n = source["frames"], source["public"] + size = n + source["owned_fields"] + rand = Random(seed) + initial = [[rand.randrange(prime) for _ in ADDRESS] for _ in range(n)] + + @cache + def direct_frame(frame): + return phase.frame_circuit(frames[frame]) + + @cache + def chart_operator(frame): + return phase.frame_op(frames[frame]) + + @cache + def literal(a, b): + return phase.dagger(direct_frame(a)) + direct_frame(b) + + @cache + def compiled(a, b): + lo, hi = (a, b) if len(frames[a]) < len(frames[b]) else (b, a) + rec = phase.lower(chart_operator(lo).dag().then(chart_operator(hi))) + require(rec["rank"] == len(frames[hi]) - len(frames[lo]), f"compiled MOVE rank {lo},{hi}") + circ = phase.recipe_circuit(rec) + if lo != a: + circ = phase.dagger(circ) + return tuple(field.gate(g) for g in circ) + + @cache + def oracle(a, b): + return tuple(field.gate(g) for g in literal(a, b)) + + @cache + def residue(value): + return field.coefficient(value) + + def cvec(a, b, v): + return field.apply(compiled(a, b), v) + + def pred_move(a, b, v): + return field.apply(oracle(a, b), v) + + # Independently reduce the exact column convention before using a dense + # finite vector. Use the actual candidate transition at the control clock. + endpoints = tuple(candidate["program"][altered_clock][2:4]) + r0 = source["live"][0] + boundary = (source["initial"][r0], source["final"][r0]) + witnesses = ((endpoints, cvec), (endpoints[::-1], cvec), (boundary, pred_move)) + for (a, b), move in witnesses: + for j in (0, 5): + v = [0] * DIM + v[j] = 1 + require(move(a, b, v) == field.column_residue(phase.column(literal(a, b), j)), + f"finite versus exact interpreter column {a},{b},{j}") + + def scale(vector, a): + return [a * x % prime for x in vector] + + def plus(x, a, y): + return [(u + a * v) % prime for u, v in zip(x, y)] + + def replay(word, inject=False): + values = initial + [field.zero] * (size - n) + erased = hashlib.sha256() + clears, copy_checks = 0, 0 + for i, e in enumerate(word["program"]): + op, r = e[:2] + if op == "MOVE": + row = cvec(e[2], e[3], values[r]) + values[r] = scale(row, field.i) if inject and i == altered_clock else row + elif op == "INIT": + require(not any(values[r]), f"nonzero dead owned state at INIT {i}") + values[r] = field.zero + elif op == "CLEAR": + erased.update(PACK_ROW.pack(*values[r])) + values[r] = field.zero + clears += 1 + elif op == "SCALE": + values[r] = scale(values[r], residue(e[2])) + else: + if op == "COPY": + if any(values[r]) and inject: + return None, {"detected_at_COPY": i} + require(not any(values[r]), f"nonzero owned COPY target at {i}") + copy_checks += 1 + values[r] = plus(values[r], residue(e[3]), values[e[2]]) + require(not any(any(v) for v in values[n:]), "nonzero final owned payload") + return values, {"events": len(word["program"]), "ordered_clear_values": erased.hexdigest(), + "clears": clears, "copy_zero_checks": copy_checks} + + H = source["hosted"] + require(H["mode"] == "mix-t0", "hosted native model") + live, dp = source["live"], H["Dports"] + x2, y2 = H["X2"], H["Y2"] + require(len(dp) == len(set(dp)) == len(x2) == len(y2) and set(dp) <= set(range(104)), + "hosted second-port count") + mains = set(live) | {r + 112 for r in live} | set(x2) | set(y2) + require(len(mains) == 2 * (104 + len(x2)), "overlapping hosted role") + alpha1, beta1 = map(Fraction, (H["alpha"], H["beta"])) + alpha2, beta2 = map(Fraction, (H["alpha2"], H["beta2"])) + require(alpha2, "nonzero second-port sign witness") + lo, hi = source["initial"], source["final"] + + def row_from(r, s): + return pred_move(lo[s], hi[r], initial[s]) + + def expected(rows, r, s, a, b): + rows[r] = plus(row_from(r, r), residue(a), row_from(r, s)) + rows[s] = plus(scale(row_from(s, r), residue(b)), residue(1 + a * b), row_from(s, s)) + + ref = [None] * n + for k, x in enumerate(live): + a, b = (0, 1) if k in dp else (alpha1, beta1) + expected(ref, x, x + 112, a, b) + for x, y in zip(x2, y2): + expected(ref, x, y, alpha2, beta2) + for r in range(n): + if r not in mains: + ref[r] = row_from(r, r) + require(all(row is not None for row in ref), "incomplete physical endpoint predictor") + + old, old_counts = replay(source) + new, new_counts = replay(candidate) + for label, data in (("source", old), ("candidate", new)): + bad = [r for r in range(n) if data[r] != ref[r]] + require(not bad, f"{label} physical endpoint mismatch {bad[:12]}") + require(old == new, "paired physical endpoints differ") + require(old_counts.keys() == new_counts.keys() + and all(old_counts[k] == new_counts[k] for k in old_counts if k != "events"), + "ordered CLEAR values or COPY zero observations differ") + wrong_ref = [None] * n + for x, y in zip(x2, y2): + expected(wrong_ref, x, y, -alpha2, beta2) + wrong_sign = [r for r in (*x2, *y2) if new[r] != wrong_ref[r]] + require(bool(wrong_sign), "wrong second-port alpha sign accepted") + failed = None + if test_wrong_phase: + mutated, counts = replay(candidate, inject=True) + failed = counts if mutated is None else {"endpoint_rows": [ + r for r in range(n) if mutated[r] != ref[r]]} + require(failed.get("detected_at_COPY") is not None or bool(failed.get("endpoint_rows")), + "wrong edited transition phase accepted") + return { + "status": "PASS_PAIRED_DENSE_PHYSICAL_WORDS", + "prime": prime, "seed": seed, "i_squared_minus_one": field.i, + "endpoint_rows": n, "owned_zero_rows": size - n, "vector_width": DIM, + "elapsed_ns": monotonic_ns() - t0, + "digests": {"initial": digest(initial), "source": digest(old), "candidate": digest(new), + "reference_public": digest(ref)}, + "source": old_counts, "candidate": new_counts, + "wrong_second_alpha_rows": wrong_sign, "wrong_edited_transition_phase": failed, + "six_finite_exact_column_crosschecks": 6, + "scope": "One deterministic dense input at this modulus through every literal event", + } diff --git a/research/p104-banked-chart595-split/engines/caller/binding16.py b/research/p104-banked-chart595-split/engines/caller/binding16.py new file mode 100644 index 0000000000..d07341b817 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/binding16.py @@ -0,0 +1,280 @@ +"""Complete occurrence and source-bound phase specialization of #7000/#7113. + +The degree-two phase polynomial and translation checks are reused unchanged +from Douglas Colkitt's retained upstream_application.py. See SOURCE-PINS.json. +""" + +from collections import Counter + +from caller16 import literal_layout, require +from upstream_application import boundary, digest, dot, polynomial, sub, terms, translation + + +def route(q, basis, stage, ambient): + native = [q, *basis] + require(len(native) == 9 and all(0 < v < 512 for v in native), + "nine central directions") + require(all(dot(a, b) == (i == j) for i, a in enumerate(native) + for j, b in enumerate(native)), "orthonormal central directions") + fresh = [1 << (9 + 8 * (stage - 1) + j) for j in range(8)] + mask = 511 | sum(fresh) + + def transform(value): + central = value & 511 + out = value & ~mask + if dot(central, q): + out ^= q + for basis_vector, axis in zip(basis, fresh, strict=True): + if dot(central, basis_vector): + out ^= axis + if value & axis: + out ^= basis_vector + return out + + axes = [1 << j for j in range(ambient)] + require(all(transform(transform(a)) == a for a in axes), "full route involution") + require(transform(q) == q, "preserved head direction") + require(all(transform(a) == a for a in axes if not mask & a), "complete spectators") + return transform + + +def contact_phase(q, basis, stage, ambient): + move = route(q, basis, stage, ambient) + before_axes = [1 << j for j in range(9 + 8 * (stage - 1))] + after_axes = [1 << j for j in range(9 + 8 * stage)] + spectator = [1 << j for j in range(9, 9 + 8 * stage)] + x0 = terms((a, 1) for a in before_axes) + y0 = terms([*x0.items(), (q, -1)]) + x1 = terms((a, 1) for a in after_axes) + y1 = terms([*x1.items(), (q, -1)]) + nx0 = terms([(a, 1) for a in spectator] + [(q, 1)]) + ny0 = terms((a, 1) for a in spectator) + nx1 = terms((a, 1) for a in [*spectator, *[1 << j for j in range(9)]]) + ny1 = terms([*nx1.items(), (q, -1)]) + pairs = ((x0, nx0), (y0, ny0), (nx1, x1), (ny1, y1)) + shifts = [boundary(a, b, move) for a, b in pairs] + body = terms((1 << j, 1) for j in range(9 + 8 * (stage - 1), 9 + 8 * stage)) + require(not polynomial(sub(sub(x1, x0), body)) + and not polynomial(sub(sub(y1, y0), body)) + and not polynomial(sub(sub(y1, x0), terms([*body.items(), (q, -1)]))) + and not polynomial(sub(sub(x1, y0), terms([*body.items(), (q, 1)]))), + "all four signed contact operators") + require(polynomial(sub(terms([(q, 1)]), terms([(q, -1)]))), + "query orientation discrimination") + # The two signed head corrections and the Q^2 term of LAMBDA. + require(translation(sub(terms([(q, 1)]), terms([(q, -1)]))) == q + and translation(terms([(q, 2)])) == q, "ordinary head translations") + first_shift = next((i for i, shift in enumerate(shifts) if shift), None) + return shifts, (move, pairs[first_shift]) if first_shift is not None else None + + +def native_inventory(word, helpers): + dimensions = [len(frame) for frame in word["frames"]] + public = word["public"] + owned = {} + lifetimes = [] + moves = [] + paid = Counter() + opcodes = Counter() + live_peak = 0 + for clock, event in enumerate(word["program"]): + op, role, *args = event + opcodes[op] += 1 + if op == "INIT": + require(public <= role < public + word["owned_fields"] and role not in owned, + "fresh owned lifetime") + owned[role] = len(lifetimes) + lifetimes.append([role, clock, args[0], None, None]) + live_peak = max(live_peak, len(owned)) + elif op == "CLEAR": + require(role in owned, "ordered owned retirement") + lifetime = lifetimes[owned.pop(role)] + lifetime[3:] = [clock, args[0]] + elif op == "MOVE": + first, last, is_owned = args + rank = abs(dimensions[last] - dimensions[first]) + require(rank > 0 and is_owned == (role >= public), "positive paid native rank") + require(not is_owned or role in owned, "current private MOVE owner") + moves.append((clock, role, first, last, rank, owned.get(role))) + paid[rank] += 1 + require(not owned and len(lifetimes) == 235 and live_peak == 51, "full 235-lifetime closure") + targets = Counter() + for role in helpers: + rank = dimensions[word["final"][role]] - dimensions[word["initial"][role]] + require(rank > 0, "positive independently owned helper target") + targets[rank] += 1 + return lifetimes, moves, paid, targets, opcodes + + +def complete_binding(word, caller, phases, signed): + stages, types, role_sets = literal_layout(caller, word) + ambient = caller["ambient_rank"] + public = word["public"] + require(public == 1501 and word["owned_fields"] == 68, "exact native public/private header") + ports = word["ports"] + live = word["live"] + h = word["hosted"] + second = dict(zip(h["Dports"], zip(h["X2"], h["Y2"], strict=True), strict=True)) + main = set(live) | {r + 112 for r in live} | set(h["X2"]) | set(h["Y2"]) + helpers = sorted(set(range(public)) - main) + require(len(live) == len(ports) == 104 and len(set(ports)) == 104 + and len(main) == 400 and len(helpers) == 1101, "actual native partition") + special_helpers = (325, 1087) + for role in special_helpers: + pair = [word["initial"][role], word["final"][role]] + require(role in helpers and pair == [3, 237] + and not word["frames"][pair[0]] + and word["frames"][pair[1]] == [30, 75, 138, 266], + "explicit arbitrary-input rank-four helper boundary") + by_q = {row["q"]: row["idle_children"][0]["orthogonal_axes"][:8] + for row in phases["recipes"]} + require(set(ports) <= set(by_q), "every actual port has a pinned phase basis") + for port, (first, q) in enumerate(zip(live, ports, strict=True)): + companion = first + 112 + fin = word["frames"][word["final"][companion]] + require(word["frames"][word["initial"][first]] == [q] + and not word["frames"][word["initial"][companion]] + and word["frames"][word["final"][first]] == [1 << j for j in range(9)] + and len(fin) == 8 and all(dot(q, axis) == 0 for axis in fin), + "actual main source and target charts") + if port in second: + x2, y2 = second[port] + require(all(word[key][a] == word[key][b] + for key in ("initial", "final") + for a, b in ((first, x2), (companion, y2))), + "separate second plane with identical charts") + + lifetime_plan, moves, native_paid, helper_targets, opcodes = native_inventory(word, helpers) + roots = {("main", port, role) for kind, spec in types.items() + for port in spec["ports"] for role in role_sets[kind]} + require(len(roots) == signed["root_owners"] == 3536, "distinct root owner count") + fresh_helpers = set() + paid = Counter() + targets = Counter() + phase_rows = [] + occurrences = [] + owner_maps = [] + phase_fault_rejected = False + signed_idles = 0 + special_owners = [] + for clock, event in enumerate(caller["events"]): + if event[0] == "J": + _, stage, a, b = event + owners = {} + for port, first in enumerate(live): + pair = a[:2] if port in second else b[:2] + first_pair = ((first, pair[0]), (first + 112, pair[1])) + if port in second: + first_pair += tuple(zip(second[port], a[2:], strict=True)) + for slot, role in first_pair: + tag = ("main", port, role) + require(tag in roots and slot not in owners, "injective main assignment") + owners[slot] = tag + shifts, fault = contact_phase(ports[port], by_q[ports[port]], stage, ambient) + phase_rows.append([clock, port, shifts, 2 if port in second else 1]) + if fault and not phase_fault_rejected: + transform, (before, after) = fault + try: + boundary(before, after, transform, omit_translation=True) + except ValueError as exc: + require(str(exc) == "forward contact includes its phase", + "phase control rejection reason") + phase_fault_rejected = True + else: + raise ValueError("omitted contact translation escaped") + require(set(owners) == main and len(set(owners.values())) == 400, + "all source main slots have different physical owners") + for role in helpers: + tag = ("helper", stage, role) + require(tag not in fresh_helpers and tag not in roots, "fresh arbitrary helper") + fresh_helpers.add(tag) + owners[role] = tag + if role in special_helpers: + special_owners.append({ + "tag": tag, "stage": stage, "caller_clock": clock, + "initial_chart": 3, "final_chart": 237, "target_rank": 4, + "exit_ordered_basis": word["frames"][237], + }) + require(set(owners) == set(range(public)) and len(set(owners.values())) == public, + "full public-field injection") + owner_maps.append([stage, sorted(owners.items())]) + for native_clock, role, first, last, rank, owned in moves: + tag = owners[role] if owned is None else ("owned", stage, owned) + require(tag not in roots or owned is None, "private owner separation") + paid[rank] += 1 + occurrences.append([clock, native_clock, tag, rank, first, last]) + targets.update(helper_targets) + continue + + kind, op, role, *args = event + if op not in {"QUERY", "IDLE_ONE", "IDLE_ODD"}: + continue + if op == "QUERY": + rank = 1 + else: + rank = 8 * len(args[0]) + int(op == "IDLE_ODD") + for port in types[kind]["ports"]: + tag = ("query_scratch", clock, port) if op == "QUERY" else ("main", port, role) + require((tag not in roots) if op == "QUERY" else tag in roots, "caller paid owner") + occurrences.append([clock, op, tag, rank]) + paid[rank] += 1 + signed_idles += int(op == "IDLE_ODD") + require(len(owner_maps) == stages and len(fresh_helpers) == 17616 and phase_fault_rejected, + "complete 16-call owners and phase control") + require(len(special_owners) == len({row["tag"] for row in special_owners}) == 32, + "distinct stage-tagged arbitrary helper 325 and 1087 ingress/egress") + root_targets = Counter() + root_negative = 0 + for kind, spec in types.items(): + for phase, coeff_phase, *selection in spec["diagonal"]: + require(coeff_phase == 0 and any(selection), "whole positive target endpoint") + for port in spec["ports"]: + q = ports[port] + axes = [1 << (9 + 8 * j + offset) for j, yes in enumerate(selection) + if yes for offset in range(8)] + require(len(axes) == len(set(axes)) and all(a < 1 << ambient for a in axes), + "positive target complete distinct axes") + actual = terms([(q, phase)] + [(axis, 1) for axis in axes]) + positive = terms((a, 1) for a in ([q] if phase else []) + axes) + require(translation(sub(positive, actual)) == (q if phase == -1 else 0), + "exact negative root translation") + root_targets[len(axes) + int(bool(phase))] += 1 + root_negative += int(phase < 0) + targets.update(root_targets) + references = Counter({rank: stages * count for rank, count in native_paid.items()}) + references.update(signed["fixed_caller_paid"]) + require(paid == references and root_targets == Counter(signed["fixed_root_targets"]), + "independent decomposition and occurrence invoices agree") + require(len(occurrences) == sum(paid.values()) and sum(targets.values()) == 21152, + "complete paid and productive owner count") + contacts = sum(4 * row[3] for row in phase_rows) + nonzero = sum(row[3] * sum(bool(v) for v in row[2]) for row in phase_rows) + require(contacts == nonzero == 12800, "all 12,800 absolute phase translations charged") + return { + "ambient": ambient, + "calls": stages, + "native_public": public, + "main_per_native": len(main), + "fresh_helpers": len(fresh_helpers), + "role_325_and_1087_helper_owners": special_owners, + "root_owners": len(roots), + "productive_fields": sum(targets.values()), + "paid_positions": len(occurrences), + "native_paid": dict(native_paid), + "native_targets": dict(helper_targets), + "paid": dict(paid), + "targets": dict(targets), + "phase_digest": digest(phase_rows), + "owner_map_digest": digest(owner_maps), + "ordered_paid_digest": digest(occurrences), + "contacts": contacts, + "nonzero_contact_translations": nonzero, + "phase_omission_rejected": phase_fault_rejected, + "signed_idle_ordinary_corrections": signed_idles, + "negative_root_ordinary_corrections": root_negative, + "owned_lifetimes_per_native": len(lifetime_plan), + "owned_lifetime_plan_digest": digest(lifetime_plan), + "owned_fresh_homes_per_raw_caller": stages * len(lifetime_plan), + "owned_resets_per_raw_caller": 2 * stages * len(lifetime_plan), + "native_opcodes": dict(opcodes), + } diff --git a/research/p104-banked-chart595-split/engines/caller/caller16.py b/research/p104-banked-chart595-split/engines/caller/caller16.py new file mode 100644 index 0000000000..2865530b78 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/caller16.py @@ -0,0 +1,182 @@ +"""Exact signed caller replay, adapted from Ali Romman's #7663 caller.py. + +See SOURCE-PINS.json for Rohan Arun's literal #7113-derived caller and +the attributed reference engines. Apache-2.0. +""" + +from collections import Counter +from fractions import Fraction +from functools import cache + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def exact_div(numerator, denominator): + quotient, remainder = divmod(numerator, denominator) + require(remainder == 0, "inexact caller pre-product") + return quotient + + +def literal_layout(caller, word): + stages = caller["stages"] + require(stages == 16 and caller["ambient_rank"] == 9 + 8 * stages == 137, + "literal 16-call, 137-axis layout") + require(len(caller["events"]) == 4192, "literal caller event count") + types = caller["types"] + require(set(types) == {"A", "B"}, "literal type partition") + require(all(spec["roles"] == 34 for spec in types.values()), "literal 34+34 roles") + require(types["A"]["ports"] == word["hosted"]["Dports"], "hosted port assignment") + require((len(types["A"]["ports"]), len(types["B"]["ports"])) == (96, 8), + "literal 96+8 ports") + require(sorted(types["A"]["ports"] + types["B"]["ports"]) == list(range(104)), + "disjoint complete 104-port assignment") + role_sets = { + kind: set(range(spec["offset"], spec["offset"] + spec["roles"])) + for kind, spec in types.items() + } + require(role_sets["A"].isdisjoint(role_sets["B"]) + and role_sets["A"] | role_sets["B"] == set(range(caller["roles"])), + "disjoint complete root role ranges") + h = word["hosted"] + coefficients = tuple(Fraction(h[k]) for k in ("alpha", "beta", "alpha2", "beta2")) + require(coefficients == (-1, Fraction(1, 2), -1, 0), "joint normalized source coefficients") + require(Fraction(types["A"]["alpha2"]) == coefficients[2], "A second-plane coefficient") + return stages, types, role_sets + + +def signed_caller(caller, word, odd_scale, dyadic_height): + stages, types, role_sets = literal_layout(caller, word) + unit = odd_scale << dyadic_height + zero = (0,) * stages + rows = [{(r, 0, zero): (unit, 0)} for r in range(caller["roles"])] + paid = Counter() + targets = Counter() + uses = Counter() + calls = [] + checks = 0 + peak = unit + peak_at = (-1, "entrance") + clock = -1 + + def observe(row, site): + nonlocal peak, peak_at + mass = sum(abs(real) + abs(imag) for real, imag in row.values()) + if mass > peak: + peak, peak_at = mass, (clock, site) + + @cache + def shifted(exponents, shift): + result = list(exponents) + for stage in shift: + result[stage - 1] += 1 + return tuple(result) + + def term(row, ar=1, ai=0, denominator=1, phase=0, shift=()): + nonlocal checks + out = {} + for (role, q, powers), (x, y) in row.items(): + real, imag = ar * x - ai * y, ar * y + ai * x + if denominator != 1: + real, imag = exact_div(real, denominator), exact_div(imag, denominator) + checks += 1 + if real or imag: + key = (role, (q + phase) % 4, shifted(powers, shift) if shift else powers) + out[key] = (real, imag) + observe(out, "scaled separate term") + return out + + def add(a, b): + out = a.copy() + for key, (u, v) in b.items(): + x, y = out.get(key, (0, 0)) + if x + u or y + v: + out[key] = (x + u, y + v) + else: + out.pop(key, None) + observe(out, "stored sum") + return out + + for clock, event in enumerate(caller["events"]): + kind = event[0] + if kind == "J": + _, stage, (x, y, u, v), (a, b, alpha, beta) = event + require(stage == len(calls) + 1, "chronological joint occurrences") + require(Fraction(alpha) == -1 and Fraction(beta) == Fraction(1, 2), + "literal joint coefficients") + require(len({x, y, u, v}) == 4 and {x, y, u, v} <= role_sets["A"] + and a != b and {a, b} <= role_sets["B"], "joint owner alias") + calls.append(stage) + rows[y] = add(rows[y], term(rows[x], phase=-1)) + rows[u] = add(rows[u], term(rows[v], -1, phase=1)) + first, second = rows[a], rows[b] + rows[a] = add(first, term(second, -1, phase=1)) + rows[b] = add(term(second, denominator=2), + term(first, denominator=2, phase=-1)) + for role in (x, y, u, v, a, b): + rows[role] = term(rows[role], shift=(stage,)) + continue + + _, op, role, *args = event + require(kind in role_sets and role in role_sets[kind], "caller target owner") + replicas = len(types[kind]["ports"]) + uses[op] += replicas + if op in {"ADD", "SWAP", "QUERY"}: + require(args[0] in role_sets[kind] and args[0] != role, "caller donor owner") + if op == "SWAP": + other, = args + rows[role], rows[other] = rows[other], rows[role] + elif op == "QUERY": + donor, sign = args + require(sign in (-1, 1), "caller query orientation") + rows[role] = add(rows[role], term(rows[donor], phase=sign)) + paid[1] += replicas + elif op in {"ADD", "SCALE"}: + factor = Fraction(args[-1]) + donor = args[0] if op == "ADD" else role + contribution = term(rows[donor], factor.numerator, denominator=factor.denominator) + rows[role] = add(rows[role], contribution) if op == "ADD" else contribution + elif op == "LAMBDA": + sign, = args + require(sign in (-1, 1), "caller LAMBDA sign") + old = rows[role] + rows[role] = add(term(old, 1, sign, 2), term(old, 1, -sign, 2, phase=2)) + else: + require(op in {"IDLE_ONE", "IDLE_ODD"}, "known caller operation") + block = tuple(args[0]) + require(block and len(block) == len(set(block)) + and all(1 <= k <= stages for k in block), "whole idle stage subset") + if op == "IDLE_ODD": + require(len(args) == 2 and len(block) == 1 and args[1] == -1, + "literal signed rank-nine child") + else: + require(len(args) == 1, "literal unit idle") + phase = args[1] if op == "IDLE_ODD" else 0 + rows[role] = term(rows[role], phase=phase, shift=block) + paid[8 * len(block) + phase % 2] += replicas + + require(calls == list(range(1, stages + 1)), "all 16 native invocations") + for spec in types.values(): + require(len(spec["diagonal"]) == spec["roles"], "complete diagonal") + for off, (phase, coefficient_phase, *powers) in enumerate(spec["diagonal"]): + role = spec["offset"] + off + require(phase in (-1, 0, 1) and coefficient_phase == 0 and len(powers) == stages + and set(powers) <= {0, 1} and any(powers), "positive whole root target") + require(rows[role] == {(role, phase % 4, tuple(powers)): (unit, 0)}, + "exact signed root endpoint") + targets[8 * sum(powers) + phase % 2] += len(spec["ports"]) + return { + "fixed_caller_paid": dict(paid), + "fixed_root_targets": dict(targets), + "uses": dict(uses), + "calls": stages, + "roles": len(rows), + "root_owners": sum(targets.values()), + "dyadic_height": dyadic_height, + "odd_scale": odd_scale, + "peak_scaled_mass": str(Fraction(peak, 1 << dyadic_height)), + "peak_witness": peak_at, + "exact_preproduct_divisions": checks, + } diff --git a/research/p104-banked-chart595-split/engines/caller/directed_price.py b/research/p104-banked-chart595-split/engines/caller/directed_price.py new file mode 100644 index 0000000000..8785a1337d --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/directed_price.py @@ -0,0 +1,184 @@ +#!/usr/bin/env python3 +"""Independent rational bounds on the two frozen banked invoices.""" + +from argparse import ArgumentParser +from fractions import Fraction +from functools import lru_cache +from hashlib import sha256 +import json +from pathlib import Path + + +INVOICE = "a9aecf52d99d5370506b9dc6d03799241bebd2c03bbdcfa2dd5f45ec03c9d70d" +OUTER = "8e29f3ebb19c849884cfb87ef39431616774acfe95fa28a3cfe2e124abc6d202" +PEER = "00340c699fd7e2895d31a41d1eb60aebf91d7ba2c1c193dc002f69315298cd38" +RESULT = "b1af8b101a40f25eea55a8b58443794a7db708389ad66c20adefbace12828e09" +PLAN = "509c44b078561a8868b68dab9f50b0b7d87d0976361d927bc8cc6bfdf1239393" +F = Fraction +Q = 1 << 160 +BIT = F("0.00376669") +PEER_CLAIM = F("0.0037260455556") +CHILD_CLAIM = F("0.0037261023899") +PEER_BRACKET = tuple(map(F, ("0.00372604555571", "0.00372604555572"))) +CHILD_BRACKET = tuple(map(F, ("0.0037261023900", "0.0037261023901"))) + + +def require(predicate, reason): + if not predicate: + raise ValueError(reason) + + +def load_exact(path, expected): + raw = path.read_bytes() + require(sha256(raw).hexdigest() == expected, f"frozen bytes changed: {path.name}") + return json.loads(raw) + + +def outward(lower, upper): + return F(lower * Q // 1, Q), F(-((-upper * Q) // 1), Q) + + +def log_unit(value): + """Lower partial sum and upper geometric tail on log(value), 1 <= value <= 2.""" + u = (value - 1) / (value + 1) + require(0 <= u <= F(1, 3), "range reduction for the logarithm") + square, term, total = u * u, u, F() + for index in range(28): + total += 2 * term / (2 * index + 1) + term *= square + return total, total + 2 * term / (57 * (1 - square)) + + +@lru_cache(maxsize=None) +def log_rank(rank): + power = rank.bit_length() - 1 + low2, high2 = log_unit(F(2)) + low, high = log_unit(F(rank, 1 << power)) + return outward(power * low2 + low, power * high2 + high) + + +def positive_exp(value): + """Bound exp(value) from its first 27 positive terms and the remaining tail.""" + require(0 <= value <= 1, "range reduction for the exponential") + term, total = F(1), F(1) + for index in range(1, 27): + term *= value / index + total += term + first_omitted = term * value / 27 + return total, total + first_omitted / (1 - value / 28) + + +@lru_cache(maxsize=None) +def power_rank(rank, k_low, k_high): + require(0 <= k_low <= k_high < 1, "positive exponent interval") + log_low, log_high = log_rank(rank) + x_low, x_high = outward((1-k_high) * log_low / 8, (1-k_low) * log_high / 8) + low = positive_exp(x_low)[0] + high = positive_exp(x_high)[1] + low, high = outward(low, high) + for _ in range(3): + low, high = outward(low * low, high * high) + return low, high + + +def moment(coefficients, k_low, k_high, derivative=False): + low, high = F(), F() + for rank, coeff in sorted(coefficients.items()): + term_low, term_high = power_rank(rank, k_low, k_high) + if derivative: + log_low, log_high = log_rank(rank) + term_low, term_high = -term_high * log_high, -term_low * log_low + lower, upper = sorted((term_low * coeff, term_high * coeff)) + low, high = low + lower, high + upper + return low, high + + +def read_history(invoice): + p = {int(k): v for k, v in invoice["paid"].items()} + t = {int(k): v for k, v in invoice["targets"].items()} + require(all(1 <= k <= 137 and type(v) is int and v > 0 + for series in (p, t) for k, v in series.items()), "literal positive rank bill") + require(sum(p.values()) == 101824 and sum(t.values()) == 21152, "full bill denominators") + coeff = {k: t.get(k, 0) - p.get(k, 0) for k in p.keys() | t.keys()} + require(sum(k * v for k, v in coeff.items()) == 1328, "retained signed rank surplus") + return p, t, coeff + + +def per_side(invoice, received, claim, bracket, comparator, comparator_sign): + _, _, coeff = read_history(invoice) + require(F(received["decimal_claim"]) == claim and tuple(map(F, received["bracket"])) == bracket, + "same directed endpoints shown in the application receipt") + query = {claim: 1, claim + F(7, 10**14): 1, bracket[0]: 1, bracket[1]: -1} + require(comparator not in query or query[comparator] == comparator_sign, "consistent comparator sign") + query[comparator] = comparator_sign + points = {} + for point, sign in query.items(): + bounds = moment(coeff, point, point) + require(bounds[0] > 0 if sign > 0 else bounds[1] < 0, f"strict moment sign at {point}") + points[str(point)] = list(map(str, bounds)) + derivative = moment(coeff, PEER_CLAIM, BIT, derivative=True) + require(derivative[1] < 0, "strictly decreasing moment on the shared comparison interval") + return { + "claim": str(claim), "bracket": list(map(str, bracket)), "target_minus_paid": points, + "derivative_range": list(map(str, derivative)), + "derivative_interval_kappa": [str(PEER_CLAIM), str(BIT)], + } + + +def main(): + parser = ArgumentParser(description=__doc__) + for name in ("invoices", "outer", "application", "peer-result", "out"): + parser.add_argument("--" + name, required=True, type=Path) + parser.add_argument("--plan-sha256", required=True) + args = parser.parse_args() + require(args.plan_sha256 == PLAN, "registered independent rational price check") + invoices = load_exact(args.invoices, INVOICE) + outer = load_exact(args.outer, OUTER) + published = load_exact(args.peer_result, PEER)["application"] + applied = load_exact(args.application, RESULT) + require(applied["status"] == "PASS_BANK24_ACTUAL16_APPLICATION_COMPONENT" + and invoices["peer"] == published["invoice"], "same complete #7674 comparator") + require(applied["graphs"]["peer"][0] == "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098" + and applied["graphs"]["candidate"][0] == "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150", + "actual frozen peer and child graph identities") + peer_p, peer_t, _ = read_history(invoices["peer"]) + child_p, child_t, child_coeff = read_history(invoices["candidate"]) + delta = {k: child_p.get(k, 0) - peer_p.get(k, 0) for k in peer_p.keys() | child_p.keys()} + require({k: change for k, change in delta.items() if change} == {2: 16, 3: -32, 4: 16} + and peer_t == child_t, "the only signed fee change is the paid rank redistribution") + compared = PEER_BRACKET[1] + improvement = moment({2: -16, 3: 32, 4: -16}, compared, compared) + require(0 < improvement[0] <= improvement[1] < 1, "strict improvement with no rank-one fee") + child_plus_fee = dict(child_coeff) + child_plus_fee[1] -= 1 + control = moment(child_plus_fee, compared, compared) + require(control[1] < 0, "a single added rank-one charge rejects the claimed comparison") + gap = CHILD_CLAIM - compared + require(gap == F(applied["strict_gap"]) == F(2841709, 50000000000000), "exact strict gap") + result = { + "status": "PASS_BANK24_REVIEW_INDEPENDENT_DIRECTED_PRICE", + "scope": "Independent signed-rank moment brackets, derivative and added-price control", + "inputs": {"invoices": INVOICE, "outer_receipt": OUTER, "application": RESULT, + "published_peer": PEER, "plan_receipt": PLAN, + "source": sha256(Path(__file__).read_bytes()).hexdigest()}, + "graphs": applied["graphs"], "caller_sha256": applied["caller_sha256"], + "paid_count_each": 101824, "target_count_each": 21152, + "rank_mass_surplus_each": 1328, "paid_delta": {2: 16, 3: -32, 4: 16}, + "target_delta": {}, "strict_gap": str(gap), + "peer": per_side(invoices["peer"], outer["peer"], PEER_CLAIM, PEER_BRACKET, compared, -1), + "candidate": per_side(invoices["candidate"], outer["candidate"], CHILD_CLAIM, + CHILD_BRACKET, compared, 1), + "target_minus_paid_improvement_at_peer_upper": list(map(str, improvement)), + "actual_child_added_one_rank_one_fee_control": list(map(str, control)), + } + for path, digest in ((args.invoices, INVOICE), (args.outer, OUTER), + (args.application, RESULT), (args.peer_result, PEER)): + require(sha256(path.read_bytes()).hexdigest() == digest, f"input changed: {path.name}") + with args.out.open("x") as handle: + json.dump(result, handle, indent=2, sort_keys=True) + handle.write("\n") + print(result["status"]) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/engines/caller/interval_gate.py b/research/p104-banked-chart595-split/engines/caller/interval_gate.py new file mode 100644 index 0000000000..e24dc46079 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/interval_gate.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +"""Independent certified fixed-grid intervals (80 decimal places). +ln via 2 atanh after binary range reduction; exp(-x) via alternating +Taylor brackets. Uses only integer floor/ceiling, not Decimal transcendents. +""" +from fractions import Fraction as F +from functools import lru_cache +from pathlib import Path +import json,argparse +if not __debug__: raise RuntimeError('Run without -O; assertions are proof checks.') +B=10**80 + +def ceildiv(a,b):return -((-a)//b) +def exact(q): + q=F(q);return q.numerator*B//q.denominator,ceildiv(q.numerator*B,q.denominator) +def add(a,b):return a[0]+b[0],a[1]+b[1] +def sub(a,b):return a[0]-b[1],a[1]-b[0] +def mul(a,b): + p=[a[i]*b[j] for i in (0,1) for j in (0,1)];return min(p)//B,ceildiv(max(p),B) +def div(a,b): + assert b[0]>0 + p=[F(a[i]*B,b[j]) for i in (0,1) for j in (0,1)] + return min(p).__floor__(),max(p).__ceil__() +def smul(a,q):return mul(a,exact(q)) +def atanh_log(y): + yi=exact(y);yy=mul(yi,yi);p=yi;s=(0,0) + for j in range(100):s=add(s,smul(p,F(2,2*j+1)));p=mul(p,yy) + # 0 <= tail <= 2 y^201/[201(1-y^2)] < 3*(1/3)^201. + return s[0],s[1]+ceildiv(3*B,3**201) +@lru_cache(None) +def log(r): + assert r>=1 + k=r.bit_length()-1;y=F(r-2**k,r+2**k) + a=atanh_log(y);b=atanh_log(F(1,3));return add(a,smul(b,k)) +def expminus(x): + assert 0<=x[0]<=x[1]0 and margins[str(hi)][1]<0 and margins[str(tested)][0]>0 + target=moment(T,tested);paid=moment(P,tested) + alpha=div(paid,target) + # Tail exponent = 1-tested+1/7; argument exp may not be negative. + # r^(1-tested+1/7)=r^(1-tested)* exp(log(r)/7). + def exppos(x): + assert 0<=x[0]<=x[1]0 and gap.numerator==1;step=gap.denominator + wins=lambda j:(step*j+1)**written<2**j + l,h=1,2 + while not wins(h):l,h=h,2*h + while h-l>1: + m=(l+h)//2 + if wins(m):h=m + else:l=m + assert wins(h) and not wins(h-1) + # Monotonicity: upper derivative bound on [0, cap]. + derivative=(0,0) + for rr in T.keys()|P.keys(): + c=T.get(rr,0)-P.get(rr,0);r=int(rr) + term=mul(power(r,cap if c>=0 else 0),log(r));derivative=add(derivative,smul(term,-c)) + assert derivative[1]<0 + result=dict(claim=str(claim),tested=str(tested),raw_bracket=[str(lo),str(hi)],moment_margins={k:show(v) for k,v in margins.items()},moment_margin_float={k:value(v) for k,v in margins.items()},derivative_upper=float(F(derivative[1],B)),alpha=value(alpha),gamma=value(gamma),delta=value(delta),minimum_log_power=lp,written_log_power=written,compiler_gap=str(gap),H=str(step*h),BIT_pin=str(cap),BIT_margin=str(cap-tested)) + # Outer formulas evaluated independently after algebraically substituting + # b=k+5g,a=k+4g,q=k+3g,epsilon=1-g,beta=1-3g. + k=claim;g=gap;b=k+5*g;a=k+4*g;q=k+3*g;ep=1-g;be=1-3*g;r0=g/10;stop=layout=g + sig=1-b;tau=1-a;internal=tau+(1-stop)*max(sig-tau,0);leaf=sig+stop*(1-sig);lam=1-(q+a)/2;xi=ep*(1+q)-F(3,32)+layout;key=be+1-ep + M=[ep*q,a,1-ep+q*be,1-ep+a*be,1-ep+be,F(3,32)+xi-ep,xi+F(1,2)-ep,ep,1-(ep+be+48-128+2)] + checks=[cap-a,b-a,q,b-q,a-q,stop,1-stop,(1-stop)*b-a,1-internal-q,1-leaf-q,lam-tau,lam-sig,lam-internal,1-q-lam,1-q-leaf,ep,1-ep,xi-F(1,2),ep-xi,be,ep-be,1-be,1-(2*xi-2)-r0-be,1-(2*xi-2)-be,1-ep-r0,1-ep,r0,1-key,1-be-2*(1-ep),128-48-be,layout,ep-a,F(1,32)-b,F(2**45-7**16),F(2),2-xi,F(5),1-be,1-be,1-ep,M[2]-M[0],g,k-F('.001730970419199163702738'),1-ep,F(11,2)]+[x-k for x in M] + functional=[1-be,be*(1-F(3,1000)),128-48-ep-be-1,be*(1-F(1,250))] + assert len(checks)==54 and len(functional)==4 and min(checks+functional)>0 + result['outer']=dict(strict_count=54,functional_count=4,minimum_margin=str(min(checks+functional)),BIT_just_below_effective_rejected=(a-F(1,10**12))-a<0) + # Input-lift is only needed on [1-tested_complex,1]. A stronger BIT + # pin is irrelevant to this interval; the source's crude BIT-wide bound + # is not imported beyond its valid range. + pos={7:1,3:1,5:1};neg={9:1,4:1,1:2};d1=(0,0);curvature=(0,0) + for hist,sign in ((pos,1),(neg,-1)): + for r,c in hist.items(): + d1=add(d1,smul(log(r),sign*c*r)) + curvature=add(curvature,smul(mul(log(r),log(r)),c*r)) + lift_cap=cap if cap<=F('.00376669') else tested + assert tested<=lift_cap and F(d1[1],B)+lift_cap*F(curvature[1],B)<0 + lifts={} + for price in (claim,tested): + lift=sub(moment(pos,price),moment(neg,price));assert lift[0]>0 + assert price*(-F(d1[1],B))-price*price*F(curvature[1],B)/2>0 + lifts[str(price)]=show(lift) + result['input_lift']=dict(margins=lifts,interval_kappa_cap=str(lift_cap),derivative_upper_on_required_interval=str(F(d1[1],B)+lift_cap*F(curvature[1],B)),source_BIT_wide_crude_bound_would_be=str(F(d1[1],B)+cap*F(curvature[1],B))) + return result +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('audit');p.add_argument('--claim',default='.00362852408');p.add_argument('--tested',default='.00362852408007');p.add_argument('--lower',default='.00362852408398727978896072723289');p.add_argument('--upper',default='.00362852408398727978896072723290');p.add_argument('--out',required=True);p.add_argument('--bit-pin',default='.00376669');a=p.parse_args() + r=gate(json.loads(Path(a.audit).read_text())['invoice'],a.claim,a.tested,a.lower,a.upper,a.bit_pin);Path(a.out).write_text(json.dumps(r,indent=2)+'\n');print(json.dumps(r,indent=2)) diff --git a/research/p104-banked-chart595-split/engines/caller/native.py b/research/p104-banked-chart595-split/engines/caller/native.py new file mode 100644 index 0000000000..3e09f65fe3 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/native.py @@ -0,0 +1,132 @@ +"""Check exact rational signals, all endpoints, and the common integer grid.""" +from fractions import Fraction +from math import lcm +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from network import add_scaled, coefficients, fold, main_roles, need, pivot, read, source_word + + +def grid(net, order): + denominators = {~r: 1 for r in range(len(net.initial))} + common = 1 + for node in order: + bound = 1 + for donor, factor in net.forms[node].items(): + bound = lcm(bound, denominators[donor] * factor.denominator) + denominators[node] = bound + common = lcm(common, bound) + return common + + +def evaluate(net, requested=None): + order = net.schedule() + if requested is not None: + active = set(requested) + for k in reversed(order): + if k in active: + active.update(net.forms[k]) + order = [k for k in order if k in active] + unit = grid(net, order) + values = {~r: {r: unit} for r in range(len(net.initial))} + mass = {~r: unit for r in range(len(net.initial))} + peak = unit + work = 0 + for k in order: + row = {} + bound = 0 + for donor, factor in sorted(net.forms[k].items()): + a, b = factor.numerator, factor.denominator + bound += abs(a) * mass[donor] // b + for i, value in values[donor].items(): + quotient, remainder = divmod(a * value, b) + need(remainder == 0, "native term left the grid") + new = row.get(i, 0) + quotient + if new: + row[i] = new + else: + row.pop(i, None) + work += len(values[donor]) + peak = max(peak, bound) + values[k] = row + mass[k] = sum(map(abs, row.values())) + return unit, values, peak, work + + +def expected(word, unit): + n = word["public"] + out = [{r: unit} for r in range(n)] + hosted = word["hosted"] + a_ports = set(hosted["Dports"]) + for j, x in enumerate(word["live"]): + y = x + 112 + if j in a_ports: + out[y][x] = unit + else: + need(unit % 2 == 0, "butterfly half") + out[x][y] = -unit + out[y] = {x: unit // 2, y: unit // 2} + for x, y in zip(hosted["X2"], hosted["Y2"], strict=True): + out[x][y] = -unit + return out + + +def check_endpoints(net, word): + unit, rows, peak, terms = evaluate(net) + targets = expected(word, unit) + need([rows[net.first_output + r] for r in range(len(targets))] == targets, "native output matrix") + power = (unit & -unit).bit_length() - 1 + numerator_bits = max(abs(c.numerator).bit_length() for row in net.forms.values() for c in row.values()) + denominator_bits = max(c.denominator.bit_length() for row in net.forms.values() for c in row.values()) + return dict(grid=str(unit), odd=unit >> power, dyadic_height=power, peak_scaled_mass=str(Fraction(peak, 1 << power)), + checked_products=terms, terms=sum(map(len, net.forms.values())), slots=len(net.moves), + coefficient_bits=max(numerator_bits, denominator_bits), public=len(targets), mains=len(main_roles(word))) + + +def verify_pivot(net, edit): + combo = coefficients(edit["combination"]) + source = coefficients(edit["sender"]) + side = coefficients(edit["receiver"]) + _, values, _, _ = evaluate(net, combo.keys() | source.keys() | side.keys()) + target = {} + for m, a in combo.items(): + add_scaled(target, values[m], a) + for m, a in side.items(): + add_scaled(target, values[m], a) + got = {} + for m, a in source.items(): + add_scaled(got, values[m], a) + need(target == got, "saved signal identity") + + +def check_pivots(): + word = source_word() + net = fold(word) + edits = read(HERE / "PIVOTS.json") + checked = 0 + for i, edit in enumerate(edits): + if edit["direction"] == "transpose": + net = net.transpose() + verify_pivot(net, edit) + if i == 0: + donor, weight = edit["sender"][0] + corrupted = dict(edit, sender=[[donor, str(-Fraction(weight))], *edit["sender"][1:]]) + try: + verify_pivot(net, corrupted) + except ValueError as exc: + need(str(exc) == "saved signal identity", "sender sign control reason") + else: + raise ValueError("incorrect sender sign accepted") + checked += 1 + net = pivot(net, edit) + if edit["direction"] == "transpose": + net = net.transpose() + return checked + + +if __name__ == "__main__": + checked = check_pivots() + need(checked == read(HERE / "RESULT.json")["pivot_checks"], "pivot coverage") + print("PASS_EXACT_PIVOTS", checked) diff --git a/research/p104-banked-chart595-split/engines/caller/network.py b/research/p104-banked-chart595-split/engines/caller/network.py new file mode 100644 index 0000000000..0ebc1925c4 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/network.py @@ -0,0 +1,217 @@ +"""Construct the communication circuit and apply the rational pivots.""" +from dataclasses import dataclass +from fractions import Fraction +from functools import cache +from graphlib import TopologicalSorter +from hashlib import sha1, sha256 +from pathlib import Path +import gzip +import json + +HERE = Path(__file__).resolve().parent +PARENT = "ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d" + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def encoded(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def read(path): + raw = path.read_bytes() + return json.loads(gzip.decompress(raw) if path.suffix == ".gz" else raw) + + +def source_word(): + for pin in read(HERE / "SOURCE-PINS.json"): + raw = (HERE / pin["file"]).read_bytes() + need(sha256(raw).hexdigest() == pin["sha256"], "source SHA-256") + need(sha1(f"blob {len(raw)}\0".encode() + raw).hexdigest() == pin["git_blob"], "source Git blob") + base = read(HERE / "source/K372-2-WORD.json.gz") + patch = read(HERE / "source/source-edits.json") + need(sha256(encoded(base)).hexdigest() == patch["source"], "source edit origin") + result = [] + cursor = 0 + for edit in patch["edits"]: + start, stop = edit["start"], edit["stop"] + need(cursor <= start <= stop <= len(base["program"]), "source edit range") + need(base["program"][start:stop] == edit["before"], "source edit preimage") + result.extend(base["program"][cursor:start]) + result.extend(edit["after"]) + cursor = stop + result.extend(base["program"][cursor:]) + word = dict(base, program=result) + need(sha256(encoded(word)).hexdigest() == patch["candidate"] == PARENT, "parent word") + return word + + +def main_roles(word): + h = word["hosted"] + return set(word["live"]) | {i + 112 for i in word["live"]} | set(h["X2"]) | set(h["Y2"]) + + +@cache +def rational(literal): + return Fraction(literal) + + +def add_scaled(row, donor, factor): + for index, value in donor.items(): + new = row.get(index, 0) + factor * value + if new: + row[index] = new + else: + row.pop(index, None) + + +@dataclass +class Network: + first_output: int + initial: list + final: list + moves: dict + forms: dict + + def schedule(self): + for node, form in self.forms.items(): + chart = self.moves[node][0] if node < self.first_output else self.final[node - self.first_output] + for donor in form: + if donor < 0: + need(0 <= ~donor < len(self.initial), "input owner") + donor_chart = self.initial[~donor] + else: + need(donor in self.moves, "missing donor") + donor_chart = self.moves[donor][1] + need(donor_chart == chart, "nonlocal scalar") + need(set(self.forms) == self.moves.keys() | set(range(self.first_output, self.first_output + len(self.final))), + "output inventory") + dependencies = {node: sorted(i for i in self.forms[node] if i >= 0) for node in sorted(self.forms)} + return list(TopologicalSorter(dependencies).static_order()) + + def transpose(self): + def reverse(node): + if node < 0: + return self.first_output + ~node + if node >= self.first_output: + return ~(node - self.first_output) + return node + + edges = {k: {} for k in self.moves} + edges.update({self.first_output + r: {} for r in range(len(self.initial))}) + for node, form in self.forms.items(): + for donor, coefficient in form.items(): + edges[reverse(donor)][reverse(node)] = coefficient + moves = {k: (b, a) for k, (a, b) in self.moves.items()} + return Network(self.first_output, self.final, self.initial, moves, edges) + + +def fold(word): + n = word["public"] + rows = [{~r: 1} for r in range(n)] + [None] * word["owned_fields"] + charts = word["initial"][:] + [None] * word["owned_fields"] + forms, moves = {}, {} + for clock, event in enumerate(word["program"]): + op, r = event[:2] + if op == "INIT": + need(r >= n and rows[r] is None, "private birth") + rows[r], charts[r] = {}, event[2] + continue + need(rows[r] is not None, "inactive register") + if op == "MOVE": + _, _, a, b, owned = event + need(charts[r] == a and owned == (r >= n), "original transfer") + moves[clock], forms[clock] = (a, b), rows[r] + rows[r], charts[r] = {clock: 1}, b + else: + need(charts[r] == event[-1], "original scalar chart") + if op == "CLEAR": + need(r >= n, "public retirement") + rows[r], charts[r] = None, None + elif op == "SCALE": + rows[r] = {k: v * rational(event[2]) for k, v in rows[r].items()} + else: + need(op == "ADD" and event[2] != r and charts[event[2]] == charts[r], "original donor") + add_scaled(rows[r], rows[event[2]], rational(event[3])) + need(charts[:n] == word["final"] and all(f is None for f in charts[n:]), "original exit") + first = len(word["program"]) + forms.update({first + r: rows[r] for r in range(n)}) + return Network(first, word["initial"], word["final"], moves, forms) + + +def coefficients(entries): + result = {k: rational(v) for k, v in entries} + need(len(entries) == len(result) and all(result.values()), "sparse coefficient list") + return result + + +def pivot(net, edit): + drop, lead = edit["remove"], edit["pivot"] + combination = coefficients(edit["combination"]) + sender = coefficients(edit["sender"]) + side = coefficients(edit["receiver"]) + need(lead in combination and drop in net.moves and lead in net.moves, "pivot slots") + _, middle = net.moves[drop] + old, destination = net.moves[lead] + uses = {m: row[drop] for m, row in net.forms.items() if drop in row} + need(old == middle and combination.keys() <= uses.keys(), "pivot combination") + need(all(net.moves.get(m) == (middle, destination) for m in uses), "shared destination") + aggregate = {} + for m, weight in combination.items(): + add_scaled(aggregate, net.forms[m], weight) + response = aggregate.get(drop, 0) + need(response, "zero pivot response") + + forms = net.forms.copy() + del forms[drop] + forms[lead] = sender + for m, weight in uses.items(): + if m != lead: + residual = net.forms[m].copy() + add_scaled(residual, aggregate, -Fraction(weight, response)) + need(drop not in residual, "uncancelled transfer") + forms[m] = residual + + combined = {lead: 1} + add_scaled(combined, side, -1) + recovered = {} + for m, weight in uses.items(): + if m == lead: + row = {k: -v / combination[lead] for k, v in combination.items() if k != lead} + else: + row = {m: 1} + add_scaled(row, combined, Fraction(weight, response)) + recovered[m] = row + for k, row in list(forms.items()): + affected = row.keys() & recovered.keys() + if affected: + new = {i: v for i, v in row.items() if i not in affected} + for i in affected: + add_scaled(new, recovered[i], row[i]) + forms[k] = new + moves = net.moves.copy() + del moves[drop] + moves[lead] = (edit["source_chart"], destination) + return Network(net.first_output, net.initial, net.final, moves, forms) + + +def networks(word): + parent = fold(word) + net = parent + receipts = [] + for edit in read(HERE / "PIVOTS.json"): + direction = edit["direction"] + need(direction in ("forward", "transpose"), "pivot direction") + if direction == "transpose": + net = net.transpose() + before = len(net.moves) + net = pivot(net, edit) + if direction == "transpose": + net = net.transpose() + net.schedule() + need(len(net.moves) == before - 1, "paid slot count") + receipts.append([direction, edit["remove"], edit["pivot"], len(net.moves)]) + return parent, net, receipts diff --git a/research/p104-banked-chart595-split/engines/caller/reference_caller.py b/research/p104-banked-chart595-split/engines/caller/reference_caller.py new file mode 100644 index 0000000000..945c27d8c4 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/reference_caller.py @@ -0,0 +1,129 @@ +"""Replay the signed caller over the Gaussian group ring and price its actual entries.""" +from collections import Counter +from fractions import Fraction +from functools import cache +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from network import main_roles, need, rational + + +def divided(value, denominator): + quotient, remainder = divmod(value, denominator) + need(remainder == 0, "caller grid remainder") + return quotient + + +def caller_replay(caller, word): + stages = caller["stages"] + cs = 2025 + height = 9 + unit = cs << height + zero = (0,) * stages + rows = [{(r, 0, zero): (unit, 0)} for r in range(caller["roles"])] + peak = unit + checks = 0 + paid = Counter() + targets = Counter() + uses = Counter() + stages_seen = [] + types = caller["types"] + need(types["A"]["ports"] == word["hosted"]["Dports"] and sorted(types["A"]["ports"] + types["B"]["ports"]) == list(range(len(word["ports"]))), "port allocation") + need(9 + 8 * stages == caller["ambient_rank"] <= 153, "caller geometry") + role_sets = {name: set(range(ty["offset"], ty["offset"] + ty["roles"])) for name, ty in types.items()} + need(role_sets["A"].isdisjoint(role_sets["B"]) and role_sets["A"] | role_sets["B"] == set(range(len(rows))), "type owners") + + @cache + def shifted(exponents, shift): + exponents = list(exponents) + for k in shift: + exponents[k - 1] += 1 + return tuple(exponents) + + def term(row, ar=1, ai=0, denominator=1, phase=0, shift=()): + nonlocal peak, checks + out = {} + for (r, q, powers), (x, y) in row.items(): + u, v = ar * x - ai * y, ar * y + ai * x + if denominator != 1: + u, v = divided(u, denominator), divided(v, denominator) + checks += 1 + out[r, (q + phase) % 4, shifted(powers, shift) if shift else powers] = (u, v) + peak = max(peak, sum(abs(x) + abs(y) for x, y in out.values())) + return out + + def plus(a, b): + nonlocal peak + out = a.copy() + for k, (u, v) in b.items(): + x, y = out.get(k, (0, 0)) + if x + u or y + v: + out[k] = (x + u, y + v) + else: + out.pop(k, None) + peak = max(peak, sum(abs(x) + abs(y) for x, y in out.values())) + return out + + for event in caller["events"]: + ty = event[0] + if ty == "J": + _, stage, (x, y, u, v), (a, b, alpha, beta) = event + need(stage == len(stages_seen) + 1 and alpha == "-1" and beta == "1/2" and types["A"]["alpha2"] == "-1", "joint coefficients") + need(len({x, y, u, v}) == 4 and {x, y, u, v} <= role_sets["A"] and a != b and {a, b} <= role_sets["B"], "joint owner alias") + stages_seen.append(stage) + rows[y] = plus(rows[y], term(rows[x], phase=-1)) + rows[u] = plus(rows[u], term(rows[v], -1, phase=1)) + r, s = rows[a], rows[b] + rows[a] = plus(r, term(s, -1, phase=1)) + rows[b] = plus(term(s, denominator=2), term(r, denominator=2, phase=-1)) + for role in (x, y, u, v, a, b): + rows[role] = term(rows[role], shift=(stage,)) + continue + _, op, r, *args = event + need(r in role_sets[ty], "local caller owner") + count = len(types[ty]["ports"]) + uses[op] += count + if op in ("ADD", "SWAP", "QUERY"): + need(args[0] in role_sets[ty] and args[0] != r, "caller donor") + if op == "SWAP": + s = args[0] + rows[r], rows[s] = rows[s], rows[r] + elif op == "QUERY": + s, q = args + need(q in (-1, 1), "query sign") + rows[r] = plus(rows[r], term(rows[s], phase=q)) + paid[1] += count + elif op in ("SCALE", "ADD"): + amount = rational(args[-1]) + if op == "SCALE": + rows[r] = term(rows[r], amount.numerator, denominator=amount.denominator) + else: + rows[r] = plus(rows[r], term(rows[args[0]], amount.numerator, denominator=amount.denominator)) + elif op == "LAMBDA": + sign = args[0] + need(sign in (-1, 1), "lambda sign") + original = rows[r] + rows[r] = plus(term(original, 1, sign, 2), term(original, 1, -sign, 2, phase=2)) + else: + need(op in ("IDLE_ONE", "IDLE_ODD"), "caller operation") + block = tuple(args[0]) + need(len(set(block)) == len(block) and all(1 <= k <= stages for k in block), "idle stages") + phase = args[1] if op == "IDLE_ODD" else 0 + need(op != "IDLE_ODD" or phase in (-1, 1), "idle sign") + rows[r] = term(rows[r], phase=phase, shift=block) + paid[8 * len(block) + phase % 2] += count + need(stages_seen == list(range(1, stages + 1)), "all native calls") + for ty in types.values(): + for offset, (phase, coefficient_phase, *powers) in enumerate(ty["diagonal"]): + r = ty["offset"] + offset + need(coefficient_phase == 0 and len(powers) == stages and set(powers) <= {0, 1}, "positive root boundary") + need(rows[r] == {(r, phase % 4, tuple(powers)): (unit, 0)}, "complete signed caller endpoint") + rank = 8 * sum(powers) + phase % 2 + need(rank > 0 and any(powers), "empty root credit") + targets[rank] += len(ty["ports"]) + return dict(paid=dict(paid), targets=dict(targets), uses=dict(uses), calls=stages, + dyadic_height=height, odd_scale=cs, peak_scaled_mass=str(Fraction(peak, 2**height)), + exact_preproduct_divisions=checks, root_owners=sum(targets.values()), + fresh_helpers=stages * (word["public"] - len(main_roles(word)))) diff --git a/research/p104-banked-chart595-split/engines/caller/selected-bit-ambient.json b/research/p104-banked-chart595-split/engines/caller/selected-bit-ambient.json new file mode 100644 index 0000000000..cd19f356a5 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/selected-bit-ambient.json @@ -0,0 +1,98 @@ +{ + "name": "bit-ambient", + "command": [ + "/usr/local/bin/python3.12", + "-I", + "-B", + "docs/research/pr-intake-evidence/pr7000-admission/check_bit_ambient.py" + ], + "base": "17469fff78c22941280f04d39dc5a1faee09c840", + "started_at": "2026-11-10T13:34:04.485882+00:00", + "exit_code": 0, + "wall_seconds": 0.26789799984544516, + "peak_sampled_descendant_kib": 1600, + "stop": null, + "limits": { + "seconds": 30, + "descendant_kib": 1048576, + "sampling_seconds": 0.2, + "serial": true + }, + "python": "3.12.8 (v3.12.8:2dc476bcb91, Dec 3 2024, 14:43:19) [Clang 13.0.0 (clang-1300.0.29.30)]", + "platform": "macOS-26.6.2-arm64-arm-64bit", + "source_sha256": { + "research/shared-wire-split-composition/native-accounting.json": "ec4f2657a6c172a16c68e958e865ef7bf5217a47814fb506e6e144d19daeaebc", + "research/shared-wire-split-composition/INDEPENDENT-NOTICE.md": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "research/shared-wire-split-composition/INDEPENDENT-SOURCES.json": "dced1457df5230466ba6202fd6d4595bc2b7fb2a65302806bf2720b1837ff350", + "research/shared-wire-split-composition/SOURCES.json": "c66f8049a4e4bf9890d5f7d9f386de2c4897490f8f5e48edcc69a54b9333d103", + "research/shared-wire-split-composition/NATIVE-INPUTS.json": "9bb6c1567783661334d6c1d23f715ce5635cbbb513678819ab9e020a34c7e4c0", + "research/shared-wire-split-composition/VERIFY.json": "f27f759db9707cf5e8e4a331ca509401186c994ed661a9f4b480961642d5544f", + "research/shared-wire-split-composition/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "research/shared-wire-split-composition/INDEPENDENT-REVIEW.md": "c24c7ee899c258420e281afe4e6dfcd890adf552b469822a38c13898bcd2a936", + "research/shared-wire-split-composition/compose.py": "f057d659243575529cfd89a5534c8f333d0716897ee495bfe3de67eeb0970c20", + "research/shared-wire-split-composition/interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "research/shared-wire-split-composition/reproduce.py": "9b9fca18bf28c627ff29ba06048503af0cb5f27a4ffabeadffed50e0678c96c9", + "research/shared-wire-split-composition/FULL-RESULT.json": "d9ba709fa5dcefffe3f3abdcf34600ce188224703cfd743e6db8b58ba4816cb7", + "research/shared-wire-split-composition/TASK.json": "60e22522e87684c068f32c8ec687305f2be934f2800e2f10a55483bff02506a1", + "research/shared-wire-split-composition/VALIDATION.md": "582d71db76db5ac7bcfb2f9a962479d1a76d321c7536f08347f16fe01ec9d52e", + "research/shared-wire-split-composition/chart_delta.json": "881bc1bb93e1738aa9269f41af6db0ef80b377920aed6f91e79b9b6ed70e5deb", + "research/shared-wire-split-composition/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "research/shared-wire-split-composition/NOTICE": "da12736e2e824167ff56f2ecb623a5f88f75a270410360890f61dffc33bab249", + "research/shared-wire-split-composition/chart_delta.py": "865f1e526663cb6e53092db66b5fdabae5ed37a0afe7520bdbe1bb21d0266d38", + "research/shared-wire-split-composition/README.md": "f8d540c9f505d5856416897c231bcb9186f873f6148b68b9f23fedac70313831", + "research/shared-wire-split-composition/split_build.py": "54f80d3c557175acfc2cf13059f00f004be3f18fb6c76946e05efe8ca8b5f33a", + "research/shared-wire-split-composition/independent_construction.py": "1e8d66885afce4181ff6195c31aa3445886410b13faf1c8c7321f3ae7fc9554e", + "research/shared-wire-split-composition/precision_replay.py": "850d9098c5946ab27ef5228acc54d59df2196e72259d3e21588ec0c319c8f5ee", + "research/shared-wire-split-composition/VERIFY-INDEPENDENT.json": "820992b885fffaee53854be2c0200b7d4bf96ec678c305b1eff3e6be1364b3e3", + "research/shared-wire-split-composition/CONSTRUCTION-REVIEW.md": "038392a7c5f1705b1978bcc35f9dc889d4ccd457a1f32c384a500c81259e978b", + "research/shared-wire-split-composition/build_wire.py": "b0e1f38dd70f7c1a6f4d9ec8289c76747f558dc8e1ba44b22dd58ff82870e6bd", + "research/shared-wire-split-composition/full_verify.py": "08134736288c3a1067d61185f195c645aa2624051b45c808b2447360d2d20ae0", + "research/shared-wire-split-composition/verify.py": "d2a291f8f4ea6dce51648ba44614d655b47e8e38d235458ac64924af7552b57b", + "research/shared-wire-split-composition/CONSTRUCTION.md": "40249ccc0854393aa3a6ff14845879407ebeb0bc365f14c49ab155489addb436", + "research/shared-wire-split-composition/frozen/verify_host3_odd.py": "e75ad2096ba2587d1dc9c8982b2c2eb7c6fd2636a80adcd943314ef2cf6fd258", + "research/shared-wire-split-composition/frozen/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "research/shared-wire-split-composition/frozen/physical.py": "4e995d1158033d83bf69b671f23dc7924d66edbbe07623ba063ba7421234ea20", + "research/shared-wire-split-composition/frozen/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "research/shared-wire-split-composition/data/caller.json": "3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e", + "research/shared-wire-split-composition/data/split759.proof.json": "35f8b64110957b6f51fd8dd0e53326c466e2ffeecf9254012f0e55a5275bea81", + "research/shared-wire-split-composition/data/bit-admission.json": "a46b6c6040f75184cab5467656811ad988c216e3bc8e44d595a5015b6e49620b", + "research/shared-wire-split-composition/data/split759_450.proof.json": "78b25749911131b50bb4565b17a06d08ccf4b511ec05e598e7f146c96aed4174", + "research/shared-wire-split-composition/data/wh_6937.json.gz": "25326dac562fa07edd28a6daf302de0c27f5f2e82f610eaf3671d39575f8dbea", + "research/shared-wire-split-composition/data/final.json.gz": "2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883", + "research/shared-wire-split-composition/data/extra_wire_spec.json": "b065bd6c3b0762bc90f5cd0a0c1fb6b9664edefc5a1becbff6734a72ab7698d8", + "research/shared-wire-split-composition/data/main_6936.json.gz": "273e81f176f001684b1fa3eb857992bf58b54748004fcfe806b83adb48d2cc00", + "research/shared-wire-split-composition/retained/query-only-precision-envelope/envelopes.py": "783da6b5b450fc07434946cb9ec86070dfee01df6b5fa1c385cb024def2c9a9f", + "research/shared-wire-split-composition/retained/query-only-precision-envelope/source_binding.py": "624c459311c58f3847b7713b818bfd340153abf42919f02ac9aa8892ed52a2bd", + "research/shared-wire-split-composition/retained/odd-native-common-grid/independent_bounds.py": "198521def614fe78fa728f1dde2b7fb820c0c0e0ac3ad0c9224dccbf51eac0d5", + "research/paired-query-only-bit/SOURCES.json": "1037b0a2d0d60d998630d0d6faf80bc8f2d4351ba1a50dcdfa9f7e86e44019fd", + "research/paired-query-only-bit/PROOF.md": "3c32eb61bec108aceee3d2d676c2c115391f5d0f9845ac209214bb58ef4ebee4", + "research/paired-query-only-bit/INDEPENDENT-REVIEW.json": "e44a7204dcac835817e89be12fc0fb33d981c99ed6ebc3e33b48e49d2fdaeeb3", + "research/paired-query-only-bit/VERIFY.json": "774280bdef625e08e3f854a0f886f65b4283db17fcb397efe7556f97082cbaad", + "research/paired-query-only-bit/check.py": "460ed9a77d66264b00c31d0a7f8dab1db9aab21ec4cc0eaf0452bd4be4ef585e", + "research/paired-query-only-bit/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "research/paired-query-only-bit/EFREE-CALLER.json.gz": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b", + "research/paired-query-only-bit/EFREE-RESULT.json": "a46b6c6040f75184cab5467656811ad988c216e3bc8e44d595a5015b6e49620b", + "research/paired-query-only-bit/TASK.json": "4c76a0988a076598a22473b2849f062116e09613939a4a4fb672e5792c5c7906", + "research/paired-query-only-bit/VALIDATION.md": "1cc6f940cf4ce1cc6c54c9d07fd2574c1bdbb543097eede31ad78836b1918903", + "research/paired-query-only-bit/NOTICE": "8c73eaf46327f01b4cfc18640b5e5f552648fc5e4427cbccd42af5e7ecd3b732", + "research/paired-query-only-bit/README.md": "cfdb5e13f1b7571a76f6d645eb3bcc703e545e55a34a6fdc08a8e6f96ba1a9a8", + "research/paired-query-only-bit/INPUT-PINS.json": "84007e990d41cf4aac3cd9c1a08984b895fff20acdefc99d464262ec2ad694d4", + "research/paired-query-only-bit/independent/bit_review.py": "6db4b1657bac033ed526fb714b4830b51ae2260d2ce11c3ef0b9e907cadd47db", + "research/paired-query-only-bit/independent/interval_gate.py": "8dc2bc4c64cba3f83c664373984a075f1a14b4d53958084091345c8cab189dec", + "research/paired-query-only-bit/data/selected_review.md": "8bd158b8ef68202000f167b9b78db0b31531b5b067b5cbd91b5bf35f3ddd1ab6", + "research/paired-query-only-bit/data/selected_record.json": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa", + "research/paired-query-only-bit/data/selected_claim.json": "9cee8a1304fa893be3d3b641eda42fdd9b2fd6a5ac2124fb891de7a1a5e8d92e", + "research/paired-query-only-bit/data/query_only_6980.json": "3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e", + "research/paired-query-only-bit/data/6980_PROOF.md": "0cede285a98dd61b78020651202729c6d9cd16fb078ee5fe9a01aa2400df5432", + "research/paired-query-only-bit/data/6834_result.json": "5c3dd8b954de767e41ec7b3d51895ed8c28968d39cb6af57a84c01683f5780ae", + "research/paired-query-only-bit/retained/audit_binary_mixed.py": "bb6616dbf536acf10163b8fff65ebfa69d01dfdeda3c0ead388c03377361b298", + "research/paired-query-only-bit/retained/NOTICE": "620e4ec6f537fa1c071f019ac92fa0e4eec8ab487c811e84153292b981de0424", + "research/paired-query-only-bit/retained/inputs/independent_interval.py": "9293f567aa4afd9b4e618f1cddd3cf66eea51c5e194e3c578e7a8f4db6e04a57", + "research/paired-query-only-bit/retained/inputs/BIT-NATIVE-WORD.json.gz": "51203e7fc75ba10bd3ac3f8e675759f47e13d262bea66b6600d1e515095cad78", + "research/paired-query-only-bit/retained/inputs/credited_trim.py": "fcff17fdd3108be68761fbde0fcbfe218be166cf518c99f7163e60d53ab785d9", + "research/paired-query-only-bit/retained/inputs/inputs/exact_arithmetic.py": "0ce7e7137422d5ffeda22085c81fa88471bbe963100fdad62e659f1e3bf89326" + }, + "source_unchanged": true, + "log": "bit-ambient.log", + "log_sha256": "90e8b8bba405ec40d89c6f522cceb48fe873e51527f39a88d0c61b4f1990f98e" +} diff --git a/research/p104-banked-chart595-split/engines/caller/selected-claim.json b/research/p104-banked-chart595-split/engines/caller/selected-claim.json new file mode 100644 index 0000000000..c9b816f844 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/selected-claim.json @@ -0,0 +1,65 @@ +{ + "schema": "proposed-conditional-integer-multiplication-claim/1", + "kappa": "363005817/100000000000", + "source_result": "research/shared-wire-split-composition/FULL-RESULT.json", + "uniform_templates": [ + { + "family": "complex", + "rank_encoding": "2^14174600000000000000", + "saving": "181502908503/50000000000000", + "ambient": 153 + }, + { + "family": "BIT before cover", + "rank_encoding": "2^296630000000000", + "saving": "38525299/10000000000", + "ambient": 134 + } + ], + "covered_BIT_saving": "19262649/5000000000", + "ordinary_BIT_saving": "4815653101/1250000000000", + "admitted_BIT_saving": "12039/3125000", + "complex_BIT_premise": "376669/100000000", + "BIT_bootstrap": [ + "17/5000", + "38507/10000000", + "12039/3125000" + ], + "nine_outer_savings": { + "main_transform": "36300581700299636994182997/10000000000000000000000000000", + "global_coordinate_router": "90751454251/25000000000000", + "fused_gaussian": "36300581700398910982548991/10000000000000000000000000000", + "group_bit_router": "9075145425124727745637247/2500000000000000000000000000", + "group_scans": "49999999999999/50000000000000", + "boundary_algebraic_matrix": "36300581700399636994182997/10000000000000000000000000000", + "sparse_union_movement": "4098800581700399636994182997/10000000000000000000000000000", + "polynomial_products": "99999999999999/100000000000000", + "microbox_face_corrections": "1925000000000001/25000000000000" + }, + "outer_formula_source": "research/shared-wire-split-composition/interval_gate.py", + "limiting_outer_saving": "36300581700299636994182997/10000000000000000000000000000", + "strict_limiting_slack": "299636994182997/10000000000000000000000000000", + "assumptions": [ + { + "id": "native_all_columns", + "statement": "Retained native operators, phase conventions, spectators and whole-job adapters work at every positive column multiplicity." + }, + { + "id": "owned_erasure", + "statement": "Owned streams and suspended centers obey the retained allocation, erasure and ownership contracts." + }, + { + "id": "compiler", + "statement": "The finite mixed-target compiler and chronological product, completion and splitting satisfy the retained uniform closure contract." + }, + { + "id": "precision_tape", + "statement": "Retained fixed-tape movement and precision/storage prescriptions apply to the new fixed finite template." + }, + { + "id": "analytic_recovery", + "statement": "Analytic decomposition, fine-prime avoidance and exact integer recovery follow the retained upstream/outer framework." + } + ], + "scope": "Conditional shared-native mixed caller with exact common-grid scalar service; five inherited assumptions. No materialized uniform word, complete multiplier, independent human proof or formal-kernel acceptance." +} diff --git a/research/p104-banked-chart595-split/engines/caller/selected-validation.json b/research/p104-banked-chart595-split/engines/caller/selected-validation.json new file mode 100644 index 0000000000..7291ce5ab9 --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/selected-validation.json @@ -0,0 +1,223 @@ +{ + "schema_version": 1, + "status": "admitted_conditional", + "base": "f16923d466a6aba912299882e0545564d2ba7bb2", + "source_heads": { + "7000": "93effe2a135bf57b9e484cb630d8dd057159aec9", + "7001": "d777f3a0aa2878bea0478918923dabcf86b9878b" + }, + "selected_frontier_changed": true, + "selected_kappa": "0.00363005817", + "previous_kappa": "0.003125804", + "registered_replays_complete": true, + "all_jobs_finished": true, + "receipts": [ + { + "name": "bit-primary", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/bit-primary.json", + "sha256": "2bd4ae504350b8189e5a25c8e55212666ad15e16e3d85a824691513f0f498b11", + "wall_seconds": 13.74172916682437, + "peak_sampled_descendant_kib": 32544, + "exit_code": 0 + }, + { + "name": "bit-independent", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/bit-independent.json", + "sha256": "16088896d2b49bb81d17b778f162e41aee988188d79e76bdffe967ac0e9d40ff", + "wall_seconds": 0.4980977922677994, + "peak_sampled_descendant_kib": 34128, + "exit_code": 0 + }, + { + "name": "complex-primary", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/complex-primary.json", + "sha256": "fab9a2ead4a6212f3bc262a8da1019a623c420af02a38edb63807516b5cee8bf", + "wall_seconds": 99.33472337480634, + "peak_sampled_descendant_kib": 241472, + "exit_code": 0 + }, + { + "name": "complex-independent", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/complex-independent.json", + "sha256": "cbecd914e3a231b915ab4826a0046c0118fe1c800f2cca5a5c1e9586aa87d7e7", + "wall_seconds": 84.73606283264235, + "peak_sampled_descendant_kib": 110064, + "exit_code": 0 + }, + { + "name": "complex-physical", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/complex-physical.json", + "sha256": "fab7f7e00d40a09508a5bee285dc8fb33f06c92f48ed86e1f99affc35207627c", + "wall_seconds": 80.88798883417621, + "peak_sampled_descendant_kib": 699600, + "exit_code": 0 + }, + { + "name": "owned-factorizations", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/owned-factorizations.json", + "sha256": "938d1791dc320d7fa0bdb44ef318641960798823cd66c4074a037bb9c7682bd9", + "wall_seconds": 22.427095042075962, + "peak_sampled_descendant_kib": 102480, + "exit_code": 0 + }, + { + "name": "lambda-algebra", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/lambda-algebra.json", + "sha256": "bc871b73eaf56318c8be84b117c6f8e7eed8db4e0f9d0ab729eeb5d425a4a1d7", + "wall_seconds": 0.5506485840305686, + "peak_sampled_descendant_kib": 17728, + "exit_code": 0 + }, + { + "name": "bit-ambient", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/bit-ambient.json", + "sha256": "437ad2f9e7956e7f2b477b546f53a6c8cfa0567e207024300e9a7e58d3c0202c", + "wall_seconds": 0.26789799984544516, + "peak_sampled_descendant_kib": 1600, + "exit_code": 0 + }, + { + "name": "bit-ambient-optimized", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/bit-ambient-optimized.json", + "sha256": "977abde2a364af1a0153033f759cc2d90ea79b6f266bcdbb0830c52d22976ded", + "wall_seconds": 0.26918487483635545, + "peak_sampled_descendant_kib": 2272, + "exit_code": 0 + }, + { + "name": "interface-bindings", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/interface-bindings.json", + "sha256": "e3313b43b32169fba878600b43a722c51cce770f685f151433a7addeff25c3d3", + "wall_seconds": 0.28022624971345067, + "peak_sampled_descendant_kib": 1920, + "exit_code": 0 + }, + { + "name": "interface-bindings-optimized", + "receipt": "docs/research/pr-intake-evidence/pr7000-admission/interface-bindings-optimized.json", + "sha256": "030311e1fcdf372c059545a8c355cf09b4931fda34b7759333406f14d837b2bd", + "wall_seconds": 0.28489804081618786, + "peak_sampled_descendant_kib": 4832, + "exit_code": 0 + }, + { + "name": "application", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/application.json", + "sha256": "b6ca671c7101674a40a2c30fdea0ec95f08f9b61bbc9a0926d38da9a6942e14b", + "wall_seconds": 49.84868695773184, + "peak_sampled_descendant_kib": 105232, + "exit_code": 0 + }, + { + "name": "application-optimized", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/application-optimized.json", + "sha256": "f8989171cd7561dccd1ce0db3a7cb119640b965d7f6212d21e9f2d7f16590365", + "wall_seconds": 38.167422249913216, + "peak_sampled_descendant_kib": 106320, + "exit_code": 0 + }, + { + "name": "scalar", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/scalar.json", + "sha256": "d3eb6cf49dd74cc78ea85703236ec1e31a84b6c52e5a42311a65b7a19faeb669", + "wall_seconds": 10.96639662515372, + "peak_sampled_descendant_kib": 47040, + "exit_code": 0 + }, + { + "name": "scalar-optimized", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/scalar-optimized.json", + "sha256": "13e86b7a72e98e8189c964969b43fb055291f5b2efa92fc7ca63e5bf6b8324bb", + "wall_seconds": 15.716162957716733, + "peak_sampled_descendant_kib": 45600, + "exit_code": 0 + }, + { + "name": "native-catalogue-0", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/native-catalogue-0.json", + "sha256": "60911939b399975817334f2ab0e33e1b3d15ac937baab1bc82573f18c761766e", + "wall_seconds": 222.34261462511495, + "peak_sampled_descendant_kib": 58640, + "exit_code": 0 + }, + { + "name": "native-catalogue-1", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/native-catalogue-1.json", + "sha256": "d7cb2b5ac7ebdfdde129877916bded5c5dfc386316b6395dbe58ebbefdd7c69d", + "wall_seconds": 249.59168437542394, + "peak_sampled_descendant_kib": 58624, + "exit_code": 0 + }, + { + "name": "native-catalogue-2", + "receipt": "docs/research/pr-intake-evidence/pr7000-application/native-catalogue-2.json", + "sha256": "2e1f8fd8e4504b2495d07488bf9831e913c706a3e94d1c4de3c1866c585cacaa", + "wall_seconds": 338.04289187537506, + "peak_sampled_descendant_kib": 59712, + "exit_code": 0 + } + ], + "historical_input_aliases": { + "cc723faaf0d182693f69d51ad8a5b3d483103e4a8d0e2ecbbcb5e1508e77404e": "docs/research/pr-intake-evidence/pr7000-application/orchestration-initial.txt", + "8b8067cfd88d785a74c68e8b8e519b3b90c2122298aa3c1b29cb51efea164b63": "docs/research/pr-intake-evidence/pr7000-application/orchestration-monolithic.txt" + }, + "nonexecuted_inventory_changes": { + "scalar": { + "docs/research/pr-intake-evidence/pr7000-application/check_application.py": "c44411369b8bfa66ed2865b0be15ccb45b7410d0a34d2fa24b6fe0fc6a08b17d" + }, + "scalar-optimized": { + "docs/research/pr-intake-evidence/pr7000-application/check_application.py": "c44411369b8bfa66ed2865b0be15ccb45b7410d0a34d2fa24b6fe0fc6a08b17d" + } + }, + "nonexecuted_inventory_changes_reason": "The scalar harness inventoried check_application.py but did not execute or import it. Later changes added application controls; both application modes then passed at its current hash. Both exact scalar executions used the unchanged current scalar checker. Orchestration snapshots retain the earlier harness bytes.", + "prior_review_checker_sha256": { + "check_bit_ambient.py": "e8dabd0285c2ea84472a588a0f6f56e0a7865535ba5f0109db56b08cb7e79886", + "check_interface_bindings.py": "24f5a3c1660b2490981c3af2bd00791c95a0eae373b20db08854d61362c5e08f" + }, + "failed_attempt": { + "receipt": "docs/research/pr-intake-evidence/pr7000-application/native-catalogue.json", + "sha256": "aed71658d6b85b37c44bfb961c9f56c7d72e625b9d5fcc8b492b75d17ce4aa6c", + "original_checker": "docs/research/pr-intake-evidence/pr7000-application/native-catalogue-monolithic.txt", + "scope": "600-second monolithic timeout; no successful coverage reused. Disjoint bounded parts replace it." + }, + "coverage": [ + "All five registered candidate/BIT checks reused at unchanged scientific input hashes.", + "Current complete native catalogue: 3057 maps, 104 main boundary pairs, exact signed Pauli action and absolute Gaussian phase.", + "All 14400 complex native contacts and current paid-owner lists; all 636 BIT frames and 111 main charts.", + "Exact fixed-rational scalar reference normal/optimized; common-grid and fixed-tape scan application supplied in the review.", + "Current root/complete-spectator layouts, owned lifetimes, full cost units and fresh thresholds applied under the same five assumptions." + ], + "remaining": [], + "retained_assumptions": [ + { + "id": "native_all_columns", + "statement": "Retained native operators, phase conventions, spectators and whole-job adapters work at every positive column multiplicity." + }, + { + "id": "owned_erasure", + "statement": "Owned streams and suspended centers obey the retained allocation, erasure and ownership contracts." + }, + { + "id": "compiler", + "statement": "The finite mixed-target compiler and chronological product, completion and splitting satisfy the retained uniform closure contract." + }, + { + "id": "precision_tape", + "statement": "Retained fixed-tape movement and precision/storage prescriptions apply to the new fixed finite template." + }, + { + "id": "analytic_recovery", + "statement": "Analytic decomposition, fine-prime avoidance and exact integer recovery follow the retained upstream/outer framework." + } + ], + "reuse_invalidation": "Any changed executed checker, source data, imported engine, occurrence recipe or application premise invalidates its affected coverage. Orchestration-only historical aliases and the scalar job's nonexecuted application checker are explicit. The previous selected record is preserved byte-for-byte as frontier6030.json.", + "scope": "Maintainer conditional application admission; finite checks and a written specialization, not a complete multiplier, independent human proof or formal-kernel acceptance.", + "review_files_sha256": { + "PROOF-REVIEW.md": "4501502c2ceb9759b20372435fe4beb51082c5a5e2910c1fd5dbe6edca415055", + "SOURCES.json": "8fa7eb44bcc8c7d442848b9f51e9b5e26413a433ebc382f302c350981871265c", + "check_application.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "check_exact_scalar.py": "f83e506617a92027b3ff82f28bc043e34e890951eb7f3bd930e08c6c02a04a9d", + "check_native_catalogue.py": "6120e1ea1e07eeba757694d209437a38f121b0a377cc466889a30fa52c561472", + "replay_bounded.py": "ed8324a1f126d3282e312ecc252e4f4847ec50aed9e8b70d00b98d4b9ab96a16" + } +} diff --git a/research/p104-banked-chart595-split/engines/caller/upstream_application.py b/research/p104-banked-chart595-split/engines/caller/upstream_application.py new file mode 100644 index 0000000000..1a6d358cbe --- /dev/null +++ b/research/p104-banked-chart595-split/engines/caller/upstream_application.py @@ -0,0 +1,369 @@ +#!/usr/bin/env python3 +"""Exact-source caller geometry, occurrence allocation and rational BIT frames. + +No contributor scientific module is imported. Complex phase-polynomial +method credited to the retained fragment physical audit; here coefficients +of the full degree-two polynomial are constructed instead of probing it. +OpenAI Codex assistance for Douglas Colkitt. Apache-2.0. +""" +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import gzip +import json + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[3] + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def read(path): + raw = (ROOT / path).read_bytes() + pin = next(p for p in json.loads((HERE / 'SOURCES.json').read_text())['files'] + if p['path'] == path) + need(sha256(raw).hexdigest() == pin['sha256'], 'source bytes: ' + path) + return json.loads(gzip.decompress(raw) if path.endswith('.gz') else raw) + + +def digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(',', ':')).encode()).hexdigest() + + +def bits(n): + result = [] + while n: + a = n & -n + result.append(a) + n ^= a + return result + + +def dot(a, b): + return (a & b).bit_count() % 2 + + +def terms(items): + c = Counter() + for v, a in items: + c[v] += a + return {v: a % 4 for v, a in c.items() if v and a % 4} + + +def sub(a, b): + return terms(list(a.items()) + [(v, -c) for v, c in b.items()]) + + +def polynomial(t): + # parity(sum x_i) = sum x_i - 2 sum_{i 0, 'positive complete helper job') + T[rank] += 1 + need(len(mapping) == len(set(mapping.values())) == word['public'], 'injective native inputs') + for r in range(word['public'], word['public']+word['owned_fields']): + mapping[r] = ('owned', ci, r-word['public']) + need(len(set(mapping.values())) == word['public']+51, 'owned/public separation') + for ni, move in native_moves: + _, r, start, end, owned = move + rank = abs(len(word['frames'][end])-len(word['frames'][start])) + need(owned == (r >= word['public']) and rank > 0, 'actual paid owner class') + P[rank] += 1 + occurrences.append([ci, ni, list(mapping[r]), rank, start, end]) + for pi, q in enumerate(word['ports']): + transform = route(q, by_q[q], stage) + before_axes = [1 << j for j in range(9+8*(stage-1))] + after_axes = [1 << j for j in range(9+8*stage)] + spectator = [1 << j for j in range(9, 9+8*stage)] + x0 = terms((a, 1) for a in before_axes) + y0 = terms(list(x0.items())+[(q, -1)]) + x1 = terms((a, 1) for a in after_axes) + y1 = terms(list(x1.items())+[(q, -1)]) + nx0 = terms([(a, 1) for a in spectator]+[(q, 1)]) + ny0 = terms((a, 1) for a in spectator) + nx1 = terms((a, 1) for a in spectator+[1 << j for j in range(9)]) + ny1 = terms(list(nx1.items())+[(q, -1)]) + shifts = [boundary(a, b, transform) for a, b in + ((x0, nx0), (y0, ny0), (nx1, x1), (ny1, y1))] + body = terms((1 << j, 1) for j in range(9+8*(stage-1), 9+8*stage)) + for actual, expected in ((sub(x1,x0),body), (sub(y1,y0),body), + (sub(y1,x0),terms(list(body.items())+[(q,-1)])), + (sub(x1,y0),terms(list(body.items())+[(q,1)]))): + need(not polynomial(sub(actual,expected)), 'all four contact operators') + need(polynomial(sub(terms([(q,1)]),terms([(q,-1)]))), 'wrong query orientation rejected') + phase_records.append([ci,pi,shifts,2 if pi in second else 1]) + else: + ty, op, r, *a = e + kind = caller['types'][ty] + used = [r] + ([a[0]] if op in ('ADD','SWAP','QUERY') else []) + need(all(kind['offset'] <= x < kind['offset']+kind['roles'] for x in used), 'caller owners stay in type') + need(len(used) == len(set(used)), 'distinct scalar/query owners') + if op in ('QUERY','IDLE_ONE'): + if op == 'QUERY': + need(a[1] in (-1,1), 'signed completed query') + rank = 1; query_uses += len(kind['ports']) + else: + selected = a[0] + need(selected and len(selected)==len(set(selected)) + and all(1 <= s <= 18 for s in selected), 'whole idle stage axes') + rank = 8*len(selected); idle_uses += len(kind['ports']) + for pi in kind['ports']: + owner = ['query_scratch',ci,pi] if op == 'QUERY' else ['main',pi,r] + occurrences.append([ci,op,owner,rank]); P[rank] += 1 + elif op == 'LAMBDA': + need(a[0] in (-1,1), 'global normalizer sign') + lambda_uses += len(kind['ports']) + need(stage_order == list(range(1,19)), 'fresh chronological native stages') + for kind in caller['types'].values(): + for diagonal in kind['diagonal']: + qp, zero, *selection = diagonal + need(qp in (-1,0,1) and zero == 0 and len(selection)==18 + and set(selection)<={0,1} and any(selection), 'positive nonempty root endpoint') + rank = abs(qp)+8*sum(selection) + for pi in kind['ports']: + q = word['ports'][pi] + axes = [1 << (9+8*j+k) for j,yes in enumerate(selection) if yes for k in range(8)] + actual = terms([(q,qp)]+[(a,1) for a in axes]) + target = terms((a,1) for a in ([q] if qp else [])+axes) + need(translation(sub(target,actual)) == (q if qp == -1 else 0), 'whole output correction') + T[rank] += 1 + for name, actual in [('P',P),('T',T)]: + need(actual == Counter({int(k):v for k,v in receipt['invoice'][name].items()}), 'independent '+name+' invoice') + need(sum(T.values()) == len(owners), 'every productive target is one actual owner') + need(len(occurrences) == sum(P.values()), 'every paid position retained in order') + return dict(ambient=153, native_calls=18, native_public=1480, fresh_helpers=19440, + productive_fields=len(owners), paid_positions=len(occurrences), + complete_paid_position_digest=digest(occurrences), + native_contact_boundaries=sum(4*r[3] for r in phase_records), + phase_record_digest=digest(phase_records), nonzero_boundary_translations=sum(sum(bool(x) for x in r[2])*r[3] for r in phase_records), + reserved_native_banks=18*51, reserved_serial_query_lambda_bank=1, + query_uses=query_uses, idle_uses=idle_uses, lambda_uses=lambda_uses, + paid=dict(sorted(P.items())), targets=dict(sorted(T.items())), + rank_surplus=sum(r*T[r] for r in T)-sum(r*P[r] for r in P)) + + +def inverse(matrix): + n = len(matrix) + a = [[Q(x) for x in row]+[Q(i==j) for j in range(n)] for i,row in enumerate(matrix)] + det = Q(1) + for j in range(n): + pivot = next((i for i in range(j,n) if a[i][j]),None) + need(pivot is not None, 'rational basis invertible') + if pivot != j: + a[j],a[pivot] = a[pivot],a[j]; det = -det + v = a[j][j]; det *= v; a[j] = [x/v for x in a[j]] + for i in range(n): + if i != j: + v = a[i][j] + a[i] = [x-v*y for x,y in zip(a[i],a[j])] + return [row[n:] for row in a], det + + +def bit_application(word, caller, receipt): + ff = word['frames']; determinants=[]; denominator_witnesses=set() + for label, frame in ff.items(): + B,A = frame['B'],frame['A']; d = frame['dim'] + need(len(B)==d and len(A)==8-d and all(len(v)==8 for v in B+A), 'rational frame dimensions') + need(all(sum(Q(x)*Q(y) for x,y in zip(b,a))==0 for b in B for a in A), 'complement annihilation') + inv, det = inverse(list(zip(*(B+A)))) + determinants.append([label,str(det)]) + denominator_witnesses.add(abs(det.numerator)); denominator_witnesses.add(det.denominator) + for row in inv: + denominator_witnesses.update(x.denominator for x in row) + for row in B+A: + denominator_witnesses.update(Q(x).denominator for x in row) + charts=[] + for port in range(111): + head=ff[str(word['start'][port])]; body=ff[str(word['final'][port+111])] + need(head['dim']==1 and body['dim']==7, 'actual main head/body ranks') + u=head['B'][0] + need(all(sum(Q(x)*Q(y) for x,y in zip(u,v))==0 for v in body['B']), 'main complement') + inv,det=inverse(list(zip(*([u]+body['B'])))) + charts.append([port,str(det)]) + denominator_witnesses.update([abs(det.numerator),det.denominator]) + for row in inv:denominator_witnesses.update(x.denominator for x in row) + P,T=Counter(),Counter(); positions=[]; names={('main',pi,r) for pi in range(111) for r in range(38)} + calls=[] + for ci,e in enumerate(caller['events']): + op=e[0] + if op=='LOCAL': + _,stage,src,dst=e; calls.append(stage) + mapping={i:('main',i,src) for i in range(111)} + mapping.update({i+111:('main',i,dst) for i in range(111)}) + for r in range(222,word['public']): + owner=('helper',ci,r); need(owner not in names,'fresh BIT helper');names.add(owner);mapping[r]=owner + T[abs(ff[str(word['start'][r])]['dim']-ff[str(word['final'][r])]['dim'])]+=1 + need(len(mapping)==len(set(mapping.values()))==659,'injective BIT occurrence') + for r in range(659,659+word['owned_fields']):mapping[r]=('owned',ci,r-659) + for ni,move in enumerate(word['program']): + if move[0]=='MOVE': + _,r,a,b=move;rank=abs(ff[str(a)]['dim']-ff[str(b)]['dim']) + P[rank]+=1;positions.append([ci,ni,list(mapping[r]),rank,a,b]) + elif op=='QUERY': + need(e[1]!=e[2] and 0<=min(e[1:])<=max(e[1:])<38,'BIT query owners') + for pi in range(111):P[1]+=1;positions.append([ci,op,['query_scratch',ci,pi],1]) + elif op=='IDLE_ONE': + _,owner,ss=e;need(ss and len(ss)==len(set(ss)) and all(1<=s<=18 for s in ss),'BIT idle axes') + for pi in range(111):P[7*len(ss)]+=1;positions.append([ci,op,['main',pi,owner],7*len(ss)]) + need(calls==[s for s in range(1,19) for _ in range(2)],'paired native chronology') + for d in caller['diagonal']: + need(d['q']==1 and d['stages'] and len(d['stages'])==len(set(d['stages'])),'BIT positive endpoint') + T[1+7*len(d['stages'])]+=111 + need(P==Counter({int(k):v for k,v in receipt['paid'].items()}) and + T==Counter({int(k):v for k,v in receipt['targets'].items()}),'complete BIT invoice') + need(sum(T.values())==len(names)==19950,'BIT owner count') + return dict(ambient=134, rational_frames=len(ff), rational_main_charts=len(charts), + rational_determinants_digest=digest(determinants), + finite_prime_exclusion_witness_count=len(denominator_witnesses), + finite_prime_exclusion_witness_digest=digest(sorted(denominator_witnesses)), + native_calls=len(calls), fresh_helpers=36*437, productive_fields=len(names), + paid_positions=len(positions), complete_paid_position_digest=digest(positions), + reserved_native_banks=36*word['owned_fields'], reserved_serial_query_bank=1, + rank_surplus=sum(r*T[r] for r in T)-sum(r*P[r] for r in P)) + + +def main(): + p='research/shared-wire-split-composition/' + w,c,r=read(p+'data/final.json.gz'),read(p+'data/caller.json'),read(p+'FULL-RESULT.json') + phases=read('research/p104-two-chain-shared-native/retained/runtime/DATA-PHASES.json') + complex_result=complex_application(w,c,r,phases) + p='research/paired-query-only-bit/' + bw,bc,br=read(p+'retained/inputs/BIT-NATIVE-WORD.json.gz'),read(p+'EFREE-CALLER.json.gz'),read(p+'EFREE-RESULT.json') + bit_result=bit_application(bw,bc,br) + controls={} + def reject(name, action): + try:action() + except ValueError as error:controls[name]=str(error) + else:raise ValueError('negative control accepted: '+name) + alias=deepcopy(c);joint=next(e for e in alias['events'] if e[0]=='J');joint[2][2]=joint[2][0] + reject('same_frame_main_alias',lambda:complex_application(w,alias,r,phases)) + reordered=deepcopy(c);joint=next(e for e in reordered['events'] if e[0]=='J');joint[1]=2 + reject('wrong_stage',lambda:complex_application(w,reordered,r,phases)) + bad_bit=deepcopy(bw);bad_bit['frames']['0']['A'][1]=bad_bit['frames']['0']['A'][0][:] + reject('singular_BIT_spectator_basis',lambda:bit_application(bad_bit,bc,br)) + q=w['ports'][0];basis=next(x for x in phases['recipes'] if x['q']==q)['idle_children'][0]['orthogonal_axes'][:8] + reject('singular_complex_route',lambda:route(q,basis[:-1]+basis[:1],1)) + transform=route(q,basis,1) + before=terms((1<{b}") + return abs(len(frames[b]) - len(frames[a])) + + +def inventory(graph, mains, frames, subspaces): + moves = {k: (a, b) for k, a, b in graph["moves"]} + n = len(graph["initial"]) + require(len(graph["final"]) == n and len(moves) == len(graph["moves"]) == 6142, + "exact physical MOVE occurrence count and native endpoints") + move_pairs, helpers = defaultdict(list), defaultdict(list) + paid_ranks, target_ranks = Counter(), Counter() + for k, pair in moves.items(): + paid_ranks[physical_rank(pair, frames, subspaces)] += 1 + move_pairs[pair].append(k) + for role, pair in enumerate(zip(graph["initial"], graph["final"], strict=True)): + if role not in mains: + target_ranks[physical_rank(pair, frames, subspaces, target=True)] += 1 + helpers[pair].append(role) + return moves, move_pairs, helpers, paid_ranks, target_ranks + + +def verify_cut(parent, child, edit, moves): + first = parent["first_output"] + retired, fresh = edit["retired_role"], edit["fresh_role"] + require(first == child["first_output"] == 150522 and retired == 281 and fresh == 1501, + "stable physical role and graph key namespace") + require(parent["initial"][retired] == 3 and parent["final"][retired] == 127 + and child["initial"] == parent["initial"] + [595] + and child["final"] == parent["final"][:retired] + [595] + parent["final"][retired + 1:] + [127], + "exact split changes one checked role and appends one distinct boundary") + forms = dict(child["forms"]) + schedule = child["schedule"] + position = {k: i for i, k in enumerate(schedule)} + require(len(position) == len(schedule) == len(forms) == len(child["forms"]) + and set(forms) == moves.keys() | set(range(first, first + fresh + 1)), + "one exact chronological entry for each physical row") + arrivals = {~r: a for r, a in enumerate(child["initial"])} + arrivals.update({k: b for k, (_, b) in moves.items()}) + loads = 0 + for k, row in forms.items(): + chart = moves[k][0] if k in moves else child["final"][k-first] + donors = {d for d, _ in row} + require(len(donors) == len(row) and k in position + and all(arrivals.get(d) == chart and (d < 0 or position[d] < position[k]) for d in donors), + f"all donor reads at the literal ordered chart and before consumer {k}") + loads += len(donors) + cut = first + retired + prefix, suffix = dict(edit["prefix"]), dict(edit["injection"]) + require(len(prefix) == 8 and len(suffix) == 10 + and dict(forms[cut]) == prefix and set(prefix).isdisjoint(suffix) + and {k: dict(row)[~fresh] for k, row in forms.items() if any(d == ~fresh for d, _ in row)} == suffix, + "literal prefix cut row and only the ten declared new owner reads") + require(all(moves[k][1] == 595 and position[k] < position[cut] for k in prefix) + and all(moves[k][0] == 595 and position[cut] < position[k] for k in suffix), + "complete prefix observations before same-chart injected reads") + return {"chart": 595, "retired_role": retired, "new_role": fresh, "cocharted_reads": loads, + "prefix_rows": len(prefix), "suffix_rows": len(suffix), + "candidate_cut_positions": [max(position[k] for k in prefix), position[cut], + min(position[k] for k in suffix)]} + + +def main_boundary_checks(graph, frames, subspaces, records, interpret): + observed, hosted_ports = set(), set() + for index, record in enumerate(records): + require(record["j"] == index, "literal order of the 104 native boundaries") + x, y = record["main_roles"] + q = record["q"] + require(y == x + 112 and 0 < q < 512, "literal main port labels") + a, b, c, d = record["charts"] + require(frames[a] == [q] and not frames[b] + and subspaces[d] == frozenset(s for s in range(512) if (s & q).bit_count() % 2 == 0), + "main input and orthogonal output axes") + pairs = [record["main_roles"]] + if record["hosted_roles"] is not None: + pairs.append(record["hosted_roles"]) + hosted_ports.add(index) + for u, v in pairs: + require(u != v and not observed.intersection((u, v)) + and [graph["initial"][u], graph["initial"][v], graph["final"][u], graph["final"][v]] == [a,b,c,d], + "exact disjoint two-plane native chart binding") + observed.update((u, v)) + frame_a, frame_c, frame_d = (interpret.frame(frames[i], 9) for i in (a, c, d)) + before, after = (record["input_recipe"], record["output_recipe"]) + require(before["rank"] == after["rank"] == 0, "the original main adapters are rank zero") + interpret.equal(interpret.recipe(before), (("C", q, -1),) + frame_a, f"main {index} signed input") + interpret.equal(interpret.recipe(after), interpret.adjoint(frame_d) + (("C", q, -1),) + + interpret.fourier(9), f"main {index} signed return") + interpret.equal(frame_c, interpret.fourier(9), f"main {index} full Fourier return") + require(len(records) == 104 and len(hosted_ports) == 96 and len(observed) == 400, + "complete 104-port, 96-hosted, 400-main denominator") + return observed, hosted_ports + + +def caller_bindings(caller, records, mains, hosted_ports): + types = caller["types"] + require(caller["ambient_rank"] == 137 and caller["stages"] == 16 and caller["roles"] == 68 + and len(caller["events"]) == 4192 and set(types) == {"A", "B"} + and set(types["A"]["ports"]) == hosted_ports + and set(types["B"]["ports"]) == set(range(104)) - hosted_ports, + "literal physical 16-stage caller layout") + roles = {kind: set(range(t["offset"], t["offset"] + t["roles"])) for kind, t in types.items()} + require(len(roles["A"]) == len(roles["B"]) == 34 + and roles["A"].isdisjoint(roles["B"]), "two disjoint caller field types") + all_roots = {("main", j, owner) for kind, spec in types.items() + for j in spec["ports"] for owner in roles[kind]} + helper_ids = set(range(1502)) - mains + require({281, 325, 1087, 1501} <= helper_ids and len(helper_ids) == 1102, "separate arbitrary helper owners") + tags, roots, helper_tags = [], set(), set() + for event in caller["events"]: + if event[0] != "J": + continue + _, stage, a, b = event + require(stage == len(tags) + 1 and len(a) == len(set(a)) == 4 and set(a) <= roles["A"] + and len(b) == 4 and len(set(b[:2])) == 2 and set(b[:2]) <= roles["B"] + and tuple(map(Fraction, b[2:])) == (-1, Fraction(1, 2)), "actual chronological joint owner binding") + mapping = {} + for record in records: + j = record["j"] + native = record["main_roles"] + if j in hosted_ports: + native = native + record["hosted_roles"] + for r, owner in zip(native, a if j in hosted_ports else b[:2], strict=True): + mapping[r] = ("main", j, owner) + require(set(mapping) == mains and len(set(mapping.values())) == 400, + "every stage binds its 400 native main owners injectively") + roots.update(mapping.values()) + helpers = {r: ("helper", stage, r) for r in helper_ids} + require(helper_tags.isdisjoint(helpers.values()), "fresh helper owners across all stage occurrences") + helper_tags.update(helpers.values()) + mapping.update(helpers) + tags.append([stage, sorted(mapping.items())]) + require(len(tags) == 16 and len(helper_tags) == 17632 and len(all_roots) == 3536 + and len(roots) == 3280 and roots <= all_roots, + "complete actual native/root ownership on the unchanged caller bytes") + return {"stages": len(tags), "root_owners": len(all_roots), "root_owners_in_native_calls": len(roots), + "helper_owners": len(helper_tags), + "new_owner_tags": [["helper", stage, 1501] for stage in range(1, 17)], + "physical_binding_sha256": digest(encode(tags))} + + +def columns(interpret, ideal, actual, label): + hashes = {} + for reverse in (False, True): + kind = "adjoint" if reverse else "forward" + target = interpret.adjoint(ideal) if reverse else ideal + implementations = [interpret.adjoint(c) if reverse else c for c in actual] + column_hash = sha256() + for col in range(512): + expected = interpret.state(target, col) + require(all(interpret.state(c, col) == expected for c in implementations), f"{label} {kind} column {col}") + column_hash.update(encode([col, sorted(expected[0].items()), expected[1]]) + b"\n") + hashes[kind] = column_hash.hexdigest() + return hashes + + +def validate(args): + archive, boundary_records, old_phase, custody = support_inputs() + parent = read(HERE / "data/PARENT-GRAPH.json.gz", PARENT_PACKED, PARENT) + candidate_path = HERE / "data/CANDIDATE-GRAPH.json.gz" + candidate = read(candidate_path, args.candidate_gzip_sha, args.candidate_sha) + caller = read(HERE / "data/CALLER.json.gz", CALLER_PACKED, CALLER) + edit = read(HERE / "EDIT.json", EDIT) + require(edit["source_head"] == HEAD and edit["source_graph_sha256"] == PARENT + and edit["source_word_sha256"] == SOURCE and edit["caller_sha256"] == CALLER + and edit["source_witness_sha256"] == WITNESS and edit["charts"] == [3, 595, 127], + "same exact selected source and independent chart-595 cut") + require(candidate["metadata"]["edit_sha256"] == EDIT + and candidate["metadata"]["source_bank_graph_sha256"] == PARENT + and candidate["metadata"]["source_pr_head"] == HEAD + and candidate["metadata"]["fixed_pivot_sha256"] == PIVOTS, + "candidate provenance pins match the independent input pins") + require(parent["frames"] == candidate["frames"] and parent["moves"] == candidate["moves"], + "stable ordered chart table and every paid MOVE occurrence") + require(len(parent["initial"]) == len(parent["final"]) == 1501 + and len(candidate["initial"]) == len(candidate["final"]) == 1502, + "complete parent and candidate public denominators") + + sys.path.insert(0, str(SUPPORT)) + import clifford_exact as produce + import native_verify as interpret + + require(Path(produce.__file__).parent == Path(interpret.__file__).parent == SUPPORT, + "compiler and independent checker loaded from exact frozen support") + frames = candidate["frames"] + subspaces = spans(frames) + mains, hosted_ports = main_boundary_checks(candidate, frames, subspaces, boundary_records, interpret) + binding = caller_bindings(caller, boundary_records, mains, hosted_ports) + moves, move_pairs, old_helpers, paid, old_targets = inventory(parent, mains, frames, subspaces) + _, _, new_helpers, new_paid, new_targets = inventory(candidate, mains, frames, subspaces) + require({r: c for r, c in paid.items()} == {int(r): c for r, c in old_phase["candidate"]["native_paid"].items()} + and paid == new_paid and dict(old_targets) == {int(r): c for r, c in old_phase["candidate"]["native_targets"].items()} + and {r: new_targets[r]-old_targets[r] for r in range(1, 10) if new_targets[r] != old_targets[r]} + == {1: 1, 8: 1, 9: -1}, "exact ordered-map inventory and only the new productive split") + cut = verify_cut(parent, candidate, edit, moves) + all_pairs = set(move_pairs) | set(old_helpers) + require(all_pairs == set(move_pairs) | set(new_helpers) and len(all_pairs) == 3024, + "every actual candidate ordered map has a source-bound old physical recipe") + + @cache + def frame(i): + return interpret.frame(frames[i], 9) + + def ideal(a, b): + return interpret.adjoint(frame(a)) + frame(b) + + for pair in sorted(all_pairs): + rec = archive[pair] + rank = physical_rank(pair, frames, subspaces) + require(rec["compared_signed_pauli_and_absolute_phase"] and rec["in_forward_union"] + and sorted(rec["candidate_moves"]) == sorted(move_pairs.get(pair, ())) + and sorted(rec["productive_roles"]) == sorted(old_helpers.get(pair, ())) + and rec["recipe"]["rank"] == rank, f"exact archived bank occurrence-and-rank custody for {pair}") + interpret.equal(interpret.recipe(rec["recipe"]), ideal(*pair), f"unchanged ordered native map {pair}") + + split_maps, circuits = [], [] + for (a, b), rank, role in zip(SPLIT_PAIRS, (1, 8), (281, 1501), strict=True): + old = archive[a, b] + recipe, _ = produce.lower_child(produce.canonical_frame(9, tuple(frames[a])).adjoint() + .then(produce.canonical_frame(9, tuple(frames[b])))) + require(recipe["rank"] == rank == physical_rank((a, b), frames, subspaces, target=True) + and role in new_helpers[a, b] and role not in old_helpers[a, b], + "the target uses the fresh checked map at the correct rank and owner") + actual = interpret.recipe(recipe) + target = ideal(a, b) + interpret.equal(actual, target, f"recompiled productive map {a}->{b}") + exact_columns = columns(interpret, target, [actual, interpret.recipe(old["recipe"])], f"split {a}->{b}") + wrong = deepcopy(recipe) + wrong["left"]["phase"] = (wrong["left"]["phase"] + 1) % 4 + bad = interpret.recipe(wrong) + require(interpret.tableau(bad) == interpret.tableau(actual), "wrong phase preserves signed Pauli action") + try: + interpret.equal(bad, target, f"phase mutation {a}->{b}") + except ValueError as error: + require(str(error).endswith("exact global phase"), "phase-only rejection reason") + else: + raise ValueError("phase-only mutation escaped") + circuits.append(actual) + split_maps.append({"charts": [a, b], "ordered_bases": [frames[a], frames[b]], "rank": rank, + "target_role": role, "recipe": recipe, "prior_recipe": old["recipe"], + "prior_paid_keys": old["candidate_moves"], "prior_proof": old["reuse"], + "exact_column_sha256": exact_columns, "columns_each_direction": 512, + "phase_only_mutation_rejected": True}) + require(87424 in split_maps[0]["prior_paid_keys"] and split_maps[1]["prior_paid_keys"] == [97328, 102698], + "the exact established paid maps on the literal prefix/suffix cut agree") + composite = circuits[0] + circuits[1] + composite_columns = columns(interpret, ideal(3, 127), [composite, interpret.recipe(archive[3,127]["recipe"])], + "old full target and composition of the two ordered charts") + artifact = write(args.out / "SPLIT-RECIPES.json", {"candidate_graph_sha256": args.candidate_sha, + "maps": split_maps, "composition_3_to_127_columns_sha256": composite_columns}) + return {"status": "PASS_CHART595_NATIVE_PHASE_AND_BINDING", "candidate_graph_sha256": args.candidate_sha, + "candidate_graph_gzip_sha256": digest(candidate_path.read_bytes()), "recipient_graph_sha256": PARENT, + "recipient_head": HEAD, "raw_recipient_word": SOURCE, "caller_sha256": CALLER, "custody": custody, + "edit_sha256": EDIT, + "ordered_pairs_rechecked": len(all_pairs), "paid_occurrences_rebound": sum(paid.values()), + "productive_occurrences_parent": sum(old_targets.values()), + "productive_occurrences_candidate": sum(new_targets.values()), "main_boundaries_rechecked": len(boundary_records), + "hosted_correspondences_rechecked": len(hosted_ports), "fresh_split_maps": 2, + "columns_each_direction_per_split_map": 512, "split_composition_columns_each_direction": 512, + "wrong_phase_controls_rejected": 2, "cut": cut, "binding": binding, + "artifact_sha256": {"SPLIT-RECIPES.json": artifact}} + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--candidate-sha", required=True) + parser.add_argument("--candidate-gzip-sha") + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + require(sys.flags.optimize == 0, "exact producer assertions must be enabled") + args.out.mkdir(parents=True, exist_ok=True) + t0 = process_time() + start = {"started_at": stamp(), "release_receipt": RELEASE, "recipient_head": HEAD, + "recipient_graph_sha256": PARENT, "candidate_graph_sha256": args.candidate_sha, + "candidate_gzip_sha256": args.candidate_gzip_sha, "runner_sha256": digest(Path(__file__).read_bytes())} + start_sha = write(args.out / "START.json", start) + try: + result = validate(args) + except Exception as exc: + write(args.out / "FAILURE.json", {**start, "completed_at": stamp(), "error": str(exc), + "cpu_seconds": process_time()-t0, "peak_rss_kib": resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}) + raise + result.update({"started_at": start["started_at"], "completed_at": stamp(), "start_sha256": start_sha, + "cpu_seconds": process_time()-t0, "peak_rss_kib": resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}) + write(args.out / "PHASE-RESULT.json", result) + print(result["status"], args.candidate_sha, result["ordered_pairs_rechecked"], result["fresh_split_maps"], flush=True) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/native_support/PR7682-ASSETS.json b/research/p104-banked-chart595-split/native_support/PR7682-ASSETS.json new file mode 100644 index 0000000000..bd49207c9b --- /dev/null +++ b/research/p104-banked-chart595-split/native_support/PR7682-ASSETS.json @@ -0,0 +1,450 @@ +{ + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "ci_bridge_commit": "0eabc624a9bc9ed2847719efd63390db4d297df4", + "comparator": { + "caller_sha256": "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf", + "head": "28b2af322a1fab01b3734365988930920f9dda48", + "pivot_sha256": "fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85", + "pr": 7674, + "published_receipt_sha256": "00340c699fd7e2895d31a41d1eb60aebf91d7ba2c1c193dc002f69315298cd38", + "science": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "source_word": "ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d" + }, + "files": [ + { + "bytes": 11357, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "path": "LICENSE", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/LICENSE", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "upstream_path": "research/p104-banked-transfer-pivots/LICENSE" + }, + { + "bytes": 4767, + "path": "data/CONTACTS.json", + "provenance": "Original exact role-230 splice on published ee251f60, with unchanged source clock keys and sparse contact census", + "sha256": "9e1d2b56750dee78be16b4514deae18dc886767dc9f92f21e1c6e0f10f6215dd" + }, + { + "bytes": 5896, + "path": "engines/application/SOURCE-PINS.json", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "166eeb4872d805a938608b325c5494b792b9eb9948481fa9216fbc1fd4361315" + }, + { + "bytes": 9677, + "path": "engines/application/bank_cost.py", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "8839ec35f4f6086bc9047cfa021bb60a35ac622ca56fcc5f6c08bac307f8ea56" + }, + { + "bytes": 3702, + "path": "engines/application/data/PHASE-BASES.json", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "325a1eb4aa7fe5f918b1d8344b88ad132ef4606268bccec20f223ace5feda18b" + }, + { + "bytes": 14024, + "path": "engines/application/vendor/binding16.py", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "589058311e44f2d8909495c005bee6d54828ebe561d4673b599193d269006170" + }, + { + "bytes": 7783, + "path": "engines/application/vendor/caller16.py", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "ced48867f07ca0143604aa98cfd74fa7453696b9d3221f7c230d73e9ab9ba81f" + }, + { + "bytes": 19068, + "path": "engines/application/vendor/upstream_application.py", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184" + }, + { + "bytes": 18982, + "path": "engines/application/verify.py", + "provenance": "Paired exact #7674 application verifier, exact ancestor and data bindings in co-located SOURCE-PINS.json", + "sha256": "c057e34919111fa55734517c063d2fb23f8a4f10a3f7452b1f1ce173b95f08df" + }, + { + "bytes": 18186, + "path": "engines/check_banked_provider_cost.py", + "provenance": "Independent complete banked resource audit with physically separate staging streams", + "sha256": "e369ffbf0b96a343b4c06b07e7bd1436f860f6a95070de0371ed7c6c38a5c036" + }, + { + "bytes": 8469, + "path": "engines/check_price.py", + "provenance": "Independent signed rational moment evaluator, derivative and extra fee exclusion", + "sha256": "446c8ebddf5b1e56d43b8d7f2ad3c1c9ba018a18105b207a0ac9e30386878a10" + }, + { + "bytes": 6824, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "path": "engines/frozen/clifford_exact.py", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/shared-wire-split-composition/frozen/clifford_exact.py", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "upstream_path": "research/shared-wire-split-composition/frozen/clifford_exact.py" + }, + { + "bytes": 9553, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "fda2a852e9937e42fe40df0707694465ca7c1b48", + "path": "engines/frozen/compare_recursive_invoices.py", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/scripts/compare_recursive_invoices.py", + "sha256": "3930c22c11da7bc6042cfeb6e459ecb06e4478430037bee3469d034353855fc6", + "upstream_path": "scripts/compare_recursive_invoices.py" + }, + { + "bytes": 4593, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "ca50f8021fc3238a58fd420383f4619a8d008ace", + "path": "engines/frozen/evaluate_recursive_power.py", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/scripts/evaluate_recursive_power.py", + "sha256": "52b20f41fd0bb55fa88dccd6015af2ce358917817b9506720f3e60ce681cc3ad", + "upstream_path": "scripts/evaluate_recursive_power.py" + }, + { + "bytes": 12483, + "path": "engines/frozen/field_interpreter.py", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/25ede76cfead37a71fa2ae8d038f3a25819c6ce6/research/p104-180-contact-application/src/native/engines/physical.py", + "sha256": "e76bc78b132607890b2d9ea234d3a52e608e0e919bdc48308cc0727a2a07c73e" + }, + { + "bytes": 12323, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "path": "engines/frozen/native_verify.py", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/research/shared-wire-split-composition/frozen/native_verify.py", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "upstream_path": "research/shared-wire-split-composition/frozen/native_verify.py" + }, + { + "bytes": 10059, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "cd19f356a5549f6b70557095e7745cdddde0485c", + "path": "engines/frozen/selected-bit-ambient.json", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-admission/bit-ambient.json", + "sha256": "437ad2f9e7956e7f2b477b546f53a6c8cfa0567e207024300e9a7e58d3c0202c" + }, + { + "bytes": 2891, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "c9b816f8445be9dc19b2259e03e9d8709d18c87a", + "path": "engines/frozen/selected-claim.json", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/certificates/frontier7000/CLAIM.json", + "sha256": "3f8add8252adb223b60418ec69351a69b6b5edfe601ec1c6b4b65cd9e2afd9b2" + }, + { + "bytes": 10887, + "commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "git_blob": "7291ce5ab9c59f07ead921fbad9966b4a54e3292", + "path": "engines/frozen/selected-validation.json", + "provenance": "https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/docs/research/pr-intake-evidence/pr7000-application/VALIDATION.json", + "sha256": "e1374a98b240d7f9f2cca2a1e74b93f240b1bfc94b8cc4b94a385a50281d494e" + }, + { + "bytes": 21899, + "path": "engines/graph.py", + "provenance": "Independent stable-MOVE-key graph construction, unchanged 15-pivot replay and forward/adjoint wire checker", + "sha256": "7acf26e997e8d659b8c61fbaa675d6478fcdffff1600f45c6722824497fdea37" + }, + { + "bytes": 127065, + "path": "engines/native/MAP-CUSTODY.json.gz", + "provenance": "Exact #7674 paired DAG phase inventory, standalone verifier and underlying compact immutable matching recipe custody", + "sha256": "18cd4ff7bfaab88dc0c13fba636d1355350cd6199f83ef18c9fe477b33460d23" + }, + { + "bytes": 3798, + "path": "engines/native/bank_complete.py", + "provenance": "Recheck actual paired native phases and whole-tape receipt closure", + "sha256": "a8278778bc2d6b637f12b3cdb2f2bea55d4c220f59e3410ed752501bcb028d7b" + }, + { + "bytes": 10153, + "path": "engines/native/bank_dense.py", + "provenance": "Exact #7674 paired DAG phase inventory, standalone verifier and underlying compact immutable matching recipe custody", + "sha256": "2c71c0a15380649ebe11f914c25d79c4618bed7a9ce2285560e77f2148bc5e7b" + }, + { + "bytes": 19320, + "path": "engines/native/bank_phase.py", + "provenance": "Exact #7674 paired DAG phase inventory, standalone verifier and underlying compact immutable matching recipe custody", + "sha256": "6167457bd1e6ce8b278ae90f488d2035f9d237be01d2cb1093ec5bb55c583fb4" + }, + { + "bytes": 3491, + "path": "engines/native/custody.py", + "provenance": "Exact #7674 paired DAG phase inventory, standalone verifier and underlying compact immutable matching recipe custody", + "sha256": "58bfd0ecfbdac40fb212bfafe8286e5bed3693dfa1b8b444a7a28f87acff9884" + }, + { + "bytes": 8342, + "path": "evidence/APPLICATION-ORDINARY.json", + "provenance": "Guarded actual paired #7674 candidate and peer verification output", + "sha256": "b52e0a4770d4a7311635c4917273f1a1d03956d925565819bdd8daf6d3ac9734" + }, + { + "bytes": 1263, + "path": "evidence/APPLICATION-RESULT.json", + "provenance": "Guarded actual paired #7674 candidate and peer verification output", + "sha256": "b1af8b101a40f25eea55a8b58443794a7db708389ad66c20adefbace12828e09" + }, + { + "bytes": 2594, + "path": "evidence/DENSE-1000000009.json", + "provenance": "Guarded actual paired banked graph held-array execution on a declared prime", + "sha256": "012785e84bfcd12041e99036358ecfcb391a23130cea5c045e39f42795408d18" + }, + { + "bytes": 2046, + "path": "evidence/DENSE-998244353.json", + "provenance": "Guarded actual paired banked graph held-array execution on a declared prime", + "sha256": "75b11509ae79be3b33cd62229ccad25cfebb5f89ec0d958c220d11c21225b2d5" + }, + { + "bytes": 5568, + "path": "evidence/INDEPENDENT-PRICE.json", + "provenance": "Guarded independent exact price brackets and rank-one mutation on both frozen graphs", + "sha256": "80eb79031041245d4e62e2a64505a9de88a21f8e7ca0d67a9e71df14547cbb03" + }, + { + "bytes": 2338, + "path": "evidence/INVOICES.json", + "provenance": "Guarded actual paired #7674 candidate and peer verification output", + "sha256": "a9aecf52d99d5370506b9dc6d03799241bebd2c03bbdcfa2dd5f45ec03c9d70d" + }, + { + "bytes": 2802, + "path": "evidence/NATIVE-RESULT.json", + "provenance": "Completed paired native graph evidence and phase/dense bindings", + "sha256": "54e1ed3d604f63e9b6fe902cb144c282b14c361c7330bb4df6b7f4a7266d8b80" + }, + { + "bytes": 2300, + "path": "evidence/PHASE-RESULT.json", + "provenance": "Guarded actual paired native catalogue on both banked graphs", + "sha256": "50b05bdc2805d709761ce5c4b42e7ec352141366f5cc6031df9f8779e8872735" + }, + { + "bytes": 121248, + "path": "evidence/PRICE-OUTER.json", + "provenance": "Guarded actual paired #7674 candidate and peer verification output", + "sha256": "8e29f3ebb19c849884cfb87ef39431616774acfe95fa28a3cfe2e124abc6d202" + }, + { + "bytes": 7456, + "path": "evidence/PROVIDER-RESULT.json", + "provenance": "Guarded independent paired cost receipt, complete four-stream layout", + "sha256": "65aee4b27649605a4626e16520feabec4ea05cb2d20c042f503ddaaeb9ccd5f1" + }, + { + "bytes": 14786, + "path": "evidence/PROVIDER-SOURCE-REVIEW.md", + "provenance": "Independent full-view provider source review b867be9a\u2026 with two proof links relocated to the package receipts.", + "sha256": "3ad72faca26224e468428eea84ac15438e1b4833d5ef330b8e8f31988309ea32" + }, + { + "bytes": 4283, + "path": "evidence/WIRE-RESULT.json", + "provenance": "Actual guarded both-orders exact wire and pivot result", + "sha256": "cde8b602d182ece20f55616decab1bf5c2b64e877770c20106afca44ff08752d" + }, + { + "bytes": 1697, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "951f081717e0769f3bcc0f442f133965c064d2ce", + "path": "peer/NOTICE", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/NOTICE", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "382537634a3d9fa0a8089d6121a506a399382f9310088b1f29586dcc93eec92d", + "upstream_path": "research/p104-banked-transfer-pivots/NOTICE" + }, + { + "bytes": 8477, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "feede77664be2de84437dc1ef144ab6974b1e44c", + "path": "peer/PIVOTS.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PIVOTS.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85", + "upstream_path": "research/p104-banked-transfer-pivots/PIVOTS.json" + }, + { + "bytes": 13018, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "11e0617c58d7d7e91f0fbb986690f78f6f76c224", + "path": "peer/RESULT.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/RESULT.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "00340c699fd7e2895d31a41d1eb60aebf91d7ba2c1c193dc002f69315298cd38", + "upstream_path": "research/p104-banked-transfer-pivots/RESULT.json" + }, + { + "bytes": 2483, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "489f8a60e98dcade0082b29c66448c8af5963f33", + "path": "peer/SOURCE-PINS.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/SOURCE-PINS.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "8fe48d96e2cc39ae92b0ea9d37f809005b5debc7cf4cadaef33e1674f979aeb8", + "upstream_path": "research/p104-banked-transfer-pivots/SOURCE-PINS.json" + }, + { + "bytes": 1581, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "f51fc62b8a70baee2bb8a04be73795efadc4b451", + "path": "peer/SOURCES.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/SOURCES.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "76818b74ee05a1a562813b1385b3609dea2bb548c260ebda1b3f8a7aeab236c9", + "upstream_path": "research/p104-banked-transfer-pivots/SOURCES.json" + }, + { + "bytes": 5804, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "945c27d8c49b206f4deeb48eaf88df74c4042b3b", + "path": "peer/caller.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/caller.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "9bfb77250ca4826c1098b896769dc504b587c8c0dac634dd07012150fc8dde37", + "upstream_path": "research/p104-banked-transfer-pivots/caller.py" + }, + { + "bytes": 4462, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "3ac4634c210d6f5b66dfc26fa8360f6f36bbd418", + "path": "peer/catalogue.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/catalogue.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "11b1b270e366f68bcae333e31716613f1cb9f0ac2ed3e687d70f8ebd7bc7c9c1", + "upstream_path": "research/p104-banked-transfer-pivots/catalogue.py" + }, + { + "bytes": 4786, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "3e09f65fe33e162e1a5e2e0433b7ea4483759b3a", + "path": "peer/native.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/native.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "788465324eb8693a698c75cb3dfdf1b82297324d5583910107ecad4600645e43", + "upstream_path": "research/p104-banked-transfer-pivots/native.py" + }, + { + "bytes": 8209, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "0ebc1925c40cc6c11af59e405221ea51801a6e92", + "path": "peer/network.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/network.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "a9169fd6ad0a13c69cf39bd32649d53256f6d6fa2ed2ceda854f848b64f4c546", + "upstream_path": "research/p104-banked-transfer-pivots/network.py" + }, + { + "bytes": 4404, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "2ec7f5e01b480d1abc80fb826c3124c17a232c2a", + "path": "peer/physical.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/physical.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "d887d0eb5a97bc8e6107e60e19fccf2bd2637b2f0510f1d9356e9a4ecfe5a475", + "upstream_path": "research/p104-banked-transfer-pivots/physical.py" + }, + { + "bytes": 1326, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "6ce1bc49a3612c9e906df02de81bcba84be8e803", + "path": "peer/source/7663-NOTICE", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/7663-NOTICE", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "5fd4367578d2339fbdcd7dc116b6c12cb4fa72e92d2e3d67be537a36c8bd9d40", + "upstream_path": "research/p104-banked-transfer-pivots/source/7663-NOTICE" + }, + { + "bytes": 7588, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "bbee2437f012c3268eb5cd920adfa37394c1de72", + "path": "peer/source/7669-CREDITS.md", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/7669-CREDITS.md", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "706c6c852e87e371ddf1828244b2f0c2b00279728818023aa911c8947d69ab83", + "upstream_path": "research/p104-banked-transfer-pivots/source/7669-CREDITS.md" + }, + { + "bytes": 585407, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "1273c83178693e1627a2324680907f9b0e95e995", + "path": "peer/source/K372-2-WORD.json.gz", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/K372-2-WORD.json.gz", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "631babeca90e78c5caac713484fe618328b9beee8294baef6ac45ffc9a75dd3b", + "upstream_path": "research/p104-banked-transfer-pivots/source/K372-2-WORD.json.gz" + }, + { + "bytes": 11854, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "26a75a1ae32cb4944a65281cfb08775967cb39a0", + "path": "peer/source/caller.json.gz", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/caller.json.gz", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "d889996a337f648087208ab51c98eaf052705d4fca88b5d01b6e9257a829897a", + "upstream_path": "research/p104-banked-transfer-pivots/source/caller.json.gz" + }, + { + "bytes": 1238, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "1bc9b4da2b8398954cd7a49356eb9d397785d0a6", + "path": "peer/source/gate-NOTICE", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/gate-NOTICE", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "upstream_path": "research/p104-banked-transfer-pivots/source/gate-NOTICE" + }, + { + "bytes": 6886, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "e24dc46079b4c25152f5afc096dda2ce8ee58ff5", + "path": "peer/source/interval_gate.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/interval_gate.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "upstream_path": "research/p104-banked-transfer-pivots/source/interval_gate.py" + }, + { + "bytes": 574, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "4cfe4f0fe98a820153cac58747dd80fb2a2402e6", + "path": "peer/source/parent-invoice.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/parent-invoice.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "c79d8c51ad34c7c14134c41d3ae132ab91101e8e24674b52a2abfa191de3fd00", + "upstream_path": "research/p104-banked-transfer-pivots/source/parent-invoice.json" + }, + { + "bytes": 13849, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "23368c8750e6d981ee10664187c6a2c3859be542", + "path": "peer/source/source-edits.json", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/source/source-edits.json", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "05b84f9578fddc7adc7805f20afdfe5ea679d298b2232d7f718193185f471656", + "upstream_path": "research/p104-banked-transfer-pivots/source/source-edits.json" + }, + { + "bytes": 5422, + "commit": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "git_blob": "2de8722b8016ca22e408fea7ab1999bc73bed17e", + "path": "peer/verify.py", + "provenance": "https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/verify.py", + "refreshed_head": "28b2af322a1fab01b3734365988930920f9dda48", + "sha256": "0b3bf41e3c486538ac124e7f265d1b82549dfb8a7351879332e63aba5ae74fac", + "upstream_path": "research/p104-banked-transfer-pivots/verify.py" + } + ], + "schema_version": 1 +} diff --git a/research/p104-banked-chart595-split/native_support/PR7682-BANK-RECIPES.json.gz b/research/p104-banked-chart595-split/native_support/PR7682-BANK-RECIPES.json.gz new file mode 100644 index 0000000000..488a388970 Binary files /dev/null and b/research/p104-banked-chart595-split/native_support/PR7682-BANK-RECIPES.json.gz differ diff --git a/research/p104-banked-chart595-split/native_support/PR7682-HOSTED-READBACK.json b/research/p104-banked-chart595-split/native_support/PR7682-HOSTED-READBACK.json new file mode 100644 index 0000000000..7c7bb7d826 --- /dev/null +++ b/research/p104-banked-chart595-split/native_support/PR7682-HOSTED-READBACK.json @@ -0,0 +1,26 @@ +{ + "observed_at": "2026-11-18T08:38:24.693581+00:00", + "workflow_id": 44266835193, + "job_id": 134675660828, + "head": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "job_url": "https://github.com/CrocSwap/integer-mult-bounds/actions/runs/44266835193/job/134675660828", + "completed_at": "2026-11-18T08:34:46Z", + "required_steps": { + "Explicit bounded package replay": "success", + "Committed inputs remain unchanged": "success" + }, + "local_marker_count": 24, + "hosted_marker_count": 24, + "markers_same_after_removing_fresh_wire_result_digest": 24, + "wire_result_receipt_hashes": { + "hosted": "c5cd104571a44f486ffb27f902e39c6269103bfd371df6a19ae2df775f307514", + "local": "1859efadb8f967da5ea33ee5874f0a541e9a91fbaab25ee2dc1f7c6d9ff0c2ab" + }, + "equal_exact_candidate_graph": "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150", + "all_15_saved_signal_markers": true, + "evidence_sha256": { + "HOSTED-RENDERED-REPLAY.txt": "5393ec7445d8d17b1bd4fd81ba967795bf066a10e8af6273cccfa784793ae81b", + "HOSTED-SCIENCE-JOB.json": "f434fefd4608f68e37555ea715c6f7b6ec513da201a4663f442bbfd934d9d51a", + "COMMITTED-COLD/registered.stdout": "8f6db178341c93be2441ec4ae59e3989b2b9ba43f76ab9d5363d63d7b82d4c6f" + } +} diff --git a/research/p104-banked-chart595-split/native_support/PR7682-MAIN-BOUNDARIES.json b/research/p104-banked-chart595-split/native_support/PR7682-MAIN-BOUNDARIES.json new file mode 100644 index 0000000000..84de3180f9 --- /dev/null +++ b/research/p104-banked-chart595-split/native_support/PR7682-MAIN-BOUNDARIES.json @@ -0,0 +1 @@ +[{"charts":[0,3,127,128],"hosted_roles":[772,882],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,0,0,0,0,0],"matrix_rows":[2,1,4,11,16,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[3,3,0,0,0,0,0,0,0]},"rank":0,"right":null},"j":0,"main_roles":[0,112],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,9,16,32,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":11},{"charts":[1,3,127,129],"hosted_roles":[773,883],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,0,0,0,0,0],"matrix_rows":[2,1,4,8,19,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[3,3,0,0,0,0,0,0,0]},"rank":0,"right":null},"j":1,"main_roles":[1,113],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,8,17,32,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":19},{"charts":[2,3,127,130],"hosted_roles":[774,884],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,0,0,0,0,0],"matrix_rows":[2,1,4,8,16,35,64,128,256],"offset":0,"phase":0,"quadratic_rows":[3,3,0,0,0,0,0,0,0]},"rank":0,"right":null},"j":2,"main_roles":[2,114],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,8,16,33,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":35},{"charts":[4,3,127,131],"hosted_roles":[776,886],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,0,0,0,0,0],"matrix_rows":[2,1,4,8,16,32,64,131,256],"offset":0,"phase":0,"quadratic_rows":[3,3,0,0,0,0,0,0,0]},"rank":0,"right":null},"j":3,"main_roles":[4,116],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,8,16,32,64,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":131},{"charts":[5,3,127,132],"hosted_roles":[777,887],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,0,0,0,0,0],"matrix_rows":[2,1,4,8,16,32,64,128,259],"offset":0,"phase":0,"quadratic_rows":[3,3,0,0,0,0,0,0,0]},"rank":0,"right":null},"j":4,"main_roles":[5,117],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,8,16,32,64,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":259},{"charts":[6,3,127,133],"hosted_roles":[778,888],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,13,16,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":5,"main_roles":[6,118],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,16,32,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":13},{"charts":[7,3,127,134],"hosted_roles":[779,889],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,8,21,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":6,"main_roles":[7,119],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,17,32,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":21},{"charts":[8,3,127,135],"hosted_roles":[780,890],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,8,16,37,64,128,256],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":7,"main_roles":[8,120],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,16,33,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":37},{"charts":[9,3,127,136],"hosted_roles":[781,891],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,8,16,32,69,128,256],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":8,"main_roles":[9,121],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,16,32,65,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":69},{"charts":[10,3,127,137],"hosted_roles":[782,892],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,8,16,32,64,133,256],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":9,"main_roles":[10,122],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,16,32,64,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":133},{"charts":[11,3,127,138],"hosted_roles":[783,893],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,0,0,0,0,0],"matrix_rows":[4,2,1,8,16,32,64,128,261],"offset":0,"phase":0,"quadratic_rows":[5,0,5,0,0,0,0,0,0]},"rank":0,"right":null},"j":10,"main_roles":[11,123],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,16,32,64,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":261},{"charts":[12,3,127,139],"hosted_roles":[784,894],"input_recipe":{"left":{"linear_Z4":[1,0,0,1,0,0,0,0,0],"matrix_rows":[8,2,4,1,16,41,64,128,256],"offset":0,"phase":0,"quadratic_rows":[9,0,0,9,0,0,0,0,0]},"rank":0,"right":null},"j":11,"main_roles":[12,124],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,9,16,33,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":41},{"charts":[13,3,127,140],"hosted_roles":[785,895],"input_recipe":{"left":{"linear_Z4":[1,0,0,1,0,0,0,0,0],"matrix_rows":[8,2,4,1,16,32,73,128,256],"offset":0,"phase":0,"quadratic_rows":[9,0,0,9,0,0,0,0,0]},"rank":0,"right":null},"j":12,"main_roles":[13,125],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,9,16,32,65,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":73},{"charts":[14,3,127,141],"hosted_roles":[787,897],"input_recipe":{"left":{"linear_Z4":[1,0,0,1,0,0,0,0,0],"matrix_rows":[8,2,4,1,16,32,64,128,265],"offset":0,"phase":0,"quadratic_rows":[9,0,0,9,0,0,0,0,0]},"rank":0,"right":null},"j":13,"main_roles":[15,127],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,9,16,32,64,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":265},{"charts":[15,3,127,142],"hosted_roles":[788,898],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,1,0,0,0,0],"matrix_rows":[16,2,4,8,1,49,64,128,256],"offset":0,"phase":0,"quadratic_rows":[17,0,0,0,17,0,0,0,0]},"rank":0,"right":null},"j":14,"main_roles":[16,128],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,17,33,64,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":49},{"charts":[16,3,127,143],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[1,0,0,0,1,0,0,0,0],"matrix_rows":[16,2,4,8,1,32,81,128,256],"offset":0,"phase":0,"quadratic_rows":[17,0,0,0,17,0,0,0,0]},"rank":0,"right":null},"j":15,"main_roles":[17,129],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,17,32,65,128,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":81},{"charts":[17,3,127,144],"hosted_roles":[790,899],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,1,0,0,0,0],"matrix_rows":[16,2,4,8,1,32,64,145,256],"offset":0,"phase":0,"quadratic_rows":[17,0,0,0,17,0,0,0,0]},"rank":0,"right":null},"j":16,"main_roles":[18,130],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,17,32,64,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":145},{"charts":[18,3,127,145],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[1,0,0,0,1,0,0,0,0],"matrix_rows":[16,2,4,8,1,32,64,128,273],"offset":0,"phase":0,"quadratic_rows":[17,0,0,0,17,0,0,0,0]},"rank":0,"right":null},"j":17,"main_roles":[19,131],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,17,32,64,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":273},{"charts":[19,3,127,146],"hosted_roles":[792,900],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,0,1,0,0,0],"matrix_rows":[32,2,4,8,16,1,64,161,256],"offset":0,"phase":0,"quadratic_rows":[33,0,0,0,0,33,0,0,0]},"rank":0,"right":null},"j":18,"main_roles":[20,132],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,33,64,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":161},{"charts":[20,3,127,147],"hosted_roles":[794,902],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,0,0,1,0,0],"matrix_rows":[64,2,4,8,16,32,1,193,256],"offset":0,"phase":0,"quadratic_rows":[65,0,0,0,0,0,65,0,0]},"rank":0,"right":null},"j":19,"main_roles":[22,134],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":193},{"charts":[21,3,127,148],"hosted_roles":[795,903],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,0,0,1,0,0],"matrix_rows":[64,2,4,8,16,32,1,128,321],"offset":0,"phase":0,"quadratic_rows":[65,0,0,0,0,0,65,0,0]},"rank":0,"right":null},"j":20,"main_roles":[23,135],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":321},{"charts":[22,3,127,149],"hosted_roles":[796,904],"input_recipe":{"left":{"linear_Z4":[1,0,0,0,0,0,0,1,0],"matrix_rows":[128,2,4,8,16,32,64,1,385],"offset":0,"phase":0,"quadratic_rows":[129,0,0,0,0,0,0,129,0]},"rank":0,"right":null},"j":21,"main_roles":[24,136],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":385},{"charts":[23,3,127,150],"hosted_roles":[797,905],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,14,16,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":22,"main_roles":[25,137],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,16,32,64,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":14},{"charts":[24,3,127,151],"hosted_roles":[798,906],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,8,22,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":23,"main_roles":[26,138],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,18,32,64,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":22},{"charts":[25,3,127,152],"hosted_roles":[799,907],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,8,16,38,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":24,"main_roles":[27,139],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,16,34,64,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":38},{"charts":[26,3,127,153],"hosted_roles":[800,908],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,8,16,32,70,128,256],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":25,"main_roles":[28,140],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,16,32,66,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":70},{"charts":[27,3,127,154],"hosted_roles":[801,909],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,8,16,32,64,134,256],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":26,"main_roles":[29,141],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,16,32,64,130,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":134},{"charts":[28,3,127,155],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,1,1,0,0,0,0,0,0],"matrix_rows":[1,4,2,8,16,32,64,128,262],"offset":0,"phase":0,"quadratic_rows":[0,6,6,0,0,0,0,0,0]},"rank":0,"right":null},"j":27,"main_roles":[30,142],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,16,32,64,128,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":262},{"charts":[29,3,127,156],"hosted_roles":[803,910],"input_recipe":{"left":{"linear_Z4":[0,1,0,1,0,0,0,0,0],"matrix_rows":[1,8,4,2,26,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,10,0,10,0,0,0,0,0]},"rank":0,"right":null},"j":28,"main_roles":[31,143],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,10,18,32,64,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":26},{"charts":[30,3,127,157],"hosted_roles":[804,911],"input_recipe":{"left":{"linear_Z4":[0,1,0,1,0,0,0,0,0],"matrix_rows":[1,8,4,2,16,32,74,128,256],"offset":0,"phase":0,"quadratic_rows":[0,10,0,10,0,0,0,0,0]},"rank":0,"right":null},"j":29,"main_roles":[32,144],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,10,16,32,66,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":74},{"charts":[31,3,127,158],"hosted_roles":[805,912],"input_recipe":{"left":{"linear_Z4":[0,1,0,1,0,0,0,0,0],"matrix_rows":[1,8,4,2,16,32,64,138,256],"offset":0,"phase":0,"quadratic_rows":[0,10,0,10,0,0,0,0,0]},"rank":0,"right":null},"j":30,"main_roles":[33,145],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,10,16,32,64,130,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":138},{"charts":[32,3,127,159],"hosted_roles":[807,914],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,1,0,0,0,0],"matrix_rows":[1,16,4,8,2,50,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,18,0,0,18,0,0,0,0]},"rank":0,"right":null},"j":31,"main_roles":[35,147],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,18,34,64,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":50},{"charts":[33,3,127,160],"hosted_roles":[808,915],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,1,0,0,0,0],"matrix_rows":[1,16,4,8,2,32,64,146,256],"offset":0,"phase":0,"quadratic_rows":[0,18,0,0,18,0,0,0,0]},"rank":0,"right":null},"j":32,"main_roles":[36,148],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,18,32,64,130,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":146},{"charts":[34,3,127,161],"hosted_roles":[809,916],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,1,0,0,0,0],"matrix_rows":[1,16,4,8,2,32,64,128,274],"offset":0,"phase":0,"quadratic_rows":[0,18,0,0,18,0,0,0,0]},"rank":0,"right":null},"j":33,"main_roles":[37,149],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,18,32,64,128,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":274},{"charts":[35,3,127,162],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,1,0,0,0,1,0,0,0],"matrix_rows":[1,32,4,8,16,2,98,128,256],"offset":0,"phase":0,"quadratic_rows":[0,34,0,0,0,34,0,0,0]},"rank":0,"right":null},"j":34,"main_roles":[38,150],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,34,66,128,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":98},{"charts":[36,3,127,163],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,1,0,0,0,1,0,0,0],"matrix_rows":[1,32,4,8,16,2,64,128,290],"offset":0,"phase":0,"quadratic_rows":[0,34,0,0,0,34,0,0,0]},"rank":0,"right":null},"j":35,"main_roles":[40,152],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,34,64,128,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":290},{"charts":[37,3,127,164],"hosted_roles":[813,918],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,0,0,1,0,0],"matrix_rows":[1,64,4,8,16,32,2,194,256],"offset":0,"phase":0,"quadratic_rows":[0,66,0,0,0,0,66,0,0]},"rank":0,"right":null},"j":36,"main_roles":[41,153],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,66,130,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":194},{"charts":[38,3,127,165],"hosted_roles":[814,919],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,0,0,1,0,0],"matrix_rows":[1,64,4,8,16,32,2,128,322],"offset":0,"phase":0,"quadratic_rows":[0,66,0,0,0,0,66,0,0]},"rank":0,"right":null},"j":37,"main_roles":[42,154],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,66,128,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":322},{"charts":[39,3,127,166],"hosted_roles":[815,920],"input_recipe":{"left":{"linear_Z4":[0,1,0,0,0,0,0,1,0],"matrix_rows":[1,128,4,8,16,32,64,2,386],"offset":0,"phase":0,"quadratic_rows":[0,130,0,0,0,0,0,130,0]},"rank":0,"right":null},"j":38,"main_roles":[43,155],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":386},{"charts":[40,3,127,167],"hosted_roles":[816,921],"input_recipe":{"left":{"linear_Z4":[0,0,1,1,0,0,0,0,0],"matrix_rows":[1,2,8,4,28,32,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,12,12,0,0,0,0,0]},"rank":0,"right":null},"j":39,"main_roles":[44,156],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,12,20,32,64,128,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":28},{"charts":[41,3,127,168],"hosted_roles":[817,922],"input_recipe":{"left":{"linear_Z4":[0,0,1,1,0,0,0,0,0],"matrix_rows":[1,2,8,4,16,44,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,12,12,0,0,0,0,0]},"rank":0,"right":null},"j":40,"main_roles":[45,157],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,12,16,36,64,128,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":44},{"charts":[42,3,127,169],"hosted_roles":[818,923],"input_recipe":{"left":{"linear_Z4":[0,0,1,1,0,0,0,0,0],"matrix_rows":[1,2,8,4,16,32,64,140,256],"offset":0,"phase":0,"quadratic_rows":[0,0,12,12,0,0,0,0,0]},"rank":0,"right":null},"j":41,"main_roles":[46,158],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,12,16,32,64,132,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":140},{"charts":[43,3,127,170],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,0,1,1,0,0,0,0,0],"matrix_rows":[1,2,8,4,16,32,64,128,268],"offset":0,"phase":0,"quadratic_rows":[0,0,12,12,0,0,0,0,0]},"rank":0,"right":null},"j":42,"main_roles":[47,159],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,12,16,32,64,128,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":268},{"charts":[44,3,127,171],"hosted_roles":[819,925],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,1,0,0,0,0],"matrix_rows":[1,2,16,8,4,32,84,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,20,0,20,0,0,0,0]},"rank":0,"right":null},"j":43,"main_roles":[48,160],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,20,32,68,128,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":84},{"charts":[45,3,127,172],"hosted_roles":[820,926],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,1,0,0,0,0],"matrix_rows":[1,2,16,8,4,32,64,148,256],"offset":0,"phase":0,"quadratic_rows":[0,0,20,0,20,0,0,0,0]},"rank":0,"right":null},"j":44,"main_roles":[49,161],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,20,32,64,132,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":148},{"charts":[46,3,127,173],"hosted_roles":[821,927],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,1,0,0,0,0],"matrix_rows":[1,2,16,8,4,32,64,128,276],"offset":0,"phase":0,"quadratic_rows":[0,0,20,0,20,0,0,0,0]},"rank":0,"right":null},"j":45,"main_roles":[50,162],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,20,32,64,128,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":276},{"charts":[47,3,127,174],"hosted_roles":[822,928],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,1,0,0,0],"matrix_rows":[1,2,32,8,16,4,100,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,36,0,0,36,0,0,0]},"rank":0,"right":null},"j":46,"main_roles":[51,163],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,36,68,128,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":100},{"charts":[48,3,127,175],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,1,0,0,0],"matrix_rows":[1,2,32,8,16,4,64,164,256],"offset":0,"phase":0,"quadratic_rows":[0,0,36,0,0,36,0,0,0]},"rank":0,"right":null},"j":47,"main_roles":[52,164],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,36,64,132,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":164},{"charts":[49,3,127,176],"hosted_roles":[823,930],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,1,0,0,0],"matrix_rows":[1,2,32,8,16,4,64,128,292],"offset":0,"phase":0,"quadratic_rows":[0,0,36,0,0,36,0,0,0]},"rank":0,"right":null},"j":48,"main_roles":[53,165],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,36,64,128,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":292},{"charts":[50,3,127,177],"hosted_roles":[824,931],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,0,1,0,0],"matrix_rows":[1,2,64,8,16,32,4,196,256],"offset":0,"phase":0,"quadratic_rows":[0,0,68,0,0,0,68,0,0]},"rank":0,"right":null},"j":49,"main_roles":[54,166],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,68,132,256],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":196},{"charts":[51,3,127,178],"hosted_roles":[825,932],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,0,1,0,0],"matrix_rows":[1,2,64,8,16,32,4,128,324],"offset":0,"phase":0,"quadratic_rows":[0,0,68,0,0,0,68,0,0]},"rank":0,"right":null},"j":50,"main_roles":[55,167],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,68,128,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":324},{"charts":[52,3,127,179],"hosted_roles":[826,933],"input_recipe":{"left":{"linear_Z4":[0,0,1,0,0,0,0,1,0],"matrix_rows":[1,2,128,8,16,32,64,4,388],"offset":0,"phase":0,"quadratic_rows":[0,0,132,0,0,0,0,132,0]},"rank":0,"right":null},"j":51,"main_roles":[56,168],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,132,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":388},{"charts":[53,3,127,180],"hosted_roles":[827,934],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,1,0,0,0,0],"matrix_rows":[1,2,4,16,8,56,64,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,24,24,0,0,0,0]},"rank":0,"right":null},"j":52,"main_roles":[57,169],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,24,40,64,128,256],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":56},{"charts":[54,3,127,181],"hosted_roles":[828,935],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,1,0,0,0,0],"matrix_rows":[1,2,4,16,8,32,88,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,24,24,0,0,0,0]},"rank":0,"right":null},"j":53,"main_roles":[58,170],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,24,32,72,128,256],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":88},{"charts":[55,3,127,182],"hosted_roles":[829,936],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,1,0,0,0,0],"matrix_rows":[1,2,4,16,8,32,64,152,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,24,24,0,0,0,0]},"rank":0,"right":null},"j":54,"main_roles":[59,171],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,24,32,64,136,256],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":152},{"charts":[56,3,127,183],"hosted_roles":null,"input_recipe":{"left":{"linear_Z4":[0,0,0,1,1,0,0,0,0],"matrix_rows":[1,2,4,16,8,32,64,128,280],"offset":0,"phase":0,"quadratic_rows":[0,0,0,24,24,0,0,0,0]},"rank":0,"right":null},"j":55,"main_roles":[60,172],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,24,32,64,128,264],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":280},{"charts":[57,3,127,184],"hosted_roles":[832,938],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,0,1,0,0,0],"matrix_rows":[1,2,4,32,16,8,64,168,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,40,0,40,0,0,0]},"rank":0,"right":null},"j":56,"main_roles":[62,174],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,40,64,136,256],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":168},{"charts":[58,3,127,185],"hosted_roles":[833,939],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,0,1,0,0,0],"matrix_rows":[1,2,4,32,16,8,64,128,296],"offset":0,"phase":0,"quadratic_rows":[0,0,0,40,0,40,0,0,0]},"rank":0,"right":null},"j":57,"main_roles":[63,175],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,40,64,128,264],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":296},{"charts":[59,3,127,186],"hosted_roles":[834,940],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,0,0,1,0,0],"matrix_rows":[1,2,4,64,16,32,8,200,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,72,0,0,72,0,0]},"rank":0,"right":null},"j":58,"main_roles":[64,176],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,72,136,256],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":200},{"charts":[60,3,127,187],"hosted_roles":[835,941],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,0,0,1,0,0],"matrix_rows":[1,2,4,64,16,32,8,128,328],"offset":0,"phase":0,"quadratic_rows":[0,0,0,72,0,0,72,0,0]},"rank":0,"right":null},"j":59,"main_roles":[65,177],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,72,128,264],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":328},{"charts":[61,3,127,188],"hosted_roles":[836,942],"input_recipe":{"left":{"linear_Z4":[0,0,0,1,0,0,0,1,0],"matrix_rows":[1,2,4,128,16,32,64,8,392],"offset":0,"phase":0,"quadratic_rows":[0,0,0,136,0,0,0,136,0]},"rank":0,"right":null},"j":60,"main_roles":[66,178],"output_recipe":{"left":{"linear_Z4":[0,0,0,2,0,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,136,264],"offset":8,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":392},{"charts":[62,3,127,189],"hosted_roles":[837,943],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,1,0,0,0],"matrix_rows":[1,2,4,8,32,16,112,128,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,48,48,0,0,0]},"rank":0,"right":null},"j":61,"main_roles":[67,179],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,48,80,128,256],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":112},{"charts":[63,3,127,190],"hosted_roles":[838,944],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,1,0,0,0],"matrix_rows":[1,2,4,8,32,16,64,176,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,48,48,0,0,0]},"rank":0,"right":null},"j":62,"main_roles":[68,180],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,48,64,144,256],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":176},{"charts":[64,3,127,191],"hosted_roles":[839,945],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,1,0,0,0],"matrix_rows":[1,2,4,8,32,16,64,128,304],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,48,48,0,0,0]},"rank":0,"right":null},"j":63,"main_roles":[69,181],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,48,64,128,272],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":304},{"charts":[65,3,127,192],"hosted_roles":[840,946],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,0,1,0,0],"matrix_rows":[1,2,4,8,64,32,16,208,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,80,0,80,0,0]},"rank":0,"right":null},"j":64,"main_roles":[70,182],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,80,144,256],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":208},{"charts":[66,3,127,193],"hosted_roles":[841,947],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,0,1,0,0],"matrix_rows":[1,2,4,8,64,32,16,128,336],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,80,0,80,0,0]},"rank":0,"right":null},"j":65,"main_roles":[71,183],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,80,128,272],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":336},{"charts":[67,3,127,194],"hosted_roles":[842,948],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,1,0,0,1,0],"matrix_rows":[1,2,4,8,128,32,64,16,400],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,144,0,0,144,0]},"rank":0,"right":null},"j":66,"main_roles":[72,184],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,2,0,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,144,272],"offset":16,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":400},{"charts":[68,3,127,195],"hosted_roles":[843,949],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,0,1,1,0,0],"matrix_rows":[1,2,4,8,16,64,32,224,256],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,0,96,96,0,0]},"rank":0,"right":null},"j":67,"main_roles":[73,185],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,0,2,0,0,0],"matrix_rows":[1,2,4,8,16,32,96,160,256],"offset":32,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":224},{"charts":[69,3,127,196],"hosted_roles":[844,950],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,0,1,1,0,0],"matrix_rows":[1,2,4,8,16,64,32,128,352],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,0,96,96,0,0]},"rank":0,"right":null},"j":68,"main_roles":[74,186],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,0,2,0,0,0],"matrix_rows":[1,2,4,8,16,32,96,128,288],"offset":32,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":352},{"charts":[70,3,127,197],"hosted_roles":[845,951],"input_recipe":{"left":{"linear_Z4":[0,0,0,0,0,1,0,1,0],"matrix_rows":[1,2,4,8,16,128,64,32,416],"offset":0,"phase":0,"quadratic_rows":[0,0,0,0,0,160,0,160,0]},"rank":0,"right":null},"j":69,"main_roles":[75,187],"output_recipe":{"left":{"linear_Z4":[0,0,0,0,0,2,0,0,0],"matrix_rows":[1,2,4,8,16,32,64,160,288],"offset":32,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":416},{"charts":[71,3,127,198],"hosted_roles":[847,953],"input_recipe":{"left":{"linear_Z4":[0,0,1,1,1,1,1,1,0],"matrix_rows":[1,2,248,244,236,220,188,124,508],"offset":0,"phase":0,"quadratic_rows":[0,0,252,252,252,252,252,252,0]},"rank":0,"right":null},"j":70,"main_roles":[77,189],"output_recipe":{"left":{"linear_Z4":[0,0,2,0,0,0,0,0,0],"matrix_rows":[1,2,4,12,20,36,68,132,260],"offset":4,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":508},{"charts":[72,3,127,199],"hosted_roles":[848,954],"input_recipe":{"left":{"linear_Z4":[0,1,0,1,1,1,1,1,0],"matrix_rows":[1,248,4,242,234,218,186,122,506],"offset":0,"phase":0,"quadratic_rows":[0,250,0,250,250,250,250,250,0]},"rank":0,"right":null},"j":71,"main_roles":[78,190],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,10,18,34,66,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":506},{"charts":[73,3,127,200],"hosted_roles":[849,955],"input_recipe":{"left":{"linear_Z4":[0,1,1,0,1,1,1,1,0],"matrix_rows":[1,244,242,8,230,214,182,118,502],"offset":0,"phase":0,"quadratic_rows":[0,246,246,0,246,246,246,246,0]},"rank":0,"right":null},"j":72,"main_roles":[79,191],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,8,18,34,66,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":502},{"charts":[74,3,127,201],"hosted_roles":[850,956],"input_recipe":{"left":{"linear_Z4":[0,1,1,1,0,1,1,1,0],"matrix_rows":[1,236,234,230,16,206,174,110,494],"offset":0,"phase":0,"quadratic_rows":[0,238,238,238,0,238,238,238,0]},"rank":0,"right":null},"j":73,"main_roles":[80,192],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,16,34,66,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":494},{"charts":[75,3,127,202],"hosted_roles":[851,957],"input_recipe":{"left":{"linear_Z4":[0,1,1,1,1,0,1,1,0],"matrix_rows":[1,220,218,214,206,32,158,94,478],"offset":0,"phase":0,"quadratic_rows":[0,222,222,222,222,0,222,222,0]},"rank":0,"right":null},"j":74,"main_roles":[81,193],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,18,32,66,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":478},{"charts":[76,3,127,203],"hosted_roles":[852,958],"input_recipe":{"left":{"linear_Z4":[0,1,1,1,1,1,0,1,0],"matrix_rows":[1,188,186,182,174,158,64,62,446],"offset":0,"phase":0,"quadratic_rows":[0,190,190,190,190,190,0,190,0]},"rank":0,"right":null},"j":75,"main_roles":[82,194],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,18,34,64,130,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":446},{"charts":[77,3,127,204],"hosted_roles":[853,959],"input_recipe":{"left":{"linear_Z4":[0,1,1,1,1,1,1,0,0],"matrix_rows":[1,124,122,118,110,94,62,128,382],"offset":0,"phase":0,"quadratic_rows":[0,126,126,126,126,126,126,0,0]},"rank":0,"right":null},"j":76,"main_roles":[83,195],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,18,34,66,128,258],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":382},{"charts":[78,3,127,205],"hosted_roles":[854,960],"input_recipe":{"left":{"linear_Z4":[0,1,1,1,1,1,1,0,0],"matrix_rows":[1,124,122,118,110,94,62,254,256],"offset":0,"phase":0,"quadratic_rows":[0,126,126,126,126,126,126,0,0]},"rank":0,"right":null},"j":77,"main_roles":[84,196],"output_recipe":{"left":{"linear_Z4":[0,2,0,0,0,0,0,0,0],"matrix_rows":[1,2,6,10,18,34,66,130,256],"offset":2,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":254},{"charts":[79,3,127,206],"hosted_roles":[855,961],"input_recipe":{"left":{"linear_Z4":[1,0,0,1,1,1,1,1,0],"matrix_rows":[248,2,4,241,233,217,185,121,505],"offset":0,"phase":0,"quadratic_rows":[249,0,0,249,249,249,249,249,0]},"rank":0,"right":null},"j":78,"main_roles":[85,197],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,4,9,17,33,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":505},{"charts":[80,3,127,207],"hosted_roles":[856,962],"input_recipe":{"left":{"linear_Z4":[1,0,1,0,1,1,1,1,0],"matrix_rows":[244,2,241,8,229,213,181,117,501],"offset":0,"phase":0,"quadratic_rows":[245,0,245,0,245,245,245,245,0]},"rank":0,"right":null},"j":79,"main_roles":[86,198],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,8,17,33,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":501},{"charts":[81,3,127,208],"hosted_roles":[857,963],"input_recipe":{"left":{"linear_Z4":[1,0,1,1,0,1,1,1,0],"matrix_rows":[236,2,233,229,16,205,173,109,493],"offset":0,"phase":0,"quadratic_rows":[237,0,237,237,0,237,237,237,0]},"rank":0,"right":null},"j":80,"main_roles":[87,199],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,16,33,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":493},{"charts":[82,3,127,209],"hosted_roles":[858,964],"input_recipe":{"left":{"linear_Z4":[1,0,1,1,1,0,1,1,0],"matrix_rows":[220,2,217,213,205,32,157,93,477],"offset":0,"phase":0,"quadratic_rows":[221,0,221,221,221,0,221,221,0]},"rank":0,"right":null},"j":81,"main_roles":[88,200],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,17,32,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":477},{"charts":[83,3,127,210],"hosted_roles":[859,965],"input_recipe":{"left":{"linear_Z4":[1,0,1,1,1,1,0,1,0],"matrix_rows":[188,2,185,181,173,157,64,61,445],"offset":0,"phase":0,"quadratic_rows":[189,0,189,189,189,189,0,189,0]},"rank":0,"right":null},"j":82,"main_roles":[89,201],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,17,33,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":445},{"charts":[84,3,127,211],"hosted_roles":[860,966],"input_recipe":{"left":{"linear_Z4":[1,0,1,1,1,1,1,0,0],"matrix_rows":[124,2,121,117,109,93,61,128,381],"offset":0,"phase":0,"quadratic_rows":[125,0,125,125,125,125,125,0,0]},"rank":0,"right":null},"j":83,"main_roles":[90,202],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,17,33,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":381},{"charts":[85,3,127,212],"hosted_roles":[861,967],"input_recipe":{"left":{"linear_Z4":[1,0,1,1,1,1,1,0,0],"matrix_rows":[124,2,121,117,109,93,61,253,256],"offset":0,"phase":0,"quadratic_rows":[125,0,125,125,125,125,125,0,0]},"rank":0,"right":null},"j":84,"main_roles":[91,203],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,2,5,9,17,33,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":253},{"charts":[86,3,127,213],"hosted_roles":[862,968],"input_recipe":{"left":{"linear_Z4":[1,1,0,0,1,1,1,1,0],"matrix_rows":[242,241,4,8,227,211,179,115,499],"offset":0,"phase":0,"quadratic_rows":[243,243,0,0,243,243,243,243,0]},"rank":0,"right":null},"j":85,"main_roles":[92,204],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,8,17,33,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":499},{"charts":[87,3,127,214],"hosted_roles":[864,970],"input_recipe":{"left":{"linear_Z4":[1,1,0,1,1,0,1,1,0],"matrix_rows":[218,217,4,211,203,32,155,91,475],"offset":0,"phase":0,"quadratic_rows":[219,219,0,219,219,0,219,219,0]},"rank":0,"right":null},"j":86,"main_roles":[94,206],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,9,17,32,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":475},{"charts":[88,3,127,215],"hosted_roles":[865,971],"input_recipe":{"left":{"linear_Z4":[1,1,0,1,1,1,0,1,0],"matrix_rows":[186,185,4,179,171,155,64,59,443],"offset":0,"phase":0,"quadratic_rows":[187,187,0,187,187,187,0,187,0]},"rank":0,"right":null},"j":87,"main_roles":[95,207],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,9,17,33,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":443},{"charts":[89,3,127,216],"hosted_roles":[866,972],"input_recipe":{"left":{"linear_Z4":[1,1,0,1,1,1,1,0,0],"matrix_rows":[122,121,4,115,107,91,59,128,379],"offset":0,"phase":0,"quadratic_rows":[123,123,0,123,123,123,123,0,0]},"rank":0,"right":null},"j":88,"main_roles":[96,208],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,9,17,33,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":379},{"charts":[90,3,127,217],"hosted_roles":[867,973],"input_recipe":{"left":{"linear_Z4":[1,1,0,1,1,1,1,0,0],"matrix_rows":[122,121,4,115,107,91,59,251,256],"offset":0,"phase":0,"quadratic_rows":[123,123,0,123,123,123,123,0,0]},"rank":0,"right":null},"j":89,"main_roles":[97,209],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,4,9,17,33,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":251},{"charts":[91,3,127,218],"hosted_roles":[868,974],"input_recipe":{"left":{"linear_Z4":[1,1,1,0,0,1,1,1,0],"matrix_rows":[230,229,227,8,16,199,167,103,487],"offset":0,"phase":0,"quadratic_rows":[231,231,231,0,0,231,231,231,0]},"rank":0,"right":null},"j":90,"main_roles":[98,210],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,8,16,33,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":487},{"charts":[92,3,127,219],"hosted_roles":[869,975],"input_recipe":{"left":{"linear_Z4":[1,1,1,0,1,0,1,1,0],"matrix_rows":[214,213,211,8,199,32,151,87,471],"offset":0,"phase":0,"quadratic_rows":[215,215,215,0,215,0,215,215,0]},"rank":0,"right":null},"j":91,"main_roles":[99,211],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,8,17,32,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":471},{"charts":[93,3,127,220],"hosted_roles":[870,976],"input_recipe":{"left":{"linear_Z4":[1,1,1,0,1,1,0,1,0],"matrix_rows":[182,181,179,8,167,151,64,55,439],"offset":0,"phase":0,"quadratic_rows":[183,183,183,0,183,183,0,183,0]},"rank":0,"right":null},"j":92,"main_roles":[100,212],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,8,17,33,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":439},{"charts":[94,3,127,221],"hosted_roles":[871,977],"input_recipe":{"left":{"linear_Z4":[1,1,1,0,1,1,1,0,0],"matrix_rows":[118,117,115,8,103,87,55,128,375],"offset":0,"phase":0,"quadratic_rows":[119,119,119,0,119,119,119,0,0]},"rank":0,"right":null},"j":93,"main_roles":[101,213],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,8,17,33,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":375},{"charts":[95,3,127,222],"hosted_roles":[872,978],"input_recipe":{"left":{"linear_Z4":[1,1,1,0,1,1,1,0,0],"matrix_rows":[118,117,115,8,103,87,55,247,256],"offset":0,"phase":0,"quadratic_rows":[119,119,119,0,119,119,119,0,0]},"rank":0,"right":null},"j":94,"main_roles":[102,214],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,8,17,33,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":247},{"charts":[96,3,127,223],"hosted_roles":[873,979],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,0,0,1,1,0],"matrix_rows":[206,205,203,199,16,32,143,79,463],"offset":0,"phase":0,"quadratic_rows":[207,207,207,207,0,0,207,207,0]},"rank":0,"right":null},"j":95,"main_roles":[103,215],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,16,32,65,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":463},{"charts":[97,3,127,224],"hosted_roles":[874,980],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,0,1,0,1,0],"matrix_rows":[174,173,171,167,16,143,64,47,431],"offset":0,"phase":0,"quadratic_rows":[175,175,175,175,0,175,0,175,0]},"rank":0,"right":null},"j":96,"main_roles":[104,216],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,16,33,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":431},{"charts":[98,3,127,225],"hosted_roles":[875,981],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,0,1,1,0,0],"matrix_rows":[110,109,107,103,16,79,47,128,367],"offset":0,"phase":0,"quadratic_rows":[111,111,111,111,0,111,111,0,0]},"rank":0,"right":null},"j":97,"main_roles":[105,217],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,16,33,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":367},{"charts":[99,3,127,226],"hosted_roles":[876,982],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,0,1,1,0,0],"matrix_rows":[110,109,107,103,16,79,47,239,256],"offset":0,"phase":0,"quadratic_rows":[111,111,111,111,0,111,111,0,0]},"rank":0,"right":null},"j":98,"main_roles":[106,218],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,16,33,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":239},{"charts":[100,3,127,227],"hosted_roles":[877,983],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,1,0,0,1,0],"matrix_rows":[158,157,155,151,143,32,64,31,415],"offset":0,"phase":0,"quadratic_rows":[159,159,159,159,159,0,0,159,0]},"rank":0,"right":null},"j":99,"main_roles":[107,219],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,17,32,64,129,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":415},{"charts":[101,3,127,228],"hosted_roles":[878,984],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,1,0,1,0,0],"matrix_rows":[94,93,91,87,79,32,31,128,351],"offset":0,"phase":0,"quadratic_rows":[95,95,95,95,95,0,95,0,0]},"rank":0,"right":null},"j":100,"main_roles":[108,220],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,17,32,65,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":351},{"charts":[102,3,127,229],"hosted_roles":[879,985],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,1,0,1,0,0],"matrix_rows":[94,93,91,87,79,32,31,223,256],"offset":0,"phase":0,"quadratic_rows":[95,95,95,95,95,0,95,0,0]},"rank":0,"right":null},"j":101,"main_roles":[109,221],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,17,32,65,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":223},{"charts":[103,3,127,230],"hosted_roles":[880,986],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,1,1,0,0,0],"matrix_rows":[62,61,59,55,47,31,64,128,319],"offset":0,"phase":0,"quadratic_rows":[63,63,63,63,63,63,0,0,0]},"rank":0,"right":null},"j":102,"main_roles":[110,222],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,17,33,64,128,257],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":319},{"charts":[104,3,127,231],"hosted_roles":[881,987],"input_recipe":{"left":{"linear_Z4":[1,1,1,1,1,1,0,0,0],"matrix_rows":[62,61,59,55,47,31,64,191,256],"offset":0,"phase":0,"quadratic_rows":[63,63,63,63,63,63,0,0,0]},"rank":0,"right":null},"j":103,"main_roles":[111,223],"output_recipe":{"left":{"linear_Z4":[2,0,0,0,0,0,0,0,0],"matrix_rows":[1,3,5,9,17,33,64,129,256],"offset":1,"phase":3,"quadratic_rows":[0,0,0,0,0,0,0,0,0]},"rank":0,"right":null},"q":191}] diff --git a/research/p104-banked-chart595-split/native_support/PR7682-PHASE-RESULT.json b/research/p104-banked-chart595-split/native_support/PR7682-PHASE-RESULT.json new file mode 100644 index 0000000000..a2b5309098 --- /dev/null +++ b/research/p104-banked-chart595-split/native_support/PR7682-PHASE-RESULT.json @@ -0,0 +1 @@ +{"actual_cycle_control_rejected":97471,"actual_phase_control_rejected":[97471,261,912],"artifact_sha256":{"BANK-RECIPES.json.gz":"06dbe8d913627dbfef6cfe6599fd8eaa7fd82daddf72253b1f9bc5cb5a4eb0e9","MAIN-BOUNDARIES.json":"52f7260cf935ce523f5e899c7f384765b56a257bce93bdc4427417df3ba971e0","PIVOT-DIRECTIONS.json":"b71c45c78cee0386294c868f8a0de2687094dce99cf41f88eb1448710848ca77","START.json":"5f042e373da3683cd32609f07c0af44954cdb0cc365305b199261d0cb1122e68"},"cached_same_basis_bodies_fresh_pauli_and_phase":3011,"caller_sha256":"62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf","candidate":{"directed_union":3024,"helper_325_1087_EG":{"325":[3,237],"1087":[3,237]},"local_terms":169349,"move_occurrences":6142,"move_pairs":2977,"native_paid":{"1":3939,"2":882,"3":605,"4":245,"5":362,"6":87,"7":11,"8":7,"9":4},"native_targets":{"1":18,"2":21,"3":47,"4":227,"5":78,"6":44,"7":19,"8":32,"9":615},"productive_occurrences":1101,"productive_pairs":187,"scheduled_forms":7643},"complete_at":"2026-11-18T07:33:09.462960+00:00","diagnostic_only_pivot_orientations":5,"forward_union":3025,"fresh_maps_512_each_direction":19,"graph_pins":{"candidate":"1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150","peer":"d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098"},"hosted_correspondences":96,"main_boundary_pairs":104,"pivot_manifest_sha256":"fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85","role230_direct":"ab5653d6b6007f8a7987e7ffc6ebab24c662ba852a0d0b446c3a1be19b88db8a","scope":"Actual bank graph map census, all fresh exact Pauli/phase, all columns on changed/unbound pairs and pivot orientations. Separate full held-array and physical storage/resource tests.","source":{"directed_union":3024,"helper_325_1087_EG":{"325":[3,237],"1087":[3,237]},"local_terms":169343,"move_occurrences":6142,"move_pairs":2977,"native_paid":{"1":3939,"2":881,"3":607,"4":244,"5":362,"6":87,"7":11,"8":7,"9":4},"native_targets":{"1":18,"2":21,"3":47,"4":227,"5":78,"6":44,"7":19,"8":32,"9":615},"productive_occurrences":1101,"productive_pairs":187,"scheduled_forms":7643},"source_head":"28b2af322a1fab01b3734365988930920f9dda48","source_word":"ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d","status":"PASS_PAIRED_BANK24_EXACT_NATIVE_MAPS"} diff --git a/research/p104-banked-chart595-split/native_support/clifford_exact.py b/research/p104-banked-chart595-split/native_support/clifford_exact.py new file mode 100644 index 0000000000..166841a037 --- /dev/null +++ b/research/p104-banked-chart595-split/native_support/clifford_exact.py @@ -0,0 +1,149 @@ +"""Small exact Gaussian-dyadic Clifford compiler, independent of gx internals. +Paulis use i^p X^x Z^z. State vectors use integer Gaussian numerators / 2^d. +The tableau is supplemented by a literal circuit, so global phases are kept. +""" +from dataclasses import dataclass + +def parity(x):return x.bit_count()&1 +def rank(rows): + p={} + for x in rows: + while x: + b=x.bit_length()-1 + if b not in p:p[b]=x;break + x^=p[b] + return len(p) +def transpose(rows,n):return tuple(sum(((rows[j]>>i)&1)<>j&1);a[j],a[k]=a[k],a[j] + for i in range(n): + if i!=j and a[i]>>j&1:a[i]^=a[j] + assert [r&((1<>n for r in a) +def basis_extend(cols,n): + out=[] + for x in list(cols)+[1<len(out):out.append(x) + assert len(out)==n + return tuple(out) +def nullspace(rows,n): + a=list(rows);p=[];k=0 + for j in range(n): + t=next((i for i in range(k,len(a)) if a[i]>>j&1),None) + if t is None:continue + a[t],a[k]=a[k],a[t] + for i in range(len(a)): + if i!=k and a[i]>>j&1:a[i]^=a[k] + p.append(j);k+=1 + return tuple((1<>j)&1)<>i&1:out=pmul(out,T[i]) + for i in range(n): + if z>>i&1:out=pmul(out,T[n+i]) + return out +def compose(A,B):return tuple(apply(A,p) for p in B) +def inverse(T): + n=len(T)//2;cols=[x|(z<>n;u,v,p=apply(T,(x,z,0));assert (u,v)==identity(n)[j][:2];out.append((x,z,(-p)%4)) + return tuple(out) +def qvalue(Q,alpha,x,n): + return (sum(alpha[i] for i in range(n) if x>>i&1)+2*sum(parity((Q[i]>>(i+1))&(x>>(i+1))) for i in range(n) if x>>i&1))%4 +def mul_i(a,p): + x,y=a;p%=4 + return [(x,y),(-y,x),(-x,-y),(y,-x)][p] +@dataclass +class Op: + n:int + tab:tuple + circuit:list + def then(self,b): + assert self.n==b.n + return Op(self.n,compose(b.tab,self.tab),self.circuit+b.circuit) + def adjoint(self): + circ=[] + for e in reversed(self.circuit): + if e[0]=='P':circ.append(('P',inv(e[1],self.n))) + elif e[0]=='D':circ.append(('D',e[1],tuple((-x)%4 for x in e[2]))) + elif e[0]=='C':circ.append(('C',e[1],-e[2])) + elif e[0]=='phase':circ.append(('phase',(-e[1])%4)) + else:circ.append(e) + return Op(self.n,inverse(self.tab),circ) + def zero_state(self,basis=0): + N=1<>i)&1 for i in range(n)) + assert all(alpha[i]%2==(Q[i]>>i)&1 for i in range(n)) + return Op(n,tuple([(1<>i&1 else 0,1<>i&1 else 0) for i in range(n)]),[('C',q,sgn)]) +def xgate(n,b):return Op(n,tuple([(1<>i)&1)) for i in range(n)]),[('X',b)]) +def fourier(n,axes=None): + out=ident(n) + for i in range(n) if axes is None else axes:out=out.then(cgate(n,1<len(selected):picks.append(j);selected.append(x) + assert len(picks)==r and all(x>>r==0 for x in Bcols) + Br=transpose(selected,r);Bi=inv(Br,r);Dr=transpose([Dcols[j]&((1<> j) & 1) << i for i, row in enumerate(matrix)) for j in range(len(matrix))) + + +def inverse(matrix): + n = len(matrix) + rows = [row | (1 << (n+i)) for i, row in enumerate(matrix)] + for j in range(n): + pivot = next((i for i in range(j, n) if rows[i] >> j & 1), None) + require(pivot is not None, 'singular binary chart') + rows[j], rows[pivot] = rows[pivot], rows[j] + for i in range(n): + if i != j and rows[i] >> j & 1: + rows[i] ^= rows[j] + require([row & ((1 << n)-1) for row in rows] == [1 << i for i in range(n)], 'binary inverse') + return tuple(row >> n for row in rows) + + +def extend(vectors, n): + columns, pivots = [], {} + for value in tuple(vectors) + tuple(1 << i for i in range(n)): + reduced = value + while reduced: + j = reduced.bit_length()-1 + if j not in pivots: + pivots[j] = reduced + columns.append(value) + break + reduced ^= pivots[j] + require(len(columns) == n, 'frame basis extension') + return tuple(columns) + + +def adjoint(circuit): + out = [] + for gate in reversed(circuit): + if gate[0] == 'P': + out.append(('P', inverse(gate[1]))) + elif gate[0] == 'D': + out.append(('D', gate[1], tuple(-a % 4 for a in gate[2]))) + elif gate[0] == 'C': + out.append(('C', gate[1], -gate[2])) + elif gate[0] == 'phase': + out.append(('phase', -gate[1] % 4)) + else: + require(gate[0] == 'X', 'adjoint gate type') + out.append(gate) + return tuple(out) + + +def fourier(rank): + return tuple(('C', 1 << i, 1) for i in range(rank)) + + +def frame(vectors, n): + rank = len(vectors) + if rank == 0: + return () + if rank == n: + return fourier(n) + matrix = transpose(extend(vectors, n)) + columns = transpose(inverse(matrix)) + quadratic = tuple((1 << i) ^ sum(parity(a & b) << j for j, b in enumerate(columns)) for i, a in enumerate(columns)) + diagonal = tuple((row >> i) & 1 for i, row in enumerate(quadratic)) + chart = (('P', matrix), ('D', quadratic, diagonal)) + return adjoint(chart) + fourier(rank) + chart + + +def monomial(record): + matrix = tuple(record['matrix_rows']) + quadratic = tuple(record['quadratic_rows']) + linear = tuple(record['linear_Z4']) + require(transpose(quadratic) == quadratic, 'quadratic symmetry') + require(len(matrix) == len(quadratic) == len(linear) == 9, 'monomial dimension') + require(all(a % 2 == (quadratic[i] >> i) & 1 for i, a in enumerate(linear)), 'diagonal parity') + inverse(matrix) + return (('D', quadratic, linear), ('P', matrix), ('X', record['offset']), ('phase', record['phase'])) + + +def recipe(record): + rank = record['rank'] + require(isinstance(rank, int) and 0 <= rank <= 9, 'child rank') + if rank == 0: + require(record['right'] is None, 'rank zero right factor') + return monomial(record['left']) + return monomial(record['right']) + fourier(rank) + monomial(record['left']) + + +def tableau(circuit, n=9): + rows = [(1 << i, 0, 0) for i in range(n)] + [(0, 1 << i, 0) for i in range(n)] + for gate in circuit: + tag = gate[0] + out = [] + inverse_transpose = transpose(inverse(gate[1])) if tag == 'P' else None + for x, z, phase in rows: + if tag == 'P': + x, z = mul(gate[1], x), mul(inverse_transpose, z) + elif tag == 'X': + phase += 2 * parity(z & gate[1]) + elif tag == 'C': + if parity(z & gate[1]): + x ^= gate[1] + phase += 3 * gate[2] + elif tag == 'D': + quadratic, linear = gate[1:] + phase += sum(linear[i] for i in range(n) if x >> i & 1) + phase += 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(n) if x >> i & 1) + z ^= mul(quadratic, x) + else: + require(tag == 'phase', 'tableau gate type') + out.append((x, z, phase % 4)) + rows = out + return tuple(rows) + + +@lru_cache(maxsize=512) +def action(gate): + if gate[0] == 'P': + return tuple(mul(gate[1], x) for x in range(512)) + require(gate[0] == 'D', 'state action type') + quadratic, linear = gate[1:] + return tuple((sum(linear[i] for i in range(9) if x >> i & 1) + + 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(9) if x >> i & 1)) % 4 for x in range(512)) + + +def rotate(pair, power): + a, b = pair + return ((a, b), (-b, a), (-a, -b), (b, -a))[power % 4] + + +def state(circuit, basis=0): + value, denominator = {basis: (1, 0)}, 0 + for gate in circuit: + tag = gate[0] + result = {} + if tag == "C": + direction, sign = gate[1:] + for address, (a, b) in value.items(): + for target, pair in ((address, (a - sign*b, b + sign*a)), + (address ^ direction, (a + sign*b, b - sign*a))): + old = result.get(target, (0, 0)) + result[target] = (old[0] + pair[0], old[1] + pair[1]) + denominator += 1 + else: + for address, pair in value.items(): + if tag == "P": + target = mul(gate[1], address) + elif tag == "X": + target = address ^ gate[1] + else: + target = address + if tag == "D": + pair = rotate(pair, action(gate)[address]) + else: + require(tag == "phase", "Unknown Gaussian state gate") + pair = rotate(pair, gate[1]) + require(target not in result, "A monomial address map is not injective") + result[target] = pair + value = {address: pair for address, pair in result.items() if pair != (0, 0)} + while denominator and all((a | b) % 2 == 0 for a, b in value.values()): + denominator -= 1 + value = {address: (a//2, b//2) for address, (a, b) in value.items()} + return value, denominator + + +def equal(actual, expected, label): + require(tableau(actual) == tableau(expected), label + ": signed Pauli action") + require(state(actual) == state(expected), label + ": exact global phase") + + +def verify(data, certificate): + word = data["word"] + original, clean = data["programs"], data["clean_programs"] + source_recipes = data["recipes"] + residuals = data["residuals"]["recipes"] + native_tags = {"climb", "adapter", "residual_adapter"} + for orientation in ("forward", "backward"): + native = [event for event in clean[orientation] if event[0] in native_tags] + require(native == [event for event in original[orientation] if event[0] in native_tags], + "A retained native event changed") + require(len(native) == 5056, "The retained native event count changed") + frames = [frame(tuple(vectors), 9) for vectors in word["frames"]] + used = {(event[3], event[4]) for program in clean.values() + for event in program if event[0] == "climb"} + children = {(record["old"], record["new"]): record for record in source_recipes["children"]} + require(len(children) == len(source_recipes["children"]) and used <= set(children), + "The retained child recipe coverage is incomplete") + for old, new in sorted(used): + record = children[old, new] + require(record["rank"] == len(word["frames"][new]) - len(word["frames"][old]), + "A retained child has the wrong rank") + equal(recipe(record), adjoint(frames[old]) + frames[new], "Retained child") + endpoints = {(record["role"], record["port"]): record + for record in source_recipes["endpoint_adapters"]} + require(len(endpoints) == len(source_recipes["endpoint_adapters"]) + and set(endpoints) == {(role, p) for role in ("source", "target") for p in range(112)}, + "The endpoint adapter coverage is incomplete") + for (role, port), record in endpoints.items(): + direction = word["ports"][port] + conventional = (("C", direction, 1),) if role == "source" else ( + ("C", direction, -1),) + fourier(9) + index = word["start"][port] if role == "source" else word["final"][112 + port] + require(record["frame"] == index and record["rank"] == 0, "An endpoint frame changed") + equal(recipe(record), adjoint(conventional) + frames[index], "Endpoint adapter") + used_residuals = set() + for program in clean.values(): + for event in program: + if event[0] != "residual_adapter": + continue + _, position, register, entry, *tail = event + terminal = tail[0] if tail else 1 + key = str(entry) if terminal == 1 else str(entry) + ":" + str(terminal) + require(key in residuals and position in ("pre", "post"), "A residual binding changed") + require(entry == word["start"][register] and terminal == word["final"][register], + "A residual endpoint changed") + used_residuals.add(key) + for key in sorted(used_residuals): + record = residuals[key] + equal(recipe(record), adjoint(frames[record["frame"]]) + frames[record.get("terminal", 1)], + "Residual adapter") + records = certificate["input_recipes"] + ports = certificate["compensation_ports"] + require([record["port"] for record in records] == ports and len(records) == 8, + "The eight input recipes changed") + columns = 0 + for item in records: + port, label = item["port"], item["label"] + require(label == word["ports"][port] and item["canonical_start_frame_id"] == word["start"][port], + "An input recipe has the wrong supplier label") + record = item["recipe"] + require(record["rank"] == 1, "An input copy has the wrong child rank") + for side in ("left", "right"): + factor = record[side] + require(factor["quadratic_rows"] == [0] * 9 and factor["linear_Z4"] == [0] * 9 + and factor["offset"] == factor["phase"] == 0, + "An input factor is not an address permutation") + actual, expected = recipe(record), (("C", label, 1),) + equal(actual, expected, "Positive inherited input line") + for basis in range(512): + require(state(actual, basis) == state(expected, basis), "A complete input Gaussian column differs") + columns += 1 + negative = monomial(record["right"]) + (("C", 1, -1),) + monomial(record["left"]) + require(tableau(negative) != tableau(expected) or state(negative) != state(expected), + "An inverse input child was not detected") + phased = actual + (("phase", 1),) + require(tableau(phased) == tableau(actual) and state(phased) != state(expected), + "An input phase-only error was not detected") + return {"status": "PASS_EXACT_INPUT_NATIVE_FRAMES", "retained_native_events_per_orientation": 5056, + "retained_child_recipes": len(used), "endpoint_adapter_recipes": len(endpoints), + "residual_adapter_recipes": len(used_residuals), "new_input_recipes": len(records), + "new_exact_gaussian_columns": columns, "inverse_input_child_controls": len(records), + "phase_only_controls": len(records), "address_permutation_factors": 2 * len(records), + "method": "Independent signed Pauli and exact Gaussian interpretation; no compiler import", + "scope": "Positive inherited input frames before every retained adapter. No recursive hosting claim."} diff --git a/research/p104-banked-chart595-split/operator.py b/research/p104-banked-chart595-split/operator.py new file mode 100644 index 0000000000..aa393db66b --- /dev/null +++ b/research/p104-banked-chart595-split/operator.py @@ -0,0 +1,484 @@ +#!/usr/bin/env python3 +"""Independently replay the two complete normalized chart-595 operators.""" + +from argparse import ArgumentParser +from collections import defaultdict +from dataclasses import dataclass, replace +from fractions import Fraction +from functools import cache +import gzip +from hashlib import sha256 +import json +from math import gcd, lcm +from pathlib import Path + + +HERE = Path(__file__).resolve().parent +SOURCE_HEAD = "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e" +PARENT_SHA = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +CANDIDATE_SHA = "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b" +EDIT_SHA = "c8a914049eb36f5f307dfabef080169bbee06c024eab77b75249566028ca3fcf" +PORTS_SHA = "622c6f458eba2dab0fdfd6050303cbc16ad684ab8b834c7df568264e4cf01db6" +PIVOTS_SHA = "fb22afc8aaf543e62709fa682f222577e6bdf4e1f1994d307784468314c3da85" +UNIT = Fraction(1) +EMPTY = (1, {}) +OLD_ROLE = 281 +FRESH = 1501 +A, C, B = 3, 595, 127 + + +def require(condition, reason): + if not condition: + raise ValueError(reason) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def read_pinned(path, digest, packed=False): + raw = path.read_bytes() + data = gzip.decompress(raw) if packed else raw + require(sha256(data).hexdigest() == digest, f"exact input bytes for {path.name}") + result = json.loads(data) + if packed: + require(canonical(result) == data, f"canonical graph serialization for {path.name}") + return result + + +@cache +def scalar(text): + result = Fraction(text) + require(bool(result) and str(result) == text, "nonzero canonical rational coefficient") + return result + + +def parsed_terms(entries): + terms = {token: scalar(q) for token, q in entries} + require(len(terms) == len(entries) and all(type(token) is int for token in terms), "unique typed coefficient keys") + return terms + + +@dataclass(frozen=True) +class Graph: + frames: list + initial: list + final: list + start: int + moves: dict + forms: dict + order: list + metadata: dict + + @property + def width(self): + return len(self.initial) + + @property + def terminals(self): + return range(self.start, self.start + self.width) + + +def graph_from(raw, size): + moves = {key: (source, target) for key, source, target in raw["moves"]} + forms = {key: parsed_terms(row) for key, row in raw["forms"]} + require(len(moves) == len(raw["moves"]) == 6142, "complete unique paid MOVE inventory") + require(len(forms) == len(raw["forms"]) == 6142 + size, "complete unique saved and terminal inventory") + require(raw["first_output"] == 150522 and len(raw["initial"]) == len(raw["final"]) == size, + "explicit stable terminal namespace and public role denominator") + graph = Graph(raw["frames"], raw["initial"], raw["final"], raw["first_output"], moves, forms, + raw["schedule"], raw["metadata"]) + schedule(graph) + return graph + + +def schedule(graph): + terminals = set(graph.terminals) + require(not terminals & graph.moves.keys() and set(graph.forms) == terminals | graph.moves.keys(), + "explicit complete terminal inventory") + require(len(graph.order) == len(graph.forms) and set(graph.order) == set(graph.forms), + "each paid and terminal row is scheduled once") + available = {~role: chart for role, chart in enumerate(graph.initial)} + require(len(graph.frames) == 1097 and all(type(chart) is int and 0 <= chart < len(graph.frames) + for chart in [*graph.initial, *graph.final]), "typed public chart endpoints") + for key in graph.order: + if key in graph.moves: + source, target = graph.moves[key] + require(0 <= source < len(graph.frames) and 0 <= target < len(graph.frames), "typed paid chart endpoints") + else: + source = graph.final[key - graph.start] + for token in graph.forms[key]: + require(token in available, f"early, absent or terminal donor at stable key {key}") + require(available[token] == source, f"noncoframed donor at stable key {key}") + if key in graph.moves: + available[key] = target + require(len(available) == graph.width + len(graph.moves), "distinct preserved snapshots and public origins") + return available + + +def coordinate(i): + return 1, {i: 1} + + +def linear(terms): + """Return an exact sparse row with its own reduced common denominator.""" + active = [(q, denominator, values) for q, (denominator, values) in terms if q and values] + denominator = lcm(*(q.denominator * d for q, d, _ in active)) + result = {} + for coefficient, divisor, vector in active: + multiplier = coefficient.numerator * (denominator // (divisor * coefficient.denominator)) + for i, basis_coefficient in vector.items(): + result[i] = result.get(i, 0) + multiplier * basis_coefficient + result = {i: value for i, value in result.items() if value} + content = gcd(denominator, *result.values()) + return denominator // content, {i: value // content for i, value in result.items()} + + +def weighted(terms, rows): + return linear((q, rows[token]) for token, q in terms.items()) + + +def numerator_items(row): + denominator, values = row + return ((i, Fraction(value, denominator)) for i, value in values.items()) + + +def forward(graph): + rows = {~role: coordinate(role) for role in range(graph.width)} + products = 0 + for token in graph.order: + terms = graph.forms[token] + products += sum(len(rows[donor][1]) for donor in terms) + rows[token] = weighted(terms, rows) + return rows, products + + +def reverse_columns(graph): + """Propagate unit output labels along reversed scalar incidences.""" + downstream = defaultdict(list) + for consumer, terms in graph.forms.items(): + for donor, q in terms.items(): + downstream[donor].append((consumer, q)) + columns = {token: coordinate(i) for i, token in enumerate(graph.terminals)} + products = 0 + reverse_order = [token for token in reversed(graph.order) if token in graph.moves] + reverse_order.extend(~role for role in range(graph.width)) + for token in reverse_order: + terms = downstream[token] + products += sum(len(columns[consumer][1]) for consumer, _ in terms) + columns[token] = linear((q, columns[consumer]) for consumer, q in terms) + return [columns[~i] for i in range(graph.width)], products + + +def transpose_rows(rows): + columns = [[] for _ in rows] + for i, row in enumerate(rows): + for j, value in numerator_items(row): + columns[j].append((value, coordinate(i))) + return [linear(column) for column in columns] + + +def reference_ports(layout): + require(layout["public"] == 1501 and len(layout["live"]) == len(layout["ports"]) == 104, + "all original P104 boundary ports") + hosted = layout["hosted"] + a_ports = set(hosted["Dports"]) + require(len(a_ports) == len(hosted["X2"]) == len(hosted["Y2"]) == 96, "96 paired A and eight B ports") + rows = [coordinate(role) for role in range(layout["public"])] + mains = set() + for port, x in enumerate(layout["live"]): + y = x + 112 + mains.update((x, y)) + if port in a_ports: + rows[y] = 1, {x: 1, y: 1} + else: + rows[x] = 1, {x: 1, y: -1} + rows[y] = 2, {x: 1, y: 1} + for x, y in zip(hosted["X2"], hosted["Y2"], strict=True): + rows[x] = 1, {x: 1, y: -1} + mains.update((x, y)) + require(len(mains) == 400, "all distinct original main input/output roles") + return rows, mains + + +def checked_endpoints(graph, rows, expected): + require(len(expected) == graph.width, "one separate independent target for each public input") + for i, key in enumerate(graph.terminals): + require(rows[key] == expected[i], f"normalized external row {i}") + + +def impulse_response(graph, injections): + """Evaluate the baseline graph on zero inputs with a unit correction parameter.""" + result = {} + for token in graph.order: + response = injections.get(token, 0) + for donor, q in graph.forms[token].items(): + if donor in result: + response += q * result[donor] + if response: + result[token] = response + return result + + +def codec(group, functional, direction): + require(OLD_ROLE in group and functional.keys() <= group and direction.keys() <= group, + "both exact codec factors live in the retained 615-field block") + require(sum((q * direction.get(i, 0) for i, q in functional.items()), Fraction()) == 1, + "exact normalized pairing between the prefix and suffix") + pivot = functional[OLD_ROLE] + encoder = {i: coordinate(i) for i in range(FRESH)} + encoder[OLD_ROLE] = linear([(-q / pivot, coordinate(i)) for i, q in functional.items() if i != OLD_ROLE] + + [(direction.get(OLD_ROLE, 0), coordinate(OLD_ROLE))]) + for i in group - {OLD_ROLE}: + encoder[i] = linear(((UNIT, coordinate(i)), (direction.get(i, 0), coordinate(OLD_ROLE)))) + require(weighted(functional, encoder) == coordinate(OLD_ROLE), "group encoder recovers arbitrary first coordinate") + for i in group - {OLD_ROLE}: + retained = linear(((UNIT, encoder[i]), (-direction.get(i, 0), coordinate(OLD_ROLE)))) + require(retained == coordinate(i), f"group encoder does not consume retained owner {i}") + return encoder + + +def composition(row, encoder, response): + terms = [(q, encoder[i]) for i, q in numerator_items(row)] + if response: + terms.append((response, (1, {OLD_ROLE: -1, FRESH: 1}))) + return linear(terms) + + +def add_coefficient(form, donor, coefficient): + coefficient += form.get(donor, 0) + if coefficient: + form[donor] = coefficient + else: + form.pop(donor, None) + + +def check_literal_paid_forms(parent, child, encoded, prefix, suffix): + borrowed_inputs = {~i: {~j: q for j, q in numerator_items(row)} for i, row in encoded.items()} + rewritten = [] + for key in parent.moves: + old = parent.forms[key] + form = {} + for donor, q in old.items(): + if donor < 0: + for replacement, factor in borrowed_inputs[donor].items(): + add_coefficient(form, replacement, q * factor) + else: + add_coefficient(form, donor, q) + if form != old: + rewritten.append(key) + pulse = suffix.get(key) + if pulse: + add_coefficient(form, ~FRESH, pulse) + for node, q in prefix.items(): + add_coefficient(form, node, -pulse * q) + require(form == child.forms[key], f"literal paid row equals codec plus specified departure pulse at {key}") + require(len(rewritten) == 340 and not set(rewritten) & suffix.keys(), "full disjoint 340 ingress and ten departure rows") + return len(rewritten) + + +def check_pivot_observations(pivots, parent, child, old_rows, new_rows, encoded, response): + require(len(pivots) == 15 and sum(row["direction"] == "forward" for row in pivots) == 7, + "all seven forward and eight transposed published pivot scopes") + result = [] + for index, record in enumerate(pivots): + groups = {name: parsed_terms(record[name]) for name in ("sender", "receiver", "combination")} + groups["lead"] = {record["pivot"]: UNIT} + groups["drop"] = {record["remove"]: UNIT} + presences = {} + for name, terms in groups.items(): + old_terms, new_terms = [], [] + live, retired, inputs = 0, 0, 0 + for token, q in terms.items(): + if token < 0: + require(record["direction"] == "forward" and ~token in encoded, + "public donor is named in the original forward ingress coordinates") + reference = encoded[~token] + # A virtual old input is the literal coframe encoder on the current + # physical inputs, never the independent fresh chart-595 field. + actual = linear((c, new_rows[~j]) for j, c in numerator_items(reference)) + inputs += 1 + elif token in parent.moves: + require(token in child.moves and not response.get(token), + f"prior observed token unchanged by the suffix at witness {index}, key {token}") + reference = composition(old_rows[token], encoded, 0) + actual = new_rows[token] + live += 1 + else: + require(token not in child.forms, f"previously removed observation still absent at key {token}") + retired += 1 + continue + require(actual == reference and FRESH not in actual[1], + f"observed codec pullback independent of fresh input at pivot {index}, {name}, {token}") + old_terms.append((q, reference)) + new_terms.append((q, actual)) + require(linear(old_terms) == linear(new_terms), f"every still-observable term of pivot {index}, {name}") + presences[name] = {"paid_observations": live, "encoded_public_input_observations": inputs, "previously_absent": retired} + result.append({"pivot_index": index, "direction": record["direction"], "groups": presences}) + return result + + +def check_original_boundary_recovery(parent, child, grouping, functional, direction, encoded, parent_rows, child_rows): + left = linear((q, coordinate(i)) for i, q in functional.items()) + old_input_bridge = {i: coordinate(i) for i in range(FRESH)} + old_input_bridge[OLD_ROLE] = old_input_bridge[FRESH] = left + for role in grouping - {OLD_ROLE}: + old_input_bridge[role] = linear(((UNIT, coordinate(role)), (-direction.get(role, 0), left))) + observable = {i: composition(child_rows[child.start + i], old_input_bridge, 0) for i in range(FRESH + 1)} + require(observable[OLD_ROLE] == observable[FRESH] == left, "original coordinate is recovered at both old-chart projections") + old_output_bridge = dict(observable) + old_output_bridge[OLD_ROLE] = observable[FRESH] + for role in range(FRESH): + recovered = composition(encoded[role], old_output_bridge, 0) if role in grouping else observable[role] + require(recovered == parent_rows[parent.start + role], f"original external map recovered at role {role}") + return FRESH + + +def verify_split(parent, child, edit, baseline_rows, candidate_rows, mains, pivots): + require(edit["source_head"] == SOURCE_HEAD and edit["source_graph_sha256"] == PARENT_SHA, + "exact role split on the named parent") + require(parent.frames == child.frames and parent.moves == child.moves, "every ordered frame and paid route is literally held") + require([key for key in child.order if key in child.moves] == [key for key in parent.order if key in parent.moves], + "every retained paid slot keeps its relative chronological position") + require(edit["charts"] == [A, C, B] and edit["ranks"] == [1, 8], "declared two physical helper boundaries") + require((edit["retired_role"], edit["fresh_role"]) == (OLD_ROLE, FRESH), "two named distinct productive roles") + require(child.initial == [*parent.initial, C] and parent.final[OLD_ROLE] == B + and child.final == [C if i == OLD_ROLE else chart for i, chart in enumerate(parent.final)] + [B], + "only the old rank-nine boundary changes, with one independent entry and output at role 1501") + require(len({~OLD_ROLE, ~FRESH, child.start + OLD_ROLE, child.start + FRESH}) == 4, + "distinct old and fresh input and output tokens") + group = set(edit["group_roles"]) + expected_group = {i for i, pair in enumerate(zip(parent.initial, parent.final, strict=True)) + if pair == (A, B) and i not in mains} + require(group == expected_group and len(group) == len(edit["group_roles"]) == 615, + "complete independent original 3→127 helper block") + helpers = edit["fixed_special_helpers"] + require(helpers == [325, 1087] and not (set(helpers) & (group | mains)), + "special helpers remain outside the split and main domains") + require(all((child.initial[i], child.final[i]) == (3, 237) and candidate_rows[child.start + i] == coordinate(i) + for i in helpers), "both protected special helpers retain exact same-owner operators") + + functional, direction = parsed_terms(edit["functional"]), parsed_terms(edit["return_direction"]) + prefix, suffix = parsed_terms(edit["prefix"]), parsed_terms(edit["injection"]) + require(len(prefix) == 8 and len(suffix) == 10, "complete literal prefix and departure witness") + require(all(parent.moves[key][1] == C for key in prefix) and all(parent.moves[key][0] == C for key in suffix), + "prefix arrivals and suffix departures are both in ordered chart 595") + old_positions = {key: i for i, key in enumerate(parent.order)} + prefix_end = max(old_positions[key] for key in prefix) + suffix_start = min(old_positions[key] for key in suffix) + require([prefix_end, suffix_start] == edit["reference_cut"] == [995, 1473], "exact published prefix and departure cut") + child_positions = {key: i for i, key in enumerate(child.order)} + close_prefix = max(child_positions[key] for key in prefix) + require(child_positions[child.start + OLD_ROLE] == close_prefix + 1 < min(child_positions[key] for key in suffix), + "retired-coordinate output is captured at the chart-595 cut before any injection") + require(weighted(prefix, baseline_rows) == linear((q, coordinate(i)) for i, q in functional.items()), + "eight literal arrivals recover the old arbitrary left functional") + encoded = codec(group, functional, direction) + response = impulse_response(parent, suffix) + require(all(not response.get(key) for key in prefix), "ten departures have no feedback into prefix snapshots") + require(all(response.get(parent.start + i, 0) == direction.get(i, 0) for i in range(FRESH)), + "literal downstream response agrees at all 1,501 original exits") + protected = set(edit["protected_slots"]) + require(len(protected) == 33 and not set(suffix) & protected and all(not response.get(key) for key in protected), + "fixed prior pivot and role-230 slots remain uninjected and unaffected by suffix") + require(all(key in parent.moves for key in protected if key in parent.forms), "retained protected slots are saved MOVE rows") + require(all(key not in child.forms for key in protected if key not in parent.forms), "deleted prior pivot slots remain absent") + for key in sorted(protected & parent.moves.keys()): + require(candidate_rows[key] == composition(baseline_rows[key], encoded, 0) + and FRESH not in candidate_rows[key][1], f"protected encoded observation independent of the fresh owner at {key}") + require({key for key in protected & parent.moves.keys() if parent.forms[key] != child.forms[key]} == {94756, 97405}, + "both re-expressed protected leads change only under the input codec") + ingress_count = check_literal_paid_forms(parent, child, encoded, prefix, suffix) + prior_observations = check_pivot_observations(pivots, parent, child, baseline_rows, candidate_rows, encoded, response) + + for key in parent.moves: + modeled = composition(baseline_rows[key], encoded, response.get(key, 0)) + require(candidate_rows[key] == modeled, f"composed exact paid row including all later reads at {key}") + require(weighted(prefix, candidate_rows) == coordinate(OLD_ROLE) + and candidate_rows[child.start + OLD_ROLE] == coordinate(OLD_ROLE), "old 281 returns only its own input at chart 595") + recovered_b = {i: composition(baseline_rows[parent.start + i], encoded, response.get(parent.start + i, 0)) + for i in group} + require(weighted(functional, recovered_b) == coordinate(FRESH) + and candidate_rows[child.start + FRESH] == coordinate(FRESH), "chart 127 independently recovers only fresh input 1501") + for role in group - {OLD_ROLE}: + row = linear(((UNIT, recovered_b[role]), (-direction.get(role, 0), coordinate(FRESH)))) + require(row == candidate_rows[child.start + role] == coordinate(role), f"later chart-127 owner restoration at {role}") + recovered_original = check_original_boundary_recovery(parent, child, group, functional, direction, + encoded, baseline_rows, candidate_rows) + return { + "prefix_count": len(prefix), "departures_count": len(suffix), "parent_cut": [prefix_end, suffix_start], + "protected_slots": len(protected), "retained_protected_slots": len(protected & parent.moves.keys()), + "protected_codec_only_form_changes": [94756, 97405], + "main_roles": len(mains), "fixed_special_helpers": helpers, "group_width": len(group), + "retained_chart127_group_rows": len(group) - 1, "independent_split_roles": [OLD_ROLE, FRESH], + "all_paid_rows_exact_model": len(parent.moves), "nonzero_suffix_response_rows": len(response), + "paid_ingress_forms_checked": ingress_count, "original_boundary_recovered": recovered_original, + "archived_pivot_observations": prior_observations, + } + + +def controls(child, expected): + slot = 93859 + mutated = child.forms.copy() + row = child.forms[slot].copy() + require(row[~FRESH].denominator == 7, "essential equal-price denominator-7 witness") + row[~FRESH] = -row[~FRESH] + mutated[slot] = row + bad = replace(child, forms=mutated) + schedule(bad) + rows, _ = forward(bad) + first_bad = next((i for i, key in enumerate(child.terminals) if rows[key] != expected[i]), None) + require(first_bad is not None, "equal-price wrong injection must change a public normalized row") + + terminal = child.start + FRESH + omitted = replace(child, forms={k: row for k, row in child.forms.items() if k != terminal}, + order=[k for k in child.order if k != terminal]) + try: + schedule(omitted) + except ValueError as exc: + require(str(exc) == "explicit complete terminal inventory", "missing target rejected at the actual boundary") + else: + raise ValueError("omitting the independently productive fresh target escaped the inventory check") + return {"wrong_denominator_7_injection": {"slot": slot, "first_wrong_public_role": first_bad, "paid_routes_held": True}, + "omitted_new_target": {"terminal_key": terminal, "rejected_by": "explicit complete terminal inventory"}} + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=HERE) + args = parser.parse_args() + data = args.root / "data" + require(CANDIDATE_SHA is not None, "the literal changed graph must be frozen first") + original = graph_from(read_pinned(data / "PARENT-GRAPH.json.gz", PARENT_SHA, packed=True), FRESH) + candidate = graph_from(read_pinned(data / "CANDIDATE-GRAPH.json.gz", CANDIDATE_SHA, packed=True), FRESH + 1) + edit = read_pinned(args.root / "EDIT.json", EDIT_SHA) + ports = read_pinned(data / "CALLER-LAYOUT.json", PORTS_SHA) + pivots = read_pinned(data / "PARENT-PIVOTS.json", PIVOTS_SHA) + require(ports["source_word_sha256"] == original.metadata["source_word_sha256"], "explicit original port source") + require(original.metadata["fixed_pivot_sha256"] == PIVOTS_SHA, "historical manifest bound to the parent graph") + expected, mains = reference_ports(ports) + expanded_expected = [*expected, coordinate(FRESH)] + baseline_rows, baseline_products = forward(original) + candidate_rows, candidate_products = forward(candidate) + checked_endpoints(original, baseline_rows, expected) + checked_endpoints(candidate, candidate_rows, expanded_expected) + old_columns, old_reverse_count = reverse_columns(original) + new_columns, new_reverse_count = reverse_columns(candidate) + require(old_columns == transpose_rows(expected), "exact full original transposed operator") + require(new_columns == transpose_rows(expanded_expected), "exact full transformed transposed operator") + split = verify_split(original, candidate, edit, baseline_rows, candidate_rows, mains, pivots) + result = { + "status": "PASS_CHART595_EXACT_NORMALIZED_OPERATOR", "source_head": SOURCE_HEAD, + "parent_graph_sha256": PARENT_SHA, "candidate_graph_sha256": CANDIDATE_SHA, + "edit_sha256": EDIT_SHA, "port_layout_sha256": PORTS_SHA, "parent_pivots_sha256": PIVOTS_SHA, + "operator_sizes": {"original": original.width, "candidate": candidate.width}, + "all_normalized_forward_and_adjoint_coefficients_exact": True, + "original_forward_products": baseline_products, "candidate_forward_products": candidate_products, + "original_adjoint_products": old_reverse_count, "candidate_adjoint_products": new_reverse_count, + "literal_causal_codec_and_boundary": split, "controls": controls(candidate, expanded_expected), + } + print(json.dumps(result, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/physical.py b/research/p104-banked-chart595-split/physical.py new file mode 100644 index 0000000000..eb6313f2b9 --- /dev/null +++ b/research/p104-banked-chart595-split/physical.py @@ -0,0 +1,739 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Exact grids and occupied bank schedule for the chart-595 successor. + +The signed caller, guarded selector and physical source model are reused from +#7682, with credit to the sources in NOTICE and PHYSICAL.md. +""" + +from argparse import ArgumentParser +from collections import Counter +from fractions import Fraction +import gzip +from hashlib import sha256 +import importlib.util +import json +from math import gcd, lcm +from pathlib import Path + + +HERE = Path(__file__).resolve().parent +PEER = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +SOURCE_WORD = "ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d" +CALLER = "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf" +CALLER_REPLAY = "ced48867f07ca0143604aa98cfd74fa7453696b9d3221f7c230d73e9ab9ba81f" +STAGES = 16 +CALLER_ODD = 2025 +AMBIENT_CAP = 153 +PROTECTED_HELPERS = (325, 1087) +OLD_NATIVE_STOCK = 15290 +EARLY_ROLE = 281 +EARLY_LAST_DONOR = 95743 +LATER_DEPARTURES = {93859, 96158, 96162, 96302, 96335, 97328, 97329, 98085, 98090, 102698} + + +def require(condition, reason): + if not condition: + raise ValueError(reason) + + +def encoded(data): + return json.dumps(data, sort_keys=True, separators=(",", ":")).encode() + + +def load_gzip(path, pin, *, canonical=True): + packed = path.read_bytes() + raw = gzip.decompress(packed) + require(sha256(raw).hexdigest() == pin, f"wrong decoded hash for {path.name}") + data = json.loads(raw) + require(not canonical or encoded(data) == raw, f"noncanonical data for {path.name}") + return data, sha256(packed).hexdigest() + + +def chart_span(basis): + span = {0} + for axis in basis: + require(type(axis) is int and 0 < axis < 512 and axis not in span, + "invalid independent ordered chart basis") + span |= {axis ^ vector for vector in span} + return span + + +def exact_coefficient(text): + value = Fraction(text) + require(value and str(value) == text, "noncanonical or zero scalar incidence") + return value + + +def exact_div(value, denominator): + result, remainder = divmod(value, denominator) + require(remainder == 0, "nonintegral scalar pre-product") + return result + + +def grid_parts(grid): + height = (grid & -grid).bit_length() - 1 + return grid >> height, height + + +def ceiling_bits(value): + return (-(-value.numerator // value.denominator)).bit_length() + + +def public_interface(graph, layout): + n = len(graph["initial"]) + require(len(graph["final"]) == n and len(layout["live"]) == len(layout["ports"]) == 104, + "complete public and port denominators") + hosted = layout["hosted"] + hosted_ports = set(hosted["Dports"]) + second_planes = list(zip(hosted["X2"], hosted["Y2"], strict=True)) + require(len(hosted_ports) == len(second_planes) == 96, "actual 96 hosted ports") + live = layout["live"] + mains = set(live) | {role + 112 for role in live} | set(hosted["X2"]) | set(hosted["Y2"]) + require(len(mains) == 400 and mains <= set(range(n)), "400 distinct real main slots") + for port, (x, q) in enumerate(zip(live, layout["ports"], strict=True)): + y = x + 112 + initial, final = graph["initial"], graph["final"] + frames = graph["frames"] + require(frames[initial[x]] == [q] and frames[initial[y]] == [] + and frames[final[x]] == [1 << j for j in range(9)] + and len(frames[final[y]]) == 8 + and all((v & q).bit_count() % 2 == 0 for v in frames[final[y]]), + f"main binding at port {port}") + for position, pair in zip(hosted["Dports"], second_planes, strict=True): + original = (live[position], live[position] + 112) + require(all(graph[boundary][a] == graph[boundary][b] + for boundary in ("initial", "final") for a, b in zip(original, pair)), + "separate hosted main partners in the same charts") + require(all(r not in mains and (graph["initial"][r], graph["final"][r]) == (3, 237) + for r in PROTECTED_HELPERS), "fixed rank-four same-owner helper boundaries") + return mains, hosted_ports, second_planes + + +def expected_rows(n, layout, interface, unit): + mains, hosted, second = interface + rows = [{r: unit} for r in range(n)] + for port, x in enumerate(layout["live"]): + y = x + 112 + if port in hosted: + rows[y][x] = unit + else: + rows[x][y] = -unit + rows[y] = {x: exact_div(unit, 2), y: exact_div(unit, 2)} + for x, y in second: + rows[x][y] = -unit + require(all(r in mains or row == {r: unit} for r, row in enumerate(rows)), + "independent arbitrary helper definition") + return rows + + +def graph_inputs(graph): + n = len(graph["initial"]) + first = graph["first_output"] + require(n in (1501, 1502) and first == 150522, "stable paid and public namespace") + moves = {key: (a, b) for key, a, b in graph["moves"]} + rows = {key: [(donor, exact_coefficient(coef)) for donor, coef in terms] + for key, terms in graph["forms"]} + terminal_keys = set(range(first, first + n)) + order = graph["schedule"] + require(len(moves) == len(graph["moves"]) == 6142 and all(0 <= key < first for key in moves), + "exact positive paid slots") + require(len(rows) == len(graph["forms"]) == len(moves) + n + and set(rows) == moves.keys() | terminal_keys and moves.keys().isdisjoint(terminal_keys) + and len(order) == len(rows) and set(order) == rows.keys(), + "exact held-bank schedule denominator") + require(all([donor for donor, _ in row] == sorted({donor for donor, _ in row}) + for row in rows.values()), "unique donor keys in literal scalar order") + return moves, rows + + +def graph_bounds(graph, moves, rows, mains): + frames = graph["frames"] + spans = list(map(chart_span, frames)) + starts, ends = graph["initial"], graph["final"] + first = graph["first_output"] + n = len(starts) + require(all(type(chart) is int and 0 <= chart < len(spans) for chart in (*starts, *ends)), + "valid public charts") + + def rank(a, b, helper=False): + require(0 <= a < len(spans) and 0 <= b < len(spans), "valid paid chart IDs") + require(spans[a] < spans[b] or (not helper and spans[b] < spans[a]), + "strictly nested positive paid or helper charts") + return abs(len(frames[b]) - len(frames[a])) + + paid = Counter(rank(a, b) for a, b in moves.values()) + productive = Counter(rank(starts[r], ends[r], helper=True) for r in range(n) if r not in mains) + available = {~r: (chart, 1, Fraction(1)) for r, chart in enumerate(starts)} + grid, peak_mass, peak_node = 1, Fraction(1), None + for key in graph["schedule"]: + a = moves[key][0] if key in moves else ends[key - first] + row_grid, mass = 1, Fraction() + for donor, q in rows[key]: + require(donor in available and available[donor][0] == a, + f"donor unavailable or in wrong chart at row {key}") + _, divisor, weight = available[donor] + row_grid = lcm(row_grid, divisor * q.denominator) + mass += abs(q) * weight + grid = lcm(grid, row_grid) + if mass > peak_mass: + peak_mass, peak_node = mass, key + if key in moves: + available[key] = (moves[key][1], row_grid, mass) + odd, height = grid_parts(grid) + return { + "public": n, "slots": len(moves), "terms": sum(map(len, rows.values())), + "path_grid": grid, "path_grid_odd": odd, "path_grid_height": height, + "positive_path_mass_bound_unscaled": str(peak_mass), + "positive_path_mass_peak_node": peak_node, + "paid_native_ranks": dict(paid), "positive_helper_ranks": dict(productive), + } + + +def exact_basis_grid(graph, moves, rows, grid, expected): + """Check every separate rational product, prefix and installed basis row.""" + values = {~r: {r: grid} for r in range(len(graph["initial"]))} + product_gcd = snapshot_gcd = grid + old_factor_lost = None + n_checks = nontrivial = seven_checks = 0 + scale_without_seven = grid + while scale_without_seven % 7 == 0: + scale_without_seven //= 7 + seven_factor = grid // scale_without_seven + peak_absolute = grid + for key in graph["schedule"]: + row, row_bound = {}, 0 + for donor, q in rows[key]: + a, b = q.numerator, q.denominator + n_checks += len(values[donor]) + nontrivial += len(values[donor]) if b != 1 else 0 + seven_checks += len(values[donor]) if b % 7 == 0 else 0 + for column, value in values[donor].items(): + product = exact_div(a * value, b) + product_gcd = gcd(product_gcd, product) + if old_factor_lost is None and product % seven_factor: + require(value % seven_factor == 0, "first under-scaled donor already off grid") + reduced_numerator = a * (value // seven_factor) + require(reduced_numerator % b, "removed seven must cause a literal DIV fault") + old_factor_lost = { + "row": key, "donor": donor, "entrance_column": column, + "coefficient": str(q), "removed_factor": seven_factor, + "numerator_without_seven": reduced_numerator, "denominator": b, + "positive_remainder": reduced_numerator % b, + } + row_bound += abs(product) + result = row.get(column, 0) + product + if result: + row[column] = result + else: + row.pop(column, None) + peak_absolute = max(peak_absolute, row_bound) + for value in row.values(): + snapshot_gcd = gcd(snapshot_gcd, value) + if key in moves: + values[key] = row + else: + require(row == expected[key - graph["first_output"]], f"wrong normalized endpoint {key}") + return { + "coefficient_products": n_checks, "checked_nontrivial_divisions": nontrivial, + "checked_seven_divisions": seven_checks, "exact_all_public_rows": len(expected), + "minimum_product_grid": grid // product_gcd, "minimum_snapshot_grid": grid // snapshot_gcd, + "maximum_exact_row_prefix_mass_scaled": str(Fraction(peak_absolute, 1 << grid_parts(grid)[1])), + "loss_of_seven_control": old_factor_lost, + } + + +class HeldBank: + """Finite tagged bank model with an isolated selector and copy staging.""" + + def __init__(self, homes): + self.homes = homes + self.blank = object() + self.left_guard = object() + self.right_guard = object() + self.dummy = object() + self.left = self.left_guard + self.right = self.right_guard + self.slots = [self.dummy] + [("arbitrary old payload", -slot) for slot in range(1, homes + 1)] + self.head = 0 + self.operations = Counter() + self.trace = sha256() + # Each stream is a separately guarded backing area. Selection uses + # only the bank head, so a staged donor never lives in that head. + self.streams = {name: self.blank for name in ("accumulator", "donor", "product", "quotient")} + + def access(self, slot, operation, replacement=None, expected=None): + require(self.head == 0 and 1 <= slot <= self.homes, "bad guarded bank selection") + self.head = slot + old = self.slots[slot] + if expected is not None: + require(old is expected, "send before previous owner returned and cleared") + if replacement is not None: + self.slots[slot] = replacement + self.head = 0 + self.operations[operation] += 1 + owner = replacement[0] if isinstance(replacement, tuple) else None + self.trace.update(encoded([operation, slot, owner])) + return old + + def close(self): + require(self.head == 0 and self.slots[0] is self.dummy + and self.left is self.left_guard and self.right is self.right_guard + and all(slot is self.blank for slot in self.slots[1:]) + and all(stream is self.blank for stream in self.streams.values()), + "packed bank and four stream retirement") + + +def held_schedule(graph, moves, rows, grid, expected, control=False): + n, k, first = len(graph["initial"]), len(moves), graph["first_output"] + entrance = {~r: r + 1 for r in range(n)} + returned = {key: n + i + 1 for i, key in enumerate(sorted(moves))} + terminal = {first + r: n + k + r + 1 for r in range(n)} + sender = 2*n + k + 1 + scratch = range(sender + 1, sender + 5) + allocated = set(entrance.values()) | set(returned.values()) | set(terminal.values()) | {sender} | set(scratch) + require(allocated == set(range(1, 2*n + k + 6)), "injective bank home plan") + bank = HeldBank(len(allocated)) + blank = bank.blank + odd = grid_parts(grid)[0] + binary_grid = grid // odd + public = [ + (("public", r), chart, (binary_grid * ((r * 719 + 29) % 101 - 50), + binary_grid * ((r * 379 + 67) % 127 - 63))) + for r, chart in enumerate(graph["initial"]) + ] + original_public = public.copy() + for slot in sorted(allocated): + bank.access(slot, "initialize_complete_dirty_home", blank) + for r, (_, chart, value) in enumerate(public): + scaled = tuple(x * odd for x in value) + bank.access(entrance[~r], "write_entrance", (("entry", r), chart, scaled), blank) + known = dict(entrance) + installed = set() + outstanding = None + attempted_early_reuse = False + early = first + EARLY_ROLE if n == 1502 else None + early_installed = None + prefix_position = None + + def install(role, *, sealed=False): + require(role not in installed, "same public owner installed twice") + tag, chart, values = bank.access(terminal[first + role], "read_terminal_for_same_owner_install") + predicted = tuple(exact_div( + sum(q * original_public[i][2][axis] for i, q in expected[role].items()), grid) + for axis in (0, 1)) + expected_tag = ("sealed terminal", role) if sealed else ("terminal", role) + unscaled = tuple(exact_div(value, odd) for value in values) + require(tag == expected_tag and chart == graph["final"][role] and unscaled == predicted, + "wrong shape/chart, value or same-owner terminal install") + public[role] = (("public", role), chart, unscaled) + installed.add(role) + bank.trace.update(encoded(["public_install_and_unscale", role, chart])) + + for position, key in enumerate(graph["schedule"]): + if key == EARLY_LAST_DONOR: + prefix_position = position + if early is not None and key in LATER_DEPARTURES: + require(early_installed is not None and EARLY_ROLE in installed + and public[EARLY_ROLE][:2] == (("public", EARLY_ROLE), 595), + "split suffix ran before the short return was installed on its public owner") + paid = key in moves + source, destination = moves[key] if paid else (graph["final"][key - first], None) + require(bank.streams["accumulator"] is blank, "running accumulator already occupied") + bank.streams["accumulator"] = (0, 0) + for donor, q in rows[key]: + require(early_installed is None or donor != ~EARLY_ROLE, + "old 281 entrance read after its public return") + require(early is None or early_installed is not None or donor != ~(n - 1), + "fresh split owner read before the short public return") + require(donor in known, "read before donor RETURN") + saved = bank.access(known[donor], "read_immutable_donor") + require(isinstance(saved, tuple) and len(saved) == 3, "donor retired before read") + tag, chart, value = saved + require(tag == (("entry", ~donor) if donor < 0 else ("returned", donor)) + and chart == source, "wrong owner or chart at guarded GET") + require(all(bank.streams[name] is blank for name in ("donor", "product", "quotient")), + "term workspace was live before GET") + bank.streams["donor"] = value + bank.streams["product"] = tuple(q.numerator * x for x in value) + bank.streams["quotient"] = tuple(exact_div(x, q.denominator) for x in bank.streams["product"]) + bank.streams["accumulator"] = tuple(a + b for a, b in zip( + bank.streams["accumulator"], bank.streams["quotient"], strict=True)) + for name in ("donor", "product", "quotient"): + bank.streams[name] = blank + value = bank.streams["accumulator"] + bank.streams["accumulator"] = blank + if paid: + require(outstanding is None, "more than one outstanding native sender") + bank.access(sender, "stage_full_sender", (("sender", key), source, value), blank) + outstanding = key + if control and not attempted_early_reuse: + try: + bank.access(sender, "illegal_early_reuse", (("sender", key + 1), source, value), blank) + except ValueError as failure: + require(str(failure) == "send before previous owner returned and cleared", + "wrong outstanding-sender control failure") + # A failing real move cannot continue. The control uses a + # separate attempted selected write, then restores its head. + bank.head = 0 + else: + raise ValueError("aliased outstanding sender accepted") + attempted_early_reuse = True + held_tag, held_chart, held_value = bank.access(sender, "read_parked_sender") + require(outstanding == key and held_tag == ("sender", key) and held_chart == source, + "parked sender must survive until shape and complete return") + # The MOVE is identity in normalized coordinates. Its full native + # Gaussian operation and two adapters are checked separately. + bank.access(returned[key], "write_complete_return", + (("returned", key), destination, held_value), blank) + bank.access(sender, "clear_full_sender_after_return", blank) + outstanding = None + known[key] = returned[key] + else: + role = key - first + bank.access(terminal[key], "write_terminal", (("terminal", role), source, value), blank) + if key == early: + require(prefix_position is not None and prefix_position < position and source == 595, + "short return must seal at the witnessed prefix cut") + old = bank.access(terminal[key], "seal_complete_short_return", + (("sealed terminal", role), source, value)) + require(old == (("terminal", role), source, value), "sealing must preserve full typed payload") + install(role, sealed=True) + bank.access(terminal[key], "clear_sealed_short_return_after_install", blank) + old_entry = known.pop(~role) + bank.access(old_entry, "retire_complete_home", blank) + early_installed = position + + wanted_early = {EARLY_ROLE} if early is not None else set() + require(outstanding is None and installed == wanted_early and len(known) == n+k-len(wanted_early) + and all(public[r] == original_public[r] for r in range(n) if r not in wanted_early), + "one lawful early public return and other public inputs intact through the native schedule") + for r in range(n): + if r not in installed: + install(r) + require(installed == set(range(n)) and all( + record[:2] == (("public", role), graph["final"][role]) for role, record in enumerate(public)), + "every public owner fully installed exactly once") + retired_early = {entrance[~EARLY_ROLE]} if early is not None else set() + for slot in sorted(allocated - retired_early): + bank.access(slot, "retire_complete_home", blank) + bank.close() + wanted = { + "initialize_complete_dirty_home": len(allocated), "write_entrance": n, + "read_immutable_donor": sum(map(len, rows.values())), + "stage_full_sender": k, "read_parked_sender": k, + "write_complete_return": k, "clear_full_sender_after_return": k, + "write_terminal": n, "read_terminal_for_same_owner_install": n, + "retire_complete_home": len(allocated), + } + if early is not None: + wanted["seal_complete_short_return"] = 1 + wanted["clear_sealed_short_return_after_install"] = 1 + require(bank.operations == wanted, "complete independent selected replay counts") + return { + "numerical_homes": len(allocated), "guarded_dummy_slots": 1, + "max_outstanding_native_senders": 1, "declared_senders": 1, + "immutable_entry_banks": n, "immutable_paid_return_banks": k, + "deferred_terminal_banks": n, "native_scalar_scratch_homes": 4, + "additional_independent_guarded_streams": len(bank.streams), + "trace_sha256": bank.trace.hexdigest(), "selected_logical_operations": dict(bank.operations), + "two_component_fixture_outputs": len(installed), "exact_odd_unscale_outputs": len(installed), + "retired_and_guards_restored": True, "live_sender_alias_control_rejected": attempted_early_reuse, + "short_return_sealed_schedule_position": early_installed, + "short_return_sealed_at_public_role": EARLY_ROLE if early_installed is not None else None, + "short_return_public_install_schedule_position": early_installed, + "short_return_original_entrance_retired_at_install": len(retired_early) == 1, + "nonretired_public_inputs_preserved_until_final_installs": True, + } + + +def scalar_service(value, coefficient, signed_width): + """Finite signed carry, quotient, exact remainder and padded installation.""" + a, b = abs(coefficient.numerator), coefficient.denominator + magnitude = abs(value) + require(magnitude.bit_length() < signed_width, "input width") + padding = signed_width + 26 + carry, bits = 0, [] + for j in range(padding): + carry += a * ((magnitude >> j) & 1) + bits.append(carry & 1) + carry >>= 1 + require(carry == 0, "padded product overflow") + quotient = remainder = 0 + for bit in reversed(bits): + trial = 2 * remainder + bit + next_bit = int(trial >= b) + remainder = trial - next_bit * b + quotient = (quotient << 1) | next_bit + require(remainder == 0, "physical remainder") + require(quotient.bit_length() < signed_width, "installed scalar overflow") + return -quotient if (value < 0) != (coefficient.numerator < 0) else quotient + + +def scalar_cases(graph_rows, caller, scales): + factors = {factor for rows in graph_rows for row in rows.values() for _, factor in row} + factors.update(Fraction(event[-1]) for event in caller["events"] + if event[0] != "J" and event[1] in ("ADD", "SCALE")) + factors.update((Fraction(-1), Fraction(1), Fraction(-1, 2), Fraction(1, 2))) + for scale in scales: + factors.update((Fraction(scale), Fraction(1, scale), Fraction(-1, scale))) + bits = max(max(abs(q.numerator).bit_length(), q.denominator.bit_length()) for q in factors) + require(bits <= 24, "all literal scalar and division conversions fit W+26") + cases = 0 + for coefficient in sorted(factors): + for k in (0, -127, -1, 1, 19, (1 << 68) + 1): + value = k * coefficient.denominator + signed_width = max(3, abs(value).bit_length()+2, abs(k * coefficient.numerator).bit_length()+2) + require(scalar_service(value, coefficient, signed_width) == k * coefficient.numerator, + "fixed scalar sign/carry/remainder or installation") + cases += 1 + for coefficient in (Fraction(1, 2), Fraction(-1, 7)): + try: + scalar_service(1, coefficient, 3) + except ValueError as failure: + require(str(failure) == "physical remainder", "wrong inexact scalar rejection") + else: + raise ValueError("nonintegral scalar installed") + return {"distinct_scalar_and_conversion_factors": len(factors), "signed_bit_transducer_cases": cases, + "coefficient_bits": bits, "rejected_one_tick_denominators": [2, 7], + "retained_max_bits": 24, "component_padding": 26} + + +def caller_envelope(caller): + """Majorize raw caller products with no cancellation or operator commutation.""" + roles = [(0, Fraction(1)) for _ in range(caller["roles"])] + max_height, max_mass = 0, Fraction(1) + pre_height, pre_mass = 0, Fraction(1) + visits = Counter() + + def observe(*values): + nonlocal max_height, max_mass + for height, mass in values: + max_height = max(max_height, height) + max_mass = max(max_mass, mass) + + def scale(value, factor): + height, mass = value + return height + grid_parts(factor.denominator)[1], abs(factor) * mass + + def add(first, second): + return max(first[0], second[0]), first[1] + second[1] + + stages = [] + for event in caller["events"]: + if event[0] == "J": + _, stage, (x, y, u, v), (a, b, alpha, beta) = event + require((Fraction(alpha), Fraction(beta)) == (-1, Fraction(1, 2)), + "exact signed joint envelope coefficients") + stages.append(stage) + pre_height = max(pre_height, *(roles[j][0] for j in (x, y, u, v, a, b))) + pre_mass = max(pre_mass, *(roles[j][1] for j in (x, y, u, v, a, b))) + roles[y], roles[u] = add(roles[y], roles[x]), add(roles[u], roles[v]) + old_a, old_b = roles[a], roles[b] + roles[a] = add(old_a, old_b) + roles[b] = add(scale(old_a, Fraction(1, 2)), scale(old_b, Fraction(1, 2))) + observe(roles[y], roles[u], roles[a], roles[b]) + continue + kind, op, role, *args = event + visits[op] += len(caller["types"][kind]["ports"]) + if op == "ADD": + term = scale(roles[args[0]], Fraction(args[-1])) + roles[role] = add(roles[role], term) + observe(term) + elif op == "SCALE": + roles[role] = scale(roles[role], Fraction(args[-1])) + elif op == "SWAP": + donor = args[0] + roles[role], roles[donor] = roles[donor], roles[role] + elif op == "QUERY": + roles[role] = add(roles[role], roles[args[0]]) + elif op == "LAMBDA": + height, mass = roles[role] + # (1 ± i)/2 and (1 ∓ i)/2 each have Gaussian l1 norm one. + roles[role] = height + 1, 2 * mass + else: + require(op in {"IDLE_ONE", "IDLE_ODD"}, "unknown signed caller operation") + observe(roles[role]) + require(stages == list(range(1, STAGES+1)), "complete exact 16-stage raw schedule") + return { + "records": len(caller["events"]), "stages": len(stages), "uses": dict(visits), + "binary_height_at_all_completed_cuts_and_products": max_height, + "binary_height_at_native_entrances": pre_height, + "scaled_mass_at_all_cuts_and_products": str(CALLER_ODD * max_mass), + "scaled_mass_at_native_entrances": str(CALLER_ODD * pre_mass), + "normalized_bound_uses_no_cancellation_or_commutation": True, + } + + +def replay_caller(caller, layout): + path = HERE / "engines/caller/caller16.py" + require(sha256(path.read_bytes()).hexdigest() == CALLER_REPLAY, "wrong signed caller engine") + spec = importlib.util.spec_from_file_location("physical_signed_caller16", path) + require(spec is not None and spec.loader is not None, "signed caller engine must be loadable") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + result = module.signed_caller(caller, layout, CALLER_ODD, 9) + require(result["calls"] == STAGES and result["roles"] == 68 and result["root_owners"] == 3536 + and result["exact_preproduct_divisions"] == 153295 + and Fraction(result["peak_scaled_mass"]) == Fraction(495734175, 2), + "exact inherited caller odd scale and literal divide replay") + roots_q = sum(len(specification["ports"]) * sum(row[0] < 0 for row in specification["diagonal"]) + for specification in caller["types"].values()) + require(roots_q == 3536, "charge all root negative-q ordinary translations") + envelope = caller_envelope(caller) + require(envelope["uses"] == result["uses"], "independent weighted caller operation count") + return result, envelope, roots_q + + +def ordinary_budget(native, signed, roots_q, scalar_bits): + n, k, terms, homes = (native[key] for key in ("public", "slots", "terms", "numerical_homes")) + conversions = 2 * (signed["root_owners"] + STAGES * n) + short_clear_and_seal = int(n == 1502) + # The predecessor charges all four independent streams at row/term + # boundaries. Add a full reset/reinitialization allowance for each + # reused source, beyond original fixed numeric-home initialization. + resets = 2*homes + 8*(terms+k+n) + 4*n + 2*k + short_clear_and_seal + transfers = 2*terms + 2*(k+n) + 6*k + 4*n + 2*short_clear_and_seal + selector_l = 14*homes + 9 + selector_constant = 63*homes - 7*homes.bit_count() + 27*homes.bit_length() + 59 + selections = [resets*selector_l + transfers*(selector_l+128), + resets*selector_constant + transfers*(selector_constant+320)] + selected = native["selected_logical_operations"] + require(resets >= selected["initialize_complete_dirty_home"] + selected["retire_complete_home"] + + selected["clear_full_sender_after_return"] + short_clear_and_seal, + "full occupied resets and sender reuse charged") + require(transfers >= 2 * (sum(selected.values()) - selected["initialize_complete_dirty_home"] + - selected["retire_complete_home"] - selected["clear_full_sender_after_return"] + - short_clear_and_seal), "complete staged copy visits charged") + p = STAGES * k + sum(signed["fixed_caller_paid"].values()) + t = STAGES * sum(native["positive_helper_ranks"].values()) + sum(signed["fixed_root_targets"].values()) + uses = signed["uses"] + maps = 2*(p+t+STAGES*400) + 2*(uses["IDLE_ONE"]+uses["IDLE_ODD"]) + maps += 3*uses["QUERY"] + uses["LAMBDA"] + uses["IDLE_ODD"] + roots_q + scalar_count = 32 * (STAGES*(terms+4*(k+n)+2*n+homes+2*k+short_clear_and_seal) + + sum(uses.values()) + conversions) + require(homes <= OLD_NATIVE_STOCK and native["additional_independent_guarded_streams"] == 4, + "retained numerical home ceiling and extra independent streams") + return { + "native_numeric_homes": homes, "native_numeric_homes_plus_dummy": homes+1, + "raw_numeric_homes": STAGES*homes, "raw_numeric_homes_plus_dummy": STAGES*(homes+1), + "separate_guarded_streams_per_native": 4, "separate_guarded_streams_raw": STAGES*4, + "odd_conversions": conversions, "reset_services_per_native": resets, + "typed_selected_transfers_per_native": transfers, + "selector_steps_per_selected_service_L_and_constant": [selector_l, selector_constant], + "selected_total_steps_per_native_L_and_constant": selections, + "scalar_services": scalar_count, "scalar_step_rate": 2**max(20, scalar_bits+8), + "ordinary_map_slots": maps, "ordinary_elementary_record_upper": maps*4*(AMBIENT_CAP+1)**2, + "raw_paid_positions": p, "raw_productive_targets": t, "root_negative_q_translations": roots_q, + "compiled_ordinary_work": "Positive full-view resets, selects, copies, guide and layout setup/return, exact scalar/odd shifts, matchers, fixed descriptors, root normalization and all native/caller/child adapters.", + "compiled_stock": "Disjoint occurrence-tagged bank tuple, dummy, guide, four guarded streams, complete public owners, matching child views, compiler and BIT workspace, and every parked ancestor.", + "layout": { + "padded_payload": "L'=N_c(2(W+26)+3)", + "per_stage_selector_and_stream_tracks": 11, + "aggregate_owned_tuple_M": "sum_stage[(homes+6)(L'+2)+ell(N_c)+ell(W+26)+max(ell(N_c),ell(W+26),ell(homes))+max(N_c,homes)+max(W+26,ell(homes))+10]", + "shadow_cells_upper": "M+352", + "complete_view_step_bound": "34*(256(M+352)+128) plus fixed-degree descriptor work", + }, + } + + +def root_envelope(native, caller): + max_binary = max(caller["binary_height_at_all_completed_cuts_and_products"], + *(caller["binary_height_at_native_entrances"] + side["path_grid_height"] + for side in native.values())) + max_mass = max(Fraction(caller["scaled_mass_at_all_cuts_and_products"]), + *(Fraction(caller["scaled_mass_at_native_entrances"]) * side["path_grid_odd"] + * Fraction(side["positive_path_mass_bound_unscaled"]) + for side in native.values())) + mass_bits = ceiling_bits(max_mass) + c = 2 * max(max_binary, mass_bits) + return { + "caller_odd": CALLER_ODD, + "native_odd": {side: audit["path_grid_odd"] for side, audit in native.items()}, + "native_binary": {side: audit["path_grid_height"] for side, audit in native.items()}, + "context_mass_bound": str(max_mass), "context_mass_bits": mass_bits, + "context_binary_bits": max_binary, "context_c": c, + "H_guard": "bit_length(context_c*1920*153**1920*(H+1)**2) < H for each actual compiler bound H", + "exact_grid": "2^(-p-D)", + "signed_width": "W=p+h+2D+3", + "temporary_width": "W+26", + } + + +def qualify(parent, candidate, caller, layout): + require(layout["source_word_sha256"] == SOURCE_WORD and layout["public"] == 1501, + "exact 104-port header bound to predecessor source") + require(parent["frames"] == candidate["frames"] and parent["moves"] == candidate["moves"], + "only scalar forms and productive boundary may differ") + require(candidate["initial"] == parent["initial"] + [595] + and parent["final"][EARLY_ROLE] == 127 and candidate["final"][EARLY_ROLE] == 595 + and candidate["final"][:EARLY_ROLE] == parent["final"][:EARLY_ROLE] + and candidate["final"][EARLY_ROLE+1:] == parent["final"][EARLY_ROLE+1:] + [127], + "only retained shortened role and new distinct role change final charts") + require(parent["initial"][EARLY_ROLE] == 3, "nominal shortened role starts in identity chart") + signed, caller_bound, roots_q = replay_caller(caller, layout) + native, all_rows = {}, [] + for side, graph in (("peer", parent), ("candidate", candidate)): + interface = public_interface(graph, layout) + moves, rows = graph_inputs(graph) + all_rows.append(rows) + audit = graph_bounds(graph, moves, rows, interface[0]) + grid = audit["path_grid"] + expected = expected_rows(audit["public"], layout, interface, grid) + native[side] = { + **audit, + **exact_basis_grid(graph, moves, rows, grid, expected), + **held_schedule(graph, moves, rows, grid, expected, control=side == "candidate"), + } + peer, child = native["peer"], native["candidate"] + require(peer["path_grid"] == 2025 << 18 and peer["terms"] == 169349 + and peer["coefficient_products"] == 8535132, "exact #7682 native positive grid anchor") + require(child["loss_of_seven_control"] is not None and child["live_sender_alias_control_rejected"], + "new odd factor and outstanding sender controls must reject") + require(peer["paid_native_ranks"] == child["paid_native_ranks"] + and Counter(child["positive_helper_ranks"]) - Counter(peer["positive_helper_ranks"]) == {1: 1, 8: 1} + and Counter(peer["positive_helper_ranks"]) - Counter(child["positive_helper_ranks"]) == {9: 1}, + "one split productive field, all original paid ranks") + require((peer["numerical_homes"], child["numerical_homes"]) == (9149, 9151), + "same serial sender realization on both exact graphs") + root = root_envelope(native, caller_bound) + scalars = scalar_cases(all_rows, caller, (CALLER_ODD, *root["native_odd"].values())) + ordinary = {side: ordinary_budget(audit, signed, roots_q, scalars["coefficient_bits"]) + for side, audit in native.items()} + return { + "status": "PASS_CHART595_BANK_PHYSICAL", + "scope": "Exact normalized products and guarded occupied bank schedules, finite scalar services and conservative all-width instances of the selected five interfaces.", + "native": native, "ordinary": ordinary, "scalar_services": scalars, + "caller_exact": signed, "caller_hereditary_envelope": caller_bound, "common_exact_root": root, + "both_graphs_respect_historical_numeric_homes_and_streams": True, + } + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--parent", type=Path, default=HERE / "data/PARENT-GRAPH.json.gz") + parser.add_argument("--candidate", type=Path, default=HERE / "data/CANDIDATE-GRAPH.json.gz") + parser.add_argument("--caller", type=Path, default=HERE / "data/CALLER.json.gz") + parser.add_argument("--caller-layout", type=Path, default=HERE / "data/CALLER-LAYOUT.json") + parser.add_argument("--candidate-sha256", required=True) + parser.add_argument("--out", type=Path, required=True) + args = parser.parse_args() + expected = {"peer": PEER, "candidate": args.candidate_sha256} + peer, peer_gzip = load_gzip(args.parent, PEER) + child, child_gzip = load_gzip(args.candidate, args.candidate_sha256) + caller, caller_gzip = load_gzip(args.caller, CALLER, canonical=False) + layout_raw = args.caller_layout.read_bytes() + result = qualify(peer, child, caller, json.loads(layout_raw)) + result.update({ + "graphs": expected, "caller_sha256": CALLER, + "transport_sha256": {"peer": peer_gzip, "candidate": child_gzip, "caller": caller_gzip}, + "caller_layout_sha256": sha256(layout_raw).hexdigest(), + }) + with args.out.open("x", encoding="utf-8") as handle: + json.dump(result, handle, sort_keys=True, indent=2) + handle.write("\n") + print(result["status"]) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/price.py b/research/p104-banked-chart595-split/price.py new file mode 100644 index 0000000000..55d5ebf78c --- /dev/null +++ b/research/p104-banked-chart595-split/price.py @@ -0,0 +1,247 @@ +#!/usr/bin/env python3 +"""Certify the signed crossing, compiler and outer predicates of the chart-595 split.""" + +from argparse import ArgumentParser +from fractions import Fraction +from hashlib import sha256 +import json +from pathlib import Path +import sys + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from caller import CALLER, CANDIDATE, ENGINE, INVOICE, PARENT, PARENT_HEAD, HERE, load, need + + +PARENT_UPPER = "0.0037261023901" +PARENT_LOWER = "0.0037261023900" +PARENT_CLAIM = "0.0037261023899" +TARGET = "0.00372611" +BIT_FLOOR = "0.00376669" +GAP = Fraction(1, 10**14) +CARRIER_POWER = 1920 +AMBIENT_CAP = 153 +ASSUMPTIONS = ( + "native_all_columns", "owned_erasure", "compiler", "precision_tape", "analytic_recovery", +) +PINS = { + "directed_price.py": "446c8ebddf5b1e56d43b8d7f2ad3c1c9ba018a18105b207a0ac9e30386878a10", + "interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "selected-claim.json": "3f8add8252adb223b60418ec69351a69b6b5edfe601ec1c6b4b65cd9e2afd9b2", + "selected-bit-ambient.json": "437ad2f9e7956e7f2b477b546f53a6c8cfa0567e207024300e9a7e58d3c0202c", + "selected-validation.json": "e1374a98b240d7f9f2cca2a1e74b93f240b1bfc94b8cc4b94a385a50281d494e", +} + + +def standing_bit_and_assumptions(): + for name, expected in PINS.items(): + need(sha256((ENGINE / name).read_bytes()).hexdigest() == expected, f"fixed pricing or selected input {name}") + if str(ENGINE) not in sys.path: + sys.path.insert(0, str(ENGINE)) + claim = load(ENGINE / "selected-claim.json", PINS["selected-claim.json"]) + repair = load(ENGINE / "selected-bit-ambient.json", PINS["selected-bit-ambient.json"]) + validation = load(ENGINE / "selected-validation.json", PINS["selected-validation.json"]) + bit = next(x for x in claim["uniform_templates"] if x["family"] == "BIT before cover") + need(bit["ambient"] == 134 and bit["rank_encoding"] == "2^296630000000000" + and repair["exit_code"] == 0 and repair["source_unchanged"] + and validation["status"] == "admitted_conditional" + and validation["registered_replays_complete"], "selected ambient-corrected BIT anchor") + need(tuple(x["id"] for x in claim["assumptions"]) == ASSUMPTIONS + and Fraction(bit["saving"]) > Fraction("0.00385248") > Fraction(BIT_FLOOR), + "five exact standing assumptions and conservative BIT floor") + return {"ambient": bit["ambient"], "rank_encoding": bit["rank_encoding"], + "source_template_saving": bit["saving"], "retained_completed_saving": "0.00385248", + "outer_floor": BIT_FLOOR, "assumptions": claim["assumptions"], + "selected_source_pins": {k: v for k, v in PINS.items() if k.startswith("selected-")}} + + +def histograms(invoice, targets): + p = {int(k): v for k, v in invoice["paid"].items()} + t = {int(k): v for k, v in invoice["targets"].items()} + need(invoice["schema"] == "integer-mult-recursive-invoice/v1" + and invoice["contract"]["ambient_rank"] == 137 + and all(1 <= rank <= 137 and type(count) is int and count > 0 + for hist in (p, t) for rank, count in hist.items()) + and sum(p.values()) == 101824 and sum(t.values()) == targets, + "complete paid and productive invoice input") + diff = {k: t.get(k, 0) - p.get(k, 0) for k in p.keys() | t.keys()} + need(sum(k * v for k, v in diff.items()) == 1328, "full rank-mass surplus") + return p, t, diff + + +def checked_bills(application): + need(application["status"] == "PASS_CHART595_ACTUAL16_CALLER" + and application["parent_head"] == PARENT_HEAD + and application["graphs"] == {"peer": PARENT, "candidate": CANDIDATE} + and application["caller_sha256"] == CALLER + and application["published_parent_invoice_sha256"] == INVOICE + and application["signed"]["calls"] == 16 and application["signed"]["root_owners"] == 3536, + "actual 16-call proof binds exactly #7682 and chart-595 child") + invoice = load(HERE / "data/PARENT-INVOICES.json", INVOICE)["candidate"] + need(application["invoices"]["peer"] == invoice + and application["invoices"]["candidate"]["contract"] == invoice["contract"], + "shared actual recursion model and frozen #7682 comparator") + peer = histograms(invoice, 21152) + child = histograms(application["invoices"]["candidate"], 21168) + need(peer[0] == child[0] and {k: child[1].get(k, 0) - peer[1].get(k, 0) + for k in child[1].keys() | peer[1].keys() + if child[1].get(k, 0) != peer[1].get(k, 0)} + == {1: 16, 8: 16, 9: -16}, + "an exact rank-nine debit with the two productive replacements and no new paid edge") + return {"peer": peer, "candidate": child} + + +def decimal_tick(k, places): + divisor = 10**places + return f"{k // divisor}.{k % divisor:0{places}d}" + + +def find_crossing(coeff): + from directed_price import moment + + ticks = 10**13 + low = int(Fraction(TARGET) * ticks) + high = int(Fraction(BIT_FLOOR) * ticks) + need(moment(coeff, Fraction(low, ticks), Fraction(low, ticks))[0] > 0 + and moment(coeff, Fraction(high, ticks), Fraction(high, ticks))[1] < 0, "strict new crossing bracket") + while high - low > 1: + mid = (high + low) // 2 + point = Fraction(mid, ticks) + left, right = moment(coeff, point, point) + if left > 0: + low = mid + elif right < 0: + high = mid + else: + raise ValueError("directed root enclosure overlaps zero at a bracket tick") + lower = decimal_tick(low, 13) + upper = decimal_tick(high, 13) + claim_ticks = int(Fraction(lower) * 10**10) + if Fraction(claim_ticks, 10**10) + 7 * GAP >= Fraction(lower): + claim_ticks -= 1 + claim = decimal_tick(claim_ticks, 10) + need(Fraction(claim) > Fraction(TARGET) > Fraction(PARENT_UPPER), "strict conservative chosen lower") + return claim, lower, upper + + +def check_numerics(bill, triple, kind): + from directed_price import moment + from interval_gate import gate, moment as second_moment, B + + paid, targets, coeff = bill + claim, lower, upper = triple + k = Fraction(claim) + probe = k + 7 * GAP + points = {claim: 1, str(probe): 1, lower: 1, upper: -1, BIT_FLOOR: -1, + PARENT_UPPER: -1 if kind == "peer" else 1, TARGET: -1 if kind == "peer" else 1} + verified = {} + for point, sign in points.items(): + first = moment(coeff, Fraction(point), Fraction(point)) + second = tuple(Fraction(bound, B) for bound in second_moment(coeff, Fraction(point))) + for interval in (first, second): + need(interval[0] > 0 if sign > 0 else interval[1] < 0, f"two strict directed signs at {point}") + need(max(first[0], second[0]) <= min(first[1], second[1]), "independent directed intervals intersect") + verified[point] = {"sign": sign, "binary_log_exp": list(map(str, first)), + "decimal_fixed_grid": list(map(str, second)), + "display": list(map(float, first))} + derivative = moment(coeff, Fraction(), Fraction(BIT_FLOOR), derivative=True) + need(derivative[1] < 0, "strictly decreasing moment up to the independent BIT floor") + compiler = gate({"P": paid, "T": targets}, claim, probe, lower, upper, BIT_FLOOR) + outer = compiler["outer"] + need(outer["strict_count"] == 54 and outer["functional_count"] == 4 + and Fraction(outer["minimum_margin"]) > 0 + and outer["BIT_just_below_effective_rejected"], "all strict and functional outer predicates") + return {"decimal_claim": claim, "bracket": [lower, upper], + "directed_checks": verified, "derivative": list(map(str, derivative)), "compiler": compiler, + "recurrence_anchors": { + "carrier_power": CARRIER_POWER, "conservative_ambient_cap": AMBIENT_CAP, + "paid_cutoff": 11, "target_floor": 12, "tail_power_offset": "1/7", + "tail_ratio_upper": "31/32", "alpha_reserve": str(Fraction(1, 10**27)), + "claim_and_probe_increment": str(GAP), "test_increment_count": 7, + "b": str(k + 5 * GAP), "a": str(k + 4 * GAP), "q": str(k + 3 * GAP), + "epsilon": str(1 - GAP), "beta": str(1 - 3 * GAP)}} + + +def check_physical(path, application, calculations): + physical = load(path) + need(physical["status"] == "PASS_CHART595_BANK_PHYSICAL" + and physical["graphs"] == application["graphs"] and physical["caller_sha256"] == CALLER, + "ordinary and exact grid are bound to the actual same graph and caller") + common = physical["common_exact_root"] + c = common["context_c"] + need(type(c) is int and c >= 2 * max(common["context_mass_bits"], common["context_binary_bits"]) + and common["caller_odd"] == application["signed"]["odd_scale"] == 2025, + "certificate branch-depth and magnitude bound") + reported = {} + for kind, homes in (("peer", 9149), ("candidate", 9151)): + stats = physical["native"][kind] + replayed = application["native"][kind] + work = physical["ordinary"][kind] + expected = application["ordinary_occurrences"][kind] + need(all(stats[k] == replayed[k] for k in ("public", "slots", "terms")) + and stats["path_grid"] == int(replayed["grid"]) + and stats["path_grid_odd"] == replayed["odd"] + and stats["path_grid_height"] == replayed["dyadic_height"] + and work["root_negative_q_translations"] == expected["root_head_translations"] + and work["odd_conversions"] == expected["odd_boundary_conversions"] + and work["native_numeric_homes"] == stats["numerical_homes"] == homes <= 15290 + and work["raw_numeric_homes"] == 16 * homes + and work["separate_guarded_streams_per_native"] == 4, + "complete bank stock, helper conversions and four separately movable streams") + h = int(calculations[kind]["compiler"]["H"]) + k_star = CARRIER_POWER * AMBIENT_CAP**CARRIER_POWER * (h + 1)**2 + guard = (c * k_star).bit_length() + need(guard < h, "exact depth guard with this calibrated outer exponent") + reported[kind] = {"H": h, "c": c, "depth_guard_bits": guard, "ordinary": work, + "native_grid": {k: v for k, v in stats.items() if k.startswith("path_grid")}} + new_maps = (physical["ordinary"]["candidate"]["ordinary_map_slots"] + - physical["ordinary"]["peer"]["ordinary_map_slots"]) + helper_maps = (application["ordinary_occurrences"]["candidate"]["native_helper_boundary_maps"] + - application["ordinary_occurrences"]["peer"]["native_helper_boundary_maps"]) + need(new_maps == helper_maps == 32, "both complete boundary maps of each added stage-tagged owner") + return {"sha256": sha256(path.read_bytes()).hexdigest(), "paired": reported, + "inherited_private_home_cap_per_native": 15290, "additional_ordinary_helper_boundary_maps": new_maps, + "final_substitution": { + "W": "p+h+2D+3", "Z": "W_p+O", "E_0": "64(Z+N+P+G+1)^3", + "B_0": "P+E_0", "C_0": "32*N*B_0^2", "N": "2^H", + "ordinary": "Finite signed root, phase, coefficient, typed selector, copy, overwrite and complete return costs are included in G and full simultaneous owned backing in O."}} + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--caller-proof", type=Path, required=True) + parser.add_argument("--physical", type=Path) + parser.add_argument("--out", type=Path, required=True) + args = parser.parse_args() + bit = standing_bit_and_assumptions() + application = load(args.caller_proof) + bills = checked_bills(application) + claim, lo, hi = find_crossing(bills["candidate"][2]) + runs = {"peer": check_numerics(bills["peer"], (PARENT_CLAIM, PARENT_LOWER, PARENT_UPPER), "peer"), + "candidate": check_numerics(bills["candidate"], (claim, lo, hi), "candidate")} + from directed_price import moment + + comparator = Fraction(PARENT_UPPER) + extra_fee = dict(bills["candidate"][2]) + extra_fee[1] -= 1 + fees = moment(extra_fee, comparator, comparator) + gain = moment({1: 16, 8: 16, 9: -16}, Fraction(claim), Fraction(claim)) + need(fees[1] < 0 and gain[0] > 0, "one additional rank-one charge kills the gain") + result = {"status": "PASS_CHART595_DIRECTED_PRICE_OUTER" if args.physical else + "PASS_CHART595_NUMERICAL_PRICE_OUTER", + "graphs": application["graphs"], "caller_sha256": CALLER, "parent_head": PARENT_HEAD, + "caller_proof_sha256": sha256(args.caller_proof.read_bytes()).hexdigest(), + "candidate_directed_conditional_lower": claim, "candidate_raw_bracket": [lo, hi], + "published_peer_upper": PARENT_UPPER, "strict_gap": str(Fraction(claim) - comparator), + "signed_paid_delta": {}, "signed_target_delta": {"1": 16, "8": 16, "9": -16}, + "split_moment_credit_at_claim": list(map(str, gain)), + "extra_paid_rank_one_at_parent_upper": list(map(str, fees)), + "numerics": runs, "compiler": runs["candidate"]["compiler"], "selected_BIT": bit, + "physical_join": check_physical(args.physical, application, runs) if args.physical else None} + with args.out.open("x") as handle: + json.dump(result, handle, sort_keys=True, indent=2) + handle.write("\n") + print(result["status"], claim, lo, hi, result["strict_gap"], flush=True) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/price_crosscheck.py b/research/p104-banked-chart595-split/price_crosscheck.py new file mode 100644 index 0000000000..7e9effb040 --- /dev/null +++ b/research/p104-banked-chart595-split/price_crosscheck.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python3 +"""Independently enclose the two raw-invoice crossings using decimal intervals.""" + +import argparse +from decimal import Context, Decimal, ROUND_CEILING, ROUND_FLOOR +from functools import cache +import hashlib +import json +from pathlib import Path + + +HERE = Path(__file__).resolve().parent +PARENT = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +CHILD = "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b" +LO = Context(prec=65, rounding=ROUND_FLOOR) +HI = Context(prec=65, rounding=ROUND_CEILING) +NEAR = Context(prec=65) +ONE = Decimal(1) +ZERO = Decimal(0) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +@cache +def logarithm(rank): + if rank == 1: + return ZERO, ZERO + # Decimal.ln and .exp return correctly rounded nearest values. Widen by + # one representable value on each side. The remaining operations below + # are directed, with endpoint order reversed for negative multipliers. + value = NEAR.ln(Decimal(rank)) + return NEAR.next_minus(value), NEAR.next_plus(value) + + +def raw_margin(interval, invoice, derivative=False): + lower = upper = ZERO + for name in sorted(invoice["paid"].keys() | invoice["targets"].keys(), key=int): + rank = int(name) + count = invoice["targets"].get(name, 0) - invoice["paid"].get(name, 0) + a, b = logarithm(rank) + if rank == 1: + v = w = ONE + else: + left = LO.multiply(a, LO.subtract(ONE, interval[1])) + right = HI.multiply(b, HI.subtract(ONE, interval[0])) + v = NEAR.next_minus(NEAR.exp(left)) + w = NEAR.next_plus(NEAR.exp(right)) + if derivative: + v, w = LO.multiply(a, v), HI.multiply(b, w) + count = -count + if count < 0: + v, w = w, v + lower = LO.add(lower, LO.multiply(count, v)) + upper = HI.add(upper, HI.multiply(count, w)) + return lower, upper + + +def root_bracket(invoice, left, right): + def at(k): + return raw_margin((k, k), invoice) + + require(at(left)[0] > 0 and at(right)[1] < 0, "outer bracket has strict opposite signs") + derivative = raw_margin((left, right), invoice, derivative=True) + require(derivative[1] < 0, "strict decrease throughout the tested interval") + # Every midpoint and decimal grid point below is exactly representable. + ticks = Decimal(10) ** 13 + a, b = int(left * ticks), int(right * ticks) + while b - a > 1: + m = (a + b) // 2 + lower, upper = at(Decimal(m) / ticks) + if lower > 0: + a = m + elif upper < 0: + b = m + else: + raise ValueError("unresolved sign at a grid point") + return (Decimal(a) / ticks, Decimal(b) / ticks), derivative + + +def text_pair(interval): + return [str(x) for x in interval] + + +def check(caller, claim): + source = (HERE / "data" / "PARENT-INVOICES.json").read_bytes() + require(hashlib.sha256(source).hexdigest() == caller["published_parent_invoice_sha256"], + "source invoice hash") + peer, child = (caller["invoices"][key] for key in ("peer", "candidate")) + require(caller["graphs"] == {"peer": PARENT, "candidate": CHILD} + and json.loads(source)["candidate"] == peer, "exact parent, child and invoice") + require(peer["paid"] == child["paid"] and child["contract"] == peer["contract"], + "all paid ranks and the price contract agree") + changes = {r: child["targets"].get(r, 0) - peer["targets"].get(r, 0) + for r in peer["targets"].keys() | child["targets"].keys()} + require({r: v for r, v in changes.items() if v} == {"1": 16, "8": 16, "9": -16}, + "exact full signed target difference") + left, right = Decimal("0.0037260"), Decimal("0.00376669") + peer_bracket, peer_slope = root_bracket(peer, left, right) + child_bracket, child_slope = root_bracket(child, left, right) + require(peer_bracket == (Decimal("0.0037261023900"), Decimal("0.0037261023901")), + "exact #7682 crossing bracket") + require(peer_bracket[1] < claim <= child_bracket[0], "strict guarded gain") + margin = raw_margin((claim, claim), child) + at_peer = raw_margin((peer_bracket[1], peer_bracket[1]), child) + control = dict(child, paid=dict(child["paid"])) + control["paid"]["1"] += 1 + bad = raw_margin((claim, claim), control) + require(margin[0] > 0 and at_peer[0] > 0 and bad[1] < 0, "two strict signs and fee control") + return { + "status": "PASS_INDEPENDENT_DIRECTED_PRICE", + "parent_bracket": text_pair(peer_bracket), "child_bracket": text_pair(child_bracket), + "strict_gain_above_parent_upper": str(claim - peer_bracket[1]), + "claim": str(claim), "child_margin_at_claim": text_pair(margin), + "child_margin_at_parent_upper": text_pair(at_peer), + "one_extra_rank_one_at_claim": text_pair(bad), + "derivative_domain": text_pair((left, right)), + "derivatives": {"peer": text_pair(peer_slope), "child": text_pair(child_slope)}, + "candidate_graph_sha256": CHILD, "parent_graph_sha256": PARENT, + } + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--caller", type=Path, required=True) + parser.add_argument("--claim", type=Decimal, required=True) + parser.add_argument("--out", type=Path, required=True) + args = parser.parse_args() + receipt = check(json.loads(args.caller.read_bytes()), args.claim) + with args.out.open("x", encoding="utf-8") as stream: + json.dump(receipt, stream, indent=2, sort_keys=True) + stream.write("\n") + print(receipt["status"], receipt["strict_gain_above_parent_upper"]) diff --git a/research/p104-banked-chart595-split/review/README.md b/research/p104-banked-chart595-split/review/README.md new file mode 100644 index 0000000000..866f41c74c --- /dev/null +++ b/research/p104-banked-chart595-split/review/README.md @@ -0,0 +1,11 @@ +# Independent chart-595 review + +From the package directory, run the standalone standard-library check against the packaged signed caller and outer receipts. + +```sh +python3.12 -I -B review/check_cut_and_price.py \ + --caller-receipt evidence/CALLER.json --outer-receipt evidence/PRICE.json \ + --out /tmp/chart595-independent-review.json +``` + +The checker authenticates both graph hashes, the literal caller, caller layout and edit. It checks the two arbitrary split-owner columns, replays the frozen graph with a complete early typed write to owner 281, and rejects a forced alias and a same-price missing old-value subtraction. An independent numerical caller replay evaluates every one of the 68 rows in each of four Gaussian phase sectors at fixed distinct body values. Complete invoice bins and the directed claim and bracket are independently recounted. A new rank-one payment or a lost rank-one target credit fails the initial threshold. diff --git a/research/p104-banked-chart595-split/review/check_cut_and_price.py b/research/p104-banked-chart595-split/review/check_cut_and_price.py new file mode 100644 index 0000000000..f7949ea181 --- /dev/null +++ b/research/p104-banked-chart595-split/review/check_cut_and_price.py @@ -0,0 +1,416 @@ +#!/usr/bin/env python3 +"""Independent finite chart-595 owner-column, signed caller, and price checks.""" + +import argparse +from collections import Counter +from fractions import Fraction +from functools import cache +import gzip +from hashlib import sha256 +import json +from math import prod +from pathlib import Path + + +HERE = Path(__file__).resolve().parent.parent +PARENT = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +CHILD = "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b" +CALLER = "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf" +LAYOUT = "622c6f458eba2dab0fdfd6050303cbc16ad684ab8b834c7df568264e4cf01db6" +EDIT = "c8a914049eb36f5f307dfabef080169bbee06c024eab77b75249566028ca3fcf" +BASE_INVOICE = "a9aecf52d99d5370506b9dc6d03799241bebd2c03bbdcfa2dd5f45ec03c9d70d" +OLD_ROLE = 281 +NEW_ROLE = 1501 +GOAL = Fraction("0.00372611") + + +def require(predicate, reason): + if not predicate: + raise ValueError(reason) + + +def read(name, expected): + path = HERE / name + raw = path.read_bytes() + if path.suffix == ".gz": + raw = gzip.decompress(raw) + require(sha256(raw).hexdigest() == expected, f"pinned {name}") + return json.loads(raw) + + +def chart_ranks(frames): + spans = [] + for basis in frames: + span = {0} + for vector in basis: + require(vector not in span and 0 < vector < 512, "independent source chart") + span.update({x ^ vector for x in span}) + spans.append(span) + + @cache + def rank(a, b): + require(spans[a] < spans[b] or spans[b] < spans[a], "positive nested pair") + return abs(len(frames[a]) - len(frames[b])) + + return rank + + +def read_rows(graph, raw_forms): + paid = {key: (source, end) for key, source, end in graph["moves"]} + terminal_offset = graph["first_output"] + records = {key: {donor: Fraction(q) for donor, q in facts} for key, facts in raw_forms} + expected = paid.keys() | set(range(terminal_offset, terminal_offset + len(graph["final"]))) + schedule = graph["schedule"] + require(len(expected) == len(records) == len(schedule) and set(schedule) == expected, + "each paid and terminal row once") + available = {~role: chart for role, chart in enumerate(graph["initial"])} + for key in schedule: + if key in paid: + source, end = paid[key] + else: + source, end = graph["final"][key - terminal_offset], None + require(all(available.get(donor) == source for donor in records[key]), + f"available same-chart charged donor at {key}") + if end is not None: + available[key] = end + return records + + +def evaluate(graph, records, inputs): + held = {~r: Fraction(inputs.get(r, 0)) for r in range(len(graph["initial"]))} + for key in graph["schedule"]: + held[key] = sum((a * held[k] for k, a in records[key].items() if held[k]), Fraction()) + start = graph["first_output"] + return {i: held[start + i] for i in range(len(graph["final"])) if held[start + i]} + + +def early_public_overwrite(graph, records, short_key, first_suffix): + """Install into the short owner's actual public slot before running the suffix.""" + roster = {OLD_ROLE: Fraction(7), NEW_ROLE: Fraction(-11)} + public = {r: (r, chart, roster.get(r, Fraction())) for r, chart in enumerate(graph["initial"])} + held = {~r: field[2] for r, field in public.items()} + old_entry = public[OLD_ROLE] + short = (OLD_ROLE, 595, roster[OLD_ROLE]) + for position, key in enumerate(graph["schedule"]): + held[key] = sum((a * held[k] for k, a in records[key].items() if held[k]), Fraction()) + if key == short_key: + require(public[OLD_ROLE] == old_entry and held[key] == short[2], "complete short owner before install") + public[OLD_ROLE] = (OLD_ROLE, graph["final"][OLD_ROLE], held[key]) + # A later use of even the old private entrance would now fail. + del held[~OLD_ROLE] + if position == first_suffix: + require(public[OLD_ROLE] == short and public[OLD_ROLE] != old_entry + and ~OLD_ROLE not in held, "public chart changed before independent suffix") + start = graph["first_output"] + for r, chart in enumerate(graph["final"]): + if r != OLD_ROLE: + public[r] = (r, chart, held[start + r]) + require(public[r] == (r, chart, roster.get(r, Fraction())), f"early-install complete owner {r}") + return {"early_same_owner_chart": public[OLD_ROLE][1], "fresh_same_owner_chart": public[NEW_ROLE][1], + "distinct_signed_payloads": [str(public[r][2]) for r in (OLD_ROLE, NEW_ROLE)], + "old_private_entry_removed_at_cut": True, "complete_owner_outputs_compared": len(public)} + + +def check_cut(parent, child, edit): + require(len(parent["initial"]) == 1501 and len(child["initial"]) == 1502 + and parent["frames"] == child["frames"] + and parent["moves"] == child["moves"] and len(child["moves"]) == 6142, + "unchanged paid word and expanded public stock") + require(parent["initial"] == child["initial"][:-1] + and [r for r in range(1501) if parent["final"][r] != child["final"][r]] == [OLD_ROLE], + "only declared public owner boundaries change") + frames = child["initial"], child["final"] + require([(frames[0][r], frames[1][r]) for r in (OLD_ROLE, NEW_ROLE)] == [(3, 595), (595, 127)], + "separate same-owner endpoint charts") + paid = {key for key, _, _ in child["moves"]} + require([k for k in child["schedule"] if k in paid] == + [k for k in parent["schedule"] if k in paid], "same chronological paid order") + records = read_rows(child, child["forms"]) + prefix = {k: Fraction(q) for k, q in edit["prefix"]} + injection = {k: Fraction(q) for k, q in edit["injection"]} + old_exit = child["first_output"] + OLD_ROLE + position = {key: i for i, key in enumerate(child["schedule"])} + first_suffix = min(position[k] for k in injection) + require(records[old_exit] == prefix + and max(position[k] for k in prefix) < position[old_exit] < first_suffix, + "complete 281 output precedes fresh suffix") + require({key: row[~NEW_ROLE] for key, row in records.items() if ~NEW_ROLE in row} == injection, + "fresh owner is read solely in the ten suffix sends") + handoff = {} + for role in (OLD_ROLE, NEW_ROLE): + observed = evaluate(child, records, {role: 1}) + require(observed == {role: 1}, f"complete normalized arbitrary owner column {role}") + handoff[role] = {i: str(value) for i, value in observed.items()} + + separate_inputs = {OLD_ROLE: 0, NEW_ROLE: 1} + aliased_inputs = {**separate_inputs, NEW_ROLE: separate_inputs[OLD_ROLE]} + aliased = evaluate(child, records, aliased_inputs) + require(aliased == {} and handoff[NEW_ROLE] == {NEW_ROLE: "1"}, + "copied instead of independent owner fails the y-only column") + broken = records.copy() + key = min(injection, key=position.get) + broken[key] = records[key].copy() + for donor, weight in prefix.items(): + broken[key][donor] = broken[key].get(donor, 0) + injection[key] * weight + leaked = evaluate(child, broken, {OLD_ROLE: 1}) + require(leaked != {OLD_ROLE: 1}, "same-price omitted old-value correction fails") + return {"early_terminal_position_zero_based": position[old_exit], + "first_fresh_read_position_zero_based": first_suffix, + "early_same_owner_overwrite_control": early_public_overwrite(child, records, old_exit, first_suffix), + "private_entry_281_reads_after_commit": sum( + ~OLD_ROLE in records[k] for k in child["schedule"][position[old_exit]+1:]), + "independent_owner_columns": handoff, + "aliased_fresh_column": {i: str(value) for i, value in aliased.items()}, + "omitted_old_value_injection_slot": key, + "omission_different_roles": sorted(i for i in leaked.keys() | {OLD_ROLE} + if leaked.get(i, 0) != (i == OLD_ROLE))} + + +def recount(graph, tape, layout, rank): + main = set(layout["live"]) + main.update(r + 112 for r in layout["live"]) + main.update(layout["hosted"]["X2"]) + main.update(layout["hosted"]["Y2"]) + require(len(main) == 400, "four hundred actual native main slots") + types = tape["types"] + require(set(types["A"]["ports"]).isdisjoint(types["B"]["ports"]) + and (len(types["A"]["ports"]), len(types["B"]["ports"])) == (96, 8), + "disjoint actual port types") + stages = [e[1] for e in tape["events"] if e[0] == "J"] + require(stages == list(range(1, 17)) and tape["ambient_rank"] == 137, "literal signed stages") + paid = Counter(rank(a, b) for _, a, b in graph["moves"]) + target = Counter(rank(a, b) for r, (a, b) in enumerate(zip(graph["initial"], graph["final"], strict=True)) + if r not in main) + paid = Counter({r: len(stages) * n for r, n in paid.items()}) + target = Counter({r: len(stages) * n for r, n in target.items()}) + for kind, instruction, *args in tape["events"]: + if kind == "J": + continue + multiplier = len(types[kind]["ports"]) + if instruction == "QUERY": + paid[1] += multiplier + elif instruction.startswith("IDLE_"): + paid[8*len(args[1]) + (instruction == "IDLE_ODD")] += multiplier + root_owners = set() + for spec in types.values(): + for j, (phase, coeff_phase, *axes) in enumerate(spec["diagonal"]): + require(len(axes) == 16 and set(axes) <= {0, 1} and coeff_phase == 0, + "literal squarefree root target") + target[8 * sum(axes) + (phase % 2)] += len(spec["ports"]) + root_owners.update((port, spec["offset"] + j) for port in spec["ports"]) + helpers = {(stage, r) for stage in stages for r in range(len(graph["initial"])) if r not in main} + require(len(root_owners) == 3536 and len(helpers) + len(root_owners) == sum(target.values()), + "distinct native helper tags and root owners") + return paid, target, len(helpers) + + +def signed_sectors(tape): + prime = 1000000009 + candidates = [pow(base, (prime - 1) // 4, prime) for base in range(2, 16)] + imaginary = next(q for q in candidates if q*q % prime == prime - 1) + inverse_two = pow(2, -1, prime) + body = {i: 7 + 2*i for i in range(1, 17)} + width = tape["roles"] + weights = {} + + def linear(a, b, coefficient): + return [(x + coefficient*y) % prime for x, y in zip(a, b, strict=True)] + + def scaled(row, amount): + return [x * amount % prime for x in row] + + for q in (1, prime-1, imaginary, prime-imaginary): + q_inverse = pow(q, -1, prime) + rows = [[int(i == j) for j in range(width)] for i in range(width)] + for event in tape["events"]: + if event[0] == "J": + _, stage, (x, y, u, v), (a, b, alpha, beta) = event + require(alpha == "-1" and beta == "1/2" + and len({x, y, u, v, a, b}) == 6, "actual J signs and distinct lanes") + rows[y] = linear(rows[y], rows[x], q_inverse) + rows[u] = linear(rows[u], rows[v], -q) + left, right = rows[a], rows[b] + rows[a] = linear(left, right, -q) + rows[b] = scaled(linear(right, left, q_inverse), inverse_two) + for k in (x, y, u, v, a, b): + rows[k] = scaled(rows[k], body[stage]) + continue + _, op, r, *args = event + if op == "SWAP": + s = args[0] + rows[r], rows[s] = rows[s], rows[r] + elif op == "QUERY": + s, phase = args + rows[r] = linear(rows[r], rows[s], pow(q, phase, prime)) + elif op in ("ADD", "SCALE"): + c = Fraction(args[-1]) + amount = c.numerator * pow(c.denominator, -1, prime) % prime + if op == "ADD": + rows[r] = linear(rows[r], rows[args[0]], amount) + else: + rows[r] = scaled(rows[r], amount) + elif op == "LAMBDA": + phase = args[0] + amount = (1 + imaginary*phase) + (1 - imaginary*phase) * q*q + rows[r] = scaled(rows[r], amount*inverse_two) + elif op == "IDLE_ONE": + rows[r] = scaled(rows[r], prod(body[i] for i in args[0])) + elif op == "IDLE_ODD": + rows[r] = scaled(rows[r], prod(body[i] for i in args[0]) * pow(q, args[1], prime)) + else: + raise ValueError(f"unknown signed caller operation {op}") + for spec in tape["types"].values(): + for index, (phase, _, *axes) in enumerate(spec["diagonal"]): + r = spec["offset"] + index + expected = pow(q, phase, prime) * prod(body[i] for i, on in enumerate(axes, 1) if on) + require(rows[r] == [expected % prime if r == j else 0 for j in range(width)], + f"full signed sector {q} row {r}") + weights[q] = sha256(json.dumps(rows, separators=(",", ":")).encode()).hexdigest() + return {"prime": prime, "body_fixture": body, "phi": imaginary, "q_sector_output_hashes": weights, + "complete_rows_per_sector": width} + + +def log_term(z): + # 2*atanh(z), with a geometric upper bound on the remaining denominator-weighted terms. + terms = 28 + low = 2 * sum((z ** (2*j+1) / (2*j+1) for j in range(terms)), Fraction()) + high = low + 2 * z ** (2*terms+1) / ((2*terms+1)*(1-z*z)) + return low, high + + +@cache +def log_rank(rank): + power = rank.bit_length() - 1 + mantissa = Fraction(rank, 1 << power) + lo, hi = log_term((mantissa - 1) / (mantissa + 1)) + l2, h2 = log_term(Fraction(1, 3)) + return lo + power*l2, hi + power*h2 + + +def alternating_exp(x): + require(0 <= x < 1, "alternating exponential in decreasing range") + term = total = Fraction(1) + for n in range(1, 20): + term *= -x/n + total += term + return total, total-term + + +@cache +def weight(rank, point): + lo, hi = log_rank(rank) + lower = rank * alternating_exp(point*hi)[0] + upper = rank * alternating_exp(point*lo)[1] + # Keep exact intervals portable without serializing huge intermediate denominators. + denominator = 1 << 160 + lower_tick = (lower.numerator * denominator) // lower.denominator + negative_upper_tick = (-upper.numerator * denominator) // upper.denominator + return Fraction(lower_tick, denominator), Fraction(-negative_upper_tick, denominator) + + +def moment(paid, targets, point): + lower = upper = Fraction() + for rank in paid.keys() | targets.keys(): + coefficient = targets[rank] - paid[rank] + lo, hi = weight(rank, point) + a, b = sorted((coefficient*lo, coefficient*hi)) + lower += a + upper += b + return lower, upper + + +def bill(invoice): + return tuple(Counter({int(k): value for k, value in invoice[name].items()}) + for name in ("paid", "targets")) + + +def endpoint_certificate(outer, parent_bill, child_bill): + require(outer["graphs"] == {"candidate": CHILD, "peer": PARENT} + and outer["caller_sha256"] == CALLER, "frozen joined outer inputs") + claim = Fraction(outer["candidate_directed_conditional_lower"]) + peer_upper = Fraction(outer["published_peer_upper"]) + lo, hi = map(Fraction, outer["candidate_raw_bracket"]) + require(peer_upper < GOAL <= claim < lo < hi < 1, "literal comparator and candidate order") + cases = { + "peer_on_peer_upper": (parent_bill, peer_upper, -1), + "child_on_claim": (child_bill, claim, 1), + "child_on_raw_lower": (child_bill, lo, 1), + "child_on_raw_upper": (child_bill, hi, -1), + } + result = {} + for name, ((p, t), point, sign) in cases.items(): + bounds = moment(p, t, point) + require(bounds[0] > 0 if sign > 0 else bounds[1] < 0, f"independent directed sign {name}") + result[name] = {"point": str(point), "bounds": list(map(str, bounds)), + "decimal_for_readback": list(map(float, bounds))} + return result + + +def check_price(parent, child, tape, layout, caller_receipt, outer): + rank = chart_ranks(child["frames"]) + p0, t0, h0 = recount(parent, tape, layout, rank) + p1, t1, h1 = recount(child, tape, layout, rank) + original = read("data/PARENT-INVOICES.json", BASE_INVOICE) + require((p0, t0) == bill(original["candidate"]), "independent literal parent recensus") + require(caller_receipt["graphs"]["candidate"] == CHILD and caller_receipt["caller_sha256"] == CALLER + and (p1, t1) == bill(caller_receipt["invoices"]["candidate"]), + "independent literal child agrees with the signed caller run") + changed = t1.copy() + changed.subtract(t0) + require(p0 == p1 and {r: n for r, n in changed.items() if n} == {1: 16, 8: 16, 9: -16}, + "only the signed 16-call split") + require((sum(p1.values()), sum(t1.values()), h0, h1) == (101824, 21168, 17616, 17632), + "complete distinct productive census") + k = GOAL + old = moment(p0, t0, k) + candidate = moment(p1, t1, k) + fee_paid = p1.copy() + fee_paid[1] += 1 + lost_credit = t1.copy() + lost_credit[1] -= 1 + fee = moment(fee_paid, t1, k) + lost = moment(p1, lost_credit, k) + require(old[1] < 0 < candidate[0] and fee == lost and fee[1] < 0, + "both one-rank-one failure modes reject the threshold") + ranges = {"parent": old, "candidate": candidate, "one_paid_rank_one_added": fee, + "one_rank_one_productive_credit_withdrawn": lost} + result = {"point": str(k), "ranges": {k: list(map(str, v)) for k, v in ranges.items()}, + "ranges_decimal_for_readback": {k: list(map(float, v)) for k, v in ranges.items()}, + "native_helpers_parent": h0, "native_helpers_child": h1, "whole_paid_child": sum(p1.values()), + "whole_targets_child": sum(t1.values()), "paid": p1, "targets": t1} + if outer is not None: + result["outer_receipt_endpoint_signs"] = endpoint_certificate(outer, (p0, t0), (p1, t1)) + return result + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--caller-receipt", type=Path, required=True) + ap.add_argument("--outer-receipt", type=Path) + ap.add_argument("--out", type=Path, required=True) + args = ap.parse_args() + p = read("data/PARENT-GRAPH.json.gz", PARENT) + c = read("data/CANDIDATE-GRAPH.json.gz", CHILD) + tape = read("data/CALLER.json.gz", CALLER) + layout = read("data/CALLER-LAYOUT.json", LAYOUT) + edit = read("EDIT.json", EDIT) + receipt = args.caller_receipt.read_bytes() + outer = args.outer_receipt.read_bytes() if args.outer_receipt else None + result = { + "status": "PASS_INDEPENDENT_CUT_SECTORS_AND_DIRECTED_PRICE_CONTROL", + "candidate_graph": CHILD, "parent_graph": PARENT, "signed_caller": CALLER, + "actual_signed_caller_receipt_sha256": sha256(receipt).hexdigest(), + "owner_columns_and_timing": check_cut(p, c, edit), + "signed_sector_evaluations": signed_sectors(tape), + "price": check_price(p, c, tape, layout, json.loads(receipt), json.loads(outer) if outer else None), + } + if outer: + result["joined_outer_receipt_sha256"] = sha256(outer).hexdigest() + with args.out.open("x") as out: + json.dump(result, out, sort_keys=True, indent=2) + out.write("\n") + print(result["status"]) + + +if __name__ == "__main__": + main() diff --git a/research/p104-banked-chart595-split/verify.py b/research/p104-banked-chart595-split/verify.py new file mode 100644 index 0000000000..dfea662da4 --- /dev/null +++ b/research/p104-banked-chart595-split/verify.py @@ -0,0 +1,294 @@ +#!/usr/bin/env python3 +"""Replay the chart-595 certificate using the individual authenticated executors.""" + +from argparse import ArgumentParser +from fractions import Fraction +from hashlib import sha1, sha256 +from pathlib import Path, PurePosixPath +from tempfile import TemporaryDirectory +from time import monotonic +import gzip +import json +import os +import resource +import subprocess +import sys + + +ROOT = Path(__file__).resolve().parent +BASE = "e54523517d0f03e58352e647c403a5af3e525a57" +BRIDGE = "0eabc624a9bc9ed2847719efd63390db4d297df4" +PARENT_HEAD = "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e" +PARENT = "1f082936ada08b5138b7d13e33368bd21c6f46632c5319a348e2f2a8e0021150" +CANDIDATE = "d5dab11bb773bf5beb8ae2998be1282b243e2d1606c5257896a037c9b52c5c3b" +CANDIDATE_GZIP = "789c51223158f816b4046321e28449e1db540d20b75ce57e0699a20706bc3510" +CALLER = "62d94fb992acab0a71c3d12f22be4ce63f4f65e5cbe3f420b93aa1393ffa8dcf" +EDIT = "c8a914049eb36f5f307dfabef080169bbee06c024eab77b75249566028ca3fcf" +PARENT_UPPER = Fraction("0.0037261023901") +CLAIM = "0.0037266288" +GRAPHS = {"peer": PARENT, "candidate": CANDIDATE} +TARGET_DELTA = {"1": 16, "8": 16, "9": -16} +LIMITS = {"core": 300, "catalogue": 260, "dense": 360} + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def asset(relative): + name = PurePosixPath(relative) + require(name.parts and not name.is_absolute() and ".." not in name.parts and name.as_posix() == relative, + f"invalid asset path {relative}") + path = ROOT.joinpath(*name.parts) + require(path.resolve() == path and path.is_file(), f"missing or aliased asset {relative}") + return path + + +def digest(raw): + return sha256(raw).hexdigest() + + +def read(path): + return json.loads(path.read_bytes()) + + +def write(path, payload): + with path.open("x", encoding="utf-8") as stream: + json.dump(payload, stream, sort_keys=True, indent=2) + stream.write("\n") + + +def decoded_sha(path): + return digest(gzip.decompress(path.read_bytes())) + + +def match_evidence(fresh, name, observed=()): + recorded = read(asset(f"evidence/{name}")) + require({k: v for k, v in fresh.items() if k not in observed} + == {k: v for k, v in recorded.items() if k not in observed}, + f"all reproducible fields match the frozen {name} receipt") + + +def authenticate(): + manifest = read(asset("ASSETS.json")) + require(manifest["schema_version"] == 1 and manifest["base_commit"] == BASE + and manifest["ci_bridge_commit"] == BRIDGE and manifest["parent_head"] == PARENT_HEAD + and manifest["graph_pins"] == GRAPHS and manifest["caller_sha256"] == CALLER, + "exact source and caller manifest") + verified = {} + for row in manifest["files"]: + name = row["path"] + require(name not in verified, f"duplicate asset {name}") + raw = asset(name).read_bytes() + require(len(raw) == row["bytes"] and digest(raw) == row["sha256"], f"asset bytes {name}") + if "git_blob" in row: + require(sha1(f"blob {len(raw)}\0".encode() + raw).hexdigest() == row["git_blob"], + f"original Git blob {name}") + verified[name] = row["sha256"] + actual = set() + for path in ROOT.rglob("*"): + require(not path.is_symlink(), f"aliased package entry {path.relative_to(ROOT)}") + if path.is_file(): + actual.add(path.relative_to(ROOT).as_posix()) + require(actual == verified.keys() | {"ASSETS.json"}, "complete package file inventory") + require(verified["EDIT.json"] == EDIT and verified["data/CANDIDATE-GRAPH.json.gz"] == CANDIDATE_GZIP, + "frozen literal edit and candidate transport") + require(decoded_sha(asset("data/PARENT-GRAPH.json.gz")) == PARENT + and decoded_sha(asset("data/CANDIDATE-GRAPH.json.gz")) == CANDIDATE + and decoded_sha(asset("data/CALLER.json.gz")) == CALLER, "canonical graph and caller bytes") + return verified + + +def invoke(out, name, script, deadline, *args): + remaining = deadline - monotonic() + require(remaining > 0, f"stage deadline before {name}") + env = os.environ.copy() + env.pop("PYTHONOPTIMIZE", None) + env.update(OPENBLAS_NUM_THREADS="1", OMP_NUM_THREADS="1", NUMEXPR_NUM_THREADS="1") + stdout = out / f"{name}.stdout" + stderr = out / f"{name}.stderr" + argv = [sys.executable, "-I", "-B", "-X", f"pycache_prefix={out / 'fresh-bytecode'}", + str(asset(script)), *(str(arg) for arg in args)] + with stdout.open("xb") as output, stderr.open("xb") as error: + process = subprocess.run(argv, cwd=ROOT, stdout=output, stderr=error, env=env, timeout=remaining) + if process.returncode: + sys.stderr.write(stderr.read_text(encoding="utf-8", errors="replace")) + process.check_returncode() + print(f"Finished {name}", flush=True) + return stdout + + +def construct(out, deadline): + output = out / "CANDIDATE-GRAPH.json.gz" + summary = invoke(out, "construction", "construct.py", deadline, + "--parent", asset("data/PARENT-GRAPH.json.gz"), "--edit", asset("EDIT.json"), "--out", output) + require(f"PASS_P104_CHART595_CONSTRUCTION {CANDIDATE}" in summary.read_text().splitlines() + and decoded_sha(output) == CANDIDATE, "fresh candidate reconstruction") + + +def verify_core(out, deadline): + normalized_path = invoke(out, "normalized", "operator.py", deadline) + normalized = read(normalized_path) + require(normalized["status"] == "PASS_CHART595_EXACT_NORMALIZED_OPERATOR" + and normalized["parent_graph_sha256"] == PARENT and normalized["candidate_graph_sha256"] == CANDIDATE + and normalized["operator_sizes"] == {"original": 1501, "candidate": 1502} + and normalized["all_normalized_forward_and_adjoint_coefficients_exact"], + "full normalized operator on both exact graphs") + match_evidence(normalized, "OPERATOR.json") + + parent = asset("data/PARENT-GRAPH.json.gz") + candidate = asset("data/CANDIDATE-GRAPH.json.gz") + caller = asset("data/CALLER.json.gz") + physical_path = out / "PHYSICAL.json" + invoke(out, "physical", "physical.py", deadline, + "--parent", parent, "--candidate", candidate, "--caller", caller, + "--candidate-sha256", CANDIDATE, "--out", physical_path) + physical = read(physical_path) + child_storage = physical["native"]["candidate"] + require(physical["status"] == "PASS_CHART595_BANK_PHYSICAL" and physical["graphs"] == GRAPHS + and physical["caller_sha256"] == CALLER and physical["both_graphs_respect_historical_numeric_homes_and_streams"] + and child_storage["short_return_sealed_at_public_role"] == 281 + and child_storage["short_return_public_install_schedule_position"] == 996 + and child_storage["short_return_original_entrance_retired_at_install"] + and child_storage["nonretired_public_inputs_preserved_until_final_installs"], + "paired common root, early public installation and finite ordinary accounting") + match_evidence(physical, "PHYSICAL.json") + + caller_path = out / "CALLER.json" + invoke(out, "caller", "caller.py", deadline, + "--parent", parent, "--candidate", candidate, "--caller", caller, + "--candidate-sha256", CANDIDATE, "--out", caller_path) + signed = read(caller_path) + require(signed["status"] == "PASS_CHART595_ACTUAL16_CALLER" and signed["graphs"] == GRAPHS + and signed["caller_sha256"] == CALLER and signed["signed"]["calls"] == 16 + and signed["signed_paid_delta"] == {} and signed["signed_target_delta"] == TARGET_DELTA, + "complete signed caller and exact productive substitution") + for name, targets in (("peer", 21152), ("candidate", 21168)): + receipt = signed["invoices"][name] + require(sum(receipt["paid"].values()) == 101824 and sum(receipt["targets"].values()) == targets, + f"whole signed invoice counts {name}") + match_evidence(signed, "CALLER.json") + + price_path = out / "PRICE.json" + invoke(out, "price", "price.py", deadline, + "--caller-proof", caller_path, "--physical", physical_path, "--out", price_path) + price = read(price_path) + outer = price["compiler"]["outer"] + require(price["status"] == "PASS_CHART595_DIRECTED_PRICE_OUTER" and price["graphs"] == GRAPHS + and price["caller_sha256"] == CALLER and price["physical_join"] + and outer["strict_count"] == 54 and outer["functional_count"] == 4 + and Fraction(price["published_peer_upper"]) == PARENT_UPPER + and price["candidate_directed_conditional_lower"] == CLAIM and Fraction(CLAIM) > PARENT_UPPER, + "complete directed lower exceeds the matched upper") + match_evidence(price, "PRICE.json") + cross_path = out / "CROSSPRICE.json" + invoke(out, "crosscheck", "price_crosscheck.py", deadline, + "--caller", caller_path, "--claim", CLAIM, "--out", cross_path) + cross = read(cross_path) + require(cross["status"] == "PASS_INDEPENDENT_DIRECTED_PRICE" and cross["claim"] == CLAIM + and cross["parent_graph_sha256"] == PARENT and cross["candidate_graph_sha256"] == CANDIDATE + and tuple(map(Fraction, cross["child_bracket"])) == tuple(map(Fraction, price["candidate_raw_bracket"])), + "independent directed endpoints") + match_evidence(cross, "CROSSPRICE.json") + review_path = out / "INDEPENDENT-REVIEW.json" + invoke(out, "independent-review", "review/check_cut_and_price.py", deadline, + "--caller-receipt", caller_path, "--outer-receipt", price_path, "--out", review_path) + review = read(review_path) + require(review["status"] == "PASS_INDEPENDENT_CUT_SECTORS_AND_DIRECTED_PRICE_CONTROL" + and review["candidate_graph"] == CANDIDATE and review["parent_graph"] == PARENT + and review["signed_caller"] == CALLER + and review["actual_signed_caller_receipt_sha256"] == digest(caller_path.read_bytes()) + and review["joined_outer_receipt_sha256"] == digest(price_path.read_bytes()), + "independent typed cut, caller sectors, and price bound to the fresh application") + match_evidence(review, "INDEPENDENT-REVIEW.json") + return {"status": "PASS_CHART595_CORE", "graph_pins": GRAPHS, "caller_sha256": CALLER, + "conditional_lower": price["candidate_directed_conditional_lower"], + "raw_bracket": price["candidate_raw_bracket"], + "fresh_receipts": {path.name: digest(path.read_bytes()) for path in + (normalized_path, physical_path, caller_path, price_path, cross_path, review_path)}} + + +def verify_catalogue(out, deadline): + native_out = out / "native" + invoke(out, "native", "native.py", deadline, + "--candidate-sha", CANDIDATE, "--candidate-gzip-sha", CANDIDATE_GZIP, "--out", native_out) + phase_path = native_out / "PHASE-RESULT.json" + phase = read(phase_path) + recipe = native_out / "SPLIT-RECIPES.json" + require(phase["status"] == "PASS_CHART595_NATIVE_PHASE_AND_BINDING" + and phase["recipient_graph_sha256"] == PARENT and phase["candidate_graph_sha256"] == CANDIDATE + and phase["caller_sha256"] == CALLER and phase["paid_occurrences_rebound"] == 6142 + and phase["ordered_pairs_rechecked"] == 3024 + and phase["main_boundaries_rechecked"] == 104 and phase["fresh_split_maps"] == 2 + and phase["columns_each_direction_per_split_map"] == 512 and phase["wrong_phase_controls_rejected"] == 2 + and phase["artifact_sha256"][recipe.name] == digest(recipe.read_bytes()), + "complete native recipe binding with fresh split forward and adjoint columns") + match_evidence(phase, "PHASE-RESULT.json", ("started_at", "completed_at", "start_sha256", "cpu_seconds", "peak_rss_kib")) + match_evidence(read(recipe), "SPLIT-RECIPES.json") + return {"status": "PASS_CHART595_CATALOGUE", "graph_pins": GRAPHS, + "fresh_receipts": {path.name: digest(path.read_bytes()) for path in (phase_path, recipe)}} + + +def verify_dense(out, deadline): + receipt_path = invoke(out, "held-arrays", "dense.py", deadline) + receipt = read(receipt_path) + cases = {data["prime"]: data["cases"] for data in receipt["fields"]} + controls = {name: status for samples in cases.values() for case in samples + for name, status in case["actual_negative_controls"].items()} + require(receipt["status"] == "PASS_P104_CHART595_DENSE_HELD_ARRAYS" + and receipt["graph_pins"] == {"parent": PARENT, "candidate": CANDIDATE} + and receipt["caller_sha256"] == CALLER and receipt["field_width"] == 512 + and receipt["paid_slots_per_word"] == 6142 and receipt["main_outputs"] == 400 + and receipt["candidate_helper_outputs"] == 1102 + and set(cases) == {1000000009, 998244353} and all(len(samples) == 2 for samples in cases.values()) + and set(controls) == {"injection_coefficient_sign", "prefix_return_quarter_phase"} + and all(control["one_actual_mutation_verified"] for control in controls.values()), + "whole typed held-array gate with two seeds per prime and both actual faults") + match_evidence(receipt, "DENSE.json") + return {"status": "PASS_CHART595_DENSE", "graph_pins": GRAPHS, + "fresh_receipts": {receipt_path.name: digest(receipt_path.read_bytes())}} + + +def run_stage(stage, out, authenticated): + deadline = monotonic() + LIMITS[stage] - 2 + construct(out, deadline) + if stage == "core": + result = verify_core(out, deadline) + elif stage == "catalogue": + result = verify_catalogue(out, deadline) + else: + result = verify_dense(out, deadline) + require(authenticated == authenticate(), "immutable assets before and after replay") + write(out / "RESULT.json", result) + print(json.dumps(result, sort_keys=True), flush=True) + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("stage", choices=("integrity", *LIMITS)) + parser.add_argument("--out", type=Path) + args = parser.parse_args() + require(sys.version_info[:2] == (3, 12) and sys.flags.isolated and sys.dont_write_bytecode and __debug__, + "use CPython 3.12 -I -B with assertions enabled") + authenticated = authenticate() + if args.stage == "integrity": + require(args.out is None, "integrity writes no outputs") + print(json.dumps({"status": "PASS_CHART595_PACKAGE_INTEGRITY", "assets": len(authenticated)})) + return + cap = 2 * 1024**3 + current, hard = resource.getrlimit(resource.RLIMIT_AS) + kept = min(n for n in (cap, current, hard) if n != resource.RLIM_INFINITY) + resource.setrlimit(resource.RLIMIT_AS, (kept, kept)) + if args.out is not None: + out = args.out.resolve() + require(out != ROOT and ROOT not in out.parents, "replay output must be outside the authenticated package") + out.mkdir() + run_stage(args.stage, out, authenticated) + else: + with TemporaryDirectory(prefix="chart595-replay-") as directory: + run_stage(args.stage, Path(directory), authenticated) + + +if __name__ == "__main__": + main()