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

tactic: haveI : IsAffine _ := hU
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this : IsAffine (X.restrict ⋯)
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField

tactic: haveI : Nonempty (X ∣_ᵤ U) := hU'
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this : IsAffine (X.restrict ⋯)
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField

tactic: haveI : IsIntegral (X ∣_ᵤ U) :=
  @isIntegral_of_isAffine_of_isDomain _ _ _
    (by dsimp; rw [Opens.openEmbedding_obj_top]; infer_instance)
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField

tactic: delta IsFractionRing Scheme.functionField
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ IsFractionRing ↑Γ(X, U) ↑X.functionField
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ IsLocalization (nonZeroDivisors ↑Γ(X, U)) ↑(X.presheaf.stalk (genericPoint ↑↑X.toPresheafedSpace))

tactic: convert hU.isLocalization_stalk ⟨genericPoint X, _⟩ using 1
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ IsLocalization (nonZeroDivisors ↑Γ(X, U)) ↑(X.presheaf.stalk (genericPoint ↑↑X.toPresheafedSpace))
state_after: case h.e'_3.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ nonZeroDivisors ↑Γ(X, U) = (hU.primeIdealOf ⟨genericPoint ↑↑X.toPresheafedSpace, ⋯⟩).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 : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ nonZeroDivisors ↑Γ(X, U) = (hU.primeIdealOf ⟨genericPoint ↑↑X.toPresheafedSpace, ⋯⟩).asIdeal.primeCompl
state_after: case h.e'_3.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ nonZeroDivisors ↑Γ(X, U) = ⊥.asIdeal.primeCompl

tactic: ext
state_before: case h.e'_3.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
⊢ nonZeroDivisors ↑Γ(X, U) = ⊥.asIdeal.primeCompl
state_after: case h.e'_3.h.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
x✝ : ↑Γ(X, U)
⊢ x✝ ∈ nonZeroDivisors ↑Γ(X, U) ↔ x✝ ∈ ⊥.asIdeal.primeCompl

tactic: exact mem_nonZeroDivisors_iff_ne_zero
state_before: case h.e'_3.h.h
X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝¹ : IsAffine (X.restrict ⋯)
this✝ : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
this : IsIntegral (X ∣_ᵤ U)
x✝ : ↑Γ(X, U)
⊢ x✝ ∈ nonZeroDivisors ↑Γ(X, U) ↔ x✝ ∈ ⊥.asIdeal.primeCompl
state_after: no goals

tactic: dsimp
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsDomain ↑Γ(X ∣_ᵤ U, ⊤)
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsDomain ↑Γ(X, ⋯.functor.obj ⊤)

tactic: rw [Opens.openEmbedding_obj_top]
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsDomain ↑Γ(X, ⋯.functor.obj ⊤)
state_after: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsDomain ↑Γ(X, U)

tactic: infer_instance
state_before: X : Scheme
inst✝ : IsIntegral X
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
hU' : Nonempty ↥U
this✝ : IsAffine (X.restrict ⋯)
this : Nonempty ↑↑(X ∣_ᵤ U).toPresheafedSpace
⊢ IsDomain ↑Γ(X, U)
state_after: no goals