l3lab/ntp-mathlib huggingface dataset:
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      

Proof state:
case a.right
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ normalizedFactors I ∩ normalizedFactors J ≤ normalizedFactors J

Next tactic:
exact inf_le_right
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · 

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≤ I ⊔ J

Next tactic:
rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · 

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ ∀ (a : Ideal T), count a (normalizedFactors (I ⊔ J)) ≤ count a (normalizedFactors I ∩ normalizedFactors J)

Next tactic:
intro a
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
a : Ideal T
⊢ count a (normalizedFactors (I ⊔ J)) ≤ count a (normalizedFactors I ∩ normalizedFactors J)

Next tactic:
rw [Multiset.count_inter]
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
a : Ideal T
⊢ count a (normalizedFactors (I ⊔ J)) ≤ min (count a (normalizedFactors I)) (count a (normalizedFactors J))

Next tactic:
exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
    · 

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ ∀ p ∈ normalizedFactors I ∩ normalizedFactors J, Prime p

Next tactic:
intro p hp
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
    · intro p hp
      

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
p : Ideal T
hp : p ∈ normalizedFactors I ∩ normalizedFactors J
⊢ Prime p

Next tactic:
rw [mem_inter] at hp
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
    · intro p hp
      rw [mem_inter] at hp
      

Proof state:
case a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
p : Ideal T
hp : p ∈ normalizedFactors I ∧ p ∈ normalizedFactors J
⊢ Prime p

Next tactic:
exact prime_of_normalized_factor p hp.left
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
    · intro p hp
      rw [mem_inter] at hp
      exact prime_of_normalized_factor p hp.left
    · 

Proof state:
case a.hx
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ I ⊔ J ≠ 0

Next tactic:
exact ne_bot_of_le_ne_bot hI le_sup_left
theorem sup_eq_prod_inf_factors (hI : I ≠ ⊥) (hJ : J ≠ ⊥) :
    I ⊔ J = (normalizedFactors I ∩ normalizedFactors J).prod := by
  have H : normalizedFactors (normalizedFactors I ∩ normalizedFactors J).prod =
      normalizedFactors I ∩ normalizedFactors J := by
    apply normalizedFactors_prod_of_prime
    intro p hp
    rw [mem_inter] at hp
    exact prime_of_normalized_factor p hp.left
  have := Multiset.prod_ne_zero_of_prime (normalizedFactors I ∩ normalizedFactors J) fun _ h =>
      prime_of_normalized_factor _ (Multiset.mem_inter.1 h).1
  apply le_antisymm
  · rw [sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
    constructor
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hI, H]
      exact inf_le_left
    · rw [dvd_iff_normalizedFactors_le_normalizedFactors this hJ, H]
      exact inf_le_right
  · rw [← dvd_iff_le, dvd_iff_normalizedFactors_le_normalizedFactors,
      normalizedFactors_prod_of_prime, le_iff_count]
    · intro a
      rw [Multiset.count_inter]
      exact le_min (count_le_of_ideal_ge le_sup_left hI a) (count_le_of_ideal_ge le_sup_right hJ a)
    · intro p hp
      rw [mem_inter] at hp
      exact prime_of_normalized_factor p hp.left
    · exact ne_bot_of_le_ne_bot hI le_sup_left
    · 

Proof state:
case a.hy
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : J ≠ ⊥
H :
  normalizedFactors (Multiset.prod (normalizedFactors I ∩ normalizedFactors J)) =
    normalizedFactors I ∩ normalizedFactors J
this : Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0
⊢ Multiset.prod (normalizedFactors I ∩ normalizedFactors J) ≠ 0

Next tactic:
exact this
theorem irreducible_pow_sup (hI : I ≠ ⊥) (hJ : Irreducible J) (n : ℕ) :
    J ^ n ⊔ I = J ^ min ((normalizedFactors I).count J) n := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
⊢ J ^ n ⊔ I = J ^ min (count J (normalizedFactors I)) n

Next tactic:
rw [sup_eq_prod_inf_factors (pow_ne_zero n hJ.ne_zero) hI, min_comm,
    normalizedFactors_of_irreducible_pow hJ, normalize_eq J, replicate_inter, prod_replicate]
theorem irreducible_pow_sup_of_le (hJ : Irreducible J) (n : ℕ) (hn : ↑n ≤ multiplicity J I) :
    J ^ n ⊔ I = J ^ n := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
⊢ J ^ n ⊔ I = J ^ n

Next tactic:
by_cases hI : I = ⊥
theorem irreducible_pow_sup_of_le (hJ : Irreducible J) (n : ℕ) (hn : ↑n ≤ multiplicity J I) :
    J ^ n ⊔ I = J ^ n := by
  by_cases hI : I = ⊥
  · 

Proof state:
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 A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : I = ⊥
⊢ J ^ n ⊔ I = J ^ n

Next tactic:
simp_all
theorem irreducible_pow_sup_of_le (hJ : Irreducible J) (n : ℕ) (hn : ↑n ≤ multiplicity J I) :
    J ^ n ⊔ I = J ^ n := by
  by_cases hI : I = ⊥
  · simp_all
  

Proof state:
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 A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ J ^ n ⊔ I = J ^ n

Next tactic:
rw [irreducible_pow_sup hI hJ, min_eq_right]
theorem irreducible_pow_sup_of_le (hJ : Irreducible J) (n : ℕ) (hn : ↑n ≤ multiplicity J I) :
    J ^ n ⊔ I = J ^ n := by
  by_cases hI : I = ⊥
  · simp_all
  rw [irreducible_pow_sup hI hJ, min_eq_right]
  

Proof state:
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 A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hJ : Irreducible J
n : ℕ
hn : ↑n ≤ multiplicity J I
hI : ¬I = ⊥
⊢ n ≤ count J (normalizedFactors I)

Next tactic:
rwa [multiplicity_eq_count_normalizedFactors hJ hI, PartENat.coe_le_coe, normalize_eq J] at hn
theorem irreducible_pow_sup_of_ge (hI : I ≠ ⊥) (hJ : Irreducible J) (n : ℕ)
    (hn : multiplicity J I ≤ n) :
    J ^ n ⊔ I = J ^ (multiplicity J I).get (PartENat.dom_of_le_natCast hn) := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
hn : multiplicity J I ≤ ↑n
⊢ J ^ n ⊔ I = J ^ Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)

Next tactic:
rw [irreducible_pow_sup hI hJ, min_eq_left]
theorem irreducible_pow_sup_of_ge (hI : I ≠ ⊥) (hJ : Irreducible J) (n : ℕ)
    (hn : multiplicity J I ≤ n) :
    J ^ n ⊔ I = J ^ (multiplicity J I).get (PartENat.dom_of_le_natCast hn) := by
  rw [irreducible_pow_sup hI hJ, min_eq_left]
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
hn : multiplicity J I ≤ ↑n
⊢ J ^ count J (normalizedFactors I) = J ^ Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
hn : multiplicity J I ≤ ↑n
⊢ count J (normalizedFactors I) ≤ n

Next tactic:
congr
theorem irreducible_pow_sup_of_ge (hI : I ≠ ⊥) (hJ : Irreducible J) (n : ℕ)
    (hn : multiplicity J I ≤ n) :
    J ^ n ⊔ I = J ^ (multiplicity J I).get (PartENat.dom_of_le_natCast hn) := by
  rw [irreducible_pow_sup hI hJ, min_eq_left]
  congr
  · 

Proof state:
case e_a
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
hn : multiplicity J I ≤ ↑n
⊢ count J (normalizedFactors I) = Part.get (multiplicity J I) (_ : (multiplicity J I).Dom)

Next tactic:
rw [← PartENat.natCast_inj, PartENat.natCast_get,
      multiplicity_eq_count_normalizedFactors hJ hI, normalize_eq J]
theorem irreducible_pow_sup_of_ge (hI : I ≠ ⊥) (hJ : Irreducible J) (n : ℕ)
    (hn : multiplicity J I ≤ n) :
    J ^ n ⊔ I = J ^ (multiplicity J I).get (PartENat.dom_of_le_natCast hn) := by
  rw [irreducible_pow_sup hI hJ, min_eq_left]
  congr
  · rw [← PartENat.natCast_inj, PartENat.natCast_get,
      multiplicity_eq_count_normalizedFactors hJ hI, normalize_eq J]
  · 

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
T : Type u_4
inst✝² : CommRing T
inst✝¹ : IsDomain T
inst✝ : IsDedekindDomain T
I J : Ideal T
hI : I ≠ ⊥
hJ : Irreducible J
n : ℕ
hn : multiplicity J I ≤ ↑n
⊢ count J (normalizedFactors I) ≤ n

Next tactic:
rwa [multiplicity_eq_count_normalizedFactors hJ hI, PartENat.coe_le_coe, normalize_eq J] at hn
/-- A Dedekind domain is equal to the intersection of its localizations at all its height one
non-zero prime ideals viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot [Algebra R K] [hK : IsFractionRing R K] :
    (⨅ v : HeightOneSpectrum R,
        Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥ := by
  

Proof state:
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
inst✝² : IsDomain R
inst✝¹ : IsDedekindDomain R
v : HeightOneSpectrum R
inst✝ : Algebra R K
hK : IsFractionRing R K
⊢ ⨅ v, Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal) (_ : Ideal.primeCompl v.asIdeal ≤ R⁰) = ⊥

Next tactic:
ext x
/-- A Dedekind domain is equal to the intersection of its localizations at all its height one
non-zero prime ideals viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot [Algebra R K] [hK : IsFractionRing R K] :
    (⨅ v : HeightOneSpectrum R,
        Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥ := by
  ext x
  

Proof state:
case h
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
inst✝² : IsDomain R
inst✝¹ : IsDedekindDomain R
v : HeightOneSpectrum R
inst✝ : Algebra R K
hK : IsFractionRing R K
x : K
⊢ x ∈ ⨅ v, Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal) (_ : Ideal.primeCompl v.asIdeal ≤ R⁰) ↔ x ∈ ⊥

Next tactic:
rw [Algebra.mem_iInf]
/-- A Dedekind domain is equal to the intersection of its localizations at all its height one
non-zero prime ideals viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot [Algebra R K] [hK : IsFractionRing R K] :
    (⨅ v : HeightOneSpectrum R,
        Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥ := by
  ext x
  rw [Algebra.mem_iInf]
  

Proof state:
case h
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : Field K
inst✝³ : IsDomain A
inst✝² : IsDomain R
inst✝¹ : IsDedekindDomain R
v : HeightOneSpectrum R
inst✝ : Algebra R K
hK : IsFractionRing R K
x : K
⊢ (∀ (i : HeightOneSpectrum R),
      x ∈ Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal) (_ : Ideal.primeCompl i.asIdeal ≤ R⁰)) ↔
    x ∈ ⊥

Next tactic:
constructor