Skip to content

Lower inverse-code arithmetic to a smaller complete local tape bound - #5321

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/kappa-focused-round1
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/kappa-focused-round1

Conversation

@aliromman

@aliromman aliromman commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This algorithmic improvement gives the actual rounded inverse-code map a smaller complete local tape bound. It emits 308 gather and 280 scatter signed sums, retains the eight rounding calls, and uses eight extra temporary words. The complete Gaussian paid profile and κ are unchanged. Common-coordinate owner access and the complete physical caller remain open.

The proof, instruction emitter, replay receipt, and source pins state the exact contract. Base: canonical main ff3cc58e370d0f678e529246f8c73e8094e18fcf, priority revision 7.

For N aligned real-component records, H ≥ 0 and W = bit_length(56H+2)+1:

new: N(2298W+4722)+34W+132, 130 tapes, 17 scratch words
old: N(2898W+5922)+18W+100, 122 tapes,  9 scratch words
old - new = N(600W+1200)-16W-32 > 0 for N >= 1.

The proof charges input validation, division, dirty scratch initialization, classical cleanup, forward movement and final rewind. All owner tapes must already provide the same coordinate. This compares constructive bounds on two fixed-tape models. It is not a measured speedup or an optimality claim. The rounded outputs, local error and noninjectivity are unchanged.

Run with CPython 3.12 and the standard library:

python3.12 -B scripts/research_package.py --package research/factored-code-tape
python3.12 -B scripts/check_research_commit.py --package research/factored-code-tape

Expected markers: PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. Both registered modes passed with Python 3.12.13, including warnings as errors and -O. Checks cover all 112 gather and eight scatter basis columns, 36 batches, 48 exact source-kernel comparisons, dirty scratch return, an independent primitive invoice, and sign/alias negative controls. The committed export passed its inventory check and both direct replay modes without a Git checkout. git diff --check passed. Full-history provenance validation was not run in the shallow checkout. No full Gaussian caller, Lean, compiler or selected-frontier replay ran.

This completes the local tape-cost follow-up claimed here. It builds on the scalar factorization in Discussion #5314. @JoyboyBrian’s PR #5035 supplies the divider, validation and original tariff; @dillona’s PR #4933 supplies the physical mode factorization. The consumed bytes are the canonical-main files in SOURCES.json. Standard Walsh butterflies and retained predecessor work keep their credit. New lowering, allocation, proof and checks: Ali Romman (@aliromman) with substantial OpenAI Codex assistance. Apache-2.0.

@Mister-Meeseeks
Mister-Meeseeks merged commit 3b785d5 into CrocSwap:main Oct 23, 2026
2 checks passed
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