Skip to content

Audit #4100 CRT.md's sparse exception repair tariff at Θ(p)-bit records: O(V) dense, o(V) sparse at every p (no new κ) - #4328

Merged
Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
pinterbanget:pr4100-crt-repair-tariff
Oct 21, 2026
Merged

Mister-Meeseeks merged 3 commits into
CrocSwap:mainfrom
pinterbanget:pr4100-crt-repair-tariff

Conversation

@pinterbanget

@pinterbanget pinterbanget commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This adds research/pr4100-crt-repair-tariff/. It audits the cost of the sparse exception repair in Cinna Davis's #4100 CRT.md §4: "sort those holes by this full key on fixed tapes, and merge them back … It does not sort the full input", and "bad-key evaluation, O(p)-bit keys, radix passes, counters and clearing all fit O(V)".

Gap. Every open CRT audit excludes this tariff:

The mechanism is jmbarrancoml's merged PR2250, but its cost O(V + M A³ + δ M A(R+A)) is absorbed there only because its records are superpolynomial. In CRT.md R and L are both Θ(p), so M A³ = Θ(p²)V. CRT.md says not to import that tariff unchanged, but nobody had checked its replacement.

Claim type: a scoped proof audit (per-step accounting with explicit constants and exact absorption at #4100's parameters), checked against a literal tape run around #4100's own compact fixture. No new κ.

Result

The tariff holds. Per color:

  • Dense part, ≤ 9MR + 5M. One split scan driven by the guard scan's hole mask, and one reinsertion scan. No key, inverse or arithmetic work touches a good record.
  • Sparse part, ≤ N(L+R)(9L+6) plus N key evaluations. Keys T(S^-1(x)) are computed only at holes, followed by L two-bucket stable LSD passes at nine sweeps each, and keyed reinsertion.
  • Counter, ≤ 8M + 4LN + 4L.
  • Absorption. With δ ≤ r(2/B + 8B/2^K) at Propose unconditional κ = 0.00173097911567079247276057 via batched CRT #4100's G = 64(ell+⌈log₂(p+2)⌉), the sparse moves are ≤ p³(p+2)^-64·V, which is o(V) at every p. The exact values run from 2^-640 at p=16 to 2^-37,326 at p=2^64. CRT.md's 2^-G E ≤ 2^(-60ell)(p+2)^(-48) line also holds exactly.

Caution, not a defect. Reinsertion's check "key equals current address" only proves the keys permute the holes. Keys S^-1(x) without T also pass it while misplacing every hole record. Correct keys rest on the inverse evaluator: #4169's reverse word composed with T.

Evidence

verify.py uses only the standard library and takes about 6 seconds.

  • Fixtures. S and T come from Propose unconditional κ = 0.00173097911567079247276057 via batched CRT #4100's pinned check_batched_crt.py (compact, good). There are five fixtures: B ∈ {4,8,16}, guard 6 or 8, three source functions, M up to 65,536.
  • Correctness. The repair realizes T on every record, and keys are evaluated only at holes. The measured density never exceeds 2/B + 8B/2^K.
  • Costs. The dense part is at most 7.23·MR; the sorted part is 9.3–9.5·L(L+R) per hole.
  • Controls, each of which must fail:
    • A full-input sort evaluates 16,384 keys instead of 11,776 and moves 262·MR, which is Θ(L)·V.
    • Keys S^-1(x) misplace 5,888 records without the reinsertion check noticing.
    • Without repair, 2,048 records are wrong.

Commands run locally (macOS, CPython 3.12):

python3.12 -B scripts/research_package.py --package research/pr4100-crt-repair-tariff --check-only
  PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)
python3.12 -B scripts/research_package.py --package research/pr4100-crt-repair-tariff
  PASS_REGISTERED_RESEARCH_PACKAGE research/pr4100-crt-repair-tariff outcome=completed
python3.12 -B scripts/check_research_commit.py --package research/pr4100-crt-repair-tariff --check-source-history
  PASS_RESEARCH_COMMIT_BYTES {... "files": 8, ...}

Update: exact two-target check (head b3ea5ee525b131273d190747b892e5f3667d286f)

This closes the package's earlier open question 2.

  • Exact r-target density. Active targets use distinct digits and disjoint guard windows, so on a complete enumeration the good events are independent and δ_r = 1 − [(1−1/B)²(1−8B/2^K)]^r holds exactly. CRT.md's r(2/B+8B/2^K) follows. The identity is checked exactly on all five one-target fixtures and on every one of the 2^20 addresses of Propose unconditional κ = 0.00173097911567079247276057 via batched CRT #4100's two-target layout (positions=(0,6), B=4, guard 6). That case gives 965,632 holes, density exactly 943/1024. The union bound evaluates to 2 at toy B, so the exact identity is what is checked.
  • Two-target repair. With Propose unconditional κ = 0.00173097911567079247276057 via batched CRT #4100's own source_pair and a second pair reading both guards, the repair realizes the two-target switch on all 1,048,576 records. Costs are 4.65·MR dense and 9.25·L(L+R) per hole, both within the written bounds. Keys without T misplace 724,224 and 603,520 records respectively, undetected by the key check.
  • Sweep-level repair. It runs the 2^20 case and matches the per-cell repair exactly (meters and layout) on all five one-target fixtures.
  • Premise control. A source that reads the other active target breaks S = T on 55,296 good addresses, and S stops preserving the good set. A sparse repair cannot fix that. This is the two-target counterpart of Audit PR4100 arbitrary-source CRT repair with an explicit inverse #4169's counterexample.
  • Runtime. About 45 seconds; the registered replay and the committed-byte preflight pass at the new head.

Not covered

Task and overlap

Credit

🤖 Generated with Claude Code

Per-step accounting of extraction from the hole mask, TS^-1 keys at holes,
two-bucket radix passes, keyed reinsertion and erasure at Theta(p)-bit
records, where PR2250's tariff does not transfer; exact absorption at CrocSwap#4100's
G, B, K; literal tape run around CrocSwap#4100's own compact/good fixture with
failing controls (full-input sort, keys without T, no repair). No new kappa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pinterbanget pushed a commit to pinterbanget/integer-mult-bounds that referenced this pull request Oct 21, 2026
…erage map

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ryanson Jonathan and others added 2 commits October 21, 2026 16:24
Exact r-target bad density 1-[(1-1/B)^2(1-8B/2^K)]^r from disjoint fields
(implies CRT.md's union bound), verified exactly on every one-target fixture
and on all 2^20 addresses of CrocSwap#4100's two-target layout for two sources. The
repair, run by a sweep-level implementation cross-checked against the
per-cell one, realizes the two-target switch on every record within the
written bounds. A source reading the other active target breaks S = T on
55,296 good addresses (premise control).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants