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-seven-stage-retimed/LICENSE b/research/p104-seven-stage-retimed/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-seven-stage-retimed/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-seven-stage-retimed/NOTICE.md b/research/p104-seven-stage-retimed/NOTICE.md new file mode 100644 index 0000000000..89e9ffb6bc --- /dev/null +++ b/research/p104-seven-stage-retimed/NOTICE.md @@ -0,0 +1,18 @@ +# Source and attribution + +This package preserves the Apache-2.0 license and source notices of the +retimed native multiplier by Ali Romman at PR #8042, head +`3d33cb0c8a523b66d91e8de8250b85d0a436eb35`. Its exact `NOTICE.md` and +all other small source files are retained in `source-8042.tar.gz`; their +individually checked Git blob identities appear in `SOURCE-8042.json`. +The large predecessor archive is the identical #8030 blob +`e00a6bfe8328b4c982bf0689c4d55c8207515514` and appears only once here. + +The inherited signed-margin overlay is from Clear1nsight's #8035, with +the tilted tariff from #8033. Ali Romman's #8027 supplies the paired +native words and #8030 supplies the physical caller. Their cited source +notices retain earlier contributor credits and state the five inherited +premises. The new seven-stage invoice and proposed physical-accounting +extension were prepared for Clear1nsight with substantial OpenAI Codex +assistance. Independent automated checks do not imply independent human +or maintainer acceptance. diff --git a/research/p104-seven-stage-retimed/PROOF.md b/research/p104-seven-stage-retimed/PROOF.md new file mode 100644 index 0000000000..5c809eccec --- /dev/null +++ b/research/p104-seven-stage-retimed/PROOF.md @@ -0,0 +1,251 @@ +# Conditional seven-stage extension of the retimed P104 construction + +This is a conditional candidate, not a certified new multiplier bound or an +independent validation of the five inherited premises. An independent reader +reproduced its rate arithmetic and found no counterexample to the role count, +but did not discharge the exhaustive all-size binding from the seventh +dispatcher to the source's physical scratch inventory. The resulting clock +and stock conclusions additionally assume that specific bridge. The base is the exact +[PR #8042 retimed supplier at head `3d33cb0c8a523b66d91e8de8250b85d0a436eb35`](https://github.com/CrocSwap/integer-mult-bounds/pull/8042), +with a different fixed profile and the separately priced seventh ordinary +stage below. Its original result only certifies the listed profiles and its +`activation.py` explicitly caps their count at six. + +## Scope of the raw comparison + +The binary [transfer](https://github.com/aliromman/integer-mult-bounds/blob/3d33cb0c8a523b66d91e8de8250b85d0a436eb35/research/retimed-native-multiplier/TRANSFER.md) retains all 18,906 productive and +104,904 paid tags of the same 36-call raw word and uses no binary rank-one +split. Its rational transport trial is + + c = 4484997569314581 / 2^60 + = 0.00389011528659446038230784736811074253637… . + +The original independent directed receipt was reproduced locally; it checks +the 24-cell binary coupling, the 31-cell numerical coupling, and the entire +five-profile `RESULT.json`. Its directed binary surplus is about +`1.0126850924756136e-18`. This trial lies below the previously audited +fixed-raw-word crossing `0.003890115286594461129996942…`; the retiming does +not itself establish a larger crossing or evade that fixed-word comparison. +The following stage-count change is a separate proposed construction. Nothing here +rules out other words, tariffs, couplings, or architectures. + +At six stages and the unchanged `249/250` recurrence, even before any debit +or strictness the retimed trial has ideal limit +`0.003890115286594444448395633477…`, below the six-stage 445 tick. The +seven-stage ideal limit is `0.003890115286594460318572198512…`, so there is +room for a real invoice above the prior six-stage limiting ceiling. + +## Exact profile and price + +Select `H_i = 10^12 * 16^(i-1)` for `i=1,…,7`, `H_M=36000`, `eta=39/10000`, +`g=10^-20`, and `kappa=0.003890115286594460`. Keep #8042's binary and +numerical coupling, raw ownership, calendar, singleton charges and numerical +debits. The seventh ordinary price is `kappa+5g`. + +For each stage the source prices +`covered_i = c - 7/(2H_i)` and checks +`b_i < min(eta, (249 covered_i+b_(i-1))/250)`. The first six rates use +the #8042 strict selector `(floor(10^21 limit)-1)/10^21`. The exact +first six booked rates are + + 0.003874554821962082539 + 0.003890053044518055869 + 0.003890115037612537575 + 0.003890115285597681615 + 0.003890115286590420074 + 0.003890115286594440895 + +The seventh limit is `0.00389011528659446009657682429162658…` and its +booked price is `0.00389011528659446005`. The signed gate passes all +54 strict and four functional inequalities: its smallest strict margin is +`10^-21`, its ordinary margin is `10^-20`, and its numerical margin is +about `8.87403695156444e-8`. The checks reject `g=0`, the former `g=10^-17`, +and equality at either paid border. Reproduction and exact values are in +[check_seven.py](check_seven.py) and [RESULT.json](RESULT.json). + +## Seventh-stage tape and storage accounting + +The [actual ordinary dispatcher](https://github.com/aliromman/integer-mult-bounds/blob/3d33cb0c8a523b66d91e8de8250b85d0a436eb35/research/retimed-native-multiplier/machine.patch) derives its +maximum stage from `len(profile.rank_logs)` and passes that bound and tuple +to `admitted_stage`. The similarly named legacy six-stage default is not +called by that dispatcher. Give the seventh fixed stage its own set of +the same named spool roles used by the other six, with distinct delimiters; +seven sets are still a fixed finite collection of tapes, and every movement +is counted separately. The staged recursion only enters a lower numbered +stage. Every stage uses the same unpowered physical source and the same +paid `19/2` singleton factor. Thus the local chronological bounds, returned +owners, high-coordinate volumes, `N^92` true input fields and +`2^66 N^83=3000`. The separate numerical +source remains at `H_M=36000`. + +The ordinary clock source gives the stage-local recurrence + + B_i <= (133/10) J_i^14 (1+B_(i-1)), J_i = 2^(1024 H_i). + +The paid-tree and finite-stage induction lemmas in +[`lean/OrdinaryClock.lean`](https://github.com/aliromman/integer-mult-bounds/blob/3d33cb0c8a523b66d91e8de8250b85d0a436eb35/research/retimed-native-multiplier/lean/OrdinaryClock.lean) quantify over arbitrary natural stage counts. +One can also iterate the displayed inequality directly: an upper envelope +is `2^100 * (2*133/10)^7 * product(J_i^14)`. The actual rectangle factor +and this envelope fit the source's deliberately looser + + B_ord <= 2^40 * (133/10)^7 * product(J_i^16), + +since `18 * 2^67 < product(J_i^2)`. Here +`sum(H_i)=17895697000000000000` and +`ceil(log2((133/10)^7))=27`, giving + + ceil(log2(B_ord)) <= 293203099648000000000067. + +For the historical storage, each transition to a strictly earlier stage +can increase an ancestor input by at most two; the seventh stage adds one +such factor. The inherited `spineCap`, `stackHigh`, and `stripeTail` lemmas +in [`lean/OuterTickets.lean`](https://github.com/aliromman/integer-mult-bounds/blob/3d33cb0c8a523b66d91e8de8250b85d0a436eb35/research/retimed-native-multiplier/lean/OuterTickets.lean) quantify over the stage count. Substituting +`m=7` in #8042's explicit account gives + + D(s) = 2*2048 + 4096 + 4*(7+1) + 128 + 4*bitlength(s+128) + = 8352 + 4*bitlength(s+128). + +The source's full-row and true high-packet factors are unchanged. For a +conservative role count, assign every ordinary scratch interval a stage +index, one of the original role names, and its saved frame index. Charge +each of the seven stages the full source allowance `2^32(s+128)^2` rather +than sharing that allowance. The union is smaller than +`2^35(s+128)^2`. The native depth per binary stage is at most +`3+ceil(s/H_i)`, and the numerical spine at most `2+ceil(s/H_M)`, as in +`ACTIVATION-SPACE.md`; for the stated heights their sum is below +`32(s+128)`. Even with the three extra interval-count bits, the illustrative +historical head sum is at most +`2048+32*64+(7+12)+7+5+35+3 bitlength(s+128)`, over 4,190 bits below +`D(s)` before its additional bit-length term. + +The earlier #8030 powered-forest convenience assertion `G<2^50` was +checked only for its listed ranks and is **not** used here. The present +last height exceeds that scope. The replacement is #8042's own unpowered +retimed calendar: at most `2N^6` births per time, each returning before +`N^77`, with fewer than `2^64` slots per raw context. Its direct bound +`2^66 N^83=3000`. We reuse +the predecessor's independent outer role names and stage-depth count, not +its powered forest-height or powered stock bound. Mapping every nested +source call and scratch lifetime exhaustively to that inventory remains +an open proof obligation for the seventh stage, beyond the inherited premises. + +The interval accounting is tied to actual source roles as follows. The +ordinary rectangle holds its opened and completed spools while `stage_body` +enters a `Receiver`; the predecessor callback has strictly smaller stage +number. A compiled receiver holds the `backing`, `staged`, and `result` +arena frames; a paid leaf adds `issued-leaf`. A direct line retains its +whole owner. A quotient line adds the `chart-line` split and completed +frames, a serial `chart-packet` argument and reply, and the arena's pending +and answer stacks. The stage-local two-frame `pipe` roles also include +`matcher`, `triangular-body`, `exposed-leaf`, and `weighted`; each keeps +its current and other spool until that pipe returns, erasing each previous +source before reuse. A `unit_scale` call retains `current`, `other`, and +`temporary` work tapes; an odd substep can additionally hold seven tapes +(three input, three output, and one scratch), and a carry substep one. +Its nested previous-stage exchange keeps the parent three until return. +The cold and scale passes hold their declared bucket/work-tape scopes and +erase them on exit; each uses no more than the source's 22-spool site cap. +The quotient packet is `high*body`, so the full high coordinates +stay charged. Pending packets and completed answers stay on their parent +stacks until collected; they are not silently reused. Owner route and clone +use one temporary tape, owner swap and XOR two, and every `work_tapes` scope +erases and releases those tapes. `OwnerBanks` allocates a vacant slot first, +and retirement overwrites the slot before reuse. The true raw cohort is +stored on the same backing arena head, and all simultaneous open raw units, +including their zero owners and returns, contribute to the single +`2^66 N^83` slot bound; they are not each granted a full input-volume +spool. The positive receiver holds its own incoming snapshot, outgoing +scratch and child arena. `Arena.child` suspends the parent, places the child +after the parent's historical high, requires zero live child owners at +return and truncates the child frame. + +For the abstract `Spine`, `nested` means an actual native argument, not a +scratch or return page: a direct child has the full owner volume `V/B`, a +quotient child has `V/(BQ)` with its real high coordinates, and a positive +child has its actual row volume. Each is bounded by its entering parent. +An `entry` is the strictly earlier ordinary-stage call; its new row pad is +smaller than its entering extent, so its true argument is at most twice +the parent. Root rectangle padding is charged separately. Working spools, +saved replies and simultaneous highs enter the local allowance and the +historical head sum instead of being mistaken for recursive arguments. +This is the proposed source mapping, not an exhaustive verification of every +all-size execution path. It still relies on the physical supplier and lifetime +premises and on resolving the seventh-stage inventory bridge above. + +The ordinary entrance cuts are + + 1004016064322, 17004016064386, 273004016064450, + 4369004016064514, 69905004016064578, 1118481004016064642, + 17895697004016064706. + +At the connected public exponent `A=17895697004016101255`, put `s=A+1`. +The exact first stripe margin is `8947848502008042018`; the monotone +all-size margin floor is `7829367439257035944`, both greater than 1,024. +The actual exponent for the private control envelope becomes +`1024*max(H_i,H_M)+ceil(log2(9)) = 17179869184000000000004`. +The calculation in the local receipt verifies all #8042 size, control, +precision and stock inequalities after its local count guard is widened +from six to seven. The stated storage conclusion remains conditional on +the source's physical high-water and allocation proof, including all +inherited scientific premises. + +The fixed installer makes eight bounded recipe objects, seven binary and +one numerical, without opening any scale calendar. The binary coupling and +chart programs are shared; an extra recipe does not add a new raw word. +The largest entrance logarithm fits 64 bits, `92*max(H_i)` fits 71 bits, +the stop denominator has 67 bits, and the numerical rank has 36,001 bits. +These are far below the fixed install proof's `2^38`-bit item allowance. +Its `<2^68` indexed-action and `2^513` sequential-transition envelopes +have room for this one added bounded descriptor, provided the fixed +installer is run on this profile and its source pins are maintained. + +## Outer controller at the changed stop gap + +The written outer-clock proof takes `(128/g)^16 < 2^1024` only for +`g=10^-17` or `10^-14`; it must not be reused literally at `10^-20`. +The exact integer check instead gives + + ceil(log2((128/g)^16)) = 1176, + 1434 - 1024 + 1176 = 1586 < 1600. + +The same polynomial absorption argument therefore fits the displayed +1600-bit allowance in #8042's final clock. With the new ordinary invoice, +assuming the seventh-stage inventory bridge as well, this yields the +conditional integer clock exponent + + E <= 293203099648000007921669, + time(n) <= 2^513 + 2^E n (1+log2 n)^(1-kappa). + +The `g` value is passed to the actual positive supplier as stop denominator +`10^20`. In the actual `power_le` routine this 67-bit exponent requires +at most 67 squarings and 67 selected multiplications; both factors are capped +at the current root-width ceiling after each squaring. Temporary products +therefore have at most twice the bit length of that ceiling, and the added +loop is covered by the numerical proof's existing polynomial control bound. +The controller gate and stop branch still require the original +analytic, all-column physical and numerical assumptions; fixed-size tests +cannot execute the enormous production fields. In particular `H_7` exceeds +this CPython host's `sys.maxsize`; computing `1 << H_7` was observed to +raise `MemoryError`, and would require over two exabytes even to store the +result's bits. The proposed +asymptotic statement concerns the inherited ideal finite-tape construction, +not a practical CPython execution or measured crossover. The smallest input whose +full positive-to-final-ordinary crossing is guaranteed is +`2^(ceil(2^A/6)-1)+1` bits, with the above `A`. + +## Validation boundary + +the pinned `check_complete.py` exactly reproduced the #8042 source's recorded +couplings and five profile receipts. [check_seven.py](check_seven.py) applies its +arithmetic to the new profile; its local `activation.py` differs only in +the explicit 6-to-7 stage-count guard. [check_runtime.py](check_runtime.py) +checks actual threshold selection, installed recipe objects, stop-policy +propagation, and a feasible signed product. With the new profile object, +the physical reduced-rank product returned `-345550037539`, the first five +coefficients `[11811,10996,4152,868,77]`, 157,248 H calls and 138 shuttles; +the input restoration and output guards passed. The registered replay exposes these separate controls. This is a conditional written extension of the source +estimates, not a kernel proof of the full physical scheduler or an actual +production-scale run. Independent replay of this new profile, especially the +seven-stage historical tape binding, remains needed before presenting it as +a certified multiplier result. diff --git a/research/p104-seven-stage-retimed/README.md b/research/p104-seven-stage-retimed/README.md new file mode 100644 index 0000000000..9de320f41c --- /dev/null +++ b/research/p104-seven-stage-retimed/README.md @@ -0,0 +1,29 @@ +# Seven-stage retimed P104 price candidate + +The retimed native scheduler from [PR #8042](https://github.com/CrocSwap/integer-mult-bounds/pull/8042) admits an exact **candidate invoice at κ = 0.003890115286594460** when extended to seven ordinary stages. The candidate is above the previously studied six-stage fixed-word ceiling. Its source price, complete stage recurrence, signed margins and activation arithmetic are executable. **It is not yet a certified new multiplier bound:** an independent reader found no counterexample to the written role accounting but did not discharge the exhaustive all-size binding from the seventh dispatcher to the physical scratch inventory. The proposed clock and stock conclusions depend on that additional bridge as well as the five inherited scientific premises. + +At its fixed binary trial `c=4484997569314581/2^60`, #8042's retiming retains the same 36-call binary productive and paid labels. With the same `249/250` recurrence, its ideal six-stage limit is approximately `0.0038901152865944444484`. Its seven-stage ideal limit is approximately `0.0038901152865944603186`. The fixed trial and recurrence cannot reach `0.00389046`, but this does not exclude a changed raw word, coupling, stage rule, or other architecture. + +The candidate uses binary rank logarithms `10^12*16^i` for `i=0,…,6`, numerical logarithm `36000`, `eta=39/10000` and stop gap `g=10^-20`. It checks all seven strict stage prices, the full `7/(2H_i)` binary debit, the numerical debit `1/(5H_M)`, and all 54 strict and four functional signed inequalities. Its final stage limit is approximately `0.0038901152865944600965768`; its ordinary booking `κ+5g` is lower by approximately `4.65768e-20`. The reproducible [exact receipt](RESULT.json) includes the complete price history, signed margins, connected entrance and conditional clock bounds. The [proof note](PROOF.md) identifies the new bridge and its proposed argument. + +## Sources and reproduction + +The exact retimed predecessor is Ali Romman's [#8042 head `3d33cb0c8a523b66d91e8de8250b85d0a436eb35`](https://github.com/aliromman/integer-mult-bounds/tree/3d33cb0c8a523b66d91e8de8250b85d0a436eb35/research/retimed-native-multiplier). Its 48 small source files are stored once in [source-8042.tar.gz](source-8042.tar.gz), with per-file Git blob IDs and SHA-256 values in [SOURCE-8042.json](SOURCE-8042.json). The exact, byte-identical #8030 predecessor archive is stored separately once as [predecessor-8030.tar.gz](predecessor-8030.tar.gz), Git blob `e00a6bfe8328b4c982bf0689c4d55c8207515514` and SHA-256 `769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c`. The verifier checks every source byte and applies the original signed-margin overlay and original #8042 patch before the additional local profile and guard edit. These byte checks do not prove Git ancestry or independently validate the predecessor's mathematics. + +With CPython 3.12 and Git on PATH, from the repository root run: + +```sh +python3.12 -IB scripts/research_package.py --package research/p104-seven-stage-retimed +``` + +The six registered cases separately check original #8042 prices and the seven-stage invoice; real recipe initialization, seven threshold choices, and stop-policy propagation; inherited finite chronological loans; inherited physical word and precision controls; inherited fenced slab controls; and a feasible signed product bound to the actual new profile. The signed control uses a reduced rank and local positive path. It does not execute production-sized cohorts. On the preparation host the final rank logarithm exceeds `sys.maxsize`, and attempting its actual `1 << H_7` allocation raised `MemoryError`; even the bits alone need more than two exabytes. Neither a practical crossover nor full physical execution is asserted. + +## Open next questions + +1. Can every seventh-stage source role and its lifetime be exhaustively injected into the proposed conservative interval inventory, including nested stage entries, true high packets, pending/answer pages, and non-native positive calls? First independently trace `ordinary_carrier.stage_body`, `Receiver`, and their common arena constructors against the sevenfold argument in [PROOF.md](PROOF.md). This bridge blocks a same-premise seven-stage multiplier theorem. +2. Can the original retimed source's all-column physical action, owner erasure, uniform transfer, numerical/tape precision and analytic recovery be independently reviewed? The finite controls execute selected instances and do not discharge these inherited assumptions. +3. Can a changed word or a different fully funded ordinary architecture reach `0.00389046`? The fixed-trial calculation does not exclude such a change; first derive its complete native and signed invoices and physical ownership. + +## Credit + +Ali Romman's #8027, #8030 and #8042 supply the paired physical words, native caller, and unpowered chronological transport and clock. Clear1nsight's #8033 and #8035 supply the tilted tariff and signed-margin extension. The seven-stage arithmetic, proposed role accounting and package were prepared for Clear1nsight with substantial OpenAI Codex assistance. This is a separate research candidate; upstream review or selection is not implied. See the predecessor source's own `NOTICE.md` in the pinned archive for the full chain. diff --git a/research/p104-seven-stage-retimed/RESULT.json b/research/p104-seven-stage-retimed/RESULT.json new file mode 100644 index 0000000000..4d1e41d2dd --- /dev/null +++ b/research/p104-seven-stage-retimed/RESULT.json @@ -0,0 +1,143 @@ +{ + "kappa": "194505764329723/50000000000000000", + "binary_H": [ + 1000000000000, + 16000000000000, + 256000000000000, + 4096000000000000, + 65536000000000000, + 1048576000000000000, + 16777216000000000000 + ], + "numerical_H": 36000, + "width_logs": [ + 92000000000000, + 1472000000000000, + 23552000000000000, + 376832000000000000, + 6029312000000000000, + 96468992000000000000, + 1543503872000000000000, + 3312000 + ], + "stage_rates": [ + "3874554821962082539/1000000000000000000000", + "3890053044518055869/1000000000000000000000", + "155604601504501503/40000000000000000000", + "778023057119536323/200000000000000000000", + "1945057643295210037/500000000000000000000", + "778023057318888179/200000000000000000000", + "77802305731889201/20000000000000000000" + ], + "signed_gate": { + "strict": 54, + "functional": 4, + "smallest_margin": "1/1000000000000000000000", + "ordinary_margin": "1/100000000000000000000", + "positive_margin": "998329157051/11250000000000000000" + }, + "geometry": { + "public_offset_above_2_to_A": 4, + "first_extent_bits_minus_b": -17895697004016101251, + "last_extent_bits_minus_b": -17895697004016101250, + "minimum_width": 9162596866056243844352, + "log2_axis_count": 17895697004016101179, + "largest_axis_width": 12592977287652387236523, + "private_clock_log2_upper": 12913551831985161034055560, + "actual_dense_root_entry_log2": 25185954575304774473046 + }, + "binary_cuts": [ + 1004016064322, + 17004016064386, + 273004016064450, + 4369004016064514, + 69905004016064578, + 1118481004016064642, + 17895697004016064706 + ], + "public_exponent_A": 17895697004016101255, + "first_public_offset": 4, + "initial_s": 17895697004016101256, + "stage_and_outer_fixed_log_overhead": 8352, + "retimed_first_stripe_margin": 8947848502008042018, + "retimed_all_size_margin_floor": 7829367439257035944, + "absolute_log2_private_control_envelope": 17179869184000000000004, + "storage_upper": "6.2 p T < 297.6 n bits", + "log2_fixed_setup_and_install_le": 513, + "log2_ordinary_clock_le": 293203099648000000000067, + "log2_C_le": 293203099648000007921669, + "stage_analysis": [ + { + "stage": 1, + "height": 1000000000000, + "covered": "0.003890115283094460382307847368110742536373436450958251953", + "limit": "0.003874554821962082540778615978638299566227942705154418945", + "booked": "0.003874554821962082539", + "limit_minus_booked": "1.7786159786382995662279427051544189453125E-21" + }, + { + "stage": 2, + "height": 16000000000000, + "covered": "0.003890115286375710382307847368110742536373436450958251953", + "limit": "0.003890053044518055870934615978638299566227942705154418945", + "booked": "0.003890053044518055869", + "limit_minus_booked": "1.9346159786382995662279427051544189453125E-21" + }, + { + "stage": 3, + "height": 256000000000000, + "covered": "0.003890115286580788507307847368110742536373436450958251953", + "limit": "0.003890115037612537576754615978638299566227942705154418945", + "booked": "0.003890115037612537575", + "limit_minus_booked": "1.7546159786382995662279427051544189453125E-21" + }, + { + "stage": 4, + "height": 4096000000000000, + "covered": "0.003890115286593605890120347368110742536373436450958251953", + "limit": "0.003890115285597681616859865978638299566227942705154418945", + "booked": "0.003890115285597681615", + "limit_minus_booked": "1.8598659786382995662279427051544189453125E-21" + }, + { + "stage": 5, + "height": 65536000000000000, + "covered": "0.003890115286594406976546128618110742536373436450958251953", + "limit": "0.003890115286590420075099944103638299566227942705154418945", + "booked": "0.003890115286590420074", + "limit_minus_booked": "1.0999441036382995662279427051544189453125E-21" + }, + { + "stage": 6, + "height": 1048576000000000000, + "covered": "0.003890115286594457044447739946235742536373436450958251953", + "limit": "0.003890115286594440896565948986450799566227942705154418945", + "booked": "0.003890115286594440895", + "limit_minus_booked": "1.5659489864507995662279427051544189453125E-21" + }, + { + "stage": 7, + "height": 16777216000000000000, + "covered": "0.003890115286594460173691590654243555036373436450958251953", + "limit": "0.003890115286594460096576824291626580816227942705154418945", + "booked": "0.00389011528659446005", + "limit_minus_booked": "4.65768242916265808162279427051544189453125E-20" + } + ], + "binary_C_decimal": "0.003890115286594460382307847368110742536373436450958251953", + "positive_covered_decimal": "0.003890204026963975694444444444444444444444444444444444444", + "gate_margins_decimal": { + "smallest_margin": "1E-21", + "ordinary_margin": "1E-20", + "positive_margin": "8.874036951564444444444444444444444444444444444444444444E-8" + }, + "outer_polynomial_factor_ceiling_log2": 1176, + "outer_cofinal_extra_factor_log2_le": 1586, + "signed_rejection_controls": [ + "g=0", + "g=10^-17", + "ordinary at k+4g", + "positive at k+5g" + ], + "physical_scope": "Arithmetic application of #8042 pricing with seven stages; activation stage-count assertion changed locally from 6 to 7; full written seven-stage tape proof and production-scale execution not certified" +} diff --git a/research/p104-seven-stage-retimed/SOURCE-8042.json b/research/p104-seven-stage-retimed/SOURCE-8042.json new file mode 100644 index 0000000000..f2751573cb --- /dev/null +++ b/research/p104-seven-stage-retimed/SOURCE-8042.json @@ -0,0 +1,301 @@ +{ + "repository": "aliromman/integer-mult-bounds", + "head": "3d33cb0c8a523b66d91e8de8250b85d0a436eb35", + "source_directory": "research/retimed-native-multiplier/", + "files": [ + { + "path": "ACTIVATION.md", + "git_blob": "e6c5f909d110385b10335b06b2a44b7be414766a", + "size": 10794, + "sha256": "488df38e2a57495b064d3071e3d7046e916fad24622f0251db863184d0234cf8" + }, + { + "path": "CLOCK.md", + "git_blob": "026b42012eb0b045e32b958bd72f3dc84f2a89ec", + "size": 7966, + "sha256": "ba1eaac84776333a7d0d4836552e2c3befd9e99afe350b71e9ddf0c1e6419939" + }, + { + "path": "INSTALLATION.md", + "git_blob": "bab49989714ddfa7e2dac99d049d0121607712b0", + "size": 10417, + "sha256": "6d92140a451bbca7f0cb3e9643313d195cc2cff7d570322896cb34c4e8728c01" + }, + { + "path": "LICENSE", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "size": 11357, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "NOTICE.md", + "git_blob": "019204131a97c4252e101cba256198b40c790625", + "size": 2587, + "sha256": "a2102a681cd7ab9b8c168f6f197119f036e4f2c1db76af8ab993f4716e0e2ac5" + }, + { + "path": "NUMERICAL.md", + "git_blob": "ef905012374cea383461595acaeb9f31e08961ba", + "size": 15898, + "sha256": "4b8e85a14f8d97d71589dac589ed9bd242c914dd6cff8e5b667ee5374ab83623" + }, + { + "path": "ORDINARY-CLOCK.md", + "git_blob": "1969055038004261d440bb0120cf444759ea172d", + "size": 24069, + "sha256": "13b0ac78a1bea6bb2eb5321a56bd31a45069442e2c0d9119570fa7e599881c34" + }, + { + "path": "OUTER-CLOCK.md", + "git_blob": "3f44826f557549b9ae435c8d129ca776f89e97ed", + "size": 14716, + "sha256": "c6a37a9e1146a08761f8a57cde711c8cb4fc9f45177c523542c053ee12ead926" + }, + { + "path": "PREDECESSOR-POSITIVE-CLOCK.md", + "git_blob": "ee81e58803f956a989b59f1ab0e970f31fe00d3c", + "size": 15244, + "sha256": "bbb5880bb7cc48e5109f962d66822123223b607c0d5fad1ffe8284fbd2caf10c" + }, + { + "path": "README.md", + "git_blob": "f8b290f51a60993495c706c27ac858c683698e20", + "size": 5838, + "sha256": "3f1444cd74c24003192d8b57bb0b0f4f8372a28fb132094c5401d061b817610f" + }, + { + "path": "RESULT.json", + "git_blob": "ff7d999dabf4e3e5302a1413e3c38547cf12a6c5", + "size": 12566, + "sha256": "0bca797d8a0409cae9eaa3668d56c15a7eb78936acfd0aa86b2f7cf91f3af44e" + }, + { + "path": "SOURCES.json", + "git_blob": "b74419abb42e7cf3c7995087aa83fcdb35b2adb8", + "size": 2890, + "sha256": "6c031f8ba532e75c9bd63f3d725eff8cdf963307101a800aec76d95f148d8930" + }, + { + "path": "TASK.json", + "git_blob": "a9485666c6227b30822c124ad1ea47eef15fe7c7", + "size": 5365, + "sha256": "641462667ca326a9b9f523f5c013df9db9936a7a44453783c7d3c523e7dfe48c" + }, + { + "path": "TRANSFER.md", + "git_blob": "ba53922c7f2938adff1660a0b4d7c1728010c664", + "size": 13002, + "sha256": "4ec713388912b341c28e5575f749f69c910efe844839c89feb924f63d045dc1f" + }, + { + "path": "VERIFICATION.md", + "git_blob": "35cd701f35850852249db600a712d5bf65df7c8b", + "size": 4765, + "sha256": "4ff24586ca8f35347fdfd291b2686941c239a2dddc209e20b282111c532d1e76" + }, + { + "path": "VERIFY.json", + "git_blob": "c180270a51cd54c58ca554561f4cf7fadbcf0094", + "size": 1820, + "sha256": "6acd5f5e804764e861651762ea7b16d418f290493597d81bd4abb816f31f69d0" + }, + { + "path": "activation.py", + "git_blob": "68bc0067c9dbb718f78ecee809a364147cdec6da", + "size": 2647, + "sha256": "e227f9321faf3c7b77638645cb04b091e5cd1950061756f7e389fb6c5931915a" + }, + { + "path": "bootstrap.py", + "git_blob": "58f8c4bd5376ec1f668ed8c14f586f3ee6cee87c", + "size": 2984, + "sha256": "2d1582bddf2f64c11fd15640aab7ab66bf247430e9d02ad3382db0e07fdca7ab" + }, + { + "path": "check_binary_word.py", + "git_blob": "d4ed11898d6c114a1e0eb162b1135a0dac580b15", + "size": 1909, + "sha256": "fcc3d7c5cb777d73857b66ebb6abead53ac592f396ea4c585fd555dfa2135664" + }, + { + "path": "check_chronology.py", + "git_blob": "efcfd334e46b82f7430d556fd2094f5ca7bc8484", + "size": 3117, + "sha256": "2723b25f86e181916ed361eebc44210d67bd0319d44c9b0f964ab01c1b83cb6d" + }, + { + "path": "check_complete.py", + "git_blob": "1bacd1ccbffc3033a668ba4bdb662434d56844b9", + "size": 5799, + "sha256": "b13ebe5a085eb1b6ad87a84c777e59c0a19a51da2d2f1af923f64bcf10f2f536" + }, + { + "path": "check_installation.py", + "git_blob": "1ab2035cb2ed87c204e8f1a079bdf96d0cb3ff97", + "size": 3426, + "sha256": "fc7950c89b19eac4e6c064d4cea99f1f05d64c2a4b0b8f53af64622244280455" + }, + { + "path": "check_positive_word.py", + "git_blob": "0fad2502432ed4813717a6c62b329d5bbab5bc7e", + "size": 1437, + "sha256": "28782d99308e3d4e6862ea065f564777bb6f8d64406a2df26fd1fedb093d9ae3" + }, + { + "path": "check_precision.py", + "git_blob": "247733a76dd3dc579fb77862f09b64e37d96a00f", + "size": 5195, + "sha256": "50824710333e05257b88f1fcfb38f386755a93d3dcb4b99c616b639b9b0008b8" + }, + { + "path": "check_reentry.py", + "git_blob": "7726e110b5639d7a5605dfd6d105a1fbb08f7b2d", + "size": 1756, + "sha256": "4504e7028f7193a4e6b5b1099219d5a20a3fec2178c8286f48b5a22d96bef686" + }, + { + "path": "check_scans.py", + "git_blob": "ee4f1a54cd8d489526a98945a930491b5e19a31b", + "size": 5472, + "sha256": "bbacfa49243ed94fe5065dda55c9fe5cd61a05db67c7f26d4aefa5a9897a5bf9" + }, + { + "path": "check_streamed.py", + "git_blob": "a2140786496e601e57a3877239469966f369a74f", + "size": 1802, + "sha256": "edee7277378c59b13c9c300300cfddd8348e44c393512e06adc4f22d592b6e60" + }, + { + "path": "equal_rate.py", + "git_blob": "9beb707f6b1d1ab0a199459f10be3a379b673788", + "size": 2102, + "sha256": "65a6ad605d0400c85c13cf8195c55e03ea7cc0d990a1317e4033acdc7d922c34" + }, + { + "path": "fiscal_scans.py", + "git_blob": "760c1dfbd23facefd39e3e6a668fb334047f8f03", + "size": 4306, + "sha256": "bacc9db2bad0254081309c11269da09b1719479aac8542d34c7e463a8e6aa428" + }, + { + "path": "installations.py", + "git_blob": "5cccece527d49a763e4ca52bc532badd7c127597", + "size": 1144, + "sha256": "d1ec609cdc4dd4857b810f89aa485207470a659750c277e331c8c7a722fd4a87" + }, + { + "path": "lean/OrdinaryClock.lean", + "git_blob": "7a0fda9747998733e319f059887e908da59a91aa", + "size": 4387, + "sha256": "5c93e7c9b0360e608ab89a7b977f36f4880cadecf6f7ba46b8732d096fc1ccf8" + }, + { + "path": "lean/OuterTickets.lean", + "git_blob": "eaa7e1f6472880185f2b1ed013d6d2e089660db9", + "size": 7713, + "sha256": "7e214a87cb862d0ed7ab313f270bd40b6f5d6b6b8353d12181593d7e734fab6f" + }, + { + "path": "lean/Retimed.lean", + "git_blob": "1b87004024a9b5a76cf1506f11ec7c12b542274f", + "size": 3584, + "sha256": "60d9fec5e3c304ed20b2fff71798741a532248f879f4df88cdaf89ca95e8d1f5" + }, + { + "path": "lean/RetimedGrid.lean", + "git_blob": "08592a8ba66dc641f8721536acb973b812f3025c", + "size": 2469, + "sha256": "d3ab4ebab4a4ef48bf9a9c917ae1805566a073cbdf7c7e8faf8c8e62c84bac77" + }, + { + "path": "lean/lake-manifest.json", + "git_blob": "e48af08eb0541876867cea051238eadfa74d1484", + "size": 3556, + "sha256": "c568eaffe7dcc7e7981672520177759b9cc5ddba0b059e4c3f8323837f725bd1" + }, + { + "path": "lean/lakefile.toml", + "git_blob": "665faf79513bc3edde180dbe65a3578f8b76b153", + "size": 329, + "sha256": "c5f0d069b1b32c64b4c64b1256e8955cfc4a390774fd9ee7fd51cecf298df35b" + }, + { + "path": "lean/lean-toolchain", + "git_blob": "ba8ebf2dbaf6a668cd2a0e086186d6d569b69ff5", + "size": 25, + "sha256": "d5edba4e4b8faad9c1baeadb265716d20d03be4d1a2647dc5e35b0c0325bea7b" + }, + { + "path": "machine.patch", + "git_blob": "9119367f7f7cf924cbba394f1e157ffb3c9e7461", + "size": 10702, + "sha256": "0fe5beec9cc1268140e1f5a7f34ab130b9611fd800e449de09680c2a90b7b0df" + }, + { + "path": "ordinary_clock.py", + "git_blob": "ab9f930bfcd52e692fcf99755f6d344955bdffb7", + "size": 1683, + "sha256": "ad56189a771c6fb8d54d8554ff4b25787be912d25eedb843ab1e95f305eac995" + }, + { + "path": "outer_budget.py", + "git_blob": "35dd5cf836431661bcd306eadcd1da36cccca669", + "size": 1778, + "sha256": "ca4438db28a447ed5c43d87d43f0ac10a0cb2b4e183342ac93139d517b9d4d02" + }, + { + "path": "outer_clock.py", + "git_blob": "586e1cb30624bc46f948d53d742646ffef8e5d00", + "size": 4209, + "sha256": "30df5580fed94d176a05edf6d252befa5e83cfd123be8f058bf6b5a07dd70608" + }, + { + "path": "predecessor/OVERLAY.json", + "git_blob": "93fcd0e584540cf4dfcb705f3439417e5f3e0bf4", + "size": 10592, + "sha256": "73aaf56a8a199cf3b7fc6c87316ca50298f47561e4b7c227edec6230f12a8403" + }, + { + "path": "predecessor/SOURCES.json", + "git_blob": "4afaeff69dafb2bebe68540d1595f1386587bc77", + "size": 25250, + "sha256": "3634f7a15b8ca6f1832e48bdd4e83bd764509f804196d956149a9a82e7512a64" + }, + { + "path": "raw_binary_stage.py", + "git_blob": "444da9677aed25cc881312435d825fb5b6312f0c", + "size": 2121, + "sha256": "0c805a525322acf4eb03f083c2c763f3046c3d488e1f993beb484a3e2c2ff4a9" + }, + { + "path": "retimed_supplier.py", + "git_blob": "45e8bdae4dd651f46c2d7d295221e4a2a7267ca5", + "size": 5792, + "sha256": "c0763589648671e279a9b894a311c6addcc75b1c3f5b8e510c66cc28bf9feba8" + }, + { + "path": "transport.py", + "git_blob": "44910151173d792cc3b5afab4981828f95e0a1f1", + "size": 14388, + "sha256": "dbfa1b6834295bf987ad3a915e599c43c4185387a4186e39dee459428ae232f9" + }, + { + "path": "unpowered_price.py", + "git_blob": "18eff048dd46e843e111fbc0124955263670f9af", + "size": 2103, + "sha256": "d59c217e75928983f123192347633b5a415e131cc7b0471c635905a52700b7c4" + }, + { + "path": "verify.py", + "git_blob": "11f13d9b22acdafb02acbb9fc7e6d9036dc24d83", + "size": 1811, + "sha256": "443bf26de4f4be50b2f762bf01d8e21274c9300083f3ae99d9c0e81a602e7b2e" + } + ], + "large_blob": { + "path": "predecessor/predecessor-8030.tar.gz", + "git_blob": "e00a6bfe8328b4c982bf0689c4d55c8207515514", + "sha256": "769d5a05cc1373fa22ed5956af636992fcd19d7e5c1753a32033a73c358cd31c" + }, + "source_archive_sha256": "f1113ee8ce4ffa7daebe4b559079eedb6b820b2bfb1c678fba9dd5814a99c4ab" +} diff --git a/research/p104-seven-stage-retimed/SOURCES.json b/research/p104-seven-stage-retimed/SOURCES.json new file mode 100644 index 0000000000..e7eefb9540 --- /dev/null +++ b/research/p104-seven-stage-retimed/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "0618e75a22cec54d1651394ef83d088551b7f026", + "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" + } + ] +} diff --git a/research/p104-seven-stage-retimed/TASK.json b/research/p104-seven-stage-retimed/TASK.json new file mode 100644 index 0000000000..4ea15b26ab --- /dev/null +++ b/research/p104-seven-stage-retimed/TASK.json @@ -0,0 +1,94 @@ +{ + "schema_version": 1, + "task_id": "selected-stock-envelope", + "priority_revision": 8, + "base_commit": "0618e75a22cec54d1651394ef83d088551b7f026", + "original_card": { + "id": "selected-stock-envelope", + "question": "What explicit uniform stock envelope does the actual selected stopped producer supply at one bootstrap stage?", + "starting_points": [ + "research/selected-bootstrap-stock-audit/README.md", + "research/bootstrap-cutoff-time-space-split/README.md", + "certificates/selected-result.json", + "docs/research/community-efficient1000-review.md", + "research/stock-margin-chain/README.md" + ], + "methods": [ + "Derive a source-bound reserve recurrence at the actual selected atom widths, separating parent stock from completed inner borrowing.", + "Find an exact missing implication or counterexample to a proposed selected-stage stock envelope." + ], + "acceptance_gate": "Bind every coefficient and depth factor to the selected producer and state the width domain. Compare a proved envelope with the sufficient cutoff guard; a large numerical headroom or a historical m=120 coefficient is not a selected m=73 proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "Choose one actual selected producer/stage and derive its parent reserve and depth coefficient from source. Check whether newer handoffs already cover that exact obligation. Stop with the missing implementation lemma if it cannot be bounded; do not rerun #2972 cutoff/headroom arithmetic as a new contribution.", + "bottleneck_link": "This reduces a concrete inherited implementation obligation without confusing unchanged kappa arithmetic with a completed theorem.", + "allowed_variations": [ + "One stage or one explicit reserve/depth implication.", + "An independently checked same-domain proof repair, retaining all remaining assumptions." + ], + "scope_change_triggers": [ + "Importing the historical 57604 or 252 allowance without a selected-producer binding.", + "Calling a conditional fit lemma a full outer-proof adoption.", + "Replacing an actual selected stock coefficient with cutoff comparisons or a conditional fit inequality." + ], + "overlap_terms": [ + "selected stock", + "stock envelope", + "bootstrap cutoff", + "1956", + "1965", + "1990", + "2972", + "stock-margin-chain", + "actual_stock_coefficient" + ], + "existing_checks": [ + { + "scope": "Retained stock audit identifies missing actual selected-stage coefficients; later cutoff-chain arithmetic does not supply them.", + "evidence": "docs/research/research-family-status.md#revision-6-handoffs-source-archives-awaiting-independent-validation", + "remaining": "Derive one actual reserve/depth coefficient from the selected producer.", + "status": "reviewed", + "source_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Price an unpowered retimed seven-stage candidate, construct the physical profile and test a proposed tape and storage extension; retain the missing seventh-stage inventory bridge.", + "scope_change_reason": "The directed assignment concerns a fixed retimed P104 binary word and its changed number of ordinary stages, not the selected stopped producer stock envelope.", + "bottleneck_link": "The retained raw word and stage recurrence set the attainable rate, while physical scratch accounting controls whether the complete signed multiplier can realize it.", + "budget_minutes": 60, + "stop_rule": "Finish a byte-pinned registered candidate invoice and bounded physical controls; do not promote the result beyond its unresolved seventh-stage inventory bridge.", + "outcome": "partial", + "evidence": "PROOF.md, RESULT.json, SOURCE-8042.json, verify.py and the registered finite controls.", + "author": "Clear1nsight", + "ai_assistance": "Substantial OpenAI Codex assistance on derivation, coding, proof review and testing.", + "open_questions": [ + { + "question": "Can the complete seventh-stage source control flow be bound to the conservative per-stage physical scratch inventory at every input size?", + "why_it_matters": "The proposed stock and full tape clock require this bridge beyond the inherited premises.", + "first_step": "Trace ordinary_carrier.stage_body, receiver arena roles, pending high packets, unit_scale and nested positive bodies against the sevenfold count in PROOF.md.", + "blocked_by": "The independent reader has not yet discharged an exhaustive all-size source-to-inventory binding." + }, + { + "question": "Can the inherited retimed physical source and signed application receive independent scientific review?", + "why_it_matters": "Finite control replays do not prove the original all-column and uniform transfer premises.", + "first_step": "Review the pinned #8042 TRANSFER, numerical precision, physical owner return and signed recovery documents.", + "blocked_by": "Production-sized fields cannot be executed on available hardware." + } + ], + "related": [ + "https://github.com/CrocSwap/integer-mult-bounds/pull/8042", + "https://github.com/CrocSwap/integer-mult-bounds/pull/8030", + "https://github.com/CrocSwap/integer-mult-bounds/pull/8033", + "https://github.com/CrocSwap/integer-mult-bounds/pull/8035" + ] +} diff --git a/research/p104-seven-stage-retimed/VERIFY.json b/research/p104-seven-stage-retimed/VERIFY.json new file mode 100644 index 0000000000..ddba291faf --- /dev/null +++ b/research/p104-seven-stage-retimed/VERIFY.json @@ -0,0 +1,75 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "price" + ], + "timeout_seconds": 90, + "checks": "Reproduce original directed couplings and five profile receipts; check the complete seven-stage arithmetic, negative controls and proposed capacity inequalities." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "runtime" + ], + "timeout_seconds": 330, + "checks": "Initialize the actual seven-stage recipes without opening a scale calendar; check seven thresholds and the positive stop policy." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "schedule" + ], + "timeout_seconds": 90, + "checks": "Replay the pinned predecessor chronological loan, interval and reentry controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "physical" + ], + "timeout_seconds": 320, + "checks": "Replay the pinned predecessor physical raw-word and precision controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "slabs" + ], + "timeout_seconds": 50, + "checks": "Replay the pinned predecessor signed scanner and ordinary slab controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "product" + ], + "timeout_seconds": 300, + "checks": "Run the candidate-bound reduced-rank signed product and real physical shuttles." + } + ] +} diff --git a/research/p104-seven-stage-retimed/check_runtime.py b/research/p104-seven-stage-retimed/check_runtime.py new file mode 100644 index 0000000000..e37b449071 --- /dev/null +++ b/research/p104-seven-stage-retimed/check_runtime.py @@ -0,0 +1,114 @@ +"""Real bounded controls for an optional seven-stage #8042 configuration. + +The finite product cannot exercise production-size rank logarithms. The tests +separately inspect live recipe construction, selected stage routing, stop +parameter propagation, and a complete reduced-rank physical product. +""" +from collections import Counter +from dataclasses import replace +from fractions import Fraction as Q +from unittest.mock import patch +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent)) + +from upstream import install +install() + +from installations import SEVEN_STAGE, BINARY_C, GAUSSIAN_C +from staged_carriers import admitted_stage, entrance_logs +from positive import power_le +from band_product import Product, prepare_native, production_supplier +from binary_receiver import Receiver +from module_atoms import balanced_widths +from ordinary import rectangle +from streaming_routes import work_tapes +from triangular_ordinary import root_body +from check_product import one, stock_and_public +from transport import Plan +import retimed_supplier + +profile = SEVEN_STAGE + + +class FakeDigits: + def __init__(self, available): + self.available=available + def __lt__(self, other): + return False + def bit_length(self): + return self.available+1 + + +def runtime_checks(): + cuts = entrance_logs(profile.rank_logs) + for i, cut in enumerate(cuts): + assert admitted_stage(FakeDigits(cut), len(cuts), profile.rank_logs) == i+1 + if cut: + assert admitted_stage(FakeDigits(cut-1), len(cuts), profile.rank_logs) == i + assert power_le(4,3,128) and not power_le(4,4,128) + assert power_le(1,profile.positive_stop_denominator,1<<1000) + assert not power_le(2,profile.positive_stop_denominator,1<<1000) + + with patch.object(Plan,"__init__",side_effect=AssertionError("calendar opened during fixed setup")): + recipes=prepare_native(profile) + assert len(recipes)==8 + assert tuple(x.rank_log for x in recipes[:-1]) == profile.rank_logs + assert all(x.trial == BINARY_C and len(x.cells)==24 for x in recipes[:-1]) + assert recipes[-1].rank_log == 36000 and recipes[-1].trial == GAUSSIAN_C + assert len(recipes[-1].cells)==31 + supplier=production_supplier(profile.complex_log,profile.positive_stop_denominator) + assert supplier.denominator==10**20 and supplier.carrier==1<<36000 + assert supplier.recipe is recipes[-1] + other=production_supplier(profile.complex_log,10**17) + assert other is not supplier and other.denominator==10**17 + # Reach the real _run policy with a tiny stand-in field and record the + # actual denominator supplied to the stop predicate. The real power_le + # implementation is independently exercised above. + old_carrier=supplier.carrier + supplier.carrier=2 + try: + observed=[]; leaves=[] + class Columns: + window=1 + offset=0 + with patch.object(retimed_supplier,"power_le", + side_effect=lambda base,den,root: observed.append((base,den,root)) or True), \ + patch.object(retimed_supplier,"one_axis", + side_effect=lambda field,axis: leaves.append(axis)): + supplier._run(object(),0,4,Columns(),4096) + assert observed==[(4,10**20,4096)] and leaves==[0,1,2,3] + finally: + supplier.carrier=old_carrier + print("PASS_SEVEN_RUNTIME: 7 stage thresholds; original 24/31 raw couplings; exact policy 10^20",flush=True) + + +def signed_control(): + stock_and_public(profile) + core=Receiver(2,balanced_widths(1),direct=True,profile=profile) + calls=Counter() + def exchange(src,dst,bits,prefix,gap,suffix): + assert bits==1 + calls["shuttles"]+=1 + calls["padded_bytes"]+=prefix*81*gap*suffix + with work_tapes(2) as (opened,restored): + rectangle(src,opened,2,9,prefix,gap,suffix) + opened.seek(0) + root_body(opened,restored,2,prefix,gap,suffix,core) + restored.seek(0) + rectangle(restored,dst,2,9,prefix,gap,suffix,restrict=True) + machine=Product((3,5),8,136,exchange,profile=profile) + assert machine.profile is profile + row=one(machine,-741503,466013) + assert calls["shuttles"]==138 and row["H_calls"]==157248 + assert row["product"]=="-345550037539" and row["coefficients_prefix"]==[11811,10996,4152,868,77] + print("PASS_SEVEN_SIGNED_CONTROL",row,dict(calls),flush=True) + + +if __name__=="__main__": + if "--signed-only" in sys.argv[1:]: + signed_control() + else: + runtime_checks() + if "--signed" in sys.argv[1:]: + signed_control() diff --git a/research/p104-seven-stage-retimed/check_seven.py b/research/p104-seven-stage-retimed/check_seven.py new file mode 100644 index 0000000000..5441bce08d --- /dev/null +++ b/research/p104-seven-stage-retimed/check_seven.py @@ -0,0 +1,83 @@ +"""Exploratory seven-stage retimed invoice, not a published theorem.""" + +from fractions import Fraction as Q +from decimal import Decimal, getcontext +from hashlib import sha256 +import json +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parent)) + +from upstream import install +install() + +from activation import resource_receipt +from check_complete import profile_row +from installations import BINARY_C, GAUSSIAN_C, SEVEN_STAGE +from outer_budget import qualify + +getcontext().prec = 55 + +def dec(q): + return str(Decimal(q.numerator) / Decimal(q.denominator)) + +p = SEVEN_STAGE +H, K, G = tuple(p.rank_logs), p.kappa, Q(1,p.positive_stop_denominator) +assert H == tuple(10**12 * 16**i for i in range(7)) +assert K == Q("0.003890115286594460") and G == Q(1,10**20) +outer_factor_bits = (((128*10**20)**16)-1).bit_length() +assert outer_factor_bits == 1176 +assert 1434 - 1024 + outer_factor_bits < 1600 +assert max(H).bit_length() <= 64 + +previous = Q(0) +stages = [] +for i,h in enumerate(H): + covered = BINARY_C-Q(7,2*h) + limit = min(p.eta,(249*covered+previous)/250) + booked = K+5*G if i == len(H)-1 else Q((limit*10**21).__floor__()-1,10**21) + assert previous < booked < limit + stages.append({"stage":i+1,"height":h,"covered":dec(covered),"limit":dec(limit), + "booked":dec(booked),"limit_minus_booked":dec(limit-booked)}) + previous = booked + +pos = GAUSSIAN_C-Q(1,5*p.complex_log) +gate = qualify(K,G,previous,pos) +for bad in ((K,Q(0),previous,pos), (K,Q(1,10**17),previous,pos), + (K,G,K+4*G,pos), (K,G,previous,K+5*G)): + try: + qualify(*bad) + except ArithmeticError: + pass + else: + raise AssertionError("An unfunded signed control passed") +row = profile_row(p) +from dataclasses import replace +try: + resource_receipt(replace(p,rank_logs=H+(H[-1]*16,))) +except AssertionError: + pass +else: + raise AssertionError("An eighth stage crossed the local guard") +assert tuple(row["stage_rates"]) == tuple(str(Q(x["booked"])) for x in stages) +assert max(row["binary_cuts"]).bit_length() <= 64 +assert row["public_exponent_A"].bit_length() <= 64 +assert row["kappa"] == str(K) +s = row["initial_s"] +bits = (s+128).bit_length() +allowance = 8352+4*bits +head_sum = 2048+32*64+(7+12)+7+5+35+3*bits +assert allowance-head_sum == 4190+bits +assert 7*2**32 < 2**35 +assert 2**66 * 2**(83*3000) < 2**(92*3000) +row["stage_analysis"] = stages +row["binary_C_decimal"] = dec(BINARY_C) +row["positive_covered_decimal"] = dec(pos) +row["gate_margins_decimal"] = {k:dec(Q(v)) for k,v in gate.items() if "margin" in k} +row["outer_polynomial_factor_ceiling_log2"] = outer_factor_bits +row["outer_cofinal_extra_factor_log2_le"] = 1434-1024+outer_factor_bits +row["signed_rejection_controls"] = ["g=0", "g=10^-17", "ordinary at k+4g", "positive at k+5g"] +row["physical_scope"] = ("Arithmetic application of #8042 pricing with seven stages; " + "activation stage-count assertion changed locally from 6 to 7; " + "full written seven-stage tape proof and production-scale execution not certified") +print(json.dumps(row,indent=2)) diff --git a/research/p104-seven-stage-retimed/predecessor-8030.tar.gz b/research/p104-seven-stage-retimed/predecessor-8030.tar.gz new file mode 100644 index 0000000000..e00a6bfe83 Binary files /dev/null and b/research/p104-seven-stage-retimed/predecessor-8030.tar.gz differ diff --git a/research/p104-seven-stage-retimed/source-8042.tar.gz b/research/p104-seven-stage-retimed/source-8042.tar.gz new file mode 100644 index 0000000000..a6c2957c0c Binary files /dev/null and b/research/p104-seven-stage-retimed/source-8042.tar.gz differ diff --git a/research/p104-seven-stage-retimed/verify.py b/research/p104-seven-stage-retimed/verify.py new file mode 100644 index 0000000000..cb2eaa3301 --- /dev/null +++ b/research/p104-seven-stage-retimed/verify.py @@ -0,0 +1,123 @@ +"""Replay the pinned #8042 source and a bounded seven-stage overlay offline.""" +import argparse +import hashlib +import importlib.util +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tarfile +from tempfile import TemporaryDirectory + +HERE=Path(__file__).resolve().parent + +def sha(data): + return hashlib.sha256(data).hexdigest() + +def blob(data): + return hashlib.sha1(b"blob "+str(len(data)).encode()+b"\0"+data).hexdigest() + +def checked_source(dest): + manifest=json.loads((HERE/"SOURCE-8042.json").read_bytes()) + if manifest["head"] != "3d33cb0c8a523b66d91e8de8250b85d0a436eb35": + raise ValueError("Unexpected retimed source head") + raw=(HERE/"source-8042.tar.gz").read_bytes() + if sha(raw)!=manifest["source_archive_sha256"]: + raise ValueError("Retimed source archive changed") + rows={x["path"]:x for x in manifest["files"]} + if len(rows)!=len(manifest["files"]): + raise ValueError("Duplicate source path") + seen=set() + with tarfile.open(HERE/"source-8042.tar.gz","r:gz") as pack: + for item in pack: + p=Path(item.name) + if (not item.isfile() or item.name not in rows or item.name in seen + or p.is_absolute() or ".." in p.parts or str(p)!=item.name): + raise ValueError("Unexpected source archive member") + data=pack.extractfile(item).read() + pin=rows[item.name] + if len(data)!=pin["size"] or sha(data)!=pin["sha256"] or blob(data)!=pin["git_blob"]: + raise ValueError("Retimed source bytes differ: "+item.name) + seen.add(item.name) + path=dest/p + path.parent.mkdir(parents=True,exist_ok=True) + path.write_bytes(data) + if seen!=set(rows): + raise ValueError("Incomplete retimed source") + pin=manifest["large_blob"] + data=(HERE/"predecessor-8030.tar.gz").read_bytes() + if sha(data)!=pin["sha256"] or blob(data)!=pin["git_blob"]: + raise ValueError("Predecessor archive changed") + path=dest/pin["path"] + path.parent.mkdir(parents=True,exist_ok=True) + path.write_bytes(data) + # Two independent single-byte corruption controls. + assert sha(raw[:-1]+bytes((raw[-1]^1,))) != manifest["source_archive_sha256"] + assert blob(data[:-1]+bytes((data[-1]^1,))) != pin["git_blob"] + print("PASS_PINNED_8042_BYTES",len(rows),pin["git_blob"],flush=True) + +def run(argv, *, capture=False): + p=subprocess.run(argv,check=True,text=True,stdout=subprocess.PIPE if capture else None) + return p.stdout + +def original(source,mode): + run([sys.executable,"-I","-B",str(source/"verify.py"),mode]) + +def extension(source,machine): + spec=importlib.util.spec_from_file_location("pinned_8042_bootstrap",source/"bootstrap.py") + module=importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + machine.mkdir() + module.install(machine) + # Original #8042 verifier helpers normally live beside bootstrap. Put + # their exact pinned bytes beside the reconstructed machine for -I. + helpers=("activation.py","check_complete.py","ordinary_clock.py","outer_clock.py", + "outer_budget.py","equal_rate.py","RESULT.json") + for name in helpers: + shutil.copyfile(source/name,machine/name) + for name in ("check_seven.py","check_runtime.py"): + shutil.copyfile(HERE/name,machine/name) + target=machine/"activation.py" + old=target.read_text() + if old.count("assert 1<=m<=6")!=1: + raise ValueError("The original stage guard does not match") + target.write_text(old.replace("assert 1<=m<=6","assert 1<=m<=7")) + target=machine/"installations.py" + with target.open("a") as out: + out.write("\nSEVEN_STAGE = Profile(tuple(10**12*16**i for i in range(7)), " + "36000, Q(39,10000), Q('.003890115286594460'), 10**20)\n") + out.write("PROFILES['seven-stage'] = SEVEN_STAGE\n") + +def main(): + ap=argparse.ArgumentParser(description=__doc__) + ap.add_argument("mode",choices=("price","runtime","schedule","physical","slabs","product")) + mode=ap.parse_args().mode + if sys.version_info[:2]!=(3,12) or not __debug__: + raise RuntimeError("Use Python 3.12 with assertions enabled") + with TemporaryDirectory(prefix="p104-seven-stage-") as tmp: + root=Path(tmp);source=root/"source";source.mkdir() + checked_source(source) + if mode in ("schedule","physical","slabs"): + original(source,mode) + else: + if mode=="price": + original(source,"cost") + machine=root/"machine" + extension(source,machine) + if mode=="price": + result=json.loads(run([sys.executable,"-I","-B",str(machine/"check_seven.py")],capture=True)) + expected=json.loads((HERE/"RESULT.json").read_bytes()) + if result!=expected: + raise ArithmeticError("Seven-stage invoice changed") + print("seven-stage",result["kappa"],"A",result["public_exponent_A"], + "log2 C <=",result["log2_C_le"],flush=True) + else: + argv=[sys.executable,"-I","-B",str(machine/"check_runtime.py")] + if mode=="product": + argv.append("--signed-only") + run(argv) + print("PASS_SEVEN_STAGE_RETIMED",mode,flush=True) + +if __name__=="__main__": + main()