Modular evaluation of binary-order univariate derivatives #
One bounded counting sum visits addressed coefficients. The algorithm takes the degree bound and derivative order in binary and uses modular descending factorials for the derivative weights.
Adapted from DerivativeEvaluation in lean-canny at
970f28a5ecefc1327402ade16c068aa4b1b2c183 for the sparse root-label tests.
theorem Cslib.Complexity.RealAlgebraic.univariateDerivativeResidue_mem {α : Type} {enc : α ↪ List Bool} {a : ℕ} (E : Turing.MultiTapeTM.Decoder enc) {p D k z : α → ℕ} {c : α × ℕ → ℕ} (hp : Turing.MultiTapeTM.ComputableInPolyTime p enc Turing.MultiTapeTM.encNat) (hD : Turing.MultiTapeTM.ComputableInPolyTime D enc Turing.MultiTapeTM.encNat) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat) (hz : Turing.MultiTapeTM.ComputableInPolyTime z enc Turing.MultiTapeTM.encNat) (hc : c ∈ CountingFunction a (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encNat) Turing.MultiTapeTM.encNat) :
(fun (w : α) => univariateDerivativeResidue (p w) (D w) (k w) (z w) fun (i : ℕ) => c (w, i)) ∈ CountingFunction (max a 3 + 1) enc Turing.MultiTapeTM.encNat
Uniform coefficient access in F_a yields derivative evaluation at level
F_(max a 3 + 1).
theorem Cslib.Complexity.RealAlgebraic.univariateDerivativeResidue_cast {p D k z : ℕ} [Fact (Nat.Prime p)] (q : Polynomial (ZMod p)) (hq : q.natDegree ≤ D) (hD : D < p) (c : ℕ → ℕ) (hc : ∀ i ≤ D, ↑(c i) = q.coeff i) :
Correctness includes orders beyond the degree of the polynomial. Only addressed coefficients up to the supplied degree bound need to be correct.