Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a portable bounded multiplication kernel applying four pinned Lean-library interfaces: tcslib Word RAM semantics, FastPoly fixed circuit sharing, CatCrypt NTT convolution/inversion, and mpfx sufficient recovery.
The exact backend assembles and interprets a fixed literal 64-bit RAM program for operands of up to 256 hexadecimal digits. It charges constant synthesis, reduction, carrying, clearing and halt; preserves operands and exterior memory; and clears every owned intermediate. The informal proof covers all admitted inputs. At maximal 1,024-bit operands, sharing costs 391,079 instructions versus 636,835 for the explicit same-ABI recomputation control, saving 245,756 instructions (38.59%). This is a bounded cost comparison, not a new asymptotic kappa or a comparison against the selected construction.
A separate fixed-point FFT backend has complete sufficient error propagation and rational twiddle certificates: 31 fractional bits suffice under its conservative bound, while 40 bits bound coefficient error below 0.001. Its multiword costs are kept separate from RAM64. Full source interfaces and predecessor credit are retained; upstream Lean libraries are not claimed rebuilt or imported. See the local Lean helper status in the package for its exact audit outcome; the complete machine theorem remains informal.
Validation:
python3 -B research/wordram-ntt-kernel/verify.pypasses eight NTT test groups, a 65,537-case modular-multiply slice, 5,096 butterfly cases, 2,197 circuit cases, 277 complete-program controls, and 20 approximate-backend pairs at each precision. Python 3.10+ standard library only, with no platform-specific runtime dependency; replay was run on Windows, not independently on Linux.Scope and overlap: pinned main
32890bc5de034ab8fc93ac88ead7279a6a416d04; no selected-record changes. The PR 5413/5407/5414 lineage remains authoritative. Pending #5443, #5438, #5451 and #5442 have distinct lifetime/grid/operator/all-width statements and are acknowledged. Classical transform/sharing/recovery ideas and all source contributors retain credit. Prepared for Dugongue with substantial OpenAI Codex assistance from four workers. Open next questions are in the README.