Repository navigation
Validate P104 Newton membership with five-bit residues - #5374
Merged
Merged
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.
This algorithmic improvement validates the retained P104 Gaussian Newton entrance using bounded residues. For rank r, membership depends only on each real and imaginary component modulo
2^ceil(r/2). This is the smallest common power-of-two component modulus. At the actual nine-axis boundary, the validator uses five bits per component and 4,608 modular subtractions, even for thousands-bit input coefficients. It preserves the accepted mathematical lattice and returns a checked failing coefficient when an input is outside it. The complete kappa calculation is unchanged.The proof, exact receipt, validator API and source manifest define the result. The new method reduces inputs once, applies modular Boolean differences, then tests powers of
1+iwith shifts and parity. It does not reconstruct wide decoded coefficients. Its conservative bit bound includes input reading:O(NW+Nr^2)for N=2^r and W-bit components. The 5,120 residue-data bits at rank nine exclude Python overhead and are not a physical allocation claim.The matched benchmark uses five alternating trials of 100 calls on the same accepted arrays. Median speedups were 4.37x, 3.70x, 6.44x and 23.71x at coefficient widths 14, 129, 1,025 and 8,065 bits. Both timed paths include their input validation and exclude encoding. These are local membership timings, not whole-collector, physical-supplier or runtime scaling measurements.
Scientific base: canonical main
7c472563474e60185e6ca101a17622133d047e56, priority revision 7. @Clear1nsight supplied the lattice, decoder and collector reference in PR #3382; the consumed source proof and source note retain the full lineage. That includes ywz65's word in PR #2586, Arham Tahir's retained collector, Tekalign's signed pair in PR #3025, and Ross Richardson's period-domain work. The lattice theorem and source algorithms are credited predecessors; no frozen file is changed.Before publication, canonical main advanced to
1ec1119972c9aefe42525172d07b332fcff81cb4and selected conditional kappa 0.0030217758 through PR #4610 and its PR #5241 audit. The changed guidance was read; the mechanism allocation and this package's consumed P104 sources are unchanged. This package retains its starting-base source pins and baseline receipt. It does not alter the maintainer's selection.Use standard-library CPython 3.12 from the repository root:
Expected scientific status:
PASS_NEWTON_BOUNDED_RESIDUE_VALIDATOR_NO_NEW_KAPPA. Normal and optimized CPython 3.12.13 pass 276 complete small Gaussian cases, all 65,536 rank-three real residue arrays, 108 large signed cases, 96 actual collector prefixes and 15 controls. The unchanged decoder and separate subset-sum oracle agree; every rejection certificate is checked directly. Both actual rank-seven recipes, all four wrappers, borrowed sources, final query and private erasure are checked in three complete local collectors. Committed bytes, the official 15-file export, Git-free optimized replay and source/typed-receipt corruption controls pass.The card scope changes from side correction to exact entrance validation. Its obsolete baseline fails at missing
bit_lower; the documented current selected baseline passes. No full P104 word, preceding producer, selected cold replay, Lean, Docker or physical supplier was run. Optional full-history checks are unavailable in this shallow checkout. Physical input movement, allocation/cleanup, actual producer admission and complete supplier pricing remain open. The new API has a broader mathematical domain than the old finite reference; comparisons stay inside the old domain and do not claim identical errors outside it. Prepared by Ali Romman with substantial OpenAI Codex assistance; Apache-2.0. No independent human or proof-kernel review is claimed.