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-ordinary-eta-lift/LICENSE b/research/p104-ordinary-eta-lift/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-ordinary-eta-lift/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-ordinary-eta-lift/NOTICE.md b/research/p104-ordinary-eta-lift/NOTICE.md new file mode 100644 index 0000000000..29cc65106c --- /dev/null +++ b/research/p104-ordinary-eta-lift/NOTICE.md @@ -0,0 +1,5 @@ +# Attribution and scope + +ToikY's [#8072](https://github.com/CrocSwap/integer-mult-bounds/pull/8072), pinned at `75f7e1c44f48c43983016bcf8878c4d9e5e87c62`, supplied the capped allocation, retune and the retained source files. ToikY's #8066–#8071 supplied the preceding ordinary booking, K7 floor, capped-allocation method, Gaussian debit and finer ordinary charge. Ali Romman supplied the pinned [#8057 source](https://github.com/CrocSwap/integer-mult-bounds/commit/cbe847a953b971f9c6c5a0a6661e2008acd29086) and #8055 native setup proof. SYLforge supplied the #8052 K7 word. The original notice, license and peer manifest are preserved in `original/`, and the archive retains its nested notices. + +The present package changes the ordinary height and clamp, supplies the 25-bit conditional fixed-installer extension, and checks the unchanged Gaussian as a negative control. It received substantial OpenAI Codex assistance in analysis, implementation and verification. Inherited credit does not imply that any predecessor author reviewed or endorses this extension. diff --git a/research/p104-ordinary-eta-lift/PROOF.md b/research/p104-ordinary-eta-lift/PROOF.md new file mode 100644 index 0000000000..94ce24d491 --- /dev/null +++ b/research/p104-ordinary-eta-lift/PROOF.md @@ -0,0 +1,60 @@ +# A source-pinned ordinary clamp lift + +## Scope and result + +The source is ToikY's [PR #8072 at `75f7e1c44f48c43983016bcf8878c4d9e5e87c62`](https://github.com/CrocSwap/integer-mult-bounds/pull/8072). Its unchanged binary source has `c_B = 4391986206293/2^50`; its paid finite debit is `D_B = 11239/8192`; its child contraction remains `375/376`; and its actual ordinary floor is 18,960. The archive and patch are restored by `witness.py` after checking the recorded PR metadata, the retained changed-file Git-blob digests, SHA-256 pins and the `#8057` member manifest. The offline check binds bytes to those recorded pins; it does not independently establish that Git contains the stated head. The optional source-history check in the README compares all retained files with that Git commit when it is available. The old fixed-allocation and height-cap claim remains unchanged. + +Set + +``` +κ_target = 39/10000 +g = 1/10^18 +q = κ_target + 5g = 780000000000001/200000000000000000 +ρ = 1/250 +η = 1/256 +H = (8192, 106000, 1681001) +``` + +Starting at `b₀=0`, let `Uᵢ = (249(c_B-D_B/Hᵢ)+bᵢ₋₁)/250`. At the first two stages book one whole `10^-21` tick below the floor of `min(η,Uᵢ)`; book `b₃=q`. The three strict margins, in order, are + +``` +1827798949 / 1073741824000000000000000000000 +7792038038789 / 7113539584000000000000000000000000 +18375833487309615126701 / 1804961079885824000000000000000000000 +``` + +The last is about `1.0181e-14`. With the first two heights fixed, `H₃=1681000` fails, and `1681001` is the least passing integer. The original last-height cap 524288 fails even with the raised η. The old η=0.0039 fails for every height because the booking is strictly larger. These are scoped controls, not a global minimum over height vectors. + +The admissible interval for **the retained parameter and geometry gates and this fixed booking** is exactly + +``` +q < η < 1/250. +``` + +Both endpoints are excluded by strict inequalities. The first two unclamped stage prices are below `q`, and the final unclamped stage price exceeds `q`, so all three rate inequalities hold throughout that interval. The source requires `η<ρ`; this is not a claim that all algorithms outside the interval are impossible. This interval concerns the mathematical geometry and stage pricing. A fixed cost for computing an arbitrary rational exponent additionally depends on the size of its numerator and denominator. The concrete executable and fixed-clock claim here uses `η=1/256`, not an unbounded-encoding assertion for every rational in the interval. + +## Geometry, transfers, and clocks + +Let `e` be an admitted field width, `w=max(E_prev+1,ceil(e^ρ))`, and `g_e=ceil(e^η)`. Since `η<ρ`, `g_e≤w`; the source splits `w` into `m=ceil(w/g_e)` balanced components. Each used component has width `u` satisfying `g_e/2≤u≤g_e`. With the admitted predecessor floor and `w≤e`, the existing scan has `mc≤2e^(1-η)` for its actual `c≤e/w`; also `m≤2w^(1-b_prev)` since `b_prev<η`. The native and earlier-stage return terms therefore retain the strict price `bᵢq>97/25000>1/258`, `2η>ρ`, and `η+bᵢ<1`. Thus the source's first-stage `w+1≤9u²` and high-stage `w+1≤2^259 u^258` estimates remain valid. At `H≥8192`, `u>2^30`; the source's `2660000(j+2)<2^j` for `j≥30` still absorbs the coefficient setup into its exposed fibre. The high-stage charge remains `Nᵢ^320(1+B_prev)`. The small entry stages retain their original 25,818,582-bit surcharge. For the concrete `1/256`, the implemented component root is `ceil_root(e,256)`: the same binary-root algorithm uses a fixed degree below the former degree 10000, and input/output lengths are bounded by the source's retained per-prefix polynomial. This does not establish a uniform clock for arbitrary rational encodings. + +For the quotient reserve, use `Tᵢ=ceil((2Hᵢ+64)/(1-η))`. At η=1/256 the `Tᵢ` values are `(16513,212896,3375251)`. A single interval-wide upper guard obtained with `η<1/250` is `(16515,212916,3375569)`; each is below `3Hᵢ<8Hᵢ`. The source's admitted direct/quotient reserve proof therefore has the same inequalities with the new `Tᵢ`. Exact stage cuts are `(8290,114354,1795419)`. The source's connected selector gives `A=2286624`, first public header `2^A+2`, and first/all-size stripe margins 1,141,254/1,105,612. The recorded storage bound remains the source's conditional `6.2pT<297.6n` at its certified connected entrance. + +The executable replay checks the source's all-size ordinary-floor hypotheses at its smallest stated `H=1024` guard and checks all three candidate recipes use the identical labelled binary word, coupling, trial and floor. Literal dispatch and balanced layout are exercised at the changed ranks in both the direct and quotient regimes, using mathematically exact roots on dyadic test widths and a captured backend. Separate nondyadic cases use the actual 256th-root implementation. Two small physical signed weighted-tape fixtures return their owners and reject incorrect signs. The captured backend and finite fixtures do **not** execute the full astronomical target geometry or prove the five inherited scientific premises. + +## Complete signed control and the actual boundary + +The unchanged Gaussian trial is `17145637307/2^42 ≈ 0.00389846657230919`, already less than `q`, even before its positive finite debit. At the original Gaussian height 490950 the exact priced margin at `q` is + +``` +-58834182535661561655779 / 32947096780800000000000000000. +``` + +The 54 strict and four functional non-Gaussian expressions pass at κ=0.0039, but the actual Gaussian check rejects the combined target. Hence no κ=0.0039 result is claimed. A changed Gaussian word or its independently funded source price remains necessary. + +As a directed resource comparison only, keep #8072's original κ=`0.003898214283192`, its actual Gaussian height and debit, and use the larger ordinary profile and η. The original signed budget accepts that old κ, including an independently checked stronger ordinary `q`. The unchanged source's price calculator gives `log₂ B=574461888`, terminal `log₂ C=682472490`, entry conversion 1025 bits and complete `log₂ C=682472491`. #8072 reported `318292011`; this is a larger resource class, not a no-cost improvement. The activation exponent changes from 1,148,553 to 2,286,624. The fixed setup argument and its scope are in [SETUP-PROOF.md](SETUP-PROOF.md). No full all-size target installation, new portable trace, or physical crossover is asserted. + +## Credit + +ToikY supplied #8072's exact capped allocation and the authenticated retune of the earlier result. Ali Romman supplied the [#8057 frequency-weighted signed source](https://github.com/CrocSwap/integer-mult-bounds/commit/cbe847a953b971f9c6c5a0a6661e2008acd29086), the inherited native setup and the physical compiler and caller. SYLforge supplied the K7 word in [#8052](https://github.com/CrocSwap/integer-mult-bounds/pull/8052). The retained [source notice](original/NOTICE.md) records the other contributors and prior work. This local component arithmetic, clamp analysis and setup scaling received substantial OpenAI Codex assistance. diff --git a/research/p104-ordinary-eta-lift/README.md b/research/p104-ordinary-eta-lift/README.md new file mode 100644 index 0000000000..3f61317f29 --- /dev/null +++ b/research/p104-ordinary-eta-lift/README.md @@ -0,0 +1,49 @@ +# An ordinary η lift, with a separate 25-bit setup bound + +For the unchanged binary word and finite debit in ToikY's [#8072](https://github.com/CrocSwap/integer-mult-bounds/pull/8072) at `75f7e1c44f48c43983016bcf8878c4d9e5e87c62`, a three-stage ordinary component with `η=1/256` and heights `(8192,106000,1681001)` books + +``` +q = 0.003900000000000005 > 0.0039. +``` + +All three directed stage margins are strict. The previous third height fails with the first two fixed. The old height cap and the old `η=0.0039` also fail. This is a **conditional ordinary-component result**, not a new complete multiplier or a new κ: the unchanged Gaussian trial itself is below `q`, and its priced margin rejects the combined 0.0039 target. The five inherited source premises, complete physical realization, and independent external review retain their prior status. See [the ordinary proof](PROOF.md) and [exact receipt](RESULT.json). + +The separately scoped [setup proof](SETUP-PROOF.md) extends the source's indexed-action and serial-arithmetic argument to all seven entry/terminal ordinary and Gaussian heights in `1024 ≤ H < 2^25`, subject to its fixed-word, fixed-stage-count and 128-bit scalar-encoding hypotheses. Charging new carrier/parameter work explicitly still gives an exact fixed-installation bound below `2^228` transitions. This does not price native openings, the recurring caller, activation, precision, or a portable execution trace. The [setup receipt](SETUP-RESULT.json) records finite constructor and directory-census controls; those are supporting tests of the implementation, not a proof for all profiles. + +The complete signed price at #8072's **old** κ `0.003898214283192`, using this larger ordinary profile, has `log₂ C ≤ 682472491`; #8072 reported `318292011`. These are different resource classes. The receipt verifies signed arithmetic under the inherited clock premises, but no full astronomical installation or new physical crossover is claimed. + +## Reproduce + +Use Git and CPython 3.12. From the repository root: + +```sh +python3.12 -I -B scripts/research_package.py --package research/p104-ordinary-eta-lift +``` + +The registered commands independently reconstruct the pinned source in private temporary directories, compare the ordinary receipt, rerun four fixed-constructor/census profiles, and exercise explicit source-corruption, strict-boundary and Gaussian failure controls. The setup pass emits four temporary directory files of about 36 MB each; no physical product, WASI run, or network access is required. Standalone equivalents, run inside this package, are: + +```sh +python3.12 -I -B verify.py ordinary +python3.12 -I -B verify.py setup +python3.12 -I -B verify.py controls +``` + +The saved directory hashes are observations of a CPython run, not cross-environment identities: replay compares the mathematical and profile fields, checks each new census against the stated size bounds, and reports the observed hashes. The compressed predecessor archive is an immutable input and is checked exactly. `original/` is needed to reconstruct the source for these tests; it is not an assertion that the entire predecessor proof has been independently verified. + +The offline replay compares the retained source bytes to recorded SHA-256 and Git-blob pins. A stored string naming a commit is not proof that the commit contains those bytes. When a local checkout contains the exact #8072 head, compare its Git objects without replacement refs: + +```sh +python3.12 -I -B verify.py source-history /path/to/integer-mult-bounds +``` + +This optional check requires the head and its trees/blobs to be locally available; it does not fetch or claim source-history completeness. The retained files are also identified at the [exact #8072 source tree](https://github.com/CrocSwap/integer-mult-bounds/tree/75f7e1c44f48c43983016bcf8878c4d9e5e87c62/research/p104-weighted-capped-allocation-490950). A separate checkout can try fetching `refs/pull/8072/head` from the canonical CrocSwap remote; that ref can move, so a fetch is not a substitute for checking the pinned commit and bytes. If the exact object is unavailable, report the gap rather than silently changing the pin. For the recorded file-to-blob mapping and #8057 archive identity, see [source pins](original/source-pins.json), [the peer manifest](original/PEER-SOURCE.json), and [SOURCES.json](SOURCES.json). + +## Open next questions + +1. Can an independently funded Gaussian supplier cover `q` with the whole signed budget? Start with a source-bound candidate and exact positive-debit and owner-return checks; the unchanged supplier is already a strict negative control. +2. Can the enlarged profile be installed and replayed in the complete physical and precision model? Start by binding its entry/terminal paths, all five inherited premises, supplier openings and costs. The present finite fixtures do not execute the astronomical target geometry. +3. Can a new portable producer trace certify an enlarged profile? Start by replacing the old profile assertions in the inherited WASI producer and measuring the whole bounded trace. The original `2^113` result applies to its own fixed profile. + +## Credit + +ToikY supplied the exact #8072 retune and the preceding #8066–#8071 price and allocation work. Ali Romman supplied the #8057 signed source and #8055 setup proof; SYLforge supplied the #8052 K7 word. The inherited [notice](original/NOTICE.md), nested archive notices and [Apache-2.0 license](LICENSE) are retained. This ordinary analysis, setup extension, source controls and packaging received substantial OpenAI Codex assistance. diff --git a/research/p104-ordinary-eta-lift/RESULT.json b/research/p104-ordinary-eta-lift/RESULT.json new file mode 100644 index 0000000000..9867218b1a --- /dev/null +++ b/research/p104-ordinary-eta-lift/RESULT.json @@ -0,0 +1,155 @@ +{ + "admission_interval": [ + "780000000000001/200000000000000000", + "1/250" + ], + "admission_interval_endpoints": "open", + "combined_log2_C_at_old_kappa": 682472491, + "cuts": [ + 8290, + 114354, + 1795419 + ], + "entry_conversion_bits": 1025, + "eta": "1/256", + "finite_signed_tape_fixtures": [ + { + "component_width": 1, + "modulus": 3, + "paid_exchanges": 3, + "records": 81, + "wrong_signed_return_rejected": true + }, + { + "component_width": 2, + "modulus": 9, + "paid_exchanges": 1, + "records": 6561, + "wrong_signed_return_rejected": true + } + ], + "fixed_setup_caveat": "This receipt checks the original serial arithmetic bound and datum sizes only; see SETUP-PROOF.md for a separate conditional action extension and finite constructor census.", + "gaussian_priced": "4208552944028369/1079610467313254400", + "gaussian_raw": "17145637307/4398046511104", + "height_minus_one_fails": true, + "height_minus_one_slack": "-854452768960775476619/1804960006144000000000000000000000", + "max_height": 1681001, + "max_height_bit_length": 21, + "old_kappa": "487276785399/125000000000000", + "old_kappa_price_caveat": "Directed arithmetic and inherited clock premises; fresh full installation and physical replay not claimed.", + "old_kappa_signed_with_stronger_q": { + "functional": 4, + "ordinary_margin": "1785716808001/1000000000000000000", + "positive_margin": "1960615690030621/32947096780800000000000000000", + "smallest_margin": "1/10000000000000000000", + "strict": 54 + }, + "ordinary_debit": "11239/8192", + "ordinary_floor_all_size_stock": { + "birth_bound": "2V", + "copy_group_bound": "3N^3", + "first_two_columns": [ + 18952, + 18954 + ], + "fringe_upper_1e9": 7439580927, + "grid_absolute_error_exponent_at_H1024": -27312, + "minimum_positive_scale_h_guard": 1024, + "psi_lower_floor": 386067, + "whole_field_width": "N^92" + }, + "ordinary_raw": "4391986206293/1125899906842624", + "ordinary_target": "780000000000001/200000000000000000", + "original_eta_rejects_target": true, + "original_fixed_setup_bound": 228, + "original_height_cap_slack": "-1925682397551914908254299/1073741824000000000000000000000", + "quotient_entry_guards": [ + { + "eta_cut": 16513, + "height": 8192, + "uniform_cut": 16515 + }, + { + "eta_cut": 212896, + "height": 106000, + "uniform_cut": 212916 + }, + { + "eta_cut": 3375251, + "height": 1681001, + "uniform_cut": 3375569 + } + ], + "rho": "1/250", + "source_head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "source_head_note": "Local bytes match captured #8072 changed-file blob pins; this check alone does not authenticate the Git history of the stated head.", + "stage_dispatch_fixtures": [ + { + "component_log": 500, + "direct": true, + "stage": 2, + "width_log": 128000 + }, + { + "component_log": 7125, + "direct": true, + "stage": 3, + "width_log": 1824000 + }, + { + "component_log": 4375, + "direct": false, + "stage": 2, + "width_log": 1120000 + }, + { + "component_log": 53000, + "direct": false, + "stage": 3, + "width_log": 13568000 + } + ], + "stage_rates": [ + { + "booked": "3718459644522841499/1000000000000000000000", + "height": 8192, + "slack": "1827798949/1073741824000000000000000000000", + "upper": "1046653341841581/281474976710656000" + }, + { + "booked": "31097972806740573/8000000000000000000", + "height": 106000, + "slack": "7792038038789/7113539584000000000000000000000000", + "upper": "27652082567863081014584742038789/7113539584000000000000000000000000" + }, + { + "booked": "780000000000001/200000000000000000", + "height": 1681001, + "slack": "18375833487309615126701/1804961079885824000000000000000000000", + "upper": "7039348211573098458292709044246701/1804961079885824000000000000000000000" + } + ], + "status": "ORDINARY_COMPONENT_PASS_COMBINED_TARGET_REJECTED", + "stock": { + "absolute_log2_private_control_envelope": 1721345027, + "binary_cuts": [ + 8290, + 114354, + 1795419 + ], + "first_public_offset": 2, + "initial_s": 2286625, + "public_exponent_A": 2286624, + "retimed_all_size_margin_floor": 1105612, + "retimed_first_stripe_margin": 1141254, + "stage_and_outer_fixed_log_overhead": 1968, + "storage_upper": "6.2 p T < 297.6 n bits" + }, + "target_combined_rejected": true, + "target_gaussian_margin": "-58834182535661561655779/32947096780800000000000000000", + "target_kappa": "39/10000", + "target_signed_functional_passes": 4, + "target_signed_strict_passes": 54, + "terminal_log2_B": 574461888, + "terminal_log2_C": 682472490 +} diff --git a/research/p104-ordinary-eta-lift/SETUP-PROOF.md b/research/p104-ordinary-eta-lift/SETUP-PROOF.md new file mode 100644 index 0000000000..af8e992fe2 --- /dev/null +++ b/research/p104-ordinary-eta-lift/SETUP-PROOF.md @@ -0,0 +1,49 @@ +# Fixed installer bound for larger height encodings + +This lemma is independent of the ordinary-rate lift. It concerns the same signed binary and Gaussian words, the same finite couplings and floors, **two entry ordinary recipes, three terminal ordinary recipes, and two Gaussian recipes**, with every height satisfying `1024≤H<2^25`. For each of the two supplied profiles, the numerators and denominators of `κ` and `η`, and the positive stop denominator, must have at most 128 bits; the stop denominator is positive. These are encoding bounds, not rate-admission conditions. It carries forward the fixed source's indexed-action and arithmetic hypotheses. It does not certify a new supplier price, native opening, product, activation, precision, or portable execution trace. + +## Which source paths depend on a height + +The #8072 receipt's old `bit_length()≤20` assertion examines only the final ordinary height of each profile. It does **not** check the Gaussian height. The bound here explicitly checks all seven heights. In the restored fixed compiler, `prepare_native` calls `binary_recipe` for each ordinary height and `numerical_recipe` for each Gaussian height. `transport.Recipe.__init__` and `grades.WeightedRecipe.__init__` record the height and the integer `92H`; they keep the original word, rates, labels, coupling and references. The attributes `width` and `open()` create the large native value/calendar only when an active caller requests them. Fixed `compiler_state.construct` does not call either. + +One additional path does construct a large integer: `retimed_supplier.Positive.__init__` passes `1 << rank_log` to its inherited initializer. Its carrier therefore contains `G+1` bits, as tested directly. This is not ignored as a fixed-size parameter. The two fixed profiles and their source arguments have at most seven height records, two explicit Gaussian carriers and the same raw-source graphs, grade cells and role streams. The replay explicitly enforces the 128-bit scalar-encoding guard for both profiles; larger encodings are outside this statement. + +For all seven `H<2^25`, `92H<2^32`; a lazily materialized `2^(92H)` would have fewer than `2^32+1` bits. The `1024H` native control exponent is below `2^35`. Each materialized positive carrier `2^G` has at most `2^25` bits. Each is below the source's permitted individual datum bound `w=2^38` bits. This is a width check, not by itself an action-count proof. Active calendars and input-dependent geometry have separate recurring charges. + +## Count and charge the changed work + +Keep the source's original bound of `2^68` indexed actions on the unchanged graph and raw coupling construction. The only additional profile-dependent work is bounded separately. Use a fixed 25-cell binary countdown and fixed work tapes, as in the source's serial arithmetic model. To produce a carrier and at most 15 extra copies, place the outputs on 16 work tapes, write the leading one, and generate all following zeros while decrementing the shared countdown. One decrement and zero test, including returning the countdown head, fit in four 25-cell passes plus 25 digit writes; allow 512 moves or writes per bit. The 16 output writes and advances need 32 more; allow 256. Rewinding and clearing all 16 streams takes at most 32 moves or writes per position; allow another 256. The remaining 1,024 per bit covers delimiters, copying the initial 25-bit counter, boundary handling and cleanup. Thus 2,048 elementary tape moves or writes per bit is a conservative allowance. This is an explicit fixed-multitape serial construction, not a claim that arbitrary copies on one tape can be made in linear time. Even charging two maximal carriers, plus `2^24` transitions for each of seven recipe parameter constructions and their bounded scalar metadata, gives + +``` +2·2048·(2^25+1) + 7·2^24 = 137556398080 < 2^40. +``` + +The per-recipe allowance is conservative for a fixed number of comparisons and assignments on the at-most-32-bit `H` and `92H` integers and the bounded scalar metadata. Charge each of the newly counted elementary steps as an additional indexed action, then apply the full source lookup and rational-arithmetic price to every action; this is conservative even when an action is only a tape move. The fixed-source parsing, charts, coupling, directory traversal and their arbitrary lookups retain their old full charges. The inherited positive initializer stores the carrier by reference; the copies above are an additional conservative allowance, not an observed count. A different constructor that materializes a native calendar, changes the word, grows the stage count, or performs additional height-dependent work needs a new bound. We add `2^40` rather than assuming slack inside the original action census. + +Write + +``` +n = 2^68 + 2^40 +w = 2^38, h = 2w+2 +S = 4wn +L = 8S·512·128 +E = 2^16(h+4)(7h+9) + 8·2^16(h+4)^2. +``` + +Using the source's same complete indexed lookup, serial arithmetic and `2^32` parsing/cleanup multiplier, the conservative transition bound is + +``` +(n+1)(L+E+2^120)2^32 += 217364571993743287866367176320080817069553173293686105666269057384448 +< 2^228. +``` + +The exact arithmetic is in `setup_scaling.py`. The proof uses the source's prior `2^68` action and `w=2^38` datum premises; it does not derive them from a host runtime measurement. + +## Finite falsification and source identity + +Run `python3.12 -IB setup_scaling.py`. It authenticates and reconstructs the #8072 source, forces both recipe `width` properties and `open()` methods to raise if the fixed constructor touches them, and executes the actual fixed producer and directory serializer on four profiles: #8072; the ordinary η witness; and the 21-bit and 25-bit Gaussian examples. All four created 2,407,819 records, with the same retained raw source objects and 267-bit largest directory integer. The two actual positive carriers contain 1,860,555 and 18,845,937 bits. The direct exact-height guard accepts `2^25-1` and rejects `2^25`. Results and hashes are in `SETUP-RESULT.json`. + +The finite replay uses `compiler_state.construct`, `tape_directory.dump` and the source's record census. The two enlarged positive suppliers are separately instantiated to check the carrier bit lengths; the directory census does not serialize those carriers. It is **not** the inherited WASI fuel trace or its `2^113` portable setup certificate. The copied historical portable `producer.py` has literal old-profile assertions and needs a new, separately tested trace before any such claim can be made. The written extension uses the original all-input serial model, not the host elapsed time. Directory hashes in the receipt record the observed CPython execution; they are not required to match across Python builds or object-layout variations. + +The recorded source identities are #8072 head `75f7e1c44f48c43983016bcf8878c4d9e5e87c62` and #8057 head `cbe847a953b971f9c6c5a0a6661e2008acd29086`. The principal restored SHA-256 bindings are `transport.py` `9eb8f0d77a4c53fc4fddffdfe198cab930b6d1f49e2b6d43c970397051bb7818`, `grades.py` `6124744b40f806c80b6f10010a72e755bc11d64a8cc9a04f5e8316799eb6f05d`, and `retimed_supplier.py` `2a87c2781ca93fa854aee098dcb7c50a65f2a46267ba926e3997b442e5a25f2c`. The bootstrap checks the nested manifests and source overlays; `witness.py` also compares the retained files to the recorded #8072 changed-file Git blobs. This byte check is not by itself a Git-history check. Original notices are retained in `original/` and the peer archive. diff --git a/research/p104-ordinary-eta-lift/SETUP-RESULT.json b/research/p104-ordinary-eta-lift/SETUP-RESULT.json new file mode 100644 index 0000000000..ee92d4b99a --- /dev/null +++ b/research/p104-ordinary-eta-lift/SETUP-RESULT.json @@ -0,0 +1,85 @@ +{ + "carrier_and_scalar_added_steps_bound": 137556398080, + "portable_caveat": "Construct/dump/census only; no new WASI fuel or trace claim. The copied #8057 portable producer contains stale fixed-profile assertions.", + "scalar_encoding_max_bits": 128, + "scope": "Fixed constructor and input-independent installer bound; physical native openings, precision and caller costs retain their separate gates.", + "serial_envelope": { + "added_action_ceiling": 1099511627776, + "local_arithmetic_upper": 297105609434291902295870930944, + "lookup_upper": 170141184094294531845802004464235708416, + "max_actions": 295147906278864453632, + "max_datum_bits": 274877906944, + "old_actions": 295147905179352825856, + "store_cells_upper": 324518554867352546397785195282432, + "transition_power_of_two_upper": 228, + "transition_upper": 217364571993743287866367176320080817069553173293686105666269057384448 + }, + "setup_height_interval": "1024 <= H < 2^25", + "source_head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "variants": { + "combined_21bit": { + "directory_bytes": 36094650, + "directory_sha256": "3b424395ffe296f583aec7e4c94dfa8d914f3f696fd2d857e95de83aa1f2b32d", + "gaussian_height": 1860554, + "largest_directory_integer_bits": 267, + "lazy_width_and_open_forbidden": true, + "materialized_gaussian_carrier_bits": 1860555, + "max_width_log": 171170968, + "parameter_bits": 21, + "rank_logs": [ + 8192, + 37107, + 589716 + ], + "record_count": 2407819 + }, + "combined_25bit": { + "directory_bytes": 36094651, + "directory_sha256": "09acde5f62a913bd4c22b38b4e4bca849e1459ba1ec2f83e9699507286909fb7", + "gaussian_height": 18845936, + "largest_directory_integer_bits": 267, + "lazy_width_and_open_forbidden": true, + "materialized_gaussian_carrier_bits": 18845937, + "max_width_log": 1733826112, + "parameter_bits": 25, + "rank_logs": [ + 8192, + 38102, + 604362 + ], + "record_count": 2407819 + }, + "ordinary_eta": { + "directory_bytes": 36094651, + "directory_sha256": "93531c0f91668e4e1ffdc373f64987537bb3c58bc8243cc85d9d48a5453b488b", + "gaussian_height": 490950, + "largest_directory_integer_bits": 267, + "lazy_width_and_open_forbidden": true, + "materialized_gaussian_carrier_bits": 490951, + "max_width_log": 154652092, + "parameter_bits": 21, + "rank_logs": [ + 8192, + 106000, + 1681001 + ], + "record_count": 2407819 + }, + "original": { + "directory_bytes": 36094651, + "directory_sha256": "c24584731983a9c3e0848780d0bb983b0103d0d5aa29e9f425cface25c7fcedd", + "gaussian_height": 490950, + "largest_directory_integer_bits": 267, + "lazy_width_and_open_forbidden": true, + "materialized_gaussian_carrier_bits": 490951, + "max_width_log": 48234496, + "parameter_bits": 20, + "rank_logs": [ + 8192, + 124649, + 524288 + ], + "record_count": 2407819 + } + } +} diff --git a/research/p104-ordinary-eta-lift/SOURCES.json b/research/p104-ordinary-eta-lift/SOURCES.json new file mode 100644 index 0000000000..f397c42b53 --- /dev/null +++ b/research/p104-ordinary-eta-lift/SOURCES.json @@ -0,0 +1,90 @@ +{ + "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" + } + ], + "embedded_source": { + "repository": "CrocSwap/integer-mult-bounds", + "pull_request": 8072, + "head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "source_head_status": "Captured PR head and changed-file listing; the generic offline replay checks retained byte and blob digests, not the Git history of the head. The optional source-history command checks the named commit when locally available.", + "files": [ + { + "stored_path": "original/LICENSE", + "source_path": "research/p104-weighted-capped-allocation-490950/LICENSE", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "stored_path": "original/NOTICE.md", + "source_path": "research/p104-weighted-capped-allocation-490950/NOTICE.md", + "git_blob": "cac7f9814f2e5fa1e5fb307e2de89f739348daef", + "sha256": "4bb4aa63290a19282826ff57529293f8bfd12e3a2afe28bc6d48205c0cc976fc" + }, + { + "stored_path": "original/PEER-SOURCE.json", + "source_path": "research/p104-weighted-capped-allocation-490950/PEER-SOURCE.json", + "git_blob": "6f84b3aef4b8c5026e348d88700bc9401514ccab", + "sha256": "798c2e6394c258986484a116198cc542a6d2b4c1f289e5816de2cfecf5141c51" + }, + { + "stored_path": "original/PROOF.md", + "source_path": "research/p104-weighted-capped-allocation-490950/PROOF.md", + "git_blob": "bf97b6e37fba359fe7205b658b984b1f5579d307", + "sha256": "b667b8470f94015181ef577d6576859bebd76e7618ffb32c1197233f1e8212da" + }, + { + "stored_path": "original/README.md", + "source_path": "research/p104-weighted-capped-allocation-490950/README.md", + "git_blob": "db7a838448c5159656e99da51984819c65f11b4d", + "sha256": "1347061750a0edb42a850206419afb39633c4b8c6a63f635362b9f7e4b93adb6" + }, + { + "stored_path": "original/check_ordinary_floor.py", + "source_path": "research/p104-weighted-capped-allocation-490950/check_ordinary_floor.py", + "git_blob": "80994309fb433928293d79f8b7dabf558b1b9a41", + "sha256": "65e3c3ca4cec73a9462973e651a66127ab894d0bc141c072e26416aedb48b543" + }, + { + "stored_path": "original/check_stage_seam.py", + "source_path": "research/p104-weighted-capped-allocation-490950/check_stage_seam.py", + "git_blob": "cba442cfb92b02d63cee77f038bf69c8144f7702", + "sha256": "128a93719bbfc2d69c442283b8cbaecd9a3ca4c2a2399a7964e4c882bf0bace1" + }, + { + "stored_path": "original/peer8057.tar.gz", + "source_path": "research/p104-weighted-capped-allocation-490950/peer8057.tar.gz", + "git_blob": "3a3ded828f6bbf9b6e6a76ba255d480452f4d269", + "sha256": "0e0d559bdb15e7b647f88a2b5e27fcdc9e28e81d8f4145459876ba6da2e9314c" + }, + { + "stored_path": "original/prepare.py", + "source_path": "research/p104-weighted-capped-allocation-490950/prepare.py", + "git_blob": "048698f08d803810b5a6ffd8c2d6e2341100a45e", + "sha256": "76f9d4c6bfd880ee49f6ba5bde9138cf0856d669edb4d525e48ca71a9094eec3" + }, + { + "stored_path": "original/verify.py", + "source_path": "research/p104-weighted-capped-allocation-490950/verify.py", + "git_blob": "f460dbac14b3ef18f780105459e30883c95da461", + "sha256": "10362de3ceaa651cde5b71c6599fd4683d9f1f4d76cc252178e915b43a098fee" + } + ], + "peer_8057_head": "cbe847a953b971f9c6c5a0a6661e2008acd29086", + "peer_archive_sha256": "0e0d559bdb15e7b647f88a2b5e27fcdc9e28e81d8f4145459876ba6da2e9314c", + "peer_manifest": "original/PEER-SOURCE.json", + "local_source_pin_manifest": "original/source-pins.json" + } +} diff --git a/research/p104-ordinary-eta-lift/TASK.json b/research/p104-ordinary-eta-lift/TASK.json new file mode 100644 index 0000000000..13af4feb2f --- /dev/null +++ b/research/p104-ordinary-eta-lift/TASK.json @@ -0,0 +1,103 @@ +{ + "schema_version": 1, + "task_id": "supplier-boundary-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "supplier-boundary-audit", + "question": "Does one changed supplier have complete source-bound native, caller, ordinary and outer admission coverage?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Pin the current sources and one obligation; the historical owner audit is an example, not evidence of a current bug.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one latest uncovered candidate and build a delta coverage map against the selected review. For P104, #5717 changes owned-lifetime assumptions and #5719 covers exact #5713 causal premises; neither automatically transfers to #5718. For BIT, #5679/#5708 need component admission and compatible outer use. Check controls and exact source identity before reuse; stop with one resolved gap or explicit remaining obligation. A heavy full replay requires a separate serial resource budget.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "supplier admission", + "5717", + "5719", + "5708", + "owned lifetime" + ], + "existing_checks": [ + { + "scope": "PR #4088: author-checked local words, native receipts, owner/phase fill and exact moment.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Rebind and validate ordinary/outer admission with all four providers; full mixed release not established.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #3801: successor scatter-boundary decision package.", + "evidence": "research/scatter-boundary-decision/README.md", + "remaining": "Consult its exact acceptance scope before any new exporter audit; not proof of a selected failure.", + "status": "author-checked", + "source_commit": "911f8800ba7a4b03603ef62c5ffc6240e53cb5fd", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "scope_change_reason": "The assigned work resolves an ordinary-rate and fixed-installer subproblem for one named successor. Full supplier, caller, physical and outer admission are outside this package and remain open.", + "actual_scope": "For the captured #8072 source, prove a conditional three-stage ordinary booking strictly above 0.0039, run failure controls against adjacent height and the unchanged Gaussian, and separately extend the fixed serial setup bound to seven heights below 2^25 and 128-bit profile scalars under the retained source hypotheses.", + "bottleneck_link": "A stronger ordinary component is only one necessary input to a complete signed target; the unchanged Gaussian and the full caller and physical costs remain binding obligations.", + "budget_minutes": null, + "stop_rule": "Replay the exact ordinary and setup receipts, strict and corrupted-source controls, and report the Gaussian failure without claiming complete kappa admission.", + "outcome": "completed", + "evidence": "README.md, PROOF.md, SETUP-PROOF.md, RESULT.json, SETUP-RESULT.json, witness.py, setup_scaling.py, verify.py and controls.py.", + "author": "Clear1nsight", + "ai_assistance": "Substantial OpenAI Codex assistance in mathematical analysis, setup accounting, implementation, verification and documentation.", + "open_questions": [ + { + "question": "Can a changed Gaussian supplier fund q in the complete signed budget?", + "why_it_matters": "The unchanged Gaussian trial is already less than q, before its finite debit.", + "first_step": "Bind a new candidate to its source and independently check the exact positive debit, paid costs and both owner returns.", + "blocked_by": "No qualified changed Gaussian supplier or complete signed target price is included." + }, + { + "question": "Can the enlarged ordinary profile be installed with complete physical and precision coverage?", + "why_it_matters": "The current all-size ordinary reasoning and finite fixtures do not run the astronomical target geometry.", + "first_step": "Bind its entry and terminal paths, inherited premises, supplier openings, precision and complete recurring costs.", + "blocked_by": "The full enlarged target installation and independent end-to-end proof remain open." + }, + { + "question": "Can an enlarged profile receive its own portable fixed-installation trace?", + "why_it_matters": "The inherited WASI producer and 2^113 bound apply to the original fixed profile.", + "first_step": "Replace its old-profile assertions and construct a bounded source-bound producer and receiver trace.", + "blocked_by": "No new WASI trace or portable fuel measurement has been run." + } + ] +} diff --git a/research/p104-ordinary-eta-lift/VERIFY.json b/research/p104-ordinary-eta-lift/VERIFY.json new file mode 100644 index 0000000000..2603558552 --- /dev/null +++ b/research/p104-ordinary-eta-lift/VERIFY.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-ordinary-eta-lift/RESULT.json", + "research/p104-ordinary-eta-lift/SETUP-RESULT.json", + "research/p104-ordinary-eta-lift/witness.py", + "research/p104-ordinary-eta-lift/setup_scaling.py", + "research/p104-ordinary-eta-lift/verify.py", + "research/p104-ordinary-eta-lift/controls.py", + "research/p104-ordinary-eta-lift/original/LICENSE", + "research/p104-ordinary-eta-lift/original/NOTICE.md", + "research/p104-ordinary-eta-lift/original/PEER-SOURCE.json", + "research/p104-ordinary-eta-lift/original/PROOF.md", + "research/p104-ordinary-eta-lift/original/README.md", + "research/p104-ordinary-eta-lift/original/check_ordinary_floor.py", + "research/p104-ordinary-eta-lift/original/check_stage_seam.py", + "research/p104-ordinary-eta-lift/original/peer8057.tar.gz", + "research/p104-ordinary-eta-lift/original/prepare.py", + "research/p104-ordinary-eta-lift/original/source-pins.json", + "research/p104-ordinary-eta-lift/original/verify.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "controls" + ], + "timeout_seconds": 60, + "checks": "Reject corrupted source inputs, the adjacent failed height, old clamp, unchanged Gaussian target, out-of-range height and oversized scalar encoding." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "ordinary" + ], + "timeout_seconds": 300, + "checks": "Reconstruct pinned predecessor inputs and reproduce the exact conditional three-stage ordinary receipt, signed negative control, source boundaries and finite dispatch fixtures." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "setup" + ], + "timeout_seconds": 600, + "checks": "Independently reconstruct the fixed constructor, check seven-height and scalar-encoding guards and exact serial arithmetic, and perform four bounded directory census controls without opening native calendars." + } + ] +} diff --git a/research/p104-ordinary-eta-lift/controls.py b/research/p104-ordinary-eta-lift/controls.py new file mode 100644 index 0000000000..2e0c7e4941 --- /dev/null +++ b/research/p104-ordinary-eta-lift/controls.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Independent boundary and corrupted-source controls for the replay.""" + +from fractions import Fraction as Q +import json +from pathlib import Path +from shutil import copytree +import sys +from tempfile import TemporaryDirectory +from types import SimpleNamespace +import unittest + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import setup_scaling +import witness + + +class BoundaryControls(unittest.TestCase): + def test_exact_three_stage_and_neighbor(self): + # Recompute the rational recurrence directly from the source prices. + raw, debit = Q(4391986206293, 2**50), Q(11239, 8192) + eta, q = Q(1, 256), Q("0.003900000000000005") + previous = Q(0) + for height in (8192, 106000): + upper = min(eta, (249 * (raw - debit / height) + previous) / 250) + booked = Q((upper * 10**21).__floor__() - 1, 10**21) + self.assertLess(previous, booked) + self.assertLess(booked, upper) + previous = booked + price = lambda h: (249 * (raw - debit / h) + previous) / 250 + self.assertLess(price(1681000), q) + self.assertGreater(price(1681001), q) + self.assertLess(min(Q(39, 10000), price(1681001)), q) + self.assertLess(price(524288), q) + saved = json.loads((HERE / "RESULT.json").read_bytes()) + self.assertEqual(Q(saved["ordinary_target"]), q) + self.assertEqual(Q(saved["stage_rates"][1]["booked"]), previous) + + def test_gaussian_rejects_target(self): + q = Q("0.003900000000000005") + raw = Q(17145637307, 2**42) + priced = raw - Q(64939, 524288 * 490950) + self.assertLess(priced, raw) + self.assertLess(raw, q) + saved = json.loads((HERE / "RESULT.json").read_bytes()) + self.assertTrue(saved["target_combined_rejected"]) + self.assertEqual(Q(saved["gaussian_priced"]), priced) + + def test_25_bit_height_and_action_guards(self): + self.assertTrue(setup_scaling.safe_height(1024)) + self.assertFalse(setup_scaling.safe_height(1023)) + self.assertTrue(setup_scaling.safe_height(2**25 - 1)) + self.assertFalse(setup_scaling.safe_height(2**25)) + profile = SimpleNamespace(kappa=Q(389846, 10**8), eta=Q(39, 10000), + positive_stop_denominator=10**18) + self.assertTrue(setup_scaling.bounded_scalars(profile)) + profile.positive_stop_denominator = 2**128 + self.assertFalse(setup_scaling.bounded_scalars(profile)) + extra = 2 * 2048 * (2**25 + 1) + 7 * 2**24 + self.assertLess(extra, 2**40) + self.assertLess(setup_scaling.action_envelope()["transition_upper"], 2**228) + + def test_corrupted_pinned_sources_are_rejected(self): + with TemporaryDirectory(prefix="ordinary-corrupt-") as tmp: + base = Path(tmp) + copytree(witness.ORIGINAL, base / "original") + previous = witness.ORIGINAL + witness.ORIGINAL = base / "original" + try: + for name in ("prepare.py", "PEER-SOURCE.json", "peer8057.tar.gz", "source-pins.json"): + with self.subTest(name=name): + path = witness.ORIGINAL / name + before = path.read_bytes() + path.write_bytes(before[:-1] + bytes([before[-1] ^ 1])) + with self.assertRaises(AssertionError): + witness.source_runtime(base / "tree") + path.write_bytes(before) + finally: + witness.ORIGINAL = previous + + +if __name__ == "__main__": + if not __debug__: + raise ValueError("Run with assertions enabled") + unittest.main(verbosity=2) diff --git a/research/p104-ordinary-eta-lift/original/LICENSE b/research/p104-ordinary-eta-lift/original/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/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-ordinary-eta-lift/original/NOTICE.md b/research/p104-ordinary-eta-lift/original/NOTICE.md new file mode 100644 index 0000000000..cac7f9814f --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/NOTICE.md @@ -0,0 +1,5 @@ +# Attribution + +Ali Romman supplied the signed #8057 frequency-weighted Gaussian producer, both native widths, signed caller and compiler, and the earlier #8055 setup proof. SYLforge supplied the #8052 K7 ordinary circuit and physical replay. The prior allocation proofs at #8068–#8069 supply the exact integer comparison method. #8070 supplies the Gaussian booking and #8071 the finer ordinary booking and the complete signed comparator. This package changes the terminal allocation at the simultaneously charged limits. The signed operator schedules and purpose-specific native implementation are inherited. + +The archive retains its exact Apache-2.0 sources and notices. The separate historical CI prerequisite reuses Jerry Chen's #7257 source navigation and historical snapshot repair. OpenAI Codex materially assisted the mathematical screen, literal retune and independent replay. [Predecessor scientific source](https://github.com/CrocSwap/integer-mult-bounds/tree/cbe847a953b971f9c6c5a0a6661e2008acd29086/research/frequency-weighted-native-multiplier) · [Proof and credits](PROOF.md) · [License](LICENSE) diff --git a/research/p104-ordinary-eta-lift/original/PEER-SOURCE.json b/research/p104-ordinary-eta-lift/original/PEER-SOURCE.json new file mode 100644 index 0000000000..6f84b3aef4 --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/PEER-SOURCE.json @@ -0,0 +1,94 @@ +{ + "archive_sha256": "0e0d559bdb15e7b647f88a2b5e27fcdc9e28e81d8f4145459876ba6da2e9314c", + "files_sha256": { + "research/frequency-weighted-native-multiplier/FINITE-LOSS.md": "12c6069437a0cbb61c80804f89f027ef9709c186e67d26fb0584ad6e71048052", + "research/frequency-weighted-native-multiplier/GaussianFiniteLoss.lean": "9d247f73d9da2748399b821612b30f20140783c08d761b6d4ef7d3c7c3d07064", + "research/frequency-weighted-native-multiplier/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "research/frequency-weighted-native-multiplier/MEASUREMENTS.json": "9ea26ae002146ae21291ecc0a6b224e5cccb9e3b5d199522558a645863da4f7b", + "research/frequency-weighted-native-multiplier/NOTICE.md": "02e69a1d57e2208ce49b3362a5672136887c1968d66de83a8f358e6d4a9353df", + "research/frequency-weighted-native-multiplier/PROOF.md": "4dbb38cdbe5b691edf4845fe8cf2a99be5d43455cc73199ab7e305abaa91acca", + "research/frequency-weighted-native-multiplier/README.md": "173313f895d9f810e5c32853ff383c8ee962e475dead35e5634047aa9c8a1453", + "research/frequency-weighted-native-multiplier/RESULT.json": "2f4faa6648592f589df22a8a0a07ba6856d20786294a44a7776c7d6e0efa14a5", + "research/frequency-weighted-native-multiplier/SOURCES.json": "01d9e6b6b28cd174800cadfb59f4f064b3844575da297d82e16eb19a0d11c868", + "research/frequency-weighted-native-multiplier/TASK.json": "9db85415d252a595907a8c1ddf8ce64acc5c0aa67dc8f6b4656139053bb40a52", + "research/frequency-weighted-native-multiplier/VERIFICATION.md": "58568a8f5e097a1d828aeff33ea33c63863c4b28dd1a87fd7dca9adebb5d6c1f", + "research/frequency-weighted-native-multiplier/VERIFY.json": "4f5506a41e62585e34c80c6838922d33b04d42e010fab310690f340a5be3721e", + "research/frequency-weighted-native-multiplier/WeightedNumerical.lean": "2017bae8064554efb13c564503d8f88c4615e9f733a74aa5eaf4047e5bd8af94", + "research/frequency-weighted-native-multiplier/bootstrap.py": "a824c0ba9bb5efe5ad5b6c9b891b363b6d2ac31b0a57b9e27b68a6c2bca6f7ee", + "research/frequency-weighted-native-multiplier/check_calendar.py": "1c51b8bd75ef2d9d8847b2ebf88d7dbcc44d89954146c2bdede8854915392b8c", + "research/frequency-weighted-native-multiplier/check_exterior.py": "aee4fd29eb2fa021f806c987e0db23ecb7148e5dc846581f62d3ba39ed7ef725", + "research/frequency-weighted-native-multiplier/check_lean.py": "32e49adef4502f193b5ded2cc4e7f8cea6a285283fda4db2152570a4b68098cb", + "research/frequency-weighted-native-multiplier/check_nested.py": "9b2eaf387abbeeef43dd9bb31081ba73f3423e8233fb3446d61fce802a1c6b5b", + "research/frequency-weighted-native-multiplier/check_ownership.py": "a1fdaf5eaaa4215bc90051db48e17d0bf9cf7fe03f67a4d2bdf4e328f3c1a73a", + "research/frequency-weighted-native-multiplier/check_placement.py": "e4317a1eb36f692912ca4739364859118711620838705d8e33b1eabec32b0990", + "research/frequency-weighted-native-multiplier/check_raw.py": "d62d50279969bfecf23d2e14412949fa643394c1539ccb87db7dac5f79e2d97e", + "research/frequency-weighted-native-multiplier/grades.py": "8d2e3d14ac2149f985d7f6a75bf36182d7f68aadf8df6595fc0774224d4951ac", + "research/frequency-weighted-native-multiplier/independent_price.py": "448811cdb4a2bdefd4f736c2bad81c2a833bde634bcf65498e05267b5ee7ead0", + "research/frequency-weighted-native-multiplier/measure_setup.py": "cbfe019024fbeee428c415549db10180af69995078825b6341bc9021f3d08723", + "research/frequency-weighted-native-multiplier/portable/EVIDENCE.json": "3bfffdda94bbc6a14282399eca69b8619c96bd587c7957b3bdf854e03ef89427", + "research/frequency-weighted-native-multiplier/portable/NOTICE.md": "57d7e187fb48df97838976a7942e41dc381f00daeff7c2b5c392fb1a6f252517", + "research/frequency-weighted-native-multiplier/portable/README.md": "141d07df12c9e5352a8f83a03a033dd2c41cc5d0d6e0edb3532cab462536a974", + "research/frequency-weighted-native-multiplier/portable/STACK-LOCALITY.md": "0211732aaa6083a305e861f8172b581b0a9c98e10191d8432d546ee224c0bf5f", + "research/frequency-weighted-native-multiplier/portable/TRACE-CLOCK.md": "9f2b0d125cc35f91bb037363505d027331c79153211ea21de838405ae01a1a2a", + "research/frequency-weighted-native-multiplier/portable/bounded_wasi.py": "8232cc247e5910aab7a0fecb03426088c8f851fd93cbf8fb3587a4a5d7ee143d", + "research/frequency-weighted-native-multiplier/portable/compare.py": "7a906b2b871011595f66882897e7ff0fa79f007fc7887ae0c21b555d778a75c8", + "research/frequency-weighted-native-multiplier/portable/compiler_state.py": "11f371903410a53aa138bb9b9c49e9441393a34092fff922716a78b5521e1870", + "research/frequency-weighted-native-multiplier/portable/consumer.py": "411cc1052a70f7084de81f6f1e54636737d5e5155d0756b8271d5d82c268d3b3", + "research/frequency-weighted-native-multiplier/portable/fixed_directory.py": "c99e9945295b954b453f4995474db4ec8da9e7d8d6ba1a564456213d066e5904", + "research/frequency-weighted-native-multiplier/portable/guest_opcodes.py": "9b2a1b128939cc8d2ef379199c09af74c52ed4b696640fce01606c431d931db6", + "research/frequency-weighted-native-multiplier/portable/module_census.py": "f22218fc37012f5c14b17afba3e8b868fd7268f25931836397f00fbdd319f6f7", + "research/frequency-weighted-native-multiplier/portable/producer.py": "5a76b94efb0bb59a686255f212b532a0f44a586649befda07dbfc5fe86c6a8b7", + "research/frequency-weighted-native-multiplier/portable/record_census.py": "8132c345cfcc5e7d89494fa437685673273f878f2dc40e0187bf2b84eee17e08", + "research/frequency-weighted-native-multiplier/portable/run.py": "6a1e17556326107cac9e70f446b2a90c35e9b4b07bfb7c4b31e5fe9b081f7d9b", + "research/frequency-weighted-native-multiplier/portable/signed.py": "7620e713be7a8064c5b9f83e6573cfabab801b627f0133b7998fdb51a6bac449", + "research/frequency-weighted-native-multiplier/portable/source_image.py": "e354c3fb2bb05eb36dc2438d89c30b18b7973638c51af526d8e55b56803c73ba", + "research/frequency-weighted-native-multiplier/portable/tape_directory.py": "70bf289334f724cabf1cfa9e074199e6be93ef0aeba8193f279e5ef1336de97b", + "research/frequency-weighted-native-multiplier/portable/verify_receipt.py": "8b42d3c5f35d6810321eb000e10b4e5593d543296cc670c3c8847e7051c1b30c", + "research/frequency-weighted-native-multiplier/positive_debit.py": "7320b6a4ef1320d765e9b41a9b1e286db83a1d36d96f46bee0bef37974e8b8d9", + "research/frequency-weighted-native-multiplier/receipt.py": "82d921fdc33006e2d356d8bf78f3c85777722322d716be44b42bc763a04c8095", + "research/frequency-weighted-native-multiplier/runtime.patch": "f35d37cc1746b5a7ac137a3f6de6de887a24f3af578283c24a64c8a25ccc584b", + "research/frequency-weighted-native-multiplier/typed_raw.py": "0c268432c9d48798c17d927f2d900b5e69dfc6585166cd71f253913e389c3b47", + "research/frequency-weighted-native-multiplier/typed_transport.py": "b76b9ad3dc0dd91473026c079585f830387eaa3c34c25a7820ee5057d5cbf941", + "research/frequency-weighted-native-multiplier/verify.py": "07730c6859c26de43b8621bf7e5b778187f41ac17419569ada7c6e10f5d04d4a", + "research/tiered-native-multiplier/CLOCK.md": "cf71e4a3216df23eb7e4fa8a8d9de3735e6257c65ca8a60a5085d9f3c90c4ecb", + "research/tiered-native-multiplier/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "research/tiered-native-multiplier/MEASUREMENTS.json": "a1083bc55178baf0015ef83ef169f45df61475fcc648f487e03c852c871f1f00", + "research/tiered-native-multiplier/NOTICE.md": "c386dabe3fd1d046bddc782c671219757c7708e9ec874a6ede55b540edc95f2c", + "research/tiered-native-multiplier/NUMERICAL.md": "14b86724db522393981ed54b540a35f27bd952f3d95d6e6d14c5b23896811dc9", + "research/tiered-native-multiplier/README.md": "d2c214591f03313dece24592cde3193deffb2f1057b891604597b5e8c6d020ca", + "research/tiered-native-multiplier/RESULT.json": "661e16fcb533b69b97ad2dc91ab81bed79c44e7fdce01306ce573cb6f0ed7fa7", + "research/tiered-native-multiplier/SERIAL-SETUP.md": "1ca7e23ae113647605a31fa309c3bbdde2baf2d442913247fcda4c8a1eef7e7c", + "research/tiered-native-multiplier/SETUP.md": "6951a98f2f8a0bf73c8d60b16ebbbd66bf87584251df8afbefe4e3a0330bfbf3", + "research/tiered-native-multiplier/SOURCES.json": "7a10012734132909e99b0c6160d68d0b8647e1607d25679efb1f5315cf8e23de", + "research/tiered-native-multiplier/ScaledEntrance.lean": "e404be78622db98e9c3b490a15d0e9f002a2cf1eee9ecbd0a9516efbd0db5329", + "research/tiered-native-multiplier/TASK.json": "2cfe7fe1ea4ee8cd07d24048d45e543fdb8a6fa6585ebdc20b1ede55982a16a7", + "research/tiered-native-multiplier/TierCost.lean": "668a248d1060dd4fe97a0edb6652cb3782b8ba4ccc0d00ec73ee6ae253eb9945", + "research/tiered-native-multiplier/VERIFICATION.md": "343f4b2de9b49c1536d35046eee086898bad48023b7da528c5096ca43a1358d0", + "research/tiered-native-multiplier/VERIFY.json": "c684d5b86039809900c85fb0ce64d531db23c62e06bfcf210d6b2cc349480492", + "research/tiered-native-multiplier/bootstrap.py": "74ac8f1d3af21f86cda48a3d50084d6fa5faf84b44ec2e5929b587f40f5bcfd1", + "research/tiered-native-multiplier/check_gaussian.py": "383a3385bc9763d6eb557163ee62aa9ab999b0d98c719a004db87abfee063d24", + "research/tiered-native-multiplier/check_lean.py": "0d53ee2a814887bb53e78f62f2d2e73544641f2cac470dbecec93cdb0aa17203", + "research/tiered-native-multiplier/check_phase_passes.py": "6afd65da931476680d88cb54336ffedf531c3063af181f75403d511e24e83b94", + "research/tiered-native-multiplier/check_placement.py": "d416329ba75727d8f968abc39caded0c1a1fd3f21ffc9286274c5b834aab7154", + "research/tiered-native-multiplier/check_serial_setup.py": "11d1c3209cb523a360ab9abaefb3122507fdf5cb469169890fe2dac636812c47", + "research/tiered-native-multiplier/grades.py": "340684fdd5ca0e611836b0e7301f1c339282ba532bf9e3ec8055944d8981f3c8", + "research/tiered-native-multiplier/independent_price.py": "0b2ecc4a1845a2807782644b6b2675e2fcb194fcbb3ae80b50af9a775363e952", + "research/tiered-native-multiplier/installations.py": "1c6978b8c7d136ef87191512d9ab9eb3dda8a818844244b96cb165d46d97b1df", + "research/tiered-native-multiplier/measure_setup.py": "896349b654c7b8195e9823beaee080d2d30b3f72a562de90c7b6e2554bdd20bb", + "research/tiered-native-multiplier/receipt.py": "3d0219eb2262ea64ccf2dc8da4d2877e32c519c4670d99577703f8bfc236ba61", + "research/tiered-native-multiplier/runtime.patch": "6c93961841be2abc3629928074e2c7917d264e94187276fc88a33f922a3c62e4", + "research/tiered-native-multiplier/serial_setup.py": "61b5058d394ed74e943303e4bdbf21d58ccf5d8bb39fc4b02e97bc135d7bdbbc", + "research/tiered-native-multiplier/source/INSTALLER-NOTICE.md": "c6b1753ad6ebda2a2143b1a9efc80fadad6c1b27552c3ec8bc7bfdb431fb8eeb", + "research/tiered-native-multiplier/source/K7-NOTICE.md": "9c5ae9750012d305d917e625d14a33cc880e810e801e73364725bcdc24bffdb5", + "research/tiered-native-multiplier/source/K7-STACK-LEDGER.json": "a0c0d5b241e6861a5c49a287617e48fba56b09824f5ef4fcb7f03152edf37e8e", + "research/tiered-native-multiplier/source/activation.py": "6e7f89d40a4d10ecd40a50e5b96334dfc64db90841ece7e3ef12eeca5ee5093b", + "research/tiered-native-multiplier/source/check_binary_k7.py": "5eeb8f818725249cbabf215c323c3f8351b1c4ed3c127119341e6ed09f490dd6", + "research/tiered-native-multiplier/source/installer.tar.gz": "6696459e2e3552f802e7caaaf93dc86c9bb6b62ee38631702bff2e3a8a9a481a", + "research/tiered-native-multiplier/source/ordinary_clock.py": "91dcf0ef72dddbde998b80f3d8b30c8036de9ce97e06e2bbd9c4159bf292020d", + "research/tiered-native-multiplier/source/outer_budget.py": "ca4438db28a447ed5c43d87d43f0ac10a0cb2b4e183342ac93139d517b9d4d02", + "research/tiered-native-multiplier/source/outer_clock.py": "63363c3da673365f3ac5e1b7e318c6938005f1e9c9896799504cc598efbf96fa", + "research/tiered-native-multiplier/source/strong-bit-k7.json.gz": "9e7392c52bcf29c0cc58c54c619f95c28f476394c33e8e0a5aa30c9557d31362", + "research/tiered-native-multiplier/verify.py": "d6cf9085e87743db14932a21cf895f8bd4d0f126b6c0bb7220d3255268dba39a" + }, + "head": "cbe847a953b971f9c6c5a0a6661e2008acd29086" +} diff --git a/research/p104-ordinary-eta-lift/original/PROOF.md b/research/p104-ordinary-eta-lift/original/PROOF.md new file mode 100644 index 0000000000..bf97b6e37f --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/PROOF.md @@ -0,0 +1,23 @@ +# Exact capped signed allocation + +The comparison starts at [#8071](https://github.com/CrocSwap/integer-mult-bounds/commit/9555f2df027f4a182722f736c97e5efafa5382c6), κ 0.00389821412325. Its fixed allocation has exact stopped ceiling `6417673946269416969859534601/1646311296204800000000000000000`. The new installed target is 0.003898214283192, exceeding that ceiling by `263176469852170186999/1646311296204800000000000000000`. Keep both signed words, the original owner returns, and the ordinary and Gaussian finite-factor charges `11239/8192` and `64939/524288`. The signed caller and the same five all-size premises for native action, owned allocation and restoration, chronological compiler transfer, fixed-alphabet tape and precision, and analytic recovery remain in force. + +## Integer crossing under fixed bookings + +Use three ordinary heights in [8192,524288], Gaussian height in [1024,524288], and complete recurring log₂ C at most 318292071. Any such profile must satisfy the terminal clock inequality `1731+320 sum(b)+220 G ≤ 318292071`. Here 1731 includes the selector, the fixed recurring charge and the ordinary fixed term. The complete price must still pay the entry path and conversion. + +The ordinary recurrence starts at zero, multiplies each native rate by 249/250 and carries the previous rate with coefficient 1/250. It applies the same 39/10000 clamp and one guard tick below each directed intermediate floor on the 10^−21 grid. At G=490950 the terminal cap funds ordinary heights `(8192,124649,524288)`. Before the stopping charge the exact ordinary ceiling there is `523209464347190026308559950737/134217728000000000000000000000000`. + +To certify the ordinary optimum in this slice, relax intermediate floors and omit the clamp for an upper bound. The relaxed expression is 249/250 times the sum of weighted terms `c_O − (11239/8192)/b_i` with weights (1/62500,1/250,1). Its reciprocal slopes at the stated allocation satisfy `a_1 < a_2 < a_3`, where `a_i = w_i / b_i^2`. For any other integer allocation with differences d from this one, d₁≥0, d₃≤0 and their sum is at most zero. The tangent inequality for reciprocal heights bounds the loss of every such alternative below the relaxed optimum by at least `(249/250)(11239/8192) min(a₂−a₁,a₃−a₂,a₂)`. This exact positive loss exceeds the actual intermediate rounding loss at the stated allocation. The clamps are inactive there. + +The Gaussian ceiling at G=490949 is `8417088742419431/2159216536579997696`, below the new ordinary ceiling. At G=490950 it is `4208552944028369/1079610467313254400`, above the new ordinary ceiling. The Gaussian ceiling increases with G, so all G≤490949 are bounded by the first gap. For G≥490950 the ordinary feasible sets are nested inside the latter slice as the cap buys fewer ordinary heights. These bounds cover the entire declared family with fixed bookings, height caps, stage count and recurring invoice. At G=490951 even its ordinary optimum misses the installed target after the stopping charge. The exact stopped supremum is `523209464347189355219919950737/134217728000000000000000000000000`. The booked rate remains strictly below it by `10527443919950737/134217728000000000000000000000000`. + +## Charged signed installation + +The new ordinary log₂ B is 210281408. Reducing ordinary stage two by 214 levels saves 68480. Adding 311 Gaussian levels costs 68420. After all terms and 515-bit entry conversion, the complete bound is 318292011. The cuts are (8290,133003,657355) and the first terminal header increases to `2^1148553+4`. The same maximum native height 524288 and private envelope 536870915 fit the fixed serial setup proof below 2^228. The stage and precision terms remain charged at the changed boundaries. The exact price verifies 54 strict and four functional inequalities in each signed tier. The construction restores both physical width owners, including the true exterior supply and nonzero nested return. Both signed tier paths and restored operands are checked, with a separate dense physical coefficient fixture at entry. The literal calendar retains the exact K7 paid gallery, seam checks and corrupted-return controls. + +External #8057 keeps a lower recurring log₂ C bound of 318259431 and lower first terminal header `2^1146239+4`. Its portable setup bound below 2^113 applies to that exact trace. The new ceiling concerns the fixed stated allocation family, with other cost functions, suppliers, stage counts and interfaces outside this argument. + +## Predecessor credit + +Ali Romman supplied [#8057](https://github.com/CrocSwap/integer-mult-bounds/commit/cbe847a953b971f9c6c5a0a6661e2008acd29086) and the [#8055 native setup proof](https://github.com/CrocSwap/integer-mult-bounds/pull/8055). SYLforge supplied the [#8052 K7 word](https://github.com/CrocSwap/integer-mult-bounds/pull/8052). The signed Gaussian factor and range inherit [#8059](https://github.com/CrocSwap/integer-mult-bounds/pull/8059), [#8063](https://github.com/CrocSwap/integer-mult-bounds/pull/8063) and [#8064](https://github.com/CrocSwap/integer-mult-bounds/pull/8064). [#8066](https://github.com/CrocSwap/integer-mult-bounds/pull/8066) supplies the earlier ordinary price, [#8067](https://github.com/CrocSwap/integer-mult-bounds/pull/8067) the literal K7 floor, and [#8068](https://github.com/CrocSwap/integer-mult-bounds/pull/8068) and [#8069](https://github.com/CrocSwap/integer-mult-bounds/pull/8069) the prior capped allocation method. [#8070](https://github.com/CrocSwap/integer-mult-bounds/pull/8070) supplies the Gaussian debit and #8071 the finer ordinary charge. This contribution installs and verifies the exact crossing for their two fixed bookings. OpenAI Codex materially assisted pricing, source changes and independent verification. diff --git a/research/p104-ordinary-eta-lift/original/README.md b/research/p104-ordinary-eta-lift/original/README.md new file mode 100644 index 0000000000..db7a838448 --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/README.md @@ -0,0 +1,17 @@ +# Capped signed weighted allocation at Gaussian height 490950 + +This isolated package installs ordinary heights `(8192,124649,524288)` and Gaussian height `490950` with the ordinary and Gaussian bookings inherited from [#8071 at 9555f2df](https://github.com/CrocSwap/integer-mult-bounds/commit/9555f2df027f4a182722f736c97e5efafa5382c6). It certifies conditional κ **0.003898214283192**, up exactly `0.000000000159942` from #8071, and strictly clears #8071's actual stopped ceiling. The new ordinary-limited crossing attains the stated capped three-stage rate supremum under the fixed bookings. [Proof and rates](PROOF.md) · [Exact signed invoice](RESULT.json) + +The complete recurring log₂ C bound is `318292011`, down 60. Maximum native height stays `524288`, entry conversion stays `515` bits, and conservative serial fixed setup stays below `2^228`. The first terminal header becomes `2^1148553+4`. The same native, owned restoration, compiler, precision/tape and recovery premises apply. + +Reproduce from a clean checkout with Git and CPython 3.12. + +```sh +python3.12 -IB scripts/research_package.py --package research/p104-weighted-capped-allocation-490950 +``` + +All seven registered scopes authenticate and install the exact signed source. They check full price and signed inequalities, adjacent and old-profile controls, actual calendar and both native widths, exterior and nonzero nested returns, signed multiplication, and fixed setup. The physical coefficient fixture covers entry. Both tiers check signed operation and restored operands. Other resource and supplier classes require separate evidence. + +## Open next questions + +At the proved capped allocation ceiling, a profitable change must improve a charged cost or supplier inequality. A follow-up should price one distinct ordinary paid mechanism with an exact first-read and restoration witness. The full signed route, native shape and tape price must still hold before any new comparison. diff --git a/research/p104-ordinary-eta-lift/original/check_ordinary_floor.py b/research/p104-ordinary-eta-lift/original/check_ordinary_floor.py new file mode 100644 index 0000000000..80994309fb --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/check_ordinary_floor.py @@ -0,0 +1,207 @@ +"""Check the actual ordinary floor and fully charged occupied-edge calendar.""" +from collections import Counter +from fractions import Fraction as Q +from hashlib import sha256 +import json +from pathlib import Path +import sys + +RUNTIME=Path(sys.argv[1]).resolve() +sys.path.insert(0,str(RUNTIME)) +from upstream import install + +install() +LOWER=18960 + + +def ceil(x): + return -(-x.numerator//x.denominator) + + +def all_size_stock(word, c, intervals, unit): + """Discharge the parameterized TRANSFER.md hypotheses at the new floor.""" + t = 1-c + targets, paid = Counter(word.targets), Counter(word.paid) + assert max(targets) <= 134 and min(paid) >= 1 + assert all(5*r <= 4*k for r,k in word.cells) + assert all(sum(p for (u,k),p in word.cells.items() if u==r)==1 for r in paid) + # Check actual directed per-receiving-label funding and the whole raw margin. + t_lower = {k: intervals(k,t)[0] for k in targets} + p_upper = {r: intervals(r,t)[1] for r in paid} + t_hi = sum(n*intervals(k,t)[1] for k,n in targets.items()) + p_lo = sum(n*intervals(r,t)[0] for r,n in paid.items()) + assert sum(targets[k]*v for k,v in t_lower.items())>sum(paid[r]*v for r,v in p_upper.items()) + assert 100*p_lo>99*t_hi + for k,n in targets.items(): + load=sum(paid[r]*p*p_upper[r] for (r,s),p in word.cells.items() if s==k) + assert 01 + + # Check the smallest admitted numerical scale; every margin below grows + # with N. Actual binary native stages start no earlier than H=3000. + H=1024 + N=1<=(1-delta)*N + assert Q(6,5)**4>2 and Q(6,5)**73>2**19 + assert len(word.paid)<2**19 + assert 2**19*Q(1,1024*ambient*LOWER)**77+Q(1,N**77)<1 + lower_power=Q(intervals(LOWER,t)[0],unit) + assert lower_power>1024 and Q(1,t*lower_power)+Q(2,N**5)<2 + # Endpoint inverse bases are >1/(512N) through all roots. The + # original 61-stage envelope costs 397+30.5H bits per endpoint. + assert c.denominator.bit_length()-1<=60 and Q(1,N)-Q(1,2**(64*(H+1)))>Q(1,512*N) + grid_error_bits=397+31*H+6*H+3-64*(H+1) + assert grid_error_bits<-132 + assert 2**46*N**2 < Q(V,2**132) + assert Q(2**20*V,N**4) < Q(V,2**132) + assert 4096*2*len(word.targets)1 + assert (1-Q(1,N))/Q(257,256)>Q(1,2) + return {"fringe_upper_1e9":ceil(fringe*10**9),"psi_lower_floor":int(psi), + "grid_absolute_error_exponent_at_H1024":grid_error_bits, + "birth_bound":"2V","copy_group_bound":"3N^3","whole_field_width":"N^92", + "first_two_columns":[LOWER-8,LOWER-6],"minimum_positive_scale_h_guard":1024} + + +def bound_recipe(old, lower): + """Pass the proposed literal cutoff through the installed Recipe.open seam.""" + import transport + + assert old.level_floor==lower + N=1<=0 and sender in live + closes+=1 + assert not live and not pending and not any(held.values()) and opens==closes + assert axes==plan.leaves_per_epoch and len(first_counts)==2 + return {"tested_occupied_K7_grade":[r,k],"lower":LOWER,"upper":hi,"carrier":n, + "first_band_contacts":contacts,"native_opens":opens,"native_closes":closes, + "returned_paid_prefixes":loans,"paid_singletons":axes, + "lower_return_counts":dict(first_counts),"extent":"complete fixture event stream"} + + +def check(): + from band_product import prepare_native + from installations import BINARY_C, ENTRY, TERMINAL + from raw_binary_stage import binary_word + from strict_moment import UNIT + from unpowered_price import intervals + + stage=(RUNTIME/"raw_binary_stage.py").read_bytes() + assert sha256(stage).hexdigest()=="e24bd735598d278dbd46cada584a63da01796d77ad557a45b80a4dfc7bbbd0b0" + assert TERMINAL.rank_logs==(8192,124649,524288) and TERMINAL.complex_log==490950 + word=binary_word() + assert (len(word.targets),len(word.paid),len(word.cells))==(18906,104652,24) + a,b=prepare_native() + ordinary=(*a[:-1],*b[:-1]) + assert tuple(recipe.rank_log for recipe in ordinary)==(*ENTRY.rank_logs,*TERMINAL.rank_logs) + assert (a[-1].rank_log,b[-1].rank_log)==(1024,490950) + openings=[bound_recipe(recipe,LOWER) for recipe in ordinary] + stock=all_size_stock(word,BINARY_C,intervals,UNIT) + finite=finite_plan(word,BINARY_C) + assert finite["tested_occupied_K7_grade"]==[49,64] + assert finite["native_opens"]==323165 and finite["returned_paid_prefixes"]==432 + assert finite["paid_singletons"]==683705746532 + print("PASS_LITERAL_ORDINARY_FLOOR",json.dumps( + {"new_binary_openings":openings,"binary_all_size":stock,"binary_integer_fixture":finite}, + sort_keys=True),flush=True) + + +if __name__=="__main__": + check() diff --git a/research/p104-ordinary-eta-lift/original/check_stage_seam.py b/research/p104-ordinary-eta-lift/original/check_stage_seam.py new file mode 100644 index 0000000000..cba442cfb9 --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/check_stage_seam.py @@ -0,0 +1,258 @@ +"""Replay literal ordinary dispatch and bounded signed bank returns.""" +from dataclasses import replace +from fractions import Fraction as Q +from hashlib import sha256 +from io import BytesIO +from itertools import product +import json +from pathlib import Path +import sys + +RUNTIME = Path(sys.argv[1]).resolve() +sys.path.insert(0, str(RUNTIME)) +from upstream import install + +install() + + +class DyadicWidth(int): + """Speed up exact exponentiation of a mathematically dyadic test width.""" + def __pow__(self, exponent): + assert self.bit_count() == 1 and exponent >= 0 + return 1 << ((self.bit_length() - 1) * exponent) + + +def verify_stage(profile, cuts, number, log_width): + import ordinary_carrier as carrier + + calls = [] + base = DyadicWidth(1 << log_width) + prev = 1 << cuts[number-2] + power = 1 << (log_width//250) + assert log_width % 10000 == 0 + width = max(prev+1, power) + component = 1 << (39*log_width//10000) + count = -(-width//component) + short, longer = divmod(width,count) + expected_layout = (longer, short+1, count-longer, short) + rank = 1 << profile.rank_logs[number-1] + expect_direct = -(-base//width) <= 1 << (8*profile.rank_logs[number-1]) + + def root(value, degree): + assert value.bit_count() == 1 + quotient, remainder = divmod(value.bit_length()-1,degree) + assert not remainder + return 1 << quotient + + def receiver(dimension, layout, previous, *, direct, profile): + assert dimension == rank and layout == expected_layout and direct == expect_direct + assert previous.func is carrier.ternary + assert previous.keywords == {"maximum": number-1, "profile": profile} + return number + + def body(source,target,digits,prefix,gap,suffix,backend): + assert digits==base and (prefix,gap,suffix)==(1,3,5) and backend==number + calls.append((digits.bit_length()-1,backend)) + + actual = carrier.ceil_root, carrier.Receiver, carrier.root_body + try: + carrier.ceil_root, carrier.Receiver, carrier.root_body = root, receiver, body + carrier.ternary(None,None,base,1,3,5,maximum=number,profile=profile) + finally: + carrier.ceil_root, carrier.Receiver, carrier.root_body = actual + assert calls == [(log_width,number)] + return {"stage":number,"scanned_log":log_width,"rank_log":rank.bit_length()-1, + "predecessor_cut":cuts[number-2],"direct":expect_direct, + "component_log":component.bit_length()-1} + + +def verify_tape(width, u, v): + from five_exchange import same_order_line + from growing_binary import Weighted + from same_order_body import SameOrderBody + from streaming_routes import cold_swap_tape + from ternary_leaf import select_pivot + + class Core(SameOrderBody, Weighted): + def __init__(self): + super().__init__(2,(1,width,0,0),cold_swap_tape) + self.stock=self.owners + self.calls=0 + + def weighted(self,*args,**kwargs): + assert kwargs["atoms"]==10 + + # Adjacent Gaussian heights suffice over the full same three-stage + # family. On the low side the positive cap increases with height. On + # the high side the feasible sets of ordinary heights nest downward. + cap=318292071 + height=TERMINAL.complex_log + ranks=TERMINAL.rank_logs + assert ranks==capped_shape(height,cap)==capped_shape(height-1,cap) + new_ordinary=integer_optimum(ranks,debit) + new_gaussian=positive(height) + assert positive(height-1)0 + assert ranks==capped_shape(height,318292011) + assert 1731+320*sum(ranks)+220*height==318292011 + underfunded=booked-positive(height-1) + overfunded=booked-integer_optimum(capped_shape(height+1,cap),debit) + assert underfunded>0 + assert overfunded==Q(47205867732215147631,134217728000000000000000000000000)>0 + + smaller=Q(".00389821057")+stop-upper((8192,129407,524402),Q(11,8)) + assert smaller==Q(949618999849667259182401851,233169615645211570995200000000000000000) + historical=Q(".00389821126")+stop-upper((8192,129406,523443),Q(703,512)) + assert historical==Q(131786329075081068292016650499,77580469414725995724800000000000000000) + prior_gaussian_debit=Q(".0038982141226643")+stop-(GAUSSIAN_C-Q(64944,524288*prior_height)) + assert prior_gaussian_debit==Q(5290830738777425573,274384656793600000000000000000)>0 + historical_ordinary_shortfall=baseline.ordinary-upper(baseline.rank_logs,old_debit,True) + assert historical_ordinary_shortfall==Q(25132665927681050851,26843545600000000000000000000000)>0 + historical_height_shortfall=baseline.ordinary-positive(prior_height) + assert historical_height_shortfall==Q(354613496784311279,823153970380800000000000000000)>0 + + profiles=[] + for p,expected in ((baseline,(8290,133217,657569)),(TERMINAL,(8290,133003,657355))): + cuts=tuple(entrance_logs(p.rank_logs)) + assert cuts==expected + for i,c in enumerate(cuts,1): + assert [stage_for_width_log(c+d,3,p.rank_logs) for d in (-1,0,1)]==[i-1,i,i] + assert stage_for_width_log(c+1,i-1,p.rank_logs)==i-1 + direct=[verify_stage(p,cuts,2,140000),verify_stage(p,cuts,3,670000)] + compiled=[verify_stage(p,cuts,2,1100000),verify_stage(p,cuts,3,4400000)] + assert all(s["direct"] for s in direct) and not any(s["direct"] for s in compiled) + profiles.append({"ranks":p.rank_logs,"cuts":cuts,"direct":direct,"compiled":compiled}) + tape=[verify_tape(1,[0,1],[2,1]),verify_tape(2,[1,7],[3,1])] + print("PASS_LITERAL_CAPPED_ALLOCATION",json.dumps( + {"historical_ordinary_negative_gap":str(historical),"seven_level_negative_gap":str(smaller), + "historical_gaussian_negative_gap":str(prior_gaussian_debit), + "historical_debit_shortfall":str(historical_ordinary_shortfall), + "historical_height_shortfall":str(historical_height_shortfall), + "lower_adjacent_gaussian_shortfall":str(underfunded), + "higher_adjacent_ordinary_shortfall":str(overfunded), + "candidate_ordinary_slack":str(new_ordinary-booked),"candidate_gaussian_slack":str(new_gaussian-booked), + "new_family_ceiling":str(family_ceiling),"prior_fixed_ceiling":str(prior_fixed_ceiling), + "prior_family_ceiling":str(prior_family_ceiling),"stage_seams":profiles,"signed_tape":tape}, + sort_keys=True),flush=True) + + +if __name__=="__main__": + check() diff --git a/research/p104-ordinary-eta-lift/original/peer8057.tar.gz b/research/p104-ordinary-eta-lift/original/peer8057.tar.gz new file mode 100644 index 0000000000..3a3ded828f Binary files /dev/null and b/research/p104-ordinary-eta-lift/original/peer8057.tar.gz differ diff --git a/research/p104-ordinary-eta-lift/original/prepare.py b/research/p104-ordinary-eta-lift/original/prepare.py new file mode 100644 index 0000000000..048698f08d --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/prepare.py @@ -0,0 +1,258 @@ +"""Install the capped height optimizer on the exact weighted producer.""" +from hashlib import sha256 +import json + +NEW_INSTALLATION = "c1bba07dfcf95f7a494e59d6e4de85b4d4537c144f0bcf6f7a1a02ecbe832dea" +RAW_FLOOR_IMAGES = { + "before": "0c805a525322acf4eb03f083c2c763f3046c3d488e1f993beb484a3e2c2ff4a9", + "after": "e24bd735598d278dbd46cada584a63da01796d77ad557a45b80a4dfc7bbbd0b0", +} +RAW_FLOOR_PATCH = """--- a/raw_binary_stage.py ++++ b/raw_binary_stage.py +@@ -45,7 +45,7 @@ + @cache + def binary_recipe(height): + word = binary_word() +- return Recipe(height, word.tagged.ambient, word.targets, word.paid, word.cells, BINARY_C) ++ return Recipe(height, word.tagged.ambient, word.targets, word.paid, word.cells, BINARY_C, level_floor=18960) +""" + " \n \n def run(recipe, fields, machine):\n" + + +def replace(path, replacements): + source = path.read_text() + for old, new in replacements: + if source.count(old) != 1: + raise ValueError(f"Expected one change point for {old!r} in {path.name}") + source = source.replace(old, new) + path.write_text(source) + + +OLD_EDGE = ''' # The first three positive terms of log(k/r) suffice for each real edge. + psi = Q(0) + for (r, k), share in cells.items(): + u = Q(k - r, k + r) + log_lower = 2 * (u + u**3 / 3 + u**5 / 5) + psi += paid[r] * share * r * log_lower''' + +DIRECTED_EDGE = ''' # Integrate each exact directed edge, retaining both rounding ends. + # A downward ratio of outward powers bounds ((k/r)^c-1)/c. + psi = Q(0) + for (r, k), share in cells.items(): + floor = intervals(k, c)[0] * UNIT // intervals(r, c)[1] + assert floor > UNIT + psi += paid[r] * share * r * (Q(floor, UNIT) - 1) / c''' + +NATIVE_SETUP = ''' setup = native_clock() + grade_count = len(low[-1].paid.histogram) + len(low[-1].targets.histogram) + actual_roles = sum(len(v.targets) + len(v.paid) for v in high[-1].types()) + assert actual_roles < 2**20 and grade_count < 2**8 + assert len(low) + len(high) == 7 and max(heights[-1].bit_length() for heights in (ENTRY.rank_logs, TERMINAL.rank_logs)) <= 20 + grade_actions = 2**20 * 256 + 2**8 * 256 * 8 + 32 * (grade_count + 2)**2 + 2**12 + assert grade_actions < 2**32 and setup["all_setup"] < 2**228''' + +DIRECTED_ORDINARY = '''def ordinary_debit(): + delta = Q(1, 2**128) + def bounds(floor): + multiplier = ( + Q(47, 20) * Q(256, 255) * Q(4097, 4096) * Q(1028, 1024) + * (1 + Q(64, floor) + delta) / ((1 - Q(10, floor)) * (1 - delta)**3) + ) + lo, hi = powers(1024 * 134 * floor, BINARY_C) + return multiplier * lo, multiplier * hi + + lo, hi = bounds(18960) + old_lo, old_hi = bounds(32768) + allowance = 2 * powers(2, Q(3047, 8192))[0] + finer_allowance = 2 * powers(2, Q(6093, 16384))[1] + assert allowance - hi > Q("0.000062662376093595") + assert lo - finer_allowance > Q("0.000046832527238212") + assert hi**1024 < 2**1405 < old_lo**1024 + assert old_hi**512 < 2**703 + assert Q(75, 32) / Q(47, 20) == Q(375, 376) + print("PASS_DIRECTED_ORDINARY_DEBIT", 18960, "11239/8192", "375/376") + + +''' + +EDITS = { + "runtime.patch": ( + ('TERMINAL = Profile((8192, 129414, 524288), 483871, Q(".00389821"))', + 'TERMINAL = Profile((8192, 124649, 524288), 490950, Q(".003898214283192"))'), + ), + "positive_debit.py": ( + ("from strict_moment import UNIT, power_interval", "from strict_moment import UNIT, power_interval\nfrom unpowered_price import intervals"), + ("POSITIVE_DEBIT = Q(65081, 524288)", "POSITIVE_DEBIT = Q(64939, 524288)"), + (OLD_EDGE, DIRECTED_EDGE), + ("assert psi > Q(1790217668064, 10000)", 'assert psi > Q("926899828.8291")'), + ("assert fringe < Q(7579, 1000)", 'assert fringe < Q("7.335168")'), + ), + "receipt.py": ( + ('sys.path.append(str(HERE / "portable"))', 'sys.path.append(str(HERE.parent / "tiered-native-multiplier"))'), + ("from verify_receipt import verify as fixed_installation", "from check_serial_setup import clock as native_clock"), + ("DEBIT = Q(65081, 2**19)", "DEBIT = Q(64939, 2**19)\nORDINARY_DEBIT = Q(11239, 8192)"), + ("def tape_factor(ambient, rate):", "def tape_factor(ambient, rate, lower):"), + (" delta, lower = Q(1, 2**128), 32768", " delta = Q(1, 2**128)"), + ("assert ordinary.ambient == 134 and ordinary.trial == BINARY_C", + "assert ordinary.ambient == 134 and ordinary.trial == BINARY_C\n" + " assert ordinary.level_floor == 18960"), + ("Q(11, 8 * height)", "ORDINARY_DEBIT / height"), + ("Q(11, 8) / (BINARY_C - TERMINAL.ordinary)", + "ORDINARY_DEBIT / (BINARY_C - TERMINAL.ordinary)"), + (" assert (tape_factor(134, BINARY_C) * Q(47, 20)) ** 8 < 2**11", + " ordinary_upper = Q(2588135791281, 10**12)\n assert tape_factor(134, BINARY_C, 18960) * Q(47, 20) < ordinary_upper\n assert ordinary_upper**8192 < 2**11239\n" + " assert Q(75, 32) / Q(47, 20) == Q(375, 376)"), + ("assert cost == 318259431 and premium == 514", "assert cost == 318292011 and premium == 515"), + ("(517430, 483870)", "(517115, 490950)"), + ('older = Q(".0038982016137")', 'older = Q(".00389821412325")'), + ("assert gain == Q(83863, 10**13)", "assert gain == Q(79971, 500000000000000)"), + (" complete_log2_C=cost,", " complete_log2_C=cost,\n" + " ordinary_floor=18960,\n" + " ordinary_finite_debit=str(ORDINARY_DEBIT),\n" + ' ordinary_child_contraction="375/376",'), + (" setup = fixed_installation()", NATIVE_SETUP), + (''' log2_fixed_setup_upper=setup["trace_exponent"], + log2_portable_setup_guard=setup["conservative_exponent"], + log2_full_store_setup_upper=setup["full_store_trace_exponent"], + portable_setup_transition_upper=setup["transitions"],''', + ''' log2_fixed_setup_upper=setup["setup_exponent"], + native_setup_transition_upper=setup["all_setup"], + native_setup_grade_actions=grade_actions,'''), + ), + "independent_price.py": ( + ("lower = powers(2, Q(65081, 524288))[0]", "lower = powers(2, Q(64939, 524288))[0]"), + ('assert lower - upper > Q("0.00012957")', 'assert lower - upper > Q("0.000007887415")'), + ("TERMINAL.kappa - peer == Q(83863, 10**13)", "TERMINAL.kappa - peer == Q(126694920, 10000000000000000)"), + ("def rounded_peer():", DIRECTED_ORDINARY + "def rounded_peer():"), + (" weighted()\n rounded_peer()", " weighted()\n ordinary_debit()\n rounded_peer()"), + ), +} + + +# Apply exact real-integer frequencies and reprice the full typed calendar. +EDITS["runtime.patch"] += ( + ("+GAUSSIAN_C = Q(17145637167, 2**42)", "+GAUSSIAN_C = Q(17145637307, 2**42)"), +) +EDITS["grades.py"] = (("WEIGHTS = (1, 90)", "WEIGHTS = (5, 451)"),) +EDITS["positive_debit.py"] += ( + ("assert target_axes == 135150528", "assert target_axes == 677246016"), + ("assert 91 / (t * 2**10)", "assert sum((5, 451)) / (t * 2**10)"), +) +EDITS["receipt.py"] += ( + ("def raw_counts(base, multiplicity):", "def raw_counts(base, multiplicity, primary=1):"), + ("t, p = targets.copy(), paid.copy()", + "t = Counter({grade: entry * primary for grade, entry in targets.items()})\n" + " p = Counter({grade: entry * primary for grade, entry in paid.items()})"), + ("p[1] -= 1008\n p[Q(1, 2)] += 2016", + "p[1] -= 1008 * primary\n p[Q(1, 2)] += 2016 * primary"), + ("def total_interval(counts):", "def total_interval(counts, trial=GAUSSIAN_C):"), + ("intervals(grade, 1 - GAUSSIAN_C)", "intervals(grade, 1 - trial)"), + ("WEIGHTS == (1, 90)", "WEIGHTS == (5, 451)"), + ("t, p = raw_counts(base, 90)", "t, p = raw_counts(base, WEIGHTS[1], WEIGHTS[0])"), + ("<= 261", "<= 270"), + (" cuts = {}", + " high = total_interval({k: n for k, n in t.items() if k > 2})\n" + " required = total_interval({r: n for r, n in p.items() if 5 * r > 8})\n" + " assert high[0] - required[1] > 462\n" + " past_targets, past_paid = raw_counts(base, 541, 6)\n" + " assert total_interval(past_targets)[1] < total_interval(past_paid)[0]\n" + " old_tariff = Q(17145637167, 2**42)\n" + " cuts = {\"new\": [str(high[0] - required[1]), str(high[1] - required[0])]}"), + (" cap = total_interval({k: n for k, n in chosen.items() if k > 2})", + " cap = total_interval({k: n for k, n in chosen.items() if k > 2}, old_tariff)"), + (" load = total_interval({r: n for r, n in required.items() if 5 * r > 8})", + " load = total_interval({r: n for r, n in required.items() if 5 * r > 8}, old_tariff)"), + (" net = total_interval(chosen)[0] - total_interval(required)[1]", + " net = total_interval(chosen, old_tariff)[0] - total_interval(required, old_tariff)[1]"), +) +EDITS["independent_price.py"] += ( + ('assert psi > Q("184971191.2157")', 'assert psi > Q("926899828.8291")'), +) +EDITS["check_placement.py"] = ( + ("assert 90 * (hi - lo) * M * pi > 4", "assert WEIGHTS[1] * (hi - lo) * M * pi > 4"), +) +EDITS["check_exterior.py"] = ( + ("from band_product import production_supplier", "from band_product import production_supplier\nfrom installations import GAUSSIAN_C"), + ("c = Q(17145637167, 2**42)", "c = GAUSSIAN_C"), +) +EDITS["check_nested.py"] = ( + (" * cells[1, 2]\n * 90", " * cells[1, 2]\n * types[0].multiplicity\n * types[1].multiplicity"), + ("share == cells[1, 2] * 90 / t[2]", "share == cells[1, 2] * types[1].multiplicity / t[2]"), + ("and grant.numerator // grant.denominator == 899557645", "and 4_400_000_000 < grant.numerator // grant.denominator < 4_600_000_000"), +) +EDITS["check_ownership.py"] = ( + ("def run(freq, ticks, lower, upper, volume, n, rounds, delay):", + "def run(freq, ticks, lower, upper, volume, n, rounds, delay, primary=1):"), + ("NativeType((2,), (1, 1), 1)", "NativeType((2,), (1, 1), primary)"), + ("(1, 1, 0, 2): Q(1, 2 * freq)", "(1, 1, 0, 2): Q(primary, 2 * freq)"), + ("1 - Q(1, 2 * freq)", "1 - Q(primary, 2 * freq)"), + (" frequency=freq,", " frequency=(primary, freq),"), + ("run(90, 8, 10, 42, 450, 384, 32, 4)]", + "run(90, 8, 10, 42, 450, 384, 32, 4), run(451, 8, 10, 42, 90, 384, 32, 4, primary=5)]"), +) + + +# Keep the reproduced lower edge and widen the actual even upper fence. +EDITS["grades.py"] += ( + ("LOWER = 2048", "LOWER = 1874\nUPPER_DIVISOR = 1724"), + ("2048 * self.ambient", "UPPER_DIVISOR * self.ambient"), +) +EDITS["positive_debit.py"] += ( + ("BAND_LOWER = 2048", "BAND_LOWER = 1874"), + ("from unpowered_price import intervals", "from unpowered_price import intervals\nfrom grades import UPPER_DIVISOR"), + (" upper = 2 * (M // (2048 * recipe.ambient))", + " scale = UPPER_DIVISOR * recipe.ambient // 2\n" + " upper = 2 * (M // (2 * scale))\n" + " assert 4 * max(targets) * (upper - 8) < M and 516 * (upper + 2) < M"), + ("1024 * recipe.ambient * upper", "scale * upper"), + ("Q(4 * max(targets), 1024 * recipe.ambient)", "Q(4 * max(targets), scale)"), + ("power_interval(1024 * recipe.ambient * lower, c)", "power_interval(scale * lower, c)"), + (' "lower_band": lower,', ' "lower_band": lower,\n "upper_divisor": UPPER_DIVISOR,\n "upper_scale": scale,'), + ("assert t > Q(996, 1000) and 11 * t > 10", + "assert t > Q(996, 1000) and power_interval(lower, t)[0] > 1024 * UNIT"), +) +EDITS["receipt.py"] += (("and LOWER == 2048", "and LOWER == 1874"),) +EDITS["independent_price.py"] += ( + ("from installations import BINARY_C, TERMINAL", "from installations import BINARY_C, TERMINAL\nfrom grades import LOWER, UPPER_DIVISOR"), + (" upper = (", " scale = UPPER_DIVISOR * recipe.ambient // 2\n upper = ("), + ("Q(4 * 258, 1024 * 306)", "Q(4 * 258, scale)"), + ("powers(1024 * 306 * 2048, c)[1]", "powers(scale * LOWER, c)[1]"), + ("fringe / 2048", "fringe / LOWER"), + (' assert lower - upper > Q("0.000007887415")', + ' assert lower - upper > Q("0.000000684423")\n' + ' psi_hi = sum(recipe.paid.histogram[r] * share * r * (powers(Q(k,r), c)[1] - 1) / c\n' + ' for (r,k), share in recipe.cells.items())\n' + ' prior_fringe = 10 * axes / ((1-c) * psi_hi)\n' + ' prior_scale = 1024 * recipe.ambient\n' + ' prior_factor = ((1+delta) * (1+Q(4*258,prior_scale)) * powers(prior_scale*LOWER,c)[0]\n' + ' * (1+prior_fringe/LOWER+delta) / (1-delta)**4)\n' + ' assert prior_factor - powers(2, Q(64939,524288))[1] > Q("0.000051649827")'), +) +EDITS["check_placement.py"] += ( + ("from grades import numerical_recipe, WEIGHTS", "from grades import numerical_recipe, LOWER, UPPER_DIVISOR, WEIGHTS"), + (" U = 2 * (M // (2048 * 306))", + " scale = UPPER_DIVISOR * recipe.ambient // 2\n" + " assert UPPER_DIVISOR == 1724 and scale == 263772\n" + " U = 2 * (M // (2 * scale))"), + (" assert U < lo < hi < M", " assert LOWER < e < U < lo < hi < M"), + (" assert period == 1620 and tickets == (0, 324, 648) and f.swaps[0] == (1, 324, 1)", + " assert period == 1364 and tickets == (0, 272, 545) and f.swaps[0] == (1, 272, 1)"), +) +EDITS["verify.py"] = ( + ('("check_calendar.py", "check_ownership.py")', + '("check_calendar.py", "check_ownership.py", "check_cutoff.py", "check_stage_seam.py", "check_ordinary_floor.py")'), +) + + +def materialize(package): + for name, replacements in EDITS.items(): + replace(package / name, replacements) + with (package / "runtime.patch").open("a") as patch: + patch.write(RAW_FLOOR_PATCH) + path = package / "SOURCES.json" + pins = json.loads(path.read_bytes()) + pins["runtime_images"]["installations.py"]["after"] = NEW_INSTALLATION + pins["runtime_images"]["raw_binary_stage.py"] = RAW_FLOOR_IMAGES + for name in ("runtime.patch", "grades.py"): + pins["local_sources"][name] = sha256((package / name).read_bytes()).hexdigest() + pins["runtime_images"]["grades.py"]["after"] = pins["local_sources"]["grades.py"] + path.write_text(json.dumps(pins, indent=2) + "\n") diff --git a/research/p104-ordinary-eta-lift/original/source-pins.json b/research/p104-ordinary-eta-lift/original/source-pins.json new file mode 100644 index 0000000000..e35d8f1fb2 --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/source-pins.json @@ -0,0 +1,18 @@ +{ + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": { + "research/p104-weighted-capped-allocation-490950/LICENSE": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "research/p104-weighted-capped-allocation-490950/NOTICE.md": "cac7f9814f2e5fa1e5fb307e2de89f739348daef", + "research/p104-weighted-capped-allocation-490950/PEER-SOURCE.json": "6f84b3aef4b8c5026e348d88700bc9401514ccab", + "research/p104-weighted-capped-allocation-490950/PROOF.md": "bf97b6e37fba359fe7205b658b984b1f5579d307", + "research/p104-weighted-capped-allocation-490950/README.md": "db7a838448c5159656e99da51984819c65f11b4d", + "research/p104-weighted-capped-allocation-490950/check_ordinary_floor.py": "80994309fb433928293d79f8b7dabf558b1b9a41", + "research/p104-weighted-capped-allocation-490950/check_stage_seam.py": "cba442cfb92b02d63cee77f038bf69c8144f7702", + "research/p104-weighted-capped-allocation-490950/peer8057.tar.gz": "3a3ded828f6bbf9b6e6a76ba255d480452f4d269", + "research/p104-weighted-capped-allocation-490950/prepare.py": "048698f08d803810b5a6ffd8c2d6e2341100a45e", + "research/p104-weighted-capped-allocation-490950/verify.py": "f460dbac14b3ef18f780105459e30883c95da461" + }, + "head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "pull_request": 8072, + "repository": "CrocSwap/integer-mult-bounds" +} diff --git a/research/p104-ordinary-eta-lift/original/verify.py b/research/p104-ordinary-eta-lift/original/verify.py new file mode 100644 index 0000000000..f460dbac14 --- /dev/null +++ b/research/p104-ordinary-eta-lift/original/verify.py @@ -0,0 +1,83 @@ +"""Restore authenticated public inputs, apply one retune and replay a signed mode.""" +from argparse import ArgumentParser +from hashlib import sha256 +import json +from pathlib import Path +import runpy +from subprocess import run +import sys +import tarfile +from tempfile import TemporaryDirectory + +HERE = Path(__file__).resolve().parent +HEAD = "cbe847a953b971f9c6c5a0a6661e2008acd29086" +SOURCE_SHA = "798c2e6394c258986484a116198cc542a6d2b4c1f289e5816de2cfecf5141c51" + + +def unique_object(pairs): + result = {} + for name, value in pairs: + if name in result: + raise ValueError(f"Repeated source key {name}") + result[name] = value + return result + + +def restore(tree): + source = (HERE / "PEER-SOURCE.json").read_bytes() + if sha256(source).hexdigest() != SOURCE_SHA: + raise ValueError("Peer source manifest differs") + pins = json.loads(source, object_pairs_hook=unique_object) + archive = HERE / "peer8057.tar.gz" + if pins["head"] != HEAD or sha256(archive.read_bytes()).hexdigest() != pins["archive_sha256"]: + raise ValueError("Unexpected source archive") + seen = set() + with tarfile.open(archive) as bundle: + for item in bundle: + path = Path(item.name) + if path.is_absolute() or ".." in path.parts or str(path) != item.name: + raise ValueError(f"Invalid source path {item.name}") + if item.isdir(): + continue + if not item.isfile() or item.name in seen or item.name not in pins["files_sha256"]: + raise ValueError(f"Unexpected or repeated peer file {item.name}") + data = bundle.extractfile(item).read() + if sha256(data).hexdigest() != pins["files_sha256"][item.name]: + raise ValueError(f"Source differs at {item.name}") + destination = tree / path + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_bytes(data) + seen.add(item.name) + if seen != pins["files_sha256"].keys(): + raise ValueError("Source archive is missing a file") + return tree / "research" / "frequency-weighted-native-multiplier" + + +def main(): + modes = ("price", "calendar", "raw", "exterior", "nested", "product", "setup", "regenerate") + parser = ArgumentParser(description=__doc__) + parser.add_argument("mode", choices=modes) + args = parser.parse_args() + with TemporaryDirectory(prefix="weighted-edge-") as temporary: + tree = Path(temporary) + peer = restore(tree) + runpy.run_path(str(HERE / "prepare.py"))["materialize"](peer) + for name in ("check_cutoff.py", "check_stage_seam.py", "check_ordinary_floor.py"): + (peer / name).write_bytes((HERE / name).read_bytes()) + if args.mode == "regenerate": + runtime = tree / "runtime" + run([sys.executable, "-IB", str(peer / "bootstrap.py"), str(runtime)], check=True) + result = run([sys.executable, "-IB", str(peer / "receipt.py"), str(runtime)], check=True, capture_output=True, text=True) + print(json.dumps(json.loads(result.stdout), indent=2)) + return + if args.mode == "setup": + serial = peer.parent / "tiered-native-multiplier" / "check_serial_setup.py" + run([sys.executable, "-IB", str(serial)], check=True) + else: + (peer / "RESULT.json").write_bytes((HERE / "RESULT.json").read_bytes()) + run([sys.executable, "-IB", str(peer / "verify.py"), args.mode], check=True) + print("PASS_CAPPED_ALLOCATION", args.mode, flush=True) + + +if __name__ == "__main__": + main() diff --git a/research/p104-ordinary-eta-lift/setup_scaling.py b/research/p104-ordinary-eta-lift/setup_scaling.py new file mode 100644 index 0000000000..e0a326d182 --- /dev/null +++ b/research/p104-ordinary-eta-lift/setup_scaling.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +"""Reconstruct #8072 and exercise the actual fixed constructors at larger heights. + +The standalone serial arithmetic bound is a separate exact calculation. The +directory census is supporting finite evidence, not a claimed portable trace. +""" + +from dataclasses import replace +from fractions import Fraction as Q +from hashlib import sha256 +import json +from pathlib import Path +import sys +from tempfile import TemporaryDirectory + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from witness import source_runtime + + +def safe_height(h): + return isinstance(h, int) and 1024 <= h < 2**25 + + +def bounded_scalars(profile): + """Bound supplied profile encodings; no rate admissibility is implied.""" + values = (profile.kappa.numerator, profile.kappa.denominator, + profile.eta.numerator, profile.eta.denominator, + profile.positive_stop_denominator) + return (all(isinstance(x, int) and abs(x).bit_length() <= 128 for x in values) + and profile.positive_stop_denominator > 0) + + +def action_envelope(): + # Original 2**68 indexed actions plus a deliberately overgenerous 2**40 + # actions for new parameter installation, carrier bit writes and cleanup. + # This is added, not assumed to fit an unspecified old action margin. + w = 2**38 + n = 2**68 + 2**40 + h = 2*w + 2 + store = 4*w*n + lookup = 8*store*512*128 + local = 2**16*(h+4)*(7*h+9) + 8*2**16*(h+4)**2 + total = (n+1)*(lookup+local+2**120)*2**32 + assert total < 2**228 + return {"max_datum_bits": w, "old_actions": 2**68, + "added_action_ceiling": 2**40, "max_actions": n, + "store_cells_upper": store, "lookup_upper": lookup, + "local_arithmetic_upper": local, "transition_upper": total, + "transition_power_of_two_upper": 228} + + +def run(): + if not __debug__: + raise ValueError("Run this witness with assertions enabled") + assert safe_height(2**25-1) and not safe_height(2**25) + assert 92*(2**25-1) < 2**32 and 1024*(2**25-1)+3 < 2**35 + # Two serial 25-bit-countdown carrier constructions, generously allowing + # 2048 summed fixed-multitape moves/writes per bit for the countdown, up to + # sixteen output streams, head restoration and cleanup. + carrier_steps = 2*2048*(2**25+1) + scalar_steps = 7 * 2**24 + assert carrier_steps + scalar_steps < 2**40 + with TemporaryDirectory(prefix="eta-setup-8072-") as dirname: + tree = Path(dirname) + peer, runtime = source_runtime(tree) + portable = peer / "portable" + sys.path[:0] = [str(runtime), str(portable)] + from upstream import install + install() + import installations + from band_product import prepare_native, production_supplier + from compiler_state import construct + from grades import WeightedRecipe + from record_census import inspect + from tape_directory import dump + from transport import Recipe + + entry, original = installations.ENTRY, installations.TERMINAL + variants = { + "original": original, + "ordinary_eta": replace(original, rank_logs=(8192, 106000, 1681001), eta=Q(1,256)), + "combined_21bit": replace(original, rank_logs=(8192,37107,589716), + complex_log=1860554, kappa=Q(".0038984")), + "combined_25bit": replace(original, rank_logs=(8192,38102,604362), + complex_log=18845936, kappa=Q(".00389846")), + } + original_profiles = installations.PROFILES + saved = Recipe.open, Recipe.width, WeightedRecipe.open, WeightedRecipe.width + + def forbidden(*args, **kwargs): + raise AssertionError("Fixed constructor tried to materialize a native width/calendar") + + # If either lazy runtime path is touched, this fresh construction fails. + Recipe.open = forbidden + Recipe.width = property(forbidden) + WeightedRecipe.open = forbidden + WeightedRecipe.width = property(forbidden) + rows = {} + reference = None + try: + for name, profile in variants.items(): + assert bounded_scalars(entry) and bounded_scalars(profile) + heights = (*entry.rank_logs, entry.complex_log, + *profile.rank_logs, profile.complex_log) + assert len(heights) == 7 and all(map(safe_height, heights)) + installations.PROFILES = {"entry": entry, "terminal": profile} + state = construct() + layers = state[0] + assert [[r.rank_log for r in layer] for layer in layers] == [ + [*entry.rank_logs, entry.complex_log], + [*profile.rank_logs, profile.complex_log], + ] + assert all(r.width_log == 92*r.rank_log for layer in layers for r in layer) + assert tuple(prepare_native(profile)) == layers[1] + assert all(r.targets is state[1].targets and r.paid is state[1].paid + and r.cells is state[1].cells + for layer in layers for r in layer[:-1]) + assert layers[0][-1].cells is layers[1][-1].cells + assert layers[0][-1].targets is layers[1][-1].targets + supplier = production_supplier(profile.complex_log, profile.positive_stop_denominator) + assert supplier.recipe is layers[1][-1] + assert supplier.carrier.bit_length() == profile.complex_log+1 + assert supplier.carrier.bit_count() == 1 + if reference is None: + reference = state[1:5] + else: + assert all(a is b for a,b in zip(reference, state[1:5], strict=True)) + path = tree / (name + ".dag") + with path.open("wb") as out: + count = dump(out, state) + census = inspect(path) + assert census["records"] == count and census["largest_integer_bits"] < 2**38 + assert census["records"] < 2**32 and census["bytes"] < 2**38 + rows[name] = { + "rank_logs": list(profile.rank_logs), "gaussian_height": profile.complex_log, + "parameter_bits": max(heights).bit_length(), + "max_width_log": max(r.width_log for layer in layers for r in layer), + "materialized_gaussian_carrier_bits": supplier.carrier.bit_length(), + "record_count": count, "directory_bytes": census["bytes"], + "largest_directory_integer_bits": census["largest_integer_bits"], + "directory_sha256": sha256(path.read_bytes()).hexdigest(), + "lazy_width_and_open_forbidden": True, + } + finally: + installations.PROFILES = original_profiles + Recipe.open, Recipe.width, WeightedRecipe.open, WeightedRecipe.width = saved + + print(json.dumps({ + "source_head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "setup_height_interval": "1024 <= H < 2^25", + "scalar_encoding_max_bits": 128, + "variants": rows, + "carrier_and_scalar_added_steps_bound": carrier_steps + scalar_steps, + "serial_envelope": action_envelope(), + "portable_caveat": "Construct/dump/census only; no new WASI fuel or trace claim. The copied #8057 portable producer contains stale fixed-profile assertions.", + "scope": "Fixed constructor and input-independent installer bound; physical native openings, precision and caller costs retain their separate gates.", + }, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + run() diff --git a/research/p104-ordinary-eta-lift/verify.py b/research/p104-ordinary-eta-lift/verify.py new file mode 100644 index 0000000000..b8243aa687 --- /dev/null +++ b/research/p104-ordinary-eta-lift/verify.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python3 +"""Replay the two scoped receipts, their failure controls, or optional Git pins.""" + +import argparse +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +HEAD = "75f7e1c44f48c43983016bcf8878c4d9e5e87c62" +PREFIX = "research/p104-weighted-capped-allocation-490950/" +VOLATILE_CENSUS = { + "directory_bytes", "directory_sha256", "largest_directory_integer_bits", "record_count" +} + + +def child(script): + # -B alone does not prevent reading an existing pyc. Every child gets a + # fresh cache prefix, including direct standalone invocations. + with tempfile.TemporaryDirectory(prefix="ordinary-replay-cache-") as cache: + try: + return subprocess.run( + [sys.executable, "-I", "-B", "-X", f"pycache_prefix={cache}", + str(HERE / script)], + cwd=HERE, check=True, capture_output=True, text=True, + ) + except subprocess.CalledProcessError as error: + if error.stdout: + print(error.stdout, end="", file=sys.stderr) + if error.stderr: + print(error.stderr, end="", file=sys.stderr) + raise + + +def read_json(name): + return json.loads((HERE / name).read_bytes()) + + +def ordinary(): + actual = json.loads(child("witness.py").stdout) + if actual != read_json("RESULT.json"): + raise ValueError("Ordinary receipt does not match the replay") + print("PASS_ORDINARY_ETA_RECEIPT: strict three-stage rate; combined target rejected") + + +def setup(): + actual = json.loads(child("setup_scaling.py").stdout) + expected = read_json("SETUP-RESULT.json") + if actual.keys() != expected.keys() or actual["variants"].keys() != expected["variants"].keys(): + raise ValueError("Setup receipt has a different shape") + for name in actual["variants"]: + row = actual["variants"][name] + if not (0 < row["record_count"] < 2**32 + and 0 < row["directory_bytes"] < 2**38 + and 0 < row["largest_directory_integer_bits"] < 2**38 + and len(row["directory_sha256"]) == 64): + raise ValueError(f"Invalid directory census for {name}") + print(f"CENSUS {name}: records={row['record_count']} bytes={row['directory_bytes']} " + f"largest_integer_bits={row['largest_directory_integer_bits']} " + f"sha256={row['directory_sha256']}") + for field in VOLATILE_CENSUS: + row.pop(field) + expected["variants"][name].pop(field) + if actual != expected: + raise ValueError("Setup proof or profile fields do not match the replay") + print("PASS_SETUP_25BIT: scoped serial bound and four finite constructor censuses") + + +def controls(): + done = child("controls.py") + if done.stdout: + print(done.stdout, end="") + if done.stderr: + print(done.stderr, end="", file=sys.stderr) + print("PASS_NEGATIVE_CONTROLS") + + +def source_history(repository): + sys.path.insert(0, str(HERE)) + import witness + + saved = read_json("original/source-pins.json") + if saved["head"] != HEAD or saved["repository"] != "CrocSwap/integer-mult-bounds": + raise ValueError("Unexpected recorded source identity") + # Do not allow inherited Git settings or replacement refs to redirect the + # repository or substitute different objects for the named commit. + excluded = {"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE", "GIT_OBJECT_DIRECTORY", + "GIT_ALTERNATE_OBJECT_DIRECTORIES", "GIT_NAMESPACE", "GIT_CEILING_DIRECTORIES", + "GIT_COMMON_DIR", "GIT_CONFIG_PARAMETERS", "GIT_CONFIG_COUNT"} + env = {k: v for k, v in os.environ.items() + if k not in excluded and not k.startswith(("GIT_CONFIG_KEY_", "GIT_CONFIG_VALUE_"))} + env["GIT_NO_REPLACE_OBJECTS"] = "1" + command = ["git", "--no-replace-objects", "-C", str(repository), "cat-file"] + subprocess.run(command + ["-e", HEAD + "^{commit}"], env=env, check=True, + stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) + for name, expected_blob in witness.HEAD_BLOBS.items(): + data = (HERE / "original" / name).read_bytes() + if hashlib.sha256(data).hexdigest() != witness.PINS[name]: + raise ValueError(f"Retained source SHA-256 differs: {name}") + if saved["files"][PREFIX + name] != expected_blob: + raise ValueError(f"Recorded Git blob differs: {name}") + source = subprocess.run(command + ["blob", HEAD + ":" + PREFIX + name], + env=env, check=True, capture_output=True).stdout + if source != data: + raise ValueError(f"Commit source bytes differ: {name}") + print(f"PASS_SOURCE_HISTORY: {len(witness.HEAD_BLOBS)} retained files at {HEAD}") + + +def main(): + if not __debug__: + raise ValueError("Run with assertions enabled") + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("mode", choices=("ordinary", "setup", "controls", "source-history")) + parser.add_argument("repository", nargs="?", type=Path) + args = parser.parse_args() + if args.mode == "source-history": + if args.repository is None: + parser.error("source-history requires a local repository path") + source_history(args.repository) + else: + if args.repository is not None: + parser.error("repository is valid only with source-history") + {"ordinary": ordinary, "setup": setup, "controls": controls}[args.mode]() + + +if __name__ == "__main__": + main() diff --git a/research/p104-ordinary-eta-lift/witness.py b/research/p104-ordinary-eta-lift/witness.py new file mode 100644 index 0000000000..40afc9329e --- /dev/null +++ b/research/p104-ordinary-eta-lift/witness.py @@ -0,0 +1,307 @@ +#!/usr/bin/env python3 +"""Replay a source-pinned, ordinary-only eta-lift candidate. + +The Gaussian supplier is deliberately left at #8072 and is a negative control. +The script never claims a combined .0039 multiplier result. +""" + +from dataclasses import replace +from fractions import Fraction as Q +from hashlib import sha1, sha256 +import importlib.util +import json +from pathlib import Path +import runpy +import subprocess +import sys +from tempfile import TemporaryDirectory + + +HERE = Path(__file__).resolve().parent +ORIGINAL = HERE / "original" +PINS = { + "verify.py": "10362de3ceaa651cde5b71c6599fd4683d9f1f4d76cc252178e915b43a098fee", + "prepare.py": "76f9d4c6bfd880ee49f6ba5bde9138cf0856d669edb4d525e48ca71a9094eec3", + "PEER-SOURCE.json": "798c2e6394c258986484a116198cc542a6d2b4c1f289e5816de2cfecf5141c51", + "peer8057.tar.gz": "0e0d559bdb15e7b647f88a2b5e27fcdc9e28e81d8f4145459876ba6da2e9314c", + "check_stage_seam.py": "128a93719bbfc2d69c442283b8cbaecd9a3ca4c2a2399a7964e4c882bf0bace1", + "check_ordinary_floor.py": "65e3c3ca4cec73a9462973e651a66127ab894d0bc141c072e26416aedb48b543", + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "NOTICE.md": "4bb4aa63290a19282826ff57529293f8bfd12e3a2afe28bc6d48205c0cc976fc", + "PROOF.md": "b667b8470f94015181ef577d6576859bebd76e7618ffb32c1197233f1e8212da", + "README.md": "1347061750a0edb42a850206419afb39633c4b8c6a63f635362b9f7e4b93adb6", + "source-pins.json": "09eb1c710a6382226b43dace5c73761ec4b84681e87e061e7aab813dfd1276cd", +} +HEAD_BLOBS = { + "verify.py": "f460dbac14b3ef18f780105459e30883c95da461", + "prepare.py": "048698f08d803810b5a6ffd8c2d6e2341100a45e", + "PEER-SOURCE.json": "6f84b3aef4b8c5026e348d88700bc9401514ccab", + "peer8057.tar.gz": "3a3ded828f6bbf9b6e6a76ba255d480452f4d269", + "check_stage_seam.py": "cba442cfb92b02d63cee77f038bf69c8144f7702", + "check_ordinary_floor.py": "80994309fb433928293d79f8b7dabf558b1b9a41", + "LICENSE": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "NOTICE.md": "cac7f9814f2e5fa1e5fb307e2de89f739348daef", + "PROOF.md": "bf97b6e37fba359fe7205b658b984b1f5579d307", + "README.md": "db7a838448c5159656e99da51984819c65f11b4d", +} +RUNTIME_PINS = { + "installations.py": "c1bba07dfcf95f7a494e59d6e4de85b4d4537c144f0bcf6f7a1a02ecbe832dea", + "ordinary_carrier.py": "aa1a64d48daf22f3918922481899a460dfe8e70268388e41f133279bc78f141d", + "raw_binary_stage.py": "e24bd735598d278dbd46cada584a63da01796d77ad557a45b80a4dfc7bbbd0b0", + "strong-bit.json.gz": "9e7392c52bcf29c0cc58c54c619f95c28f476394c33e8e0a5aa30c9557d31362", + "transport.py": "9eb8f0d77a4c53fc4fddffdfe198cab930b6d1f49e2b6d43c970397051bb7818", + "grades.py": "6124744b40f806c80b6f10010a72e755bc11d64a8cc9a04f5e8316799eb6f05d", + "retimed_supplier.py": "2a87c2781ca93fa854aee098dcb7c50a65f2a46267ba926e3997b442e5a25f2c", +} +ETA = Q(1, 256) +RHO = Q(1, 250) +TARGET = Q("0.0039") +GAP = Q(1, 10**18) +Q_ORDINARY = TARGET + 5 * GAP +H = (8192, 106000, 1681001) +GAUSSIAN_H = 490950 +DEBIT = Q(11239, 8192) +POSITIVE_DEBIT = Q(64939, 524288) +GRID = 10**21 + + +def ceil(q): + return -(-q.numerator // q.denominator) + + +def source_runtime(tree): + for name, expected in PINS.items(): + assert sha256((ORIGINAL / name).read_bytes()).hexdigest() == expected, name + pins = json.loads((ORIGINAL / "source-pins.json").read_bytes()) + assert pins["repository"] == "CrocSwap/integer-mult-bounds" and pins["pull_request"] == 8072 + assert pins["head"] == "75f7e1c44f48c43983016bcf8878c4d9e5e87c62" + assert pins["base"] == "e54523517d0f03e58352e647c403a5af3e525a57" + listed = pins["files"] + prefix = "research/p104-weighted-capped-allocation-490950/" + for name, expected in HEAD_BLOBS.items(): + data = (ORIGINAL / name).read_bytes() + blob = sha1(b"blob " + str(len(data)).encode() + b"\0" + data).hexdigest() + assert blob == expected == listed[prefix + name], name + peer = runpy.run_path(str(ORIGINAL / "verify.py"))["restore"](tree) + runpy.run_path(str(ORIGINAL / "prepare.py"))["materialize"](peer) + runtime = tree / "runtime" + subprocess.run([sys.executable, "-IB", str(peer / "bootstrap.py"), str(runtime)], check=True) + for name, expected in RUNTIME_PINS.items(): + assert sha256((runtime / name).read_bytes()).hexdigest() == expected, name + return peer, runtime + + +class DyadicWidth(int): + """The replacement is exact for the chosen power-of-two test widths.""" + + def __pow__(self, exponent): + assert self.bit_count() == 1 and exponent >= 0 + return 1 << ((self.bit_length() - 1) * exponent) + + +def dispatch_fixture(profile, cuts, stage, log_width): + """Check real dispatch/layout code with exact dyadic root and a captured backend.""" + import ordinary_carrier as carrier + + assert stage in (2, 3) and log_width % 32000 == 0 + assert log_width >= cuts[stage - 1] + number = DyadicWidth(1 << log_width) + predecessor = 1 << cuts[stage - 2] + width = max(predecessor + 1, 1 << (log_width // 250)) + component = 1 << (log_width // 256) + count = -(-width // component) + short, longer = divmod(width, count) + expected_layout = (longer, short + 1, count - longer, short) + expected_rank = 1 << profile.rank_logs[stage - 1] + expected_direct = -(-number // width) <= 1 << (8 * profile.rank_logs[stage - 1]) + calls = [] + + def exact_root(value, degree): + assert value.bit_count() == 1 + exponent, remainder = divmod(value.bit_length() - 1, degree) + assert not remainder + return 1 << exponent + + def capture_receiver(dimension, layout, previous, *, direct, profile): + assert dimension == expected_rank and layout == expected_layout + assert direct == expected_direct and previous.func is carrier.ternary + assert previous.keywords == {"maximum": stage - 1, "profile": profile} + return stage + + def capture_body(source, target, digits, prefix, gap, suffix, backend): + assert digits == number and (prefix, gap, suffix) == (1, 3, 5) + assert backend == stage + calls.append(1) + + saved = carrier.ceil_root, carrier.Receiver, carrier.root_body + try: + carrier.ceil_root, carrier.Receiver, carrier.root_body = ( + exact_root, capture_receiver, capture_body + ) + carrier.ternary(None, None, number, 1, 3, 5, maximum=stage, profile=profile) + finally: + carrier.ceil_root, carrier.Receiver, carrier.root_body = saved + assert calls == [1] + return {"stage": stage, "width_log": log_width, + "component_log": log_width // 256, "direct": expected_direct} + + +def run(): + if not __debug__: + raise ValueError("Run this witness with assertions enabled") + with TemporaryDirectory(prefix="eta-lift-8072-") as tmp: + peer, runtime = source_runtime(Path(tmp)) + sys.path.insert(0, str(runtime)) + sys.path.insert(0, str(peer.parent / "tiered-native-multiplier" / "source")) + sys.path.insert(0, str(peer.parent / "tiered-native-multiplier")) + sys.argv = [str(HERE / "witness.py"), str(runtime)] + spec = importlib.util.spec_from_file_location("original_receipt", peer / "receipt.py") + receipt = importlib.util.module_from_spec(spec) + spec.loader.exec_module(receipt) + from activation import resource_receipt + from installations import BINARY_C, GAUSSIAN_C, ENTRY, TERMINAL + from module_atoms import ceil_root + from ordinary_carrier import stage_for_width_log + from ordinary_clock import first_stage_bound + from outer_budget import margins, qualify + from staged_carriers import entrance_logs + from band_product import prepare_native + from raw_binary_stage import binary_word + from strict_moment import UNIT + from unpowered_price import intervals + + # These inequalities hold throughout the entire open interval stated + # in the proof; the receipt uses ETA=1/256 as the concrete value. + assert Q(1, 258) < Q(97, 25000) < TARGET < Q_ORDINARY < ETA < RHO + assert 2 * Q_ORDINARY > RHO and Q_ORDINARY + RHO < 1 + assert Q(8192, 258) - 1 > 30 + assert 2660000 * 32 < 2**30 + assert first_stage_bound(ETA) == first_stage_bound(TERMINAL.eta) + + profile = replace(TERMINAL, rank_logs=H, complex_log=GAUSSIAN_H, + eta=ETA, kappa=TARGET) + previous, rates = Q(0), [] + for i, height in enumerate(H): + unclamped = (249 * (BINARY_C - DEBIT / height) + previous) / 250 + upper = min(ETA, unclamped) + selected = (Q_ORDINARY if i == len(H) - 1 + else Q((upper * GRID).__floor__() - 1, GRID)) + assert previous < selected < upper + if i < len(H) - 1: + assert unclamped < Q_ORDINARY # no clamp for any eta > q + rates.append({"height": height, "upper": str(upper), + "booked": str(selected), "slack": str(upper-selected)}) + previous = selected + last_slack = Q(rates[-1]["slack"]) + assert last_slack == Q(18375833487309615126701, + 1804961079885824000000000000000000000) + b2 = Q(rates[1]["booked"]) + prev_height_upper = (249 * (BINARY_C - DEBIT / (H[-1] - 1)) + b2) / 250 + assert prev_height_upper < Q_ORDINARY + old_height_upper = (249 * (BINARY_C - DEBIT / 524288) + b2) / 250 + assert old_height_upper < Q_ORDINARY + assert min(TERMINAL.eta, (249 * (BINARY_C-DEBIT/H[-1])+b2)/250) < Q_ORDINARY + threshold = DEBIT / (BINARY_C - (250 * Q_ORDINARY - b2) / 249) + assert threshold.__floor__() + 1 == H[-1] + assert min(Q_ORDINARY, (249 * (BINARY_C-DEBIT/H[-1])+b2)/250) == Q_ORDINARY + assert not (RHO < RHO) # strict endpoint in the source admission gate + + cuts = tuple(entrance_logs(H)) + assert cuts == (8290, 114354, 1795419) + for i, cut in enumerate(cuts, 1): + assert [stage_for_width_log(cut+d, len(H), H) for d in (-1, 0, 1)] == [i-1, i, i] + assert stage_for_width_log(cut, i-1, H) == i-1 + qcuts = [] + for height in H: + bound = ceil(Q(2*height+64) / (1-ETA)) + uniform = ceil(Q(250*(2*height+64), 249)) + assert (1-ETA)*bound >= 2*height+64 and bound <= uniform < 3*height < 8*height + qcuts.append({"height": height, "eta_cut": bound, "uniform_cut": uniform}) + stock = resource_receipt(profile) + assert stock["binary_cuts"] == list(cuts) + assert stock["public_exponent_A"] == 2286624 + assert stock["retimed_first_stripe_margin"] == 1141254 + assert stock["retimed_all_size_margin_floor"] == 1105612 + for n in ((1 << 256) + 1, (1 << 257) - 1, (1 << 512) + 123): + root = ceil_root(n, 256) + assert (root-1)**256 < n <= root**256 + + seams = [dispatch_fixture(profile, cuts, 2, 128000), + dispatch_fixture(profile, cuts, 3, 1824000), + dispatch_fixture(profile, cuts, 2, 1120000), + dispatch_fixture(profile, cuts, 3, 13568000)] + assert [x["direct"] for x in seams] == [True, True, False, False] + + # These finite owner-return fixtures use the source's physical tape + # implementation. They do not materialize the astronomical native field. + original_seam = runpy.run_path(str(ORIGINAL / "check_stage_seam.py")) + tapes = [original_seam["verify_tape"](1, [0, 1], [2, 1]), + original_seam["verify_tape"](2, [1, 7], [3, 1])] + recipes = prepare_native(profile) + word = binary_word() + assert tuple(x.rank_log for x in recipes) == (*H, GAUSSIAN_H) + assert all(r.level_floor == 18960 and r.trial == BINARY_C for r in recipes[:-1]) + assert all(r.targets is word.targets and r.paid is word.paid and r.cells is word.cells + for r in recipes[:-1]) + assert (len(word.targets), len(word.paid), len(word.cells)) == (18906, 104652, 24) + floor_test = runpy.run_path(str(ORIGINAL / "check_ordinary_floor.py"))["all_size_stock"]( + word, BINARY_C, intervals, UNIT) + + gaussian = GAUSSIAN_C - POSITIVE_DEBIT / GAUSSIAN_H + strict, functional, positive_margin = margins(TARGET, GAP, Q_ORDINARY, gaussian) + assert len(strict) == 54 and len(functional) == 4 and min(strict + functional) > 0 + assert GAUSSIAN_C < Q_ORDINARY and positive_margin < 0 + try: + qualify(TARGET, GAP, Q_ORDINARY, gaussian) + except ArithmeticError: + rejected = True + else: + raise AssertionError("The unchanged Gaussian incorrectly funded the target") + + # The actual complete-price routine is run at the old, Gaussian-funded + # kappa. Independently, the same outer gate accepts the stronger q there. + actual = replace(profile, kappa=TERMINAL.kappa) + early, late = receipt.bank(ENTRY), receipt.bank(actual) + strengthened_signed = qualify(TERMINAL.kappa, GAP, Q_ORDINARY, gaussian) + premium = ceil((TERMINAL.kappa - ENTRY.kappa) * stock["public_exponent_A"]) + complete = 1 + max(early["log2_C"] + premium, late["log2_C"]) + assert (premium, late["log2_B"], late["log2_C"], complete) == ( + 1025, 574461888, 682472490, 682472491) + assert 92 * max(H) < 2**38 and stock["absolute_log2_private_control_envelope"] < 2**38 + assert max(H).bit_length() == 21 + setup = receipt.native_clock() + assert setup["all_setup"] < 2**228 + + result = { + "source_head": "75f7e1c44f48c43983016bcf8878c4d9e5e87c62", + "source_head_note": "Local bytes match captured #8072 changed-file blob pins; this check alone does not authenticate the Git history of the stated head.", + "status": "ORDINARY_COMPONENT_PASS_COMBINED_TARGET_REJECTED", + "eta": str(ETA), "admission_interval": [str(Q_ORDINARY), str(RHO)], + "admission_interval_endpoints": "open", "rho": str(RHO), + "target_kappa": str(TARGET), "ordinary_target": str(Q_ORDINARY), + "ordinary_raw": str(BINARY_C), "ordinary_debit": str(DEBIT), + "stage_rates": rates, "height_minus_one_fails": True, + "height_minus_one_slack": str(prev_height_upper-Q_ORDINARY), + "original_height_cap_slack": str(old_height_upper-Q_ORDINARY), + "original_eta_rejects_target": True, + "gaussian_raw": str(GAUSSIAN_C), "gaussian_priced": str(gaussian), + "target_gaussian_margin": str(positive_margin), + "target_signed_strict_passes": len(strict), + "target_signed_functional_passes": len(functional), + "target_combined_rejected": rejected, + "cuts": list(cuts), "quotient_entry_guards": qcuts, "stock": stock, + "stage_dispatch_fixtures": seams, "finite_signed_tape_fixtures": tapes, + "ordinary_floor_all_size_stock": floor_test, + "old_kappa": str(TERMINAL.kappa), "old_kappa_signed_with_stronger_q": strengthened_signed, + "entry_conversion_bits": premium, "terminal_log2_B": late["log2_B"], + "terminal_log2_C": late["log2_C"], "combined_log2_C_at_old_kappa": complete, + "old_kappa_price_caveat": "Directed arithmetic and inherited clock premises; fresh full installation and physical replay not claimed.", + "fixed_setup_caveat": "This receipt checks the original serial arithmetic bound and datum sizes only; see SETUP-PROOF.md for a separate conditional action extension and finite constructor census.", + "max_height": max(H), "max_height_bit_length": max(H).bit_length(), + "original_fixed_setup_bound": setup["setup_exponent"], + } + print(json.dumps(result, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + run()