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-fixed-type-b-two-return-provider-bound/LOCAL-PINS.json b/research/p104-fixed-type-b-two-return-provider-bound/LOCAL-PINS.json new file mode 100644 index 0000000000..1d6625ff93 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/LOCAL-PINS.json @@ -0,0 +1,32 @@ +{ + "PROVENANCE.json": "285407644bf9d7156ed32f1fd5cd3ab17e5fd2f27a679b35c9df42d151ea54ca", + "engines/physical_trace.py": "18fdd9858d70f6d3ec71006eb68f350b0b371b7907263b20e4f9999317b83529", + "engines/quote_volume.py": "722fe96c0635ca0d9e805216a082c01992a999a524a1ad4cca989767faf9b176", + "engines/signed_returns.py": "ead7839a03e87616b07035c5c57aa205314ca180d3ca98e185562eb6c5ceffff", + "inputs/7113-SHA256.json": "064e11ecfedce9937ea1782e5baee37e89b3c9eebabed5b4a9ba84f412bbe078", + "inputs/7334-ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "inputs/7357-SHA256.json": "877af2f9d65e0457e74f843a6ede78571ffdf9d57e7565d383c3c4d6be91d54c", + "inputs/7394-SHA256.json": "fe2dc40405be33fd243b68bfdc7f73c1ad96640bed8722723be62c08956bf37e", + "inputs/CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/CONTRACT-READBACK.json": "2ae99cc148441ffe655b2b33f9e87b8f0939f55436a4b81ff18654efa295f72e", + "inputs/DATA-PHASES.json.gz": "68112b706548e20696e9e92547e0db3dbb1cc4f1441cfd4bdb2e1c554cf0da62", + "inputs/ODD-LOCALIZED-GROUPING.json.gz": "9ed809932780e35621393a19b1d2cc0a1e8672a5c73796f0bcae8d5249ac7756", + "inputs/PLAN.md": "5673bc5c34a77cfa919010c40bc1666f1293fc2be7079869fd287968e933deaf", + "inputs/PR7344-CONTRACT.json": "e77f3e124605a059cbf803e8a64cfb99e528091c7b99cbe4ea9dc82b56c75967", + "inputs/R149-PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "inputs/R85-PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262", + "inputs/WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", + "inputs/check_odd_physical_binding.py": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "inputs/emit_odd_type_ab.py": "7a7993648433c6febad8c07b315aec1b96598835a3f587b62040423c33c3b71f", + "inputs/emit_odd_type_b.py": "d1fa8b67d98beacd6bb574b3d5fcbc94b8646a7ffbce91d2a6fd4d690d3c5329", + "inputs/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "inputs/lower.py": "67345fdfc8e5bb816e24b37dfafad0396372c48ec4e1b95b8b69f019a8fdfdee", + "inputs/mirrored.py": "55dd441a3a7f504b351857d45fd701994a0950ae1baec6c4c2b4b0166fb69db3", + "inputs/odd_unit_dyadic_tapes.py": "3cdafa35635360a487ce400ec8d585f6134dd7c58209543528e98e7db178bbc7", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "inputs/signed_model.py": "f88c798b9a22c656ea0b755b4f32be411c1f80687dff1a1ac9e9c2a0b5f4203e", + "inputs/upstream_application.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "receipts/FIRST-ATTEMPT.json": "239b60366e7cd17d3ee95b3ee4490cca3798140c4f9e53ac63180fbff4b44864", + "receipts/SHA256.json": "0573c9c94868b1e8ed71b0c8548b9d2e8c855b2718669bc0800c4ad608bd9b1f", + "replay.py": "6a03b5c242b2b4c297a0655dced40b7262627f0b3a3e41e2fc5d8bd49354411f" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/NOTICE b/research/p104-fixed-type-b-two-return-provider-bound/NOTICE new file mode 100644 index 0000000000..0a62ae7b02 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/NOTICE @@ -0,0 +1,7 @@ +Apache-2.0. + +#7334 and #7113 supply the exact native and signed caller. +#7295 supplies the fixed contact inventory, #7394 the exact +one-projection result, #7357 and #7298 the signed stock and +directed tariff, and #7344 the earlier displacement method. +OpenAI Codex and subagents materially assisted. diff --git a/research/p104-fixed-type-b-two-return-provider-bound/PROOF.md b/research/p104-fixed-type-b-two-return-provider-bound/PROOF.md new file mode 100644 index 0000000000..7820031756 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/PROOF.md @@ -0,0 +1,110 @@ +# The two retained Type B odd returns + +The exact caller has 4,783 events. The selected odd calls are +1339 on global role 68 and mask {8}, and 2970 on global role 70 +and mask {9}. The eight exact Type B ports are 15, 17, 27, 34, +35, 42, 47 and 55. The literal checker tracks original role +lineage through every swap and both operands of every binary +contact. Each selected role has exactly its one odd-idle +contact. The original return targets stay separate. + +The independent source trace verifies this separation without +parsing the caller event array. The asymmetric B emitter has +32 core roles, with all 60 even-idle supports and all J hosts +confined to the core. The four appended phase rails each have +one isolated odd idle. The joined A+B emitter shifts their +labels by 36. Ordinary core normalizers use $q^2$, and native J +helper and owned work are isolated by their retained invocation +and owner labels. With fixed incidences, an already-paid +$q$-sensitive operation has no support from either selected +rail input to either selected return after erasure. + +For each port the signed binder forms the positive phase +polynomial and subtracts twice the central direction $c$. +Their difference is the pure translation $c$. On a central +eigenvalue $q$ this correction multiplies by $q^2$. The signed +child's uncorrected diagonal is $q^{-1}$ times its independent +body multiplier. Correcting to the positive chart gives $q$ +times the body. Either has a nonzero opposite-sign difference +for any nonzero body value. The translation alone is even. +The erased normalized rail operator is identity, with +opposite-sign difference of rank zero. + +## Canonical tensor capacity at all widths m ≥ 8 + +Assume fixed body and spectator fibres, a common identification +of opposite central-phase classes for the even erased map, and +one canonical tensor core per port with $m$ independent bits +per core axis. The fibre hypothesis pairs equal-volume parts +of the opposite phases with the same erased action. +Let $E(q)$ be the two required returns and $E_0(q)$ the +even erased returns. For each paired fibre, + +$$ +(E(q)-E_0(q))-(E(-q)-E_0(-q))=E(q)-E(-q). +$$ + +The right side has rank two because the two original bodies +and target rails are independent. Rank subadditivity gives a +sum of at least two displacement ranks for each opposite pair. + +Write $C_j(m)=\sum_{k\equiv j\pmod 4}\binom{m}{k}$. +The smaller volume of each opposite pair supplies the +guaranteed common pairing. For one original field volume $V$, +the required displacement fraction is bounded below by + +$$ +\frac{2(\min(C_0,C_2)+\min(C_1,C_3))}{2^m} +=1-\frac{|\operatorname{Re}(1+i)^m|+|\operatorname{Im}(1+i)^m|}{2^m} +=1-2^{-\lfloor m/2\rfloor}. +$$ + +The second equality uses the two alternating binomial sums. +For even $m$ only one of the real and imaginary parts is nonzero. +For odd $m$ they have equal absolute value. Thus the required +fraction is at least $15/16$ for every $m\ge8$. + +For a canonical core $K$ of even rank $r=16$ or $18$, +put $n=mr$. The roots-of-unity filter gives + +$$ +C_j(n)=2^{n-2}+\tfrac12\operatorname{Re}\big(i^{-j}(1+i)^n\big). +$$ + +Since $n$ is even, the smallest class has +$2^{n-2}-2^{n/2-1}$ dimensions. Reversing the sign of a +core axis permutes the residue classes by complementing its +$m$ binary factors. A common fourth-root phase also permutes +the classes. A fixed nonzero common scalar can be absorbed +into an even wrapper before erasing $K$. The displacement +fraction of the normalized core is at most + +$$ +\tfrac34+2^{-n/2-1}, +$$ + +which is largest at $m=8$ for each quoted rank. +With even wrappers $A,B$, erasure gives $E-E_0=B(K-I)A$, +so the added displacement has rank at most the core's. +This proves the same width-eight lower bound on $V'/V$ +uniformly within the stated tensor model. + +## Conditional paid price + +The inherited quote assumes a volume-linear new charge +$8(V'/V)H_r$, where $H_r=r^{1-\kappa}$, against removed +charge $16H_9$. The exact fractions are regenerated in the +quote receipt. Both volume lower bounds are about 1.25. +The affordability uppers are about 1.12736 and 1.00253 +for ranks 16 and 18. The complete directed price uppers +are approximately −15.54 and −35.26 raw. These comparisons +grant ancillary setup, routing, ownership, precision and +tape costs free. + +The volume-linear price is a premise for a changed packed +supplier. The all-width algebra applies within the specified +tensor and fibre identifications. The stored physical source +atlas records width 73, and the lower comparison width 8 is an +analytic extremum. A $q$-odd erased map, new source or return +incidences, noncanonical packing, fibre mixing or a different +tariff requires a separate proof. No provider was constructed. diff --git a/research/p104-fixed-type-b-two-return-provider-bound/PROVENANCE.json b/research/p104-fixed-type-b-two-return-provider-bound/PROVENANCE.json new file mode 100644 index 0000000000..9bc17bd495 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/PROVENANCE.json @@ -0,0 +1,157 @@ +{ + "caller": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/7113" + }, + "derived_inputs": { + "CALLER.json": { + "compression": "gzip", + "file": "inputs/CALLER.json.gz", + "key": "expected/ODD-TYPE-AB-CALLER.json", + "manifest": "inputs/7113-SHA256.json", + "sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc" + }, + "CONTRACT-READBACK.json": { + "file": "inputs/CONTRACT-READBACK.json", + "role": "Exact earlier retained-source event and physical binding readback.", + "sha256": "2ae99cc148441ffe655b2b33f9e87b8f0939f55436a4b81ff18654efa295f72e" + }, + "DATA-PHASES.json": { + "compression": "gzip", + "file": "inputs/DATA-PHASES.json.gz", + "key": "replay/supplier7112/short-caller/DATA-PHASES.json", + "manifest": "inputs/7113-SHA256.json", + "sha256": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa" + }, + "ODD-LOCALIZED-GROUPING.json": { + "compression": "gzip", + "file": "inputs/ODD-LOCALIZED-GROUPING.json.gz", + "key": "replay/supplier7112/short-caller/ODD-LOCALIZED-GROUPING.json", + "manifest": "inputs/7113-SHA256.json", + "sha256": "8aac6b3d9e528bffbcf411bbd300c8e0f0b7bf75da45ab12badf3f3530ffcbe2" + }, + "PLAN.md": { + "file": "inputs/PLAN.md", + "role": "Exact R153 scoped canonical provider quote plan.", + "sha256": "5673bc5c34a77cfa919010c40bc1666f1293fc2be7079869fd287968e933deaf" + }, + "R149-PRICE.json": { + "file": "inputs/R149-PRICE.json", + "key": "PRICE.json", + "manifest": "inputs/7394-SHA256.json", + "sha256": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872" + }, + "R85-PRICE.json": { + "file": "inputs/R85-PRICE.json", + "key": "PRICE.json", + "manifest": "inputs/7357-SHA256.json", + "sha256": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262" + }, + "check_odd_physical_binding.py": { + "file": "inputs/check_odd_physical_binding.py", + "key": "replay/supplier7112/short-caller/check_odd_physical_binding.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98" + }, + "emit_odd_type_ab.py": { + "file": "inputs/emit_odd_type_ab.py", + "key": "replay/supplier7112/short-caller/emit_odd_type_ab.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "7a7993648433c6febad8c07b315aec1b96598835a3f587b62040423c33c3b71f" + }, + "emit_odd_type_b.py": { + "file": "inputs/emit_odd_type_b.py", + "key": "replay/supplier7112/short-caller/emit_odd_type_b.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "d1fa8b67d98beacd6bb574b3d5fcbc94b8646a7ffbce91d2a6fd4d690d3c5329" + }, + "independent.py": { + "file": "inputs/independent.py", + "key": "replay/supplier7112/short-caller/independent.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874" + }, + "lower.py": { + "file": "inputs/lower.py", + "key": "replay/supplier7112/short-caller/lower.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "67345fdfc8e5bb816e24b37dfafad0396372c48ec4e1b95b8b69f019a8fdfdee" + }, + "mirrored.py": { + "file": "inputs/mirrored.py", + "key": "replay/supplier7112/short-caller/mirrored.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "55dd441a3a7f504b351857d45fd701994a0950ae1baec6c4c2b4b0166fb69db3" + }, + "odd_unit_dyadic_tapes.py": { + "file": "inputs/odd_unit_dyadic_tapes.py", + "key": "replay/supplier7112/short-caller/odd_unit_dyadic_tapes.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "3cdafa35635360a487ce400ec8d585f6134dd7c58209543528e98e7db178bbc7" + }, + "signed_model.py": { + "file": "inputs/signed_model.py", + "key": "replay/supplier7112/short-caller/signed_model.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "f88c798b9a22c656ea0b755b4f32be411c1f80687dff1a1ac9e9c2a0b5f4203e" + }, + "upstream_application.py": { + "file": "inputs/upstream_application.py", + "key": "replay/supplier7112/short-caller/upstream_application.py", + "manifest": "inputs/7113-SHA256.json", + "sha256": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184" + } + }, + "files": { + "inputs/7113-SHA256.json": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "git_blob": "5a7d6b80dc51aa918a5d521b60d18f9a6bbbc52e", + "path": "research/signed-caller-8x9/SHA256.json", + "sha256": "064e11ecfedce9937ea1782e5baee37e89b3c9eebabed5b4a9ba84f412bbe078", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/07a76c5e2738882c0cb322278e56f6cae3c9885d/research/signed-caller-8x9/SHA256.json" + }, + "inputs/7334-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" + }, + "inputs/7357-SHA256.json": { + "commit": "b4902a36a1506ab87cbdee03c51345b179fb00a6", + "git_blob": "da232d65c09203969358334906af2700a881a170", + "path": "research/p104-type-b-odd-even-idle-bound/receipts/SHA256.json", + "sha256": "877af2f9d65e0457e74f843a6ede78571ffdf9d57e7565d383c3c4d6be91d54c", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/b4902a36a1506ab87cbdee03c51345b179fb00a6/research/p104-type-b-odd-even-idle-bound/receipts/SHA256.json" + }, + "inputs/7394-SHA256.json": { + "commit": "c8347ada9a88fbe34b863f492cecb73dd3b30e6e", + "git_blob": "a91f428f8c1e13996000466af0517845096f48b1", + "path": "research/p104-type-b-odd-odd-idle-bound/receipts/SHA256.json", + "sha256": "fe2dc40405be33fd243b68bfdc7f73c1ad96640bed8722723be62c08956bf37e", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/c8347ada9a88fbe34b863f492cecb73dd3b30e6e/research/p104-type-b-odd-odd-idle-bound/receipts/SHA256.json" + }, + "inputs/PR7344-CONTRACT.json": { + "commit": "1a5885ae071d0e81b77aa9a6f4616f9464821096", + "git_blob": "3820797cc7e5d321391f0ceb4ee1c088a30fb80f", + "path": "research/p104-retained-j-phase-provider-bound/CONTRACT.json", + "sha256": "e77f3e124605a059cbf803e8a64cfb99e528091c7b99cbe4ea9dc82b56c75967", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/1a5885ae071d0e81b77aa9a6f4616f9464821096/research/p104-retained-j-phase-provider-bound/CONTRACT.json" + }, + "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/CrocSwap/integer-mult-bounds/blob/aaeec8c0acf01e99a5f331ef363a698d9c084ace/research/p104-helper-319-fused-return/WORD.json.gz" + }, + "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" + } + }, + "schema_version": 1 +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/README.md b/research/p104-fixed-type-b-two-return-provider-bound/README.md new file mode 100644 index 0000000000..c475c88044 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/README.md @@ -0,0 +1,64 @@ +# Fixed Type B two-return provider bound + +**NO VERIFIED GAIN.** The complete comparator is independently +reproduced [#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) +`aaeec8c0acf01e99a5f331ef363a698d9c084ace`, κ +`0.00364665195644`, with exact signed +[#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +`07a76c5e2738882c0cb322278e56f6cae3c9885d`. + +The two original Type B odd idles at clocks 1339 and 2970 +return separate rails. The literal scan and independent +emitter trace agree across all eight ports and four phases. +The signed child contributes q⁻¹ times the corresponding body +and its physical sign correction contributes q². Erasing both +selected calls leaves zero odd response on their fixed returns. + +For a single canonical rank-16 or rank-18 core per port, the +required carrier volume exceeds the directed affordability +upper under the stated fibre and volume-linear price +assumptions. The same capacity inequality holds at every +canonical tensor width m ≥ 8 under those assumptions. +[Proof and scope](PROOF.md). + +## Replay + +Use CPython 3.12 with assertions from a clean checkout. + +```sh +python3.12 -I -B research/p104-fixed-type-b-two-return-provider-bound/replay.py +``` + +The standard-library replay authenticates the retained +sources, regenerates the exact two-rank quote and both +incidence receipts, and rejects three altered inputs. +Use `--out fresh-directory` to retain all three receipts. +[Source provenance](PROVENANCE.json) · [Verification](VERIFICATION.md). + +## Open next questions + +Can a changed erased map deliver an independent q-odd response +to the original two returns at positive complete margin? +Start with one exact restored owner and explicit new input and +return incidences. Price the new interface, routing and retained +outputs before any host build. + +## Credit + +[#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) +and [#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +supply the exact native and signed caller. +[#7295](https://github.com/CrocSwap/integer-mult-bounds/pull/7295) +supplies the fixed-contact inventory and rank-additive grouping +precedent. [#7394](https://github.com/CrocSwap/integer-mult-bounds/pull/7394) +supplies the exact odd-idle pair and one-projection exclusion. +[#7357](https://github.com/CrocSwap/integer-mult-bounds/pull/7357) +and [#7298](https://github.com/CrocSwap/integer-mult-bounds/pull/7298) +supply the exact signed invoice and directed tariff. +[#7344](https://github.com/CrocSwap/integer-mult-bounds/pull/7344) +supplies the width-eight displacement method for an earlier +Type A provider question. This package uses its capacity +argument on the two separate Type B returns and supplies the +uniform tensor-width algebra. OpenAI Codex and subagents +materially assisted proof, implementation, independent replay +and packaging. diff --git a/research/p104-fixed-type-b-two-return-provider-bound/SOURCES.json b/research/p104-fixed-type-b-two-return-provider-bound/SOURCES.json new file mode 100644 index 0000000000..e8c2f265cd --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-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-fixed-type-b-two-return-provider-bound/TASK.json b/research/p104-fixed-type-b-two-return-provider-bound/TASK.json new file mode 100644 index 0000000000..8a6929ae23 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/TASK.json @@ -0,0 +1,117 @@ +{ + "actual_scope": "One exact #7334/#7113 Type B odd-idle pair at clocks 1339/2970. Check fixed incidence on both original returns and necessary canonical one-core capacity at ranks 16 and 18.", + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent verification and packaging.", + "author": "P104 Type B two-return physical binding research", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "bottleneck_link": "The paid credit requires one priced core to supply both original signed return differences.", + "budget_minutes": 12, + "evidence": "Literal scan and independent emitter induction agree on 32 port/phase checks. Erased odd response is zero. Both exact canonical volume lower bounds exceed affordability.", + "open_questions": [ + { + "blocked_by": "Fixed incidence supplies neither odd return and canonical core volume is unaffordable.", + "first_step": "Name one explicit changed q-odd erased map with two separate restored returns and price its new interfaces.", + "question": "Can a changed erased map supply an independent odd response at positive complete margin?", + "why_it_matters": "Changing the even erased baseline requires a different necessary bound and full new proof." + } + ], + "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": "Extend the one-projection scope to both original returns under fixed physical incidence and a conditional volume-linear invoice.", + "scope_status": "changed", + "stop_rule": "One pair, eight ports, four physical signs and 30 seconds per phase engine. Stop after the canonical price exclusion.", + "task_id": "p104-side-correction" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/VERIFICATION.md b/research/p104-fixed-type-b-two-return-provider-bound/VERIFICATION.md new file mode 100644 index 0000000000..d079ad33b9 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/VERIFICATION.md @@ -0,0 +1,26 @@ +# Verification + +Direct CPython 3.12.14 replay exited 0 in 0.52 seconds. +A relocated Git-free replay in a cleared environment exited +0 in 0.56 seconds and reproduced all three receipts byte for byte. + +The literal and emitter engines agree on all 32 port-phase +comparisons, both odd-idle clocks, zero erased odd response and +two independent required return differences. The directed quote +rebuilds both exact volume-price failures. Three altered-input +controls reject the signed quote dependency, caller and emitter. +The literal incidence control also shows that an inserted query +would invalidate the fixed-support argument. + +The first literal runner stopped at a source-width assertion. +The retained atlas records 73, and 8 is the analytic comparison +width. The corrected runner preserves both values. +[First-attempt receipt](receipts/FIRST-ATTEMPT.json) gives the +original log digest and diagnostic. The original log is retained. + +The uniform tensor-width extension is proved in [PROOF.md](PROOF.md). +The replay verifies the exact source and extremal-width price. +No new physical construction, native supplier or complete +caller was built. + +[Replay](README.md) · [Exact receipt hashes](receipts/SHA256.json). diff --git a/research/p104-fixed-type-b-two-return-provider-bound/VERIFY.json b/research/p104-fixed-type-b-two-return-provider-bound/VERIFY.json new file mode 100644 index 0000000000..c578b21d0c --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/replay.py" + ], + "checks": "Regenerate the two-rank quote and both phase receipts, compare all 32 cases and reject altered inputs.", + "timeout_seconds": 150 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/engines/physical_trace.py b/research/p104-fixed-type-b-two-return-provider-bound/engines/physical_trace.py new file mode 100644 index 0000000000..8a21b21e0b --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/engines/physical_trace.py @@ -0,0 +1,144 @@ +"""Reconcile the retained odd rails and all 32 port/phase cases from source.""" +from argparse import ArgumentParser +from fractions import Fraction +from hashlib import sha256 +from json import dumps,loads +from math import comb +from pathlib import Path +from signal import SIGALRM,alarm,signal + +ROOT=Path(__file__).resolve().parent +PINS={ + "7113-SHA256.json":"064e11ecfedce9937ea1782e5baee37e89b3c9eebabed5b4a9ba84f412bbe078", + "7334-ADMITTED.json":"c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "PLAN.md":"5673bc5c34a77cfa919010c40bc1666f1293fc2be7079869fd287968e933deaf", + "QUOTE.json":"89106529258a20b7e16d0e89a48eec6daf578ed6c3d5565b8a953676a9aaad53", + "CONTRACT-READBACK.json":"2ae99cc148441ffe655b2b33f9e87b8f0939f55436a4b81ff18654efa295f72e", + "PR7344-CONTRACT.json":"e77f3e124605a059cbf803e8a64cfb99e528091c7b99cbe4ea9dc82b56c75967", +} +SOURCE_FILES=("check_odd_physical_binding.py","upstream_application.py","emit_odd_type_b.py", + "emit_odd_type_ab.py","signed_model.py","independent.py","lower.py", + "odd_unit_dyadic_tapes.py","ODD-LOCALIZED-GROUPING.json","mirrored.py") +HEAD="aaeec8c0acf01e99a5f331ef363a698d9c084ace" +CALLER="07a76c5e2738882c0cb322278e56f6cae3c9885d" +CALLER_BYTES="255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc" +PORTS=[15,17,27,34,35,42,47,55] +CASES,SECONDS=32,30 + + +def unique(items): + obj=dict(items) + if len(obj)!=len(items): + raise ValueError("duplicate JSON key") + return obj + + +def check(root,name,digest): + data=(root/"inputs"/name).read_bytes() + if sha256(data).hexdigest()!=digest: + raise ValueError("changed dependency inputs/"+name) + return data + + +def inputs(root): + raw={n:check(root,n,d) for n,d in PINS.items()} + manifest=loads(raw["7113-SHA256.json"],object_pairs_hook=unique) + source_pins={name:manifest["replay/supplier7112/short-caller/"+name] for name in SOURCE_FILES} + source_pins["CALLER.json"]=manifest["expected/ODD-TYPE-AB-CALLER.json"] + assert source_pins["CALLER.json"]==CALLER_BYTES + raw.update({n:check(root,n,d) for n,d in source_pins.items()}) + return raw,PINS|source_pins + + +def phase_cases(ports,axes): + phases=("1","i","-1","-i") + results=[] + for port in ports: + for a in range(4): + opposite=(a+2)%4 + pos=a + signed=(-a)%4 + shift=2*a%4 + assert (signed+shift)%4==pos and shift==2*opposite%4 + assert (-opposite)%4==(signed+2)%4 + results.append(dict(port=port,q=phases[a],positive_coefficient=phases[pos], + signed_coefficient=phases[signed],translation_coefficient=phases[shift], + fixed_erased_normalized_rank=0,opposite_pair_required_rank=2, + return_owners=[["main",port,r] for r in axes])) + assert len(results)==CASES + return results + + +def main(): + assert __debug__ + cli=ArgumentParser(description=__doc__) + cli.add_argument("--root",type=Path,default=ROOT) + args=cli.parse_args() + def stop(*_): + raise TimeoutError("30-second exact source cap") + signal(SIGALRM,stop) + alarm(SECONDS) + try: + raw,pins=inputs(args.root) + exact=loads(raw["7334-ADMITTED.json"],object_pairs_hook=unique) + readback=loads(raw["CONTRACT-READBACK.json"],object_pairs_hook=unique) + quote=loads(raw["QUOTE.json"],object_pairs_hook=unique) + assert (exact["head"],exact["caller"])==(HEAD,CALLER) + assert readback["caller"]==CALLER and readback["caller_sha256"]==CALLER_BYTES + assert readback["binding_sha256"]==pins["check_odd_physical_binding.py"] + assert readback["events"]==[["B","IDLE_ODD",68,[8],-1],["B","IDLE_ODD",70,[9],-1]] + + # Authenticate the retained caller bytes, but parse only its header. + header,separator,_=raw["CALLER.json"].partition(b',"events":') + assert separator + c=loads(header+b"}",object_pairs_hook=unique) + b=c["types"]["B"] + assert (c["stages"],b["offset"],b["roles"],b["ports"])==(17,36,36,PORTS) + axes=[e[2] for e in readback["events"]] + assert [r-b["offset"] for r in axes]==[32,34] + for e in readback["events"]: + d=b["diagonal"][e[2]-b["offset"]] + assert d[:2]==[-1,0] and [i for i,x in enumerate(d[2:],1) if x]==e[3] + + groups=loads(raw["ODD-LOCALIZED-GROUPING.json"],object_pairs_hook=unique) + chosen=min((g for g in groups["results"] if "idles" in g), + key=lambda g:g["idle_basis_ops"]+g["host_basis_ops"]) + assert len(chosen["idles"])==60 + assert all(0<=r<32 for _,v,w in chosen["idles"] for z in (v,w) for r,_ in z) + tokens={ + "emit_odd_type_b.py":('phase=(half,half,half+1,half+1)','s,t=0,1', + "events.append(['B','IDLE_ODD',N+i,[j],-1])", + "events.extend(['B','LAMBDA',r,-1] for r in range(N))", + "[0,1,'-1','1/2']"), + "emit_odd_type_ab.py":('out[2]+=offset','[s+offset,t+offset,al,be]'), + "odd_unit_dyadic_tapes.py":("a,b=8,9","n=2+2*(a-1+b-1)","N=n,masks=masks"), + "check_odd_physical_binding.py":("signed=sub(pos,terms([(q,2)]))","translation(sub(pos,signed))==q"), + "upstream_application.py":("('main', pi, pair[0])","('helper', ci, r)","('owned', ci, r-word['public'])"), + "signed_model.py":("q=e[4] if op=='IDLE_ODD' else 0",), + "independent.py":("q=2);rows[r]=out",), + } + for file,proof in tokens.items(): + assert all(s.encode() in raw[file] for s in proof),file + results=phase_cases(PORTS,axes) + classes=[sum(comb(8,k) for k in range(9) if k%4==r) for r in range(4)] + need=Fraction(2*(min(classes[0],classes[2])+min(classes[1],classes[3])),256) + assert classes==quote["phase"]==[72,64,56,64] and str(need)==quote["need"]=="15/16" + assert [r["rank"] for r in quote["rows"]]==[16,18] + assert all(Fraction(r["necessary_volume"])>Fraction(r["affordable_upper"]) + and Fraction(r["complete_upper"])<0 for r in quote["rows"]) + result=dict(head=HEAD,caller=CALLER,pins={"inputs/"+n:d for n,d in pins.items()}, + caps={"comparisons":CASES,"seconds":SECONDS},comparisons=results, + clocks=[1339,2970],masks=[[8],[9]],unchanged_rail_support=[32,33,34,35], + core_support=[0,31],host_pairs=[0,1],grouped_even_sites=60, + residues=classes,minimum_paired_displacement=str(need), + q_sensitive_retained_path_to_selected_returns=False, + canonical_volume_obstruction=[dict(rank=r["rank"],necessary_volume=r["necessary_volume"], + affordable_upper=r["affordable_upper"],complete_upper=r["complete_upper"]) for r in quote["rows"]], + scope="Fixed source, return and incidence bindings, with no caller event or native word decoded.") + finally: + alarm(0) + print(dumps(result,indent=2,sort_keys=True)) + + +if __name__=="__main__": + main() diff --git a/research/p104-fixed-type-b-two-return-provider-bound/engines/quote_volume.py b/research/p104-fixed-type-b-two-return-provider-bound/engines/quote_volume.py new file mode 100644 index 0000000000..1ce840462b --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/engines/quote_volume.py @@ -0,0 +1,67 @@ +"""Preprice two rank cells for a two-return canonical signed odd-idle child.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +import json +from math import comb +from pathlib import Path +from runpy import run_path +from signal import SIGALRM,alarm,signal + +ROOT=Path(__file__).resolve().parent +PINS={ + "R149-PRICE.json":"cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "R85-PRICE.json":"33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262", + "pricing.py":"f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "PR7344-CONTRACT.json":"e77f3e124605a059cbf803e8a64cfb99e528091c7b99cbe4ea9dc82b56c75967", +} +def load(name): + raw=(ROOT/"inputs"/name).read_bytes() + if sha256(raw).hexdigest()!=PINS[name]: + raise ValueError("changed dependency "+name) + return json.loads(raw) if name.endswith(".json") else raw + +def bins(n): + return [sum(comb(n,k) for k in range(j,n+1,4)) for j in range(4)] + +def stop(*_): + raise TimeoutError("10-second quote cap") + +def main(): + assert __debug__ + signal(SIGALRM,stop) + alarm(10) + p=load("R149-PRICE.json") + old=load("R85-PRICE.json") + contract=load("PR7344-CONTRACT.json") + load("pricing.py") + assert (p["head"],p["caller"])==(old["head"],old["caller_head"]) + assert p["ports"]==8 and [1339,2970] in p["pairs"] + assert "canonical_carrier_at_width_eight" in contract + tariffs=run_path(str(ROOT/"inputs/pricing.py")) + k=Q(p["points"]["incumbent"]) + hist=Counter({int(r):n for r,n in old["complete_targets"].items()}) + hist.subtract({int(r):n for r,n in old["complete_paid"].items()}) + phase=bins(8) + assert phase==[72,64,56,64] + need=2*Q(min(phase[0],phase[2])+min(phase[1],phase[3]),256) + assert need==Q(15,16) + h9=tariffs["power_bounds"](9,k) + rows=[] + for rank in (16,18): + n=8*rank + residues=bins(n) + capacity=1-Q(min(residues),2**n) + volume=need/capacity + hr=tariffs["power_bounds"](rank,k) + affordable=2*h9[1]/hr[0] + assert volume>affordable + gain=16*h9[1]-8*volume*hr[0] + rows.append(dict(rank=rank,width=n,residues=residues,capacity=str(capacity), + necessary_volume=str(volume),affordable_upper=str(affordable), + gross_upper=str(gain),complete_upper=str(tariffs["cost"](hist,k)[1]+gain))) + alarm(0) + print(json.dumps(dict(pins=PINS,phase=phase,need=str(need),rows=rows),indent=2,sort_keys=True)) + +if __name__=="__main__": + main() diff --git a/research/p104-fixed-type-b-two-return-provider-bound/engines/signed_returns.py b/research/p104-fixed-type-b-two-return-provider-bound/engines/signed_returns.py new file mode 100644 index 0000000000..052c58607c --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/engines/signed_returns.py @@ -0,0 +1,151 @@ +"""Check exact owner incidence and signed phase on the two fixed Type B returns.""" +import ast +from collections import Counter +from fractions import Fraction +from gzip import decompress +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from signal import SIGALRM, alarm, signal + +ROOT = Path(__file__).resolve().parent +PINS = { + "inputs/APPLICATION.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "inputs/CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "inputs/DATA-PHASES.json": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa", + "inputs/EMITTER.py": "7a7993648433c6febad8c07b315aec1b96598835a3f587b62040423c33c3b71f", + "inputs/PHYSICAL-BINDING.py": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "inputs/PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "inputs/VOLUME-QUOTE.json": "89106529258a20b7e16d0e89a48eec6daf578ed6c3d5565b8a953676a9aaad53", + "inputs/WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a", +} +KEYS = {1339: (68, 8), 2970: (70, 9)} +PHASES = ((1, 0), (0, 1), (-1, 0), (0, -1)) +CAP = 30 + + +def unique(pairs): + obj = dict(pairs) + if len(obj) != len(pairs): + raise ValueError("duplicate JSON key") + return obj + + +def checked(path): + raw = (ROOT / path).read_bytes() + if sha256(raw).hexdigest() != PINS[path]: + raise ValueError(f"changed dependency {path}") + return raw + + +def stop(*_): + raise TimeoutError("30-second hard cap") + + +def chronology(events, count): + lineage = list(range(count)) + watched = {role: [] for role, _ in KEYS.values()} + for clock, e in enumerate(events): + if e[0] == "J": + roles = e[2] + e[3][:2] + op = "J" + else: + _, op, a, *args = e + if op == "SWAP": + b, = args + lineage[a], lineage[b] = lineage[b], lineage[a] + continue + if op in ("ADD", "QUERY"): + roles = [a, args[0]] + else: + assert op in ("SCALE", "LAMBDA", "IDLE_ONE", "IDLE_ODD") + roles = [a] + for token in watched.keys() & {lineage[r] for r in roles}: + watched[token].append([clock, op]) + return watched, lineage + + +def functions(raw): + names = {"need", "bits", "dot", "terms", "sub", "polynomial", "translation"} + tree = ast.parse(raw) + defs = [node for node in tree.body if isinstance(node, ast.FunctionDef) and node.name in names] + assert {node.name for node in defs} == names + env = {"Counter": Counter} + exec(compile(ast.Module(body=defs, type_ignores=[]), "pinned APPLICATION.py", "exec"), env) + return env + + +def main(): + assert __debug__ + signal(SIGALRM, stop) + alarm(CAP) + data = {p: checked(p) for p in PINS} + obj = lambda p: loads(data[p], object_pairs_hook=unique) + caller = obj("inputs/CALLER.json") + assert caller["stages"] == 17 and caller["ambient_rank"] == 145 + quote = obj("inputs/PRICE.json") + volume = obj("inputs/VOLUME-QUOTE.json") + assert [1339, 2970] in quote["pairs"] + assert volume["need"] == "15/16" + assert all(Fraction(row["necessary_volume"]) > Fraction(row["affordable_upper"]) + and Fraction(row["gross_upper"]) < 0 for row in volume["rows"]) + tape = caller["events"] + assert len(tape) == 4783 + for t, (role, stage) in KEYS.items(): + assert tape[t] == ["B", "IDLE_ODD", role, [stage], -1] + hits, final_lineage = chronology(tape, caller["roles"]) + assert hits == {role: [[t, "IDLE_ODD"]] for t, (role, _) in KEYS.items()} + for role, stage in KEYS.values(): + returned = final_lineage.index(role) + diagonal = caller["types"]["B"]["diagonal"][returned - caller["types"]["B"]["offset"]] + assert diagonal[:2] == [-1, 0] + assert [s for s, selected in enumerate(diagonal[2:], 1) if selected] == [stage] + + # An inserted retained query would invalidate the erased-support conclusion. + variant = tape[:] + variant.insert(0, ["B", "QUERY", 68, 69, -1]) + altered, _ = chronology(variant, caller["roles"]) + assert altered[68][0] == [0, "QUERY"] and len(altered[68]) == 2 + + payload = decompress(data["inputs/WORD.json.gz"]) + assert sha256(payload).hexdigest() == "9aa8d6b054ba7eb2289d052c1079b16be518d2f0fbfb244569fa18e3733acdac" + word = loads(payload, object_pairs_hook=unique) + ports = caller["types"]["B"]["ports"] + assert len(ports) == 8 and len(set(ports)) == 8 + recorded_source_width = obj("inputs/DATA-PHASES.json")["m"] + assert recorded_source_width == 73 + algebra = functions(data["inputs/APPLICATION.py"]) + dot, terms, sub, translate = (algebra[name] for name in ("dot", "terms", "sub", "translation")) + geometry, cases = [], [] + for port in ports: + q = word["ports"][port] + corrections = [] + for _, stage in KEYS.values(): + axes = [q] + [1 << (9 + 8 * (stage - 1) + j) for j in range(8)] + assert all(dot(a, b) == (i == j) for i, a in enumerate(axes) for j, b in enumerate(axes)) + positive = terms((a, 1) for a in axes) + signed = sub(positive, terms([(q, 2)])) + assert signed[q] == 3 and translate(sub(positive, signed)) == q + corrections.append(q) + geometry.append(dict(port=port, central_mask=q, translation_masks=corrections)) + for phase in range(4): + wanted = PHASES[-phase % 4] + opposite = PHASES[-(phase + 2) % 4] + assert wanted != opposite + parity = PHASES[2 * phase % 4] + assert parity == PHASES[2 * (phase + 2) % 4] + cases.append(dict(port=port, phase=phase, required_at_unit_bodies=[wanted, wanted], + opposite_q_difference_rank=2, retained_odd_rank=0, correction=parity)) + assert len(cases) == 32 + assert PHASES[1] != PHASES[-1 % 4] # Wrong orientation is detected at q=i. + alarm(0) + receipt = dict(head=quote["head"], caller=quote["caller"], pins=PINS, clocks=list(KEYS), + events=len(tape), hits=hits, geometry=geometry, cases=cases, + recorded_source_width=recorded_source_width, volume_test_width=8, + volume_cells=volume["rows"], decision="excluded in the fixed-contact canonical class", + caps=dict(phase_cases=32, runner_seconds=CAP), unresolved=0) + print(dumps(receipt, sort_keys=True, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/7113-SHA256.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7113-SHA256.json new file mode 100644 index 0000000000..5a7d6b80dc --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7113-SHA256.json @@ -0,0 +1,69 @@ +{ + "replay/supplier7108/CALLER.json": "9557f713ab4ffb91ede05e8a6d5668c694b9940fc16f2f2d657e2f2b2cac2d3f", + "replay/supplier7112/RESULT.json": "7b808ff32d9803084aaaf820cd172ddc9001c7aebbd17e0324e779abeff91b30", + "replay/supplier7112/WORD.json.gz": "fe0b1dc3049a6b72760a705af2e698e0e9998e969e19862a696eba63434eb233", + "replay/supplier7112/short-caller/DATA-PHASES.json": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa", + "replay/supplier7112/short-caller/ODD-LOCALIZED-GROUPING.json": "8aac6b3d9e528bffbcf411bbd300c8e0f0b7bf75da45ab12badf3f3530ffcbe2", + "replay/supplier7112/short-caller/ODD-UNIT-DYADIC-TAPES.json": "c3195057f7a6723a81172ed540d0f1c4ba699ff3cb8dc37cbde7bb481d9b976c", + "replay/supplier7112/short-caller/ODD-UNIT-PREFIX-CLOSURES.json": "3b953e5d3e83e7573a3e908a5a23edb78773d4d22816aca54f766f0f0e9f5403", + "replay/supplier7112/short-caller/SHORT-ADMISSION-PARTIAL.json": "7977815fe72382738727e3d550eea3bc735923c9c57968872d4f863cb39cd401", + "replay/supplier7112/short-caller/SHORT-CALLER-RAW-PRICE.json": "a4f83d65d250efb40f6506658374d7414afdde11c96eb88b7d2fbb182aa090c1", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-0-1000.log": "a916a76627fb79bf606b22f857ca93db6342891fb2c85b20658b5002c359e422", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-1000-2000.log": "da633bfa408e98a2f2a958262a09d5e4274a9b25f7b4a6a73df5a97f37338f79", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-2000-3047.log": "e8d500c0261a4a9e0cf3da2838d82806ed497ab9cf57cb8620ca6debfb98525c", + "replay/supplier7112/short-caller/SHORT-PRECISION.json": "68a00d2b83ee2eb944d2e05fc7f32bc9aa37282c45b968f0ab6fd500659ac028", + "replay/supplier7112/short-caller/SHORT-TYPE-A-ROOT.json": "e9812d720942d8149c219dfa28c1081ff1d353529e5282ca4624a04233f38f88", + "replay/supplier7112/short-caller/admission-source/ARCHIVE-CHAIN.json": "6de95c4eb396e69883fbeeb3989782bbbe232c22644af1c804050badca10f456", + "replay/supplier7112/short-caller/admission-source/FULL-RESULT.json": "d9ba709fa5dcefffe3f3abdcf34600ce188224703cfd743e6db8b58ba4816cb7", + "replay/supplier7112/short-caller/admission-source/INDEPENDENT-NOTICE.md": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "replay/supplier7112/short-caller/admission-source/INDEPENDENT-SOURCES.json": "dced1457df5230466ba6202fd6d4595bc2b7fb2a65302806bf2720b1837ff350", + "replay/supplier7112/short-caller/admission-source/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "replay/supplier7112/short-caller/admission-source/NATIVE-INPUTS.json": "9bb6c1567783661334d6c1d23f715ce5635cbbb513678819ab9e020a34c7e4c0", + "replay/supplier7112/short-caller/admission-source/NOTICE": "da12736e2e824167ff56f2ecb623a5f88f75a270410360890f61dffc33bab249", + "replay/supplier7112/short-caller/admission-source/data/bit-admission.json": "a46b6c6040f75184cab5467656811ad988c216e3bc8e44d595a5015b6e49620b", + "replay/supplier7112/short-caller/admission-source/data/caller.json": "3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e", + "replay/supplier7112/short-caller/admission-source/data/final.json.gz": "2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883", + "replay/supplier7112/short-caller/admission-source/frozen/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "replay/supplier7112/short-caller/admission-source/frozen/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "replay/supplier7112/short-caller/admission-source/frozen/physical.py": "4e995d1158033d83bf69b671f23dc7924d66edbbe07623ba063ba7421234ea20", + "replay/supplier7112/short-caller/admission-source/frozen/verify_host3_odd.py": "e75ad2096ba2587d1dc9c8982b2c2eb7c6fd2636a80adcd943314ef2cf6fd258", + "replay/supplier7112/short-caller/admission-source/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "replay/supplier7112/short-caller/admission-source/interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "replay/supplier7112/short-caller/admission-source/precision_replay.py": "850d9098c5946ab27ef5228acc54d59df2196e72259d3e21588ec0c319c8f5ee", + "replay/supplier7112/short-caller/admission-source/retained/odd-native-common-grid/independent_bounds.py": "198521def614fe78fa728f1dde2b7fb820c0c0e0ac3ad0c9224dccbf51eac0d5", + "replay/supplier7112/short-caller/admission-source/retained/query-only-precision-envelope/envelopes.py": "783da6b5b450fc07434946cb9ec86070dfee01df6b5fa1c385cb024def2c9a9f", + "replay/supplier7112/short-caller/admission-source/retained/query-only-precision-envelope/source_binding.py": "624c459311c58f3847b7713b818bfd340153abf42919f02ac9aa8892ed52a2bd", + "replay/supplier7112/short-caller/assemble_odd_application.py": "6cdac39ab196a70c53ba2283c2555cd8dee30644dcc4769628b46fb53bd55a1f", + "replay/supplier7112/short-caller/candidate_gate.py": "e71097ca81a082afd7c647324a6c94cb357aeb1084693a095a0f3e0b45a9b11a", + "replay/supplier7112/short-caller/check_odd_caller_exact_grid.py": "abd5a5fd011b71e5b382cbc058855594d4f2fe7b049f375506675c0303180f54", + "replay/supplier7112/short-caller/check_odd_fixed_tape_counts.py": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "replay/supplier7112/short-caller/check_odd_partial_admission.py": "4416b1ea5f07f8a91028a2e500116588fbdfaed95a8ef9bac7a46bcb44b9478e", + "replay/supplier7112/short-caller/check_odd_physical_binding.py": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "replay/supplier7112/short-caller/check_odd_precision.py": "b2d9c13577158157a587ace766d9dadb7819a0164b372722329d9754e1be6c61", + "replay/supplier7112/short-caller/connected.py": "469537b46fb92c5aca926d3b1497da5425408673b0a73ba1427f23d872b414e7", + "replay/supplier7112/short-caller/cut_library.py": "7ccb81af19db54ec7cdb44849af018d4ca8893f80f17277914f8566715985133", + "replay/supplier7112/short-caller/emit_odd_type_ab.py": "7a7993648433c6febad8c07b315aec1b96598835a3f587b62040423c33c3b71f", + "replay/supplier7112/short-caller/emit_odd_type_b.py": "d1fa8b67d98beacd6bb574b3d5fcbc94b8646a7ffbce91d2a6fd4d690d3c5329", + "replay/supplier7112/short-caller/host34.py": "bded1a8626d65ee40c4ba3b25780fc03f0fa08906f3c83f631892df072d9a9b7", + "replay/supplier7112/short-caller/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "replay/supplier7112/short-caller/interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "replay/supplier7112/short-caller/lower.py": "67345fdfc8e5bb816e24b37dfafad0396372c48ec4e1b95b8b69f019a8fdfdee", + "replay/supplier7112/short-caller/mirrored.py": "55dd441a3a7f504b351857d45fd701994a0950ae1baec6c4c2b4b0166fb69db3", + "replay/supplier7112/short-caller/odd_unit_dyadic_tapes.py": "3cdafa35635360a487ce400ec8d585f6134dd7c58209543528e98e7db178bbc7", + "replay/supplier7112/short-caller/screen.py": "01e3eaba4b710a080e6e393e53157e6a119fdf312620eed26e9185ca91f6bea6", + "replay/supplier7112/short-caller/short_dyadic_seam.py": "6e588b365618ab2df4fa2d1f16073d09a953a7cd6e826e1f96bbf87f950b672b", + "replay/supplier7112/short-caller/short_native_catalogue.py": "775695c379f407801910531565cc371012cee501b2cec5f5d718ecdccf06b64d", + "replay/supplier7112/short-caller/signed_child.py": "ef03444360f02225138be9b38e2f9a85f313eeaa910d63a365de0f16d228cb8b", + "replay/supplier7112/short-caller/signed_model.py": "f88c798b9a22c656ea0b755b4f32be411c1f80687dff1a1ac9e9c2a0b5f4203e", + "replay/supplier7112/short-caller/stage.py": "0ab5546e926dd98d3ad833909b534840b7d8d0467c4790ca09bc2b14b37313f5", + "replay/supplier7112/short-caller/upstream_application.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "replay/supplier7112/short-caller/upstream_native_catalogue.py": "6120e1ea1e07eeba757694d209437a38f121b0a377cc466889a30fa52c561472", + "expected/ODD-8X9-APPLICATION-CHECKS.json": "10512d62f540fe7bb839ec94b6a21bbdf4a3dfadf56b4ec9095d4b242bda19b8", + "expected/ODD-ADMISSION-PARTIAL.json": "75ec76e4393ef1622fcff9e2727dc411921076af4a506d97506665add140fa86", + "expected/ODD-CALLER-EXACT-GRID.json": "87d25d9fa3778bf4784e3a9e17f32ce5ba372663c6e97392cc62b87e6719042c", + "expected/ODD-FIXED-TAPE-COUNTS.json": "1a8bf36a966edca8c61f3be803cdbe136307095dec40245cdc93e79a9062fe99", + "expected/ODD-PHYSICAL-BINDING.json": "ade5f8cbb2e30677b1d48d23a1aa270b3d0b72e2504472ab9fdb71d124b075b5", + "expected/ODD-PRECISION.json": "9c03607288cc2afb80cb02c197f93360978233036418b32b09ad91be16f9c153", + "expected/ODD-TYPE-AB-CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "expected/ODD-TYPE-AB-REPLAY.json": "71fd0a7ad8b743266c6a75100f3543b48ea7d6fcbe45f008d3b61270e3b660a0" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/7334-ADMITTED.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7334-ADMITTED.json new file mode 100644 index 0000000000..464c89e45c --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7334-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-fixed-type-b-two-return-provider-bound/inputs/7357-SHA256.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7357-SHA256.json new file mode 100644 index 0000000000..da232d65c0 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7357-SHA256.json @@ -0,0 +1,5 @@ +{ + "INDEPENDENT.json": "afec20386a8fbdc70d1b96998adbe18edace42a3e14a015e0eab5c09fc311617", + "LEAD.json": "bf0cbae853422e85788449b40ddc2fa807b042d8a357a56a7c7654dda51331e4", + "PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/7394-SHA256.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7394-SHA256.json new file mode 100644 index 0000000000..a91f428f8c --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/7394-SHA256.json @@ -0,0 +1,5 @@ +{ + "CONTACT-SETS.json": "52ec9535058018cc5ce25eb1194a80a6bbeeae03fe598f15125415bd8ca7668b", + "PRICE.json": "cca4b82a9b7b1670705373a245282043e32527f453cd24ba4500794857686872", + "PRIMARY.json": "5ee2e636b438a569b29597cadc58b44b0b9205f39e52cf71ceb96ae9301b893f" +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/CALLER.json.gz b/research/p104-fixed-type-b-two-return-provider-bound/inputs/CALLER.json.gz new file mode 100644 index 0000000000..2479c3a615 Binary files /dev/null and b/research/p104-fixed-type-b-two-return-provider-bound/inputs/CALLER.json.gz differ diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/CONTRACT-READBACK.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/CONTRACT-READBACK.json new file mode 100644 index 0000000000..3e4ef070fc --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/CONTRACT-READBACK.json @@ -0,0 +1,73 @@ +{ + "binding": "replay/supplier7112/short-caller/check_odd_physical_binding.py", + "binding_sha256": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "events": [ + [ + "B", + "IDLE_ODD", + 68, + [ + 8 + ], + -1 + ], + [ + "B", + "IDLE_ODD", + 70, + [ + 9 + ], + -1 + ] + ], + "pins": { + "INPUTS.json": "abedac59097a1c35c27d91cbdb07207bc562a64743bc406d13c94a8bc970592d", + "source.py": "a2be5bb28c7a9c9d528b8bae0d9ef99636bb8fabf80d66b7f8d3084de68358aa", + "verify_caller.py": "6ef60923041d97f77f8291f568f2e81492af09021f4e1065054cf5376cbff861" + }, + "relevant_lines": [ + [ + 1, + "\"\"\"Check physical phase-polynomial substitution and exact paid occurrence binding.\"\"\"" + ], + [ + 10, + "phase=root/\"DATA-PHASES.json\"" + ], + [ + 12, + "assert sha256(phase.read_bytes()).hexdigest()==\"c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa\"" + ], + [ + 39, + "patch(\"op in ('QUERY','IDLE_ONE')\",\"op in ('QUERY','IDLE_ONE','IDLE_ODD')\")" + ], + [ + 42, + " if op == 'IDLE_ODD':" + ], + [ + 53, + " need(translation(sub(pos,signed))==q,'exact negative central phase correction')\"\"\")" + ], + [ + 66, + "phases=json.loads(phase.read_bytes())" + ], + [ + 67, + "result=f(word,caller,{\"invoice\":invoice},phases)" + ], + [ + 71, + " f(word,caller,{\"invoice\":invoice},phases)" + ], + [ + 80, + " \"scope\":\"Current caller port and ownership substitution, full phase-polynomial native contact identities on disjoint stage axes, whole signed idle/output geometry, and ordered paid positions. Retains the standard nested chart and local operator premises and requires separate full native replay and complete fixed-tape tariff application.\"}" + ] + ] +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/DATA-PHASES.json.gz b/research/p104-fixed-type-b-two-return-provider-bound/inputs/DATA-PHASES.json.gz new file mode 100644 index 0000000000..0f0c8e2b0c Binary files /dev/null and b/research/p104-fixed-type-b-two-return-provider-bound/inputs/DATA-PHASES.json.gz differ diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/ODD-LOCALIZED-GROUPING.json.gz b/research/p104-fixed-type-b-two-return-provider-bound/inputs/ODD-LOCALIZED-GROUPING.json.gz new file mode 100644 index 0000000000..5fa39f2867 Binary files /dev/null and b/research/p104-fixed-type-b-two-return-provider-bound/inputs/ODD-LOCALIZED-GROUPING.json.gz differ diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/PLAN.md b/research/p104-fixed-type-b-two-return-provider-bound/inputs/PLAN.md new file mode 100644 index 0000000000..db30456caf --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/PLAN.md @@ -0,0 +1,9 @@ +# Next provider gate for one two-return Type B odd union + +Pin #7334 aaeec8c0acf01e99a5f331ef363a698d9c084ace and #7113 07a76c5e2738882c0cb322278e56f6cae3c9885d. Select only clocks 1339/2970, independent masks {8}/{9} and logical axes 32/34 from sealed R149. Preserve both original projected returns, all other caller/target work and signed premises. R149 excludes a one-projection union. This gate admits separate outputs and tests one canonical paid packed core, so it concerns provider capacity. The admissible class preserves central/body/spectator fibres and has a q-even erased baseline. Whether a redesigned source satisfies this class is open. + +For either pair of opposite signs of q at any fixed nonzero independent body values, the old two distinct diagonal axes have nonzero opposite-phase differences, hence logical rank two. The erased output has equal action at q and −q. Triangle inequality forces at least two summed extra displacement ranks per sign pair. At physical width eight the inherited central order-four axis has residue counts [72,64,56,64] out of 256. Weight each sign pair by its smaller class, giving required displacement at least 2(56+64)V/256=15V/16. Use #7344 exact 1a5885ae071d0e81b77aa9a6f4616f9464821096, research/p104-retained-j-phase-provider-bound/CONTRACT.json SHA e77f3e124605a059cbf803e8a64cfb99e528091c7b99cbe4ea9dc82b56c75967. Its width-eight displacement method is reused; its Type A price is not. + +For one canonical independent-axis core of rank r, width-eight eigenphase residues count binomial weights modulo four across 8r binary factors. Reversing one axis shifts the count bins by eight, leaving the multiset unchanged. Allow a global phase to choose the smallest identity class. The core displaces at most (1−min(bin)/2^(8r))V'. The difference E−E0=B(K−I)A for even erased wrappers cannot have larger rank, including two returns. Divide 15/16 by this fraction to bound V'/V. Rank r=16 optimistically packs both bodies with an ordinary parity wrapper, while r=18 charges both sign coordinates. Both unit-volume complete prices are positive. At eight ports the new volume-linear charge is 8(V'/V)H_r against the removed 16H9. Affordability is bounded above by 2H9/H_r at the incumbent. Additional setup, precision, ownership and tape are granted free in this necessary gate. + +From this directory, with CPython 3.12 and assertions, run `python3.12 -I -B quote_volume.py > QUOTE.json`. This uses only pinned receipts, exact Fraction and rigorous tariff intervals. Cap two provider ranks and 10 seconds. If both necessary volume lower bounds exceed affordability, close only this canonical single-core class and pivot. Do not infer a bound for a q-odd erased baseline, noncanonical packing, new phase/spectator mixing, or two genuinely separate native outputs with another tariff. No caller or native word was decoded for this preflight. diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/PR7344-CONTRACT.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/PR7344-CONTRACT.json new file mode 100644 index 0000000000..3820797cc7 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/PR7344-CONTRACT.json @@ -0,0 +1,150 @@ +{ + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "canonical_carrier_at_width_eight": { + "additional_displacement_lower_fraction": "15/16", + "core_residues_by_sign_count": { + "1": [ + [ + 72, + 64, + 56, + 64 + ], + [ + 72, + 64, + 56, + 64 + ] + ], + "2": [ + [ + 16512, + 16384, + 16256, + 16384 + ], + [ + 16512, + 16384, + 16256, + 16384 + ], + [ + 16512, + 16384, + 16256, + 16384 + ] + ] + }, + "max_displacement_fractions": { + "1": "25/32", + "2": "385/512" + }, + "necessary_volume_ratios": { + "1": "6/5", + "2": "96/77" + }, + "phase_residues": [ + 72, + 64, + 56, + 64 + ] + }, + "complete_price": { + "additional_ordinary_cost_granted_free": true, + "complete_paid_positions": 110519, + "deleted_rank_one_positions": 192, + "productive_fields": 22461, + "retained_bit_premise": "376669/100000000", + "retained_native_stages": 17, + "signed_moment_credit_uppers": { + "one_canonical_rank_two_with_required_enlargement": { + "complete_margin_upper_at_old_crossing": "-7202937766024954691129103569387733538079372960081213/154000000000000000000000000000000000000000000000000", + "uniform_signed_moment_credit_upper_through_bit": "-4394457033105430529160116032996635255214455605967/93994140625000000000000000000000000000000000000" + }, + "one_rank_at_least_three_granting_reduced_volume": { + "complete_margin_upper_at_old_crossing": "-769204745758317884151365231353844028862188846568811/10000000000000000000000000000000000000000000000000", + "uniform_signed_moment_credit_upper_through_bit": "-19221253238502346576166559282101865112566857046237/250000000000000000000000000000000000000000000000" + }, + "one_same_volume_rank_at_least_three": { + "complete_margin_upper_at_old_crossing": "-37939402485688229723791583204430598919504278380893/400000000000000000000000000000000000000000000000", + "uniform_signed_moment_credit_upper_through_bit": "-7407084412834115525388853094033955037522285682079/78125000000000000000000000000000000000000000000" + }, + "two_same_volume_rank_one_top_ups": { + "complete_margin_upper_at_old_crossing": "-29866980917152266101/10000000000000000000000000000000000000000000000000", + "uniform_signed_moment_credit_upper_through_bit": "0" + } + } + }, + "controls": { + "corrupted_endpoint_power_rejected": true, + "known_two_bit_signed_residues": true + }, + "exact_phase_contract": { + "host_required_phase_rank_floor": 4, + "phase_pairs": [ + [ + "1", + "-1" + ], + [ + "i", + "-i" + ] + ], + "stages": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17 + ], + "type_a_query_clocks": [ + 1516, + 1580, + 1659, + 1721 + ], + "type_a_uniform_endpoint_q_power": -1 + }, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "native_per_stage": { + "distinct_public_inputs": 1501, + "distinct_public_returns": 1501, + "independent_helper_inputs_and_returns": 1101, + "main_contact_boundaries": 800, + "owned_labels": 68, + "owned_lifetimes": 73, + "peak_owned": 50, + "type_a_main": 384, + "type_b_main": 16, + "unary_paid_moves": 6279 + }, + "sha256": { + "inputs/caller/CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "inputs/caller/check_odd_caller_exact_grid.py": "abd5a5fd011b71e5b382cbc058855594d4f2fe7b049f375506675c0303180f54", + "inputs/caller/check_odd_fixed_tape_counts.py": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "inputs/caller/check_odd_physical_binding.py": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "inputs/caller/signed_child.py": "ef03444360f02225138be9b38e2f9a85f313eeaa910d63a365de0f16d228cb8b", + "inputs/caller/upstream_application.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "inputs/comparator/NATIVE-RESULT.json": "c6d1b00a83185ab0062397b363258b1f3f6685d755e9c1d4f7d3e7e511240812", + "inputs/comparator/RESULT.json": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "inputs/prices/PREDECESSOR-PRICE.json": "bbc486a3eb0e2aed03dd09f400fa94de1a59312058a9826880999155b10453bf", + "inputs/prices/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182" + } +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/R149-PRICE.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/R149-PRICE.json new file mode 100644 index 0000000000..869de538a2 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/R149-PRICE.json @@ -0,0 +1,211 @@ +{ + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "cases": { + "16": { + "1": { + "complete": { + "incumbent": [ + "161384530065607913688747162971715554852167374543319/10000000000000000000000000000000000000000000000000", + "161384530065607913688747162971715554852167374599299/10000000000000000000000000000000000000000000000000" + ], + "probe": [ + "80690327344537462633933791566992606995338198571401/5000000000000000000000000000000000000000000000000", + "80690327344537462633933791566992606995338198599387/5000000000000000000000000000000000000000000000000" + ], + "target": [ + "-1236149779398422805604543442527303034540363615345807/10000000000000000000000000000000000000000000000000", + "-618074889699211402802271721263651517270181807644403/5000000000000000000000000000000000000000000000000" + ] + }, + "gross": { + "incumbent": [ + "20173066258200989211093395371468177729135565858171/1250000000000000000000000000000000000000000000000", + "806922650328039568443735814858727109165422634327/50000000000000000000000000000000000000000000000" + ], + "probe": [ + "20173066305008414411490154049576857251624898417663/1250000000000000000000000000000000000000000000000", + "10086533152504207205745077024788428625812449208833/625000000000000000000000000000000000000000000000" + ], + "target": [ + "20189935288779179187018356031318074956512092426609/1250000000000000000000000000000000000000000000000", + "5047483822194794796754589007829518739128023106653/312500000000000000000000000000000000000000000000" + ] + }, + "new_rank_surplus": 1440, + "paid": 110511, + "paid_delta": { + "9": -16, + "16": 8 + } + }, + "2": { + "complete": { + "incumbent": [ + "322769060131215827377494325943460976685251901408687/10000000000000000000000000000000000000000000000000", + "322769060131215827377494325943460976685251901464699/10000000000000000000000000000000000000000000000000" + ], + "probe": [ + "161382592564571120279894407765300036001837792242053/5000000000000000000000000000000000000000000000000", + "161382592564571120279894407765300036001837792270051/5000000000000000000000000000000000000000000000000" + ], + "target": [ + "-214926059417637874421679318855351686977653375186587/2000000000000000000000000000000000000000000000000", + "-107463029708818937210839659427675843488826687587591/1000000000000000000000000000000000000000000000000" + ] + }, + "gross": { + "incumbent": [ + "20173066258200989211093395371468177729135565858171/625000000000000000000000000000000000000000000000", + "806922650328039568443735814858727109165422634327/25000000000000000000000000000000000000000000000" + ], + "probe": [ + "20173066305008414411490154049576857251624898417663/625000000000000000000000000000000000000000000000", + "10086533152504207205745077024788428625812449208833/312500000000000000000000000000000000000000000000" + ], + "target": [ + "20189935288779179187018356031318074956512092426609/625000000000000000000000000000000000000000000000", + "5047483822194794796754589007829518739128023106653/156250000000000000000000000000000000000000000000" + ] + }, + "new_rank_surplus": 1456, + "paid": 110503, + "paid_delta": { + "9": -32, + "16": 16 + } + } + }, + "18": { + "1": { + "complete": { + "incumbent": [ + "3606232458573210792125916239438605167276664710471/10000000000000000000000000000000000000000000000000", + "3606232458573210792125916239438605167276664766451/10000000000000000000000000000000000000000000000000" + ], + "probe": [ + "1801178843661907594218867684251084582709670446273/5000000000000000000000000000000000000000000000000", + "1801178843661907594218867684251084582709670474259/5000000000000000000000000000000000000000000000000" + ], + "target": [ + "-1393709779113137243202009091683237538826909431860847/10000000000000000000000000000000000000000000000000", + "-696854889556568621601004545841618769413454715901923/5000000000000000000000000000000000000000000000000" + ] + }, + "gross": { + "incumbent": [ + "90155811464330269803147905986711803704845425813/250000000000000000000000000000000000000000000000", + "450779057321651349015739529933559018524227129069/1250000000000000000000000000000000000000000000000" + ], + "probe": [ + "450779179789525651561423078891476648467766386381/1250000000000000000000000000000000000000000000000", + "28173698736845353222588942430717290529235399149/78125000000000000000000000000000000000000000000" + ], + "target": [ + "494935324439874487335149886826261920693865362229/1250000000000000000000000000000000000000000000000", + "61866915554984310916893735853282740086733170279/156250000000000000000000000000000000000000000000" + ] + }, + "new_rank_surplus": 1424, + "paid": 110511, + "paid_delta": { + "9": -16, + "18": 8 + } + }, + "2": { + "complete": { + "incumbent": [ + "7212464917146421584251832478907077315470481742991/10000000000000000000000000000000000000000000000000", + "7212464917146421584251832478907077315470481799003/10000000000000000000000000000000000000000000000000" + ], + "probe": [ + "3604295562820010200464559999816991176580735991797/5000000000000000000000000000000000000000000000000", + "720859112564002040092911999963398235316147203959/1000000000000000000000000000000000000000000000000" + ], + "target": [ + "-277950059303523649460665578517725488692271701792603/2000000000000000000000000000000000000000000000000", + "-138975029651761824730332789258862744346135850890599/1000000000000000000000000000000000000000000000000" + ] + }, + "gross": { + "incumbent": [ + "90155811464330269803147905986711803704845425813/125000000000000000000000000000000000000000000000", + "450779057321651349015739529933559018524227129069/625000000000000000000000000000000000000000000000" + ], + "probe": [ + "450779179789525651561423078891476648467766386381/625000000000000000000000000000000000000000000000", + "28173698736845353222588942430717290529235399149/39062500000000000000000000000000000000000000000" + ], + "target": [ + "494935324439874487335149886826261920693865362229/625000000000000000000000000000000000000000000000", + "61866915554984310916893735853282740086733170279/78125000000000000000000000000000000000000000000" + ] + }, + "new_rank_surplus": 1424, + "paid": 110503, + "paid_delta": { + "9": -32, + "18": 16 + } + } + } + }, + "copies": 17, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "input_sha256": { + "inputs/R85-PRICE.json": "33aad506112912ddf0721a2b007d9194eaa02e5792aceda2f9774f8838511262", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182" + }, + "max_compatible_pair_relaxation": 2, + "odd_jobs": { + "1339": [ + 32, + [ + 8 + ] + ], + "1340": [ + 33, + [ + 8 + ] + ], + "2970": [ + 34, + [ + 9 + ] + ], + "2971": [ + 35, + [ + 9 + ] + ] + }, + "pairs": [ + [ + 1339, + 2970 + ], + [ + 1339, + 2971 + ], + [ + 1340, + 2970 + ], + [ + 1340, + 2971 + ] + ], + "points": { + "incumbent": "182332597822022395349777014167081/50000000000000000000000000000000000", + "probe": "182332647822022395349777014167081/50000000000000000000000000000000000", + "target": "10018846261809/2500000000000000" + }, + "ports": 8 +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/R85-PRICE.json b/research/p104-fixed-type-b-two-return-provider-bound/inputs/R85-PRICE.json new file mode 100644 index 0000000000..8a7a0fe6da --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/R85-PRICE.json @@ -0,0 +1,1767 @@ +{ + "caller_head": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "complete_paid": { + "1": 68384, + "2": 14501, + "3": 14093, + "4": 3791, + "5": 5865, + "6": 238, + "7": 170, + "8": 741, + "9": 32, + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 208 + }, + "complete_targets": { + "1": 306, + "2": 357, + "3": 799, + "4": 3825, + "5": 1360, + "6": 731, + "7": 323, + "8": 544, + "9": 10888, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208, + "137": 208 + }, + "copies": 17, + "crossing": [ + "364665195644044790699554028334161/100000000000000000000000000000000000", + "182332597822022395349777014167081/50000000000000000000000000000000000" + ], + "even_jobs": { + "7": [ + 0, + [ + 1 + ] + ], + "19": [ + 1, + [ + 1 + ] + ], + "74": [ + 0, + [ + 2 + ] + ], + "96": [ + 0, + [ + 2 + ] + ], + "183": [ + 0, + [ + 3 + ] + ], + "214": [ + 0, + [ + 3 + ] + ], + "326": [ + 0, + [ + 4 + ] + ], + "364": [ + 0, + [ + 4 + ] + ], + "505": [ + 0, + [ + 5 + ] + ], + "552": [ + 0, + [ + 5 + ] + ], + "718": [ + 0, + [ + 6 + ] + ], + "772": [ + 0, + [ + 6 + ] + ], + "967": [ + 0, + [ + 7 + ] + ], + "1030": [ + 0, + [ + 7 + ] + ], + "1246": [ + 0, + [ + 8 + ] + ], + "1308": [ + 2, + [ + 8 + ] + ], + "1855": [ + 0, + [ + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1869": [ + 2, + [ + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1887": [ + 0, + [ + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1940": [ + 0, + [ + 3, + 4, + 5, + 6, + 7, + 8 + ] + ], + "1997": [ + 0, + [ + 4, + 5, + 6, + 7, + 8 + ] + ], + "2027": [ + 2, + [ + 4, + 5, + 6, + 7, + 8 + ] + ], + "2061": [ + 0, + [ + 5, + 6, + 7, + 8 + ] + ], + "2099": [ + 2, + [ + 5, + 6, + 7, + 8 + ] + ], + "2141": [ + 0, + [ + 6, + 7, + 8 + ] + ], + "2187": [ + 2, + [ + 6, + 7, + 8 + ] + ], + "2237": [ + 0, + [ + 7, + 8 + ] + ], + "2291": [ + 2, + [ + 7, + 8 + ] + ], + "2324": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + ], + "2337": [ + 1, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + ], + "2355": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + ], + "2377": [ + 16, + [ + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ] + ], + "2403": [ + 0, + [ + 9, + 10, + 11, + 12, + 13, + 14 + ] + ], + "2433": [ + 16, + [ + 9, + 10, + 11, + 12, + 13, + 14 + ] + ], + "2467": [ + 0, + [ + 9, + 10, + 11, + 12, + 13 + ] + ], + "2505": [ + 16, + [ + 9, + 10, + 11, + 12, + 13 + ] + ], + "2547": [ + 0, + [ + 9, + 10, + 11, + 12 + ] + ], + "2593": [ + 16, + [ + 9, + 10, + 11, + 12 + ] + ], + "2643": [ + 0, + [ + 9, + 10, + 11 + ] + ], + "2697": [ + 16, + [ + 9, + 10, + 11 + ] + ], + "2750": [ + 0, + [ + 9, + 10 + ] + ], + "2804": [ + 0, + [ + 9, + 10 + ] + ], + "2866": [ + 0, + [ + 9 + ] + ], + "2935": [ + 18, + [ + 9 + ] + ], + "3180": [ + 0, + [ + 10 + ] + ], + "3250": [ + 19, + [ + 10 + ] + ], + "3500": [ + 0, + [ + 11 + ] + ], + "3561": [ + 17, + [ + 11 + ] + ], + "3784": [ + 16, + [ + 12 + ] + ], + "3837": [ + 0, + [ + 12 + ] + ], + "4028": [ + 0, + [ + 13 + ] + ], + "4070": [ + 0, + [ + 13 + ] + ], + "4228": [ + 16, + [ + 14 + ] + ], + "4266": [ + 0, + [ + 14 + ] + ], + "4404": [ + 0, + [ + 15 + ] + ], + "4431": [ + 0, + [ + 15 + ] + ], + "4538": [ + 16, + [ + 16 + ] + ], + "4561": [ + 0, + [ + 16 + ] + ], + "4646": [ + 0, + [ + 17 + ] + ], + "4660": [ + 0, + [ + 17 + ] + ] + }, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "inputs": { + "7113-CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "7334-ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "7334-READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "R53-PRICE.json": "86f779c3eeb43563793e6ccb2227257ef732b2ca12fbbde2f9099988f903a484", + "R59-PRICE.json": "b73057381860987c6de1666205e91a0e3d116a8299d8aa425682f5960609c21f", + "derivative_check.py": "348c8b2de72f1f112cb1337eca9d29ca96c85a7ad903beecafb1a2a1221f408e", + "pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182" + }, + "keys": [ + { + "even": 7, + "odd": 1339, + "size": 1 + }, + { + "even": 19, + "odd": 1339, + "size": 1 + }, + { + "even": 74, + "odd": 1339, + "size": 1 + }, + { + "even": 96, + "odd": 1339, + "size": 1 + }, + { + "even": 183, + "odd": 1339, + "size": 1 + }, + { + "even": 214, + "odd": 1339, + "size": 1 + }, + { + "even": 326, + "odd": 1339, + "size": 1 + }, + { + "even": 364, + "odd": 1339, + "size": 1 + }, + { + "even": 505, + "odd": 1339, + "size": 1 + }, + { + "even": 552, + "odd": 1339, + "size": 1 + }, + { + "even": 718, + "odd": 1339, + "size": 1 + }, + { + "even": 772, + "odd": 1339, + "size": 1 + }, + { + "even": 967, + "odd": 1339, + "size": 1 + }, + { + "even": 1030, + "odd": 1339, + "size": 1 + }, + { + "even": 2324, + "odd": 1339, + "size": 8 + }, + { + "even": 2337, + "odd": 1339, + "size": 8 + }, + { + "even": 2355, + "odd": 1339, + "size": 7 + }, + { + "even": 2377, + "odd": 1339, + "size": 7 + }, + { + "even": 2403, + "odd": 1339, + "size": 6 + }, + { + "even": 2433, + "odd": 1339, + "size": 6 + }, + { + "even": 2467, + "odd": 1339, + "size": 5 + }, + { + "even": 2505, + "odd": 1339, + "size": 5 + }, + { + "even": 2547, + "odd": 1339, + "size": 4 + }, + { + "even": 2593, + "odd": 1339, + "size": 4 + }, + { + "even": 2643, + "odd": 1339, + "size": 3 + }, + { + "even": 2697, + "odd": 1339, + "size": 3 + }, + { + "even": 2750, + "odd": 1339, + "size": 2 + }, + { + "even": 2804, + "odd": 1339, + "size": 2 + }, + { + "even": 2866, + "odd": 1339, + "size": 1 + }, + { + "even": 2935, + "odd": 1339, + "size": 1 + }, + { + "even": 3180, + "odd": 1339, + "size": 1 + }, + { + "even": 3250, + "odd": 1339, + "size": 1 + }, + { + "even": 3500, + "odd": 1339, + "size": 1 + }, + { + "even": 3561, + "odd": 1339, + "size": 1 + }, + { + "even": 3784, + "odd": 1339, + "size": 1 + }, + { + "even": 3837, + "odd": 1339, + "size": 1 + }, + { + "even": 4028, + "odd": 1339, + "size": 1 + }, + { + "even": 4070, + "odd": 1339, + "size": 1 + }, + { + "even": 4228, + "odd": 1339, + "size": 1 + }, + { + "even": 4266, + "odd": 1339, + "size": 1 + }, + { + "even": 4404, + "odd": 1339, + "size": 1 + }, + { + "even": 4431, + "odd": 1339, + "size": 1 + }, + { + "even": 4538, + "odd": 1339, + "size": 1 + }, + { + "even": 4561, + "odd": 1339, + "size": 1 + }, + { + "even": 4646, + "odd": 1339, + "size": 1 + }, + { + "even": 4660, + "odd": 1339, + "size": 1 + }, + { + "even": 7, + "odd": 1340, + "size": 1 + }, + { + "even": 19, + "odd": 1340, + "size": 1 + }, + { + "even": 74, + "odd": 1340, + "size": 1 + }, + { + "even": 96, + "odd": 1340, + "size": 1 + }, + { + "even": 183, + "odd": 1340, + "size": 1 + }, + { + "even": 214, + "odd": 1340, + "size": 1 + }, + { + "even": 326, + "odd": 1340, + "size": 1 + }, + { + "even": 364, + "odd": 1340, + "size": 1 + }, + { + "even": 505, + "odd": 1340, + "size": 1 + }, + { + "even": 552, + "odd": 1340, + "size": 1 + }, + { + "even": 718, + "odd": 1340, + "size": 1 + }, + { + "even": 772, + "odd": 1340, + "size": 1 + }, + { + "even": 967, + "odd": 1340, + "size": 1 + }, + { + "even": 1030, + "odd": 1340, + "size": 1 + }, + { + "even": 2324, + "odd": 1340, + "size": 8 + }, + { + "even": 2337, + "odd": 1340, + "size": 8 + }, + { + "even": 2355, + "odd": 1340, + "size": 7 + }, + { + "even": 2377, + "odd": 1340, + "size": 7 + }, + { + "even": 2403, + "odd": 1340, + "size": 6 + }, + { + "even": 2433, + "odd": 1340, + "size": 6 + }, + { + "even": 2467, + "odd": 1340, + "size": 5 + }, + { + "even": 2505, + "odd": 1340, + "size": 5 + }, + { + "even": 2547, + "odd": 1340, + "size": 4 + }, + { + "even": 2593, + "odd": 1340, + "size": 4 + }, + { + "even": 2643, + "odd": 1340, + "size": 3 + }, + { + "even": 2697, + "odd": 1340, + "size": 3 + }, + { + "even": 2750, + "odd": 1340, + "size": 2 + }, + { + "even": 2804, + "odd": 1340, + "size": 2 + }, + { + "even": 2866, + "odd": 1340, + "size": 1 + }, + { + "even": 2935, + "odd": 1340, + "size": 1 + }, + { + "even": 3180, + "odd": 1340, + "size": 1 + }, + { + "even": 3250, + "odd": 1340, + "size": 1 + }, + { + "even": 3500, + "odd": 1340, + "size": 1 + }, + { + "even": 3561, + "odd": 1340, + "size": 1 + }, + { + "even": 3784, + "odd": 1340, + "size": 1 + }, + { + "even": 3837, + "odd": 1340, + "size": 1 + }, + { + "even": 4028, + "odd": 1340, + "size": 1 + }, + { + "even": 4070, + "odd": 1340, + "size": 1 + }, + { + "even": 4228, + "odd": 1340, + "size": 1 + }, + { + "even": 4266, + "odd": 1340, + "size": 1 + }, + { + "even": 4404, + "odd": 1340, + "size": 1 + }, + { + "even": 4431, + "odd": 1340, + "size": 1 + }, + { + "even": 4538, + "odd": 1340, + "size": 1 + }, + { + "even": 4561, + "odd": 1340, + "size": 1 + }, + { + "even": 4646, + "odd": 1340, + "size": 1 + }, + { + "even": 4660, + "odd": 1340, + "size": 1 + }, + { + "even": 7, + "odd": 2970, + "size": 1 + }, + { + "even": 19, + "odd": 2970, + "size": 1 + }, + { + "even": 74, + "odd": 2970, + "size": 1 + }, + { + "even": 96, + "odd": 2970, + "size": 1 + }, + { + "even": 183, + "odd": 2970, + "size": 1 + }, + { + "even": 214, + "odd": 2970, + "size": 1 + }, + { + "even": 326, + "odd": 2970, + "size": 1 + }, + { + "even": 364, + "odd": 2970, + "size": 1 + }, + { + "even": 505, + "odd": 2970, + "size": 1 + }, + { + "even": 552, + "odd": 2970, + "size": 1 + }, + { + "even": 718, + "odd": 2970, + "size": 1 + }, + { + "even": 772, + "odd": 2970, + "size": 1 + }, + { + "even": 967, + "odd": 2970, + "size": 1 + }, + { + "even": 1030, + "odd": 2970, + "size": 1 + }, + { + "even": 1246, + "odd": 2970, + "size": 1 + }, + { + "even": 1308, + "odd": 2970, + "size": 1 + }, + { + "even": 1855, + "odd": 2970, + "size": 7 + }, + { + "even": 1869, + "odd": 2970, + "size": 7 + }, + { + "even": 1887, + "odd": 2970, + "size": 6 + }, + { + "even": 1940, + "odd": 2970, + "size": 6 + }, + { + "even": 1997, + "odd": 2970, + "size": 5 + }, + { + "even": 2027, + "odd": 2970, + "size": 5 + }, + { + "even": 2061, + "odd": 2970, + "size": 4 + }, + { + "even": 2099, + "odd": 2970, + "size": 4 + }, + { + "even": 2141, + "odd": 2970, + "size": 3 + }, + { + "even": 2187, + "odd": 2970, + "size": 3 + }, + { + "even": 2237, + "odd": 2970, + "size": 2 + }, + { + "even": 2291, + "odd": 2970, + "size": 2 + }, + { + "even": 3180, + "odd": 2970, + "size": 1 + }, + { + "even": 3250, + "odd": 2970, + "size": 1 + }, + { + "even": 3500, + "odd": 2970, + "size": 1 + }, + { + "even": 3561, + "odd": 2970, + "size": 1 + }, + { + "even": 3784, + "odd": 2970, + "size": 1 + }, + { + "even": 3837, + "odd": 2970, + "size": 1 + }, + { + "even": 4028, + "odd": 2970, + "size": 1 + }, + { + "even": 4070, + "odd": 2970, + "size": 1 + }, + { + "even": 4228, + "odd": 2970, + "size": 1 + }, + { + "even": 4266, + "odd": 2970, + "size": 1 + }, + { + "even": 4404, + "odd": 2970, + "size": 1 + }, + { + "even": 4431, + "odd": 2970, + "size": 1 + }, + { + "even": 4538, + "odd": 2970, + "size": 1 + }, + { + "even": 4561, + "odd": 2970, + "size": 1 + }, + { + "even": 4646, + "odd": 2970, + "size": 1 + }, + { + "even": 4660, + "odd": 2970, + "size": 1 + }, + { + "even": 7, + "odd": 2971, + "size": 1 + }, + { + "even": 19, + "odd": 2971, + "size": 1 + }, + { + "even": 74, + "odd": 2971, + "size": 1 + }, + { + "even": 96, + "odd": 2971, + "size": 1 + }, + { + "even": 183, + "odd": 2971, + "size": 1 + }, + { + "even": 214, + "odd": 2971, + "size": 1 + }, + { + "even": 326, + "odd": 2971, + "size": 1 + }, + { + "even": 364, + "odd": 2971, + "size": 1 + }, + { + "even": 505, + "odd": 2971, + "size": 1 + }, + { + "even": 552, + "odd": 2971, + "size": 1 + }, + { + "even": 718, + "odd": 2971, + "size": 1 + }, + { + "even": 772, + "odd": 2971, + "size": 1 + }, + { + "even": 967, + "odd": 2971, + "size": 1 + }, + { + "even": 1030, + "odd": 2971, + "size": 1 + }, + { + "even": 1246, + "odd": 2971, + "size": 1 + }, + { + "even": 1308, + "odd": 2971, + "size": 1 + }, + { + "even": 1855, + "odd": 2971, + "size": 7 + }, + { + "even": 1869, + "odd": 2971, + "size": 7 + }, + { + "even": 1887, + "odd": 2971, + "size": 6 + }, + { + "even": 1940, + "odd": 2971, + "size": 6 + }, + { + "even": 1997, + "odd": 2971, + "size": 5 + }, + { + "even": 2027, + "odd": 2971, + "size": 5 + }, + { + "even": 2061, + "odd": 2971, + "size": 4 + }, + { + "even": 2099, + "odd": 2971, + "size": 4 + }, + { + "even": 2141, + "odd": 2971, + "size": 3 + }, + { + "even": 2187, + "odd": 2971, + "size": 3 + }, + { + "even": 2237, + "odd": 2971, + "size": 2 + }, + { + "even": 2291, + "odd": 2971, + "size": 2 + }, + { + "even": 3180, + "odd": 2971, + "size": 1 + }, + { + "even": 3250, + "odd": 2971, + "size": 1 + }, + { + "even": 3500, + "odd": 2971, + "size": 1 + }, + { + "even": 3561, + "odd": 2971, + "size": 1 + }, + { + "even": 3784, + "odd": 2971, + "size": 1 + }, + { + "even": 3837, + "odd": 2971, + "size": 1 + }, + { + "even": 4028, + "odd": 2971, + "size": 1 + }, + { + "even": 4070, + "odd": 2971, + "size": 1 + }, + { + "even": 4228, + "odd": 2971, + "size": 1 + }, + { + "even": 4266, + "odd": 2971, + "size": 1 + }, + { + "even": 4404, + "odd": 2971, + "size": 1 + }, + { + "even": 4431, + "odd": 2971, + "size": 1 + }, + { + "even": 4538, + "odd": 2971, + "size": 1 + }, + { + "even": 4561, + "odd": 2971, + "size": 1 + }, + { + "even": 4646, + "odd": 2971, + "size": 1 + }, + { + "even": 4660, + "odd": 2971, + "size": 1 + } + ], + "limits": { + "first_cases": 180, + "first_seconds": 20, + "formal_cases": 2, + "formal_seconds": 60, + "next_cases": 12, + "next_seconds": 25, + "physical_cases": 1, + "physical_seconds": 90 + }, + "maximum_disjoint_pairs": 4, + "moonshot": "10018846261809/2500000000000000", + "moonshot_matching": [ + [ + 1339, + 2337 + ], + [ + 1340, + 2324 + ], + [ + 2970, + 1869 + ], + [ + 2971, + 1855 + ] + ], + "moonshot_upper_full_margin": [ + "-272781423325474633572217692406634252278891369168923/2000000000000000000000000000000000000000000000000", + "-681953558313686583930544231016585630697228422893883/5000000000000000000000000000000000000000000000000" + ], + "moonshot_whole_compatible_upper": "2110134067580191952475114296542273299875219307131/625000000000000000000000000000000000000000000000", + "odd_jobs": { + "1339": [ + 32, + [ + 8 + ] + ], + "1340": [ + 33, + [ + 8 + ] + ], + "2970": [ + 34, + [ + 9 + ] + ], + "2971": [ + 35, + [ + 9 + ] + ] + }, + "odd_jobs_degrees": { + "1339": 46, + "1340": 46, + "2970": 44, + "2971": 44 + }, + "old_margin_at_moonshot": [ + "-1397669261708656239100690290777847634192460354758679/10000000000000000000000000000000000000000000000000", + "-698834630854328119550345145388923817096230177350851/5000000000000000000000000000000000000000000000000" + ], + "one_edit_extra_rank_one_derivative_through_BIT": [ + "-38754778097691410152033058895203404894602073135247745196030299283129502248321366715496083496081002743371/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "-19349319118217120380107815491547568352989413883714948652018812418623287777787437894596418531786410828809/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "one_edit_extra_rank_one_margin_at_lower": [ + "-2149554559637470549779835271335532366221340150369/10000000000000000000000000000000000000000000000000", + "-2149554559637470549779835271335532366221340084221/10000000000000000000000000000000000000000000000000" + ], + "one_edit_optimistic_upper": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "ports": 8, + "price_probe": "182332647822022395349777014167081/50000000000000000000000000000000000", + "prices_by_even_mask_size": { + "1": { + "break_even_volume_before_ancillary_cost": [ + "1349419275406457209674719339189361673414877119416335/1346021166745030462594119007586193864779694787608008", + "1349419275406457209674719339189361673414877119472251/1346021166745030462594119007586193864779694787607992" + ], + "cases": 128, + "complete_margin_at_crossing_upper": [ + "3398108661426747080600331603167808635182331808327/10000000000000000000000000000000000000000000000000", + "3398108661426747080600331603167808635182331864259/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "1697116916916989079621382907374673237911064853421/5000000000000000000000000000000000000000000000000", + "1697116916916989079621382907374673237911064881391/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "212381791339171692537520725199854726006217758147/625000000000000000000000000000000000000000000000", + "212381791339171692537520725199854726006217758149/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "8": -8, + "9": -8, + "17": 8 + }, + "target_credit": [ + "116595347105496759695892683549867117306906406821/312500000000000000000000000000000000000000000000", + "466381388421987038783570734199468469227625627289/1250000000000000000000000000000000000000000000000" + ] + }, + "2": { + "break_even_volume_before_ancillary_cost": [ + "1981377592781520717461317835603988567744318021050527/1976661006280494474300154758396836091399111170411816", + "1981377592781520717461317835603988567744318021106451/1976661006280494474300154758396836091399111170411808" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "4716586501026243161163077207152476345206850638711/10000000000000000000000000000000000000000000000000", + "4716586501026243161163077207152476345206850694643/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "2356356015035586918592179577960500059068762623381/5000000000000000000000000000000000000000000000000", + "2356356015035586918592179577960500059068762651347/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "147393328157070098786346162724448228941375092523/312500000000000000000000000000000000000000000000", + "36848332039267524696586540681112057235343773131/78125000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "16": -8, + "25": 8 + }, + "target_credit": [ + "647257522053066798336442009133637723324192672023/1250000000000000000000000000000000000000000000000", + "323628761026533399168221004566818861662096336013/625000000000000000000000000000000000000000000000" + ] + }, + "3": { + "break_even_volume_before_ancillary_cost": [ + "2612131110775235410834018937196374110919785892019151/2606552249881768209115768179304945643671387808080944", + "2612131110775235410834018937196374110919785892075067/2606552249881768209115768179304945643671387808080928" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "5578860893467201718250757891428467248398083938207/10000000000000000000000000000000000000000000000000", + "5578860893467201718250757891428467248398083994139/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "2787493327686216806402621269449795320446377163129/5000000000000000000000000000000000000000000000000", + "2787493327686216806402621269449795320446377191099/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "697357611683400214781344736432291778664404532529/1250000000000000000000000000000000000000000000000", + "697357611683400214781344736432291778664404532533/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "24": -8, + "33": 8 + }, + "target_credit": [ + "765530412008729831042197541830988565820820534987/1250000000000000000000000000000000000000000000000", + "765530412008729831042197541830988565820820534991/1250000000000000000000000000000000000000000000000" + ] + }, + "4": { + "break_even_volume_before_ancillary_cost": [ + "3242103502011138070420043553698102418520596600812391/3235881300381534570635643771581329621138291555004032", + "1080701167337046023473347851232700806173532200289433/1078627100127178190211881257193776540379430518334672" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "6222201629603499784399782116772797382305045808359/10000000000000000000000000000000000000000000000000", + "6222201629603499784399782116772797382305045864283/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3109163782527172655190614822269082672852732445509/5000000000000000000000000000000000000000000000000", + "3109163782527172655190614822269082672852732473471/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "777775203700437473049972764600333045402774766297/1250000000000000000000000000000000000000000000000", + "388887601850218736524986382300166522701387383151/625000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "32": -8, + "41": 8 + }, + "target_credit": [ + "853764067542160568840157637522941840590697286473/1250000000000000000000000000000000000000000000000", + "426882033771080284420078818761470920295348643239/625000000000000000000000000000000000000000000000" + ] + }, + "5": { + "break_even_volume_before_ancillary_cost": [ + "3871495689349097242007681343357618993003695220097823/3864759827313654867505100482217239151277017313619808", + "3871495689349097242007681343357618993003695220153739/3864759827313654867505100482217239151277017313619792" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "1347172407088474900516172228075968345335581295603/2000000000000000000000000000000000000000000000000", + "6735862035442374502580861140379841726677906533947/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3365994054670169993504460472994222969456031159581/5000000000000000000000000000000000000000000000000", + "3365994054670169993504460472994222969456031187539/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "168396550886059362564521528510242717689876470001/250000000000000000000000000000000000000000000000", + "841982754430296812822607642551213588449382350009/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "40": -8, + "49": 8 + }, + "target_credit": [ + "924206414438843870498546397347683809495197001189/1250000000000000000000000000000000000000000000000", + "184841282887768774099709279469536761899039400239/250000000000000000000000000000000000000000000000" + ] + }, + "6": { + "break_even_volume_before_ancillary_cost": [ + "4500425895449082104078219197722901478581800440412783/4493262365712632046841105857301464721248489219548272", + "1500141965149694034692739732574300492860600146822897/1497754121904210682280368619100488240416163073182752" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "7163529736450057237113340421436757333311220864511/10000000000000000000000000000000000000000000000000", + "1432705947290011447422668084287351466662244184087/2000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3579827962769460572276732282269654315656145424597/5000000000000000000000000000000000000000000000000", + "3579827962769460572276732282269654315656145452559/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "223860304264064288659791888170832009819636662079/312500000000000000000000000000000000000000000000", + "895441217056257154639167552683328039278546648321/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "48": -8, + "57": 8 + }, + "target_credit": [ + "491426003865964639022586809440105974539735350301/625000000000000000000000000000000000000000000000", + "15357062620811394969455837795003311704366729697/19531250000000000000000000000000000000000000000" + ] + }, + "7": { + "break_even_volume_before_ancillary_cost": [ + "5128972177594501491428013267596684552693909676016159/5121442246134131641816841341116154813295735896884256", + "5128972177594501491428013267596684552693909676072051/5121442246134131641816841341116154813295735896884232" + ], + "cases": 8, + "complete_margin_at_crossing_upper": [ + "7529931460369849611171926480529739398173779131903/10000000000000000000000000000000000000000000000000", + "7529931460369849611171926480529739398173779187819/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3763028874045559762198477756085057582404953032129/5000000000000000000000000000000000000000000000000", + "3763028874045559762198477756085057582404953060087/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "941241432546231201396490810069950797386366431739/1250000000000000000000000000000000000000000000000", + "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "56": -8, + "65": 8 + }, + "target_credit": [ + "1033093460169360688210796556416954838863873158897/1250000000000000000000000000000000000000000000000", + "1033093460169360688210796556416954838863873158903/1250000000000000000000000000000000000000000000000" + ] + }, + "8": { + "break_even_volume_before_ancillary_cost": [ + "5757189979240819370078368353540452839483401527510023/5749339533800456840628148188811827108110120584009464", + "5757189979240819370078368353540452839483401527565907/5749339533800456840628148188811827108110120584009440" + ], + "cases": 4, + "complete_margin_at_crossing_upper": [ + "7850445440362529450220164728625731373280943500559/10000000000000000000000000000000000000000000000000", + "7850445440362529450220164728625731373280943556467/10000000000000000000000000000000000000000000000000" + ], + "complete_margin_at_probe": [ + "3923285907160358772028595865361599763944622658949/5000000000000000000000000000000000000000000000000", + "3923285907160358772028595865361599763944622686903/5000000000000000000000000000000000000000000000000" + ], + "credit": [ + "49065284002265809063876029554097489713738098891/62500000000000000000000000000000000000000000000", + "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000" + ], + "paid_delta": { + "9": -8, + "64": -8, + "73": 8 + }, + "target_credit": [ + "538520303705415632132158870062659230505673074111/625000000000000000000000000000000000000000000000", + "269260151852707816066079435031329615252836537057/312500000000000000000000000000000000000000000000" + ] + } + }, + "retained_BIT": "376669/100000000", + "scope": "One same-volume signed union at the retained odd clock. Matching upper forbids repeated literal sites and grants all other compatibility and ancillary work free. No caller decoded.", + "stock": 180, + "whole_compatible_upper": "480636778147886845668502850287975147915282102393/156250000000000000000000000000000000000000000000", + "whole_upper_by_odd_mask": { + "0": "0", + "1": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "2": "981305680045316181277520591081949794274761977827/1250000000000000000000000000000000000000000000000", + "3": "981305680045316181277520591081949794274761977827/625000000000000000000000000000000000000000000000", + "4": "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000", + "5": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "6": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "7": "2903852792636863563951531992233850385935890387399/1250000000000000000000000000000000000000000000000", + "8": "188248286509246240279298162013990159477273286349/250000000000000000000000000000000000000000000000", + "9": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "10": "480636778147886845668502850287975147915282102393/312500000000000000000000000000000000000000000000", + "11": "2903852792636863563951531992233850385935890387399/1250000000000000000000000000000000000000000000000", + "12": "188248286509246240279298162013990159477273286349/125000000000000000000000000000000000000000000000", + "13": "2863788545137778584070502211221851389047494841317/1250000000000000000000000000000000000000000000000", + "14": "2863788545137778584070502211221851389047494841317/1250000000000000000000000000000000000000000000000", + "15": "480636778147886845668502850287975147915282102393/156250000000000000000000000000000000000000000000" + }, + "whole_upper_matching": [ + [ + 1339, + 2337 + ], + [ + 1340, + 2324 + ], + [ + 2970, + 1869 + ], + [ + 2971, + 1855 + ] + ] +} diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/WORD.json.gz b/research/p104-fixed-type-b-two-return-provider-bound/inputs/WORD.json.gz new file mode 100644 index 0000000000..73f4300719 Binary files /dev/null and b/research/p104-fixed-type-b-two-return-provider-bound/inputs/WORD.json.gz differ diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/check_odd_physical_binding.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/check_odd_physical_binding.py new file mode 100644 index 0000000000..def1e6a184 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/check_odd_physical_binding.py @@ -0,0 +1,82 @@ +"""Check physical phase-polynomial substitution and exact paid occurrence binding.""" +from pathlib import Path +from hashlib import sha256 +from collections import Counter +import gzip +import json + +root=Path(__file__).resolve().parent +source=root/"upstream_application.py" +phase=root/"DATA-PHASES.json" +assert sha256(source.read_bytes()).hexdigest()=="d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184" +assert sha256(phase.read_bytes()).hexdigest()=="c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa" +cpath=root/"ODD-TYPE-AB-CALLER.json" +caller=json.loads(cpath.read_bytes()) +rec=json.loads((root/"ODD-TYPE-AB-REPLAY.json").read_text()) +assert sha256(cpath.read_bytes()).hexdigest()==rec["caller_sha256"] +word=json.loads(gzip.decompress((root.parent/"WORD.json.gz").read_bytes())) +sha=sha256(json.dumps(word,sort_keys=True,separators=(",",":")).encode()).hexdigest() +assert sha==rec["source_word_sha256"] +r=json.loads((root.parent/"RESULT.json").read_text()) +stages=caller["stages"] +ambient=9+8*stages +helper_count=sum(r["native"]["helpers"].values()) +main_count=sum(d["roles"]*len(d["ports"]) for d in caller["types"].values()) +a=source.read_text() +a=a[:a.index("def inverse(matrix):")] +def patch(old,new,count=1): + global a + assert a.count(old)==count,(old,a.count(old)) + a=a.replace(old,new) +patch("range(153)","range(expected_ambient)",2) +patch("caller['ambient_rank'] == 153 and caller['stages'] == 18","caller['ambient_rank'] == expected_ambient and caller['stages'] == expected_stages") +patch("list(range(1,19))","list(range(1,expected_stages+1))",2) +patch("len(helpers) == 1080","len(helpers) == expected_helpers") +patch("len(owners) == 3952","len(owners) == expected_mains") +patch("all(0 <= r < 38 for r in plane_a)","all(r in type_owners(caller, 'A') for r in plane_a)") +patch("all(38 <= r < 76 for r in plane_b[:2])","all(r in type_owners(caller, 'B') for r in plane_b[:2])") +patch("word['public']+51","word['public']+word['owned_fields']") +patch("op in ('QUERY','IDLE_ONE')","op in ('QUERY','IDLE_ONE','IDLE_ODD')") +patch("all(1 <= s <= 18 for s in selected)","all(1 <= s <= expected_stages for s in selected)") +patch("rank = 8*len(selected); idle_uses += len(kind['ports'])","""rank = 8*len(selected); idle_uses += len(kind['ports']) + if op == 'IDLE_ODD': + need(len(selected)==1 and a[1:]==[-1], 'one complete signed child') + rank += 1 + stage=selected[0] + for pi in kind['ports']: + q=word['ports'][pi] + axes=[q]+[1 << (9+8*(stage-1)+j) for j in range(8)] + need(all(dot(x,y)==(i==j) for i,x in enumerate(axes) for j,y in enumerate(axes)), + 'signed rank-nine axes are independent and orthonormal') + pos=terms((x,1) for x in axes) + signed=sub(pos,terms([(q,2)])) + need(translation(sub(pos,signed))==q,'exact negative central phase correction')""") +patch("len(selection)==18","len(selection)==expected_stages") +patch("ambient=153, native_calls=18, native_public=1480, fresh_helpers=19440", + "ambient=expected_ambient, native_calls=expected_stages, native_public=word['public'], fresh_helpers=expected_helpers*expected_stages") +patch("reserved_native_banks=18*51","reserved_native_banks=expected_stages*word['owned_fields']") +def type_owners(C,t): + x=C["types"][t] + return range(x["offset"],x["offset"]+x["roles"]) +env=dict(globals(),__file__=str(source),expected_ambient=ambient,expected_stages=stages, + expected_helpers=helper_count,expected_mains=main_count) +exec(compile(a,str(source),"exec"),env) +invoice={"P":rec["paid"],"T":rec["target"]} +f=env["complex_application"] +phases=json.loads(phase.read_bytes()) +result=f(word,caller,{"invoice":invoice},phases) +bad=next(i for i,e in enumerate(caller["events"]) if e[0]=="J") +caller["events"][bad][2][0]=caller["events"][bad][2][1] +try: + f(word,caller,{"invoice":invoice},phases) +except ValueError as e: + assert str(e)=="A owners" +else: + raise AssertionError("alias control") +record={"native_sha256":sha,"caller_sha256":rec["caller_sha256"], + "source_reviewer_sha256":sha256(source.read_bytes()).hexdigest(), + "patched_application_sha256":sha256(a.encode()).hexdigest(), + "occurrence_and_geometry":result,"aliased_main_rejected":True, + "scope":"Current caller port and ownership substitution, full phase-polynomial native contact identities on disjoint stage axes, whole signed idle/output geometry, and ordered paid positions. Retains the standard nested chart and local operator premises and requires separate full native replay and complete fixed-tape tariff application."} +with (root/"ODD-PHYSICAL-BINDING.json").open("x") as out:json.dump(record,out,indent=2) +print("PASS exact physical binding",result["paid_positions"],result["native_contact_boundaries"],result["productive_fields"],flush=True) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_ab.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_ab.py new file mode 100644 index 0000000000..504316b91b --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_ab.py @@ -0,0 +1,144 @@ +"""Emit the 8+9 type-A root and join it to the exact signed type-B branch.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import json + +from host34 import eye,add,sc +from lower import lower_frame,backwards,unit +from signed_model import signed_model + +root=Path(__file__).resolve().parent +data=json.loads((root/"SHORT-TYPE-A-ROOT.json").read_text()) +source=json.loads((root.parents[1]/"supplier7108/CALLER.json").read_text()) +B=json.loads((root/"ODD-TYPE-B-CALLER.json").read_text()) +shape=(B['stages']//2,B['stages']-B['stages']//2) +W=next(r for r in data["candidates"] if r and tuple(r["shape"])==shape) +a,b=shape +L=a+b +n=W["roles"] +h=n//2 +I=eye(n) +def sparse(row): + return {i:q for i,v in enumerate(row) if (q:=Q(v))} +def dot(x,y): + return sum(q*y.get(i,0) for i,q in x.items()) +def axpy(x,y,s): + return {i:t for i in x.keys()|y.keys() if (t:=x.get(i,0)+s*y.get(i,0))} +def basis(x,y,pivot_x=None,pivot_y=None): + assert not dot(x,y) + i=pivot_x if pivot_x is not None else next(i for i,q in x.items() if unit(q)) + assert unit(x[i]) + j=pivot_y if pivot_y is not None else next(j for j,q in y.items() if unit(q)) + w={i:1/x[i]} + u=axpy({j:1/y[j]},x,-w.get(j,0)/y[j]) + assert dot(y,u)==dot(w,x)==1 and dot(w,u)==dot(y,x)==0 + return u,x,y,w +def tag(events): + return [['A',*e[1:]] for e in events] +alpha=Q(source["types"]["A"]["alpha2"]) +assert unit(alpha) +prefix={} +suffix={} +stages={} +diag=[[-1,0]+[int(mask>>j&1) for j in range(L)] for mask in W["masks"]] + +def one_idle(row,hub,sgn,ids): + # Passive vector e_row with dual e_row^t±2 e_hub^t. Its + # projector commutes with the active maps throughout ids. + return [['A','ADD',row,hub,str(2*sgn)],['A','IDLE_ONE',row,ids], + ['A','ADD',row,hub,str(-2*sgn)]] +for j in range(1,L+1): + left=j<=a + arms=(j,j+h) + hubs=(0,h) + pairs=[(sparse(x),sparse(y)) for x,y in W["stage_pairs"][j-1]] + U,X,Y,Z=basis(*pairs[0],hubs[0],arms[0]) + V,M,N,P=basis(*pairs[1],hubs[1],arms[1]) + r,s,u,v=arms[0],hubs[0],hubs[1],arms[1] + columns=[U,X,M,V];rows=[Y,Z,P,N] + frame=tag(lower_frame(columns,rows,[r,s,u,v])) + pre=frame+[['A','LAMBDA',r,1],['A','LAMBDA',v,-1]] + post=[['A','LAMBDA',r,-1],['A','LAMBDA',v,1]] + if alpha!=1: + pre.append(['A','SCALE',v,str(1/alpha)]) + post.append(['A','SCALE',v,str(alpha)]) + post+=[['A','ADD',s,r,'-1'],['A','ADD',u,v,'-1']]+list(backwards(frame)) + # Check the idles plus the two active planes equal the entire mask. + active=[[sum(c.get(i,0)*w.get(k,0) for c,w in zip(columns,rows)) for k in range(n)] for i in range(n)] + used={i for i,mask in enumerate(W["masks"]) if mask>>(j-1)&1} + target=[[Q(i==k and i in used) for k in range(n)] for i in range(n)] + for hub,arm in zip(hubs,arms): + eligible=range(hub+1,arm) if left else range(arm+1,hub+h) + for idle in eligible: + active[idle][idle]+=1 + active[idle][hub]+=(-2 if left else 2) + assert active==target,(j,active,target) + prefix[j]=pre + suffix[j]=post + stages[j]=[r,s,u,v] +# Commute the left idles to the end of their half and the right idles to +# its beginning. A passive projector commutes with all stage masks in its +# interval, and different passive idles in a half annihilate each other. +for hub in (0,h): + for arm in range(1,a): + suffix[a]+=one_idle(hub+arm,hub,-1,list(range(arm+1,a+1))) +for x,y in W["thin_pairs"]: + u,v,w,z=basis(sparse(x),sparse(y)) + dest,src=0,1 + frame=tag(lower_frame([v,u],[z,w],[dest,src])) + suffix[a]+=frame+[['A','LAMBDA',src,1],['A','QUERY',dest,src,-1],['A','LAMBDA',src,-1], + ['A','ADD',dest,src,'-1']]+list(backwards(frame)) +for hub in (0,h): + for arm in range(a+2,L+1): + suffix[a]+=one_idle(hub+arm,hub,1,list(range(a+1,arm))) +suffix[L]+=[['A','LAMBDA',i,-1] for i in range(n)] +offset=n +Broles=len(B["types"]["B"]["diagonal"]) +def shift(e): + assert e[0]=="B" + out=e.copy() + out[2]+=offset + if e[1] in ("ADD","SWAP","QUERY"):out[3]+=offset + return out +events=[] +for e in B["events"]: + if e[0]=="B": + events.append(shift(e)) + else: + assert e[0]=="J" + j=e[1] + events+=prefix[j] + s,t,al,be=e[3] + events.append(["J",j,stages[j],[s+offset,t+offset,al,be]]) + events+=suffix[j] +Adef=source["types"]["A"]|{"offset":0,"roles":n,"diagonal":diag} +Bdef=source["types"]["B"]|{"offset":offset,"roles":Broles,"diagonal":B["types"]["B"]["diagonal"]} +C=source|{"stages":L,"roles":n+Broles,"ambient_rank":8*L+9, + "types":{"A":Adef,"B":Bdef},"events":events} +ind=signed_model() +report=ind.caller(C) +assert not report["bad_outputs"],report +r=json.loads((root.parent/"RESULT.json").read_text()) +target=Counter() +paid=Counter() +for ty,d in C["types"].items(): + target.update({k:len(d["ports"])*v for k,v in Counter(1+8*sum(row[2:]) for row in d["diagonal"]).items()}) +for e in events: + if e[0]=="J":continue + ports=len(C["types"][e[0]]["ports"]) + if e[1]=="QUERY":paid[1]+=ports + elif e[1] in ("IDLE_ONE","IDLE_ODD"):paid[8*len(e[3])+(e[1]=="IDLE_ODD")]+=ports +for name,c in (("helpers",target),("paid",paid)): + c.update({int(k):v*L for k,v in r["native"][name].items()}) +invoice=next(x for x in json.loads((root/"SHORT-CALLER-RAW-PRICE.json").read_text())["rows"] if tuple(x["shape"])==shape) +assert all(c==Counter({int(k):v for k,v in invoice[label].items()}) for label,c in (("target",target),("paid",paid))) +with (root/"ODD-TYPE-AB-CALLER.json").open("x") as f: + json.dump(C,f,separators=(",",":")) +with (root/"ODD-TYPE-AB-REPLAY.json").open("x") as f: + json.dump({"caller_sha256":sha256((root/"ODD-TYPE-AB-CALLER.json").read_bytes()).hexdigest(), + "source_word_sha256":r["word_canonical_sha256"],"replay":report,"shape":list(shape), + "target":dict(target),"paid":dict(paid),"raw_bracket":invoice["bracket"], + "scope":"Exact emitted signed Laurent caller endpoint and recomputed native/caller paid and target profiles. Physical address bindings, independent branch-source composition, ordinary units, precision and outer gates are still required."},f,indent=2) +print("PASS exact short A+B",len(events),"events",report["max_terms"],invoice["bracket"],flush=True) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_b.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_b.py new file mode 100644 index 0000000000..6d00e53612 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/emit_odd_type_b.py @@ -0,0 +1,99 @@ +"""Emit and independently replay the 8+9 type-B signed caller.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import json + +from signed_model import signed_model +import mirrored +from host34 import tr,m +import lower +def smooth(n): + if not n:return False + for prime in (2,3,5): + while n%prime==0:n//=prime + return n==1 +def unit(q): + q=Q(q) + return smooth(abs(q.numerator)) and smooth(q.denominator) +lower.unit=unit +lower.dyadic=lambda q:smooth(Q(q).denominator) +lower_frame,backwards=lower.lower_frame,lower.backwards +root=Path(__file__).resolve().parent +witness=json.loads((root/"ODD-UNIT-DYADIC-TAPES.json").read_text()) +group_path=root/"ODD-LOCALIZED-GROUPING.json" +grouped=json.loads(group_path.read_text()) +p=root/"odd_unit_dyadic_tapes.py" +ns={"__file__":str(p)} +exec(compile(p.read_text().split("srcpath=root/",1)[0],str(p),"exec"),ns) +N,half,stages=ns["n"],ns["a"],ns["stages"] +chosen=min((g for g in grouped["results"] if "idles" in g), + key=lambda g:g["idle_basis_ops"]+g["host_basis_ops"]) +tape=next(v for v in witness["dyadic_tapes"] if [v["closure"],*v["padding"]]==chosen["parameter"]) +blocks=[[[Q(q) for q in row] for row in v] for v in tape["sequence"]] +frames=[] +ns["tape"](blocks,frames=frames) +masks=ns["masks"]() +phase=(half,half,half+1,half+1) +core_plus_phase=N+len(phase) +diag=[[-1,0]+[int(i in ms) for ms in masks] for i in range(N)] +diag += [[-1,0]+[int(k==j) for k in range(1,stages+1)] for j in phase] +events=[] +def idle(stage,v,w): + x={r:Q(q) for r,q in w};y={r:Q(q) for r,q in v} + p=min(x,key=lambda r:(not unit(x[r]),r)) + L=lower_frame([x],[y],[p]) + return L+[['B','IDLE_ONE',p,stage]]+list(backwards(L)) +def host(j): + x,y,active=frames[j-1] + C=[{i:q for i,q in enumerate(row) if q} for row in y] + W=[{i:q for i,q in enumerate(row) if q} for row in tr(x)] + s,t=0,1 + L=lower_frame(C,W,[s,t]) + B=tr(active) + b,d=B[0] + K=[[Q(1),Q(0)],[b/2,d/2]] + R=[[Q(0),Q(2)],[Q(-1,2),Q(0)]] + assert unit(d/2) and m(R,K)==m(K,B) + frame=L+[['B','SCALE',t,str(d/2)]] + if b:frame.append(['B','ADD',t,s,str(b/2)]) + before=frame+[['B','ADD',t,s,'-1/2'],['B','ADD',s,t,'1'],['B','LAMBDA',s,1]] + after=[['B','LAMBDA',s,-1]]+list(backwards(frame)) + return before,after + +groups=[(mask,v,w) for mask,v,w in chosen["idles"] if isinstance(mask,list)] +singles=[(mask,v,w) for mask,v,w in chosen["idles"] if isinstance(mask,int)] +for j in range(1,stages+1): + for t,v,w in singles: + if j==t:events.extend(idle([j],v,w)) + for i,p in enumerate(phase): + if j==p:events.append(['B','IDLE_ODD',N+i,[j],-1]) + before,after=host(j) + events.extend(before) + events.append(['J',j,list(range(core_plus_phase,core_plus_phase+4)),[0,1,'-1','1/2']]) + events.extend(after) + if j==half: + for mask,v,w in groups:events.extend(idle(mask,v,w)) +events.extend(['B','LAMBDA',r,-1] for r in range(N)) +C={"stages":stages,"roles":core_plus_phase+4, + "types":{"A":{"offset":core_plus_phase,"diagonal":[],"alpha2":"1"},"B":{"offset":0,"diagonal":diag}}, + "events":events} +# Dummy A rails supply the other half of the literal J interface. They +# are independent of B and excluded from this type-B-only certificate. +bill=Counter(8*len(e[3])+(e[1]=="IDLE_ODD") for e in events if e[:2] in (['B','IDLE_ONE'],['B','IDLE_ODD'])) +expected=Counter({8:2*stages,9:4}) +expected.update(8*j for length in (half,stages-half) for j in range(2,length) for _ in range(2)) +assert bill==expected +ind=signed_model() +result=ind.caller(C) +assert not result["bad_outputs"],result +mutant=next(i for i,e in enumerate(events) if e[:2]==["B","ADD"]) +assert ind.caller(C,mutant)["bad_outputs"] +with (root/"ODD-TYPE-B-CALLER.json").open("x") as f:json.dump(C,f,separators=(",",":")) +record={"grouping_sha256":sha256(group_path.read_bytes()).hexdigest(), + "caller_sha256":sha256((root/"ODD-TYPE-B-CALLER.json").read_bytes()).hexdigest(), + "parameter":chosen["parameter"],"bill":dict(bill),"signed_replay":result, + "mutation_rejects":mutant,"scope":"Full exact signed Laurent endpoint of the emitted 8+9 type-B branch, literal J opcodes, localized basis changes and all idle ranks. Excludes the four dummy A rails and all physical or precision admission."} +with (root/"ODD-TYPE-B-REPLAY.json").open("x") as f:json.dump(record,f,indent=2) +print("PASS exact short type B",len(events),"events",bill,flush=True) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/independent.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/independent.py new file mode 100644 index 0000000000..1ae1d7c680 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/independent.py @@ -0,0 +1,220 @@ +#!/usr/bin/env python3 +"""Independent finite word/caller/invoice audit; no imported author checker. +Native endpoint uses the transposed circuit in reverse chronological order. +Caller identity uses exact polynomials in 18 unrestricted commuting variables +and q modulo q^4-1, with Gaussian rational coefficients. +""" +from collections import Counter +from fractions import Fraction as F +from pathlib import Path +from decimal import Decimal, localcontext +import argparse, gzip, hashlib, json, math, time + +HERE=Path(__file__).resolve().parent + +if not __debug__: raise RuntimeError('Run without -O; assertions are proof checks.') + +def load(p): + p=Path(p); b=p.read_bytes(); return json.loads(gzip.decompress(b) if p.suffix=='.gz' else b) +def pin(p): return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def addto(a,b,q=F(1)): + for k,v in b.items(): + z=a.get(k,0)+q*v + if z:a[k]=z + else:a.pop(k,None) +def scale(a,q): return {k:v*q for k,v in a.items() if v*q} +def span(b): + s={0} + for x in b: + assert x not in s and 0=n and r not in active;active.add(r);cur[r]=e[2];life+=1;peak=max(peak,len(active)-n) + elif op=='CLEAR': + assert r>=n and r in active and cur[r]==e[2];active.remove(r);del cur[r] + elif op=='MOVE': + _,r,a,b,owned=e;assert r in active and cur[r]==a and owned==(r>=n) + assert (frames[a]0;paid[rank]+=1;cur[r]=b + if owned and dim[b]>dim[a]:rises[rank]+=1 + elif op=='SCALE':assert r in active and cur[r]==e[-1] + else:assert op in ('ADD','COPY') and r in active and e[2] in active and r!=e[2] and cur[r]==cur[e[2]]==e[-1] + assert active==set(range(n)) and [cur[r] for r in range(n)]==W['final'] + # adj[r][j] is the derivative of final output j with respect to current r. + adj=[{r:F(1)} if r0:lo=mid + else:hi=mid + crossing=str((lo+hi)/2) + Ecount=sum(len(d['ports']) for d in C['types'].values() for dg in d['diagonal'] if not any(dg[2:]));Te=T.copy();Te[1]-=Ecount;lo,hi=Decimal(0),Decimal('.01') + for _ in range(200): + mid=(lo+hi)/2 + if margin(mid,Te)>0:lo=mid + else:hi=mid + nocredit=str((lo+hi)/2) + return dict(T=dict(sorted(T.items())),P=dict(sorted(P.items())),S=S,raw_crossing=crossing,empty_root_credits=Ecount,no_E_credit_crossing=nocredit) + +def ordinary(W,C,N): + # Atomic contributions are separately itemized to prevent zero-charge shortcuts. + calls=18;portsA=len(C['types']['A']['ports']);ports=sum(len(v['ports']) for v in C['types'].values()) + scalar=0;init_clear=0;odd=Counter() + for e in W['program']: + if e[0] in ('ADD','COPY','SCALE'): + q=F(e[2] if e[0]=='SCALE' else e[3]);a=abs(q.numerator);d=q.denominator + scalar+=4*(a.bit_length()+d.bit_length()+1+(a.bit_count() if e[0]!='SCALE' else 0)) + if d&(d-1):odd[e[0]]+=1 + elif e[0] in ('INIT','CLEAR'):init_clear+=2 + route_items=dict(moves=sum(N['paid'].values()),helper_boundary=2*sum(N['helpers'].values()),first_main_boundary=2*ports,second_main_boundary=2*portsA,first_main_adapter=4*ports,second_main_adapter=4*portsA,owned_lifetime=4*N['lifetimes']) + routing=1000*sum(route_items.values());rest_items={};lam=0 + def swapcost(axes):return len(set(axes)-set(range(len(axes)))) + for ty,t in C['types'].items(): + ne=sum(e[0] in (ty,'J') for e in C['events']);p=len(t['ports']);nr=t['roles'];env=32*nr*p*ne + qr=[e for e in C['events'] if e[0]==ty and e[1]=='QUERY'];idle=[e for e in C['events'] if e[0]==ty and e[1]=='IDLE_ONE'];la=sum(e[0]==ty and e[1]=='LAMBDA' for e in C['events']);lam+=la*p + output=0 + for qp,zero,*mask in t['diagonal']: + axes=([0] if qp else [])+[a for k,v in enumerate(mask) if v for a in range(9+8*k,17+8*k)] + output+=p*1000*(2*swapcost(axes)+2*bool(qp)+(qp==-1)) + idleroute=sum(2*p*1000*swapcost([a for k in e[3] for a in range(1+8*k,9+8*k)]) for e in idle) + queryroute=sum(p*1000*(2+(e[4]==-1)) for e in qr) + rest_items[ty]=dict(envelope=env,thin=16*p*len(qr),field_boundary=26*nr*p,output_routes=output,idle_routes=idleroute,query_routes=queryroute) + rest=sum(sum(d.values()) for d in rest_items.values());upper=calls*(scalar+routing)+rest;conversion=calls*len(W['initial'])*104;secondlam=lam*1000 + return dict(scalar_upper=scalar,init_clear_allowance=init_clear,route_items=route_items,routing=routing,caller_items=rest_items,caller_total=rest,raw_upper=upper,per_input_conversion=conversion,lambda_second_charge=secondlam,conservative_total=upper+conversion+secondlam,margin_to_billion=10**9-upper-conversion-secondlam,odd_divisions=dict(odd),lambda_paid_rank1_would_reduce_S_by=lam) + +def main(): + ap=argparse.ArgumentParser();ap.add_argument('word');ap.add_argument('--out',required=True);ap.add_argument('--caller',action='store_true');ap.add_argument('--mutant',type=int);ap.add_argument('--caller-path',required=True);a=ap.parse_args() + W=load(a.word);C=load(a.caller_path);start=time.time();N=native(W,a.mutant) + result=dict(schema='independent-reverse-circuit-audit/1',word=str(Path(a.word).resolve()),word_sha256=pin(a.word),caller_sha256=pin(a.caller_path),native=N) + if a.mutant is None: + result['invoice']=invoices(W,C,N);result['ordinary']=ordinary(W,C,N) + if a.caller:result['caller']=caller(C) + result['seconds']=time.time()-start;Path(a.out).write_text(json.dumps(result,indent=2)+'\n');print(json.dumps(result,indent=2)) +if __name__=='__main__':main() diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/lower.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/lower.py new file mode 100644 index 0000000000..595e28c777 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/lower.py @@ -0,0 +1,262 @@ +"""Lower the pinned dyadic type-B caller into exact elementary operations.""" +from collections import Counter, defaultdict +from fractions import Fraction as Q +from hashlib import sha256 +import json +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[3] +PREVIOUS = ROOT / 'kappa-cargo-sections-20261110T1232Z/evidence/caller' +COMPARATOR = ROOT / 'kappa-after-7004-20261110T0755Z/replay/research/shared-wire-split-composition' +RESULT = ROOT / 'kappa-coupled-boundaries-20261110T0908Z/replay/research/coupled-helper-rechart/RESULT.json' +PIN = { + PREVIOUS / 'mirrored.py': '55dd441a3a7f504b351857d45fd701994a0950ae1baec6c4c2b4b0166fb69db3', + PREVIOUS / 'host34.py': 'bded1a8626d65ee40c4ba3b25780fc03f0fa08906f3c83f631892df072d9a9b7', + PREVIOUS / 'cut_library.py': '7ccb81af19db54ec7cdb44849af018d4ca8893f80f17277914f8566715985133', + PREVIOUS / 'connected.py': '469537b46fb92c5aca926d3b1497da5425408673b0a73ba1427f23d872b414e7', + PREVIOUS / 'screen.py': '01e3eaba4b710a080e6e393e53157e6a119fdf312620eed26e9185ca91f6bea6', + PREVIOUS / 'stage.py': '0ab5546e926dd98d3ad833909b534840b7d8d0467c4790ca09bc2b14b37313f5', + PREVIOUS / 'DYADIC.json': '3995ec23d025a3eb0f4110bc52ad967b21a87c72681217e9e2c3aa0155450b27', + COMPARATOR / 'data/caller.json': '3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e', + COMPARATOR / 'independent.py': '21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874', + RESULT: '44e6a7983aac450c6f55c87da57d8c975748f32728092c4be6ed966a54854998', +} + + +def sources(): + pinned={p:p.read_bytes() for p in PIN} + for p,b in pinned.items(): + assert sha256(b).hexdigest()==PIN[p],p + return pinned + + +def dyadic(v): + return v.denominator & (v.denominator-1) == 0 + + +def unit(v): + return bool(v) and dyadic(v) and abs(v.numerator) & (abs(v.numerator)-1) == 0 + + +def put(vec, i, v): + if v: + vec[i] = v + else: + vec.pop(i, None) + + +def backwards(events): + for e in reversed(events): + op = e[1] + if op == 'ADD': + yield [*e[:-1],str(-Q(e[-1]))] + elif op == 'SCALE': + yield [*e[:-1],str(1/Q(e[-1]))] + else: + assert op == 'SWAP' + yield e.copy() + + +def lower_frame(columns, rows, targets): + """Compute Lx=e and y L^-1=e^t for a split dyadic frame.""" + X, Y = [v.copy() for v in columns], [w.copy() for w in rows] + assert all(sum(v.get(i,0)*a for i,a in w.items())==(j==k) + for j,w in enumerate(Y) for k,v in enumerate(X)) + operations = [] + + def swap(a,b): + if a==b: + return + operations.append(['B','SWAP',a,b]) + for v in X+Y: + x,y = v.get(a,0),v.get(b,0) + put(v,a,y) + put(v,b,x) + + def scale(a,q): + q=Q(q) + assert unit(q) + if q==1: + return + operations.append(['B','SCALE',a,str(q)]) + for v in X: + put(v,a,v.get(a,0)*q) + for w in Y: + put(w,a,w.get(a,0)/q) + + def axpy(a,b,q): + q=Q(q) + assert a!=b and dyadic(q) + if not q: + return + operations.append(['B','ADD',a,b,str(q)]) + for v in X: + put(v,a,v.get(a,0)+q*v.get(b,0)) + for w in Y: + put(w,b,w.get(b,0)-q*w.get(a,0)) + + for j,p in enumerate(targets): + v,w=X[j],Y[j] + candidates=sorted(v) + assert not set(candidates)&set(targets[:j]) + choose=p if unit(Q(v.get(p,0))) else next((r for r in candidates if unit(Q(v[r]))),None) + if choose is not None: + swap(p,choose) + for r in sorted(set(v)-{p}): + axpy(r,p,-v[r]/v[p]) + else: + if not v.get(p): + swap(p,candidates[0]) + for r in sorted(set(v)-{p}): + while v.get(r): + q=v[p]//v[r] + axpy(p,r,-q) + swap(p,r) + assert list(v)==[p] and unit(Q(v[p])) + scale(p,1/v[p]) + assert v=={p:1} and w.get(p)==1 + for r in sorted(set(w)-{p}): + axpy(p,r,w[r]) + assert X[j]==Y[j]=={p:1} + assert X==Y==[{p:1} for p in targets] + return operations + + +def source_frames(data): + sys.path.insert(0,str(PREVIOUS)) + source = data[PREVIOUS/'mirrored.py'].decode() + start='def tape(signs, blocks=None, ring_audit=None):' + entry=' P = m(x, dual)' + assert source.count(start)==source.count(entry)==1 + source=source.replace(start,'def tape(signs, blocks=None, ring_audit=None, frames=None):') + source=source.replace(entry,entry+'\n if frames is not None: frames.append((x, dual, add(I,local)))') + space={'__name__':'frame_source'} + exec(compile(source,str(PREVIOUS/'mirrored.py'),'exec'),space) + frames=[] + space['tape'](None,space['varied_tape']('unit-lu-pppppppp'),frames=frames) + assert len(frames)==18 + return frames,space + + +def original_roles(c, masks): + by_signature=defaultdict(list) + t=c['types']['B'] + for r,d in enumerate(t['diagonal'],t['offset']): + assert d[:2]==[-1,0] + by_signature[tuple(d[2:])].append(r) + phase=(9,9,10,10) + sig=[tuple(int(i in a) for a in masks) for i in range(34)] + sig.extend(tuple(int(j==d) for j in range(1,19)) for d in phase) + labels=[by_signature[d].pop(0) for d in sig] + assert len(set(labels))==38 and all(not rem for rem in by_signature.values()) + return labels,phase + + +def build(data): + c=json.loads(data[COMPARATOR/'data/caller.json']) + p=json.loads(data[PREVIOUS/'DYADIC.json']) + assert p['tape']=='unit-lu-pppppppp' + frames,math=source_frames(data) + labels,phase=original_roles(c,math['masks']()) + native={e[1]:e for e in c['events'] if e[0]=='J'} + transpose=math['tr'] + ledger={} + part=[] + rank9_roles=[] + singles=defaultdict(list) + for j,v,w in p['stage_local']: + singles[j].append((v,w)) + assert all(len(v)==2 for v in singles.values()) and len(singles)==18 + + def decode(entries): + return {labels[r]:Q(a) for r,a in entries} + + def idle(mask,v,w): + x,y=decode(w),decode(v) + pivot=min(x,key=lambda r:(not unit(x[r]),r)) + L=lower_frame([x],[y],[pivot]) + return L+[['B','IDLE_ONE',pivot,mask]]+list(backwards(L)) + + def host(j): + x,y,active=frames[j-1] + # Reverse the formal multiplication convention via transpose. + C=[{r:Q(a) for r,a in zip(labels,v) if a} for v in y] + W=[{r:Q(a) for r,a in zip(labels,v) if a} for v in transpose(x)] + e=native[j] + s,t,alpha,beta=e[3] + assert [Q(alpha),Q(beta)]==[Q(-1),Q(1,2)] + L=lower_frame(C,W,[s,t]) + B=transpose(active) + b,d=B[0] + K=[[Q(1),Q(0)],[b/2,d/2]] + R=[[Q(0),Q(2)],[Q(-1,2),Q(0)]] + assert unit(d/2) and math['m'](R,K)==math['m'](K,B) + frame=L+[['B','SCALE',t,str(d/2)]] + if b: + frame.append(['B','ADD',t,s,str(b/2)]) + before=frame+[['B','ADD',t,s,'-1/2'],['B','ADD',s,t,'1'],['B','LAMBDA',s,1]] + after=[['B','LAMBDA',s,-1]]+list(backwards(frame)) + ledger[j]={'basis_events_each_way':len(frame),'literal_J_roles':[s,t], + 'local_active_minus':[[str(a) for a in r] for r in B]} + return before,after + + for j in range(1,19): + for v,w in singles[j]: + part.extend(idle([j],v,w)) + for i,s in enumerate(phase): + if j==s: + r=labels[34+i] + part.append(['B','IDLE_ODD',r,[j],-1]) + rank9_roles.append((r,j)) + before,after=host(j) + part.extend(before) + part.append(native[j]) + part.extend(after) + if j==9: + for mask,v,w in p['groups']: + part.extend(idle(mask,v,w)) + part.extend(['B','LAMBDA',r,-1] for r in labels[:34]) + + # Leave the type-A sequence and every literal J byte-for-byte unchanged. + b=iter(part) + merged=[] + for e in c['events']: + if e[0]=='A': + merged.append(e) + elif e[0]=='J': + nxt=next(b) + while nxt[0]=='B': + merged.append(nxt) + nxt=next(b) + assert nxt==e + merged.append(e) + merged.extend(b) + assert [e for e in merged if e[0]!='B']==[e for e in c['events'] if e[0]!='B'] + c['events']=merged + hist=Counter(8*len(e[3])+(e[1]=='IDLE_ODD') for e in merged + if e[:2] in (['B','IDLE_ONE'],['B','IDLE_ODD'])) + assert hist==Counter({8:36,9:4,**{r:4 for r in range(16,65,8)}}) + scalar=[Q(e[-1]) for e in merged if e[:2] in (['B','SCALE'],['B','ADD'])] + assert all(dyadic(q) for q in scalar) + assert all(unit(Q(e[-1])) for e in merged if e[:2]==['B','SCALE']) + audit={'status':'PASS_LITERAL_DYADIC_BASIS_LOWERING','phase_roles':rank9_roles,'B_role_map':labels, + 'B_event_counts':dict(Counter(e[1] for e in merged if e[0]=='B')), + 'B_paid_per_port':dict(sorted(hist.items())),'HOST':ledger, + 'B_scalar_bounds':{'max_abs':str(max(map(abs,scalar))), + 'max_denominator':max(a.denominator for a in scalar), + 'max_abs_numerator':max(abs(a.numerator) for a in scalar)}} + return c,audit + + +def main(out,receipt): + raw=sources() + assert set(raw)==set(PIN) + c,audit=build(raw) + out.write_text(json.dumps(c,separators=(',',':'))+'\n') + audit['caller_sha256']=sha256(out.read_bytes()).hexdigest() + receipt.write_text(json.dumps(audit,indent=2)+'\n') + + +if __name__=='__main__': + main(*(Path(a) for a in sys.argv[1:])) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/mirrored.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/mirrored.py new file mode 100644 index 0000000000..853e188ee5 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/mirrored.py @@ -0,0 +1,159 @@ +"""Exact mirrored two-half HOST tape with four terminal fused phases.""" +from collections import Counter +from fractions import Fraction as Q +import hashlib, importlib.util, json, sys +from pathlib import Path +from host34 import N, eye, z, m, tr, add, sc, msum, inv, block_lu +from cut_library import Physical, block_tuple, coupled_bound, canonical + +PINS = ('3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e', + '44e6a7983aac450c6f55c87da57d8c975748f32728092c4be6ed966a54854998', + '60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5') + +def sparse(rows): + return [{i: x for i, x in enumerate(row) if x} for row in rows] + +def masks(): + return [{0, 1, *range(2 + 16 * side, 2 + 16 * side + 2 * min(j + 1, 8))} + for side, order in enumerate((range(9), range(8, -1, -1))) for j in order] + +def tape(signs, blocks=None, ring_audit=None): + I = eye(2) + J = [[Q(0), Q(-2)], [Q(1, 2), Q(0)]] + blocks = blocks or [sc(J, sign) for sign in signs] + W = [sc(add(I, j, -1), Q(1, 2)) for j in blocks] + A = I + phi = [] + for w, j in zip(W, blocks): + phi.append(m(A, w)) + A = m(A, j) + assert A == sc(I, -1) + bridge = tr(eye(N)[:2]) + U = [None] * 18 + seam = add(I, sc(msum(phi[:9], 2, 2), 2), -1) + for side, ids in enumerate((list(range(9)), list(range(17, 8, -1)))): + bcoef = inv(add(I, seam, -1) if side == 0 else sc(add(I, seam), -1)) + offset = 2 + 16 * side + B = [m(bcoef, sc(phi[j], 2)) for j in ids[:-1]] + P = [sc(b, 2 if side == 0 else -2) for b in B] + LU = block_lu([[add(b, sc(I, -2)) if i == j else b for j, b in enumerate(P)] for i in range(8)]) + for q, j in enumerate(ids[:-1]): + U[j] = m(bridge, B[q]) + for i in range(8): + U[j][offset + 2*i:offset + 2*i + 2] = LU[i][q] + U[ids[-1]] = add(sc(bridge, 1 - 2 * side), msum((U[j] for j in ids[:-1]), N, 2), -1) + basis = inv(tr([c for u in U[:-1] for c in tr(u)])) + Y = [] + for i in range(18): + cells = [add(sc(p, 2), sc(I, -2)) if i == j else sc(p, 2) + for j, p in enumerate(phi)] + y = m([[q for b in cells[:-1] for q in b[k]] for k in (0, 1)], basis) + assert all(m(y, u) == b for u, b in zip(U, cells)) + Y.append(y) + S = z(N, 2) + F = eye(N) + domains = {} + physical = Physical.__new__(Physical) + physical.cuts = [] + for i, (u, y, w, J_i, mask) in enumerate(zip(U, Y, W, blocks, masks()), 1): + x = add(u, sc(m(S, w), 2)) + local = m(y, x) + E = [[Q(a == b and a in mask) for b in range(N)] for a in range(N)] + assert m(F, x) == u and add(I, local) == sc(J_i, -1) + assert m(E, x) == x and m(y, E) == y and m(F, E) == m(E, F) + dual = m(inv(local), y) + P = m(x, dual) + if ring_audit is not None: + vals = [Q(v) for a in (x,dual,F) for row in a for v in row if v] + assert all(not (v.denominator & (v.denominator-1)) for v in vals) + ring_audit.append({'stage':i,'max_abs':str(max(map(abs,vals))), + 'max_denominator':max(v.denominator for v in vals)}) + Fi = inv(F) + Pplus = add(E, P, -1) + Pminus = add(E, m(m(F, P), Fi), -1) + assert m(Pplus, Pplus) == Pplus and m(Pminus, Pminus) == Pminus + domains[i] = tuple(canonical(sparse(a)) for a in (tr(Pplus), Pplus, tr(Pminus), Pminus)) + physical.cuts.append((i - 1, block_tuple(sparse(F)), block_tuple(sparse(tr(Fi))))) + F = add(F, m(u, y)) + S = add(S, u) + assert F == sc(eye(N), -1) and S == z(N, 2) + physical.cuts.append((18, block_tuple(sparse(F)), block_tuple(sparse(tr(inv(F)))))) + return domains, physical + +def varied_tape(mode): + J = [[Q(0), Q(-2)], [Q(1, 2), Q(0)]] + def changed(t): + S = [[Q(1), Q(t)], [Q(0), Q(1)]] + return sc(m(m(S, J), inv(S)), -1) + def closed(ts): + a = [changed(t) for t in ts] + return a + [inv(v) for v in reversed(a)] + if mode.startswith('unit-lu-'): + ts = [4 if x == 'p' else -4 if x == 'm' else 0 for x in mode.removeprefix('unit-lu-')] + assert len(ts) == 8 + left = [v for t in ts[:4] for v in closed([t])] + right = [v for t in ts[4:7] for v in closed([t])] + return left + [J, inv(J)] + right + [changed(ts[7]),changed(ts[7])] + if mode == 'local-pairs': + left = [v for t in (1, -2, 3, -1) for v in closed([t])] + right = [v for t in (2, -1, 3) for v in closed([t])] + elif mode == 'palindrome': + left, right = closed([1, -2, 3, -1]), closed([2, -1, 3]) + else: + left, right = closed([1, 2, 3, 4]), closed([-2, -3, -4]) + return left + [J, inv(J)] + right + [changed(1), changed(1)] + +def main(caller, result, engine, price=True, mode='commuting'): + assert tuple(hashlib.sha256(p.read_bytes()).hexdigest() for p in (caller, result, engine)) == PINS + C = json.loads(caller.read_bytes()) + R = json.loads(result.read_bytes()) + sp = importlib.util.spec_from_file_location('gate', engine) + g = importlib.util.module_from_spec(sp) + sp.loader.exec_module(g) + claim, cap = map(Q, (R['gate']['claim'], R['gate']['BIT_pin'])) + powers = [0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 0, 3, 0, 3, 0, 3, 0, 3, 2] + signs = [1 if (b-a) % 4 == 1 else -1 for a, b in zip(powers, powers[1:])] + audit = [] if mode.startswith('unit-lu-') else None + D, P = tape(signs, None if mode == 'commuting' else varied_tape(mode), audit) + stage_masks = masks() + old = C['types']['B']['diagonal'] + expected = [sum(d[2+i] for d in old) for i in range(18)] + assert [len(mask) + 2 * (j in (8, 9)) for j, mask in enumerate(stage_masks)] == expected + productive = Counter(1 + 8 * sum(j in mask for mask in stage_masks) for j in range(N)) + productive[9] += 4 + assert productive == Counter(1 + 8 * sum(d[2:]) for d in old) + out = {'status':'PASS_MIRRORED_HOST34_TERMINAL_PHASE_SUPPORT', + 'tape':mode, 'rank_9_phase_stages':[9,9,10,10], + 'old_target_cardinalities':expected, 'core_cardinalities':list(map(len, stage_masks))} + if audit is not None: + out['dyadic_active_HOST_frames'] = audit + if price: + order = tuple(range(1,10))+tuple(range(18,9,-1)) + bill, cuts = coupled_bound(order, D, P) + assert sum(r*n for r,n in bill.items()) == 176*8 + invoice = Counter({int(r):n for r,n in R['invoice']['T'].items()}) + invoice.subtract({int(r):n for r,n in R['invoice']['P'].items()}) + delta = Counter(8*len(e[3]) for e in C['events'] if e[:2]==['B','IDLE_ONE']) + delta[1] += 4 + delta[9] -= 4 + delta.subtract(bill) + invoice.update({r:8*n for r,n in delta.items()}) + value = g.moment(invoice,claim) + deriv = (0,0) + for r,n in invoice.items(): + deriv = g.add(deriv,g.smul(g.mul(g.power(r,cap if n>=0 else claim),g.log(r)),-n)) + assert deriv[1] < 0 + out.update({'directed_complete_margin':g.value(value), + 'directed_complete_margin_exact':[str(Q(v,g.B)) for v in value], + 'directed_derivative_upper':str(Q(deriv[1],g.B)), + 'optimistic_core_paid':dict(bill),'cut_price':cuts}) + if value[0]>0: + floor = Q('0.003635202569271') + ceil = Q('0.003635202569272') + assert g.moment(invoice,floor)[0] > 0 and g.moment(invoice,ceil)[1] < 0 + out['formal_candidate_crossing_bracket'] = [str(floor),str(ceil)] + print(json.dumps(out, indent=2)) + +if __name__ == '__main__': + main(*(Path(x) for x in sys.argv[1:4]), price='--support-only' not in sys.argv, + mode=next((a.removeprefix('--tape=') for a in sys.argv[4:] if a.startswith('--tape=')), 'commuting')) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/odd_unit_dyadic_tapes.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/odd_unit_dyadic_tapes.py new file mode 100644 index 0000000000..0d9d8bdd2d --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/odd_unit_dyadic_tapes.py @@ -0,0 +1,58 @@ +"""Build an exact asymmetric 8+9 B tape from five-turn closures.""" +from pathlib import Path +from hashlib import sha256 +from fractions import Fraction as Q +import json +import mirrored +from host34 import eye, z, inv, m, add, sc, msum, tr + +root=Path(__file__).resolve().parent +p=root/"short_dyadic_seam.py" +ns={"__file__":str(p)} +exec(compile(p.read_text().split("control()\ntested=",1)[0],str(p),"exec"),ns) +a,b=8,9 +n=2+2*(a-1+b-1) +stages=a+b +def masks(): + return [{0,1,*range(offset,offset+2*min(j+1,length-1))} + for offset,length,order in ((2,a,range(a)),(2+2*(a-1),b,range(b-1,-1,-1))) for j in order] +src=ns["part"] +assert "range(half-1)" in src +src=src.replace(" for side, ids in enumerate((list(range(half)), list(range(stages-1, half-1, -1)))):", + " for side, ids in enumerate((list(range(half)), list(range(stages-1, half-1, -1)))):\n arm=len(ids)-1") +src=src.replace("offset = 2 + 2*(half-1)*side","offset = 2 + 2*(half-1)*side") +src=src.replace("range(half-1)","range(arm)") +assert "range(arm)" in src +src=src.replace("def tape(blocks, ring_audit=None):","def tape(blocks, ring_audit=None, frames=None):") +src=src.replace(" P = m(x, dual)"," P = m(x, dual)\n if frames is not None:frames.append((x,dual,add(I,local)))") +env=vars(mirrored)|ns|dict(half=a,stages=stages,N=n,masks=masks) +exec(compile(src,str(root/"mirrored.py"),"exec"),env) +tape=env["tape"] +J=ns["J"] +pair=[J,inv(J)] +srcpath=root/"ODD-UNIT-PREFIX-CLOSURES.json" +closures=json.loads(srcpath.read_text())["hits"] +attempted=rational=0 +hits=[] +for ci,w in enumerate(closures): + turns=[[[Q(t[0]),Q(t[1])],[Q(t[2]),Q(t[3])]] for t in w["turns"]] + def inflate(v): + return [[Q(v[0]),Q(v[1])],[Q(v[2]),Q(v[3])]] + lp=inflate(w["left_padding"]) + rp=inflate(w["right_padding"]) + blocks=[lp,inv(lp)]*3+turns+[rp,inv(rp)]*3 + assert len(blocks)==stages and ns["matrix_word"](blocks)==sc(eye(2),-1) + attempted+=1 + try: + audit=[] + tape(blocks,audit) + except (AssertionError,ZeroDivisionError,StopIteration): + continue + hits.append({"closure":ci,"padding":[3,0],"sequence":[[[str(q) for q in row] for row in M] for M in blocks], + "stage_bounds":audit}) + print("exact asymmetric unit dyadic tape",ci,flush=True) + if len(hits)>=8:break +with (root/"ODD-UNIT-DYADIC-TAPES.json").open("x") as f: + json.dump({"closure_input_sha256":sha256(srcpath.read_bytes()).hexdigest(),"checked":attempted,"dyadic_tapes":hits, + "shape":[a,b],"scope":"Exact rational construction and dyadic verification of each local B host and pulled-back passive projection. Grouped idle lowering, terminal signed correction and complete caller replay are separate."},f,indent=2) +print("asymmetric tapes",len(hits),"of",attempted,flush=True) diff --git a/research/p104-fixed-type-b-two-return-provider-bound/inputs/pricing.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/pricing.py new file mode 100644 index 0000000000..40ec194017 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-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-fixed-type-b-two-return-provider-bound/inputs/signed_model.py b/research/p104-fixed-type-b-two-return-provider-bound/inputs/signed_model.py new file mode 100644 index 0000000000..01cb0c63c5 --- /dev/null +++ b/research/p104-fixed-type-b-two-return-provider-bound/inputs/signed_model.py @@ -0,0 +1,31 @@ +"""Load the pinned independent Laurent model without its physical main.""" +from pathlib import Path +from types import ModuleType +import sys + +root=Path(__file__).resolve().parent +p=root/"candidate_gate.py" +text=p.read_text() +body=text[text.index("def module("):text.index("def precision(")] +exec(compile(body,str(p),"exec")) +def ceil_log2(q): + a,b=q.numerator,q.denominator + k=a.bit_length()-b.bit_length() + assert k>=0 + return k+(a>b< 0, 'positive complete helper job') + T[rank] += 1 + need(len(mapping) == len(set(mapping.values())) == word['public'], 'injective native inputs') + for r in range(word['public'], word['public']+word['owned_fields']): + mapping[r] = ('owned', ci, r-word['public']) + need(len(set(mapping.values())) == word['public']+51, 'owned/public separation') + for ni, move in native_moves: + _, r, start, end, owned = move + rank = abs(len(word['frames'][end])-len(word['frames'][start])) + need(owned == (r >= word['public']) and rank > 0, 'actual paid owner class') + P[rank] += 1 + occurrences.append([ci, ni, list(mapping[r]), rank, start, end]) + for pi, q in enumerate(word['ports']): + transform = route(q, by_q[q], stage) + before_axes = [1 << j for j in range(9+8*(stage-1))] + after_axes = [1 << j for j in range(9+8*stage)] + spectator = [1 << j for j in range(9, 9+8*stage)] + x0 = terms((a, 1) for a in before_axes) + y0 = terms(list(x0.items())+[(q, -1)]) + x1 = terms((a, 1) for a in after_axes) + y1 = terms(list(x1.items())+[(q, -1)]) + nx0 = terms([(a, 1) for a in spectator]+[(q, 1)]) + ny0 = terms((a, 1) for a in spectator) + nx1 = terms((a, 1) for a in spectator+[1 << j for j in range(9)]) + ny1 = terms(list(nx1.items())+[(q, -1)]) + shifts = [boundary(a, b, transform) for a, b in + ((x0, nx0), (y0, ny0), (nx1, x1), (ny1, y1))] + body = terms((1 << j, 1) for j in range(9+8*(stage-1), 9+8*stage)) + for actual, expected in ((sub(x1,x0),body), (sub(y1,y0),body), + (sub(y1,x0),terms(list(body.items())+[(q,-1)])), + (sub(x1,y0),terms(list(body.items())+[(q,1)]))): + need(not polynomial(sub(actual,expected)), 'all four contact operators') + need(polynomial(sub(terms([(q,1)]),terms([(q,-1)]))), 'wrong query orientation rejected') + phase_records.append([ci,pi,shifts,2 if pi in second else 1]) + else: + ty, op, r, *a = e + kind = caller['types'][ty] + used = [r] + ([a[0]] if op in ('ADD','SWAP','QUERY') else []) + need(all(kind['offset'] <= x < kind['offset']+kind['roles'] for x in used), 'caller owners stay in type') + need(len(used) == len(set(used)), 'distinct scalar/query owners') + if op in ('QUERY','IDLE_ONE'): + if op == 'QUERY': + need(a[1] in (-1,1), 'signed completed query') + rank = 1; query_uses += len(kind['ports']) + else: + selected = a[0] + need(selected and len(selected)==len(set(selected)) + and all(1 <= s <= 18 for s in selected), 'whole idle stage axes') + rank = 8*len(selected); idle_uses += len(kind['ports']) + for pi in kind['ports']: + owner = ['query_scratch',ci,pi] if op == 'QUERY' else ['main',pi,r] + occurrences.append([ci,op,owner,rank]); P[rank] += 1 + elif op == 'LAMBDA': + need(a[0] in (-1,1), 'global normalizer sign') + lambda_uses += len(kind['ports']) + need(stage_order == list(range(1,19)), 'fresh chronological native stages') + for kind in caller['types'].values(): + for diagonal in kind['diagonal']: + qp, zero, *selection = diagonal + need(qp in (-1,0,1) and zero == 0 and len(selection)==18 + and set(selection)<={0,1} and any(selection), 'positive nonempty root endpoint') + rank = abs(qp)+8*sum(selection) + for pi in kind['ports']: + q = word['ports'][pi] + axes = [1 << (9+8*j+k) for j,yes in enumerate(selection) if yes for k in range(8)] + actual = terms([(q,qp)]+[(a,1) for a in axes]) + target = terms((a,1) for a in ([q] if qp else [])+axes) + need(translation(sub(target,actual)) == (q if qp == -1 else 0), 'whole output correction') + T[rank] += 1 + for name, actual in [('P',P),('T',T)]: + need(actual == Counter({int(k):v for k,v in receipt['invoice'][name].items()}), 'independent '+name+' invoice') + need(sum(T.values()) == len(owners), 'every productive target is one actual owner') + need(len(occurrences) == sum(P.values()), 'every paid position retained in order') + return dict(ambient=153, native_calls=18, native_public=1480, fresh_helpers=19440, + productive_fields=len(owners), paid_positions=len(occurrences), + complete_paid_position_digest=digest(occurrences), + native_contact_boundaries=sum(4*r[3] for r in phase_records), + phase_record_digest=digest(phase_records), nonzero_boundary_translations=sum(sum(bool(x) for x in r[2])*r[3] for r in phase_records), + reserved_native_banks=18*51, reserved_serial_query_lambda_bank=1, + query_uses=query_uses, idle_uses=idle_uses, lambda_uses=lambda_uses, + paid=dict(sorted(P.items())), targets=dict(sorted(T.items())), + rank_surplus=sum(r*T[r] for r in T)-sum(r*P[r] for r in P)) + + +def inverse(matrix): + n = len(matrix) + a = [[Q(x) for x in row]+[Q(i==j) for j in range(n)] for i,row in enumerate(matrix)] + det = Q(1) + for j in range(n): + pivot = next((i for i in range(j,n) if a[i][j]),None) + need(pivot is not None, 'rational basis invertible') + if pivot != j: + a[j],a[pivot] = a[pivot],a[j]; det = -det + v = a[j][j]; det *= v; a[j] = [x/v for x in a[j]] + for i in range(n): + if i != j: + v = a[i][j] + a[i] = [x-v*y for x,y in zip(a[i],a[j])] + return [row[n:] for row in a], det + + +def bit_application(word, caller, receipt): + ff = word['frames']; determinants=[]; denominator_witnesses=set() + for label, frame in ff.items(): + B,A = frame['B'],frame['A']; d = frame['dim'] + need(len(B)==d and len(A)==8-d and all(len(v)==8 for v in B+A), 'rational frame dimensions') + need(all(sum(Q(x)*Q(y) for x,y in zip(b,a))==0 for b in B for a in A), 'complement annihilation') + inv, det = inverse(list(zip(*(B+A)))) + determinants.append([label,str(det)]) + denominator_witnesses.add(abs(det.numerator)); denominator_witnesses.add(det.denominator) + for row in inv: + denominator_witnesses.update(x.denominator for x in row) + for row in B+A: + denominator_witnesses.update(Q(x).denominator for x in row) + charts=[] + for port in range(111): + head=ff[str(word['start'][port])]; body=ff[str(word['final'][port+111])] + need(head['dim']==1 and body['dim']==7, 'actual main head/body ranks') + u=head['B'][0] + need(all(sum(Q(x)*Q(y) for x,y in zip(u,v))==0 for v in body['B']), 'main complement') + inv,det=inverse(list(zip(*([u]+body['B'])))) + charts.append([port,str(det)]) + denominator_witnesses.update([abs(det.numerator),det.denominator]) + for row in inv:denominator_witnesses.update(x.denominator for x in row) + P,T=Counter(),Counter(); positions=[]; names={('main',pi,r) for pi in range(111) for r in range(38)} + calls=[] + for ci,e in enumerate(caller['events']): + op=e[0] + if op=='LOCAL': + _,stage,src,dst=e; calls.append(stage) + mapping={i:('main',i,src) for i in range(111)} + mapping.update({i+111:('main',i,dst) for i in range(111)}) + for r in range(222,word['public']): + owner=('helper',ci,r); need(owner not in names,'fresh BIT helper');names.add(owner);mapping[r]=owner + T[abs(ff[str(word['start'][r])]['dim']-ff[str(word['final'][r])]['dim'])]+=1 + need(len(mapping)==len(set(mapping.values()))==659,'injective BIT occurrence') + for r in range(659,659+word['owned_fields']):mapping[r]=('owned',ci,r-659) + for ni,move in enumerate(word['program']): + if move[0]=='MOVE': + _,r,a,b=move;rank=abs(ff[str(a)]['dim']-ff[str(b)]['dim']) + P[rank]+=1;positions.append([ci,ni,list(mapping[r]),rank,a,b]) + elif op=='QUERY': + need(e[1]!=e[2] and 0<=min(e[1:])<=max(e[1:])<38,'BIT query owners') + for pi in range(111):P[1]+=1;positions.append([ci,op,['query_scratch',ci,pi],1]) + elif op=='IDLE_ONE': + _,owner,ss=e;need(ss and len(ss)==len(set(ss)) and all(1<=s<=18 for s in ss),'BIT idle axes') + for pi in range(111):P[7*len(ss)]+=1;positions.append([ci,op,['main',pi,owner],7*len(ss)]) + need(calls==[s for s in range(1,19) for _ in range(2)],'paired native chronology') + for d in caller['diagonal']: + need(d['q']==1 and d['stages'] and len(d['stages'])==len(set(d['stages'])),'BIT positive endpoint') + T[1+7*len(d['stages'])]+=111 + need(P==Counter({int(k):v for k,v in receipt['paid'].items()}) and + T==Counter({int(k):v for k,v in receipt['targets'].items()}),'complete BIT invoice') + need(sum(T.values())==len(names)==19950,'BIT owner count') + return dict(ambient=134, rational_frames=len(ff), rational_main_charts=len(charts), + rational_determinants_digest=digest(determinants), + finite_prime_exclusion_witness_count=len(denominator_witnesses), + finite_prime_exclusion_witness_digest=digest(sorted(denominator_witnesses)), + native_calls=len(calls), fresh_helpers=36*437, productive_fields=len(names), + paid_positions=len(positions), complete_paid_position_digest=digest(positions), + reserved_native_banks=36*word['owned_fields'], reserved_serial_query_bank=1, + rank_surplus=sum(r*T[r] for r in T)-sum(r*P[r] for r in P)) + + +def main(): + p='research/shared-wire-split-composition/' + w,c,r=read(p+'data/final.json.gz'),read(p+'data/caller.json'),read(p+'FULL-RESULT.json') + phases=read('research/p104-two-chain-shared-native/retained/runtime/DATA-PHASES.json') + complex_result=complex_application(w,c,r,phases) + p='research/paired-query-only-bit/' + bw,bc,br=read(p+'retained/inputs/BIT-NATIVE-WORD.json.gz'),read(p+'EFREE-CALLER.json.gz'),read(p+'EFREE-RESULT.json') + bit_result=bit_application(bw,bc,br) + controls={} + def reject(name, action): + try:action() + except ValueError as error:controls[name]=str(error) + else:raise ValueError('negative control accepted: '+name) + alias=deepcopy(c);joint=next(e for e in alias['events'] if e[0]=='J');joint[2][2]=joint[2][0] + reject('same_frame_main_alias',lambda:complex_application(w,alias,r,phases)) + reordered=deepcopy(c);joint=next(e for e in reordered['events'] if e[0]=='J');joint[1]=2 + reject('wrong_stage',lambda:complex_application(w,reordered,r,phases)) + bad_bit=deepcopy(bw);bad_bit['frames']['0']['A'][1]=bad_bit['frames']['0']['A'][0][:] + reject('singular_BIT_spectator_basis',lambda:bit_application(bad_bit,bc,br)) + q=w['ports'][0];basis=next(x for x in phases['recipes'] if x['q']==q)['idle_children'][0]['orthogonal_axes'][:8] + reject('singular_complex_route',lambda:route(q,basis[:-1]+basis[:1],1)) + transform=route(q,basis,1) + before=terms((1<