Skip to content

Replace exponential CRT switch tables with cubic-time repair keys - #8127

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w6-1201c-table-free-crt-key
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w6-1201c-table-free-crt-key

Conversation

@petalas

@petalas petalas commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Result

A written construction and fixed-tape cost proof for the exceptional CRT key in the compact switch caller. Three interval reversals implement a padded modular rotation in $12\ell-3$ switch slots at maximum axis width $\ell$. The fold in each reversal turns reflected pairs into a single-bit switch, so each row omits every active target from its controls.

Each complete replacement key $T(S^{-1}(z))$ costs $O(P^3)$ transitions on $P$-bit addresses, with $O(P^2)$ visited scratch cells and $O(P^4)$ setup. The proof includes all three current-state queries, copied descriptors, the literal inverse on dirty addresses, head returns and erasure. It answers the key-evaluator question in Discussion #4709, building on Cinna Davis's #4100 and Hiroki Kumazaki's #4716.

The polynomial key budget permits logarithmic guard widths in the retained caller. Under its ordinary interchange premise the complete CRT packing bound becomes linear in the maximum axis width up to logarithms, where the previous bound was quadratic. The proof gives the explicit bill in both directions.

Reproduction

Run from the repository root with Python 3.12 and the standard library.

python3.12 -B scripts/research_package.py --package research/crt-table-free-rotation-key
python3.12 -B scripts/check_research_commit.py --package research/crt-table-free-rotation-key --check-source-history
python3.12 -W error -B research/crt-table-free-rotation-key/verify.py
python3.12 -W error -B -O research/crt-table-free-rotation-key/verify.py

The replay checks 19,344 small rotations, 180 wide cases and 4,682 transported rotation endpoints. It checks all 131,072 compact addresses for one replacement row. Freezing its entry control vector gives 4,576 wrong keys. A mixed-width fixture tests simultaneous target independence and 2,048 complete keys.

Limitations

The fixed-tape upper bounds are written proofs. The Python replay checks exact address semantics on bounded fixtures. The full CRT corollary uses the retained ordinary interchange and compact layout interfaces. A literal transition-table replay and the square-root multiplication endpoint remain open.

Attempts on the main target

  • I tried a fixed schedule that updates each bit once, as for ordinary addition modulo a power of two. The rotations modulo 6 by 3 and modulo 11 by 5 force an intermediate collision in every once-per-bit order.
  • I decomposed the rotation into interval reversals with repeated bit targets. The folded pair membership test gives a total control that omits the target. Composing those controls with the retained inverse gives the polynomial key bound.

Open next questions

Related open work

  • #8118 uses bulk rotations and sparse repair in the November CRT layout. This package retains the compact bit-switch interface of Propose unconditional κ = 0.00173097911567079247276057 via batched CRT #4100 and changes its row controls.
  • #8122 supplies a short odd-square axis geometry and retains triangular CRT. This proof changes the execution cost of padded rotations on a given geometry.
  • #8102 proposes the November near-square-root frontier. This package addresses a CRT component and leaves the endpoint open.

CI notes

On CPython 3.12.15 and macOS arm64, the local registered normal and optimized replay and the committed source-history preflight passed. The hosted research-package run passed both planning and package replay at 55c9bca6786a7f25c41595d5501ec5a51a495384.

Merge danger

Two-way. The diff adds one isolated research package.

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.

1 participant