case empty
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs✝ : ∀ (a : α), a ∈ s → Irreducible a
hs : ∀ (a : α), a ∈ 0 → Irreducible a
⊢ normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0

case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs : ∀ (a : α), a ∈ s → Irreducible a
⊢ normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
induction' s using Multiset.induction with a s ih
no goals
case empty
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs✝ : ∀ (a : α), a ∈ s → Irreducible a
hs : ∀ (a : α), a ∈ 0 → Irreducible a
⊢ normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0
rw [Multiset.prod_zero, normalizedFactors_one, Multiset.map_zero]
case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
have ia := hs a (Multiset.mem_cons_self a _)
case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
have ib := fun b h => hs b (Multiset.mem_cons_of_mem h)
case cons.inl
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs✝ : ∀ (a : α), a ∈ s → Irreducible a
a : α
ia : Irreducible a
ih : (∀ (a : α), a ∈ 0 → Irreducible a) → normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ 0 → Irreducible a_1
ib : ∀ (b : α), b ∈ 0 → Irreducible b
⊢ normalizedFactors (Multiset.prod (a ::ₘ 0)) = Multiset.map (↑normalize) (a ::ₘ 0)

case cons.inr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
b : α
hb : b ∈ s
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
case cons
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
obtain rfl | ⟨b, hb⟩ := s.empty_or_exists_mem
case cons.inr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
b : α
hb : b ∈ s
this : Nontrivial α
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
case cons.inr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
b : α
hb : b ∈ s
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
haveI := nontrivial_of_ne b 0 (ib b hb).ne_zero
no goals
case cons.inr.intro
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s✝ : Multiset α
hs✝ : ∀ (a : α), a ∈ s✝ → Irreducible a
a : α
s : Multiset α
ih : (∀ (a : α), a ∈ s → Irreducible a) → normalizedFactors (Multiset.prod s) = Multiset.map (↑normalize) s
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Irreducible a_1
ia : Irreducible a
ib : ∀ (b : α), b ∈ s → Irreducible b
b : α
hb : b ∈ s
this : Nontrivial α
⊢ normalizedFactors (Multiset.prod (a ::ₘ s)) = Multiset.map (↑normalize) (a ::ₘ s)
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]
no goals
case cons.inl
α : Type u_1
inst✝³ : CancelCommMonoidWithZero α
inst✝² : DecidableEq α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
s : Multiset α
hs✝ : ∀ (a : α), a ∈ s → Irreducible a
a : α
ia : Irreducible a
ih : (∀ (a : α), a ∈ 0 → Irreducible a) → normalizedFactors (Multiset.prod 0) = Multiset.map (↑normalize) 0
hs : ∀ (a_1 : α), a_1 ∈ a ::ₘ 0 → Irreducible a_1
ib : ∀ (b : α), b ∈ 0 → Irreducible b
⊢ normalizedFactors (Multiset.prod (a ::ₘ 0)) = Multiset.map (↑normalize) (a ::ₘ 0)
rw [Multiset.cons_zero, Multiset.prod_singleton, Multiset.map_singleton,
  normalizedFactors_irreducible ia]