Theorem: IsLocalization.surjective_quotientMap_of_maximal_of_localization
File: Mathlib/RingTheory/Localization/Ideal.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
⊢ Function.Surjective ⇑(Ideal.quotientMap I (algebraMap R S) H)
state_after: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
s : S ⧸ I
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = s
tactic: intro s
state_before: R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
s : S ⧸ I
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = s
state_after: case intro
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
s : S
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) s
tactic: obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective s
state_before: case intro
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
s : S
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) s
state_after: case intro.intro.intro.mk
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
r m : R
hm : m ∈ M
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) (mk' S r ⟨m, hm⟩)
tactic: obtain ⟨r, ⟨m, hm⟩, rfl⟩ := mk'_surjective M s
state_before: case intro.intro.intro.mk
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
r m : R
hm : m ∈ M
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) (mk' S r ⟨m, hm⟩)
state_after: case pos
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
r m : R
hm : m ∈ M
hM : (Ideal.Quotient.mk (Ideal.comap (algebraMap R S) I)) m = 0
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) (mk' S r ⟨m, hm⟩)

case neg
R : Type u_1
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_2
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : IsLocalization M S
I : Ideal S
inst✝ : I.IsPrime
J : Ideal R
H : J ≤ Ideal.comap (algebraMap R S) I
hI : (Ideal.comap (algebraMap R S) I).IsMaximal
r m : R
hm : m ∈ M
hM : ¬(Ideal.Quotient.mk (Ideal.comap (algebraMap R S) I)) m = 0
⊢ ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) (mk' S r ⟨m, hm⟩)
tactic: by_cases hM : (Ideal.Quotient.mk (I.comap (algebraMap R S))) m = 0