feat(linalg): order-basis approximant layer over polynomial matrices - #312
Conversation
Build Timing Report
Incremental Rebuild Signal
Slowest Current Build Files (warm library build)No per-target timings were parsed from the current warm library build log. |
🤖 PR SummaryThis PR introduces the order-basis (approximant) layer over polynomial matrices, split from a larger Guruswami–Sudan interpolation PR (#291). It provides a fully formalized, executable, and correctness-proven implementation of a divide-and-conquer PM-basis algorithm, along with supporting matrix operations and modular equation solving. The layer is a prerequisite for the Guruswami–Sudan decoder and sits under ROADMAP item 10 (computable linear algebra). All theorems are fully proved; no Statistics
Lean Declarations ✏️ Added: 575 declaration(s)
…and 425 more not listed.
Coverage Notes
📄 **Per-File Summaries**
Supporting private lemmas include zero-row characterizations (
The file contains no
Last updated: 2026-09-02 14:36 UTC. |
The linear-algebra half of the Guruswami-Sudan approximant interpolation work from #255, split out so it can be reviewed on its own. It stands under ROADMAP item 10 independently of the decoder backends that consume it. Adds `LinearAlgebra/PolynomialMatrix/Approximant/`: - `ModularEquation/` — modular key equations with soundness and completeness - `PMBasis/` — the divide-and-conquer order-basis recursion, with X-adic soundness, kernel-leaf soundness/completeness, and the scalar and span kernel-leaf layers - `PartialLinearization.lean` — degree balancing for the recursion plus the supporting matrix pieces it needs: `Operations.lean`, `RowSelection.lean`, `StrassenCorrectness.lean` (fast multiplication used by the PM-Basis recursion), and `MuldersStorjohannCorrectness/WeakPopovMinimal.lean`.
Module-system and toolchain adaptation for the relanded order-basis layer. - `import all` for the same-package implementation dependencies these proofs step through (`Univariate.Basic`, `Univariate.Raw.Core`). `coeff`, `ofArray` and the `Raw` wrappers sit in bare `public section`s, so their bodies are opaque downstream and `rw [CPolynomial.ofArray]`, `simp [Raw.coeff]` and `p.coeff i = (↑p).coeff i := rfl` all stopped working. This is the pattern `docs/wiki/module-system.md` prescribes for the case. - `letI` to `let` per the `haveILetI` style linter. - Record the layer under ROADMAP item 10.
c589a82 to
3fec4ad
Compare
The linear-algebra half of olympichek's (Valerii Huhnin) Guruswami-Sudan approximant
work from #255, split out of #291 so it can be reviewed on its own. Their commit
authorship is preserved; the port to current main is a separate commit.
Why split
#291 is 14,022 lines, of which roughly 10,800 are this layer and only ~2,600 the
Guruswami-Sudan interpolation backends that consume it. This half sits under ROADMAP
item 10 (computable linear algebra) and has no dependency on
Bivariate/at all —verified: none of these 23 files references
Bivariate,GuruswamiSudanorGSInterp.Reviewing it separately is what makes either half tractable.
The GS interpolation backends follow in a second PR, stacked on this one.
Stack
Merge #290 first. GitHub retargets this to
mainautomatically once it lands.Contents
LinearAlgebra/PolynomialMatrix/Approximant/:ModularEquation/— modular key equations, soundness and completenessPMBasis/— the divide-and-conquer order-basis recursion, with X-adic soundness,kernel-leaf soundness/completeness, and the scalar and span kernel-leaf layers
PartialLinearization.lean— degree balancing for the recursionplus the supporting matrix pieces the recursion needs:
Operations.lean,RowSelection.lean,StrassenCorrectness.lean(fast multiplication, genuinelyload-bearing —
PMBasis/Recursion,ModularEquation/BasicandXAdicSoundnessallconsume it), and
MuldersStorjohannCorrectness/WeakPopovMinimal.lean.Port to current main
The original was written against Lean 4.32.0; main is on 4.33.1. No proof content
needed repair — the failures were all module-system exposure:
import allfor the same-package implementation dependencies these proofs stepthrough (
Univariate.Basic,Univariate.Raw.Core).coeff,ofArrayand theRawwrappers sit in bare
public sections, so their bodies are opaque downstream andrw [CPolynomial.ofArray],simp [Raw.coeff]andp.coeff i = (↑p).coeff i := rflstopped working. This is the pattern
docs/wiki/module-system.mdprescribes.letItoletper thehaveILetIstyle linter.All 23 files carry
module,public importand@[expose] public section; the testmodule uses
public meta.Verification
lake build(no new warnings),lake test,./scripts/lint-style.sh,./scripts/check-imports.sh,python3 ./scripts/check-docs-integrity.pyandlake exe axiomsweep --checkall pass.The sweep reports 0
sorryAx-tainted and 0 non-standard-axiom-tainted declarationsacross 324 modules, and the committed baseline needs no refresh. No
native_decide, no@[extern].Note
No benchmark here — this layer has no standalone entry point to time. The asymptotic
claim it exists to support ("quasi-linear, independent of corruption level") is a
property of the GS backend, so the
guruswami-sudan-approximant-*bench group landswith that PR.