Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.MultivariateCoefficients

Uniform multivariate coefficient extraction at one counting level #

The number of variables is unary, while the prime, address and coefficient indices are binary. One sum over addresses below p^n extracts a coefficient of a polynomial supplied through uniform modular evaluation access.

Adapted from lean-canny.

Main definitions #

Main results #

References #

One total coefficient evaluator over a grid addressed by a single binary integer. Missing coefficient indices default to zero, matching the point-list convention.

Variable arity costs no additional counting depth: all coordinates are handled by the polynomial-time address decoder and weight computation.

theorem Cslib.Complexity.RealAlgebraic.multivariateCoefficientResidue_cast {p n : ℕ} [Fact (Nat.Prime p)] (P : MvPolynomial (Fin n) (ZMod p)) (e : Fin n →₀ ℕ) (β : List ℕ) (value : List ℕ → ℕ) (hP : P.totalDegree < p - 1) (he : ∀ (i : Fin n), e i < p - 1) (hβ : ∀ (i : Fin n), β[↑i]?.getD 0 = e i) (hvalue : ∀ r < p ^ n, ↑(value (gridPoint p n r)) = (MvPolynomial.eval fun (i : Fin n) => ↑((gridPoint p n r)[↑i]?.getD 0)) P) :
↑(multivariateCoefficientResidue p n β value) = P.coeff e

Correctness requires modular evaluation only at the addressed canonical points.

theorem Cslib.Complexity.RealAlgebraic.multivariateCoefficientResidue_eq_val {p n : ℕ} [Fact (Nat.Prime p)] (P : MvPolynomial (Fin n) (ZMod p)) (e : Fin n →₀ ℕ) (β : List ℕ) (value : List ℕ → ℕ) (hP : P.totalDegree < p - 1) (he : ∀ (i : Fin n), e i < p - 1) (hβ : ∀ (i : Fin n), β[↑i]?.getD 0 = e i) (hvalue : ∀ r < p ^ n, ↑(value (gridPoint p n r)) = (MvPolynomial.eval fun (i : Fin n) => ↑((gridPoint p n r)[↑i]?.getD 0)) P) :

The natural output is the canonical representative of the actual coefficient.