Skip to content

Reduce fixed CRT cache setup to one inverse call (no new κ) - #5098

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w2-1022o-crt-one-inverse
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w2-1022o-crt-one-inverse

Conversation

@petalas

@petalas petalas commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepare PR4716's fixed CRT cofactor/target cache with one modular-inverse provider call, replacing its cited m+1-call setup. Claim type: scoped algebraic construction and proof, with exact finite corroboration. No new kappa.

S = product(left moduli), C_j = S/n_j, T = S*s
A = sum(C_j) mod S, v = S*Q mod s
r = inverse((s*A + S*v) mod T, T)       # sole inverse call
alpha_j = s*r mod n_j, mu = S*r mod s

The written proof gives the extraction identities and exact coprimality/domain criterion. Current-residue reconstruction and padded invalidity retain the predecessor contract; subsequent evaluations invoke no inverse provider. Only research/crt-one-inverse-cache/ changes.

Evidence

  • Before: Hiroki KUMAZAKI's Audit current-state CRT repair queries and cached inverses #4716 uses m+1 setup inversions and explicitly makes no inverse-count minimality claim. Its proof and source are pinned as provenance, without replaying predecessor executables.
  • After: 209 new cache setups and 8,871 current vectors pass. The (11,13;17;1) fixture uses inverse(1409,2431)=892, yielding alpha=(6,6) and mu=5. One-call spies remain active through every evaluation. Sixteen invalid inputs/providers reject; three omission controls detect dropping the target summand or extraction multipliers.
  • Warning-strict normal and optimized registered checks pass on CPython 3.12.15 / macOS arm64, timed individually at 0.09 and 0.12 seconds. The registered package runner, committed-byte/source-history preflight, official export integrity and read-only Git-free normal/optimized export replays pass at 16402004d411e15a273d4e6946388d5a93061778.

Exact reproduction from the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/crt-one-inverse-cache
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/crt-one-inverse-cache --check-source-history
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/crt-one-inverse-cache/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/crt-one-inverse-cache/verify.py

Limitations

The new inverse modulus is the full left-and-target product, at most (m+1)ell bits when each modulus has at most ell bits. The old inverse moduli each have at most ell bits. One wider inversion may cost more than the separate calls. All extra division, multiplication and reduction work remains real work; no bit-cost, runtime or minimality claim follows from the provider-call count.

Physical cache preparation/erasure, complete key/caller integration, total tape cost, supplier admission and full multiplication proof remain unrun. No native/Lean/full-selected replay was needed or performed. Independent human and formal proof-kernel review are unclaimed. Selected conditional 60403/20000000 remains unchanged.

Open next questions

  • Fix one binary-arithmetic tariff and compare the complete packed setup with the separate inverse calls, including operand widths and every other operation.
  • Prepare and erase the packed constants in an actual encoded CRT arena, beginning with (11,13;17;1) and a complete ownership/head-return bill.

Related open work

Completion refresh checked this account's open PRs created since the advance CLAIM at 2026-10-23T09:04:31Z. Only this PR was listed, so no additional same-object line or numerical comparison was needed. No additional scientific computation was run.

Credit

Produced by Nick Petalas. Credit Hiroki KUMAZAKI #4716/#4169/#4174, Cinna Davis #4100, unpaidmoon #4377, Ryanson Jonathan #4409, ToikY's Beneš lineage, Douglas Colkitt/John-Michael Smith #763 and retained predecessors. The proof uses elementary CRT cofactor congruences. JoyboyBrian's #5053 encoded current-child producer remains a separate contribution. Advance claim.

CI notes

Both hosted checks passed at exact head 16402004d411e15a273d4e6946388d5a93061778 in run 39930311098: planning in 4m26s and the registered package replay in 1m12s. Run metadata confirms that head and successful completion. The registered replay executes both warning-strict normal and optimized commands. Checks were read once at completion. Local source-history/committed-byte, export-integrity and Git-free checks also passed. This is automated execution evidence, not independent human or formal proof-kernel acceptance. No CI failure was observed.

Merge Danger

Door: two-way. Blast radius: isolated research package. Existing sources, shared code and selected records are unchanged.

@Mister-Meeseeks
Mister-Meeseeks merged commit bf5519a 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