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-four-role-endpoint-exchange-bound/LOCAL-PINS.json b/research/p104-four-role-endpoint-exchange-bound/LOCAL-PINS.json new file mode 100644 index 0000000000..20fcba9b33 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/LOCAL-PINS.json @@ -0,0 +1,24 @@ +{ + "continue_prefix.py": "fa2e4fe028451ce25737daf7c84a7e26529aca8979448a3350e72363becd519d", + "inputs/7113-fixed-tape.py": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "inputs/7113-independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "inputs/7334-CALLER-RESULT.json": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/R143-GEOMETRY.json": "f2aa238ed8c49f0633c3837c6961bfba19482385851a5606578fa6368db79542", + "inputs/R148-PRICE.json": "8b71d05eddb3aee641ffa41a57a3922292bc4d45c5eb8aae8f2e4514388f6524", + "inputs/reverse_span.py": "f8b48f2ed99d003e20f5b3fb2270603c4edbc3ce9a01484102816aa2710ce9ff", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d", + "lead/PRICE.json": "e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22", + "lead/basis.py": "3ff8748c0bcbcceea120265f87d92263cccd17343ef504efbe3b401ca05e4f0b", + "lead/geometry.py": "438fcf3c5253fa0e0b96785c4930a619794623362f7ae20be24a76db54e3cac6", + "lead/price.py": "fa1863bd88e6b1d1f20d7a44526355ddd69b3c667e28aec95dbaf0c2460ace6f", + "receipts/ARCHIVED-CHECK.json": "e23c8509969a0de35fe1fd606368483615d50d3c4954378683f00f8495078d0b", + "receipts/CONTINUATION.json": "e1f1a69526fac421560ca60b7ac304680e2e6cb2f62c74896a1fb96432ade190", + "receipts/PER-CASE-CHECK.json": "69771360db037003df37f59dd2b867e8c97953d9190d1467bf940e62c1fc82f2", + "receipts/SHARED-CHECK.json": "09fa4c64404d744bdb853480753378a19c3751a2b94808cf6102a8d740e4d332", + "receipts/SHARED.json": "6bd15c77fdad955beaca12519b82561e44ab2560ba95cbe74fb1e057e6b50d2d", + "trial/scope.py": "7977500af0bdef919355cf064fc11c68157a269486172c56faee36e90fca2245", + "trial/shared.py": "72589bc428c78283d08a69978dca868bb2e2375219c0c75a3df0ca9371c73d06", + "trial/verify.py": "12d862c7ed9cd542bd290aa551f114e1da5a01441e592ca5f257ec8dda4464d4" +} diff --git a/research/p104-four-role-endpoint-exchange-bound/NOTICE b/research/p104-four-role-endpoint-exchange-bound/NOTICE new file mode 100644 index 0000000000..c10852925e --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/NOTICE @@ -0,0 +1,3 @@ +Apache-2.0. + +#7334 supplies the literal native word and signed admission, and #7113 supplies the retained caller and ordinary/tape rules. #7391 supplies the two-role endpoint cohort and exact cut ranges. #7395 supplies the added role 1454, exact three-role separating input and directed quote. #7370 and #7362 supply the endpoint cohorts and complete signed bill, #7363 the third helper's endpoint cohort, #7130 the cocharted-basis precedent, #7124 the output-rechart precedent, #7355 and #7382 the exact reverse/trace tools, #7338 and #7341 the comparator admission and signed readback, and #7298 the directed tariff. R151 introduced the fourth role 1251 and the first eight exact prefix exclusions. R175 closes the remaining seven and replays all cut incidences independently. OpenAI Codex and subagents materially assisted proof, implementation, independent replay and packaging. diff --git a/research/p104-four-role-endpoint-exchange-bound/PROOF.md b/research/p104-four-role-endpoint-exchange-bound/PROOF.md new file mode 100644 index 0000000000..f391aa2439 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/PROOF.md @@ -0,0 +1,23 @@ +# Scope and exact prefix obstruction + +Let $i$ be one of the productive rank-nine partners in the inherited 615-role cohort and $j=1481$ the fixed productive rank-five role. At a cut where both rows and public rows $1454,1251$ share one chart, relabel the retained suffixes of $i,j$, allow an arbitrary cocharted four-row linear basis at the cut, and keep the other public rows and COPY guards fixed in the augmented output contract. The result covers each eligible cut from the 20 inherited cochart ranges on the exact 76,466-event #7334 native word. + +Write $F$ for the old prefix, $S$ for the old suffix including COPY guards, $P$ for the transposition of $i,j$ at the cut or public output, and $E=SF$ for the original augmented action. The prescribed renamed suffix with a cut-local basis $L$ has action $PSPLF$. Thus $PSPLF=E$ requires + +$$ +S(PL-I)F = (P-I)E. +$$ + +The left-hand side factors through the four current prefix rows since $PL-I$ is supported on their coordinates. The unchanged #7334 public action is the identity after normalization, so the exchanged output difference on the right is $d^\mathsf{T}=e_i^\mathsf{T}-e_j^\mathsf{T}$ up to a nonzero sign. Consequently $d^\mathsf{T}$ must belong to the span of the four prefix rows. The proof uses only a necessary condition and allows any such four-row $L$, including singular choices in this screen. + +For each legal bank we exhibit a rational public input $x$ for which all four prefix rows vanish and $d^\mathsf{T}x\ne0$. This excludes the target row from their span for arbitrary inputs. The previous three-row separating input $x_{1251}=1,x_{1481}=4$ has a nonzero fourth-row response and cannot prove the four-role exclusion. Both exact per-case banks and an independent sparse forward traversal verify the new separators. The matched second solver tries just one fixed previously successful input $x_{533}=x_{1481}=1$ on the seven resumed keys. + +## Cut coverage + +A raw cut is the state before its numbered event. A key records `(i,1481,1454,1251,chart,last_cut)` and is bound to a closed first-to-last interval. #7391 proved the first pair is incident-free inside each inherited interval. R151 additionally splits before an event can change the cut state for either additional role, accounting for their reads as well as writes and requiring all four charts to agree. Each retained interval has no event incident on any bank row from the first cut up to, but excluding, the last cut's event. The bank rows therefore stay constant throughout the interval. The current independent checker verifies these literal interval conditions and evaluates the separator at each raw pre-event cut; closure also holds directly without using alias equality to extend the representative test. + +The inherited domain has 20,455 cut incidences. The full coframe pass rejects 3,961 of them for lack of a shared four-role chart and assigns the remaining 16,494 to the 15 exact keys. The old eight representatives account for 16,016 incidences and the seven resumed representatives for 478. All 15 are exact prefix exclusions. The suffix, determinant, reciprocal/grid, and literal construction gates were conditional on a surviving prefix and did not run. Other partners, further public rows, changed output projection, changed paid itinerary and different native words remain outside this result. + +## Whole-profile price before the support test + +The quote retains 110,519 paid, 22,461 productive and rank surplus 1,424. At most one exchange is compatible because each uses the same role 1481. Over 17 calls the productive histogram changes by $-17 T_5+17 T_6+17 T_8-17 T_9$ in rank-count notation, with paid histogram delta zero. The gross raw moment upper at the old crossing is 0.026750025281436337. The complete directed margin at the strict probe is greater than 0.0263624574395. One additional rank-one paid position defeats that margin. The quoted ordinary reservation charges 24 ADDs, 8 SCALEs and 4 boundary maps per native, with a conservative complete ordinary upper of 782,955,368 and headroom 217,044,632. These are guarded allowances from the signed caller and price receipt. They do not establish a realizable replacement. The exact profile, rational bounds, tape allowance and conditional grid limits are in `lead/PRICE.json`. diff --git a/research/p104-four-role-endpoint-exchange-bound/PROVENANCE.json b/research/p104-four-role-endpoint-exchange-bound/PROVENANCE.json new file mode 100644 index 0000000000..10818cb797 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/PROVENANCE.json @@ -0,0 +1,137 @@ +{ + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent replay and packaging.", + "files": { + "inputs/7113-fixed-tape.py": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "git_blob": "6873f9618d59d489b67b9eaca45e6142a16b53f3", + "path": "research/signed-caller-8x9/replay/supplier7112/short-caller/check_odd_fixed_tape_counts.py", + "sha256": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/07a76c5e2738882c0cb322278e56f6cae3c9885d/research/signed-caller-8x9/replay/supplier7112/short-caller/check_odd_fixed_tape_counts.py" + }, + "inputs/7113-independent.py": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "git_blob": "1ae1d7c680ad86c0fa999f2e8f0c09e966fc07a0", + "path": "research/signed-caller-8x9/replay/supplier7112/short-caller/independent.py", + "sha256": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/07a76c5e2738882c0cb322278e56f6cae3c9885d/research/signed-caller-8x9/replay/supplier7112/short-caller/independent.py" + }, + "inputs/7334-CALLER-RESULT.json": { + "commit": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "git_blob": "3034a490f5b0656ae71495c99493c4ab1ac1f5c6", + "path": "research/p104-helper-319-fused-return/receipts/RESULT.json", + "sha256": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "source": "https://github.com/Clear1nsight/integer-mult-bounds/blob/aaeec8c0acf01e99a5f331ef363a698d9c084ace/research/p104-helper-319-fused-return/receipts/RESULT.json" + }, + "inputs/7334-WORD.json.gz": { + "commit": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "git_blob": "73f43007192eb5a38eb5abb591b871df3e52c7cd", + "path": "research/p104-helper-319-fused-return/WORD.json.gz", + "payload_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "source": "https://github.com/Clear1nsight/integer-mult-bounds/blob/aaeec8c0acf01e99a5f331ef363a698d9c084ace/research/p104-helper-319-fused-return/WORD.json.gz" + }, + "inputs/R143-GEOMETRY.json": { + "commit": "c1660f2c0c4370b00672bf976499587652a56296", + "description": "Exact regenerated inherited cohort and two-role cochart catalogue.", + "hash_manifest": "https://github.com/CrocSwap/integer-mult-bounds/blob/c1660f2c0c4370b00672bf976499587652a56296/research/p104-fixed-paid-endpoint-exchange-bound/receipts/SHA256.json", + "hash_manifest_path": "research/p104-fixed-paid-endpoint-exchange-bound/receipts/SHA256.json", + "receipt_key": "R143-GEOMETRY.json", + "sha256": "f2aa238ed8c49f0633c3837c6961bfba19482385851a5606578fa6368db79542" + }, + "inputs/R148-PRICE.json": { + "commit": "b9336ee2b766843b087dabe83dbe9825f2c6b0c2", + "description": "Exact regenerated three-role directed quote and retained invoice.", + "hash_manifest": "https://github.com/CrocSwap/integer-mult-bounds/blob/b9336ee2b766843b087dabe83dbe9825f2c6b0c2/research/p104-three-role-endpoint-exchange-bound/receipts/SHA256.json", + "hash_manifest_path": "research/p104-three-role-endpoint-exchange-bound/receipts/SHA256.json", + "receipt_key": "R148-PRICE.json", + "sha256": "8b71d05eddb3aee641ffa41a57a3922292bc4d45c5eb8aae8f2e4514388f6524" + }, + "inputs/reverse_span.py": { + "commit": "403e0d388c35e83b15eab5bba67be563b33d5a8a", + "git_blob": "5efbeac87e3963085149244304614844307c8034", + "path": "research/p104-owned-add-source-span-bound/engines/reverse.py", + "sha256": "f8b48f2ed99d003e20f5b3fb2270603c4edbc3ce9a01484102816aa2710ce9ff", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/403e0d388c35e83b15eab5bba67be563b33d5a8a/research/p104-owned-add-source-span-bound/engines/reverse.py" + } + }, + "preceding_round": { + "description": "Archived capped four-role input and first eight exact witnesses. This package regenerates all three receipts.", + "geometry_sha256": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "prefix_sha256": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d", + "price_sha256": "e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22", + "source": "https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19560220" + }, + "predecessor_credits": [ + { + "contribution": "Exact literal word and signed admission.", + "pr": 7334, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7334" + }, + { + "contribution": "Retained signed caller and ordinary/tape accounting.", + "pr": 7113, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7113" + }, + { + "contribution": "Inherited exact two-role endpoint scope and coframe catalogue.", + "pr": 7391, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7391" + }, + { + "contribution": "Three-role coframe extension, added role 1454, predecessor separating input and directed quote.", + "pr": 7395, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7395" + }, + { + "contribution": "Exact rank-five endpoint catalogue.", + "pr": 7370, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7370" + }, + { + "contribution": "Exact rank-nine cohort and complete signed invoice.", + "pr": 7362, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7362" + }, + { + "contribution": "Added role 1454 endpoint cohort.", + "pr": 7363, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7363" + }, + { + "contribution": "Cocharted basis precedent.", + "pr": 7130, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7130" + }, + { + "contribution": "Output rechart precedent.", + "pr": 7124, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7124" + }, + { + "contribution": "Exact reverse-row engine lineage.", + "pr": 7355, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7355" + }, + { + "contribution": "Exact bank-trace lineage.", + "pr": 7382, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7382" + }, + { + "contribution": "Comparator admission.", + "pr": 7338, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7338" + }, + { + "contribution": "Signed readback lineage.", + "pr": 7341, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7341" + }, + { + "contribution": "Directed tariff.", + "pr": 7298, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/7298" + } + ], + "schema_version": 1 +} diff --git a/research/p104-four-role-endpoint-exchange-bound/README.md b/research/p104-four-role-endpoint-exchange-bound/README.md new file mode 100644 index 0000000000..83206744a8 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/README.md @@ -0,0 +1,19 @@ +# Four-role P104 endpoint exchange bound + +**NO VERIFIED GAIN.** The exact [#7334 native word](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) at `aaeec8c0acf01e99a5f331ef363a698d9c084ace` and [#7113 signed caller](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) at `07a76c5e2738882c0cb322278e56f6cae3c9885d` retain conditional κ = 0.00364665195644. The four-role edit would trade productive ranks 5 and 9 for 6 and 8 at fixed paid rank. All 15 prefix banks are excluded. The realized saving is zero. + +The [#7391 two-role scope](https://github.com/CrocSwap/integer-mult-bounds/pull/7391) contains 20,455 raw cut incidences. Extending the [#7395 three-role bank](https://github.com/CrocSwap/integer-mult-bounds/pull/7395) with public role 1251 leaves 16,494 four-role coframed cuts and 3,961 cuts without the required coframe. The original eight exact prefix exclusions and seven resumed exclusions cover all 15 legal segments. An independent forward replay checks all 16,494 eligible incidences directly. The exact proof and price are in [PROOF.md](PROOF.md). The matched workflow trial is inconclusive and leaves the existing per-case solver as default. Its receipts and effort estimates are in [VERIFICATION.md](VERIFICATION.md). + +## Replay + +From the checkout root on a POSIX system, use CPython 3.12 with assertions enabled. + +```sh +python3.12 -I -B research/p104-four-role-endpoint-exchange-bound/replay.py +``` + +The package carries one pinned gzip of the public native word. It needs neither Git metadata, network access, prior temporary files, nor a nonstandard dependency. Expected final line is `PASS_P104_FOUR_ROLE_ENDPOINT_EXCHANGE_BOUND`. Exact inputs and predecessor contributions are recorded in [PROVENANCE.json](PROVENANCE.json) and [NOTICE](NOTICE). OpenAI Codex and subagents materially assisted. + +## Open next questions + +Can a different provider-side edit reduce a paid rank while retaining the caller? Fix one exact slot, charge the entire invoice change including scalar, routing, ownership, restoration and tape, then test signed arbitrary-input action only if the directed saving remains positive. A different endpoint pair or bank role also needs its own coframe census and full price. The present proof closes the inherited four-role family and leaves those distinct scopes open. diff --git a/research/p104-four-role-endpoint-exchange-bound/SOURCES.json b/research/p104-four-role-endpoint-exchange-bound/SOURCES.json new file mode 100644 index 0000000000..e8c2f265cd --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/SOURCES.json @@ -0,0 +1,18 @@ +{ + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "path": "certificates/selected-result.json", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1", + "usage": "provenance" + }, + { + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "path": "docs/research/agent-task-catalog.json", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + } + ], + "schema_version": 1 +} diff --git a/research/p104-four-role-endpoint-exchange-bound/TASK.json b/research/p104-four-role-endpoint-exchange-bound/TASK.json new file mode 100644 index 0000000000..9ceff68c92 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/TASK.json @@ -0,0 +1,117 @@ +{ + "actual_scope": "On the literal 76,466-event #7334 word with fixed #7113 caller, examine the complete inherited #7391 endpoint-exchange scope. Exchange role 1481 with one rank-nine partner from the inherited fixed cohort at an original cochart cut, using only the two exchanged public roles and fixed additional public roles 1454 and 1251 on the same chart. Retain the paid itinerary, all other source/target roles, and protected caller contract.", + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent replay and packaging.", + "author": "P104 endpoint exchange research", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "bottleneck_link": "One admissible exchange would change productive ranks 5,9 to 6,8 across 17 native copies while keeping all paid ranks. The directed margin can absorb zero extra rank-one paid positions. The arbitrary-input prefix span is a necessary condition for this edit.", + "budget_minutes": 20, + "evidence": "All 20,455 inherited raw cut incidences were classified: 3,961 fail the four-role coframe, and 16,494 belong to 15 legal bank segments. The original exact solver excluded eight representatives and the bounded continuation excluded the remaining seven. Separate sparse forward replays of exact separating inputs verify all 16,494 eligible incidences. The matched shared-input arm also independently excludes its same seven banks over all 478 raw cuts. Realized saving is zero and no representative remains unresolved.", + "open_questions": [ + { + "blocked_by": "All inherited four-role prefix banks are excluded. A different endpoint pair, added public bank, changed paid itinerary or new provider requires a fresh scope and compatibility proof.", + "first_step": "For a distinct provider edit, pin the old caller slot and price a single exact rank reduction on the retained whole signed invoice, including ordinary routing and restoration, before testing a literal replacement.", + "question": "Could a different binding mechanism lower the complex paid rank without enlarging the four-role bank?", + "why_it_matters": "This endpoint family fails before physical construction. Additional donors would need a distinct priced scope, while a provider-side paid rank reduction would change a different term of the binding inequality." + } + ], + "original_card": { + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "existing_checks": [ + { + "evidence": "research/p104-literal-slot-defect/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4133: literal-slot defect", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "88666f1dee93fbd85b31fd5d6f91a219e111b5f4", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-commutation-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4136: uniform commutation gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "281ce601a8be9db470de630759179c23e1dfaa88", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-encoding-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4140: uniform encoding gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "de25c6525aa866962309df5d107b32d55e6e5628", + "status": "author-checked" + }, + { + "evidence": "research/p104-source-chart-shortcut/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4153: source-chart shortcut exhausts its optimistic allowance", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "9123241fea53df77e51ffe30d9aca1625d4bf3a8", + "status": "author-checked" + }, + { + "evidence": "research/p104-fiber-tag-seam/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4154: fiber-tag seam mismatch", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "4ffcdaee5d6255a9cea1fe53a5424435068089d0", + "status": "author-checked" + }, + { + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "status": "reviewed" + } + ], + "first_experiment": "Start with the selected #5599 emitted word and review pending #5718 distinct input/output bases plus #5717/#5719 coverage before claiming work. Pick one uncovered source word, helper group and cut region. Prove the arbitrary-input relation and legal entry/exit corrections, then compare full target and paid profiles. Reject if completion, owned lifetimes or consumer costs repay the gain. A static pairing rank alone is not a physical split.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "id": "p104-side-correction", + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "overlap_terms": [ + "P104", + "helper basis", + "helper split", + "5718", + "dyadic capacity" + ], + "question": "Can joint helper bases and a legal causal split improve the complete P104 productive/paid invoice?", + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/p104-helper-subspace-splits/README.md", + "research/dyadic-helper-channel-capacity/README.md" + ] + }, + "outcome": "negative-result", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "Continue the fixed-paid endpoint family of #7391 and #7395 with the exact fourth public role 1251, then finish and independently replay the formerly capped prefix keys.", + "scope_status": "changed", + "stop_rule": "One exact source word. At most 20 seconds for all 20,455 geometry incidences; 25 seconds and eight exact prefix keys in the archived batch; 25 seconds per continuation solver/independent replay over the seven frozen keys. The archived batch is also independently checked on its 16,016 raw incidences. Stop before suffix work when no prefix survives.", + "task_id": "p104-side-correction" +} diff --git a/research/p104-four-role-endpoint-exchange-bound/VERIFICATION.md b/research/p104-four-role-endpoint-exchange-bound/VERIFICATION.md new file mode 100644 index 0000000000..f6781cbcd6 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/VERIFICATION.md @@ -0,0 +1,29 @@ +# Verification and matched workflow trial + +The registered and direct replays regenerate eight deterministic stage receipts. All dependencies are keyed by package-relative path in `LOCAL-PINS.json`, including both signed-caller Python files. The parser rejects duplicate keys. The input gzip and its decompressed payload are authenticated independently. No solver uses previous temporary state. + +| Stage | Scope | Result | +| --- | --- | --- | +| Directed price | One compatible exchange, fixed paid itinerary | Positive only if realized with zero extra paid ranks | +| Chart and impulse census | 20,455 inherited cuts over 76,466 events, 20 s cap | 3,961 lack a coframe, 16,494 eligible in 15 banks, cap clear | +| Archived exact prefix solve | First eight of 15, 25 s limit and intentional eight-case cap | Eight excluded, seven unvisited in that receipt | +| Continuation exact prefix solve | The seven unvisited case IDs, 25 s limit | Seven excluded, cap clear, zero unresolved | +| Independent archived replay | Eight separators, all 16,016 constituent raw cuts, 25 s limit | Every bank zero, target nonzero | +| Independent continuation replay | Seven separators, all 478 constituent raw cuts, 25 s limit | Every bank zero, target nonzero | +| Shared exact-input trial | Same seven, one fixed direction, 25 s limit | Seven excluded, cap clear, zero unresolved | +| Independent shared replay | Same 478 constituent cuts, 25 s limit | Every bank zero, target nonzero | + +The per-case search uses exact rational reverse rows and elimination. The independent checker instead propagates each exact sparse input forward through the literal event word, accounting for charts, owned INIT/CLEAR, and COPY freshness. It observes each state before the event and checks the target difference independently. A nonzero signed target is required, and opposite signs are valid. It also checks the contact-free bank intervals against the literal events. The two trial arms have the same case IDs, stop conditions and independently checked coverage. `lead/PREFIX.json` preserves the original eight-case receipt and unvisited keys. `receipts/CONTINUATION.json` and `receipts/SHARED.json` give the seven exact witness records. Their separate checker receipts preserve the raw-cut counts, key lists, target signs and input hashes. + +Controls include the original positive four-role bare-exchange identity, an exact four-row span success, a zero-determinant case, and the coframe/impulse classification fixtures. The wrapper also rejects a leaking three-role witness that separates the target but fails the fourth row, and rejects a repeated dependency key. + +## Workflow timing + +The experiment used CPython 3.12.14, assertions and the same 25-second runner and independent replay limits for each arm. Measured runner and independent replay wall times are shown separately. The independent check itself uses the same code path and event coverage for both arms. + +| Method on the seven resumed cases | Solver | Independent replay | Verified decisions | +| --- | ---: | ---: | ---: | +| Existing exact per-case method | 0.09 s | 0.63 s | 7/7, all 478 cuts | +| One precommitted archived input | 0.09 s | 0.67 s | 7/7, all 478 cuts | + +Proof and source inspection for the shared trial took an estimated 42–60 active seconds. Shared-arm and scope implementation took about 35–50 active seconds, and drafting the common verifier about 38–55 active seconds. These are coarse tool-boundary estimates. The historical discovery time of the shared witness and a comparable split of active costs for the existing solver are unavailable. Packaging, relocated replay, and waiting are excluded. Since total effort to the same verified decision cannot be compared on equivalent records, the workflow trial is inconclusive and the existing exact per-case solver remains the default. No replacement word or complete candidate was constructed. diff --git a/research/p104-four-role-endpoint-exchange-bound/VERIFY.json b/research/p104-four-role-endpoint-exchange-bound/VERIFY.json new file mode 100644 index 0000000000..162fe9e139 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/replay.py" + ], + "checks": "Regenerate eight exact price, scope, prefix and independent receipts. Directly replay separating inputs on all 16,494 legal cut incidences, compare matched workflow coverage, and reject a leaking witness and a duplicate dependency key.", + "timeout_seconds": 180 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-four-role-endpoint-exchange-bound/continue_prefix.py b/research/p104-four-role-endpoint-exchange-bound/continue_prefix.py new file mode 100644 index 0000000000..27708e92b7 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/continue_prefix.py @@ -0,0 +1,73 @@ +"""Resume exactly the seven capped, unvisited R151 native exchange cuts.""" +from collections import Counter +from gzip import decompress +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from runpy import run_path +from signal import SIGALRM, alarm, signal +from time import monotonic + +ROOT = Path(__file__).resolve().parent +BASIS = "3ff8748c0bcbcceea120265f87d92263cccd17343ef504efbe3b401ca05e4f0b" +PREFIX = "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d" +OLD_KEYS = ( + (996, 1481, 1454, 1251, 245, 45688), + (438, 1481, 1454, 1251, 245, 45222), + (996, 1481, 1454, 1251, 245, 45222), + (1195, 1481, 1454, 1251, 245, 45222), + (438, 1481, 1454, 1251, 245, 45219), + (996, 1481, 1454, 1251, 245, 45219), + (1195, 1481, 1454, 1251, 245, 45219), +) +SECONDS = 25 + + +def stop(*_): + raise TimeoutError("25-second continuation cap") + + +def main(): + assert __debug__ + signal(SIGALRM, stop) + alarm(SECONDS) + deadline = monotonic() + SECONDS - 1 + assert sha256((ROOT / "lead/basis.py").read_bytes()).hexdigest() == BASIS + basis = run_path(str(ROOT / "lead/basis.py")) + checked = basis["checked"] + checked(ROOT, "inputs/reverse_span.py") + engine = run_path(str(ROOT / "inputs/reverse_span.py")) + controls = basis["controls"](engine) + prior = loads(checked(ROOT, "lead/PREFIX.json", PREFIX), object_pairs_hook=engine["unique"]) + assert prior["counts"] == {"exact_rank_exclusion": 8} + assert prior["pins"] == basis["PINS"] + keys = prior["unvisited"] + assert tuple(map(tuple, keys)) == OLD_KEYS + geometry = loads(checked(ROOT, "lead/GEOMETRY.json"), object_pairs_hook=engine["unique"]) + assert basis["selection"](geometry) == prior["selected"] + keys + price = loads(checked(ROOT, "lead/PRICE.json"), object_pairs_hook=engine["unique"]) + assert price["compatible_edit_cap"] == 1 and price["extra_paid"] == 0 + assert (price["paid"], price["productive"], price["surplus"]) == (110519, 22461, 1424) + raw = decompress(checked(ROOT, "inputs/7334-WORD.json.gz")) + assert sha256(raw).hexdigest() == basis["PAYLOAD"] + word = loads(raw, object_pairs_hook=engine["unique"]) + assert len(word["program"]) == basis["EVENTS"] + + results, unresolved, timeout = [], [], None + try: + results = [{"key": r, "proof": p} for r, p in basis["prefix"](word, keys, engine, deadline)] + except TimeoutError as err: + timeout = str(err) + unresolved = keys[len(results):] + alarm(0) + print(dumps({ + "head": price["head"], "caller": price["caller"], "controls": controls, + "inherited_pins": basis["PINS"], "basis_sha256": BASIS, "prior_prefix_sha256": PREFIX, + "original_prefix_exclusions": 8, "selected": keys, "cap_seconds": SECONDS, + "counts": Counter(row["proof"]["status"] for row in results), "results": results, + "still_unvisited": unresolved, "timeout": timeout, + }, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/7113-fixed-tape.py b/research/p104-four-role-endpoint-exchange-bound/inputs/7113-fixed-tape.py new file mode 100644 index 0000000000..6873f9618d --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/inputs/7113-fixed-tape.py @@ -0,0 +1,64 @@ +"""Substitute the exact caller counts into the reviewed finite-tape bounds.""" +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import gzip +import json + +root=Path(__file__).resolve().parent +def read(name): + return json.loads((root/name).read_text()) +cpath=root/"ODD-TYPE-AB-CALLER.json" +caller=read(cpath.name) +partial=read("ODD-ADMISSION-PARTIAL.json") +precision=read("ODD-PRECISION.json") +binding=read("ODD-PHYSICAL-BINDING.json") +native=json.loads(gzip.decompress((root.parent/"WORD.json.gz").read_bytes())) +nhash=sha256(json.dumps(native,sort_keys=True,separators=(",",":")).encode()).hexdigest() +chash=sha256(cpath.read_bytes()).hexdigest() +assert all(r["caller_sha256"]==chash and r["native_sha256"]==nhash for r in (partial,precision,binding)) +g=partial["compiler_outer"] +b=binding["occurrence_and_geometry"] +assert g["outer"]["strict_count"]==54 and g["outer"]["functional_count"]==4 and Q(g["outer"]["minimum_margin"])>0 +assert b["paid_positions"]==sum(partial["invoice"]["P"].values()) +assert b["productive_fields"]==sum(partial["invoice"]["T"].values()) +assert b["rank_surplus"]==partial["invoice"]["S"] and partial["invoice"]["empty_root_credits"]==0 +assert b["ambient"]==caller["ambient_rank"] and b["ambient"]<=153 +L=b["native_calls"] +native_scalars=sum(e[0]!="MOVE" for e in native["program"]) +caller_macros=sum(len(caller["types"][e[0]]["ports"]) for e in caller["events"] if e[0]!="J") +conversions=2*L*native["public"]+2*sum(t['roles']*len(t['ports']) for t in caller['types'].values()) +signed_idle=sum(len(caller["types"][e[0]]["ports"]) for e in caller["events"] if e[:2]==["B","IDLE_ODD"]) +scalar_services=32*(L*native_scalars+caller_macros+conversions) +map_slots=(2*b["paid_positions"]+2*b["productive_fields"]+b["native_contact_boundaries"] + +2*b["idle_uses"]+3*b["query_uses"]+b["lambda_uses"]+signed_idle) +records_per_map=4*(b["ambient"]+1)**2 +paid_record_ceiling=map_slots*records_per_map +# Use the same upper ambient 153 as the inherited compiler, even though +# each actual paid or target map is on at most 137 axes. +H=int(g["H"]) +carrier_power=1920 +kstar=carrier_power*153**carrier_power*(H+1)**2 +cc=precision["context_c"] +assert cc<=4096 and (4096*kstar).bit_length()=n and r not in active;active.add(r);cur[r]=e[2];life+=1;peak=max(peak,len(active)-n) + elif op=='CLEAR': + assert r>=n and r in active and cur[r]==e[2];active.remove(r);del cur[r] + elif op=='MOVE': + _,r,a,b,owned=e;assert r in active and cur[r]==a and owned==(r>=n) + assert (frames[a]0;paid[rank]+=1;cur[r]=b + if owned and dim[b]>dim[a]:rises[rank]+=1 + elif op=='SCALE':assert r in active and cur[r]==e[-1] + else:assert op in ('ADD','COPY') and r in active and e[2] in active and r!=e[2] and cur[r]==cur[e[2]]==e[-1] + assert active==set(range(n)) and [cur[r] for r in range(n)]==W['final'] + # adj[r][j] is the derivative of final output j with respect to current r. + adj=[{r:F(1)} if r0:lo=mid + else:hi=mid + crossing=str((lo+hi)/2) + Ecount=sum(len(d['ports']) for d in C['types'].values() for dg in d['diagonal'] if not any(dg[2:]));Te=T.copy();Te[1]-=Ecount;lo,hi=Decimal(0),Decimal('.01') + for _ in range(200): + mid=(lo+hi)/2 + if margin(mid,Te)>0:lo=mid + else:hi=mid + nocredit=str((lo+hi)/2) + return dict(T=dict(sorted(T.items())),P=dict(sorted(P.items())),S=S,raw_crossing=crossing,empty_root_credits=Ecount,no_E_credit_crossing=nocredit) + +def ordinary(W,C,N): + # Atomic contributions are separately itemized to prevent zero-charge shortcuts. + calls=18;portsA=len(C['types']['A']['ports']);ports=sum(len(v['ports']) for v in C['types'].values()) + scalar=0;init_clear=0;odd=Counter() + for e in W['program']: + if e[0] in ('ADD','COPY','SCALE'): + q=F(e[2] if e[0]=='SCALE' else e[3]);a=abs(q.numerator);d=q.denominator + scalar+=4*(a.bit_length()+d.bit_length()+1+(a.bit_count() if e[0]!='SCALE' else 0)) + if d&(d-1):odd[e[0]]+=1 + elif e[0] in ('INIT','CLEAR'):init_clear+=2 + route_items=dict(moves=sum(N['paid'].values()),helper_boundary=2*sum(N['helpers'].values()),first_main_boundary=2*ports,second_main_boundary=2*portsA,first_main_adapter=4*ports,second_main_adapter=4*portsA,owned_lifetime=4*N['lifetimes']) + routing=1000*sum(route_items.values());rest_items={};lam=0 + def swapcost(axes):return len(set(axes)-set(range(len(axes)))) + for ty,t in C['types'].items(): + ne=sum(e[0] in (ty,'J') for e in C['events']);p=len(t['ports']);nr=t['roles'];env=32*nr*p*ne + qr=[e for e in C['events'] if e[0]==ty and e[1]=='QUERY'];idle=[e for e in C['events'] if e[0]==ty and e[1]=='IDLE_ONE'];la=sum(e[0]==ty and e[1]=='LAMBDA' for e in C['events']);lam+=la*p + output=0 + for qp,zero,*mask in t['diagonal']: + axes=([0] if qp else [])+[a for k,v in enumerate(mask) if v for a in range(9+8*k,17+8*k)] + output+=p*1000*(2*swapcost(axes)+2*bool(qp)+(qp==-1)) + idleroute=sum(2*p*1000*swapcost([a for k in e[3] for a in range(1+8*k,9+8*k)]) for e in idle) + queryroute=sum(p*1000*(2+(e[4]==-1)) for e in qr) + rest_items[ty]=dict(envelope=env,thin=16*p*len(qr),field_boundary=26*nr*p,output_routes=output,idle_routes=idleroute,query_routes=queryroute) + rest=sum(sum(d.values()) for d in rest_items.values());upper=calls*(scalar+routing)+rest;conversion=calls*len(W['initial'])*104;secondlam=lam*1000 + return dict(scalar_upper=scalar,init_clear_allowance=init_clear,route_items=route_items,routing=routing,caller_items=rest_items,caller_total=rest,raw_upper=upper,per_input_conversion=conversion,lambda_second_charge=secondlam,conservative_total=upper+conversion+secondlam,margin_to_billion=10**9-upper-conversion-secondlam,odd_divisions=dict(odd),lambda_paid_rank1_would_reduce_S_by=lam) + +def main(): + ap=argparse.ArgumentParser();ap.add_argument('word');ap.add_argument('--out',required=True);ap.add_argument('--caller',action='store_true');ap.add_argument('--mutant',type=int);ap.add_argument('--caller-path',required=True);a=ap.parse_args() + W=load(a.word);C=load(a.caller_path);start=time.time();N=native(W,a.mutant) + result=dict(schema='independent-reverse-circuit-audit/1',word=str(Path(a.word).resolve()),word_sha256=pin(a.word),caller_sha256=pin(a.caller_path),native=N) + if a.mutant is None: + result['invoice']=invoices(W,C,N);result['ordinary']=ordinary(W,C,N) + if a.caller:result['caller']=caller(C) + result['seconds']=time.time()-start;Path(a.out).write_text(json.dumps(result,indent=2)+'\n');print(json.dumps(result,indent=2)) +if __name__=='__main__':main() diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/7334-CALLER-RESULT.json b/research/p104-four-role-endpoint-exchange-bound/inputs/7334-CALLER-RESULT.json new file mode 100644 index 0000000000..3034a490f5 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/inputs/7334-CALLER-RESULT.json @@ -0,0 +1,1599 @@ +{ + "adapter": { + "adapted_sha256": { + "check_odd_partial_admission.py": "5685c50d5b07be6096cecd90a36dc2d8e5e23093c778875b74474c384830cba5", + "check_odd_precision.py": "8e172049b7a2a5a74c5ee6dae1513ca21204456a7aa7159bcaf2dcfdc7e2a7bd", + "emit_odd_type_ab.py": "6fd9f61f9ba6c726524d1a585d0201b0eac61829ccae6be598f0f0fc1cb64f1a" + }, + "edits": [ + { + "file": "emit_odd_type_ab.py", + "new": "invoice=json.loads((root/\"COHORT-PRICE.json\").read_text())", + "old": "invoice=next(x for x in json.loads((root/\"SHORT-CALLER-RAW-PRICE.json\").read_text())[\"rows\"] if tuple(x[\"shape\"])==shape)" + }, + { + "file": "check_odd_partial_admission.py", + "new": "actual_native=ind.native(w)\nassert actual_native==N and not N[\"bad_inputs\"], \"Fresh complete native inventory and arbitrary-input adjoint\"", + "old": "previous=json.loads((root/\"SHORT-ADMISSION-PARTIAL.json\").read_text())\nassert previous[\"native_sha256\"]==digest and not N[\"bad_inputs\"]" + }, + { + "file": "check_odd_partial_admission.py", + "new": "claim=Q('0.00364665195644')", + "old": "claim=Q(\".00363797977\")" + }, + { + "file": "check_odd_partial_admission.py", + "new": "tested=claim+Q(7,10**17)\nwhile tested>=Q(reference[\"raw_bracket\"][0]):\n tested=claim+(tested-claim)/10", + "old": "tested=claim+Q(7,10**17)" + }, + { + "file": "check_odd_partial_admission.py", + "new": "g=gate(invoice,claim,tested,*bracket,r[\"gate\"][\"BIT_pin\"])\ntry:\n gate(invoice,claim,Q(bracket[0]),*bracket,r[\"gate\"][\"BIT_pin\"])\nexcept AssertionError:\n crossing_probe_rejected=True\nelse:\n raise AssertionError(\"Probe at lower crossing unexpectedly accepted\")", + "old": "g=gate(invoice,claim,tested,*bracket,r[\"gate\"][\"BIT_pin\"])" + }, + { + "file": "check_odd_partial_admission.py", + "new": "\"crossing_probe_rejected\":crossing_probe_rejected,\"scope\":\"Fresh complete changed-native arbitrary-input adjoint;", + "old": "\"scope\":\"Reuse exact same native word all-column adjoint;" + }, + { + "file": "check_odd_precision.py", + "new": "patch('(life, peak, owned_count) == (54, 43, 51)','(life, peak, owned_count) == (73, 50, 68)')\nenv=ModuleType(\"short_envelope\")", + "old": "env=ModuleType(\"short_envelope\")" + }, + { + "file": "check_odd_precision.py", + "new": "", + "old": "previous=json.loads((root/\"SHORT-PRECISION.json\").read_text())" + }, + { + "file": "check_odd_precision.py", + "new": "assert grid_receipt[\"caller_sha256\"]==sha256(cpath.read_bytes()).hexdigest()", + "old": "assert previous[\"native_sha256\"]==sha and grid_receipt[\"caller_sha256\"]==sha256(cpath.read_bytes()).hexdigest()" + }, + { + "file": "check_odd_precision.py", + "new": "wg=grid.word_run(w, frac=25)\nwp,wr=env.native_envelope(w)\nwg=json.loads(json.dumps(wg,default=str));wr=json.loads(json.dumps(wr,default=str))\nassert wg==r[\"precision\"][\"word\"] and wr==r[\"precision\"][\"rounded_native\"], \"Fresh changed-native grid and envelope\"", + "old": "wg=previous[\"native_grid\"]\nwr=previous[\"rounded_native\"]\nwp={key:(Q(v[\"exact\"]),v[\"witness\"]) for key,v in wr[\"bounds\"].items()}" + } + ] + }, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "catalogue": [ + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "430c467e9c73ef00ddc325b7cf95aba8a34187f362eae67791aafd26b117e4b9", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 0, + "slice_stop": 1000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "2cae048f253c10a701476eaa4486931f22766daf994d44d80688b0f8f2fc530f", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 1000, + "slice_stop": 2000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "fd8a8b45b7fb895ff219d623302befa3ca932b93ceaa13d2afd6f9d0b4afe9a3", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 2000, + "slice_stop": 3000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 37, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "cec6af5c26e0d918bb4965d54ccfd8835b82b1eed025bc92bbb56a1a1a61e012", + "main_boundary_digest": "ad959887c990b8862a0e60db3f53d5195a1c9d667c1593f0101adc8db18f27fa", + "main_boundary_pairs": 104, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 3000, + "slice_stop": 3037, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + } + ], + "checks": { + "ODD-8X9-APPLICATION-CHECKS.json": { + "assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "candidate": "91166298911/25000000000000", + "catalogue": [ + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "430c467e9c73ef00ddc325b7cf95aba8a34187f362eae67791aafd26b117e4b9", + "log_sha256": "b810efc887dd1b7f0e9ed2476b70451c44e906df150e8461b181d0da202702eb", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 0, + "slice_stop": 1000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "2cae048f253c10a701476eaa4486931f22766daf994d44d80688b0f8f2fc530f", + "log_sha256": "399e91636f95cd40347c9261d02d8c2d7bdc13b69716ec41aace1efadfe7a6f7", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 1000, + "slice_stop": 2000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "fd8a8b45b7fb895ff219d623302befa3ca932b93ceaa13d2afd6f9d0b4afe9a3", + "log_sha256": "1e0e613ea1894d638309a381ca82b31d7e61906c1b42dd29d99653fc754b9e0f", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 2000, + "slice_stop": 3000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + { + "catalogue_digest": "eb24545c7f0c985c08cf8bd2ca6e6602bdb828a915d8261594777aa49ac93ccb", + "catalogue_size": 3037, + "checked_maps": 37, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2952, + "exact_recipe_digest": "cec6af5c26e0d918bb4965d54ccfd8835b82b1eed025bc92bbb56a1a1a61e012", + "log_sha256": "5c15c6796c9717c7f1733d793cfe9efda1fe262344b75a8194d1bd1e79d8de06", + "main_boundary_digest": "ad959887c990b8862a0e60db3f53d5195a1c9d667c1593f0101adc8db18f27fa", + "main_boundary_pairs": 104, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 3000, + "slice_stop": 3037, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + } + ], + "fixed_tape_counts": { + "H": 16517900000000000000000, + "Kstar_bits": 14093, + "actual_ambient": 145, + "caller_odd_scale": 675, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "common_grid": { + "fractional": "p+D", + "signed_width": "p+h+2D+3", + "temp_padding": 26 + }, + "compiler_ambient_cap": 153, + "context_bound_bits": 14104, + "context_c": 2430, + "elementary_records_per_map_upper": 85264, + "elementary_records_upper": 25477565312, + "log_power": 2238, + "max_scalar_numerator_bits": 24, + "monomial_map_slots": 298808, + "native_invocations": 17, + "native_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "owned_banks_per_raw_occurrence": 1156, + "scalar_macro_inputs": { + "caller": 117856, + "conversions": 58522, + "native": 1193179 + }, + "scalar_services_upper": 43825824, + "scalar_steps_coefficient": 45954707226624, + "scope": "Exact finite-cost and common-format substitutions in the selected #7000 conditional application proof, using the conservative primitive movement and scalar constants there. The premise is the complete signed native/physical binding and retained compiler, BIT, stock, and outer contracts. This script counts the raw occurrence, not an enumerated top-level compiled multiplier.", + "tested_claim": "91166298911/25000000000000" + }, + "native_archive_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "native_canonical_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "numeric_gate": { + "BIT_margin": "12003804355993/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16517900000000000000000", + "alpha": [ + 0.9999999999999996, + 0.9999999999999996 + ], + "claim": "91166298911/25000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.9081464195752472, + 0.9081464195752472 + ], + "derivative_upper": -381501.8647915368, + "gamma": [ + 0.9407579289103971, + 0.9407579289103971 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "364665195644007/100000000000000000": [ + "31103427206078520322724392898107706770333851147247252856875801338535252128187/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "12441370882431408129089757159243082708133540458898901142750320535414100851471/10000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "91166298911/25000000000000": [ + "62206854412155897513197386571703246415741449484401830511586741114753267901519/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124413708824311795026394773143406492831482898968803661023173482229506535804973/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2237, + "moment_margin_float": { + "364665195644007/100000000000000000": [ + 1.4646734160072888e-10, + 1.4646734160072888e-10 + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + -3.3992706094573903e-29, + -3.3992706094573903e-29 + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + 4.764803908999439e-30, + 4.764803908999439e-30 + ] + }, + "moment_margins": { + "364665195644007/100000000000000000": [ + "14646734160072888630034414700919774051100404335334564928970533581509309/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "14646734160072888630034414700919774051100404335334564928970533620602327/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + "-1699635304728695041688524206526205569127988077435379/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-1699635304728695041688524206526205569127988058233217/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + "11912009772498598264923359790227058541421082085091/2500000000000000000000000000000000000000000000000000000000000000000000000000000", + "476480390899943930596934391609082341656843322207321/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "4558314945550559883744425354177/1250000000000000000000000000000000", + "36466519564404479069955402833417/10000000000000000000000000000000000" + ], + "tested": "364665195644007/100000000000000000", + "written_log_power": 2238 + }, + "physical_binding": { + "ambient": 145, + "complete_paid_position_digest": "c04b73fc074df21160839ab0f0beb883009f9d87d495292563771091a42492ed", + "fresh_helpers": 18717, + "idle_uses": 3392, + "lambda_uses": 11280, + "native_calls": 17, + "native_contact_boundaries": 13600, + "native_public": 1501, + "nonzero_boundary_translations": 13600, + "paid": { + "1": 68384, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 238, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "paid_positions": 110519, + "phase_record_digest": "586ab7499fb677afdd83c397ea0b6d3b25f73ea6cdfa1ec95dd68adccff935ad", + "productive_fields": 22461, + "query_uses": 384, + "rank_surplus": 1424, + "reserved_native_banks": 1156, + "reserved_serial_query_lambda_bank": 1, + "targets": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + }, + "scope": "Conditional component application to the exact 8+9 source with the selected completed BIT predecessor and inherited five assumptions. Checks every normalized endpoint, every paid/helper nested chart map up to exact signed Pauli and absolute phase, caller occurrence/phase, precision, finite scalar and route bounds, and numeric gates. Does not run a compiled Turing machine, select an upstream frontier, or claim human/formal review.", + "source_unit_ordinary": { + "all_caller_scalar_surcharge": 2248928, + "caller_items": { + "A": { + "envelope": 102076416, + "field_boundary": 89856, + "fused_routes": 0, + "idle_routes": 170112000, + "output_routes": 213120000, + "query_routes": 1152000, + "thin": 6144 + }, + "B": { + "envelope": 35730432, + "field_boundary": 7488, + "fused_routes": 1168000, + "idle_routes": 18016000, + "output_routes": 17760000, + "query_routes": 0, + "thin": 0 + } + }, + "caller_total": 559238336, + "charged_caller_odd_conversions": 479232, + "conservative_total": 782715464, + "init_clear_allowance": 292, + "lambda_paid_rank1_would_reduce_S_by": 11280, + "lambda_second_charge": 11280000, + "margin_to_billion": 217284536, + "odd_divisions": { + "ADD": 5829, + "SCALE": 71 + }, + "per_input_conversion": 2653768, + "raw_upper": 766053536, + "route_items": { + "first_main_adapter": 416, + "first_main_boundary": 208, + "helper_boundary": 2202, + "moves": 6279, + "owned_lifetime": 292, + "second_main_adapter": 384, + "second_main_boundary": 192 + }, + "routing": 9973000, + "scalar_upper": 2192600 + }, + "status": "PASS_8X9_EXACT_COMPONENT_APPLICATION_CHECKS" + }, + "ODD-ADMISSION-PARTIAL.json": { + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "compiler_outer": { + "BIT_margin": "12003804355993/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16517900000000000000000", + "alpha": [ + 0.9999999999999996, + 0.9999999999999996 + ], + "claim": "91166298911/25000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.9081464195752472, + 0.9081464195752472 + ], + "derivative_upper": -381501.8647915368, + "gamma": [ + 0.9407579289103971, + 0.9407579289103971 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "364665195644007/100000000000000000": [ + "31103427206078520322724392898107706770333851147247252856875801338535252128187/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "12441370882431408129089757159243082708133540458898901142750320535414100851471/10000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "91166298911/25000000000000": [ + "62206854412155897513197386571703246415741449484401830511586741114753267901519/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124413708824311795026394773143406492831482898968803661023173482229506535804973/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2237, + "moment_margin_float": { + "364665195644007/100000000000000000": [ + 1.4646734160072888e-10, + 1.4646734160072888e-10 + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + -3.3992706094573903e-29, + -3.3992706094573903e-29 + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + 4.764803908999439e-30, + 4.764803908999439e-30 + ] + }, + "moment_margins": { + "364665195644007/100000000000000000": [ + "14646734160072888630034414700919774051100404335334564928970533581509309/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "14646734160072888630034414700919774051100404335334564928970533620602327/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + "-1699635304728695041688524206526205569127988077435379/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-1699635304728695041688524206526205569127988058233217/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + "11912009772498598264923359790227058541421082085091/2500000000000000000000000000000000000000000000000000000000000000000000000000000", + "476480390899943930596934391609082341656843322207321/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "4558314945550559883744425354177/1250000000000000000000000000000000", + "36466519564404479069955402833417/10000000000000000000000000000000000" + ], + "tested": "364665195644007/100000000000000000", + "written_log_power": 2238 + }, + "crossing_probe_rejected": true, + "finite_rank9_fields": [ + { + "child_rank": 9, + "denominator": 512, + "exponent": 1, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 0 + }, + "spectators": 136, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 262144, + "width": 1 + }, + { + "child_rank": 9, + "denominator": 262144, + "exponent": 2, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 272, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 1024, + "width": 2 + }, + { + "child_rank": 9, + "denominator": 134217728, + "exponent": 3, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 408, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 1024, + "width": 3 + }, + { + "child_rank": 9, + "denominator": 512, + "exponent": 1, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 0 + }, + "spectators": 136, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 262144, + "width": 1 + }, + { + "child_rank": 9, + "denominator": 262144, + "exponent": 2, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 272, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 1024, + "width": 2 + }, + { + "child_rank": 9, + "denominator": 134217728, + "exponent": 3, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 408, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 1024, + "width": 3 + } + ], + "invoice": { + "P": { + "1": 68384, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 238, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036466519564404479069955402833416122938855167943889069862042692713", + "raw_crossing": "0.0036466519564404479069955402833416122938855167943889069862042692713" + }, + "native_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "ordinary": { + "all_caller_scalar_surcharge": 2248928, + "caller_items": { + "A": { + "envelope": 102076416, + "field_boundary": 89856, + "fused_routes": 0, + "idle_routes": 170112000, + "output_routes": 213120000, + "query_routes": 1152000, + "thin": 6144 + }, + "B": { + "envelope": 35730432, + "field_boundary": 7488, + "fused_routes": 1168000, + "idle_routes": 18016000, + "output_routes": 17760000, + "query_routes": 0, + "thin": 0 + } + }, + "caller_total": 559238336, + "charged_caller_odd_conversions": 479232, + "conservative_total": 782715464, + "init_clear_allowance": 292, + "lambda_paid_rank1_would_reduce_S_by": 11280, + "lambda_second_charge": 11280000, + "margin_to_billion": 217284536, + "odd_divisions": { + "ADD": 5829, + "SCALE": 71 + }, + "per_input_conversion": 2653768, + "raw_upper": 766053536, + "route_items": { + "first_main_adapter": 416, + "first_main_boundary": 208, + "helper_boundary": 2202, + "moves": 6279, + "owned_lifetime": 292, + "second_main_adapter": 384, + "second_main_boundary": 192 + }, + "routing": 9973000, + "scalar_upper": 2192600 + }, + "scope": "Fresh complete changed-native arbitrary-input adjoint; fresh exact signed caller and invoice, ordinary source-unit upper bill, inherited numerical compiler and outer inequalities, and signed rank9 child finite field routes. Fresh integrated physical native/caller and changed-word precision/occurrence application remain separate." + }, + "ODD-CALLER-EXACT-GRID.json": { + "caller_odd_scale": "675", + "caller_odd_scale_bits": 10, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "grid_exponents": [ + 381, + 3, + 2 + ], + "peak_terms": 3752, + "preproduct_exact_divisions": 176874, + "prime_order": [ + 2, + 3, + 5 + ], + "safe_valuation_bound": [ + 381, + 69, + 62 + ], + "scope": "Independent integer Laurent caller endpoint and pre-product divisibility. Valuation bound propagates complete field operators whose Gaussian coefficients have only power-of-two denominators, so odd factors are sourced only from the charged scalar operations. Fixed conversion and storage bounds still needed." + }, + "ODD-FIXED-TAPE-COUNTS.json": { + "H": 16517900000000000000000, + "Kstar_bits": 14093, + "actual_ambient": 145, + "caller_odd_scale": 675, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "common_grid": { + "fractional": "p+D", + "signed_width": "p+h+2D+3", + "temp_padding": 26 + }, + "compiler_ambient_cap": 153, + "context_bound_bits": 14104, + "context_c": 2430, + "elementary_records_per_map_upper": 85264, + "elementary_records_upper": 25477565312, + "log_power": 2238, + "max_scalar_numerator_bits": 24, + "monomial_map_slots": 298808, + "native_invocations": 17, + "native_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "owned_banks_per_raw_occurrence": 1156, + "scalar_macro_inputs": { + "caller": 117856, + "conversions": 58522, + "native": 1193179 + }, + "scalar_services_upper": 43825824, + "scalar_steps_coefficient": 45954707226624, + "scope": "Exact finite-cost and common-format substitutions in the selected #7000 conditional application proof, using the conservative primitive movement and scalar constants there. The premise is the complete signed native/physical binding and retained compiler, BIT, stock, and outer contracts. This script counts the raw occurrence, not an enumerated top-level compiled multiplier.", + "tested_claim": "91166298911/25000000000000" + }, + "ODD-PHYSICAL-BINDING.json": { + "aliased_main_rejected": true, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "native_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "occurrence_and_geometry": { + "ambient": 145, + "complete_paid_position_digest": "c04b73fc074df21160839ab0f0beb883009f9d87d495292563771091a42492ed", + "fresh_helpers": 18717, + "idle_uses": 3392, + "lambda_uses": 11280, + "native_calls": 17, + "native_contact_boundaries": 13600, + "native_public": 1501, + "nonzero_boundary_translations": 13600, + "paid": { + "1": 68384, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 238, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "paid_positions": 110519, + "phase_record_digest": "586ab7499fb677afdd83c397ea0b6d3b25f73ea6cdfa1ec95dd68adccff935ad", + "productive_fields": 22461, + "query_uses": 384, + "rank_surplus": 1424, + "reserved_native_banks": 1156, + "reserved_serial_query_lambda_bank": 1, + "targets": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + }, + "patched_application_sha256": "733b31b1cee4567b466fdf834a34460b530f1f87ca6dca9270c0fabb2cf89849", + "scope": "Current caller port and ownership substitution, full phase-polynomial native contact identities on disjoint stage axes, whole signed idle/output geometry, and ordered paid positions. Retains the standard nested chart and local operator premises and requires separate full native replay and complete fixed-tape tariff application.", + "source_reviewer_sha256": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184" + }, + "ODD-PRECISION.json": { + "caller_grid": { + "caller_odd_scale": "675", + "caller_odd_scale_bits": 10, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "grid_exponents": [ + 381, + 3, + 2 + ], + "peak_terms": 3752, + "preproduct_exact_divisions": 176874, + "prime_order": [ + 2, + 3, + 5 + ], + "safe_valuation_bound": [ + 381, + 69, + 62 + ], + "scope": "Independent integer Laurent caller endpoint and pre-product divisibility. Valuation bound propagates complete field operators whose Gaussian coefficients have only power-of-two denominators, so odd factors are sourced only from the charged scalar operations. Fixed conversion and storage bounds still needed." + }, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "context_c": 2430, + "context_height": 406, + "context_mass_bits": 1215, + "native_grid": { + "coefficient_visits": 16450056, + "dyadic_height": 25, + "mass_witness": [ + 66234, + "stored add" + ], + "maximum_scaled_mass": "841374570120675/8192", + "numerator_bits": 24, + "odd_scale_lcm": 1125 + }, + "native_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "precision_program_sha256": "a2d99af2854db040ae91365a48a7b933efb26bfe7eb43d0c8d5d5bea838746ee", + "rounded_caller": { + "bounds": { + "E_joint_entrance": { + "exact": "3702756703659527568248226712486601052770855235277808441629524768849477575588262810395927748591227777943277957062907411224063053652778827964454517726872826275874815722865202474542606987566246379688070413942046060454402003660666954610975838436694791584953296739541900984753755464430053065628623026015049084144136249904919460655808848683017757584783080028794005197337751702706849380344741778058215680608816012872740432997115326301368373641449/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "strict_power_of_two": 1179, + "witness": { + "cut": 4691, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": 36 + } + }, + "Gamma_context": { + "exact": "95559271805917967715211849485976251600482496742772218246951437084969156250101939164522903762679975714203812242351154130348965614798120586306598144562218624446410055426925275459986984300306236633442698464688425811208699270932470244805076002771148817388340530915580877358566083573942000508694091826474256713600824739204285990804272709029158437169513513577889436255969001294913691563953126791768678721920093713688579537545167632022821019743779/466174441982187842026106684822878420992000000000000000000000000000000000000000000000", + "strict_power_of_two": 1184, + "witness": { + "cut": 4783, + "factor": "1", + "kind": "public-return", + "register": 37 + } + }, + "M_caller": { + "exact": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "strict_power_of_two": 897, + "witness": { + "cut": 4751, + "event": 4750, + "factor": "1", + "kind": "stored", + "register": 37 + } + }, + "M_context": { + "exact": "982481805213934049405304634957283792080096278611361984466358014308507422950844312403700764401033571220782206611296783514586717810795616454306566634315754484803510926895119896516203051067259566056333453719140448945626331638641981979211487216040608473979314583909628216857872063849848243068403656350930934888195915630005345343316363048285558413012530191729504605805583547221079314705148885679254649805648089358615756958306640002955753692455900157/5525030423492596646235338486789670174720000000000000000000000000000000000000000000000", + "strict_power_of_two": 1194, + "witness": { + "cut": 4692, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": null + } + }, + "M_joint_entrance": { + "exact": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "strict_power_of_two": 892, + "witness": { + "cut": 4691, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": 36 + } + }, + "Sigma_caller": { + "exact": "95559271805917967715211849485976251600482496742772218246951437084969156250101939164522903762679975714203812242351154130348965614798120586306598144562218624446410055426925275459986984300306236633442698464688425811208699270932470244805076002771148817388340530915580877358566083573942000508694091826474256713600824739204285990804272709029158437169513513577889436255969001294913691563953126791768678721920093713688579537545167632022821019743779/466174441982187842026106684822878420992000000000000000000000000000000000000000000000", + "strict_power_of_two": 1184, + "witness": { + "cut": 4753, + "event": 4752, + "factor": "1", + "kind": "stored", + "register": 37 + } + }, + "Sigma_context": { + "exact": "292281930720655332694790249293003894714124100000098918815671286894136456587216229578152442931066903924066178103657236910367835325489981234794484672018930049085393742710422981744335707352034416324737760252709549609977355999697117209820910418201936454917799630859843101219240152454180711999246445500400655174155666686196602991359285472505786037672942649704022831616308979632418454675729238959250846259701250064818026438318034687792131437075545103687702454133322384533008462423336471693747829360738934413062958945259923125229142232405082240139816042399763119320149801892224050532077466015483/5646579936229456007840352585096220475858963262973477037060052051047627725209600000000000000000000000000000000000000000000000000000000000000000", + "strict_power_of_two": 1481, + "witness": { + "cut": 4692, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": null + } + } + }, + "fresh_arbitrary_helpers": 18717, + "helper_allocation_premise": "distinct (stage, helper) public inputs as in frozen caller proof", + "independent_adjoint": { + "E_joint_entrance": { + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "joint_coefficient": "144218124282401204617230263054514744346632405857442589144991781917530152132889870002846209306787762894150543865356389849084238452276894627352790762454037345126994351979907477144401257368423063007427271766117739822282248246858569624239109891511459830034432108241771054783468611278140179030295737/14596463012695312500000000000", + "primitive_coefficient": "1237373204913668966810008103424843603237049842106979534739539344726881600855129275554334885562896567825503574055929527662143657491595081161117482238618339640110136792453314323518006796600687371906278112102741547626404362403105174332310591538741639237757093806525664195341657589882317257470101709011/175157556152343750000000000000", + "residual_mass": "3702756703659527568248226712486601052770855235277808441629524768849477575588262810395927748591227777943277957062907411224063053652778827964454517726872826275874815722865202474542606987566246379688070413942046060454402003660666954610975838436694791584953296739541900984753755464430053065628623026015049084144136249904919460655808848683017757584783080028794005197337751702706849380344741778058215680608816012872740432997115326301368373641449/621565922642917122701475579763837894656000000000000000000000000000000000000000000000" + }, + "Gamma_context": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796379192959369382262182067424881/131368167114257812500000000000", + "residual_mass": "95559271805917967715211849485976251600482496742772218246951437084969156250101939164522903762679975714203812242351154130348965614798120586306598144562218624446410055426925275459986984300306236633442698464688425811208699270932470244805076002771148817388340530915580877358566083573942000508694091826474256713600824739204285990804272709029158437169513513577889436255969001294913691563953126791768678721920093713688579537545167632022821019743779/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + }, + "M_caller": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796247824792255124449682067424881/131368167114257812500000000000", + "residual_mass": "95559271805917967715211849485976251600482496742772218246951437084969156250101939164522903762679975714203812242351154130348965614798120586306598144562218624446410055426925275459986984300306236633442698464688425811208699270932470244805076002771148817388340530915580877358566083573942000508694091826474256713600824739204285990804272709029158437169513513577888970081527019107071665457268303913347686721920093713688579537545167632022821019743779/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + }, + "M_joint_entrance": { + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "joint_coefficient": "144218124282401204617230263054514744346632405857442589144991781917530152132889870002846209306787762894150543865356389849084238452276894627352790762454037345126994351979907477144401257368423063007427271766117739822282248246858569624239109891511459830034432108241771054783468611278140179030295737/14596463012695312500000000000", + "primitive_coefficient": "1237373204913668966810008103424843603237049842106979534739539344726881600855129275554334885562896567825503574055929527662143657491595081161117482238618339640110136792453314323518006796600687371906278112102741547626404362403105174332310591538741639237757093806525664195341657589882317257470101709011/175157556152343750000000000000", + "residual_mass": "3702756703659527568248226712486601052770855235277808441629524768849477575588262810395927748591227777943277957062907411224063053652778827964454517726872826275874815722865202474542606987566246379688070413942046060454402003660666954610975838436694791584953296739541900984753755464430053065628623026015049084144136249904919460655808848683017757584783080028794005197337751702706849380344741778058215680608816012872740432997115326301368373641449/621565922642917122701475579763837894656000000000000000000000000000000000000000000000" + }, + "Sigma_caller": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796379192959369382262182067424881/131368167114257812500000000000", + "residual_mass": "95559271805917967715211849485976251600482496742772218246951437084969156250101939164522903762679975714203812242351154130348965614798120586306598144562218624446410055426925275459986984300306236633442698464688425811208699270932470244805076002771148817388340530915580877358566083573942000508694091826474256713600824739204285990804272709029158437169513513577889436255969001294913691563953126791768678721920093713688579537545167632022821019743779/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + } + }, + "joint_entries": [ + { + "entrance_defect": "1435/4", + "entrance_mass": "2067/2", + "event": 43, + "stage": 1 + }, + { + "entrance_defect": "44042555679872860007861795367424447445266297843505253952886421846002422759263396468547496933807222759787156595418583512660739068533832705505214786283039/13307288940955860965151791568755097600000000000000000000", + "entrance_mass": "56849465528/5", + "event": 137, + "stage": 2 + }, + { + "entrance_defect": "66917908087861458152312639512577162881440670638994437515963183089759887667805390693824265244954164950562931269822832906653188712135644895298094165225500101589386399/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "899756300051784928313/5", + "event": 268, + "stage": 3 + }, + { + "entrance_defect": "62327643861867510364274294519542680283883541504281117913087378568293480109182507258459633210794270085256807122005715489994710818304593097263666981827976283952932248143776607/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "2514111326902273689027625979152/15", + "event": 432, + "stage": 4 + }, + { + "entrance_defect": "12732130085621493316102109371323142098620056416276311516634746742558917976161209702448263789739474902653870079789843211912338851815384222492775968624893915376808430550739865362445606297/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "513576167499541081817002847690160861158177/15", + "event": 633, + "stage": 5 + }, + { + "entrance_defect": "1219101258965493240981866866910642432188230315269813928104553914623170273315625759155179780507283417383074420444336081162581721890288908726859016387064197667821771268402822262605280346926603418373/19162496074976439789818579859007340544000000000000000000000", + "entrance_mass": "49174910102467876864090432969907258581035345395534834/225", + "event": 867, + "stage": 6 + }, + { + "entrance_defect": "130023372749418849551122315066298363765510937791975698854434364504796055469824734713171095205341681880816022525011761763585406594206153935600377789793543824941213521521932355015057075684780826975044033149323/2129166230552937754424286651000815616000000000000000000000", + "entrance_mass": "47202796791779792903787260464709452698419616298153732189406926691/225", + "event": 1138, + "stage": 7 + }, + { + "entrance_defect": "37857525772991496013396554405767100865702893313350396960575624955664476944366124443514636048603832796797236493373521110013677516463703528797959719358566076456640943701339052974689749835075399729339818368338224427886888345117/2395312009372054973727322482375917568000000000000000000000000", + "entrance_mass": "1527059719525243651854937925515623170877847518562264265010551055991429949116792541/28125", + "event": 1423, + "stage": 8 + }, + { + "entrance_defect": "13500855245061137594626313310141013588052003223180490363903420511350050596074154710197601545502930660152929151853947042552233218573783997593503886975847849360016961958983446573216839219930937235949965280057347321154515034077677504605904506406499580922448927278235142401364123997126839202430462190208865996714385104493733266297522539783874626383736822219712657/2762515211746298323117669243394835087360000000000000000000000000000000000000000000", + "entrance_mass": "45382020709918266925583064268574418985484021788023395083741971786893952543604385214817042722264713249357732585113211736557042182118473445437784492974844696068231496289005681248244219743195326431922663592509646282903/2703048706054687500000000", + "event": 3058, + "stage": 9 + }, + { + "entrance_defect": "5133718960117303283748303891731981284404788277924330912818422939556540246036442339493122965728224572082284306801047414897093468389463474072172445685672525450546339942091153590346525813428392253041940315713009516731021282079947969479764902075760035173867149022532657430043762830664222359689921810690658942072823288421862603159189868608725135416304529143354074427272496201803/69062880293657458077941731084870877184000000000000000000000000000000000000000000000", + "entrance_mass": "17256576412236653193246225901973714737195067836439327666112948810725372605325768521068989782195051084826433423902219365061463548934152577319772447024097669813834215493691840531234110147024064996639957180865886380686899413865699437/67576217651367187500000000", + "event": 3377, + "stage": 10 + }, + { + "entrance_defect": "2449224440878937397876734433792124349732785385648341463322795799928253451926390390849699682737865541367484358400579553487298375306163292566419825508546466498280791908777367548267722339501240166694380223038561757554066230575260558677606559314076077833107443348379246663194764542399322216837138019404275129087738042968589049770205950447357986123419848639085760118078539882166598596458857/2302096009788581935931391036162362572800000000000000000000000000000000000000000000", + "entrance_mass": "8232867642949280967953864719378369729636081542640965177026582834276172086852779069019078166383458700724373015543641299678854718814560615654710102550769670203427726502361438450768012893674227975469242856299447027845030556012745339827937032703/2252540588378906250000000", + "event": 3674, + "stage": 11 + }, + { + "entrance_defect": "30777965965464586620314245057880004022224067630498033737079018547106377247935466828105608471239936111626030082767198861875635182120364523120871413025367907217066651641155426473029993869694032996338211668421106562355272156765941461334602811048479383099115371057902082926665948418531862298990825033532673242864292562037346919554888665347170069792570876703988938418021643174456740112331370039105092489/310782961321458561350737789881918947328000000000000000000000000000000000000000000000", + "entrance_mass": "103457615351059805192637231353494210876529187337645013912367786609511281374638184501291799844537790265462481580051228205479278831706979374022592427678836083146990308179368316797029946556942233864286312243671687806427572314354434738422294564686254956597631/304092979431152343750000000", + "event": 3934, + "stage": 12 + }, + { + "entrance_defect": "2027325034219026974535570438802028940431037855551487674881511522843459599326417126382675743964397335138409450643963390228246742584113778581325732785386864305498334574038878791869422504190056627842050527684814747158110599960524586137701245687796694062766627039170380815930128299391734071544956631639732878227174427467007189490884804359655877865900795996533753636305952363766588180848398723406289614017831241/77695740330364640337684447470479736832000000000000000000000000000000000000000000000", + "entrance_mass": "6814687293408352348961376609223100753789665399854180217091951198766673494955017243489117504312576625705862588971333049204842152193259763726092611947454717867967563820647006231530855513792517852570389360287582421241328472893443552787136426885585158158296407747039/76023244857788085937500000", + "event": 4149, + "stage": 13 + }, + { + "entrance_defect": "81420563249810600317353329518152169190683393186182241010763730652929646006817124026812027613580935616041766390255598669412190301738949258747590631179512898094216213230595468050551649773631405462471870042289531562976716104441589598605652497583019175663337489859377440791187837686243665800610424347369998039198651382344541581125307524493376328831688694660895840974092547268182802453854334345844723336327151367443719729/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "273688564209132230699064882255651065961520374651451250325109091529813162250488973700796593555467744131430272845604649750549608356985710665121874068107850799585492748533787927289567936649257940207702597871193107311090132538524151482351564937285621850171994049078063458209591/608185958862304687500000000", + "event": 4337, + "stage": 14 + }, + { + "entrance_defect": "1556123121564946856664152788037815320587338291145937484988467021880539014163781496280651867126686140796279119975230627701048077240546553594761571695196432583776276289469423283529647234696726907874106740029404931820590777340274984949501477430523769540754753431741322754127947545976701094135043874971327893358377712103363198643511887614553712238766955472587523872484460983842831123544780584787793286853397613831094039859825659/310782961321458561350737789881918947328000000000000000000000000000000000000000000000", + "entrance_mass": "5230780602279043381317572379439763694807653157987526423412516241866438709931406455512285461654380762978554988724296151241130161368896505647624919395909388513302452136334767445346454946237326490486725295589968816639097338790755366202380875008783642473174121062695038054202858248061/304092979431152343750000000", + "event": 4485, + "stage": 15 + }, + { + "entrance_defect": "1722613413163013759065797035633227149805265105698668824763477450804760743934089195300482388618473705141791656951727340584431366144903759706320238675723451876944389692745610520433986795462408872531686745954375884642357071784238828435847768064350653801117847716092903660091466210474096452905082990020170553235652125231790681634119120280095496987477123274046315396963896935617080121061968255809638578536456253698360023686845452848760697/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "5790424100720951765768300756324298709533962301792798636386692749870979029496708556989270788662796627612885676197810930990877069943243536093513215980405080279750566239442965631097385199413957318608000177913047677092759213914423460784984181631621622445055356552059259436283593839861423838063/608185958862304687500000000", + "event": 4606, + "stage": 16 + }, + { + "entrance_defect": "3702756703659527568248226712486601052770855235277808441629524768849477575588262810395927748591227777943277957062907411224063053652778827964454517726872826275874815722865202474542606987566246379688070413942046060454402003660666954610975838436694791584953296739541900984753755464430053065628623026015049084144136249904919460655808848683017757584783080028794005197337751702706849380344741778058215680608816012872740432997115326301368373641449/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "event": 4691, + "stage": 17 + } + ], + "physical_main_inputs": 3744, + "sites": { + "ADD": 4126, + "IDLE_ODD": 4, + "IDLE_ONE": 90, + "J": 17, + "LAMBDA": 178, + "QUERY": 4, + "SCALE": 312, + "SWAP": 52, + "noninteger_scalar": 1752 + } + }, + "rounded_native": { + "bounds": { + "Gamma": { + "exact": "25674697421587331757339101080632437343013231171089574633242386119447118240314628813189782194801634244052134094999300388256410816369661955154208177/42583324611058755088485733020016312320000000000000000000", + "strict_power_of_two": 299, + "witness": { + "cut": 76466, + "factor": "1", + "kind": "public-return", + "register": 1498 + } + }, + "M": { + "exact": "78936304519220976676934782102542296972674334524656988365448378307151322562286954677973745743410715921702119117659205500595920105788372211571000281667/9084442583692534418876956377603479961600000000000000000000", + "strict_power_of_two": 303, + "witness": { + "cut": 76430, + "factor": "1", + "kind": "stored", + "register": 1498 + } + }, + "Sigma": { + "exact": "25674697421587331757339101080632437343013231171089574633242386119447118240314628813189782194801634244052134094999300388256410816369661955154208177/42583324611058755088485733020016312320000000000000000000", + "strict_power_of_two": 299, + "witness": { + "cut": 76430, + "factor": "1", + "kind": "stored", + "register": 1498 + } + } + }, + "census": { + "denominator_bits": 20, + "events": 76466, + "lifetimes": 73, + "max_denominator": 655360, + "max_numerator": 14729531, + "numerator_bits": 24, + "opcodes": { + "ADD": 66314, + "CLEAR": 73, + "COPY": 1, + "INIT": 73, + "MOVE": 6279, + "SCALE": 3726 + }, + "owned_labels": 68, + "peak_owned": 50, + "public": 1501, + "scalars": { + "dyadic": 64141, + "integer": 39787, + "noninteger": 30254, + "odd": 5900 + } + }, + "independent_adjoint": { + "Gamma": { + "active_residual_sites": 26564, + "entrance_mass": "78936304519220976676934782102542296972674334524656988365448378307151322562286954677973745743410715921702119117659205500595920105788372211571000281667/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25674697421587331757339101080632437343013231171089574633242386119447118240314628813189782194801634244052134094999300388256410816369661955154208177/42583324611058755088485733020016312320000000000000000000" + }, + "M": { + "active_residual_sites": 26564, + "entrance_mass": "78936304519220976676934782102542296972674334524656988365448378307151322562286954677973745743410715921702119117659205500595920105788372211571000281667/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25674697421587331757339101080632437343013231171089574633242386119447118240314628813189782194801634244052134094999300388256410816369661955154208177/42583324611058755088485733020016312320000000000000000000" + }, + "Sigma": { + "active_residual_sites": 26564, + "entrance_mass": "78936304519220976676934782102542296972674334524656988365448378307151322562286954677973745743410715921702119117659205500595920105788372211571000281667/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25674697421587331757339101080632437343013231171089574633242386119447118240314628813189782194801634244052134094999300388256410816369661955154208177/42583324611058755088485733020016312320000000000000000000" + } + } + }, + "scope": "Fixed integer Laurent grid with charged odd caller scale, and pinned attributed forward/adjoint all-fibre defect engine applied to the emitted 17-stage caller. Each LAMBDA, QUERY and signed/unsigned idle is one unitary with one child defect. The caller allocation assumes independent stage helpers. Full physical application remains separate." + }, + "ODD-TYPE-AB-REPLAY.json": { + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "paid": { + "1": 68384, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 238, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "raw_bracket": [ + "4558314945550559883744425354177/1250000000000000000000000000000000", + "36466519564404479069955402833417/10000000000000000000000000000000000" + ], + "replay": { + "bad_outputs": [], + "caller_denominator_height_bound": 578, + "caller_mass_bound": "854474036861847560509026474008040300059938928517783661039773198072080884690114508581583887358835968277340425788985297793555303569703690223623950838857161290503004459697662544865276977234864184443860251086668962688762176068520364648820282528496698239206689277049335412289161443623602012468587331439851515703/168151253906250000000000000000000", + "caller_mass_ceiling_bits": 910, + "max_terms": 3752 + }, + "scope": "Exact emitted signed Laurent caller endpoint and recomputed native/caller paid and target profiles. Physical address bindings, independent branch-source composition, ordinary units, precision and outer gates are still required.", + "shape": [ + 8, + 9 + ], + "source_word_sha256": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "target": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + } + }, + "claim": "91166298911/25000000000000", + "price": { + "after": { + "P": { + "1": 68384, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 238, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036466519564404479069955402833416122938855167943889069862042692713", + "raw_crossing": "0.0036466519564404479069955402833416122938855167943889069862042692713" + }, + "before": { + "P": { + "1": 68401, + "16": 416, + "2": 14501, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5882, + "56": 416, + "6": 221, + "64": 208, + "7": 170, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036462214364462343366888845568980078301549291254343066730137655449", + "raw_crossing": "0.0036462214364462343366888845568980078301549291254343066730137655449" + }, + "gate": { + "BIT_margin": "12003804355993/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16517900000000000000000", + "alpha": [ + 0.9999999999999996, + 0.9999999999999996 + ], + "claim": "91166298911/25000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.9081464195752472, + 0.9081464195752472 + ], + "derivative_upper": -381501.8647915368, + "gamma": [ + 0.9407579289103971, + 0.9407579289103971 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "364665195644007/100000000000000000": [ + "31103427206078520322724392898107706770333851147247252856875801338535252128187/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "12441370882431408129089757159243082708133540458898901142750320535414100851471/10000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "91166298911/25000000000000": [ + "62206854412155897513197386571703246415741449484401830511586741114753267901519/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124413708824311795026394773143406492831482898968803661023173482229506535804973/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2237, + "moment_margin_float": { + "364665195644007/100000000000000000": [ + 1.4646734160072888e-10, + 1.4646734160072888e-10 + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + -3.3992706094573903e-29, + -3.3992706094573903e-29 + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + 4.764803908999439e-30, + 4.764803908999439e-30 + ] + }, + "moment_margins": { + "364665195644007/100000000000000000": [ + "14646734160072888630034414700919774051100404335334564928970533581509309/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "14646734160072888630034414700919774051100404335334564928970533620602327/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36466519564404479069955402833417/10000000000000000000000000000000000": [ + "-1699635304728695041688524206526205569127988077435379/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-1699635304728695041688524206526205569127988058233217/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "4558314945550559883744425354177/1250000000000000000000000000000000": [ + "11912009772498598264923359790227058541421082085091/2500000000000000000000000000000000000000000000000000000000000000000000000000000", + "476480390899943930596934391609082341656843322207321/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "4558314945550559883744425354177/1250000000000000000000000000000000", + "36466519564404479069955402833417/10000000000000000000000000000000000" + ], + "tested": "364665195644007/100000000000000000", + "written_log_power": 2238 + }, + "native_baseline_rejects_new_claim": true, + "new_native": "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac", + "old_native": "0358b9f6e0340fb3e5aa46c747c558b32a5280cbf9cd92c3b9de627dd18a9a4f", + "price": { + "baseline_rejects_new_claim": true, + "candidate_margin_at_old_upper": [ + "16685897749686653166960479018016066850301435599814605302109409406463246541273923/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "8342948874843326583480239509008033425150717799907302651054704703231623287832767/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "claim_decimal": "0.00364665195644", + "gain": "4.30519994E-7", + "gain_exact": "215259997/500000000000000", + "independent_raw_bracket": [ + "0.00364665195644044790699554028334161", + "0.00364665195644044790699554028334162" + ], + "previous_claim": "1823110718223/500000000000000", + "raw_bracket": [ + "0.0036466519564404479069955402833416", + "0.0036466519564404479069955402833417" + ] + } + }, + "status": "PASS_HELPER_319_FUSED_CALLER" +} diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/7334-WORD.json.gz b/research/p104-four-role-endpoint-exchange-bound/inputs/7334-WORD.json.gz new file mode 100644 index 0000000000..73f4300719 Binary files /dev/null and b/research/p104-four-role-endpoint-exchange-bound/inputs/7334-WORD.json.gz differ diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/R143-GEOMETRY.json b/research/p104-four-role-endpoint-exchange-bound/inputs/R143-GEOMETRY.json new file mode 100644 index 0000000000..a8a7d90251 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/inputs/R143-GEOMETRY.json @@ -0,0 +1,935 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caps": { + "events": 76466, + "partners": 615, + "seconds": 25 + }, + "controls": [ + "exact coframe begins after MOVE", + "disjoint scalar aliases", + "incident signed ADD splits the cut range" + ], + "exact_pairs": [ + [ + 232, + 1481 + ], + [ + 436, + 1481 + ], + [ + 438, + 1481 + ], + [ + 996, + 1481 + ], + [ + 1193, + 1481 + ], + [ + 1195, + 1481 + ] + ], + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "last_scalar": { + "3": 75970, + "21": 76388, + "34": 60348, + "39": 61965, + "61": 60691, + "126": 75972, + "133": 76389, + "151": 59420, + "173": 75973, + "188": 75974, + "205": 75975, + "226": 74014, + "228": 75976, + "229": 76370, + "230": 75898, + "232": 58792, + "233": 76368, + "234": 45712, + "235": 58105, + "236": 45826, + "237": 60463, + "238": 59364, + "239": 59398, + "240": 62926, + "241": 61400, + "242": 59071, + "243": 58172, + "244": 71637, + "245": 59960, + "246": 71638, + "247": 58222, + "248": 75977, + "249": 75978, + "250": 58784, + "251": 58781, + "252": 75979, + "253": 60196, + "254": 75980, + "255": 61396, + "256": 66835, + "257": 73671, + "258": 59070, + "260": 75641, + "262": 75981, + "263": 75982, + "264": 75983, + "265": 75984, + "266": 59078, + "267": 73953, + "268": 75985, + "269": 73952, + "270": 76390, + "271": 59020, + "272": 74816, + "274": 75986, + "276": 75987, + "278": 58178, + "279": 75988, + "280": 75989, + "281": 75990, + "283": 75991, + "284": 72966, + "285": 58157, + "286": 76324, + "287": 75993, + "288": 59007, + "290": 75994, + "292": 75995, + "294": 75996, + "295": 75997, + "296": 75998, + "297": 45553, + "299": 45515, + "300": 74831, + "301": 75999, + "302": 59428, + "303": 76000, + "304": 60325, + "306": 61332, + "311": 63503, + "312": 76001, + "313": 58156, + "315": 60994, + "316": 76002, + "317": 76433, + "320": 75631, + "328": 76003, + "329": 59962, + "331": 76004, + "332": 76005, + "334": 76434, + "335": 75632, + "336": 73016, + "338": 76006, + "340": 76007, + "342": 76008, + "343": 76009, + "344": 76435, + "347": 61394, + "348": 76391, + "349": 76436, + "350": 72183, + "351": 73017, + "352": 76011, + "354": 76012, + "356": 76013, + "358": 76014, + "359": 76015, + "360": 74348, + "363": 73019, + "364": 61391, + "365": 76016, + "366": 65461, + "367": 76437, + "370": 76392, + "372": 76393, + "376": 76020, + "377": 76021, + "379": 76022, + "380": 76023, + "382": 76438, + "383": 69392, + "384": 58743, + "388": 70919, + "392": 76024, + "393": 45590, + "395": 58882, + "396": 76025, + "397": 76439, + "398": 76026, + "399": 59164, + "402": 76326, + "404": 70125, + "407": 70124, + "408": 60838, + "409": 68785, + "411": 75633, + "413": 70201, + "414": 76327, + "415": 76028, + "416": 76029, + "417": 76030, + "418": 76031, + "419": 59365, + "420": 76032, + "421": 74866, + "423": 76328, + "424": 70506, + "425": 67643, + "426": 76033, + "427": 76034, + "428": 76329, + "429": 76036, + "430": 76330, + "431": 76037, + "433": 59528, + "434": 76038, + "436": 60325, + "437": 76039, + "438": 76040, + "439": 76041, + "440": 76331, + "441": 76042, + "442": 76043, + "443": 76044, + "444": 70021, + "445": 76394, + "446": 76045, + "447": 76046, + "448": 75183, + "449": 75191, + "456": 76332, + "457": 76048, + "458": 76049, + "460": 73926, + "461": 70903, + "464": 76050, + "465": 76051, + "466": 76052, + "467": 76053, + "468": 76054, + "469": 70890, + "470": 76055, + "471": 75903, + "472": 75184, + "473": 74893, + "474": 76056, + "475": 74895, + "476": 76057, + "477": 59916, + "478": 76058, + "479": 76059, + "482": 76395, + "483": 76396, + "484": 45588, + "485": 74016, + "486": 76061, + "487": 76062, + "488": 76063, + "489": 76440, + "490": 76064, + "491": 76065, + "492": 76441, + "494": 76397, + "495": 76398, + "496": 75904, + "497": 76399, + "498": 76067, + "499": 76068, + "500": 76069, + "501": 76070, + "502": 76071, + "504": 76072, + "505": 76442, + "506": 76400, + "507": 76401, + "508": 74359, + "510": 76075, + "511": 76076, + "512": 76077, + "513": 76078, + "516": 76079, + "517": 76334, + "518": 76402, + "519": 76403, + "520": 59380, + "521": 76082, + "522": 69956, + "523": 76083, + "524": 76084, + "525": 75700, + "526": 76085, + "527": 76086, + "528": 75911, + "529": 76087, + "530": 58695, + "531": 76088, + "532": 58282, + "534": 76090, + "535": 76091, + "536": 76092, + "537": 76093, + "538": 75708, + "539": 75709, + "540": 76094, + "541": 75711, + "542": 75563, + "543": 59803, + "544": 60329, + "545": 76335, + "546": 76096, + "547": 76443, + "548": 76097, + "549": 76444, + "550": 75913, + "551": 76098, + "552": 76099, + "553": 76404, + "554": 76101, + "558": 69950, + "559": 72321, + "560": 76102, + "561": 58670, + "562": 76103, + "563": 76104, + "564": 76105, + "565": 76106, + "566": 45300, + "567": 45432, + "568": 76107, + "569": 76108, + "570": 76109, + "571": 76337, + "572": 76111, + "573": 76112, + "574": 76113, + "575": 75728, + "576": 74380, + "577": 61010, + "578": 76114, + "580": 76115, + "581": 76338, + "582": 76339, + "583": 76118, + "586": 76119, + "587": 45410, + "589": 58137, + "590": 45215, + "591": 60994, + "592": 75185, + "599": 75915, + "600": 74963, + "608": 76120, + "609": 71021, + "611": 68590, + "617": 68783, + "619": 76445, + "624": 60679, + "625": 74966, + "627": 65940, + "632": 62013, + "635": 76340, + "640": 76123, + "641": 74038, + "643": 76341, + "655": 76125, + "659": 70103, + "664": 61994, + "665": 76126, + "671": 76405, + "672": 76128, + "679": 76129, + "680": 74383, + "681": 76130, + "688": 76406, + "689": 76131, + "691": 76132, + "695": 76407, + "697": 76134, + "704": 76135, + "707": 75192, + "709": 76136, + "711": 76408, + "716": 76343, + "726": 76139, + "732": 76140, + "733": 76141, + "752": 76142, + "756": 76446, + "757": 76409, + "758": 74019, + "760": 73034, + "761": 73029, + "767": 76410, + "775": 76447, + "789": 75174, + "791": 76145, + "793": 57227, + "802": 76146, + "806": 76147, + "810": 76148, + "811": 59077, + "812": 75575, + "830": 76149, + "896": 59042, + "901": 76411, + "913": 76151, + "917": 75923, + "924": 76412, + "929": 69977, + "952": 59127, + "969": 73929, + "988": 58940, + "990": 74017, + "991": 76432, + "992": 76153, + "993": 57982, + "994": 64592, + "995": 76154, + "996": 76448, + "997": 76156, + "999": 75576, + "1000": 76449, + "1001": 76413, + "1002": 76158, + "1003": 76159, + "1004": 76344, + "1005": 59076, + "1006": 76161, + "1007": 58995, + "1008": 76414, + "1009": 59109, + "1010": 76450, + "1011": 76346, + "1012": 73435, + "1013": 76347, + "1014": 58994, + "1015": 60549, + "1016": 76165, + "1017": 76415, + "1018": 73951, + "1019": 76166, + "1020": 76167, + "1021": 76451, + "1022": 76168, + "1024": 76169, + "1025": 76377, + "1026": 76170, + "1027": 76171, + "1029": 76378, + "1030": 76416, + "1031": 76172, + "1032": 76417, + "1033": 76174, + "1034": 76175, + "1035": 60331, + "1037": 76176, + "1039": 76418, + "1041": 76177, + "1042": 76178, + "1043": 76419, + "1044": 76180, + "1046": 76181, + "1047": 76182, + "1048": 56702, + "1049": 76452, + "1050": 76184, + "1051": 60213, + "1053": 76351, + "1055": 76352, + "1057": 76186, + "1058": 76187, + "1059": 76188, + "1060": 41855, + "1062": 76189, + "1063": 73436, + "1064": 76190, + "1065": 76191, + "1066": 60212, + "1068": 76192, + "1070": 76353, + "1072": 75038, + "1073": 76194, + "1074": 76195, + "1075": 76196, + "1077": 76197, + "1078": 76198, + "1079": 76199, + "1080": 76200, + "1081": 76201, + "1084": 75047, + "1086": 70173, + "1088": 75048, + "1089": 76202, + "1090": 76203, + "1091": 75941, + "1093": 65378, + "1094": 67041, + "1095": 75942, + "1096": 76204, + "1097": 76205, + "1098": 73023, + "1100": 76206, + "1102": 70799, + "1104": 75054, + "1105": 76207, + "1106": 76208, + "1109": 76209, + "1110": 76210, + "1111": 76211, + "1112": 76212, + "1113": 75949, + "1114": 60975, + "1116": 75602, + "1118": 76213, + "1120": 76420, + "1121": 76215, + "1122": 76216, + "1125": 76217, + "1126": 76218, + "1127": 76219, + "1128": 76220, + "1129": 76221, + "1132": 76222, + "1134": 76421, + "1136": 76224, + "1137": 76225, + "1138": 76226, + "1139": 76227, + "1141": 76228, + "1142": 76229, + "1143": 75819, + "1144": 76355, + "1145": 76231, + "1146": 60948, + "1148": 76233, + "1150": 66892, + "1152": 76234, + "1153": 76235, + "1154": 76236, + "1155": 41296, + "1157": 76237, + "1158": 76238, + "1159": 76239, + "1160": 76240, + "1161": 76241, + "1162": 76242, + "1164": 76243, + "1166": 76244, + "1168": 76356, + "1169": 76245, + "1170": 76246, + "1171": 76247, + "1172": 76248, + "1173": 76249, + "1174": 76250, + "1175": 76251, + "1176": 76252, + "1177": 76253, + "1178": 76453, + "1180": 76255, + "1181": 76256, + "1182": 76257, + "1183": 76258, + "1184": 76259, + "1186": 76260, + "1187": 76261, + "1188": 76262, + "1190": 60248, + "1191": 76263, + "1193": 76264, + "1194": 59073, + "1195": 76265, + "1196": 71692, + "1197": 60141, + "1198": 76266, + "1199": 55914, + "1200": 76267, + "1201": 76268, + "1202": 76269, + "1203": 60548, + "1204": 76270, + "1205": 76271, + "1206": 76272, + "1207": 76422, + "1208": 75197, + "1210": 76357, + "1212": 76275, + "1214": 60916, + "1215": 76276, + "1216": 76358, + "1221": 76278, + "1222": 66851, + "1224": 76279, + "1227": 76280, + "1228": 76281, + "1229": 76282, + "1230": 76382, + "1232": 76283, + "1233": 76284, + "1234": 76423, + "1235": 76424, + "1236": 76383, + "1238": 70030, + "1240": 76287, + "1241": 76384, + "1242": 76425, + "1243": 76360, + "1244": 76289, + "1245": 76290, + "1247": 76386, + "1248": 76387, + "1249": 59559, + "1250": 59400, + "1253": 59737, + "1255": 70217, + "1256": 76291, + "1257": 70701, + "1258": 76292, + "1259": 76293, + "1260": 76294, + "1262": 76295, + "1263": 60818, + "1264": 41347, + "1265": 59731, + "1272": 76426, + "1273": 76297, + "1274": 76298, + "1277": 76299, + "1279": 65396, + "1281": 76300, + "1283": 76301, + "1284": 76427, + "1286": 74034, + "1287": 73011, + "1289": 76303, + "1293": 76304, + "1294": 76362, + "1295": 76363, + "1298": 76307, + "1300": 76308, + "1302": 76309, + "1306": 76310, + "1307": 76428, + "1309": 76312, + "1310": 59984, + "1311": 60290, + "1317": 76313, + "1318": 76314, + "1319": 76315, + "1321": 59694, + "1322": 73080, + "1328": 76316, + "1329": 76317, + "1331": 76429, + "1334": 76318, + "1340": 76319, + "1341": 76320, + "1343": 60860, + "1349": 68906, + "1445": 75198, + "1449": 76321, + "1453": 45777, + "1461": 75199, + "1463": 76322, + "1464": 45795, + "1465": 45803, + "1466": 75896, + "1469": 45807, + "1470": 45789, + "1471": 45799, + "1472": 74020, + "1473": 45791, + "1477": 45538, + "1479": 76365, + "1481": 74032 + }, + "price_sha256": "7b0ccc8fd85240568aeddfc1e2c036ac05ab0ec6e8473522bd902a4adcc1e9eb", + "progress": { + "events": 76466, + "first_unvisited": null + }, + "ranges": [ + [ + 232, + 1481, + 245, + 45219, + 45219 + ], + [ + 232, + 1481, + 245, + 45220, + 45222 + ], + [ + 232, + 1481, + 245, + 45223, + 45714 + ], + [ + 232, + 1481, + 245, + 45715, + 45716 + ], + [ + 232, + 1481, + 245, + 45717, + 51765 + ], + [ + 436, + 1481, + 917, + 43612, + 43612 + ], + [ + 436, + 1481, + 917, + 43613, + 45218 + ], + [ + 438, + 1481, + 245, + 45219, + 45219 + ], + [ + 438, + 1481, + 245, + 45220, + 45222 + ], + [ + 438, + 1481, + 245, + 45223, + 45866 + ], + [ + 438, + 1481, + 245, + 45867, + 49902 + ], + [ + 996, + 1481, + 245, + 45219, + 45219 + ], + [ + 996, + 1481, + 245, + 45220, + 45222 + ], + [ + 996, + 1481, + 245, + 45223, + 45688 + ], + [ + 1193, + 1481, + 917, + 42865, + 42866 + ], + [ + 1193, + 1481, + 917, + 42867, + 43414 + ], + [ + 1193, + 1481, + 917, + 43415, + 45218 + ], + [ + 1195, + 1481, + 245, + 45219, + 45219 + ], + [ + 1195, + 1481, + 245, + 45220, + 45222 + ], + [ + 1195, + 1481, + 245, + 45223, + 50011 + ] + ], + "raw_cuts": 20455, + "selected": [ + [ + 232, + 1481, + 245, + 51765 + ], + [ + 1195, + 1481, + 245, + 50011 + ], + [ + 438, + 1481, + 245, + 49902 + ], + [ + 438, + 1481, + 245, + 45866 + ], + [ + 232, + 1481, + 245, + 45716 + ], + [ + 232, + 1481, + 245, + 45714 + ], + [ + 996, + 1481, + 245, + 45688 + ], + [ + 232, + 1481, + 245, + 45222 + ], + [ + 438, + 1481, + 245, + 45222 + ], + [ + 996, + 1481, + 245, + 45222 + ], + [ + 1195, + 1481, + 245, + 45222 + ], + [ + 232, + 1481, + 245, + 45219 + ], + [ + 438, + 1481, + 245, + 45219 + ], + [ + 996, + 1481, + 245, + 45219 + ], + [ + 1195, + 1481, + 245, + 45219 + ], + [ + 436, + 1481, + 917, + 45218 + ] + ], + "unvisited_representatives": [ + [ + 1193, + 1481, + 917, + 43415, + 45218 + ], + [ + 436, + 1481, + 917, + 43612, + 43612 + ], + [ + 1193, + 1481, + 917, + 42867, + 43414 + ], + [ + 1193, + 1481, + 917, + 42865, + 42866 + ] + ], + "word_sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" +} diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/R148-PRICE.json b/research/p104-four-role-endpoint-exchange-bound/inputs/R148-PRICE.json new file mode 100644 index 0000000000..da0f65f555 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/inputs/R148-PRICE.json @@ -0,0 +1,234 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caps": { + "events": 76466, + "ranges": 20, + "raw_cuts": 20455, + "seconds": 20 + }, + "context_c": 2430, + "context_headroom": 1666, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "native_grid": [ + 1125, + 25 + ], + "ordinary_baseline": 782715464, + "ordinary_headroom": 217284536, + "paid_delta": {}, + "pins": { + "inputs/7334-READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/GEOMETRY.json": "f2aa238ed8c49f0633c3837c6961bfba19482385851a5606578fa6368db79542", + "inputs/PRICE.json": "7b0ccc8fd85240568aeddfc1e2c036ac05ab0ec6e8473522bd902a4adcc1e9eb", + "inputs/R96-PRICE.json": "a78be64c3e3ae8a0e532237c4dd3541aa9ad3fcbbc3c25d79c8a03fb7e07c525" + }, + "productive_delta": { + "5": -17, + "6": 17, + "8": 17, + "9": -17 + }, + "quote": { + "moonshot": { + "complete_one_margin": [ + "-1397375598591330167645218466410827484336129275285183/10000000000000000000000000000000000000000000000000", + "-1397375598591330167645218466410827484336129275228223/10000000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-1407375598591330167645218466410827484336129275285183/10000000000000000000000000000000000000000000000000", + "-1407375598591330167645218466410827484336129275228223/10000000000000000000000000000000000000000000000000" + ], + "kappa": "10018846261809/2500000000000000", + "old_margin": [ + "-1397669261708656239100690290777847634192460354758679/10000000000000000000000000000000000000000000000000", + "-698834630854328119550345145388923817096230177350851/5000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "58732623465214291094364873404029971266215894689/2000000000000000000000000000000000000000000000000", + "29366311732607145547182436702014985633107947353/1000000000000000000000000000000000000000000000000" + ] + }, + "old_crossing_upper": { + "complete_one_margin": [ + "16718765800897710178871748999834908075596398709/625000000000000000000000000000000000000000000000", + "66875063203590840715486995999339632302385608823/2500000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-608281234199102289821128251000165091924403601291/625000000000000000000000000000000000000000000000", + "-2433124936796409159284513004000660367697614391177/2500000000000000000000000000000000000000000000000" + ], + "kappa": "182332597822022395349777014167081/50000000000000000000000000000000000", + "old_margin": [ + "-29866980917152322049/10000000000000000000000000000000000000000000000000", + "-29866980917152266101/10000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "267500252814363362861947984027225510126694701359/10000000000000000000000000000000000000000000000000", + "267500252814363362861947984027225510126694701427/10000000000000000000000000000000000000000000000000" + ] + }, + "probe": { + "complete_one_margin": [ + "263624574395049558265122202359309052136210511079/10000000000000000000000000000000000000000000000000", + "263624574395049558265122202359309052136210567027/10000000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-9736375425604950441734877797640690947863789488921/10000000000000000000000000000000000000000000000000", + "-9736375425604950441734877797640690947863789432973/10000000000000000000000000000000000000000000000000" + ], + "kappa": "182332647822022395349777014167081/50000000000000000000000000000000000", + "old_margin": [ + "-1937875496195012026824631314822011161395099251/5000000000000000000000000000000000000000000000000", + "-1937875496195012026824631314822011161395071277/5000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "267500325387439582318771464988953074459000709547/10000000000000000000000000000000000000000000000000", + "53500065077487916463754292997790614891800141923/2000000000000000000000000000000000000000000000000" + ] + } + }, + "ranges": [ + [ + 232, + 1481, + 245, + 45219, + 45219 + ], + [ + 232, + 1481, + 245, + 45220, + 45222 + ], + [ + 232, + 1481, + 245, + 45223, + 45714 + ], + [ + 232, + 1481, + 245, + 45715, + 45716 + ], + [ + 232, + 1481, + 245, + 45717, + 51765 + ], + [ + 436, + 1481, + 917, + 43612, + 43612 + ], + [ + 436, + 1481, + 917, + 43613, + 45218 + ], + [ + 438, + 1481, + 245, + 45219, + 45219 + ], + [ + 438, + 1481, + 245, + 45220, + 45222 + ], + [ + 438, + 1481, + 245, + 45223, + 45866 + ], + [ + 438, + 1481, + 245, + 45867, + 49902 + ], + [ + 996, + 1481, + 245, + 45219, + 45219 + ], + [ + 996, + 1481, + 245, + 45220, + 45222 + ], + [ + 996, + 1481, + 245, + 45223, + 45688 + ], + [ + 1193, + 1481, + 917, + 42865, + 42866 + ], + [ + 1193, + 1481, + 917, + 42867, + 43414 + ], + [ + 1193, + 1481, + 917, + 43415, + 45218 + ], + [ + 1195, + 1481, + 245, + 45219, + 45219 + ], + [ + 1195, + 1481, + 245, + 45220, + 45222 + ], + [ + 1195, + 1481, + 245, + 45223, + 50011 + ] + ], + "third": 1454 +} diff --git a/research/p104-four-role-endpoint-exchange-bound/inputs/reverse_span.py b/research/p104-four-role-endpoint-exchange-bound/inputs/reverse_span.py new file mode 100644 index 0000000000..5efbeac87e --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/inputs/reverse_span.py @@ -0,0 +1,393 @@ +"""Independent normalized reverse-contact and fraction-free donor-span gate.""" +from argparse import ArgumentParser +from collections import Counter, defaultdict +from fractions import Fraction +from functools import cache +from gzip import decompress +from hashlib import sha256 +from json import dumps, loads +from math import gcd, isqrt, lcm +from pathlib import Path +from signal import SIGALRM, alarm, signal +from time import monotonic + +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +WORD = "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" +PRICE = "c9166ff18194a7e69f91a06f76329a2ff838bb65b08c4ed7a5a06038fdfa966d" +PRIME = 65521 + + +def unique(pairs): + values = dict(pairs) + assert len(values) == len(pairs), "duplicate JSON key" + return values + + +def checked(path, pin, compressed=False): + raw = path.read_bytes() + if sha256(raw).hexdigest() != pin: + raise ValueError(f"changed input {path.name}") + return loads(decompress(raw) if compressed else raw, object_pairs_hook=unique) + + +@cache +def coefficient(raw): + q = Fraction(raw) + assert q and q.denominator % PRIME, "nonunit native denominator" + return q.numerator, q.denominator + + +def normalized(values, denominator): + if not values: + return {}, 1 + divisor = gcd(denominator, *values.values()) + if divisor != 1: + return {j: a // divisor for j, a in values.items()}, denominator // divisor + return values, denominator + + +def sum_scaled(first, second, factor): + a, da = first + b, db = second + numerator, denom = factor + if not b: + return first + common = lcm(da, db * denom) + out = {j: v * (common // da) for j, v in a.items()} + weight = numerator * (common // (db * denom)) + for j, v in b.items(): + val = out.get(j, 0) + weight * v + if val: + out[j] = val + else: + out.pop(j, None) + return normalized(out, common) + + +def incidence(e): + return e[1:3] if e[0] in ("ADD", "COPY") else e[1:2] + + +def candidates(word, quote): + n = word["public"] + tape = word["program"] + stock = {} + for case in quote["candidates"]: + owner = case["owner"] + left, right = case["move_clocks"] + a, middle, c = case["chart_path"] + original, entry = case["literal_ADD"] + assert case["owner_access"] == "destination" and entry[0] == owner + assert entry[1] == case["peer"] and entry[-1] == middle + assert tape[left] == ["MOVE", owner, a, middle, True] + assert tape[right] == ["MOVE", owner, middle, c, True] + assert tape[original] == ["ADD", *entry] + assert n <= owner and left < original < right + assert [i for i in range(left + 1, right) if owner in incidence(tape[i])] == [original] + assert case["cut_windows_pre_event"] == {"entrance": [left, right], "exit": [left + 1, right]} + stock[owner, left, right] = case + assert len(stock) == 3 and len({tuple(k) for k in quote["keys"]}) == quote["case_cap"] == 33 + return stock + + +def collect(word, cuts, observations, cap): + """Forward structural pass only. Assign one ID to each requested live value.""" + n = word["public"] + chart = list(word["initial"]) + [None] * word["owned_fields"] + revisions = [0] * len(chart) + fresh = set() + starts = {} + lifetimes = {} + requests = defaultdict(list) + observation_ids = {} + bank_ids = {} + value_id = {} + paid = Counter() + + @cache + def span(f): + vectors = {0} + for v in word["frames"][f]: + assert v not in vectors + vectors.update(v ^ t for t in tuple(vectors)) + return vectors + + def request(t, role): + assert chart[role] is not None + key = role, revisions[role] + if key not in value_id: + value_id[key] = len(value_id) + requests[t].append((role, value_id[key])) + return value_id[key] + + tape = word["program"] + for t in range(len(tape) + 1): + if t % 128 == 0 and monotonic() >= cap: + raise TimeoutError("literal structural scan") + for role in observations.get(t, ()): + observation_ids[t, role] = request(t, role) + for key, chart_id, exclude in cuts.get(t, ()): + bank_ids[key] = [(r, request(t, r)) for r, c in enumerate(chart) if c == chart_id and r != exclude] + if t == len(tape): + break + op, d, *args = tape[t] + assert 0 <= d < len(chart) + if op == "INIT": + assert d >= n and chart[d] is None + chart[d], starts[d] = args[0], t + fresh.add(d) + elif op == "CLEAR": + assert d >= n and chart[d] == args[0] and d in starts + lifetimes[d, starts.pop(d)] = t + chart[d] = None + fresh.discard(d) + elif op == "MOVE": + a, b, owned = args + assert chart[d] == a and owned == (d >= n) + assert span(a) < span(b) or owned and span(b) < span(a) + paid[abs(len(word["frames"][b]) - len(word["frames"][a]))] += 1 + chart[d] = b + fresh.discard(d) + continue + elif op == "SCALE": + assert chart[d] == args[-1] + coefficient(args[-2]) + fresh.discard(d) + else: + assert op in ("ADD", "COPY") + src, coeff, f = args + assert d != src and chart[d] == chart[src] == f + coefficient(coeff) + if op == "COPY": + assert d >= n and d in fresh + fresh.discard(d) + revisions[d] += 1 + assert not starts and chart == word["final"] + [None] * word["owned_fields"] + return requests, observation_ids, bank_ids, lifetimes, dict(paid), len(value_id) + + +def transpose_prefix(word, requests, count, cap): + """Propagate all requested output covectors backward, then transpose to input rows.""" + n = word["public"] + empty = ({}, 1) + adjoint = [empty] * (n + word["owned_fields"]) + tape = word["program"] + for t in range(max(requests), -1, -1): + if t % 128 == 0 and monotonic() >= cap: + raise TimeoutError("reverse normalized prefix") + op, d, *args = tape[t] + if op in ("INIT", "CLEAR"): + adjoint[d] = empty + elif op == "SCALE": + adjoint[d] = sum_scaled(empty, adjoint[d], coefficient(args[-2])) + elif op in ("ADD", "COPY"): + src = args[0] + adjoint[src] = sum_scaled(adjoint[src], adjoint[d], coefficient(args[-2])) + if op == "COPY": + adjoint[d] = empty + else: + assert op == "MOVE" + for r, output in requests.get(t, ()): + adjoint[r] = sum_scaled(adjoint[r], ({output: 1}, 1), (1, 1)) + assert not any(d for d, _ in adjoint[n:]) + by_output = [[] for _ in range(count)] + for coord, (coeffs, d) in enumerate(adjoint[:n]): + assert d % PRIME + for i, v in coeffs.items(): + by_output[i].append((coord, v, d)) + rows = [] + for entries in by_output: + common = lcm(*(d for _, _, d in entries)) + rows.append(normalized({i: v * (common // d) for i, v, d in entries}, common)) + return rows + + +def eliminate(v, basis, record=False): + """Reverse-pivot integer elimination. All leading pivots are exact.""" + v = v.copy() + reductions = [] + multiplier = 1 + while v: + k = max(v) + if k not in basis: + break + w = basis[k] + a, b = w[k], v[k] + d = gcd(a, b) + a, b = a // d, b // d + next_v = {j: a * x for j, x in v.items()} + for j, x in w.items(): + z = next_v.get(j, 0) - b * x + if z: + next_v[j] = z + else: + next_v.pop(j, None) + assert k not in next_v + g = gcd(*next_v.values()) or 1 + v = {j: x // g for j, x in next_v.items()} + if record: + reductions.append((k, Fraction(b, a) * multiplier)) + multiplier *= Fraction(g, a) + return v, reductions, multiplier + + +def dot(row, covector): + numerator, denominator = row + return sum((numerator.get(j, 0) * v for j, v in covector.items()), Fraction(0)) / denominator + + +def exact_span(bank, target): + t, dt = target + if not t: + return dict(status="exact_span", coefficients={}) + exterior = next((j for j in sorted(t) if all(j not in row for _, (row, _) in bank)), None) + basis = {} + histories = {} + for role, (v, d) in bank: + reduced, steps, scale = eliminate(v, basis, record=True) + if reduced: + pivot = max(reduced) + basis[pivot] = reduced + histories[pivot] = (role, d, steps, scale) + if exterior is not None: + residue = t[exterior] * pow(dt, -1, PRIME) % PRIME + return dict(status="absent_exterior_coordinate", donor_rank=len(basis), augmented_rank=len(basis)+1, + coordinate=exterior, target_coefficient=str(Fraction(t[exterior], dt)), + target_residue_mod_prime=residue) + residual, steps, scale = eliminate(t, basis, record=True) + if residual: + k = max(residual) + dual = {k: Fraction(1)} + for p, v in sorted(basis.items()): + coefficient = -sum((v.get(j, 0) * c for j, c in dual.items()), Fraction(0)) / v[p] + if coefficient: + dual[p] = coefficient + target_value = dot(target, dual) + assert target_value and all(dot(v, dual) == 0 for _, v in bank) + return dict(status="exact_rank_exclusion", donor_rank=len(basis), augmented_rank=len(basis) + 1, + missing_reverse_pivot=k, residual_integer_row=residual, + separating_covector={j: str(v) for j, v in dual.items()}, separated_target=str(target_value)) + pending = dict(steps) + solution = defaultdict(Fraction) + for pivot in sorted(basis): + if pivot not in pending: + continue + weight = pending.pop(pivot) + if not weight: + continue + role, denom, reductions, factor = histories[pivot] + weight /= factor + solution[role] += weight * denom / dt + for j, scalar in reductions: + pending[j] = pending.get(j, Fraction(0)) - weight * scalar + assert not pending + check = ({}, 1) + rows = dict(bank) + for r, x in solution.items(): + check = sum_scaled(check, rows[r], (x.numerator, x.denominator)) + assert check == target, (check, target) + return dict(status="exact_span", donor_rank=len(basis), + coefficients={r: str(x) for r, x in sorted(solution.items()) if x}) + + +def controls(): + toy = {"public": 4, "owned_fields": 1, "frames": [[]], "initial": [0] * 4, "final": [0] * 4, + "program": [["INIT", 4, 0], ["COPY", 4, 0, "1/2", 0], ["ADD", 4, 1, "-3", 0], + ["ADD", 0, 2, "2", 0], ["CLEAR", 4, 0]]} + req, ids, banks, _, _, count = collect(toy, {3:[((3,), 0, 4)], 4:[((4,), 0, 4)]}, {3:[4]}, float("inf")) + rows = transpose_prefix(toy, req, count, float("inf")) + target = rows[ids[3, 4]] + before = [(r, rows[i]) for r, i in banks[3,] if r in (0, 1)] + after = [(r, rows[i]) for r, i in banks[4,] if r in (0, 1)] + assert exact_span(before, target)["coefficients"] == {0:"1/2", 1:"-3"} + assert exact_span(after, target)["status"] == "exact_rank_exclusion" + assert exact_span(before[1:], target)["status"] == "absent_exterior_coordinate" + # Nontrivial exact dependency and reconstruction after a shared pivot. + multi = [(5, ({0: 3, 1: -1}, 2)), (6, ({0: 1, 1: 4}, 3)), (7, ({0: 11, 1: 2}, 1))] + hit = exact_span(multi, ({0: 11, 1: 2}, 1)) + assert hit["status"] == "exact_span" and len(hit["coefficients"]) == 2 + return ["signed_multi_source_and_owned_COPY", "intervening_write_blocks_span", "absent_exterior_coordinate", + "dependent_donor_bank_exact_reconstruction"] + + +def audit(word, quote, cap, decisions): + assert (word["public"], word["owned_fields"], len(word["program"])) == (1501, 68, 76466) + stock = candidates(word, quote) + observed = defaultdict(set) + cuts = defaultdict(list) + for row in quote["keys"]: + key = tuple(row) + owner, left, right, side, t = key + item = stock[owner, left, right] + chart = item["chart_path"][0 if side == "entrance" else 2] + assert item["cut_windows_pre_event"][side][0] <= t <= item["cut_windows_pre_event"][side][1] + cuts[t].append((key, chart, owner)) + observed[item["literal_ADD"][0]].add(item["peer"]) + requests, refs, banks, lifetimes, paid, count = collect(word, cuts, observed, cap) + assert paid == {1:4000, 2:853, 3:829, 4:223, 5:345, 6:14, 7:10, 8:5} + for item in stock.values(): + left, right = item["owner_lifetime"] + assert lifetimes[item["owner"], left] == right + rows = transpose_prefix(word, requests, count, cap) + for entry in quote["keys"]: + if monotonic() >= cap: + raise TimeoutError("exact donor bank gate") + owner, left, right, side, t = entry + item = stock[owner, left, right] + source = item["peer"] + target_id = refs[item["literal_ADD"][0], source] + target = rows[target_id] + bank = [(r, rows[i]) for r, i in banks[tuple(entry)]] + chart = item["chart_path"][0 if side == "entrance" else 2] + decision = exact_span(bank, target) + decisions.append(dict(key=entry, proposed_chart=chart, literal_read_peer=source, + literal_read_clock=item["literal_ADD"][0], donors=len(bank), owned_donors=sum(r>=word["public"] for r,_ in bank), + target_row_id=target_id, donor_role_row_ids=banks[tuple(entry)], + donor_rowset_sha256=sha256(dumps(bank, sort_keys=True).encode()).hexdigest(), **decision)) + return rows + + +def main(): + parser = ArgumentParser(description=__doc__) + parser.add_argument("--word", type=Path) + parser.add_argument("--price", type=Path) + parser.add_argument("--controls-only", action="store_true") + args = parser.parse_args() + if args.controls_only: + print(dumps(controls())) + return + assert args.word is not None and args.price is not None and __debug__ + start = monotonic() + def stop(*_): + raise TimeoutError("hard 20-second runner cap") + signal(SIGALRM, stop) + alarm(20) + decisions = [] + keys = [] + rows = None + tests = [] + timed_out = None + try: + tests = controls() + assert all(PRIME % d for d in range(2, isqrt(PRIME)+1)) + quote = checked(args.price, PRICE) + assert quote["head"] == HEAD and quote["word_sha256"] == WORD + keys = quote["keys"] + rows = audit(checked(args.word, WORD, compressed=True), quote, start+18, decisions) + except TimeoutError as error: + timed_out = str(error) + finally: + alarm(0) + result = dict(head=HEAD, word_sha256=WORD, price_sha256=PRICE, prime=PRIME, + case_cap=33, runner_cap_seconds=20, controls=tests, distinct_requested_rows=len(rows) if rows is not None else None, + requested_integer_rows=rows, + cases=decisions, disposition_counts=dict(Counter(r["status"] for r in decisions)), + unresolved=keys[len(decisions):], timeout=timed_out, + survivors=[r for r in decisions if r["status"] == "exact_span"]) + print(dumps(result, sort_keys=True, indent=2)) + if timed_out: + raise SystemExit(2) + + +if __name__ == "__main__": + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/GEOMETRY.json b/research/p104-four-role-endpoint-exchange-bound/lead/GEOMETRY.json new file mode 100644 index 0000000000..bbdb7fa94c --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/GEOMETRY.json @@ -0,0 +1,643 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "controls": [ + "nonzero value on wrong chart ineligible", + "four zero donor responses exclude", + "nonzero fourth keeps key pending" + ], + "counts": { + "no coframe": 3961, + "prefix pending": 16494 + }, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "price_sha256": "e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22", + "progress": { + "events": 76466, + "first_unvisited_event": null, + "raw_cuts_checked": 20455 + }, + "rows": [ + { + "counts": { + "prefix pending": 1 + }, + "range": [ + 232, + 1481, + 245, + 45219, + 45219 + ], + "subranges": [ + { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 3 + }, + "range": [ + 232, + 1481, + 245, + 45220, + 45222 + ], + "subranges": [ + { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 492 + }, + "range": [ + 232, + 1481, + 245, + 45223, + 45714 + ], + "subranges": [ + { + "first": 45223, + "last": 45714, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 2 + }, + "range": [ + 232, + 1481, + 245, + 45715, + 45716 + ], + "subranges": [ + { + "first": 45715, + "last": 45716, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 6049 + }, + "range": [ + 232, + 1481, + 245, + 45717, + 51765 + ], + "subranges": [ + { + "first": 45717, + "last": 51765, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "no coframe": 1 + }, + "range": [ + 436, + 1481, + 917, + 43612, + 43612 + ], + "subranges": [] + }, + { + "counts": { + "no coframe": 1606 + }, + "range": [ + 436, + 1481, + 917, + 43613, + 45218 + ], + "subranges": [] + }, + { + "counts": { + "prefix pending": 1 + }, + "range": [ + 438, + 1481, + 245, + 45219, + 45219 + ], + "subranges": [ + { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 3 + }, + "range": [ + 438, + 1481, + 245, + 45220, + 45222 + ], + "subranges": [ + { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 644 + }, + "range": [ + 438, + 1481, + 245, + 45223, + 45866 + ], + "subranges": [ + { + "first": 45223, + "last": 45866, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 4036 + }, + "range": [ + 438, + 1481, + 245, + 45867, + 49902 + ], + "subranges": [ + { + "first": 45867, + "last": 49902, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 1 + }, + "range": [ + 996, + 1481, + 245, + 45219, + 45219 + ], + "subranges": [ + { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 3 + }, + "range": [ + 996, + 1481, + 245, + 45220, + 45222 + ], + "subranges": [ + { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 466 + }, + "range": [ + 996, + 1481, + 245, + 45223, + 45688 + ], + "subranges": [ + { + "first": 45223, + "last": 45688, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "no coframe": 2 + }, + "range": [ + 1193, + 1481, + 917, + 42865, + 42866 + ], + "subranges": [] + }, + { + "counts": { + "no coframe": 548 + }, + "range": [ + 1193, + 1481, + 917, + 42867, + 43414 + ], + "subranges": [] + }, + { + "counts": { + "no coframe": 1804 + }, + "range": [ + 1193, + 1481, + 917, + 43415, + 45218 + ], + "subranges": [] + }, + { + "counts": { + "prefix pending": 1 + }, + "range": [ + 1195, + 1481, + 245, + 45219, + 45219 + ], + "subranges": [ + { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 3 + }, + "range": [ + 1195, + 1481, + 245, + 45220, + 45222 + ], + "subranges": [ + { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + }, + { + "counts": { + "prefix pending": 4789 + }, + "range": [ + 1195, + 1481, + 245, + 45223, + 50011 + ], + "subranges": [ + { + "first": 45223, + "last": 50011, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + ] + } + ], + "unresolved": [ + { + "range": [ + 232, + 1481, + 245, + 45219, + 45219 + ], + "segment": { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 232, + 1481, + 245, + 45220, + 45222 + ], + "segment": { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 232, + 1481, + 245, + 45223, + 45714 + ], + "segment": { + "first": 45223, + "last": 45714, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 232, + 1481, + 245, + 45715, + 45716 + ], + "segment": { + "first": 45715, + "last": 45716, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 232, + 1481, + 245, + 45717, + 51765 + ], + "segment": { + "first": 45717, + "last": 51765, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 438, + 1481, + 245, + 45219, + 45219 + ], + "segment": { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 438, + 1481, + 245, + 45220, + 45222 + ], + "segment": { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 438, + 1481, + 245, + 45223, + 45866 + ], + "segment": { + "first": 45223, + "last": 45866, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 438, + 1481, + 245, + 45867, + 49902 + ], + "segment": { + "first": 45867, + "last": 49902, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 996, + 1481, + 245, + 45219, + 45219 + ], + "segment": { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 996, + 1481, + 245, + 45220, + 45222 + ], + "segment": { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 996, + 1481, + 245, + 45223, + 45688 + ], + "segment": { + "first": 45223, + "last": 45688, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 1195, + 1481, + 245, + 45219, + 45219 + ], + "segment": { + "first": 45219, + "last": 45219, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 1195, + 1481, + 245, + 45220, + 45222 + ], + "segment": { + "first": 45220, + "last": 45222, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + }, + { + "range": [ + 1195, + 1481, + 245, + 45223, + 50011 + ], + "segment": { + "first": 45223, + "last": 50011, + "response": "1", + "revision": 26, + "status": "prefix pending" + } + } + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/PREFIX.json b/research/p104-four-role-endpoint-exchange-bound/lead/PREFIX.json new file mode 100644 index 0000000000..0b4e09cecd --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/PREFIX.json @@ -0,0 +1,348 @@ +{ + "controls": [ + "four-role bare exchange control", + "rank-one determinant zero control", + "exact four-row membership" + ], + "counts": { + "exact_rank_exclusion": 8 + }, + "mode": "prefix", + "pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/reverse_span.py": "f8b48f2ed99d003e20f5b3fb2270603c4edbc3ce9a01484102816aa2710ce9ff", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PRICE.json": "e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22" + }, + "rows": [ + { + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 51765 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "232": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45716 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "232": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45714 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "232": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "232": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "73": -1, + "74": -1, + "83": -1, + "84": -1, + "232": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 50011 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 1195, + "residual_integer_row": { + "533": -1, + "1195": 1 + }, + "separated_target": "1", + "separating_covector": { + "1195": "1", + "1331": "-1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 49902 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "438": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45866 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "438": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + } + ], + "runner_cap": 25, + "selected": [ + [ + 232, + 1481, + 1454, + 1251, + 245, + 51765 + ], + [ + 232, + 1481, + 1454, + 1251, + 245, + 45716 + ], + [ + 232, + 1481, + 1454, + 1251, + 245, + 45714 + ], + [ + 232, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 232, + 1481, + 1454, + 1251, + 245, + 45219 + ], + [ + 1195, + 1481, + 1454, + 1251, + 245, + 50011 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 49902 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 45866 + ] + ], + "unvisited": [ + [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ] + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/PRICE.json b/research/p104-four-role-endpoint-exchange-bound/lead/PRICE.json new file mode 100644 index 0000000000..1048b11f04 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/PRICE.json @@ -0,0 +1,260 @@ +{ + "additional_roles": [ + 1454, + 1251 + ], + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caps": { + "events": 76466, + "geometry_seconds": 20, + "prefix_keys": 8, + "prefix_seconds": 25, + "ranges": 20, + "raw_cuts": 20455, + "suffix_keys": 4, + "suffix_seconds": 35 + }, + "compatible_edit_cap": 1, + "extra_paid": 0, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "ordinary": { + "add_unit_upper": 340, + "charged_source_units": 239904, + "coefficient_denominator_divides": 37748736000, + "complete_upper": 782955368, + "headroom": 217044632, + "max_adds_per_native": 24, + "max_scales_per_native": 8, + "numerator_bits": 24, + "reserved_monomial_maps_per_native": 4, + "scale_unit_upper": 244 + }, + "paid": 110519, + "pins": { + "inputs/7113-fixed-tape.py": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "inputs/7113-independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "inputs/7334-CALLER-RESULT.json": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/R143-GEOMETRY.json": "f2aa238ed8c49f0633c3837c6961bfba19482385851a5606578fa6368db79542", + "inputs/R148-PRICE.json": "8b71d05eddb3aee641ffa41a57a3922292bc4d45c5eb8aae8f2e4514388f6524" + }, + "productive": 22461, + "quote": { + "moonshot": { + "complete_one_margin": [ + "-1397375598591330167645218466410827484336129275285183/10000000000000000000000000000000000000000000000000", + "-1397375598591330167645218466410827484336129275228223/10000000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-1407375598591330167645218466410827484336129275285183/10000000000000000000000000000000000000000000000000", + "-1407375598591330167645218466410827484336129275228223/10000000000000000000000000000000000000000000000000" + ], + "kappa": "10018846261809/2500000000000000", + "old_margin": [ + "-1397669261708656239100690290777847634192460354758679/10000000000000000000000000000000000000000000000000", + "-698834630854328119550345145388923817096230177350851/5000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "58732623465214291094364873404029971266215894689/2000000000000000000000000000000000000000000000000", + "29366311732607145547182436702014985633107947353/1000000000000000000000000000000000000000000000000" + ] + }, + "old_crossing_upper": { + "complete_one_margin": [ + "16718765800897710178871748999834908075596398709/625000000000000000000000000000000000000000000000", + "66875063203590840715486995999339632302385608823/2500000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-608281234199102289821128251000165091924403601291/625000000000000000000000000000000000000000000000", + "-2433124936796409159284513004000660367697614391177/2500000000000000000000000000000000000000000000000" + ], + "kappa": "182332597822022395349777014167081/50000000000000000000000000000000000", + "old_margin": [ + "-29866980917152322049/10000000000000000000000000000000000000000000000000", + "-29866980917152266101/10000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "267500252814363362861947984027225510126694701359/10000000000000000000000000000000000000000000000000", + "267500252814363362861947984027225510126694701427/10000000000000000000000000000000000000000000000000" + ] + }, + "probe": { + "complete_one_margin": [ + "263624574395049558265122202359309052136210511079/10000000000000000000000000000000000000000000000000", + "263624574395049558265122202359309052136210567027/10000000000000000000000000000000000000000000000000" + ], + "complete_one_margin_with_extra_rank_one": [ + "-9736375425604950441734877797640690947863789488921/10000000000000000000000000000000000000000000000000", + "-9736375425604950441734877797640690947863789432973/10000000000000000000000000000000000000000000000000" + ], + "kappa": "182332647822022395349777014167081/50000000000000000000000000000000000", + "old_margin": [ + "-1937875496195012026824631314822011161395099251/5000000000000000000000000000000000000000000000000", + "-1937875496195012026824631314822011161395071277/5000000000000000000000000000000000000000000000000" + ], + "whole_one_gross": [ + "267500325387439582318771464988953074459000709547/10000000000000000000000000000000000000000000000000", + "53500065077487916463754292997790614891800141923/2000000000000000000000000000000000000000000000000" + ] + } + }, + "ranges": [ + [ + 232, + 1481, + 245, + 45219, + 45219 + ], + [ + 232, + 1481, + 245, + 45220, + 45222 + ], + [ + 232, + 1481, + 245, + 45223, + 45714 + ], + [ + 232, + 1481, + 245, + 45715, + 45716 + ], + [ + 232, + 1481, + 245, + 45717, + 51765 + ], + [ + 436, + 1481, + 917, + 43612, + 43612 + ], + [ + 436, + 1481, + 917, + 43613, + 45218 + ], + [ + 438, + 1481, + 245, + 45219, + 45219 + ], + [ + 438, + 1481, + 245, + 45220, + 45222 + ], + [ + 438, + 1481, + 245, + 45223, + 45866 + ], + [ + 438, + 1481, + 245, + 45867, + 49902 + ], + [ + 996, + 1481, + 245, + 45219, + 45219 + ], + [ + 996, + 1481, + 245, + 45220, + 45222 + ], + [ + 996, + 1481, + 245, + 45223, + 45688 + ], + [ + 1193, + 1481, + 917, + 42865, + 42866 + ], + [ + 1193, + 1481, + 917, + 42867, + 43414 + ], + [ + 1193, + 1481, + 917, + 43415, + 45218 + ], + [ + 1195, + 1481, + 245, + 45219, + 45219 + ], + [ + 1195, + 1481, + 245, + 45220, + 45222 + ], + [ + 1195, + 1481, + 245, + 45223, + 50011 + ] + ], + "raw_cuts": 20455, + "surplus": 1424, + "tape": { + "baseline_context_c": 2430, + "condition": "Recompute actual grid, context, complete tape and all physical wrappers before any candidate. Scope retains owned and external lanes.", + "context_cap": 4096, + "elementary_records_upper": 25483363264, + "monomial_map_slots_upper": 298876, + "native_grid_baseline": [ + 1125, + 25 + ], + "scalar_macro_delta": 544, + "scalar_services_delta": 17408, + "scalar_services_upper": 43843232, + "scalar_steps_coefficient_upper": 45972960837632 + } +} diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/basis.py b/research/p104-four-role-endpoint-exchange-bound/lead/basis.py new file mode 100644 index 0000000000..906ae0bf82 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/basis.py @@ -0,0 +1,188 @@ +"""Exact four-role prefix and guarded suffix checks on frozen R151 segments.""" +from argparse import ArgumentParser +from collections import Counter,defaultdict +from fractions import Fraction as Q +from gzip import decompress +from hashlib import sha256 +from json import dumps,loads +from math import lcm +from pathlib import Path +from runpy import run_path +from signal import SIGALRM,alarm,signal +from time import monotonic + +ROOT=Path(__file__).resolve().parents[1] +PINS={ + 'lead/PRICE.json':'e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22', + 'lead/GEOMETRY.json':'a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239', + 'inputs/7334-WORD.json.gz':'4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a', + 'inputs/reverse_span.py':'f8b48f2ed99d003e20f5b3fb2270603c4edbc3ce9a01484102816aa2710ce9ff', +} +PAYLOAD='9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac' +EVENTS=76466 + + +def checked(root,name,pin=None): + b=(root/name).read_bytes() + assert sha256(b).hexdigest()==(pin or PINS[name]),('changed dependency',name) + return b + + +def key(row): + i,j,c,_,_=row['range'] + return [i,j,1454,1251,c,row['segment']['last']] + + +def selection(prior): + assert prior['price_sha256']==PINS['lead/PRICE.json'] + assert prior['counts']=={'no coframe':3961,'prefix pending':16494} + all_keys=[key(r) for r in prior['unresolved']] + assert len(set(map(tuple,all_keys)))==15 + return sorted(all_keys,key=lambda r:(r[0]!=232,-r[-1],r[0],r[3])) + + +def direction(roles): + return {roles[0]:1,roles[1]:-1},1 + + +def to_int(row): + d=lcm(*(v.denominator for v in row.values())) + return {i:v.numerator*(d//v.denominator) for i,v in row.items()},d + + +def prefix(word,keys,engine,deadline): + demands=defaultdict(list) + for k,row in enumerate(keys): + for j,r in enumerate(row[:4]): + demands[row[-1]].append((r,4*k+j)) + rows=engine['transpose_prefix'](word,demands,4*len(keys),deadline) + return [(r,engine['exact_span'](list(zip(r[:4],rows[4*k:4*k+4],strict=True)),direction(r[:4]))) + for k,r in enumerate(keys)] + + +def add(row,source,q): + for j,v in source.items(): + x=row.get(j,0)+q*v + if x: + row[j]=x + else: + row.pop(j,None) + + +def suffix(word,keys,deadline): + n,m=word['public'],word['owned_fields'] + values=[{} for _ in range(n+m)] + starts=defaultdict(list) + columns=[{} for _ in range(4*len(keys))] + for k,row in enumerate(keys): + for j,r in enumerate(row[:4]): + starts[row[-1]].append((r,4*k+j)) + for t in range(min(starts),EVENTS): + if t%128==0 and monotonic()>=deadline: + raise TimeoutError('guarded suffix cap') + for r,i in starts.get(t,()): + values[r][i]=Q(1) + op,d,*a=word['program'][t] + if op=='ADD': + add(values[d],values[a[0]],Q(a[1])) + elif op=='COPY': + for j,v in values[d].items(): + columns[j][n+t]=v + values[d]={j:Q(a[1])*v for j,v in values[a[0]].items()} + elif op=='SCALE': + values[d]={j:Q(a[0])*v for j,v in values[d].items()} + elif op in ('INIT','CLEAR'): + values[d]={} + else: + assert op=='MOVE' + for r,row in enumerate(values[:n]): + for j,v in row.items(): + columns[j][r]=v + return columns + + +def local_basis(roles,a,b): + a=[Q(a.get(r,'0')) for r in roles] + b=[Q(b.get(r,'0')) for r in roles] + d=1-sum(x*y for x,y in zip(a,b,strict=True)) + rows=[[Q(i==j)-b[i]*a[j] for j in range(len(roles))] for i in range(len(roles))] + rows[0],rows[1]=rows[1],rows[0] + return d,[[str(q) for q in row] for row in rows] + + +def controls(engine): + roles=(2,3,7,8) + a,b={2:'1',3:'-1'},{2:'1',3:'-1'} + assert local_basis(roles,a,b)==(Q(-1),[['1','0','0','0'],['0','1','0','0'],['0','0','1','0'],['0','0','0','1']]) + assert local_basis(roles,{2:'1'},{2:'1'})[0]==0 + assert engine['exact_span']([(2,({2:1},1)),(3,({3:1},1)),(7,({7:1},1)),(8,({8:1},1))],direction(roles))['status']=='exact_span' + return ['four-role bare exchange control','rank-one determinant zero control','exact four-row membership'] + + +def main(): + assert __debug__ + cli=ArgumentParser(description=__doc__) + cli.add_argument('mode',choices=('prefix','suffix','controls')) + cli.add_argument('--root',type=Path,default=ROOT) + cli.add_argument('--prefix-sha') + args=cli.parse_args() + checked(args.root,'inputs/reverse_span.py') + engine=run_path(str(args.root/'inputs/reverse_span.py')) + tests=controls(engine) + if args.mode=='controls': + print(dumps(tests));return + prior=loads(checked(args.root,'lead/GEOMETRY.json'),object_pairs_hook=engine['unique']) + checked(args.root,'lead/PRICE.json') + all_keys=selection(prior) + chosen=all_keys[:8] + pending=all_keys[8:] + limit=25 + if args.mode=='suffix': + assert args.prefix_sha is not None + pre=loads(checked(args.root,'lead/PREFIX.json',args.prefix_sha),object_pairs_hook=engine['unique']) + assert pre['mode']=='prefix' and pre['pins']==PINS + positive=[r for r in pre['rows'] if r['proof']['status']=='exact_span'] + chosen=[r['key'] for r in positive[:4]] + pending=[r['key'] for r in positive[4:]] + assert chosen + limit=35 + def stop(*_): + raise TimeoutError('hard exact support cap') + signal(SIGALRM,stop) + alarm(limit) + deadline=monotonic()+limit-1 + result={'mode':args.mode,'pins':PINS,'controls':tests,'selected':chosen,'unvisited':pending,'runner_cap':limit} + rows=[] + try: + raw=decompress(checked(args.root,'inputs/7334-WORD.json.gz')) + assert sha256(raw).hexdigest()==PAYLOAD + word=loads(raw,object_pairs_hook=engine['unique']) + assert len(word['program'])==EVENTS + if args.mode=='prefix': + rows=[{'key':r,'proof':proof} for r,proof in prefix(word,chosen,engine,deadline)] + else: + cols=suffix(word,chosen,deadline) + for k,r in enumerate(chosen): + bank=[(role,to_int(cols[4*k+j])) for j,role in enumerate(r[:4])] + proof=engine['exact_span'](bank,direction(r[:4])) + row={'key':r,'proof':proof} + if proof['status']=='exact_span': + a=positive[k]['proof']['coefficients'] + b=proof['coefficients'] + det,L=local_basis(r[:4],a,b) + row|={'det':str(det),'L':L,'basis_status':'exact normalized support' if det else 'singular chosen witness'} + rows.append(row) + except TimeoutError as e: + result|={'timeout':str(e),'unvisited':pending+chosen[len(rows):]} + finally: + alarm(0) + result|={'rows':rows,'counts':Counter(r['proof']['status'] for r in rows)} + if args.prefix_sha: + result['prefix_sha256']=args.prefix_sha + print(dumps(result,indent=2,sort_keys=True)) + if 'timeout' in result: + raise SystemExit(2) + + +if __name__=='__main__': + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/geometry.py b/research/p104-four-role-endpoint-exchange-bound/lead/geometry.py new file mode 100644 index 0000000000..c562c7feaa --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/geometry.py @@ -0,0 +1,171 @@ +"""Exact four-role coframe and impulse geometry on the 20 inherited ranges.""" +from argparse import ArgumentParser +from collections import Counter,defaultdict +from fractions import Fraction as Q +from functools import cache +from gzip import decompress +from hashlib import sha256 +from json import dumps,loads +from pathlib import Path +from signal import SIGALRM,alarm,signal +from time import monotonic + +ROOT=Path(__file__).resolve().parents[1] +PINS={ + 'lead/PRICE.json':'e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22', + 'inputs/7334-WORD.json.gz':'4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a', +} +PAYLOAD='9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac' +HEAD='aaeec8c0acf01e99a5f331ef363a698d9c084ace' +CALLER='07a76c5e2738882c0cb322278e56f6cae3c9885d' +THIRD,FOURTH,EVENTS,RANGES,CUTS,SECONDS=1454,1251,76466,20,20455,20 + + +def unique(items): + d=dict(items) + if len(d)!=len(items): + raise ValueError('duplicate JSON key') + return d + + +def checked(root,name): + b=(root/name).read_bytes() + assert sha256(b).hexdigest()==PINS[name],('changed dependency',name) + return b + + +def freeze(root): + p=loads(checked(root,'lead/PRICE.json'),object_pairs_hook=unique) + assert p['head']==HEAD and p['caller']==CALLER + assert p['additional_roles']==[1454,1251] and p['extra_paid']==0 and p['compatible_edit_cap']==1 + assert p['raw_cuts']==CUTS and len(p['ranges'])==RANGES + return p + + +@cache +def q(x): + return Q(x) + + +def status(third_chart,chart,third_value): + if third_chart!=chart: + return 'no coframe' + return 'separator excludes' if not third_value else 'prefix pending' + + +def controls(): + assert status(2,3,Q(1))=='no coframe' + assert status(3,3,Q(0))=='separator excludes' + assert status(3,3,Q(-1,2))=='prefix pending' + return ['nonzero value on wrong chart ineligible','four zero donor responses exclude','nonzero fourth keeps key pending'] + + +def audit(word,price,deadline,progress): + n,m,tape=(word[k] for k in ('public','owned_fields','program')) + assert (n,m,len(tape))==(1501,68,EVENTS) + state=word['initial']+[None]*m + values=[Q(0)]*(n+m) + assert all((word['initial'][r],word['final'][r])==(3,245) for r in (THIRD,FOURTH)) + values[FOURTH],values[1481]=Q(1),Q(4) + fresh=set() + expected=price['ranges'] + wants=defaultdict(list) + for k,(_,_,_,lo,hi) in enumerate(expected): + for t in range(lo,hi+1): + wants[t].append(k) + records=[{'range':r,'counts':Counter(),'subranges':[]} for r in expected] + revision=0 + for t,e in enumerate(tape): + progress['first_unvisited_event']=t + if t%128==0 and monotonic()>=deadline: + raise TimeoutError('forward impulse cap') + for k in wants.get(t,()): + i,j,chart,_,_=expected[k] + assert i not in (THIRD,FOURTH,1481) and j==1481 + assert state[i]==state[j]==chart + coframed=state[THIRD]==state[FOURTH]==chart + if coframed: + assert values[i]==values[j]==values[THIRD]==0 + kind=status(chart if coframed else None,chart,values[FOURTH]) + r=records[k] + r['counts'][kind]+=1 + progress['raw_cuts_checked']+=1 + if kind!='no coframe': + sub=r['subranges'] + if sub and sub[-1]['last']+1==t and sub[-1]['revision']==revision: + assert sub[-1]['response']==str(values[FOURTH]) + sub[-1]['last']=t + else: + sub.append({'first':t,'last':t,'revision':revision,'response':str(values[FOURTH]),'status':kind}) + op,d,*args=e + if d in (THIRD,FOURTH) or op in ('ADD','COPY') and args[0] in (THIRD,FOURTH): + revision+=1 + if op=='MOVE': + a,b,owned=args + assert state[d]==a and owned==(d>=n) + state[d]=b + fresh.discard(d) + elif op=='INIT': + assert d>=n and state[d] is None + state[d],values[d]=args[0],Q(0) + fresh.add(d) + elif op=='CLEAR': + assert d>=n and state[d]==args[0] + state[d],values[d]=None,Q(0) + fresh.discard(d) + elif op=='SCALE': + assert state[d]==args[-1] + values[d]*=q(args[0]) + fresh.discard(d) + else: + assert op in ('ADD','COPY') + s,coefficient,chart=args + assert s!=d and state[s]==state[d]==chart + assert op!='COPY' or d>=n and d in fresh and values[d]==0 + values[d]=(values[d] if op=='ADD' else 0)+q(coefficient)*values[s] + fresh.discard(d) + progress['events']+=1 + assert not fresh and state==word['final']+[None]*m + progress['first_unvisited_event']=None + assert progress['raw_cuts_checked']==CUTS + assert all(sum(r['counts'].values())==r['range'][-1]-r['range'][-2]+1 for r in records) + return records + + +def main(): + assert __debug__ + cli=ArgumentParser(description=__doc__) + cli.add_argument('--root',type=Path,default=ROOT) + cli.add_argument('--controls-only',action='store_true') + args=cli.parse_args() + price=freeze(args.root) + tests=controls() + if args.controls_only: + print(dumps(tests));return + p=checked(args.root,'lead/PRICE.json') + def stop(*_): + raise TimeoutError('hard 20-second cap') + signal(SIGALRM,stop) + alarm(SECONDS) + progress={'events':0,'raw_cuts_checked':0} + result={'head':HEAD,'caller':CALLER,'controls':tests,'price_sha256':sha256(p).hexdigest(),'progress':progress} + try: + raw=decompress(checked(args.root,'inputs/7334-WORD.json.gz')) + assert sha256(raw).hexdigest()==PAYLOAD + rows=audit(loads(raw,object_pairs_hook=unique),price,monotonic()+SECONDS-1,progress) + counts=Counter() + for r in rows: + counts.update(r['counts']) + unresolved=[{'range':r['range'],'segment':s} for r in rows for s in r['subranges'] if s['status']=='prefix pending'] + result|={'rows':rows,'counts':counts,'unresolved':unresolved} + except TimeoutError as e: + result|={'timeout':str(e),'unresolved':'incomplete original raw cuts, no exclusion'} + finally: + alarm(0) + print(dumps(result,sort_keys=True,indent=2)) + if 'timeout' in result: + raise SystemExit(2) + + +if __name__=='__main__': + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/lead/price.py b/research/p104-four-role-endpoint-exchange-bound/lead/price.py new file mode 100644 index 0000000000..9ebcefe655 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/lead/price.py @@ -0,0 +1,91 @@ +"""Predecode paid, source-unit and fixed-tape reservation for a four-role basis.""" +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps,loads +from pathlib import Path + +ROOT=Path(__file__).resolve().parents[1] +PINS={ + 'inputs/R148-PRICE.json':'8b71d05eddb3aee641ffa41a57a3922292bc4d45c5eb8aae8f2e4514388f6524', + 'inputs/R143-GEOMETRY.json':'f2aa238ed8c49f0633c3837c6961bfba19482385851a5606578fa6368db79542', + 'inputs/7334-CALLER-RESULT.json':'7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194', + 'inputs/7113-independent.py':'21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874', + 'inputs/7113-fixed-tape.py':'e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb', + 'inputs/7334-WORD.json.gz':'4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a', +} + + +def unique(items): + d=dict(items) + assert len(d)==len(items) + return d + + +def raw(path): + b=(ROOT/path).read_bytes() + assert sha256(b).hexdigest()==PINS[path],path + return b + + +def doc(path): + return loads(raw(path),object_pairs_hook=unique) + + +def main(): + assert __debug__ + previous=doc('inputs/R148-PRICE.json') + geometry=doc('inputs/R143-GEOMETRY.json') + admission=doc('inputs/7334-CALLER-RESULT.json') + assert previous['head']==geometry['head']=='aaeec8c0acf01e99a5f331ef363a698d9c084ace' + assert previous['caller']==geometry['caller']=='07a76c5e2738882c0cb322278e56f6cae3c9885d' + assert previous['ranges']==geometry['ranges'] and geometry['raw_cuts']==20455 + assert previous['paid_delta']=={} and previous['productive_delta']=={'5':-17,'6':17,'8':17,'9':-17} + assert Q(previous['quote']['probe']['complete_one_margin'][0])>0 + assert Q(previous['quote']['old_crossing_upper']['complete_one_margin_with_extra_rank_one'][1])<0 + ordinary=raw('inputs/7113-independent.py') + tape_source=raw('inputs/7113-fixed-tape.py') + assert b'scalar+=4*(a.bit_length()+d.bit_length()+1+(a.bit_count()' in ordinary + assert b'scalar_services=32*' in tape_source and b'scalar_services*2**20' in tape_source + assert b'records_per_map=4*(b["ambient"]+1)**2' in tape_source + + partial=admission['checks']['ODD-ADMISSION-PARTIAL.json'] + tape=admission['checks']['ODD-FIXED-TAPE-COUNTS.json'] + assert (sum(partial['invoice']['P'].values()),sum(partial['invoice']['T'].values()),partial['invoice']['S'])==(110519,22461,1424) + assert tape['native_invocations']==17 and tape['max_scalar_numerator_bits']==24 + assert tape['native_sha256']=='9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac' + assert partial['ordinary']['conservative_total']==previous['ordinary_baseline']==782715464 + assert tape['context_c']==previous['context_c']==2430 + assert tape['monomial_map_slots']==298808 + den=1125*2**25 + den_bits=den.bit_length() + add,scale=4*(24+den_bits+1+24),4*(24+den_bits+1) + assert (add,scale)==(340,244) + # One rank-one basis recipe uses <=12 ADD and <=4 SCALE. Reserve a + # second such recipe for return work if the exact normalized identity allows it. + adds,scales,wraps=24,8,4 + native=17 + charged=native*(adds*add+scales*scale+1000*wraps) + ordinary_upper=partial['ordinary']['conservative_total']+charged + assert ordinary_upper<10**9 + macro_delta=native*(adds+scales) + service_delta=32*macro_delta + map_delta=native*wraps + map_upper=tape['monomial_map_slots']+map_delta + print(dumps({'head':previous['head'],'caller':previous['caller'],'pins':PINS,'quote':previous['quote'], + 'ranges':geometry['ranges'],'raw_cuts':geometry['raw_cuts'],'additional_roles':[1454,1251], + 'paid':110519,'productive':22461,'surplus':1424,'extra_paid':0,'compatible_edit_cap':1, + 'ordinary':{'max_adds_per_native':adds,'max_scales_per_native':scales,'reserved_monomial_maps_per_native':wraps, + 'coefficient_denominator_divides':den,'numerator_bits':24,'add_unit_upper':add,'scale_unit_upper':scale, + 'charged_source_units':charged,'complete_upper':ordinary_upper,'headroom':10**9-ordinary_upper}, + 'tape':{'scalar_macro_delta':macro_delta,'scalar_services_delta':service_delta, + 'scalar_services_upper':tape['scalar_services_upper']+service_delta, + 'scalar_steps_coefficient_upper':tape['scalar_steps_coefficient']+service_delta*2**20, + 'monomial_map_slots_upper':map_upper,'elementary_records_upper':map_upper*tape['elementary_records_per_map_upper'], + 'baseline_context_c':tape['context_c'],'context_cap':4096,'native_grid_baseline':[1125,25], + 'condition':'Recompute actual grid, context, complete tape and all physical wrappers before any candidate. Scope retains owned and external lanes.'}, + 'caps':{'events':76466,'ranges':20,'raw_cuts':20455,'geometry_seconds':20, + 'prefix_keys':8,'prefix_seconds':25,'suffix_keys':4,'suffix_seconds':35}},indent=2,sort_keys=True)) + + +if __name__=='__main__': + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/receipts/ARCHIVED-CHECK.json b/research/p104-four-role-endpoint-exchange-bound/receipts/ARCHIVED-CHECK.json new file mode 100644 index 0000000000..88a6e2ffe2 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/receipts/ARCHIVED-CHECK.json @@ -0,0 +1,176 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "cap_reached": false, + "cap_seconds": 25, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "input_receipt_sha256": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d", + "mode": "archived", + "pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d" + }, + "raw_cuts_checked": 16016, + "rows": [ + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 51765 + ], + "raw_cuts": 6049, + "target": "-1", + "zero_raw_cuts": 6049 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45716 + ], + "raw_cuts": 2, + "target": "-1", + "zero_raw_cuts": 2 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45714 + ], + "raw_cuts": 492, + "target": "-1", + "zero_raw_cuts": 492 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "-1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 232, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "-1", + "zero_raw_cuts": 1 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 50011 + ], + "raw_cuts": 4789, + "target": "1", + "zero_raw_cuts": 4789 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 49902 + ], + "raw_cuts": 4036, + "target": "-1", + "zero_raw_cuts": 4036 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45866 + ], + "raw_cuts": 644, + "target": "-1", + "zero_raw_cuts": 644 + } + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/receipts/CONTINUATION.json b/research/p104-four-role-endpoint-exchange-bound/receipts/CONTINUATION.json new file mode 100644 index 0000000000..11e34b92c5 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/receipts/CONTINUATION.json @@ -0,0 +1,271 @@ +{ + "basis_sha256": "3ff8748c0bcbcceea120265f87d92263cccd17343ef504efbe3b401ca05e4f0b", + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "cap_seconds": 25, + "controls": [ + "four-role bare exchange control", + "rank-one determinant zero control", + "exact four-row membership" + ], + "counts": { + "exact_rank_exclusion": 7 + }, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "inherited_pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/reverse_span.py": "f8b48f2ed99d003e20f5b3fb2270603c4edbc3ce9a01484102816aa2710ce9ff", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PRICE.json": "e3f24ce27460372e8821bf9fcda50c40d14a776a06569182b7dd44da1c3e8c22" + }, + "original_prefix_exclusions": 8, + "prior_prefix_sha256": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d", + "results": [ + { + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 996, + "residual_integer_row": { + "533": -1, + "996": 1 + }, + "separated_target": "1", + "separating_covector": { + "996": "1", + "1340": "-2/3" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "438": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 996, + "residual_integer_row": { + "533": -1, + "996": 1 + }, + "separated_target": "1", + "separating_covector": { + "996": "1", + "1340": "-2/3" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 1195, + "residual_integer_row": { + "533": -1, + "1195": 1 + }, + "separated_target": "1", + "separating_covector": { + "1195": "1", + "1331": "-1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 533, + "residual_integer_row": { + "73": -1, + "74": -1, + "83": -1, + "84": -1, + "438": 1, + "533": -1 + }, + "separated_target": "-1", + "separating_covector": { + "533": "1", + "1481": "1" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 996, + "residual_integer_row": { + "73": -1, + "74": -1, + "83": -1, + "84": -1, + "533": -1, + "996": 1 + }, + "separated_target": "1", + "separating_covector": { + "996": "1", + "1340": "-2/3" + }, + "status": "exact_rank_exclusion" + } + }, + { + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "proof": { + "augmented_rank": 5, + "donor_rank": 4, + "missing_reverse_pivot": 1195, + "residual_integer_row": { + "73": -1, + "74": -1, + "83": -1, + "84": -1, + "533": -1, + "1195": 1 + }, + "separated_target": "1", + "separating_covector": { + "1195": "1", + "1331": "-1" + }, + "status": "exact_rank_exclusion" + } + } + ], + "selected": [ + [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ] + ], + "still_unvisited": [], + "timeout": null +} diff --git a/research/p104-four-role-endpoint-exchange-bound/receipts/PER-CASE-CHECK.json b/research/p104-four-role-endpoint-exchange-bound/receipts/PER-CASE-CHECK.json new file mode 100644 index 0000000000..fc126b8988 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/receipts/PER-CASE-CHECK.json @@ -0,0 +1,156 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "cap_reached": false, + "cap_seconds": 25, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "input_receipt_sha256": "e1f1a69526fac421560ca60b7ac304680e2e6cb2f62c74896a1fb96432ade190", + "mode": "per-case", + "pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d" + }, + "raw_cuts_checked": 478, + "rows": [ + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + "raw_cuts": 466, + "target": "1", + "zero_raw_cuts": 466 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "-1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "-1", + "zero_raw_cuts": 1 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "1", + "zero_raw_cuts": 1 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "1", + "zero_raw_cuts": 1 + } + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED-CHECK.json b/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED-CHECK.json new file mode 100644 index 0000000000..30324226bf --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED-CHECK.json @@ -0,0 +1,156 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "cap_reached": false, + "cap_seconds": 25, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "input_receipt_sha256": "6bd15c77fdad955beaca12519b82561e44ab2560ba95cbe74fb1e057e6b50d2d", + "mode": "shared", + "pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d" + }, + "raw_cuts_checked": 478, + "rows": [ + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + "raw_cuts": 466, + "target": "-1", + "zero_raw_cuts": 466 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "-1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "-1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "raw_cuts": 3, + "target": "-1", + "zero_raw_cuts": 3 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "-1", + "zero_raw_cuts": 1 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "-1", + "zero_raw_cuts": 1 + }, + { + "at_representative": [ + "0", + "0", + "0", + "0" + ], + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "raw_cuts": 1, + "target": "-1", + "zero_raw_cuts": 1 + } + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED.json b/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED.json new file mode 100644 index 0000000000..29db0457a6 --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/receipts/SHARED.json @@ -0,0 +1,169 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "cap_reached": false, + "cap_seconds": 25, + "cut_coverage": 478, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "method": "one archived exact direction, forward sweep", + "pins": { + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d" + }, + "rows": [ + { + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45688 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45222 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 438, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 996, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + }, + { + "decision": "excluded", + "key": [ + 1195, + 1481, + 1454, + 1251, + 245, + 45219 + ], + "rows": [ + "0", + "0", + "0", + "0" + ], + "target": "-1", + "witness": { + "1481": "1", + "533": "1" + } + } + ] +} diff --git a/research/p104-four-role-endpoint-exchange-bound/replay.py b/research/p104-four-role-endpoint-exchange-bound/replay.py new file mode 100644 index 0000000000..d0e4ada28a --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/replay.py @@ -0,0 +1,101 @@ +"""Reproduce the priced four-role P104 prefix exclusion and both workflow arms.""" +from hashlib import sha256 +from json import dump, loads +from pathlib import Path +from subprocess import PIPE, run +from sys import executable, implementation, version_info +from tempfile import TemporaryDirectory + +ROOT = Path(__file__).resolve().parent +STAGES = ( + ("lead/price.py", (), "lead/PRICE.json"), + ("lead/geometry.py", (), "lead/GEOMETRY.json"), + ("lead/basis.py", ("prefix",), "lead/PREFIX.json"), + ("continue_prefix.py", (), "receipts/CONTINUATION.json"), + ("trial/shared.py", (), "receipts/SHARED.json"), + ("trial/verify.py", ("archived", "lead/PREFIX.json"), "receipts/ARCHIVED-CHECK.json"), + ("trial/verify.py", ("per-case", "receipts/CONTINUATION.json"), "receipts/PER-CASE-CHECK.json"), + ("trial/verify.py", ("shared", "receipts/SHARED.json"), "receipts/SHARED-CHECK.json"), +) + + +def unique(pairs): + result = dict(pairs) + if len(result) != len(pairs): + raise ValueError("duplicate JSON key") + return result + + +def decode(raw): + return loads(raw, object_pairs_hook=unique) + + +def execute(script, args): + return run([executable, "-I", "-B", str(ROOT / script), *args], + cwd=ROOT, stdout=PIPE, stderr=PIPE, timeout=35) + + +def compare(receipts): + archived, current, shared = (receipts[f"receipts/{arm}-CHECK.json"] + for arm in ("ARCHIVED", "PER-CASE", "SHARED")) + for result, count, cuts in ((archived, 8, 16016), (current, 7, 478), (shared, 7, 478)): + assert not result["cap_reached"] + assert len(result["rows"]) == count and result["raw_cuts_checked"] == cuts + for row in result["rows"]: + assert row["decision"] == "excluded" and row["zero_raw_cuts"] == row["raw_cuts"] + archive_keys, current_keys, shared_keys = ( + [row["key"] for row in result["rows"]] for result in (archived, current, shared) + ) + assert current_keys == shared_keys + assert not set(map(tuple, archive_keys)).intersection(map(tuple, current_keys)) + assert archive_keys + current_keys == ( + receipts["lead/PREFIX.json"]["selected"] + receipts["lead/PREFIX.json"]["unvisited"] + ) + assert len(receipts["lead/GEOMETRY.json"]["unresolved"]) == 15 + + +def negative_controls(receipt): + try: + decode('{"inputs/word": 1, "inputs/word": 2}') + except ValueError: + pass + else: + raise AssertionError("duplicate dependency key was accepted") + + with TemporaryDirectory(prefix="p104-four-role-negative-") as folder: + wrong = Path(folder) / "WRONG.json" + # This direction still separates the target, but leaks into a donor bank. + proof = receipt["results"][0]["proof"] + proof["separating_covector"] = {"1251": "1", "1481": "4"} + proof["separated_target"] = "-4" + with wrong.open("w") as f: + dump(receipt, f) + result = execute("trial/verify.py", ("per-case", str(wrong))) + assert result.returncode == 1 and b"assert zeros == len(obs)" in result.stderr + + +def main(): + assert __debug__ and implementation.name == "cpython" and version_info[:2] == (3, 12) + pins = decode((ROOT / "LOCAL-PINS.json").read_bytes()) + for path, expected in sorted(pins.items()): + file = (ROOT / path).resolve() + assert file.is_relative_to(ROOT) and file.is_file(), path + assert sha256(file.read_bytes()).hexdigest() == expected, ("changed dependency", path) + expected_files = {path for script, _, receipt in STAGES for path in (script, receipt)} + assert expected_files <= pins.keys() + receipts = {} + for script, args, receipt in STAGES: + result = execute(script, args) + assert result.returncode == 0, (script, result.returncode, result.stderr.decode()) + assert result.stdout == (ROOT / receipt).read_bytes(), ("changed receipt", receipt) + receipts[receipt] = decode(result.stdout) + compare(receipts) + negative_controls(receipts["receipts/CONTINUATION.json"]) + print('{"archived_representatives":8,"fresh_representatives":7,"raw_cuts_checked":16494,' + '"ineligible_raw_cuts":3961,"unresolved_representatives":0,"kappa_delta":"0",' + '"matched_workflow_trial":"inconclusive","negative_controls":2}') + print("PASS_P104_FOUR_ROLE_ENDPOINT_EXCHANGE_BOUND") + + +if __name__ == "__main__": + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/trial/scope.py b/research/p104-four-role-endpoint-exchange-bound/trial/scope.py new file mode 100644 index 0000000000..a055eb328e --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/trial/scope.py @@ -0,0 +1,74 @@ +"""Authenticate the frozen four-role prefix representatives.""" +from gzip import decompress +from hashlib import sha256 +from json import loads +from pathlib import Path +from signal import SIGALRM, alarm, signal + +ROOT = Path(__file__).resolve().parents[1] +PINS = { + "lead/PREFIX.json": "6525f616502fe23c155e5c96138e85142401c8fdfddc266c6aa1ced64299da8d", + "lead/GEOMETRY.json": "a089e2663b2069b39d4971670dc980f38ed3d3411fdabed3a4ac24167ae12239", + "inputs/7334-WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", +} +PAYLOAD = "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac" +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +CALLER = "07a76c5e2738882c0cb322278e56f6cae3c9885d" +FIXED = {"533": "1", "1481": "1"} +CAP = 25 + + +def unique(pairs): + out = dict(pairs) + if len(out) != len(pairs): + raise ValueError("duplicate JSON key") + return out + + +def load(raw): + return loads(raw, object_pairs_hook=unique) + + +def start(): + def stop(*_): + raise TimeoutError("25-second replay cap") + + signal(SIGALRM, stop) + alarm(CAP) + + +def inputs(archived=False): + files = {} + for path, digest in PINS.items(): + raw = (ROOT / path).read_bytes() + if sha256(raw).hexdigest() != digest: + raise ValueError(f"changed dependency {path}") + files[path] = raw + old = load(files["lead/PREFIX.json"]) + keys = [tuple(k) for k in old["selected" if archived else "unvisited"]] + assert len(keys) == len(set(keys)) == (8 if archived else 7) + assert old["counts"] == {"exact_rank_exclusion": 8} + witnesses = [row["proof"]["separating_covector"] for row in old["rows"]] + assert witnesses.count(FIXED) == 7 + geo = load(files["lead/GEOMETRY.json"]) + assert (geo["head"], geo["caller"]) == (HEAD, CALLER) + cuts = {} + for x in geo["unresolved"]: + first_role, last_role, chart, lo, hi = x["range"] + assert (lo, hi) == (x["segment"]["first"], x["segment"]["last"]) + key = (first_role, last_role, 1454, 1251, chart, hi) + assert key not in cuts + cuts[key] = (lo, hi) + cuts = {key: cuts[key] for key in keys} + assert sum(hi - lo + 1 for lo, hi in cuts.values()) == (16016 if archived else 478) + raw = decompress(files["inputs/7334-WORD.json.gz"]) + assert sha256(raw).hexdigest() == PAYLOAD + word = load(raw) + assert (word["public"], word["owned_fields"], len(word["program"])) == (1501, 68, 76466) + for key, (lo, hi) in cuts.items(): + roles = set(key[:4]) + for op, dst, *args in word["program"][lo:hi]: + # A cut is before its event. The event at hi belongs to the next state. + assert dst not in roles + assert op not in ("ADD", "COPY") or args[0] not in roles + return keys, cuts, word diff --git a/research/p104-four-role-endpoint-exchange-bound/trial/shared.py b/research/p104-four-role-endpoint-exchange-bound/trial/shared.py new file mode 100644 index 0000000000..a6bcaf9dac --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/trial/shared.py @@ -0,0 +1,88 @@ +"""Try one previously certified exact direction in one literal sweep.""" +from collections import defaultdict +from fractions import Fraction +from functools import cache +from json import dumps +from pathlib import Path +from runpy import run_path +from signal import alarm + +SCOPE = run_path(str(Path(__file__).with_name("scope.py"))) +Q = cache(Fraction) + + +def walk(word, keys, rows): + charts = word["initial"] + [None] * word["owned_fields"] + n = word["public"] + x = {int(r): Q(v) for r, v in SCOPE["FIXED"].items()} + state = [x.get(r, 0) for r in range(len(charts))] + fresh = set() + cuts = defaultdict(list) + for k in keys: + cuts[k[-1]].append(k) + end = max(cuts) + tape = word["program"] + for t in range(end + 1): + for k in cuts.get(t, ()): + assert all(charts[r] == k[4] for r in k[:4]) + y = [state[r] for r in k[:4]] + target = x.get(k[0], 0) - x.get(k[1], 0) + assert target == -1 + rows.append({ + "key": k, "decision": "unresolved" if any(y) else "excluded", + "witness": SCOPE["FIXED"], "rows": list(map(str, y)), + "target": str(target), + }) + if t == end: + break + op, d, *args = tape[t] + if op == "MOVE": + a, b, owned = args + assert charts[d] == a and owned == (d >= n) + charts[d] = b + elif op == "INIT": + assert d >= n and charts[d] is None + charts[d], state[d] = args[0], 0 + fresh.add(d) + continue + elif op == "CLEAR": + assert d >= n and charts[d] == args[0] + charts[d], state[d] = None, 0 + elif op == "SCALE": + assert charts[d] == args[1] + state[d] *= Q(args[0]) + else: + s, coef, chart = args + assert op in ("COPY", "ADD") and s != d and charts[d] == charts[s] == chart + if op == "COPY": + assert d >= n and d in fresh and not state[d] + state[d] += Q(coef) * state[s] + fresh.discard(d) + + +def main(): + assert __debug__ + SCOPE["start"]() + keys, cuts, word = SCOPE["inputs"]() + rows = [] + capped = False + try: + walk(word, keys, rows) + except TimeoutError: + capped = True + finally: + alarm(0) + resolved = {tuple(x["key"]): x for x in rows} + print(dumps({ + "head": SCOPE["HEAD"], "caller": SCOPE["CALLER"], + "method": "one archived exact direction, forward sweep", "cap_seconds": SCOPE["CAP"], + "pins": SCOPE["PINS"], "cut_coverage": sum(b-a+1 for a,b in cuts.values()), + "rows": [resolved.get(k, {"key": k, "decision": "unresolved"}) for k in keys], + "cap_reached": capped, + }, sort_keys=True, indent=2)) + if capped: + raise SystemExit(2) + + +if __name__ == "__main__": + main() diff --git a/research/p104-four-role-endpoint-exchange-bound/trial/verify.py b/research/p104-four-role-endpoint-exchange-bound/trial/verify.py new file mode 100644 index 0000000000..0eef51e3ac --- /dev/null +++ b/research/p104-four-role-endpoint-exchange-bound/trial/verify.py @@ -0,0 +1,141 @@ +"""Independently replay either prefix arm on all exact raw cuts.""" +from argparse import ArgumentParser +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps +from pathlib import Path +from runpy import run_path +from signal import alarm + +SCOPE = run_path(str(Path(__file__).with_name("scope.py"))) + + +def forward(word, cut_checks, seed): + n = word["public"] + owned = {} + chart = dict(enumerate(word["initial"])) + # Sparse values are evaluated on one literal input at a time. + values = dict(seed) + observed = {} + last = max(cut_checks) + for t, event in enumerate(word["program"]): + if t in cut_checks: + bank, level = cut_checks[t] + assert all(chart[r] == level for r in bank) + observed[t] = [values.get(r, Q(0)) for r in bank] + if t == last: + return observed + op, d, *arg = event + if op == "INIT": + assert d >= n and d not in owned and d not in chart + owned[d] = True + chart[d] = arg[0] + values.pop(d, None) + continue + if op == "CLEAR": + assert d >= n and d in owned and chart[d] == arg[0] + del owned[d], chart[d] + values.pop(d, None) + continue + if op == "MOVE": + assert chart[d] == arg[0] and arg[2] == (d >= n) + chart[d] = arg[1] + elif op == "SCALE": + assert chart[d] == arg[1] + if d in values: + values[d] *= Q(arg[0]) + elif op in ("ADD", "COPY"): + s, coefficient, level = arg + assert s != d and chart[d] == chart[s] == level + if op == "COPY": + assert owned.get(d) is True and not values.get(d) + value = values.get(d, 0) + Q(coefficient) * values.get(s, 0) + if value: + values[d] = value + else: + values.pop(d, None) + else: + raise ValueError(f"unknown operation {op}") + if d in owned: + owned[d] = False + raise ValueError("missing frozen cut") + + +def records(raw, mode): + doc = SCOPE["load"](raw) + if mode == "archived": + assert sha256(raw).hexdigest() == SCOPE["PINS"]["lead/PREFIX.json"] + else: + assert (doc["head"], doc["caller"]) == (SCOPE["HEAD"], SCOPE["CALLER"]) + if mode in ("per-case", "archived"): + rows = doc["rows" if mode == "archived" else "results"] + return { + tuple(r["key"]): ( + "excluded", r["proof"]["separating_covector"], r["proof"]["separated_target"] + ) if r["proof"]["status"] == "exact_rank_exclusion" else ("unresolved", None, None) + for r in rows + }, len(rows) + rows = doc["rows"] + return { + tuple(r["key"]): ( + r["decision"], r.get("witness"), r.get("target") + ) for r in rows + }, len(rows) + + +def main(): + assert __debug__ + p = ArgumentParser(description=__doc__) + p.add_argument("mode", choices=("per-case", "shared", "archived")) + p.add_argument("receipt", type=Path) + args = p.parse_args() + SCOPE["start"]() + keys, cuts, word = SCOPE["inputs"](archived=args.mode == "archived") + raw = args.receipt.read_bytes() + expected, rows_count = records(raw, args.mode) + assert len(expected) == rows_count + assert set(expected).issubset(keys) + if args.mode in ("shared", "archived"): + assert set(expected) == set(keys) + result = [] + capped = False + try: + for key in keys: + decision, witness, target = expected.get(key, ("unresolved", None, None)) + if witness is None: + assert decision == "unresolved" + result.append({"key": key, "decision": "unresolved", "raw_cuts": 0}) + continue + x = {int(r): Q(v) for r,v in witness.items()} + assert x and all(0 <= r < word["public"] and v for r,v in x.items()) + d = x.get(key[0], 0) - x.get(key[1], 0) + assert d and d == Q(target) + lo, hi = cuts[key] + obs = forward(word, {t: (key[:4], key[4]) for t in range(lo, hi+1)}, x) + assert len(obs) == hi - lo + 1 + zeros = sum(not any(v) for v in obs.values()) + if decision == "excluded": + assert zeros == len(obs) + else: + assert decision == "unresolved" and any(obs[hi]) + result.append({"key": key, "decision": decision, "raw_cuts": len(obs), + "zero_raw_cuts": zeros, "at_representative": list(map(str, obs[hi])), + "target": str(d)}) + except TimeoutError: + capped = True + finally: + alarm(0) + result.extend({"key": k, "decision": "unresolved", "raw_cuts": 0} for k in keys[len(result):]) + print(dumps({ + "head": SCOPE["HEAD"], "caller": SCOPE["CALLER"], "mode": args.mode, + "input_receipt_sha256": sha256(raw).hexdigest(), "pins": SCOPE["PINS"], + "cap_seconds": SCOPE["CAP"], "cap_reached": capped, + "raw_cuts_checked": sum(r["raw_cuts"] for r in result), + "rows": result, + }, indent=2, sort_keys=True)) + if capped: + raise SystemExit(2) + + +if __name__ == "__main__": + main()