Theorem: UniqueFactorizationMonoid.normalizedFactors_prod_eq
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: induction' s using Multiset.induction with a s ih
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs : ∀ a ∈ s, Irreducible a
⊢ normalizedFactors s.prod = Multiset.map (⇑normalize) s
state_after: case empty
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
hs : ∀ a ∈ 0, Irreducible a
⊢ normalizedFactors (Multiset.prod 0) = Multiset.map (⇑normalize) 0

case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)

tactic: rw [Multiset.prod_zero, normalizedFactors_one, Multiset.map_zero]
state_before: case empty
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
hs : ∀ a ∈ 0, Irreducible a
⊢ normalizedFactors (Multiset.prod 0) = Multiset.map (⇑normalize) 0
state_after: no goals

tactic: have ia := hs a (Multiset.mem_cons_self a _)
state_before: case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)
state_after: case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)

tactic: have ib := fun b h => hs b (Multiset.mem_cons_of_mem h)
state_before: case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)
state_after: case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)

tactic: obtain rfl | ⟨b, hb⟩ := s.empty_or_exists_mem
state_before: case cons
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)
state_after: case cons.inl
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ia : Irreducible a
ih : (∀ a ∈ 0, Irreducible a) → normalizedFactors (Multiset.prod 0) = Multiset.map (⇑normalize) 0
hs : ∀ a_1 ∈ a ::ₘ 0, Irreducible a_1
ib : ∀ b ∈ 0, Irreducible b
⊢ normalizedFactors (a ::ₘ 0).prod = Multiset.map (⇑normalize) (a ::ₘ 0)

case cons.inr.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
b : α
hb : b ∈ s
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)

tactic: haveI := nontrivial_of_ne b 0 (ib b hb).ne_zero
state_before: case cons.inr.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
b : α
hb : b ∈ s
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)
state_after: case cons.inr.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
b : α
hb : b ∈ s
this : Nontrivial α
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)

tactic: rw [Multiset.prod_cons, Multiset.map_cons,
  normalizedFactors_mul ia.ne_zero (Multiset.prod_ne_zero fun h => (ib 0 h).ne_zero rfl),
  normalizedFactors_irreducible ia, ih ib, Multiset.singleton_add]
state_before: case cons.inr.intro
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
s : Multiset α
ih : (∀ a ∈ s, Irreducible a) → normalizedFactors s.prod = Multiset.map (⇑normalize) s
hs : ∀ a_1 ∈ a ::ₘ s, Irreducible a_1
ia : Irreducible a
ib : ∀ b ∈ s, Irreducible b
b : α
hb : b ∈ s
this : Nontrivial α
⊢ normalizedFactors (a ::ₘ s).prod = Multiset.map (⇑normalize) (a ::ₘ s)
state_after: no goals

tactic: rw [Multiset.cons_zero, Multiset.prod_singleton, Multiset.map_singleton,
  normalizedFactors_irreducible ia]
state_before: case cons.inl
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
a : α
ia : Irreducible a
ih : (∀ a ∈ 0, Irreducible a) → normalizedFactors (Multiset.prod 0) = Multiset.map (⇑normalize) 0
hs : ∀ a_1 ∈ a ::ₘ 0, Irreducible a_1
ib : ∀ b ∈ 0, Irreducible b
⊢ normalizedFactors (a ::ₘ 0).prod = Multiset.map (⇑normalize) (a ::ₘ 0)
state_after: no goals