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-chart510-transfer-bound/CALLER.json b/research/p104-chart510-transfer-bound/CALLER.json new file mode 100644 index 0000000000..4efb583608 --- /dev/null +++ b/research/p104-chart510-transfer-bound/CALLER.json @@ -0,0 +1,151 @@ +{ + "all_subset_rank": "18906-2m, by block triangularity and distinct helper owners", + "caller_cases": { + "even_18": { + "helper_output_rank": 14652, + "m": 18, + "nullity": 36, + "rank": 18870, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_0": { + "helper_output_rank": 14688, + "m": 0, + "nullity": 0, + "rank": 18906, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_1": { + "helper_output_rank": 14686, + "m": 1, + "nullity": 2, + "rank": 18904, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_18": { + "helper_output_rank": 14652, + "m": 18, + "nullity": 36, + "rank": 18870, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_2": { + "helper_output_rank": 14684, + "m": 2, + "nullity": 4, + "rank": 18902, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_25": { + "helper_output_rank": 14638, + "m": 25, + "nullity": 50, + "rank": 18856, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "first_36": { + "helper_output_rank": 14616, + "m": 36, + "nullity": 72, + "rank": 18834, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "last_1": { + "helper_output_rank": 14686, + "m": 1, + "nullity": 2, + "rank": 18904, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + }, + "last_25": { + "helper_output_rank": 14638, + "m": 25, + "nullity": 50, + "rank": 18856, + "rank_with_original_helper_pair_per_changed_call": 18906, + "root_input_restriction_rank": 4218 + } + }, + "caller_model": "constant binary fields; independent 38*111 root and 36*408 per-call helper fields; unique helper owners at each LOCAL", + "caller_rows": 18906, + "changed_helper_rank": 406, + "changed_rank": 628, + "collision_a_nonzero_input": [ + 92, + 99, + 203, + 210, + 231, + 428, + 433, + 434, + 435, + 448, + 449, + 473, + 516, + 582 + ], + "collision_a_original_output": [ + 92, + 99, + 231, + 428, + 433, + 434, + 435, + 448, + 449, + 473, + 516, + 582 + ], + "collision_b_nonzero_input": [ + 63, + 174, + 222, + 230, + 362, + 367, + 368, + 369 + ], + "collision_b_original_output": [ + 63, + 222, + 230, + 362, + 367, + 368, + 369 + ], + "helper_residual_signature_coupling": [ + [ + 1, + 0 + ], + [ + 0, + 1 + ] + ], + "original_rank": 630, + "residual_signature_coupling": [ + [ + 1, + 0 + ], + [ + 0, + 1 + ] + ] +} diff --git a/research/p104-chart510-transfer-bound/EFREE-CALLER.json.gz b/research/p104-chart510-transfer-bound/EFREE-CALLER.json.gz new file mode 100644 index 0000000000..f022272a8d Binary files /dev/null and b/research/p104-chart510-transfer-bound/EFREE-CALLER.json.gz differ diff --git a/research/p104-chart510-transfer-bound/GUARDS.md b/research/p104-chart510-transfer-bound/GUARDS.md new file mode 100644 index 0000000000..b7d24850e4 --- /dev/null +++ b/research/p104-chart510-transfer-bound/GUARDS.md @@ -0,0 +1,36 @@ +# Joint Boolean-guard transport for the paired BIT word + +This is a conditional **raw-price obstruction** for a particular support-based billing model. It does not install a modified powered selector or prove an upper bound on model-wide κ. + +## Checked local alternatives + +The graph and caller are the pinned #8027 paired word as carried by the #8030 standalone source. They have 36 local calls. In each call, clock 10036 is the rank-one MOVE of the 2337 readout and clock 10039 the rank-one MOVE of the 2335 readout. Each of the two moves can individually be replaced by the corresponding chart-1 `INIT` and cocharted `ADD` readout. The four exact lists are `READOUTS` in `joint_verify.py`. The verifier symbolically replays every original input as an independent field, validates every chart and private owner lifetime, and checks that each individual change preserves all outputs whenever its corresponding residual helper fields are zero. Other public inputs remain arbitrary. Each replacement removes exactly one rank-one MOVE; all 3,433 original private clear sites and their charts remain. The retained clock 11015–11017 path is unchanged. This is a local source check; arbitrary private clear payloads still require the ordinary erasure service. + +For each local call let `D` be the conservative old paid support and let `R46` and `R90` be the independent helper-coordinate sets in the two alternative readout residuals. Their sizes are listed below. Every listed helper is a productive occurrence of rank 8. Intersections below also apply to all 36 calls, with the proper call index on each helper. + +| Original clock | `R46` size | `R90` size | `D ∩ R46` | `D ∩ R90` | `D ∩ R46 ∩ R90` | +| --- | ---: | ---: | --- | --- | --- | +| 10036 | 18 | 56 | 365, 367, 459 | 251, 334, 365, 367, 386 | **365, 367** | +| 10039 | 29 | 34 | 428, 437, 445, 452 | 428, 437, 445, 452 | **428, 437, 445, 452** | + +The coordinate numbers identify helper inputs of the pinned local graph, not whole-run indices. The verifier reconstructs all support sets and asserts the last column, independently for all 72 changed labels. `R46` and `R90` are sufficient individual zero premises for the displayed readouts. More general linear residual cancellation can exist and is not ruled out. + +## Ordered transport and its scope + +For each original paid label `j`, define `S_j = D_j` except at the 72 positions in the table, where `S_j = D_j ∩ R46_j ∩ R90_j`. Let `k_i` and `r_j` be the full original productive and paid ranks. Set `c0 = 0.003890115286594461129996943` and `t0 = 1 − c0`. + +The checked nonnegative transport is from all 18,906 productive occurrences to all 104,904 original paid occurrences, aggregated only when rank and `S_j` agree. Each target has outgoing mass at least `k_i^t0`, each paid occurrence receives at most `r_j^t0`, and every used arc satisfies `i ∈ S_j` and `k_i ≥ r_j`. Outward rational rounding is applied per paid occurrence before identical groups are added. There are 86,802 groups, 6,729,066 allowed ordered dependencies, and 114,405 nonzero certified edges. At scale 10^30 the rounded capacity exceeds rounded demand by 103,186,566 ticks. The witness digest is `1286d70972e70431abfc4433858429a58c6602ff834bf8cad64e3c94ef1476c2`. Replay checks every amount and dependency and rejects a one-tick corruption. + +For `c0 ≤ c ≤ 1`, scaling each target row by `k_i^{-(c-c0)}` preserves target coverage and paid capacities because every used edge has `k_i ≥ r_j`. Tensor products preserve these inequalities. Thus, for any finite power and retained set `A` of productive tuples, a hypothetical billing rule that charges the **full product rank** of every paid tuple whose Cartesian set `∏ S_j` meets `A` cannot achieve a strict positive raw rank-moment surplus at `c ≥ c0`. + +If a chosen Boolean selector is known to bill whenever a retained tuple witnesses all its old-support and chosen residual-support conditions simultaneously, then a witness in `∏ S_j` also witnesses those conditions for either alternative, including coordinate-wise choices between the 46 and 90 readouts. The transport is therefore an obstruction for that explicitly stated full-rank Boolean model. A path that uses the original operator is also covered when its billed support contains `D_j`. Split full ranks cannot lower the `t`-power bill for `0 ≤ t ≤ 1`. + +The intersection is used only as a **sufficient witness of simultaneous support membership**. Its emptiness does not imply that the literal paid field or the residual field is zero: different retained tuples can independently meet `D_j` and a residual set. Conversely, a conservative support hit does not establish a physically nonzero field when algebraic cancellation is permitted. The theorem neither installs nor validates the chronological powered implementation, a tensor-aware selector, partial-rank billing, cancellations, changed helper coordinates, or the complete signed application. Those require separate transfer and economics proofs. In particular, the fixed rank-8 helper cutoff can justify fresh-zero components at a root suffix, but the original powered interpreter synchronizes full paid requests and deeper requests can acquire nonzero fields. + +## Replay + +```sh +python3 -IB joint_verify.py +``` + +The default input graph, caller and compressed witness are adjacent; `--graph`, `--caller` and `--certificate` override paths while retaining the same hash requirements. The program uses only the Python standard library. The log/exp interval arithmetic is copied from #8030's `independent_binary_price.py`. The conservative support regeneration is from #8034's `zero_support.py`. diff --git a/research/p104-chart510-transfer-bound/HISTORY.json b/research/p104-chart510-transfer-bound/HISTORY.json new file mode 100644 index 0000000000..a8123baa9b --- /dev/null +++ b/research/p104-chart510-transfer-bound/HISTORY.json @@ -0,0 +1,83 @@ +{ + "early_cut": { + "background_rank_328": 2, + "listed_donor_pairs_tested": 6, + "listed_feasible_endpoints": [ + [ + 330, + 331, + 510 + ] + ], + "new_hub_donor_pairs": [ + [ + 330, + 331 + ] + ], + "new_hub_donor_pairs_tested": 16110, + "rank6_single_site_pool_matches": { + "a": [ + 330 + ], + "a+b": [], + "b": [ + 331 + ] + }, + "rank7_hubs_over_328": { + "510": [ + 328, + 330, + 331 + ], + "530": [ + 326, + 327, + 328 + ] + }, + "rank_ge_7": 501, + "rank_ge_8": 501 + }, + "expanded_sha256": "b096d6df2a0c4688296b13ab0cfd50fec1c7dec732819c624ddd7a745a144b69", + "first_exterior_read": { + "2828": 29578, + "2829": 29847, + "3151": 11021 + }, + "instructions": 39600, + "late_cut": { + "29578": { + "7": { + "additional_rank_ab": 2, + "background_rank": 614 + }, + "8": { + "additional_rank_ab": 2, + "background_rank": 503 + } + }, + "29847": { + "7": { + "additional_rank_ab": 2, + "background_rank": 614 + }, + "8": { + "additional_rank_ab": 2, + "background_rank": 503 + } + } + }, + "minimum_paid_price": 5, + "optimal_hub_projector_chart": 510, + "optimal_source_charts": [ + 330, + 331 + ], + "public_inputs": 630, + "rank6_source_image_sum_dimension": 7, + "rank6_source_kernel_intersection_dimension": 1, + "required_rank_one_transfers": 5, + "tape_sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326" +} diff --git a/research/p104-chart510-transfer-bound/HISTORY.md b/research/p104-chart510-transfer-bound/HISTORY.md new file mode 100644 index 0000000000..891581ce4e --- /dev/null +++ b/research/p104-chart510-transfer-bound/HISTORY.md @@ -0,0 +1,70 @@ +# The chart-510 reroute with chronological exterior fields + +**The chart-510 block has minimum paid price 5 at the campaign exponent. Every optimum uses two rank-one deliveries from charts 330 and 331 to chart 510, two rank-one deliveries from that chart to chart 1, and one rank-one delivery from it to chart 328.** This holds for a single native invocation even if every chart can borrow every previously available exterior field at that chart, inputs may be freely recoded, and deliveries can wait until their first genuine reader. + +## The communication contract + +Take the 111-port binary tape from #8027 at `fb9b6a7b0d27da1cf98430893a3016bf811e2aa4`, retained by #8035 at `ea776471bf8ed143a0625cf2d7532f65d15eb5f9`. The 630 public fields are independent formal inputs. A field is its binary coefficient row in normalized coordinates. Each chart is the projector with image generated by the `B` rows and kernel generated by the `A` rows in the eight-dimensional native space. A positive-rank MOVE carries one entire field between nested projectors. Its rank is the absolute difference of their dimensions. Cocharted copies, retained snapshots, XOR and clean space are free in this relaxation. A new projector may be introduced at any rank. It inherits exterior stock precisely when it is an existing projector. The 636 source projectors are pairwise distinct. + +The variable block consists of the five MOVEs below and their private free preparation. The sequence of chart operations is fixed independently of field values, as in the native source. All other scheduled transfers keep their original normalized exterior contents. An exterior value may be retained at its original chart as soon as the original schedule makes it available. The replacement can use this value in any linear combination. The three result owners have to supply their original contents by their first actual exterior read. Their own old private snapshots are earned by the replacement. This permits postponing both deliveries to chart 1 by over 19,000 instructions. It fixes the original exterior traffic and the true output charts. A modification that encodes new information into an additional existing paid packet defines a larger block. + +| Zero-based instruction | Owner | Original normalized delivery | First exterior read | +|---|---:|---|---:| +| 8105 | 2335 | 330 to 510, carrying \(a\) | Read only by the selected local extraction | +| 8113 | 2337 | 331 to 510, carrying \(b\) | Read only by the selected local extraction | +| 10036 | 2828 | 510 to 1, carrying \(b\) | 29578 | +| 10039 | 2829 | 510 to 1, carrying \(a\) | 29847 | +| 11017 | 3151 | 510 to 328, carrying \(c=a+b\) | 11021 | + +The literal nonzero forms \(a,b\) have disjoint support on 30 and 41 public inputs. All three rank-six terminals 330, 331 and 328 differ. Chart 510 has rank seven and chart 1 has rank eight. Rendering an output on demand or storing a different basis of the two delivered fields at chart 1 gives the same required span. + +## Exact historical spaces + +For the early cut, replay all other operations after substituting zero for the result of each selected MOVE. Let \(E_j\) be the span of all fields observed at chart \(j\) strictly before instruction 11021 in this replay, including the start fields. Before the parity reader, no exterior operation has read any of the three output owners. Erasing the old five deliveries therefore preserves the independent exterior side information needed for this cut. The already formed \(a\) at 330 and \(b\) at 331 belong to their respective early spaces. + +For the two late cuts, restore the genuine \(c\) at chart 328 at the original instruction 11017, and continue zeroing the other four selected deliveries. Let \(F_j(t)\) be the full historical span immediately before original instruction \(t\) in this replay. It includes all chronological exterior consequences of the correctly produced \(c\). Every frozen exterior field through the first top reader agrees with this replay outside the selected private owners. Between the two top readers its difference from the replay is zero or \(b\), by linearity and the checked first-read list. The top has already obtained \(b\) during that interval. The histories account for every nonselected MOVE up to each cut. + +| Time | Background span pooled over charts of rank at least 7 | Background span pooled over charts of rank at least 8 | Additional rank of \(a,b\) over each late pool | +|---:|---:|---:|---:| +| 11021, early replay | 501 | 501 | | +| 29578, restored-parity replay | 614 | 503 | 2 | +| 29847, restored-parity replay | 614 | 503 | 2 | + +At the early cut, \(\dim E_{328}=2\). Writing \(W=E_{328}+\sum_{\dim j\ge7}E_j\), the verifier obtains \(\dim W=501\). It checks the following over all 180 rank-six charts. + +\[ +\begin{array}{c|c} +\text{required membership}&\text{rank-six charts }j\text{ for which it holds}\\\hline +a\in W+E_j&330\\ +b\in W+E_j&331\\ +c\in W+E_j&\varnothing +\end{array} +\] + +## Five unit transfers are necessary + +Let \(L\) be the sum of positive integer ranks of the replacement MOVEs, and price rank \(r\) by \(r^t\), where \(05\). Concavity gives \(\sum_i r_i^t\ge L^t\). A price at most five therefore gives \(L\le5\). The campaign's \(t=1-0.00389046\) qualifies because \(t>9/10\) and \(6^9>5^{10}\). + +At each threshold \(6\mid7\) and \(7\mid8\), start by gifting the high side its entire corresponding late background pool at 29847. Until the chart-1 first read at 29578, any additional information on the high side enters through charged upward crossings. Every such crossing carries one scalar field. After that read, any recorded exterior field differing from its background can only add a previously delivered \(b\). It was already known on the high side. Copies and operations within that side cannot increase the span modulo this background and the scalar upward receipts. Historical knowledge at the top must include both \(a,b\) by 29847. Their rank defect is two over each pool. Consequently the replacement needs at least two upward crossings of each threshold, charging four integer units. A jump from rank six to eight counts once at each threshold. This argument permits arbitrary recoding and any order consistent with the exterior readers. + +Chart 328 needs a charged incoming transmission by 11021 since \(c\notin E_{328}\). A delivery to this rank-six destination consumes rank outside the four upward units. Thus \(L=5\). The only remaining unit is one rank-one transmission into 328. A sender below 328 would have rank five. There is no rank-five chart in the original tape. A genuinely new rank-five chart has empty exterior stock, and bringing information into it would use another crossing outside the four required upward units. The sender must therefore be a rank-seven chart \(H\). No other descent or differently placed horizontal communication is available. Matching projector labels at one rank are one cochart. + +Before this send, chart 328 has only \(E_{328}\), and each rank-six donor has only its original cocharted history. A genuinely new rank-six donor has zero history. Other rank-six donors cannot have received a paid packet because the only non-upward unit is the send into 328. If at most one rank-six upward packet stops at \(H\), its outgoing field lies in \(E_H+E_j\) for one such donor \(j\). A direct rank-two transmission through the two thresholds stops at chart 1 and supplies no value to \(H\). Other rank-seven charts cannot forward to \(H\) without a further positive-rank change. Since \(c\notin W+E_j\) for every stocked donor, both upward packets crossing \(6\mid7\) must stop at \(H\). They are rank one and originate at distinct original rank-six charts. Grant chart 1 the entire late rank-at-least-seven pool. It still needs two independent directions modulo this pool. A different rank-seven chart has only its own background and, after 29578, possibly consequences of the already delivered \(b\). A transfer from there cannot supply a new quotient direction at the top. Both remaining upward crossings therefore come from \(H\) and enter chart 1 at rank one. The down-going parity packet also has rank one. This proves the minimum, including the possibility of extra relays, delayed chart-1 sends, and a borrowed exterior field at every stocked chart. + +## The optimal hub is forced + +Let \(i,j\) denote the two origin charts. The early parity output requires + +\[ + c\in E_{328}+E_H+E_i+E_j. +\] + +For listed \(H\), exact image and kernel inclusion leaves just charts 510 and 530 above 328. Each contains three listed rank-six neighbours. Of the six possible unordered donor pairs at these hubs, only \((330,331;510)\) satisfies the displayed membership. The original tape proves attainability. + +For a genuinely new rank-seven \(H\), its exterior stock is zero. Testing all \(\binom{180}{2}=16{,}110\) original rank-six donor pairs, even before any nesting restriction, leaves just \((330,331)\) satisfying \(c\in E_{328}+E_i+E_j\). In the rational native geometry the sum of their two images has dimension seven and the intersection of their two kernels has dimension one. Any containing rank-seven projector has that image and that kernel, which uniquely determine the projector. The original chart 510 has these spaces. Hence the result applies even to unlisted relay projectors. The proof fixes the optimum price and the sender and receiver charts. It permits changes to packet contents consistent with their histories and the required decoded fields. + +## Replay + +Run `python3 -IB history_proof.py /path/to/strong-bit.json.gz`. The checker uses the Python standard library. It verifies the compressed and expanded SHA-256 values, all 39,600 original instructions, the normalized outputs on all 630 independent public inputs, the private-reader boundaries, the chronological binary ranks, and all rational image and kernel comparisons used above. The exact output is in `HISTORY.json`. + +This single-call certificate gives zero signed-moment gain from replacing precisely these five transfers while retaining the stated exterior traffic. Correlations across the 36 outer invocations or recoding another old paid transfer require their own communication contract and price. diff --git a/research/p104-chart510-transfer-bound/LICENSE b/research/p104-chart510-transfer-bound/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-chart510-transfer-bound/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-chart510-transfer-bound/PARENT-NOTICE b/research/p104-chart510-transfer-bound/PARENT-NOTICE new file mode 100644 index 0000000000..fe51894a1a --- /dev/null +++ b/research/p104-chart510-transfer-bound/PARENT-NOTICE @@ -0,0 +1,31 @@ +Mixed paid cutoffs for the P104 ordinary BIT supplier + +Prepared for Clear1nsight with substantial OpenAI Codex assistance. The +new schedule, directed comparison, occurrence controls, and documentation +are offered under Apache-2.0. + +verify.py adapts the Apache-2.0 verifiers from Dugongue's PR #7831 +(2d1fb9c878ae1e292cb918de40fa8e4f7fa7f75e) and Rohan Arun's PR #7835 +(43007c979859fa84ccc3a3509ccacc9620d181fa). Rohan Arun submitted #7835 +through the original X request at +https://x.com/RohanArun/status/2123655584797143516. The source manifest +retains the published #7835 NOTICE. + +Retained predecessor NOTICE from the grade-14 package follows. + +Iterated returns on the P104 ordinary suppliers + +Clear1nsight prepared the successor construction, explicit witnesses and verification +with substantial OpenAI Codex assistance, including independent computational checks. +The new material is offered under Apache-2.0. + +The exact starting words and the rational and binary replay interfaces are from +Clear1nsight's PR #7781. The paid and productive scalar operations, the 48-call +complex schedule, the punctured binary supplier and the common outer application +come from Ali Romman's PR #7776. The two paid projections build on the local +quotient and terminal repair in #7774 and #7781. The binary paired caller and +finite compiler use work by DreamingOfClouds, Jerry Chen (CubeJerry), zxv and the +contributors cited in their retained sources. SYLforge, Rohan Arun, Cinna Davis, +Douglas Colkitt and other predecessors contributed the caller, physical and +analytic framework. The source-fetch helper is adapted from #7774. The immutable +source manifest identifies the public inputs and their notices. diff --git a/research/p104-chart510-transfer-bound/PRICE.json b/research/p104-chart510-transfer-bound/PRICE.json new file mode 100644 index 0000000000..f7e7883a39 --- /dev/null +++ b/research/p104-chart510-transfer-bound/PRICE.json @@ -0,0 +1,127 @@ +{ + "bit_c_decimal_bounds": [ + "0.00389046000025000671", + "0.00389046000025000672" + ], + "bit_c_fraction": "70084296829703/18014398509481984", + "bit_debit": 21, + "eta": "39/10000", + "exploratory_power_132": { + "bit_debit": 14, + "floor": "33554432", + "sixth_stage_headroom": "1837867366143543159/17179869184000000000000000000000", + "status": "arithmetic screen only; power 132 needs new runtime/physical/stock and supplier transfer proof", + "surplus_bounds": [ + "0.000000091157707904", + "0.000000091157707905" + ] + }, + "interpretation": "m replacements of two separate rank-one paid occurrences by one rank-two paid occurrence within the whole 36-call raw word; no physical realization asserted", + "kappa": "194523/50000000", + "m36_plus_one_rank_one_raw_difference_at_target_bounds": [ + "-0.9385070533421943", + "-0.9385070533421942" + ], + "ordinary_margin": "249/25000000000000000", + "ordinary_rate": "389046000001/100000000000000", + "ordinary_stage_rates": [ + "968675584670509/250000000000000000", + "3890384730755733/1000000000000000000", + "972614733561007/250000000000000000", + "3890459948177981/1000000000000000000", + "3890459997053717/1000000000000000000", + "389046000001/100000000000000" + ], + "positive_128_surplus_bounds": [ + "0.000214245636671", + "0.000214245636672" + ], + "positive_debit": 10, + "positive_margin": "260546871/80000000000000000", + "positive_paid_cap": "1274827/327680000", + "positive_paid_cap_decimal_bounds": [ + "0.00389046325683593750", + "0.00389046325683593750" + ], + "powered_268_certificate_strictly_decreases_on_m_0_to_36": true, + "powered_268_surplus_bounds": { + "24": [ + "-0.000002967218905930", + "-0.000002967218905929" + ], + "25": [ + "0.000002122723798414", + "0.000002122723798415" + ], + "26": [ + "0.000007212640691987", + "0.000007212640691988" + ], + "27": [ + "0.000012302531774920", + "0.000012302531774921" + ], + "36": [ + "0.000058110390064011", + "0.000058110390064012" + ] + }, + "rank_logs": [ + 106811524, + 1708984375, + 27343750000, + 437500000000, + 7000000000000, + 112000000000000 + ], + "raw_crossing_bounds": { + "24": [ + "0.00389045182505099931807550", + "0.00389045182505099931807551" + ], + "25": [ + "0.00389046584875856007396424", + "0.00389046584875856007396425" + ] + }, + "raw_difference_at_target_bounds": { + "24": [ + "-0.0031397410604036", + "-0.0031397410604035" + ], + "25": [ + "0.0022463162494472", + "0.0022463162494473" + ], + "26": [ + "0.0076323735592980", + "0.0076323735592981" + ], + "27": [ + "0.0130184308691487", + "0.0130184308691488" + ], + "36": [ + "0.0614929466578057", + "0.0614929466578058" + ] + }, + "raw_minimum_real_replacements_at_target_bounds": [ + "24.58293866548006", + "24.58293866548007" + ], + "signed_gap": "1/100000000000000000", + "signed_gates": { + "controls": "equality at either supplier gate and g=0 each fail", + "functional": 4, + "minimum_margin": "1/1000000000000000000", + "strict": 54 + }, + "sixth_stage_headroom": "695295976805812087/17179869184000000000000000000000", + "sources": { + "caller_sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b", + "graph_sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "paired_pr_8027_head": "fb9b6a7b0d27da1cf98430893a3016bf811e2aa4", + "profile_pr_8035_head": "ea776471bf8ed143a0625cf2d7532f65d15eb5f9" + } +} diff --git a/research/p104-chart510-transfer-bound/PROOF.md b/research/p104-chart510-transfer-bound/PROOF.md new file mode 100644 index 0000000000..64dfcbef5b --- /dev/null +++ b/research/p104-chart510-transfer-bound/PROOF.md @@ -0,0 +1,75 @@ +# What the chart-510 rewrite can save + +Write \(t=1-\kappa\). A nested MOVE of rank \(r\ge1\) carries one normalized field and costs \(r^t\) in the raw BIT moment. A cocharted ADD takes the XOR of two fields. The source has 630 public inputs, comprising 222 main fields and 408 helpers. All instruction numbers below are zero-based. The literal graph was supplied by Ali Romman. [Pinned #8027 source](https://github.com/aliromman/integer-mult-bounds/blob/fb9b6a7b0d27da1cf98430893a3016bf811e2aa4/research/p104-live-relative-gain/BINARY-CANDIDATE.json.gz) + +## 1. Five MOVEs are optimal on arbitrary inputs with the original exterior traffic + +The native block brings a field \(a\) from chart 330 and a field \(b\) from chart 331 into chart 510. It sends \(b,a\) separately to chart 1 and \(a+b\) to chart 328. The three rank-six charts 330, 331 and 328 have different projectors. Charts 510 and 1 have dimensions seven and eight. All five MOVEs have rank one. The actual first readers of the three exports occur at 29578, 29847 and 11021 respectively. + +Allow the five sends to move in time, permit new nested projectors and grant every chart all its previously observed exterior fields for free. Keep the other paid packets' original normalized contents and the three outputs due at their first readers. The minimum cost for this class is five whenever \(05\). + +For the lower bound, let \(L\) be the sum of the integer MOVE ranks. Concavity gives \(\sum r^t\ge L^t\), so any contender costing at most five has \(L\le5\). At the final chart-1 deadline, \(a,b\) have quotient rank two over the pooled exterior information on the high side of each of the dimension cuts \(6\mid7\) and \(7\mid8\). These are exact ranks of the literal input coefficient matrices. They charge two upward unit crossings on each cut. Chart 328 also needs an incoming field by its parity reader. The early history check proves that its parity cannot come from the stock of any one rank-six sender combined with all rank-seven and higher exterior stocks. It follows that both upward sends out of rank six must stop at the same rank-seven parity sender. They cannot take a direct two-rank shortcut. The remaining three units go from that sender to the sum recipient and to the two chart-1 readers. + +The rational image and kernel computation leaves only the original three neighbors of chart 510 as the possible terminals for an optimum. In particular, among all 16,110 pairs of original rank-six donors, only \((330,331)\) could supply the parity at a new, initially empty hub. Their image sum and kernel intersection determine the original projector at chart 510 uniquely. The precise historical spaces, the treatment of the previously delivered parity and the checks for all existing hubs are in the detailed proof. [Timed cut and geometry](HISTORY.md) · [Replayed ranks](HISTORY.json) + +## 2. A cheaper word and its exact domain + +Use the chart-1 values in the nine- and twenty-three-term lists in the checker to build the two export owners directly at chart 1. Keep the original parity route to 328. This replaces six original instructions with two INITs and 32 ADDs. The new word has 2,801 MOVEs, including 1,346 of rank one. The original counts are 2,803 and 1,348. Both words execute all 3,433 private clears at the same charts. [Literal rewrite and reverse replay](verify_rewrite.py) + +Let \(M\) be the native public map and \(M'\) the changed one. At the two replaced exports, let \(r_a,r_b\) be the difference between the original form and the new local readout. Both residuals involve only grade-eight helpers. Their supports have 29 and 18 coordinates and overlap in one. Let \(s_a,s_b\) be the two public output columns reached by a unit error in the respective readouts. Their supports are disjoint and have sizes 12 and 7. If \(R\) has rows \(r_a,r_b\) and \(S\) has columns \(s_a,s_b\), full forward propagation gives + +\[ +M' = M+SR. +\] + +The reverse instruction interpreter checks the transpose on every one of the 630 dual coordinates. Both \(R\) and \(S\) have rank two. Hence \(M'x=Mx\) **if and only if** \(Rx=0\). This is a codimension-two subspace, with arbitrary main inputs. Setting the 46 listed helpers to zero suffices, and correlated nonzero helper fields are also allowed whenever both XORs vanish. [Exact forms and signatures](REWRITE.json) + +There is also a full-map rank defect. The original \(M\) is an involution, and direct pairing gives \(RM^{-1}S=I_2\). Therefore \(M'M^{-1}S=0\). Conversely if \(M'x=0\), then \(x=M^{-1}SRx\). The two columns of \(M^{-1}S\) are therefore a basis for the entire kernel of \(M'\). Its rank is 628. On the single input with helper 266 set, output 92 is wrong. On the input with only helper 254 set, output 63 is wrong. The two explicit collisions with zero also exclude any final decoder using only the changed public outputs. [Witnesses](REWRITE.json) + +This loss composes in the actual 36-call order. Restrict to fields constant in their addresses, so all native chart permutations act identically. The retained adapter assigns a distinct helper bank to each LOCAL clock. Its original helper block is the identity. The changed block is \(I+S_hR\), where \(S_h\) is the helper part of \(S\), and \(RS_h=I_2\). Its rank is 406 and its outputs depend only on its own helper bank. With all helper inputs zero, the 4,218 root inputs still have an invertible root-to-root map. The full binary matrix on constants is thus block triangular. Applying the rewrite at **any** \(m\) of the 36 calls gives rank + +\[ +4,218+(36-m)408+m(406)=18,906-2m. +\] + +For all 36 calls this gives 18,834, a loss of 72 independent directions. The claim concerns arbitrary independently supplied root and helper fields on this restriction. Individual zero-filled locations of a powered physical word have additional premises. [Independent constant-field check](constant_caller.py) · [Pinned helper-owner binding](https://github.com/aliromman/integer-mult-bounds/blob/6285dd829114705862e8d91facaedc1f31d3cfcb/research/single-band-native-carriers/strong_binary.py#L97) + +### Exactly which extra information repairs the loss? + +Let `K` be the two-column matrix \(M^{-1}S\). On a single invocation, grant a final decoder the entire changed output and every field ever observed at chart 1, including both registers of each SWAP. The checked historical space has rank 503. Every row of that space annihilates both columns of \(K\). Adding it to the final outputs therefore leaves their combined rank at 628. In particular, even unlimited retention at the recipient cannot repair the full map. + +For additional linear observations with row matrix \(U\), the native map can be recovered **if and only if** \(UK\) has rank two. Indeed, the joint kernel of the outputs and observations consists exactly of the vectors \(Kv\) satisfying \(UKv=0\). More generally every output on the image of the changed map has four preimages. Even a nonlinear side channel must distinguish four possibilities on each such fiber. + +There are exactly **60** successful unordered pairs among the 83,028 pairs of distinct original helper input coordinates. The restrictions of their 408 coordinate rows to \(K\) are \((1,0)\) for ten helpers, \((0,1)\) for six, and zero for the remaining 392. Any pair containing one from each nonzero class works. For example, supply the original helper inputs 231 and 222. If \(y=M'x\), then \(x_{231}+y_{231}=r_a x\) and \(x_{222}+y_{222}=r_b x\), since the original helper outputs are identities. Add the corresponding two signatures to \(y\) to recover all 630 native outputs. The verifier checks this decoder on every coefficient row for all 60 pairs, and rejects pairs confined to one class. + +On constant fields the same pair in the private helper bank of each changed call gives an exact side-information requirement of **two bits per rewritten call**, when recovery may use all final outputs. The rank formula gives \(2^{2m}\) inputs per fiber, so every successful side channel needs at least \(2m\) bits in the worst case. For sufficiency the two additional probes restore each affected helper bank by the displayed decoder. Once every helper input is known, the invertible root-to-root block recovers the 4,218 root inputs. This proves sufficiency for every subset of calls. + +All 16 usable input helpers start at chart 0 of dimension zero. All affected outputs finish at chart 1 of dimension eight. Sending the two original fields directly would cost \(2\cdot8^t\) in the single-call MOVE tariff, before any private storage or cleanup. That route costs more than the two rank-one MOVEs removed. A cheaper route would have to exhibit transport or coding on the actual paid schedule. + +## 3. Independent instances can be priced together + +Consider an abstract fixed schedule with two distinct dimension-six source projectors \(U,V\), an initially empty dimension-six parity recipient \(C\) distinct from both, and a dimension-eight recipient \(W\). At \(U,V\) place independent strings \(A,B\) of \(m\) symbols from the same finite field. Require \(A+B\) at \(C\) and both strings at \(W\). A MOVE carries one symbol and has the rank-difference tariff. Allow free local deterministic coding, unlimited retention and any new nested projectors. Every other initial value is fixed independently of the inputs. Assume \(9/10\le t\le1\). + +**Theorem.** Every such protocol costs at least \(5m\), for every positive integer \(m\). If a dimension-seven hub is nested above all three dimension-six terminals and below \(W\), \(m\) copies of the native five-MOVE routing attain equality. In particular, pooling clean independent copies cannot buy a discount. This theorem and the single-invocation historical cut in §1 have different side-information hypotheses. + +**Proof.** For a MOVE \(e\) of rank \(r_e\), let \(c_e\) count the upward cuts \(6\mid7\) and \(7\mid8\) it crosses, plus one if it arrives at \(C\). A MOVE into \(C\) crosses neither cut upward, so \(0\le c_e\le\min(r_e,2)\). At each cut the upper side must learn \(2m\) symbols. At \(C\), at least \(m\) arrivals are needed to determine its parity. Thus \(\sum c_e=5m+u+v+w\), where \(u,v,w\) are the respective nonnegative excess counts over \(2m,2m,m\). + +Call a MOVE exceptional if \(r_e>c_e\), and let \(b\) count these MOVEs. Give every vertex the transcript \(Z\) of these \(b\) symbols in advance for the purpose of a lower bound. Among the other MOVEs, a jump of rank two must be a direct \(6\to8\) transmission. Let \(n\) count these direct jumps. Every other such MOVE has rank one and is of the form \(6\to7,\ 7\to8,\ 7\to C\), or \(5\to C\). + +Fix \(B\) and give a simulator \(Z\) and all nonexceptional messages \(U\to7\). It can reproduce the knowledge at every dimension-seven vertex and at \(C\), in chronological order. Dimension-five vertices have only information in \(Z\). A dimension-six vertex other than \(U,V,C\) also has only that information. Messages from \(V\) are determined by \(B,Z\). Feedback from \(C\) is already known to the simulator, and a direct jump to dimension eight has no nonexceptional path back. As \(A+B\) recovers \(A\) when \(B\) is given, counting the possible transcripts forces at least \(m-b\) nonexceptional sends \(U\to7\). Exchanging the sources gives at least \(m-b\) sends \(V\to7\). The total number of upward crossings of \(6\mid7\) is \(2m+u\), so \(n\le u+2b\). This argument permits nonlinear encoders and feedback on a public input-independent schedule. + +Put \(\delta=2-2^t\). The difference between total price and total credits is \(\sum_{\rm exceptional}(r_e^t-c_e)-\delta n\). Since \(2^{9/10}>7/4\) and \(3^{9/10}>5/2\), every exceptional term exceeds \(2\delta\). This follows from \(c_e=0\) for \(r_e=1\), \(c_e\le1\) for \(r_e=2\), and \(c_e\le2\) for \(r_e\ge3\). Substituting the bound on \(n\) gives + +\[ +\sum_e r_e^t-5m +\ \ge\ (1-\delta)u+v+w ++\sum_{\rm exceptional}(r_e^t-c_e-2\delta)\ \ge\ 0 . +\] + +At equality all excesses vanish, there are no exceptional MOVEs and \(n=0\). Every charged MOVE then has rank one. The common-hub construction proves sharpness for the stated geometry. ∎ + +## 4. Consequences at the trial exponent + +At \(\kappa=0.00389046\) the full original raw BIT word has about 0.132405116497 more paid than productive moment. In the particular hypothetical substitution of two paid rank-one occurrences by one rank-two occurrence, each substitution saves \(2-2^{1-\kappa}\). The least integer number needed is 25. With 24 the raw margin is already negative. With 25 the checked 268-factor supplier price, the six ordinary stage bills, the 48-call positive price and all 58 signed gates pass their numerical inequalities. These calculations assume the stated actual new histogram and compatible ownership and resource bounds. They give a price for a future construction. [Directed arithmetic](PRICE.json) + +For the two displayed local readout variants, 46 and 90 zero coordinates are sufficient activation conditions. An integer transport additionally bounds a precisely defined pricing rule in which a retained productive tuple witnessing all the specified support hits requires a full-rank paid tuple. The certificate covers all finite powers and both alternatives at any selected coordinate. Its upper endpoint is \(0.003890115286594461129996943\). Exact linear cancellation among surviving nonzero fields is a different possible activation condition. [Guard theorem and certificate scope](GUARDS.md) diff --git a/research/p104-chart510-transfer-bound/README.md b/research/p104-chart510-transfer-bound/README.md new file mode 100644 index 0000000000..e81e23d9a4 --- /dev/null +++ b/research/p104-chart510-transfer-bound/README.md @@ -0,0 +1,25 @@ +# The chart-510 transfer bound and a restricted two-MOVE rewrite + +**Five rank-one MOVEs are optimal for the chart-510 block on arbitrary inputs with the specified exterior traffic.** This permits new intermediate projectors, free local recoding and both chart-1 deliveries delayed to their first actual readers. The optimum requires the original hub. The proof follows the clock 8105 nomination in the upstream handoff. [Proof](PROOF.md) · [Historical spaces and geometry](HISTORY.md) · [Prior investigation](https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19799234) + +**Two MOVEs can be removed exactly on a codimension-two subspace.** A concrete rewrite redelivers the two chart-1 exports using fields already held there. It keeps all 3,433 private clears, adds 30 cochart ADDs and needs two specified helper XORs to vanish. In the unrestricted 630-input map the new rank is 628. On constant fields in the actual 36-call order, rewriting any *m* local calls changes the rank from 18,906 to 18,906 − 2*m*. The separate direct-sum theorem establishes a 5*m* minimum for any number of clean independent instances. A final decoder can repair the loss with exactly two side bits per rewritten call on constants. For one invocation, exactly 60 pairs of original helpers can supply the two observations. [Literal witness and collisions](REWRITE.json) · [Proof and assumptions](PROOF.md) + +At the target 0.00389046, 25 exact replacements of two rank-one charges by one rank-two charge would suffice in the stated 268-factor price model. Twenty-four already fail at the raw level. The two concrete readout variants also have an ordered transport certificate for their full-rank Cartesian support model. This leaves a concrete construction obligation for the powered word and its complete invoice. The strongest complete open result used here is **conditional κ ≥ 0.0038901152865907**. [Directed trial prices](PRICE.json) · [Support theorem](GUARDS.md) · [Complete comparator](https://github.com/CrocSwap/integer-mult-bounds/pull/8035) + +## Reproduction + +From the repository root with CPython 3.12, run + +```sh +python3.12 -IB scripts/research_package.py --package research/p104-chart510-transfer-bound +``` + +All scientific inputs are in this directory. The run authenticates the literal tapes, reconstructs the historical rank certificates, checks the changed map and its adjoint, exercises representative caller subsets, reproduces the directed prices, validates the integer transport and rejects a corrupted flow. The direct-sum argument and the all-subsets block matrix argument are mathematical proofs in [PROOF.md](PROOF.md). + +## Prior work and credit + +Ali Romman supplied the 111-port word, the two physical suppliers and the single-band implementation. ToikY identified clock 8105 after exhausting two fixed-frame repair families. The #7852 toolkit of DreamingOfClouds motivated the campaign. Its family ceiling is a separate result. The #8034 proof supplies the ordered-transport method and #8035 supplies the signed price comparison. Clear1nsight prepared this investigation with substantial OpenAI Codex assistance in proof development, implementation, independent computational checks and writing. The retained notice credits the paired caller and earlier work. [Literal source](https://github.com/CrocSwap/integer-mult-bounds/pull/8027) · [Single-band implementation](https://github.com/CrocSwap/integer-mult-bounds/pull/8030) · [Ordered transport](https://github.com/CrocSwap/integer-mult-bounds/pull/8034) · [Source notice](PARENT-NOTICE) + +## Open next questions + +Can a paid exterior packet carry one of the missing helper parities while its displaced reader can still recover its original value on time? An equal-cost reroute must first bind that packet to an actual source and deadline. A powered use of the restricted word instead needs a schedule that proves the two XORs vanish on the carried jobs, preserves every retained productive rank and prices all charged tuples. diff --git a/research/p104-chart510-transfer-bound/REWRITE.json b/research/p104-chart510-transfer-bound/REWRITE.json new file mode 100644 index 0000000000..acabfc7044 --- /dev/null +++ b/research/p104-chart510-transfer-bound/REWRITE.json @@ -0,0 +1,154 @@ +{ + "agreement_dimension": 628, + "changed_chart_one_history_rank": 503, + "changed_map_rank": 628, + "cochart_adds": [ + 29301, + 29331 + ], + "collision_inputs": [ + [ + 92, + 99, + 203, + 210, + 231, + 428, + 433, + 434, + 435, + 448, + 449, + 473, + 516, + 582 + ], + [ + 63, + 174, + 222, + 230, + 362, + 367, + 368, + 369 + ] + ], + "helper_probe_choices_a": [ + 231, + 428, + 433, + 434, + 435, + 448, + 449, + 473, + 516, + 582 + ], + "helper_probe_choices_b": [ + 222, + 230, + 362, + 367, + 368, + 369 + ], + "paid_grade_one": [ + 1348, + 1346 + ], + "paid_moves": [ + 2803, + 2801 + ], + "private_clears": 3433, + "public_rows": 630, + "rank_with_all_changed_outputs_and_chart_one_history": 628, + "recovering_original_helper_pairs": 60, + "residual_a": [ + 266, + 268, + 274, + 279, + 291, + 293, + 316, + 400, + 401, + 407, + 413, + 414, + 421, + 422, + 425, + 428, + 434, + 437, + 445, + 449, + 452, + 500, + 501, + 512, + 513, + 569, + 570, + 578, + 579 + ], + "residual_b": [ + 254, + 255, + 258, + 259, + 276, + 361, + 365, + 367, + 393, + 431, + 442, + 458, + 459, + 465, + 472, + 482, + 497, + 512 + ], + "residual_collision_pairing": [ + [ + 1, + 0 + ], + [ + 0, + 1 + ] + ], + "signature_a": [ + 92, + 99, + 231, + 428, + 433, + 434, + 435, + 448, + 449, + 473, + 516, + 582 + ], + "signature_b": [ + 63, + 222, + 230, + 362, + 367, + 368, + 369 + ], + "tested_helper_pair_domain": 83028 +} diff --git a/research/p104-chart510-transfer-bound/SOURCES.json b/research/p104-chart510-transfer-bound/SOURCES.json new file mode 100644 index 0000000000..0b4ccdf4ee --- /dev/null +++ b/research/p104-chart510-transfer-bound/SOURCES.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1", + "usage": "provenance" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + } + ], + "vendored_graph": { + "repository": "https://github.com/aliromman/integer-mult-bounds", + "pull_request": 8027, + "head": "fb9b6a7b0d27da1cf98430893a3016bf811e2aa4", + "path": "research/p104-live-relative-gain/BINARY-CANDIDATE.json.gz", + "local_path": "strong-bit.json.gz", + "git_blob": "16f8cafb1c4d139a99a62e46eb40c118e6176c34", + "sha256": "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326", + "expanded_sha256": "b096d6df2a0c4688296b13ab0cfd50fec1c7dec732819c624ddd7a745a144b69", + "provenance_note": "Unchanged external PR bytes; the byte and blob equality is checked locally. Complete source Git history is not contained in this package." + }, + "vendored_caller": { + "repository": "CrocSwap/integer-mult-bounds", + "head": "e54523517d0f03e58352e647c403a5af3e525a57", + "path": "research/paired-query-only-bit/EFREE-CALLER.json.gz", + "local_path": "EFREE-CALLER.json.gz", + "git_blob": "f022272a8d51ede841778dec76e2bfb24b614d04", + "sha256": "757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b" + }, + "mathematical_dependencies": [ + { + "pr": 8030, + "head": "6285dd829114705862e8d91facaedc1f31d3cfcb", + "use": "StrongBinarySource.raw binds distinct LOCAL helper bank tags; conservative rational rank arithmetic." + }, + { + "pr": 8033, + "head": "a1313ff9f84fd00d50b282fe432e522191277821", + "use": "268-factor supplier and Jensen split weight." + }, + { + "pr": 8034, + "head": "5251f24363ea1c20bd1cb10ae18ba85f54212394", + "use": "Ordered transport proof for complete-rank support billing." + }, + { + "pr": 8035, + "head": "ea776471bf8ed143a0625cf2d7532f65d15eb5f9", + "use": "Complete conditional comparator, both signed supplier prices and variable stop exponent." + } + ], + "transport_sha256": "1286d70972e70431abfc4433858429a58c6602ff834bf8cad64e3c94ef1476c2" +} diff --git a/research/p104-chart510-transfer-bound/TASK.json b/research/p104-chart510-transfer-bound/TASK.json new file mode 100644 index 0000000000..940d6472c0 --- /dev/null +++ b/research/p104-chart510-transfer-bound/TASK.json @@ -0,0 +1,87 @@ +{ + "schema_version": 1, + "task_id": "selected-stock-envelope", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "selected-stock-envelope", + "question": "What explicit uniform stock envelope does the actual selected stopped producer supply at one bootstrap stage?", + "starting_points": [ + "research/selected-bootstrap-stock-audit/README.md", + "research/bootstrap-cutoff-time-space-split/README.md", + "certificates/selected-result.json", + "docs/research/community-efficient1000-review.md", + "research/stock-margin-chain/README.md" + ], + "methods": [ + "Derive a source-bound reserve recurrence at the actual selected atom widths, separating parent stock from completed inner borrowing.", + "Find an exact missing implication or counterexample to a proposed selected-stage stock envelope." + ], + "acceptance_gate": "Bind every coefficient and depth factor to the selected producer and state the width domain. Compare a proved envelope with the sufficient cutoff guard; a large numerical headroom or a historical m=120 coefficient is not a selected m=73 proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "Choose one actual selected producer/stage and derive its parent reserve and depth coefficient from source. Check whether newer handoffs already cover that exact obligation. Stop with the missing implementation lemma if it cannot be bounded; do not rerun #2972 cutoff/headroom arithmetic as a new contribution.", + "bottleneck_link": "This reduces a concrete inherited implementation obligation without confusing unchanged kappa arithmetic with a completed theorem.", + "allowed_variations": [ + "One stage or one explicit reserve/depth implication.", + "An independently checked same-domain proof repair, retaining all remaining assumptions." + ], + "scope_change_triggers": [ + "Importing the historical 57604 or 252 allowance without a selected-producer binding.", + "Calling a conditional fit lemma a full outer-proof adoption.", + "Replacing an actual selected stock coefficient with cutoff comparisons or a conditional fit inequality." + ], + "overlap_terms": [ + "selected stock", + "stock envelope", + "bootstrap cutoff", + "1956", + "1965", + "1990", + "2972", + "stock-margin-chain", + "actual_stock_coefficient" + ], + "existing_checks": [ + { + "scope": "Retained stock audit identifies missing actual selected-stage coefficients; later cutoff-chain arithmetic does not supply them.", + "evidence": "docs/research/research-family-status.md#revision-6-handoffs-source-archives-awaiting-independent-validation", + "remaining": "Derive one actual reserve/depth coefficient from the selected producer.", + "status": "reviewed", + "source_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "scope_change_reason": "The user requested a proof about the next paid BIT gain on the live open comparator. ToikY nominated the actual clock 8105; this investigates the time-dependent source, the changed native map and its price.", + "actual_scope": "Sharp chart-510 timed transfer minimum, exact codimension-two rewrite, independent-instance communication theorem and a certified obstruction for two Boolean support tests.", + "bottleneck_link": "Priced two-hop savings would clear the 0.00389046 BIT gate only with correct complete transfers and charges.", + "stop_rule": "Authenticate both tapes, price the 24/25 boundary, replay both operators, verify the timed cuts and ordered transport. Any further physical use needs a changed incidence or a proved powered activation condition.", + "outcome": "completed", + "evidence": "PROOF.md, HISTORY.json, REWRITE.json, CALLER.json, PRICE.json, TRANSPORT.txt.gz and registered replay.", + "author": "Clear1nsight", + "ai_assistance": "OpenAI Codex materially assisted the parameter search, proof, implementation and verification.", + "open_questions": [ + { + "question": "Can a changed exterior send carry a missing helper XOR and restore its original reader?", + "why_it_matters": "It changes the fixed exterior premise of the sharp cost proof.", + "first_step": "Name a live payer, its sender and recipient histories, and the first read of the displaced data.", + "blocked_by": "A legal, fully charged replacement that preserves both values." + }, + { + "question": "Can correlated helper XORs vanish through a synchronized powered execution?", + "why_it_matters": "Linear cancellation permits cases outside the proved Boolean full-rank tariff.", + "first_step": "Bind an explicit retained family to both residual equations and replay one complete paid emission schedule.", + "blocked_by": "Proof of zero through intermediate frames, paid-owner returns and a compatible complete invoice." + } + ] +} diff --git a/research/p104-chart510-transfer-bound/TRANSPORT.txt.gz b/research/p104-chart510-transfer-bound/TRANSPORT.txt.gz new file mode 100644 index 0000000000..6450dda223 Binary files /dev/null and b/research/p104-chart510-transfer-bound/TRANSPORT.txt.gz differ diff --git a/research/p104-chart510-transfer-bound/VERIFY.json b/research/p104-chart510-transfer-bound/VERIFY.json new file mode 100644 index 0000000000..31572ec3b1 --- /dev/null +++ b/research/p104-chart510-transfer-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Replay the two literal tapes, historical chart geometry, changed map and transpose, the constant-field caller, directed supplier prices and the ordered support certificate with a corruption control." + } + ] +} diff --git a/research/p104-chart510-transfer-bound/constant_caller.py b/research/p104-chart510-transfer-bound/constant_caller.py new file mode 100644 index 0000000000..d3cd64f6ca --- /dev/null +++ b/research/p104-chart510-transfer-bound/constant_caller.py @@ -0,0 +1,186 @@ +#!/usr/bin/env python3 +"""Check the changed native map and its composition in the literal 36-call caller. + +Run: python3 -IB constant_caller.py strong-bit.json.gz EFREE-CALLER.json.gz + +Standard library only, with two byte-pinned inputs supplied on the command +line. Outer-call checks restrict physical fields to constant binary fields, +on which every address permutation/route is the identity. All root and helper +inputs are separate formal bits. This subset witnesses loss of information. +The separately reviewed #8035 adapter binds each LOCAL helper to the distinct +owner tag ("helper", clock, i); the two supplied tapes do not encode that +adapter or prove this ownership premise by themselves. +""" +import argparse +from collections import Counter +from functools import reduce +from hashlib import sha256 +from itertools import chain +import gzip +import json +from operator import xor +from pathlib import Path + +ap = argparse.ArgumentParser(description=__doc__) +ap.add_argument('graph',type=Path) +ap.add_argument('caller',type=Path) +args = ap.parse_args() +graph_bytes,caller_bytes = args.graph.read_bytes(),args.caller.read_bytes() +assert sha256(graph_bytes).hexdigest() == '74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' +assert sha256(caller_bytes).hexdigest() == '757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b' +G = json.loads(gzip.decompress(graph_bytes)) +C = json.loads(gzip.decompress(caller_bytes)) +P = G['program'] +N = G['public'] +assert N == 630 + +# Independently construct the literal changed program. +A = [2336,2344,2416,2439,2448,2451,2482,2655,2698] +B = [2359,2362,2372,2394,2397,2408,2416,2419,2425,2431,2434,2465,2484,2518,2530,2571,2576,2584,2600,2617,2623,2626,2778] +assert P[10034:10040] == [['INIT',2828,510],['ADD',2828,2337,510],['MOVE',2828,510,1],['INIT',2829,510],['ADD',2829,2335,510],['MOVE',2829,510,1]] +Q = P[:10034] + [['INIT',2828,1]] + [['ADD',2828,i,1] for i in B] + [['INIT',2829,1]] + [['ADD',2829,i,1] for i in A] + P[10040:] + +def run(program): + chart = dict(enumerate(G['start'])) + val = {i:1 << i for i in range(N)} + for op,d,*args in program: + if op == 'INIT': + assert d not in chart + chart[d], val[d] = args[0], 0 + elif op == 'ADD': + s,c = args + assert chart[d] == chart[s] == c + val[d] ^= val[s] + elif op == 'SWAP': + s, = args + chart[d],chart[s] = chart[s],chart[d] + val[d],val[s] = val[s],val[d] + elif op == 'MOVE': + u,v = args + assert chart[d] == u + chart[d] = v + elif op == 'CLEAR': + assert chart.pop(d) == args[0] + del val[d] + else: + raise AssertionError(op) + assert chart == dict(enumerate(G['final'])) and set(val) == set(range(N)) + return [val[i] for i in range(N)] + +def bits(x): + return [i for i in range(x.bit_length()) if x >> i & 1] + +def parity(x): + return x.bit_count() % 2 + +def rank(rows): + pivots = {} + for row in rows: + while row: + k = row.bit_length() + if k not in pivots: + pivots[k] = row + break + row ^= pivots[k] + return len(pivots) + +def apply(rows, x): + return sum(parity(row & x) << i for i,row in enumerate(rows)) + +orig, changed = run(P),run(Q) +assert all(orig[i] == ((1 << i) ^ ((1 << (i-111)) if 111 <= i < 222 else 0)) for i in range(N)) +ra = sum(1 << i for i in [266,268,274,279,291,293,316,400,401,407,413,414,421,422,425,428,434,437,445,449,452,500,501,512,513,569,570,578,579]) +rb = sum(1 << i for i in [254,255,258,259,276,361,365,367,393,431,442,458,459,465,472,482,497,512]) +sa = sum(1 << i for i in [92,99,231,428,433,434,435,448,449,473,516,582]) +sb = sum(1 << i for i in [63,222,230,362,367,368,369]) +assert all((orig[i]^changed[i]) == ((ra if sa>>i&1 else 0)^(rb if sb>>i&1 else 0)) for i in range(N)) +assert rank([ra,rb]) == rank([sa,sb]) == 2 +assert rank(orig) == 630 and rank(changed) == 628 + +# Local helper output block: H'=(I+U^h R)H. No main input enters H'. +assert all(not (changed[i] & ((1 << 222)-1)) for i in range(222,630)) +assert all((changed[i] & ((1 << 222)-1)) == orig[i] & ((1 << 222)-1) for i in range(222)) +helper_coupling = [[parity(r & s) for s in (sa,sb)] for r in (ra,rb)] +assert helper_coupling == [[1,0],[0,1]] +assert rank(changed[222:]) == 406 +assert reduce(xor,(changed[i] for i in bits(ra)),0) == 0 +assert reduce(xor,(changed[i] for i in bits(rb)),0) == 0 + +# M is the main-pair CNOT and is its own inverse. Read its inverse on S. +ka,kb = apply(orig,sa),apply(orig,sb) +coupling = [[parity(r & k) for k in (ka,kb)] for r in (ra,rb)] +assert coupling == [[1,0],[0,1]] +assert apply(changed,ka) == apply(changed,kb) == 0 +assert apply(orig,ka) == sa and apply(orig,kb) == sb + +assert C['ports']==111 and C['roles']==38 +assert Counter(row[0] for row in C['events']) == {'ADD':362,'SWAP':364,'LOCAL':36,'IDLE_ONE':32,'QUERY':4} +total = 38*111+36*408 +assert total == 18906 +asig,bsig = bits(sa),bits(sb) +ares,bres = bits(ra),bits(rb) + +def outer(changed_calls): + roots = [[1 << (r*111+p) for p in range(111)] for r in range(38)] + helper_outputs = [] + local_number = 0 + for row in C['events']: + op,*args = row + if op == 'LOCAL': + stage,x,y = args + helpers = [1 << (38*111+local_number*408+i) for i in range(408)] + # Original normalized native transform, valid at all constant fields. + for p in range(111): + roots[y][p] ^= roots[x][p] + if local_number in changed_calls: + aval = reduce(xor,(helpers[i-222] for i in ares),0) + bval = reduce(xor,(helpers[i-222] for i in bres),0) + for signature,value in ((asig,aval),(bsig,bval)): + for i in signature: + if i < 111: + roots[x][i] ^= value + elif i < 222: + roots[y][i-111] ^= value + else: + helpers[i-222] ^= value + helper_outputs.extend(helpers) + local_number += 1 + elif op in ('ADD','QUERY'): + x,y = args + for p in range(111): + roots[x][p] ^= roots[y][p] + elif op == 'SWAP': + x,y = args + roots[x],roots[y] = roots[y],roots[x] + elif op == 'IDLE_ONE': + pass + else: + raise AssertionError(row) + assert local_number == 36 + return list(chain.from_iterable(roots)),helper_outputs + +outer_results = {} +cases = {f'first_{m}':set(range(m)) for m in (0,1,2,18,25,36)} +cases.update({'last_1':{35},'even_18':set(range(0,36,2)), + 'last_25':set(range(11,36))}) +for label, selected in cases.items(): + m = len(selected) + rootrows,helpers = outer(selected) + total_rank = rank(chain(rootrows,helpers)) + helper_rank = rank(helpers) + # This establishes independent full-rank root input freedom, despite all + # local-pair roots being shared and correlated across the 36 invocations. + root_restriction = rank(r & ((1 << (38*111))-1) for r in rootrows) + assert total_rank == total-2*m + assert helper_rank == 36*408-2*m + assert root_restriction == 38*111 + # The caller's separate helper banks keep the (231,222) probes distinct. + probes = [1 << (38*111 + j*408 + h-222) for j in selected for h in (231,222)] + augmented = rank(chain(rootrows, helpers, probes)) + assert augmented == total + if m == 0: + assert rootrows == [1 << i for i in range(38*111)] + assert helpers == [1 << i for i in range(38*111,total)] + outer_results[label] = {'m':m,'rank':total_rank,'nullity':total-total_rank,'helper_output_rank':helper_rank,'root_input_restriction_rank':root_restriction,'rank_with_original_helper_pair_per_changed_call':augmented} + +print(json.dumps({'original_rank':rank(orig),'changed_rank':rank(changed),'residual_signature_coupling':coupling,'helper_residual_signature_coupling':helper_coupling,'changed_helper_rank':rank(changed[222:]),'collision_a_nonzero_input':bits(ka),'collision_b_nonzero_input':bits(kb),'collision_a_original_output':bits(sa),'collision_b_original_output':bits(sb),'caller_model':'constant binary fields; independent 38*111 root and 36*408 per-call helper fields; unique helper owners at each LOCAL','caller_rows':total,'caller_cases':outer_results,'all_subset_rank':'18906-2m, by block triangularity and distinct helper owners'},indent=2,sort_keys=True)) diff --git a/research/p104-chart510-transfer-bound/history_proof.py b/research/p104-chart510-transfer-bound/history_proof.py new file mode 100644 index 0000000000..e4abfab31e --- /dev/null +++ b/research/p104-chart510-transfer-bound/history_proof.py @@ -0,0 +1,293 @@ +"""Verify the temporal exterior-span premise and every optimal hub for chart 510. + +Usage: python3 -I -B history_proof.py /path/to/strong-bit.json.gz +A directory containing strong-bit.json.gz is also accepted. Standard library only. +""" + +import argparse +from collections import Counter +from fractions import Fraction +from gzip import decompress +from hashlib import sha256 +from itertools import combinations +import json +from pathlib import Path + + +SOURCE_SHA = '74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' +EXPANDED_SHA = 'b096d6df2a0c4688296b13ab0cfd50fec1c7dec732819c624ddd7a745a144b69' +MOVES = { + 8105: (2335, 330, 510), 8113: (2337, 331, 510), + 10036: (2828, 510, 1), 10039: (2829, 510, 1), 11017: (3151, 510, 328), +} +EARLY = 11021 +FIRST_AT_TOP = 29578 +LAST_AT_TOP = 29847 + + +class Span: + """An echelon basis of binary linear forms on the 630 native public inputs.""" + + def __init__(self, pivots=None): + self.pivots = {} if pivots is None else pivots.copy() + + def remainder(self, word): + while word: + other = self.pivots.get(word.bit_length()) + if other is None: + break + word ^= other + return word + + def contains(self, word): + return self.remainder(word) == 0 + + def insert(self, word): + word = self.remainder(word) + if word: + self.pivots[word.bit_length()] = word + + def extend(self, other): + for word in other.pivots.values(): + self.insert(word) + + @classmethod + def pool(cls, bases): + result = cls() + for basis in bases: + result.extend(basis) + return result + + def defect(self, words): + extension = Span(self.pivots) + for word in words: + extension.insert(word) + return len(extension.pivots) - len(self.pivots) + + +def replay(word, substitutions, checkpoints, observe, *, check_full=False): + n = word['public'] + charts = dict(enumerate(word['start'])) + forms = {i: 1 << i for i in range(n)} + history = {int(i): Span() for i in word['frames']} + for i, form in forms.items(): + history[charts[i]].insert(form) + move_forms = {} + for clock, (op, dest, *args) in enumerate(word['program']): + if clock in checkpoints: + observe(clock, history) + if clock == max(checkpoints) and not check_full: + return + touched = (dest,) + if op == 'INIT': + assert dest >= n and dest not in forms + charts[dest], forms[dest] = args[0], 0 + elif op == 'ADD': + src, chart = args + assert charts[src] == charts[dest] == chart + forms[dest] ^= forms[src] + elif op == 'SWAP': + src, = args + charts[dest], charts[src] = charts[src], charts[dest] + forms[dest], forms[src] = forms[src], forms[dest] + touched = (dest, src) + elif op == 'MOVE': + before, after = args + assert charts[dest] == before + if clock in MOVES: + assert (dest, before, after) == MOVES[clock] + move_forms[clock] = forms[dest] + charts[dest] = after + if clock in substitutions: + forms[dest] = substitutions[clock] + else: + assert op == 'CLEAR' and dest >= n and charts.pop(dest) == args[0] + forms.pop(dest) + touched = () + for i in touched: + history[charts[i]].insert(forms[i]) + assert check_full and not substitutions + assert charts == dict(enumerate(word['final'])) and n == len(forms) == 630 + for i, form in forms.items(): + expected = 1 << i + if 111 <= i < 222: + expected ^= 1 << (i - 111) + assert form == expected + return move_forms + + +def true_readers(word): + # Check all post-export owner mutations as well as all non-clear readers. + born = {reg: clock for clock, (reg, _, _) in MOVES.items()} + readers = {reg: [] for reg in born} + for clock, (op, dest, *args) in enumerate(word['program']): + if dest in born and clock > born[dest]: + assert op == 'CLEAR' + if op in ('ADD', 'SWAP') and args[0] in born and clock > born[args[0]]: + assert op == 'ADD' + readers[args[0]].append(clock) + assert readers[2335] == [10038,11015] and readers[2337] == [10035,11016] + first = {reg: readers[reg][0] for reg in (3151,2828,2829)} + assert first == {3151: EARLY, 2828: FIRST_AT_TOP, 2829: LAST_AT_TOP} + return first + + +def rational_rows(rows): + """Canonical reduced echelon row space over Q in the native eight coordinates.""" + rows = [list(map(Fraction, row)) for row in rows] + r = 0 + for column in range(8): + pivot = next((i for i in range(r, len(rows)) if rows[i][column]), None) + if pivot is None: + continue + rows[r], rows[pivot] = rows[pivot], rows[r] + divisor = rows[r][column] + rows[r] = [x / divisor for x in rows[r]] + for i, row in enumerate(rows): + if i != r and row[column]: + mul = row[column] + rows[i] = [x - mul * y for x, y in zip(row, rows[r])] + r += 1 + return tuple(tuple(row) for row in rows[:r]) + + +def row_subset(small, big): + # A canonical echelon basis has 1 in its pivot column and 0 in every other pivot. + pivots = [(next(j for j, x in enumerate(row) if x), row) for row in big] + for row in small: + v = list(row) + for j, basis_row in pivots: + multiplier = v[j] + if multiplier: + v = [x - multiplier*y for x,y in zip(v,basis_row)] + if any(v): + return False + return True + + +def charts_and_geometry(word): + dims = {} + geometry = {} + for k, f in word['frames'].items(): + i = int(k) + rank = dims[i] = f['dim'] + image, kernel = rational_rows(f['B']), rational_rows(f['A']) + assert len(image) == rank and len(kernel) == 8 - rank + assert len(rational_rows(f['B'] + f['A'])) == 8 + geometry[i] = (image,kernel) + assert len(set(geometry.values())) == len(geometry) == 636 + assert {d: n for d,n in sorted(Counter(dims.values()).items())} == { + 0:1, 1:111, 2:153, 4:70, 6:180, 7:120, 8:1, + } + assert [dims[i] for i in (330,331,328,510,1)] == [6,6,6,7,8] + def below(i,h): + image, kernel = geometry[i] + big_image, big_kernel = geometry[h] + return row_subset(image,big_image) and row_subset(big_kernel,kernel) + assert all(below(i,510) for i in (330,331,328)) and below(510,1) + image_sum = len(rational_rows(geometry[330][0] + geometry[331][0])) + kernel_sum = len(rational_rows(geometry[330][1] + geometry[331][1])) + kernel_intersection = 2 + 2 - kernel_sum + assert image_sum == 7 and kernel_intersection == 1 + return dims, below, image_sum, kernel_intersection + + +def check_early(history, dims, below, a, b): + c = a ^ b + high = Span.pool(s for i,s in history.items() if dims[i] >= 7) + top = Span.pool(s for i,s in history.items() if dims[i] >= 8) + pooled = Span.pool((high, history[328])) + high_rank, top_rank, c_rank = len(high.pivots), len(top.pivots), len(history[328].pivots) + assert (high_rank,top_rank,c_rank,len(pooled.pivots)) == (501,501,2,501) + assert not history[328].contains(c) and not pooled.contains(c) + sites = [i for i,d in dims.items() if d == 6] + projected = {'a':[], 'b':[], 'a+b':[]} + for i in sites: + gift = Span(pooled.pivots) + gift.extend(history[i]) + for name, form in [('a',a), ('b',b), ('a+b',c)]: + if gift.contains(form): + projected[name].append(i) + assert projected == {'a':[330], 'b':[331], 'a+b':[]} + + # For a known hub H all its true local exterior gifts are admitted as well. + hub_neighbours = {} + matched = [] + tested = 0 + for h,d in dims.items(): + if d != 7 or not below(328,h): + continue + neighbours = sorted(i for i in sites if below(i,h)) + hub_neighbours[h] = neighbours + for i,j in combinations(neighbours, 2): + tested += 1 + gift = Span.pool(history[k] for k in (328,h,i,j)) + if gift.contains(c): + matched.append((i,j,h)) + assert sorted(hub_neighbours) == [510,530] and tested == 6 + assert matched == [(330,331,510)] + + # A genuinely new hub starts with zero exterior stock. Drop its geometry and + # test every pair, including ones that could never be nested under a common hub. + new_matches = [] + new_tests = 0 + for i,j in combinations(sites, 2): + new_tests += 1 + gift = Span.pool(history[k] for k in (328,i,j)) + if gift.contains(c): + new_matches.append((i,j)) + assert new_tests == 16110 and new_matches == [(330,331)] + return {'rank_ge_7':high_rank, 'rank_ge_8':top_rank, 'background_rank_328':c_rank, + 'rank6_single_site_pool_matches':projected, 'rank7_hubs_over_328':hub_neighbours, + 'listed_donor_pairs_tested':tested, 'listed_feasible_endpoints':matched, + 'new_hub_donor_pairs_tested':new_tests, 'new_hub_donor_pairs':new_matches} + + +def main(): + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('tape', type=Path) + args = p.parse_args() + tape = args.tape / 'strong-bit.json.gz' if args.tape.is_dir() else args.tape + compressed = tape.read_bytes() + assert sha256(compressed).hexdigest() == SOURCE_SHA + expanded = decompress(compressed) + assert sha256(expanded).hexdigest() == EXPANDED_SHA + word = json.loads(expanded) + assert len(word['program']) == 39600 and word['owned_fields'] == 3433 + moves = replay(word, {}, set(), None, check_full=True) + a, b = moves[8105], moves[8113] + c = a ^ b + assert (a.bit_count(), b.bit_count(), (a & b).bit_count()) == (30,41,0) + assert [moves[k] for k in (10036,10039,11017)] == [b,a,c] + first = true_readers(word) + dims, below, image_sum, kernel_intersection = charts_and_geometry(word) + neutral = dict.fromkeys(MOVES, 0) + results = {'tape_sha256': SOURCE_SHA, 'expanded_sha256': EXPANDED_SHA, + 'public_inputs':word['public'], 'instructions':len(word['program']), + 'first_exterior_read':first} + def early(clock, history): + results['early_cut'] = check_early(history, dims, below, a, b) + replay(word, neutral, {EARLY}, early) + # Gift the authentic c at 328 at its nominal delivery, so every one of its + # chronological exterior descendants is included when proving the late cuts. + restore_c = neutral.copy() + restore_c[11017] = c + results['late_cut'] = {} + def late(clock, history): + counts = {} + for threshold, expected in ((7,614),(8,503)): + base = Span.pool(s for i,s in history.items() if dims[i] >= threshold) + assert len(base.pivots) == expected and base.defect([a,b]) == 2 + counts[threshold] = {'background_rank':expected, 'additional_rank_ab':2} + results['late_cut'][clock] = counts + replay(word, restore_c, {FIRST_AT_TOP, LAST_AT_TOP}, late) + assert Fraction(9,10) < 1 - Fraction('0.00389046') <= 1 and 6**9 > 5**10 + results.update({'rank6_source_image_sum_dimension':image_sum, + 'rank6_source_kernel_intersection_dimension':kernel_intersection, + 'minimum_paid_price':5, 'required_rank_one_transfers':5, + 'optimal_source_charts':[330,331], 'optimal_hub_projector_chart':510}) + print(json.dumps(results, indent=2, sort_keys=True)) + + +if __name__ == '__main__': + main() diff --git a/research/p104-chart510-transfer-bound/joint_verify.py b/research/p104-chart510-transfer-bound/joint_verify.py new file mode 100644 index 0000000000..86dc345ab6 --- /dev/null +++ b/research/p104-chart510-transfer-bound/joint_verify.py @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Verify two chart-510 residual readouts and an ordered abstract support transport. + +Usage: python3 -IB joint_verify.py +The authenticated graph, caller, and witness are adjacent by default. +An intersection is an abstract sufficient witness for BOTH support-nonempty +conditions; it is not a test that an actual whole field is zero. +""" +from argparse import ArgumentParser +from array import array +from collections import Counter +from fractions import Fraction +from functools import cache +from hashlib import sha256 +from itertools import chain +from pathlib import Path +import gzip +import json +import sys + +HERE=Path(__file__).resolve().parent +sys.path.insert(0,str(HERE)) +from zero_support import packed_counts + +TRIAL=Fraction('0.003890115286594461129996943') +SCALE=10**30 +EXPECTED_SHA='1286d70972e70431abfc4433858429a58c6602ff834bf8cad64e3c94ef1476c2' +GRAPH_SHA='74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' +CALLER_SHA='757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b' +# A reads 2335 (clock 10039); B reads 2337 (clock 10036). +READOUTS={ + '90':{'a':[2330,2336,2344,2367,2416,2482,2542], + 'b':[2327,2330,2336,2339,2354,2370,2372,2375,2382,2385,2387,2404,2506,2510,2513,2518,2629]}, + '46':{'a':[2336,2344,2416,2439,2448,2451,2482,2655,2698], + 'b':[2359,2362,2372,2394,2397,2408,2416,2419,2425,2431,2434,2465,2484,2518,2530,2571,2576,2584,2600,2617,2623,2626,2778]}, +} +RESIDUALS={ + '90':{'a':[266,268,274,279,291,293,316,322,400,401,407,409,410,413,414,417,421,422,425,428,434,437,445,449,452,500,501,512,513,534,569,570,578,579], + 'b':[225,226,227,233,234,237,240,242,243,245,246,248,249,251,253,254,334,341,342,346,357,360,365,366,367,371,372,374,375,377,381,386,387,388,390,458,461,467,468,469,472,477,484,489,490,509,522,538,539,553,554,556,571,573,589,610]}, + '46':{'a':[266,268,274,279,291,293,316,400,401,407,413,414,421,422,425,428,434,437,445,449,452,500,501,512,513,569,570,578,579], + 'b':[254,255,258,259,276,361,365,367,393,431,442,458,459,465,472,482,497,512]}, +} + + +# Outward log/exp arithmetic from the #8030 independent binary price checker. +GRID = 1 << 112 + + +def grid_bounds(lower, upper): + lo = lower * GRID + hi = upper * GRID + return Fraction(lo.__floor__(), GRID), Fraction(hi.__ceil__(), GRID) + + +@cache +def log_ratio(z): + """Enclose 2 atanh(z) by its positive series and a geometric tail.""" + assert 0 <= z <= Fraction(1, 3) + z2 = z * z + term = z + total = Fraction(0) + for j in range(45): + total += term / (2 * j + 1) + term *= z2 + return grid_bounds(2 * total, 2 * (total + term / (91 * (1 - z2)))) + + +@cache +def log_rank(rank): + """Reduce the argument to [1,2] before evaluation.""" + k = rank.bit_length() - 1 + radix = 1 << k + low, high = log_ratio(Fraction(rank - radix, rank + radix)) + log2low, log2high = log_ratio(Fraction(1, 3)) + return low + k * log2low, high + k * log2high + + +def small_exp(x): + """Use the first 32 terms and bound all later term ratios by x/33.""" + assert 0 <= x <= 1 + term = total = Fraction(1) + for j in range(1, 32): + term *= x / j + total += term + next_term = term * x / 32 + return grid_bounds(total, total + next_term / (1 - x / 33)) + + +@cache +def rank_price(rank, exponent): + low, high = log_rank(rank) + assert exponent >= 0 + a, _ = small_exp(low * exponent / 16) + _, b = small_exp(high * exponent / 16) + return grid_bounds(a**16, b**16) + + + +def bits(mask): + out=[] + while mask: + bit=mask&-mask; out.append(bit.bit_length()-1); mask^=bit + return out + + +def run(g,program): + """Replay all independent formal fields and the exact chart/owner lifetime.""" + n=g['public']; frame=dict(enumerate(g['start'])); val={i:1<=n and d not in frame + frame[d]=args[0]; val[d]=0 + elif op=='ADD': + s,c=args; assert frame[d]==frame[s]==c + val[d]^=val[s] + elif op=='MOVE': + before,after=args; assert frame[d]==before; frame[d]=after + elif op=='SWAP': + s,=args;frame[d],frame[s]=frame[s],frame[d];val[d],val[s]=val[s],val[d] + elif op=='CLEAR': + assert d>=n and frame.pop(d)==args[0] + cleared.append((args[0],val.pop(d))) + else: raise AssertionError(op) + assert frame==dict(enumerate(g['final'])) and set(val)==set(range(n)) + return val,cleared,scratch + + +def readout(g,words,which): + p=g['program'] + if which=='b': + return p[:10034]+[['INIT',2828,1]]+[['ADD',2828,s,1] for s in words]+p[10037:] + return p[:10037]+[['INIT',2829,1]]+[['ADD',2829,s,1] for s in words]+p[10040:] + + +def inspect_readouts(g): + p=g['program']; n=g['public'] + assert n==630 + assert p[10034:10040]==[['INIT',2828,510],['ADD',2828,2337,510],['MOVE',2828,510,1],['INIT',2829,510],['ADD',2829,2335,510],['MOVE',2829,510,1]] + assert p[11014:11018]==[['INIT',3151,510],['ADD',3151,2335,510],['ADD',3151,2337,510],['MOVE',3151,510,328]] + original,old_clear,scratch=run(g,p) + for i in range(n): + expected=1<=r) + assert ordered + grouped[r,ordered]+=1 + supply=[((prices[r][0]*SCALE).__floor__()*count,r,array('I',support)) for (r,support),count in grouped.items()] + return demand,supply + + +def check(demand,supply,stream): + assert int(next(stream))==0 + left=demand.copy();spent=[0]*len(supply);count=0 + for line in stream: + i,j,x=map(int,line.split()) + if not (0<=i0 and i in supply[j][2]): + raise ValueError('Invalid or unordered transport edge') + left[i]-=x;spent[j]+=x;count+=1 + if any(left) or any(x>m for x,(m,_,_) in zip(spent,supply,strict=True)): + raise ValueError('Unpaid target or overspent paid slot') + return count + + +def pinned_json(path,digest): + data=path.read_bytes() + if sha256(data).hexdigest()!=digest: + raise ValueError(f'Wrong source bytes: {path.name}') + return json.loads(gzip.decompress(data)) + + +def main(): + parser=ArgumentParser(description=__doc__) + parser.add_argument('--graph',type=Path,default=HERE/'strong-bit.json.gz') + parser.add_argument('--caller',type=Path,default=HERE/'EFREE-CALLER.json.gz') + parser.add_argument('--certificate',type=Path,default=HERE/'TRANSPORT.txt.gz') + args=parser.parse_args() + certificate=args.certificate + if sha256(certificate.read_bytes()).hexdigest()!=EXPECTED_SHA: + raise ValueError('Transport witness does not match its authenticated digest') + g=pinned_json(args.graph,GRAPH_SHA) + c=pinned_json(args.caller,CALLER_SHA) + inspect_readouts(g) + demand,supply=inputs(g,c,rank_price) + assert (len(demand),len(supply),sum(len(s) for _,_,s in supply))==(18906,86802,6729066) + with gzip.open(certificate,'rt') as f: count=check(demand,supply,f) + assert count==114405 + with gzip.open(certificate,'rt') as f: + header=next(f);i,j,x=map(int,next(f).split()) + try:check(demand,supply,chain((header,f'{i} {j} {x-1}\n'),f)) + except ValueError as error: + assert 'Unpaid target' in str(error) + else: raise AssertionError('One-tick corruption was accepted') + print(json.dumps({'trial':str(TRIAL),'scale':SCALE,'targets':len(demand),'paid_groups':len(supply),'ordered_arcs':sum(len(s) for _,_,s in supply),'certificate_arcs':count,'certificate_sha256':EXPECTED_SHA,'readouts_checked':4,'joint_intersections_per_call':[[365,367],[428,437,445,452]],'one_tick_corruption_rejected':True})) + print('PASS_JOINT_SUPPORT_TRANSPORT') + + +if __name__=='__main__':main() diff --git a/research/p104-chart510-transfer-bound/price_audit.py b/research/p104-chart510-transfer-bound/price_audit.py new file mode 100644 index 0000000000..829966dd45 --- /dev/null +++ b/research/p104-chart510-transfer-bound/price_audit.py @@ -0,0 +1,324 @@ +#!/usr/bin/env python3 +"""Exact arithmetic screen for a hypothetical paid histogram, not a circuit rewrite. + +Run: python3 -B price_audit.py [receipt.json] +Uses only the Python standard library. The two adjacent compressed inputs are +pinned #8027 / inherited caller source bytes. The 48-call positive inventory is +from #8035's reconstructed physical word, and can be cross-checked using the +separate source_binding.py against the #8035 extracted package. +""" +from collections import Counter +from fractions import Fraction as Q +from functools import lru_cache +from hashlib import sha256 +from math import isqrt +from pathlib import Path +import gzip, json, sys + +ROOT = Path(__file__).resolve().parent +UNIT = 1 << 192 +BITS = 184 +K = Q('0.00389046') +G = Q(1, 10**17) +ORDINARY = Q('0.00389046000001') +ETA = Q(39, 10000) +RANK_LOGS = (106811524, 1708984375, 27343750000, 437500000000, + 7000000000000, 112000000000000) +M_LOG = 1600000 +Z = Q(593, 2048) +W = Q(491, 1024) +WEIGHT = Q(1, 64) +POS_C = Q(2043, 524288) + + +def ceil_div(a, b): + return -(-a // b) + + +def ceil_frac(x): + return ceil_div(x.numerator, x.denominator) + + +def floor_frac(x): + return x.numerator // x.denominator + + +def enclosing_text(lo, hi, digits=18): + """Return outward decimal endpoints, each with exactly `digits` places.""" + s = 10**digits + a, b = floor_frac(lo*s), ceil_frac(hi*s) + def form(n): + sign = '-' if n < 0 else '' + n = abs(n) + return f'{sign}{n//s}.{n%s:0{digits}d}' + return [form(a), form(b)] + + +def load_inputs(): + gp = ROOT/'strong-bit.json.gz'; cp = ROOT/'EFREE-CALLER.json.gz' + gd, cd = gp.read_bytes(), cp.read_bytes() + assert sha256(gd).hexdigest() == '74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326' + assert sha256(cd).hexdigest() == '757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b' + graph, caller = json.loads(gzip.decompress(gd)), json.loads(gzip.decompress(cd)) + dims = {int(k): v['dim'] for k,v in graph['frames'].items()} + ports = caller['ports'] + local = sum(r[0]=='LOCAL' for r in caller['events']) + assert (ports, local, caller['body_rank']) == (111,36,7) + targets, paid = Counter(), Counter() + for row in caller['diagonal']: + targets[1 + caller['body_rank'] * len(row['stages'])] += ports + for src, dst in zip(graph['start'][2*ports:], graph['final'][2*ports:], strict=True): + targets[abs(dims[dst] - dims[src])] += local + for row in graph['program']: + if row[0] == 'MOVE': paid[abs(dims[row[3]] - dims[row[2]])] += local + for row in caller['events']: + if row[0] == 'QUERY': paid[1] += ports + elif row[0] == 'IDLE_ONE': paid[len(row[2])*caller['body_rank']] += ports + assert dict(sorted(targets.items())) == BIT_TARGET + assert dict(sorted(paid.items())) == BIT_PAID + assert sum(targets.values()) == 18906 and sum(paid.values()) == 104904 + assert sum(k*v for k,v in paid.items()) == 285600 + return targets, paid + + +BIT_TARGET = {4:612,8:14520,15:444,22:444,29:444,36:444,43:444,50:444,57:444,64:444,127:222} +BIT_PAID = {1:48972,2:44892,3:1980,4:1512,5:1044,6:2916,7:480,14:444,21:444, + 28:444,35:444,42:444,49:444,56:444} +# Reconstructed from #8035's changed positive graph and caller, not the old grade-14 word. +POS_TARGET = {1:1008,2:432,3:480,4:11568,5:1584,6:48,7:672,8:1584,9:25872, + 17:1248,25:1248,33:1248,41:1248,49:1248,57:1248,65:1248,129:624} +POS_PAID = {1:183312,2:38016,3:23040,4:10848,5:15072,6:1968,7:480,8:1344, + 16:1248,24:1248,32:1248,40:1248,48:1248,56:1248} + + +@lru_cache(None) +def power_bound(rank, exponent): + """Prove lo/UNIT <= rank**exponent <= hi/UNIT for rational exponent >= 0. + + Each iterative square root is rounded outward. After BITS bits, one + additional copy of the last root encloses any nonzero fractional tail. + """ + assert rank > 0 and exponent >= 0 + n, rem_n = divmod(exponent.numerator, exponent.denominator) + den = exponent.denominator + lo = hi = rank**n * UNIT + root_lo = root_hi = rank * UNIT + for _ in range(BITS): + root_lo = isqrt(root_lo * UNIT) + z = root_hi * UNIT + root_hi = isqrt(z) + if root_hi * root_hi < z: root_hi += 1 + rem_n *= 2 + if rem_n >= den: + rem_n -= den + lo = lo * root_lo // UNIT + hi = ceil_div(hi * root_hi, UNIT) + if rem_n: hi = ceil_div(hi * root_hi, UNIT) + return lo, hi + + +def moment(hist, exponent): + lo = hi = 0 + for rank, count in hist.items(): + a,b = power_bound(rank,exponent) + lo += count*a; hi += count*b + return lo,hi + + +def raw_difference(targets, paid, c): + tl,th=moment(targets,1-c); pl,ph=moment(paid,1-c) + return Q(tl-ph,UNIT),Q(th-pl,UNIT) + + +def changed(paid, m): + assert isinstance(m,int) and 0 <= m <= paid[1]//2 + p = paid.copy(); p[1] -= 2*m; p[2] += m + assert sum(r*n for r,n in p.items()) == 285600 + assert sum(p.values()) == 104904-m + return p + + +def powered_surplus(targets, paid, c, v, z, w, weight, keep): + t=1-c + tl,th=moment(targets,t); pl,ph=moment(paid,t) + gl,gh=moment(paid,t+z); p12lo,p12hi=power_bound(12,z) + ol,oh=moment(targets,t-w); klo,khi=power_bound(keep,w) + alo,ahi=Q(pl,th),Q(ph,tl) + gamlo,gamhi=Q(gl*UNIT,th*p12hi),Q(gh*UNIT,tl*p12lo) + lamlo,lamhi=Q(ol*klo,th*UNIT),Q(oh*khi,tl*UNIT) + lo = 1-ahi**v-weight*gamhi**v-lamhi**v + hi = 1-alo**v-weight*gamlo**v-lamlo**v + assert lo<=hi + return lo,hi + + +def crossing(targets, paid): + """Directed 1e-26 bracket; monotonicity is proved in README.""" + s=10**26; center=floor_frac(K*s) + lo,hi=center-10**19,center+10**19 + assert raw_difference(targets,paid,Q(lo,s))[0] > 0 + assert raw_difference(targets,paid,Q(hi,s))[1] < 0 + while hi-lo>1: + mid=(lo+hi)//2 + a,b=raw_difference(targets,paid,Q(mid,s)) + assert a>0 or b<0, 'directed grid too coarse to decide a bisection point' + if a>0: lo=mid + else: hi=mid + return enclosing_text(Q(lo,s),Q(hi,s),26) + + +def bit_debit(v, floor, c): + scale=4*(134*127)**v*floor + assert Q(1024*floor,15*(floor-2)) < 69 and 69**100 < 2**611 + return ceil_frac(Q(611,100)+c*(scale-1).bit_length()) + + +def positive_debit(): + floor=1<<15; v=128 + assert 32*floor*4 < 9*15*(floor-2) and 9**4 < 2**5*4**4 + scale=4*(153*129)**v*floor + return ceil_frac(Q(5,4)+POS_C*(scale-1).bit_length()+1) + + +def stage_prices(c, d): + prev=Q(0); result=[] + for i,h in enumerate(RANK_LOGS): + covered=c-Q(d,h) + limit=min((249*covered+prev)/250,ETA) + rate=ORDINARY if i==len(RANK_LOGS)-1 else Q(floor_frac(limit*10**18)-1,10**18) + assert prev2 and Q(101,100)*c/Z16*4**13 and 15**v>=2*12**v + assert 512*v <= min(RANK_LOGS) + assert 2**64*(v+1)*2**(28*v)<2**(512*v) + assert 872*(Q(13,4)+Q(2,512))*(512*v)<2**(512*v) + assert L>2 + + +def main(): + targets,paid=load_inputs() + # Round c upward from a readable decimal to the 2^-56 grid. + c = Q(ceil_frac(Q('0.00389046000025')*2**56),2**56) + assert K < ORDINARY < c < ETA + m0=raw_difference(targets,paid,K) + p2lo,p2hi=power_bound(2,1-K) + delta_lo,delta_hi=2-Q(p2hi,UNIT),2-Q(p2lo,UNIT) + assert m0[1]<0 and 00) + + assert bit_debit(268,1<<50,c)==21 and positive_debit()==10 + stages=stage_prices(c,21) + positive=POS_C-Q(10,M_LOG) + assert 0K+4*G and positive>K+5*G + strict,functional,pay=signed_margins(K,G,ORDINARY,positive) + assert min(*strict,*functional,pay)>0 + assert min(*signed_margins(K,G,K+4*G,positive)[0])==0 + assert signed_margins(K,G,ORDINARY,K+5*G)[2]==0 + assert min(*signed_margins(K,Q(0),ORDINARY,positive)[0])==0 + power_and_enumeration_checks(268,1<<50,c,104904-25) + out={ + 'interpretation':'m replacements of two separate rank-one paid occurrences by one rank-two paid occurrence within the whole 36-call raw word; no physical realization asserted', + 'sources':{'paired_pr_8027_head':'fb9b6a7b0d27da1cf98430893a3016bf811e2aa4', + 'profile_pr_8035_head':'ea776471bf8ed143a0625cf2d7532f65d15eb5f9', + 'graph_sha256':'74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326', + 'caller_sha256':'757b3523798f840bdb02028b23708c3416627a99ea09e7a3c4bcdc5cd0c7ce4b'}, + 'kappa':str(K), 'bit_c_fraction':str(c), 'bit_c_decimal_bounds':enclosing_text(c,c,20), + 'ordinary_rate':str(ORDINARY), 'signed_gap':str(G), 'eta':str(ETA), + 'positive_paid_cap':str(positive), 'positive_paid_cap_decimal_bounds':enclosing_text(positive,positive,20), + 'ordinary_margin':str(ORDINARY-K-4*G), 'positive_margin':str(pay), + 'bit_debit':21,'positive_debit':10,'rank_logs':RANK_LOGS,'ordinary_stage_rates':[str(x[3]) for x in stages], + 'sixth_stage_headroom':str(stages[-1][2]-ORDINARY), + 'signed_gates':{'strict':len(strict),'functional':len(functional),'minimum_margin':str(min(*strict,*functional,pay)), + 'controls':'equality at either supplier gate and g=0 each fail'}, + 'raw_minimum_real_replacements_at_target_bounds':enclosing_text(*threshold,14), + 'raw_difference_at_target_bounds':{}, 'raw_crossing_bounds':{}, + 'powered_268_surplus_bounds':{}, + } + for m in (24,25,26,27,36): + p=changed(paid,m) + d=raw_difference(targets,p,K) + su=powered_surplus(targets,p,c,268,Z,W,WEIGHT,15) + out['raw_difference_at_target_bounds'][str(m)]=enclosing_text(*d,16) + out['powered_268_surplus_bounds'][str(m)]=enclosing_text(*su,18) + if m==24: assert su[1] < 0 + else: assert su[0] > Q(2,1<<50) + # Although a replacement increases the tilted split moment, certify that + # the full powered bound decreases throughout the real interval [0, 36]. + # The base debit decreases and the split debit increases with m; bounding + # both derivative magnitudes at m=36 proves the net derivative negative. + t=1-c; target_lo,target_hi=moment(targets,t) + end=changed(paid,36) + pl,_=moment(end,t); _,ph_tilt=moment(end,t+Z) + p2tlo,p2thi=power_bound(2,t) + p2zlo,p2zhi=power_bound(2,t+Z) + p12lo,_=power_bound(12,Z) + assert p2thi<2*UNIT and p2zlo>2*UNIT + alpha_end_lo=Q(pl,target_hi) + gamma_end_hi=Q(ph_tilt*UNIT,target_lo*p12lo) + base_saving_lo=Q(2*UNIT-p2thi,target_hi) + tilt_surcharge_hi=Q((p2zhi-2*UNIT)*UNIT,target_lo*p12lo) + assert base_saving_lo*alpha_end_lo**267 > WEIGHT*tilt_surcharge_hi*gamma_end_hi**267 + out['powered_268_certificate_strictly_decreases_on_m_0_to_36']=True + out['raw_crossing_bounds']={str(m):crossing(targets,changed(paid,m)) for m in (24,25)} + # At most 36 such substitutions cannot absorb even one additional rank-one + # occurrence. This control applies to the whole 36-call raw word. + extra=changed(paid,36); extra[1]+=1 + extra_bound=raw_difference(targets,extra,K) + assert extra_bound[1] < 0 + out['m36_plus_one_rank_one_raw_difference_at_target_bounds']=enclosing_text(*extra_bound,16) + pos_su=powered_surplus(POS_TARGET,POS_PAID,POS_C,128,Q(19,64),Q(23,64),Q(2),16) + assert pos_su[0] > Q(2,1<<15) + out['positive_128_surplus_bounds']=enclosing_text(*pos_su,15) + + # Arithmetic-only smaller power: this is not enabled in #8035's runtime. + small=powered_surplus(targets,changed(paid,25),c,132,Z,W,WEIGHT,15) + assert small[0] > Q(2,1<<25) and bit_debit(132,1<<25,c)==14 + smallstages=stage_prices(c,14) + power_and_enumeration_checks(132,1<<25,c,104904-25) + out['exploratory_power_132']={'floor':str(1<<25),'bit_debit':14, + 'surplus_bounds':enclosing_text(*small,18), + 'sixth_stage_headroom':str(smallstages[-1][2]-ORDINARY), + 'status':'arithmetic screen only; power 132 needs new runtime/physical/stock and supplier transfer proof'} + assert powered_surplus(targets,changed(paid,25),c,131,Z,W,WEIGHT,15)[1] < 0 + rendered=json.dumps(out,indent=2,sort_keys=True)+'\n' + if len(sys.argv)==2: Path(sys.argv[1]).write_text(rendered) + else: print(rendered,end='') + print('PASS_HYPOTHETICAL_PRICE_BOUNDARY_24_25; NO_REWRITE_OR_THEOREM_CLAIMED') + +if __name__=='__main__': main() diff --git a/research/p104-chart510-transfer-bound/strong-bit.json.gz b/research/p104-chart510-transfer-bound/strong-bit.json.gz new file mode 100644 index 0000000000..16f8cafb1c Binary files /dev/null and b/research/p104-chart510-transfer-bound/strong-bit.json.gz differ diff --git a/research/p104-chart510-transfer-bound/verify.py b/research/p104-chart510-transfer-bound/verify.py new file mode 100644 index 0000000000..48c936d554 --- /dev/null +++ b/research/p104-chart510-transfer-bound/verify.py @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Check each source-bound result from the shipped inputs without changing them.""" +from pathlib import Path +import json +import subprocess +import sys +from tempfile import TemporaryDirectory + + +HERE = Path(__file__).resolve().parent + + +def run(script, *args): + completed = subprocess.run( + [sys.executable, "-I", "-B", str(HERE / script), *map(str, args)], + cwd=HERE, check=True, stdout=subprocess.PIPE, text=True, timeout=110 + ) + return completed.stdout + + +def same_receipt(output, name): + if json.loads(output) != json.loads((HERE / name).read_bytes()): + raise ValueError(f"Recomputed evidence differs from {name}") + + +def main(): + graph = HERE / "strong-bit.json.gz" + caller = HERE / "EFREE-CALLER.json.gz" + same_receipt(run("history_proof.py", graph), "HISTORY.json") + same_receipt(run("verify_rewrite.py"), "REWRITE.json") + same_receipt(run("constant_caller.py", graph, caller), "CALLER.json") + with TemporaryDirectory() as directory: + temporary = Path(directory) / "price.json" + run("price_audit.py", temporary) + same_receipt(temporary.read_text(), "PRICE.json") + print(run("joint_verify.py"), end="") + assert 6**9 > 5**10 and 2**9 * 4**10 > 7**10 and 3**9 * 2**10 > 5**10 + print("PASS_CHART510_HISTORICAL_CUT_EXACT_KERNEL_CALLER_PRICE_AND_TRANSPORT") + + +if __name__ == "__main__": + main() diff --git a/research/p104-chart510-transfer-bound/verify_rewrite.py b/research/p104-chart510-transfer-bound/verify_rewrite.py new file mode 100644 index 0000000000..452bf5b775 --- /dev/null +++ b/research/p104-chart510-transfer-bound/verify_rewrite.py @@ -0,0 +1,189 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Recover the full map, its transpose and the exact agreement kernel of the rewrite.""" +from collections import Counter +from functools import reduce +import gzip +from hashlib import sha256 +import json +from operator import xor +from pathlib import Path + + +HERE = Path(__file__).resolve().parent +SHA = "74e93daf2b7acf794ffb51f92f03f51556f68126d41ee13a8969bddb4cbe6326" +A_READERS = (2336, 2344, 2416, 2439, 2448, 2451, 2482, 2655, 2698) +B_READERS = (2359, 2362, 2372, 2394, 2397, 2408, 2416, 2419, 2425, 2431, + 2434, 2465, 2484, 2518, 2530, 2571, 2576, 2584, 2600, 2617, + 2623, 2626, 2778) + + +def support(mask): + return [i for i in range(mask.bit_length()) if mask & (1 << i)] + + +def dots(row, vector): + return (row & vector).bit_count() % 2 + + +def apply(rows, vector): + return sum(dots(row, vector) << i for i, row in enumerate(rows)) + + +def trace(word, program, *, backwards=False, observe=None): + """In reverse, CLEAR creates a zero adjoint and an initial zero has no adjoint.""" + start, end = (word["final"], word["start"]) if backwards else (word["start"], word["final"]) + count = len(start) + charts = dict(enumerate(start)) + forms = {i: 1 << i for i in range(count)} + retirements = [] + if observe: + for i in forms: + observe(charts[i], forms[i]) + for op, target, *args in (reversed(program) if backwards else program): + if op == ("CLEAR" if backwards else "INIT"): + assert target >= count and target not in charts + charts[target], forms[target] = args[0], 0 + elif op == ("INIT" if backwards else "CLEAR"): + assert target >= count and charts.pop(target) == args[0] + retirements.append((target, args[0], forms.pop(target))) + elif op == "ADD": + source, chart = args + assert charts[source] == charts[target] == chart + if backwards: + forms[source] ^= forms[target] + else: + forms[target] ^= forms[source] + elif op == "MOVE": + before, after = reversed(args) if backwards else args + assert charts[target] == before + charts[target] = after + else: + assert op == "SWAP" + source, = args + forms[target], forms[source] = forms[source], forms[target] + charts[target], charts[source] = charts[source], charts[target] + if observe: + observe(charts[source], forms[source]) + if observe and target in forms: + observe(charts[target], forms[target]) + assert charts == dict(enumerate(end)) and set(forms) == set(range(count)) + return [forms[i] for i in range(count)], retirements + + +def readout(owner, donors): + return [["INIT", owner, 1], *(["ADD", owner, donor, 1] for donor in donors)] + + +def rewrite(word): + tape = word["program"] + assert tape[10034:10040] == [ + ["INIT", 2828, 510], ["ADD", 2828, 2337, 510], ["MOVE", 2828, 510, 1], + ["INIT", 2829, 510], ["ADD", 2829, 2335, 510], ["MOVE", 2829, 510, 1], + ] + return tape[:10034] + readout(2828, B_READERS) + readout(2829, A_READERS) + tape[10040:] + + +def paid(word, program): + dimensions = {int(i): frame["dim"] for i, frame in word["frames"].items()} + return Counter(abs(dimensions[row[2]] - dimensions[row[3]]) + for row in program if row[0] == "MOVE") + + +def insert_basis(basis, row): + while row: + pivot = row.bit_length() + if pivot not in basis: + basis[pivot] = row + return + row ^= basis[pivot] + + +def main(): + raw = (HERE / "strong-bit.json.gz").read_bytes() + assert sha256(raw).hexdigest() == SHA + word = json.loads(gzip.decompress(raw)) + old, new = word["program"], rewrite(word) + baseline, old_scrub = trace(word, old) + chart_one = {} + def observe(chart, row): + if chart == 1: + insert_basis(chart_one, row) + changed, new_scrub = trace(word, new, observe=observe) + baseline_dual, _ = trace(word, old, backwards=True) + changed_dual, _ = trace(word, new, backwards=True) + assert len(baseline) == 630 and baseline == [ + (1 << i) ^ (1 << (i - 111) if 111 <= i < 222 else 0) for i in range(630) + ] + assert [(r, c) for r, c, _ in old_scrub] == [(r, c) for r, c, _ in new_scrub] + assert len(old_scrub) == 3433 + old_ops, new_ops = (Counter(row[0] for row in tape) for tape in (old, new)) + assert new_ops - old_ops == {"ADD": 30} and old_ops - new_ops == {"MOVE": 2} + assert paid(word, old) - paid(word, new) == {1: 2} and not (paid(word, new) - paid(word, old)) + + delta = [a ^ b for a, b in zip(baseline, changed, strict=True)] + ra, rb = delta[92], delta[63] + sa = sum((row == ra) << i for i, row in enumerate(delta)) + sb = sum((row == rb) << i for i, row in enumerate(delta)) + assert (ra.bit_count(), rb.bit_count(), (ra | rb).bit_count()) == (29, 18, 46) + assert all(row in (0, ra, rb) for row in delta) + assert support(sa) == [92, 99, 231, 428, 433, 434, 435, 448, 449, 473, 516, 582] + assert support(sb) == [63, 222, 230, 362, 367, 368, 369] + assert all((word["start"][h], word["final"][h]) == (0, 1) for h in support(ra | rb)) + assert all(word["final"][i] == 1 for i in support(sa | sb)) + # The rank-two formula is independently read in the reverse instruction order. + for i, (before, after) in enumerate(zip(baseline_dual, changed_dual, strict=True)): + assert (before ^ after) == ((sa if ra & (1 << i) else 0) ^ (sb if rb & (1 << i) else 0)) + assert sum(((row & ~(ra | rb)) != 0) for row in delta) == 0 + assert apply(delta, 1 << 266) == sa and apply(delta, 1 << 254) == sb + # M is self-inverse. The columns of M^{-1}S are two explicit collisions. + collisions = [apply(baseline, s) for s in (sa, sb)] + pairing = [[dots(row, v) for v in collisions] for row in (ra, rb)] + assert pairing == [[1, 0], [0, 1]] + assert all(apply(changed, v) == 0 for v in collisions) + assert [apply(baseline, v) for v in collisions] == [sa, sb] + assert len(chart_one) == 503 + assert all(dots(row, v) == 0 for row in chart_one.values() for v in collisions) + combined = dict(chart_one) + for row in changed: + insert_basis(combined, row) + assert len(combined) == 628 + # A helper probe reads its original input value. Classify its restriction + # to the collision plane, then check a decoder on all 630 coefficient rows. + probe_types = Counter(tuple(dots(1 << h, v) for v in collisions) for h in range(222,630)) + assert probe_types == {(0,0):392, (1,0):10, (0,1):6} + probes_a = [i for i in support(sa) if i>=222] + probes_b = [i for i in support(sb) if i>=222] + assert len(probes_a)*len(probes_b) == 60 + assert all((word["start"][h], word["final"][h]) == (0, 1) for h in probes_a + probes_b) + assert (word["frames"]["0"]["dim"], word["frames"]["1"]["dim"]) == (0, 8) + for i in probes_a: + for j in probes_b: + da, db = (1 << i) ^ changed[i], (1 << j) ^ changed[j] + assert (da, db) == (ra, rb) + assert all((y ^ (da if sa & (1<