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-type-b-odd-odd-idle-bound/LOCAL-PINS.json b/research/p104-type-b-odd-odd-idle-bound/LOCAL-PINS.json new file mode 100644 index 0000000000..395e30e56b --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/LOCAL-PINS.json @@ -0,0 +1,20 @@ +{ + "PROVENANCE.json": "89fb633a96b292c2a60b79138b902d848a64d8832b39c883bc14ba077d5cdf64", + "engines/contact_sets.py": "6c9d652ef9a1b47fce97a35afb3c8ce413696bbc1bd30e0b1e2b64b0cab94c6a", + "engines/projectors.py": "4230f570ee34df25d99786a784c09e700e5b73e31b79c3a0fac31dbb425a205b", + "engines/quote.py": "570b1a899cfe4e0d7bd8fa434636ecb252bdf6446bd4d6781fcaa2944dd374ca", + "inputs/7113-CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/7295-CERTIFICATE.json": "0587aeb7029b6e066f73701748075f7786056894bf8803690f66cf223bfa6d8c", + "inputs/7295-PROVENANCE.json": "fe28d47df369365523aaafd4d26e506fe2cdc2905c5962626a618eb612294fb0", + "inputs/7295-trace_and_price.py": "feebbca6d093d92f4e165b4aa940fb0628e5deaa4635488c9916aafe08aebc76", + "inputs/7357-SHA256.json": "877af2f9d65e0457e74f843a6ede78571ffdf9d57e7565d383c3c4d6be91d54c", + "inputs/ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "inputs/FROZEN-PLAN.md": "19bf92a34c8857ff569b4634a69a1e40a2a48f49eb41f03aea3c72d96286f7cd", + "inputs/R85-PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262", + "inputs/direct_impulse.py": "d04426aed9528aedc6400d384d7fd13c6531e5e3e6592a7eea4faee46c61e004", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "receipts/CONTACT-SETS.json": "52ec9535058018cc5ce25eb1194a80a6bbeeae03fe598f15125415bd8ca7668b", + "receipts/PRIMARY.json": "5ee2e636b438a569b29597cadc58b44b0b9205f39e52cf71ceb96ae9301b893f", + "receipts/SHA256.json": "fe2dc40405be33fd243b68bfdc7f73c1ad96640bed8722723be62c08956bf37e", + "replay.py": "471534f4510a3413ad9ac768e6d37dd40bad4eb610515426f78729053cf52ef5" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/NOTICE b/research/p104-type-b-odd-odd-idle-bound/NOTICE new file mode 100644 index 0000000000..6c064875c0 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/NOTICE @@ -0,0 +1,3 @@ +Apache-2.0. + +#7334 and #7113 supply the signed comparator and caller. #7295 supplies the exact backward contact trace and rank-additive price bound. #7357 supplies the idle stock, current complete price receipt and direct impulse routines. #7315 supplies the derivative method, #7356/#7360/#7380 related caller scopes, and #7298 directed arithmetic. OpenAI Codex and subagents materially assisted. diff --git a/research/p104-type-b-odd-odd-idle-bound/PROOF.md b/research/p104-type-b-odd-odd-idle-bound/PROOF.md new file mode 100644 index 0000000000..64d0006655 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/PROOF.md @@ -0,0 +1,9 @@ +# Stage derivatives for distinct-mask odd idle unions + +Fix the exact signed #7113 caller. Work on a Type B port’s 36 logical roles. At q=+1 and all independent body multipliers b_j=1, every old idle is identity. Let P_t be the projector on the original active slot at clock t, transported to the initial role basis by the specialized invertible prefix. Varying b_j at its unit value for the odd singleton of stage j inserts P_t in the normalized endpoint derivative. Thus moving stage j from removed clock t to retained clock u changes the normalized derivative by P_u−P_t. The stage originally in the retained slot contributes the same term on both sides. The full prefix engine reconstructs this statement with rational columns and adjoints and checks the original specialized endpoint on every basis vector. + +The independent [#7295](https://github.com/CrocSwap/integer-mult-bounds/pull/7295) backward contact trace names logical axes through literal SWAPs, and its pinned certificate identifies all four broad odd slots. Each has a full-caller contact window and no non-idle contact. This preserves its untouched axis as a direct summand at the chosen specialization. The four distinct local axes 32, 33, 34 and 35 yield projectors E32, E33, E34 and E35. Stage 8 uses E32 and E33. Stage 9 uses E34 and E35. The replay independently reconstructs the four exact contact windows and aligns the axes and masks with the frozen price. + +For any schedule of disjoint pairs, consider a stage with a removed slot. The moved stage terms are the coordinate projector sums over the retained axes minus the sums over the removed axes. These sets have equal nonzero cardinality and are disjoint. Each slot belongs to only one pair, and the four axes are distinct. Therefore at least one diagonal entry is nonzero. The case split covers each of four cross-mask pairs in both orientations and the two disjoint pairings in all four orientations. Both exact engines agree on all 16 keyed signed witnesses. The q=+1 derivative is a necessary arbitrary-input identity, so this closes the scoped schedules before physical lowering. + +A pair would contribute q^(−2)=q² in a true signed union. At q=±i this equals −1. The rank-16 price grants a full-width parity implementation without additional paid rank. The rank-18 price charges two sign coordinates. Neither quote supplies a new provider. The exclusion applies in both cases if the proposal uses one common projected role. A provider with separate projected returns or changes elsewhere in the caller needs a separate proof and complete invoice. diff --git a/research/p104-type-b-odd-odd-idle-bound/PROVENANCE.json b/research/p104-type-b-odd-odd-idle-bound/PROVENANCE.json new file mode 100644 index 0000000000..26b30f8e9f --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/PROVENANCE.json @@ -0,0 +1,73 @@ +{ + "caller": { + "head": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "pr": 7113 + }, + "comparator": { + "admission": "inputs/ADMITTED.json", + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "independent_public_receipt_pr": 7338, + "kappa": "0.00364665195644", + "pr": 7334 + }, + "derived_inputs": { + "inputs/R85-PRICE.json": { + "key": "PRICE.json", + "manifest": "inputs/7357-SHA256.json", + "role": "Reproduced complete current signed invoice and odd idle stock." + } + }, + "public_inputs": { + "inputs/7113-CALLER.json.gz": { + "git_blob": "9451ceaf6e8e037894680b549f3ef41c21b260d7", + "head": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "path": "research/signed-caller-8x9/expected/ODD-TYPE-AB-CALLER.json", + "payload": "gzip", + "pr": 7113, + "sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc" + }, + "inputs/7295-CERTIFICATE.json": { + "git_blob": "33c30a73ee3917323a650ee157557be2fb222726", + "head": "2505ac0772e0839e4ae5ef15a3dc2e782c51db9d", + "path": "research/p104-fixed-contact-idle-capacity/CERTIFICATE.json", + "pr": 7295, + "sha256": "0587aeb7029b6e066f73701748075f7786056894bf8803690f66cf223bfa6d8c" + }, + "inputs/7295-PROVENANCE.json": { + "git_blob": "4bf9c4bbe69ee31b8e721002f87dc57bebe161b4", + "head": "2505ac0772e0839e4ae5ef15a3dc2e782c51db9d", + "path": "research/p104-fixed-contact-idle-capacity/PROVENANCE.json", + "pr": 7295, + "sha256": "fe28d47df369365523aaafd4d26e506fe2cdc2905c5962626a618eb612294fb0" + }, + "inputs/7295-trace_and_price.py": { + "git_blob": "cdaecfb425bd754242fc816e0f12de00a1ee2509", + "head": "2505ac0772e0839e4ae5ef15a3dc2e782c51db9d", + "path": "research/p104-fixed-contact-idle-capacity/trace_and_price.py", + "pr": 7295, + "sha256": "feebbca6d093d92f4e165b4aa940fb0628e5deaa4635488c9916aafe08aebc76" + }, + "inputs/7357-SHA256.json": { + "git_blob": "da232d65c09203969358334906af2700a881a170", + "head": "b4902a36a1506ab87cbdee03c51345b179fb00a6", + "path": "research/p104-type-b-odd-even-idle-bound/receipts/SHA256.json", + "pr": 7357, + "sha256": "877af2f9d65e0457e74f843a6ede78571ffdf9d57e7565d383c3c4d6be91d54c" + }, + "inputs/direct_impulse.py": { + "git_blob": "14b5e8bb185788a111aab6a47f4b0728ce0820c9", + "head": "b4902a36a1506ab87cbdee03c51345b179fb00a6", + "path": "research/p104-type-b-odd-even-idle-bound/independent/direct_impulse.py", + "pr": 7357, + "sha256": "d04426aed9528aedc6400d384d7fd13c6531e5e3e6592a7eea4faee46c61e004" + }, + "inputs/pricing.py": { + "git_blob": "40ec194017bda1d524bba4f07b188c53281419d0", + "head": "c522451caf287bb3c16eaece72be4c263315dca4", + "path": "research/adjacent-owned-add-exchange-bound/pricing.py", + "pr": 7298, + "sha256": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182" + } + }, + "schema_version": 1 +} diff --git a/research/p104-type-b-odd-odd-idle-bound/README.md b/research/p104-type-b-odd-odd-idle-bound/README.md new file mode 100644 index 0000000000..c594da33d7 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/README.md @@ -0,0 +1,25 @@ +# Fixed-clock distinct-mask Type B odd-idle unions + +**NO VERIFIED GAIN.** Exact Δκ = 0 relative to conditional κ = 0.00364665195644 on independently replayed [#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334), head `aaeec8c0acf01e99a5f331ef363a698d9c084ace`, with signed [#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113), head `07a76c5e2738882c0cb322278e56f6cae3c9885d`. + +Pair one stage-8 odd idle at clock 1339 or 1340 with one stage-9 odd idle at clock 2970 or 2971. Keep a one-role union at either original clock and delete the other idle. The four pairs give eight single schedules and eight simultaneous disjoint-pair schedules. Exact transported projectors and a separate contact-based stage-set proof exclude all 16. Every original projected role is distinct, so simultaneous stage derivatives cannot cancel. The necessary test specializes q and all body variables to one. All other caller events stay fixed. [Proof](PROOF.md) + +The complete paid invoice removes 16 rank-nine positions and adds eight rank-18 positions per edit, across eight Type B ports with all 17 native copies unchanged. The one-edit optimistic upper is 0.360623245857322 raw and the two-edit upper is 0.721246491714643. Granting an unproved rank-16 provider, the corresponding whole upper is 32.2769060131216 raw. Both miss the fixed moonshot target. The verified saving is zero. [Verification and exact replay](VERIFICATION.md) + +## Replay + +Use CPython 3.12 with assertions enabled. From a clean checkout: + +```sh +python3.12 -I -B research/p104-type-b-odd-odd-idle-bound/replay.py +``` + +This authenticates the exact caller, regenerates the complete directed price and both exact support results, compares every signed witness and rejects four altered inputs. Use `--out fresh-directory` to retain the three deterministic receipts. [Source provenance](PROVENANCE.json) + +## Credit + +[#7295](https://github.com/CrocSwap/integer-mult-bounds/pull/7295) supplies the exact backward logical contact trace and earlier rank-additive price bound, which already covers the four odd/odd pairs as lane groups. [#7357](https://github.com/CrocSwap/integer-mult-bounds/pull/7357) supplies the literal idle census, complete current price input and exact impulse routines. [#7315](https://github.com/CrocSwap/integer-mult-bounds/pull/7315) supplies the derivative method. [#7356](https://github.com/CrocSwap/integer-mult-bounds/pull/7356), [#7360](https://github.com/CrocSwap/integer-mult-bounds/pull/7360) and [#7380](https://github.com/CrocSwap/integer-mult-bounds/pull/7380) cover phase transfers, same-mask squares and odd/even unions. [#7298](https://github.com/CrocSwap/integer-mult-bounds/pull/7298) supplies directed arithmetic. OpenAI Codex and subagents materially assisted. + +## Open next questions + +Can an exact two-role provider retain both original projected actions while lowering the total paid cost? Start by fixing one provider’s logical return contract and fully pricing its two outputs, parity, volume, ownership, routing and restoration. A common one-role projection already fails the frozen schedules. diff --git a/research/p104-type-b-odd-odd-idle-bound/SOURCES.json b/research/p104-type-b-odd-odd-idle-bound/SOURCES.json new file mode 100644 index 0000000000..e8c2f265cd --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-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-type-b-odd-odd-idle-bound/TASK.json b/research/p104-type-b-odd-odd-idle-bound/TASK.json new file mode 100644 index 0000000000..ef705fb400 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/TASK.json @@ -0,0 +1,84 @@ +{ + "actual_scope": "Fixed-clock unions of two Type B IDLE_ODD singleton masks {8} and {9} on exact #7113 with #7334 complete signed price. Four exact pairs, eight single and eight simultaneous disjoint schedules.", + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent audit and packaging.", + "author": "Signed Type B distinct odd-idle research", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "bottleneck_link": "Fusing two paid odd idles could reduce the binding signed complex paid moment if one physical return preserved both independent body derivatives.", + "budget_minutes": 9, + "evidence": "Primary exact projector replay and independent #7295 contact-set argument agree on all 16 keyed exclusions and their signed witnesses. No unresolved schedule within scope.", + "open_questions": [ + { + "blocked_by": "A single projected union at either original clock fails all 16 frozen schedules.", + "first_step": "Pin one exact signed provider contract and price both returns, phase parity, ownership and routing before a full endpoint test.", + "question": "Can a fully charged two-role provider preserve both distinct idle projectors?", + "why_it_matters": "A separate return for each body could avoid the one-role derivative obstruction." + } + ], + "original_card": { + "acceptance_gate": "A source-bound arbitrary-input identity and legal producer/consumer boundary with the complete paid and productive target invoice, including restoration, ownership, native alignment and extra charges. Price under the actual current model; historical ceiling.py assumptions must be established before use. A favorable optimistic relaxation keeps a route open but is not a completed supplier. A scoped local result remains useful; expansion requires the family-level budget gate.", + "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/qq16-caller-install/README.md", + "remaining": "Complete matched physical protocol bill, or changed source-compatible demand/circuit; no affordable supplier yet.", + "scope": "PR #4166: author-checked installed producer/service/return/bridge connection; native-component comparison loses.", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "0b082d22a0e9a442d264ab0633e35ef26c790630", + "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": "Choose an exact caller and a new demand/interface hypothesis. Read the scoped #5617/#5631/#5649/#5747 and #5720/#5745 objections before rebuilding an excluded schedule. Compare the complete matched source/consumer protocols including all retained helper outputs. For an active-mode injection, first check #5745: its canonical delivery claim repays the eight removed centre jobs. Audit that exact claim or change its channel/feedback hypothesis; do not repeat the same free-injection search. Stop if the full favorable budget fails or the required restored output is unobservable.", + "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": "joint-query-controller", + "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": [ + "query demand", + "active mode", + "5720", + "5745", + "5747", + "caller" + ], + "question": "Can a changed query demand or caller remove real work while satisfying native chronology and restoration?", + "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" + ] + }, + "outcome": "negative-result", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "Extend the fixed-role disjoint-mask derivative gate to two removed odd sign factors and possible simultaneous stage cancellation. #7295 supplies a rank-additive price relaxation, not exact support.", + "scope_status": "changed", + "stop_rule": "All four exact pairs and 16 single/double schedules, at most 20 runner seconds per exact engine. Full phase or physical replay only after a necessary survivor.", + "task_id": "joint-query-controller" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/VERIFICATION.md b/research/p104-type-b-odd-odd-idle-bound/VERIFICATION.md new file mode 100644 index 0000000000..68d89c3c20 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/VERIFICATION.md @@ -0,0 +1,9 @@ +# Verification record + +The package uses CPython 3.12 and the standard library. From a clean checkout run `python3.12 -I -B research/p104-type-b-odd-odd-idle-bound/replay.py`. Use `--out fresh-directory` to retain the full price and both proof receipts. The expected receipt hashes are in [SHA256.json](receipts/SHA256.json). Inputs and engines are authenticated by relative path. The caller's immutable compressed bytes and its public plaintext SHA256 and Git blob are checked separately. The reproduced #7357 price is bound to its exact public receipt manifest. + +Both scientific engines have a 20-second hard cap. They exhausted the four literal pairs and all 16 schedules, with zero unresolved. The independent certificate carries both the full contact windows and every moved stage’s removed and added role sets. Positive controls exercise a cancellation on one axis. Negative dependency controls change the prior price, rebuilt price, literal caller and prior certificate independently. The exact comparator admission retains the same five conditional framework assumptions. + +The result closes the fixed-clock one-role logical support gate. Full four-phase body verification and physical compiler, ownership, volume, routing, precision and tape checks were skipped because every schedule failed the necessary derivative test. + +Direct and relocated Git-free CPython 3.12.14 replays reproduced all three receipts byte for byte. The repository's registered command passed on an isolated canonical-source validation checkout. The primary and independent scientific runners took 0.06 and 0.05 seconds respectively. diff --git a/research/p104-type-b-odd-odd-idle-bound/VERIFY.json b/research/p104-type-b-odd-odd-idle-bound/VERIFY.json new file mode 100644 index 0000000000..0c89c3c4cd --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/replay.py" + ], + "checks": "Authenticate exact sources, regenerate the complete directed price and both exact proof receipts, compare 16 schedules and reject four changed dependencies.", + "timeout_seconds": 90 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/engines/contact_sets.py b/research/p104-type-b-odd-odd-idle-bound/engines/contact_sets.py new file mode 100644 index 0000000000..4f593e8c4c --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/engines/contact_sets.py @@ -0,0 +1,119 @@ +"""Verify the distinct transported axes and all disjoint odd-idle schedules.""" +from argparse import ArgumentParser +from gzip import decompress +from hashlib import sha256 +from itertools import combinations, product +import json +from pathlib import Path +from runpy import run_path +from signal import SIGALRM, alarm, signal + +HERE = Path(__file__).resolve().parent +PINS = { + "inputs/7113-CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "inputs/7295-CERTIFICATE.json": "0587aeb7029b6e066f73701748075f7786056894bf8803690f66cf223bfa6d8c", + "inputs/7295-PROVENANCE.json": "fe28d47df369365523aaafd4d26e506fe2cdc2905c5962626a618eb612294fb0", + "inputs/7295-trace_and_price.py": "feebbca6d093d92f4e165b4aa940fb0628e5deaa4635488c9916aafe08aebc76", +} +CAP = 16 +SECONDS = 20 + + +def unique(items): + out = dict(items) + if len(out) != len(items): + raise ValueError("duplicate JSON key") + return out + + +def read(root, name): + raw = (root / name).read_bytes() + if sha256(raw).hexdigest() != PINS[name]: + raise ValueError(f"changed dependency {name}") + return raw + + +def parsed(root, name): + return json.loads(read(root,name),object_pairs_hook=unique) + + +def signed_difference(removed, added): + return {a: -1 for a in removed-added} | {a: 1 for a in added-removed} + + +def audit(root): + price = parsed(root,"inputs/PRICE.json") + cert = parsed(root,"inputs/7295-CERTIFICATE.json") + prov = parsed(root,"inputs/7295-PROVENANCE.json") + trace_file = "inputs/7295-trace_and_price.py" + read(root,trace_file) + raw = decompress(read(root,"inputs/7113-CALLER.json.gz")) + assert price["caller"] == prov["inputs/CALLER.json.gz"]["commit"] + assert price["caller_sha256"] == prov["inputs/CALLER.json.gz"]["sha256"] == sha256(raw).hexdigest() + caller = json.loads(raw,object_pairs_hook=unique) + events = caller["events"] + ty = caller["types"]["B"] + assert len(ty["ports"]) == price["ports"] == 8 and caller["stages"] == price["copies"] == 17 + assert ty["roles"] == 36 + contacts = run_path(str(root/trace_file))["backward"](caller) + broad = [c for c in contacts if c["op"] == "IDLE_ODD"] + assert len(contacts) == 94 and len(broad) == 4 + assert {c["call"] for c in cert["charges"]} == {c["clock"] for c in broad} + assert all((c["kind"],c["rank"],c["ports"],c["window"]) == ("B",9,8,[0,len(events)]) for c in broad) + assert len({c["role"] for c in broad}) == 4 + clock_to_role = {c["clock"]: c["role"]-ty["offset"] for c in broad} + clock_to_stage = {c["clock"]: c["selected_stages"][0] for c in broad} + assert all(len(c["selected_stages"]) == 1 and c["role"] == c["slot"] for c in broad) + assert {str(c["clock"]):[clock_to_role[c["clock"]],c["selected_stages"]] for c in broad} == price["odd_jobs"] + + choices = {stage:[t for t,s in sorted(clock_to_stage.items()) if s==stage] for stage in (8,9)} + pairs = list(product(choices[8],choices[9])) + assert list(map(list,pairs)) == price["pairs"] + schedules = [] + for size in (1,2): + for edges in combinations(pairs,size): + if len(set().union(*map(set,edges))) != 2*size: + continue + for retained in product(*edges): + removed, added = {8:set(),9:set()}, {8:set(),9:set()} + for edge,keep in zip(edges,retained,strict=True): + drop, = set(edge)-{keep} + stage = clock_to_stage[drop] + removed[stage].add(clock_to_role[drop]) + added[stage].add(clock_to_role[keep]) + assert all(not (removed[s]&added[s]) and len(removed[s])==len(added[s]) for s in (8,9)) + defects = {s:signed_difference(removed[s],added[s]) for s in (8,9)} + witnesses = {s:[min(x),min(x),str(x[min(x)])] for s,x in defects.items() if x} + assert witnesses + schedules.append(dict(pairs=edges,kept=retained,decision="derivative excluded", + witnesses=witnesses,removed={s:sorted(r) for s,r in removed.items()}, + added={s:sorted(r) for s,r in added.items()})) + assert len(schedules) == CAP + assert sum(len(s["pairs"]) == 1 for s in schedules) == 8 + assert not signed_difference({2},{2}) + assert signed_difference({2,4},{1,4}) == {2:-1,1:1} + return dict(head=price["head"],caller=price["caller"],events=len(events),pins=PINS,caps=[4,CAP,SECONDS], + contact_windows=broad,projectors={t:[[r,r,"1"]] for t,r in clock_to_role.items()}, + schedules=schedules,unresolved=0) + + +def stop(*_): + raise TimeoutError("20-second hard cap") + + +def main(): + assert __debug__ + parser = ArgumentParser(description=__doc__) + parser.add_argument("--root",type=Path,default=HERE) + args = parser.parse_args() + signal(SIGALRM,stop) + alarm(SECONDS) + try: + print(json.dumps(audit(args.root),indent=2,sort_keys=True)) + finally: + alarm(0) + + +if __name__ == "__main__": + main() diff --git a/research/p104-type-b-odd-odd-idle-bound/engines/projectors.py b/research/p104-type-b-odd-odd-idle-bound/engines/projectors.py new file mode 100644 index 0000000000..b39fb5280f --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/engines/projectors.py @@ -0,0 +1,126 @@ +"""Check single and simultaneous distinct-mask odd idle unions at q=+1.""" +from collections import defaultdict +from fractions import Fraction as Q +from gzip import decompress +from hashlib import sha256 +from itertools import combinations, product +from json import dumps, loads +from pathlib import Path +from runpy import run_path +from signal import SIGALRM, alarm, signal + +ROOT = Path(__file__).resolve().parents[1] +PINS = { + "inputs/PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "inputs/direct_impulse.py": "d04426aed9528aedc6400d384d7fd13c6531e5e3e6592a7eea4faee46c61e004", + "inputs/7113-CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", +} +CAP, SECONDS = 16, 20 + + +def checked(path): + raw = (ROOT / path).read_bytes() + if sha256(raw).hexdigest() != PINS[path]: + raise ValueError(f"changed dependency {path}") + return raw + + +def inverse(gate): + kind, dest, source, coeff = gate + return kind, dest, source, -coeff if kind == "add" else 1 / coeff + + +def outer(left, right): + return {(i, j): a * b for i, a in enumerate(left) for j, b in enumerate(right) if a and b} + + +def add(dest, source, coefficient): + for position, value in source.items(): + updated = dest.get(position, 0) + coefficient * value + if updated: + dest[position] = updated + else: + dest.pop(position, None) + + +def stop(*_): + raise TimeoutError("20-second hard cap") + + +def main(): + assert __debug__ + signal(SIGALRM, stop) + alarm(SECONDS) + price = loads(checked("inputs/PRICE.json")) + assert Q(price["cases"]["18"]["1"]["complete"]["probe"][0]) > 0 + assert Q(price["cases"]["18"]["2"]["gross"]["incumbent"][1]) < 1 + raw = decompress(checked("inputs/7113-CALLER.json.gz")) + assert sha256(raw).hexdigest() == price["caller_sha256"] + caller = loads(raw) + checked("inputs/direct_impulse.py") + ref = run_path(str(ROOT / "inputs/direct_impulse.py")) + checks = ref["controls"]() + events = caller["events"] + typ = caller["types"]["B"] + size, offset = typ["roles"], typ["offset"] + assert caller["stages"] == 17 and size == 36 and len(typ["ports"]) == 8 + jobs, _ = ref["literal_stock"](events, offset) + assert {str(t): job for t, job in jobs.items()} == price["odd_jobs"] + gate, apply, basis = (ref[k] for k in ("gates", "apply", "basis")) + flattened, prefix = [], {} + for clock, event in enumerate(events): + if clock in jobs: + prefix[clock] = len(flattened) + flattened.extend(gate(event, offset, Q(1))) + for role in range(size): + vector = basis(size, role) + for primitive in flattened: + apply(primitive, vector) + assert vector == basis(size, role) + projectors = {} + for clock, (role, _) in jobs.items(): + column, row = basis(size, role), basis(size, role) + for primitive in reversed(flattened[:prefix[clock]]): + apply(inverse(primitive), column) + apply(primitive, row, True) + assert sum(a * b for a, b in zip(column, row)) == 1 + projectors[clock] = outer(column, row) + + pairs = [tuple(pair) for pair in price["pairs"]] + assert pairs == [(a, b) for a in jobs for b in jobs if jobs[a][1] == [8] and jobs[b][1] == [9]] + schedules = [] + for k in (1, 2): + for edges in combinations(pairs, k): + if len(set(sum(edges, ()))) != 2 * k: + continue + for kept in product(*edges): + defects = defaultdict(dict) + for edge, dst in zip(edges, kept): + src = next(t for t in edge if t != dst) + stage, = jobs[src][1] + add(defects[stage], projectors[dst], 1) + add(defects[stage], projectors[src], -1) + witnesses = {} + for stage, defect in sorted(defects.items()): + if defect: + i, j = min(defect) + witnesses[stage] = [i, j, str(defect[i, j])] + schedules.append(dict(pairs=edges, kept=kept, witnesses=witnesses, + decision="derivative excluded" if witnesses else "unresolved")) + assert len(schedules) == CAP + encode = lambda matrix: [[i, j, str(q)] for (i, j), q in sorted(matrix.items())] + good = {(0, 0): Q(1)} + control = good.copy() + add(control, good, -1) + assert not control + checks += ["full original unit-body endpoint", "equal projector cancellation"] + alarm(0) + receipt = dict(pins=PINS, head=price["head"], caller=price["caller"], caps=[4, CAP, SECONDS], + events=len(events), projectors={t: encode(m) for t, m in projectors.items()}, + controls=checks, schedules=schedules, + unresolved=sum(row["decision"] == "unresolved" for row in schedules)) + print(dumps(receipt, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-type-b-odd-odd-idle-bound/engines/quote.py b/research/p104-type-b-odd-odd-idle-bound/engines/quote.py new file mode 100644 index 0000000000..a2c033e3e7 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/engines/quote.py @@ -0,0 +1,56 @@ +"""Quote a distinct odd/odd union using the authenticated signed comparator.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from itertools import product +import json +from pathlib import Path +from runpy import run_path + +ROOT = Path(__file__).resolve().parent +PINS = { + "inputs/R85-PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", +} + +def read(name): + raw = (ROOT / name).read_bytes() + if sha256(raw).hexdigest() != PINS[name]: + raise ValueError(f"changed {name}") + return raw + +def main(): + assert __debug__ + p = json.loads(read("inputs/R85-PRICE.json")) + read("inputs/pricing.py") + cost = run_path(str(ROOT / "inputs/pricing.py"))["cost"] + assert p["copies"] == 17 and p["ports"] == 8 + jobs = p["odd_jobs"] + left = sorted(int(t) for t, (_, stages) in jobs.items() if stages == [8]) + right = sorted(int(t) for t, (_, stages) in jobs.items() if stages == [9]) + assert (left,right) == ([1339,1340],[2970,2971]) and len(jobs) == 4 + paid = Counter({int(r): n for r,n in p["complete_paid"].items()}) + baseline = Counter({int(r): n for r,n in p["complete_targets"].items()}) + baseline.subtract(paid) + values = dict(incumbent=Q(p["crossing"][1]),probe=Q(p["price_probe"]),target=Q(p["moonshot"])) + cases = {} + for retained in (16,18): + cases[retained] = {} + for count in (1,2): + gain = {9:16*count,retained:-8*count} + edited = baseline.copy() + edited.update(gain) + cases[retained][count] = { + "paid_delta": {r:-n for r,n in gain.items()}, + "paid":sum(paid.values())-8*count, + "new_rank_surplus":sum(r*n for r,n in edited.items()), + "gross": {k:list(map(str,cost(gain,x))) for k,x in values.items()}, + "complete": {k:list(map(str,cost(edited,x))) for k,x in values.items()}, + } + print(json.dumps(dict(head=p["head"],caller=p["caller_head"],ports=p["ports"],copies=p["copies"], + input_sha256=PINS,caller_sha256=p["caller_sha256"],odd_jobs=jobs, + pairs=list(product(left,right)),max_compatible_pair_relaxation=2, + cases=cases,points={k:str(v) for k,v in values.items()}),indent=2,sort_keys=True)) + +if __name__ == "__main__": + main() diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/7113-CALLER.json.gz b/research/p104-type-b-odd-odd-idle-bound/inputs/7113-CALLER.json.gz new file mode 100644 index 0000000000..2479c3a615 Binary files /dev/null and b/research/p104-type-b-odd-odd-idle-bound/inputs/7113-CALLER.json.gz differ diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/7295-CERTIFICATE.json b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-CERTIFICATE.json new file mode 100644 index 0000000000..33c30a73ee --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-CERTIFICATE.json @@ -0,0 +1,33 @@ +{ + "target": "10018846261809/2500000000000000", + "charges": [ + { + "call": 1339, + "charge": "227584085905536662084016474647822327533074079061/2000000000000000000000000000000000000000000000000", + "ports": 8 + }, + { + "call": 1340, + "charge": "227584085905536662084016474647822327533074079061/2000000000000000000000000000000000000000000000000", + "ports": 8 + }, + { + "call": 2970, + "charge": "227584085905536662084016474647822327533074079061/2000000000000000000000000000000000000000000000000", + "ports": 8 + }, + { + "call": 2971, + "charge": "227584085905536662084016474647822327533074079061/2000000000000000000000000000000000000000000000000", + "ports": 8 + } + ], + "expected_groups_by_arity": { + "2": 366, + "3": 544, + "4": 361, + "5": 90 + }, + "saving_upper": "227584085905536662084016474647822327533074079061/62500000000000000000000000000000000000000000000", + "target_margin_upper": "-6827184559455065658810681393111253407749506457123321/50000000000000000000000000000000000000000000000000" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/7295-PROVENANCE.json b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-PROVENANCE.json new file mode 100644 index 0000000000..4bf9c4bbe6 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-PROVENANCE.json @@ -0,0 +1,16 @@ +{ + "inputs/CALLER.json.gz": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "path": "research/signed-caller-8x9/expected/ODD-TYPE-AB-CALLER.json", + "git_blob": "9451ceaf6e8e037894680b549f3ef41c21b260d7", + "sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/07a76c5e2738882c0cb322278e56f6cae3c9885d/research/signed-caller-8x9/expected/ODD-TYPE-AB-CALLER.json" + }, + "inputs/INVOICE-7277.json.gz": { + "commit": "ed090b57ed88f8859e5ff4643645099e6ba856ea", + "path": "research/p104-terminal-cut-rechart/RESULT.json", + "git_blob": "fc0ddfb979177a0791ffa60d94c1d0f50ee59872", + "sha256": "42fc7d18689c9d4e04e0e6d893682bdd4fd9ce42eba6acee46755844c75ec1d1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/ed090b57ed88f8859e5ff4643645099e6ba856ea/research/p104-terminal-cut-rechart/RESULT.json" + } +} diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/7295-trace_and_price.py b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-trace_and_price.py new file mode 100644 index 0000000000..cdaecfb425 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/7295-trace_and_price.py @@ -0,0 +1,76 @@ +"""Independent backward contact trace and rigorous rational rank tariff.""" +from bisect import bisect_left, bisect_right +from collections import defaultdict +from fractions import Fraction as F +from functools import cache + +K = F(10018846261809, 2500000000000000) + + +def log_bounds(x): + z = (x-1)/(x+1) + partial = 2*sum(z**i/i for i in range(1, 113, 2)) + return partial, partial + 2*z**113/(113*(1-z*z)) + + +def exponential(x): + term = value = F(1) + for i in range(1, 37): + term *= x/i + value += term + return value, value+(term*x/37)/(1-x/38) + + +@cache +def power(rank): + e = rank.bit_length()-1 + a = log_bounds(F(rank, 2**e)) + b = log_bounds(F(2)) + lo,hi = (K*(x+e*y) for x,y in zip(a,b,strict=True)) + assert 0 <= lo <= hi < 1 + p,q = rank/exponential(hi)[1],rank/exponential(lo)[0] + grid = 10**50 + return F((p*grid).__floor__(),grid), F((q*grid).__ceil__(),grid) + + +def backward(caller): + events = caller["events"] + # Name each lineage by its final slot, then translate names to initial slots. + lineage = list(range(caller["roles"])) + contacts = defaultdict(list) + idle = [] + for clock in range(len(events)-1,-1,-1): + e = events[clock] + if e[0] == "J": + roles = (*e[2],*e[3][:2]) + else: + ty,op,a,*args = e + match op: + case "SWAP": + b = args[0] + lineage[a],lineage[b] = lineage[b],lineage[a] + continue + case "IDLE_ONE" | "IDLE_ODD": + idle.append((clock,ty,op,a,lineage[a],args[0])) + continue + case "ADD" | "QUERY": + roles = (a,args[0]) + case "LAMBDA" | "SCALE": + roles = (a,) + case _: + raise ValueError(f"unknown caller contact {op}") + for slot in roles: + contacts[lineage[slot]].append(clock) + + initial_name = {token:slot for slot,token in enumerate(lineage)} + result = [] + for clock,ty,op,slot,token,stages in reversed(idle): + hits = [-1,*reversed(contacts[token]),len(events)] + p,q = bisect_left(hits,clock),bisect_right(hits,clock) + assert p==q + result.append({"clock":clock,"kind":ty,"slot":slot, + "role":initial_name[token],"op":op, + "rank":8*len(stages)+int(op=="IDLE_ODD"), + "ports":len(caller["types"][ty]["ports"]), + "selected_stages":stages,"window":[hits[p-1]+1,hits[q]]}) + return result diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/7357-SHA256.json b/research/p104-type-b-odd-odd-idle-bound/inputs/7357-SHA256.json new file mode 100644 index 0000000000..da232d65c0 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/7357-SHA256.json @@ -0,0 +1,5 @@ +{ + "INDEPENDENT.json": "afec20386a8fbdc70d1b96998adbe18edace42a3e14a015e0eab5c09fc311617", + "LEAD.json": "bf0cbae853422e85788449b40ddc2fa807b042d8a357a56a7c7654dda51331e4", + "PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/ADMITTED.json b/research/p104-type-b-odd-odd-idle-bound/inputs/ADMITTED.json new file mode 100644 index 0000000000..464c89e45c --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/ADMITTED.json @@ -0,0 +1,58 @@ +{ + "assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "crossing": [ + "0.00364665195644044790699554028334161", + "0.00364665195644044790699554028334162" + ], + "end": "2026-11-11T23:04:43Z", + "exit": 0, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "hosted_at_admission": "plan and historical success; candidate replay in progress", + "inputs": { + "EARLY-RESULT.json": "ad1ca9b2e2febbf80d9bf8b6ceef14ff90fcc29ef9358310e551628eb1706649", + "INPUTS.json": "abedac59097a1c35c27d91cbdb07207bc562a64743bc406d13c94a8bc970592d", + "NATIVE-RESULT.json": "c6d1b00a83185ab0062397b363258b1f3f6685d755e9c1d4f7d3e7e511240812", + "PROPOSED-CLAIM.json": "6e31241944c123d2bd4aa8bc94d833b44b3d889bd6d9aafc579108f416b45f03", + "RESULT.json": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "SOURCES.json": "ac7b4473035af648d6073e78b6c39675e706e8194b346bb55ed62a0adc81d593", + "VERIFY.json": "ede7dd2dd3733b9a73f72af9dd7edfe819b49b859c5c76e227ec82cb9c220513", + "WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + "kappa": "0.00364665195644", + "ours": "0", + "peer_gain": "0.000000430519994", + "prior_kappa": "0.003646221436446", + "receipt": { + "peer-prep/IDENTITIES.json": "f4d3f6ca2d87f8cd68c01ac9f77b69bd5a796f92bd567cea8afe3ac7c72e8e4b", + "peer-prep/STATIC.json": "500cc563b7dac8b1de1faf1dee9b820e73152dfddc15a650cd1191edd39e8c79", + "peer-price/RANK-STOCK.json": "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "peer-price/READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "peer/COMMAND.txt": "714bfab024155d8216f3ef99f3ee7627ddc35ab341c486ac6bd53c476b757130", + "peer/COMMIT.stdout": "597470d8132a3812deb3624a859546c0c13d52b094fd6fc61e7416941130bd70", + "peer/END-UTC.txt": "9c46923c616c14da5b8ed503e1652021d7bd409a10ec91a78a03263013fba08a", + "peer/METADATA.stdout": "5873404cb4424dca918a00d503569f3c29a3190fd029a007e1afb2006399f647", + "peer/RUN.exit": "9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa", + "peer/RUN.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "peer/RUN.stdout": "d589626c7581fbb9928bc615364cfee49deb62dfc0a39a903417ca62be89cf8c", + "peer/START-UTC.txt": "5b78fd6d42a2b42206891318c08e6014de57d7ca46b0201cd11a166f452210f7" + }, + "source_history": "exact anchored base and recursive package provenance, sparse shallow stock wrapper not executed", + "stages": { + "caller": "PASS_HELPER_319_FUSED_CALLER 91166298911/25000000000000", + "early": "PASS_HELPER_319_EXACT_NATIVE_AND_SIGNED_PRICE 0.00364665195644", + "frontier": "PASS_HELPER_319_FUSED_FRONTIER_PROPOSAL 91166298911/25000000000000", + "native": "PASS_HELPER_319_FUSED_NATIVE 3646017316711/1000000000000000" + }, + "start": "2026-11-11T22:54:48Z", + "status": "independently_reproduced_comparable", + "tree": "fa98712a459b20c10240450097c87de433f8a750" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/FROZEN-PLAN.md b/research/p104-type-b-odd-odd-idle-bound/inputs/FROZEN-PLAN.md new file mode 100644 index 0000000000..ceb9eae223 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/FROZEN-PLAN.md @@ -0,0 +1,13 @@ +# Round 149 · distinct-mask odd Type B idle unions + +Use exact #7334 aaeec8c0acf01e99a5f331ef363a698d9c084ace and signed #7113 07a76c5e2738882c0cb322278e56f6cae3c9885d. Before constructing any child, freeze original odd slots 1339,1340 (stage 8) and 2970,2971 (stage 9). A pair keeps a union at either original slot and removes the other. Keep all other paid and productive work fixed. The two-pair cap follows from four distinct slots. Include simultaneous pairs in the derivative test because their stage contributions could cancel. + +Exact directed price is inputs/PRICE.json. Across eight Type B ports, a pair removes 16 rank-nine paid positions and adds eight rank-18 positions if both sign coordinates are charged. This allows one raw gross upper 0.3606232458573211 and two 0.7212464917146422, rounded up. At the fixed target the two-pair complete upper is −138.9750296517618 raw. If one can prove the full-width parity and routing contract for rank 16, the corresponding whole upper is 32.27690601312158 raw and the fixed-target complete upper −107.4630297088189. The latter is an optimistic relaxation. Zero extra paid rank-one children fit the rank-18 scope, even together. Every scalar, phase, ownership and precision/tape gate remains charged. + +At q=1 and all independent body multipliers equal to one, reconstruct four transported exact rank-one projectors and the stage-8 and stage-9 defects for every nonempty disjoint schedule. Bound to four literal keys, eight single- and eight double-pair schedules, and 20 runner seconds. A nonzero stage derivative excludes the exact arbitrary-input action under this scope. For any zero derivative, preserve the exact schedule and test at most four full signed symbolic body identities in 35 seconds before considering a physical prototype. Preserve untouched and unresolved cases at caps. Reuse #7315's projector precedent and credit #7295's prior rank-additive upper pricing, #7356's sign transfers and #7380's odd-even unions. The new exact test covers distinct-mask odd-odd unions. + +CPython 3.12 with assertions from this root. +```sh +python3.12 -I -B lead/projectors.py > fresh.json +cmp fresh.json lead/RESULT.json +``` diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/R85-PRICE.json b/research/p104-type-b-odd-odd-idle-bound/inputs/R85-PRICE.json new file mode 100644 index 0000000000..8a7a0fe6da --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/R85-PRICE.json @@ -0,0 +1,1767 @@ +{ + "caller_head": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "complete_paid": { + "1": 68384, + "2": 14501, + "3": 14093, + "4": 3791, + "5": 5865, + "6": 238, + "7": 170, + "8": 741, + "9": 32, + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 208 + }, + "complete_targets": { + "1": 306, + "2": 357, + "3": 799, + "4": 3825, + "5": 1360, + "6": 731, + "7": 323, + "8": 544, + "9": 10888, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208, + "137": 208 + }, + "copies": 17, + "crossing": [ + "364665195644044790699554028334161/100000000000000000000000000000000000", + "182332597822022395349777014167081/50000000000000000000000000000000000" + ], + "even_jobs": { + "7": [ + 0, + [ + 1 + ] + ], + "19": [ + 1, + [ + 1 + ] + ], + "74": [ + 0, + [ + 2 + ] + ], + "96": [ + 0, + [ + 2 + ] + ], + "183": [ + 0, + [ + 3 + ] + ], + "214": [ + 0, + [ + 3 + ] + ], + "326": [ + 0, + [ + 4 + ] + ], + "364": [ + 0, + [ + 4 + ] + ], + "505": [ + 0, + [ + 5 + ] + ], + "552": [ + 0, + [ + 5 + ] + ], + "718": [ + 0, + [ + 6 + ] + ], + "772": [ + 0, + [ + 6 + ] + ], + "967": [ + 0, + [ + 7 + ] + ], + "1030": [ + 0, + [ + 7 + ] + ], + "1246": [ + 0, + [ + 8 + ] + ], + "1308": [ + 2, + [ + 8 + ] + ], + "1855": [ + 0, + [ + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1869": [ + 2, + [ + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1887": [ + 0, + [ + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1940": [ + 0, + [ + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1997": [ + 0, + [ + 4, + 5, + 6, + 7, + 8 + ] + ], + "2027": [ + 2, + [ + 4, + 5, + 6, + 7, + 8 + ] + ], + "2061": [ + 0, + [ + 5, + 6, + 7, + 8 + ] + ], + "2099": [ + 2, + [ + 5, + 6, + 7, + 8 + ] + ], + "2141": [ + 0, + [ + 6, + 7, + 8 + ] + ], + "2187": [ + 2, + [ + 6, + 7, + 8 + ] + ], + "2237": [ + 0, + [ + 7, + 8 + ] + ], + "2291": [ + 2, + [ + 7, + 8 + ] + ], + "2324": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + ], + "2337": [ + 1, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + ], + "2355": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + ], + "2377": [ + 16, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + ], + "2403": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14 + ] + ], + "2433": [ + 16, + [ + 9, + 10, + 11, + 12, + 13, + 14 + ] + ], + "2467": [ + 0, + [ + 9, + 10, + 11, + 12, + 13 + ] + ], + "2505": [ + 16, + [ + 9, + 10, + 11, + 12, + 13 + ] + ], + "2547": [ + 0, + [ + 9, + 10, + 11, + 12 + ] + ], + "2593": [ + 16, + [ + 9, + 10, + 11, + 12 + ] + ], + "2643": [ + 0, + [ + 9, + 10, + 11 + ] + ], + "2697": [ + 16, + [ + 9, + 10, + 11 + ] + ], + "2750": [ + 0, + [ + 9, + 10 + ] + ], + "2804": [ + 0, + [ + 9, + 10 + ] + ], + "2866": [ + 0, + [ + 9 + ] + ], + "2935": [ + 18, + [ + 9 + ] + ], + "3180": [ + 0, + [ + 10 + ] + ], + "3250": [ + 19, + [ + 10 + ] + ], + "3500": [ + 0, + [ + 11 + ] + ], + "3561": [ + 17, + [ + 11 + ] + ], + "3784": [ + 16, + [ + 12 + ] + ], + "3837": [ + 0, + [ + 12 + ] + ], + "4028": [ + 0, + [ + 13 + ] + ], + "4070": [ + 0, + [ + 13 + ] + ], + "4228": [ + 16, + [ + 14 + ] + ], + "4266": [ + 0, + [ + 14 + ] + ], + "4404": [ + 0, + [ + 15 + ] + ], + "4431": [ + 0, + [ + 15 + ] + ], + "4538": [ + 16, + [ + 16 + ] + ], + "4561": [ + 0, + [ + 16 + ] + ], + "4646": [ + 0, + [ + 17 + ] + ], + "4660": [ + 0, + [ + 17 + ] + ] + }, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "inputs": { + "7113-CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "7334-ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "7334-READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "R53-PRICE.json": "86f779c3eeb43563793e6ccb2227257ef732b2ca12fbbde2f9099988f903a484", + "R59-PRICE.json": "b73057381860987c6de1666205e91a0e3d116a8299d8aa425682f5960609c21f", + "derivative_check.py": "348c8b2de72f1f112cb1337eca9d29ca96c85a7ad903beecafb1a2a1221f408e", + "pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182" + }, + "keys": [ + { + "even": 7, + "odd": 1339, + "size": 1 + }, + { + "even": 19, + "odd": 1339, + "size": 1 + }, + { + "even": 74, + "odd": 1339, + "size": 1 + }, + { + "even": 96, + "odd": 1339, + "size": 1 + }, + { + "even": 183, + "odd": 1339, + "size": 1 + }, + { + "even": 214, + "odd": 1339, + "size": 1 + }, + { + "even": 326, + "odd": 1339, + "size": 1 + }, + { + "even": 364, + "odd": 1339, + "size": 1 + }, + { + "even": 505, + "odd": 1339, + "size": 1 + }, + { + "even": 552, + "odd": 1339, + "size": 1 + }, + { + "even": 718, + "odd": 1339, + "size": 1 + }, + { + "even": 772, + "odd": 1339, + "size": 1 + }, + { + "even": 967, + "odd": 1339, + "size": 1 + }, + { + "even": 1030, + "odd": 1339, + "size": 1 + }, + { + "even": 2324, + "odd": 1339, + "size": 8 + }, + { + "even": 2337, + "odd": 1339, + "size": 8 + }, + { + "even": 2355, + "odd": 1339, + "size": 7 + }, + { + "even": 2377, + "odd": 1339, + "size": 7 + }, + { + "even": 2403, + "odd": 1339, + "size": 6 + }, + { + "even": 2433, + "odd": 1339, + "size": 6 + }, + { + "even": 2467, + "odd": 1339, + "size": 5 + }, + { + "even": 2505, + "odd": 1339, + "size": 5 + }, + { + "even": 2547, + "odd": 1339, + "size": 4 + }, + { + "even": 2593, + "odd": 1339, + "size": 4 + }, + { + "even": 2643, + "odd": 1339, + "size": 3 + }, + { + "even": 2697, + "odd": 1339, + "size": 3 + }, + { + "even": 2750, + "odd": 1339, + "size": 2 + }, + { + "even": 2804, + "odd": 1339, + "size": 2 + }, + { + "even": 2866, + "odd": 1339, + "size": 1 + }, + { + "even": 2935, + "odd": 1339, + "size": 1 + }, + { + "even": 3180, + "odd": 1339, + "size": 1 + }, + { + "even": 3250, + "odd": 1339, + "size": 1 + }, + { + "even": 3500, + "odd": 1339, + "size": 1 + }, + { + "even": 3561, + "odd": 1339, + "size": 1 + }, + { + "even": 3784, + "odd": 1339, + "size": 1 + }, + { + "even": 3837, + "odd": 1339, + "size": 1 + }, + { + "even": 4028, + "odd": 1339, + "size": 1 + }, + { + "even": 4070, + "odd": 1339, + "size": 1 + }, + { + "even": 4228, + "odd": 1339, + "size": 1 + }, + { + "even": 4266, + "odd": 1339, + "size": 1 + }, + { + "even": 4404, + "odd": 1339, + "size": 1 + }, + { + "even": 4431, + "odd": 1339, + "size": 1 + }, + { + "even": 4538, + "odd": 1339, + "size": 1 + }, + { + "even": 4561, + "odd": 1339, + "size": 1 + }, + { + "even": 4646, + "odd": 1339, + "size": 1 + }, + { + "even": 4660, + "odd": 1339, + "size": 1 + }, + { + "even": 7, + "odd": 1340, + "size": 1 + }, + { + "even": 19, + "odd": 1340, + "size": 1 + }, + { + "even": 74, + "odd": 1340, + "size": 1 + }, + { + "even": 96, + "odd": 1340, + "size": 1 + }, + { + "even": 183, + "odd": 1340, + "size": 1 + }, + { + "even": 214, + "odd": 1340, + "size": 1 + }, + { + "even": 326, + "odd": 1340, + "size": 1 + }, + { + "even": 364, + "odd": 1340, + "size": 1 + }, + { + "even": 505, + "odd": 1340, + "size": 1 + }, + { + "even": 552, + "odd": 1340, + "size": 1 + }, + { + "even": 718, + "odd": 1340, + "size": 1 + }, + { + "even": 772, + "odd": 1340, + "size": 1 + }, + { + "even": 967, + "odd": 1340, + "size": 1 + }, + { + "even": 1030, + "odd": 1340, + "size": 1 + }, + { + "even": 2324, + "odd": 1340, + "size": 8 + }, + { + "even": 2337, + "odd": 1340, + "size": 8 + }, + { + "even": 2355, + "odd": 1340, + "size": 7 + }, + { + "even": 2377, + "odd": 1340, + "size": 7 + }, + { + "even": 2403, + "odd": 1340, + "size": 6 + }, + { + "even": 2433, + "odd": 1340, + "size": 6 + }, + { + "even": 2467, + "odd": 1340, + "size": 5 + }, + { + "even": 2505, + "odd": 1340, + "size": 5 + }, + { + "even": 2547, + "odd": 1340, + "size": 4 + }, + { + "even": 2593, + "odd": 1340, + "size": 4 + }, + { + "even": 2643, + "odd": 1340, + "size": 3 + }, + { + "even": 2697, + "odd": 1340, + "size": 3 + }, + { + "even": 2750, + "odd": 1340, + "size": 2 + }, + { + "even": 2804, + "odd": 1340, + "size": 2 + }, + { + "even": 2866, + "odd": 1340, + "size": 1 + }, + { + "even": 2935, + "odd": 1340, + "size": 1 + }, + { + "even": 3180, + "odd": 1340, + "size": 1 + }, + { + "even": 3250, + "odd": 1340, + "size": 1 + }, + { + "even": 3500, + "odd": 1340, + "size": 1 + }, + { + "even": 3561, + "odd": 1340, + "size": 1 + }, + { + "even": 3784, + "odd": 1340, + "size": 1 + }, + { + "even": 3837, + "odd": 1340, + "size": 1 + }, + { + "even": 4028, + "odd": 1340, + "size": 1 + }, + { + "even": 4070, + "odd": 1340, + "size": 1 + }, + { + "even": 4228, + "odd": 1340, + "size": 1 + }, + { + "even": 4266, + "odd": 1340, + "size": 1 + }, + { + "even": 4404, + "odd": 1340, + "size": 1 + }, + { + "even": 4431, + "odd": 1340, + "size": 1 + }, + { + "even": 4538, + "odd": 1340, + "size": 1 + }, + { + "even": 4561, + "odd": 1340, + "size": 1 + }, + { + "even": 4646, + "odd": 1340, + "size": 1 + }, + { + "even": 4660, + "odd": 1340, + "size": 1 + }, + { + "even": 7, + "odd": 2970, + "size": 1 + }, + { + "even": 19, + "odd": 2970, + "size": 1 + }, + { + "even": 74, + "odd": 2970, + "size": 1 + }, + { + "even": 96, + "odd": 2970, + "size": 1 + }, + { + "even": 183, + "odd": 2970, + "size": 1 + }, + { + "even": 214, + "odd": 2970, + "size": 1 + }, + { + "even": 326, + "odd": 2970, + "size": 1 + }, + { + "even": 364, + "odd": 2970, + "size": 1 + }, + { + "even": 505, + "odd": 2970, + "size": 1 + }, + { + "even": 552, + "odd": 2970, + "size": 1 + }, + { + "even": 718, + "odd": 2970, + "size": 1 + }, + { + "even": 772, + "odd": 2970, + "size": 1 + }, + { + "even": 967, + "odd": 2970, + "size": 1 + }, + { + "even": 1030, + "odd": 2970, + "size": 1 + }, + { + "even": 1246, + "odd": 2970, + "size": 1 + }, + { + "even": 1308, + "odd": 2970, + "size": 1 + }, + { + "even": 1855, + "odd": 2970, + "size": 7 + }, + { + "even": 1869, + "odd": 2970, + "size": 7 + }, + { + "even": 1887, + "odd": 2970, + "size": 6 + }, + { + "even": 1940, + "odd": 2970, + "size": 6 + }, + { + "even": 1997, + "odd": 2970, + "size": 5 + }, + { + "even": 2027, + "odd": 2970, + "size": 5 + }, + { + "even": 2061, + "odd": 2970, + "size": 4 + }, + { + "even": 2099, + "odd": 2970, + "size": 4 + }, + { + "even": 2141, + "odd": 2970, + "size": 3 + }, + { + "even": 2187, + "odd": 2970, + "size": 3 + }, + { + "even": 2237, + "odd": 2970, + "size": 2 + }, + { + "even": 2291, + "odd": 2970, + "size": 2 + }, + { + "even": 3180, + "odd": 2970, + "size": 1 + }, + { + "even": 3250, + "odd": 2970, + "size": 1 + }, + { + "even": 3500, + "odd": 2970, + "size": 1 + }, + { + "even": 3561, + "odd": 2970, + "size": 1 + }, + { + "even": 3784, + "odd": 2970, + "size": 1 + }, + { + "even": 3837, + "odd": 2970, + "size": 1 + }, + { + "even": 4028, + "odd": 2970, + "size": 1 + }, + { + "even": 4070, + "odd": 2970, + "size": 1 + }, + { + "even": 4228, + "odd": 2970, + "size": 1 + }, + { + "even": 4266, + "odd": 2970, + "size": 1 + }, + { + "even": 4404, + "odd": 2970, + "size": 1 + }, + { + "even": 4431, + "odd": 2970, + "size": 1 + }, + { + "even": 4538, + "odd": 2970, + "size": 1 + }, + { + "even": 4561, + "odd": 2970, + "size": 1 + }, + { + "even": 4646, + "odd": 2970, + "size": 1 + }, + { + "even": 4660, + "odd": 2970, + "size": 1 + }, + { + "even": 7, + "odd": 2971, + "size": 1 + }, + { + "even": 19, + "odd": 2971, + "size": 1 + }, + { + "even": 74, + "odd": 2971, + "size": 1 + }, + { + "even": 96, + "odd": 2971, + "size": 1 + }, + { + "even": 183, + "odd": 2971, + "size": 1 + }, + { + "even": 214, + "odd": 2971, + "size": 1 + }, + { + "even": 326, + "odd": 2971, + "size": 1 + }, + { + "even": 364, + "odd": 2971, + "size": 1 + }, + { + "even": 505, + "odd": 2971, + "size": 1 + }, + { + "even": 552, + "odd": 2971, + "size": 1 + }, + { + "even": 718, + "odd": 2971, + "size": 1 + }, + { + "even": 772, + "odd": 2971, + "size": 1 + }, + { + "even": 967, + "odd": 2971, + "size": 1 + }, + { + "even": 1030, + "odd": 2971, + "size": 1 + }, + { + "even": 1246, + "odd": 2971, + "size": 1 + }, + { + "even": 1308, + "odd": 2971, + "size": 1 + }, + { + "even": 1855, + "odd": 2971, + "size": 7 + }, + { + "even": 1869, + "odd": 2971, + "size": 7 + }, + { + "even": 1887, + "odd": 2971, + "size": 6 + }, + { + "even": 1940, + "odd": 2971, + "size": 6 + }, + { + "even": 1997, + "odd": 2971, + "size": 5 + }, + { + "even": 2027, + "odd": 2971, + "size": 5 + }, + { + "even": 2061, + "odd": 2971, + "size": 4 + }, + { + "even": 2099, + "odd": 2971, + "size": 4 + }, + { + "even": 2141, + "odd": 2971, + "size": 3 + }, + { + "even": 2187, + "odd": 2971, + "size": 3 + }, + { + "even": 2237, + "odd": 2971, + "size": 2 + }, + { + "even": 2291, + "odd": 2971, + "size": 2 + }, + { + "even": 3180, + "odd": 2971, + "size": 1 + }, + { + "even": 3250, + "odd": 2971, + "size": 1 + }, + { + "even": 3500, + "odd": 2971, + "size": 1 + }, + { + "even": 3561, + "odd": 2971, + "size": 1 + }, + { + "even": 3784, + "odd": 2971, + "size": 1 + }, + { + "even": 3837, + "odd": 2971, + "size": 1 + }, + { + "even": 4028, + "odd": 2971, + "size": 1 + }, + { + "even": 4070, + "odd": 2971, + "size": 1 + }, + { + "even": 4228, + "odd": 2971, + "size": 1 + }, + { + "even": 4266, + "odd": 2971, + "size": 1 + }, + { + "even": 4404, + "odd": 2971, + "size": 1 + }, + { + "even": 4431, + "odd": 2971, + "size": 1 + }, + { + "even": 4538, + "odd": 2971, + "size": 1 + }, + { + "even": 4561, + "odd": 2971, + "size": 1 + }, + { + "even": 4646, + "odd": 2971, + "size": 1 + }, + { + "even": 4660, + "odd": 2971, + "size": 1 + } + ], + "limits": { + "first_cases": 180, + "first_seconds": 20, + "formal_cases": 2, + "formal_seconds": 60, + "next_cases": 12, + "next_seconds": 25, + "physical_cases": 1, + "physical_seconds": 90 + }, + "maximum_disjoint_pairs": 4, + "moonshot": "10018846261809/2500000000000000", + "moonshot_matching": [ + [ + 1339, + 2337 + ], + [ + 1340, + 2324 + ], + [ + 2970, + 1869 + ], + [ + 2971, + 1855 + ] + ], + "moonshot_upper_full_margin": [ + "-272781423325474633572217692406634252278891369168923/2000000000000000000000000000000000000000000000000", + "-681953558313686583930544231016585630697228422893883/5000000000000000000000000000000000000000000000000" + ], + "moonshot_whole_compatible_upper": "2110134067580191952475114296542273299875219307131/625000000000000000000000000000000000000000000000", + "odd_jobs": { + "1339": [ + 32, + [ + 8 + ] + ], + "1340": [ + 33, + [ + 8 + ] + ], + "2970": [ + 34, + [ + 9 + ] + ], + "2971": [ + 35, + [ + 9 + ] + ] + }, + "odd_jobs_degrees": { + "1339": 46, + "1340": 46, + "2970": 44, + "2971": 44 + }, + "old_margin_at_moonshot": [ + "-1397669261708656239100690290777847634192460354758679/10000000000000000000000000000000000000000000000000", + "-698834630854328119550345145388923817096230177350851/5000000000000000000000000000000000000000000000000" + ], + "one_edit_extra_rank_one_derivative_through_BIT": [ + "-38754778097691410152033058895203404894602073135247745196030299283129502248321366715496083496081002743371/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-19349319118217120380107815491547568352989413883714948652018812418623287777787437894596418531786410828809/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "one_edit_extra_rank_one_margin_at_lower": [ + "-2149554559637470549779835271335532366221340150369/10000000000000000000000000000000000000000000000000", + "-2149554559637470549779835271335532366221340084221/10000000000000000000000000000000000000000000000000" + ], + "one_edit_optimistic_upper": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "ports": 8, + "price_probe": "182332647822022395349777014167081/50000000000000000000000000000000000", + "prices_by_even_mask_size": { + "1": { + "break_even_volume_before_ancillary_cost": [ + "1349419275406457209674719339189361673414877119416335/1346021166745030462594119007586193864779694787608008", + "1349419275406457209674719339189361673414877119472251/1346021166745030462594119007586193864779694787607992" + ], + "cases": 128, + "complete_margin_at_crossing_upper": [ + "3398108661426747080600331603167808635182331808327/10000000000000000000000000000000000000000000000000", + "3398108661426747080600331603167808635182331864259/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "1697116916916989079621382907374673237911064853421/5000000000000000000000000000000000000000000000000", + "1697116916916989079621382907374673237911064881391/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "212381791339171692537520725199854726006217758147/625000000000000000000000000000000000000000000000", + "212381791339171692537520725199854726006217758149/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "8": -8, + "9": -8, + "17": 8 + }, + "target_credit": [ + "116595347105496759695892683549867117306906406821/312500000000000000000000000000000000000000000000", + "466381388421987038783570734199468469227625627289/1250000000000000000000000000000000000000000000000" + ] + }, + "2": { + "break_even_volume_before_ancillary_cost": [ + "1981377592781520717461317835603988567744318021050527/1976661006280494474300154758396836091399111170411816", + "1981377592781520717461317835603988567744318021106451/1976661006280494474300154758396836091399111170411808" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "4716586501026243161163077207152476345206850638711/10000000000000000000000000000000000000000000000000", + "4716586501026243161163077207152476345206850694643/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "2356356015035586918592179577960500059068762623381/5000000000000000000000000000000000000000000000000", + "2356356015035586918592179577960500059068762651347/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "147393328157070098786346162724448228941375092523/312500000000000000000000000000000000000000000000", + "36848332039267524696586540681112057235343773131/78125000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "16": -8, + "25": 8 + }, + "target_credit": [ + "647257522053066798336442009133637723324192672023/1250000000000000000000000000000000000000000000000", + "323628761026533399168221004566818861662096336013/625000000000000000000000000000000000000000000000" + ] + }, + "3": { + "break_even_volume_before_ancillary_cost": [ + "2612131110775235410834018937196374110919785892019151/2606552249881768209115768179304945643671387808080944", + "2612131110775235410834018937196374110919785892075067/2606552249881768209115768179304945643671387808080928" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "5578860893467201718250757891428467248398083938207/10000000000000000000000000000000000000000000000000", + "5578860893467201718250757891428467248398083994139/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "2787493327686216806402621269449795320446377163129/5000000000000000000000000000000000000000000000000", + "2787493327686216806402621269449795320446377191099/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "697357611683400214781344736432291778664404532529/1250000000000000000000000000000000000000000000000", + "697357611683400214781344736432291778664404532533/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "24": -8, + "33": 8 + }, + "target_credit": [ + "765530412008729831042197541830988565820820534987/1250000000000000000000000000000000000000000000000", + "765530412008729831042197541830988565820820534991/1250000000000000000000000000000000000000000000000" + ] + }, + "4": { + "break_even_volume_before_ancillary_cost": [ + "3242103502011138070420043553698102418520596600812391/3235881300381534570635643771581329621138291555004032", + "1080701167337046023473347851232700806173532200289433/1078627100127178190211881257193776540379430518334672" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "6222201629603499784399782116772797382305045808359/10000000000000000000000000000000000000000000000000", + "6222201629603499784399782116772797382305045864283/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3109163782527172655190614822269082672852732445509/5000000000000000000000000000000000000000000000000", + "3109163782527172655190614822269082672852732473471/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "777775203700437473049972764600333045402774766297/1250000000000000000000000000000000000000000000000", + "388887601850218736524986382300166522701387383151/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "32": -8, + "41": 8 + }, + "target_credit": [ + "853764067542160568840157637522941840590697286473/1250000000000000000000000000000000000000000000000", + "426882033771080284420078818761470920295348643239/625000000000000000000000000000000000000000000000" + ] + }, + "5": { + "break_even_volume_before_ancillary_cost": [ + "3871495689349097242007681343357618993003695220097823/3864759827313654867505100482217239151277017313619808", + "3871495689349097242007681343357618993003695220153739/3864759827313654867505100482217239151277017313619792" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "1347172407088474900516172228075968345335581295603/2000000000000000000000000000000000000000000000000", + "6735862035442374502580861140379841726677906533947/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3365994054670169993504460472994222969456031159581/5000000000000000000000000000000000000000000000000", + "3365994054670169993504460472994222969456031187539/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "168396550886059362564521528510242717689876470001/250000000000000000000000000000000000000000000000", + "841982754430296812822607642551213588449382350009/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "40": -8, + "49": 8 + }, + "target_credit": [ + "924206414438843870498546397347683809495197001189/1250000000000000000000000000000000000000000000000", + "184841282887768774099709279469536761899039400239/250000000000000000000000000000000000000000000000" + ] + }, + "6": { + "break_even_volume_before_ancillary_cost": [ + "4500425895449082104078219197722901478581800440412783/4493262365712632046841105857301464721248489219548272", + "1500141965149694034692739732574300492860600146822897/1497754121904210682280368619100488240416163073182752" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "7163529736450057237113340421436757333311220864511/10000000000000000000000000000000000000000000000000", + "1432705947290011447422668084287351466662244184087/2000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3579827962769460572276732282269654315656145424597/5000000000000000000000000000000000000000000000000", + "3579827962769460572276732282269654315656145452559/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "223860304264064288659791888170832009819636662079/312500000000000000000000000000000000000000000000", + "895441217056257154639167552683328039278546648321/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "48": -8, + "57": 8 + }, + "target_credit": [ + "491426003865964639022586809440105974539735350301/625000000000000000000000000000000000000000000000", + "15357062620811394969455837795003311704366729697/19531250000000000000000000000000000000000000000" + ] + }, + "7": { + "break_even_volume_before_ancillary_cost": [ + "5128972177594501491428013267596684552693909676016159/5121442246134131641816841341116154813295735896884256", + "5128972177594501491428013267596684552693909676072051/5121442246134131641816841341116154813295735896884232" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "7529931460369849611171926480529739398173779131903/10000000000000000000000000000000000000000000000000", + "7529931460369849611171926480529739398173779187819/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3763028874045559762198477756085057582404953032129/5000000000000000000000000000000000000000000000000", + "3763028874045559762198477756085057582404953060087/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "941241432546231201396490810069950797386366431739/1250000000000000000000000000000000000000000000000", + "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "56": -8, + "65": 8 + }, + "target_credit": [ + "1033093460169360688210796556416954838863873158897/1250000000000000000000000000000000000000000000000", + "1033093460169360688210796556416954838863873158903/1250000000000000000000000000000000000000000000000" + ] + }, + "8": { + "break_even_volume_before_ancillary_cost": [ + "5757189979240819370078368353540452839483401527510023/5749339533800456840628148188811827108110120584009464", + "5757189979240819370078368353540452839483401527565907/5749339533800456840628148188811827108110120584009440" + ], + "cases": 4, + "complete_margin_at_crossing_upper": [ + "7850445440362529450220164728625731373280943500559/10000000000000000000000000000000000000000000000000", + "7850445440362529450220164728625731373280943556467/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3923285907160358772028595865361599763944622658949/5000000000000000000000000000000000000000000000000", + "3923285907160358772028595865361599763944622686903/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "49065284002265809063876029554097489713738098891/62500000000000000000000000000000000000000000000", + "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "64": -8, + "73": 8 + }, + "target_credit": [ + "538520303705415632132158870062659230505673074111/625000000000000000000000000000000000000000000000", + "269260151852707816066079435031329615252836537057/312500000000000000000000000000000000000000000000" + ] + } + }, + "retained_BIT": "376669/100000000", + "scope": "One same-volume signed union at the retained odd clock. Matching upper forbids repeated literal sites and grants all other compatibility and ancillary work free. No caller decoded.", + "stock": 180, + "whole_compatible_upper": "480636778147886845668502850287975147915282102393/156250000000000000000000000000000000000000000000", + "whole_upper_by_odd_mask": { + "0": "0", + "1": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "2": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "3": "981305680045316181277520591081949794274761977827/625000000000000000000000000000000000000000000000", + "4": "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000", + "5": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "6": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "7": "2903852792636863563951531992233850385935890387399/1250000000000000000000000000000000000000000000000", + "8": "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000", + "9": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "10": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "11": "2903852792636863563951531992233850385935890387399/1250000000000000000000000000000000000000000000000", + "12": "188248286509246240279298162013990159477273286349/125000000000000000000000000000000000000000000000", + "13": "2863788545137778584070502211221851389047494841317/1250000000000000000000000000000000000000000000000", + "14": "2863788545137778584070502211221851389047494841317/1250000000000000000000000000000000000000000000000", + "15": "480636778147886845668502850287975147915282102393/156250000000000000000000000000000000000000000000" + }, + "whole_upper_matching": [ + [ + 1339, + 2337 + ], + [ + 1340, + 2324 + ], + [ + 2970, + 1869 + ], + [ + 2971, + 1855 + ] + ] +} diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/direct_impulse.py b/research/p104-type-b-odd-odd-idle-bound/inputs/direct_impulse.py new file mode 100644 index 0000000000..14b5e8bb18 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/direct_impulse.py @@ -0,0 +1,170 @@ +"""Independent exact direct interval projector comparison for R85.""" +from argparse import ArgumentParser +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from time import monotonic + +PRICE = "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262" +ADMISSION = "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13" +CALLER = "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc" +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +CAP, SECONDS = 180, 20 + + +class Capped(Exception): + pass + + +def need(condition, text): + if not condition: + raise ValueError(text) + + +def read(path, expected): + raw = path.read_bytes() + need(sha256(raw).hexdigest() == expected, "changed input " + path.name) + return loads(raw) + + +def gates(event, offset, q): + family, op, *a = event + if family == "J": + u, v, l, r = a[1] + u, v = u - offset, v - offset + return [("add", u, v, q * Q(l)), ("add", v, u, Q(r) / q)] + if family != "B": + need(family == "A", "unknown event family") + return [] + dest, *tail = a + dest -= offset + if op == "ADD": + return [("add", dest, tail[0] - offset, Q(tail[1]))] + if op == "QUERY": + return [("add", dest, tail[0] - offset, q ** tail[1])] + if op == "SWAP": + return [("swap", dest, tail[0] - offset, Q(1))] + if op == "SCALE": + return [("scale", dest, dest, Q(tail[0]))] + if op == "IDLE_ODD": + return [("scale", dest, dest, q ** tail[1])] + need(op in ("IDLE_ONE", "LAMBDA"), "unknown Type B op") + return [] + + +def basis(n, i): + return [Q(k == i) for k in range(n)] + + +def apply(op, vector, transpose=False): + kind, d, s, c = op + if kind == "add": + if transpose: + d, s = s, d + if vector[s]: + vector[d] += c * vector[s] + elif kind == "scale": + vector[d] *= c + else: + need(kind == "swap", "bad gate") + vector[d], vector[s] = vector[s], vector[d] + + +def between(items, early_role, late_role, n): + column = basis(n, early_role) + for op in items: + apply(op, column) + for i, x in enumerate(column): + if i != late_role and x: + return "column", i, x + row = basis(n, late_role) + for op in reversed(items): + apply(op, row, True) + for i, x in enumerate(row): + if i != early_role and x: + return "row", i, x + need(column[late_role] == row[early_role] and column[late_role], "singular interval action") + return None + + +def controls(): + need(between([("swap", 0, 1, Q(1))], 0, 1, 2) is None, "valid swapped projector rejected") + need(between([("add", 1, 0, Q(-2))], 0, 0, 2) == ("column", 1, Q(-2)), + "mixed impulse column not rejected") + need(between([("add", 0, 1, Q(-3, 2))], 0, 0, 2) == ("row", 1, Q(-3, 2)), + "mixed covector row not rejected") + return ["swapped projector", "negative column shear", "fractional row shear"] + + +def literal_stock(events, offset): + odd, even = {}, {} + for i, e in enumerate(events): + if e[:2] == ["B", "IDLE_ODD"]: + need(len(e[3]) == 1 and e[4:] == [-1], "unexpected signed odd idle") + odd[i] = [e[2] - offset, sorted(e[3])] + if e[:2] == ["B", "IDLE_ONE"]: + even[i] = [e[2] - offset, sorted(e[3])] + return odd, even + + +def main(args): + tests = controls() + price, admission = read(args.price, PRICE), read(args.admission, ADMISSION) + need(price["head"] == admission["head"] == HEAD and admission["exit"] == 0 and + price["caller_sha256"] == CALLER and price["limits"]["first_cases"] == CAP and + price["limits"]["first_seconds"] == SECONDS, "price mismatch") + started = monotonic() + caller = read(args.caller, CALLER) + data = caller["types"]["B"] + n, off = data["roles"], data["offset"] + need((caller["stages"], n, off, len(data["ports"])) == (17, 36, 36, 8), "wrong Type B contract") + old, new = literal_stock(caller["events"], off) + need({str(k): v for k, v in old.items()} == price["odd_jobs"] and + {str(k): v for k, v in new.items()} == price["even_jobs"], "exact literal census differs") + keys = [{"odd": o, "even": e, "size": len(b)} for o, (_, a) in sorted(old.items()) + for e, (_, b) in sorted(new.items()) if set(a).isdisjoint(b)] + need(keys == price["keys"] and len(keys) == CAP, "exact key stock differs") + q = Q(1) + flattened = [] + offsets = [0] + for event in caller["events"]: + flattened.extend(gates(event, off, q)) + offsets.append(len(flattened)) + for i in range(n): + vector = basis(n, i) + for op in flattened: + apply(op, vector) + need(vector == basis(n, i), "old exact unit endpoint differs") + roles = {t: v[0] for t, v in (old | new).items()} + outcomes = [] + for key in keys: + if monotonic() - started >= SECONDS - 2: + break + a, b = sorted((key["odd"], key["even"])) + # Original old idles are identity at q=+1, unit body, so both boundaries can be omitted. + interval = flattened[offsets[a + 1]:offsets[b]] + witness = between(interval, roles[a], roles[b], n) + result = {"key": [key["odd"], key["even"]], "mask_size": key["size"], + "chronological_roles": [roles[a] + off, roles[b] + off]} + if witness is None: + result |= {"status": "provisional_projectors_equal"} + else: + side, role, value = witness + result |= {"status": "excluded", "exact_off_axis": [side, role + off, str(value)]} + outcomes.append(result) + unvisited = keys[len(outcomes):] + return {"status": "CAPPED" if unvisited else "EXHAUSTED", "head": HEAD, "price_sha256": PRICE, + "caller_sha256": CALLER, "admission_sha256": ADMISSION, "case_cap": CAP, + "runner_cap_seconds": SECONDS, "q": 1, "body": "unit", "old_endpoint_columns": n, + "controls": tests, "tested": len(outcomes), "outcomes": outcomes, + "counts": dict(Counter(row["status"] for row in outcomes)), "unvisited": unvisited, + "survivors": [row["key"] for row in outcomes if row["status"] != "excluded"]} + + +if __name__ == "__main__": + p = ArgumentParser() + for name in ("price", "admission", "caller"): + p.add_argument("--" + name, type=Path, required=True) + print(dumps(main(p.parse_args()), sort_keys=True, indent=2)) diff --git a/research/p104-type-b-odd-odd-idle-bound/inputs/pricing.py b/research/p104-type-b-odd-odd-idle-bound/inputs/pricing.py new file mode 100644 index 0000000000..40ec194017 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/inputs/pricing.py @@ -0,0 +1,82 @@ +"""Directed interval arithmetic and the retained signed BIT invoice.""" +from collections import Counter +from fractions import Fraction +from functools import cache + +TARGET = "10018846261809/2500000000000000" +SCALE = 10**49 + + +def rounded(x, upper): + scaled = SCALE*x + if upper: + return Fraction(-((-scaled.numerator) // scaled.denominator), SCALE) + return Fraction(scaled.numerator // scaled.denominator, SCALE) + + +@cache +def log_bounds(x): + z = (x-1)/(x+1) + terms = 60 + exact_partial = 2*sum(z**(2*i+1)/(2*i+1) for i in range(terms)) + tail = 2*z**(2*terms+1)/((2*terms+1)*(1-z*z)) + return rounded(exact_partial, False), rounded(exact_partial+tail, True) + + +@cache +def power_bounds(rank, k): + binary = 2**(rank.bit_length()-1) + shift = binary.bit_length()-1 + l2, u2 = log_bounds(Fraction(2)) + lo, hi = log_bounds(Fraction(rank, binary)) + lo, hi = k*(lo+shift*l2), k*(hi+shift*u2) + assert 0 <= lo <= hi < 1 + + def exponential(z, terms): + total = term = Fraction(1) + for i in range(1, terms+1): + term *= -z/i + total += term + return total + + return rounded(rank*exponential(hi, 35), False), rounded(rank*exponential(lo, 34), True) + + +def cost(hist, k): + lower = upper = Fraction(0) + for r, n in hist.items(): + a, b = (n*x for x in power_bounds(r, k)) + lower += min(a, b) + upper += max(a, b) + return lower, upper + + +def profile(invoice, native, word, ranks): + copies = invoice["native_calls"] + assert copies == len(invoice["native_instances"]) == 36 + assert {tuple((r["stage"], r["copy"])) for r in invoice["native_instances"]} == { + (stage, which) for stage in range(1, 19) for which in (0, 1) + } + assert all(r["ports"] == 111 for r in invoice["native_instances"]) + assert native == Counter({int(r): n for r, n in invoice["native_paid"].items()}) + assert sum(native.values()) == 2871 + caller_paid = {1: 444, **{r: 444 for r in range(7, 57, 7)}} + assert invoice["event_counts"]["QUERY"]*111 == caller_paid[1] + assert invoice["event_counts"]["IDLE_ONE"]*111 == 8*444 + full_paid = Counter({r: copies*n for r, n in native.items()}) + full_paid.update(caller_paid) + + helpers = Counter(ranks[word["final"][j]]-ranks[word["start"][j]] + for j in range(222, word["public"])) + assert helpers == Counter({int(r): n for r, n in invoice["native_helpers"].items()}) + caller_targets = {**{r: 444 for r in range(8, 65, 7)}, 127: 222} + full_targets = Counter({r: copies*n for r, n in helpers.items()}) + full_targets.update(caller_targets) + assert full_paid == Counter({int(r): n for r, n in invoice["paid"].items()}) + assert full_targets == Counter({int(r): n for r, n in invoice["targets"].items()}) + assert sum(full_paid.values()) == invoice["paid_jobs"] + assert sum(full_targets.values()) == invoice["productive_fields"] + signed = full_targets.copy() + signed.subtract(full_paid) + assert sum(r*n for r, n in signed.items()) == invoice["rank_surplus"] + return signed, copies diff --git a/research/p104-type-b-odd-odd-idle-bound/receipts/CONTACT-SETS.json b/research/p104-type-b-odd-odd-idle-bound/receipts/CONTACT-SETS.json new file mode 100644 index 0000000000..927be8495e --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/receipts/CONTACT-SETS.json @@ -0,0 +1,696 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caps": [ + 4, + 16, + 20 + ], + "contact_windows": [ + { + "clock": 1339, + "kind": "B", + "op": "IDLE_ODD", + "ports": 8, + "rank": 9, + "role": 68, + "selected_stages": [ + 8 + ], + "slot": 68, + "window": [ + 0, + 4783 + ] + }, + { + "clock": 1340, + "kind": "B", + "op": "IDLE_ODD", + "ports": 8, + "rank": 9, + "role": 69, + "selected_stages": [ + 8 + ], + "slot": 69, + "window": [ + 0, + 4783 + ] + }, + { + "clock": 2970, + "kind": "B", + "op": "IDLE_ODD", + "ports": 8, + "rank": 9, + "role": 70, + "selected_stages": [ + 9 + ], + "slot": 70, + "window": [ + 0, + 4783 + ] + }, + { + "clock": 2971, + "kind": "B", + "op": "IDLE_ODD", + "ports": 8, + "rank": 9, + "role": 71, + "selected_stages": [ + 9 + ], + "slot": 71, + "window": [ + 0, + 4783 + ] + } + ], + "events": 4783, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "pins": { + "inputs/7113-CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/7295-CERTIFICATE.json": "0587aeb7029b6e066f73701748075f7786056894bf8803690f66cf223bfa6d8c", + "inputs/7295-PROVENANCE.json": "fe28d47df369365523aaafd4d26e506fe2cdc2905c5962626a618eb612294fb0", + "inputs/7295-trace_and_price.py": "feebbca6d093d92f4e165b4aa940fb0628e5deaa4635488c9916aafe08aebc76", + "inputs/PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872" + }, + "projectors": { + "1339": [ + [ + 32, + 32, + "1" + ] + ], + "1340": [ + [ + 33, + 33, + "1" + ] + ], + "2970": [ + [ + 34, + 34, + "1" + ] + ], + "2971": [ + [ + 35, + 35, + "1" + ] + ] + }, + "schedules": [ + { + "added": { + "8": [], + "9": [ + 32 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339 + ], + "pairs": [ + [ + 1339, + 2970 + ] + ], + "removed": { + "8": [], + "9": [ + 34 + ] + }, + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 34 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2970 + ], + "pairs": [ + [ + 1339, + 2970 + ] + ], + "removed": { + "8": [ + 32 + ], + "9": [] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "added": { + "8": [], + "9": [ + 32 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339 + ], + "pairs": [ + [ + 1339, + 2971 + ] + ], + "removed": { + "8": [], + "9": [ + 35 + ] + }, + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 35 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2971 + ], + "pairs": [ + [ + 1339, + 2971 + ] + ], + "removed": { + "8": [ + 32 + ], + "9": [] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "added": { + "8": [], + "9": [ + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1340 + ], + "pairs": [ + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [], + "9": [ + 34 + ] + }, + "witnesses": { + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "added": { + "8": [ + 34 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2970 + ], + "pairs": [ + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [ + 33 + ], + "9": [] + }, + "witnesses": { + "8": [ + 33, + 33, + "-1" + ] + } + }, + { + "added": { + "8": [], + "9": [ + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1340 + ], + "pairs": [ + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [], + "9": [ + 35 + ] + }, + "witnesses": { + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "added": { + "8": [ + 35 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2971 + ], + "pairs": [ + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [ + 33 + ], + "9": [] + }, + "witnesses": { + "8": [ + 33, + 33, + "-1" + ] + } + }, + { + "added": { + "8": [], + "9": [ + 32, + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339, + 1340 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [], + "9": [ + 34, + 35 + ] + }, + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 35 + ], + "9": [ + 32 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339, + 2971 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [ + 33 + ], + "9": [ + 34 + ] + }, + "witnesses": { + "8": [ + 33, + 33, + "-1" + ], + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 34 + ], + "9": [ + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 2970, + 1340 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [ + 32 + ], + "9": [ + 35 + ] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ], + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "added": { + "8": [ + 34, + 35 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2970, + 2971 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "removed": { + "8": [ + 32, + 33 + ], + "9": [] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "added": { + "8": [], + "9": [ + 32, + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339, + 1340 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [], + "9": [ + 34, + 35 + ] + }, + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 34 + ], + "9": [ + 32 + ] + }, + "decision": "derivative excluded", + "kept": [ + 1339, + 2970 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [ + 33 + ], + "9": [ + 35 + ] + }, + "witnesses": { + "8": [ + 33, + 33, + "-1" + ], + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "added": { + "8": [ + 35 + ], + "9": [ + 33 + ] + }, + "decision": "derivative excluded", + "kept": [ + 2971, + 1340 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [ + 32 + ], + "9": [ + 34 + ] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ], + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "added": { + "8": [ + 34, + 35 + ], + "9": [] + }, + "decision": "derivative excluded", + "kept": [ + 2971, + 2970 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "removed": { + "8": [ + 32, + 33 + ], + "9": [] + }, + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + } + ], + "unresolved": 0 +} diff --git a/research/p104-type-b-odd-odd-idle-bound/receipts/PRIMARY.json b/research/p104-type-b-odd-odd-idle-bound/receipts/PRIMARY.json new file mode 100644 index 0000000000..d5d9891802 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/receipts/PRIMARY.json @@ -0,0 +1,419 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caps": [ + 4, + 16, + 20 + ], + "controls": [ + "swapped projector", + "negative column shear", + "fractional row shear", + "full original unit-body endpoint", + "equal projector cancellation" + ], + "events": 4783, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "pins": { + "inputs/7113-CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "inputs/direct_impulse.py": "d04426aed9528aedc6400d384d7fd13c6531e5e3e6592a7eea4faee46c61e004" + }, + "projectors": { + "1339": [ + [ + 32, + 32, + "1" + ] + ], + "1340": [ + [ + 33, + 33, + "1" + ] + ], + "2970": [ + [ + 34, + 34, + "1" + ] + ], + "2971": [ + [ + 35, + 35, + "1" + ] + ] + }, + "schedules": [ + { + "decision": "derivative excluded", + "kept": [ + 1339 + ], + "pairs": [ + [ + 1339, + 2970 + ] + ], + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2970 + ], + "pairs": [ + [ + 1339, + 2970 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1339 + ], + "pairs": [ + [ + 1339, + 2971 + ] + ], + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2971 + ], + "pairs": [ + [ + 1339, + 2971 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1340 + ], + "pairs": [ + [ + 1340, + 2970 + ] + ], + "witnesses": { + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2970 + ], + "pairs": [ + [ + 1340, + 2970 + ] + ], + "witnesses": { + "8": [ + 33, + 33, + "-1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1340 + ], + "pairs": [ + [ + 1340, + 2971 + ] + ], + "witnesses": { + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2971 + ], + "pairs": [ + [ + 1340, + 2971 + ] + ], + "witnesses": { + "8": [ + 33, + 33, + "-1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1339, + 1340 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1339, + 2971 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "witnesses": { + "8": [ + 33, + 33, + "-1" + ], + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2970, + 1340 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ], + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2970, + 2971 + ], + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1339, + 1340 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "witnesses": { + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 1339, + 2970 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "witnesses": { + "8": [ + 33, + 33, + "-1" + ], + "9": [ + 32, + 32, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2971, + 1340 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ], + "9": [ + 33, + 33, + "1" + ] + } + }, + { + "decision": "derivative excluded", + "kept": [ + 2971, + 2970 + ], + "pairs": [ + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ] + ], + "witnesses": { + "8": [ + 32, + 32, + "-1" + ] + } + } + ], + "unresolved": 0 +} diff --git a/research/p104-type-b-odd-odd-idle-bound/receipts/SHA256.json b/research/p104-type-b-odd-odd-idle-bound/receipts/SHA256.json new file mode 100644 index 0000000000..a91f428f8c --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/receipts/SHA256.json @@ -0,0 +1,5 @@ +{ + "CONTACT-SETS.json": "52ec9535058018cc5ce25eb1194a80a6bbeeae03fe598f15125415bd8ca7668b", + "PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "PRIMARY.json": "5ee2e636b438a569b29597cadc58b44b0b9205f39e52cf71ceb96ae9301b893f" +} diff --git a/research/p104-type-b-odd-odd-idle-bound/replay.py b/research/p104-type-b-odd-odd-idle-bound/replay.py new file mode 100644 index 0000000000..1136a229b3 --- /dev/null +++ b/research/p104-type-b-odd-odd-idle-bound/replay.py @@ -0,0 +1,152 @@ +"""Reproduce all distinct-mask odd-idle union prices and exclusions.""" +from argparse import ArgumentParser +from gzip import decompress +from hashlib import sha1, sha256 +from json import dumps, loads +from pathlib import Path +from subprocess import run +from tempfile import TemporaryDirectory +import sys + +ROOT = Path(__file__).resolve().parent + + +def unique(items): + out = dict(items) + if len(out) != len(items): + raise ValueError("duplicate JSON key") + return out + + +def decoded(raw): + return loads(raw, object_pairs_hook=unique) + + +def digest(raw): + return sha256(raw).hexdigest() + + +def source(name): + p = Path(name) + if p.is_absolute() or ".." in p.parts or p.as_posix() != name: + raise ValueError(f"invalid relative dependency {name}") + return (ROOT/p).read_bytes() + + +def checked_inputs(): + pins = decoded(source("LOCAL-PINS.json")) + for name, expected in pins.items(): + if digest(source(name)) != expected: + raise ValueError(f"changed package dependency {name}") + provenance = decoded(source("PROVENANCE.json")) + for name, row in provenance["public_inputs"].items(): + raw = source(name) + if row.get("payload") == "gzip": + raw = decompress(raw) + assert digest(raw) == row["sha256"] + assert sha1(f"blob {len(raw)}\0".encode() + raw).hexdigest() == row["git_blob"] + admission = decoded(source("inputs/ADMITTED.json")) + assert admission["head"] == provenance["comparator"]["head"] + assert admission["caller"] == provenance["caller"]["head"] + assert admission["kappa"] == "0.00364665195644" and admission["exit"] == 0 + predecessor = decoded(source("inputs/7357-SHA256.json")) + assert predecessor["PRICE.json"] == digest(source("inputs/R85-PRICE.json")) + + +def write(path, raw): + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(raw) + + +def invoke(script, *args, checked=True): + p = run([sys.executable,"-I","-B",str(script),*args],capture_output=True,timeout=28) + if checked and p.returncode: + sys.stderr.write(p.stderr.decode(errors="replace")) + p.check_returncode() + return p + + +def normalized(report): + rows = {} + for row in report["schedules"]: + key = tuple(map(tuple,row["pairs"])), tuple(row["kept"]) + assert key not in rows + rows[key] = row["decision"], row["witnesses"] + return rows + + +def replay(root): + checked_inputs() + hashes = decoded(source("receipts/SHA256.json")) + outputs = {} + + def save(name, script, *args): + raw = invoke(script,*args).stdout + assert digest(raw) == hashes[name], f"changed deterministic receipt {name}" + outputs[name] = raw + return decoded(raw) + + quote_root = root/"quote" + quote = quote_root/"quote.py" + write(quote, source("engines/quote.py")) + for name in ("R85-PRICE.json","pricing.py"): + write(quote_root/"inputs"/name,source("inputs/"+name)) + price = save("PRICE.json",quote) + stage = root/"stage" + write(stage/"inputs/PRICE.json",outputs["PRICE.json"]) + for name in ("7113-CALLER.json.gz","direct_impulse.py","7295-CERTIFICATE.json", + "7295-PROVENANCE.json","7295-trace_and_price.py"): + write(stage/"inputs"/name,source("inputs/"+name)) + lead = stage/"lead/projectors.py" + audit = stage/"independent/contact_sets.py" + write(lead,source("engines/projectors.py")) + write(audit,source("engines/contact_sets.py")) + primary = save("PRIMARY.json",lead) + independent = save("CONTACT-SETS.json",audit,"--root",str(stage)) + for name in ("PRIMARY.json","CONTACT-SETS.json"): + assert outputs[name] == source("receipts/"+name) + assert primary["head"] == independent["head"] == price["head"] + assert primary["caller"] == independent["caller"] == price["caller"] + assert primary["events"] == independent["events"] == 4783 + assert primary["caps"] == independent["caps"] == [4,16,20] + assert primary["projectors"] == independent["projectors"] + assert primary["unresolved"] == independent["unresolved"] == 0 + schedules = normalized(primary) + assert schedules == normalized(independent) and len(schedules) == 16 + assert sum(len(key[0]) == 1 for key in schedules) == 8 + assert all(v[0] == "derivative excluded" and v[1] for v in schedules.values()) + + def reject(path, script, *args, message=b"changed dependency"): + original = path.read_bytes() + try: + path.write_bytes(original+b" ") + result = invoke(script,*args,checked=False) + assert result.returncode == 1 and message in result.stderr + finally: + path.write_bytes(original) + + reject(quote_root/"inputs/R85-PRICE.json",quote,message=b"changed inputs/R85-PRICE.json") + reject(stage/"inputs/PRICE.json",lead) + reject(stage/"inputs/7113-CALLER.json.gz",lead) + reject(stage/"inputs/7295-CERTIFICATE.json",audit,"--root",str(stage)) + return outputs + + +def main(): + assert __debug__ + if sys.version_info[:2] != (3,12): + raise RuntimeError("CPython 3.12 is required") + parser = ArgumentParser(description=__doc__) + parser.add_argument("--out",type=Path) + args = parser.parse_args() + with TemporaryDirectory(prefix="odd-idle-") as scratch: + outputs = replay(Path(scratch)) + if args.out: + args.out.mkdir(parents=True,exist_ok=False) + for name,raw in outputs.items(): + write(args.out/name,raw) + print("PASS_ODD_IDLE_UNIONS 16 exact schedules excluded; 0 unresolved; 4 mutation controls") + + +if __name__ == "__main__": + main()