Theorem: AlgebraicGeometry.functionField_isFractionRing_of_isAffineOpen
File: Mathlib/AlgebraicGeometry/FunctionField.lean

Proof steps:
state_before: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this : IsAffine ↑U
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
tactic: haveI : IsAffine _ := hU
state_before: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this : IsAffine ↑U
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
tactic: haveI : IsIntegral U :=
    @isIntegral_of_isAffine_of_isDomain _ _ _
      (by rw [Scheme.Opens.toScheme_presheaf_obj, Opens.openEmbedding_obj_top]; infer_instance)
state_before: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ IsLocalization (nonZeroDivisors ↑Γ(X, U)) ↑(X.presheaf.stalk (genericPoint ↑↑X.toPresheafedSpace))
tactic: delta IsFractionRing Scheme.functionField
state_before: X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ IsLocalization (nonZeroDivisors ↑Γ(X, U)) ↑(X.presheaf.stalk (genericPoint ↑↑X.toPresheafedSpace))
state_after: case h.e'_3.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ nonZeroDivisors ↑Γ(X, U) = (hU.primeIdealOf ⟨genericPoint ↑↑X.toPresheafedSpace, ⋯⟩).asIdeal.primeCompl
tactic: convert hU.isLocalization_stalk ⟨genericPoint X, _⟩ using 1
state_before: case h.e'_3.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ nonZeroDivisors ↑Γ(X, U) = (hU.primeIdealOf ⟨genericPoint ↑↑X.toPresheafedSpace, ⋯⟩).asIdeal.primeCompl
state_after: case h.e'_3.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ nonZeroDivisors ↑Γ(X, U) = ⊥.asIdeal.primeCompl
tactic: rw [hU.primeIdealOf_genericPoint, genericPoint_eq_bot_of_affine]
state_before: case h.e'_3.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
⊢ nonZeroDivisors ↑Γ(X, U) = ⊥.asIdeal.primeCompl
state_after: case h.e'_3.h.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
x✝ : ↑Γ(X, U)
⊢ x✝ ∈ nonZeroDivisors ↑Γ(X, U) ↔ x✝ ∈ ⊥.asIdeal.primeCompl
tactic: ext
state_before: case h.e'_3.h.h
X : Scheme
inst✝¹ : IsIntegral X
U : X.Opens
hU : IsAffineOpen U
inst✝ : Nonempty ↑↑(↑U).toPresheafedSpace
this✝ : IsAffine ↑U
this : IsIntegral ↑U
x✝ : ↑Γ(X, U)
⊢ x✝ ∈ nonZeroDivisors ↑Γ(X, U) ↔ x✝ ∈ ⊥.asIdeal.primeCompl
state_after: no goals
tactic: exact mem_nonZeroDivisors_iff_ne_zero