From e11369e6781fec9181035426f1924d3a73b6b4a3 Mon Sep 17 00:00:00 2001 From: Sagar Thakrar Date: Tue, 13 Oct 2026 10:11:15 +0530 Subject: [PATCH 1/2] Research: bound R420 split target-read schedules --- .../r420-split-target-reads/CERTIFICATE.json | 70 +++++ research/r420-split-target-reads/CLAIM.json | 24 ++ research/r420-split-target-reads/README.md | 166 +++++++++++ research/r420-split-target-reads/SOURCES.json | 37 +++ .../r420-split-target-reads/VALIDATION.json | 61 +++++ research/r420-split-target-reads/check.py | 257 ++++++++++++++++++ .../independent_check.py | 143 ++++++++++ 7 files changed, 758 insertions(+) create mode 100644 research/r420-split-target-reads/CERTIFICATE.json create mode 100644 research/r420-split-target-reads/CLAIM.json create mode 100644 research/r420-split-target-reads/README.md create mode 100644 research/r420-split-target-reads/SOURCES.json create mode 100644 research/r420-split-target-reads/VALIDATION.json create mode 100644 research/r420-split-target-reads/check.py create mode 100644 research/r420-split-target-reads/independent_check.py diff --git a/research/r420-split-target-reads/CERTIFICATE.json b/research/r420-split-target-reads/CERTIFICATE.json new file mode 100644 index 0000000000..9f1ad94a7e --- /dev/null +++ b/research/r420-split-target-reads/CERTIFICATE.json @@ -0,0 +1,70 @@ +{ + "all_early_profile": { + "1": 1200, + "2": 1560, + "4": 180, + "8": 9 + }, + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "baseline_equivalent_per_target": 6, + "baseline_profile": { + "1": 1320, + "2": 1440, + "4": 60, + "5": 120, + "8": 9 + }, + "dirty_input_columns_per_replay": 660, + "distinct_sources": 360, + "geometry_census_sha256": "980ce1be0c746a3e4e960b72078fe4ab1d1802a788293747a360c707394712f0", + "legal_schedules_per_target": 8, + "majorization": { + "baseline": [ + 5, + 1 + ], + "early_read": [ + 4, + 2 + ] + }, + "moment_difference": "2^p + 4^p - 1 - 5^p > 0 for 0 < p < 1", + "negative_controls": [ + "wrong source at rank six", + "missing target read", + "shared source invalidates independent choices", + "omitted rank-two source cleanup" + ], + "paid_calls": 2949, + "payload_sha256": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2", + "profile_delta_per_early_read": { + "1": -1, + "2": 1, + "4": 1, + "5": -1 + }, + "rank_mass": 5112, + "simultaneous_schedules": "2348542582773833227889480596789337027375682548908319870707290971532209025114608443463698998384768703031934976", + "source_commit": "2065fe4f72a914d907f1046603f5a36f17018535", + "source_orders_per_target": 6, + "source_pr": 543, + "status": "PASS_R420_SPLIT_TARGET_READ_BOUND", + "strictly_worse_per_target": 2, + "targets": 120, + "worked_example": { + "cell": 145, + "early_source": 10, + "source_frames": [ + 380, + 383, + 384 + ], + "sources": [ + 10, + 290, + 340 + ], + "target": 3, + "top": 555 + } +} diff --git a/research/r420-split-target-reads/CLAIM.json b/research/r420-split-target-reads/CLAIM.json new file mode 100644 index 0000000000..11edd2e1ea --- /dev/null +++ b/research/r420-split-target-reads/CLAIM.json @@ -0,0 +1,24 @@ +{ + "track": "Bit supplier", + "assignment_seed": 3, + "randomness": "Node.js crypto.randomInt(0, 100), operating-system CSPRNG, drawn once", + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "claimed_at_utc": "2026-10-13T04:30:00Z", + "expected_finish_utc": "2026-10-13T05:03:00Z", + "coordination": "No pinned issues existed at claim time; local claim per sprint instructions.", + "object": "PR543 R420 final 120 phase-B three-source target gates", + "method": "Split each gate into separately framed single-source reads, all six source orders, arbitrary nested real subspaces, with all earlier gates and literal full-frame cleanup fixed. Include source cleanup costs. Seed 3 selects target 3 as the worked example; coverage includes every target.", + "deliverable": "Exact finite geometry census, complete local cost comparison, reproducible checker and scoped research note; no presumed kappa improvement.", + "candidates": [ + "One block XOR rewrite: rejected because PR670, PR674 and PR688 already cover nearby circuit work.", + "First target-read frame promotion: rejected because PR661 already proves all fixed-gate phase-B frame reassignments optimal.", + "Split final target reads: selected because PR661 freezes operand lists and excludes circuit resynthesis." + ], + "overlap_checked_through_pr": 699, + "predecessor": { + "pr": 661, + "head": "9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89", + "distinction": "Changes gate grouping and allows different frames for reads within one original gate; the fixed-gate result does not cover this family." + }, + "status": "in progress" +} diff --git a/research/r420-split-target-reads/README.md b/research/r420-split-target-reads/README.md new file mode 100644 index 0000000000..db73c70b96 --- /dev/null +++ b/research/r420-split-target-reads/README.md @@ -0,0 +1,166 @@ +# R420 split target reads cannot lower the paid moment + +**Scoped negative result, no new κ.** In the selected PR543 R420 bit word, +splitting the final three-source target gates into separately framed reads +does not reduce the local paid recursive moment. This covers all six source +orders and every admissible real subspace at each read, with the earlier +schedule and full-frame cleanup fixed. + +Each target has eight legal schedules. Six have the original profile. Two +have strictly greater moment for every exponent `0 < p < 1`. The 120 targets +use disjoint source registers, so the result covers all `8^120` simultaneous +choices, without enumerating that Cartesian product. It also permits +interleaving reads of different targets within this final segment. + +## Reproduce + +From the repository root, with Python 3.9+ and no third-party packages: + +```sh +python3 -B research/r420-split-target-reads/check.py +python3 -B research/r420-split-target-reads/independent_check.py +``` + +The first command checks the source payload, reconstructs the certificate, +replays all 660 symbolic dirty-input columns for both the original word and +the word using every early read, and runs four negative controls. Expected: + +```text +PASS_R420_SPLIT_TARGET_READ_BOUND targets=120 schedules=8^120 controls=4 kappa=unchanged +``` + +`independent_check.py` uses rational Gaussian elimination and exhausts all +`6 * 2^3 = 48` candidate schedules per target. It does not import the primary +checker or predecessor checkers. The primary checker uses integer row +elimination and the two possible local profiles. Neither implementation +samples floating-point exponents to establish the inequality below. + +## Scope and provenance + +The exact base is `66849e1475c930fd7732b1a0067ffee7e1e95f60`. Its selected +conditional κ is `51110230636731/31250000000000000`, or +`0.001635527380375392`, from PR626 with the PR543 bit supplier. The selected +certificate points to `research/community-k492-audit/pr626/replay/ASSEMBLY.json` +and `docs/research/community-k492-review.md`. This experiment follows the +actual bit source, `research/e8-bit-r420/data/bitE8mut-r420.json.gz`, from +PR543 commit `2065fe4f72a914d907f1046603f5a36f17018535`. + +PR661 by Tuomo Kiiskinen / yuj1r0, inspected at +`9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89`, proves fixed-gate phase-B frame +optimality. It preserves each gate's operand list. Here a three-source gate +becomes three single-source gates with potentially different frames. This +is a separate family outside that claim, and the present result closes +only this additional case. No code or certificate from PR661 is imported. + +The experiment changes no scalar source value, helper count, decoder, +COPY, earlier gate, final frame, or cleanup gate. It adds no source-access +operation, helper or recursive child beyond the frame climbs counted below. +The same three XORs execute in a different grouping. Every source still +reaches the full frame in C or its final climb. The 420 helpers and nine +retained-total COPYs are unchanged. No alternative owner map or assembly is +claimed. See `SOURCES.json` for byte pins and `CLAIM.json` for the assignment, +candidate selection and overlap checks. + +## Complete geometry argument + +The final 120 B gates are `B[717:837]`, one per target. The checker establishes +the following facts from the exact eight-dimensional label vectors: + +1. A target enters this segment at a rank-two cell `C` and must end at its + fixed rank-seven hyperplane `H`. +2. Its three sources enter at distinct rank-six subspaces `S0, S1, S2` + contained in `H`. Each pair spans `H`. +3. Exactly one source space contains `C`. +4. The 360 source registers are distinct, none is a target, and each appears + once in this segment. Their fixed endpoint is rank eight. Every C-phase + gate has the full frame. + +At a single-source read the common gate frame `F` must contain that source's +rank-six space and the target's current frame. The target's monotone path +requires `F` to lie inside `H`. Thus `F` is either the source space itself +or `H`: a rank-six space has codimension one in `H`. This accounts for all +real subspaces, including ones outside the retained frame catalogue. + +The first read can use rank six only when its source is the unique space +containing `C`. There are two orders with that source first. After this +read, either remaining source joins the target's rank-six frame to `H`. +The remaining reads therefore use `H`. In every other schedule all reads +use `H`. There are six all-`H` orders and two early-read orders per target. +Disjoint register sets make these choices independent across targets. + +## Full cost of an early read + +A climb of dimension `d` contributes `d^p` to the unnormalized recursive +moment. In the inherited price engine, the exponent is `p = 1 - a` and the +common positive normalization is `m^(a-1) / W`. The child-count fallback +term is also unchanged here. These statements concern the paid moment, +not a new admission theorem for a physical implementation. + +Count the target and its three sources, including their later full-frame +cleanup: + +| Schedule | Target climbs | Source climbs through cleanup | Combined profile | +|---|---|---|---| +| Original or all reads at `H` | `5` | three copies of `1, 1` | `{1: 6, 5: 1}` | +| One early rank-six read | `4, 1` | one `2`, two copies of `1, 1` | `{1: 5, 2: 1, 4: 1}` | + +The exact profile change per early read is +`{1: -1, 2: +1, 4: +1, 5: -1}`. Both profiles have seven paid calls and +rank mass eleven. The changed pair of ranks is `(5, 1) -> (4, 2)`. +Strict concavity gives + +```text +2^p - 1 > 5^p - 4^p, 0 < p < 1, +2^p + 4^p - 1 - 5^p > 0. +``` + +For example, integrate the strictly decreasing derivative `p*x^(p-1)` +over `[1,2]` and `[4,5]`. Their equal lengths give the first inequality. +This proves the sign for the full open interval; finite exponent samples +are unnecessary. The difference is zero at `p=0` and `p=1`, which are +outside the strict claim. + +The complete baseline local profile is +`{1:1320, 2:1440, 4:60, 5:120, 8:9}`. Taking all 120 early reads gives +`{1:1200, 2:1560, 4:180, 8:9}`. Both have 2,949 paid calls and rank mass +5,112. All fixed A/D/scatter/C/final work and the nine rank-eight COPYs are +included in this recount. If exactly `k` targets use the early read, the +moment increases by `k * (2^p + 4^p - 1 - 5^p)`. + +Seed 3 selects target 3 as the worked example. Its register is 123, its cell +is frame 145, and `H` is frame 555. Sources 10, 290 and 340 enter at frames +380, 383 and 384; only source 10 can be read early. These identifiers and a +digest of the complete geometry census are retained in `CERTIFICATE.json`. + +## Checks and limits + +The primary replay checks exact F2 identities with arbitrary initial bits +in every register. It rejects an incompatible source read at rank six, a +missing target read, source reuse that would invalidate independent choices, +and a cost certificate omitting the rank-two cleanup. The independent +checker tests the entire finite frame/order domain by a different method. +`VALIDATION.json` records execution results and checks that were not run. + +This is a proof for the stated finite family, supported by exact geometry +and scalar replays. It is not a formal Lean proof of the multiplication +theorem. It does not cover changes to earlier frames, source circuits, +decoder totals, helper allocation, non-monotone frames, cleanup, or the +recursive interface. It does not claim global bit optimality or a new κ. +All inherited all-size/compiler/common-label/mutable-basis, pooled hosting, +residual, precision/tape/exact recovery and analytic assumptions remain. + +## Credit and license + +The R420 word and its interleaved cleanup are eumemic's PR543 contribution, +building on the PR493 carrier skeleton. Dylan Crow's PR370 supplies the E8 +decoder; DreamingOfClouds' PR510 supplies the nine-stage pricing lineage. +PR589 explores a different punctured bit word and is not a dependency of +this experiment. Tuomo Kiiskinen's PR661 supplied the fixed-gate boundary +that motivated this distinct split-read question. Concurrent PR670, +PR674, PR686, PR688, PR691 and PR694 change scalar circuits or compensation; +their constructions are not imported here. + +Prepared for Sagar Thakrar / thakrarsagar with substantial OpenAI Codex +assistance, including a separate Codex worker for independent exact +enumeration. New files are under the repository's Apache-2.0 license. +Original supplier files and `upstream/` are unchanged. diff --git a/research/r420-split-target-reads/SOURCES.json b/research/r420-split-target-reads/SOURCES.json new file mode 100644 index 0000000000..3fb71fdc28 --- /dev/null +++ b/research/r420-split-target-reads/SOURCES.json @@ -0,0 +1,37 @@ +{ + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "selected_result": { + "record": "certificates/selected-result.json", + "sha256": "b3bf402f31a69bde0629936a9b569bed48281568d7b16d5fba120b5311ea1f53", + "kappa": "51110230636731/31250000000000000", + "source_pr": 626, + "source_commit": "660de893d27bb7abd1d5b01b1640207528a5c851", + "review": "docs/research/community-k492-review.md" + }, + "bit_source": { + "pr": 543, + "author": "eumemic", + "commit": "2065fe4f72a914d907f1046603f5a36f17018535", + "path": "research/e8-bit-r420/data/bitE8mut-r420.json.gz", + "git_blob_at_source_and_base": "0c63ca62759dc63d302be6552aeeee1ede70350f", + "compressed_sha256_for_provenance_only": "9721a3819efd68307f66f00d84a952eb28eb7c3ad2ce79653ce295c98a764784", + "decompressed_sha256_checked": "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" + }, + "reference_sha256": { + "research/e8-bit-r420/README.md": "9807be57c6adf26b30e4f54e2f8160075bbc05091f1a6d157e43d2a4620c1c9f", + "research/e8-bit-r420/code/gen_l3.py": "d5c802447c99255db1bdfcae62b2116bfc9612c9dc9000d41aa4f5f2fec9f2f2", + "research/e8-bit-r420/code/xcheck.py": "5737d18a7826fd51e131035f2d7bebba2e2868af91dd7672a5f11208b036d424", + "research/e8-bit-r420/EXPECTED.json": "06eccee9f6b77e140833df83407e7996dc948c17d49b0779ab171fbe463fd28d", + "research/e8-bit-carrier-skeleton/code/hub/e8-r740-replica32/code/engines/moment.py": "81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482" + }, + "predecessor_scope_reference": { + "pr": 661, + "author": "Tuomo Kiiskinen / yuj1r0", + "head": "9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/661", + "use": "Scope comparison only. No implementation or certificate imported. Its fixed-gate frame bound excludes the single-source factorization studied here." + }, + "runtime": "Python >= 3.9, standard library only; no solver or third-party dependencies", + "attribution": "Prepared for Sagar Thakrar / thakrarsagar with substantial OpenAI Codex assistance, including independent computational checking by a separate Codex worker.", + "license": "Apache-2.0" +} diff --git a/research/r420-split-target-reads/VALIDATION.json b/research/r420-split-target-reads/VALIDATION.json new file mode 100644 index 0000000000..f0186ce95c --- /dev/null +++ b/research/r420-split-target-reads/VALIDATION.json @@ -0,0 +1,61 @@ +{ + "date_utc": "2026-10-13", + "environment": "macOS Darwin 25.5.0 arm64, CPython 3.14.8", + "status": "PASS scoped finite check and independent enumeration", + "commands": [ + { + "command": "python3 -B research/r420-split-target-reads/check.py", + "exit_code": 0, + "observed_seconds": 0.198, + "result": "PASS_R420_SPLIT_TARGET_READ_BOUND targets=120 schedules=8^120 controls=4 kappa=unchanged" + }, + { + "command": "python3 -B research/r420-split-target-reads/independent_check.py", + "exit_code": 0, + "observed_seconds": 1.172, + "result": "PASS_INDEPENDENT_SPLIT_READS targets=120 candidates=5760 legal=960 baseline=720 promoted=240 rejected_first_D6=240" + }, + { + "command": "python3 -O -B research/r420-split-target-reads/check.py", + "exit_code": 0, + "result": "same PASS; checks do not depend on assert" + }, + { + "command": "python3 -O -B research/r420-split-target-reads/independent_check.py", + "exit_code": 0, + "result": "same PASS; checks do not depend on assert" + }, + { + "command": "python3 -B scripts/verify_selected_result.py", + "exit_code": 0, + "result": "PASS selected record, exact kappa, original source inventory and proof supplement: 51110230636731/31250000000000000" + } + ], + "additional_checks": [ + "Both scripts pass with python3 -I -B using absolute script paths from /tmp, with isolated imports and no dependency on the current directory.", + "A separate Codex worker independently checked the proof, both implementations, certificate and all SOURCES.json reference hashes; no concrete defect found.", + "The source word's Git blob is identical at PR543 and the recorded base.", + "In-memory external controls reject a modified decompressed source and a modified certificate; no repository files were changed by those controls.", + "git diff --cached --check passes. Only research/r420-split-target-reads/ is added; upstream/ and the selected frontier are unchanged." + ], + "coverage": { + "primary_scalar_replays": "all 660 symbolic dirty-input columns, original and all-early words", + "primary_negative_controls": 4, + "independent_candidate_schedules": 5760, + "independent_legal_schedules": 960, + "independent_illegal_first_rank_six_reads": 240, + "simultaneous_coverage": "All 8^120 combinations by disjoint register sets and additive cost; not brute-force replay of the Cartesian product.", + "exponent_coverage": "All real 0 < p < 1 by the written strict-concavity proof; no numerical exponent sweep." + }, + "not_run": [ + "Repository-wide make verify and make frontier626-verify: no selected construction, generator, interface or assembly was changed; the standalone additions were checked directly and selected source binding passed.", + "Remote CI, Linux execution and older Python versions.", + "Full physical/compiler/precision/tape/analytic admission or Lean multiplication proof." + ], + "overlap_refresh": { + "through_pr": 709, + "pr661_head": "9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89", + "main_head": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "result": "No competing split-target-read result found. PR661 freezes gate grouping; newer R420 proposals concern scalar circuits, compensation or checker performance." + } +} diff --git a/research/r420-split-target-reads/check.py b/research/r420-split-target-reads/check.py new file mode 100644 index 0000000000..f9479c57fa --- /dev/null +++ b/research/r420-split-target-reads/check.py @@ -0,0 +1,257 @@ +#!/usr/bin/env python3 +"""Exact census of separately framed R420 target reads. Apache-2.0. + +Prepared for thakrarsagar with substantial OpenAI Codex assistance. +No predecessor checker is imported. Python 3.9+, standard library only. +""" +import copy +import gzip +import hashlib +import itertools +import json +import math +import sys +from collections import Counter +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parent.parent +WORD = ROOT / "research/e8-bit-r420/data/bitE8mut-r420.json.gz" +PAYLOAD_SHA256 = "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" +BASELINE = {1: 1320, 2: 1440, 4: 60, 5: 120, 8: 9} +DELTA = {1: -1, 2: 1, 4: 1, 5: -1} + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def primitive(row): + g = math.gcd(*row) + if not g: + return tuple(row) + first = next(x for x in row if x) + return tuple(x // (g if first > 0 else -g) for x in row) + + +def reduce_row(row, basis): + row = tuple(row) + for pivot, b in basis: + if row[pivot]: + a = row[pivot] + row = primitive(tuple(b[pivot] * x - a * y for x, y in zip(row, b))) + return row + + +def span(rows): + basis = [] + for row in rows: + row = reduce_row(row, basis) + if any(row): + pivot = next(i for i, x in enumerate(row) if x) + basis.append((pivot, primitive(row))) + basis.sort() + return tuple(basis) + + +class Replay: + def __init__(self, word): + self.w = word + self.bases = [span(word["lines"][i] for i in f) for f in word["frames"]] + self.dims = [len(b) for b in self.bases] + self.contains_cache = {} + + def contains(self, outer, inner): + key = (outer, inner) + if key not in self.contains_cache: + self.contains_cache[key] = all( + not any(reduce_row(row, self.bases[outer])) + for _, row in self.bases[inner] + ) + return self.contains_cache[key] + + def run(self, tail=None): + w = self.w + n = 2 * w["v"] + w["R"] + cur = w["start"][:] + values = [1 << r for r in range(n)] + hist = Counter() + + def climb(r, f): + need(self.contains(f, cur[r]), "non-nested frame") + gap = self.dims[f] - self.dims[cur[r]] + if gap: + hist[gap] += 1 + cur[r] = f + + def gates(items): + for f, d, sources in items: + need(sources and d not in sources and len(sources) == len(set(sources)), + "invalid gate operands") + for r in [d] + sources: + climb(r, f) + for s in sources: + values[d] ^= values[s] + + gates(w["D"]) + gates(w["A"]) + # Each retained total has one paid full-rank COPY; scatter stays at zero. + need(all(self.dims[cur[r]] == 8 for r in w["ret"]), "COPY frame") + hist[8] += len(w["ret"]) + for t, row in enumerate(w["scatter"]): + need(self.dims[cur[w["v"] + t]] == 0, "scatter target frame") + for k in row: + values[w["v"] + t] ^= values[w["ret"][k]] + gates(w["B"][:-120]) + entrance = cur[:] + gates(w["B"][-120:] if tail is None else tail) + gates(w["C"]) + for r, f in enumerate(w["final"]): + climb(r, f) + expected = [1 << r for r in range(n)] + for t in range(w["v"]): + expected[w["v"] + t] ^= 1 << t + need(values == expected, "dirty-input scalar identity") + return hist, entrance + + +def local_profile(replay, target_frame, source_frames, top, order, read_frames): + cur_target = target_frame + cur_sources = list(source_frames) + hist = Counter() + for j, f in zip(order, read_frames): + need(replay.contains(f, cur_target) and replay.contains(f, cur_sources[j]), + "illegal split read") + need(replay.contains(top, f), "read exceeds final target frame") + for old in (cur_target, cur_sources[j]): + gap = replay.dims[f] - replay.dims[old] + if gap: + hist[gap] += 1 + cur_target = cur_sources[j] = f + need(cur_target == top, "target endpoint") + # C and the final climb require every source to reach rank eight. + for f in cur_sources: + hist[8 - replay.dims[f]] += 1 + return hist + + +def census(replay, entrance): + w = replay.w + tail = w["B"][-120:] + need([d for _, d, _ in tail] == list(range(120, 240)), "target tail") + used = Counter(s for _, _, sources in tail for s in sources) + need(len(used) == 360 and set(used.values()) == {1}, "independent source sets") + need(not set(used).intersection(range(120, 240)), "source is a target") + need(all(replay.dims[f] == 8 for f, _, _ in w["C"]), "full-frame cleanup") + cases = [] + split_tail = [] + for top, d, sources in tail: + need(len(sources) == 3, "three-source gate") + cell = entrance[d] + sf = [entrance[s] for s in sources] + need(replay.dims[cell] == 2 and replay.dims[top] == 7, "target ranks") + need(all(replay.dims[f] == 6 and replay.contains(top, f) for f in sf), + "source ranks and containment") + need(all(len(span([r for f in pair for _, r in replay.bases[f]])) == 7 + for pair in itertools.combinations(sf, 2)), "distinct source hyperplanes") + eligible = [j for j, f in enumerate(sf) if replay.contains(f, cell)] + need(len(eligible) == 1, "one early source") + need(all(replay.dims[w["final"][s]] == 8 for s in sources), "source final ranks") + profiles = Counter() + for order in itertools.permutations(range(3)): + for first in ([top, sf[order[0]]] if order[0] in eligible else [top]): + h = local_profile(replay, cell, sf, top, order, [first, top, top]) + profiles[tuple(sorted(h.items()))] += 1 + original = ((1, 6), (5, 1)) + early = ((1, 5), (2, 1), (4, 1)) + need(profiles == {original: 6, early: 2}, "exhaustive local profiles") + j = eligible[0] + split_tail.append([sf[j], d, [sources[j]]]) + split_tail.extend([top, d, [s]] for k, s in enumerate(sources) if k != j) + cases.append({"target": d - 120, "cell": cell, "top": top, + "sources": sources, "source_frames": sf, + "early_source": sources[j]}) + return cases, split_tail + + +def rejected(call, message): + try: + call() + except ValueError as exc: + need(message in str(exc), "negative control rejected for wrong reason") + else: + raise ValueError("negative control was accepted: " + message) + + +def check(): + payload = gzip.decompress(WORD.read_bytes()) + need(hashlib.sha256(payload).hexdigest() == PAYLOAD_SHA256, "source payload pin") + w = json.loads(payload) + need((w["h"], w["v"], w["R"]) == (8, 120, 420), "word parameters") + replay = Replay(w) + baseline, entrance = replay.run() + need(baseline == BASELINE, "complete baseline profile") + cases, split_tail = census(replay, entrance) + changed, _ = replay.run(split_tail) + expected = Counter(BASELINE) + expected.update({d: 120 * n for d, n in DELTA.items()}) + need(changed == +expected, "complete split profile with cleanup") + need(sum(d * n for d, n in changed.items()) == 5112, "rank mass") + need(sum(changed.values()) == sum(baseline.values()), "paid call count") + # Exact majorization certificate. Strict concavity applies for every 0 < p < 1. + need([5, 1] != [4, 2] and 5 > 4 and 5 + 1 == 4 + 2, "majorization") + controls = [] + bad = copy.deepcopy(split_tail) + bad[0][2] = split_tail[1][2][:] + rejected(lambda: replay.run(bad), "non-nested frame") + controls.append("wrong source at rank six") + bad = copy.deepcopy(split_tail) + del bad[2] + rejected(lambda: replay.run(bad), "dirty-input scalar identity") + controls.append("missing target read") + bad_word = copy.deepcopy(w) + bad_word["B"][-1][2][0] = bad_word["B"][-2][2][0] + rejected(lambda: census(Replay(bad_word), entrance), "independent source sets") + controls.append("shared source invalidates independent choices") + # Omitting the source's rank-six-to-eight cleanup would change the answer. + need(DELTA == {1: -1, 2: 1, 4: 1, 5: -1}, "cleanup-inclusive delta") + unpaid = Counter(changed) + unpaid[2] -= 120 + rejected(lambda: need(unpaid == +expected, "complete split profile with cleanup"), + "complete split profile with cleanup") + controls.append("omitted rank-two source cleanup") + return { + "status": "PASS_R420_SPLIT_TARGET_READ_BOUND", + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "source_pr": 543, + "source_commit": "2065fe4f72a914d907f1046603f5a36f17018535", + "payload_sha256": PAYLOAD_SHA256, + "targets": len(cases), "distinct_sources": 360, + "source_orders_per_target": 6, "legal_schedules_per_target": 8, + "simultaneous_schedules": str(8 ** 120), + "baseline_equivalent_per_target": 6, "strictly_worse_per_target": 2, + "baseline_profile": dict(sorted(baseline.items())), + "all_early_profile": dict(sorted(changed.items())), + "profile_delta_per_early_read": DELTA, + "rank_mass": 5112, "paid_calls": sum(baseline.values()), + "moment_difference": "2^p + 4^p - 1 - 5^p > 0 for 0 < p < 1", + "majorization": {"baseline": [5, 1], "early_read": [4, 2]}, + "dirty_input_columns_per_replay": 660, + "negative_controls": controls, + "worked_example": cases[3], + "geometry_census_sha256": hashlib.sha256( + json.dumps(cases, sort_keys=True, separators=(",", ":")).encode() + ).hexdigest(), + } + + +if __name__ == "__main__": + result = check() + if sys.argv[1:] == ["--emit"]: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + need(not sys.argv[1:], "usage: check.py [--emit]") + need(json.loads((HERE / "CERTIFICATE.json").read_text()) == + json.loads(json.dumps(result)), "certificate mismatch") + print("PASS_R420_SPLIT_TARGET_READ_BOUND targets=120 schedules=8^120 controls=4 kappa=unchanged") diff --git a/research/r420-split-target-reads/independent_check.py b/research/r420-split-target-reads/independent_check.py new file mode 100644 index 0000000000..83a4fbc635 --- /dev/null +++ b/research/r420-split-target-reads/independent_check.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +"""Independent exact replay of the 48 singleton-read choices per R420 target. + +Prepared for thakrarsagar with substantial OpenAI Codex assistance, including a +separate verification worker. Source construction: eumemic, PR543. +SPDX-License-Identifier: Apache-2.0 + +This uses rational row elimination, without importing the construction or +other checkers. The README supplies the argument covering all real subspaces. +""" + +from collections import Counter +from fractions import Fraction +import gzip +import hashlib +from itertools import combinations, permutations, product +import json +from pathlib import Path + + +PAYLOAD_SHA256 = "e597e3885c0a8daa262afa5985ee2930443329126aece76d33159d81882bdcc2" +SOURCE = Path(__file__).resolve().parents[1] / "e8-bit-r420/data/bitE8mut-r420.json.gz" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def basis(rows): + pivots = {} + for row in rows: + reduced = list(map(Fraction, row)) + for column, vector in sorted(pivots.items()): + coefficient = reduced[column] + if coefficient: + reduced = [x - coefficient * y for x, y in zip(reduced, vector)] + pivot = next((i for i, value in enumerate(reduced) if value), None) + if pivot is not None: + coefficient = reduced[pivot] + pivots[pivot] = [value / coefficient for value in reduced] + return list(pivots.values()) + + +def main(): + payload = gzip.decompress(SOURCE.read_bytes()) + require(hashlib.sha256(payload).hexdigest() == PAYLOAD_SHA256, "source pin mismatch") + word = json.loads(payload) + bases = {} + + def frame_basis(frame): + if frame not in bases: + bases[frame] = basis(word["lines"][i] for i in word["frames"][frame]) + return bases[frame] + + def rank(frame): + return len(frame_basis(frame)) + + def join_rank(left, right): + return len(basis(frame_basis(left) + frame_basis(right))) + + require(len(word["B"]) == 837, "phase-B gate count changed") + current = word["start"][:] + # Scatter changes values at frame zero, so it makes no frame update. + for frame, destination, sources in word["D"] + word["A"] + word["B"][:717]: + for register in [destination] + sources: + current[register] = frame + + tops = word["B"][717:] + targets = {destination for _, destination, _ in tops} + usage = Counter(source for _, _, sources in tops for source in sources) + require(targets == set(range(120, 240)), "top targets changed") + require(len(usage) == 360 and set(usage.values()) == {1}, "top sources are reused") + require(not targets.intersection(usage), "a top source is a target") + require(all(rank(word["final"][source]) == 8 for source in usage), "cleanup boundary changed") + require(all(rank(frame) == 8 for frame, _, _ in word["C"]), "cleanup frame changed") + require(all(not targets.intersection([dest] + src) for _, dest, src in word["C"]), + "cleanup touches a target") + + profiles = Counter() + per_target = Counter() + source_pair_ranks = Counter() + compatible_positions = Counter() + forbidden_first_reads = 0 + candidates = 0 + for final_frame, target, sources in tops: + require(len(sources) == 3, "top operand count changed") + require(final_frame == word["final"][target], "target boundary changed") + cell = current[target] + initial = {source: current[source] for source in sources} + require(rank(cell) == 2 and rank(final_frame) == 7, "target ranks changed") + require(all(rank(frame) == 6 for frame in initial.values()), "source rank changed") + require(all(join_rank(frame, final_frame) == 7 for frame in initial.values()), + "source lies outside the target's final frame") + compatible = [i for i, source in enumerate(sources) + if join_rank(cell, initial[source]) == 6] + require(len(compatible) == 1, "target does not have exactly one compatible source") + compatible_positions[compatible[0]] += 1 + for source in sources: + if join_rank(cell, initial[source]) != 6: + require(join_rank(cell, initial[source]) == 7, "unexpected first-read span") + forbidden_first_reads += 1 + for left, right in combinations(sources, 2): + source_pair_ranks[join_rank(initial[left], initial[right])] += 1 + + for order in permutations(sources): + for choices in product((0, 1), repeat=3): + candidates += 1 + target_frame = cell + source_frames = initial.copy() + profile = Counter() + for source, use_final in zip(order, choices): + read_frame = final_frame if use_final else initial[source] + if join_rank(target_frame, read_frame) != rank(read_frame): + break + for previous in (target_frame, source_frames[source]): + increment = rank(read_frame) - rank(previous) + if increment: + profile[increment] += 1 + target_frame = source_frames[source] = read_frame + else: + final_increment = 7 - rank(target_frame) + if final_increment: + profile[final_increment] += 1 + for frame in source_frames.values(): + profile[8 - rank(frame)] += 1 + profiles[tuple(sorted(profile.items()))] += 1 + per_target[target] += 1 + + require(candidates == 5760, "candidate coverage changed") + require(set(per_target) == targets and set(per_target.values()) == {8}, + "expected exactly eight legal schedules per target") + require(profiles == {((1, 6), (5, 1)): 720, ((1, 5), (2, 1), (4, 1)): 240}, + "paid profile distribution changed") + require(source_pair_ranks == {7: 360}, "source pair spans changed") + require(compatible_positions == {0: 42, 1: 30, 2: 48}, "compatible positions changed") + require(forbidden_first_reads == 240, "first-D6 negative-control coverage changed") + print("PASS_INDEPENDENT_SPLIT_READS targets=120 candidates=5760 legal=960 " + "baseline=720 promoted=240 rejected_first_D6=240") + + +if __name__ == "__main__": + main() From 688258f863410419d10e34b0b3014b91cdce632c Mon Sep 17 00:00:00 2001 From: Sagar Thakrar Date: Tue, 13 Oct 2026 10:15:31 +0530 Subject: [PATCH 2/2] Record completed sprint result and PR handoff --- research/r420-split-target-reads/CLAIM.json | 6 +++++- research/r420-split-target-reads/VALIDATION.json | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/research/r420-split-target-reads/CLAIM.json b/research/r420-split-target-reads/CLAIM.json index 11edd2e1ea..2c91880b91 100644 --- a/research/r420-split-target-reads/CLAIM.json +++ b/research/r420-split-target-reads/CLAIM.json @@ -20,5 +20,9 @@ "head": "9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89", "distinction": "Changes gate grouping and allows different frames for reads within one original gate; the fixed-gate result does not cover this family." }, - "status": "in progress" + "status": "complete", + "finished_at_utc": "2026-10-13T04:45:00Z", + "result": "Scoped negative result: each target has six equal-cost and two strictly worse split schedules for every 0 < p < 1, covering all 8^120 simultaneous choices. Exact primary replay and independent exhaustive rational enumeration pass; no new kappa.", + "final_overlap_checked_through_pr": 717, + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/718" } diff --git a/research/r420-split-target-reads/VALIDATION.json b/research/r420-split-target-reads/VALIDATION.json index f0186ce95c..109a9b737c 100644 --- a/research/r420-split-target-reads/VALIDATION.json +++ b/research/r420-split-target-reads/VALIDATION.json @@ -53,9 +53,9 @@ "Full physical/compiler/precision/tape/analytic admission or Lean multiplication proof." ], "overlap_refresh": { - "through_pr": 709, + "through_pr": 717, "pr661_head": "9ca7aa3ab0a3260a2f36ac86b9911a31fd88bd89", "main_head": "66849e1475c930fd7732b1a0067ffee7e1e95f60", - "result": "No competing split-target-read result found. PR661 freezes gate grouping; newer R420 proposals concern scalar circuits, compensation or checker performance." + "result": "No competing split-target-read result found. PR661 freezes gate grouping; newer R420 proposals concern scalar circuits, compensation, changed cleanup, adjacent A swaps or checker performance." } }