Theorem: Polynomial.natDegree_multiset_prod'
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: revert h
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
h : prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0
⊢ natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)

tactic: refine' Multiset.induction_on t _ fun a t ih ht => _
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)

tactic: rw [Multiset.map_cons, Multiset.prod_cons] at ht⊢
state_before: case refine'_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ih :
  prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)
ht : prod (Multiset.map (fun f => leadingCoeff f) (a ::ₘ t)) ≠ 0
⊢ natDegree (prod (a ::ₘ t)) = Multiset.sum (Multiset.map (fun f => natDegree f) (a ::ₘ t))

tactic: rw [Multiset.sum_cons, Polynomial.natDegree_mul', ih]
state_before: case refine'_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ih :
  prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)
ht : leadingCoeff a * prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0
⊢ natDegree (a * prod t) = Multiset.sum (natDegree a ::ₘ Multiset.map (fun f => natDegree f) t)

tactic: simp
state_before: case refine'_1
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ prod (Multiset.map (fun f => leadingCoeff f) 0) ≠ 0 →
    natDegree (prod 0) = Multiset.sum (Multiset.map (fun f => natDegree f) 0)

tactic: apply right_ne_zero_of_mul ht
state_before: case refine'_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ih :
  prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)
ht : leadingCoeff a * prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0
⊢ prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0

tactic: rwa [Polynomial.leadingCoeff_multiset_prod']
state_before: case refine'_2
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ih :
  prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)
ht : leadingCoeff a * prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0
⊢ leadingCoeff a * leadingCoeff (prod t) ≠ 0

tactic: apply right_ne_zero_of_mul ht
state_before: case refine'_2.h
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t✝ : Multiset R[X]
a : R[X]
t : Multiset R[X]
ih :
  prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0 →
    natDegree (prod t) = Multiset.sum (Multiset.map (fun f => natDegree f) t)
ht : leadingCoeff a * prod (Multiset.map (fun f => leadingCoeff f) t) ≠ 0
⊢ prod (Multiset.map leadingCoeff t) ≠ 0