CompPoly is easiest to navigate by subtree and representation family, not by individual file name.
CompPoly/
Data/ shared helper lemmas and small support definitions
ToMathlib/ local bridge lemmas and upstream-facing support code
Univariate/ canonical computable univariate polynomials
NTT/, NTTFast/ root-of-unity transforms, spec and optimized
BatchEval/ batch and many-point evaluation
Roots/ univariate root finding
ReedSolomon/ Reed-Solomon encoding and Gao decoding
Multivariate/ sparse computable multivariate polynomials
Multilinear/ multilinear coefficient and evaluation representations
Bivariate/ specialized `CPolynomial (CPolynomial R)` layer
GuruswamiSudan/ list decoder: interpolation and root-finding backends
LinearAlgebra/ dense matrices and polynomial matrices with row reduction
Fields/ concrete fields plus binary-field and additive-NTT stack
tests/ regression modules under `CompPolyTests`
bench/ benchmark executable, runner docs, and local reports
scripts/ repo utilities and validation helpers
.github/workflows/ CI entrypoints and automation
CompPoly/Data/andCompPoly/ToMathlib/support the rest of the library with helper lemmas, notation, and bridge infrastructure.CompPoly/Univariate/,CompPoly/Multivariate/,CompPoly/Multilinear/, andCompPoly/Bivariate/are the main user-facing polynomial surfaces.CompPoly/Fields/contains both the general field catalog and the more specialized binary-field, GHASH, tower, and additive-NTT developments.- The coding-theory stack cuts across three of those:
Univariate/ReedSolomon/andBivariate/GuruswamiSudan/are the decoders,Univariate/Roots/andCompPoly/LinearAlgebra/the engines they are built on. It is documented as one subject incoding-theory.mdrather than by subtree. tests/mirrors the source tree when possible, but also contains cross-cutting regression modules for specialized subsystems.bench/contains the compiled benchmark entrypoint and benchmark-specific docs.
- Extending
CPolynomial, quotient polynomials, or interpolation: start inCompPoly/Univariate/. - Working on root-of-unity NTT evaluation, interpolation, or multiplication:
start in
CompPoly/Univariate/NTT/for shared domains/specifications andCompPoly/Univariate/NTTFast/for planned optimized transforms. - Extending sparse monomial-based polynomial operations or
MvPolynomialinteroperability: start inCompPoly/Multivariate/. - Working on Boolean-hypercube evaluation form, basis conversion, or multilinear
equivalences: start in
CompPoly/Multilinear/. - Working on the specialized two-variable API or the
R[X][Y]bridge: start inCompPoly/Bivariate/. - Adding concrete fields, GHASH lemmas, tower-field infrastructure, or additive NTT:
start in
CompPoly/Fields/. - Adding or changing a field extension (challenge fields,
F[X]/(X^d - W)): start inCompPoly/Fields/Extension/and readfield-extensions.md. - Reed-Solomon encoding, or unique decoding and its farness certificate:
start in
CompPoly/Univariate/ReedSolomon/and readcoding-theory.md. - Guruswami-Sudan list decoding, or adding an interpolation or root-finding
backend: start in
CompPoly/Bivariate/GuruswamiSudan/Context.lean— the core is backend-parametric, so a new backend is a context instance. - Univariate root finding over a finite field: start in
CompPoly/Univariate/Roots/. - Dense or polynomial-matrix work, including shifted row reduction: start in
CompPoly/LinearAlgebra/. - Moving a reusable support lemma that should not live next to one specific feature:
start in
CompPoly/Data/orCompPoly/ToMathlib/. - Adding regression coverage: start in
tests/and mirror the source namespace when possible. - Updating benchmark coverage or reports: start in
bench/.
CompPoly.leanis a generated umbrella import file, not a hand-maintained module index.- The root
../../README.mdis a good public overview, but it is intentionally higher level than the source tree. - The existing subtree READMEs are a good first stop for the surfaces that already have them:
- Large feature edits usually require reading one layer outward from the current
file: for example, a multivariate API change often touches
MvPolyEquiv/, while an additive-NTT change often spansDomain,Intermediate,Algorithm,Impl, andCorrectness. - Several subtrees split an algorithm from its proof by file-name convention
(
Algorithm.lean/Correctness.lean, orFoo.lean/FooCorrectness.lean). Where a fast variant exists, it is usually proved equal to the direct one rather than reproved — so state proofs against the direct definition and call the fast one.