Theorem: Polynomial.derivative_mul
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [mul_eq_sum_sum, derivative_sum]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ↑derivative (f * g) = sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))

tactic: trans
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ b in support f, ↑derivative (sum g fun j a => ↑(monomial (b + j)) (coeff f b * a)) =
    sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))

tactic: apply Finset.sum_congr rfl
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ x in support f, ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (x + j)) (coeff f x * a)) b (coeff g b)) =
    sum f fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))

tactic: intro n _
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∀ (x : ℕ),
    x ∈ support f →
      ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (x + j)) (coeff f x * a)) b (coeff g b)) =
        (fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))) x (coeff f x)

tactic: apply Finset.sum_congr rfl
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝ : n ∈ support f
⊢ ∑ b in support g, ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) b (coeff g b)) =
    (fun n a => sum g fun m b => (n + m) • (↑C (a * b) * X ^ (n + m - 1))) n (coeff f n)

tactic: intro m _
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝ : n ∈ support f
⊢ ∀ (x : ℕ),
    x ∈ support g →
      ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) x (coeff g x)) =
        (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) x (coeff g x)

tactic: trans
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝¹ : n ∈ support f
m : ℕ
a✝ : m ∈ support g
⊢ ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) m (coeff g m)) =
    (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m)

tactic: dsimp
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝¹ : n ∈ support f
m : ℕ
a✝ : m ∈ support g
⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) =
    (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m)

tactic: rw [← smul_mul_assoc, smul_C, nsmul_eq_mul']
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝¹ : n ∈ support f
m : ℕ
a✝ : m ∈ support g
⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) = (n + m) • (↑C (coeff f n * coeff g m) * X ^ (n + m - 1))

tactic: exact derivative_C_mul_X_pow _ _
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝¹ : n ∈ support f
m : ℕ
a✝ : m ∈ support g
⊢ ↑derivative (↑C (coeff f n * coeff g m) * X ^ (n + m)) = ↑C (coeff f n * coeff g m * ↑(n + m)) * X ^ (n + m - 1)

tactic: apply Finset.sum_congr rfl
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ b in support f, ↑derivative (sum g fun j a => ↑(monomial (b + j)) (coeff f b * a)) = ?m.362682

tactic: intro x _
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∀ (x : ℕ), x ∈ support f → ↑derivative (sum g fun j a => ↑(monomial (x + j)) (coeff f x * a)) = ?m.362732 x

R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ℕ → R[X]

tactic: exact derivative_sum
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
x : ℕ
a✝ : x ∈ support f
⊢ ↑derivative (sum g fun j a => ↑(monomial (x + j)) (coeff f x * a)) = ?m.362732 x

R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ℕ → R[X]

tactic: exact congr_arg _ C_mul_X_pow_eq_monomial.symm
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
a✝¹ : n ∈ support f
m : ℕ
a✝ : m ∈ support g
⊢ ↑derivative ((fun j a => ↑(monomial (n + j)) (coeff f n * a)) m (coeff g m)) = ?m.363182

tactic: cases n <;> cases m <;>
  simp_rw [add_smul, mul_smul_comm, smul_mul_assoc, X_pow_mul_assoc, ← mul_assoc, ←
    C_mul, mul_assoc, ← pow_add] <;>
  simp [Nat.add_succ, Nat.succ_add, Nat.succ_sub_one, zero_smul, add_comm]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : Semiring R
f g : R[X]
n : ℕ
hn : n ∈ support f
m : ℕ
hm : m ∈ support g
⊢ (fun m b => (n + m) • (↑C (coeff f n * b) * X ^ (n + m - 1))) m (coeff g m) =
    (fun m b => n • (↑C (coeff f n) * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C (coeff f n) * X ^ n * m • (↑C b * X ^ (m - 1)))
      m (coeff g m)

tactic: simp only [sum, sum_add_distrib, Finset.mul_sum, Finset.sum_mul, derivative_apply]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ (sum f fun n a =>
      sum g fun m b => n • (↑C a * X ^ (n - 1)) * (↑C b * X ^ m) + ↑C a * X ^ n * m • (↑C b * X ^ (m - 1))) =
    (↑derivative f * sum g fun n a => ↑C a * X ^ n) + (sum f fun n a => ↑C a * X ^ n) * ↑derivative g

tactic: simp_rw [← smul_mul_assoc, smul_C, nsmul_eq_mul']
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ x in support f, ∑ x_1 in support g, x • (↑C (coeff f x) * X ^ (x - 1)) * (↑C (coeff g x_1) * X ^ x_1) +
      ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * x_1 • (↑C (coeff g x_1) * X ^ (x_1 - 1)) =
    ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +
      ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))

tactic: rw [Finset.sum_comm]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x * ↑x) * X ^ (x - 1) * (↑C (coeff g x_1) * X ^ x_1) +
      ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =
    ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +
      ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))

tactic: congr 1
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ y in support g, ∑ x in support f, ↑C (coeff f x * ↑x) * X ^ (x - 1) * (↑C (coeff g y) * X ^ y) +
      ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =
    ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1 * ↑x_1) * X ^ (x_1 - 1) * (↑C (coeff g x) * X ^ x) +
      ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))

tactic: rw [Finset.sum_comm]
state_before: case e_a
R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
f g : R[X]
⊢ ∑ x in support f, ∑ x_1 in support g, ↑C (coeff f x) * X ^ x * (↑C (coeff g x_1 * ↑x_1) * X ^ (x_1 - 1)) =
    ∑ x in support g, ∑ x_1 in support f, ↑C (coeff f x_1) * X ^ x_1 * (↑C (coeff g x * ↑x) * X ^ (x - 1))