Theorem: multiplicity.multiplicity_mk_eq_multiplicity
File: Mathlib/RingTheory/Multiplicity.lean

tactic: by_cases h : Finite a b
state_before: α : Type u_1
β : Type u_2
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
state_after: case pos
α : Type u_1
β : Type u_2
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
β : Type u_2
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

tactic: rw [← PartENat.natCast_get (finite_iff_dom.mp h)]
state_before: case pos
α : Type u_1
β : Type u_2
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
state_after: case pos
α : Type u_1
β : Type u_2
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).get ⋯)

tactic: 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]
state_before: case pos
α : Type u_1
β : Type u_2
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).get ⋯)
state_after: case pos.refine_1
α : Type u_1
β : Type u_2
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 ^ (multiplicity a b).get h ∣ b

case pos.refine_2
α : Type u_1
β : Type u_2
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 ^ ((multiplicity a b).get h + 1) ∣ b

tactic: exact pow_multiplicity_dvd h
state_before: case pos.refine_1
α : Type u_1
β : Type u_2
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 ^ (multiplicity a b).get h ∣ b
state_after: no goals

tactic: exact is_greatest
    ((PartENat.lt_coe_iff _ _).mpr (Exists.intro (finite_iff_dom.mp h) (Nat.lt_succ_self _)))
state_before: case pos.refine_2
α : Type u_1
β : Type u_2
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 ^ ((multiplicity a b).get h + 1) ∣ b
state_after: no goals

tactic: 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]
state_before: case neg
α : Type u_1
β : Type u_2
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
state_after: case neg
α : Type u_1
β : Type u_2
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)

tactic: 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
state_before: case neg
α : Type u_1
β : Type u_2
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)
state_after: no goals

tactic: rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this
state_before: α : Type u_1
β : Type u_2
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
state_after: α : Type u_1
β : Type u_2
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : multiplicity a b = ⊤
this : multiplicity (Associates.mk a) (Associates.mk b) = ⊤
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b

tactic: rw [h, this]
state_before: α : Type u_1
β : Type u_2
inst✝² : CommMonoidWithZero α
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : multiplicity a b = ⊤
this : multiplicity (Associates.mk a) (Associates.mk b) = ⊤
⊢ multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b
state_after: no goals

tactic: rw [← Associates.mk_pow, Associates.mk_dvd_mk]
state_before: α : Type u_1
β : Type u_2
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
state_after: α : Type u_1
β : Type u_2
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

tactic: exact not_finite_iff_forall.mp h n
state_before: α : Type u_1
β : Type u_2
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
state_after: no goals