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-type-a-singleton-idle-projection-bound/LOCAL-PINS.json b/research/p104-type-a-singleton-idle-projection-bound/LOCAL-PINS.json new file mode 100644 index 0000000000..6b31a73e89 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/LOCAL-PINS.json @@ -0,0 +1,16 @@ +{ + "PROVENANCE.json": "b12429c51aee9fe164c34ac607d93f74250aa60863a2151af4b8ef935a28074e", + "engines/derivative.py": "d37aa06774425583cd024a295eb6832a9390e9f212f37f3e30e450820eed7cf2", + "engines/projector_brackets.py": "110fb0f91525a823f147ce041aa14c802fba431eb0b3fc092a7e1e0c98b492dc", + "engines/quote.py": "575c2c4286b5d7fd101a4902d764f9c48e5ada853095612465f0505c05d6b147", + "inputs/7113-SHA256.json": "064e11ecfedce9937ea1782e5baee37e89b3c9eebabed5b4a9ba84f412bbe078", + "inputs/7334-ADMITTED.json": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "inputs/CALLER.json.gz": "7e8038559cd158f6e32ef6d1a3bf15ab6a8ecc2239af32ab1699511ac28e26d9", + "inputs/PLAN.md": "0a0dc9ea79943f15207a16e1d37c6cf9a9826923b1a62fd4eb646a4ef8bd8d06", + "inputs/PR7362-SHA256.json": "2c90ca39b0f075cc4b3ec9e90c66fde473465e7bb50cf1db9a820d3a29556c0b", + "inputs/R92-PRICE.json.gz": "857b2776d4fb18844a08c82bb9387ddb3332d025bc7ecef2e606e6666705acf2", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "receipts/FIRST-ATTEMPT.json": "147ea71454ab9f97cb32c237dcf13624bccb8d54ce2a9a3cdb0009b61f0ae83e", + "receipts/SHA256.json": "2e747a5a6c7076dd25b74cabe0896a90215f0524ee045f9f5c5e70bc95102592", + "replay.py": "a292d2b491b936c229f3da604a3cb4cf1c38c6a47b2bbec3650b696a3bf81cc1" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/NOTICE b/research/p104-type-a-singleton-idle-projection-bound/NOTICE new file mode 100644 index 0000000000..fb32cd08fa --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/NOTICE @@ -0,0 +1,7 @@ +Apache-2.0. + +#7334 and #7113 supply the exact benchmark and signed caller. +#7362 and #7298 supply the complete invoice and directed tariff. +#7360, #7295 and #7144 supply earlier projector, fixed-contact +grouping and Laurent gauge precedents. OpenAI Codex and +subagents materially assisted. diff --git a/research/p104-type-a-singleton-idle-projection-bound/PROOF.md b/research/p104-type-a-singleton-idle-projection-bound/PROOF.md new file mode 100644 index 0000000000..4d40c8ca0f --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/PROOF.md @@ -0,0 +1,70 @@ +# The Type A stage-8 singleton interval + +The fixed endpoints are 1466 and 1487. There are 22 events +including both endpoints and 20 strict interior events. +The interior consists of ADD 7←0 with coefficient +2, six +complete ADD/idle/ADD triplets on roles 19–24, and ADD 25←18 +with coefficient −2. The six intervening idles also include +B8. All six remain in both the old and erased intervals. + +Set q=1 and all body characters except B8 to 1. Write b=B8, +t=b−1 and let e_r be coordinate r. The triplet on row r +is conjugation of I + t e_r e_r^T by the shear +S_r = I − 2 e_r e_18^T. Its transported projector is + +```text +P_r = e_r (e_r^T − 2 e_18^T), r = 19,...,24. +``` + +Every product of distinct such projectors is zero. The +edge shears commute with the six projectors and with each +other. Thus the exact intervening operator is + +```text +W(b) = W_0 (I + t sum_{r=19}^{24} P_r) +W_0 = I + 2 e_7 e_0^T − 2 e_25 e_18^T. +``` + +Use the cut basis just before clock 1466. The first endpoint +projector is P_7 = e_7 e_7^T. Conjugating the last endpoint +projector by W_0 inverse yields Q_25 = e_25(e_25^T − 2 e_18^T). +Both annihilate every middle projector and each other, +in both multiplication orders. Let E_old(b) be the old +inclusive interval and W(b) the interval after erasing the +two endpoints. The normalized exact difference is + +```text +W_0 inverse · (E_old(b) − W(b)) = t (P_7 + Q_25). +``` + +The derivative at b=1 is supported on rows 7 and 25 and +has identity minor on rows and columns 7 and 25. Its exact +rank is two. At b=−1, the same minor has determinant 4. +The stage-8 body axes are independent of the central and +other stage axes. Two active body bits yield B8=−1 with +the other characters fixed at 1. This is a B8-only identity +and physical specialization. + +A single projected replacement with local wrappers fixed in +b and unit-body identity differs from identity by at most +one rank on each fixed body fibre. Placing it at either old +clock multiplies the difference by the unchanged W(b) and +cannot increase its rank. This necessary gate therefore fails +for any paid rank that still returns through one projected +role. The proof fixes the intervening word and its derivative +contributions. Changes to those contributions, additional +projected returns and other pairs require separate tests. + +## Directed quote + +The fully rank-additive quote replaces 192 paid rank-eight +positions by 96 paid rank-sixteen positions across the +96 Type A ports. The one-edit raw gross upper is +3.848300498820991, with a positive complete directed probe. +The two disjoint singleton pairs together have gross upper +7.696600997641981 and fixed-moonshot complete upper +−131.3160419215735. These are upward-rounded bounds. +The optimistic rank-eight quote grants an unproved physical +square. Its one-edit raw gross upper is 762.1982813488973. +It does not relax the single-projected-return obstruction. +The exact tested scope has zero realized saving. diff --git a/research/p104-type-a-singleton-idle-projection-bound/PROVENANCE.json b/research/p104-type-a-singleton-idle-projection-bound/PROVENANCE.json new file mode 100644 index 0000000000..4639d52af1 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/PROVENANCE.json @@ -0,0 +1,58 @@ +{ + "caller": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/7113" + }, + "derived_inputs": { + "CALLER.json": { + "compression": "gzip", + "file": "inputs/CALLER.json.gz", + "key": "expected/ODD-TYPE-AB-CALLER.json", + "manifest": "inputs/7113-SHA256.json", + "sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc" + }, + "PLAN.md": { + "file": "inputs/PLAN.md", + "relationship": "Exact single-pair scope, full singleton price stock and caps.", + "sha256": "0a0dc9ea79943f15207a16e1d37c6cf9a9826923b1a62fd4eb646a4ef8bd8d06" + }, + "R92-PRICE.json": { + "compression": "gzip", + "file": "inputs/R92-PRICE.json.gz", + "key": "R92-PRICE.json", + "manifest": "inputs/PR7362-SHA256.json", + "sha256": "05d7a5ebdd2eeedd6c8f534e8e2eeac22484daf9f387f4a6b88cc9eed22a6b8f" + } + }, + "files": { + "inputs/7113-SHA256.json": { + "commit": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "git_blob": "5a7d6b80dc51aa918a5d521b60d18f9a6bbbc52e", + "path": "research/signed-caller-8x9/SHA256.json", + "sha256": "064e11ecfedce9937ea1782e5baee37e89b3c9eebabed5b4a9ba84f412bbe078", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/07a76c5e2738882c0cb322278e56f6cae3c9885d/research/signed-caller-8x9/SHA256.json" + }, + "inputs/7334-ADMITTED.json": { + "commit": "349996445176e934ffb3c76813adcd230ca8f783", + "git_blob": "464c89e45c4eca230c099e8bac784a90200a5069", + "path": "research/p104-compensated-fusion-readout-bound/inputs/ADMITTED.json", + "sha256": "c95300e9bca27e44a25c82d794f88cbf70757c142806b0e4c590ea29feb81a13", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/349996445176e934ffb3c76813adcd230ca8f783/research/p104-compensated-fusion-readout-bound/inputs/ADMITTED.json" + }, + "inputs/PR7362-SHA256.json": { + "commit": "5eec7ed633dcf9b9bbc95552aa653da296f863fb", + "git_blob": "b1486e0b5cfe4535f381ed26f7bce4aee21d8a43", + "path": "research/p104-rank-two-virtual-cut-bound/receipts/SHA256.json", + "sha256": "2c90ca39b0f075cc4b3ec9e90c66fde473465e7bb50cf1db9a820d3a29556c0b", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/5eec7ed633dcf9b9bbc95552aa653da296f863fb/research/p104-rank-two-virtual-cut-bound/receipts/SHA256.json" + }, + "inputs/pricing.py": { + "commit": "c522451caf287bb3c16eaece72be4c263315dca4", + "git_blob": "40ec194017bda1d524bba4f07b188c53281419d0", + "path": "research/adjacent-owned-add-exchange-bound/pricing.py", + "sha256": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", + "source": "https://github.com/CrocSwap/integer-mult-bounds/blob/c522451caf287bb3c16eaece72be4c263315dca4/research/adjacent-owned-add-exchange-bound/pricing.py" + } + }, + "schema_version": 1 +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/README.md b/research/p104-type-a-singleton-idle-projection-bound/README.md new file mode 100644 index 0000000000..f644378cc7 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/README.md @@ -0,0 +1,58 @@ +# Single projections for Type A singleton idles + +**NO VERIFIED GAIN.** The independently reproduced comparator is +[#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) +`aaeec8c0acf01e99a5f331ef363a698d9c084ace`, κ +`0.00364665195644`, with exact signed +[#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +`07a76c5e2738882c0cb322278e56f6cae3c9885d`. + +The two Type A singleton idles at clocks 1466 and 1487 share +body B8 and act on distinct roles 7 and 25. Direct dual +arithmetic and independent inverse projector transport agree +on a rank-two derivative difference when erasing the calls. +The exact difference is affine in B8 with q and all other +bodies fixed to 1. At physical B8 = −1 its separating minor +has determinant 4. One local projected return has difference +rank at most one under the fixed surrounding word, so the +tested replacement is excluded. [Proof and price](PROOF.md). + +## Replay + +From a clean checkout with CPython 3.12 and assertions: + +```sh +python3.12 -I -B research/p104-type-a-singleton-idle-projection-bound/replay.py +``` + +The standard-library replay authenticates the signed caller +and complete price, regenerates three exact receipts and +rejects three changed dependencies. Use `--out fresh-directory` +to retain the receipts. Only this pair and its 20 strict +interior events receive a support test. +[Source provenance](PROVENANCE.json) · [Verification](VERIFICATION.md). + +## Open next questions + +Can a separately priced provider preserve both original +projected returns? Start with one explicit pair of input and +return owners and a charged body and phase contract. A second +singleton pair at clocks 1742 and 1766 is present in the +price stock. Its support is outside this proof. + +## Credit + +[#7334](https://github.com/CrocSwap/integer-mult-bounds/pull/7334) +and [#7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113) +supply the exact benchmark word and signed caller. +[#7362](https://github.com/CrocSwap/integer-mult-bounds/pull/7362) +and [#7298](https://github.com/CrocSwap/integer-mult-bounds/pull/7298) +supply the complete base invoice and directed tariff. +[#7360](https://github.com/CrocSwap/integer-mult-bounds/pull/7360) +tests same-mask Type B pairs with a different fixed-role +projector contract. [#7295](https://github.com/CrocSwap/integer-mult-bounds/pull/7295) +supplies prior fixed-contact grouping and +[#7144](https://github.com/CrocSwap/integer-mult-bounds/pull/7144) +supplies related diagonal Laurent body gauges. +OpenAI Codex and subagents materially assisted proof, +implementation, independent verification and packaging. diff --git a/research/p104-type-a-singleton-idle-projection-bound/SOURCES.json b/research/p104-type-a-singleton-idle-projection-bound/SOURCES.json new file mode 100644 index 0000000000..e8c2f265cd --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/SOURCES.json @@ -0,0 +1,18 @@ +{ + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "path": "certificates/selected-result.json", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1", + "usage": "provenance" + }, + { + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "path": "docs/research/agent-task-catalog.json", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81", + "usage": "provenance" + } + ], + "schema_version": 1 +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/TASK.json b/research/p104-type-a-singleton-idle-projection-bound/TASK.json new file mode 100644 index 0000000000..1d7e5e0a67 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/TASK.json @@ -0,0 +1,117 @@ +{ + "actual_scope": "One exact #7334/#7113 Type A IDLE_ONE pair at 1466/1487 on roles7/25, mask B8, with fixed intervening events. One projected return with body-independent local wrappers and unit-body identity.", + "ai_assistance": "OpenAI Codex and subagents materially assisted proof, implementation, independent verification and packaging.", + "author": "P104 Type A singleton idle projection research", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "bottleneck_link": "Replacing both paid idles by one child can save the signed moment only if the one projected return supplies both required independent responses.", + "budget_minutes": 10, + "evidence": "Direct dual derivative and independent inverse transport agree on rank two and determinant one. The exact B8-only affine difference also has rank two at physical B8=\u22121.", + "open_questions": [ + { + "blocked_by": "A single fixed projected return has difference rank at most one.", + "first_step": "Name one explicit two-return provider or one changed intervening B8 incidence and preprice the complete signed invoice.", + "question": "Can a two-return provider or changed derivative allocation preserve both outputs at positive complete margin?", + "why_it_matters": "Either changes the rank-one fixed projected class that fails the exact gate." + } + ], + "original_card": { + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "existing_checks": [ + { + "evidence": "research/p104-literal-slot-defect/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4133: literal-slot defect", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "88666f1dee93fbd85b31fd5d6f91a219e111b5f4", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-commutation-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4136: uniform commutation gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "281ce601a8be9db470de630759179c23e1dfaa88", + "status": "author-checked" + }, + { + "evidence": "research/p104-uniform-encoding-gap/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4140: uniform encoding gap", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "de25c6525aa866962309df5d107b32d55e6e5628", + "status": "author-checked" + }, + { + "evidence": "research/p104-source-chart-shortcut/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4153: source-chart shortcut exhausts its optimistic allowance", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "9123241fea53df77e51ffe30d9aca1625d4bf3a8", + "status": "author-checked" + }, + { + "evidence": "research/p104-fiber-tag-seam/README.md", + "remaining": "Independently validate the stated scope or change its producer/consumer premise and pay the complete boundary.", + "scope": "PR #4154: fiber-tag seam mismatch", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "source_commit": "4ffcdaee5d6255a9cea1fe53a5424435068089d0", + "status": "author-checked" + }, + { + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "status": "reviewed" + } + ], + "first_experiment": "Start with the selected #5599 emitted word and review pending #5718 distinct input/output bases plus #5717/#5719 coverage before claiming work. Pick one uncovered source word, helper group and cut region. Prove the arbitrary-input relation and legal entry/exit corrections, then compare full target and paid profiles. Reject if completion, owned lifetimes or consumer costs repay the gain. A static pairing rank alone is not a physical split.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "id": "p104-side-correction", + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "overlap_terms": [ + "P104", + "helper basis", + "helper split", + "5718", + "dyadic capacity" + ], + "question": "Can joint helper bases and a legal causal split improve the complete P104 productive/paid invoice?", + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "research/p104-helper-subspace-splits/README.md", + "research/dyadic-helper-channel-capacity/README.md" + ] + }, + "outcome": "negative-result", + "priority_revision": 8, + "schema_version": 1, + "scope_change_reason": "Check a Type A distinct-role singleton pair with a fixed intervening body word, using exact derivative and transported projector identities.", + "scope_status": "changed", + "stop_rule": "One pair, 22 inclusive events and 20 strict interior events, at most 10 runner seconds per engine. Stop after exact rank exclusion.", + "task_id": "p104-side-correction" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/VERIFICATION.md b/research/p104-type-a-singleton-idle-projection-bound/VERIFICATION.md new file mode 100644 index 0000000000..c3b0fe1929 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/VERIFICATION.md @@ -0,0 +1,27 @@ +# Verification + +The direct CPython 3.12.14 replay exited 0 in 0.54 seconds. +A relocated Git-free run with a cleared environment exited +0 in 0.45 seconds and reproduced all three receipts byte for byte. + +Exact dual propagation and independent projector transport +agree on the rank-two minor for one inclusive 22-event +window. Twenty events are strictly interior. The +projector proof additionally certifies the B8-only affine +difference and its physical −1 specialization. No all-body +or complete signed caller replay was executed. + +The direct controls erase only one call or place both calls +on the same role. Both controls give a zero rank-two minor. +Three changed-input controls reject altered caller bytes, +the scoped quote and the base signed price. The quote +mutation rejects before opening the absent caller. + +The first independent wrapper stopped on a strict interior +count assertion. It was corrected from 21 to 20, since 21 +is the difference between the endpoint clocks. The +[diagnostic receipt](receipts/FIRST-ATTEMPT.json) records the +preserved log digest. The final proof text was checked for +raw control bytes. + +[Replay](README.md) · [Receipt hashes](receipts/SHA256.json). diff --git a/research/p104-type-a-singleton-idle-projection-bound/VERIFY.json b/research/p104-type-a-singleton-idle-projection-bound/VERIFY.json new file mode 100644 index 0000000000..8bb88bf1e4 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/VERIFY.json @@ -0,0 +1,19 @@ +{ + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/replay.py" + ], + "checks": "Regenerate exact singleton quote and independent derivative/bracket receipts, verify agreement, and reject altered dependencies.", + "timeout_seconds": 120 + } + ], + "inputs": [], + "python": "3.12", + "requirements": [], + "schema_version": 1, + "status": "ready" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/engines/derivative.py b/research/p104-type-a-singleton-idle-projection-bound/engines/derivative.py new file mode 100644 index 0000000000..acc2f53eec --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/engines/derivative.py @@ -0,0 +1,95 @@ +"""Reconstruct the fixed Type A stage-8 two-return derivative directly.""" +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from signal import SIGALRM, alarm, signal + +ROOT = Path(__file__).resolve().parent +PINS = { + "inputs/CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "PRICE.json": "fc02b956e172a6128c08a4774efd5c0bc99ad63cf9cf921c8624aa46213e5560", +} +PAIR = (1466, 1487) +ROLES = (7, 25) +STAGE = 8 + + +def checked(path): + raw = (ROOT / path).read_bytes() + if sha256(raw).hexdigest() != PINS[path]: + raise ValueError(f"changed dependency {path}") + return loads(raw) + + +def stop(*_): + raise TimeoutError("10-second cap") + + +def apply(events, roles, seed, erased): + value = [Q(i == seed) for i in range(roles)] + slope = [Q(0)] * roles + for clock, (kind, op, dest, *args) in events: + if kind != "A": + assert kind == "B" + continue + if op == "IDLE_ONE": + if clock not in erased and STAGE in args[0]: + slope[dest] += value[dest] + elif op == "ADD": + source, scalar = args + factor = Q(scalar) + value[dest] += factor * value[source] + slope[dest] += factor * slope[source] + elif op == "SCALE": + factor = Q(args[0]) + value[dest] *= factor + slope[dest] *= factor + elif op == "SWAP": + peer, = args + value[dest], value[peer] = value[peer], value[dest] + slope[dest], slope[peer] = slope[peer], slope[dest] + else: + # Type A lambda normalization specializes to identity at q=1. + assert op == "LAMBDA" and args[0] in (-1, 1) + return value, slope + + +def minor(events, roles, outputs, erased): + matrix = [] + for seed in outputs: + value, old = apply(events, roles, seed, set()) + control, new = apply(events, roles, seed, erased) + assert value == control + matrix.append([old[i] - new[i] for i in outputs]) + determinant = matrix[0][0] * matrix[1][1] - matrix[1][0] * matrix[0][1] + return matrix, determinant + + +def main(): + assert __debug__ + signal(SIGALRM, stop) + alarm(10) + caller, quote = (checked(path) for path in PINS) + assert len(caller["events"]) == 4783 and quote["pair"] == list(PAIR) + tape = caller["events"] + assert all(tape[clock] == ["A", "IDLE_ONE", role, [STAGE]] for clock, role in zip(PAIR, ROLES, strict=True)) + window = list(enumerate(tape[PAIR[0]:PAIR[1] + 1], PAIR[0])) + assert len(window) == 22 + count = caller["types"]["A"]["roles"] + matrix, det = minor(window, count, ROLES, set(PAIR)) + assert det + _, single = minor(window, count, ROLES, {PAIR[0]}) + assert not single + toy = [(0, ["A", "IDLE_ONE", 0, [8]]), (1, ["A", "IDLE_ONE", 0, [8]])] + old, collapsed = minor(toy, 2, (0, 1), {0, 1}) + assert not collapsed and old[0][0] == 2 + alarm(0) + print(dumps(dict(head=quote["head"], caller=quote["caller"], pins=PINS, pair=PAIR, roles=ROLES, + events=len(window), minor_columns=[list(map(str, col)) for col in matrix], + determinant=str(det), exact_rank=2, case_cap=1, runner_seconds=10, + controls=["omit only one call", "two copies on one role"]), indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-type-a-singleton-idle-projection-bound/engines/projector_brackets.py b/research/p104-type-a-singleton-idle-projection-bound/engines/projector_brackets.py new file mode 100644 index 0000000000..d6e067bc4b --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/engines/projector_brackets.py @@ -0,0 +1,117 @@ +"""Exact inverse-projector transport for the one Type A B8 interval.""" +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps,loads +from pathlib import Path +from signal import SIGALRM,alarm,signal + +ROOT=Path(__file__).resolve().parent +PINS={ + "inputs/PRICE.json":"fc02b956e172a6128c08a4774efd5c0bc99ad63cf9cf921c8624aa46213e5560", + "inputs/CALLER.json":"255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", +} +HEAD="aaeec8c0acf01e99a5f331ef363a698d9c084ace" +CALLER="07a76c5e2738882c0cb322278e56f6cae3c9885d" +U,V=1466,1487 +I={(i,i):Q(1) for i in range(36)} + + +def unique(items): + obj=dict(items) + if len(obj)!=len(items): + raise ValueError("duplicate JSON key") + return obj + + +def check(path,digest): + raw=(ROOT/path).read_bytes() + if sha256(raw).hexdigest()!=digest: + raise ValueError("changed dependency "+path) + return loads(raw,object_pairs_hook=unique) + + +def elementary(i,j,value=1): + return {(i,j):Q(value)} + + +def plus(a,b,scale=1): + return {k:v for k in a.keys()|b.keys() if (v:=a.get(k,0)+scale*b.get(k,0))} + + +def multiply(a,b): + out={} + for (i,k),x in a.items(): + for (j,l),y in b.items(): + if k==j: + out[i,l]=out.get((i,l),0)+x*y + return {k:v for k,v in out.items() if v} + + +def rows(matrix): + return [[i,j,str(v)] for (i,j),v in sorted(matrix.items())] + + +def interval(caller): + assert caller["types"]["A"]["roles"]==36 and caller["types"]["A"]["offset"]==0 + literal=caller["events"][U:V+1] + assert literal[0]==["A","IDLE_ONE",7,[8]] and literal[-1]==["A","IDLE_ONE",25,[8]] + inside=literal[1:-1] + assert len(inside)==V-U-1==20 + assert inside[0]==["A","ADD",7,0,"2"] and inside[-1]==["A","ADD",25,18,"-2"] + a=elementary(7,0,2) + z=elementary(25,18,-2) + w=plus(plus(I,a),z) + winv=plus(plus(I,a,-1),z,-1) + assert multiply(w,winv)==multiply(winv,w)==I + + middle=[] + for i in range(6): + r=19+i + triple=inside[1+3*i:4+3*i] + assert triple==[["A","ADD",r,18,"-2"],["A","IDLE_ONE",r,list(range(2+i,9))], + ["A","ADD",r,18,"2"]] + s=plus(I,elementary(r,18,-2)) + sinv=plus(I,elementary(r,18,2)) + p=multiply(multiply(sinv,elementary(r,r)),s) + assert p==plus(elementary(r,r),elementary(r,18,-2)) + middle.append(p) + first=elementary(7,7) + last=multiply(multiply(winv,elementary(25,25)),w) + assert last==plus(elementary(25,25),elementary(25,18,-2)) + all_proj=[first,*middle,last] + assert all(multiply(p,q)=={} for i,p in enumerate(all_proj) for j,q in enumerate(all_proj) if i!=j) + assert all(not multiply(p,s) and not multiply(s,p) for p in middle for s in (a,z)) + derivative=plus(first,last) + assert set(i for i,j in derivative)=={7,25} + minor=derivative[7,7]*derivative[25,25]-derivative.get((7,25),0)*derivative.get((25,7),0) + assert minor==1 + physical=plus({},derivative,-2) + assert physical[7,7]*physical[25,25]==4 + return dict(literal=literal,W0_extra=rows(plus(w,I,-1)),W0_inverse_extra=rows(plus(winv,I,-1)), + middle_projectors=[rows(p) for p in middle],transported_first=rows(first),transported_last=rows(last), + normalized_derivative_difference=rows(derivative),rank=2,minor=dict(rows=[7,25],columns=[7,25],determinant="1"), + exact_specialization=dict(q="1",B8="-1",all_other_bodies="1",difference=rows(physical), + minor_determinant="4",rank=2)) + + +def main(): + assert __debug__ + def stop(*_): + raise TimeoutError("10-second cap") + signal(SIGALRM,stop) + alarm(10) + try: + price,caller=(check(k,d) for k,d in PINS.items()) + assert (price["head"],price["caller"],price["pair"],price["ports"])==(HEAD,CALLER,[U,V],96) + assert len(caller["events"])==4783 + result=interval(caller) + result.update(head=HEAD,caller=CALLER,pins=PINS,scope=dict(clocks=[U,V],interior_events=20, + one_local_projector=True,unit_operator_identity=True,fixed_other_derivative=True), + caps=dict(pairs=1,interior_events=21,seconds=10),decision="excluded",unresolved=[]) + finally: + alarm(0) + print(dumps(result,indent=2,sort_keys=True)) + + +if __name__=="__main__": + main() diff --git a/research/p104-type-a-singleton-idle-projection-bound/engines/quote.py b/research/p104-type-a-singleton-idle-projection-bound/engines/quote.py new file mode 100644 index 0000000000..4892daf8b9 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/engines/quote.py @@ -0,0 +1,59 @@ +"""Price one Type A singleton idle square and the whole repeated-mask stock.""" +from collections import Counter, defaultdict +from fractions import Fraction as Q +from hashlib import sha256 +from json import dumps, loads +from pathlib import Path +from runpy import run_path + +ROOT = Path(__file__).resolve().parent +PINS = { + "inputs/CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "inputs/R92-PRICE.json": "05d7a5ebdd2eeedd6c8f534e8e2eeac22484daf9f387f4a6b88cc9eed22a6b8f", + "inputs/pricing.py": "f4d0b6c9314b838d882d6d06020f24881c19a3fda97a7c00df87b1e920785182", +} + + +def checked(path): + data = (ROOT / path).read_bytes() + if sha256(data).hexdigest() != PINS[path]: + raise ValueError(f"changed dependency {path}") + return data + + +def main(): + assert __debug__ + base, caller = (loads(checked(path)) for path in ("inputs/R92-PRICE.json", "inputs/CALLER.json")) + checked("inputs/pricing.py") + cost = run_path(str(ROOT / "inputs/pricing.py"))["cost"] + ports = len(caller["types"]["A"]["ports"]) + assert ports == 96 + jobs = defaultdict(list) + for t, event in enumerate(caller["events"]): + if event[:2] == ["A", "IDLE_ONE"] and len(event[3]) == 1: + jobs[event[3][0]].append([t, event[2]]) + assert dict(jobs) == {8: [[1466, 7], [1487, 25]], 9: [[1742, 10], [1766, 28]]} + paid, targets = (Counter({int(r): n for r, n in base[k].items()}) for k in ("old_paid", "old_targets")) + margin = targets.copy() + margin.subtract(paid) + assert (sum(paid.values()), sum(targets.values()), sum(r*n for r,n in margin.items())) == (110519, 22461, 1424) + cases = {} + for rank, change in ((8, {8: ports}), (16, {8: 2*ports, 16: -ports})): + for count in (1, 2): + delta = {r: count*n for r,n in change.items()} + new = margin.copy() + new.update(delta) + cases[f"{rank}/{count}"] = dict(new_paid=sum(paid.values())-ports*count, + new_rank_surplus=sum(r*n for r,n in new.items()), paid_delta={r:-n for r,n in delta.items()}, + estimates={label:dict(gross=list(map(str,cost(delta,Q(base[label])))), + complete=list(map(str,cost(new,Q(base[label]))))) + for label in ("old_crossing_upper", "probe", "moonshot")}) + assert Q(cases["16/1"]["estimates"]["probe"]["complete"][0]) > 0 + assert Q(cases["16/2"]["estimates"]["old_crossing_upper"]["gross"][1]) < 96 + print(dumps(dict(pins=PINS, head=base["head"], caller=base["caller_head"], ports=ports, cases=cases, + pair=[1466,1487], whole_singleton_stock=jobs, targets=sum(targets.values()), + ordinary_unit_reservation=32*ports*340+2*ports*(1000+64)), sort_keys=True, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/7113-SHA256.json b/research/p104-type-a-singleton-idle-projection-bound/inputs/7113-SHA256.json new file mode 100644 index 0000000000..5a7d6b80dc --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/inputs/7113-SHA256.json @@ -0,0 +1,69 @@ +{ + "replay/supplier7108/CALLER.json": "9557f713ab4ffb91ede05e8a6d5668c694b9940fc16f2f2d657e2f2b2cac2d3f", + "replay/supplier7112/RESULT.json": "7b808ff32d9803084aaaf820cd172ddc9001c7aebbd17e0324e779abeff91b30", + "replay/supplier7112/WORD.json.gz": "fe0b1dc3049a6b72760a705af2e698e0e9998e969e19862a696eba63434eb233", + "replay/supplier7112/short-caller/DATA-PHASES.json": "c5916ff312678f12aba403847643fbbc29f643acec60bdf836fa56cd3e8251fa", + "replay/supplier7112/short-caller/ODD-LOCALIZED-GROUPING.json": "8aac6b3d9e528bffbcf411bbd300c8e0f0b7bf75da45ab12badf3f3530ffcbe2", + "replay/supplier7112/short-caller/ODD-UNIT-DYADIC-TAPES.json": "c3195057f7a6723a81172ed540d0f1c4ba699ff3cb8dc37cbde7bb481d9b976c", + "replay/supplier7112/short-caller/ODD-UNIT-PREFIX-CLOSURES.json": "3b953e5d3e83e7573a3e908a5a23edb78773d4d22816aca54f766f0f0e9f5403", + "replay/supplier7112/short-caller/SHORT-ADMISSION-PARTIAL.json": "7977815fe72382738727e3d550eea3bc735923c9c57968872d4f863cb39cd401", + "replay/supplier7112/short-caller/SHORT-CALLER-RAW-PRICE.json": "a4f83d65d250efb40f6506658374d7414afdde11c96eb88b7d2fbb182aa090c1", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-0-1000.log": "a916a76627fb79bf606b22f857ca93db6342891fb2c85b20658b5002c359e422", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-1000-2000.log": "da633bfa408e98a2f2a958262a09d5e4274a9b25f7b4a6a73df5a97f37338f79", + "replay/supplier7112/short-caller/SHORT-CATALOGUE-2000-3047.log": "e8d500c0261a4a9e0cf3da2838d82806ed497ab9cf57cb8620ca6debfb98525c", + "replay/supplier7112/short-caller/SHORT-PRECISION.json": "68a00d2b83ee2eb944d2e05fc7f32bc9aa37282c45b968f0ab6fd500659ac028", + "replay/supplier7112/short-caller/SHORT-TYPE-A-ROOT.json": "e9812d720942d8149c219dfa28c1081ff1d353529e5282ca4624a04233f38f88", + "replay/supplier7112/short-caller/admission-source/ARCHIVE-CHAIN.json": "6de95c4eb396e69883fbeeb3989782bbbe232c22644af1c804050badca10f456", + "replay/supplier7112/short-caller/admission-source/FULL-RESULT.json": "d9ba709fa5dcefffe3f3abdcf34600ce188224703cfd743e6db8b58ba4816cb7", + "replay/supplier7112/short-caller/admission-source/INDEPENDENT-NOTICE.md": "cadbc642ca84311d2c7a6cf704c7828cb4cf77e3c784b66e4c6e8a5c28002fb8", + "replay/supplier7112/short-caller/admission-source/INDEPENDENT-SOURCES.json": "dced1457df5230466ba6202fd6d4595bc2b7fb2a65302806bf2720b1837ff350", + "replay/supplier7112/short-caller/admission-source/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "replay/supplier7112/short-caller/admission-source/NATIVE-INPUTS.json": "9bb6c1567783661334d6c1d23f715ce5635cbbb513678819ab9e020a34c7e4c0", + "replay/supplier7112/short-caller/admission-source/NOTICE": "da12736e2e824167ff56f2ecb623a5f88f75a270410360890f61dffc33bab249", + "replay/supplier7112/short-caller/admission-source/data/bit-admission.json": "a46b6c6040f75184cab5467656811ad988c216e3bc8e44d595a5015b6e49620b", + "replay/supplier7112/short-caller/admission-source/data/caller.json": "3828d53e80ea97e8b866320f081af20b6b93bfebd58b95b56b85a7afe151af5e", + "replay/supplier7112/short-caller/admission-source/data/final.json.gz": "2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883", + "replay/supplier7112/short-caller/admission-source/frozen/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "replay/supplier7112/short-caller/admission-source/frozen/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "replay/supplier7112/short-caller/admission-source/frozen/physical.py": "4e995d1158033d83bf69b671f23dc7924d66edbbe07623ba063ba7421234ea20", + "replay/supplier7112/short-caller/admission-source/frozen/verify_host3_odd.py": "e75ad2096ba2587d1dc9c8982b2c2eb7c6fd2636a80adcd943314ef2cf6fd258", + "replay/supplier7112/short-caller/admission-source/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "replay/supplier7112/short-caller/admission-source/interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "replay/supplier7112/short-caller/admission-source/precision_replay.py": "850d9098c5946ab27ef5228acc54d59df2196e72259d3e21588ec0c319c8f5ee", + "replay/supplier7112/short-caller/admission-source/retained/odd-native-common-grid/independent_bounds.py": "198521def614fe78fa728f1dde2b7fb820c0c0e0ac3ad0c9224dccbf51eac0d5", + "replay/supplier7112/short-caller/admission-source/retained/query-only-precision-envelope/envelopes.py": "783da6b5b450fc07434946cb9ec86070dfee01df6b5fa1c385cb024def2c9a9f", + "replay/supplier7112/short-caller/admission-source/retained/query-only-precision-envelope/source_binding.py": "624c459311c58f3847b7713b818bfd340153abf42919f02ac9aa8892ed52a2bd", + "replay/supplier7112/short-caller/assemble_odd_application.py": "6cdac39ab196a70c53ba2283c2555cd8dee30644dcc4769628b46fb53bd55a1f", + "replay/supplier7112/short-caller/candidate_gate.py": "e71097ca81a082afd7c647324a6c94cb357aeb1084693a095a0f3e0b45a9b11a", + "replay/supplier7112/short-caller/check_odd_caller_exact_grid.py": "abd5a5fd011b71e5b382cbc058855594d4f2fe7b049f375506675c0303180f54", + "replay/supplier7112/short-caller/check_odd_fixed_tape_counts.py": "e6246e9f8fbeae3077d82e585eafd3647c1a8758c58f33c7c13e7efa6c1e42bb", + "replay/supplier7112/short-caller/check_odd_partial_admission.py": "4416b1ea5f07f8a91028a2e500116588fbdfaed95a8ef9bac7a46bcb44b9478e", + "replay/supplier7112/short-caller/check_odd_physical_binding.py": "5c80c3b0415a7f91d216395248dd6f13297eed637732098e1ca8fb0548951b98", + "replay/supplier7112/short-caller/check_odd_precision.py": "b2d9c13577158157a587ace766d9dadb7819a0164b372722329d9754e1be6c61", + "replay/supplier7112/short-caller/connected.py": "469537b46fb92c5aca926d3b1497da5425408673b0a73ba1427f23d872b414e7", + "replay/supplier7112/short-caller/cut_library.py": "7ccb81af19db54ec7cdb44849af018d4ca8893f80f17277914f8566715985133", + "replay/supplier7112/short-caller/emit_odd_type_ab.py": "7a7993648433c6febad8c07b315aec1b96598835a3f587b62040423c33c3b71f", + "replay/supplier7112/short-caller/emit_odd_type_b.py": "d1fa8b67d98beacd6bb574b3d5fcbc94b8646a7ffbce91d2a6fd4d690d3c5329", + "replay/supplier7112/short-caller/host34.py": "bded1a8626d65ee40c4ba3b25780fc03f0fa08906f3c83f631892df072d9a9b7", + "replay/supplier7112/short-caller/independent.py": "21f46a8340331abb1486b50bd4e04453f1968b0a5950d86ff7780dd368590874", + "replay/supplier7112/short-caller/interval_gate.py": "60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5", + "replay/supplier7112/short-caller/lower.py": "67345fdfc8e5bb816e24b37dfafad0396372c48ec4e1b95b8b69f019a8fdfdee", + "replay/supplier7112/short-caller/mirrored.py": "55dd441a3a7f504b351857d45fd701994a0950ae1baec6c4c2b4b0166fb69db3", + "replay/supplier7112/short-caller/odd_unit_dyadic_tapes.py": "3cdafa35635360a487ce400ec8d585f6134dd7c58209543528e98e7db178bbc7", + "replay/supplier7112/short-caller/screen.py": "01e3eaba4b710a080e6e393e53157e6a119fdf312620eed26e9185ca91f6bea6", + "replay/supplier7112/short-caller/short_dyadic_seam.py": "6e588b365618ab2df4fa2d1f16073d09a953a7cd6e826e1f96bbf87f950b672b", + "replay/supplier7112/short-caller/short_native_catalogue.py": "775695c379f407801910531565cc371012cee501b2cec5f5d718ecdccf06b64d", + "replay/supplier7112/short-caller/signed_child.py": "ef03444360f02225138be9b38e2f9a85f313eeaa910d63a365de0f16d228cb8b", + "replay/supplier7112/short-caller/signed_model.py": "f88c798b9a22c656ea0b755b4f32be411c1f80687dff1a1ac9e9c2a0b5f4203e", + "replay/supplier7112/short-caller/stage.py": "0ab5546e926dd98d3ad833909b534840b7d8d0467c4790ca09bc2b14b37313f5", + "replay/supplier7112/short-caller/upstream_application.py": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184", + "replay/supplier7112/short-caller/upstream_native_catalogue.py": "6120e1ea1e07eeba757694d209437a38f121b0a377cc466889a30fa52c561472", + "expected/ODD-8X9-APPLICATION-CHECKS.json": "10512d62f540fe7bb839ec94b6a21bbdf4a3dfadf56b4ec9095d4b242bda19b8", + "expected/ODD-ADMISSION-PARTIAL.json": "75ec76e4393ef1622fcff9e2727dc411921076af4a506d97506665add140fa86", + "expected/ODD-CALLER-EXACT-GRID.json": "87d25d9fa3778bf4784e3a9e17f32ce5ba372663c6e97392cc62b87e6719042c", + "expected/ODD-FIXED-TAPE-COUNTS.json": "1a8bf36a966edca8c61f3be803cdbe136307095dec40245cdc93e79a9062fe99", + "expected/ODD-PHYSICAL-BINDING.json": "ade5f8cbb2e30677b1d48d23a1aa270b3d0b72e2504472ab9fdb71d124b075b5", + "expected/ODD-PRECISION.json": "9c03607288cc2afb80cb02c197f93360978233036418b32b09ad91be16f9c153", + "expected/ODD-TYPE-AB-CALLER.json": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "expected/ODD-TYPE-AB-REPLAY.json": "71fd0a7ad8b743266c6a75100f3543b48ea7d6fcbe45f008d3b61270e3b660a0" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/7334-ADMITTED.json b/research/p104-type-a-singleton-idle-projection-bound/inputs/7334-ADMITTED.json new file mode 100644 index 0000000000..464c89e45c --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/inputs/7334-ADMITTED.json @@ -0,0 +1,58 @@ +{ + "assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "caller": "07a76c5e2738882c0cb322278e56f6cae3c9885d", + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "crossing": [ + "0.00364665195644044790699554028334161", + "0.00364665195644044790699554028334162" + ], + "end": "2026-11-11T23:04:43Z", + "exit": 0, + "head": "aaeec8c0acf01e99a5f331ef363a698d9c084ace", + "hosted_at_admission": "plan and historical success; candidate replay in progress", + "inputs": { + "EARLY-RESULT.json": "ad1ca9b2e2febbf80d9bf8b6ceef14ff90fcc29ef9358310e551628eb1706649", + "INPUTS.json": "abedac59097a1c35c27d91cbdb07207bc562a64743bc406d13c94a8bc970592d", + "NATIVE-RESULT.json": "c6d1b00a83185ab0062397b363258b1f3f6685d755e9c1d4f7d3e7e511240812", + "PROPOSED-CLAIM.json": "6e31241944c123d2bd4aa8bc94d833b44b3d889bd6d9aafc579108f416b45f03", + "RESULT.json": "7f2d587c59f063b01f1e8b320084a7f0943f2f05d65e3e0f5e80448c6c8e8194", + "SOURCES.json": "ac7b4473035af648d6073e78b6c39675e706e8194b346bb55ed62a0adc81d593", + "VERIFY.json": "ede7dd2dd3733b9a73f72af9dd7edfe819b49b859c5c76e227ec82cb9c220513", + "WORD.json.gz": "4b9fd1187b34ed97c3ac0c760d73531735a5d0ebc5b4d4ab4377160b20d9bb2a" + }, + "kappa": "0.00364665195644", + "ours": "0", + "peer_gain": "0.000000430519994", + "prior_kappa": "0.003646221436446", + "receipt": { + "peer-prep/IDENTITIES.json": "f4d3f6ca2d87f8cd68c01ac9f77b69bd5a796f92bd567cea8afe3ac7c72e8e4b", + "peer-prep/STATIC.json": "500cc563b7dac8b1de1faf1dee9b820e73152dfddc15a650cd1191edd39e8c79", + "peer-price/RANK-STOCK.json": "4a7841699dd17688f6aada5c902a2a91e94558b2b1b4460c46b0e55aa95b3f9f", + "peer-price/READBACK.json": "337668788fb39ec9575887f9c5faf438a880471f78d936357dabf7deeac5de82", + "peer/COMMAND.txt": "714bfab024155d8216f3ef99f3ee7627ddc35ab341c486ac6bd53c476b757130", + "peer/COMMIT.stdout": "597470d8132a3812deb3624a859546c0c13d52b094fd6fc61e7416941130bd70", + "peer/END-UTC.txt": "9c46923c616c14da5b8ed503e1652021d7bd409a10ec91a78a03263013fba08a", + "peer/METADATA.stdout": "5873404cb4424dca918a00d503569f3c29a3190fd029a007e1afb2006399f647", + "peer/RUN.exit": "9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa", + "peer/RUN.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "peer/RUN.stdout": "d589626c7581fbb9928bc615364cfee49deb62dfc0a39a903417ca62be89cf8c", + "peer/START-UTC.txt": "5b78fd6d42a2b42206891318c08e6014de57d7ca46b0201cd11a166f452210f7" + }, + "source_history": "exact anchored base and recursive package provenance, sparse shallow stock wrapper not executed", + "stages": { + "caller": "PASS_HELPER_319_FUSED_CALLER 91166298911/25000000000000", + "early": "PASS_HELPER_319_EXACT_NATIVE_AND_SIGNED_PRICE 0.00364665195644", + "frontier": "PASS_HELPER_319_FUSED_FRONTIER_PROPOSAL 91166298911/25000000000000", + "native": "PASS_HELPER_319_FUSED_NATIVE 3646017316711/1000000000000000" + }, + "start": "2026-11-11T22:54:48Z", + "status": "independently_reproduced_comparable", + "tree": "fa98712a459b20c10240450097c87de433f8a750" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/CALLER.json.gz b/research/p104-type-a-singleton-idle-projection-bound/inputs/CALLER.json.gz new file mode 100644 index 0000000000..2479c3a615 Binary files /dev/null and b/research/p104-type-a-singleton-idle-projection-bound/inputs/CALLER.json.gz differ diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/PLAN.md b/research/p104-type-a-singleton-idle-projection-bound/inputs/PLAN.md new file mode 100644 index 0000000000..98ae766637 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/inputs/PLAN.md @@ -0,0 +1,7 @@ +# R158 · merge the two exact Type A stage-8 singleton idles + +On exact #7334 and #7113, test one paid change: replace IDLE_ONE clocks 1466 and 1487 on A roles 7 and 25 by one projected square at either old slot. Preserve the intervening literal word, other paid and ordinary contacts, dirty return layout, and all other derivative contributions. Local body-independent wrappers can act around the retained occurrence; its normalized unit-body action must be identity, and its derivative has one projected role. The old phase contract stays fixed. Two-return providers and rerouted intervening body factors are separate mechanisms. + +Pin PRICE.json fc02b956e172a6128c08a4774efd5c0bc99ad63cf9cf921c8624aa46213e5560. The fully rank-additive charge removes 192 rank-eight calls and adds 96 rank-sixteen, optimistic one-edit gross <3.848300498820991 raw and full directed probe >3.84791396968317. The exact complete stock consists of this and one stage-9 singleton pair, disjoint, for whole gross <7.696600997641981 raw and fixed-target complete upper <−131.3160419215735. One extra rank-one on every port kills even whole rank16 stock. Hypothetical rank8 square grants a stronger relaxation, one gross <762.1982813488973 and whole <1524.396562697795, without establishing a rank8 physical square. Reserve 1,248,768 ordinary units for one edit and charge actual routing/precision/tape on any survivor. + +Before build, evaluate old minus erased local derivative with respect to B8 at q=+1, all body units. Exactly one pair, 22 inclusive events, two basis impulses and at most 10 runner seconds. Retain other intervening B8 derivatives in both old and erased runs. A nonzero 2×2 minor excludes any single projected core in this fixed local class, even under the favorable rank8 quote. If rank≤1, use ≤2 old slots and 35s for exact second derivative and full signed arbitrary-body identity, then one 120s prototype only if physical reprice and all restoration pass. Exact independent bracket proof follows. No extension to other sites in this round. diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/PR7362-SHA256.json b/research/p104-type-a-singleton-idle-projection-bound/inputs/PR7362-SHA256.json new file mode 100644 index 0000000000..b1486e0b5c --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/inputs/PR7362-SHA256.json @@ -0,0 +1,11 @@ +{ + "R92-COMPARE.json": "92bd567e3203a2cbc2e0c508bf921966c59ead267c1f373f7534a4a50cb208ac", + "R92-GEOMETRY.json": "e9f93f3271855012b2de705c70f186f78c31a369d28110e92c5f2ffadae209b3", + "R92-GUARDS.json": "c23e9c74b3479e4af6c452eeb73e000878148ec385560a0642433a1c5bac4a07", + "R92-PRICE.json": "05d7a5ebdd2eeedd6c8f534e8e2eeac22484daf9f387f4a6b88cc9eed22a6b8f", + "R92-REVERSE.json": "f8e56b109352e07dfb8203bdbe42a10cb94374246b4cd419421e4f52e2730c4a", + "R93-COMPARE.json": "8a1f52179e5d457aa729714b0b79577894c1e22ab74a8b2f700838f471ffceb1", + "R93-MODULAR.json": "01ad2a656e69699b80b56d63cdf82448e424cd1c6e67636d53c079a6f03f55a5", + "R93-PRICE.json": "c108a061c6c03306a99a6fbafe919208954a7479ae28fb8a8fbf45d9832e6144", + "R93-RATIONAL.json": "2800af56efe23f7420a12f0713a659cd4fa4a3fb7c58449749ef697097ccccbf" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/R92-PRICE.json.gz b/research/p104-type-a-singleton-idle-projection-bound/inputs/R92-PRICE.json.gz new file mode 100644 index 0000000000..5aabb0ff2e Binary files /dev/null and b/research/p104-type-a-singleton-idle-projection-bound/inputs/R92-PRICE.json.gz differ diff --git a/research/p104-type-a-singleton-idle-projection-bound/inputs/pricing.py b/research/p104-type-a-singleton-idle-projection-bound/inputs/pricing.py new file mode 100644 index 0000000000..40ec194017 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/inputs/pricing.py @@ -0,0 +1,82 @@ +"""Directed interval arithmetic and the retained signed BIT invoice.""" +from collections import Counter +from fractions import Fraction +from functools import cache + +TARGET = "10018846261809/2500000000000000" +SCALE = 10**49 + + +def rounded(x, upper): + scaled = SCALE*x + if upper: + return Fraction(-((-scaled.numerator) // scaled.denominator), SCALE) + return Fraction(scaled.numerator // scaled.denominator, SCALE) + + +@cache +def log_bounds(x): + z = (x-1)/(x+1) + terms = 60 + exact_partial = 2*sum(z**(2*i+1)/(2*i+1) for i in range(terms)) + tail = 2*z**(2*terms+1)/((2*terms+1)*(1-z*z)) + return rounded(exact_partial, False), rounded(exact_partial+tail, True) + + +@cache +def power_bounds(rank, k): + binary = 2**(rank.bit_length()-1) + shift = binary.bit_length()-1 + l2, u2 = log_bounds(Fraction(2)) + lo, hi = log_bounds(Fraction(rank, binary)) + lo, hi = k*(lo+shift*l2), k*(hi+shift*u2) + assert 0 <= lo <= hi < 1 + + def exponential(z, terms): + total = term = Fraction(1) + for i in range(1, terms+1): + term *= -z/i + total += term + return total + + return rounded(rank*exponential(hi, 35), False), rounded(rank*exponential(lo, 34), True) + + +def cost(hist, k): + lower = upper = Fraction(0) + for r, n in hist.items(): + a, b = (n*x for x in power_bounds(r, k)) + lower += min(a, b) + upper += max(a, b) + return lower, upper + + +def profile(invoice, native, word, ranks): + copies = invoice["native_calls"] + assert copies == len(invoice["native_instances"]) == 36 + assert {tuple((r["stage"], r["copy"])) for r in invoice["native_instances"]} == { + (stage, which) for stage in range(1, 19) for which in (0, 1) + } + assert all(r["ports"] == 111 for r in invoice["native_instances"]) + assert native == Counter({int(r): n for r, n in invoice["native_paid"].items()}) + assert sum(native.values()) == 2871 + caller_paid = {1: 444, **{r: 444 for r in range(7, 57, 7)}} + assert invoice["event_counts"]["QUERY"]*111 == caller_paid[1] + assert invoice["event_counts"]["IDLE_ONE"]*111 == 8*444 + full_paid = Counter({r: copies*n for r, n in native.items()}) + full_paid.update(caller_paid) + + helpers = Counter(ranks[word["final"][j]]-ranks[word["start"][j]] + for j in range(222, word["public"])) + assert helpers == Counter({int(r): n for r, n in invoice["native_helpers"].items()}) + caller_targets = {**{r: 444 for r in range(8, 65, 7)}, 127: 222} + full_targets = Counter({r: copies*n for r, n in helpers.items()}) + full_targets.update(caller_targets) + assert full_paid == Counter({int(r): n for r, n in invoice["paid"].items()}) + assert full_targets == Counter({int(r): n for r, n in invoice["targets"].items()}) + assert sum(full_paid.values()) == invoice["paid_jobs"] + assert sum(full_targets.values()) == invoice["productive_fields"] + signed = full_targets.copy() + signed.subtract(full_paid) + assert sum(r*n for r, n in signed.items()) == invoice["rank_surplus"] + return signed, copies diff --git a/research/p104-type-a-singleton-idle-projection-bound/receipts/FIRST-ATTEMPT.json b/research/p104-type-a-singleton-idle-projection-bound/receipts/FIRST-ATTEMPT.json new file mode 100644 index 0000000000..9c7b55e137 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/receipts/FIRST-ATTEMPT.json @@ -0,0 +1,5 @@ +{ + "diagnostic": "An initial wrapper asserted 21 strict interior events. The exact clocks differ by 21 and have 20 strict interior events.", + "exit_code": 1, + "original_log_sha256": "76e1796eca2be424215d6e23cd41de6cb445c8f07a50e040ed62d42f5435c45f" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/receipts/SHA256.json b/research/p104-type-a-singleton-idle-projection-bound/receipts/SHA256.json new file mode 100644 index 0000000000..ad42fd05d5 --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/receipts/SHA256.json @@ -0,0 +1,5 @@ +{ + "BRACKETS.json": "81c2cc0b6a090e60c4ae513976323aa1ed8513bcc665506e950cf751e7f2a602", + "DERIVATIVE.json": "4516ac8fac8870e46c56bee45beafa614b43527c03129339490f9c688c94dc63", + "PRICE.json": "fc02b956e172a6128c08a4774efd5c0bc99ad63cf9cf921c8624aa46213e5560" +} diff --git a/research/p104-type-a-singleton-idle-projection-bound/replay.py b/research/p104-type-a-singleton-idle-projection-bound/replay.py new file mode 100644 index 0000000000..709bc76f8a --- /dev/null +++ b/research/p104-type-a-singleton-idle-projection-bound/replay.py @@ -0,0 +1,149 @@ +"""Replay the exact Type A singleton idle projection exclusion.""" +from argparse import ArgumentParser +from gzip import decompress +from hashlib import sha1,sha256 +from json import dumps,loads +from pathlib import Path +from subprocess import run +from tempfile import TemporaryDirectory +import sys + +ROOT=Path(__file__).resolve().parent + + +def unique(items): + out=dict(items) + if len(out)!=len(items): + raise ValueError('duplicate JSON key') + return out + + +def decode(raw): + return loads(raw,object_pairs_hook=unique) + + +def digest(raw): + return sha256(raw).hexdigest() + + +def source(name): + path=Path(name) + if path.is_absolute() or '..' in path.parts or path.as_posix()!=name: + raise ValueError('invalid package-relative path '+name) + return (ROOT/path).read_bytes() + + +def load_inputs(): + pins=decode(source('LOCAL-PINS.json')) + for name,expected in pins.items(): + if digest(source(name))!=expected: + raise ValueError('changed package dependency '+name) + p=decode(source('PROVENANCE.json')) + for name,entry in p['files'].items(): + raw=source(name) + assert digest(raw)==entry['sha256']==pins[name] + assert sha1(f'blob {len(raw)}\0'.encode()+raw).hexdigest()==entry['git_blob'] + a=decode(source('inputs/7334-ADMITTED.json')) + assert a['head']=='aaeec8c0acf01e99a5f331ef363a698d9c084ace' + assert a['kappa']=='0.00364665195644' + materialized={} + for name,entry in p["derived_inputs"].items(): + raw=source(entry["file"]) + if entry.get("compression")=="gzip": + raw=decompress(raw) + assert digest(raw)==entry["sha256"] + if "manifest" in entry: + manifest=decode(source(entry["manifest"])) + if "manifest_section" in entry: + manifest=manifest[entry["manifest_section"]] + assert digest(raw)==manifest[entry["key"]] + materialized[name]=raw + return materialized + + + +def call(script,*args,expect_success=True): + p=run([sys.executable,'-I','-B',str(script),*args],capture_output=True,timeout=40) + if expect_success and p.returncode: + sys.stderr.write(p.stderr.decode(errors='replace')) + p.check_returncode() + return p + + +def write(path,raw): + path.parent.mkdir(parents=True,exist_ok=True) + path.write_bytes(raw) + + +def replay(root,out): + data=load_inputs() + expected=decode(source("receipts/SHA256.json")) + outputs={} + + def stage(d,name,raw): + write(d/"inputs"/name,raw) + + def engine(d,name): + path=d/name + write(path,source("engines/"+name)) + return path + + def record(name,script): + raw=call(script).stdout + assert digest(raw)==expected[name],("changed receipt",name) + outputs[name]=raw + return decode(raw) + + qdir,lead,brackets=(root/n for n in ("quote","direct","brackets")) + for d in (qdir,lead,brackets): + stage(d,"CALLER.json",data["CALLER.json"]) + stage(qdir,"R92-PRICE.json",data["R92-PRICE.json"]) + stage(qdir,"pricing.py",source("inputs/pricing.py")) + qscript=engine(qdir,"quote.py") + quote=record("PRICE.json",qscript) + assert quote["pair"]==[1466,1487] and quote["ports"]==96 + assert quote["whole_singleton_stock"]=={"8":[[1466,7],[1487,25]],"9":[[1742,10],[1766,28]]} + write(lead/"PRICE.json",outputs["PRICE.json"]) + stage(brackets,"PRICE.json",outputs["PRICE.json"]) + dscript=engine(lead,"derivative.py") + rscript=engine(brackets,"projector_brackets.py") + direct=record("DERIVATIVE.json",dscript) + transported=record("BRACKETS.json",rscript) + assert (direct["head"],direct["caller"],direct["pair"])==( + transported["head"],transported["caller"],transported["scope"]["clocks"]) + assert direct["events"]==len(transported["literal"])==22 + assert transported["scope"]["interior_events"]==20 + assert direct["exact_rank"]==transported["rank"]==2 + assert direct["minor_columns"]==[["1","0"],["0","1"]] + assert direct["determinant"]==transported["minor"]["determinant"]=="1" + assert transported["exact_specialization"]["minor_determinant"]=="4" + assert not transported["unresolved"] + (brackets/"inputs/CALLER.json").unlink() + for path,script,message in ( + (lead/"inputs/CALLER.json",dscript,b"changed dependency inputs/CALLER.json"), + (brackets/"inputs/PRICE.json",rscript,b"changed dependency inputs/PRICE.json"), + (qdir/"inputs/R92-PRICE.json",qscript,b"changed dependency inputs/R92-PRICE.json")): + raw=path.read_bytes() + path.write_bytes(raw+b" ") + check=call(script,expect_success=False) + assert check.returncode==1 and message in check.stderr + path.write_bytes(raw) + + if out is not None: + out.mkdir(parents=True) + for name,raw in outputs.items(): + write(out/name,raw) + print("PASS_P104_TYPE_A_SINGLETON_IDLE_PROJECTION_BOUND pairs=1 interior=20 inclusive=22 rank=2") + + +def main(): + assert __debug__ and sys.version_info[:2]==(3,12) + cli=ArgumentParser(description=__doc__) + cli.add_argument("--out",type=Path) + args=cli.parse_args() + with TemporaryDirectory() as tmp: + replay(Path(tmp),args.out) + + +if __name__=="__main__": + main()