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-multiple-low-fusion-bound/LOCAL-PINS.json b/research/p104-multiple-low-fusion-bound/LOCAL-PINS.json new file mode 100644 index 0000000000..b1aeb51312 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/LOCAL-PINS.json @@ -0,0 +1,17 @@ +{ + "PROVENANCE.json": "a171c1d8bf135549bc0f5c6c6a823f3b3b59c29bcd9f4278e6cc0d044860fbb9", + "engines/bank_bound.py": "012f7d6ae85c1af477ee0b0abfc0e44b347daaca1235275a60fc88ea4ba05bfb", + "engines/check_multilow.py": "ff1734ed03ebd37a9ff055c9862d2e2659612b4ff9eb30be3aec57b301354136", + "engines/local.py": "4397fb4e2bf5a36f58e7732e8d9c5500d24d91a0ef0d8a1e3941e447ceaf495e", + "engines/multi_low.py": "f3a73c4e45b8e3d15123280599b31781ddd22f712865a7d4faf7345a1f36e716", + "engines/rank.py": "e1b081552812a4132a20a2c062cf3d5c119e45292c5ef55bf25372adb21cf240", + "inputs/ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "inputs/PR7338-SHA256.json": "25425e3a6fc025666f50faea07e9d41fa1924a44c121c5503b122f082bed2542", + "inputs/R68.json.gz": "fa78bd67a71a9c0447132e94ef6baa0979b91d5b0b2477018a218c507aef59f1", + "inputs/R69.json.gz": "cb8284ce49b0e08a00a297ed1e2755255a70c4df39d8afbb9ef441406d759608", + "inputs/R70.json.gz": "97b79759cd1d4d5e94d2ca441cc86211638b5234929c6522b407fcedd1e26a24", + "inputs/RANK-STOCK.json": "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "inputs/WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "receipts/SHA256.json": "3365fc5f4c05544efa61375a0b591522926d954dfbb9dd0eae9bc82ff15dcefb" +} diff --git a/research/p104-multiple-low-fusion-bound/NOTICE b/research/p104-multiple-low-fusion-bound/NOTICE new file mode 100644 index 0000000000..2347015a45 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/NOTICE @@ -0,0 +1,6 @@ +Apache-2.0. + +#7334 supplies the exact retimed word and #7113 the signed caller. +#7298 and #7338 supply the directed tariff, admitted invoice and +sealed geometry. #6765 and #6529 supply older donor-span and +compensated-fusion precedents. OpenAI Codex and subagents materially assisted. diff --git a/research/p104-multiple-low-fusion-bound/PROOF.md b/research/p104-multiple-low-fusion-bound/PROOF.md new file mode 100644 index 0000000000..83e9954c49 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/PROOF.md @@ -0,0 +1,80 @@ +# Fixed geometry and exact multiple-low obstruction + +The exact #7334 word and #7338 geometry bind the 3,422 eligible +paid pair keys under the original closed retime model. It admits +components of at most 24 scalar events and 20 public roles, +with fixed protected roles, legal common cut and an available +stationary owned field. Its 456 geometric survivors contain eight +banks with at least two eligible low-chart peers. All eight have +exactly one eligible high peer. This test keeps those eight +literal blocks, paid clocks, auxiliary ownership, boundary charts +and productive targets fixed. It changes only the allowed low +response space from one peer to the full existing bank. + +For a bank, let M be its exact normalized scalar block, h the +public helper, L the full low bank, and q its singleton high peer. +A forward replacement would use +`v=e_h+Σ_(i∈L) λ_i e_i`. Its image must vanish outside `{h,q}`. +The possible image at h is the disposable local owned value. +An exact dirty public return separately requires +`e_h^T M=α e_h^T+β e_q^T M` with nonzero α. The readout relation +does not depend on the low coefficients. + +An exact nonzero 2×2 determinant on two coordinates outside h +excludes the required row proportionality. The independent +reverse impulse walk obtains these signed determinants. + +| Helper h | High peer q | Exterior coordinates | Determinant | +| ---: | ---: | --- | ---: | +| 403 | 1165 | 1165, 106 | 1/2 | +| 1165 | 403 | 106, 1175 | 1/2 | +| 415 | 1175 | 414, 106 | −1 | +| 422 | 1182 | 1182, 51 | 1 | +| 431 | 1188 | 430, 104 | −1 | +| 1175 | 415 | 106, 414 | −1 | +| 1188 | 431 | 104, 430 | −1 | + +Helper 1182 at cut 33546 uses low donors 422, 423 and 1183 +and high peer 422. Its readout passes the exact necessary test. +For its forward relation, restrict all columns to coordinates +outside `{1182,422}`. The three donor columns have exact rank two. +Appending the required helper column raises rank to three. Exact +forward impulses and rational elimination therefore exclude all +low-coefficient choices. The independent result agrees with the +lead engine's full residual. The lead reuses three sealed exact +readout exclusions and independently reconstructs the other five +cases. The second engine directly rechecks all eight. + +No case survives even with unrestricted rational coefficients +and free ancillary work. There is no literal construction or +new κ claim. The result leaves different geometry, a different +high bank, and changed physical ownership outside its scope. + +## Directed stock price + +The signed #7334 invoice has 17 copies, 110,519 paid positions, +22,461 productive fields, rank surplus 1,424 and no empty-root +credit. One fusion of ranks a and b changes the complete paid +histogram by removing 17 of each old rank and adding 17 of rank +a+b. Productive fields and paid rank mass stay fixed. Six of the +eight pairs have ranks 1+1, and two have ranks 1+2. + +At the exact comparator crossing upper, the maximum one-edit +gross saving is + +```text +9446257548647027791039243626040418277611444313/80000000000000000000000000000000000000000000000 +``` + +This is about 0.118078219358088 raw. An additional rank-one paid +position erases the one-edit margin. The eight pairs use 16 distinct +paid calls. Even granting that all edits compose and all extra costs +are free, the combined optimistic gross upper is about 0.751149269958289 +raw at the incumbent crossing. + +At the fixed moonshot κ `0.0040075385047236`, the same optimistic +eight-edit invoice has positive gross credit at most 0.825349916685 +against an incumbent deficit about 139.766926170866. Its full directed +upper margin remains below −138.9415762541808 raw. This is a price +exclusion for this narrow family. The exact support result reduces +its compatible one-edit saving to zero at the incumbent. diff --git a/research/p104-multiple-low-fusion-bound/PROVENANCE.json b/research/p104-multiple-low-fusion-bound/PROVENANCE.json new file mode 100644 index 0000000000..fd2a31c475 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/PROVENANCE.json @@ -0,0 +1,37 @@ +{ + "files": { + "inputs/ADMITTED.json": { + "commit": "349996445176e934ffb3c76813adcd230ca8f783", + "git_blob": "464c89e45c4eca230c099e8bac784a90200a5069", + "path": "research/p104-compensated-fusion-readout-bound/inputs/ADMITTED.json", + "sha256": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/349996445176e934ffb3c76813adcd230ca8f783/research/p104-compensated-fusion-readout-bound/inputs/ADMITTED.json", + "uncompress": false + }, + "inputs/PR7338-SHA256.json": { + "commit": "349996445176e934ffb3c76813adcd230ca8f783", + "git_blob": "8a4d2a0cf37422891787610ba0ae95b869e29751", + "path": "research/p104-compensated-fusion-readout-bound/receipts/SHA256.json", + "sha256": "25425e3a6fc025666f50faea07e9d41fa1924a44c121c5503b122f082bed2542", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/349996445176e934ffb3c76813adcd230ca8f783/research/p104-compensated-fusion-readout-bound/receipts/SHA256.json", + "uncompress": false + }, + "inputs/WORD.json.gz": { + "commit": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "git_blob": "73f43007192eb5a38eb5abb591b871df3e52c7cd", + "path": "research/p104-helper-319-fused-return/WORD.json.gz", + "sha256": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "source": "https://github.com/Clear1nsight/integer-mult-bounds/blob/aaeec8c0acf01e99a5f331ef363a698d9c084ace/research/p104-helper-319-fused-return/WORD.json.gz", + "uncompress": false + }, + "inputs/pricing.py": { + "commit": "c522451caf287bb3c16eaece72be4c263315dca4", + "git_blob": "40ec194017bda1d524bba4f07b188c53281419d0", + "path": "research/adjacent-owned-add-exchange-bound/pricing.py", + "sha256": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/c522451caf287bb3c16eaece72be4c263315dca4/research/adjacent-owned-add-exchange-bound/pricing.py", + "uncompress": false + } + }, + "schema_version": 1 +} diff --git a/research/p104-multiple-low-fusion-bound/README.md b/research/p104-multiple-low-fusion-bound/README.md new file mode 100644 index 0000000000..ea4082563f --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/README.md @@ -0,0 +1,68 @@ +# Multiple low peers in a fixed compensated fusion + +**NO VERIFIED GAIN. Conditional κ change 0%.** On exact +[#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334), +the frozen compensated-fusion geometry contains eight sites with +more than one low-chart donor. Seven have no valid dirty readout +even with arbitrary rational low coefficients. The remaining site, +helper 1182, fails the full low-donor exterior span. Its exact +donor and augmented ranks are two and three. Both rational checks +agree on every site. Zero cases remain unresolved and the compatible +paid saving upper is zero. + +The edit would fuse one paid public rank pair, retain the existing +closed retime, all other paid itineraries and productive targets, +and allow the full existing low bank. Every site has a singleton +eligible high peer. The exact one-edit optimistic price upper is +about 0.118078219358088 raw before support. See [PROOF.md](PROOF.md). + +## Evidence and replay + +The comparator is independently reproduced #7334 head +`aaeec8c0acf01e99a5f331ef363a698d9c084ace` at κ +`0.00364665195644`, with the exact +[#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +caller at `07a76c5e2738882c0cb322278e56f6cae3c9885d`. +The five inherited premises are native all-columns, owned erasure, +compiler, precision/tape and analytic recovery. The package includes +the exact compressed word, admission, pricing and three prerequisite +receipts authenticated against the public #7338 manifest. + +From a clean checkout use CPython 3.12 with assertions enabled. + +```sh +python3.12 -I -B research/p104-multiple-low-fusion-bound/replay.py +python3.12 -B scripts/research_package.py --package research/p104-multiple-low-fusion-bound +``` + +Use `--out fresh-directory` to save the three exact regenerated +receipts. The standalone replay uses committed files and the Python +standard library. It prices the eight selected banks before decoding +the word, compares the two exact tests, and rejects a changed geometry +receipt and changed rank stock. It retains the earlier frozen geometry. + +## Open next questions + +A changed legal cut, larger closed block or different ownership +contract could expose a different donor bank. First pin one such +family and bound its full price, including added routing and setup. +Any surviving exact response must still pass signed arbitrary-input +forward and adjoint action, dirty restoration, compiler, precision, +tape, caller and outer checks. One added rank-one paid position on +the complete signed invoice erases the tested one-edit price gain. + +## Credit + +[#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) +supplies the exact retimed word and dirty restoration, +[#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +the signed caller, and +[#7298](https://github.com/CrocSwap/integer-mult-bounds/pull/7298) +the directed tariff. [#7338](https://github.com/CrocSwap/integer-mult-bounds/pull/7338) +supplies the prior admission, rank stock and sealed one-low geometry. +This result tests the multiple-low scope that it leaves open. +[#6765](https://github.com/CrocSwap/integer-mult-bounds/pull/6765) +supplies an older multi-donor span method and +[#6529](https://github.com/CrocSwap/integer-mult-bounds/pull/6529) +a compensated-fusion precedent. OpenAI Codex and subagents materially +assisted. diff --git a/research/p104-multiple-low-fusion-bound/SOURCES.json b/research/p104-multiple-low-fusion-bound/SOURCES.json new file mode 100644 index 0000000000..e8c2f265cd --- /dev/null +++ b/research/p104-multiple-low-fusion-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-multiple-low-fusion-bound/TASK.json b/research/p104-multiple-low-fusion-bound/TASK.json new file mode 100644 index 0000000000..c233b5a667 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/TASK.json @@ -0,0 +1,117 @@ +{ + "actual_scope": "On exact #7334, admit the full low-chart public bank at each of eight frozen retimed compensated fusion sites, keeping the singleton high readout, existing geometry, paid itineraries and productive fields fixed.", + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent verification and packaging.", + "author": "Multiple-low compensated fusion research", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "bottleneck_link": "One paid rank-pair fusion could reduce the signed complex recurrence while leaving productive rank and paid rank mass fixed.", + "budget_minutes": 5, + "evidence": "The sealed stock yields eight exact banks. Seven fail high readout and the remaining pivot 1182 fails full low exterior rank 2 to 3. Both exact engines agree, with zero unresolved and zero compatible saving.", + "open_questions": [ + { + "blocked_by": "Any surviving construction needs exact signed physical action, ownership, restoration and all caller, precision and tape costs.", + "first_step": "Pin one changed geometry and preprice the full signed invoice before any exact support test.", + "question": "Can a different legal cut or larger chronological block supply a usable high readout and low exterior cancellation?", + "why_it_matters": "None of the existing eight multiple-low banks can pass both conditions." + } + ], + "original_card": { + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "existing_checks": [ + { + "evidence": "research/p104-literal-slot-defect/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4133: literal-slot defect", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "88666f1dee93fbd85b31fd5d6f91a219e111b5f4", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-commutation-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4136: uniform commutation gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "281ce601a8be9db470de630759179c23e1dfaa88", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-encoding-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4140: uniform encoding gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "de25c6525aa866962309df5d107b32d55e6e5628", + "status": "author-checked" + }, + { + "evidence": "research/p104-source-chart-shortcut/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4153: source-chart shortcut exhausts its optimistic allowance", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "9123241fea53df77e51ffe30d9aca1625d4bf3a8", + "status": "author-checked" + }, + { + "evidence": "research/p104-fiber-tag-seam/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4154: fiber-tag seam mismatch", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "4ffcdaee5d6255a9cea1fe53a5424435068089d0", + "status": "author-checked" + }, + { + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "status": "reviewed" + } + ], + "first_experiment": "Start with the selected #5599 emitted word and review pending #5718 distinct input/output bases plus #5717/#5719 coverage before claiming work. Pick one uncovered source word, helper group and cut region. Prove the arbitrary-input relation and legal entry/exit corrections, then compare full target and paid profiles. Reject if completion, owned lifetimes or consumer costs repay the gain. A static pairing rank alone is not a physical split.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "id": "p104-side-correction", + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "overlap_terms": [ + "P104", + "helper basis", + "helper split", + "5718", + "dyadic capacity" + ], + "question": "Can joint helper bases and a legal causal split improve the complete P104 productive/paid invoice?", + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/p104-helper-subspace-splits/README.md", + "research/dyadic-helper-channel-capacity/README.md" + ] + }, + "outcome": "negative-result", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "Expands the predecessor one-low input space to all available cocharted low peers without changing its fixed geometry.", + "scope_status": "changed", + "stop_rule": "Price all eight banks from sealed receipts, then exhaust eight exact readout-first cases or stop at 15 runner seconds. Build only on exact support and positive fully charged price.", + "task_id": "p104-side-correction" +} diff --git a/research/p104-multiple-low-fusion-bound/VERIFY.json b/research/p104-multiple-low-fusion-bound/VERIFY.json new file mode 100644 index 0000000000..a4fb62fa38 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/replay.py" + ], + "checks": "Authenticate exact source and public prior receipts, rebuild directed eight-bank price, replay both rational support engines, and reject changed geometry and price.", + "timeout_seconds": 120 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-multiple-low-fusion-bound/engines/bank_bound.py b/research/p104-multiple-low-fusion-bound/engines/bank_bound.py new file mode 100644 index 0000000000..8213d2a1f6 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/engines/bank_bound.py @@ -0,0 +1,103 @@ +"""Project the sealed geometry onto multiple low donors and reprice the stock.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from runpy import run_path +import argparse + +PINS = { + "r68_geometry": "ce9604444161b3532d02eb788cb3a24fbbdaf4c1354d596ac08a2c9edeb72c76", + "r69_geometry": "a2dd10737f5bfbd3818e6766df3890e445fd46f661af9521f5d724b7c56c1d45", + "r70_support": "34738b6d9031b3170a58f0cb590d81c01ea2c1038810008483d1c24dc7574150", + "rank_stock": "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "tariff": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", +} +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +TARGET = Q("0.0040075385047236") + + +def require(condition, text): + if not condition: + raise ValueError(text) + + +def checked(path, key): + raw = path.read_bytes() + require(sha256(raw).hexdigest() == PINS[key], f"stale {key}") + return raw + + +def rank_type(site): + return "+".join(map(str, sorted(site["rank_pair"]))) + + +def hkey(site): + return (site["h"], *site["move_clocks"], site["clock"]) + + +def histogram(obj): + return Counter({int(r): count for r, count in obj.items()}) + + +def main(args): + first = loads(checked(args.r68_geometry, "r68_geometry")) + second = loads(checked(args.r69_geometry, "r69_geometry")) + prior = loads(checked(args.r70_support, "r70_support")) + stock = loads(checked(args.rank_stock, "rank_stock")) + checked(args.tariff, "tariff") + cost = run_path(str(args.tariff))["cost"] + require(first["comparator_head"] == second["comparator_head"] == prior["head"] == stock["head"] == HEAD, + "comparison heads differ") + require(second["already_checked"] == len(first["visited"]) == 64 and not second["unvisited"], "geometry coverage") + require(second["continuation_keys"] == len(second["visited"]) == first["unresolved"] == 3358, "geometry counts") + sites = first["survivors"] + second["survivors"] + require(len(sites) == len({hkey(site) for site in sites}) == 456, "geometry survivor inventory") + candidates = [s for s in sites if len(s["low"]) > 1] + require(len(candidates) == 8 and all(len(s["high"]) == 1 for s in candidates), "exact multi-low inventory") + ranks = Counter(map(rank_type, candidates)) + require(ranks == {"1+1": 6, "1+2": 2}, "expected rank types") + rank_prices = stock["rank_prices"] + delta = Counter() + for kind, number in ranks.items(): + for rank, change in rank_prices[kind]["paid_delta"].items(): + delta[int(rank)] -= number * change + paid = histogram(stock["old_complete_paid"]) + signed = histogram(stock["complete_targets"]) + signed.subtract(paid) + signed_all = signed.copy() + signed_all.update(delta) + pre, post, target_credit = (cost(row, TARGET) for row in (signed, signed_all, delta)) + require(pre[1] < post[1] < 0 and target_credit[0] > 0, "target arithmetic") + require(len({t for s in candidates for t in s["move_clocks"]}) == 16, "unexpected shared paid call") + previous = Counter(tuple(row["key"][:4]) for row in prior["outcomes"] + if row["status"] == "dirty return readout failed" and row["key"][-1] is not None) + rows = [{"key": s["key"], "h": s["h"], "chart_path": s["chart_path"], "cut": s["clock"], + "low": s["low"], "high": s["high"], "rank_type": rank_type(s), + "prior_readout_excluded": previous[hkey(s)] > 0} for s in candidates] + require({row["h"] for row in rows if row["prior_readout_excluded"]} == {403, 422, 431}, + "previously proved readout exclusions") + max_credit = max(Q(rank_prices[kind]["credit"][1]) for kind in ranks) + all_credit = sum(count * Q(rank_prices[kind]["credit"][1]) for kind, count in ranks.items()) + result = { + "head": HEAD, "inputs": PINS, "geometry_pairs": 3422, "geometry_survivors": len(sites), + "multi_low_banks": len(candidates), "one_edit_cap": 1, "distinct_paid_calls": 16, + "bank_shapes": dict(Counter(f'{len(s["low"])}+{len(s["high"])}' for s in candidates)), + "rank_types": dict(ranks), "rows": rows, + "full_family_global_gross_upper": stock["one_edit_optimistic_upper"], + "one_edit_comparator_gross_upper": str(max_credit), + "all_eight_comparator_gross_upper": str(all_credit), + "target": str(TARGET), "target_old_margin": list(map(str, pre)), + "target_all_eight_gross_credit": list(map(str, target_credit)), + "target_all_eight_margin": list(map(str, post)), + "scope": "Bound from sealed receipts, no literal word decoding. All eight simultaneously grants every shared geometry and all scalar/physical costs free.", + } + print(dumps(result, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + p = argparse.ArgumentParser() + for key in PINS: + p.add_argument("--" + key.replace("_", "-"), type=Path, required=True) + main(p.parse_args()) diff --git a/research/p104-multiple-low-fusion-bound/engines/check_multilow.py b/research/p104-multiple-low-fusion-bound/engines/check_multilow.py new file mode 100644 index 0000000000..821d136012 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/engines/check_multilow.py @@ -0,0 +1,198 @@ +"""Independent exact readout-first check on the eight frozen R74 banks.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +from time import monotonic +import argparse +import gzip +import json + +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +PINS = { + "banks": "9b17806949c347926b7f95bb70d207e89ca3ed1c6cf78f6729652b3728993c01", + "g68": "ce9604444161b3532d02eb788cb3a24fbbdaf4c1354d596ac08a2c9edeb72c76", + "g69": "a2dd10737f5bfbd3818e6766df3890e445fd46f661af9521f5d724b7c56c1d45", + "admission": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "word": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", +} +CASE_CAP, TIME_CAP = 8, 15 + + +def require(ok, reason): + if not ok: + raise ValueError(reason) + + +def read(path, name): + raw = path.read_bytes() + require(sha256(raw).hexdigest() == PINS[name], "changed input " + name) + return raw + + +def adjoint(body, roles, output): + functional = {r: Q(r == output) for r in roles} + for event in reversed(body): + op, dst = event[:2] + if op == "ADD": + functional[event[2]] += Q(event[3]) * functional[dst] + else: + require(op == "SCALE", "invalid component operation") + functional[dst] *= Q(event[2]) + return functional + + +def forward(body, roles, input_role): + vector = {r: Q(r == input_role) for r in roles} + for event in body: + op, dst = event[:2] + if op == "ADD": + vector[dst] += Q(event[3]) * vector[event[2]] + else: + require(op == "SCALE", "invalid component operation") + vector[dst] *= Q(event[2]) + return vector + + +def readout(body, roles, h, q): + want = adjoint(body, roles, h) + donor = adjoint(body, roles, q) + exterior = [r for r in roles if r != h] + pivot = next((r for r in exterior if donor[r]), None) + if pivot is None: + missing = next((r for r in exterior if want[r]), None) + if missing is not None: + return None, {"missing_donor_coordinate": missing, "required_value": str(want[missing])} + beta = Q(0) + else: + beta = want[pivot] / donor[pivot] + for r in exterior: + minor = want[r] * donor[pivot] - donor[r] * want[pivot] + if minor: + return None, {"exterior_coordinates": [pivot, r], "determinant": str(minor)} + alpha = want[h] - beta * donor[h] + require(alpha, "invertible block returned zero dirty-readout multiplier") + require(all(want[r] == alpha * (r == h) + beta * donor[r] for r in roles), "invalid readout coefficient") + return (alpha, beta), None + + +def solve_rectangular(rows, n): + matrix = [row.copy() for row in rows] + pivots = [] + for column in range(n): + first = len(pivots) + pivot = next((i for i in range(first, len(matrix)) if matrix[i][column]), None) + if pivot is None: + continue + matrix[first], matrix[pivot] = matrix[pivot], matrix[first] + v = matrix[first][column] + matrix[first] = [x / v for x in matrix[first]] + for i, row in enumerate(matrix): + if i != first and row[column]: + v = row[column] + matrix[i] = [x - v * y for x, y in zip(row, matrix[first], strict=True)] + pivots.append(column) + obstruction = next((row for row in matrix if not any(row[:-1]) and row[-1]), None) + if obstruction is not None: + return None, len(pivots) + result = [Q(0)] * n + for i, col in enumerate(pivots): + result[col] = matrix[i][-1] + require(all(sum(x * y for x, y in zip(row[:-1], result, strict=True)) == row[-1] for row in rows), + "forward witness does not solve exact equations") + return result, len(pivots) + + +def forward_gate(body, roles, h, low, q): + cols = {r: forward(body, roles, r) for r in [h, *low]} + exterior = [r for r in roles if r not in (h, q)] + equations = [[*(cols[p][i] for p in low), -cols[h][i]] for i in exterior] + answer, rank = solve_rectangular(equations, len(low)) + if answer is None: + return None, rank + combined = {i: cols[h][i] + sum(a * cols[p][i] for a, p in zip(answer, low, strict=True)) for i in roles} + require(all(not combined[i] for i in exterior), "forward output has exterior leakage") + coeff = {p: str(a) for p, a in zip(low, answer, strict=True) if a} + return {"low_coefficients": coeff, "high_correction": str(combined[q]), "owned_residual": str(combined[h])}, rank + + +def controls(): + h, a, b, q, other = range(5) + roles = [h, a, b, q, other] + events = [ + ["ADD", a, h, "-2", 7], + ["ADD", b, h, "1/2", 7], + ["ADD", q, h, "-3", 7], + ["SCALE", h, "-2", 7], + ["ADD", h, q, "1", 7], + ] + coefficients, failure = readout(events, roles, h, q) + require(coefficients == (Q(-2), Q(1)) and failure is None, "signed readout control") + found, rank = forward_gate(events, roles, h, [a, b], q) + require(found == {"low_coefficients": {a: "2", b: "-1/2"}, "high_correction": "-3", + "owned_residual": "-5"} and rank == 2, "two-low forward control") + require(forward_gate(events, roles, h, [a], q)[0] is None, "single donor accepted") + require(forward_gate(events + [["ADD", other, h, "1", 7]], roles, h, [a, b], q)[0] is None, + "extra exterior defect accepted") + _, rejection = readout(events + [["ADD", h, a, "1", 7]], roles, h, q) + require(rejection and "determinant" in rejection, "exterior readout corruption accepted") + return ["signed nonunit readout", "two low coefficients required", "extra exterior defect rejected", + "corrupted dirty readout rejected"] + + +def verify(args): + control = controls() + bank = json.loads(read(args.banks, "banks")) + geos = [json.loads(read(getattr(args, n), n)) for n in ("g68", "g69")] + admission = json.loads(read(args.admission, "admission")) + require(bank["head"] == admission["head"] == HEAD and admission["exit"] == 0, "wrong admission") + sites = {s["key"]: s for g in geos for s in g["survivors"] if len(s["low"]) > 1} + pending = bank["rows"] + require(len(sites) == len(pending) == len({x["key"] for x in pending}) == CASE_CAP, "wrong exact bank count") + require(set(sites) == {x["key"] for x in pending}, "different eligible low bank keys") + start = monotonic() + word = json.loads(gzip.decompress(read(args.word, "word")))["program"] + done, survivors = [], [] + for selected in pending: + if len(done) == CASE_CAP or monotonic() - start >= TIME_CAP: + break + site = sites[selected["key"]] + h, roles, low, high = (site[k] for k in ("h", "roles", "low", "high")) + require((h, low, high, site["clock"], site["chart_path"]) == + (selected["h"], selected["low"], selected["high"], selected["cut"], selected["chart_path"]), + "unmatched frozen geometry detail") + require(len(high) == 1 and 2 <= len(low) <= 4 and h not in low + high, "unexpected role stock") + q = high[0] + body = [word[t] for t in site["block"]] + require(all(e[-1] == site["chart_path"][1] for e in body), "wrong component chart") + coefficients, obstruction = readout(body, roles, h, q) + result = {"key": selected["key"], "h": h, "rank_type": selected["rank_type"], "readout_peer": q} + if coefficients is None: + done.append(result | {"status": "readout_excluded", "certificate": obstruction}) + continue + require(not selected["prior_readout_excluded"], "prior readout result disagrees") + support, rank = forward_gate(body, roles, h, low, q) + if support is None: + done.append(result | {"status": "forward_span_excluded", "exterior_donor_rank": rank, + "exterior_augmented_rank": rank + 1}) + continue + require(len(support["low_coefficients"]) >= 2, "contradiction to one-low exclusion") + alpha, beta = coefficients + winner = result | {"status": "rational_support_survives", "alpha": str(alpha), "beta": str(beta), **support} + done.append(winner) + survivors.append(winner) + unvisited = [x["key"] for x in pending[len(done):]] + return {"head": HEAD, "input_sha256": PINS, "status": "CAPPED" if unvisited else "EXHAUSTED", + "case_cap": CASE_CAP, "runner_cap_seconds": TIME_CAP, "controls": control, "tested": len(done), + "counts": dict(Counter(row["status"] for row in done)), "outcomes": done, + "unvisited": unvisited, "survivors": survivors} + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--controls-only", action="store_true") + for name in PINS: + parser.add_argument("--" + name, type=Path) + args = parser.parse_args() + result = {"status": "PASS", "controls": controls()} if args.controls_only else verify(args) + print(json.dumps(result, indent=2, sort_keys=True)) diff --git a/research/p104-multiple-low-fusion-bound/engines/local.py b/research/p104-multiple-low-fusion-bound/engines/local.py new file mode 100644 index 0000000000..dee76d9c75 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/engines/local.py @@ -0,0 +1,152 @@ +"""Exact paired block identities for a candidate virtual-zero public fusion.""" +from collections import Counter +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +import json +from pathlib import Path +import sys +from time import monotonic + +HEAD = "aaeec8c0acf01e99a5f331ef363a698d9c084ace" +WORD = "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" +PRICE = "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f" +CAP, SECONDS = 1197, 32 + + +def checked(path, digest): + data = Path(path).read_bytes() + if sha256(data).hexdigest() != digest: + raise ValueError(f"changed input: {Path(path).name}") + return data + + +def local_operator(tape, row): + roles = row["roles"] + middle = row["chart_path"][1] + matrix = {r:{q:Q(int(r==q)) for q in roles} for r in roles} + for t in row["block"]: + op, d, *a = tape[t] + assert a[-1] == middle and op in ("ADD","SCALE") + c = Q(a[-2]) + assert c and d in matrix + if op == "SCALE": + matrix[d] = {j:c*x for j,x in matrix[d].items()} + else: + s = a[0] + assert s in matrix and s!=d + matrix[d] = {j:matrix[d][j]+c*matrix[s][j] for j in roles} + return matrix + + +def ratio(left, right): + pivot = next((i for i in right if right[i]), None) + if pivot is None: + return Q(0) if not any(left.values()) else None + q = left[pivot]/right[pivot] + return q if all(left[i]==q*right[i] for i in left) else None + + +def legal(q): + denominator = q.denominator + for p in (2,3,5): + while denominator%p==0: + denominator//=p + return denominator == 1 and abs(q.numerator) <= 64 and q.denominator <= 1125*32 + + +def solve(M, h, p, q, high): + exterior = M.keys() - (set(high) | {h}) + lam = ratio({r:-M[r][h] for r in exterior}, {r:M[r][p] for r in exterior}) + if lam is None: + return "nonlocal forward leakage", None + raw = {r:v for r in M if (v:=M[r][h]+lam*M[r][p])} + discarded = raw.pop(h,Q(0)) + assert set(raw)<=set(high) + outside_h = M.keys() - {h} + beta = ratio({r:M[h][r] for r in outside_h}, + {r:M[q][r] if q is not None else Q(0) for r in outside_h}) + if beta is None: + return "dirty return readout failed", None + alpha = M[h][h] - (beta*M[q][h] if q is not None else 0) + if not alpha: + return "zero retained multiplier", None + assert all(M[h][r] == alpha*int(r==h)+(beta*M[q][r] if q is not None else 0) for r in M) + if (len(raw)+bool(lam)+bool(beta)+(alpha!=1)>6 or + any(not legal(v) for v in (lam,alpha,1/alpha,beta,*raw.values()))): + return "coefficient or ordinary-count gate", None + return "survives", dict(low_peer=p, readout=q, lam=str(lam), alpha=str(alpha), + beta=str(beta), discarded_aux_output=str(discarded), + image={r:str(v) for r,v in raw.items()}) + + +def controls(): + # ADD high from h followed by a nonzero SCALE on h, an invertible block. + M = {0:{0:Q(2),1:Q(0)},1:{0:Q(1),1:Q(1)}} + status, found = solve(M,0,1,None,[1]) + assert status=="survives" and found["alpha"]=="2" and found["image"]=={1:"1"} + assert found["discarded_aux_output"]=="2" + bad={r:a.copy() for r,a in M.items()} + bad[0][1] = Q(1) + assert solve(bad,0,1,None,[1])[0]=="dirty return readout failed" + M[2]={0:Q(1),1:Q(0),2:Q(1)} + for r in (0,1): M[r][2]=Q(0) + assert solve(M,0,1,None,[1])[0]=="nonlocal forward leakage" + return ["invertible block with nonzero discarded output", "nonunit retained readout", + "wrong readout rejected", "nonlocal leakage rejected"] + + +def check(word, geometry): + checks=controls() + deadline=monotonic()+SECONDS + tape=word["program"] + rows=[] + for site in geometry["survivors"]: + h=site["h"] + assert h in site["roles"] and h not in site["high"] and h not in site["low"] + for p in site["low"]: + for q in [None,*site["high"]]: + rows.append((site,p,q)) + outcomes=[] + passed=[] + for i,(site,p,q) in enumerate(rows): + if i==CAP or monotonic()>=deadline: + break + M=local_operator(tape,site) + status, witness=solve(M,site["h"],p,q,site["high"]) + key=[site["h"],*site["move_clocks"],site["clock"],p,q] + outcomes.append(dict(key=key,status=status)) + if witness: + passed.append(site|witness) + unresolved=[[s["h"],*s["move_clocks"],s["clock"],p,q] for s,p,q in rows[len(outcomes):]] + return dict(outcomes=outcomes, dispositions=dict(Counter(r["status"] for r in outcomes)), + survivors=passed, unresolved=unresolved, cap=CAP, seconds=SECONDS, controls=checks) + + +def main(): + if sys.argv[1:] == ["--controls-only"]: + print(controls()) + return + price_path, first_path, last_path, word_path = sys.argv[1:] + price=json.loads(checked(price_path,PRICE)) + assert price["head"]==HEAD + pins = { + first_path:"ce9604444161b3532d02eb788cb3a24fbbdaf4c1354d596ac08a2c9edeb72c76", + last_path:"a2dd10737f5bfbd3818e6766df3890e445fd46f661af9521f5d724b7c56c1d45", + } + rows=[] + for path,digest in pins.items(): + geometry=json.loads(checked(path,digest)) + assert geometry["comparator_head"]==HEAD and geometry["price_sha256"]==PRICE + assert geometry["admission_sha256"]=="c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13" + rows.extend(geometry["survivors"]) + assert len(rows)==456 and sum(len(r["low"])*(1+len(r["high"])) for r in rows)==CAP + assert len({r["key"] for r in rows})==456 + word=json.loads(gzip.decompress(checked(word_path,WORD))) + result=check(word,{"survivors":rows}) + result.update(head=HEAD,price_sha256=PRICE,geometry_sha256=list(pins.values()),word_sha256=WORD) + print(json.dumps(result,indent=2,sort_keys=True)) + + +if __name__=="__main__": + main() diff --git a/research/p104-multiple-low-fusion-bound/engines/multi_low.py b/research/p104-multiple-low-fusion-bound/engines/multi_low.py new file mode 100644 index 0000000000..a3a44e0c8d --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/engines/multi_low.py @@ -0,0 +1,108 @@ +"""One paid pair fusion with a full simultaneous low-chart bank.""" +from collections import Counter +from fractions import Fraction as Q +from gzip import decompress +from hashlib import sha256 +import json +from pathlib import Path +from runpy import run_path +import sys +from time import monotonic + +PINS={ + "frontier/BANKS.json":"9b17806949c347926b7f95bb70d207e89ca3ed1c6cf78f6729652b3728993c01", + "inputs/ADMITTED.json":"c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "inputs/R68.json":"ce9604444161b3532d02eb788cb3a24fbbdaf4c1354d596ac08a2c9edeb72c76", + "inputs/R69.json":"a2dd10737f5bfbd3818e6766df3890e445fd46f661af9521f5d724b7c56c1d45", + "inputs/R70.json":"34738b6d9031b3170a58f0cb590d81c01ea2c1038810008483d1c24dc7574150", + "inputs/RANK-STOCK.json":"4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "inputs/WORD.json.gz":"4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "lead/local.py":"4397fb4e2bf5a36f58e7732e8d9c5500d24d91a0ef0d8a1e3941e447ceaf495e", + "lead/rank.py":"e1b081552812a4132a20a2c062cf3d5c119e45292c5ef55bf25372adb21cf240", +} +HEAD="aaeec8c0acf01e99a5f331ef363a698d9c084ace" + + +def validate(root): + data={} + for name,sha in PINS.items(): + raw=(root/name).read_bytes() + if sha256(raw).hexdigest()!=sha: + raise ValueError(f"changed dependency: {name}") + data[name]=raw + return data + + +def solve(M,h,L,q,ratio,combine,legal): + dims=M.keys()-{h} + beta=ratio({r:M[h][r] for r in dims},{r:M[q][r] for r in dims}) + if beta is None: + return dict(status="high readout exterior rank obstruction") + alpha=M[h][h]-beta*M[q][h] + if not alpha: + return dict(status="only zero retained multiplier") + assert all(M[h][i]==alpha*int(i==h)+beta*M[q][i] for i in M) + ext=M.keys()-{h,q} + weights,residue=combine({l:{i:M[i][l] for i in ext} for l in L}, + {i:-M[i][h] for i in ext}) + if weights is None: + return dict(status="full low exterior rank obstruction",residue={i:str(x) for i,x in residue.items()}) + v={i:M[i][h]+sum(a*M[i][l] for l,a in weights.items()) for i in M} + assert all(not v[i] for i in ext) + if len(weights)<2: + return dict(status="single low witness requires predecessor reconciliation") + if len(weights)+bool(v[q])+bool(beta)+(alpha!=1)>6 or not all(legal(x) for x in (alpha,1/alpha,beta,v[q],*weights.values())): + return dict(status="coefficient or ordinary budget unresolved") + return dict(status="survives",alpha=str(alpha),beta=str(beta),high_correction=str(v[q]), + discarded_aux=str(v[h]),low_weights={i:str(x) for i,x in weights.items()}) + + +def main(): + root=Path(sys.argv[1]) + data=validate(root) + get=lambda name:json.loads(data[name]) + stock=get("frontier/BANKS.json") + admit=get("inputs/ADMITTED.json") + price=get("inputs/RANK-STOCK.json") + assert stock["head"]==admit["head"]==price["head"]==HEAD and admit["exit"]==0 + local=run_path(str(root/"lead/local.py")) + algebra=run_path(str(root/"lead/rank.py")) + ratio,combine,legal=local["ratio"],algebra["combination"],local["legal"] + toy={r:{i:Q(int(i==r or (i==0 and r!=0))) for i in range(4)} for r in range(4)} + test=solve(toy,0,[1,2],3,ratio,combine,legal) + assert test["status"]=="survives" and test["low_weights"]=={1:"-1",2:"-1"} + assert solve(toy,0,[1],3,ratio,combine,legal)["status"]=="full low exterior rank obstruction" + if sys.argv[2:]==["--controls-only"]: + print("PASS exact two-peer and missing-axis controls") + return + deadline=monotonic()+13 + geometries=[get("inputs/R68.json"),get("inputs/R69.json")] + sites={r["key"]:r for d in geometries for r in d["survivors"]} + inherited={tuple(r["key"]):r["status"] for r in get("inputs/R70.json")["outcomes"]} + w=json.loads(decompress(data["inputs/WORD.json.gz"])) + answered=[] + for i,row in enumerate(stock["rows"]): + if monotonic()>=deadline or i==8: + break + g=sites[row["key"]] + h,q=row["h"],row["high"][0] + assert g["h"]==h and g["low"]==row["low"] and g["high"]==[q] and g["clock"]==row["cut"] + margin=price["rank_prices"][row["rank_type"]]["complete_margin"] + assert Q(margin[0])>0 + if row["prior_readout_excluded"]: + assert any(inherited.get((h,*g["move_clocks"],g["clock"],l,q))=="dirty return readout failed" + for l in row["low"]) + status=dict(status="high readout exterior rank obstruction",route="retained exact R70 obstruction") + else: + matrix=local["local_operator"](w["program"],g) + status=solve(matrix,h,row["low"],q,ratio,combine,legal)|dict(route="fresh exact support") + answered.append(row|status|dict(complete_margin=margin)) + print(json.dumps(dict(head=HEAD,pins=PINS,case_cap=8,seconds=13,decisions=answered, + counts=dict(Counter(r["status"] for r in answered)),unvisited=stock["rows"][len(answered):], + survivors=[r for r in answered if r["status"]=="survives"], + controls=["exact two-peer control","missing-axis negative"]), + sort_keys=True,indent=2)) + + +if __name__=="__main__": + main() diff --git a/research/p104-multiple-low-fusion-bound/engines/rank.py b/research/p104-multiple-low-fusion-bound/engines/rank.py new file mode 100644 index 0000000000..97e5cba454 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/engines/rank.py @@ -0,0 +1,96 @@ +"""Exact full high-bank readout, conditioned on an existing exterior solution.""" +from fractions import Fraction as Q +from collections import Counter +from hashlib import sha256 +from pathlib import Path +import gzip +import json +import runpy +import sys +from time import monotonic + +STOCK="34738b6d9031b3170a58f0cb590d81c01ea2c1038810008483d1c24dc7574150" + + +def combination(rows,target): + basis = {} + def eliminate(vector, terms): + for k,(row, weights) in sorted(basis.items()): + q=vector.get(k,0) + if not q: + continue + for j,v in row.items(): + x=vector.get(j,0)-q*v + if x: vector[j]=x + else: vector.pop(j,None) + for j,v in weights.items(): + x=terms.get(j,0)-q*v + if x: terms[j]=x + else: terms.pop(j,None) + return vector,terms + for label,row in rows.items(): + vector,terms=eliminate({i:x for i,x in row.items() if x},{label:Q(1)}) + if vector: + k=min(vector);pivot=vector[k] + basis[k]=({i:x/pivot for i,x in vector.items()},{i:x/pivot for i,x in terms.items()}) + residual,term=eliminate({i:x for i,x in target.items() if x},{}) + return (None, residual) if residual else ({i:-x for i,x in term.items()},{}) + + +def main(): + price, g1, g2, prior, word = map(Path,sys.argv[1:]) + previous=runpy.run_path(str(Path(__file__).with_name("relaxed.py"))) + checked=previous["checked"] + assert json.loads(checked(price,previous["PRICE"]))["head"]==previous["HEAD"] + p=json.loads(checked(prior,STOCK)) + geometry=[json.loads(checked(path,h)) for path,h in zip((g1,g2),p["geometry_sha256"],strict=True)] + sites={(s["h"],*s["move_clocks"],s["clock"]):s for x in geometry for s in x["survivors"]} + keys=sorted({tuple(i["key"][:-1]) for i in p["outcomes"] if i["status"]=="dirty return readout failed" + and len(sites[tuple(i["key"][:4])]["high"])>1}) + assert len(keys)<=46 and keys + w=json.loads(gzip.decompress(checked(word,previous["WORD"]))) + assert combination({1:{0:Q(1),1:Q(1)},2:{0:Q(1),1:Q(-1)}},{0:Q(2)})[0]=={1:Q(1),2:Q(1)} + assert combination({1:{0:Q(1)}},{1:Q(1)})[0] is None + deadlines=monotonic()+18 + outcomes=[] + candidates=[] + for key in keys: + if monotonic()>=deadlines: + break + site=sites[key[:4]] + h,peer=key[0],key[-1] + high=site["high"] + M=previous["local_operator"](w["program"],site) + exterior=M.keys()-(set(high)|{h}) + lam=previous["ratio"]({i:-M[i][h] for i in exterior},{i:M[i][peer] for i in exterior}) + assert lam is not None + raw={i:x for i in high if (x:=M[i][h]+lam*M[i][peer])} + restricted={q:{i:x for i,x in M[q].items() if i!=h} for q in high} + beta,remainder=combination(restricted,{i:x for i,x in M[h].items() if i!=h}) + if beta is None: + outcomes.append(dict(key=key,status="exterior readout rank obstruction",residual={i:str(x) for i,x in remainder.items()})) + continue + alpha=M[h][h]-sum(x*M[q][h] for q,x in beta.items()) + if not alpha: + rhs=M[h]|{h:M[h][h]-1} + beta,remainder=combination({q:M[q] for q in high},rhs) + if beta is None: + outcomes.append(dict(key=key,status="all readouts have zero retained multiplier")) + continue + alpha=Q(1) + assert all(M[h][i]==alpha*int(i==h)+sum(x*M[q][i] for q,x in beta.items()) for i in M) + coeff=[alpha,1/alpha,lam,*beta.values(),*raw.values()] + if len(beta)+len(raw)+bool(lam)+(alpha!=1)>6 or not all(previous["legal"](q) for q in coeff): + outcomes.append(dict(key=key,status="coefficient or ordinary-count gate unresolved")) + continue + outcomes.append(dict(key=key,status="survives")) + candidates.append(site|dict(low_peer=peer,lam=str(lam),alpha=str(alpha), + beta={q:str(x) for q,x in beta.items()},image={q:str(x) for q,x in raw.items()})) + print(json.dumps(dict(head=previous["HEAD"],word_sha256=previous["WORD"],prior_sha256=STOCK, + price_sha256=previous["PRICE"],outcomes=outcomes,survivors=candidates, + counts=dict(Counter(r["status"] for r in outcomes)),unvisited=keys[len(outcomes):], + controls=["full-rank combination","missing coordinate rejected"]),indent=2,sort_keys=True)) + + +if __name__=="__main__": + main() diff --git a/research/p104-multiple-low-fusion-bound/inputs/ADMITTED.json b/research/p104-multiple-low-fusion-bound/inputs/ADMITTED.json new file mode 100644 index 0000000000..464c89e45c --- /dev/null +++ b/research/p104-multiple-low-fusion-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-multiple-low-fusion-bound/inputs/PR7338-SHA256.json b/research/p104-multiple-low-fusion-bound/inputs/PR7338-SHA256.json new file mode 100644 index 0000000000..8a4d2a0cf3 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/inputs/PR7338-SHA256.json @@ -0,0 +1,19 @@ +{ + "BANK-INDEPENDENT.json": "16563e927ec1c1ec783f92862fe4b8027e8daab35ba80b1607e10c26c3bc28ee", + "BANK.json": "ac659b807f526dfb79f9bb173c3861bc743f112a7f40bc42a8b5dc57f48a058d", + "GEOMETRY-68.json": "ce9604444161b3532d02eb788cb3a24fbbdaf4c1354d596ac08a2c9edeb72c76", + "GEOMETRY-69.json": "a2dd10737f5bfbd3818e6766df3890e445fd46f661af9521f5d724b7c56c1d45", + "GEOMETRY-CONTROL.json": "df4175b6cee565ba0792a3207dee5ebd1c31868a441a276de68bf75536a089d6", + "RANK-STOCK.json": "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "RELAXED-COMPARE.json": "23b9a5c0e5507db1bdc2cd39fc7422216bf68b0dd0dbc1e78d315ae25dfe4926", + "RELAXED-INDEPENDENT.json": "dc227ae7aca5f470f148db76a32304ed21c6d4143af3a1d0e7cfd6947856edfb", + "RELAXED.json": "34738b6d9031b3170a58f0cb590d81c01ea2c1038810008483d1c24dc7574150", + "RETIME-KNOWN.json": "08402221016a0a7ed0b2716b3ab1c8de4afcf54158c381ca441320b71b8abac4", + "RETIME-SYNTHETIC.json": "fe9e20a455b87fc43843b221ac061652d2fd2af2c11de2e7b3c9323cc0e883fe", + "STRICT-68.json": "471d5c8f1cb87e1c054b6ea376f4f083f9bac76eabc5823811484f0ed30357b3", + "STRICT-69.json": "bd4c2284ec073e8c3e565350e868595d09098f7ab8347eef440343964f6dbac5", + "STRICT-COMPARE-69.json": "f6538af89286b5e3805f6ed4494e2df095ce62d114c814ae7cdfe820a655a08c", + "STRICT-INDEPENDENT-68.json": "3d9ec5a87d71bc1f669ea8d02591b3fa2d4db282bfc47d3af72335cd57e42587", + "STRICT-INDEPENDENT-69.json": "1eddd0476a4caff1ef6423458f88471f1ce07adcd119171714c9261f8d9d7387" +} diff --git a/research/p104-multiple-low-fusion-bound/inputs/R68.json.gz b/research/p104-multiple-low-fusion-bound/inputs/R68.json.gz new file mode 100644 index 0000000000..18f853ff2b Binary files /dev/null and b/research/p104-multiple-low-fusion-bound/inputs/R68.json.gz differ diff --git a/research/p104-multiple-low-fusion-bound/inputs/R69.json.gz b/research/p104-multiple-low-fusion-bound/inputs/R69.json.gz new file mode 100644 index 0000000000..1ec4dc85c9 Binary files /dev/null and b/research/p104-multiple-low-fusion-bound/inputs/R69.json.gz differ diff --git a/research/p104-multiple-low-fusion-bound/inputs/R70.json.gz b/research/p104-multiple-low-fusion-bound/inputs/R70.json.gz new file mode 100644 index 0000000000..ab0242032a Binary files /dev/null and b/research/p104-multiple-low-fusion-bound/inputs/R70.json.gz differ diff --git a/research/p104-multiple-low-fusion-bound/inputs/RANK-STOCK.json b/research/p104-multiple-low-fusion-bound/inputs/RANK-STOCK.json new file mode 100644 index 0000000000..7043a8a985 --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/inputs/RANK-STOCK.json @@ -0,0 +1,538 @@ +{ + "admission": "scientific admission pending at preflight; price is conditional on exact #7334 passing", + "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 + }, + "crossing_upper": "182332597822022395349777014167081/50000000000000000000000000000000000", + "disjoint_move_pair_count_upper": 3116, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "input_sha256": { + "READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "dependencies/7298/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "dependencies/round41/RESULT.json": "1b993aa8c66ffce5d2d9f13cafae320c62230722d599d251fa61afc6534b1bc7", + "receipts/NATIVE-RESULT.json": "c6d1b00a83185ab0062397b363258b1f3f6685d755e9c1d4f7d3e7e511240812", + "receipts/construct.py": "ecb39578063d7f09153a85370a3b9bb7cbf8b36ff9891033a1cce7a2fe7f7fda" + }, + "old_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 + }, + "old_margin": [ + "-29866980917152322049/10000000000000000000000000000000000000000000000000", + "-29866980917152266101/10000000000000000000000000000000000000000000000000" + ], + "one_edit_optimistic_upper": "1903560515893109741953230020081417399578277511361/5000000000000000000000000000000000000000000000000", + "one_per_public_helper_optimistic_upper": "2095820127998313825890506252109640556935683540008461/5000000000000000000000000000000000000000000000000", + "owned_paid_histogram": { + "1": 20, + "2": 9, + "3": 2, + "4": 13, + "5": 2, + "6": 1 + }, + "public_helper_count": 1101, + "public_paid_histogram": { + "1": 3980, + "2": 844, + "3": 827, + "4": 210, + "5": 343, + "6": 13, + "7": 10, + "8": 5 + }, + "public_paid_moves": 6232, + "rank_prices": { + "1+1": { + "complete_margin": [ + "858321385403521186417773068772405712363430437203/10000000000000000000000000000000000000000000000000", + "53645086587720074151110816798275357022714405823/625000000000000000000000000000000000000000000000" + ], + "credit": [ + "214580346350880296604443267200568173320145689813/2500000000000000000000000000000000000000000000000", + "858321385403521186417773068802272693280582759269/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-9141678614596478813582226931227594287636569562797/10000000000000000000000000000000000000000000000000", + "-571354913412279925848889183201724642977285594177/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -34, + "2": 17 + }, + "ranks": [ + 1, + 1 + ] + }, + "1+2": { + "complete_margin": [ + "1180782193580878473879905453225185303784278217059/10000000000000000000000000000000000000000000000000", + "1180782193580878473879905453225185303784278273007/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1180782193580878473879905453255052284701430539091/10000000000000000000000000000000000000000000000000", + "9446257548647027791039243626040418277611444313/80000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-8819217806419121526120094546774814696215721782941/10000000000000000000000000000000000000000000000000", + "-8819217806419121526120094546774814696215721726993/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "2": -17, + "3": 17 + }, + "ranks": [ + 1, + 2 + ] + }, + "1+3": { + "complete_margin": [ + "1389848341449443791535950684381027395734536124509/10000000000000000000000000000000000000000000000000", + "1389848341449443791535950684381027395734536180423/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "347462085362360947883987671102723594162922111631/2500000000000000000000000000000000000000000000000", + "694924170724721895767975342205447188325844223279/5000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-8610151658550556208464049315618972604265463875491/10000000000000000000000000000000000000000000000000", + "-8610151658550556208464049315618972604265463819577/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "3": -17, + "4": 17 + }, + "ranks": [ + 1, + 3 + ] + }, + "1+4": { + "complete_margin": [ + "193142263828747485141280111129765972731137687109/1250000000000000000000000000000000000000000000000", + "772569055314989940565120444519063890924550776427/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1545138110629979881130240889067994762766253818921/10000000000000000000000000000000000000000000000000", + "309027622125995976226048177813598952553250763791/2000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-1056857736171252514858719888870234027268862312891/1250000000000000000000000000000000000000000000000", + "-4227430944685010059434879555480936109075449223573/5000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "4": -17, + "5": 17 + }, + "ranks": [ + 1, + 4 + ] + }, + "1+5": { + "complete_margin": [ + "834392976237489866662283238867233696199702541757/5000000000000000000000000000000000000000000000000", + "417196488118744933331141619433616848099851284857/2500000000000000000000000000000000000000000000000" + ], + "credit": [ + "1668785952474979733324566477764334373316557405529/10000000000000000000000000000000000000000000000000", + "1668785952474979733324566477764334373316557405563/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-4165607023762510133337716761132766303800297458243/5000000000000000000000000000000000000000000000000", + "-2082803511881255066668858380566383151900148715143/2500000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "5": -17, + "6": 17 + }, + "ranks": [ + 1, + 5 + ] + }, + "1+6": { + "complete_margin": [ + "1771542005129348740048881099908835681263784441249/10000000000000000000000000000000000000000000000000", + "1771542005129348740048881099908835681263784497197/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1771542005129348740048881099938702662180936763281/10000000000000000000000000000000000000000000000000", + "354308401025869748009776219987740532436187352663/2000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-8228457994870651259951118900091164318736215558751/10000000000000000000000000000000000000000000000000", + "-8228457994870651259951118900091164318736215502803/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "6": -17, + "7": 17 + }, + "ranks": [ + 1, + 6 + ] + }, + "1+7": { + "complete_margin": [ + "1859458789326391366180127207106590253932358169757/10000000000000000000000000000000000000000000000000", + "1859458789326391366180127207106590253932358225739/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "929729394663195683090063603568228617424755245903/5000000000000000000000000000000000000000000000000", + "5810808716644973019312897522301428858904720287/31250000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-8140541210673608633819872792893409746067641830243/10000000000000000000000000000000000000000000000000", + "-8140541210673608633819872792893409746067641774261/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "7": -17, + "8": 17 + }, + "ranks": [ + 1, + 7 + ] + }, + "1+8": { + "complete_margin": [ + "1936286205289343096186514461761692902526099784907/10000000000000000000000000000000000000000000000000", + "1936286205289343096186514461761692902526099840821/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "968143102644671548093257230895779941721626053461/5000000000000000000000000000000000000000000000000", + "484071551322335774046628615447889970860813026739/2500000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-8063713794710656903813485538238307097473900215093/10000000000000000000000000000000000000000000000000", + "-8063713794710656903813485538238307097473900159179/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "1": -17, + "8": -17, + "9": 17 + }, + "ranks": [ + 1, + 8 + ] + }, + "2+2": { + "complete_margin": [ + "342461829925360215799616613766761397431076780873/2000000000000000000000000000000000000000000000000", + "856154574813400539499041534416903493577691980131/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1712309149626801078998083068863673968072536226363/10000000000000000000000000000000000000000000000000", + "856154574813400539499041534431836984036268113207/5000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-1657538170074639784200383386233238602568923219127/2000000000000000000000000000000000000000000000000", + "-4143845425186599460500958465583096506422308019869/5000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -34, + "4": 17 + }, + "ranks": [ + 2, + 2 + ] + }, + "2+3": { + "complete_margin": [ + "1038332533337951243124209252323374732610103592089/5000000000000000000000000000000000000000000000000", + "2076665066675902486248418504646749465220207240109/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "2076665066675902486248418504676616446137359506193/10000000000000000000000000000000000000000000000000", + "519166266668975621562104626169154111534339876561/2500000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-3961667466662048756875790747676625267389896407911/5000000000000000000000000000000000000000000000000", + "-7923334933324097513751581495353250534779792759891/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -17, + "3": -17, + "5": 17 + }, + "ranks": [ + 2, + 3 + ] + }, + "2+4": { + "complete_margin": [ + "2355602677701438428037034298000189461885076143183/10000000000000000000000000000000000000000000000000", + "1177801338850719214018517149000094730942538099557/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1177801338850719214018517149015028221401114232599/5000000000000000000000000000000000000000000000000", + "2355602677701438428037034298030056442802228465249/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-7644397322298561571962965701999810538114923856817/10000000000000000000000000000000000000000000000000", + "-3822198661149280785981482850999905269057461900443/5000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -17, + "4": -17, + "6": 17 + }, + "ranks": [ + 2, + 4 + ] + }, + "2+5": { + "complete_margin": [ + "64550164305020182173891862721772434032493977189/250000000000000000000000000000000000000000000000", + "2582006572200807286955674508870897361299759143457/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1291003286100403643477837254450382171108455704779/5000000000000000000000000000000000000000000000000", + "2582006572200807286955674508900764342216911409609/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-185449835694979817826108137278227565967506022811/250000000000000000000000000000000000000000000000", + "-7417993427799192713044325491129102638700240856543/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -17, + "5": -17, + "7": 17 + }, + "ranks": [ + 2, + 5 + ] + }, + "2+6": { + "complete_margin": [ + "2772679409052218919811235238243020222832712173803/10000000000000000000000000000000000000000000000000", + "346584926131527364976404404780377527854089028721/1250000000000000000000000000000000000000000000000" + ], + "credit": [ + "554535881810443783962247047654577440749972899167/2000000000000000000000000000000000000000000000000", + "1386339704526109459905617619136443601874932247943/5000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-7227320590947781080188764761756979777167287826197/10000000000000000000000000000000000000000000000000", + "-903415073868472635023595595219622472145910971279/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -17, + "6": -17, + "8": 17 + }, + "ranks": [ + 2, + 6 + ] + }, + "2+7": { + "complete_margin": [ + "2937423609212213275948868600095877444095027517461/10000000000000000000000000000000000000000000000000", + "183588975575763329746804287505992340255939223337/625000000000000000000000000000000000000000000000" + ], + "credit": [ + "734355902303053318987217150031436106253044959869/2500000000000000000000000000000000000000000000000", + "2937423609212213275948868600125744425012179839527/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-7062576390787786724051131399904122555904972482539/10000000000000000000000000000000000000000000000000", + "-441411024424236670253195712494007659744060776663/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "2": -17, + "7": -17, + "9": 17 + }, + "ranks": [ + 2, + 7 + ] + }, + "3+3": { + "complete_margin": [ + "2564668825570003745693079529156031553835334050633/10000000000000000000000000000000000000000000000000", + "256466882557000374569307952915603155383533410653/1000000000000000000000000000000000000000000000000" + ], + "credit": [ + "2564668825570003745693079529185898534752486372631/10000000000000000000000000000000000000000000000000", + "1282334412785001872846539764592949267376243186341/5000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-7435331174429996254306920470843968446164665949367/10000000000000000000000000000000000000000000000000", + "-743533117442999625430692047084396844616466589347/1000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "3": -34, + "6": 17 + }, + "ranks": [ + 3, + 3 + ] + }, + "3+4": { + "complete_margin": [ + "2946362489249908694206009944683839839364582367373/10000000000000000000000000000000000000000000000000", + "368295311156238586775751243085479979920572802913/1250000000000000000000000000000000000000000000000" + ], + "credit": [ + "736590622312477173551502486178426705070433672347/2500000000000000000000000000000000000000000000000", + "2946362489249908694206009944713706820281734689439/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-7053637510750091305793990055316160160635417632627/10000000000000000000000000000000000000000000000000", + "-881704688843761413224248756914520020079427197087/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "3": -17, + "4": -17, + "7": 17 + }, + "ranks": [ + 3, + 4 + ] + }, + "3+5": { + "complete_margin": [ + "1630341583973160089627948131376151155723919520129/5000000000000000000000000000000000000000000000000", + "3260683167946320179255896262752302311447839096189/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "3260683167946320179255896262782169292364991362273/10000000000000000000000000000000000000000000000000", + "815170791986580044813974065695542323091247840581/2500000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-3369658416026839910372051868623848844276080479871/5000000000000000000000000000000000000000000000000", + "-6739316832053679820744103737247697688552160903811/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "3": -17, + "5": -17, + "8": 17 + }, + "ranks": [ + 3, + 5 + ] + }, + "3+6": { + "complete_margin": [ + "3528183420760683542117844246779527821574533741651/10000000000000000000000000000000000000000000000000", + "1764091710380341771058922123389763910787266898791/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "1764091710380341771058922123404697401245843031833/5000000000000000000000000000000000000000000000000", + "3528183420760683542117844246809394802491686063717/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-6471816579239316457882155753220472178425466258349/10000000000000000000000000000000000000000000000000", + "-3235908289619658228941077876610236089212733101209/5000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "3": -17, + "6": -17, + "9": 17 + }, + "ranks": [ + 3, + 6 + ] + }, + "4+4": { + "complete_margin": [ + "3415972937126856268850186467409402697562404412621/10000000000000000000000000000000000000000000000000", + "170798646856342813442509323370470134878120223431/500000000000000000000000000000000000000000000000" + ], + "credit": [ + "341597293712685626885018646743926967847955673467/1000000000000000000000000000000000000000000000000", + "3415972937126856268850186467439269678479556734721/10000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-6584027062873143731149813532590597302437595587379/10000000000000000000000000000000000000000000000000", + "-329201353143657186557490676629529865121879776569/500000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "4": -34, + "8": 17 + }, + "ranks": [ + 4, + 4 + ] + }, + "4+5": { + "complete_margin": [ + "237945064486638717744153752508310488639962668791/625000000000000000000000000000000000000000000000", + "3807121031786219483906460040132967818239402756587/10000000000000000000000000000000000000000000000000" + ], + "credit": [ + "3807121031786219483906460040162834799156555022671/10000000000000000000000000000000000000000000000000", + "1903560515893109741953230020081417399578277511361/5000000000000000000000000000000000000000000000000" + ], + "margin_with_extra_rank_one": [ + "-387054935513361282255846247491689511360037331209/625000000000000000000000000000000000000000000000", + "-6192878968213780516093539959867032181760597243413/10000000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "4": -17, + "5": -17, + "9": 17 + }, + "ranks": [ + 4, + 5 + ] + } + }, + "scope": "Predecode price only. Pair arithmetic grants all ordinary and physical costs free; each original paid MOVE contributes at most once.", + "whole_move_capacity_optimistic_upper": "477927259198812997685714233883646598515886014070727/625000000000000000000000000000000000000000000000", + "word_git_blob": "73f43007192eb5a38eb5abb591b871df3e52c7cd" +} diff --git a/research/p104-multiple-low-fusion-bound/inputs/WORD.json.gz b/research/p104-multiple-low-fusion-bound/inputs/WORD.json.gz new file mode 100644 index 0000000000..73f4300719 Binary files /dev/null and b/research/p104-multiple-low-fusion-bound/inputs/WORD.json.gz differ diff --git a/research/p104-multiple-low-fusion-bound/inputs/pricing.py b/research/p104-multiple-low-fusion-bound/inputs/pricing.py new file mode 100644 index 0000000000..40ec194017 --- /dev/null +++ b/research/p104-multiple-low-fusion-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-multiple-low-fusion-bound/receipts/SHA256.json b/research/p104-multiple-low-fusion-bound/receipts/SHA256.json new file mode 100644 index 0000000000..6d360f6a3a --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/receipts/SHA256.json @@ -0,0 +1,5 @@ +{ + "BANKS.json": "9b17806949c347926b7f95bb70d207e89ca3ed1c6cf78f6729652b3728993c01", + "INDEPENDENT.json": "e473bb6bbd7ce6c6cba8cdfbeacf4b11f665b4f1894d1d060b74544376363c23", + "LEAD.json": "eecbb083722401d2b6ae9649f26a5bbd39212ea799ba0b9d00fe5d1f972fc4c4" +} diff --git a/research/p104-multiple-low-fusion-bound/replay.py b/research/p104-multiple-low-fusion-bound/replay.py new file mode 100644 index 0000000000..29bcdb390e --- /dev/null +++ b/research/p104-multiple-low-fusion-bound/replay.py @@ -0,0 +1,150 @@ +"""Replay the exact #7334 multiple-low compensated-fusion exclusion.""" +from argparse import ArgumentParser +from collections import Counter +from fractions import Fraction +from gzip import decompress +from hashlib import sha1,sha256 +from json import loads +from pathlib import Path,PurePosixPath +import shutil +import subprocess +import sys +from tempfile import TemporaryDirectory + +HERE = Path(__file__).resolve().parent +HEAD = 'aaeec8c0acf01e99a5f331ef363a698d9c084ace' + + +def unique(items): + result = dict(items) + if len(result) != len(items): + raise ValueError('duplicate JSON key') + return result + + +def decode(raw): + return loads(raw,object_pairs_hook=unique) + + +def digest(raw): + return sha256(raw).hexdigest() + + +def authenticate(root): + pins = decode((HERE/'LOCAL-PINS.json').read_bytes()) + for name, expected in pins.items(): + rel = PurePosixPath(name) + assert rel.as_posix() == name and not rel.is_absolute() and '..' not in rel.parts + if digest((HERE/name).read_bytes()) != expected: + raise ValueError('changed dependency: ' + name) + provenance = decode((HERE/'PROVENANCE.json').read_bytes())['files'] + for name, ref in provenance.items(): + assert name in pins and not ref['uncompress'] + raw = (HERE/name).read_bytes() + assert digest(raw) == ref['sha256'] + assert sha1(f'blob {len(raw)}\0'.encode()+raw).hexdigest() == ref['git_blob'] + + prior = decode((HERE/'inputs/PR7338-SHA256.json').read_bytes()) + assert pins['inputs/RANK-STOCK.json'] == prior['RANK-STOCK.json'] + inputs = root/'inputs' + inputs.mkdir() + for local, public in (('R68','GEOMETRY-68.json'),('R69','GEOMETRY-69.json'),('R70','RELAXED.json')): + raw = decompress((HERE/f'inputs/{local}.json.gz').read_bytes()) + assert digest(raw) == prior[public], public + (inputs/f'{local}.json').write_bytes(raw) + for name in ('ADMITTED.json','RANK-STOCK.json','WORD.json.gz','pricing.py'): + shutil.copyfile(HERE/'inputs'/name,inputs/name) + admit = decode((inputs/'ADMITTED.json').read_bytes()) + assert admit['head'] == HEAD and admit['exit'] == 0 + assert admit['inputs']['WORD.json.gz'] == pins['inputs/WORD.json.gz'] + assert admit['caller'] == '07a76c5e2738882c0cb322278e56f6cae3c9885d' + return inputs + + +def command(script,*args,check=True): + argv = [sys.executable,'-I','-B',str(HERE/'engines'/script),*map(str,args)] + return subprocess.run(argv,capture_output=True,check=check,timeout=15) + + +def replay(root,output): + inputs = authenticate(root) + expected = decode((HERE/'receipts/SHA256.json').read_bytes()) + generated = {} + + def record(name,raw,path=None): + assert digest(raw) == expected[name], ('changed receipt',name) + generated[name] = raw + if path is not None: + path.write_bytes(raw) + return decode(raw) + + g68,g69,g70 = (inputs/f'R{i}.json' for i in (68,69,70)) + stock = inputs/'RANK-STOCK.json' + quote_args = ('--r68-geometry',g68,'--r69-geometry',g69,'--r70-support',g70, + '--rank-stock',stock,'--tariff',inputs/'pricing.py') + (root/'frontier').mkdir() + bank_path = root/'frontier/BANKS.json' + price = record('BANKS.json',command('bank_bound.py',*quote_args).stdout,bank_path) + assert price['head'] == HEAD and price['geometry_pairs'] == 3422 and price['geometry_survivors'] == 456 + assert price['multi_low_banks'] == 8 and price['distinct_paid_calls'] == 16 + assert price['one_edit_cap'] == 1 and price['rank_types'] == {'1+1':6,'1+2':2} + assert price['bank_shapes'] == {'2+1':2,'3+1':2,'4+1':4} + assert 0 < Fraction(price['one_edit_comparator_gross_upper']) < 1 + assert 0 < Fraction(price['all_eight_comparator_gross_upper']) < 1 + assert Fraction(price['target']) == Fraction('0.0040075385047236') + assert Fraction(price['target_old_margin'][1]) < Fraction(price['target_all_eight_margin'][1]) < 0 + assert Fraction(price['target_all_eight_gross_credit'][0]) > 0 + + (root/'lead').mkdir() + for name in ('local.py','rank.py'): + shutil.copyfile(HERE/'engines'/name,root/'lead'/name) + lead = record('LEAD.json',command('multi_low.py',root).stdout) + verify_args = ('--banks',bank_path,'--g68',g68,'--g69',g69, + '--admission',inputs/'ADMITTED.json','--word',inputs/'WORD.json.gz') + independent = record('INDEPENDENT.json',command('check_multilow.py',*verify_args).stdout) + assert lead['head'] == independent['head'] == HEAD + assert independent['status'] == 'EXHAUSTED' and independent['tested'] == 8 + assert not (lead['survivors'] or independent['survivors'] or lead['unvisited'] or independent['unvisited']) + assert len(lead['controls']) == 2 and len(independent['controls']) == 4 + label = {'readout_excluded':'high readout exterior rank obstruction', + 'forward_span_excluded':'full low exterior rank obstruction'} + counts = Counter() + for bank,first,second in zip(price['rows'],lead['decisions'],independent['outcomes'],strict=True): + assert bank['key'] == first['key'] == second['key'] + assert bank['h'] == first['h'] == second['h'] and bank['high'] == [second['readout_peer']] + assert bank['low'] == first['low'] and bank['rank_type'] == first['rank_type'] == second['rank_type'] + assert first['status'] == label[second['status']] + assert 0 < Fraction(first['complete_margin'][0]) + counts[second['status']] += 1 + if second['status'] == 'readout_excluded': + assert Fraction(second['certificate']['determinant']) != 0 + else: + assert second['h'] == 1182 + assert (second['exterior_donor_rank'],second['exterior_augmented_rank']) == (2,3) + assert first['residue'] and all(Fraction(value) for value in first['residue'].values()) + assert counts == {'readout_excluded':7,'forward_span_excluded':1} + + g68.write_bytes(g68.read_bytes()+b'\n') + changed = command('check_multilow.py',*verify_args,check=False) + assert changed.returncode == 1 and b'changed input g68' in changed.stderr and not changed.stdout + g68.write_bytes(decompress((HERE/'inputs/R68.json.gz').read_bytes())) + stock.write_bytes(stock.read_bytes()+b'\n') + changed = command('bank_bound.py',*quote_args,check=False) + assert changed.returncode == 1 and b'stale rank_stock' in changed.stderr and not changed.stdout + + assert generated.keys() == expected.keys() + if output is not None: + output.mkdir() + for name,raw in generated.items(): + (output/name).write_bytes(raw) + print('PASS_P104_MULTIPLE_LOW_FUSION_BOUND banks=8 readout_excluded=7 low_excluded=1 ' + 'unresolved=0 saving_upper=0 kappa_change=0') + + +if __name__ == '__main__': + assert __debug__ and sys.version_info[:2] == (3,12), 'CPython 3.12 and assertions required' + p = ArgumentParser(description=__doc__) + p.add_argument('--out',type=Path) + args = p.parse_args() + with TemporaryDirectory(prefix='p104-multiple-low-fusion-') as temp: + replay(Path(temp),args.out)