Theorem: AlgebraicGeometry.IsAffineOpen.isLocalization_stalk
File: Mathlib/AlgebraicGeometry/AffineScheme.lean

Proof steps:
state_before: X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑x)) (hU.primeIdealOf x).asIdeal
state_after: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) (hU.primeIdealOf ⟨x, hx⟩).asIdeal
tactic: rcases x with ⟨x, hx⟩
state_before: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) (hU.primeIdealOf ⟨x, hx⟩).asIdeal
state_after: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U) := hU.primeIdealOf ⟨x, hx⟩
hy : y = hU.primeIdealOf ⟨x, hx⟩
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
tactic: set y := hU.primeIdealOf ⟨x, hx⟩ with hy
state_before: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U) := hU.primeIdealOf ⟨x, hx⟩
hy : y = hU.primeIdealOf ⟨x, hx⟩
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
state_after: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U) := hU.primeIdealOf ⟨x, hx⟩
hy : y = hU.primeIdealOf ⟨x, hx⟩
this : hU.fromSpec.val.base y = x
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
tactic: have : hU.fromSpec.val.base y = x := hy ▸ hU.fromSpec_primeIdealOf ⟨x, hx⟩
state_before: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U) := hU.primeIdealOf ⟨x, hx⟩
hy : y = hU.primeIdealOf ⟨x, hx⟩
this : hU.fromSpec.val.base y = x
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
state_after: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U)
hy : y = hU.primeIdealOf ⟨x, hx⟩
this : hU.fromSpec.val.base y = x
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
tactic: clear_value y
state_before: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↑↑X.toPresheafedSpace
hx : x ∈ U
y : PrimeSpectrum ↑Γ(X, U)
hy : y = hU.primeIdealOf ⟨x, hx⟩
this : hU.fromSpec.val.base y = x
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨x, hx⟩)) y.asIdeal
state_after: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
y : PrimeSpectrum ↑Γ(X, U)
hx : hU.fromSpec.val.base y ∈ U
hy : y = hU.primeIdealOf ⟨hU.fromSpec.val.base y, hx⟩
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨hU.fromSpec.val.base y, hx⟩)) y.asIdeal
tactic: subst this
state_before: case mk
X Y : Scheme
U : X.Opens
hU : IsAffineOpen U
f : ↑Γ(X, U)
y : PrimeSpectrum ↑Γ(X, U)
hx : hU.fromSpec.val.base y ∈ U
hy : y = hU.primeIdealOf ⟨hU.fromSpec.val.base y, hx⟩
⊢ IsLocalization.AtPrime (↑(X.presheaf.stalk ↑⟨hU.fromSpec.val.base y, hx⟩)) y.asIdeal
state_after: no goals
tactic: exact hU.isLocalization_stalk' y hx