File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecFun
code: /-- The canonical map from the underlying set to the prime spectrum of `Γ(X)`. -/
def toΓSpecFun : X → PrimeSpectrum (Γ.obj (op X)) 
goal: ↑X.toTopCat → PrimeSpectrum ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))

full_name: AlgebraicGeometry.LocallyRingedSpace.not_mem_prime_iff_unit_in_stalk
code: theorem not_mem_prime_iff_unit_in_stalk (r : Γ.obj (op X)) (x : X) :
    r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit (X.presheaf.Γgerm x r) 
goal: r ∉ (X.toΓSpecFun x).asIdeal ↔ IsUnit ((X.presheaf.Γgerm x) r)

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpec_preimage_basicOpen_eq
code: /-- The preimage of a basic open in `Spec Γ(X)` under the unit is the basic
open in `X` defined by the same element (they are equal as sets). -/
theorem toΓSpec_preimage_basicOpen_eq (r : Γ.obj (op X)) :
    X.toΓSpecFun ⁻¹' (basicOpen r).1 = (X.toRingedSpace.basicOpen r).1 
goal: X.toΓSpecFun ⁻¹' (PrimeSpectrum.basicOpen r).carrier = (X.toRingedSpace.basicOpen r).carrier

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpec_continuous
code: /-- `toΓSpecFun` is continuous. -/
theorem toΓSpec_continuous : Continuous X.toΓSpecFun 
goal: Continuous X.toΓSpecFun

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecBase
code: /-- The canonical (bundled) continuous map from the underlying topological
space of `X` to the prime spectrum of its global sections. -/
@[simps]
def toΓSpecBase : X.toTopCat ⟶ Spec.topObj (Γ.obj (op X)) 
goal: X.toTopCat ⟶ AlgebraicGeometry.Spec.topObj (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecBase_apply
code: /-- The canonical (bundled) continuous map from the underlying topological
space of `X` to the prime spectrum of its global sections. -/
@[simps]
def toΓSpecBase : X.toTopCat ⟶ Spec.topObj (Γ.obj (op X)) 
goal: ∀ (a : ↑X.toTopCat), X.toΓSpecBase a = X.toΓSpecFun a

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecMapBasicOpen
code: /-- The preimage in `X` of a basic open in `Spec Γ(X)` (as an open set). -/
abbrev toΓSpecMapBasicOpen : Opens X 
goal: TopologicalSpace.Opens ↑X.toTopCat

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecMapBasicOpen_eq
code: /-- The preimage is the basic open in `X` defined by the same element `r`. -/
theorem toΓSpecMapBasicOpen_eq : X.toΓSpecMapBasicOpen r = X.toRingedSpace.basicOpen r 
goal: X.toΓSpecMapBasicOpen r = X.toRingedSpace.basicOpen r

full_name: AlgebraicGeometry.LocallyRingedSpace.toToΓSpecMapBasicOpen
code: /-- The map from the global sections `Γ(X)` to the sections on the (preimage of) a basic open. -/
abbrev toToΓSpecMapBasicOpen :
    X.presheaf.obj (op ⊤) ⟶ X.presheaf.obj (op <| X.toΓSpecMapBasicOpen r) 
goal: X.presheaf.obj (Opposite.op ⊤) ⟶ X.presheaf.obj (Opposite.op (X.toΓSpecMapBasicOpen r))

full_name: AlgebraicGeometry.LocallyRingedSpace.isUnit_res_toΓSpecMapBasicOpen
code: /-- `r` is a unit as a section on the basic open defined by `r`. -/
theorem isUnit_res_toΓSpecMapBasicOpen : IsUnit (X.toToΓSpecMapBasicOpen r r) 
goal: IsUnit ((X.toToΓSpecMapBasicOpen r) r)

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCApp
code: /-- Define the sheaf hom on individual basic opens for the unit. -/
def toΓSpecCApp :
    (structureSheaf <| Γ.obj <| op X).val.obj (op <| basicOpen r) ⟶
      X.presheaf.obj (op <| X.toΓSpecMapBasicOpen r) 
goal: (AlgebraicGeometry.Spec.structureSheaf ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))).val.obj
    (Opposite.op (PrimeSpectrum.basicOpen r)) ⟶
  X.presheaf.obj (Opposite.op (X.toΓSpecMapBasicOpen r))

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCApp_iff
code: /-- Characterization of the sheaf hom on basic opens,
    direction ← (next lemma) is used at various places, but → is not used in this file. -/
theorem toΓSpecCApp_iff
    (f :
      (structureSheaf <| Γ.obj <| op X).val.obj (op <| basicOpen r) ⟶
        X.presheaf.obj (op <| X.toΓSpecMapBasicOpen r)) :
    toOpen _ (basicOpen r) ≫ f = X.toToΓSpecMapBasicOpen r ↔ f = X.toΓSpecCApp r 
goal: CategoryTheory.CategoryStruct.comp
      (AlgebraicGeometry.StructureSheaf.toOpen (↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
        (PrimeSpectrum.basicOpen r))
      f =
    X.toToΓSpecMapBasicOpen r ↔
  f = X.toΓSpecCApp r

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCApp_spec
code: theorem toΓSpecCApp_spec : toOpen _ (basicOpen r) ≫ X.toΓSpecCApp r = X.toToΓSpecMapBasicOpen r 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toOpen (↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
      (PrimeSpectrum.basicOpen r))
    (X.toΓSpecCApp r) =
  X.toToΓSpecMapBasicOpen r

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCBasicOpens
code: /-- The sheaf hom on all basic opens, commuting with restrictions. -/
@[simps app]
def toΓSpecCBasicOpens :
    (inducedFunctor basicOpen).op ⋙ (structureSheaf (Γ.obj (op X))).1 ⟶
      (inducedFunctor basicOpen).op ⋙ ((TopCat.Sheaf.pushforward _ X.toΓSpecBase).obj X.𝒪).1 
goal: (CategoryTheory.inducedFunctor PrimeSpectrum.basicOpen).op.comp
    (AlgebraicGeometry.Spec.structureSheaf ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))).val ⟶
  (CategoryTheory.inducedFunctor PrimeSpectrum.basicOpen).op.comp
    ((TopCat.Sheaf.pushforward CommRingCat X.toΓSpecBase).obj X.𝒪).val

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecCBasicOpens_app
code: /-- The sheaf hom on all basic opens, commuting with restrictions. -/
@[simps app]
def toΓSpecCBasicOpens :
    (inducedFunctor basicOpen).op ⋙ (structureSheaf (Γ.obj (op X))).1 ⟶
      (inducedFunctor basicOpen).op ⋙ ((TopCat.Sheaf.pushforward _ X.toΓSpecBase).obj X.𝒪).1 
goal: X.toΓSpecCBasicOpens.app r = X.toΓSpecCApp (Opposite.unop r)

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecSheafedSpace_base
code: /-- The canonical morphism of sheafed spaces from `X` to the spectrum of its global sections. -/
@[simps]
def toΓSpecSheafedSpace : X.toSheafedSpace ⟶ Spec.toSheafedSpace.obj (op (Γ.obj (op X))) 
goal: X.toΓSpecSheafedSpace.base = X.toΓSpecBase

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecSheafedSpace_c
code: /-- The canonical morphism of sheafed spaces from `X` to the spectrum of its global sections. -/
@[simps]
def toΓSpecSheafedSpace : X.toSheafedSpace ⟶ Spec.toSheafedSpace.obj (op (Γ.obj (op X))) 
goal: X.toΓSpecSheafedSpace.c =
  (TopCat.Sheaf.restrictHomEquivHom
      (AlgebraicGeometry.Spec.structureSheaf ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))).val
      ((TopCat.Sheaf.pushforward CommRingCat X.toΓSpecBase).obj X.𝒪) ⋯)
    X.toΓSpecCBasicOpens

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecSheafedSpace
code: /-- The canonical morphism of sheafed spaces from `X` to the spectrum of its global sections. -/
@[simps]
def toΓSpecSheafedSpace : X.toSheafedSpace ⟶ Spec.toSheafedSpace.obj (op (Γ.obj (op X))) 
goal: X.toSheafedSpace ⟶
  AlgebraicGeometry.Spec.toSheafedSpace.obj (Opposite.op (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecSheafedSpace_app_eq
code: theorem toΓSpecSheafedSpace_app_eq :
    X.toΓSpecSheafedSpace.c.app (op (basicOpen r)) = X.toΓSpecCApp r 
goal: X.toΓSpecSheafedSpace.c.app (Opposite.op (PrimeSpectrum.basicOpen r)) = X.toΓSpecCApp r

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpecSheafedSpace_app_spec
code: @[reassoc] theorem toΓSpecSheafedSpace_app_spec (r : Γ.obj (op X)) :
    toOpen (Γ.obj (op X)) (basicOpen r) ≫ X.toΓSpecSheafedSpace.c.app (op (basicOpen r)) =
      X.toToΓSpecMapBasicOpen r 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toOpen (↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
      (PrimeSpectrum.basicOpen r))
    (X.toΓSpecSheafedSpace.c.app (Opposite.op (PrimeSpectrum.basicOpen r))) =
  X.toToΓSpecMapBasicOpen r

full_name: AlgebraicGeometry.LocallyRingedSpace.toStalk_stalkMap_toΓSpec
code: /-- The map on stalks induced by the unit commutes with maps from `Γ(X)` to
    stalks (in `Spec Γ(X)` and in `X`). -/
theorem toStalk_stalkMap_toΓSpec (x : X) :
    toStalk _ _ ≫ X.toΓSpecSheafedSpace.stalkMap x = X.presheaf.Γgerm x 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toStalk
      (↑(Opposite.unop (Opposite.op (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))))
      (X.toΓSpecSheafedSpace.base x))
    (AlgebraicGeometry.PresheafedSpace.Hom.stalkMap X.toΓSpecSheafedSpace x) =
  X.presheaf.Γgerm x

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpec
code: /-- The canonical morphism from `X` to the spectrum of its global sections. -/
@[simps! val_base]
def toΓSpec : X ⟶ Spec.locallyRingedSpaceObj (Γ.obj (op X)) 
goal: X ⟶ AlgebraicGeometry.Spec.locallyRingedSpaceObj (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpec_val_base
code: /-- The canonical morphism from `X` to the spectrum of its global sections. -/
@[simps! val_base]
def toΓSpec : X ⟶ Spec.locallyRingedSpaceObj (Γ.obj (op X)) 
goal: X.toΓSpec.val.base = X.toΓSpecBase

full_name: AlgebraicGeometry.LocallyRingedSpace.toΓSpec_preimage_zeroLocus_eq
code: /-- On a locally ringed space `X`, the preimage of the zero locus of the prime spectrum
of `Γ(X, ⊤)` under `toΓSpec` agrees with the associated zero locus on `X`. -/
lemma toΓSpec_preimage_zeroLocus_eq {X : LocallyRingedSpace.{u}}
    (s : Set (X.presheaf.obj (op ⊤))) :
    X.toΓSpec.val.base ⁻¹' PrimeSpectrum.zeroLocus s = X.toRingedSpace.zeroLocus s 
goal: ⇑X.toΓSpec.val.base ⁻¹' PrimeSpectrum.zeroLocus s = X.toRingedSpace.zeroLocus s

full_name: AlgebraicGeometry.LocallyRingedSpace.comp_ring_hom_ext
code: theorem comp_ring_hom_ext {X : LocallyRingedSpace.{u}} {R : CommRingCat.{u}} {f : R ⟶ Γ.obj (op X)}
    {β : X ⟶ Spec.locallyRingedSpaceObj R}
    (w : X.toΓSpec.1.base ≫ (Spec.locallyRingedSpaceMap f).1.base = β.1.base)
    (h :
      ∀ r : R,
        f ≫ X.presheaf.map (homOfLE le_top : (Opens.map β.1.base).obj (basicOpen r) ⟶ _).op =
          toOpen R (basicOpen r) ≫ β.1.c.app (op (basicOpen r))) :
    X.toΓSpec ≫ Spec.locallyRingedSpaceMap f = β 
goal: CategoryTheory.CategoryStruct.comp X.toΓSpec (AlgebraicGeometry.Spec.locallyRingedSpaceMap f) = β

full_name: AlgebraicGeometry.LocallyRingedSpace.Γ_Spec_left_triangle
code: /-- `toSpecΓ _` is an isomorphism so these are mutually two-sided inverses. -/
theorem Γ_Spec_left_triangle : toSpecΓ (Γ.obj (op X)) ≫ X.toΓSpec.1.c.app (op ⊤) = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.toSpecΓ (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
    (X.toΓSpec.val.c.app (Opposite.op ⊤)) =
  CategoryTheory.CategoryStruct.id (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X))

full_name: AlgebraicGeometry.identityToΓSpec
code: /-- The unit as a natural transformation. -/
def identityToΓSpec : 𝟭 LocallyRingedSpace.{u} ⟶ Γ.rightOp ⋙ Spec.toLocallyRingedSpace 
goal: CategoryTheory.Functor.id AlgebraicGeometry.LocallyRingedSpace ⟶
  AlgebraicGeometry.LocallyRingedSpace.Γ.rightOp.comp AlgebraicGeometry.Spec.toLocallyRingedSpace

full_name: AlgebraicGeometry.ΓSpec.left_triangle
code: theorem left_triangle (X : LocallyRingedSpace) :
    SpecΓIdentity.inv.app (Γ.obj (op X)) ≫ (identityToΓSpec.app X).val.c.app (op ⊤) = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.LocallyRingedSpace.SpecΓIdentity.inv.app
      (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
    ((AlgebraicGeometry.identityToΓSpec.app X).val.c.app (Opposite.op ⊤)) =
  CategoryTheory.CategoryStruct.id
    ((CategoryTheory.Functor.id CommRingCat).obj (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))

full_name: AlgebraicGeometry.ΓSpec.right_triangle
code: /-- `SpecΓIdentity` is iso so these are mutually two-sided inverses. -/
theorem right_triangle (R : CommRingCat) :
    identityToΓSpec.app (Spec.toLocallyRingedSpace.obj <| op R) ≫
        Spec.toLocallyRingedSpace.map (SpecΓIdentity.inv.app R).op =
      𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.identityToΓSpec.app (AlgebraicGeometry.Spec.toLocallyRingedSpace.obj (Opposite.op R)))
    (AlgebraicGeometry.Spec.toLocallyRingedSpace.map
      (AlgebraicGeometry.LocallyRingedSpace.SpecΓIdentity.inv.app R).op) =
  CategoryTheory.CategoryStruct.id
    ((CategoryTheory.Functor.id AlgebraicGeometry.LocallyRingedSpace).obj
      (AlgebraicGeometry.Spec.toLocallyRingedSpace.obj (Opposite.op R)))

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction
code: /-- The adjunction `Γ ⊣ Spec` from `CommRingᵒᵖ` to `LocallyRingedSpace`. -/
-- Porting note: `simps` cause a time out, so `Unit` and `counit` will be added manually
def locallyRingedSpaceAdjunction : Γ.rightOp ⊣ Spec.toLocallyRingedSpace.{u} 
goal: AlgebraicGeometry.LocallyRingedSpace.Γ.rightOp ⊣ AlgebraicGeometry.Spec.toLocallyRingedSpace

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_unit
code: lemma locallyRingedSpaceAdjunction_unit :
    locallyRingedSpaceAdjunction.unit = identityToΓSpec 
goal: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.unit = AlgebraicGeometry.identityToΓSpec

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_counit
code: lemma locallyRingedSpaceAdjunction_counit :
    locallyRingedSpaceAdjunction.counit = (NatIso.op SpecΓIdentity.{u}).inv 
goal: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.counit =
  (CategoryTheory.NatIso.op AlgebraicGeometry.LocallyRingedSpace.SpecΓIdentity).inv

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_counit_app
code: @[simp]
lemma locallyRingedSpaceAdjunction_counit_app (R : CommRingCatᵒᵖ) :
    locallyRingedSpaceAdjunction.counit.app R =
      (toOpen R.unop ⊤).op 
goal: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.counit.app R =
  (AlgebraicGeometry.StructureSheaf.toOpen ↑(Opposite.unop R) ⊤).op

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_counit_app'
code: @[simp]
lemma locallyRingedSpaceAdjunction_counit_app' (R : Type u) [CommRing R] :
    locallyRingedSpaceAdjunction.counit.app (op <| CommRingCat.of R) =
      (toOpen R ⊤).op 
goal: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.counit.app (Opposite.op (CommRingCat.of R)) =
  (AlgebraicGeometry.StructureSheaf.toOpen R ⊤).op

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_homEquiv_apply
code: lemma locallyRingedSpaceAdjunction_homEquiv_apply
    {X : LocallyRingedSpace} {R : CommRingCatᵒᵖ}
    (f : Γ.rightOp.obj X ⟶ R) :
    locallyRingedSpaceAdjunction.homEquiv X R f =
      identityToΓSpec.app X ≫ Spec.locallyRingedSpaceMap f.unop 
goal: (AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X R) f =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.identityToΓSpec.app X)
    (AlgebraicGeometry.Spec.locallyRingedSpaceMap f.unop)

full_name: AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction_homEquiv_apply'
code: lemma locallyRingedSpaceAdjunction_homEquiv_apply'
    {X : LocallyRingedSpace} {R : Type u} [CommRing R]
    (f : CommRingCat.of R ⟶ Γ.obj <| op X) :
    locallyRingedSpaceAdjunction.homEquiv X (op <| CommRingCat.of R) (op f) =
      identityToΓSpec.app X ≫ Spec.locallyRingedSpaceMap f 
goal: (AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X (Opposite.op (CommRingCat.of R))) (Opposite.op f) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.identityToΓSpec.app X)
    (AlgebraicGeometry.Spec.locallyRingedSpaceMap f)

full_name: AlgebraicGeometry.ΓSpec.toOpen_comp_locallyRingedSpaceAdjunction_homEquiv_app
code: lemma toOpen_comp_locallyRingedSpaceAdjunction_homEquiv_app
    {X : LocallyRingedSpace} {R : Type u} [CommRing R]
    (f : Γ.rightOp.obj X ⟶ op (CommRingCat.of R)) (U) :
    StructureSheaf.toOpen R U.unop ≫
      (locallyRingedSpaceAdjunction.homEquiv X (op <| CommRingCat.of R) f).1.c.app U =
    f.unop ≫ X.presheaf.map (homOfLE le_top).op 
goal: CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.StructureSheaf.toOpen R (Opposite.unop U))
    (((AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X (Opposite.op (CommRingCat.of R))) f).val.c.app
      U) =
  CategoryTheory.CategoryStruct.comp f.unop (X.presheaf.map (CategoryTheory.homOfLE ⋯).op)

full_name: AlgebraicGeometry.ΓSpec.adjunction
code: /-- The adjunction `Γ ⊣ Spec` from `CommRingᵒᵖ` to `Scheme`. -/
def adjunction : Scheme.Γ.rightOp ⊣ Scheme.Spec.{u} 
goal: AlgebraicGeometry.Scheme.Γ.rightOp ⊣ AlgebraicGeometry.Scheme.Spec

full_name: AlgebraicGeometry.ΓSpec.adjunction_homEquiv_apply
code: theorem adjunction_homEquiv_apply {X : Scheme} {R : CommRingCatᵒᵖ}
    (f : (op <| Scheme.Γ.obj <| op X) ⟶ R) :
    ΓSpec.adjunction.homEquiv X R f = locallyRingedSpaceAdjunction.homEquiv X.1 R f 
goal: (AlgebraicGeometry.ΓSpec.adjunction.homEquiv X R) f =
  (AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X.toLocallyRingedSpace R) f

full_name: AlgebraicGeometry.ΓSpec.adjunction_homEquiv
code: theorem adjunction_homEquiv (X : Scheme) (R : CommRingCatᵒᵖ) :
    ΓSpec.adjunction.homEquiv X R = locallyRingedSpaceAdjunction.homEquiv X.1 R 
goal: AlgebraicGeometry.ΓSpec.adjunction.homEquiv X R =
  AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X.toLocallyRingedSpace R

full_name: AlgebraicGeometry.ΓSpec.adjunction_homEquiv_symm_apply
code: theorem adjunction_homEquiv_symm_apply {X : Scheme} {R : CommRingCatᵒᵖ}
    (f : X ⟶ Scheme.Spec.obj R) :
    (ΓSpec.adjunction.homEquiv X R).symm f =
      (locallyRingedSpaceAdjunction.homEquiv X.1 R).symm f 
goal: (AlgebraicGeometry.ΓSpec.adjunction.homEquiv X R).symm f =
  (AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.homEquiv X.toLocallyRingedSpace R).symm f

full_name: AlgebraicGeometry.ΓSpec.adjunction_counit_app'
code: theorem adjunction_counit_app' {R : CommRingCatᵒᵖ} :
    ΓSpec.adjunction.counit.app R = locallyRingedSpaceAdjunction.counit.app R 
goal: AlgebraicGeometry.ΓSpec.adjunction.counit.app R = AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.counit.app R

full_name: AlgebraicGeometry.ΓSpec.adjunction_counit_app
code: @[simp]
theorem adjunction_counit_app {R : CommRingCatᵒᵖ} :
    ΓSpec.adjunction.counit.app R = (Scheme.ΓSpecIso (unop R)).inv.op 
goal: AlgebraicGeometry.ΓSpec.adjunction.counit.app R = (AlgebraicGeometry.Scheme.ΓSpecIso (Opposite.unop R)).inv.op

full_name: AlgebraicGeometry.ΓSpec.adjunction_unit_app
code: theorem adjunction_unit_app {X : Scheme} :
    ΓSpec.adjunction.unit.app X = locallyRingedSpaceAdjunction.unit.app X.1 
goal: AlgebraicGeometry.ΓSpec.adjunction.unit.app X =
  AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.unit.app X.toLocallyRingedSpace

full_name: AlgebraicGeometry.ΓSpec.adjunction_unit_naturality
code: @[reassoc (attr := simp)]
theorem adjunction_unit_naturality {X Y : Scheme.{u}} (f : X ⟶ Y) :
    f ≫ ΓSpec.adjunction.unit.app Y = ΓSpec.adjunction.unit.app X ≫ Spec.map (f.app ⊤) 
goal: CategoryTheory.CategoryStruct.comp f (AlgebraicGeometry.ΓSpec.adjunction.unit.app Y) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.ΓSpec.adjunction.unit.app X)
    (AlgebraicGeometry.Spec.map (AlgebraicGeometry.Scheme.Hom.app f ⊤))

full_name: AlgebraicGeometry.ΓSpec.isIso_locallyRingedSpaceAdjunction_counit
code: instance isIso_locallyRingedSpaceAdjunction_counit :
    IsIso.{u + 1, u + 1} locallyRingedSpaceAdjunction.counit 
goal: CategoryTheory.IsIso AlgebraicGeometry.ΓSpec.locallyRingedSpaceAdjunction.counit

full_name: AlgebraicGeometry.ΓSpec.isIso_adjunction_counit
code: instance isIso_adjunction_counit : IsIso ΓSpec.adjunction.counit 
goal: CategoryTheory.IsIso AlgebraicGeometry.ΓSpec.adjunction.counit

full_name: AlgebraicGeometry.ΓSpec.adjunction_unit_app_app_top
code: @[simp]
theorem adjunction_unit_app_app_top (X : Scheme.{u}) :
    (ΓSpec.adjunction.unit.app X).app ⊤ = (Scheme.ΓSpecIso Γ(X, ⊤)).hom 
goal: AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.ΓSpec.adjunction.unit.app X) ⊤ =
  (AlgebraicGeometry.Scheme.ΓSpecIso (X.presheaf.obj (Opposite.op ⊤))).hom

full_name: AlgebraicGeometry.ΓSpec.SpecMap_ΓSpecIso_hom
code: @[simp]
theorem SpecMap_ΓSpecIso_hom (R : CommRingCat.{u}) :
    Spec.map ((Scheme.ΓSpecIso R).hom) = adjunction.unit.app (Spec R) 
goal: AlgebraicGeometry.Spec.map (AlgebraicGeometry.Scheme.ΓSpecIso R).hom =
  AlgebraicGeometry.ΓSpec.adjunction.unit.app (AlgebraicGeometry.Spec R)

full_name: AlgebraicGeometry.ΓSpec.adjunction_unit_map_basicOpen
code: lemma adjunction_unit_map_basicOpen (X : Scheme.{u}) (r : Γ(X, ⊤)) :
    (ΓSpec.adjunction.unit.app X ⁻¹ᵁ (PrimeSpectrum.basicOpen r)) = X.basicOpen r 
goal: (TopologicalSpace.Opens.map (AlgebraicGeometry.ΓSpec.adjunction.unit.app X).val.base).obj (PrimeSpectrum.basicOpen r) =
  X.basicOpen r

full_name: AlgebraicGeometry.ΓSpec.toOpen_unit_app_val_c_app
code: theorem toOpen_unit_app_val_c_app {X : Scheme.{u}} (U) :
    StructureSheaf.toOpen _ _ ≫ (ΓSpec.adjunction.unit.app X).val.c.app U =
      X.presheaf.map (homOfLE (by exact le_top)).op 
goal: CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toOpen (↑(Opposite.unop (AlgebraicGeometry.Scheme.Γ.rightOp.obj X)))
      (Opposite.unop U))
    ((AlgebraicGeometry.ΓSpec.adjunction.unit.app X).val.c.app U) =
  X.presheaf.map (CategoryTheory.homOfLE ⋯).op

full_name: AlgebraicGeometry.ΓSpec.toOpen_unit_app_val_c_app'
code: @[reassoc (attr := simp)]
theorem toOpen_unit_app_val_c_app' {X : Scheme.{u}} (U : Opens (PrimeSpectrum Γ(X, ⊤))) :
    toOpen Γ(X, ⊤) U ≫ (adjunction.unit.app X).app U =
      X.presheaf.map (homOfLE (by exact le_top)).op 
goal: CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.StructureSheaf.toOpen (↑(X.presheaf.obj (Opposite.op ⊤))) U)
    (AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.ΓSpec.adjunction.unit.app X) U) =
  X.presheaf.map (CategoryTheory.homOfLE ⋯).op

full_name: AlgebraicGeometry.ΓSpecIso_obj_hom
code: theorem ΓSpecIso_obj_hom {X : Scheme.{u}} (U : X.Opens) :
    (Scheme.ΓSpecIso Γ(X, U)).hom = (Spec.map U.topIso.inv).app ⊤ ≫
      (ΓSpec.adjunction.unit.app U).app ⊤ ≫ U.topIso.hom 
goal: (AlgebraicGeometry.Scheme.ΓSpecIso (X.presheaf.obj (Opposite.op U))).hom =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.Spec.map U.topIso.inv) ⊤)
    (CategoryTheory.CategoryStruct.comp
      (AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.ΓSpec.adjunction.unit.app ↑U) ⊤) U.topIso.hom)

full_name: AlgebraicGeometry.instPreservesLimitsOppositeCommRingCatLocallyRingedSpaceToLocallyRingedSpace
code: /-- Spec preserves limits. -/
instance : Limits.PreservesLimits Spec.toLocallyRingedSpace 
goal: CategoryTheory.Limits.PreservesLimits AlgebraicGeometry.Spec.toLocallyRingedSpace

full_name: AlgebraicGeometry.Spec.preservesLimits
code: instance Spec.preservesLimits : Limits.PreservesLimits Scheme.Spec 
goal: CategoryTheory.Limits.PreservesLimits AlgebraicGeometry.Scheme.Spec

full_name: AlgebraicGeometry.Spec.fullyFaithfulToLocallyRingedSpace
code: /-- The functor `Spec.toLocallyRingedSpace : CommRingCatᵒᵖ ⥤ LocallyRingedSpace`
is fully faithful.-/
def Spec.fullyFaithfulToLocallyRingedSpace : Spec.toLocallyRingedSpace.FullyFaithful 
goal: AlgebraicGeometry.Spec.toLocallyRingedSpace.FullyFaithful

full_name: AlgebraicGeometry.instFullOppositeCommRingCatLocallyRingedSpaceToLocallyRingedSpace
code: /-- Spec is a full functor. -/
instance : Spec.toLocallyRingedSpace.Full 
goal: AlgebraicGeometry.Spec.toLocallyRingedSpace.Full

full_name: AlgebraicGeometry.instFaithfulOppositeCommRingCatLocallyRingedSpaceToLocallyRingedSpace
code: /-- Spec is a faithful functor. -/
instance : Spec.toLocallyRingedSpace.Faithful 
goal: AlgebraicGeometry.Spec.toLocallyRingedSpace.Faithful

full_name: AlgebraicGeometry.Spec.fullyFaithful
code: /-- The functor `Spec : CommRingCatᵒᵖ ⥤ Scheme` is fully faithful.-/
def Spec.fullyFaithful : Scheme.Spec.FullyFaithful 
goal: AlgebraicGeometry.Scheme.Spec.FullyFaithful

full_name: AlgebraicGeometry.Spec.full
code: /-- Spec is a full functor. -/
instance Spec.full : Scheme.Spec.Full 
goal: AlgebraicGeometry.Scheme.Spec.Full

full_name: AlgebraicGeometry.Spec.faithful
code: /-- Spec is a faithful functor. -/
instance Spec.faithful : Scheme.Spec.Faithful 
goal: AlgebraicGeometry.Scheme.Spec.Faithful

full_name: AlgebraicGeometry.Spec.map_inj
code: lemma Spec.map_inj : Spec.map φ = Spec.map ψ ↔ φ = ψ 
goal: AlgebraicGeometry.Spec.map φ = AlgebraicGeometry.Spec.map ψ ↔ φ = ψ

full_name: AlgebraicGeometry.Spec.map_injective
code: lemma Spec.map_injective {R S : CommRingCat} : Function.Injective (Spec.map : (R ⟶ S) → _) 
goal: Function.Injective AlgebraicGeometry.Spec.map

full_name: AlgebraicGeometry.Spec.preimage
code: /-- The preimage under Spec. -/
def Spec.preimage : R ⟶ S 
goal: R ⟶ S

full_name: AlgebraicGeometry.Spec.map_preimage
code: @[simp] lemma Spec.map_preimage : Spec.map (Spec.preimage f) = f 
goal: AlgebraicGeometry.Spec.map (AlgebraicGeometry.Spec.preimage f) = f

full_name: AlgebraicGeometry.Spec.preimage_map
code: @[simp] lemma Spec.preimage_map : Spec.preimage (Spec.map φ) = φ 
goal: AlgebraicGeometry.Spec.preimage (AlgebraicGeometry.Spec.map φ) = φ

full_name: AlgebraicGeometry.Spec.homEquiv
code: /-- Spec is fully faithful -/
@[simps]
def Spec.homEquiv {R S : CommRingCat} : (Spec S ⟶ Spec R) ≃ (R ⟶ S) 
goal: (AlgebraicGeometry.Spec S ⟶ AlgebraicGeometry.Spec R) ≃ (R ⟶ S)

full_name: AlgebraicGeometry.Spec.homEquiv_symm_apply
code: /-- Spec is fully faithful -/
@[simps]
def Spec.homEquiv {R S : CommRingCat} : (Spec S ⟶ Spec R) ≃ (R ⟶ S) 
goal: AlgebraicGeometry.Spec.homEquiv.symm f = AlgebraicGeometry.Spec.map f

full_name: AlgebraicGeometry.Spec.homEquiv_apply
code: /-- Spec is fully faithful -/
@[simps]
def Spec.homEquiv {R S : CommRingCat} : (Spec S ⟶ Spec R) ≃ (R ⟶ S) 
goal: AlgebraicGeometry.Spec.homEquiv f = AlgebraicGeometry.Spec.preimage f

full_name: AlgebraicGeometry.instIsRightAdjointLocallyRingedSpaceOppositeCommRingCatToLocallyRingedSpace
code: instance : Spec.toLocallyRingedSpace.IsRightAdjoint 
goal: AlgebraicGeometry.Spec.toLocallyRingedSpace.IsRightAdjoint

full_name: AlgebraicGeometry.instIsRightAdjointSchemeOppositeCommRingCatSpec
code: instance : Scheme.Spec.IsRightAdjoint 
goal: AlgebraicGeometry.Scheme.Spec.IsRightAdjoint

full_name: AlgebraicGeometry.instReflectiveLocallyRingedSpaceOppositeCommRingCatToLocallyRingedSpace
code: instance : Reflective Spec.toLocallyRingedSpace 
goal: CategoryTheory.Reflective AlgebraicGeometry.Spec.toLocallyRingedSpace

full_name: AlgebraicGeometry.Spec.reflective
code: instance Spec.reflective : Reflective Scheme.Spec 
goal: CategoryTheory.Reflective AlgebraicGeometry.Scheme.Spec