Theorem: PrimeSpectrum.localization_comap_range
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: ext x
state_before: R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
⊢ Set.range ↑(comap (algebraMap R S)) = {p | Disjoint ↑M ↑p.asIdeal}

tactic: constructor
state_before: case h
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
⊢ x ∈ Set.range ↑(comap (algebraMap R S)) ↔ x ∈ {p | Disjoint ↑M ↑p.asIdeal}

tactic: simp_rw [disjoint_iff_inf_le]
state_before: case h.mp
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
⊢ x ∈ Set.range ↑(comap (algebraMap R S)) → x ∈ {p | Disjoint ↑M ↑p.asIdeal}

tactic: rintro ⟨p, rfl⟩ x ⟨hx₁, hx₂⟩
state_before: case h.mp
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
⊢ x ∈ Set.range ↑(comap (algebraMap R S)) → x ∈ {p | ↑M ⊓ ↑p.asIdeal ≤ ⊥}

tactic: exact (p.2.1 : ¬_) (p.asIdeal.eq_top_of_isUnit_mem hx₂ (IsLocalization.map_units S ⟨x, hx₁⟩))
state_before: case h.mp.intro.intro
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
p : PrimeSpectrum S
x : R
hx₁ : x ∈ ↑M
hx₂ : x ∈ ↑(↑(comap (algebraMap R S)) p).asIdeal
⊢ x ∈ ⊥

tactic: intro h
state_before: case h.mpr
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
⊢ x ∈ {p | Disjoint ↑M ↑p.asIdeal} → x ∈ Set.range ↑(comap (algebraMap R S))

tactic: use ⟨x.asIdeal.map (algebraMap R S), IsLocalization.isPrime_of_isPrime_disjoint M S _ x.2 h⟩
state_before: case h.mpr
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
h : x ∈ {p | Disjoint ↑M ↑p.asIdeal}
⊢ x ∈ Set.range ↑(comap (algebraMap R S))

tactic: ext1
state_before: case h.mpr
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
h : x ∈ {p | Disjoint ↑M ↑p.asIdeal}
⊢ ↑(comap (algebraMap R S))
      { asIdeal := Ideal.map (algebraMap R S) x.asIdeal,
        IsPrime := (_ : Ideal.IsPrime (Ideal.map (algebraMap R S) x.asIdeal)) } =
    x

tactic: exact IsLocalization.comap_map_of_isPrime_disjoint M S _ x.2 h
state_before: case h.mpr.asIdeal
R : Type u
S : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S
S' : Type ?u.255999
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R S
M : Submonoid R
inst✝ : IsLocalization M S
x : PrimeSpectrum R
h : x ∈ {p | Disjoint ↑M ↑p.asIdeal}
⊢ (↑(comap (algebraMap R S))
        { asIdeal := Ideal.map (algebraMap R S) x.asIdeal,
          IsPrime := (_ : Ideal.IsPrime (Ideal.map (algebraMap R S) x.asIdeal)) }).asIdeal =
    x.asIdeal