feat(univariate): Shoup and Las Vegas root-search backends - #290
Conversation
🤖 PR SummaryAdds two Statistics
Lean Declarations ✏️ Added: 453 declaration(s)
…and 303 more not listed.
Coverage Notes
Partially Analyzed Files
📄 **Per-File Summaries**
No
Last updated: 2026-08-10 19:44 UTC. |
|
Stack child: #291 (approximant + hybrid GS interpolation) targets this branch. |
Build Timing Report
Incremental Rebuild Signal
Slowest Current Build Files (warm library build)Showing 3 slowest current targets from the warm library build log, with comparison against the baseline clean build log when available.
|
The approximant/hybrid stack elaborated 70 declarations with overlapping instance parameters. `main` and #290 are warning-free, so this was a regression against a clean baseline and against docs/wiki/typeclass-minimization.md. Two distinct causes: - 63x `[Field F]` with a redundant `[Nontrivial F]`, from eight `variable` lines carrying both. Removed the redundant binder and the matching entries in the dependent `omit ... in` lines. - 7x `[Field F]` with a redundant `[Zero F]`, on declarations sitting inside a `variable ... [Field F]` scope. This is the harmful case: Lean reports the two can infer conflicting `Zero F`, an instance diamond. Removed `[Zero F]` from the six `ModularEquation` accessors and from `pmBasisFuel`. The `[Zero F]` on the `ModularEquation` and `AdaptiveSolveState` structures is kept: those rebind `F` themselves, do not overlap, and are correct typeclass minimization. No signature is weakened. Every affected declaration already carried `[Field F]` through the enclosing `variable`, so the removed binders were duplicates rather than assumptions. Verified: lake build (0 warnings, 0 errors), lake test, lint-style, update-lib/check-imports, check-docs-integrity.
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>
04f5d8a to
11b1e3b
Compare
Re-land olympichek's approximant-basis and hybrid Guruswami-Sudan interpolation backends from #255 onto the roots re-land stack (#290). - PolynomialMatrix.Approximant: PM-Basis, modular key equations, partial linearization, with soundness/completeness - GS ApproximantBasis + Hybrid (budgeted Lee fallback) as GSInterpContext - WitnessDivisibility quasi-linear multiplicity check - Named KoalaBear contexts in Implementations; matrix ops/Strassen helpers - Module-system port; shortened ApproximantBasis leaf paths for lint - Docs/ROADMAP: four interpolation backends documented Co-authored-by: Derek Sorensen <d@dhsorens.com>
The approximant/hybrid stack elaborated 70 declarations with overlapping instance parameters. `main` and #290 are warning-free, so this was a regression against a clean baseline and against docs/wiki/typeclass-minimization.md. Two distinct causes: - 63x `[Field F]` with a redundant `[Nontrivial F]`, from eight `variable` lines carrying both. Removed the redundant binder and the matching entries in the dependent `omit ... in` lines. - 7x `[Field F]` with a redundant `[Zero F]`, on declarations sitting inside a `variable ... [Field F]` scope. This is the harmful case: Lean reports the two can infer conflicting `Zero F`, an instance diamond. Removed `[Zero F]` from the six `ModularEquation` accessors and from `pmBasisFuel`. The `[Zero F]` on the `ModularEquation` and `AdaptiveSolveState` structures is kept: those rebind `F` themselves, do not overlap, and are correct typeclass minimization. No signature is weakened. Every affected declaration already carried `[Field F]` through the enclosing `variable`, so the removed binders were duplicates rather than assumptions. Verified: lake build (0 warnings, 0 errors), lake test, lint-style, update-lib/check-imports, check-docs-integrity.
Summary
Re-land of olympichek’s (Valerii Huhnin) univariate root-search work from #253 / #254 onto current
main(module system, Lean/Mathlib 4.32).Adds two
LinearFactorProductSplitterbackends for finite fields that do not admit a smooth multiplicative-subgroup schedule:Roots/Shoup/) — small-characteristic trace-coordinate splitting [vzGS92].Roots/LasVegas/) — bounded randomized Cantor–Zassenhaus (odd-char and char-2 trace branches), explicit pureProbeFamilyrandomness, deterministic fallback, soundness/completeness, and probability proofs.This closes the documented root-finding gap (only SmoothSubgroup existed) without merging the stale PRs as-is.
Attribution
Authors:headers retained.Co-authored-by).What we deliberately did not land
Fields/Binary/GF2_{32,48,64,72}+Binary/Extensionstack from feat(univariate): randomized Cantor-Zassenhaus root search #254. That duplicated Tower/BF128 architecture.ZMod 2and binary-tower level 0 in tests (integration path for Tower). Named high-width TowerSmallPrimeTraceContextinstances (32/64) and optional GF(2^{48})/GF(2^{72}) carriers remain follow-up (ROADMAP 🔄).Idiom notes
module/public import/@[expose] public section(meta on tests).SmoothSubgroup/(Basic + Correctness facades).FiniteFieldContext/LinearFactorProductSplitter../scripts/update-lib.sh.Supersedes
Closes #253
Closes #254
#255 (approximant/hybrid GS) is a separate re-land track (#291).
Test plan
lake buildlake test./scripts/update-lib.sh/./scripts/check-imports.sh./scripts/lint-style.shpython3 ./scripts/check-docs-integrity.py