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-balanced-fusion-residual/BALANCED-PRICE.json b/research/p104-balanced-fusion-residual/BALANCED-PRICE.json new file mode 100644 index 0000000000..1b2944041f --- /dev/null +++ b/research/p104-balanced-fusion-residual/BALANCED-PRICE.json @@ -0,0 +1,31 @@ +{ + "4+4": { + "downhill_change": 0, + "first_raw_and_powered_price_success": [ + 7, + [ + "0.017593312737419744", + "0.017593312737419745" + ], + [ + "0.000016625831713537", + "0.000016625831713538" + ] + ], + "last_failure": [ + 6, + [ + "-0.003835034296043386", + "-0.003835034296043385" + ], + [ + "-0.000003624288198214", + "-0.000003624288198213" + ] + ], + "uphill_local_saving_at_trial": [ + "0.021428347033463130", + "0.021428347033463131" + ] + } +} diff --git a/research/p104-balanced-fusion-residual/BALANCED.md b/research/p104-balanced-fusion-residual/BALANCED.md new file mode 100644 index 0000000000..0ea40726e5 --- /dev/null +++ b/research/p104-balanced-fusion-residual/BALANCED.md @@ -0,0 +1,21 @@ +# The unique 4+4 fusion leaves one extra controlled XOR + +On the pinned #8027 graph there is exactly one chronological pair of upward rank-four MOVEs sharing a hinge. The first enters chart 509 from zero at clock 7112 and carries the independent helper input 626 in owner 2241. The second enters chart 1 from 509 at clock 7210 and carries the main input 38 in owner 2252. A rank-eight direct contact is geometrically legal because its endpoints are the zero and identity projectors. The intervening native reader at 7122 consumes the first field as one term of a different packet sent to chart 382 at 7123. + +The literal modification sends helper 626 directly from zero to 1. At chart 509 the already-live owner 1528 supplies main input 38 instead of helper 626. The program also removes the late use of helper 626 at clock 21250. At the end it exchanges owners 38 and 626, both chart 1, and adds both to native public owners 33, 77, and 87. Exact forward propagation gives the native normalized rows at 629 of 630 outputs. Only owner 130 differs, by the original main input 38. In paired-port notation that output is \(y_{19}+x_{19}+x_{38}\). All 408 helpers have their full native endpoint functions. The operator is still invertible: the discrepancy is one extra controlled XOR into a distinct target whose control \(x_{38}\) is preserved. Reversing all gates gives the transposed excess at input 38 and output 130. A deliberately omitted last repair ADD fails the exact row check. + +The new word has 39,605 instructions and 2,802 MOVEs. It retains all 3,433 private clear owners/charts, all still symbolically dirty. Seven symbolic values change, at owners 2241, 2242, 2252, 2477, 2898, 3317 and 3318. The two rank-four contacts become one rank-eight contact with unchanged total grade. This local tariff saving belongs to the actual displayed defective word. Claiming a correct multiplier requires removing or canceling the extra term in the complete application. + +## A terminal decoding and late-relay obstruction + +Keep helper 626 as the fused direct payload and keep the other interior operations except as follows. The chart-509 hinge may form any XOR of its entire stock before native clock 7110. Terminal charts may decode freely. Allow the final chart-544 receipt at clock 21260 to be recoded, including rebinding the original equal-cost pair of paid edges from 0→91→544 to 0→C→544 through any of the 111 dimension-one charts. Give each such source the entire pooled prior information of chart zero and C. Other changed paid contacts or decoding inside the intervening network are outside this finite screen. + +Let \(g\) denote the hinge replacement. The twelve earlier incoming fields are independent, giving exactly 4,096 linear candidates. Formal propagation of one fresh label at the ingress to 2242 gives chart 1 a rank-504 native-coordinate stock plus one independent formal label. Substituting \(g\) therefore gives the span of this 504-dimensional subspace and \(g\). The original 505 target forms are independent. Exactly 512 of the 4,096 choices extend the current span to the required target space. + +Chart 544 has three early arrivals and the one adjustable late arrival. For each qualifying \(g\), enumerate the eight sums of the early arrivals. The target 130 lies in none of these sums. Subtract each sum from the required output to obtain the necessary late payload. As the preclock stocks at dimension one and zero are all unaffected by the hinge error, the resulting GF(2) membership tests are exact. The only candidate passing the normalized test for any hinge choice is chart 21, the original input chart of \(x_{19}\). The one-dimensional image of projector 21 and the seven-dimensional image of 544 span dimension eight over the rationals. Hence their charts are incomparable, and the purported 21→544 paid rank-six MOVE is illegal. No legal equal-grade late sender in the tested class solves the remaining output. Rank of the public matrix alone misses this geometric constraint. + +## Complete numerical tests + +At \(t=1-0.00389046\), the local paid saving \(2\,4^t-8^t\) lies between 0.021428347033463130 and 0.021428347033463131. With six hypothetical all-input placements in the true 36-call histogram, raw surplus lies between −0.003835034296043386 and −0.003835034296043385 and 268-factor surplus between −0.000003624288198214 and −0.000003624288198213. With seven, raw surplus is 0.017593312737419744… and 268-factor surplus is 0.000016625831713537…. The pricing retains the original productive histogram and uses #8041's exact target and powered profile. This candidate realizes the paid histogram locally and leaves the explicit cross-port function error above. + +Reproduce with `python3 -IB candidate.py pinned/strong-bit.json.gz scratch-output.json.gz`, `python3 -IB hinge_screen.py pinned/strong-bit.json.gz` and `python3 -IB balanced_price.py pinned`. The pricing directory contains the three pinned #8041 reference inputs. The respective expected receipts are `ONE-RESIDUAL-RESULT.json`, `HINGE.json` and `BALANCED-PRICE.json`. The original source graph at #8027 commit `fb9b6a7b0d27da1cf98430893a3016bf811e2aa4` is authenticated by SHA-256 `74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326`. The optional whole-caller composition test is a separate result on top of the explicitly frozen changed word. diff --git a/research/p104-balanced-fusion-residual/CALLER-PROOF.md b/research/p104-balanced-fusion-residual/CALLER-PROOF.md new file mode 100644 index 0000000000..f033c2ed6f --- /dev/null +++ b/research/p104-balanced-fusion-residual/CALLER-PROOF.md @@ -0,0 +1,40 @@ +# The 36-call effect of the two-hop balanced fusion + +The literal #8027 candidate in `pinned/ONE-RESIDUAL.json.gz` changes the rank-four contacts at clocks 7112 and 7210 into one rank-eight contact. Its source-local normalized map equals the native map on 629 of 630 output rows; row 130 instead contains the required value plus input 38. The changed source remains a rank-630 map. This result concerns the **constructed tape with its chart-1 SWAP and six ADD repairs**, not an assumed free or hypothetical terminal decoder. + +For the pinned complete paired BIT word, none of the 36 LOCAL placements works by itself, and **no nonempty subset of these same literal replacements cancels** on the arbitrary-field source contract. In particular, seven or more uses cannot be admitted by relying on cancellation. The proof uses binary constant address fields, which are a subset of the source's permitted arbitrary whole fields. It does not assert that every such source assignment is reachable from a particular pair of top-level integer operands. + +## Exact diagonal witness + +There are 18 stages and two root-role lanes. Number stages `s=1,...,18` and set lane base `b=0` or `19`. The local extra term reads the first local role's port 38 and XORs it into the second local role's output port 19. The unmodified caller operates identically and independently on every port when the fields are binary constants. A forward caller-prefix pass shows that the source is the role form `e_b + e_(b+s)`; an independent reverse caller-suffix pass shows that the output response is the same form. The entire error matrix for this placement is therefore + +``` +(e_b + e_(b+s)) (e_b + e_(b+s))^T, +``` + +from port-38 source roles to port-19 destination roles. These cross-port errors superpose across placements: a changed call does not modify port 38, and the rest of the caller never couples ports 19 and 38. For any nonempty selected subset, take any selected `(b,s)`, set only source owner `(root,b+s,38)` to constant one, and set every other source field to zero. The output `(root,b+s,19)` is wrong. Its diagonal coefficient occurs in no other placement, so this witness survives all other choices in the subset. The 36 placement matrices consequently have rank 36. + +For the 268-factor, floor-15 source choose all other 267 factors to be the `(root,0,0)` target of rank 127. Every first-factor target is retained because `4*127^267 > 15^268`. The explicit single- and multiple-placement witnesses are therefore inside that source-service domain, rather than a hyperplane of fresh-zero helper banks. The source-service argument does not prove higher-level operand reachability. + +## Independent checks and debt + +`constant_composition.py` verifies the graph and caller hashes, the full native and fused 630-row normalized maps, an independent reverse-mode transpose of both, source chart and owner lifetimes, the exact paid-rank change, and all 3,433 private clears. It replays all 4,218 independent root variables forward and in a separate reverse-mode pass for each of 36 placements; all 14,688 helper outputs form unchanged identity blocks because they do so in the checked local map. It verifies the explicit placement matrices and four multi-placement controls. + +`caller_dual_check.py` is independent of that checker: its caller-prefix and reverse-suffix passes separately derive all 36 source/response pairs, verify the unique diagonals and retained-suffix inequality, and reject a changed-caller control. `candidate.py` rebuilds the literal source from the original graph and checks its normalized operator, transpose, private clears, and a corrupted-instruction control. + +All 3,433 native and candidate private clear payloads are symbolically nonzero on arbitrary inputs. Seven clear owners change their symbolic data while remaining at their original clear charts: `2241, 2242, 2252, 2477, 2898, 3317, 3318`. Their original and changed supports are in `constant_composition.json`. Their erasure remains a physical debt; matching normalized rows or counting dirty clears is not a physical owner/erasure replay. The checked reverse passes give the **algebraic transpose of the normalized linear map**; they do not execute a physical reverse program through dirty clears. + +## Replay + +```sh +python3.12 -IB constant_composition.py > result.json +cmp result.json constant_composition.json +python3.12 -IB caller_dual_check.py > dual.json +cmp dual.json caller_dual_check.json +python3.12 -IB candidate.py pinned/strong-bit.json.gz rebuilt.json.gz +python3.12 -c 'import gzip; from pathlib import Path; assert gzip.decompress(Path("rebuilt.json.gz").read_bytes()) == gzip.decompress(Path("pinned/ONE-RESIDUAL.json.gz").read_bytes())' +``` + +The reconstructed uncompressed word is compared to the authenticated retained word; gzip bytes can differ with the compression implementation. + +The source graph is SHA-256 `74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326`, the paired caller `757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b`, and the compressed candidate `7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7`. The candidate was built by the joint architect; the complete-caller and independent prefix/suffix checks here use that exact source. No publication, actual complete physical supplier, or κ gain is claimed. diff --git a/research/p104-balanced-fusion-residual/CANDIDATE-AUDIT.json b/research/p104-balanced-fusion-residual/CANDIDATE-AUDIT.json new file mode 100644 index 0000000000..1055c2841f --- /dev/null +++ b/research/p104-balanced-fusion-residual/CANDIDATE-AUDIT.json @@ -0,0 +1,31 @@ +{ + "all_candidate_clears_nonzero": true, + "all_other_ordered_move_incidences_unchanged": true, + "candidate_clear_count": 3433, + "candidate_operator_rank": 630, + "candidate_sha256": "7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7", + "changed_clear_owners": [ + 2241, + 2242, + 2252, + 2477, + 2898, + 3317, + 3318 + ], + "chart544_history_rank": 4, + "chart544_separating_input_support": [ + 19, + 38 + ], + "chart544_target_not_in_history_span": true, + "error_input_coordinate": 38, + "forward_target_rows_correct": 629, + "last_add_corruption_changes_outputs": [ + 87 + ], + "native_clear_count": 3433, + "only_wrong_output": 130, + "source_sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "transpose_matches_independently_reconstructed": true +} diff --git a/research/p104-balanced-fusion-residual/COMPOSITION-CONTROLS.json b/research/p104-balanced-fusion-residual/COMPOSITION-CONTROLS.json new file mode 100644 index 0000000000..8b35187333 --- /dev/null +++ b/research/p104-balanced-fusion-residual/COMPOSITION-CONTROLS.json @@ -0,0 +1,6 @@ +{ + "dependent_residual_mutation_rejected": true, + "duplicate_error_matrix_rank": 35, + "independent_matrix_rank": 36, + "verified_distinct_diagonals": 36 +} diff --git a/research/p104-balanced-fusion-residual/HINGE-AUDIT.json b/research/p104-balanced-fusion-residual/HINGE-AUDIT.json new file mode 100644 index 0000000000..9ebc74a712 --- /dev/null +++ b/research/p104-balanced-fusion-residual/HINGE-AUDIT.json @@ -0,0 +1,28 @@ +{ + "chart21_image_not_in_chart544_image": true, + "codes_requiring_no_new_late_receipt": 0, + "complete_top_codes": 512, + "hinge_history_rank": 12, + "linear_hinge_codes": 4096, + "possible_sender_and_counts": { + "21": 512 + }, + "rank1_late_senders": 111, + "scope": "fixed remaining native operations; one linear 2242 hinge; one linear 0->c->544 late rebind; full native preclock histories granted", + "source_sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "successful_nested_senders": 0, + "unique_ordered_4_plus_4_pair": [ + [ + 7112, + 2241, + 0, + 509 + ], + [ + 7210, + 2252, + 509, + 1 + ] + ] +} diff --git a/research/p104-balanced-fusion-residual/HINGE.json b/research/p104-balanced-fusion-residual/HINGE.json new file mode 100644 index 0000000000..16b9fa0e6d --- /dev/null +++ b/research/p104-balanced-fusion-residual/HINGE.json @@ -0,0 +1,28 @@ +{ + "all_linear_hinge_codes": 4096, + "candidate_late_rank1_senders": 111, + "hinge_fields": 12, + "incomparable_only_source": 21, + "missed_output": 130, + "nested_late_sender_solutions": 0, + "old_late_sender": 91, + "original_late_destination": 544, + "successful_linear_rank1_pairs_before_geometry": { + "21": 512 + }, + "terminal_sink_complete_codes": 512, + "unique_causal_pair": [ + [ + 7112, + 2241, + 0, + 509 + ], + [ + 7210, + 2252, + 509, + 1 + ] + ] +} diff --git a/research/p104-balanced-fusion-residual/INVOICE.json b/research/p104-balanced-fusion-residual/INVOICE.json new file mode 100644 index 0000000000..855f2b953a --- /dev/null +++ b/research/p104-balanced-fusion-residual/INVOICE.json @@ -0,0 +1,640 @@ +{ + "scope": "Hypothetical seven valid placements; unchanged other productive and paid labels, typed ownership, supplier admission and all inherited premises. No replacement word constructed.", + "target_kappa": "194523/50000000", + "trial_c": "140170034802279/36028797018963968", + "trial_c_decimal": "0.00389049999999999118749371973535744473338127136", + "replacement_placements": 7, + "raw_binary_original": { + "target_count": 18906, + "paid_count": 104904, + "target": { + "4": 612, + "8": 14520, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + }, + "paid": { + "1": 48972, + "2": 44892, + "3": 1980, + "4": 1512, + "5": 1044, + "6": 2916, + "7": 480, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + } + }, + "raw_binary_7": { + "target_count": 18906, + "paid_count": 104897, + "target": { + "4": 612, + "8": 14520, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + }, + "paid": { + "1": 48972, + "2": 44892, + "3": 1980, + "4": 1498, + "5": 1044, + "6": 2916, + "7": 480, + "8": 7, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + } + }, + "raw_positive_48": { + "target_count": 52608, + "paid_count": 281568, + "target": { + "1": 1008, + "2": 432, + "3": 480, + "4": 11568, + "5": 1584, + "6": 48, + "7": 672, + "8": 1584, + "9": 25872, + "17": 1248, + "25": 1248, + "33": 1248, + "41": 1248, + "49": 1248, + "57": 1248, + "65": 1248, + "129": 624 + }, + "paid": { + "1": 183312, + "2": 38016, + "3": 23040, + "4": 10848, + "5": 15072, + "6": 1968, + "7": 480, + "8": 1344, + "16": 1248, + "24": 1248, + "32": 1248, + "40": 1248, + "48": 1248, + "56": 1248 + } + }, + "binary_margin_target_6": { + "lower": "-9956318263859698612885159977375/2596148429267413814265248164610048", + "upper": "-9956318263859698612885155120495/2596148429267413814265248164610048", + "lower_decimal": "-0.00383503429604338599391466350209439563631224317", + "upper_decimal": "-0.00383503429604338599391466163129226997721662918" + }, + "binary_margin_target_7": { + "lower": "91349702457725306847691435757193/5192296858534827628530496329220096", + "upper": "91349702457725306847691445470947/5192296858534827628530496329220096", + "lower_decimal": "0.0175933127374197442542184207433311587479926304", + "upper_decimal": "0.0175933127374197442542184226141321288491216120" + }, + "binary_margin_target_36": { + "lower": "829489383258905431244520587850885/1298074214633706907132624082305024", + "upper": "51843086453681589452782536892455/81129638414606681695789005144064", + "lower_decimal": "0.639015376707850521450077863860672235892833964", + "upper_decimal": "0.639015376707850521450077865731439694812930607" + }, + "binary_margin_target_36_plus_one_rank1": { + "lower": "-468584831374801475888103494454139/1298074214633706907132624082305024", + "upper": "-29286551960925092243006468251609/81129638414606681695789005144064", + "lower_decimal": "-0.360984623292149478549922136139327764107166036", + "upper_decimal": "-0.360984623292149478549922134268560305187069393" + }, + "positive_margin_target": { + "lower": "1319398591656727126692672714447825/162259276829213363391578010288128", + "upper": "329849647914181781673168178795653/40564819207303340847894502572032", + "lower_decimal": "8.13142162001292090078575582992095365091000049", + "upper_decimal": "8.13142162001292090078575583444942816625868488" + }, + "six_derivative_magnitude_lower": "646578015044205636232515037903840164850899249915640734943330138859239581/1684996666696914987166688442938726917102321526408785780068975640576", + "all36_plus_repair_derivative_magnitude_lower": "2585206628148234355505611316774543830390796574840724223278972087148806869/6739986666787659948666753771754907668409286105635143120275902562304", + "strict_split_weight": "1/64", + "strict_surplus_floor_e18": 2241853533970, + "strict_required": "1/70368744177664", + "bit_checker": { + "raw_productive": 18906, + "raw_paid": 104897, + "productive": { + "4": 612, + "8": 14520, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + }, + "paid": { + "1": 48972, + "2": 44892, + "3": 1980, + "4": 1498, + "5": 1044, + "6": 2916, + "7": 480, + "8": 7, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + }, + "surplus_lower_units_1e12": 2241853 + }, + "positive_checker": { + "raw_productive": 52608, + "raw_paid": 281568, + "productive": { + "1": 1008, + "2": 432, + "3": 480, + "4": 11568, + "5": 1584, + "6": 48, + "7": 672, + "8": 1584, + "9": 25872, + "17": 1248, + "25": 1248, + "33": 1248, + "41": 1248, + "49": 1248, + "57": 1248, + "65": 1248, + "129": 624 + }, + "paid": { + "1": 183312, + "2": 38016, + "3": 23040, + "4": 10848, + "5": 15072, + "6": 1968, + "7": 480, + "8": 1344, + "16": 1248, + "24": 1248, + "32": 1248, + "40": 1248, + "48": 1248, + "56": 1248 + }, + "surplus_lower_units_1e12": 214245636 + }, + "strict_268_surplus_floor_e18": 2108128556528, + "strict_268_required": "1/562949953421312", + "bit_checker_268": { + "raw_productive": 18906, + "raw_paid": 104897, + "productive": { + "4": 612, + "8": 14520, + "15": 444, + "22": 444, + "29": 444, + "36": 444, + "43": 444, + "50": 444, + "57": 444, + "64": 444, + "127": 222 + }, + "paid": { + "1": 48972, + "2": 44892, + "3": 1980, + "4": 1498, + "5": 1044, + "6": 2916, + "7": 480, + "8": 7, + "14": 444, + "21": 444, + "28": 444, + "35": 444, + "42": 444, + "49": 444, + "56": 444 + }, + "surplus_lower_units_1e12": 2108128 + }, + "profiles": { + "target": { + "kappa": "194523/50000000", + "kappa_decimal": "0.00389046", + "gap": "1/100000000000000", + "binary_debit": 22, + "numeric_debit": 10, + "ordinary": "19452499/5000000000", + "positive_cap": "1274827/327680000", + "positive_cap_decimal": "0.0038904632568359375", + "signed": { + "strict": 54, + "functional": 4, + "smallest_margin": "1/1000000000000000", + "ordinary_margin": "994999/25000000000000", + "positive_margin": "2084343/640000000000000" + }, + "stages": [ + { + "height": 25000000, + "covered": "54741534945664965511/14073748835532800000000", + "rate": "387406151999999/100000000000000000", + "limit": "13630642201470576412239/3518437208883200000000000", + "margin": "67221048263/54975581388800000000000000000" + }, + { + "height": 160000000, + "covered": "10950396940835069723/2814749767106560000000", + "rate": "389029729607999/100000000000000000", + "limit": "26733919453409265807764389931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 1000000000, + "covered": "273768051110829263267/70368744177664000000000", + "rate": "389047727718431/100000000000000000", + "limit": "26735156274140389590674341931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 6000000000, + "covered": "821308023613417561321/211106232532992000000000", + "rate": "3890496257108727/1000000000000000000", + "limit": "26735286703187834021805981739/6871947673600000000000000000000", + "margin": "10051898474539/6871947673600000000000000000000" + }, + { + "height": 36000000000, + "covered": "2463926005980717569723/633318697598976000000000", + "rate": "1945249688180879/500000000000000000", + "limit": "401029622077971656717508903557/103079215104000000000000000000000", + "margin": "150915916071557/103079215104000000000000000000000" + }, + { + "height": 224000000000, + "covered": "1916387146183896580981/492581209243648000000000", + "rate": "19452499/5000000000", + "limit": "935735910717109730143215257057/240518168576000000000000000000000", + "margin": "23975815445343215257057/240518168576000000000000000000000" + } + ], + "stock": { + "kappa": "194523/50000000", + "binary_rank_logs": [ + 25000000, + 160000000, + 1000000000, + 6000000000, + 36000000000, + 224000000000 + ], + "complex_rank_log": 1600000, + "binary_entrance_logs": [ + 25100466, + 185100530, + 1185100594, + 7185100658, + 43185100722, + 267185100786 + ], + "full_binary_debit": 22, + "full_positive_debit": 10, + "ordinary_rate": "19452499/5000000000", + "component_exponent": "39/10000", + "rate_ticks_e18": [ + 3874061519999990, + 3890297296079990, + 3890477277184310, + 3890496257108727, + 3890499376361758, + 3890499800000000 + ], + "log2_dominant_J": 229376000000000, + "log2_all_fixed_setup_upper": 229376000000003, + "log2_rank_part_of_recurring_envelope": 22937600000000000, + "log2_sufficient_public_precision": 267186701153, + "initial_s": 267186701154, + "raw_structural_nodes_log2_upper": 8623, + "native_volume_log2_upper": 65536, + "positive_context_cost_bitlength_upper": 58, + "native_depth_bound_at_entrance": 179693, + "stripe_excess_log_at_entrance": 23553048700, + "stripe_margin_at_entrance": 110040301875, + "uniform_payload_slope": "10845256/123046875", + "all_size_margin_lower_at_entrance": 101690271157, + "linear_geometry": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 136799590992128, + "log2_axis_count": 267186701103, + "largest_axis_width": 187649984473771, + "private_clock_log2_upper": 192427450469892962, + "actual_dense_root_entry_log2": 375299968947542 + }, + "prior_geometry_at_same_n": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 4568878929507641915629824, + "log2_axis_count": 267186701068, + "largest_axis_width": 6447604371278022265099606, + "private_clock_log2_upper": 74856512381613536270378598400, + "actual_dense_root_entry_log2": 12895208742556044530199212 + } + } + }, + "target_268": { + "kappa": "194523/50000000", + "kappa_decimal": "0.00389046", + "gap": "1/100000000000000", + "binary_debit": 21, + "numeric_debit": 10, + "ordinary": "19452499/5000000000", + "positive_cap": "1274827/327680000", + "positive_cap_decimal": "0.0038904632568359375", + "signed": { + "strict": 54, + "functional": 4, + "smallest_margin": "1/1000000000000000", + "ordinary_margin": "994999/25000000000000", + "positive_margin": "2084343/640000000000000" + }, + "stages": [ + { + "height": 25000000, + "covered": "54742097895618386823/14073748835532800000000", + "rate": "387410135999999/100000000000000000", + "limit": "13630782376008978318927/3518437208883200000000000", + "margin": "67221048263/54975581388800000000000000000" + }, + { + "height": 160000000, + "covered": "10950414533021114139/2814749767106560000000", + "rate": "389030368043999/100000000000000000", + "limit": "26733963326397115232660389931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 1000000000, + "covered": "273768121479573440931/70368744177664000000000", + "rate": "15561913194887/4000000000000000", + "limit": "26735163294092223893973925931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 6000000000, + "covered": "273769352932596550051/70368744177664000000000", + "rate": "3890496427194877/1000000000000000000", + "limit": "1069411514880438207064767203/274877906944000000000000000000", + "margin": "67221048263/54975581388800000000000000000" + }, + { + "height": 36000000000, + "covered": "821308674524301204713/211106232532992000000000", + "rate": "3890499404708769/1000000000000000000", + "limit": "133676541666653109543251247319/34359738368000000000000000000000", + "margin": "59467902255319/34359738368000000000000000000000" + }, + { + "height": 224000000000, + "covered": "273769592626131405219/70368744177664000000000", + "rate": "19452499/5000000000", + "limit": "133676558830546924504072880343/34359738368000000000000000000000", + "margin": "3581790598104072880343/34359738368000000000000000000000" + } + ], + "stock": { + "kappa": "194523/50000000", + "binary_rank_logs": [ + 25000000, + 160000000, + 1000000000, + 6000000000, + 36000000000, + 224000000000 + ], + "complex_rank_log": 1600000, + "binary_entrance_logs": [ + 25100466, + 185100530, + 1185100594, + 7185100658, + 43185100722, + 267185100786 + ], + "full_binary_debit": 21, + "full_positive_debit": 10, + "ordinary_rate": "19452499/5000000000", + "component_exponent": "39/10000", + "rate_ticks_e18": [ + 3874101359999990, + 3890303680439990, + 3890478298721750, + 3890496427194877, + 3890499404708769, + 3890499800000000 + ], + "log2_dominant_J": 229376000000000, + "log2_all_fixed_setup_upper": 229376000000003, + "log2_rank_part_of_recurring_envelope": 22937600000000000, + "log2_sufficient_public_precision": 267186701153, + "initial_s": 267186701154, + "raw_structural_nodes_log2_upper": 8113, + "native_volume_log2_upper": 65536, + "positive_context_cost_bitlength_upper": 58, + "native_depth_bound_at_entrance": 179693, + "stripe_excess_log_at_entrance": 23553048700, + "stripe_margin_at_entrance": 110040301875, + "uniform_payload_slope": "10845256/123046875", + "all_size_margin_lower_at_entrance": 101690271157, + "linear_geometry": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 136799590992128, + "log2_axis_count": 267186701103, + "largest_axis_width": 187649984473771, + "private_clock_log2_upper": 192427450469892962, + "actual_dense_root_entry_log2": 375299968947542 + }, + "prior_geometry_at_same_n": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 4568878929507641915629824, + "log2_axis_count": 267186701068, + "largest_axis_width": 6447604371278022265099606, + "private_clock_log2_upper": 74856512381613536270378598400, + "actual_dense_root_entry_log2": 12895208742556044530199212 + } + } + }, + "near_positive_cap": { + "kappa": "3890463256835937/1000000000000000000", + "kappa_decimal": "0.003890463256835937", + "gap": "1/100000000000000000000", + "binary_debit": 22, + "numeric_debit": 10, + "ordinary": "19452499/5000000000", + "positive_cap": "1274827/327680000", + "positive_cap_decimal": "0.0038904632568359375", + "signed": { + "strict": 54, + "functional": 4, + "smallest_margin": "1/1000000000000000000000", + "ordinary_margin": "456789550787/12500000000000000000", + "positive_margin": "9/20000000000000000000" + }, + "stages": [ + { + "height": 25000000, + "covered": "54741534945664965511/14073748835532800000000", + "rate": "387406151999999/100000000000000000", + "limit": "13630642201470576412239/3518437208883200000000000", + "margin": "67221048263/54975581388800000000000000000" + }, + { + "height": 160000000, + "covered": "10950396940835069723/2814749767106560000000", + "rate": "389029729607999/100000000000000000", + "limit": "26733919453409265807764389931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 1000000000, + "covered": "273768051110829263267/70368744177664000000000", + "rate": "389047727718431/100000000000000000", + "limit": "26735156274140389590674341931/6871947673600000000000000000000", + "margin": "8127753125931/6871947673600000000000000000000" + }, + { + "height": 6000000000, + "covered": "821308023613417561321/211106232532992000000000", + "rate": "3890496257108727/1000000000000000000", + "limit": "26735286703187834021805981739/6871947673600000000000000000000", + "margin": "10051898474539/6871947673600000000000000000000" + }, + { + "height": 36000000000, + "covered": "2463926005980717569723/633318697598976000000000", + "rate": "1945249688180879/500000000000000000", + "limit": "401029622077971656717508903557/103079215104000000000000000000000", + "margin": "150915916071557/103079215104000000000000000000000" + }, + { + "height": 224000000000, + "covered": "1916387146183896580981/492581209243648000000000", + "rate": "19452499/5000000000", + "limit": "935735910717109730143215257057/240518168576000000000000000000000", + "margin": "23975815445343215257057/240518168576000000000000000000000" + } + ], + "stock": { + "kappa": "3890463256835937/1000000000000000000", + "binary_rank_logs": [ + 25000000, + 160000000, + 1000000000, + 6000000000, + 36000000000, + 224000000000 + ], + "complex_rank_log": 1600000, + "binary_entrance_logs": [ + 25100466, + 185100530, + 1185100594, + 7185100658, + 43185100722, + 267185100786 + ], + "full_binary_debit": 22, + "full_positive_debit": 10, + "ordinary_rate": "19452499/5000000000", + "component_exponent": "39/10000", + "rate_ticks_e18": [ + 3874061519999990, + 3890297296079990, + 3890477277184310, + 3890496257108727, + 3890499376361758, + 3890499800000000 + ], + "log2_dominant_J": 229376000000000, + "log2_all_fixed_setup_upper": 229376000000003, + "log2_rank_part_of_recurring_envelope": 22937600000000000, + "log2_sufficient_public_precision": 267186701153, + "initial_s": 267186701154, + "raw_structural_nodes_log2_upper": 8623, + "native_volume_log2_upper": 65536, + "positive_context_cost_bitlength_upper": 58, + "native_depth_bound_at_entrance": 179693, + "stripe_excess_log_at_entrance": 23553048700, + "stripe_margin_at_entrance": 110040301875, + "uniform_payload_slope": "10845256/123046875", + "all_size_margin_lower_at_entrance": 101690271157, + "linear_geometry": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 136799590992128, + "log2_axis_count": 267186701103, + "largest_axis_width": 187649984473771, + "private_clock_log2_upper": 192427450469892962, + "actual_dense_root_entry_log2": 375299968947542 + }, + "prior_geometry_at_same_n": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -267186701149, + "last_extent_bits_minus_b": -267186701148, + "minimum_width": 4568878929507641915629824, + "log2_axis_count": 267186701068, + "largest_axis_width": 6447604371278022265099606, + "private_clock_log2_upper": 74856512381613536270378598400, + "actual_dense_root_entry_log2": 12895208742556044530199212 + } + } + } + } +} diff --git a/research/p104-balanced-fusion-residual/LICENSE b/research/p104-balanced-fusion-residual/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-balanced-fusion-residual/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/p104-balanced-fusion-residual/NOTICE.md b/research/p104-balanced-fusion-residual/NOTICE.md new file mode 100644 index 0000000000..7db5cb0953 --- /dev/null +++ b/research/p104-balanced-fusion-residual/NOTICE.md @@ -0,0 +1,5 @@ +# Attribution and retained material + +Ali Romman supplied the #8027 source graph and physical supplier. The original graph, paired caller and #8041 directed price reader are retained as byte-pinned inputs; #8030's predecessor archive and the #8035 overlay are retained to execute the conditional numerical calculation offline. Their original notices and lineage are retained in the archive and [PARENT-NOTICE](PARENT-NOTICE). Earlier discrete-curvature and contact-count work remains credited to #8043. + +Clear1nsight prepared this balanced-fusion construction and its source-bound checks with substantial OpenAI Codex assistance. Distinct AI-assisted reviewers implemented the frozen-word, caller diagonal, hinge, fixed-slot and numerical checks; none is an independent human or proof-kernel review. Apache-2.0; see [LICENSE](LICENSE). diff --git a/research/p104-balanced-fusion-residual/ONE-RESIDUAL-RESULT.json b/research/p104-balanced-fusion-residual/ONE-RESIDUAL-RESULT.json new file mode 100644 index 0000000000..e9ebdca27e --- /dev/null +++ b/research/p104-balanced-fusion-residual/ONE-RESIDUAL-RESULT.json @@ -0,0 +1,26 @@ +{ + "changed_clear_owners": [ + 2241, + 2242, + 2252, + 2477, + 2898, + 3317, + 3318 + ], + "changed_dirty_clear_fields": 7, + "changed_expanded_sha256": "3cd1dd12039550bc0deecadcdb3074123598cd41cd41e94e0fb43451411ecb96", + "corrupt_last_add_rejected": true, + "error_row": 130, + "instructions": 39605, + "native_instructions": 39600, + "nonzero_clears": 3433, + "other_rows_exact": true, + "private_clears": 3433, + "residual_support": [ + 38 + ], + "reverse_transpose_exact": true, + "source_program_sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "target_rows_exact": 629 +} diff --git a/research/p104-balanced-fusion-residual/PARENT-NOTICE b/research/p104-balanced-fusion-residual/PARENT-NOTICE new file mode 100644 index 0000000000..fe51894a1a --- /dev/null +++ b/research/p104-balanced-fusion-residual/PARENT-NOTICE @@ -0,0 +1,31 @@ +Mixed paid cutoffs for the P104 ordinary BIT supplier + +Prepared for Clear1nsight with substantial OpenAI Codex assistance. The +new schedule, directed comparison, occurrence controls, and documentation +are offered under Apache-2.0. + +verify.py adapts the Apache-2.0 verifiers from Dugongue's PR #7831 +(2d1fb9c878ae1e292cb918de40fa8e4f7fa7f75e) and Rohan Arun's PR #7835 +(43007c979859fa84ccc3a3509ccacc9620d181fa). Rohan Arun submitted #7835 +through the original X request at +https://x.com/RohanArun/status/2123655584797143516. The source manifest +retains the published #7835 NOTICE. + +Retained predecessor NOTICE from the grade-14 package follows. + +Iterated returns on the P104 ordinary suppliers + +Clear1nsight prepared the successor construction, explicit witnesses and verification +with substantial OpenAI Codex assistance, including independent computational checks. +The new material is offered under Apache-2.0. + +The exact starting words and the rational and binary replay interfaces are from +Clear1nsight's PR #7781. The paid and productive scalar operations, the 48-call +complex schedule, the punctured binary supplier and the common outer application +come from Ali Romman's PR #7776. The two paid projections build on the local +quotient and terminal repair in #7774 and #7781. The binary paired caller and +finite compiler use work by DreamingOfClouds, Jerry Chen (CubeJerry), zxv and the +contributors cited in their retained sources. SYLforge, Rohan Arun, Cinna Davis, +Douglas Colkitt and other predecessors contributed the caller, physical and +analytic framework. The source-fetch helper is adapted from #7774. The immutable +source manifest identifies the public inputs and their notices. diff --git a/research/p104-balanced-fusion-residual/README.md b/research/p104-balanced-fusion-residual/README.md new file mode 100644 index 0000000000..e7ff498996 --- /dev/null +++ b/research/p104-balanced-fusion-residual/README.md @@ -0,0 +1,77 @@ +# The balanced fusion leaves a noncancelling caller residual + +[Full research paper](manuscript/ARTICLE.md). + +The frozen 4+4→8 fusion removes one paid contact from the #8027 binary graph, but its literal normalized word has one public error: **output 130 gains input 38**. All other 629 public rows and all public chart placements match; the changed `630 × 630` map remains invertible. In the original 36-call paired BIT caller, none of the `2^36−1` nonempty subsets of this **same literal word** cancels the error on the constant-binary-field subclass of the source contract. This is a proof by 36 independent error matrices, not a brute-force enumeration. No valid replacement or κ improvement is claimed. + +The printed trial `κ = 0.00389046` is numerically reachable **if** seven correct, physically admitted substitutions with the same paid and productive labels existed. The exact word here is not one. The result does not exclude a different reconstruction or coordinated repair with different caller effects. + +## Literal fusion and independent full-row replay + +The original contacts are `0 → 509` at native clock 7112 and `509 → 1` at 7210, each of grade four. The candidate sends helper 626 directly `0 → 1` at grade eight, substitutes an available hinge field, removes one late ADD, and performs a chart-1 owner SWAP and six explicit ADD repairs. [candidate.py](candidate.py) reconstructs the complete word; its 39,605 instructions are frozen in [ONE-RESIDUAL.json.gz](pinned/ONE-RESIDUAL.json.gz). The sole error is + +``` +output[130] = native_output[130] XOR input[38] + = y[19] XOR x[19] XOR x[38]. +``` + +The paid histogram trades two grade-four MOVEs for one grade-eight MOVE; all other ordered MOVE incidences are retained. An independent interpreter checks all 630 symbolic rows, reconstructs the `F₂` transpose independently, confirms the two altered paid endpoints and all public charts, and verifies an omitted final correction corrupts output 87. The changed map has rank 630; invertibility is not equality with the required map. In a separate fixed-history control, changing only inputs 19 and 38 leaves all four chart-544 arrivals unchanged while flipping the desired row 130, so no arbitrary decoder of that fixed history repairs it. See [CANDIDATE-AUDIT.json](CANDIDATE-AUDIT.json). + +All 3,433 private CLEARs remain at their original charts and have symbolically nonzero values. Exactly seven clear expressions change: owners `2241, 2242, 2252, 2477, 2898, 3317, 3318`. Full old and new input supports are in [constant_composition.json](constant_composition.json). These are normalized data-deletion records; a physical erasure, owner-lifetime, arbitrary-field adjoint, compiler or paired-caller implementation has not been established. The transposed replay is a matrix check over `F₂`, not a physical reverse execution. + +## No cancellation across the 36 literal placements + +The pinned paired caller has stages `s=1,…,18` and two lanes, with base `b=0` or `19`. The local defect reads port 38 and changes port 19. On constant binary fields the unchanged caller acts independently on the ports. Prefix and independent reverse-suffix replays derive the same 38-role form `v = e_b + e_(b+s)` for a placement. Its full error matrix from port-38 inputs to port-19 outputs is + +``` +E_(b,s) = v vᵀ. +``` + +Errors superpose because the extra shear reads port 38 and only changes port 19. Each `E_(b,s)` has a diagonal at `(b+s,b+s)` occurring in no other placement. For any nonempty selected subset, choose one selected `(b,s)`, set only source `(root,b+s,38)` to one, and all other source fields to zero: output `(root,b+s,19)` is wrong. The 36 matrices consequently have rank 36, and no nonempty subset cancels. A control deliberately duplicates one matrix, drops the rank to 35, and is rejected. + +[constant_composition.py](constant_composition.py) checks the local source and literal candidate, all **4,218** independent root variables in forward and reverse passes for each of 36 placements, and four multi-placement controls. The 14,688 unchanged helpers form identity blocks because the exact local graph preserves their endpoint rows. [caller_dual_check.py](caller_dual_check.py) independently derives the 36 prefix/suffix witnesses. This is a counterexample on allowed constant binary address fields, not a proof that a particular top-level integer operand reaches that assignment or a replay of arbitrary address fields. See [CALLER-PROOF.md](CALLER-PROOF.md). + +For the inherited 268-factor, floor-15 source, use 267 retained rank-127 factors and one first factor. The exact inequality `4·127^267 > 15^268` retains all of the smallest first-factor target, so the constant-field witness survives the stated truncation. This is a source-service-domain statement; it does not establish physical reverse execution or top-level operand reachability. + +## Bounded repair screens + +Under a fixed remaining tape, a single linear hinge correction and one linear `0 → c → 544` late rebind at the existing clocks, the 12-field hinge has 4,096 linear codes; 512 restore all top outputs. Testing all 111 rank-one sender charts with free preclock histories finds only chart 21 algebraically capable of the needed late field, and its image is incomparable with chart 544, so the required nested transfer is illegal. A separate low-pivot implementation reproduces the result and exact rational image test. This does not exclude nonlinear, multiple-slot, retimed or other upstream changes. [BALANCED.md](BALANCED.md) and [HINGE-AUDIT.json](HINGE-AUDIT.json) state the contract. + +On the frozen defective word, a separate linear fixed-tape screen gives the sender and each terminal their full historical stocks. One source-local recoding at any of the four chart-544 ingress contacts or its existing `0 → 91` feeder fails. For the existing `509 → 0` return, making input 38 recoverable at chart zero conflicts with preserving a required chart-525 output: the same sender coefficient parity must be both one and zero. These are individual-slot results, not an exclusion of coordinated changes. The checker includes 200 small models, exhaustively comparing all 16 perturbations and 16 targets in each; see [SECOND-SLOT.md](SECOND-SLOT.md) and [SECOND-SLOT.txt](SECOND-SLOT.txt). + +## Counterfactual whole-caller price and repair budget + +The following numbers **assume** valid `4+4→8` substitutions while leaving every other original target, paid label, owner contract and positive supplier unchanged. They price a histogram; they do not install or certify the defective word. At `κ=0.00389046`, the exact local saving is in `[0.021428347033463130, 0.021428347033463131]`. + +| Hypothetical substitutions among 36 | Raw target minus paid at trial | +| --- | ---: | +| 6 | about −0.003835034296043386 | +| 7 | about +0.017593312737419744 | +| 36 | about +0.639015376707851 | +| 36 plus one extra grade-one paid contact | about −0.360984623292149 | + +The saving is positive per substitution, and a nonzero paid contact of integral grade at least one costs at least the grade-one term. Even the optimistic 36-substitution histogram therefore cannot pay **one additional grade-one or higher contact** at the trial, when no other paid or productive labels change. This leaves free or grade-neutral repairs and changed wider invoices open; it is not a theorem against every reconstruction. Directed intervals and monotonicity checks are in [INVOICE.json](INVOICE.json). + +For the seven-substitution **IF** profile, the 268-factor split tariff at `L=2^50` has binary/positive debits `21/10` and directed normalized surplus at least `0.000002108128556528`, exceeding `2/L`. Its six-stage ranks are `(25,000,000, 160,000,000, 1,000,000,000, 6,000,000,000, 36,000,000,000, 224,000,000,000)`; the positive log rank is 1,600,000. The checked signed trial uses ordinary rate `0.0038904998`, gap `10^-14`, positive cap `0.0038904632568359375`, and records **54 strict and four functional gates**. The separate `v=285`, `L=2^47` profile has debits `22/10` and directed surplus at least `0.000002241853533970`, also above `2/L`. The 48-call positive raw margin at the trial is approximately `+8.1314216200`. Both profiles retain all five #8035 all-size premises: all-column native action, owned erasure and restoration, compiler transfer, precision and tape services, and analytic recovery. Those premises and the valid substitutions are not established here; the astronomical production tapes were not executed. + +## Source and verification + +The original graph is from [#8027](https://github.com/CrocSwap/integer-mult-bounds/pull/8027) at `fb9b6a7b0d27da1cf98430893a3016bf811e2aa4`; its gzip SHA-256 is `74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326`. The candidate gzip SHA-256 is `7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7`. The caller and #8041 price reader are pinned in [SOURCES.json](SOURCES.json). The invoice replay restores the 91-member #8030 archive at tree `3a1c001cbf175ae48ee1d56e56e4723eda1c8218`, validates each file and tree ID, and applies the byte-pinned #8035 overlay at `ea776471bf8ed143a0625cf2d7532f65d15eb5f9`; its output was also compared on the later extended machine. The predecessor archive is retained because its actual arithmetic and source readers are needed for offline replay. + +[#8043](https://github.com/CrocSwap/integer-mult-bounds/pull/8043), head `ab3680a3e56ff247fef2a76ad9110d571f19ef0d`, contains the earlier discrete-curvature and contact-count work; this package studies the literal candidate, its caller error, bounded repairs and a conditional signed invoice. The local parent `0618e75a22cec54d1651394ef83d088551b7f026` is the separate five-file CI prerequisite on canonical `e54523517d0f03e58352e647c403a5af3e525a57`. Vendored-byte checks do not establish that the unmerged external PR heads are ancestors of this package. + +Using Python 3.12 and only the standard library, from the repository root: + +```sh +python3.12 -I -B scripts/research_package.py --package research/p104-balanced-fusion-residual --check-only +python3.12 -I -B scripts/research_package.py --package research/p104-balanced-fusion-residual +``` + +The registered replay authenticates its checked code and bytes; regenerates the literal graph; independently checks its rows, transpose and collision; reproduces both caller proofs and the dependent-matrix mutation; recomputes both hinge screens and the fixed-slot controls; and restores the offline numerical engine to reproduce the raw, 268-factor, 285-factor and signed IF receipt. It also rejects altered source bytes and an actually omitted correction. These AI-assisted computations are evidence for review, not independent human or proof-kernel acceptance. + +## Open next questions + +- Can a different set of local and later edits remove the cross-port residual while preserving all 630 rows, clear semantics and typed public endpoints? Start from the explicit chart-544 collision and price the complete changed program. No all-input repair is supplied. +- Can a valid, fully physical supplier achieve the favorable counterfactual invoice without adding paid grade? Bind the exact paired caller, source service, all private erasures and five all-size premises, then recompute every signed gate. The printed trial remains conditional and unachieved by this word. + +Ali Romman supplied the #8027 graph and physical supplier. Clear1nsight prepared the fusion, caller proof and controls with substantial OpenAI Codex assistance; see [PARENT-NOTICE](PARENT-NOTICE), [NOTICE.md](NOTICE.md), and [LICENSE](LICENSE) for predecessor and pricing credit. diff --git a/research/p104-balanced-fusion-residual/SECOND-SLOT.md b/research/p104-balanced-fusion-residual/SECOND-SLOT.md new file mode 100644 index 0000000000..abda62fb9b --- /dev/null +++ b/research/p104-balanced-fusion-residual/SECOND-SLOT.md @@ -0,0 +1,66 @@ +# Fixed-word second-slot screen + +`pinned/ONE-RESIDUAL.json.gz` is the frozen 4+4→8 balanced-fusion graph prepared +by the companion investigation. Its SHA-256 is +`7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7`. +The checker independently executes its 39,605 instructions with 630-bit +input masks: all original charts and 3,433 private clear records remain, +629 outputs are exact, and output 130 has only input `x38` as an extra. +This packet does not itself prove that the graph is the admissible physical +supplier or compare the expanded graph to its native predecessor. + +Run `python3.12 -I -B second_slot.py`. The verifier tests five already-paid MOVE +sites on this exact tape. At one site at a time, it allows the sent field +to be XORed with any linear combination of all preclock fields at the +same sender, including freely retained sender history. Every terminal +decoder may combine its entire received history for free. The subsequent +tape, clocks, destinations and all other moves are fixed. It checks every +one of the 630 required native output rows. Thus failure under these generous +side information allowances excludes any such source-local single-site +linear repair; it does not exclude changed histories, another contact, +coordinated paid recodings, changed endpoints, nonlinear strategies, or +different output locations. + +| Field | Frozen index | Source → destination | Result | +|---:|---:|---|---| +| 2472 | 8635 | 380 → 544 | no solution; core includes chart-1 owner 22 | +| 2475 | 8647 | 381 → 544 | no solution; core includes chart-1 owner 275 | +| 2477 | 8655 | 382 → 544 | no solution; two conflicting parity equations | +| 3318 | 21258 | 91 → 544 | no solution; two conflicting parity equations | +| 3317 | 21254 | 0 → 91 | no solution under the same fixed-tape template | + +These are the four literal chart-544 ingresses and the final 0→91 feeder. +`slot_solver.py FIELD --historical` emits each equation core and the +source registers or historical fields in that equation. + +The separate `sponsor_solver.py` studies the tempting frozen index 11012 +509→0 return of field 3150. It permits an arbitrary linear recoding from +all live and historical source fields, then asks whether `x38` can be +reconstructed from chart 0's complete live and retained state before its +0→91 send, while native output 111 remains linearly decodable from all +chart-525 history. Both requirements constrain the same source coefficient +parity for live fields 3149, 3150 and source `history-12`: the first +requires 1 and the second 0. The solver tests the other unaffected +terminal outputs as well, but those are not needed for this two-equation +contradiction. This does not rule out repairing chart 544 without first +reconstructing `x38` at chart 0, or changing subsequent paid contacts. + +## Why the screen is exact for its template + +Inject a formal marker at the selected paid field and replay the fixed +tape on complete input masks. After substituting a sender-local linear form +`q` for the marker, each observation at a chart is `b_j + a_j q`, where +`a_j` is 0 or 1. Let `H0` be the span of all `b_j` with `a_j=0` and all +`b_j+b_*` with `a_j=1`, for any marked observation `b_*`. A desired row +is linearly decodable exactly when it belongs to `H0` or +`b_*+q+H0`. Expressing `q` in the source's available-field basis converts +the latter condition to exact binary linear equations on its coefficients. +The program prints contradictory equations when that system is +inconsistent. `second_slot.py` validates the marked-history identity on 200 +deterministic four-input examples against all 16 possible `q` values and +all 16 targets, including duplicates and zero observations. + +These are locally generated checks, not an independent scientific review. +The hypothetical 4+4→8 price gain and the seven-placement invoice have +separate evidence; this packet establishes neither a complete operator +repair nor a new κ bound. diff --git a/research/p104-balanced-fusion-residual/SECOND-SLOT.txt b/research/p104-balanced-fusion-residual/SECOND-SLOT.txt new file mode 100644 index 0000000000..90e4bd76fe --- /dev/null +++ b/research/p104-balanced-fusion-residual/SECOND-SLOT.txt @@ -0,0 +1,76 @@ +{ + "error_support": [ + 38 + ], + "feedback_conflicting_forms": [ + [ + 3149, + 3150, + "history-12" + ], + [ + 3149, + 3150, + "history-12" + ] + ], + "feedback_required_bits": [ + 1, + 0 + ], + "feedback_site": [ + 11012, + 3150, + 509, + 0 + ], + "native_rows": 629, + "retained_private_clears": 3433, + "scope": "frozen subsequent tape; one linear sender recoding and arbitrary linear terminal decoding with free histories", + "single_incorrect_owner": 130, + "single_slot_screens": [ + { + "core": "CORE [(1, 22, 22), (544, 130, 3), (544, 130, 38)]", + "destination": 544, + "field": 2472, + "index": 8635, + "solver": "SITE (8635, 2472, 380, 544) SOURCE_LIVE 7 EQUATIONS 48 RANK 3 CONFLICTS 1", + "source": 380 + }, + { + "core": "CORE [(1, 275, 275), (544, 130, 1), (544, 130, 38)]", + "destination": 544, + "field": 2475, + "index": 8647, + "solver": "SITE (8647, 2475, 381, 544) SOURCE_LIVE 5 EQUATIONS 24 RANK 2 CONFLICTS 1", + "source": 381 + }, + { + "core": "CORE [(544, 130, 19), (544, 130, 38)]", + "destination": 544, + "field": 2477, + "index": 8655, + "solver": "SITE (8655, 2477, 382, 544) SOURCE_LIVE 7 EQUATIONS 30 RANK 3 CONFLICTS 1", + "source": 382 + }, + { + "core": "CORE [(544, 130, 19), (544, 130, 38)]", + "destination": 544, + "field": 3318, + "index": 21258, + "solver": "SITE (21258, 3318, 91, 544) SOURCE_LIVE 9 EQUATIONS 6 RANK 4 CONFLICTS 1", + "source": 91 + }, + { + "core": "CORE [(544, 130, 10), (544, 130, 14), (544, 130, 19), (544, 130, 2), (544, 130, 3), (544, 130, 30), (544, 130, 38), (544, 130, 4), (544, 130, 8), (544, 130, 9)]", + "destination": 91, + "field": 3317, + "index": 21254, + "solver": "SITE (21254, 3317, 0, 91) SOURCE_LIVE 1051 EQUATIONS 624 RANK 525 CONFLICTS 1", + "source": 0 + } + ], + "source_compressed_sha256": "7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7", + "source_expanded_sha256": "3cd1dd12039550bc0deecadcdb3074123598cd41cd41e94e0fb43451411ecb96" +} +PASS_FROZEN_BALANCED_FUSION_SECOND_SLOT_SCREENS diff --git a/research/p104-balanced-fusion-residual/SOURCES.json b/research/p104-balanced-fusion-residual/SOURCES.json new file mode 100644 index 0000000000..cfc3c55553 --- /dev/null +++ b/research/p104-balanced-fusion-residual/SOURCES.json @@ -0,0 +1,142 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "usage": "provenance", + "git_blob": "f022272a8d51ede841778dec76e2bfb24b614d04", + "sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b" + } + ], + "vendored_graph": { + "repository": "https://github.com/aliromman/integer-mult-bounds", + "pull_request": 8027, + "head": "fb9b6a7b0d27da1cf98430893a3016bf811e2aa4", + "path": "research/p104-live-relative-gain/BINARY-CANDIDATE.json.gz", + "local_path": "pinned/strong-bit.json.gz", + "git_blob": "16f8cafb1c4d139a99a62e46eb40c118e6176c34", + "sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "expanded_sha256": "b096d6df2a0c4688296b13ab0cfd50fec1c7dec732819c624ddd7a745a144b69", + "provenance_note": "External PR bytes are vendored unchanged and checked by blob and SHA-256; this package does not contain full source Git history." + }, + "mathematical_dependencies": [ + { + "pr": 8027, + "head": "fb9b6a7b0d27da1cf98430893a3016bf811e2aa4", + "use": "literal source graph, frames, public endpoints and normalized target" + }, + { + "pr": 8041, + "head": "05f6172d4d9487090fa24c75137a7c60e6fcd67e", + "use": "source provenance and prior relay diagnostic; its copy of the graph is byte-identical" + }, + { + "pr": 8035, + "head": "ea776471bf8ed143a0625cf2d7532f65d15eb5f9", + "use": "conditional positive inventory and signed outer-gate profile; physical replay not rerun here" + }, + { + "pr": 8033, + "head": "a1313ff9f84fd00d50b282fe432e522191277821", + "use": "inherited 268-factor numerical scheduling profile" + }, + { + "pr": 8030, + "head": "6285dd829114705862e8d91facaedc1f31d3cfcb", + "use": "original predecessor package restored by byte- and tree-verified archive, then patched through the exact #8035 overlay" + }, + { + "pr": 8043, + "head": "ab3680a3e56ff247fef2a76ad9110d571f19ef0d", + "previous_head": "fa470006d8e69d1ad4bda7e3fad1d64f0ebd1ca9", + "use": "earlier discrete curvature and pair-count context; not re-proved as a result here" + } + ], + "ci_prerequisite": { + "commit": "0618e75a22cec54d1651394ef83d088551b7f026", + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "description": "Separate five-file selected-CI guide and historical replay prerequisite; not part of the mathematical proof." + }, + "vendored_caller": { + "repository": "https://github.com/CrocSwap/integer-mult-bounds", + "head": "e54523517d0f03e58352e647c403a5af3e525a57", + "path": "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "local_path": "pinned/EFREE-CALLER.json.gz", + "git_blob": "f022272a8d51ede841778dec76e2bfb24b614d04", + "sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b", + "expanded_sha256": "01e555561e846caaa9bbeb0a6cb95d07dd7edfc4bb3f7ad97e237ece194e38a0", + "use": "Reconstructs the arithmetic 36-call histogram, not a physical execution or proof of changed-caller legality.", + "also_retained_by_8041": "05f6172d4d9487090fa24c75137a7c60e6fcd67e" + }, + "vendored_pricing_code": { + "head": "05f6172d4d9487090fa24c75137a7c60e6fcd67e", + "path": "research/p104-single-export-parity/pinned/price_audit.py", + "local_path": "pinned/price_audit.py", + "git_blob": "829966dd450bdc33409ef0a214ee5a184f89a564", + "sha256": "ca650d573f605bf51a8806a772903b6775cd036dfbfe7f043eccd3e51bc9977b", + "use": "Pinned rational interval pricing for the conditional arithmetic histogram screen." + }, + "offline_predecessor": { + "pull_request": 8030, + "head": "6285dd829114705862e8d91facaedc1f31d3cfcb", + "git_tree": "3a1c001cbf175ae48ee1d56e56e4723eda1c8218", + "local_path": "invoice_engine/predecessor-8030.tar.gz", + "git_blob": "e00a6bfe8328b4c982bf0689c4d55c8207515514", + "sha256": "769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c", + "provenance_note": "Referenced by #8035 head ea776471bf8ed143a0625cf2d7532f65d15eb5f9; archive bytes, 91 members, and tree rebuilt during replay." + }, + "checked_blobs": { + "candidate.py": "d848ce922da44a1aae7eb22b1d12e09ef6ddd59b4ba804a149e00b9b7b7e1b89", + "ONE-RESIDUAL-RESULT.json": "e46455ee7bedc9ecbd8cd780bd0dc167a4ca7963922715d5fbe992e2d703e12d", + "verify_candidate.py": "b026de749f1a92ae714934f46e73e8c13a396491445e562f625ce4cb41dac782", + "CANDIDATE-AUDIT.json": "ad481bc8c4f44c944c1adeaf1012ffaecc87c01d034f0955de7f30711b60cfe4", + "constant_composition.py": "d665b36f5009bdb0e22bd7dd2297df989029cd8816595b4fdfb4ca765ac8790f", + "constant_composition.json": "8bbb270553968fbeed190b1741fb2d56a6f801243d77243aaa674c4b4c0c1cfb", + "caller_dual_check.py": "28e2008c0d455b7c09ab925293c905e621c3cbb87fc9cf4b849c1266f85a05c2", + "caller_dual_check.json": "88fb6faca7fcdfe01bcef09fee6a65a2a632469031253e368c8e88237c1736a8", + "composition_controls.py": "3909d89285d0155d50e06ed50e6ec0ba55a22351fc0160414f6bad5e405c1130", + "COMPOSITION-CONTROLS.json": "2cd68e11e3656571dad8fe07628967c32a9ae3e3ee18c495a755a76119012e8f", + "hinge_screen.py": "4a391a93e7f5b7ad3484f9bccb435c313ea2efc8ac60c08f0858c434d7d6e4ff", + "HINGE.json": "66b035c97ffa1977108c62388eea50a0be165a633a06bc8cb3fe186db67014ad", + "hinge_audit.py": "cabebddf56444fe8193551b8e4ca506ebb07eff41b8ecf32618a4e363122f72a", + "HINGE-AUDIT.json": "b038d3311cc7c01f1fd4af63c199e3377b98763d4a20b71be761293101bb81a1", + "balanced_price.py": "1b1accfc375229f3fb95ae651d72289052d2b6c00cb436f4a9bc911b0cac8e43", + "BALANCED-PRICE.json": "de5e75d1dfdc6b75f573b6d49fdf4b704f0cb0cffddee8eb5f0f8a4c4d6065ae", + "counterfactual_invoice.py": "fb6fe39dac2d5b156c62acced9618f38815f2f18cdf72e1c251b78246b21e408", + "INVOICE.json": "ec96c828760da4ff0b269e76debc431d2916fc050e96658b6d81d409f3a9d3ae", + "second_slot.py": "848210b31fc3d2a8e89248b7662fde8489700b8a3b2b3654a8d3b47545b04a84", + "slot_solver.py": "d9c2ad85cf10a625ef5f6c111ae5a0b2536aa7300bcf9437644e15e2962aea5a", + "sponsor_solver.py": "0c152479dd271fbdb92c1261f56f34067bcda7fa616725fe8029d4939f0da358", + "gf2.py": "23347c0ad08f0680f8e9ed60fbf63c05213309ac9f27029daceda50f55292130", + "pinned/strong-bit.json.gz": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "pinned/EFREE-CALLER.json.gz": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b", + "pinned/ONE-RESIDUAL.json.gz": "7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7", + "pinned/price_audit.py": "ca650d573f605bf51a8806a772903b6775cd036dfbfe7f043eccd3e51bc9977b", + "invoice_engine/OVERLAY.json": "73aaf56a8a199cf3b7fc6c87316ca50298f47561e4b7c227edec6230f12a8403", + "invoice_engine/PREDECESSOR-SOURCES.json": "3634f7a15b8ca6f1832e48bdd4e83bd764509f804196d956149a9a82e7512a64", + "invoice_engine/RESULT.json": "e1ccc49a75e17fab4f5aa03697db58a0a6c3ad335cd7b8bba156c9bc3d419179", + "invoice_engine/check_profile.py": "83561f0c2da467b9b657380e043b069de1e2f139d5231cccd0abcce665bd6352", + "invoice_engine/outer_budget.py": "ca4438db28a447ed5c43d87d43f0ac10a0cb2b4e183342ac93139d517b9d4d02", + "invoice_engine/predecessor-8030.tar.gz": "769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c", + "invoice_engine/restore_machine.py": "0d88742495d10d044b2fe2a63e2220646230b8695b0094a970e254a71bc81d8e", + "invoice_engine/verify_funding.py": "b9596574f4ded80c2bee2d44fef4d1d4aff859f53eadacb089130f34bed6779e", + "SECOND-SLOT.txt": "5657fbf01c95236af56802240f5c70370f0bd84d47bffbd73153a13ba994ddf9", + "manuscript/height-audit/height_exact.py": "452f30b6b2077aebba9500f39b216c596415e2f9d9c7a20393e68cb65b4d5aec", + "manuscript/height-audit/cross_check.py": "c3c8e2ca3d0643450c57dc867a4c9e8333f055631885b058ec987e7bfa40602f", + "manuscript/height-audit/HEIGHT-EXACT.json": "92aab6fd8c1a43899e3d1d280c51ea74974f51d95ae1e5421e83c931fc510447", + "manuscript/height-audit/README.md": "aeb13491e8a418d048fce8165f90f362a21929e4703d281fcb240d9ab1203b30" + } +} diff --git a/research/p104-balanced-fusion-residual/TASK.json b/research/p104-balanced-fusion-residual/TASK.json new file mode 100644 index 0000000000..a0a93f1c1a --- /dev/null +++ b/research/p104-balanced-fusion-residual/TASK.json @@ -0,0 +1,87 @@ +{ + "schema_version": 1, + "task_id": "selected-stock-envelope", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "selected-stock-envelope", + "question": "What explicit uniform stock envelope does the actual selected stopped producer supply at one bootstrap stage?", + "starting_points": [ + "research/selected-bootstrap-stock-audit/README.md", + "research/bootstrap-cutoff-time-space-split/README.md", + "certificates/selected-result.json", + "docs/research/community-efficient1000-review.md", + "research/stock-margin-chain/README.md" + ], + "methods": [ + "Derive a source-bound reserve recurrence at the actual selected atom widths, separating parent stock from completed inner borrowing.", + "Find an exact missing implication or counterexample to a proposed selected-stage stock envelope." + ], + "acceptance_gate": "Bind every coefficient and depth factor to the selected producer and state the width domain. Compare a proved envelope with the sufficient cutoff guard; a large numerical headroom or a historical m=120 coefficient is not a selected m=73 proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "Choose one actual selected producer/stage and derive its parent reserve and depth coefficient from source. Check whether newer handoffs already cover that exact obligation. Stop with the missing implementation lemma if it cannot be bounded; do not rerun #2972 cutoff/headroom arithmetic as a new contribution.", + "bottleneck_link": "This reduces a concrete inherited implementation obligation without confusing unchanged kappa arithmetic with a completed theorem.", + "allowed_variations": [ + "One stage or one explicit reserve/depth implication.", + "An independently checked same-domain proof repair, retaining all remaining assumptions." + ], + "scope_change_triggers": [ + "Importing the historical 57604 or 252 allowance without a selected-producer binding.", + "Calling a conditional fit lemma a full outer-proof adoption.", + "Replacing an actual selected stock coefficient with cutoff comparisons or a conditional fit inequality." + ], + "overlap_terms": [ + "selected stock", + "stock envelope", + "bootstrap cutoff", + "1956", + "1965", + "1990", + "2972", + "stock-margin-chain", + "actual_stock_coefficient" + ], + "existing_checks": [ + { + "scope": "Retained stock audit identifies missing actual selected-stage coefficients; later cutoff-chain arithmetic does not supply them.", + "evidence": "docs/research/research-family-status.md#revision-6-handoffs-source-archives-awaiting-independent-validation", + "remaining": "Derive one actual reserve/depth coefficient from the selected producer.", + "status": "reviewed", + "source_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "scope_change_reason": "The assigned study concerns the concrete balanced fusion on the #8027 binary graph and its caller, rather than a selected bootstrap stock envelope.", + "actual_scope": "Bind the actual 630-row 4+4 fusion word, prove its nonempty 36-placement residuals cannot cancel on the constant-binary caller, check the 268-factor retention, bounded hinge alternatives, and price the explicit counterfactual six-stage trial.", + "bottleneck_link": "A favorable hypothetical signed invoice is not useful until the actual changed word satisfies all original endpoint rows, private erasure and physical caller contracts.", + "stop_rule": "Authenticate sources; reproduce the exact nonzero residual and transpose, independent caller diagonal witnesses and mutation controls, zero repair budget, and conditional directed signed trial.", + "outcome": "negative-result", + "evidence": "README.md, BALANCED.md, literal source and candidate, independent receipts, and registered reproduction.", + "author": "Clear1nsight", + "ai_assistance": "Substantial OpenAI Codex assistance in research, proof, implementation, arithmetic and documentation.", + "open_questions": [ + { + "question": "Can a different graph repair the cross-port residual within the complete price budget?", + "why_it_matters": "The explicit candidate fails every nonempty subset, while the hypothetical price admits no additional rank-one paid repair.", + "first_step": "Name the modified operations and clocks, prove all public rows and physical clears, and bind the full paired caller and signed invoice.", + "blocked_by": "The actual candidate remains wrong, the tested hinge/late-return family has no legal solution, and broader coordinated redesigns remain open." + }, + { + "question": "Can the counterfactual price be realized in an admitted all-size installation?", + "why_it_matters": "Numerical signed checks assume a valid replacement and unchanged caller/ownership conditions.", + "first_step": "Only after a full valid word exists, bind typed ownership, exact target and paid histograms, erasure, physical source, and the five inherited premises.", + "blocked_by": "No valid all-input physical fusion has been supplied." + } + ] +} diff --git a/research/p104-balanced-fusion-residual/VERIFY.json b/research/p104-balanced-fusion-residual/VERIFY.json new file mode 100644 index 0000000000..3fe04f09a9 --- /dev/null +++ b/research/p104-balanced-fusion-residual/VERIFY.json @@ -0,0 +1,19 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Authenticate source graph and offline invoice engine; reproduce literal 630-row and independent transpose residual, 36-placement caller and independent diagonal proof, 4096 hinge screen, raw/268 and six-stage conditional invoice with corruption controls. Replay the exact ordinary height thresholds and independent Fraction recurrence from private copies." + } + ] +} diff --git a/research/p104-balanced-fusion-residual/balanced_price.py b/research/p104-balanced-fusion-residual/balanced_price.py new file mode 100644 index 0000000000..886bbfa9fe --- /dev/null +++ b/research/p104-balanced-fusion-residual/balanced_price.py @@ -0,0 +1,23 @@ +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +import importlib.util,json,sys +from pathlib import Path + + +def main(p): + assert sha256(p.read_bytes()).hexdigest()=='ca650d573f605bf51a8806a772903b6775cd036dfbfe7f043eccd3e51bc9977b';s=importlib.util.spec_from_file_location('p104_verified_reference',p);m=importlib.util.module_from_spec(s);s.loader.exec_module(m);t,old=m.load_inputs();k=m.K;c=Q(70084296829703,2**54);ans={} + for name,legs in [('4+4',(4,4))]: + first=None;previous=None + for n in range(37): + paid=old.copy() + for r in legs:paid[r]-=n + paid[8]+=n;assert min(paid.values())>=0 and sum(paid.values())==104904-n and sum(r*v for r,v in paid.items())==285600 + raw=m.raw_difference(t,paid,k);pow=m.powered_surplus(t,paid,c,268,m.Z,m.W,m.WEIGHT,15) + if raw[0]>0 and pow[0]>Q(2,1<<50):first=(n,m.enclosing_text(*raw),m.enclosing_text(*pow));break + previous=(n,m.enclosing_text(*raw),m.enclosing_text(*pow)) + assert first is not None + ans[name]={'uphill_local_saving_at_trial':m.enclosing_text(*m.raw_difference(Counter(legs),{8:1},k)),'downhill_change':0,'last_failure':previous,'first_raw_and_powered_price_success':first} + return ans + +if __name__=='__main__':print(json.dumps(main(Path(sys.argv[1])/'price_audit.py'),sort_keys=True,indent=2)) diff --git a/research/p104-balanced-fusion-residual/caller_dual_check.json b/research/p104-balanced-fusion-residual/caller_dual_check.json new file mode 100644 index 0000000000..8fc0fab1df --- /dev/null +++ b/research/p104-balanced-fusion-residual/caller_dual_check.json @@ -0,0 +1,518 @@ +{ + "caller_sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b", + "placement_count": 36, + "placement_records": [ + { + "event": 4, + "stage": 1, + "lane_base": 0, + "source_roles": [ + 0, + 1 + ], + "affected_output_roles": [ + 0, + 1 + ], + "unique_diagonal": 1 + }, + { + "event": 5, + "stage": 1, + "lane_base": 19, + "source_roles": [ + 19, + 20 + ], + "affected_output_roles": [ + 19, + 20 + ], + "unique_diagonal": 20 + }, + { + "event": 16, + "stage": 2, + "lane_base": 0, + "source_roles": [ + 0, + 2 + ], + "affected_output_roles": [ + 0, + 2 + ], + "unique_diagonal": 2 + }, + { + "event": 17, + "stage": 2, + "lane_base": 19, + "source_roles": [ + 19, + 21 + ], + "affected_output_roles": [ + 19, + 21 + ], + "unique_diagonal": 21 + }, + { + "event": 28, + "stage": 3, + "lane_base": 0, + "source_roles": [ + 0, + 3 + ], + "affected_output_roles": [ + 0, + 3 + ], + "unique_diagonal": 3 + }, + { + "event": 29, + "stage": 3, + "lane_base": 19, + "source_roles": [ + 19, + 22 + ], + "affected_output_roles": [ + 19, + 22 + ], + "unique_diagonal": 22 + }, + { + "event": 40, + "stage": 4, + "lane_base": 0, + "source_roles": [ + 0, + 4 + ], + "affected_output_roles": [ + 0, + 4 + ], + "unique_diagonal": 4 + }, + { + "event": 41, + "stage": 4, + "lane_base": 19, + "source_roles": [ + 19, + 23 + ], + "affected_output_roles": [ + 19, + 23 + ], + "unique_diagonal": 23 + }, + { + "event": 52, + "stage": 5, + "lane_base": 0, + "source_roles": [ + 0, + 5 + ], + "affected_output_roles": [ + 0, + 5 + ], + "unique_diagonal": 5 + }, + { + "event": 53, + "stage": 5, + "lane_base": 19, + "source_roles": [ + 19, + 24 + ], + "affected_output_roles": [ + 19, + 24 + ], + "unique_diagonal": 24 + }, + { + "event": 64, + "stage": 6, + "lane_base": 0, + "source_roles": [ + 0, + 6 + ], + "affected_output_roles": [ + 0, + 6 + ], + "unique_diagonal": 6 + }, + { + "event": 65, + "stage": 6, + "lane_base": 19, + "source_roles": [ + 19, + 25 + ], + "affected_output_roles": [ + 19, + 25 + ], + "unique_diagonal": 25 + }, + { + "event": 76, + "stage": 7, + "lane_base": 0, + "source_roles": [ + 0, + 7 + ], + "affected_output_roles": [ + 0, + 7 + ], + "unique_diagonal": 7 + }, + { + "event": 77, + "stage": 7, + "lane_base": 19, + "source_roles": [ + 19, + 26 + ], + "affected_output_roles": [ + 19, + 26 + ], + "unique_diagonal": 26 + }, + { + "event": 88, + "stage": 8, + "lane_base": 0, + "source_roles": [ + 0, + 8 + ], + "affected_output_roles": [ + 0, + 8 + ], + "unique_diagonal": 8 + }, + { + "event": 89, + "stage": 8, + "lane_base": 19, + "source_roles": [ + 19, + 27 + ], + "affected_output_roles": [ + 19, + 27 + ], + "unique_diagonal": 27 + }, + { + "event": 100, + "stage": 9, + "lane_base": 0, + "source_roles": [ + 0, + 9 + ], + "affected_output_roles": [ + 0, + 9 + ], + "unique_diagonal": 9 + }, + { + "event": 101, + "stage": 9, + "lane_base": 19, + "source_roles": [ + 19, + 28 + ], + "affected_output_roles": [ + 19, + 28 + ], + "unique_diagonal": 28 + }, + { + "event": 394, + "stage": 10, + "lane_base": 0, + "source_roles": [ + 0, + 10 + ], + "affected_output_roles": [ + 0, + 10 + ], + "unique_diagonal": 10 + }, + { + "event": 395, + "stage": 10, + "lane_base": 19, + "source_roles": [ + 19, + 29 + ], + "affected_output_roles": [ + 19, + 29 + ], + "unique_diagonal": 29 + }, + { + "event": 452, + "stage": 11, + "lane_base": 0, + "source_roles": [ + 0, + 11 + ], + "affected_output_roles": [ + 0, + 11 + ], + "unique_diagonal": 11 + }, + { + "event": 453, + "stage": 11, + "lane_base": 19, + "source_roles": [ + 19, + 30 + ], + "affected_output_roles": [ + 19, + 30 + ], + "unique_diagonal": 30 + }, + { + "event": 496, + "stage": 12, + "lane_base": 0, + "source_roles": [ + 0, + 12 + ], + "affected_output_roles": [ + 0, + 12 + ], + "unique_diagonal": 12 + }, + { + "event": 497, + "stage": 12, + "lane_base": 19, + "source_roles": [ + 19, + 31 + ], + "affected_output_roles": [ + 19, + 31 + ], + "unique_diagonal": 31 + }, + { + "event": 540, + "stage": 13, + "lane_base": 0, + "source_roles": [ + 0, + 13 + ], + "affected_output_roles": [ + 0, + 13 + ], + "unique_diagonal": 13 + }, + { + "event": 541, + "stage": 13, + "lane_base": 19, + "source_roles": [ + 19, + 32 + ], + "affected_output_roles": [ + 19, + 32 + ], + "unique_diagonal": 32 + }, + { + "event": 584, + "stage": 14, + "lane_base": 0, + "source_roles": [ + 0, + 14 + ], + "affected_output_roles": [ + 0, + 14 + ], + "unique_diagonal": 14 + }, + { + "event": 585, + "stage": 14, + "lane_base": 19, + "source_roles": [ + 19, + 33 + ], + "affected_output_roles": [ + 19, + 33 + ], + "unique_diagonal": 33 + }, + { + "event": 628, + "stage": 15, + "lane_base": 0, + "source_roles": [ + 0, + 15 + ], + "affected_output_roles": [ + 0, + 15 + ], + "unique_diagonal": 15 + }, + { + "event": 629, + "stage": 15, + "lane_base": 19, + "source_roles": [ + 19, + 34 + ], + "affected_output_roles": [ + 19, + 34 + ], + "unique_diagonal": 34 + }, + { + "event": 672, + "stage": 16, + "lane_base": 0, + "source_roles": [ + 0, + 16 + ], + "affected_output_roles": [ + 0, + 16 + ], + "unique_diagonal": 16 + }, + { + "event": 673, + "stage": 16, + "lane_base": 19, + "source_roles": [ + 19, + 35 + ], + "affected_output_roles": [ + 19, + 35 + ], + "unique_diagonal": 35 + }, + { + "event": 716, + "stage": 17, + "lane_base": 0, + "source_roles": [ + 0, + 17 + ], + "affected_output_roles": [ + 0, + 17 + ], + "unique_diagonal": 17 + }, + { + "event": 717, + "stage": 17, + "lane_base": 19, + "source_roles": [ + 19, + 36 + ], + "affected_output_roles": [ + 19, + 36 + ], + "unique_diagonal": 36 + }, + { + "event": 760, + "stage": 18, + "lane_base": 0, + "source_roles": [ + 0, + 18 + ], + "affected_output_roles": [ + 0, + 18 + ], + "unique_diagonal": 18 + }, + { + "event": 761, + "stage": 18, + "lane_base": 19, + "source_roles": [ + 19, + 37 + ], + "affected_output_roles": [ + 19, + 37 + ], + "unique_diagonal": 37 + } + ], + "independent_unique_diagonal_count": 36, + "all_nonempty_subsets_rejected": true, + "retained_factor_count": 267, + "retained_factor_rank": 127, + "minimum_first_factor_rank": 4, + "exact_retention_inequality": true, + "mutated_caller_rejected": true, + "scope": "constant binary field source contract; not physical address-field inverse or operand reachability" +} diff --git a/research/p104-balanced-fusion-residual/caller_dual_check.py b/research/p104-balanced-fusion-residual/caller_dual_check.py new file mode 100644 index 0000000000..544f05d865 --- /dev/null +++ b/research/p104-balanced-fusion-residual/caller_dual_check.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Independent prefix/adjoint proof of the 36 diagonal witnesses. + +The #8027 fused graph has the separately replayed local fault y19 += x38. +For constant binary address fields the paired caller's root-role operations +are linear. A forward prefix finds each actual x38 source form; an independent +reverse sensitivity pass finds each final y19 response. Their outer product is +that placement's complete error. No full local graph code or the other caller +checker is imported. +""" +from pathlib import Path +import gzip,hashlib,json,sys +HERE=Path(__file__).resolve().parent +blob=(HERE/'pinned'/'EFREE-CALLER.json.gz').read_bytes() +assert hashlib.sha256(blob).hexdigest()=='757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b' +c=json.loads(gzip.decompress(blob));assert (c['roles'],c['ports'])==(38,111) + +def propagate(events,expect=True): + state=[1<=15**268 +print(json.dumps({'caller_sha256':hashlib.sha256(blob).hexdigest(), + 'placement_count':len(rows),'placement_records':rows, + 'independent_unique_diagonal_count':36,'all_nonempty_subsets_rejected':True, + 'retained_factor_count':267,'retained_factor_rank':127, + 'minimum_first_factor_rank':4,'exact_retention_inequality':True, + 'mutated_caller_rejected':True, + 'scope':'constant binary field source contract; not physical address-field inverse or operand reachability'},indent=2)) +print('PASS_INDEPENDENT_CALLER_PREFIX_TRANSPOSE_DIAGONAL',file=sys.stderr) diff --git a/research/p104-balanced-fusion-residual/candidate.py b/research/p104-balanced-fusion-residual/candidate.py new file mode 100644 index 0000000000..e4fb644488 --- /dev/null +++ b/research/p104-balanced-fusion-residual/candidate.py @@ -0,0 +1,42 @@ +"""Rebuild the all-but-one-terminal balanced fusion from the native #8027 word.""" +import gzip +from hashlib import sha256 +import json +from pathlib import Path +import sys + +def build(g): + p=g['program'];assert p[7110:7113]==[['INIT',2241,0],['ADD',2241,626,0],['MOVE',2241,0,509]] and p[7208:7211]==[['INIT',2252,509],['ADD',2252,1528,509],['MOVE',2252,509,1]] and p[21250]==['ADD',3317,626,0] + edit={7110:[['INIT',2241,509]],7111:[['ADD',2241,1528,509]],7112:[],7208:[['INIT',2252,0]],7209:[['ADD',2252,626,0]],7210:[['MOVE',2252,0,1]],21250:[]} + tape=[r for k,row in enumerate(p) for r in edit.get(k,[row])]+[['SWAP',38,626]]+[['ADD',d,s,1] for d in (33,77,87) for s in (38,626)] + return dict(g,program=tape) + +def check(g,changed=False): + n=g['public'];ch=dict(enumerate(g['start']));v={i:1<>i)&1)==((columns[i]>>o)&1) for o in range(630) for i in range(630)),name +assert len(oldclears)==len(newclears)==3433 +clear_diff=[i for i in oldclears if oldclears[i]!=newclears[i]] +assert len(clear_diff)==7 and all(v for _,v in newclears.values()) +D={int(k):v['dim'] for k,v in g['frames'].items()} +def hist(d):return Counter(abs(D[r[3]]-D[r[2]]) for r in d['program'] if r[0]=='MOVE') +h0,h1=hist(g),hist(f) +assert h0-h1==Counter({4:2}) and h1-h0==Counter({8:1}) + +# Restrict to the two root ports touched by the fused operator. Every whole +# helper owner remains an independent target in the complete source but is +# unchanged by either local map; it therefore contributes an identity block. +locals_=[k for k,row in enumerate(c['events']) if row[0]=='LOCAL'] +assert len(locals_)==36 and c['roles']==38 and c['ports']==111 + +def execute(selected): + s=[[1<<(2*r),1<<(2*r+1)] for r in range(38)] + for clock,(op,*args) in enumerate(c['events']): + if op=='LOCAL': + stage,x,y=args + s[y][0]^=s[x][0];s[y][1]^=s[x][1] + if clock in selected:s[y][0]^=s[x][1] + elif op in ('ADD','QUERY'): + x,y=args;s[x][0]^=s[y][0];s[x][1]^=s[y][1] + elif op=='SWAP': + x,y=args;s[x],s[y]=s[y],s[x] + elif op=='IDLE_ONE':pass + else:raise ValueError(op) + return [v for row in s for v in row] + +baseline=execute(set());assert baseline==[1<>(2*inp+1)&1:flat|=1<<(38*out+inp) + assert flat + stage=c['events'][clock][1] + base=0 if idx%2==0 else 19 + assert c['events'][clock][2:]==[base+1,base] + # The unique diagonal (base+stage,base+stage) appears in no other + # placement, yielding an explicit separating witness for every subset. + endpoints=(base,base+stage) + exact=sum(1<<(38*out+inp) for out in endpoints for inp in endpoints) + assert flat==exact + matrices.append(flat) + outidx=next(i for i,x in enumerate(diff) if x);inpidx=(diff[outidx]&-diff[outidx]).bit_length()-1 + records.append({'index':idx,'event':clock,'stage':c['events'][clock][1], + 'local_roles':c['events'][clock][2:], + 'wrong_root_output_count':sum(bool(x) for x in diff), + 'witness':{'input':['root',inpidx//2,38 if inpidx%2 else 19], + 'output':['root',outidx//2,38 if outidx%2 else 19]}, + 'changed_matrix_bits':flat.bit_count(), + 'unique_diagonal_witness':{'input':['root',base+stage,38], + 'output':['root',base+stage,19]}}) + +# Echelonize 36 exact 38x38 placement matrices, retaining dependencies. +basis={};relations=[] +for i,original_column in enumerate(matrices): + x=original_column;comb=1<>(2*inp+1))&1:expected|=1<<(38*out+inp) +assert expected==xorflat + +def all_root_rows(selected,transpose=False): + """All 4,218 independent root input/output variables, no truncation.""" + values=[[1<<(111*r+p) for p in range(111)] for r in range(38)] + events=list(enumerate(c['events'])) + if transpose:events.reverse() + for clock,(op,*args) in events: + if op=='LOCAL': + stage,x,y=args + if not transpose: + for p in range(111):values[y][p]^=values[x][p] + if clock in selected:values[y][19]^=values[x][38] + else: + if clock in selected:values[x][38]^=values[y][19] + for p in range(111):values[x][p]^=values[y][p] + elif op in ('ADD','QUERY'): + x,y=args + if transpose:x,y=y,x + for p in range(111):values[x][p]^=values[y][p] + elif op=='SWAP': + x,y=args;values[x],values[y]=values[y],values[x] + elif op=='IDLE_ONE':pass + else:raise ValueError(op) + return [r for row in values for r in row] + +def expect_complete(selected,transpose=False): + selected_matrices=0 + for i,clock in enumerate(locals_): + if clock in selected:selected_matrices^=matrices[i] + for role in range(38): + for port in range(111): + row=1<<(111*role+port) + if port==(38 if transpose else 19): + for other in range(38): + out,inp=(other,role) if transpose else (role,other) + if selected_matrices>>(38*out+inp)&1: + row^=1<<(111*other+(19 if transpose else 38)) + yield row + +for clock in locals_: + selected={clock} + assert all_root_rows(selected)==list(expect_complete(selected)) + assert all_root_rows(selected,transpose=True)==list(expect_complete(selected,transpose=True)) +for selected in (set(),set(locals_),set(locals_[::2]),set(locals_[:7])): + assert all_root_rows(selected)==list(expect_complete(selected)) + assert all_root_rows(selected,transpose=True)==list(expect_complete(selected,transpose=True)) + +kernel=[] +if len(relations)<=20: + for subset in range(1,1<>i&1:m^=r + k=[i for i in range(36) if m>>i&1] + assert execute({locals_[i] for i in k})==baseline + kernel.append(k) + +out={'source_sha256':hashlib.sha256(ORIG.read_bytes()).hexdigest(), + 'caller_sha256':hashlib.sha256(CALLER.read_bytes()).hexdigest(), + 'candidate_sha256':hashlib.sha256(EDIT.read_bytes()).hexdigest(), + 'local_operator_error_row':130,'local_operator_error_input':38, + 'local_forward_transpose_checks':2,'private_clear_count':3433, + 'changed_private_clear_owners':clear_diff,'all_candidate_clears_nonzero_on_arbitrary_inputs':True, + 'changed_private_clear_details':[ + {'owner':i,'chart':newclears[i][0], + 'original_input_support':[j for j in range(630) if oldclears[i][1]>>j&1], + 'candidate_input_support':[j for j in range(630) if newclears[i][1]>>j&1]} + for i in clear_diff], + 'deleted_paid_ranks':{'4':2},'added_paid_ranks':{'8':1}, + 'local_placements':records,'placement_matrix_rank':len(basis),'placement_kernel_dimension':len(relations), + 'full_root_input_variables':4218,'separate_helper_input_variables':14688, + 'single_placement_full_root_forward_and_reverse_replays':36, + 'full_root_subset_controls':4, + 'explicit_separating_coordinate':'at stage s and lane base b, input (root,b+s,38), output (root,b+s,19)', + 'enumerated_nonzero_cancelling_subsets':len(kernel) if len(relations)<=20 else None, + 'kernel_basis':[[i for i in range(36) if r>>i&1] for r in relations], + 'maximum_cancelled_placements':max(map(len,kernel),default=0) if len(relations)<=20 else None, + 'largest_cancelling_examples':sorted(kernel,key=lambda x:-len(x))[:10], + 'power268_retention':{'suffix_rank':127,'count':267,'minimum_first_factor_target_rank':4, + 'all_first_factor_targets_retained':4*127**267>=15**268}, + 'scope':'exact constant binary address-field subclass of the complete arbitrary-field supplier; original 36-call role schedule, 111 ports and all unchanged helper outputs; no physical top-level operand reachability claim'} +print(json.dumps(out,indent=2)) +print('PASS_ALL_36_FUSION_COMPOSITIONS_AND_TRANSPOSE',file=sys.stderr) diff --git a/research/p104-balanced-fusion-residual/counterfactual_invoice.py b/research/p104-balanced-fusion-residual/counterfactual_invoice.py new file mode 100644 index 0000000000..303fe8cbe0 --- /dev/null +++ b/research/p104-balanced-fusion-residual/counterfactual_invoice.py @@ -0,0 +1,149 @@ +"""Conditional #8035 4+4->8 invoices; no replacement word is installed.""" +from collections import Counter +from dataclasses import replace +from decimal import Decimal, localcontext +from fractions import Fraction as Q +from pathlib import Path +from types import SimpleNamespace +import json, sys + +if len(sys.argv)!=3: + raise SystemExit('usage: check.py RESTORED_8035_MACHINE RESULT_JSON') +SOURCE=Path(sys.argv[1]).resolve() +OUTPUT=Path(sys.argv[2]).resolve() +sys.path.insert(0,str(SOURCE)) +from upstream import install, HERE +install() +from calibration import (SMALL_GAP,SPLIT_TARIFF,HIGH_RATE,COMPLEX_C,SPLIT_TILT,PRODUCTIVE_TILT,prices) +from independent_binary_price import raw_moments,mass,rank_price,log_rank +from strict_moment import certify +from strong_binary import graph,caller,native_word +from strong_complex import load_changed,word +from outer_budget import qualify +from resources import requirements + +def decimal(x): + with localcontext() as ctx: + ctx.prec=45 + return str(Decimal(x.numerator)/Decimal(x.denominator)) + +def bounds(T,P,c): + t=1-c + return mass(T,t,0)-mass(P,t,1),mass(T,t,1)-mass(P,t,0) + +def hist(T,P): + return {'target_count':sum(T.values()),'paid_count':sum(P.values()), + 'target':dict(sorted(T.items())),'paid':dict(sorted(P.items()))} + +def modified(original,n,extra_rank1=0): + P=original.copy();P[4]-=2*n;P[8]+=n;P[1]+=extra_rank1 + assert min(P.values())>=0 + return P + +def derivative_lower(T,P,left,right): + # D(c)=T(1-c)-P(1-c); independently enclose -D'(c) + # on the complete interval 0<=left<=c<=right<=1. + total=Q(0) + for r in T.keys()|P.keys(): + s=T[r]-P[r] + if not s or r==1:continue + l,h=log_rank(r) + low=rank_price(r,1-right)[0]*l + high=rank_price(r,1-left)[1]*h + total+=s*(low if s>0 else high) + return total + +def interval_strings(lohi): + return {'lower':str(lohi[0]),'upper':str(lohi[1]), + 'lower_decimal':decimal(lohi[0]),'upper_decimal':decimal(lohi[1])} + +def reject(*args): + try:qualify(*args) + except ArithmeticError:return + raise AssertionError('unfunded signed control passed') + +T,P=raw_moments(graph(),caller()) +physical=native_word(285) +assert Counter(p.rank for p in physical.targets)==T and Counter(p.rank for p in physical.paid)==P +assert (sum(T.values()),sum(P.values()))==(18906,104904) +target=Q('.00389046');q=7 +P6=modified(P,6);P7=modified(P,7);P36=modified(P,36);P36repair=modified(P,36,1) +assert bounds(T,P6,target)[1]<00 + +bit_c=Q((Q('.00389050')*2**56).__floor__(),2**56) +assert targetQ(2,2**47) +fake=lambda h: [SimpleNamespace(rank=r) for r,n in h.items() for _ in range(n)] +invoice=SimpleNamespace(power=285,floor=15,low_cut=12,high_cut=12,targets=fake(T),paid=fake(P7)) +bit_check=certify(invoice,bit_c,z,w,285,46,15,split_weight=Q(1,64)) +surplus268=1-alpha**268-Q(1,64)*gamma**268-lam**268 +assert surplus268>Q(2,2**50) +invoice268=SimpleNamespace(power=268,floor=15,low_cut=12,high_cut=12,targets=fake(T),paid=fake(P7)) +bit_check268=certify(invoice268,bit_c,z,w,268,49,15,split_weight=Q(1,64)) + +g,layout=load_changed(HERE/'inputs') +positive=word(g,layout) +CT=Counter(p.rank for p in positive.targets);CP=Counter(p.rank for p in positive.paid) +assert (sum(CT.values()),sum(CP.values()))==(52608,281568) +positive_check=certify(positive,COMPLEX_C,Q(19,64),Q(23,64),128,14,16) +ctarg=bounds(CT,CP,target) +assert ctarg[0]>0 + +base=replace(SMALL_GAP,rank_logs=HIGH_RATE.rank_logs,bit_c=bit_c, + ordinary=Q('.0038904998'),kappa=target,positive_stop_denominator=10**14) +strong=replace(base,kappa=Q('.003890463256835937'),positive_stop_denominator=10**20) +profiles={} +base268=replace(SPLIT_TARIFF,rank_logs=HIGH_RATE.rank_logs,bit_c=bit_c, + ordinary=Q('.0038904998'),kappa=target,positive_stop_denominator=10**14) +for name,p in [('target',base),('target_268',base268),('near_positive_cap',strong)]: + bit_debit,num_debit,rows=prices(p) + assert (bit_debit,num_debit)==((21 if p.power==268 else 22),10) + gap=Q(1,p.positive_stop_denominator); cap=COMPLEX_C-Q(num_debit,p.complex_log) + signed=qualify(p.kappa,gap,p.ordinary,cap) + reject(p.kappa,Q(0),p.ordinary,cap) + reject(p.kappa,gap,p.kappa+4*gap,cap) + reject(p.kappa,gap,p.ordinary,p.kappa+5*gap) + previous=Q(0);stages=[] + for h,covered,rate in rows: + limit=min(p.eta,(249*covered+previous)/250) + assert previous0 + profiles[name]={'kappa':str(p.kappa),'kappa_decimal':decimal(p.kappa),'gap':str(gap), + 'binary_debit':bit_debit,'numeric_debit':num_debit,'ordinary':str(p.ordinary), + 'positive_cap':str(cap),'positive_cap_decimal':decimal(cap),'signed':signed, + 'stages':stages,'stock':stock} + +result={'scope':'Hypothetical seven valid placements; unchanged other productive and paid labels, typed ownership, supplier admission and all inherited premises. No replacement word constructed.', + 'target_kappa':str(target),'trial_c':str(bit_c),'trial_c_decimal':decimal(bit_c), + 'replacement_placements':7,'raw_binary_original':hist(T,P),'raw_binary_7':hist(T,P7), + 'raw_positive_48':hist(CT,CP),'binary_margin_target_6':interval_strings(bounds(T,P6,target)), + 'binary_margin_target_7':interval_strings(bounds(T,P7,target)), + 'binary_margin_target_36':interval_strings(bounds(T,P36,target)), + 'binary_margin_target_36_plus_one_rank1':interval_strings(bounds(T,P36repair,target)), + 'positive_margin_target':interval_strings(ctarg), + 'six_derivative_magnitude_lower':str(derivative_lower(T,P6,target,Q(1,250))), + 'all36_plus_repair_derivative_magnitude_lower':str(derivative_lower(T,P36repair,target,Q(1,250))), + 'strict_split_weight':str(Q(1,64)),'strict_surplus_floor_e18':(surplus*10**18).__floor__(), + 'strict_required':str(Q(2,2**47)),'bit_checker':bit_check,'positive_checker':positive_check, + 'strict_268_surplus_floor_e18':(surplus268*10**18).__floor__(), + 'strict_268_required':str(Q(2,2**50)),'bit_checker_268':bit_check268, + 'profiles':profiles} +OUTPUT.write_text(json.dumps(result,indent=2,default=str)+'\n') +print('PASS_CONDITIONAL_7_PLACEMENT_INVOICE, NOT AN INSTALLED WORD') +print('six margin',decimal(bounds(T,P6,target)[1]),'seven margin',decimal(bounds(T,P7,target)[0])) +print('36 plus rank1',decimal(bounds(T,P36repair,target)[1])) +print('strict surplus >=',Q(result['strict_surplus_floor_e18'],10**18)) +for name,row in profiles.items(): + print(name,'kappa',row['kappa_decimal'],'signed',row['signed'],'A',row['stock']['log2_sufficient_public_precision']) diff --git a/research/p104-balanced-fusion-residual/gf2.py b/research/p104-balanced-fusion-residual/gf2.py new file mode 100644 index 0000000000..463924cbba --- /dev/null +++ b/research/p104-balanced-fusion-residual/gf2.py @@ -0,0 +1,25 @@ +"""Exact binary-mask row span, with the most significant bit as pivot.""" + +def bits(x): + while x: + bit=x&-x + yield bit.bit_length()-1 + x^=bit + +class Echelon: + def __init__(self,rows=()): + self.rows={} + for x in rows:self.add(x) + + def add(self,x): + while x: + p=x.bit_length()-1 + if p not in self.rows: + self.rows[p]=x + return + x^=self.rows[p] + + def residue(self,x): + for p in sorted(self.rows,reverse=True): + if x>>p&1:x^=self.rows[p] + return x diff --git a/research/p104-balanced-fusion-residual/hinge_audit.py b/research/p104-balanced-fusion-residual/hinge_audit.py new file mode 100644 index 0000000000..53a0f24d54 --- /dev/null +++ b/research/p104-balanced-fusion-residual/hinge_audit.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +"""Independent low-pivot audit of the fixed hinge/late-sender linear screen.""" +from collections import Counter,defaultdict +from fractions import Fraction +from hashlib import sha256 +from pathlib import Path +import gzip,json + +SOURCE=Path(__file__).resolve().parent / 'pinned/strong-bit.json.gz' +SHA='74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' +L=(1<<630)-1 + +def insert(b,v): + while v: + p=v&-v + if p not in b:b[p]=v;return + v^=b[p] + +def bas(rows): + b={} + for v in rows:insert(b,v) + return b + +def rem(b,v): + for p in sorted(b): + if v&p:v^=b[p] + return v + +def span(rows): + out={0} + for r in rows:out|={x^r for x in out} + return out + +def invertible(rows): + M=[[Fraction(v) for v in row] for row in rows] + for j in range(8): + p=next(i for i in range(j,8) if M[i][j]) + M[p],M[j]=M[j],M[p] + for i in range(j+1,8): + q=M[i][j]/M[j][j];M[i]=[a-q*b for a,b in zip(M[i],M[j])] + return True + +def main(): + raw=SOURCE.read_bytes();assert sha256(raw).hexdigest()==SHA;g=json.loads(gzip.decompress(raw));p=g['program'];D={int(i):s['dim'] for i,s in g['frames'].items()} + up4=[(t,r[1],r[2],r[3]) for t,r in enumerate(p) if r[0]=='MOVE' and D[r[3]]-D[r[2]]==4] + pair=[(a,b) for a in up4 for b in up4 if a[0]>631) for x in stock[1]) + gs=span(hinge);assert len(gs)==4096 + valid=[r for r in gs if rem(w,r)==0 and rem(top,r)!=0];assert len(valid)==512 + early=[x for x in stock[544] if not x>>631&1];assert len(early)==3 and stock[544][-1]==1<<631 + early_codes=span(early);assert len(early_codes)==8 + zero=bas(pre[0]);lines=[c for c,d in D.items() if d==1] + assert len(lines)==111 and all(not any(r>>630 for r in pre.get(c,())) for c in [0]+lines) + possible={c:span(rem(zero,r) for r in pre.get(c,())) for c in lines} + hit=Counter();without_late=0 + for h in valid: + for x in early_codes: + need=target[130]^(x&L)^(h if x>>630&1 else 0) + if not need:without_late+=1 + q=rem(zero,need) + for c in lines: + if q in possible[c]:hit[c]+=1 + assert without_late==0 and hit=={21:512} + assert g['start'][19]==21 and g['final'][130]==544 + # The rank-one image of 21 adds an eighth dimension to 544's rank-seven + # image. Thus 21 is not a subspace of 544, a necessary condition for a + # legal 1->7 nested transfer; no projector-gauge convention can change it. + assert invertible(g['frames']['544']['B']+g['frames']['21']['B']) + print(json.dumps({'source_sha256':SHA,'unique_ordered_4_plus_4_pair':pair[0], + 'hinge_history_rank':len(bas(hinge)),'linear_hinge_codes':len(gs), + 'complete_top_codes':len(valid),'rank1_late_senders':len(lines), + 'possible_sender_and_counts':dict(hit),'successful_nested_senders':0, + 'chart21_image_not_in_chart544_image':True,'codes_requiring_no_new_late_receipt':without_late, + 'scope':'fixed remaining native operations; one linear 2242 hinge; one linear 0->c->544 late rebind; full native preclock histories granted'},sort_keys=True,indent=2)) + +if __name__=='__main__':main() diff --git a/research/p104-balanced-fusion-residual/hinge_screen.py b/research/p104-balanced-fusion-residual/hinge_screen.py new file mode 100644 index 0000000000..bebb118641 --- /dev/null +++ b/research/p104-balanced-fusion-residual/hinge_screen.py @@ -0,0 +1,64 @@ +"""Certify the balanced 4+4 hinge and the equal-grade late rank-one rebind.""" +from collections import defaultdict,Counter +from fractions import Fraction +import gzip,json,sys +from hashlib import sha256 +from pathlib import Path + +class Span: + def __init__(self,rows=()): + self.b={} + for r in rows: + while r: + p=r.bit_length()-1 + if p not in self.b:self.b[p]=r;break + r^=self.b[p] + def residue(self,r): + for p in sorted(self.b,reverse=True): + if r>>p&1:r^=self.b[p] + return r + +def run(path): + raw=Path(path).read_bytes();assert sha256(raw).hexdigest()=='74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326';g=json.loads(gzip.decompress(raw));P=g['program'];D={int(k):r['dim'] for k,r in g['frames'].items()};G4=[(k,d,s,t) for k,(op,d,*a) in enumerate(P) if op=='MOVE' for s,t in [a] if D[t]-D[s]==4];pairs=[(a,b) for a in G4 for b in G4 if a[0]>630 for x in pred[c]) for c in D if D[c]<=1) + row=patch.get(k,row) + if row is None:continue + op,d,*a=row + if op=='INIT':ch[d],v[d]=a[0],0 + elif op=='ADD':s,c=a;assert ch[s]==ch[d]==c;v[d]^=v[s] + elif op=='MOVE': + assert ch[d]==a[0];ch[d]=a[1] + if k==21260:v[d]=1<<631 # an arbitrary absolute new fourth receipt at chart544 + hist[a[1]].append(v[d]) + elif op=='SWAP':s,=a;ch[d],ch[s]=ch[s],ch[d];v[d],v[s]=v[s],v[d] + elif op=='CLEAR':assert ch.pop(d)==a[0];del v[d] + M=[(1<>(n+1) for x in hist[1]);others=[x for x in hist[544] if x>>(n+1)==0];assert len(others)==3 and hist[544][-1]==1<<631 + combos=[0]; + for x in others:combos+=[v^x for v in combos] + gs=[0]; + for x in hinge:gs+=[v^x for v in gs] + assert len(set(gs))==4096;valid=[g for g in gs if not W.residue(g) and top.residue(g)];assert len(valid)==512 + zero=Span(pred[0]);lines=[c for c,d in D.items() if d==1];known={c:Span(zero.residue(r) for r in pred[c]) for c in lines};wins=Counter();noreceipt=0 + for ghat in valid: + for x in combos: + needed=M[130]^(x&L)^(ghat if x>>n&1 else 0) + if needed==0:noreceipt+=1 + reduced=zero.residue(needed) + for c,b in known.items(): + if b.residue(reduced)==0:wins[c]+=1 + assert noreceipt==0 and wins=={21:512} and g['start'][19]==21 and g['final'][111+19]==544 + # The rank-one image together with the rank-seven destination image has rank eight over Q. + u=g['frames']['21'];b=g['frames']['544'];A=[[Fraction(v) for v in row] for row in b['B']+u['B']];assert len(A)==8 + for j in range(8): + s=next(i for i in range(j,8) if A[i][j]);A[s],A[j]=A[j],A[s] + for i in range(j+1,8): + r=A[i][j]/A[j][j];A[i]=[x-r*y for x,y in zip(A[i],A[j])] + return {'unique_causal_pair':pairs[0],'hinge_fields':len(hinge),'all_linear_hinge_codes':len(gs),'terminal_sink_complete_codes':len(valid),'candidate_late_rank1_senders':len(lines),'successful_linear_rank1_pairs_before_geometry':dict(wins),'nested_late_sender_solutions':0,'old_late_sender':91,'missed_output':130,'incomparable_only_source':21,'original_late_destination':544} +if __name__=='__main__':print(json.dumps(run(sys.argv[1]),sort_keys=True,indent=2)) diff --git a/research/p104-balanced-fusion-residual/invoice_engine/OVERLAY.json b/research/p104-balanced-fusion-residual/invoice_engine/OVERLAY.json new file mode 100644 index 0000000000..93fcd0e584 --- /dev/null +++ b/research/p104-balanced-fusion-residual/invoice_engine/OVERLAY.json @@ -0,0 +1,96 @@ +{ + "band_product.py": { + "old_sha256": "7feb08718d511b45d0e9f927540115c9c1526f9b65ff3dadaef55b1ac8a2b19d", + "new_sha256": "b58c52fdb95499722618614b49a628fd8565d7a64173415961416039ed86aec6", + "edits": [ + [ + "\n@cache\ndef production_supplier(rank_log):\n from strong_complex import artifacts, word\n\n", + "\n@cache\ndef production_supplier(rank_log, stop_denominator):\n from strong_complex import artifacts, word\n\n" + ], + [ + " return ComplexRaw(atlas, fields, columns, **kw)\n\n return Positive(native, physical, 1 << rank_log)\n\n\n", + " return ComplexRaw(atlas, fields, columns, **kw)\n\n return Positive(native, physical, 1 << rank_log, denominator=stop_denominator)\n\n\n" + ], + [ + " binary = source_planner(profile.power, profile.floor)\n streams = [binary.image(1 << log_rank) for log_rank in profile.rank_logs]\n positive = production_supplier(profile.complex_log)\n if positive.owners <= 1:\n raise ArithmeticError(\"The numerical carrier needs independent rows\")\n", + " binary = source_planner(profile.power, profile.floor)\n streams = [binary.image(1 << log_rank) for log_rank in profile.rank_logs]\n positive = production_supplier(profile.complex_log, profile.positive_stop_denominator)\n if positive.owners <= 1:\n raise ArithmeticError(\"The numerical carrier needs independent rows\")\n" + ], + [ + " bit,\n self.profile.complex_log,\n partial(production_supplier, self.profile.complex_log),\n )\n\n", + " bit,\n self.profile.complex_log,\n partial(production_supplier, self.profile.complex_log, self.profile.positive_stop_denominator),\n )\n\n" + ] + ] + }, + "calibration.py": { + "old_sha256": "c36a253ab22f77381fe3e36889c9175680eadfd4a1203f2047141dc7a772f679", + "new_sha256": "444f185c619ef01bdea6328af3dc7ba30014b5cfebe7d1de875966e656fd57ff", + "edits": [ + [ + " ordinary: Fraction\n kappa: Fraction\n\n\n", + " ordinary: Fraction\n kappa: Fraction\n positive_stop_denominator: int = 10**14\n\n\n" + ], + [ + " kappa=Fraction(\"0.00389011527141\"),\n)\nPROFILES = {\"compact\": COMPACT, \"high-rate\": HIGH_RATE, \"price-match\": PRICE_MATCH}\n\n\n", + " kappa=Fraction(\"0.00389011527141\"),\n)\nSPLIT_TARIFF = replace(\n HIGH_RATE,\n rank_logs=(106_811_524, 1_708_984_375, 27_343_750_000,\n 437_500_000_000, 7_000_000_000_000, 112_000_000_000_000),\n power=268,\n floor=1 << 50,\n bit_c=Fraction(280312348082011, 2**56),\n ordinary=Fraction(\"0.0038901152863925\"),\n kappa=Fraction(\"0.003890115286352\"),\n)\nSPLIT_TILT = Fraction(593, 2048)\nPRODUCTIVE_TILT = Fraction(491, 1024)\nSPLIT_WEIGHT = Fraction(1, 64)\nFIXED_STOCK = replace(SPLIT_TARIFF, kappa=Fraction(\"0.0038901152863924\"),\n positive_stop_denominator=10**17)\nSMALL_GAP = replace(FIXED_STOCK,\n rank_logs=tuple(64*height for height in FIXED_STOCK.rank_logs),\n power=285,\n floor=1 << 47,\n bit_c=Fraction(280312348082137, 2**56),\n ordinary=Fraction(\"0.00389011528659083\"),\n kappa=Fraction(\"0.0038901152865907\"),\n)\nPROFILES = {\"compact\": COMPACT, \"high-rate\": HIGH_RATE, \"price-match\": PRICE_MATCH,\n \"split-tariff\": SPLIT_TARIFF, \"fixed-stock-stop\": FIXED_STOCK, \"small-gap\": SMALL_GAP}\n\n\n" + ], + [ + "\n\ndef prices(profile):\n bit_loss = debit(134, 127, profile.power, profile.bit_c, profile.floor, 5)\n numeric_loss = debit(153, 129, COMPLEX_POWER, COMPLEX_C, COMPLEX_FLOOR, 1)\n result = []\n", + "\n\ndef split_tariff_debit(profile):\n floor = profile.floor\n scale = 4 * (134 * 127) ** profile.power * floor\n assert Fraction(1024 * floor, 15 * (floor - 2)) < 69\n assert 69**100 < 2**611\n bound = Fraction(611, 100) + profile.bit_c * (scale - 1).bit_length()\n return -(-bound.numerator // bound.denominator)\n\n\ndef prices(profile):\n bit_loss = (split_tariff_debit(profile) if profile.power in (SPLIT_TARIFF.power, SMALL_GAP.power)\n else debit(134, 127, profile.power, profile.bit_c, profile.floor, 5))\n numeric_loss = debit(153, 129, COMPLEX_POWER, COMPLEX_C, COMPLEX_FLOOR, 1)\n result = []\n" + ], + [ + " result.append((height, covered, rate))\n previous = rate\n if not (\n profile.kappa + 4 * GAP < profile.ordinary\n and profile.kappa + 5 * GAP < COMPLEX_C - Fraction(numeric_loss, profile.complex_log)\n ):\n raise ArithmeticError(\"The numerical consumer cannot receive these prices\")\n", + " result.append((height, covered, rate))\n previous = rate\n gap = Fraction(1, profile.positive_stop_denominator)\n if not (\n 0 < gap <= GAP\n and profile.kappa + 4 * gap < profile.ordinary\n and profile.kappa + 5 * gap < COMPLEX_C - Fraction(numeric_loss, profile.complex_log)\n ):\n raise ArithmeticError(\"The numerical consumer cannot receive these prices\")\n" + ] + ] + }, + "check_product.py": { + "old_sha256": "5ace944e196d730ba966c042ddff6eccd2022e04f721619dfe47f45eefd64177", + "new_sha256": "3caf1264c85faa30dd2c599c3d3521059f25a366d64df995bd145161fb608092", + "edits": [ + [ + "\n\ndef stock_and_public():\n from dataclasses import replace\n from calibration import COMPACT\n\n assert multiply(-741503, 466013) == -345550037539\n for x in (0, -1, 1, 37, -69, 2**16383 + 5):\n assert multiply(x, -997) == x * -997\n # Exercise the production stage body with a feasible rank and all 81 by 81 addresses.\n profile = replace(COMPACT, rank_logs=(1,))\n side = 3**4\n records = bytes((i * 97 + (i >> 4)) % 256 for i in range(side * side))\n", + "\n\ndef stock_and_public(profile):\n from dataclasses import replace\n assert multiply(-741503, 466013, profile=profile) == -345550037539\n for x in (0, -1, 1, 37, -69, 2**16383 + 5):\n assert multiply(x, -997, profile=profile) == x * -997\n # Exercise the production stage body with a feasible rank and all 81 by 81 addresses.\n profile = replace(profile, rank_logs=(1,))\n side = 3**4\n records = bytes((i * 97 + (i >> 4)) % 256 for i in range(side * side))\n" + ], + [ + "\n\ndef physical_product():\n from binary_receiver import Receiver\n from module_atoms import balanced_widths\n", + "\n\ndef physical_product(profile=None):\n from binary_receiver import Receiver\n from module_atoms import balanced_widths\n" + ], + [ + " from triangular_ordinary import root_body\n\n stock_and_public()\n core = Receiver(2, balanced_widths(1), direct=True)\n calls = Counter()\n\n", + " from triangular_ordinary import root_body\n\n if profile is None:\n from calibration import COMPACT\n\n profile = COMPACT\n stock_and_public(profile)\n core = Receiver(2, balanced_widths(1), direct=True, profile=profile)\n calls = Counter()\n\n" + ] + ] + }, + "strict_moment.py": { + "old_sha256": "899ce86a0e5ae0455ea6cf97934658b2fd31b81d7111cb2bd636ce10e3e7264d", + "new_sha256": "f13c79ed45ce41c67a3f47c1767601be032ae65a908b9ee3a80643b0ac08689a", + "edits": [ + [ + "from math import isqrt\n\nfrom calibration import COMPLEX_C, COMPLEX_POWER\n\nUNIT = 1 << 112\n", + "from math import isqrt\n\nfrom calibration import COMPLEX_C, COMPLEX_POWER, PRODUCTIVE_TILT, SMALL_GAP, SPLIT_TARIFF, SPLIT_TILT, SPLIT_WEIGHT\n\nUNIT = 1 << 112\n" + ], + [ + "\n\ndef certify(word, c, tilt, drop, power, slack_bits, cutoff):\n if (word.power, word.floor, word.low_cut, word.high_cut) != (power, cutoff, 12, 12):\n raise ValueError(\"The evaluated strictifier differs from the installed one\")\n", + "\n\ndef certify(word, c, tilt, drop, power, slack_bits, cutoff, *, split_weight=2):\n if (word.power, word.floor, word.low_cut, word.high_cut) != (power, cutoff, 12, 12):\n raise ValueError(\"The evaluated strictifier differs from the installed one\")\n" + ], + [ + " gamma = Fraction(moment(paid, t + tilt, True) * UNIT, lower * power_interval(12, tilt)[0])\n loss = Fraction(moment(targets, t - drop, True) * power_interval(cutoff, drop)[1], lower * UNIT)\n deficit = 1 - alpha**power - 2 * gamma**power - loss**power\n if not (tilt >= c and deficit > Fraction(1, 1 << slack_bits)):\n raise ArithmeticError(\"The strict local surplus cannot pay all physical fringe axes\")\n", + " gamma = Fraction(moment(paid, t + tilt, True) * UNIT, lower * power_interval(12, tilt)[0])\n loss = Fraction(moment(targets, t - drop, True) * power_interval(cutoff, drop)[1], lower * UNIT)\n if split_weight != 2:\n # For x >= 1, (2x)^c - 1 <= (101/100)c x^tilt / tilt.\n assert 0 < c < Fraction(1, 250) and c <= tilt <= 1\n assert Fraction(101, 100)**250 > 2\n assert Fraction(101, 100) * c / tilt < split_weight\n deficit = 1 - alpha**power - split_weight * gamma**power - loss**power\n if not (tilt >= c and deficit > Fraction(1, 1 << slack_bits)):\n raise ArithmeticError(\"The strict local surplus cannot pay all physical fringe axes\")\n" + ], + [ + "\ndef both(binary, positive, profile):\n return (\n certify(\n", + "\ndef both(binary, positive, profile):\n if profile.power in (SPLIT_TARIFF.power, SMALL_GAP.power):\n return (\n certify(binary, profile.bit_c, SPLIT_TILT, PRODUCTIVE_TILT,\n profile.power, profile.floor.bit_length() - 2, 15, split_weight=SPLIT_WEIGHT),\n certify(positive, COMPLEX_C, Fraction(19, 64), Fraction(23, 64), COMPLEX_POWER, 14, 16),\n )\n return (\n certify(\n" + ] + ] + }, + "strong_binary.py": { + "old_sha256": "03ffb2075620fe793156e9bd22890185bef21e097abadba3a7d6cb5406051855", + "new_sha256": "74ba0d1aa9ca1dc2f4ade19ca1989f8dbf5329ddf3736bf3056280283f4fd660", + "edits": [ + [ + "@cache\ndef native_word(power=128):\n if power not in (128, 228):\n raise ValueError(\"Select a certified binary power\")\n raw = binary_ports(graph(), caller())\n", + "@cache\ndef native_word(power=128):\n if power not in (128, 228, 268, 285):\n raise ValueError(\"Select a certified binary power\")\n raw = binary_ports(graph(), caller())\n" + ] + ] + } +} diff --git a/research/p104-balanced-fusion-residual/invoice_engine/PREDECESSOR-SOURCES.json b/research/p104-balanced-fusion-residual/invoice_engine/PREDECESSOR-SOURCES.json new file mode 100644 index 0000000000..4afaeff69d --- /dev/null +++ b/research/p104-balanced-fusion-residual/invoice_engine/PREDECESSOR-SOURCES.json @@ -0,0 +1,633 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "AGENTS.md", + "git_blob": "ff81117fca368042f6092964d1f54eb4e6e08fb9", + "sha256": "fece32cdec9c1572ddce354a0b623459cb2c4ca162125d36d36262a92e3caa83", + "usage": "provenance" + }, + { + "path": "autoresearch.md", + "git_blob": "2fe84a7b30b1e26e60ce0ec4775894eb1831c5d6", + "sha256": "d16f0d3bb4d4b213d06c128db6d6460b0fe9ec1ac5a6c1ea1febf1db40e7b60d", + "usage": "provenance" + }, + { + "path": "CONTRIBUTING.md", + "git_blob": "5185786f2ec00f215019fb5777d70979429690a9", + "sha256": "fcd1a8d0e52342a23b8ffa9e905e85ccc539fb084145ef016dfc93cedfb3d924", + "usage": "provenance" + }, + { + "path": "certificates/selected-result.json", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1", + "usage": "provenance" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + }, + { + "path": "research/unconditional-batched-crt/CRT.md", + "git_blob": "d98dd8e368431cac33d5fc1c8c336696663641d6", + "sha256": "02c3a1e38cbee25aefe2640cc72676da62ba10eb7519fbcb9adb9d48b74eff2b", + "usage": "provenance" + }, + { + "path": "research/delayed-cover-physical-batch-routing/PROOF.md", + "git_blob": "af919b5ba2257c07ea17180f9b8c9fd457556079", + "sha256": "1c3dcd294d327a16fa081b7ea27497941ac6480d352f53e55e8b9e87f45d1454", + "usage": "provenance" + }, + { + "path": "notes/compact-control-movement.tex", + "git_blob": "06b6a9ef24245ac7b724c53a204635415b402357", + "sha256": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "usage": "provenance" + } + ], + "offline_predecessor": { + "head": "6285dd829114705862e8d91facaedc1f31d3cfcb", + "pr": 8030, + "tree": "3a1c001cbf175ae48ee1d56e56e4723eda1c8218", + "archive": "predecessor-8030.tar.gz", + "archive_sha256": "769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c", + "files": { + "ACTIVATION-SPACE.md": { + "size": 15082, + "mode": "100644", + "git_blob": "52f71ba75c3383401da5eda2c435a998629bc984", + "sha256": "e805961b0b3f5263cfb0b5c559dd99243330b8821d0a2c932c2bfabde79181c4" + }, + "ACTUAL-SETUP.md": { + "size": 6161, + "mode": "100644", + "git_blob": "61deda9516719a7039b60a0bc0f53673ad7a252d", + "sha256": "071abc2a2f9ad6d53923ccbc3f0ef09ae31430dd1ba03f54bca2bb661cda954b" + }, + "APPLICATION.md": { + "size": 11870, + "mode": "100644", + "git_blob": "07f01dadb8160dc44875a55d0884780a9ffb3649", + "sha256": "e84215c5ca9faeeb5aa9567fe6db0f1dc817bbc909c8c4e6caf3aa6d65ca938a" + }, + "BAND.md": { + "size": 16863, + "mode": "100644", + "git_blob": "bf1d63a1b7219b46dc935e734adcb22d84cac1f1", + "sha256": "4c0adb553b4357ead618e26af4fe8c600fdafc816449c54b48a9b2dfa0cff494" + }, + "LICENSE": { + "size": 11357, + "mode": "100644", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "LINEAR-GEOMETRY.md": { + "size": 21359, + "mode": "100644", + "git_blob": "b07c2127327faceb59c4e6833e592cb96c98600a", + "sha256": "8f6a9045ebcb4b8ddeb6339e7414bc897a6583e02ae689b15d4dac0394659550" + }, + "NOTICE.md": { + "size": 4296, + "mode": "100644", + "git_blob": "10167a0c8a4f2ec6af86f16acc6cad577e5aa713", + "sha256": "c00f5acddbb6516a69f1fd9a3ef01e737f4c10fabb36a19eef5623b1fbc1edbe" + }, + "README.md": { + "size": 7097, + "mode": "100644", + "git_blob": "5349b7f95653fbc85557b44540bcdf587d3b03aa", + "sha256": "0814b1c07155a037347127fc941c47ec3d5c23b8e8c06d23f46993085f0f6798" + }, + "REQUIREMENTS.json": { + "size": 6970, + "mode": "100644", + "git_blob": "64a217df2fc0012b7aab402ceeb3d5fae1f2ce9a", + "sha256": "6de3056c25423a952d35c89f661ba511594981544c4dd270f6a5b58920edb1aa" + }, + "SOURCES.json": { + "size": 3201, + "mode": "100644", + "git_blob": "94e74a7e0202e088a4fc78e7fd4aedbfda4c7043", + "sha256": "0d22a7cfdde48de7a106fca872601d5ed345a4ae3631b0acff2e05407eae2e65" + }, + "STRONG-BINARY.md": { + "size": 13442, + "mode": "100644", + "git_blob": "530be21be91f5988cb22feea134613122f9cf040", + "sha256": "548e4d8e2290c4e58845ddd20f9099d9fc866cd3b19997ad0791b056e66ccd92" + }, + "STRONG-COMPLEX.md": { + "size": 13932, + "mode": "100644", + "git_blob": "e9c08411e4cbdddb3a2c8bb1e19bc59e8c9ba6be", + "sha256": "724e816015c2329414d503a7b29683bf563be4b7469a8149cfe2cfc888696b44" + }, + "TASK.json": { + "size": 5897, + "mode": "100644", + "git_blob": "baff001ee17330bb0a4745161fc4bec7f1b369f5", + "sha256": "9372161b8b3de4bb6ec5efa1f3519a0bbe45a87c2cc8d1c5a6f76bd6f2c0da56" + }, + "VERIFICATION.md": { + "size": 6883, + "mode": "100644", + "git_blob": "00890cd08a955dcecd1b8da12478853096cd78de", + "sha256": "1906c8a2564b83df5ed386ffea3ba8c675c225051ff9800d0147223cea0fe1bd" + }, + "VERIFY.json": { + "size": 2415, + "mode": "100644", + "git_blob": "549567731dde171633082c211dd860ed8f457c19", + "sha256": "9b935893bb78c26ff753e21f290d3007762cc8f3c1781e06c13bd628632f82de" + }, + "band_compiler.py": { + "size": 3702, + "mode": "100644", + "git_blob": "49d3675027743cb7f1ed91765da5b92ba0819a90", + "sha256": "64d96e1b732117983bf5f5cba3c59ba91b672ae0f03fc23477c8727c4109a701" + }, + "band_positive.py": { + "size": 3683, + "mode": "100644", + "git_blob": "d2e6cf98c50e5a9a11ef41d5793921890bc6527d", + "sha256": "a279e7f4261f947f32f6b0e641bacf95b69755e7ac9263e3df60698bb425b5e8" + }, + "band_product.py": { + "size": 4311, + "mode": "100644", + "git_blob": "4fba42dc54ac9ccfcebe35ecbf5b4a16f130455f", + "sha256": "7feb08718d511b45d0e9f927540115c9c1526f9b65ff3dadaef55b1ac8a2b19d" + }, + "binary_receiver.py": { + "size": 4436, + "mode": "100644", + "git_blob": "d6652929234d9232d824603e15ebc2990047d216", + "sha256": "2be42f476aa71cc2d2ad44392113151e101e56f7a09b7264fc98a74393756372" + }, + "build_charts.py": { + "size": 1333, + "mode": "100644", + "git_blob": "65492d9f8d403e1f467957501ad6dd1bfd9a23ac", + "sha256": "5ae0a7e6509ed81b03e42534ea2a82a01b8edf5dec3ef9d9b9dca49bd424725c" + }, + "calibration.py": { + "size": 2963, + "mode": "100644", + "git_blob": "9992aee320983f7e0fcbd650643d2dcc4674e3c8", + "sha256": "c36a253ab22f77381fe3e36889c9175680eadfd4a1203f2047141dc7a772f679" + }, + "check_activation_space.py": { + "size": 2953, + "mode": "100644", + "git_blob": "5dfbd8e718da6bf451e440ffb0ac0bcb51a25b28", + "sha256": "51df69d2e2c396a8bf4d6f51572e3d04250237ee23b6d3bce25bf02625f07eee" + }, + "check_band.py": { + "size": 9019, + "mode": "100644", + "git_blob": "2a453d888f53d668ed573c2db80805f984f5f27a", + "sha256": "21343d0f71d82986a5cfeb2fd7f2da4836bee5ac54eeca3608d012f994c237f6" + }, + "check_dense_band.py": { + "size": 1335, + "mode": "100644", + "git_blob": "eabff4f9911ab4423ba38ea1c9a7ca737cb8e0e1", + "sha256": "7b06a2d8c0e23897b93dbd9075123553495d51258a63ee9b8c940d76cb1db44b" + }, + "check_epoch_reentry.py": { + "size": 2630, + "mode": "100644", + "git_blob": "fa1f66b44153505051ccd0c6461b7dce73394735", + "sha256": "5764c34527e1c7b06456864f8628fdd12cc8ec2f0c47f07d4a75151663abf129" + }, + "check_linear_geometry.py": { + "size": 8659, + "mode": "100644", + "git_blob": "e8c636fc61fb8e56bc840083768bfdd83c3e77af", + "sha256": "57ed4d3111de70a9ed1ac42717f7c2c9d02073878ca2b3e211cb22e2989c5616" + }, + "check_product.py": { + "size": 4876, + "mode": "100644", + "git_blob": "c1af1bd9cc64615041a0ea908ebf4d66076936de", + "sha256": "5ace944e196d730ba966c042ddff6eccd2022e04f721619dfe47f45eefd64177" + }, + "check_strong_binary.py": { + "size": 9959, + "mode": "100644", + "git_blob": "05f8801667ef417fe63a710c01ef8d94a3df0f76", + "sha256": "dd5acaa148e4bf04fd395515010660678600e7fc1e8ef806c6446a448568aa8b" + }, + "check_strong_complex.py": { + "size": 9287, + "mode": "100644", + "git_blob": "cc1232dabcf0523dd22ac3a23c2bf78b49620e90", + "sha256": "ab3ae76bfbd2238d7c41b130a4de8f73f65f7bec3bba92973d914abaaa72cd0a" + }, + "check_strong_physical.py": { + "size": 3512, + "mode": "100644", + "git_blob": "754f4430b05a2d90c0228a468f26fe8f35409b96", + "sha256": "c1497710e88267cff463ca0ad47acca4d8e88d48c8c4cf563e6ad35c2836d978" + }, + "check_strong_raw_word.py": { + "size": 6304, + "mode": "100644", + "git_blob": "32d3cc9d3ba4c2c87dec73c0254b3bf7d69adf5a", + "sha256": "946fbb355f21536287a9af5812bc833c14a50a0aa0a455c5fdaff2b28ff15465" + }, + "check_weighted_binary.py": { + "size": 6921, + "mode": "100644", + "git_blob": "5e500f36231e9575041fec8c01726605ae629013", + "sha256": "fe70753a3c62f8e3b9b39e526311ae1e5bf4743bfba9d66f0320adcbaa52fade" + }, + "epoch_tape.py": { + "size": 6294, + "mode": "100644", + "git_blob": "2a54438538061dc06f3286ef9624f43c187abb0d", + "sha256": "c66b8c040571471170581b0c577a36f5d2c1283aac517bdc6f407122b945df04" + }, + "independent_binary_price.py": { + "size": 4835, + "mode": "100644", + "git_blob": "9cc55c5655f35f99aa017cad2e59ea4d0dcaac81", + "sha256": "1936595a79fbfa14ec74af3b4e521216740d00bd45f379b5e97a1440e5a2aaf9" + }, + "inputs/complex-source.json": { + "size": 1309, + "mode": "100644", + "git_blob": "6e1030bb2e40ec36e264a27a030dcbf8e2ee5554", + "sha256": "b33575085bcaf8e646ad7656d1f8d2c7ad402712e6b49efd307fc926f2fb39b0" + }, + "inputs/complex-source/BANK-FACTORS.json.gz": { + "size": 4098, + "mode": "100644", + "git_blob": "de611b5588be4ed1a22225b030c7994d0ef3e3f1", + "sha256": "b009cd6bb13036879214cb6d43beb923578ef7fb4c83f36a1cc971ab4ea23543" + }, + "inputs/complex-source/BIDIRECTIONAL-QUOTIENT-RECEIPT.json": { + "size": 1075, + "mode": "100644", + "git_blob": "7606122e82f72718048e6c53e9cd37ba684d11fc", + "sha256": "459f519593242a3e8ecf42817f178fb214a6833e0df0e1ce727c5809035d02de" + }, + "inputs/complex-source/BIDIRECTIONAL-QUOTIENT.json.gz": { + "size": 42126, + "mode": "100644", + "git_blob": "93b35fe94405b77409182cf0d3de06c2227ea096", + "sha256": "ed725d5c69a507352efc6a18f3e4f7e5c20592a655a7b80193034232feb43d6f" + }, + "inputs/complex-source/BIDIRECTIONAL.json.gz": { + "size": 115971, + "mode": "100644", + "git_blob": "3c91100fb02b95bf163fcccd1637dcc0bfc1b48a", + "sha256": "baf07c7085f588ce06201e2a6bf4f5f58632801202783ca195d3b8369ff74836" + }, + "inputs/complex-source/HELPER-SPLITS-RECEIPT.json": { + "size": 995, + "mode": "100644", + "git_blob": "f35d9f85be917ddc6f6743b4b45fd4a8274fc69c", + "sha256": "712b783baf1463b738bd5c5ad3023bf42681d7d0105dd550ba3549c02674f711" + }, + "inputs/complex-source/HELPER-SPLITS.json": { + "size": 3361, + "mode": "100644", + "git_blob": "a6225bf11bc9b0710f9f123da2143c1039e91dc0", + "sha256": "f70ba89a9ed5839476bbe298d4cb8f4d9eeb703621d5f478c884861cdd91fb20" + }, + "inputs/complex-source/LAYOUT.json.gz": { + "size": 7865, + "mode": "100644", + "git_blob": "3ee3637e63e4a2c135b29ae44b39937d6f33ab4b", + "sha256": "84cd1d11ff454eecf3504e4b3f26adc371539b17553bfce1bcfda7a331811998" + }, + "inputs/complex-source/LICENSE": { + "size": 11357, + "mode": "100644", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "inputs/complex-source/PARENT-NOTICE": { + "size": 1694, + "mode": "100644", + "git_blob": "fe51894a1a630c6feee4b13da2a0499e41ee6edf", + "sha256": "b213998c8dae6d88e4a1f0fd17c81dd78c31ef35bc9460fa16ca692326f1a02b" + }, + "inputs/complex-source/WORD.json.gz": { + "size": 617321, + "mode": "100644", + "git_blob": "31786df96c1da3fe7adc42e30839265b29a90964", + "sha256": "731246c085638706bdb97e7e88618f8923e27ee4ce8eb4869f0847f8f4699f7c" + }, + "inputs/complex-source/replay.py": { + "size": 10929, + "mode": "100644", + "git_blob": "129817a60c7949749d22b9a0523aa27cea4780c9", + "sha256": "9c847a1242e730acf1dfd3a83f4801470e3e2da6c3079f53ccb7ada620b37a7b" + }, + "inputs/complex-source/verify_bidirectional.py": { + "size": 6798, + "mode": "100644", + "git_blob": "dad44147182f126ff75757bd14977d04272aed3c", + "sha256": "ef85db5c6f348b55e0db4d61517dde6a58b027737037e14b9fdea04f8b96e716" + }, + "inputs/complex-source/verify_component.py": { + "size": 7051, + "mode": "100644", + "git_blob": "6f2aff9a042ced040502e3e9fef0b47adc428f59", + "sha256": "163b1ca3a35531da94ef454229f040592c754675f59dfb805d0a9aadb33b8d65" + }, + "inputs/complex-source/verify_split_helpers.py": { + "size": 3731, + "mode": "100644", + "git_blob": "d596f75f1ff185c642f66209f04315d4770a1186", + "sha256": "6a0b59657bd1902d19b9c0f8badef2caa13c8ba84e0311550d6391360bdf186b" + }, + "inputs/new-charts.json.gz": { + "size": 1464, + "mode": "100644", + "git_blob": "04d818a87cac2b384cba4358b26d6e40d592552f", + "sha256": "b626b1ebc3359a36c4437b6916a340597bc74403b65f5a05f057602f5b6d35b0" + }, + "inputs/review.json": { + "size": 1445, + "mode": "100644", + "git_blob": "be3441d8ebb63d2235593a74c2a186dcea711dff", + "sha256": "614a5d273fc8a676b12d512ae9282f88990e696f978a2800f6cd7f986d295874" + }, + "inputs/review/check_complex.py": { + "size": 6659, + "mode": "100644", + "git_blob": "e1c0793e65ee4968f69f02ff947719ada284cc42", + "sha256": "ce8dc94ccc9fc780b991aad35aceba03b95335f9fd5b77235deb9e1a7f52e9f8" + }, + "inputs/review/check_periodic.py": { + "size": 7672, + "mode": "100644", + "git_blob": "f18ce6df234bcddb21fd46871773f25a66cf9fa5", + "sha256": "c1a5c81b5a4121498886758dd021ffdaa237c9fdc6e71e0d315a80947edc70d5" + }, + "inputs/review/check_powered.py": { + "size": 5924, + "mode": "100644", + "git_blob": "2f1c1192cdc2fe298622a837f830182e5c231c0b", + "sha256": "fc81d8d652b4290f473874114f72d4c7c8213ee4f26f5be8968894e01f786c35" + }, + "inputs/review/clifford_exact.py": { + "size": 6824, + "mode": "100644", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + "inputs/review/graph_identity.py": { + "size": 3801, + "mode": "100644", + "git_blob": "b372fd19ed4d24a630d04d3e51f9c7e55bf8e902", + "sha256": "90440581667a00a8e0a8e02a8a5a196a88dc0edb48eb8e89c22603e615524681" + }, + "inputs/review/native_verify.py": { + "size": 12323, + "mode": "100644", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + }, + "inputs/triangular.json": { + "size": 1314, + "mode": "100644", + "git_blob": "349cba11da90a2ff5539dec904389cb904899b52", + "sha256": "8474fd210582be93568bef852910cc9a11fbfc5da710e29dd4ce50fbf47be54d" + }, + "inputs/triangular/LICENSE": { + "size": 11357, + "mode": "100644", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "inputs/triangular/NOTICE.md": { + "size": 3860, + "mode": "100644", + "git_blob": "9323d93ce13ff8f924006a4218f94efb9edebc52", + "sha256": "7ec57034ab47631a47e35ab9cd86a563a6a4bb2ce7397d545861f898281c696c" + }, + "inputs/triangular/direct_body.py": { + "size": 6255, + "mode": "100644", + "git_blob": "e8d742d9efab1be4283c7b13d0a17c6faad0d989", + "sha256": "f4ca3082b95f958b50f84a3c138667add0051d6a796e7f63afe95d41cf24e7af" + }, + "inputs/triangular/inputs/retained.json": { + "size": 6679, + "mode": "100644", + "git_blob": "43a35ae8c03f612b57705b3b80caa38f5d91ae22", + "sha256": "4d0dd81eb156c97403d752a3dc654d85a93b0284aed8cfa5eed840259f6abd88" + }, + "inputs/triangular/inputs/retained.tar.gz": { + "size": 1083295, + "mode": "100644", + "git_blob": "c1a75d8f555f109cb522d3050ce00d75b20efdb8", + "sha256": "77742c09b088f27e8742c3fad7b7148d3397e4d51b95312106f39a8970165903" + }, + "inputs/triangular/limb_scale.py": { + "size": 3839, + "mode": "100644", + "git_blob": "2c7243ddb889b5fd858d0b6714a43b5af02bfb78", + "sha256": "ed7c27348c2bc8259683b617c45bb0ee6aacb781c0ad04168c59035b7b5cf8ff" + }, + "inputs/triangular/multiplier.py": { + "size": 4185, + "mode": "100644", + "git_blob": "512cc8cba444b4579b414bef843d7d376ecf4067", + "sha256": "e805fb05caaa76d4c65dc3a55b99c6332a1c3772516547cf24e8027ade718cf4" + }, + "inputs/triangular/quotient_route.py": { + "size": 11607, + "mode": "100644", + "git_blob": "fc8502647a9626ffd4047cb7046b80ecc83afb5c", + "sha256": "3243f45d6097a80bc8b077d8682426e4555f6c4a3097bd0a12ffd4f1f5c45ba8" + }, + "inputs/triangular/receiver.py": { + "size": 10352, + "mode": "100644", + "git_blob": "37646beb735d42e86f3f9d54b6d0997a7eee30da", + "sha256": "09d2e9508e3e34934a6f2132c6e864f6b4ba68fa96aaadbec0a1902aa7762642" + }, + "inputs/triangular/retained.py": { + "size": 1830, + "mode": "100644", + "git_blob": "47d494454262cf9a12ec9ca57b9da5bb38dd5bc6", + "sha256": "970e71bb0fcab41a03ccc5068ddc5e0df5c00953098f542fdc1a3e0e2048ffda" + }, + "inputs/triangular/same_order_body.py": { + "size": 6478, + "mode": "100644", + "git_blob": "0b7afa194a7152cf221964a14ebfffc642209fcf", + "sha256": "56a15ce431daf25794741cb5157e136ce509ed646b32aaea34348088396e459d" + }, + "inputs/triangular/staged_carriers.py": { + "size": 5578, + "mode": "100644", + "git_blob": "4dd73b0d36850c80e2f446096d971fd0b1b409aa", + "sha256": "6c925ae4b39dc9999ac5891d1a27dcbb38e129a36e1473b2b418f27a806b6fc4" + }, + "inputs/triangular/triangular_ordinary.py": { + "size": 3674, + "mode": "100644", + "git_blob": "f9f44f18527ae0c7f705558962aea519ca7bc107", + "sha256": "1f69f21881229566e0b251a2edd8a3c9ac6409eeebdb68ee046f27e74dd8af71" + }, + "lean/.gitignore": { + "size": 7, + "mode": "100644", + "git_blob": "01f8cdb637da2370fa79960e25efa59dd8cffd6d", + "sha256": "fde850d24186b6e99c8c0debd641fb3ab85198b109eb66f71a1fea02bd6ea1b3" + }, + "lean/BandFlow.lean": { + "size": 15134, + "mode": "100644", + "git_blob": "71e109b0abba123f91302a913cf51d5e3b2ac631", + "sha256": "c47338afcf5a35e992df47ea4d11e89709a848041ef680a77c39acd57384342a" + }, + "lean/Profiles.lean": { + "size": 2148, + "mode": "100644", + "git_blob": "2423069aa74f1c739858c5a8fb272c0665cd9879", + "sha256": "53bcad234dac897478d35260598d602cc79b545e979df18efb6f82ba6667617a" + }, + "lean/SquareSieve.lean": { + "size": 6694, + "mode": "100644", + "git_blob": "183d1e6705049461e4375fe2b4d21cacc324d10d", + "sha256": "4aa9e9693a8006981aac783f7a7302b4102505c544203f69062d3073c4e83618" + }, + "lean/lake-manifest.json": { + "size": 3551, + "mode": "100644", + "git_blob": "f27574d9f7d30f24567df0789cd81751f0819998", + "sha256": "3b30b2d7e59f23142ff2028b8beec632936359b7fe3e904e8984d842a44b1488" + }, + "lean/lakefile.toml": { + "size": 304, + "mode": "100644", + "git_blob": "cac451e8fbd658c5c88eb6b8511b943bfce75d07", + "sha256": "34e23113b620bf67211a36526ebb9a768d4cddb5ba2e990b8d3222540875e19d" + }, + "lean/lean-toolchain": { + "size": 25, + "mode": "100644", + "git_blob": "ba8ebf2dbaf6a668cd2a0e086186d6d569b69ff5", + "sha256": "d5edba4e4b8faad9c1baeadb265716d20d03be4d1a2647dc5e35b0c0325bea7b" + }, + "linear_geometry.py": { + "size": 3145, + "mode": "100644", + "git_blob": "f042bfa42f75bfb3d2b59501b13f54aad197a9bf", + "sha256": "6628fcddf1eed2ffa39c2d3256d79577b950e04c4a688161a66ba92baa3fb7c2" + }, + "ordinary_carrier.py": { + "size": 2681, + "mode": "100644", + "git_blob": "15382c98cb39d8f0ef999f8cfd46aaa5e23e8a96", + "sha256": "c8e87147661a394bc7e1b879744546b7697fcde7f3636556b39ca1623a9d7b31" + }, + "positive_dispatch.py": { + "size": 2393, + "mode": "100644", + "git_blob": "6846c690e0292e9c9f1d19fb6cac3713ea0c1e73", + "sha256": "8bd147f6fd1a22b8b4519d165a290b46ab50870246345cbb0740a405f49a9a73" + }, + "prior_setup.py": { + "size": 2905, + "mode": "100644", + "git_blob": "282d755de195893b85f33ceed9d5d017e3e97a25", + "sha256": "28fa12b5290033e50e145e374d2c42b564b30ecdb2f4309213834b5a10981d5a" + }, + "resources.py": { + "size": 2918, + "mode": "100644", + "git_blob": "36cf93f347623bfe15a8fdf9a0178db68dd155a8", + "sha256": "13027d55cb74e2f53f2c182c6dce3a99c0886d2f6bc51da62df5746e3054f94e" + }, + "strict_moment.py": { + "size": 2618, + "mode": "100644", + "git_blob": "f95dff0192befe7631d1df9fc8261de98e051765", + "sha256": "899ce86a0e5ae0455ea6cf97934658b2fd31b81d7111cb2bd636ce10e3e7264d" + }, + "strong-bit.json.gz": { + "size": 135471, + "mode": "100644", + "git_blob": "16f8cafb1c4d139a99a62e46eb40c118e6176c34", + "sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326" + }, + "strong_binary.py": { + "size": 4722, + "mode": "100644", + "git_blob": "913e4faaa31709796e0bc70d9ae120555acadad0", + "sha256": "03ffb2075620fe793156e9bd22890185bef21e097abadba3a7d6cb5406051855" + }, + "strong_complex.py": { + "size": 4381, + "mode": "100644", + "git_blob": "3d5fa9f9b2bdecd9aa179af7d1fc55d3e998bb4e", + "sha256": "0c9a103a322df6c18b9b3754e5756f07ce02130a131d20a1bb254d47175cfa5e" + }, + "upstream.py": { + "size": 1128, + "mode": "100644", + "git_blob": "f68872df228508a3227cbb406caab27ddd0e5655", + "sha256": "d9b079965d8abc04be3eda662fc84ba9a08c4f03e8ccc7bd3e775876164e6c10" + }, + "verify.py": { + "size": 3506, + "mode": "100644", + "git_blob": "c0b5cbeba13d70d534e697c4288b62fb86259430", + "sha256": "20ab1e4bc2d2944ddb59f774c09977439a70e10389b7f28454f0b00fd81d5cc9" + }, + "verify_formal.py": { + "size": 1959, + "mode": "100644", + "git_blob": "0f35787441541c83b82422a81e1a28a7fc3f6550", + "sha256": "b9e908e09467794a52fd10d32ed6a1eb6f63e1d37726520af493825285f1db85" + }, + "verify_sources.py": { + "size": 2347, + "mode": "100644", + "git_blob": "a3ef7f778829e73ee80fcda0fb0df3f864359b84", + "sha256": "6ef97baeafb01cb0fc9afb6ff7beb779cea93755620f836f9e4db5307e3cd365" + } + } + }, + "paired_native_source": { + "pr": 8027, + "head": "fb9b6a7b0d27da1cf98430893a3016bf811e2aa4" + }, + "comparative_profile": { + "pr": 8032, + "head": "9c5881ab4015854c68d5f5a3fc7d97f68505cc4c", + "kappa": "0.00389011528633", + "largest_BIT_rank_exponent": 114688000000000, + "sufficient_public_exponent": 136798773006437 + }, + "split_tariff_comparator": { + "pr": 8033, + "head": "a1313ff9f84fd00d50b282fe432e522191277821", + "kappa": "0.003890115286352", + "largest_BIT_rank_exponent": 112000000000000, + "sufficient_public_exponent": 119466661575676 + }, + "signed_inequality_source": { + "commit": "4f7c67ae387cc91580f469aeda4d508b372b9ec1", + "path": "research/p104-dual-supplier-lift/complex/supplier_gate.py", + "sha256": "3796b2e5a27f3caa142d16364154788e60d0099f1e24a8dcd028e4fbd35a84ca", + "kind": "external exact provenance of the self-contained expression transcription" + } +} diff --git a/research/p104-balanced-fusion-residual/invoice_engine/RESULT.json b/research/p104-balanced-fusion-residual/invoice_engine/RESULT.json new file mode 100644 index 0000000000..1deecfb332 --- /dev/null +++ b/research/p104-balanced-fusion-residual/invoice_engine/RESULT.json @@ -0,0 +1,172 @@ +{ + "baseline_kappa": "243132205397/62500000000000", + "fixed_stock": { + "band_floor": 1125899906842624, + "bit_trial": "280312348082011/72057594037927936", + "certified_surplus_floor_e24": 137497115659, + "complete_requirements": { + "all_size_margin_lower_at_entrance": 46056909860339, + "binary_entrance_logs": [ + 107240551, + 1816224990, + 29159975054, + 466659975118, + 7466659975182, + 119466659975246 + ], + "binary_rank_logs": [ + 106811524, + 1708984375, + 27343750000, + 437500000000, + 7000000000000, + 112000000000000 + ], + "complex_rank_log": 1600000, + "component_exponent": "39/10000", + "full_binary_debit": 21, + "full_positive_debit": 10, + "initial_s": 119466661575677, + "kappa": "9725288215981/2500000000000000", + "linear_geometry": { + "actual_dense_root_entry_log2": 192153584101141164, + "first_extent_bits_minus_b": -119466661575672, + "largest_axis_width": 96076792050570582, + "last_extent_bits_minus_b": -119466661575671, + "log2_axis_count": 119466661575617, + "minimum_width": 61166930726747904, + "private_clock_log2_upper": 98505088387899413501, + "public_offset_above_2_to_A": 2 + }, + "log2_all_fixed_setup_upper": 114688000000000003, + "log2_dominant_J": 114688000000000000, + "log2_rank_part_of_recurring_envelope": 11468800000000000000, + "log2_sufficient_public_precision": 119466661575676, + "native_depth_bound_at_entrance": 75859736, + "native_volume_log2_upper": 65536, + "ordinary_rate": "1556046114557/400000000000000", + "positive_context_cost_bitlength_upper": 58, + "prior_geometry_at_same_n": { + "actual_dense_root_entry_log2": 3380401600608611737324541881004, + "first_extent_bits_minus_b": -119466661575672, + "largest_axis_width": 1690200800304305868662270940502, + "last_extent_bits_minus_b": -119466661575671, + "log2_axis_count": 119466661575573, + "minimum_width": 913426126594389717785472533056, + "private_clock_log2_upper": 14965573658122731675945438736809984, + "public_offset_above_2_to_A": 2 + }, + "rate_ticks_e18": [ + 3874359003879035, + 3890040022613520, + 3890114220608457, + 3890115234520437, + 3890115283396085, + 3890115286392500 + ], + "raw_structural_nodes_log2_upper": 8113, + "stripe_excess_log_at_entrance": 9943087644814, + "stripe_margin_at_entrance": 49790243143022, + "uniform_payload_slope": "759627333958522/9126961279296875" + }, + "factor_power": 268, + "g": "1/100000000000000000", + "kappa": "9725288215981/2500000000000000", + "positive_paid_cap": "1274827/327680000", + "signed": { + "functional": 4, + "ordinary_margin": "3/50000000000000000", + "positive_margin": "27837635479/80000000000000000", + "smallest_margin": "1/1000000000000000000", + "strict": 54 + } + }, + "fixed_word_raw_interval": [ + "1945057643297230564998471/500000000000000000000000000", + "3890115286594461129996943/1000000000000000000000000000" + ], + "largest_gain": "2387/10000000000000000", + "near_crossing": { + "band_floor": 140737488355328, + "bit_trial": "280312348082137/72057594037927936", + "certified_surplus_floor_e24": 25356184201, + "complete_requirements": { + "all_size_margin_lower_at_entrance": 2957494058781171, + "binary_entrance_logs": [ + 6863391165, + 116238391229, + 1866238391293, + 29866238391357, + 477866238391421, + 7645866238391485 + ], + "binary_rank_logs": [ + 6835937536, + 109375000000, + 1750000000000, + 28000000000000, + 448000000000000, + 7168000000000000 + ], + "complex_rank_log": 1600000, + "component_exponent": "39/10000", + "full_binary_debit": 22, + "full_positive_debit": 10, + "initial_s": 7645866239991958, + "kappa": "38901152865907/10000000000000000", + "linear_geometry": { + "actual_dense_root_entry_log2": 12297829382473034412, + "first_extent_bits_minus_b": -7645866239991953, + "largest_axis_width": 6148914691236517206, + "last_extent_bits_minus_b": -7645866239991952, + "log2_axis_count": 7645866239991892, + "minimum_width": 3914683514875883776, + "private_clock_log2_upper": 6304325656722185444502, + "public_offset_above_2_to_A": 4 + }, + "log2_all_fixed_setup_upper": 7340032000000000003, + "log2_dominant_J": 7340032000000000000, + "log2_rank_part_of_recurring_envelope": 734003200000000000000, + "log2_sufficient_public_precision": 7645866239991957, + "native_depth_bound_at_entrance": 4779859471, + "native_volume_log2_upper": 65536, + "ordinary_rate": "389011528659083/100000000000000000", + "positive_context_cost_bitlength_upper": 58, + "prior_geometry_at_same_n": { + "actual_dense_root_entry_log2": 13846124956092873676081323544586924, + "first_extent_bits_minus_b": -7645866239991953, + "largest_axis_width": 6923062478046436838040661772293462, + "last_extent_bits_minus_b": -7645866239991952, + "log2_axis_count": 7645866239991842, + "minimum_width": 3741393315830320735193337899120896, + "private_clock_log2_upper": 61298988086563990959951325070812512256, + "public_offset_above_2_to_A": 4 + }, + "rate_ticks_e18": [ + 3874551620035190, + 3890052831589600, + 3890115024252961, + 3890115284762185, + 3890115286537883, + 3890115286590830 + ], + "raw_structural_nodes_log2_upper": 8623, + "stripe_excess_log_at_entrance": 626505740910746, + "stripe_margin_at_entrance": 3196427379085231, + "uniform_payload_slope": "23931754708979261/292062760937500000" + }, + "factor_power": 285, + "g": "1/100000000000000000", + "kappa": "38901152865907/10000000000000000", + "positive_paid_cap": "1274827/327680000", + "signed": { + "functional": 4, + "ordinary_margin": "9/100000000000000000", + "positive_margin": "5567523923/16000000000000000", + "smallest_margin": "1/1000000000000000000", + "strict": 54 + } + }, + "remaining_gap_upper": "3761129996943/1000000000000000000000000000", + "same_stock_gain": "101/2500000000000000" +} diff --git a/research/p104-balanced-fusion-residual/invoice_engine/check_profile.py b/research/p104-balanced-fusion-residual/invoice_engine/check_profile.py new file mode 100644 index 0000000000..fe3381b843 --- /dev/null +++ b/research/p104-balanced-fusion-residual/invoice_engine/check_profile.py @@ -0,0 +1,127 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Qualify both parameterized signed profiles with two directed price readers.""" +from collections import Counter +from dataclasses import replace +from fractions import Fraction as Q +import json +from pathlib import Path +import sys +from types import SimpleNamespace +from unittest.mock import patch + +sys.path.insert(0,str(Path(__file__).resolve().parent)) +from upstream import install + +install() +from band_product import production_supplier +from binary_receiver import Receiver, source_rule +from calibration import (COMPLEX_C,FIXED_STOCK,GAP,PRODUCTIVE_TILT,SMALL_GAP,SPLIT_TARIFF, + SPLIT_TILT,SPLIT_WEIGHT,prices) +from independent_binary_price import mass,rank_price,raw_moments +from module_atoms import balanced_widths +from outer_budget import qualify +from positive import power_le +from resources import requirements +from strict_moment import certify +from strong_binary import caller,graph,native_word + +RAW_LEFT = Q('0.003890115286594461129996942') +RAW_RIGHT = Q('0.003890115286594461129996943') + + +def check(ok,message): + if not ok: + raise ArithmeticError(message) + + +def reject(run,*args): + try: + run(*args) + except ArithmeticError: + return + raise ValueError('The corrupted control passed') + + +def check_profile(p,expected_debit,targets,paid): + v,c=p.power,p.bit_c + word=native_word(v) + check(Counter(x.rank for x in word.targets)==targets and Counter(x.rank for x in word.paid)==paid, + 'independent literal inventories agree') + check((word.ambient,word.floor,word.low_cut,word.high_cut)==(134,15,12,12), + 'installed word takes the certified physical positions and split cap') + t,z,w=1-c,SPLIT_TILT,PRODUCTIVE_TILT + denom=mass(targets,t,0) + alpha=mass(paid,t,1)/denom + gamma=mass(paid,t+z,1)/(rank_price(12,z)[0]*denom) + lam=rank_price(15,w)[1]*mass(targets,t-w,1)/denom + surplus=1-alpha**v-SPLIT_WEIGHT*gamma**v-lam**v + eps=Q(2,p.floor) + check(0mass(targets,t,1), + 'independent price passes and one excess rank-one cut fails') + certify(word,c,z,w,v,p.floor.bit_length()-2,15,split_weight=SPLIT_WEIGHT) + reject(certify,word,c,z,w,v,p.floor.bit_length()-2,15) + check(18_906**v+104_904**v+23_800**v<2**(18*v) and + 5**13>16*4**13 and 8*(Q(13,4)+Q(1,512))<27 and + 18*(Q(13,4)+Q(1,512))<60 and 15**v>=2*12**v and + 512*v<=min(p.rank_logs), 'actual order, splits, rank width and source enumeration') + check(2**64*(v+1)*2**(28*v)<2**(512*v) and + 872*(Q(13,4)+Q(2,512))*(512*v)<2**(512*v), 'generation and causal precision guard') + binary,numeric,rows=prices(p) + check(binary==expected_debit and numeric==10 and len(rows)==6,'complete BIT, positive and stage bills') + positive=COMPLEX_C-Q(numeric,p.complex_log) + g=Q(1,p.positive_stop_denominator) + signed=qualify(p.kappa,g,p.ordinary,positive) + reject(qualify,p.kappa,GAP,p.ordinary,positive) + reject(qualify,p.kappa,Q(0),p.ordinary,positive) + reject(qualify,p.kappa,g,p.kappa+4*g,positive) + reject(qualify,p.kappa,g,p.ordinary,p.kappa+5*g) + reject(prices,replace(p,positive_stop_denominator=GAP.denominator)) + res=requirements(p) + check(res['all_size_margin_lower_at_entrance']>0,'complete size, precision and stripe certificate') + control=Receiver(2,balanced_widths(1),direct=True,profile=p) + check(control.rule is source_rule(v) and control.rule.word is word and control.stock>0, + 'this profile enters the physical BIT receiver') + return {'kappa':str(p.kappa),'g':str(g),'bit_trial':str(c),'factor_power':v,'band_floor':p.floor, + 'certified_surplus_floor_e24':(surplus*10**24).__floor__(),'positive_paid_cap':str(positive), + 'signed':signed,'complete_requirements':res} + + +def check_stop_dispatch(): + check(power_le(4,3,128) and not power_le(4,4,128), 'integer discrimination at a feasible cutoff') + for den in (10**14,10**17): + check(not power_le(2,den,1<<1000) and power_le(1,den,1<<1000),'exact reduced power stop') + # Check the actual production supplier constructor and its cache key on two ranks. + with patch('strong_complex.artifacts',return_value=SimpleNamespace(graph=None,layout=None)), \ + patch('strong_complex.word',return_value=object()): + small=production_supplier(9,10**17) + old=production_supplier(9,10**14) + check(small is not old and small.carrier==old.carrier==512 and + small.denominator==10**17 and old.denominator==10**14, 'positive runtime policy and cache') + production_supplier.cache_clear() + + +def main(): + check_stop_dispatch() + T,P=raw_moments(graph(),caller()) + check(mass(T,1-RAW_LEFT,0)>mass(P,1-RAW_LEFT,1) and + mass(P,1-RAW_RIGHT,0)>mass(T,1-RAW_RIGHT,1), 'fixed-word raw directed bracket') + check(FIXED_STOCK.rank_logs==SPLIT_TARIFF.rank_logs and FIXED_STOCK.ordinary==SPLIT_TARIFF.ordinary + and FIXED_STOCK.bit_c==SPLIT_TARIFF.bit_c, 'fixed-stock comparison') + fixed=check_profile(FIXED_STOCK,21,T,P) + near=check_profile(SMALL_GAP,22,T,P) + check(SPLIT_TARIFF.kappa= 1 and exponent >= 0 + if r == 1 or exponent == 0: + return Q(1), Q(1) + h = r.bit_length()-1 + l2, u2 = log_series(Q(2)) + lm, um = log_series(Q(r, 1 << h)) + lo = down((h*l2+lm)*exponent/16) + hi = up((h*u2+um)*exponent/16) + elo, _ = exp_series(lo) + _, ehi = exp_series(hi) + return down(elo**16), up(ehi**16) + + +def moment(hist, exponent): + lo = hi = Q(0) + for r, count in hist.items(): + a, b = power(r, exponent) + lo += count*a + hi += count*b + return lo, hi + + +def surplus(target, paid, c, v, z, w, weight, keep): + t = 1-c + tl, th = moment(target, t) + pl, ph = moment(paid, t) + gl, gh = moment(paid, t+z) + ol, oh = moment(target, t-w) + cl, ch = power(12, z) + kl, kh = power(keep, w) + lo = 1-(ph/tl)**v-weight*(gh/(tl*cl))**v-(oh*kh/tl)**v + hi = 1-(pl/th)**v-weight*(gl/(th*ch))**v-(ol*kl/th)**v + return lo, hi + + +def difference(target, paid, k): + tl, th = moment(target, 1-k) + pl, ph = moment(paid, 1-k) + return tl-ph, th-pl + + +def agree(interval, reference): + assert max(interval[0], reference[0]) <= min(interval[1], reference[1]) + + +def main(): + ref = load_reference() + k, c, g = Q(194523, 50000000), Q(70084296829703, 2**54), Q(1, 10**17) + assert k == ref.K and g == ref.G + target, base = ref.load_inputs() + cases = {"baseline": (0, 0), "24 fusions": (24, 0), "25 fusions": (25, 0), + "one net rank-one deletion": (0, 1), "36 net rank-one deletions": (0, 36)} + report = {} + for label, (fusions, deletions) in cases.items(): + paid = base.copy() + paid[1] -= 2*fusions+deletions + paid[2] += fusions + assert min(paid.values()) > 0 + assert sum(paid.values()) == 104904-fusions-deletions + first_moment = sum(r*n for r, n in paid.items()) + assert first_moment == 285600-deletions + raw = difference(target, paid, k) + split = surplus(target, paid, c, 268, ref.Z, ref.W, ref.WEIGHT, 15) + agree(raw, ref.raw_difference(target, paid, k)) + agree(split, ref.powered_surplus(target, paid, c, 268, ref.Z, ref.W, ref.WEIGHT, 15)) + if deletions or fusions == 25: + assert raw[0] > 0 and split[0] > Q(2, 2**50) + ref.power_and_enumeration_checks(268, 2**50, c, sum(paid.values())) + else: + assert raw[1] < 0 and split[1] < 0 + report[label] = {"paid_count": sum(paid.values()), "paid_rank_sum": first_moment, + "raw": ref.enclosing_text(*raw, 18), + "split_268": ref.enclosing_text(*split, 18)} + shortenings = {} + for r in sorted(base): + if r == 1: + continue + paid = base.copy() + paid[r] -= 1 + paid[r-1] += 1 + assert sum(paid.values()) == 104904 and sum(q*n for q,n in paid.items()) == 285599 + raw = difference(target, paid, k) + split = surplus(target, paid, c, 268, ref.Z, ref.W, ref.WEIGHT, 15) + agree(raw, ref.raw_difference(target, paid, k)) + agree(split, ref.powered_surplus(target, paid, c, 268, ref.Z, ref.W, ref.WEIGHT, 15)) + assert raw[0] > Q(84,100) and split[0] > Q(79,100000) + shortenings[str(r)] = {"raw": ref.enclosing_text(*raw,18), + "split_268": ref.enclosing_text(*split,18)} + ref.power_and_enumeration_checks(268, 2**50, c, 104904) + assert len(shortenings) == 13 + report["single rank shortenings"] = shortenings + pos = surplus(ref.POS_TARGET, ref.POS_PAID, ref.POS_C, 128, Q(19,64), Q(23,64), Q(2), 16) + agree(pos, ref.powered_surplus(ref.POS_TARGET, ref.POS_PAID, ref.POS_C, 128, + Q(19,64), Q(23,64), Q(2), 16)) + assert pos[0] > Q(2, 2**15) + assert ref.bit_debit(268, 2**50, c) == 21 and ref.positive_debit() == 10 + levels = ref.stage_prices(c, 21) + cap = ref.POS_C-Q(10, 1600000) + strict, functional, positive_gap = ref.signed_margins(k, g, ref.ORDINARY, cap) + assert len(strict) == 54 and len(functional) == 4 + assert min(*strict, *functional, positive_gap) == Q(1, 10**18) + assert min(ref.signed_margins(k, 0, ref.ORDINARY, cap)[0]) == 0 + assert min(ref.signed_margins(k, g, k+4*g, cap)[0]) == 0 + assert ref.signed_margins(k, g, ref.ORDINARY, k+5*g)[2] == 0 + report["shared application"] = { + "positive_split_128": ref.enclosing_text(*pos, 18), "positive_cap": str(cap), + "ordinary_gate_margin": str(ref.ORDINARY-k-4*g), "positive_gate_margin": str(positive_gap), + "last_stage_headroom": str(levels[-1][2]-ref.ORDINARY), + "stage_rates": [str(level[3]) for level in levels], + "minimum_signed_gate_margin": str(min(*strict,*functional,positive_gap)), + "strict_gates": len(strict), "functional_gates": len(functional), + "kappa_target": str(k), "status": "conditional prices; physical word required"} + print(json.dumps(report, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-balanced-fusion-residual/manuscript/ARTICLE.md b/research/p104-balanced-fusion-residual/manuscript/ARTICLE.md new file mode 100644 index 0000000000..6abbc26db9 --- /dev/null +++ b/research/p104-balanced-fusion-residual/manuscript/ARTICLE.md @@ -0,0 +1,366 @@ +# A sharp exponent bound for the fixed P104 binary word + +*Seven-stage attainment on the 10⁻¹⁸ grid and the gap to κ = 0.00389046 · 22 November 2026* + +**Abstract.** For the productive and paid ranks of a specified 36-call P104 binary word, we determine the largest exponent on the 10⁻¹⁸ grid permitted by its raw funding condition. It is κ = 0.003890115286594461. The upper bound follows from a single crossing of the signed rank moment. For the matching construction we change the binary price and install seven retimed receivers. Both suppliers and the outer signed multiplier fund the exponent under the five inherited P104 premises. Reaching 0.00389046 would require a different inventory or funding argument. We give an exact price for one candidate change and a one-bit witness against every nonempty subset of its 36 placements. We also determine an independent communication optimum. Nine downward bits are necessary and sufficient for the fixed native operator, even with nonlinear encoders and feedback. The attaining word sends 18 fewer bits but costs more under the rank tariff. + +### What is being optimized + +For signed integers of at most n significant bits, the P104 transfer yields a fixed-alphabet multitape algorithm with the following time bound under its five framework premises. + +$$ +T(n)=O(n(1+\log n)^{1-\kappa }). +$$ + +The starting complete conditional comparison was κ₀ = 0.0038901152865907 in PR #8035. The binary service limits this construction. The numerical service and the signed multiplier must also admit the same κ. Ali Romman’s concurrent PR #8042 now matches our six-stage rate of 0.003890115286594445. Its seven retimed receivers use the same raw binary inventory at smaller ranks. Canonical main selects the independently reviewed conditional value 0.00363005817. [1–4] + +### Why separate the raw limit from its construction? + +A higher tensor power can reduce rounding and cutoff losses. It cannot change which ranks the caller produces or pays for. We therefore first count every rank and ask whether even an ideal compiler could fund the target. The signed counts admit a global upper bound. We then work backward from its last reporting tick to choose a dyadic price and seven finite receivers. The remaining gap motivates a different experiment. We follow the bit displaced by a cheaper MOVE through every subsequent reader and all 36 calls. This tests the mathematical assumption on which the proposed saving depends. [2, 4–6, 17, 18] + +## 1 A global upper bound from the signed rank counts + +A rank r carries weight $r^{1-c}$ at price c. Write Tᵣ for the number of productive labels of that rank and Pᵣ for the number of paid labels across the 36 calls. Put aᵣ = Tᵣ − Pᵣ and $M(t)=\sum _{r}a_{r}r^{t}$ with t = 1 − c. The source requires M(t) > 0 to fund a binary price. A negative margin would survive arbitrarily small implementation losses. Testing nearby prices locates one zero, but cannot rule out later recovery. The signs of the counts suggest dividing by 8ᵗ and pairing deficits with credits at higher ranks. [2, 6, 18] + +**Theorem 1 Single crossing after normalization.** Let the ranks and pivot p be positive. Suppose the signed coefficients below p are nonpositive with at least one strictly negative. At the distinct ranks r₁ < ⋯ < rₘ above p, suppose every tail Sⱼ = Σᵢ₌ⱼᵐ aᵣᵢ is nonnegative. Then M(t)/pᵗ is strictly increasing for every t ≥ 0. + +**Proof.** For r < p, the derivative of the normalized term is aᵣ(r/p)ᵗ log(r/p). Each contribution is nonnegative and at least one is positive. The term at p is constant. For the upper ranks set qⱼ = (rⱼ/p)ᵗ log(rⱼ/p) and q₀ = 0. The derivative with respect to x of xᵗ log x is xᵗ⁻¹(1 + t log x), positive on x > 1. The qⱼ therefore increase. Summing by parts now writes the high-rank derivative as a sum of nonnegative terms. + +$$ +\sum _{j=1}^{m}a_{r_{j}}q_{j}=\sum _{j=1}^{m}S_{j}(q_{j}-q_{j-1})\ge 0. +$$ + +In the 36-call binary word take p = 8. At ranks 1 through 7 the coefficients are −48,972, −44,892, −1,980, −900, −1,044, −2,916 and −480. The coefficient at the pivot is +14,520. Each of the seven higher deficits of 444 labels at ranks 14, 21, 28, 35, 42, 49 and 56 pairs with 444 credits one rank higher. There are also 444 productive labels at 64 and 222 at 127. Thus every upper tail is at least 222. The endpoint checks give M(0) = −85,998 and M(1) = 1,506. There is exactly one zero. For t ≤ 0 the rank-one deficit alone exceeds all 18,294 positive labels, giving M(t) ≤ −30,678. + +A second directed calculation encloses the raw margin at prices with numerators 4931306978008479291729931451 and 4931306978008479291729932717 over 2¹⁰⁰. At the lower price its numerator in units of 2⁻¹¹² is between 1,457,154,697,782 and 1,457,195,972,250. At the upper it is between −534,622,260,294 and −534,579,885,888. The crossing therefore lies strictly between 0.003890115286594461129996942 and 0.003890115286594461129996943. It follows that 0.003890115286594461 is the highest multiple of 10⁻¹⁸ that satisfies the raw test anywhere on 0 ≤ c ≤ 1. This global conclusion uses the signed histogram of the fixed caller. + +## 2 Reaching the last raw reporting tick + +The old binary price c₀ = 4,484,997,569,314,581 / 2⁶⁰ lies below the last raw reporting tick. Every stage has an ordinary rate below its funded binary price. Keeping c₀ would cap even an arbitrarily tall receiver. We therefore refine the dyadic, rebuild the paid transport and install seven wider receivers in Ali Romman’s e264251 implementation. [4, 18] + +**Theorem 2 Fixed-inventory grid attainment.** Under the five inherited P104 premises, the seven-stage signed construction attains κ = 0.003890115286594461. Together with Section 1, this is a matching lower and upper result on the 10⁻¹⁸ reporting grid for constructions which require the displayed raw moment margin. A change to the paid circuit or productive inventory can move that upper bound. + +| Installed choice | Value | +| --- | --- | +| New binary price c | 287039844436133239 / 2⁶⁶ | +| Seven binary rank logarithms | 2 × 10¹² × 16ⁱ for i = 0, …, 6 | +| Numerical rank and stopping gap | H = 36,000 and g = 10⁻²¹ | +| Binary and numerical debits | 11/8 bits and 39/256 bits per stage or service | + +The 18,906 productive and 104,904 paid binary labels are recoupled at the new price. Each of the 24 nonempty transport cells satisfies the descent and marginal conditions. Integer square roots give normalized raw surplus above 3.1153 × 10⁻²¹. An independent interval calculation confirms its sign. The two numerical copies retain 105,216 productive labels, 564,144 paid labels and 54 transport cells. At H = 36,000 their price exceeds the booked ordinary rate by more than 3.8321 × 10⁻⁶. + +Starting at b₀ = 0, bound each rate by the smaller of η = 0.0039 and (249(c − 11/(8Hᵢ)) + bᵢ₋₁)/250 (Section 4). The first six stages round down on the 10⁻²¹ grid and subtract a tick. At stage six the booking is 3890115286594444495g. Substitution at stage seven pays b₇ = 3890115286594461005g = κ + 5g with more than 1.53517 × 10⁻²⁰ to spare. All 54 strict and four functional signed checks pass. Lean 4.8.0 and 4.34.1 checked the bookings, rounding and final strict margin. All 31 axiom reports were empty. Lowering the dyadic numerator by one or raising κ one reporting tick breaks the certificate. The prior 60-bit price fails this endpoint. The directed raw interval and the physical argument are proved separately. + +The longer dyadic needs 66 square-root levels. Rechecking the interval propagation leaves less than one quarter of a replica of error throughout the admitted ranks. The 65-bit largest rank logarithm and 36,001-bit numerical rank still fit the setup proof. The stock calculation gives activation exponent A = 35,791,394,008,032,165,519. These finite controls and analytic inequalities describe an ideal tape implementation under the original premises. The full production field is too large for a host replay. + +The gain over the six-stage lower endpoint is 1.6 × 10⁻¹⁷. The gap to 0.00389046 is 0.000000344713405539. Another reporting tick requires a change to this funding test or its inventory. Sections 13–15 price one such change. + +## 2.1 How many binary places does the price require? + +Increasing the binary price helps an ordinary receiver pay its debit, but brings the raw supplier closer to its crossing. The interval in which both sides can succeed is narrow enough that the depth of the dyadic representation matters. We can determine the least depth for the raw and ordinary tests at the seven chosen heights. [18] + +**Proposition.** Fix the heights in Section 2, the binary debit 11/8, the gap g = 10⁻²¹ and κ = 0.003890115286594461. No dyadic price with denominator dividing 2⁶⁴ can meet both the raw funding and final ordinary requirements. A price with denominator 2⁶⁵ meets these two requirements using the prescribed six intermediate roundings. + +**Proof.** Write $H_{i}=2\cdot 10^{12}\cdot 16^{i-1}$ for i = 1, …, 7. Starting at zero, drop the stage cap and allow equality at every ordinary booking. This gives an upper bound for every admissible choice of the previous rates. Unrolling the recurrence gives + +$$ +U_{7}(c)=(1-250^{-7})c-\frac{249}{250}\sum _{i=1}^{7}\frac{11}{8H_{i}}250^{-(7-i)}. +$$ + +The expression increases with c. By Section 1 the largest raw-funded numerator over 2⁶⁴ is 71759961109033309. Every coarser dyadic lies on the same grid. Substitution into U₇ gives a value 2.03013897249 × 10⁻²⁰ below κ itself, even if the final reserve is waived. At the next depth, c = 143519922218066619 / 2⁶⁵ lies below the raw crossing. Reinstating the cap and all six floor-minus-one operations gives the positive margin in the table. + +| Dyadic depth | Test at the last receiver | Signed margin | +| ---: | --- | ---: | +| 64 | Relaxed limit − (κ + 4g) | −2.43013897249 × 10⁻²⁰ | +| 65 | Rounded limit − (κ + 5g) | +1.79745603069 × 10⁻²¹ | +| 66 | Rounded limit − (κ + 5g) | +1.53517730781 × 10⁻²⁰ | + +The 66-bit installation buys over eight times the final ordinary margin of the 65-bit price. Its binary transport still has positive funding. This is why we used one more square-root level in the construction. The 65-bit statement concerns the raw and ordinary tests at these heights. The complete supplier, historical storage and signed replays in this paper use the 66-bit price. + +**How much height does that extra bit buy?** Hold the price fixed and set $H_{i}=h\cdot 16^{i-1}$. Every stage limit is increasing in h at fixed previous booking, and rounding down preserves order. It suffices to check two adjacent integers. At 65 bits the least h that books κ + 5g is 1,920,864,718,790. At 66 bits it is 1,479,259,210,417. At the latter h the exact final margin lies between 3.63 × 10⁻³³ and 3.64 × 10⁻³³. At h − 1 it lies between −3.37 × 10⁻³² and −3.36 × 10⁻³². This would reduce every installed rank logarithm by 26.037% at the ordinary gate. Installing and pricing the smaller physical profile remains open. + +## 3 Why the new price preserves the physical accounting + +The price change affects the jobs carried by the binary transport. Three parts of the old proof used numerical properties of the old price. They concern the error in calculating a bin’s mass, the number of live fields, and the work of installing the finite tables. They can be checked separately on the changed source. [4, 18] + +**Rounding the transport integral.** At rank N = 2ᴴ the transport uses a grid with spacing $2^{-64(H+1)}$. The dyadic denominator now demands 66 square-root levels and at most 67 products. The inverse-power routine keeps its binary reciprocal above 1/(512N). The square-root derivative is therefore at most √(512N)/2. Each rounded product on [0,1] adds the two input errors and two grid units. Bounding the error at both ends of an integral and multiplying by N⁶/t gives an absolute error below $2^{472}N^{40}\cdot 2^{-64(H+1)}$. This is below one quarter for every H ≥ 1,024. The original integer allocation can still round down its transfers and round up each available bin. + +**Counting live and retired fields.** The changed transport preserves the 4k ≥ 5r descent inequality for every occupied binary cell. Consequently the lifetime of a raw context is below N⁷⁷. There are at most 2N⁶ births per clock and fewer than 2⁶⁷ new fields per context. The extra stock is bounded by 2⁶⁸ N⁸³. Adding the N⁹² reserved external owners still gives less than twice the reserved stock. The program uses the same seven sets of receiver roles. A same-stage call shares its arena, an earlier-stage call reduces its index, and a sibling reuses the retired parent interval. Ali Romman’s stage-store argument then bounds the historical factor by 1890 + 3 bitlength(s + 128) logarithmic bits against an allowance of 1984 + 4 bitlength(s + 128). This written source-to-tape argument pays for historical high-water marks and current occupants. The finite fence tests check representative executions. [4, 18] + +**Checking the implementation.** Instrumenting fixed setup generated all eight requested recipes and 14,915,531 rational returns. The largest reduced numerator or denominator used 262 bits. Operand-dependent calendars opened during setup numbered zero. At the first genuine numerical placement the emitted tickets are 0, 324 and 648, and the first swap sends position 1 to 324. Running the candidate-bound small signed product gives −345550037539 with 138 shuttles and 157,248 H calls. This feasible product uses the local H branch. The source-level bounds address sizes beyond host execution. [18] + +The complete lower bound retains the five original assumptions from Section 5. It also remains below the predecessor’s directed raw upper crossing by between 1.29996942 and 1.29996943 times 10⁻¹⁹. The proof locates the best reporting tick that this fixed inventory and funding test can support. + +## 4 A finite rate and a matching limit + +Let c denote the funded binary source price, d its complete debit in bits, and Hᵢ the base-two logarithm of the i-th stage rank. Starting with b₀ = 0, the six-stage ordinary service imposes the strict recurrence below. The component cap is η = 0.0039. [2, 3] + +$$ +C_{i}=c-\frac{d}{H_{i}}, b_{i}<\min (\eta ,\frac{249C_{i}+b_{i-1}}{250}). +$$ + +Each stage loses a factor of 1/250 on the gap still inherited from the preceding one. Even with vanishing debits, induction gives $b_{6} λ throughout. From the left, α < 1 and δ is proportional to c* − c because D′ is bounded away from zero. Thus Fθ increases from a negative value to one. Any positive surplus funds a finite L > 2/Fθ. At and above the crossing α ≥ 1, so no power passes. This proves the exact supremum for this sufficient moment test. + +As δ decreases to zero, x tends to infinity. Taking a sufficiently large constant C and x = CA makes both tails O(δ²), while $1-(1-\delta )^{x}\ge \delta $. Hence the true zero is O(A) and xδ tends to zero. Smoothness gives $\gamma (c)^{x}=\gamma (c*)^{x}(1+o(1))$, and the λ tail is smaller by a factor tending to zero. At the zero, $x\delta =\theta e^{-a x}(1+o(1))$. Taking logs twice gives the displayed formula. This logarithmic inversion is also the classical Lambert W expansion. [6, 8] + +## 7 What the threshold predicts + +The crossing gives γ(c*) = 0.907225472004138239146095… and a ≈ 0.09736427. The leading price of approaching it is about 10.27 additional tensor factors per natural-log unit of relative raw surplus. Replacing θ = 2 by θ = 1/64 saves asymptotically log(128)/a ≈ 49.83 continuous factors. The two integer thresholds also have a rounding difference of less than one relative to their continuous difference. + +![Two increasing sequences of exact least tensor powers as the price approaches the raw crossing.](verified-powers.png) + +*Figure 1. Each marker is an exact integer threshold. Outward intervals prove failure at the previous integer and success at the displayed one. The lines connect the verified values. The real-column cutoff may be chosen after the power. [6]* + +For example, at 10⁻¹⁸ below the lower crossing endpoint, the two certified first powers are 370 and 338. At 10⁻²⁴ they are 508 and 469. A prescribed L can require a larger v because it also imposes Fθ(v) > 2/L. The 430-factor installation pays that finite rounding cost. A second, separately tested 384-factor installation gives κ = 0.003890115286594430 with a smaller binary debit of 28 bits. + +### Where the target deficit comes from + +The six-stage conditional lower endpoint improves on #8035 by 3.745 × 10⁻¹⁵. For this six-stage profile the remaining distance to 0.00389046 is 3.44713405555 × 10⁻⁷. Even removing every finite compiler and stage loss leaves a raw crossing below the target. Scaling the tensor refines the exponent supported by this inventory. Reaching the requested exponent requires a better complete paid or productive inventory, or an application certificate that uses information those moments discard. A different proof or word needs fresh conditioning, physical stock and signed charges. [2, 4, 6] + +## 8 An earlier seven-stage price and its open storage step + +PR #8042 uses a 24-cell binary transport coupling to pay the same 36-call word without a large tensor power, and a 31-cell coupling serves the 48 numerical calls. We use its pinned 3d33cb0 revision. Its funded binary price is c = 4484997569314581 / 2⁶⁰. With the same 249/250 transfer, six ideal stages fall below 0.003890115286594445 even if their debits vanish. A seventh stage can recover nearly all of this transfer loss. This gives a different experiment from further increasing the power of the original compiler. [4, 15] + +Use Hᵢ = 10¹² × 16ⁱ for i = 0, …, 6, numerical rank log 36,000 and g = 10⁻²⁰. The pinned binary price after each debit is c − 7/(2Hᵢ). The updated #8042 installs seven receivers at 11/(8Hᵢ) and reaches our six-stage rate with smaller ranks. Apply the retimed source’s one-tick strict rounding to the first six rates at scale 10²¹. The seventh-stage limit is 0.0038901152865944600965768… . Book the ordinary service at 0.00389011528659446005, leaving g above κ + 4g at κ = 0.003890115286594460. The numerical gate has over 8.87 × 10⁻⁸ of margin, and all 54 strict and four functional checks pass. A separate implementation reproduced the rates, deadlines and outer price. [15] + +The seventh stage brings a real physical proof obligation. The pinned source’s activation guard checks at most six. Each ordinary stage reuses the same paid supplier but requires a separately delimited set of storage roles. At the new stopping gap the factor (128/g)¹⁶ costs 1,176 bits in the clock invoice, up from 1,024. Adding that difference brings the former 1,434-bit charge to 1,586, within 1,600. The finite-stage recurrence for Bᵢ counts a new factor of (133/10)Jᵢ¹⁴ at stage i, where Jᵢ = 2^(1024Hᵢ). The resulting ordinary logarithmic clock allowance is 293203099648000000000067. These costs belong in the outer invoice. [4, 15] + +**Evidence and boundary.** The actual constructor opens eight recipe objects. Feasible controls select the seventh stage at its boundary, exercise the changed stopping predicate and multiply a signed input pair. The physical signed-product test uses reduced rank and the local H kernel. A separate audit confirms the numerical and clock inequalities. A scan of 15 modules identifies the storage roles. A further induction fits the allowed history by 109 + bitlength(s + 128) bits if every live frame and owner obeys its local bound at every suspension. For this higher rate and these heights the implementation invariant remains open. Ali Romman’s later revision dfd25d5 binds the fixed heads, frames and storage for his seven-stage implementation at 0.003890115286594445. [6, 15] + +### What would constitute success at the target + +Even indefinitely repeating this fixed retimed recurrence cannot pass its own funded c, which is over 3.44713405539 × 10⁻⁷ short of the target. Section 2 installs a different retimed price at the last raw reporting tick. A proof of 0.00389046 must still supply a different paid word or funding argument, bind it to the complete binary and numerical suppliers, and pay for each stage in the signed transfer. A proposed word must also satisfy the communication bounds in Sections 9–11. + +## 9 The price of crossing chart boundaries + +In the normalized binary model, each owner holds one bit on the constant-field subclass, an ADD takes XOR in a common chart, and a MOVE transmits one bit between nested charts. Its rank is the absolute difference of their dimensions. Scheduled contacts and clocks are independent of the input. A SWAP exchanges register names together with their chart placements. Fix the 630 prescribed public endpoints. Arbitrary local memory and deterministic binary recoding are allowed for the cut bounds. Address-dependent encodings into larger fields require their own model. + +For each j from 1 to 8, collect all charts of dimension at least j. Fix every initial bit inside this set at zero. The rank dⱼ of the remaining demanded output forms counts how many independent external bits the set must learn. A protocol with fewer than dⱼ incoming one-bit contacts has fewer possible transcripts than demanded output vectors. This is the elementary information cut underlying network-coding converses. [9, 10] + +| Threshold j | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| Demand dⱼ | 516 | 627 | 627 | 627 | 616 | 616 | 616 | 505 | +| Native arrivals | 516 | 627 | 627 | 627 | 616 | 616 | 616 | 505 | + +**Theorem 5 Sharp upward rank sum.** Every correct protocol in this scalar model spends at least 4,750 upward rank units, and the native word attains equality. An upward contact of rank r crosses exactly r thresholds. Summing the eight inequalities gives the lower bound. All eight counts are exact on the literal word, which proves attainment. Thus shortening any of its 2,776 upward contacts requires an offset elsewhere, even with new senders, arbitrary payloads and changed deadlines. [9] + +**Price with only the eight cuts retained.** Order the layers by decreasing demand as 2, 3, 4, 5, 6, 7, 1, 8. Give position j weight $j^{t}-(j-1)^{t}$, where 0 < t ≤ 1. Concavity makes the weight of any r positions at most $r^{t}$. A matching integer cover uses 505 intervals of length 8, eleven of length 7, one hundred of length 6 and eleven of length 3. These are the four distinct demand superlevel sets and each consists of consecutive physical dimensions. Thus the weighted sum is the exact relaxed optimum. At the target it is 4712.55892449954… against the actual native upward price of 4737.61892078314… . The difference of 25.05999628360… per native call measures room in the cut constraints. It acquires an algorithmic value only when actual chart incidences, fields and causal readers realize it. [9] + +## 10 Why eight downward bits cannot suffice + +Each of 111 main ports maps (xᵢ,yᵢ) to (xᵢ,xᵢ + yᵢ). A further 408 helpers are independent inputs. The bit xᵢ starts at rank-one projector Hᵢ, yᵢ at chart zero, and xᵢ + yᵢ ends at Bᵢ = I − Hᵢ. Upward MOVEs follow projector inclusion. Which inputs can reach Bᵢ using upward transfers alone? [9, 11] + +**Theorem 6 Minimum downward count.** Exactly nine downward one-bit contacts suffice for the fixed operator. The lower bound allows free upward traffic, new intermediate charts, unlimited local memory and arbitrary nonlinear Boolean encoders on a fixed schedule. + +**Reduction.** Give every chart the entire downward transcript Y. Set the helpers, the yᵢ and all unselected xᵢ to zero. By transitivity of inclusion, induction over the operations allows a chart P to see only Y and the xⱼ with Hⱼ ≤ P. Thus receiver i must recover xᵢ from Y and the xⱼ whose projectors Hⱼ are orthogonal to Hᵢ. Rational projection checks all 111² relations. This is index coding with receiver side information. [11–13] + +No member of K = {0, 14, 15, 30, 31, 60, 69, 70} observes another member’s input. Five outside ports each see a pair in K. Put their independent bits zₑ on the edges below. + +![Five independent messages, whose accessible ends are four binary receivers.](five-edges.png) + +*Figure 2. Four ports of K and the five outside ports that see the indicated pairs.* + +Distinct edges that share an endpoint cannot observe each other. Give each edge all bits on disjoint edges as additional side information. For a fixed five-bit z, the eight K bits must all be recovered from Y and z. If Y has at most eight bits, every possible transcript occurs exactly once among those 256 input choices. Fix one transcript. Its fiber contains all 32 outside words z. In that fiber, a clique vertex c has a value $h_{c}$ depending only on its incident outside bits. + +For an edge e = cd, its receiver must distinguish zₑ = 0 from zₑ = 1 given $h_{c}$, $h_{d}$ and all disjoint-edge bits. Fix those disjoint bits. Conditional on zₑ, the remaining inputs of the two endpoint functions range independently. Their attainable pairs are therefore rectangles A₀ × B₀ and A₁ × B₁. The rectangles must be disjoint. One coordinate has disjoint nonempty binary ranges, so one endpoint function equals zₑ or its complement on every input. An endpoint function cannot do this for two independent bits. Five edges would require five endpoints among four, a contradiction. The earlier E8 Hall certificate inspired this 13-port choice. The fiber argument extends the obstruction to nonlinear encoders. [11, 12] + +## 11 A word attaining nine, and its exact bill + +Each native return takes a three-MOVE path. For its final field f, solve f = p + q over 630 input coordinates, with p in the live stock of chart 1 and q in that of chart 0. All nine systems have solutions. Form p, move it from the identity to zero, and add q. The two intermediate owners have no later readers before their clears. All surviving fields agree at each block exit, so the replacements compose and attain the lower bound. [11] + +| Literal word resource | Native | Constructed | +| --- | ---: | ---: | +| Upward / downward contacts | 2,776 / 27 | 2,776 / 9 | +| Total MOVEs | 2,803 | 2,785 | +| Upward / downward rank sum | 4,750 / 63 | 4,750 / 72 | +| Private clears / peak live owners | 3,433 / 4,063 | 3,415 / 4,045 | +| Local XORs | 29,301 | 29,299 | + +Eight returns use only chart-1 donors. The ninth also uses owner 351 at chart zero. The word saves 56 instructions and two XORs. Independent replay recovers the forward and transpose operators and every retained clear, including all 408 arbitrary helpers in the inputs. Deleting one donor breaks 55 rows. [11] + +**Theorem 7 Price of nine direct returns.** Suppose all upward receipts keep their original values, charts and clocks, the only other traffic consists of nine one-bit returns directly to zero, and the first eight completed values are required by clock 11104, all nine by 18875. Then every downward sender must be chart 1. The sharp downward tariff is $9\cdot 8^{t}$. + +**Proof.** The nine required fields F have rank nine modulo the 516-dimensional initial stock Z of chart zero. At each fixed Z, nine received bits must distinguish all 512 values of F. Their transcript is a bijection of F. For each sender compute its total available stock through the first deadline modulo Z. Its intersection with the span of F in this quotient has dimension zero at every chart except chart 1, where it is nine. For zero intersection, bases of the two subspaces range independently at fixed Z. A bit computable from both is constant there, contradicting the bijection. At least eight bits arrive early. If exactly eight do, their transcript determines the first eight returned fields bijectively at fixed Z. Adjoin these to Z and repeat the calculation at the last deadline. Only chart 1 contributes the final new dimension. Two implementations checked these 1,272 intersections. [11] + +At t = 1 − 0.00389046 the old downward bill is 62.723423052300506… and the optimal direct bill is 71.419870923429786… . With all 36 native calls replaced the full raw deficit grows to 313.204528477150898… . Fewer downhill transmissions cost more in this exact implementation. [11] + +## 12 A complete repair of the chart 531 relay + +The proposed local shortcut sends a field f from chart 326 through 531 to 1. It makes the native rank-two contact at instruction 8075 cost one. With the other incidences fixed it cannot compute the full operator, even with arbitrary binary encoders. Three messages enter chart 1 through 531 by instruction 10141, with at most two independent bits entering that initially empty chart by then. The other 502 incoming chart-1 messages can add at most 502 bits. Chart 1 owes 505 independent outputs. [5, 9] + +This count is sharp. Chart 1 has at most 2⁵⁰⁴ decoded outcomes, each with at most 2¹²⁵ complete inputs in its fiber. Hence at most 2⁶²⁹ of 2⁶³⁰ inputs can succeed. The literal shortcut attains this on the kernel of one nonzero 27-input parity. For k independent copies and m extra binary side messages, the same argument gives optimal success fraction $2^{-\max (0,k-m)}$ when the m residual bits can be supplied before their readers. This last attainment gives an information requirement in the side-message model. + +### Replacing the missing information with real transfers + +Write f, u and v for owners 1855, 1857 and 2224 at chart 326. The shortcut delivers f to chart 1, displacing f + u + v at 531. There is a constructive repair that never asks for an oracle value. First, at 10138 send v directly from chart 326 to 1 and add the already present f + u. This restores the desired receipt and all 505 chart-1 outputs at once. It costs back the saved unit and leaves exactly public output 117 incorrect. + +To supply that output, reroute owner 3152 from 328 → 8 to 328 → 0 at 11022. Owner 3153 can now carry x₆ to chart 0, where an ADD restores its original value for all its other readers. At chart 0 the existing owners can produce x₁₁₇ + x₆. Send this on the original 0 → 7 → 330 → 531 route and assign its value to output 117. Direct replay and a separate reverse interpreter verify all 630 × 630 coefficients and the original endpoint placements. Removing the last source term fails on output 117. [9] + +The repair uses 2,803 paid MOVEs and 109 fewer local ADDs. Its net tariff change is a rank-five contact becoming rank six. For one replacement in the full caller, the raw trial margin is −1.121935400785230928… and the 268-factor margin is −0.001060813460434955… . Five of the 3,433 private clear records change. The attained result is an all-input normalized binary operator with a known cost. A physical field adjoint, owned erasure and signed price would be additional obligations for adopting that word. + +## 13 A price filter for proposed fusions + +Give a candidate word its full paid rank histogram nᵣ and write G = Σ r nᵣ for its total grade. A grade-conserving fusion can still change cost. To measure that change exactly, define Eⱼ = Σ nᵣ max(r − j, 0) for j = 1, …, 7. It counts the grade above level j across the paid contacts. For 0 < t < 1, the tariff gives a positive curvature weight at each integer. + +$$ +w_{j}=2j^{t}-(j-1)^{t}-(j+1)^{t}, \sum _{r=1}^{8}n_{r}r^{t}=G-\sum _{j=1}^{7}w_{j}E_{j}. +$$ + +**Derivation.** For a single contact of rank r, start from the first difference 1. Each subsequent difference decreases by wⱼ. Summing these first differences to r gives $r^{t}=r-\sum _{j=1}^{r-1}(r-j)w_{j}$. Summing over contacts gives the displayed identity. For a change from old to new inventory, the saving is Σ wⱼ ΔEⱼ − ΔG. Every extra paid grade therefore raises the improvement the higher ranks must deliver. This is a discrete summation identity applied to the actual eight-rank tariff. [9] + +For the native upward word and its sharp interval relaxation, ΔG is zero. The seven tail increases are 2,149, 2,967, 2,539, 2,067, 1,554, 1,020 and 505. The first two terms account for 11.574637158869… and 6.001777803623… of the 25.059996283598… relaxed gap. Those numbers rank the scale of possible savings without promising that the matching intervals can carry the required fields. [9] + +**How many real fusions would suffice?** For positive ranks a and b with a + b ≤ 8, the saving is aᵗ + bᵗ − (a + b)ᵗ. Concavity bounds this by (2¹⁻ᵗ − 1)(a + b)ᵗ. Equality holds at a = b, and the right side grows with a + b. Thus 4 + 4 → 8 gives the maximum per elementary grade-conserving fusion, $2\cdot 4^{t}-8^{t}$. At the trial it saves 0.02142834703346313… . Six such fusions can save at most 0.128570082200779… , less than the raw deficit. Seven balanced fusions exceed it at the histogram level, assuming all other charges and productive ranks stay fixed. This is a sharp **price** threshold for the stated class. + +To test attainability, first require the destination chart of an earlier upward MOVE to equal the source chart of the later MOVE. Exactly one native 4 + 4 pair survives this order-and-incidence test per 111-port call. For comparison 4,227 ordered 2 + 2 pairs survive. Each still needs compatible data, available local stocks, correct public outputs and legal ownership through its first and last readers. [9] + +## 14 One missing bit survives all 36 placements + +The only native ordered 4 + 4 pair uses chart 0 → 509 at clock 7112 and chart 509 → 1 at 7210. Its inputs differ. The first carries helper 626 and the second main input x₃₈. We sent the helper directly to chart 1 at rank eight and reconstructed the other demands from live stocks. The resulting literal program saves 0.021428347033463130… per placement. Independently replaying the graph and its transpose shows 629 exact outputs. The remaining output is y₁₉ + x₁₉ + x₃₈, where y₁₉ + x₁₉ is required. All 3,433 private clears remain, with seven changed symbolic values. [17] + +Could the downstream caller absorb the extra term? On binary constant fields, group the 38 caller roots into two lanes with offsets b = 0 and b = 19. Within each lane let s run from 1 to 18. Let eⱼ denote the standard basis vector of length 38 and set u = eᵦ + eᵦ₊ₛ. Following the source pre- and post-operations through one call gives the following transfer from root port 38 to root port 19. It reads the two inputs indexed by b and b + s and adds their sum to those same two output roots. + +$$ +\Delta A_{b,s}=u_{b,s}u_{b,s}^{T}, u_{b,s}=e_{b}+e_{b+s}, \Delta A_{b,s}\in \mathbb{F}_{2}^{38\times 38}. +$$ + +**Proposition No cancellation across placements.** Every nonempty subset of these 36 literal substitutions fails on a legal input of the complete binary supplier. The errors add linearly because a substituted call writes to port 19 and subsequent discrepancies read only port 38. For any chosen (b,s), the diagonal coordinate (b + s, b + s) occurs in its error matrix and in no other. Give its port-38 input root a single one, with every other input zero. The corresponding port-19 output flips. This one argument excludes all 2³⁶ − 1 = 68,719,476,735 nonempty subsets. The cutoff admits the witness on a tensor slice because 4 × 127²⁶⁷ exceeds 15²⁶⁸. [17] + +This failure is visible even to an observer who retains the four native chart-544 arrivals of the literal fused word. Flipping input bits 19 and 38 together leaves those four observations unchanged and flips the required output. No terminal decoder can repair that word from what arrives. The all-subset statement follows from the caller’s private diagonal coefficients, which were independently reproduced by tracing prefixes and adjoints. [17] + +*The converse fixes this literal local word and the 36-call source interface. It permits all placement subsets. Other local encoders, other paid incidences and the subset of fields reachable from specific integer operands require separate arguments.* + +## 15 What would fund the target exponent + +Suppose a corrected word realizes the balanced fusion at q of the 36 calls, with all other charges, productive labels and ownership obligations unchanged. The raw binary margin at the target is the baseline margin plus q times the per-fusion saving. The seven-placement scenario can also be priced through the finite binary band, the 48-call numerical service and the outer signed algorithm. This tests whether a legally reconstructed bit would really be worth pursuing. [17] + +| Scenario at κ = 0.00389046 | Placements | Raw binary margin | +| --- | ---: | ---: | +| Unmodified word | 0 | −0.132405116497 | +| Balanced fusion | 6 | −0.003835034296 | +| Balanced fusion | 7 | +0.017593312737 | +| Balanced fusion | 36 | +0.639015376708 | +| All fused, plus one rank-one charge | 36 | −0.360984623292 | + +**Finite sufficient invoice.** Set c = 140170034802279 / 2⁵⁵, approximately 0.00389050. With 268 factors, cutoff 2⁵⁰ and split coefficient 1/64, seven valid fusions give normalized binary surplus above 2.1081285565 × 10⁻⁶. The required rounding charge is 2/2⁵⁰. The paid binary debit is 21 bits. Six binary rank logarithms, in order, are 25,000,000, 160,000,000, 1,000,000,000, 6,000,000,000, 36,000,000,000 and 224,000,000,000. All six stage inequalities pass. [17] + +The unchanged numerical word has positive raw margin 8.131421620012920900… at the target. Its own 128-factor band and 10-bit debit at rank log 1,600,000 give a numerical cap of 0.0038904632568359375. With ordinary rate 0.0038904998 and stopping gap 10⁻¹⁴, all 54 strict and four functional signed conditions pass. The smallest strict margin is 10⁻¹⁵. Equality and a charged rank-one restoration provide failure controls. These are checks on a precisely specified conditional invoice. [2, 17] + +**The remaining construction.** The literal word of Section 14 fails the operator test at every nonempty subset of placements. Even 36 perfect fusions could not pay one uncompensated rank-one repair. An improved word must therefore restore x₃₈ through information already in the paid schedule, or supply another genuine saving. It must also return the owned physical fields and preserve the numerical precision and analytic transfer on the altered path. The priced implication states exactly what such a construction would earn. + +## 16 Choosing the next construction + +The target fails before finite band or signed losses enter the calculation. Let gᵢ be the decrease in the complete paid raw moment from changing native call i, holding its productive moment fixed. A necessary condition to fund the current raw test at 0.00389046 is $\sum _{i=1}^{36}g_{i}>0.132405116496822…$. If the same valid gain is realized at all 36 occurrences, it must exceed 0.0036779199026895… per occurrence before any finite loss. Both inequalities refer to the original productive inventory. A changed productive inventory requires recomputing both moments. [5, 6] + +The three structural results constrain how to find that saving. First, the 4,750 upward grade units are mandatory. Concavity still rewards combining successive equal-field moves into one longer move at the same total grade. At the target, combining two units saves $2-2^{t}$ per realized fusion. Paying that saving requires an owner that holds the combined message before the first displaced reader, a route that preserves its other uses, and the corresponding reverse ownership. The interval relaxation shows where aggregation can help. The chart-531 experiment shows exactly how an unpaid repair can absorb the entire saving. [9] + +Second, we tested every way to replace one native three-contact return by one grade-seven transfer to an existing dimension-one chart. There are 9 × 111 = 999 choices. The recipient can recode its single surviving departure and terminals may decode from their full histories while all other interior operations and clocks stay fixed. All 999 fail. In a literal 1 → 8 example, nine live donors give the exact first return. At 11026 chart 8 sends the XOR of that field and the second return. The final operator still has rank 630, yet 54 public rows are wrong. Independent terminal witnesses show that changing this single departure cannot preserve both returns. [16] + +Third, the powered implementation really does issue a paid block whose data are identically zero. Its first raw label uses a rank-eight helper. Taking that label in every factor selects productive rank 8²⁶⁸ below floor 15²⁶⁸, so the powered compiler creates a fresh zero. Its first paid loan therefore stays zero at a deepest elementary leaf. In a bounded one-unit epoch, a typed guard removes one of 285,600 elementary leaf actions, with exact outputs for 5,772 independent input bits and all owners returned. Lowering the floor to eight makes the helper live. Forcing the same skip then changes 109 output owners. [14] + +This is a working local simplification. Even granting free deletion for the identified 13,824²⁶⁸ zero-source family, the normalized raw deficit stays above 10⁻⁴. The guard and scheduling also need a full invoice. A pruning gain must find more paid mass outside that support class. [14] + +## Sources and reproduction + +**[1]** CrocSwap contributors. Canonical selected conditional bound at e54523517d0f03e58352e647c403a5af3e525a57. [Selected certificate](https://github.com/CrocSwap/integer-mult-bounds/blob/e54523517d0f03e58352e647c403a5af3e525a57/certificates/selected-result.json) + +**[2]** Clear1nsight and predecessors. Complete six-stage signed profile, PR #8035 at ea776471bf8ed143a0625cf2d7532f65d15eb5f9. [Proof and invoice](https://github.com/Clear1nsight/integer-mult-bounds/blob/ea776471bf8ed143a0625cf2d7532f65d15eb5f9/research/p104-single-band-signed-margin/PROOF.md) + +**[3]** Ali Romman. Single-band native carriers and signed application, PR #8030 at 6285dd829114705862e8d91facaedc1f31d3cfcb. [Application](https://github.com/aliromman/integer-mult-bounds/blob/6285dd829114705862e8d91facaedc1f31d3cfcb/research/single-band-native-carriers/APPLICATION.md) + +**[4]** Ali Romman. Retimed physical transport with scheduled rank coupling, PR #8042 at 3d33cb0c8a523b66d91e8de8250b85d0a436eb35. [Pinned construction](https://github.com/CrocSwap/integer-mult-bounds/commit/3d33cb0c8a523b66d91e8de8250b85d0a436eb35) · [Seven-stage resolution at e264251](https://github.com/aliromman/integer-mult-bounds/blob/e26425171238e142cc9ffb510fd953f344bd41c7/research/retimed-native-multiplier/RESOLUTION.md) · [Stage storage at dfd25d5](https://github.com/aliromman/integer-mult-bounds/blob/dfd25d553a843a946ca0b94130a5ff8943e98fdd/research/retimed-native-multiplier/STAGE-STORE.md) + +**[5]** Clear1nsight. Priced single-export parity and original target scenario, PR #8041 at 05f6172d4d9487090fa24c75137a7c60e6fcd67e. [Earlier experiment](https://github.com/Clear1nsight/integer-mult-bounds/tree/05f6172d4d9487090fa24c75137a7c60e6fcd67e/research/p104-single-export-parity) + +**[6]** P104 campaign, PR #8044. Six-stage resolution, finite 430-factor witness, signed controls and tape bridge. [Six-stage certificate](https://github.com/Clear1nsight/integer-mult-bounds/tree/c3746ea769fcf0d20818d7e18366f1b602e4aa3d/research/p104-six-stage-resolution) + +**[7]** Clear1nsight. Charged paid split remainders, PR #8033 at a1313ff9f84fd00d50b282fe432e522191277821. [Split tariff](https://github.com/Clear1nsight/integer-mult-bounds/blob/a1313ff9f84fd00d50b282fe432e522191277821/research/p104-single-band-split-tariff/PROOF.md) + +**[8]** R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey and D. E. Knuth (1996). On the Lambert W Function. Advances in Computational Mathematics 5, 329–359. [Authors’ text](https://www.uwo.ca/apmaths/faculty/jeffrey/pdfs/W-adv-cm.pdf) + +**[9]** P104 campaign. Dimension cuts, interval relaxation, chart-531 word and transpose, PR #8043 at ab3680a3e56ff247fef2a76ad9110d571f19ef0d. [Code and receipts](https://github.com/Clear1nsight/integer-mult-bounds/tree/ab3680a3e56ff247fef2a76ad9110d571f19ef0d/research/p104-graded-cut-relay-repair) + +**[10]** R. Koetter and M. Médard (2003). An Algebraic Approach to Network Coding. IEEE/ACM Transactions on Networking 11, 782–795. [Authors’ text](https://www.mit.edu/~medard/mpapers/An%20AlgebraicApproach.pdf) + +**[11]** P104 campaign, PR #8046. Nine-contact construction, nonlinear converse, two-deadline sender theorem and independent forward and transpose replays. [Construction and proof](https://github.com/Clear1nsight/integer-mult-bounds/tree/5e20409c3f9df915cdd32ef84168b06ab5bce95b/research/p104-nine-downward-contacts) + +**[12]** CrocSwap contributors. E8 rank-eight closure, prior linear Hall obstruction on the prescribed pattern. [Predecessor certificate](https://github.com/CrocSwap/integer-mult-bounds/tree/e54523517d0f03e58352e647c403a5af3e525a57/research/p104-e8-rank8-closure) + +**[13]** Z. Bar-Yossef, Y. Birk, T. S. Jayram and T. Kol (2011). Index Coding With Side Information. IEEE Transactions on Information Theory 57, 1479–1494. [Authors’ text](https://webee.technion.ac.il/people/zivby/papers/indexing/indexing.full.pdf) + +**[14]** P104 campaign, PR #8045. Source-bound zero-loan experiment, corruption controls and relation to the support-pruning bound in PR #8034. [Leaf experiment](https://github.com/Clear1nsight/integer-mult-bounds/tree/6878de030b42d92f9025d27e721a9d7d98e7cb01/research/p104-certified-zero-epoch-leaf) · [Earlier tariff ceiling](https://github.com/CrocSwap/integer-mult-bounds/pull/8034) + +**[15]** P104 campaign, PR #8048. Seven-stage retimed profile, signed gates and storage-accounting extension. [Seven-stage evidence](https://github.com/Clear1nsight/integer-mult-bounds/tree/9b4bb847d7573c8e08827fee22e9bcad8c9bb43c/research/p104-seven-stage-retimed) + +**[16]** P104 campaign, PR #8047. Two-signal obstruction for 999 grade-seven returns and the full-rank wrong-output control. [Proof and independent witnesses](https://github.com/Clear1nsight/integer-mult-bounds/tree/67f687ab0126b8b3e179c293592bbb0a0d3a3e3b/research/p104-seven-grade-returns) + +**[17]** P104 campaign, PR #8049. Balanced 4 + 4 fusion, 36 independent error matrices, retained input and counterfactual full signed invoice. [Word, proof and controls](https://github.com/Clear1nsight/integer-mult-bounds/tree/6dfb0f231c13fe2d0e96a02cf804eacd2bc19e22/research/p104-balanced-fusion-residual) + +**[18]** P104 campaign, PR #8050. Single-crossing lemma for the complete raw inventory, retimed dyadic endpoint, source-bound receiver and signed controls. [Fixed-grid theorem and verifier](https://github.com/Clear1nsight/integer-mult-bounds/tree/328b858e24709495843abc751fcbf5df35a89da8/research/p104-retimed-dyadic-endpoint) + +## Replaying and interpreting the results + +Each reference links the pinned source, proof and deterministic checks. With Python 3.12, run the following command from the matching checkout and substitute the directory named in its README. + +```sh +python3.12 -I -B scripts/research_package.py --package research/PACKAGE +``` + +For the downward theorem [11], rebuild the orthogonality matrix from the rational projectors and compare its 13-port pattern with Section 10. Replay the word forward and backward. Its symbolic operator covers every constant binary input. Removing one donor must change the result. + +For the sharp exponent, run the price case in [18] and then its installation, scheduling, physical, receiver, slab and signed product cases. Its Lean file checks arithmetic in core Lean. For the earlier six-stage profile, run [6] and compare the raw sign bracket, five rounded ceilings, final rational cap, and signed gate receipt against Sections 4–6. Raw funding uses 36 charged binary calls and 48 numerical calls. The target test fails already in the binary raw moment. Execution on a feasible signed input, exact symbolic pricing, and the conditional transfer to arbitrary input lengths are distinct parts of this evidence. + +The communication minima apply to the specified one-bit channel and public map. Using a new word in the multiplier also requires both physical orientations, owned storage and a paid caller. The seven-stage exponent uses the five premises in Section 5 and the fixed inventory in Section 1. + +In the grade-seven tests [16], replacing 1 + 2 + 4 by 7 saves 0.025892034609447178… per real placement. Six such placements would clear the raw and 268-factor price checks, while five fail. For 1 + 5 + 1 the saving is 0.021583852699907922… and seven placements are needed. The rejected 999 cases supply zero placements. For the balanced 4 + 4 candidate [17], a concrete next test is a coordinated recoding of two paid slots. The final arrival at chart 544 must carry y₁₉ + x₁₉ up to a function of its three early arrivals. On the frozen word, a linear recoding of the 509 → 0 return alone forces contradictory parities for chart zero and an output at chart 525. A viable proposal must demonstrate both reconstructions before their readers. + +**Attribution.** DreamingOfClouds’ PR #7852 motivated the campaign. Its conditional ceiling near 0.0093454 concerns a specified 17-stage family. Ali Romman supplied the physical graph, both signed suppliers and the retimed scheduler. ToikY identified the earlier chart-510 question. The definitions of index coding, elementary information cuts and Lambert W asymptotics come from the cited literature. The finite-power threshold, six-stage endpoint, global single-crossing proof, retimed grid attainment, chart cuts, nonlinear converse, explicit repaired words and all-placement counterexample are the contributions developed here. Clear1nsight coordinated the work with substantial OpenAI Codex assistance in deriving the claims, implementing independent replays and preparing the manuscript. [P104 toolkit](https://github.com/CrocSwap/integer-mult-bounds/pull/7852) diff --git a/research/p104-balanced-fusion-residual/manuscript/five-edges.png b/research/p104-balanced-fusion-residual/manuscript/five-edges.png new file mode 100644 index 0000000000..752390fd01 Binary files /dev/null and b/research/p104-balanced-fusion-residual/manuscript/five-edges.png differ diff --git a/research/p104-balanced-fusion-residual/manuscript/height-audit/HEIGHT-EXACT.json b/research/p104-balanced-fusion-residual/manuscript/height-audit/HEIGHT-EXACT.json new file mode 100644 index 0000000000..79d682e2c7 --- /dev/null +++ b/research/p104-balanced-fusion-residual/manuscript/height-audit/HEIGHT-EXACT.json @@ -0,0 +1,73 @@ +{ + "cases": { + "65": { + "binary_search_iterations": 41, + "first_six_strict": true, + "first_six_ticks": [ + 3874554824735123117, + 3890053044702463751, + 3890115037624108123, + 3890115285598405638, + 3890115286590466012, + 3890115286594444452 + ], + "least_first_height": 1920864718790, + "neighbor_margins": [ + { + "decimal": "-1.246650956613478280809956232339821184736219356048957804886586652347728E-32", + "height": 1920864718789, + "margin": "-105317725745311877/8448052374772727525933056000000000000000000000000" + }, + { + "decimal": "9.656722811949868690152237431510613175270483489372060007505470041160222E-33", + "height": 1920864718790, + "margin": "8158050008405753/844805237477712557244416000000000000000000000000" + } + ], + "reduction_percent_decimal": "3.9567640605", + "reduction_percent_exact": "7913528121/2000000000", + "seventh_strict_at_success": true, + "shared_plateau_exact_threshold": "359006208000000000000000000000/186898225829369407", + "sixth_tick_on_both_neighbors": 3890115286594444452, + "trial": "143519922218066619/36893488147419103232" + }, + "66": { + "binary_search_iterations": 41, + "first_six_strict": true, + "first_six_ticks": [ + 3874554824522282049, + 3890053044688309833, + 3890115037623220110, + 3890115285598350136, + 3890115286590462556, + 3890115286594444249 + ], + "least_first_height": 1479259210417, + "neighbor_margins": [ + { + "decimal": "-3.366823094003451482867849512742663625196384230670636933226202482645283E-32", + "height": 1479259210416, + "margin": "-9126686979662669/271077117057856109019136000000000000000000000000" + }, + { + "decimal": "3.635612226549809755858395647736292012650914756328992906260701907740218E-33", + "height": 1479259210417, + "margin": "47305501493475931/13011701618785889325940736000000000000000000000000" + } + ], + "reduction_percent_decimal": "26.03703947915", + "reduction_percent_exact": "520740789583/20000000000", + "seventh_strict_at_success": true, + "shared_plateau_exact_threshold": "718012416000000000000000000000/485386476517284043", + "sixth_tick_on_both_neighbors": 3890115286594444249, + "trial": "287039844436133239/73786976294838206464" + } + }, + "debit": "11/8", + "gap": "1/1000000000000000000000", + "height_ratio": 16, + "kappa": "0.003890115286594461", + "monotonicity": "For positive integer h, each c-(11/8)/(16^i*h) increases with h. The capped stage limit is nondecreasing in h and in its prior tick. Truncation toward zero and subtracting one are nondecreasing on the real line, so induction makes the seventh cap nondecreasing. Adjacent failure rules out all smaller h; strict success checks all stages at the next integer.", + "ordinary_tick_e21": 3890115286594461005, + "scope": "Ordinary seven-stage invoice only; eta cap, exact input heights and actual truncation/one-tick policy are included. No other physical or all-size machine obligation is implied." +} diff --git a/research/p104-balanced-fusion-residual/manuscript/height-audit/README.md b/research/p104-balanced-fusion-residual/manuscript/height-audit/README.md new file mode 100644 index 0000000000..ac8bbcae2e --- /dev/null +++ b/research/p104-balanced-fusion-residual/manuscript/height-audit/README.md @@ -0,0 +1,33 @@ +# Ordinary-only minimum first heights + +For the fixed seven-stage e264 price recurrence, geometric ratio 16, debit `11/8`, gap `10^-21` and final booking `κ+5g` at `κ=0.003890115286594461`, the least integer first heights are: + +| Trial | Least first H | Relative reduction from `2*10^12` | +| --- | ---: | ---: | +| `143519922218066619/2^65` | 1,920,864,718,790 | 3.9567640605% | +| `287039844436133239/2^66` | 1,479,259,210,417 | 26.03703947915% | + +The four exact stage-7 margins are the cap minus the required ordinary booking; a positive value passes the strict inequality. + +| Trial | First H | Exact margin | Approximation | +| --- | ---: | --- | ---: | +| 65-bit | 1,920,864,718,789 | `-105317725745311877/8448052374772727525933056000000000000000000000000` | `−1.24665095661×10^-32` | +| 65-bit | 1,920,864,718,790 | `8158050008405753/844805237477712557244416000000000000000000000000` | `+9.65672281195×10^-33` | +| 66-bit | 1,479,259,210,416 | `-9126686979662669/271077117057856109019136000000000000000000000000` | `−3.36682309400×10^-32` | +| 66-bit | 1,479,259,210,417 | `47305501493475931/13011701618785889325940736000000000000000000000000` | `+3.63561222655×10^-33` | + +At both successful heights all first six price bookings are strictly above their preceding rate and strictly below their own cap. In each adjacent pair the first six booked ticks, including `b6`, are exactly the same; the eta cap is inactive at stage seven. On that shared plateau the final margin has the form `A−B/h`, with `A,B>0`. Its exact zero is + +* 65-bit: `359006208000000000000000000000/186898225829369407`, whose floor is 1,920,864,718,789. +* 66-bit: `718012416000000000000000000000/485386476517284043`, whose floor is 1,479,259,210,416. + +To cover all earlier rounding plateaus, note that each `c−(11/8)/(16^i*h)` increases with positive integer `h`. Taking the minimum with eta is monotone, and the stage limit is monotone in its prior booked tick. Python's actual truncation toward zero is monotone on the real line, as is subtracting one grid tick. Induction therefore makes every intermediate booked rate and the seventh cap nondecreasing in `h`. Since the cap at the predecessor integer is too low, every smaller integer fails regardless of any additional earlier-stage failures. The next integer passes all seven price checks. + +`height_exact.py` computes the recurrence using only integer numerators, denominators, multiplication and division, performs a 41-step binary search and checks the four exact signs and plateau boundaries. The separate `cross_check.py` implements the literal recurrence with `fractions.Fraction`, and checked 2,352 stage calculations including small heights, both adjacent pairs and seeded samples. Run + +```sh +python3 -I -B height_exact.py +python3 -I -B cross_check.py +``` + +This result concerns only the ordinary price recurrence and its fixed height ratio. It does **not** establish the numerical supplier, source allocation, controller entry, physical stock, all-size bound, or a second complete multiplier. In particular the percentage reduction is a reduction in the first ordinary height, not a measured runtime improvement. diff --git a/research/p104-balanced-fusion-residual/manuscript/height-audit/cross_check.py b/research/p104-balanced-fusion-residual/manuscript/height-audit/cross_check.py new file mode 100644 index 0000000000..ccb2d3c8b5 --- /dev/null +++ b/research/p104-balanced-fusion-residual/manuscript/height-audit/cross_check.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +"""Compare integer recurrence to a separate literal Fraction implementation.""" +from fractions import Fraction as Q +from pathlib import Path +from random import Random +import sys +HERE=Path(__file__).resolve().parent +sys.path.insert(0,str(HERE)) +from height_exact import CASES,GRID,BOOKED,ordinary + +samples=[1,2,3,1000,10**6,10**9,10**12,2*10**12] +for _,_,h in CASES: + samples += [h-2,h-1,h,h+1,h+2] +rng=Random(461) +samples += [rng.randrange(1,2*10**12+1) for _ in range(150)] +count=0 +for depth,C,_ in CASES: + c=Q(C,2**depth) + for h in samples: + rows=ordinary(depth,C,h) + previous=Q() + for i,row in enumerate(rows): + limit=min(Q(39,10000),(249*(c-Q(11,8*h*16**i))+previous)/250) + rate=Q(BOOKED,GRID) if i==6 else Q(int(limit*GRID)-1,GRID) + assert row['rate_tick']==rate*GRID + assert Q(row['margin'])==limit-rate + assert row['strict']==(previous0 + return num//den if num>=0 else -((-num)//den) + + +def ordinary(depth,cnum,h): + """Evaluate the literal e264 recurrence entirely with integer numerators.""" + assert h>0 + cden=1<=ETA_TICKS*denominator, + 'strict':previoustick*denominator, + 'margin':str(margin)}) + previous=tick + return rows + + +def frac_decimal(frac): + with localcontext() as ctx: + ctx.prec=70 + return str(Decimal(frac.numerator)/Decimal(frac.denominator)) + + +def last_margin(rows): + return Fraction(rows[-1]['margin']) + + +def main(): + assert ETA_NUM*GRID%ETA_DEN==0 + expected={ + (65,1920864718789):Fraction(-105317725745311877,8448052374772727525933056000000000000000000000000), + (65,1920864718790):Fraction(8158050008405753,844805237477712557244416000000000000000000000000), + (66,1479259210416):Fraction(-9126686979662669,271077117057856109019136000000000000000000000000), + (66,1479259210417):Fraction(47305501493475931,13011701618785889325940736000000000000000000000000), + } + out={} + for depth,C,claimed in CASES: + # Search on the final cap alone, which is monotone even when earlier + # candidates fail their own stage conditions. The adjacent full + # success below establishes that the found cap threshold is feasible. + lo,hi=1,ORIGINAL_H + assert last_margin(ordinary(depth,C,lo))<0 + assert last_margin(ordinary(depth,C,hi))>0 + visits=0 + while lo0: + hi=mid + else: + lo=mid+1 + visits+=1 + assert lo==claimed + before=ordinary(depth,C,claimed-1) + after=ordinary(depth,C,claimed) + assert last_margin(before)==expected[depth,claimed-1]<0 + assert last_margin(after)==expected[depth,claimed]>0 + assert all(x['strict'] for x in before[:-1]) + assert all(x['strict'] for x in after) + assert not before[-1]['eta_capped'] and not after[-1]['eta_capped'] + assert [x['rate_tick'] for x in before[:-1]]==[x['rate_tick'] for x in after[:-1]] + sixth=after[-2]['rate_tick'] + D=1<0 + threshold=Fraction(249*11*D*GRID,8*16**6*A_num) + assert threshold.numerator//threshold.denominator==claimed-1 + reduction=Fraction(ORIGINAL_H-claimed,ORIGINAL_H)*100 + out[str(depth)]={ + 'trial':str(Fraction(C,D)), 'least_first_height':claimed, + 'neighbor_margins':[{'height':z,'margin':str(v),'decimal':frac_decimal(v)} + for z,v in ((claimed-1,last_margin(before)),(claimed,last_margin(after)))], + 'sixth_tick_on_both_neighbors':sixth, + 'first_six_ticks':[r['rate_tick'] for r in after[:-1]], + 'shared_plateau_exact_threshold':str(threshold), + 'reduction_percent_exact':str(reduction),'reduction_percent_decimal':frac_decimal(reduction), + 'binary_search_iterations':visits,'first_six_strict':True,'seventh_strict_at_success':True, + } + doc={ + 'scope':'Ordinary seven-stage invoice only; eta cap, exact input heights and actual truncation/one-tick policy are included. No other physical or all-size machine obligation is implied.', + 'kappa':'0.003890115286594461','gap':'1/1000000000000000000000', + 'ordinary_tick_e21':BOOKED,'debit':'11/8','height_ratio':16, + 'monotonicity':'For positive integer h, each c-(11/8)/(16^i*h) increases with h. The capped stage limit is nondecreasing in h and in its prior tick. Truncation toward zero and subtracting one are nondecreasing on the real line, so induction makes the seventh cap nondecreasing. Adjacent failure rules out all smaller h; strict success checks all stages at the next integer.', + 'cases':out, + } + (HERE/'HEIGHT-EXACT.json').write_text(json.dumps(doc,indent=2,sort_keys=True)+'\n') + print('PASS_ORDINARY_HEIGHT_THRESHOLDS_65_66') + +if __name__=='__main__':main() diff --git a/research/p104-balanced-fusion-residual/manuscript/verified-powers.png b/research/p104-balanced-fusion-residual/manuscript/verified-powers.png new file mode 100644 index 0000000000..10562b9c3c Binary files /dev/null and b/research/p104-balanced-fusion-residual/manuscript/verified-powers.png differ diff --git a/research/p104-balanced-fusion-residual/pinned/EFREE-CALLER.json.gz b/research/p104-balanced-fusion-residual/pinned/EFREE-CALLER.json.gz new file mode 100644 index 0000000000..f022272a8d Binary files /dev/null and b/research/p104-balanced-fusion-residual/pinned/EFREE-CALLER.json.gz differ diff --git a/research/p104-balanced-fusion-residual/pinned/ONE-RESIDUAL.json.gz b/research/p104-balanced-fusion-residual/pinned/ONE-RESIDUAL.json.gz new file mode 100644 index 0000000000..c943cddc9e Binary files /dev/null and b/research/p104-balanced-fusion-residual/pinned/ONE-RESIDUAL.json.gz differ diff --git a/research/p104-balanced-fusion-residual/pinned/price_audit.py b/research/p104-balanced-fusion-residual/pinned/price_audit.py new file mode 100644 index 0000000000..829966dd45 --- /dev/null +++ b/research/p104-balanced-fusion-residual/pinned/price_audit.py @@ -0,0 +1,324 @@ +#!/usr/bin/env python3 +"""Exact arithmetic screen for a hypothetical paid histogram, not a circuit rewrite. + +Run: python3 -B price_audit.py [receipt.json] +Uses only the Python standard library. The two adjacent compressed inputs are +pinned #8027 / inherited caller source bytes. The 48-call positive inventory is +from #8035's reconstructed physical word, and can be cross-checked using the +separate source_binding.py against the #8035 extracted package. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from math import isqrt +from pathlib import Path +import gzip, json, sys + +ROOT = Path(__file__).resolve().parent +UNIT = 1 << 192 +BITS = 184 +K = Q('0.00389046') +G = Q(1, 10**17) +ORDINARY = Q('0.00389046000001') +ETA = Q(39, 10000) +RANK_LOGS = (106811524, 1708984375, 27343750000, 437500000000, + 7000000000000, 112000000000000) +M_LOG = 1600000 +Z = Q(593, 2048) +W = Q(491, 1024) +WEIGHT = Q(1, 64) +POS_C = Q(2043, 524288) + + +def ceil_div(a, b): + return -(-a // b) + + +def ceil_frac(x): + return ceil_div(x.numerator, x.denominator) + + +def floor_frac(x): + return x.numerator // x.denominator + + +def enclosing_text(lo, hi, digits=18): + """Return outward decimal endpoints, each with exactly `digits` places.""" + s = 10**digits + a, b = floor_frac(lo*s), ceil_frac(hi*s) + def form(n): + sign = '-' if n < 0 else '' + n = abs(n) + return f'{sign}{n//s}.{n%s:0{digits}d}' + return [form(a), form(b)] + + +def load_inputs(): + gp = ROOT/'strong-bit.json.gz'; cp = ROOT/'EFREE-CALLER.json.gz' + gd, cd = gp.read_bytes(), cp.read_bytes() + assert sha256(gd).hexdigest() == '74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' + assert sha256(cd).hexdigest() == '757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b' + graph, caller = json.loads(gzip.decompress(gd)), json.loads(gzip.decompress(cd)) + dims = {int(k): v['dim'] for k,v in graph['frames'].items()} + ports = caller['ports'] + local = sum(r[0]=='LOCAL' for r in caller['events']) + assert (ports, local, caller['body_rank']) == (111,36,7) + targets, paid = Counter(), Counter() + for row in caller['diagonal']: + targets[1 + caller['body_rank'] * len(row['stages'])] += ports + for src, dst in zip(graph['start'][2*ports:], graph['final'][2*ports:], strict=True): + targets[abs(dims[dst] - dims[src])] += local + for row in graph['program']: + if row[0] == 'MOVE': paid[abs(dims[row[3]] - dims[row[2]])] += local + for row in caller['events']: + if row[0] == 'QUERY': paid[1] += ports + elif row[0] == 'IDLE_ONE': paid[len(row[2])*caller['body_rank']] += ports + assert dict(sorted(targets.items())) == BIT_TARGET + assert dict(sorted(paid.items())) == BIT_PAID + assert sum(targets.values()) == 18906 and sum(paid.values()) == 104904 + assert sum(k*v for k,v in paid.items()) == 285600 + return targets, paid + + +BIT_TARGET = {4:612,8:14520,15:444,22:444,29:444,36:444,43:444,50:444,57:444,64:444,127:222} +BIT_PAID = {1:48972,2:44892,3:1980,4:1512,5:1044,6:2916,7:480,14:444,21:444, + 28:444,35:444,42:444,49:444,56:444} +# Reconstructed from #8035's changed positive graph and caller, not the old grade-14 word. +POS_TARGET = {1:1008,2:432,3:480,4:11568,5:1584,6:48,7:672,8:1584,9:25872, + 17:1248,25:1248,33:1248,41:1248,49:1248,57:1248,65:1248,129:624} +POS_PAID = {1:183312,2:38016,3:23040,4:10848,5:15072,6:1968,7:480,8:1344, + 16:1248,24:1248,32:1248,40:1248,48:1248,56:1248} + + +@lru_cache(None) +def power_bound(rank, exponent): + """Prove lo/UNIT <= rank**exponent <= hi/UNIT for rational exponent >= 0. + + Each iterative square root is rounded outward. After BITS bits, one + additional copy of the last root encloses any nonzero fractional tail. + """ + assert rank > 0 and exponent >= 0 + n, rem_n = divmod(exponent.numerator, exponent.denominator) + den = exponent.denominator + lo = hi = rank**n * UNIT + root_lo = root_hi = rank * UNIT + for _ in range(BITS): + root_lo = isqrt(root_lo * UNIT) + z = root_hi * UNIT + root_hi = isqrt(z) + if root_hi * root_hi < z: root_hi += 1 + rem_n *= 2 + if rem_n >= den: + rem_n -= den + lo = lo * root_lo // UNIT + hi = ceil_div(hi * root_hi, UNIT) + if rem_n: hi = ceil_div(hi * root_hi, UNIT) + return lo, hi + + +def moment(hist, exponent): + lo = hi = 0 + for rank, count in hist.items(): + a,b = power_bound(rank,exponent) + lo += count*a; hi += count*b + return lo,hi + + +def raw_difference(targets, paid, c): + tl,th=moment(targets,1-c); pl,ph=moment(paid,1-c) + return Q(tl-ph,UNIT),Q(th-pl,UNIT) + + +def changed(paid, m): + assert isinstance(m,int) and 0 <= m <= paid[1]//2 + p = paid.copy(); p[1] -= 2*m; p[2] += m + assert sum(r*n for r,n in p.items()) == 285600 + assert sum(p.values()) == 104904-m + return p + + +def powered_surplus(targets, paid, c, v, z, w, weight, keep): + t=1-c + tl,th=moment(targets,t); pl,ph=moment(paid,t) + gl,gh=moment(paid,t+z); p12lo,p12hi=power_bound(12,z) + ol,oh=moment(targets,t-w); klo,khi=power_bound(keep,w) + alo,ahi=Q(pl,th),Q(ph,tl) + gamlo,gamhi=Q(gl*UNIT,th*p12hi),Q(gh*UNIT,tl*p12lo) + lamlo,lamhi=Q(ol*klo,th*UNIT),Q(oh*khi,tl*UNIT) + lo = 1-ahi**v-weight*gamhi**v-lamhi**v + hi = 1-alo**v-weight*gamlo**v-lamlo**v + assert lo<=hi + return lo,hi + + +def crossing(targets, paid): + """Directed 1e-26 bracket; monotonicity is proved in README.""" + s=10**26; center=floor_frac(K*s) + lo,hi=center-10**19,center+10**19 + assert raw_difference(targets,paid,Q(lo,s))[0] > 0 + assert raw_difference(targets,paid,Q(hi,s))[1] < 0 + while hi-lo>1: + mid=(lo+hi)//2 + a,b=raw_difference(targets,paid,Q(mid,s)) + assert a>0 or b<0, 'directed grid too coarse to decide a bisection point' + if a>0: lo=mid + else: hi=mid + return enclosing_text(Q(lo,s),Q(hi,s),26) + + +def bit_debit(v, floor, c): + scale=4*(134*127)**v*floor + assert Q(1024*floor,15*(floor-2)) < 69 and 69**100 < 2**611 + return ceil_frac(Q(611,100)+c*(scale-1).bit_length()) + + +def positive_debit(): + floor=1<<15; v=128 + assert 32*floor*4 < 9*15*(floor-2) and 9**4 < 2**5*4**4 + scale=4*(153*129)**v*floor + return ceil_frac(Q(5,4)+POS_C*(scale-1).bit_length()+1) + + +def stage_prices(c, d): + prev=Q(0); result=[] + for i,h in enumerate(RANK_LOGS): + covered=c-Q(d,h) + limit=min((249*covered+prev)/250,ETA) + rate=ORDINARY if i==len(RANK_LOGS)-1 else Q(floor_frac(limit*10**18)-1,10**18) + assert prev2 and Q(101,100)*c/Z16*4**13 and 15**v>=2*12**v + assert 512*v <= min(RANK_LOGS) + assert 2**64*(v+1)*2**(28*v)<2**(512*v) + assert 872*(Q(13,4)+Q(2,512))*(512*v)<2**(512*v) + assert L>2 + + +def main(): + targets,paid=load_inputs() + # Round c upward from a readable decimal to the 2^-56 grid. + c = Q(ceil_frac(Q('0.00389046000025')*2**56),2**56) + assert K < ORDINARY < c < ETA + m0=raw_difference(targets,paid,K) + p2lo,p2hi=power_bound(2,1-K) + delta_lo,delta_hi=2-Q(p2hi,UNIT),2-Q(p2lo,UNIT) + assert m0[1]<0 and 00) + + assert bit_debit(268,1<<50,c)==21 and positive_debit()==10 + stages=stage_prices(c,21) + positive=POS_C-Q(10,M_LOG) + assert 0K+4*G and positive>K+5*G + strict,functional,pay=signed_margins(K,G,ORDINARY,positive) + assert min(*strict,*functional,pay)>0 + assert min(*signed_margins(K,G,K+4*G,positive)[0])==0 + assert signed_margins(K,G,ORDINARY,K+5*G)[2]==0 + assert min(*signed_margins(K,Q(0),ORDINARY,positive)[0])==0 + power_and_enumeration_checks(268,1<<50,c,104904-25) + out={ + 'interpretation':'m replacements of two separate rank-one paid occurrences by one rank-two paid occurrence within the whole 36-call raw word; no physical realization asserted', + 'sources':{'paired_pr_8027_head':'fb9b6a7b0d27da1cf98430893a3016bf811e2aa4', + 'profile_pr_8035_head':'ea776471bf8ed143a0625cf2d7532f65d15eb5f9', + 'graph_sha256':'74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326', + 'caller_sha256':'757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b'}, + 'kappa':str(K), 'bit_c_fraction':str(c), 'bit_c_decimal_bounds':enclosing_text(c,c,20), + 'ordinary_rate':str(ORDINARY), 'signed_gap':str(G), 'eta':str(ETA), + 'positive_paid_cap':str(positive), 'positive_paid_cap_decimal_bounds':enclosing_text(positive,positive,20), + 'ordinary_margin':str(ORDINARY-K-4*G), 'positive_margin':str(pay), + 'bit_debit':21,'positive_debit':10,'rank_logs':RANK_LOGS,'ordinary_stage_rates':[str(x[3]) for x in stages], + 'sixth_stage_headroom':str(stages[-1][2]-ORDINARY), + 'signed_gates':{'strict':len(strict),'functional':len(functional),'minimum_margin':str(min(*strict,*functional,pay)), + 'controls':'equality at either supplier gate and g=0 each fail'}, + 'raw_minimum_real_replacements_at_target_bounds':enclosing_text(*threshold,14), + 'raw_difference_at_target_bounds':{}, 'raw_crossing_bounds':{}, + 'powered_268_surplus_bounds':{}, + } + for m in (24,25,26,27,36): + p=changed(paid,m) + d=raw_difference(targets,p,K) + su=powered_surplus(targets,p,c,268,Z,W,WEIGHT,15) + out['raw_difference_at_target_bounds'][str(m)]=enclosing_text(*d,16) + out['powered_268_surplus_bounds'][str(m)]=enclosing_text(*su,18) + if m==24: assert su[1] < 0 + else: assert su[0] > Q(2,1<<50) + # Although a replacement increases the tilted split moment, certify that + # the full powered bound decreases throughout the real interval [0, 36]. + # The base debit decreases and the split debit increases with m; bounding + # both derivative magnitudes at m=36 proves the net derivative negative. + t=1-c; target_lo,target_hi=moment(targets,t) + end=changed(paid,36) + pl,_=moment(end,t); _,ph_tilt=moment(end,t+Z) + p2tlo,p2thi=power_bound(2,t) + p2zlo,p2zhi=power_bound(2,t+Z) + p12lo,_=power_bound(12,Z) + assert p2thi<2*UNIT and p2zlo>2*UNIT + alpha_end_lo=Q(pl,target_hi) + gamma_end_hi=Q(ph_tilt*UNIT,target_lo*p12lo) + base_saving_lo=Q(2*UNIT-p2thi,target_hi) + tilt_surcharge_hi=Q((p2zhi-2*UNIT)*UNIT,target_lo*p12lo) + assert base_saving_lo*alpha_end_lo**267 > WEIGHT*tilt_surcharge_hi*gamma_end_hi**267 + out['powered_268_certificate_strictly_decreases_on_m_0_to_36']=True + out['raw_crossing_bounds']={str(m):crossing(targets,changed(paid,m)) for m in (24,25)} + # At most 36 such substitutions cannot absorb even one additional rank-one + # occurrence. This control applies to the whole 36-call raw word. + extra=changed(paid,36); extra[1]+=1 + extra_bound=raw_difference(targets,extra,K) + assert extra_bound[1] < 0 + out['m36_plus_one_rank_one_raw_difference_at_target_bounds']=enclosing_text(*extra_bound,16) + pos_su=powered_surplus(POS_TARGET,POS_PAID,POS_C,128,Q(19,64),Q(23,64),Q(2),16) + assert pos_su[0] > Q(2,1<<15) + out['positive_128_surplus_bounds']=enclosing_text(*pos_su,15) + + # Arithmetic-only smaller power: this is not enabled in #8035's runtime. + small=powered_surplus(targets,changed(paid,25),c,132,Z,W,WEIGHT,15) + assert small[0] > Q(2,1<<25) and bit_debit(132,1<<25,c)==14 + smallstages=stage_prices(c,14) + power_and_enumeration_checks(132,1<<25,c,104904-25) + out['exploratory_power_132']={'floor':str(1<<25),'bit_debit':14, + 'surplus_bounds':enclosing_text(*small,18), + 'sixth_stage_headroom':str(smallstages[-1][2]-ORDINARY), + 'status':'arithmetic screen only; power 132 needs new runtime/physical/stock and supplier transfer proof'} + assert powered_surplus(targets,changed(paid,25),c,131,Z,W,WEIGHT,15)[1] < 0 + rendered=json.dumps(out,indent=2,sort_keys=True)+'\n' + if len(sys.argv)==2: Path(sys.argv[1]).write_text(rendered) + else: print(rendered,end='') + print('PASS_HYPOTHETICAL_PRICE_BOUNDARY_24_25; NO_REWRITE_OR_THEOREM_CLAIMED') + +if __name__=='__main__': main() diff --git a/research/p104-balanced-fusion-residual/pinned/strong-bit.json.gz b/research/p104-balanced-fusion-residual/pinned/strong-bit.json.gz new file mode 100644 index 0000000000..16f8cafb1c Binary files /dev/null and b/research/p104-balanced-fusion-residual/pinned/strong-bit.json.gz differ diff --git a/research/p104-balanced-fusion-residual/second_slot.py b/research/p104-balanced-fusion-residual/second_slot.py new file mode 100644 index 0000000000..d25909059d --- /dev/null +++ b/research/p104-balanced-fusion-residual/second_slot.py @@ -0,0 +1,68 @@ +"""Replay fixed-template balanced-fusion second-slot exclusions offline.""" +from hashlib import sha256 +from pathlib import Path +import gzip,json,subprocess,sys,random + +HERE=Path(__file__).resolve().parent +sys.path.insert(0,str(HERE)) +from gf2 import Echelon + +# Check the marked-history reduction against direct exhaustive spans on +# independent four-bit toy examples, including zero and duplicate records. +rng=random.Random(98407) +for _ in range(200): + tagged=[(rng.randrange(16),rng.randrange(2)) for _ in range(rng.randrange(1,7))] + marked=[x for x,a in tagged if a];plain=[x for x,a in tagged if not a] + pivot=marked[0] if marked else None + E=Echelon(plain+([x^pivot for x in marked[1:]] if marked else [])) + for q in range(16): + actual=Echelon(x^(q if a else 0) for x,a in tagged) + for target in range(16): + predicted=not E.residue(target) or (bool(marked) and not E.residue(target^pivot^q)) + assert bool(predicted)==(not actual.residue(target)) + +data=(HERE/'pinned'/'ONE-RESIDUAL.json.gz').read_bytes() +assert sha256(data).hexdigest()=='7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7' +raw=gzip.decompress(data) +assert sha256(raw).hexdigest()=='3cd1dd12039550bc0deecadcdb3074123598cd41cd41e94e0fb43451411ecb96' +G=json.loads(raw);n=G['public'];assert n==630 +ch=dict(enumerate(G['start']));v={i:1<>m:bad.append(proof) +for chart,rows in sorted(seen.items()): + outputs=[i for i,c in enumerate(G['final']) if c==chart] + if not outputs:continue + marked=[r&low for r in rows if r&mark];plain=[r&low for r in rows if not r&mark] + if not marked: + E=Echelon(plain) + for i in outputs: + if E.residue(want[i]):bad.append({(chart,i,'unaffected')}) + continue + pivot=marked[0];E=Echelon(plain+[x^pivot for x in marked[1:]]) + needs=[i for i in outputs if E.residue(want[i])] + if not needs:continue + sr=[E.residue(x) for _,x in source] + for i in needs: + rhs=E.residue(want[i]^pivot);coords=rhs + for x in sr:coords|=x + for bit in bits(coords): + lhs=sum(((val>>bit)&1)<>bit)&1,(chart,i,bit)) +print('SITE',site,'SOURCE_LIVE',len(source),'EQUATIONS',equations,'RANK',len(basis),'CONFLICTS',len(bad)) +if bad: + witness=min(bad,key=len);print('CORE',sorted(witness,key=str)) + for why in sorted(witness,key=str): + if why in origin: + lhs,rhs=origin[why];print('EQUATION',why,[source[j][0] for j in range(m) if lhs>>j&1],'=',rhs) +else: + solution=0 + for p,(row,_) in sorted(basis.items(),reverse=True): + rhs=(row>>m)&1;higher=row&((1<>j&1]) diff --git a/research/p104-balanced-fusion-residual/sponsor_solver.py b/research/p104-balanced-fusion-residual/sponsor_solver.py new file mode 100644 index 0000000000..dd41b2d82d --- /dev/null +++ b/research/p104-balanced-fusion-residual/sponsor_solver.py @@ -0,0 +1,112 @@ +"""Exact terminal-history feasibility for recoding the existing 509->0 return. + +The frozen one-residual word is unchanged except that, immediately before +its existing paid MOVE 3150 from 509 to 0, a source-local linear combination +of the then-live chart-509 registers is XORed into that moving field. Every +chart is granted free retention of all its actual earlier incoming fields. +All 630 native output masks must be decodable at their original charts. +""" +import collections,gzip,json,sys +from pathlib import Path +sys.path.insert(0,str(Path(__file__).resolve().parent)) +from gf2 import Echelon,bits + +path=Path(str(Path(__file__).resolve().parent/'pinned'/'ONE-RESIDUAL.json.gz')) +G=json.load(gzip.open(path,'rt')); n=G['public']; mark=1<>m:conflicts.append(proof) + +for chart,rows in sorted(seen.items()): + outputs=[i for i,c in enumerate(G['final']) if c==chart and i!=130] + if not outputs:continue + marked=[r&low for r in rows if r&mark] + plain=[r&low for r in rows if not r&mark] + if not marked: + E=Echelon(plain) + for i in outputs: + if E.residue(want[i]):conflicts.append({(chart,i,'unaffected_impossible')}) + continue + pivot=marked[0];even=plain+[x^pivot for x in marked[1:]];E=Echelon(even) + if chart==525:spaces['chart525']=(E,pivot) + required=[i for i in outputs if E.residue(want[i])] + if not required:continue + sr=[E.residue(x) for _,x in source] + constrained.append((chart,tuple(required),len(rows),len(E.rows))) + for i in required: + rhs=E.residue(want[i]^pivot) + coords=rhs + for val in sr:coords|=val + for bit in bits(coords): + lhs=sum(((val>>bit)&1)<>bit)&1 + add_equation(lhs,b,(chart,i,bit)) + +# At the second existing ingress, all chart-0 fields except the already +# changed return 3150 are marker-free. They must combine with 3150 to +# reconstruct the missing x38 correction, using only actual live fields. +changed=[x for i,x in zero_before if x&mark] +assert len(changed)==1 +E=Echelon([x&low for _,x in zero_before if not x&mark]+[x&low for x in zero_history if not x&mark]) +assert E.residue(1<<38), 'x38 is already present without the recoded return' +spaces['chart0']=(E,changed[0]&low) +rhs=E.residue((1<<38)^(changed[0]&low));sr=[E.residue(x) for _,x in source] +coords=rhs +for val in sr:coords|=val +for bit in bits(coords): + lhs=sum(((val>>bit)&1)<>bit)&1 + add_equation(lhs,b,('chart0_x38',bit)) + +print('constrained_charts',len(constrained),'details',constrained) +print('equations',tested,'variable_rank',len(basis),'conflicts',len(conflicts)) +if conflicts: + witness=min(conflicts,key=len);print('FIRST_MIN_CONFLICT',sorted(witness,key=str)) + for label in sorted(witness,key=str): + if label in original: + lhs,rhs=original[label];print(' CONFLICT_EQUATION',label,[source[j][0] for j in range(m) if lhs>>j&1],'=',rhs) + for name,(ES,pivot) in spaces.items(): + z=1 + for p,row in sorted(ES.rows.items()): + if (z&row).bit_count()&1:z|=1<

>m)&1;higher=row&((1<>j&1] + q=0 + for j,(_,mask) in enumerate(source): + if sol>>j&1:q^=mask + print('SAT_SOURCE_IDS',ids,'SOURCE_FORM_SUPPORT',list(bits(q))) diff --git a/research/p104-balanced-fusion-residual/verify.py b/research/p104-balanced-fusion-residual/verify.py new file mode 100644 index 0000000000..9b609b6566 --- /dev/null +++ b/research/p104-balanced-fusion-residual/verify.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Rebuild the balanced word, caller obstruction, and counterfactual invoice.""" +import gzip +import hashlib +import importlib.util +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile + +HERE=Path(__file__).resolve().parent +FROZEN={'candidate.py': 'd848ce922da44a1aae7eb22b1d12e09ef6ddd59b4ba804a149e00b9b7b7e1b89', 'ONE-RESIDUAL-RESULT.json': 'e46455ee7bedc9ecbd8cd780bd0dc167a4ca7963922715d5fbe992e2d703e12d', 'verify_candidate.py': 'b026de749f1a92ae714934f46e73e8c13a396491445e562f625ce4cb41dac782', 'CANDIDATE-AUDIT.json': 'ad481bc8c4f44c944c1adeaf1012ffaecc87c01d034f0955de7f30711b60cfe4', 'constant_composition.py': 'd665b36f5009bdb0e22bd7dd2297df989029cd8816595b4fdfb4ca765ac8790f', 'constant_composition.json': '8bbb270553968fbeed190b1741fb2d56a6f801243d77243aaa674c4b4c0c1cfb', 'caller_dual_check.py': '28e2008c0d455b7c09ab925293c905e621c3cbb87fc9cf4b849c1266f85a05c2', 'caller_dual_check.json': '88fb6faca7fcdfe01bcef09fee6a65a2a632469031253e368c8e88237c1736a8', 'composition_controls.py': '3909d89285d0155d50e06ed50e6ec0ba55a22351fc0160414f6bad5e405c1130', 'COMPOSITION-CONTROLS.json': '2cd68e11e3656571dad8fe07628967c32a9ae3e3ee18c495a755a76119012e8f', 'hinge_screen.py': '4a391a93e7f5b7ad3484f9bccb435c313ea2efc8ac60c08f0858c434d7d6e4ff', 'HINGE.json': '66b035c97ffa1977108c62388eea50a0be165a633a06bc8cb3fe186db67014ad', 'hinge_audit.py': 'cabebddf56444fe8193551b8e4ca506ebb07eff41b8ecf32618a4e363122f72a', 'HINGE-AUDIT.json': 'b038d3311cc7c01f1fd4af63c199e3377b98763d4a20b71be761293101bb81a1', 'balanced_price.py': '1b1accfc375229f3fb95ae651d72289052d2b6c00cb436f4a9bc911b0cac8e43', 'BALANCED-PRICE.json': 'de5e75d1dfdc6b75f573b6d49fdf4b704f0cb0cffddee8eb5f0f8a4c4d6065ae', 'counterfactual_invoice.py': 'fb6fe39dac2d5b156c62acced9618f38815f2f18cdf72e1c251b78246b21e408', 'INVOICE.json': 'ec96c828760da4ff0b269e76debc431d2916fc050e96658b6d81d409f3a9d3ae', 'second_slot.py': '848210b31fc3d2a8e89248b7662fde8489700b8a3b2b3654a8d3b47545b04a84', 'slot_solver.py': 'd9c2ad85cf10a625ef5f6c111ae5a0b2536aa7300bcf9437644e15e2962aea5a', 'sponsor_solver.py': '0c152479dd271fbdb92c1261f56f34067bcda7fa616725fe8029d4939f0da358', 'gf2.py': '23347c0ad08f0680f8e9ed60fbf63c05213309ac9f27029daceda50f55292130', 'pinned/strong-bit.json.gz': '74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326', 'pinned/EFREE-CALLER.json.gz': '757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b', 'pinned/ONE-RESIDUAL.json.gz': '7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7', 'pinned/price_audit.py': 'ca650d573f605bf51a8806a772903b6775cd036dfbfe7f043eccd3e51bc9977b', 'invoice_engine/OVERLAY.json': '73aaf56a8a199cf3b7fc6c87316ca50298f47561e4b7c227edec6230f12a8403', 'invoice_engine/PREDECESSOR-SOURCES.json': '3634f7a15b8ca6f1832e48bdd4e83bd764509f804196d956149a9a82e7512a64', 'invoice_engine/RESULT.json': 'e1ccc49a75e17fab4f5aa03697db58a0a6c3ad335cd7b8bba156c9bc3d419179', 'invoice_engine/check_profile.py': '83561f0c2da467b9b657380e043b069de1e2f139d5231cccd0abcce665bd6352', 'invoice_engine/outer_budget.py': 'ca4438db28a447ed5c43d87d43f0ac10a0cb2b4e183342ac93139d517b9d4d02', 'invoice_engine/predecessor-8030.tar.gz': '769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c', 'invoice_engine/restore_machine.py': '0d88742495d10d044b2fe2a63e2220646230b8695b0094a970e254a71bc81d8e', 'invoice_engine/verify_funding.py': 'b9596574f4ded80c2bee2d44fef4d1d4aff859f53eadacb089130f34bed6779e', 'SECOND-SLOT.txt': '5657fbf01c95236af56802240f5c70370f0bd84d47bffbd73153a13ba994ddf9', 'manuscript/height-audit/height_exact.py': '452f30b6b2077aebba9500f39b216c596415e2f9d9c7a20393e68cb65b4d5aec', 'manuscript/height-audit/cross_check.py': 'c3c8e2ca3d0643450c57dc867a4c9e8333f055631885b058ec987e7bfa40602f', 'manuscript/height-audit/HEIGHT-EXACT.json': '92aab6fd8c1a43899e3d1d280c51ea74974f51d95ae1e5421e83c931fc510447', 'manuscript/height-audit/README.md': 'aeb13491e8a418d048fce8165f90f362a21929e4703d281fcb240d9ab1203b30'} + +def require(condition,message): + if not condition:raise AssertionError(message) + +def blob_hash(data): + return hashlib.sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest() + +def main(): + require(not sys.flags.optimize,'run without optimized assertions') + for name,digest in FROZEN.items(): + require(hashlib.sha256((HERE/name).read_bytes()).hexdigest()==digest,'changed replay input: '+name) + for name,blob in [('pinned/strong-bit.json.gz','16f8cafb1c4d139a99a62e46eb40c118e6176c34'),('pinned/EFREE-CALLER.json.gz','f022272a8d51ede841778dec76e2bfb24b614d04'),('pinned/price_audit.py','829966dd450bdc33409ef0a214ee5a184f89a564'),('invoice_engine/predecessor-8030.tar.gz','e00a6bfe8328b4c982bf0689c4d55c8207515514')]: + require(blob_hash((HERE/name).read_bytes())==blob,'Git blob mismatch: '+name) + graph=HERE/'pinned/strong-bit.json.gz';candidate=HERE/'pinned/ONE-RESIDUAL.json.gz' + with tempfile.TemporaryDirectory(prefix='p104-balanced-replay-') as tmp: + temp=Path(tmp) + def run(script,*args,parse=True,check=True,cwd=None): + cache=temp/('cache-'+str(run.count));run.count+=1 + command=[sys.executable,'-I','-B','-X','pycache_prefix='+str(cache),str(script),*map(str,args)] + proc=subprocess.run(command,cwd=cwd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True,timeout=550) + if not check: + require(proc.returncode!=0,'negative control accepted: '+str(script));return None + require(proc.returncode==0,str(script)+' failed: '+proc.stderr[-5000:]) + return json.loads(proc.stdout) if parse else proc.stdout + run.count=0 + def equal(data,name): + require(data==json.loads((HERE/name).read_text()),'receipt mismatch: '+name) + rebuilt=temp/'rebuilt.json.gz' + equal(run(HERE/'candidate.py',graph,rebuilt),'ONE-RESIDUAL-RESULT.json') + require(gzip.decompress(rebuilt.read_bytes())==gzip.decompress(candidate.read_bytes()),'rebuilt graph differs') + equal(run(HERE/'verify_candidate.py',graph,candidate),'CANDIDATE-AUDIT.json') + equal(run(HERE/'constant_composition.py'),'constant_composition.json') + equal(run(HERE/'caller_dual_check.py'),'caller_dual_check.json') + equal(run(HERE/'composition_controls.py'),'COMPOSITION-CONTROLS.json') + equal(run(HERE/'hinge_screen.py',graph),'HINGE.json') + equal(run(HERE/'hinge_audit.py'),'HINGE-AUDIT.json') + equal(run(HERE/'balanced_price.py',HERE/'pinned'),'BALANCED-PRICE.json') + # height_exact.py writes its receipt beside itself; run both scripts in + # a private copy and compare its regenerated receipt to the pinned bytes. + height=temp/'height-audit';height.mkdir() + height_source=HERE/'manuscript/height-audit' + for name in ('height_exact.py','cross_check.py','HEIGHT-EXACT.json'): + shutil.copyfile(height_source/name,height/name) + require(run(height/'height_exact.py',parse=False)=='PASS_ORDINARY_HEIGHT_THRESHOLDS_65_66\n', + 'height threshold verifier did not report success') + require((height/'HEIGHT-EXACT.json').read_bytes()==(height_source/'HEIGHT-EXACT.json').read_bytes(), + 'height threshold receipt mismatch') + require(run(height/'cross_check.py',parse=False)=='PASS_INTEGER_RECURRENCE_VS_FRACTION 2352 stage comparisons\n', + 'height recurrence cross-check did not report success') + # The second-slot checker launches two more interpreters. Copy its + # authenticated source to a fresh private directory, so no old pyc can + # be imported by those children even under -I -B. + second=temp/'second';second.mkdir();(second/'pinned').mkdir() + for name in ('second_slot.py','slot_solver.py','sponsor_solver.py','gf2.py'): + shutil.copyfile(HERE/name,second/name) + shutil.copyfile(candidate,second/'pinned/ONE-RESIDUAL.json.gz') + require(run(second/'second_slot.py',parse=False)==(HERE/'SECOND-SLOT.txt').read_text(),'second-slot receipt mismatch') + # Restore a committed offline predecessor and its exact public overlay. + module=HERE/'invoice_engine/restore_machine.py' + spec=importlib.util.spec_from_file_location('p104_invoice_restore',module) + restore=importlib.util.module_from_spec(spec);spec.loader.exec_module(restore) + machine=temp/'machine';machine.mkdir();restore.restore(machine);restore.apply_overlay(machine) + invoice=temp/'invoice.json' + run(HERE/'counterfactual_invoice.py',machine,invoice,parse=False) + require(json.loads(invoice.read_text())==json.loads((HERE/'INVOICE.json').read_text()),'counterfactual invoice mismatch') + bad=temp/'bad-source.gz';buf=bytearray(graph.read_bytes());buf[-1]^=1;bad.write_bytes(buf) + run(HERE/'candidate.py',bad,temp/'bad-out.gz',check=False) + print('PASS_BALANCED_RESIDUAL local_rows=630 caller_placements=36 hinge=4096 conditional_invoice=268,285') + +if __name__=='__main__':main() diff --git a/research/p104-balanced-fusion-residual/verify_candidate.py b/research/p104-balanced-fusion-residual/verify_candidate.py new file mode 100644 index 0000000000..c91f009644 --- /dev/null +++ b/research/p104-balanced-fusion-residual/verify_candidate.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +"""Independent 630-row, transpose, history and clear audit of the fused word.""" +from collections import Counter,defaultdict +from hashlib import sha256 +from pathlib import Path +import argparse,gzip,json + +SOURCE=Path(__file__).resolve().parent / 'pinned/strong-bit.json.gz' +CHANGED=Path(__file__).resolve().parent / 'pinned/ONE-RESIDUAL.json.gz' +A='74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' +B='7fa5589301124788237a569c3c0bbc0783f70efd840b15238300b8a2d5ab1cd7' + +def load(path,digest): + b=path.read_bytes();assert sha256(b).hexdigest()==digest + return json.loads(gzip.decompress(b)) + +def basis(rows): + piv={} + for v in rows: + while v: + p=v&-v + if p not in piv:piv[p]=v;break + v^=piv[p] + return piv + +def contains(piv,v): + while v: + p=v&-v + if p not in piv:return False + v^=piv[p] + return True + +def separating_input(stock,target): + # Direct row reduction of the system stock*x=0, target*x=1. + piv={} + for row,rhs in [(r,0) for r in stock]+[(target,1)]: + while row: + p=row&-row + if p not in piv:piv[p]=(row,rhs);break + r,b=piv[p];row^=r;rhs^=b + else:assert rhs==0 + x=0 + for p in sorted(piv,reverse=True): + row,rhs=piv[p] + if rhs^((row&x).bit_count()&1):x|=p + assert all((r&x).bit_count()%2==0 for r in stock) and (target&x).bit_count()%2==1 + return x + +def forward(g,omit_last=False): + n=g['public'];at=dict(enumerate(g['start']));v={i:1<=n;at[i]=a[0];v[i]=0 + elif op=='ADD':j,c=a;assert i!=j and at[i]==at[j]==c;v[i]^=v[j] + elif op=='MOVE':s,c=a;assert at[i]==s;at[i]=c;history[c].append(v[i]);moves.append((i,s,c)) + elif op=='SWAP':j,=a;at[i],at[j]=at[j],at[i];v[i],v[j]=v[j],v[i] + elif op=='CLEAR':assert i>=n and at.pop(i)==a[0] and i not in clears;clears[i]=(a[0],v.pop(i)) + else:raise AssertionError(op) + assert at==dict(enumerate(g['final'])) + return [v[i] for i in range(n)],clears,history,moves + +def reverse(g): + n=g['public'];at=dict(enumerate(g['final']));v={i:1<>i)&1)<>i&1], + 'last_add_corruption_changes_outputs':bad},indent=2,sort_keys=True)) + +if __name__=='__main__':main()