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/schur-central-alias/PROOF.md b/research/schur-central-alias/PROOF.md new file mode 100644 index 0000000000..0f2d2ee748 --- /dev/null +++ b/research/schur-central-alias/PROOF.md @@ -0,0 +1,131 @@ +# The first central-class alias for sharp nilpotent Schur states + +Work over any field of characteristic two. The ordered pair matters: the +state equivalence is simultaneous conjugacy of S and T, without exchanging +the two requests. Put K=S+T and Z=K^2. + +## Contract and credited premises + +Start with commuting idempotents P0,Q0, a size-d common identity pivot, +and sharp residuals rank(ST-TS)=2d. The compressed product is the nilpotent +matrix H. Fix the four ordered original sector dimensions r00,r10,r01,r11. +Let a=dim ker H. The nilpotent normal form and its whole-pair rigidity are +Malik Safwan / ssafwann's #5267, not new claims here. They require + + r00=d+s00, r10=d+s10, r01=d+s01, r11=d+a+s11, + +with nonnegative padding. The minimal residual acts on U^3 plus F^a: + + S(x,y,z,t)=(H(x+z)+Nt, 0, (I+H)(z+x)+Nt, t), + T(x,y,z,t)=(0, H(y+z)+Nt, (I+H)(z+y)+Nt, t). + +Here im N complements im H. Add scalar pairs (0,0), (1,0), (0,1), (1,1) +with multiplicities s00,s10,s01,s11. All those statements, including +admissibility as genuine Schur residuals, are the cited predecessor model. +Ali Romman's #5287 already determines the complete central Jordan class, +and Mihir Srivastava's #5360 supplies the general-H ordered gluing theorem. +No predecessor scientific verifier is used as this contribution's evidence. + +The new result is the first same-profile central-class alias, its sharp +minimum dimension, and the explicit ordered-state separator below. It is +an obstruction to an ordered-state registry using only the central class. +It does not contradict a classifier whose declared output is only Z. + +## Rank information retained and discarded + +Write W=I+H. It is invertible. In coordinates +u=x+y, v=y+z, w=z, t, the minimal K is + + K(u,v,w,t)=(Hu, Wu+Hv+Nt, Wu, 0). + +For every j>=1, its jth power is + + (H^j u, + (j mod 2) W H^(j-1)u + H^j v + H^(j-1)Nt, + W H^(j-1)u, + 0). + +This follows by multiplying once and induction; no division by two occurs. +The u-column image is a graph over W im H^(j-1), so has dimension +rank H^(j-1). Its intersection with the v,t-column image is zero: a zero +w component forces H^(j-1)u=0 and then every u contribution is zero. +The v,t-column image has dimension rank H^(j-1), because + + im H^j + im H^(j-1)N = H^(j-1)(im H + im N) = im H^(j-1). + +The padding contributes c=s10+s01 to every positive power rank. Therefore + + rank K^j = 2 rank H^(j-1) + c, (1) + rank Z^j = 2 rank H^(2j-1) + c. (2) + +Equation (2) is also a rank-sequence restatement of #5287's credited +characteristic-two Jordan law. At fixed d and fixed original profile, c +and the total residual dimension are fixed. The multiplicity of eigenvalue +one is c and all other central blocks are nilpotent. Thus two such central +classes agree exactly when all odd positive power ranks of H agree. +In contrast, (1) retains every power rank of H. Nilpotent similarity is +determined by all power ranks. The normal-form rigidity supplies the converse +for full ordered pairs with the same H similarity class and profile. + +## The collision + +Take d=4, original profile (4,4,4,6), and no padding. Compare + + H_A=J3(0) direct-sum J1(0), H_B=J2(0) direct-sum J2(0). + +Both have a=2 and rank H=2. Every odd power of order at least three is zero. +Hence both fourteen-dimensional central operators have ranks + + rank Z=4, rank Z^2=0, + +and full Jordan partition (2,2,2,2,1,1,1,1,1,1). +A complete central similarity class, rather than just its spectrum, aliases. +However rank H_A^2=1 and rank H_B^2=0. Equation (1) gives + + rank (S_A+T_A)^3=2, rank (S_B+T_B)^3=0. + +Simultaneous conjugacy would preserve this rank. The two ordered pairs are +therefore nonconjugate over every field of characteristic two. + +## Literal original headers + +The standalone checker also constructs original eighteen-dimensional +commuting projectors; it does not just trust admissibility of a residual. +In the Jordan convention H e_(i+1)=e_i, let R extract the bottom coordinate +of each block, and let W=I+H. In sector order 00,10,01,11, use + + P0=diag(0_4,I_4,0_4,I_6), Q0=diag(0_4,0_4,I_4,I_6). + i=(I,I,I,H,R)^T, pi=(W,W,W,I,0). + +The last sector is U plus F^2. The map i is injective, pi i=I, +pi P0 i=pi Q0 i=I, and pi P0 Q0 i=H. A basis B of ker pi is + + B(x,y,z,t)=(x,y,z,W(x+y+z),t). + +Thus M=[i,B] is invertible. Conjugate P0,Q0 by M and delete the common +identity block by the literal Schur formula D-cb. This yields the two +witness pairs used by the verifier. All entries are in F2, so their exact +ranks and equations persist over every extension field of characteristic +two. The checker constructs an invertible fourteen-dimensional central +intertwiner as well as checking all stated ranks. + +## Minimality + +Consider any two states in this nilpotent sharp family at the same d and +same ordered original profile. Equal central classes imply equal rank Z. +By (2), their H ranks agree. At d=1,2,3, the nilpotent partitions are, +respectively, + + (1); (2),(1,1); (3),(2,1),(1,1,1). + +Within each dimension these partitions have distinct ranks. Equal central +classes therefore force similar H and, by #5267 rigidity, conjugate ordered +pairs. This proves the pivot threshold d=4. + +At d=4 the only distinct partitions sharing a rank are (3,1) and (2,2), +both with a=2. Their least possible residual dimension is 3d+a=14, attained +above. At d>=5 every nilpotent H has a>=1 and residual dimension at least +3d+a>=16. Thus fourteen is also the least residual dimension for this +same-d, same-profile nilpotent central alias. The corresponding least +ambient dimension is eighteen. These minima concern precisely this family; +no claim is made about arbitrary pairs of idempotents or nonsharp states. diff --git a/research/schur-central-alias/README.md b/research/schur-central-alias/README.md new file mode 100644 index 0000000000..26d9e94455 --- /dev/null +++ b/research/schur-central-alias/README.md @@ -0,0 +1,100 @@ +# Central Schur classes first alias at pivot dimension four + +This contribution was produced by Nick Petalas. Apache-2.0. + +Claim type: scoped algebraic proof with exact finite corroboration. In the +sharp nilpotent identity-pivot Schur family, over every characteristic-two +field, two ordered residual pairs with the same pivot size and four original +sector dimensions can have identical complete central similarity classes +without being simultaneously conjugate. The least pivot size is **four**; +the least residual and ambient dimensions are **fourteen** and **eighteen**. + +The witness has original sector dimensions (4,4,4,6) and compressed products +J3(0)+J1(0) and J2(0)+J2(0). Both central operators have full Jordan form +J2(0)^4 + J1(0)^6. The ranks of (S+T)^3 are two and zero, which distinguish +the ordered states. Consequently a complete central-class key cannot safely +deduplicate these ordered states. This is a local algebraic obstruction, +with no new kappa, physical cost saving or supplier-admission claim. + +[PROOF.md](PROOF.md) gives the argument and explicit original headers. The +central class retains precisely the odd positive power ranks of H; the sum +S+T retains every power rank. The minimality proof uses only the nilpotent +partitions through size four and the credited whole-pair rigidity theorem. + +Credit Malik Safwan / ssafwann [#5267](https://github.com/CrocSwap/integer-mult-bounds/pull/5267) +for the nilpotent model, admissibility and rigidity; Ali Romman +[#5287](https://github.com/CrocSwap/integer-mult-bounds/pull/5287) for the +already complete characteristic-two central law; Mihir Srivastava +[#5360](https://github.com/CrocSwap/integer-mult-bounds/pull/5360) for the +general-H ordered gluing boundary; Nick Petalas #4746/#4597, MatShep #4762, +codyw912 #4735, and the retained Ryanson Jonathan, lee-phys, Cinna Davis, +source527, commdata2338 and Jose Manuel lineage. Those results are cited +premises, not replay deliverables. Classical nilpotent power-rank facts are +not claimed as new. + +## Reproduction + +From the repository root, using CPython 3.12 and the standard library: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/schur-central-alias/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -O -B research/schur-central-alias/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/schur-central-alias +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/schur-central-alias --check-source-history +``` + +Other machines may substitute their CPython 3.12 path. Expected direct marker: +`PASS_SCHUR_CENTRAL_ALIAS`. The verifier writes no files. Its computed receipt +binds all package source hashes and a digest of both literal witness pairs, +the explicit central intertwiner, the finite minimality census and controls. +A receipt is printed, not hand-written or accepted as a mathematical premise. + +The exact checks construct two complete eighteen-dimensional original +headers and fourteen-dimensional residual pairs, verify the common identity +pivots, prescribed products, idempotence, original commutation and sharp +commutator rank eight, and compare eight power ranks of each sum and centre. +An invertible central intertwiner is checked by literal multiplication. +All eleven nilpotent partitions of sizes one through four and all fourteen +same-size unordered comparisons give exactly the displayed collision. +Eight controls cover invalid partitions, singular inversion, a non-square-zero +central input, a different central class and the ordered-state separator. +Normal and optimized checks enforce the same explicit exceptions. + +The all-field proof relies on the written argument and cited normal form; +finite evidence is not independent human or formal proof-kernel review. +The selected source-binding orientation passed at #7000. No predecessor +scientific suite, selected cold replay, native replay, Lean or Docker ran. +Physical access, movement, precision, stock, coefficient preparation, +restoration, dispatch, a complete supplier invoice and all five selected +framework assumptions remain outside scope. + +## Engineering and overlap + +The autonomous local run stopped at this first obstruction. The formal-interface- +lemma card is changed to a written state-information side result; no formal +caller binding is claimed. The baseline card example was run before the +experiment. New code uses bounded finite domains, no recursion, functions +below sixty lines and warning-strict normal/optimized checks. CPython allocation +is a Power of Ten rule-three deviation: the hard-coded largest matrix is +18 by 36 during augmented elimination, with bounded live fixture collections. +No external static analyzer is claimed. The verifier imports no predecessor +code and has no mutable external resources. + +Live open PR bodies, recent handoffs and main-tree README searches were +checked for Schur central collisions, ordered-pair classification and the +partitions (3,1)/(2,2). Merged #5287 closes the older characteristic-two +Jordan-law question; that law is expressly credited. Main #5267/#5360 do not +claim this minimal central alias. The overlap helper covered 502 open PRs +and 7,179 Discussion records with complete remote pagination; its sparse +local coverage was only 193 of 10,178 note paths. Separate Git-tree searches +covered relevant merged READMEs. Arbitrary diffs and unpublished work remain +outside that coverage. Source bytes and provenance are pinned in SOURCES.json. + +## Open next questions + +- Which extra invariant should an actual ordered-state registry retain? Start + with the full power-rank profile of S+T in this nilpotent family; a specified + consumer, representation and acquisition cost are still required. +- What is the first central alias outside the sharp nilpotent same-profile + family? Start with one explicitly named nonsharp or mixed-primary contract. + The present minima do not cover that domain, and no broader census is held. diff --git a/research/schur-central-alias/SOURCES.json b/research/schur-central-alias/SOURCES.json new file mode 100644 index 0000000000..aad1231535 --- /dev/null +++ b/research/schur-central-alias/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/schur-nilpotent-extension/README.md", + "usage": "input", + "git_blob": "1e738614a419c8f91941886179bdf235e4e5ed52", + "sha256": "7e5e74f4e5ddc1793ac6e427a80492d8d978aa78f01f189e33d2831147c9639a" + }, + { + "path": "research/schur-primary-gluing/README.md", + "usage": "input", + "git_blob": "b324f0cfc1886651d5a7954621d872dbec8a65cf", + "sha256": "dad194a3bb1211b0605a6c2667b7f40f6ba5c95efafcfa770dc1f85fbc1846d3" + }, + { + "path": "research/schur-whole-central-class/README.md", + "usage": "input", + "git_blob": "d31e16ddebadd946b92beea599dc8e743c5d7092", + "sha256": "ecf2a0ac1b9fb353ea8de8aa207af2fc3f63e97f4f6bae06b3d54bebc9ddc903" + } + ] +} diff --git a/research/schur-central-alias/TASK.json b/research/schur-central-alias/TASK.json new file mode 100644 index 0000000000..9324443c79 --- /dev/null +++ b/research/schur-central-alias/TASK.json @@ -0,0 +1,109 @@ +{ + "schema_version": 1, + "task_id": "formal-interface-lemma", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "formal-interface-lemma", + "question": "Can one uncovered interface implication be formalized with exact caller and certificate bindings?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/gate-operand-parity-lean/README.md", + "research/staged544-certified-endpoint/README.md", + "research/unconditional-batched-crt/README.md" + ], + "methods": [ + "Formalize a missing boundary lemma identified by the selected review.", + "Audit a formal theorem-to-certificate binding independently." + ], + "acceptance_gate": "State the exact formalized proposition and remaining assumptions; avoid duplicate arithmetic formalizations already present.", + "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": "Write one missing statement with quantified hypotheses, actual caller and existing coverage. A compact-switch lemma is a candidate only after its mathematical contract is reviewed. Establish a bounded proof plan before a separately budgeted proof-assistant build; do not rerun large Lean jobs as orientation.", + "bottleneck_link": "A missing interface proof can reduce the conditional gap even if it does not change kappa.", + "allowed_variations": [ + "Narrow to one formal lemma or one theorem-to-certificate binding." + ], + "scope_change_triggers": [ + "Formalizing already-covered arithmetic and claiming the full multiplication theorem." + ], + "overlap_terms": [ + "hyperplane end", + "formal interface", + "Lean binding", + "3807", + "3857", + "4100", + "gate-operand-parity-lean", + "staged544-certified-endpoint", + "unconditional-batched-crt" + ], + "existing_checks": [ + { + "scope": "PR #3807: scoped gate-operand parity formalization.", + "evidence": "research/gate-operand-parity-lean/README.md", + "remaining": "Exact theorem-to-caller binding and genuinely uncovered interface lemmas.", + "status": "author-checked", + "source_commit": "4c3530f42a6abcc48e7a6bcffd6c901911dc8269", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #3857: certified real-power moment/endpoint arithmetic.", + "evidence": "research/staged544-certified-endpoint/README.md", + "remaining": "Uniform algorithmic implications, not another endpoint digit.", + "status": "author-checked", + "source_commit": "ef4315b8caa605e47a2515004845eb2d2ed71a86", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4100: compact-switch formalization proposed as future validation.", + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Audit the statement and assumptions before a formal proof campaign.", + "status": "author-checked", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "First central-class alias between nonconjugate sharp nilpotent ordered Schur states at the same pivot size and ordered original sector profile, in characteristic two.", + "scope_change_reason": "Original state-information obstruction; written algebraic side proof rather than a formal caller binding. The predecessor characteristic-two central law is already complete and is cited.", + "bottleneck_link": "Side result: a central-class key cannot deduplicate ordered Schur states. No paid supplier or kappa implication is supplied.", + "budget_minutes": 60, + "stop_rule": "Stop at the first explicit collision and its minimality proof; leave other families and consumer costs open.", + "outcome": "completed", + "evidence": "PROOF.md; two literal original headers and residual pairs, explicit central intertwiner, 11 partitions and 14 comparisons, eight controls; standalone normal/optimized verifier.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "Which extra invariant should an actual ordered-state registry retain?", + "why_it_matters": "A complete central-class key loses ordered-state information at the stated first collision.", + "first_step": "Specify one consumer and use the full power ranks of S+T in this nilpotent family.", + "blocked_by": "No physical consumer, representation or acquisition-cost allowance is supplied." + }, + { + "question": "What is the first central alias outside the sharp nilpotent same-profile family?", + "why_it_matters": "The dimension minima are scoped, not universal idempotent-pair bounds.", + "first_step": "Name one nonsharp or mixed-primary contract before a new comparison.", + "blocked_by": "A separately bounded research claim and proof are required; no follow-on scope is held." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19540664", + "playbook": "autonomous local run", + "source_question": "original", + "environment": { + "python": "3.12.15", + "platform": "macOS-27.0.1-arm64-arm-64bit", + "requirements": "standard library only" + } +} diff --git a/research/schur-central-alias/VERIFY.json b/research/schur-central-alias/VERIFY.json new file mode 100644 index 0000000000..907203e608 --- /dev/null +++ b/research/schur-central-alias/VERIFY.json @@ -0,0 +1,38 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/schur-nilpotent-extension/README.md", + "research/schur-primary-gluing/README.md", + "research/schur-whole-central-class/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Literal original headers and sharp residuals, central intertwiner, ordered separator, first-collision partition census, rejection controls and computed source-bound receipt." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Same exact assertions enforced by explicit exceptions with optimization enabled." + } + ] +} diff --git a/research/schur-central-alias/verify.py b/research/schur-central-alias/verify.py new file mode 100644 index 0000000000..e3ccb15436 --- /dev/null +++ b/research/schur-central-alias/verify.py @@ -0,0 +1,235 @@ +"""Exact first central-key collision; standard library, no output files.""" +from __future__ import annotations + +import hashlib +import itertools +import json +from pathlib import Path + + +def require(condition: bool, message: str) -> None: + if not condition: + raise ValueError(message) + + +def eye(n: int) -> list[list[int]]: + return [[int(i == j) for j in range(n)] for i in range(n)] + + +def add(a: list[list[int]], b: list[list[int]]) -> list[list[int]]: + return [[x ^ y for x, y in zip(ar, br, strict=True)] + for ar, br in zip(a, b, strict=True)] + + +def mul(a: list[list[int]], b: list[list[int]]) -> list[list[int]]: + columns = tuple(zip(*b, strict=True)) + return [[sum(x * y for x, y in zip(row, col, strict=True)) % 2 + for col in columns] for row in a] + + +def echelon(a: list[list[int]]) -> tuple[list[list[int]], list[int]]: + rows = [row[:] for row in a] + pivots: list[int] = [] + for col in range(len(rows[0])): + pivot = next((i for i in range(len(pivots), len(rows)) + if rows[i][col]), None) + if pivot is None: + continue + target = len(pivots) + rows[target], rows[pivot] = rows[pivot], rows[target] + for i in range(len(rows)): + if i != target and rows[i][col]: + rows[i] = [x ^ y for x, y in + zip(rows[i], rows[target], strict=True)] + pivots.append(col) + if len(pivots) == len(rows): + break + return rows, pivots + + +def rank(a: list[list[int]]) -> int: + return len(echelon(a)[1]) + + +def inverse(a: list[list[int]]) -> list[list[int]]: + n = len(a) + require(all(len(row) == n for row in a), "nonsquare matrix") + reduced, pivots = echelon([row + unit for row, unit in + zip(a, eye(n), strict=True)]) + require(pivots[:n] == list(range(n)), "singular matrix") + return [row[n:] for row in reduced] + + +def jordan(partition: tuple[int, ...]) -> tuple[list[list[int]], list[int]]: + require(bool(partition) and all(k > 0 for k in partition), "bad partition") + require(sum(partition) <= 8, "fixture dimension bound") + n = sum(partition) + h = [[0] * n for _ in range(n)] + bottoms: list[int] = [] + offset = 0 + for length in partition: + bottoms.append(offset) + for i in range(offset, offset + length - 1): + h[i][i + 1] = 1 + offset += length + return h, bottoms + + +def canonical_pair(partition: tuple[int, ...]) -> tuple[list[list[int]], list[list[int]]]: + h, bottoms = jordan(partition) + d, a = len(h), len(bottoms) + n = 3 * d + a + w = add(eye(d), h) + tops = [bottom + length - 1 for bottom, length in + zip(bottoms, partition, strict=True)] + s, t = [[0] * n for _ in range(n)], [[0] * n for _ in range(n)] + for i, j in itertools.product(range(d), repeat=2): + s[i][j] = s[i][2 * d + j] = h[i][j] + s[2 * d + i][j] = s[2 * d + i][2 * d + j] = w[i][j] + t[d + i][d + j] = t[d + i][2 * d + j] = h[i][j] + t[2 * d + i][d + j] = t[2 * d + i][2 * d + j] = w[i][j] + for i, top in enumerate(tops): + for matrix, row in ((s, top), (t, d + top), + (s, 2 * d + top), (t, 2 * d + top)): + matrix[row][3 * d + i] = 1 + s[3 * d + i][3 * d + i] = t[3 * d + i][3 * d + i] = 1 + return s, t + + +def literal_header(partition: tuple[int, ...]) -> tuple[list[list[int]], list[list[int]], dict]: + h, bottoms = jordan(partition) + d, a = len(h), len(bottoms) + n, m = 4 * d + a, 3 * d + a + w = add(eye(d), h) + iota = eye(d) * 3 + h + [[int(j == b) for j in range(d)] for b in bottoms] + pi = [w[i] * 3 + eye(d)[i] + [0] * a for i in range(d)] + basis = [[int(i == j) for j in range(m)] for i in range(3 * d)] + basis += [w[i] * 3 + [0] * a for i in range(d)] + basis += [[0] * (3 * d) + [int(i == j) for j in range(a)] for i in range(a)] + header = [x + y for x, y in zip(iota, basis, strict=True)] + inv = inverse(header) + pdiag = [0] * d + [1] * d + [0] * d + [1] * (d + a) + qdiag = [0] * (2 * d) + [1] * (2 * d + a) + p = mul(inv, [[v * x for x in row] for v, row in zip(pdiag, header, strict=True)]) + q = mul(inv, [[v * x for x in row] for v, row in zip(qdiag, header, strict=True)]) + require(mul(pi, iota) == eye(d), "split identity") + require(mul(p, p) == p and mul(q, q) == q, "full idempotents") + require(mul(p, q) == mul(q, p), "full commutation") + require([row[:d] for row in p[:d]] == eye(d), "P pivot") + require([row[:d] for row in q[:d]] == eye(d), "Q pivot") + require([row[:d] for row in mul(p, q)[:d]] == h, "compressed product") + residuals = [] + for matrix in (p, q): + correction = mul([row[:d] for row in matrix[d:]], [row[d:] for row in matrix[:d]]) + residuals.append(add([row[d:] for row in matrix[d:]], correction)) + return residuals[0], residuals[1], {"ambient": n, "residual": m, "sectors": [d, d, d, d + a]} + + +def power_ranks(matrix: list[list[int]]) -> list[int]: + power, result = eye(len(matrix)), [] + for _ in range(8): + power = mul(power, matrix) + result.append(rank(power)) + return result + + +def square_zero_basis(z: list[list[int]]) -> list[list[int]]: + n = len(z) + require(mul(z, z) == [[0] * n for _ in range(n)], "not square zero") + columns = [list(col) for col in zip(*z, strict=True)] + chosen: list[list[int]] = [] + for j in echelon(z)[1]: + chosen += [columns[j], eye(n)[j]] + reduced, pivots = echelon(z) + for free in range(n): + if free in pivots: + continue + vector = [int(i == free) for i in range(n)] + for row, pivot in zip(reduced, pivots): + vector[pivot] = row[free] + trial = [list(col) for col in zip(*(chosen + [vector]), strict=True)] + if rank(trial) > len(chosen): + chosen.append(vector) + require(len(chosen) == n, "incomplete Jordan basis") + return [list(row) for row in zip(*chosen, strict=True)] + + +def partitions(n: int) -> list[tuple[int, ...]]: + require(1 <= n <= 4, "partition domain") + result = [] + for length in range(1, n + 1): + for parts in itertools.combinations_with_replacement(range(1, n + 1), length): + if sum(parts) == n: + result.append(tuple(reversed(parts))) + return sorted(result, reverse=True) + + +def check_collision() -> dict: + fixtures = [] + for partition in ((3, 1), (2, 2)): + s, t, metadata = literal_header(partition) + require(mul(s, s) == s and mul(t, t) == t, "residual idempotents") + require(rank(add(mul(s, t), mul(t, s))) == 8, "not sharp") + k = add(s, t) + z = mul(k, k) + kranks, zranks = power_ranks(k), power_ranks(z) + cs, ct = canonical_pair(partition) + require(power_ranks(add(cs, ct)) == kranks, "canonical/literal mismatch") + require(zranks == [4] + [0] * 7, "central partition") + fixtures.append((s, t, z, kranks, metadata)) + require(fixtures[0][3] == [8, 4, 2] + [0] * 5, "first pair separator") + require(fixtures[1][3] == [8, 4] + [0] * 6, "second pair separator") + b0, b1 = [square_zero_basis(f[2]) for f in fixtures] + g = mul(b0, inverse(b1)) + require(rank(g) == 14 and mul(fixtures[0][2], g) == mul(g, fixtures[1][2]), "central intertwiner") + return {"fixtures": [{"partition": p, "S": f[0], "T": f[1], "K_ranks": f[3], **f[4]} + for p, f in zip(((3, 1), (2, 2)), fixtures, strict=True)], "central_intertwiner": g} + + +def check_minimality() -> dict: + collisions, comparisons, total = [], 0, 0 + for d in range(1, 5): + data = partitions(d) + total += len(data) + for left, right in itertools.combinations(data, 2): + comparisons += 1 + odd = lambda p: tuple(sum(max(k - j, 0) for k in p) for j in (1, 3, 5, 7)) + if odd(left) == odd(right): + collisions.append([left, right]) + require(collisions == [[(3, 1), (2, 2)]], "unexpected first collision") + return {"partitions": total, "comparisons": comparisons, "collisions": collisions} + + +def check_controls() -> int: + rejected = 0 + for operation in (lambda: jordan(()), lambda: jordan((0,)), + lambda: jordan((9,)), lambda: partitions(0), + lambda: inverse([[0, 0], [0, 0]]), + lambda: square_zero_basis(eye(2))): + try: + operation() + except ValueError: + rejected += 1 + require(rejected == 6, "missing input/control rejection") + s, t = canonical_pair((4,)) + require(power_ranks(mul(add(s, t), add(s, t)))[0] == 6, "distinct central control") + s, t = canonical_pair((3, 1)) + require(power_ranks(add(s, t))[2] != 0, "central-only equivalence control") + return rejected + 2 + + +def main() -> None: + scientific = {"collision": check_collision(), "minimality": check_minimality(), + "controls": check_controls()} + payload = json.dumps(scientific, sort_keys=True, separators=(",", ":")).encode() + package = Path(__file__).resolve().parent + source_hashes = {p.name: hashlib.sha256(p.read_bytes()).hexdigest() + for p in sorted(package.iterdir()) if p.is_file()} + receipt = {"status": "PASS_SCHUR_CENTRAL_ALIAS", "evidence_sha256": hashlib.sha256(payload).hexdigest(), + "source_sha256": source_hashes, "minimality": scientific["minimality"], + "controls": scientific["controls"], "K_ranks": [x["K_ranks"] for x in scientific["collision"]["fixtures"]]} + print(json.dumps(receipt, sort_keys=True)) + + +if __name__ == "__main__": + main()