File tree Expand file tree Collapse file tree
Mathlib/Algebra/MvPolynomial Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,21 @@ theorem pderiv_pow {i : σ} {f : MvPolynomial σ R} {n : ℕ} :
118118theorem pderiv_C_mul {f : MvPolynomial σ R} {i : σ} : pderiv i (C a * f) = C a * pderiv i f := by
119119 rw [C_mul', Derivation.map_smul, C_mul']
120120
121+ theorem coeff_pderiv {i : σ} (p : MvPolynomial σ R) (m : σ →₀ ℕ) :
122+ coeff m (pderiv i p) = coeff (m + single i 1 ) p * (m i + 1 ) := by
123+ classical
124+ induction p using MvPolynomial.induction_on' with
125+ | add p q hp hq => simp [hp, hq, add_mul]
126+ | monomial n a =>
127+ rw [pderiv_monomial, coeff_monomial, coeff_monomial]
128+ by_cases h : n = m + single i 1
129+ · simp [h]
130+ simp only [h, ↓reduceIte, zero_mul]
131+ by_cases hn : n i = 0
132+ · simp [hn]
133+ apply if_neg
134+ rwa [tsub_eq_iff_eq_add_of_le (fun _ ↦ by grind)]
135+
121136theorem pderiv_map {S} [CommSemiring S] {φ : R →+* S} {f : MvPolynomial σ R} {i : σ} :
122137 pderiv i (map φ f) = map φ (pderiv i f) := by
123138 apply induction_on f (fun r ↦ by simp) (fun p q hp hq ↦ by simp [hp, hq]) fun p j eq ↦ ?_
You can’t perform that action at this time.
0 commit comments