case pos
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b

case neg
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
by_cases h : Finite a b
case pos
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = ↑(Part.get (multiplicity a b) (_ : (multiplicity a b).Dom))
case pos
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
rw [← PartENat.natCast_get (finite_iff_dom.mp h)]
case pos.refine'_1
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ a ^ Part.get (multiplicity a b) h ∣ b

case pos.refine'_2
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ ¬a ^ (Part.get (multiplicity a b) h + 1) ∣ b
case pos
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = ↑(Part.get (multiplicity a b) (_ : (multiplicity a b).Dom))
refine'
    (multiplicity.unique
        (show Associates.mk a ^ (multiplicity a b).get h ∣ Associates.mk b from _) _).symm <;>
  rw [← Associates.mk_pow, Associates.mk_dvd_mk]
no goals
case pos.refine'_1
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ a ^ Part.get (multiplicity a b) h ∣ b
exact pow_multiplicity_dvd h
no goals
case pos.refine'_2
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ ¬a ^ (Part.get (multiplicity a b) h + 1) ∣ b
exact is_greatest
    ((PartENat.lt_coe_iff _ _).mpr (Exists.intro (finite_iff_dom.mp h) (Nat.lt_succ_self _)))
case neg
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
⊢ ¬Finite (Associates.mk a) (Associates.mk b)
case neg
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
suffices ¬Finite (Associates.mk a) (Associates.mk b) by
  rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this
  rw [h, this]
no goals
case neg
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
⊢ ¬Finite (Associates.mk a) (Associates.mk b)
refine'
  not_finite_iff_forall.mpr fun n => by
    rw [← Associates.mk_pow, Associates.mk_dvd_mk]
    exact not_finite_iff_forall.mp h n
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h✝ : ¬Finite a b
h : multiplicity a b = ⊤
this✝ : ¬Finite (Associates.mk a) (Associates.mk b)
this : multiplicity (Associates.mk a) (Associates.mk b) = ⊤
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
this : ¬Finite (Associates.mk a) (Associates.mk b)
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this
no goals
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h✝ : ¬Finite a b
h : multiplicity a b = ⊤
this✝ : ¬Finite (Associates.mk a) (Associates.mk b)
this : multiplicity (Associates.mk a) (Associates.mk b) = ⊤
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
rw [h, this]
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
n : ℕ
⊢ a ^ n ∣ b
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
n : ℕ
⊢ Associates.mk a ^ n ∣ Associates.mk b
rw [← Associates.mk_pow, Associates.mk_dvd_mk]
no goals
α : Type u_1
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : ¬Finite a b
n : ℕ
⊢ a ^ n ∣ b
exact not_finite_iff_forall.mp h n