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

tactic: replace hI : Associates.mk I ≠ 0 := Associates.mk_ne_zero.mpr hI
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hI : I ≠ 0
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
⊢ (Associates.mk J).count (Associates.mk I).factors = Multiset.count J (normalizedFactors I)
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
⊢ (Associates.mk J).count (Associates.mk I).factors = Multiset.count J (normalizedFactors I)

tactic: have hJ' : Irreducible (Associates.mk J) := by
  simpa only [Associates.irreducible_mk] using (Ideal.prime_of_isPrime hJ₀ hJ).irreducible
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
⊢ (Associates.mk J).count (Associates.mk I).factors = Multiset.count J (normalizedFactors I)
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ (Associates.mk J).count (Associates.mk I).factors = Multiset.count J (normalizedFactors I)

tactic: apply (Ideal.count_normalizedFactors_eq (p := J) (x := I) _ _).symm
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ (Associates.mk J).count (Associates.mk I).factors = Multiset.count J (normalizedFactors I)
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ I ≤ J ^ (Associates.mk J).count (Associates.mk I).factors

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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬I ≤ J ^ ((Associates.mk J).count (Associates.mk I).factors + 1)

tactic: all_goals
  rw [← Ideal.dvd_iff_le, ← Associates.mk_dvd_mk, Associates.mk_pow]
  simp only [Associates.dvd_eq_le]
  rw [Associates.prime_pow_dvd_iff_le hI hJ']
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ I ≤ J ^ (Associates.mk J).count (Associates.mk I).factors

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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬I ≤ J ^ ((Associates.mk J).count (Associates.mk I).factors + 1)
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬(Associates.mk J).count (Associates.mk I).factors + 1 ≤ (Associates.mk J).count (Associates.mk I).factors

tactic: linarith
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬(Associates.mk J).count (Associates.mk I).factors + 1 ≤ (Associates.mk J).count (Associates.mk I).factors
state_after: no goals

tactic: simpa only [Associates.irreducible_mk] using (Ideal.prime_of_isPrime hJ₀ hJ).irreducible
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
⊢ Irreducible (Associates.mk J)
state_after: no goals

tactic: rw [← Ideal.dvd_iff_le, ← Associates.mk_dvd_mk, Associates.mk_pow]
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬I ≤ J ^ ((Associates.mk J).count (Associates.mk I).factors + 1)
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬Associates.mk J ^ ((Associates.mk J).count (Associates.mk I).factors + 1) ∣ Associates.mk I

tactic: simp only [Associates.dvd_eq_le]
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬Associates.mk J ^ ((Associates.mk J).count (Associates.mk I).factors + 1) ∣ Associates.mk I
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬Associates.mk J ^ ((Associates.mk J).count (Associates.mk I).factors + 1) ≤ Associates.mk I

tactic: rw [Associates.prime_pow_dvd_iff_le hI hJ']
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬Associates.mk J ^ ((Associates.mk J).count (Associates.mk I).factors + 1) ≤ Associates.mk I
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✝⁶ : DecidableEq R
inst✝⁵ : DecidableEq (Ideal R)
inst✝⁴ : NormalizationMonoid R
inst✝³ : DecidableRel fun x x_1 => x ∣ x_1
inst✝² : DecidableRel fun x x_1 => x ∣ x_1
inst✝¹ : DecidableEq (Associates (Ideal R))
inst✝ : (p : Associates (Ideal R)) → Decidable (Irreducible p)
I J : Ideal R
hJ : J.IsPrime
hJ₀ : J ≠ ⊥
hI : Associates.mk I ≠ 0
hJ' : Irreducible (Associates.mk J)
⊢ ¬(Associates.mk J).count (Associates.mk I).factors + 1 ≤ (Associates.mk J).count (Associates.mk I).factors