Documentation

CompPoly.Bivariate.GuruswamiSudan.Interpolation.ApproximantBasis.ModularData

Executable GS Modular-Data Bridges #

Semantic characterizations of the executable approximant-basis modular data: the modulus array gsModuli, the incrementally built binomial relation matrix gsRelationColumn / gsRelationMatrixWithModuli, and the executable row predicate rowSatisfiesModularBool. The main result identifies the modular row predicate over the GS data with divisibility of every sheared coefficient (hasseDeriv b Q.toPoly).eval R by G^(s-b).

Generic helpers #

theorem CompPoly.GuruswamiSudan.ApproximantBasis.ofFn_rowGet {F : Type u_1} [Field F] (rows width : ) (entry : CPolynomial F) {i j : } (hi : i < rows) (hj : j < width) :
PolynomialMatrix.rowGet (Array.getD (PolynomialMatrix.ofFn rows width entry) i #[]) j = entry i j

Entry access for PolynomialMatrix.ofFn.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.ofFn_size {F : Type u_1} [Field F] (rows width : ) (entry : CPolynomial F) :
Array.size (PolynomialMatrix.ofFn rows width entry) = rows

Row count of PolynomialMatrix.ofFn.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.ofFn_matrixWidth {F : Type u_1} [Field F] (rows width : ) (entry : CPolynomial F) (hrows : 0 < rows) :
(PolynomialMatrix.ofFn rows width entry).MatrixWidth = width

Width of PolynomialMatrix.ofFn with at least one row.

Modular reduction semantics #

modByMonicWith computes the Mathlib monic remainder under toPoly.

modByMonicWith is congruent to the identity modulo the modulus.

The executable remainder vanishes exactly on multiples of the modulus.

The GS modulus array #

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsModuli_eq {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (G : CPolynomial F) (s : ) :
gsModuli mulCtx G s = (List.map (fun (i : ) => G ^ (i + 1)) (List.range s)).toArray.reverse

Closed form for the GS modulus array before reversal.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsModuli_size {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (G : CPolynomial F) (s : ) :
(gsModuli mulCtx G s).size = s

The GS modulus array has one modulus per multiplicity level.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsModuli_getD {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (G : CPolynomial F) {b s : } (hb : b < s) :
(gsModuli mulCtx G s).getD b 0 = G ^ (s - b)

The b-th GS modulus is G^(s-b).

The GS relation column #

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsRelationColumn_size {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (modCtx : CPolynomial.ModContext F) (R modulus : CPolynomial F) (width b : ) :
(gsRelationColumn mulCtx modCtx R modulus width b).size = width

Size of the GS relation column.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsRelationColumn_getD_of_lt {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (modCtx : CPolynomial.ModContext F) (R modulus : CPolynomial F) {width b j : } (hj : j < b) :
(gsRelationColumn mulCtx modCtx R modulus width b).getD j 0 = 0

Entries of the GS relation column below the diagonal vanish.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsRelationColumn_getD_congr {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (modCtx : CPolynomial.ModContext F) {R modulus : CPolynomial F} (hM : modulus.toPoly.Monic) {width b j : } (hbj : b j) (hj : j < width) :
modulus.toPoly ((gsRelationColumn mulCtx modCtx R modulus width b).getD j 0).toPoly - Polynomial.C (j.choose b) * R.toPoly ^ (j - b)

Entries of the GS relation column are congruent to the binomial powers.

The GS relation matrix and the modular row predicate #

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsModuli_getD_one {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (G : CPolynomial F) {b s : } (hb : b < s) :
(gsModuli mulCtx G s).getD b 1 = G ^ (s - b)

The b-th GS modulus is G^(s-b), with default value 1.

theorem CompPoly.GuruswamiSudan.ApproximantBasis.gsRelationMatrixWithModuli_entry {F : Type u_1} [Field F] [BEq F] [LawfulBEq F] (mulCtx : CPolynomial.MulContext F) (modCtx : CPolynomial.ModContext F) (R : CPolynomial F) (moduli : Array (CPolynomial F)) (params : GSInterpParams) {k b : } (hk : k < interpolationWidth params) (hb : b < params.multiplicity) :
PolynomialMatrix.rowGet (Array.getD (gsRelationMatrixWithModuli mulCtx modCtx R moduli params) k #[]) b = (gsRelationColumn mulCtx modCtx R (moduli.getD b 1) (interpolationWidth params) b).getD k 0

Entry access for the GS relation matrix.

The GS relation matrix has one row per interpolation coefficient.

The GS relation matrix has one column per multiplicity level.

Sheared coefficients of a coefficient row: the outer Hasse derivative of ofCoeffRow row evaluated at R is the binomial-weighted power sum.

The row-by-matrix product only sees the first M.size row entries.

The modular row predicate only sees the first M.size row entries.

The executable GS modular row predicate over the relation matrix and modulus array is exactly divisibility of every sheared coefficient (hasseDeriv b (ofCoeffRow row).toPoly).eval R by G^(s-b).