feat(univariate): randomized Cantor-Zassenhaus root search - #254
Closed
olympichek wants to merge 9 commits into
Closed
feat(univariate): randomized Cantor-Zassenhaus root search#254olympichek wants to merge 9 commits into
olympichek wants to merge 9 commits into
Conversation
olympichek
force-pushed
the
gs-univariate-las-vegas
branch
from
June 12, 2026 10:09
2951be0 to
3d2fdc2
Compare
olympichek
marked this pull request as ready for review
June 12, 2026 19:00
olympichek
force-pushed
the
gs-univariate-las-vegas
branch
from
June 13, 2026 19:23
b247ca9 to
7288ca6
Compare
Collaborator
|
Maintainer re-land in progress. This PR is the source of truth for the roots stack (Shoup + Las Vegas). We are re-landing onto current A new PR will open for the port; this PR will close as superseded when that lands. Attribution to Valerii Huhnin (olympichek) is retained. |
This was referenced Aug 7, 2026
Collaborator
dhsorens
added a commit
that referenced
this pull request
Sep 2, 2026
Re-land olympichek's Shoup trace splitter and bounded Las Vegas Cantor–Zassenhaus stack from #253/#254 onto current main (module system, Lean 4.32). Both implement LinearFactorProductSplitter for fields without a smooth multiplicative-subgroup schedule. - Roots/Shoup: small-char trace coordinates [vzGS92] with correctness - Roots/LasVegas: odd CZ + char-2 trace branches, ProbeFamily, probability - Tests on ZMod 2/5/11 and binary-tower level 0 (Tower integration path) - Docs/ROADMAP: close the non-smooth splitter gap; note high-width Tower SmallPrimeTraceContext instances as follow-up Port fixes for open-friendly CPolynomial APIs and module-system proof adjustments. No parallel Binary/Extension field stack in this PR. Co-authored-by: Derek Sorensen <d@dhsorens.com>
dhsorens
added a commit
that referenced
this pull request
Sep 2, 2026
* feat(univariate): Shoup and Las Vegas root-search backends Re-land olympichek's Shoup trace splitter and bounded Las Vegas Cantor–Zassenhaus stack from #253/#254 onto current main (module system, Lean 4.32). Both implement LinearFactorProductSplitter for fields without a smooth multiplicative-subgroup schedule. - Roots/Shoup: small-char trace coordinates [vzGS92] with correctness - Roots/LasVegas: odd CZ + char-2 trace branches, ProbeFamily, probability - Tests on ZMod 2/5/11 and binary-tower level 0 (Tower integration path) - Docs/ROADMAP: close the non-smooth splitter gap; note high-width Tower SmallPrimeTraceContext instances as follow-up Port fixes for open-friendly CPolynomial APIs and module-system proof adjustments. No parallel Binary/Extension field stack in this PR. Co-authored-by: Derek Sorensen <d@dhsorens.com> * fix(roots): adapt Shoup and Las Vegas proofs to Lean 4.33.1 The rebase onto current main left the build failing on module-system exposure and mathlib drift, not on any mathematical content. All 21 library modules and 3 test modules already carried `module`, `public import` and `@[expose] public section`; the failures were downstream of main tightening definition exposure. - `import all` for the same-package implementation dependencies these proofs step through (`Univariate.Basic`, `Modular`, `Raw.Division`, `Raw.Modular`, `ToPoly.Core`). `natDegree`, `coeff`, `eval`, `monicNormalize`, `modByMonic` and the `Raw` modular kernels live in bare `public section`s, so their bodies are opaque downstream and `simp [natDegree]`, `unfold monicNormalize`, `change` into the `Raw` layer and `natDegree 0 = 0 := rfl` all stopped working. This is the pattern `docs/wiki/module-system.md` prescribes for exactly this case. - Bridge `toPoly 0 = 0` with `toPoly_eq_zero_iff` rather than relying on definitional reduction. - `letI`/`haveI` to `let`/`have` (26 sites) per the `haveILetI` style linter, and `Set.mem_setOf_eq` to `Set.mem_ofPred_eq` (32 sites) for the mathlib 4.32 to 4.33 deprecation. - Prove the two `ContainsAllFieldElements` obligations with plain `decide` over the whole quantifier, matching `tests/.../Roots/Enumeration.lean`. List membership decidability now wants `BEq`/`LawfulBEq`, which the previous `fin_cases`-then-`decide` shape could not synthesize. A `natDegree_zero` characterization lemma in `Univariate/Basic.lean` would be the tidier long-term fix for the last of those; left out to keep this change inside the PR's own files. Build, tests, lint, imports, docs integrity and `axiomsweep --check` all pass; the sweep stays at 0 sorry and 0 non-standard axioms. --------- Co-authored-by: Valerii Huhnin <olympichek1@gmail.com>
Collaborator
|
#290 has landed (with these commits), so closing this - thanks @olympichek ! |
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.
Overview
This PR adds a Las Vegas randomized Cantor-Zassenhaus univariate root-search backend.
This PR includes:
1/2under uniform probesTechnical details
The source of randomness in the executable code is caller-supplied
ProbeFamilydata. However, once the probe family, config, and input polynomial are fixed, the splitter is pure and deterministic. Tests and concrete field contexts use deterministic probe families; the binary benchmarks precompute fixed-seed probe tables before timing and then pass those tables through the same explicit probe interface.