Theorem: multiplicity_eq_multiplicity_span
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: by_cases h : Finite a b
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b
state_after: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b

case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b

tactic: rw [← PartENat.natCast_get (finite_iff_dom.mp h)]
state_before: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b
state_after: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = ↑((multiplicity a b).get ⋯)

tactic: refine (multiplicity.unique
  (show Ideal.span {a} ^ (multiplicity a b).get h ∣ Ideal.span {b} from ?_) ?_).symm <;>
  rw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]
state_before: case pos
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = ↑((multiplicity a b).get ⋯)
state_after: case pos.refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ a ^ (multiplicity a b).get h ∣ b

case pos.refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ ¬a ^ ((multiplicity a b).get h + 1) ∣ b

tactic: exact pow_multiplicity_dvd h
state_before: case pos.refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ a ^ (multiplicity a b).get h ∣ b
state_after: no goals

tactic: exact multiplicity.is_greatest
  ((PartENat.lt_coe_iff _ _).mpr (Exists.intro (finite_iff_dom.mp h) (Nat.lt_succ_self _)))
state_before: case pos.refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity.Finite a b
⊢ ¬a ^ ((multiplicity a b).get h + 1) ∣ b
state_after: no goals

tactic: suffices ¬Finite (Ideal.span ({a} : Set R)) (Ideal.span ({b} : Set R)) by
  rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this
  rw [h, this]
state_before: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b
state_after: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
⊢ ¬multiplicity.Finite (span {a}) (span {b})

tactic: exact not_finite_iff_forall.mpr fun n => by
  rw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]
  exact not_finite_iff_forall.mp h n
state_before: case neg
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
⊢ ¬multiplicity.Finite (span {a}) (span {b})
state_after: no goals

tactic: rw [finite_iff_dom, PartENat.not_dom_iff_eq_top] at h this
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
this : ¬multiplicity.Finite (span {a}) (span {b})
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b
state_after: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity a b = ⊤
this : multiplicity (span {a}) (span {b}) = ⊤
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b

tactic: rw [h, this]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : multiplicity a b = ⊤
this : multiplicity (span {a}) (span {b}) = ⊤
⊢ multiplicity (span {a}) (span {b}) = multiplicity a b
state_after: no goals

tactic: rw [Ideal.span_singleton_pow, span_singleton_dvd_span_singleton_iff_dvd]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
n : ℕ
⊢ span {a} ^ n ∣ span {b}
state_after: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
n : ℕ
⊢ a ^ n ∣ b

tactic: exact not_finite_iff_forall.mp h n
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain R
inst✝² : IsPrincipalIdealRing R
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : R
h : ¬multiplicity.Finite a b
n : ℕ
⊢ a ^ n ∣ b
state_after: no goals