Theorem: Ideal.exists_ideal_comap_le_prime
File: Mathlib/RingTheory/Ideal/Over.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
tactic: let Sₚ := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
tactic: let Iₚ := I.map (algebraMap S Sₚ)
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
tactic: have hI' : Disjoint (Algebra.algebraMapSubmonoid S P.primeCompl : Set S) I := by
    rw [Set.disjoint_iff]
    rintro _ ⟨⟨x, hx : x ∉ P, rfl⟩, hx'⟩
    exact (hx (hI hx')).elim
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
tactic: have : Iₚ ≠ ⊤ := by
    rw [Ne, Ideal.eq_top_iff_one, IsLocalization.mem_map_algebraMap_iff
      (Algebra.algebraMapSubmonoid S P.primeCompl) Sₚ, not_exists]
    simp only [one_mul, IsLocalization.eq_iff_exists (Algebra.algebraMapSubmonoid S P.primeCompl),
      not_exists]
    exact fun x c ↦ hI'.ne_of_mem (mul_mem c.2 x.2.2) (I.mul_mem_left c x.1.2)
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
tactic: obtain ⟨M, hM, hM'⟩ := Ideal.exists_le_maximal _ this
state_before: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
⊢ ∃ Q ≥ I, Q.IsPrime ∧ comap (algebraMap R S) Q ≤ P
state_after: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
⊢ comap (algebraMap R S) (comap (algebraMap S Sₚ) M) ≤ P
tactic: refine ⟨_, Ideal.map_le_iff_le_comap.mp hM', hM.isPrime.comap _, ?_⟩
state_before: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
⊢ comap (algebraMap R S) (comap (algebraMap S Sₚ) M) ≤ P
state_after: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
x : R
hx : x ∈ comap (algebraMap R S) (comap (algebraMap S Sₚ) M)
⊢ x ∈ P
tactic: intro x hx
state_before: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
x : R
hx : x ∈ comap (algebraMap R S) (comap (algebraMap S Sₚ) M)
⊢ x ∈ P
state_after: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
x : R
hx : x ∈ comap (algebraMap R S) (comap (algebraMap S Sₚ) M)
hx' : x ∉ P
⊢ False
tactic: by_contra hx'
state_before: case intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝¹ : Algebra R S
P : Ideal R
inst✝ : P.IsPrime
I : Ideal S
hI : comap (algebraMap R S) I ≤ P
Sₚ : Type u_2 := Localization (Algebra.algebraMapSubmonoid S P.primeCompl)
Iₚ : Ideal Sₚ := map (algebraMap S Sₚ) I
hI' : Disjoint ↑(Algebra.algebraMapSubmonoid S P.primeCompl) ↑I
this : Iₚ ≠ ⊤
M : Ideal Sₚ
hM : M.IsMaximal
hM' : Iₚ ≤ M
x : R
hx : x ∈ comap (algebraMap R S) (comap (algebraMap S Sₚ) M)
hx' : x ∉ P
⊢ False
state_after: no goals
tactic: exact Set.disjoint_left.mp ((IsLocalization.isPrime_iff_isPrime_disjoint
    (Algebra.algebraMapSubmonoid S P.primeCompl) Sₚ M).mp hM.isPrime).2 ⟨_, hx', rfl⟩ hx