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 : (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
state_after: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum

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]
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
state_after: case refine_1
R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ (Multiset.map (fun f => f.leadingCoeff) 0).prod ≠ 0 → (prod 0).natDegree = (Multiset.map (fun f => f.natDegree) 0).sum

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : (Multiset.map (fun f => f.leadingCoeff) (a ::ₘ t)).prod ≠ 0
⊢ (a ::ₘ t).prod.natDegree = (Multiset.map (fun f => f.natDegree) (a ::ₘ t)).sum

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : (Multiset.map (fun f => f.leadingCoeff) (a ::ₘ t)).prod ≠ 0
⊢ (a ::ₘ t).prod.natDegree = (Multiset.map (fun f => f.natDegree) (a ::ₘ t)).sum
state_after: 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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (a * t.prod).natDegree = (a.natDegree ::ₘ Multiset.map (fun f => f.natDegree) t).sum

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (a * t.prod).natDegree = (a.natDegree ::ₘ Multiset.map (fun f => f.natDegree) t).sum
state_after: 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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ a.leadingCoeff * t.prod.leadingCoeff ≠ 0

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

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
state_after: no goals

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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ a.leadingCoeff * t.prod.leadingCoeff ≠ 0
state_after: 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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (Multiset.map leadingCoeff t).prod ≠ 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 :
  (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0 → t.prod.natDegree = (Multiset.map (fun f => f.natDegree) t).sum
ht : a.leadingCoeff * (Multiset.map (fun f => f.leadingCoeff) t).prod ≠ 0
⊢ (Multiset.map leadingCoeff t).prod ≠ 0
state_after: no goals