Theorem: Ideal.exists_minimalPrimes_le
File: Mathlib/RingTheory/Ideal/MinimalPrime.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∃ p ∈ I.minimalPrimes, p ≤ J
state_after: R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m
tactic: suffices
    ∃ m ∈ { p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ OrderDual.ofDual p },
      OrderDual.toDual J ≤ m ∧ ∀ z ∈ { p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ p }, m ≤ z → z = m by
    obtain ⟨p, h₁, h₂, h₃⟩ := this
    simp_rw [← @eq_comm _ p] at h₃
    exact ⟨p, ⟨h₁, fun a b c => le_of_eq (h₃ a b c)⟩, h₂⟩
state_before: R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m
state_after: case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∀ c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p},
    IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub

case hxs
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
tactic: apply zorn_nonempty_partialOrder₀
state_before: case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∀ c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p},
    IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub

case hxs
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
state_after: case hxs
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}

case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∀ c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p},
    IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub
tactic: swap
state_before: case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
⊢ ∀ c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p},
    IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub
state_after: case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
c : Set (Ideal R)
hc : c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
hc' : IsChain (fun x x_1 => x ≤ x_1) c
J' : (Ideal R)ᵒᵈ
hJ' : J' ∈ c
⊢ ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub
tactic: rintro (c : Set (Ideal R)) hc hc' J' hJ'
state_before: case ih
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
c : Set (Ideal R)
hc : c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
hc' : IsChain (fun x x_1 => x ≤ x_1) c
J' : (Ideal R)ᵒᵈ
hJ' : J' ∈ c
⊢ ∃ ub ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, ∀ z ∈ c, z ≤ ub
state_after: case ih.refine_1
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
c : Set (Ideal R)
hc : c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
hc' : IsChain (fun x x_1 => x ≤ x_1) c
J' : (Ideal R)ᵒᵈ
hJ' : J' ∈ c
⊢ I ≤ OrderDual.ofDual (OrderDual.toDual (sInf c))

case ih.refine_2
R : Type u_1
S : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
I J : Ideal R
inst✝ : J.IsPrime
e : I ≤ J
c : Set (Ideal R)
hc : c ⊆ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}
hc' : IsChain (fun x x_1 => x ≤ x_1) c
J' : (Ideal R)ᵒᵈ
hJ' : J' ∈ c
⊢ ∀ z ∈ c, z ≤ OrderDual.toDual (sInf c)
tactic: refine
    ⟨OrderDual.toDual (sInf c),
      ⟨Ideal.sInf_isPrime_of_isChain ⟨J', hJ'⟩ hc'.symm fun x hx => (hc hx).1, ?_⟩, ?_⟩