Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.PartialDerivativeEvaluation

First and second partial derivatives in one additional counting level #

The first- and second-partial evaluators extract short addressed coefficients of a translated polynomial. Both use one coefficient sum, so a uniform F_a evaluator gives F_(a+1) access. The second-partial evaluator includes factor two when its two coordinates coincide.

Correctness requires total degree below p - 1, with primes p > 2 for first partials and p > 3 for second partials. Variable arity is supplied in unary, with binary derivative indices, modulus and point coordinates; missing coordinates are zero. The auxiliary coefficient-address lists are local implementation details, with their polynomial-time construction charged in each certificate.

Adapted from the address construction and derivative evaluators in lean-canny.

noncomputable def Cslib.Complexity.RealAlgebraic.firstPartialResidue (p n i : ℕ) (z : List ℕ) (value : List ℕ → ℕ) :

Evaluate one formal partial derivative by a translated coefficient sum.

noncomputable def Cslib.Complexity.RealAlgebraic.secondPartialResidue (p n i j : ℕ) (z : List ℕ) (value : List ℕ → ℕ) :

A mixed or repeated second partial, multiplying by two when its indices coincide.

theorem Cslib.Complexity.RealAlgebraic.firstPartialResidue_cast {p n : ℕ} [Fact (Nat.Prime p)] (F : MvPolynomial (Fin n) (ZMod p)) (i : Fin n) (z : List ℕ) (value : List ℕ → ℕ) (hF : F.totalDegree < p - 1) (hp : 2 < p) (hv : ∀ (y : List ℕ), ↑(value y) = (MvPolynomial.eval fun (j : Fin n) => ↑(y[↑j]?.getD 0)) F) :
↑(firstPartialResidue p n (↑i) z value) = (MvPolynomial.eval fun (j : Fin n) => ↑(z[↑j]?.getD 0)) ((MvPolynomial.pderiv i) F)
theorem Cslib.Complexity.RealAlgebraic.secondPartialResidue_cast {p n : ℕ} [Fact (Nat.Prime p)] (F : MvPolynomial (Fin n) (ZMod p)) (i j : Fin n) (z : List ℕ) (value : List ℕ → ℕ) (hF : F.totalDegree < p - 1) (hp : 3 < p) (hv : ∀ (y : List ℕ), ↑(value y) = (MvPolynomial.eval fun (k : Fin n) => ↑(y[↑k]?.getD 0)) F) :
↑(secondPartialResidue p n (↑i) (↑j) z value) = (MvPolynomial.eval fun (k : Fin n) => ↑(z[↑k]?.getD 0)) ((MvPolynomial.pderiv j) ((MvPolynomial.pderiv i) F))