Documentation

Mathlib.Algebra.Polynomial.Derivative

The derivative map on polynomials #

Main definitions #

derivative p is the formal derivative of the polynomial p

Equations
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.derivative_zero {R : Type u} [Semiring R] :
    derivative 0 = 0
    @[simp]
    theorem Polynomial.derivative_monomial {R : Type u} [Semiring R] (a : R) (n : ) :
    derivative ((monomial n) a) = (monomial (n - 1)) (a * n)
    theorem Polynomial.derivative_C_mul_X {R : Type u} [Semiring R] (a : R) :
    derivative (C a * X) = C a
    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
    @[simp]
    theorem Polynomial.derivative_X_pow {R : Type u} [Semiring R] (n : ) :
    derivative (X ^ n) = C n * X ^ (n - 1)
    theorem Polynomial.derivative_X_sq {R : Type u} [Semiring R] :
    derivative (X ^ 2) = C 2 * X
    @[simp]
    theorem Polynomial.derivative_C {R : Type u} [Semiring R] {a : R} :
    derivative (C a) = 0
    theorem Polynomial.derivative_of_natDegree_zero {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.natDegree = 0) :
    derivative p = 0
    @[simp]
    theorem Polynomial.derivative_X {R : Type u} [Semiring R] :
    derivative X = 1
    @[simp]
    theorem Polynomial.derivative_one {R : Type u} [Semiring R] :
    derivative 1 = 0
    @[simp]
    theorem Polynomial.derivative_add {R : Type u} [Semiring R] {f g : Polynomial R} :
    derivative (f + g) = derivative f + derivative g
    theorem Polynomial.derivative_X_add_C {R : Type u} [Semiring R] (c : R) :
    derivative (X + C c) = 1
    theorem Polynomial.derivative_sum {R : Type u} {ι : Type y} [Semiring R] {s : Finset ι} {f : ιPolynomial R} :
    derivative (∑ bs, f b) = bs, derivative (f b)
    theorem Polynomial.iterate_derivative_sum {R : Type u} {ι : Type y} [Semiring R] (k : ) (s : Finset ι) (f : ιPolynomial R) :
    (⇑derivative)^[k] (∑ bs, f b) = bs, (⇑derivative)^[k] (f b)
    theorem Polynomial.derivative_smul {R : Type u} [Semiring R] {S : Type u_1} [Monoid S] [DistribMulAction 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} [Monoid S] [DistribMulAction 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) :
    (derivative p).degree < p.degree
    theorem Polynomial.degree_derivative_le {R : Type u} [Semiring R] {p : Polynomial R} :
    (derivative p).degree p.degree
    theorem Polynomial.natDegree_derivative_lt {R : Type u} [Semiring R] {p : Polynomial R} (hp : p.natDegree 0) :
    (derivative p).natDegree < p.natDegree
    theorem Polynomial.natDegree_derivative_le {R : Type u} [Semiring R] (p : Polynomial R) :
    (derivative p).natDegree p.natDegree - 1
    theorem Polynomial.natDegree_iterate_derivative {R : Type u} [Semiring R] (p : Polynomial R) (k : ) :
    ((⇑derivative)^[k] p).natDegree p.natDegree - k
    @[simp]
    theorem Polynomial.derivative_natCast {R : Type u} [Semiring R] {n : } :
    derivative n = 0
    @[deprecated Polynomial.derivative_natCast (since := "2024-04-17")]
    theorem Polynomial.derivative_nat_cast {R : Type u} [Semiring R] {n : } :
    derivative n = 0

    Alias of Polynomial.derivative_natCast.

    @[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] [NoZeroSMulDivisors R] {f : Polynomial R} (h : derivative f = 0) :
    f.natDegree = 0
    theorem Polynomial.eq_C_of_derivative_eq_zero {R : Type u} [Semiring R] [NoZeroSMulDivisors R] {f : Polynomial R} (h : derivative f = 0) :
    f = C (f.coeff 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
    @[deprecated Polynomial.derivative_natCast_mul (since := "2024-04-17")]
    theorem Polynomial.derivative_nat_cast_mul {R : Type u} [Semiring R] {n : } {f : Polynomial R} :
    derivative (n * f) = n * derivative f

    Alias of Polynomial.derivative_natCast_mul.

    @[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
    @[deprecated Polynomial.iterate_derivative_natCast_mul (since := "2024-04-17")]
    theorem Polynomial.iterate_derivative_nat_cast_mul {R : Type u} [Semiring R] {n k : } {f : Polynomial R} :
    (⇑derivative)^[k] (n * f) = n * (⇑derivative)^[k] f

    Alias of Polynomial.iterate_derivative_natCast_mul.

    theorem Polynomial.mem_support_derivative {R : Type u} [Semiring R] [NoZeroSMulDivisors R] (p : Polynomial R) (n : ) :
    n (derivative p).support n + 1 p.support
    @[simp]
    theorem Polynomial.degree_derivative_eq {R : Type u} [Semiring R] [NoZeroSMulDivisors 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 : ) :
    (⇑derivative)^[k] p = k.factorial x((⇑derivative)^[k] p).support, C ((x + k).choose k p.coeff (x + k)) * X ^ x
    theorem Polynomial.iterate_derivative_mul {R : Type u} [Semiring R] {n : } (p q : Polynomial R) :
    (⇑derivative)^[n] (p * q) = kFinset.range n.succ, n.choose k ((⇑derivative)^[n - k] p * (⇑derivative)^[k] q)

    Iterated derivatives as a finite support function.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem Polynomial.derivativeFinsupp_apply_toFun {R : Type u} [Semiring R] (p : Polynomial R) (x✝ : ) :
      (derivativeFinsupp p) x✝ = (⇑derivative)^[x✝] p
      @[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]
      theorem Polynomial.derivativeFinsupp_C {R : Type u} [Semiring R] (r : R) :
      derivativeFinsupp (C r) = Finsupp.single 0 (C r)
      @[simp]
      theorem Polynomial.derivativeFinsupp_one {R : Type u} [Semiring R] :
      derivativeFinsupp 1 = Finsupp.single 0 1
      @[simp]
      theorem Polynomial.derivativeFinsupp_X {R : Type u} [Semiring R] :
      derivativeFinsupp X = Finsupp.single 0 X + Finsupp.single 1 1
      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)
      @[deprecated Polynomial.iterate_derivative_X_pow_eq_natCast_mul (since := "2024-04-17")]
      theorem Polynomial.iterate_derivative_X_pow_eq_nat_cast_mul {R : Type u} [CommSemiring R] (n k : ) :
      (⇑derivative)^[k] (X ^ n) = (n.descFactorial k) * X ^ (n - k)

      Alias of Polynomial.iterate_derivative_X_pow_eq_natCast_mul.

      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.derivative_X_add_C_pow {R : Type u} [CommSemiring R] (c : R) (m : ) :
      derivative ((X + C c) ^ m) = C m * (X + C c) ^ (m - 1)
      theorem Polynomial.derivative_X_add_C_sq {R : Type u} [CommSemiring R] (c : R) :
      derivative ((X + C c) ^ 2) = C 2 * (X + C c)
      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.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
      @[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.derivative_X_sub_C {R : Type u} [Ring R] (c : R) :
      derivative (X - C c) = 1
      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 {R : Type u} [Ring R] {n : } :
      derivative n = 0
      @[deprecated Polynomial.derivative_intCast (since := "2024-04-17")]
      theorem Polynomial.derivative_int_cast {R : Type u} [Ring R] {n : } :
      derivative n = 0

      Alias of Polynomial.derivative_intCast.

      theorem Polynomial.derivative_intCast_mul {R : Type u} [Ring R] {n : } {f : Polynomial R} :
      derivative (n * f) = n * derivative f
      @[deprecated Polynomial.derivative_intCast_mul (since := "2024-04-17")]
      theorem Polynomial.derivative_int_cast_mul {R : Type u} [Ring R] {n : } {f : Polynomial R} :
      derivative (n * f) = n * derivative f

      Alias of Polynomial.derivative_intCast_mul.

      @[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
      @[deprecated Polynomial.iterate_derivative_intCast_mul (since := "2024-04-17")]
      theorem Polynomial.iterate_derivative_int_cast_mul {R : Type u} [Ring R] {n : } {k : } {f : Polynomial R} :
      (⇑derivative)^[k] (n * f) = n * (⇑derivative)^[k] f

      Alias of Polynomial.iterate_derivative_intCast_mul.

      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.derivative_X_sub_C_pow {R : Type u} [CommRing R] (c : R) (m : ) :
      derivative ((X - C c) ^ m) = C m * (X - C c) ^ (m - 1)
      theorem Polynomial.derivative_X_sub_C_sq {R : Type u} [CommRing R] (c : R) :
      derivative ((X - C c) ^ 2) = C 2 * (X - C c)
      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_X_sub_pow_self {R : Type u} [CommRing R] (n : ) (c : R) :
      (⇑derivative)^[n] ((X - C c) ^ n) = n.factorial
      @[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