The derivative map on polynomials #
Main definitions #
Polynomial.derivative: The formal derivative of polynomials, expressed as a linear map.Polynomial.derivativeFinsupp: Iterated derivatives as a finite support function.
derivative p is the formal derivative of the polynomial p
Instances For
theorem
Polynomial.derivative_apply
{R : Type u}
[Semiring R]
(p : Polynomial R)
:
derivative p = p.sum fun (n : β) (a : R) => C (a * βn) * X ^ (n - 1)
theorem
Polynomial.coeff_derivative
{R : Type u}
[Semiring R]
(p : Polynomial R)
(n : β)
:
(derivative p).coeff n = p.coeff (n + 1) * (βn + 1)
@[simp]
theorem
Polynomial.iterate_derivative_zero
{R : Type u}
[Semiring R]
{k : β}
:
(βderivative)^[k] 0 = 0
theorem
Polynomial.derivative_monomial
{R : Type u}
[Semiring R]
(a : R)
(n : β)
:
derivative ((monomial n) a) = (monomial (n - 1)) (a * βn)
@[simp]
theorem
Polynomial.derivative_monomial_succ
{R : Type u}
[Semiring R]
(a : R)
(n : β)
:
derivative ((monomial (n + 1)) a) = (monomial n) (a * (βn + 1))
theorem
Polynomial.derivative_C_mul_X_pow
{R : Type u}
[Semiring R]
(a : R)
(n : β)
:
derivative (C a * X ^ n) = C (a * βn) * X ^ (n - 1)
theorem
Polynomial.derivative_C_mul_X_sq
{R : Type u}
[Semiring R]
(a : R)
:
derivative (C a * X ^ 2) = C (a * 2) * X
theorem
Polynomial.derivative_X_pow
{R : Type u}
[Semiring R]
(n : β)
:
derivative (X ^ n) = C βn * X ^ (n - 1)
@[simp]
theorem
Polynomial.derivative_X_pow_succ
{R : Type u}
[Semiring R]
(n : β)
:
derivative (X ^ (n + 1)) = C (βn + 1) * X ^ n
@[simp]
theorem
Polynomial.derivative_of_natDegree_zero
{R : Type u}
[Semiring R]
{p : Polynomial R}
(hp : p.natDegree = 0)
:
derivative p = 0
@[simp]
@[simp]
@[simp]
theorem
Polynomial.derivative_add
{R : Type u}
[Semiring R]
{f g : Polynomial R}
:
derivative (f + g) = derivative f + derivative g
theorem
Polynomial.derivative_sum
{R : Type u}
{ΞΉ : Type y}
[Semiring R]
{s : Finset ΞΉ}
{f : ΞΉ β Polynomial R}
:
derivative (β b β s, f b) = β b β s, derivative (f b)
theorem
Polynomial.iterate_derivative_sum
{R : Type u}
{ΞΉ : Type y}
[Semiring R]
(k : β)
(s : Finset ΞΉ)
(f : ΞΉ β Polynomial R)
:
(βderivative)^[k] (β b β s, f b) = β b β s, (βderivative)^[k] (f b)
theorem
Polynomial.derivative_smul
{R : Type u}
[Semiring R]
{S : Type u_1}
[SMulZeroClass S R]
[IsScalarTower S R R]
(s : S)
(p : Polynomial R)
:
derivative (s β’ p) = s β’ derivative p
@[simp]
theorem
Polynomial.iterate_derivative_smul
{R : Type u}
[Semiring R]
{S : Type u_1}
[SMulZeroClass S R]
[IsScalarTower S R R]
(s : S)
(p : Polynomial R)
(k : β)
:
(βderivative)^[k] (s β’ p) = s β’ (βderivative)^[k] p
@[simp]
theorem
Polynomial.iterate_derivative_C_mul
{R : Type u}
[Semiring R]
(a : R)
(p : Polynomial R)
(k : β)
:
(βderivative)^[k] (C a * p) = C a * (βderivative)^[k] p
theorem
Polynomial.derivative_C_mul
{R : Type u}
[Semiring R]
(a : R)
(p : Polynomial R)
:
derivative (C a * p) = C a * derivative p
theorem
Polynomial.of_mem_support_derivative
{R : Type u}
[Semiring R]
{p : Polynomial R}
{n : β}
(h : n β (derivative p).support)
:
n + 1 β p.support
theorem
Polynomial.degree_derivative_lt
{R : Type u}
[Semiring R]
{p : Polynomial R}
(hp : p β 0)
:
theorem
Polynomial.natDegree_derivative_lt
{R : Type u}
[Semiring R]
{p : Polynomial R}
(hp : p.natDegree β 0)
:
theorem
Polynomial.natDegree_iterate_derivative
{R : Type u}
[Semiring R]
(p : Polynomial R)
(k : β)
:
@[simp]
@[simp]
theorem
Polynomial.derivative_ofNat
{R : Type u}
[Semiring R]
(n : β)
[n.AtLeastTwo]
:
derivative (OfNat.ofNat n) = 0
theorem
Polynomial.iterate_derivative_eq_zero
{R : Type u}
[Semiring R]
{p : Polynomial R}
{x : β}
(hx : p.natDegree < x)
:
(βderivative)^[x] p = 0
@[simp]
theorem
Polynomial.iterate_derivative_C
{R : Type u}
{a : R}
[Semiring R]
{k : β}
(h : 0 < k)
:
(βderivative)^[k] (C a) = 0
@[simp]
theorem
Polynomial.iterate_derivative_one
{R : Type u}
[Semiring R]
{k : β}
(h : 0 < k)
:
(βderivative)^[k] 1 = 0
@[simp]
theorem
Polynomial.iterate_derivative_X
{R : Type u}
[Semiring R]
{k : β}
(h : 1 < k)
:
(βderivative)^[k] X = 0
theorem
Polynomial.natDegree_eq_zero_of_derivative_eq_zero
{R : Type u}
[Semiring R]
[IsAddTorsionFree R]
{f : Polynomial R}
(h : derivative f = 0)
:
f.natDegree = 0
theorem
Polynomial.eq_C_of_derivative_eq_zero
{R : Type u}
[Semiring R]
[IsAddTorsionFree R]
{f : Polynomial R}
(h : derivative f = 0)
:
@[simp]
theorem
Polynomial.derivative_mul
{R : Type u}
[Semiring R]
{f g : Polynomial R}
:
derivative (f * g) = derivative f * g + f * derivative g
theorem
Polynomial.derivative_eval
{R : Type u}
[Semiring R]
(p : Polynomial R)
(x : R)
:
eval x (derivative p) = p.sum fun (n : β) (a : R) => a * βn * x ^ (n - 1)
@[simp]
theorem
Polynomial.derivative_map
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(p : Polynomial R)
(f : R β+* S)
:
derivative (map f p) = map f (derivative p)
@[simp]
theorem
Polynomial.iterate_derivative_map
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(p : Polynomial R)
(f : R β+* S)
(k : β)
:
(βderivative)^[k] (map f p) = map f ((βderivative)^[k] p)
theorem
Polynomial.derivative_natCast_mul
{R : Type u}
[Semiring R]
{n : β}
{f : Polynomial R}
:
derivative (βn * f) = βn * derivative f
@[simp]
theorem
Polynomial.iterate_derivative_natCast_mul
{R : Type u}
[Semiring R]
{n k : β}
{f : Polynomial R}
:
(βderivative)^[k] (βn * f) = βn * (βderivative)^[k] f
theorem
Polynomial.mem_support_derivative
{R : Type u}
[Semiring R]
[IsAddTorsionFree R]
(p : Polynomial R)
(n : β)
:
n β (derivative p).support β n + 1 β p.support
@[simp]
theorem
Polynomial.degree_derivative_eq
{R : Type u}
[Semiring R]
[IsAddTorsionFree R]
(p : Polynomial R)
(hp : 0 < p.natDegree)
:
(derivative p).degree = β(p.natDegree - 1)
theorem
Polynomial.coeff_iterate_derivative
{R : Type u}
[Semiring R]
{k : β}
(p : Polynomial R)
(m : β)
:
((βderivative)^[k] p).coeff m = (m + k).descFactorial k β’ p.coeff (m + k)
theorem
Polynomial.iterate_derivative_eq_sum
{R : Type u}
[Semiring R]
(p : Polynomial R)
(k : β)
:
(βderivative)^[k] p = β x β ((βderivative)^[k] p).support, C ((x + k).descFactorial k β’ p.coeff (x + k)) * X ^ x
theorem
Polynomial.iterate_derivative_eq_factorial_smul_sum
{R : Type u}
[Semiring R]
(p : Polynomial R)
(k : β)
:
theorem
Polynomial.iterate_derivative_mul
{R : Type u}
[Semiring R]
{n : β}
(p q : Polynomial R)
:
(βderivative)^[n] (p * q) = β k β Finset.range n.succ, n.choose k β’ ((βderivative)^[n - k] p * (βderivative)^[k] q)
Iterated derivatives as a finite support function.
Instances For
@[simp]
theorem
Polynomial.derivativeFinsupp_apply_apply
{R : Type u}
[Semiring R]
(p : Polynomial R)
(xβ : β)
:
(derivativeFinsupp p) xβ = (βderivative)^[xβ] p
@[deprecated Polynomial.derivativeFinsupp_apply_apply (since := "2025-12-15")]
theorem
Polynomial.derivativeFinsupp_apply_toFun
{R : Type u}
[Semiring R]
(p : Polynomial R)
(xβ : β)
:
(derivativeFinsupp p) xβ = (βderivative)^[xβ] p
Alias of Polynomial.derivativeFinsupp_apply_apply.
@[simp]
theorem
Polynomial.support_derivativeFinsupp_subset_range
{R : Type u}
[Semiring R]
{p : Polynomial R}
{n : β}
(h : p.natDegree < n)
:
(derivativeFinsupp p).support β Finset.range n
@[simp]
@[simp]
theorem
Polynomial.derivativeFinsupp_one
{R : Type u}
[Semiring R]
:
derivativeFinsupp 1 = funβ | 0 => 1
@[simp]
theorem
Polynomial.derivativeFinsupp_map
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(p : Polynomial R)
(f : R β+* S)
:
derivativeFinsupp (map f p) = Finsupp.mapRange (fun (x : Polynomial R) => map f x) β― (derivativeFinsupp p)
theorem
Polynomial.derivativeFinsupp_derivative
{R : Type u}
[Semiring R]
(p : Polynomial R)
:
derivativeFinsupp (derivative p) = Finsupp.comapDomain Nat.succ (derivativeFinsupp p) β―
theorem
Polynomial.derivative_pow_succ
{R : Type u}
[CommSemiring R]
(p : Polynomial R)
(n : β)
:
derivative (p ^ (n + 1)) = C (βn + 1) * p ^ n * derivative p
theorem
Polynomial.derivative_pow
{R : Type u}
[CommSemiring R]
(p : Polynomial R)
(n : β)
:
derivative (p ^ n) = C βn * p ^ (n - 1) * derivative p
theorem
Polynomial.derivative_sq
{R : Type u}
[CommSemiring R]
(p : Polynomial R)
:
derivative (p ^ 2) = C 2 * p * derivative p
theorem
Polynomial.pow_sub_one_dvd_derivative_of_pow_dvd
{R : Type u}
[CommSemiring R]
{p q : Polynomial R}
{n : β}
(dvd : q ^ n β£ p)
:
q ^ (n - 1) β£ derivative p
theorem
Polynomial.pow_sub_dvd_iterate_derivative_of_pow_dvd
{R : Type u}
[CommSemiring R]
{p q : Polynomial R}
{n : β}
(m : β)
(dvd : q ^ n β£ p)
:
q ^ (n - m) β£ (βderivative)^[m] p
theorem
Polynomial.pow_sub_dvd_iterate_derivative_pow
{R : Type u}
[CommSemiring R]
(p : Polynomial R)
(n m : β)
:
p ^ (n - m) β£ (βderivative)^[m] (p ^ n)
theorem
Polynomial.dvd_iterate_derivative_pow
{R : Type u}
[CommSemiring R]
(f : Polynomial R)
(n : β)
{m : β}
(c : R)
(hm : m β 0)
:
βn β£ eval c ((βderivative)^[m] (f ^ n))
theorem
Polynomial.iterate_derivative_X_pow_eq_natCast_mul
{R : Type u}
[CommSemiring R]
(n k : β)
:
(βderivative)^[k] (X ^ n) = β(n.descFactorial k) * X ^ (n - k)
theorem
Polynomial.iterate_derivative_X_pow_eq_C_mul
{R : Type u}
[CommSemiring R]
(n k : β)
:
(βderivative)^[k] (X ^ n) = C β(n.descFactorial k) * X ^ (n - k)
theorem
Polynomial.iterate_derivative_X_pow_eq_smul
{R : Type u}
[CommSemiring R]
(n k : β)
:
(βderivative)^[k] (X ^ n) = β(n.descFactorial k) β’ X ^ (n - k)
theorem
Polynomial.iterate_derivative_X_add_pow
{R : Type u}
[CommSemiring R]
(n k : β)
(c : R)
:
(βderivative)^[k] ((X + C c) ^ n) = n.descFactorial k β’ (X + C c) ^ (n - k)
theorem
Polynomial.iterate_derivative_mul_X_pow
{R : Type u}
[CommSemiring R]
(n m : β)
(p : Polynomial R)
:
(βderivative)^[n] (p * X ^ m) = β k β Finset.range (min m n).succ, (n.choose k * m.descFactorial k) β’ ((βderivative)^[n - k] p * X ^ (m - k))
theorem
Polynomial.iterate_derivative_mul_X
{R : Type u}
[CommSemiring R]
{n : β}
(p : Polynomial R)
:
(βderivative)^[n] (p * X) = (βderivative)^[n] p * X + n β’ (βderivative)^[n - 1] p
theorem
Polynomial.iterate_derivative_derivative_mul_X
{R : Type u}
[CommSemiring R]
{n : β}
(p : Polynomial R)
:
(βderivative)^[n] (derivative p * X) = (βderivative)^[n + 1] p * X + n β’ (βderivative)^[n] p
theorem
Polynomial.iterate_derivative_derivative_mul_X_sq
{R : Type u}
[CommSemiring R]
{n : β}
(p : Polynomial R)
:
(βderivative)^[n] ((βderivative)^[2] p * X ^ 2) = (βderivative)^[n + 2] p * X ^ 2 + (2 * n) β’ (βderivative)^[n + 1] p * X + (n * (n - 1)) β’ (βderivative)^[n] p
theorem
Polynomial.derivative_comp
{R : Type u}
[CommSemiring R]
(p q : Polynomial R)
:
derivative (p.comp q) = derivative q * (derivative p).comp q
theorem
Polynomial.derivative_evalβ_C
{R : Type u}
[CommSemiring R]
(p q : Polynomial R)
:
derivative (evalβ C q p) = evalβ C q (derivative p) * derivative q
Chain rule for formal derivative of polynomials.
theorem
Polynomial.derivative_prod
{R : Type u}
{ΞΉ : Type y}
[CommSemiring R]
[DecidableEq ΞΉ]
{s : Multiset ΞΉ}
{f : ΞΉ β Polynomial R}
:
derivative (Multiset.map f s).prod = (Multiset.map (fun (i : ΞΉ) => (Multiset.map f (s.erase i)).prod * derivative (f i)) s).sum
theorem
Polynomial.derivative_prod_finset
{R : Type u}
{ΞΉ : Type y}
[CommSemiring R]
[DecidableEq ΞΉ]
{s : Finset ΞΉ}
{f : ΞΉ β Polynomial R}
:
derivative (β b β s, f b) = β a β s, (β b β s.erase a, f b) * derivative (f a)
@[simp]
theorem
Polynomial.derivative_neg
{R : Type u}
[Ring R]
(f : Polynomial R)
:
derivative (-f) = -derivative f
theorem
Polynomial.iterate_derivative_neg
{R : Type u}
[Ring R]
{f : Polynomial R}
{k : β}
:
(βderivative)^[k] (-f) = -(βderivative)^[k] f
@[simp]
theorem
Polynomial.derivative_sub
{R : Type u}
[Ring R]
{f g : Polynomial R}
:
derivative (f - g) = derivative f - derivative g
theorem
Polynomial.iterate_derivative_sub
{R : Type u}
[Ring R]
{k : β}
{f g : Polynomial R}
:
(βderivative)^[k] (f - g) = (βderivative)^[k] f - (βderivative)^[k] g
@[simp]
theorem
Polynomial.derivative_intCast_mul
{R : Type u}
[Ring R]
{n : β€}
{f : Polynomial R}
:
derivative (βn * f) = βn * derivative f
@[simp]
theorem
Polynomial.iterate_derivative_intCast_mul
{R : Type u}
[Ring R]
{n : β€}
{k : β}
{f : Polynomial R}
:
(βderivative)^[k] (βn * f) = βn * (βderivative)^[k] f
theorem
Polynomial.derivative_comp_one_sub_X
{R : Type u}
[CommRing R]
(p : Polynomial R)
:
derivative (p.comp (1 - X)) = -(derivative p).comp (1 - X)
@[simp]
theorem
Polynomial.iterate_derivative_comp_one_sub_X
{R : Type u}
[CommRing R]
(p : Polynomial R)
(k : β)
:
(βderivative)^[k] (p.comp (1 - X)) = (-1) ^ k * ((βderivative)^[k] p).comp (1 - X)
theorem
Polynomial.eval_multiset_prod_X_sub_C_derivative
{R : Type u}
[CommRing R]
[DecidableEq R]
{S : Multiset R}
{r : R}
(hr : r β S)
:
eval r (derivative (Multiset.map (fun (a : R) => X - C a) S).prod) = (Multiset.map (fun (a : R) => r - a) (S.erase r)).prod
theorem
Polynomial.iterate_derivative_X_sub_pow
{R : Type u}
[CommRing R]
(n k : β)
(c : R)
:
(βderivative)^[k] ((X - C c) ^ n) = n.descFactorial k β’ (X - C c) ^ (n - k)
theorem
Polynomial.iterate_derivative_eq_zero_of_degree_lt
{R : Type u}
[CommRing R]
{k : β}
{P : Polynomial R}
(h : P.degree < βk)
:
(βderivative)^[k] P = 0
@[simp]
theorem
Polynomial.dvd_derivative_iff
{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{P : Polynomial R}
:
P β£ derivative P β derivative P = 0
theorem
Polynomial.derivative_pow_eq_zero
{R : Type u}
[CommSemiring R]
[NoZeroDivisors R]
{n : β}
(chn : βn β 0)
{a : Polynomial R}
:
derivative (a ^ n) = 0 β derivative a = 0