File: Mathlib/AlgebraicGeometry/Scheme.lean

full_name: AlgebraicGeometry.Scheme.local_affine
code: /-- We define `Scheme` as an `X : LocallyRingedSpace`,
along with a proof that every point has an open neighbourhood `U`
so that the restriction of `X` to `U` is isomorphic,
as a locally ringed space, to `Spec.toLocallyRingedSpace.obj (op R)`
for some `R : CommRingCat`.
-/
structure Scheme extends LocallyRingedSpace where
  local_affine :
    ∀ x : toLocallyRingedSpace,
      ∃ (U : OpenNhds x) (R : CommRingCat),
        Nonempty
          (toLocallyRingedSpace.restrict U.openEmbedding ≅ Spec.toLocallyRingedSpace.obj (op R))
goal: ∃ U R, Nonempty (self.restrict ⋯ ≅ AlgebraicGeometry.Spec.toLocallyRingedSpace.obj (Opposite.op R))

full_name: AlgebraicGeometry.Scheme
code: /-- We define `Scheme` as an `X : LocallyRingedSpace`,
along with a proof that every point has an open neighbourhood `U`
so that the restriction of `X` to `U` is isomorphic,
as a locally ringed space, to `Spec.toLocallyRingedSpace.obj (op R)`
for some `R : CommRingCat`.
-/
structure Scheme extends LocallyRingedSpace where
  local_affine :
    ∀ x : toLocallyRingedSpace,
      ∃ (U : OpenNhds x) (R : CommRingCat),
        Nonempty
          (toLocallyRingedSpace.restrict U.openEmbedding ≅ Spec.toLocallyRingedSpace.obj (op R))
goal: Type (u_1 + 1)

full_name: AlgebraicGeometry.Scheme.instCoeSortType
code: instance : CoeSort Scheme Type* 
goal: CoeSort AlgebraicGeometry.Scheme (Type u_1)

full_name: AlgebraicGeometry.Scheme.Opens
code: /-- The type of open sets of a scheme. -/
abbrev Opens (X : Scheme) : Type* 
goal: Type u_1

full_name: AlgebraicGeometry.Scheme.Hom
code: /-- A morphism between schemes is a morphism between the underlying locally ringed spaces. -/
-- @[nolint has_nonempty_instance] -- Porting note(#5171): linter not ported yet
def Hom (X Y : Scheme) : Type* 
goal: Type u_1

full_name: AlgebraicGeometry.Scheme.instCategory
code: /-- Schemes are a full subcategory of locally ringed spaces.
-/
instance : Category Scheme 
goal: CategoryTheory.Category.{u_1, u_1 + 1} AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.«_aux_Mathlib_AlgebraicGeometry_Scheme___macroRules_AlgebraicGeometry_term_⁻¹ᵁ__1»
code: /-- `f ⁻¹ᵁ U` is notation for `(Opens.map f.1.base).obj U`,
  the preimage of an open set `U` under `f`. -/
scoped[AlgebraicGeometry] notation3:90 f:91 " ⁻¹ᵁ " U:90 =>
  @Prefunctor.obj (Scheme.Opens _) _ (Scheme.Opens _) _
    (Opens.map (f : LocallyRingedSpace.Hom _ _).val.base).toPrefunctor U
goal: Lean.Macro

full_name: AlgebraicGeometry.«_aux_Mathlib_AlgebraicGeometry_Scheme___macroRules_AlgebraicGeometry_termΓ(_,_)_1»
code: /-- `Γ(X, U)` is notation for `X.presheaf.obj (op U)`. -/
scoped[AlgebraicGeometry] notation3 "Γ(" X ", " U ")" =>
  (PresheafedSpace.presheaf (SheafedSpace.toPresheafedSpace
    (LocallyRingedSpace.toSheafedSpace (Scheme.toLocallyRingedSpace X)))).obj
    (op (α := Scheme.Opens _) U)
goal: Lean.Macro

full_name: AlgebraicGeometry.Scheme.instSubsingletonαCommRingObjOppositeOpensTopologicalSpaceCarrierCommRingCatPresheafOpOpensBot
code: instance {X : Scheme.{u}} : Subsingleton Γ(X, ⊥) 
goal: Subsingleton ↑(X.presheaf.obj (Opposite.op ⊥))

full_name: AlgebraicGeometry.Scheme.Hom.continuous
code: @[continuity, fun_prop]
lemma Hom.continuous {X Y : Scheme} (f : X ⟶ Y) : Continuous f.1.base 
goal: Continuous ⇑f.val.base

full_name: AlgebraicGeometry.Scheme.sheaf
code: /-- The structure sheaf of a scheme. -/
protected abbrev sheaf (X : Scheme) 
goal: TopCat.Sheaf CommRingCat ↑X.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.Hom.app
code: /-- Given a morphism of schemes `f : X ⟶ Y`, and open `U ⊆ Y`,
this is the induced map `Γ(Y, U) ⟶ Γ(X, f ⁻¹ᵁ U)`. -/
abbrev app (U : Y.Opens) : Γ(Y, U) ⟶ Γ(X, f ⁻¹ᵁ U) 
goal: Y.presheaf.obj (Opposite.op U) ⟶ X.presheaf.obj (Opposite.op ((TopologicalSpace.Opens.map f.val.base).obj U))

full_name: AlgebraicGeometry.Scheme.Hom.naturality
code: @[reassoc]
lemma naturality (i : op U' ⟶ op U) :
    Y.presheaf.map i ≫ f.app U = f.app U' ≫ X.presheaf.map ((Opens.map f.1.base).map i.unop).op 
goal: Y.presheaf.map i ≫ f.app U = f.app U' ≫ X.presheaf.map ((TopologicalSpace.Opens.map f.val.base).map i.unop).op

full_name: AlgebraicGeometry.Scheme.Hom.appLE
code: /-- Given a morphism of schemes `f : X ⟶ Y`, and open sets `U ⊆ Y`, `V ⊆ f ⁻¹' U`,
this is the induced map `Γ(Y, U) ⟶ Γ(X, V)`. -/
def appLE (U : Y.Opens) (V : X.Opens) (e : V ≤ f ⁻¹ᵁ U) : Γ(Y, U) ⟶ Γ(X, V) 
goal: Y.presheaf.obj (Opposite.op U) ⟶ X.presheaf.obj (Opposite.op V)

full_name: AlgebraicGeometry.Scheme.Hom.appLE_map
code: @[reassoc (attr := simp)]
lemma appLE_map (e : V ≤ f ⁻¹ᵁ U) (i : op V ⟶ op V') :
    f.appLE U V e ≫ X.presheaf.map i = f.appLE U V' (i.unop.le.trans e) 
goal: f.appLE U V e ≫ X.presheaf.map i = f.appLE U V' ⋯

full_name: AlgebraicGeometry.Scheme.Hom.appLE_map'
code: @[reassoc]
lemma appLE_map' (e : V ≤ f ⁻¹ᵁ U) (i : V = V') :
    f.appLE U V' (i ▸ e) ≫ X.presheaf.map (eqToHom i).op = f.appLE U V e 
goal: f.appLE U V' ⋯ ≫ X.presheaf.map (CategoryTheory.eqToHom i).op = f.appLE U V e

full_name: AlgebraicGeometry.Scheme.Hom.map_appLE
code: @[reassoc (attr := simp)]
lemma map_appLE (e : V ≤ f ⁻¹ᵁ U) (i : op U' ⟶ op U) :
    Y.presheaf.map i ≫ f.appLE U V e =
      f.appLE U' V (e.trans ((Opens.map f.1.base).map i.unop).le) 
goal: Y.presheaf.map i ≫ f.appLE U V e = f.appLE U' V ⋯

full_name: AlgebraicGeometry.Scheme.Hom.map_appLE'
code: @[reassoc]
lemma map_appLE' (e : V ≤ f ⁻¹ᵁ U) (i : U' = U) :
    Y.presheaf.map (eqToHom i).op ≫ f.appLE U' V (i ▸ e) = f.appLE U V e 
goal: Y.presheaf.map (CategoryTheory.eqToHom i).op ≫ f.appLE U' V ⋯ = f.appLE U V e

full_name: AlgebraicGeometry.Scheme.Hom.app_eq_appLE
code: lemma app_eq_appLE {U : Y.Opens} :
    f.app U = f.appLE U _ le_rfl 
goal: f.app U = f.appLE U ((TopologicalSpace.Opens.map f.val.base).obj U) ⋯

full_name: AlgebraicGeometry.Scheme.Hom.appLE_eq_app
code: lemma appLE_eq_app {U : Y.Opens} :
    f.appLE U (f ⁻¹ᵁ U) le_rfl = f.app U 
goal: f.appLE U ((TopologicalSpace.Opens.map f.val.base).obj U) ⋯ = f.app U

full_name: AlgebraicGeometry.Scheme.Hom.appLE_congr
code: lemma appLE_congr (e : V ≤ f ⁻¹ᵁ U) (e₁ : U = U') (e₂ : V = V')
    (P : ∀ {R S : Type u} [CommRing R] [CommRing S] (_ : R →+* S), Prop) :
    P (f.appLE U V e) ↔ P (f.appLE U' V' (e₁ ▸ e₂ ▸ e)) 
goal: P (f.appLE U V e) ↔ P (f.appLE U' V' ⋯)

full_name: AlgebraicGeometry.Scheme.Hom.homeomorph
code: /-- An isomorphism of schemes induces a homeomorphism of the underlying topological spaces. -/
noncomputable def homeomorph [IsIso f] : X ≃ₜ Y 
goal: ↑↑X.toPresheafedSpace ≃ₜ ↑↑Y.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.Hom.stalkMap
code: /-- A morphism of schemes `f : X ⟶ Y` induces a local ring homomorphis from `Y.presheaf.stalk (f x)`
to `X.presheaf.stalk x` for any `x : X`. -/
def stalkMap (x : X) : Y.presheaf.stalk (f.val.base x) ⟶ X.presheaf.stalk x 
goal: Y.presheaf.stalk (f.val.base x) ⟶ X.presheaf.stalk x

full_name: AlgebraicGeometry.Scheme.Hom.ext
code: @[ext]
protected lemma ext {f g : X ⟶ Y} (h_base : f.1.base = g.1.base)
    (h_app : ∀ U, f.app U ≫ X.presheaf.map
      (eqToHom congr((Opens.map $h_base.symm).obj U)).op = g.app U) : f = g 
goal: f = g

full_name: AlgebraicGeometry.Scheme.Hom.preimage_iSup
code: lemma preimage_iSup {ι} (U : ι → Opens Y) : f ⁻¹ᵁ iSup U = ⨆ i, f ⁻¹ᵁ U i 
goal: (TopologicalSpace.Opens.map f.val.base).obj (iSup U) = ⨆ i, (TopologicalSpace.Opens.map f.val.base).obj (U i)

full_name: AlgebraicGeometry.Scheme.Hom.preimage_iSup_eq_top
code: lemma preimage_iSup_eq_top {ι} {U : ι → Opens Y} (hU : iSup U = ⊤) :
    ⨆ i, f ⁻¹ᵁ U i = ⊤ 
goal: ⨆ i, (TopologicalSpace.Opens.map f.val.base).obj (U i) = ⊤

full_name: AlgebraicGeometry.Scheme.preimage_comp
code: @[simp]
lemma preimage_comp {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
    (f ≫ g) ⁻¹ᵁ U = f ⁻¹ᵁ g ⁻¹ᵁ U 
goal: (TopologicalSpace.Opens.map (f ≫ g).val.base).obj U =
  (TopologicalSpace.Opens.map f.val.base).obj ((TopologicalSpace.Opens.map g.val.base).obj U)

full_name: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace
code: /-- The forgetful functor from `Scheme` to `LocallyRingedSpace`. -/
@[simps!]
def forgetToLocallyRingedSpace : Scheme ⥤ LocallyRingedSpace 
goal: AlgebraicGeometry.Scheme ⥤ AlgebraicGeometry.LocallyRingedSpace

full_name: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace_map
code: /-- The forgetful functor from `Scheme` to `LocallyRingedSpace`. -/
@[simps!]
def forgetToLocallyRingedSpace : Scheme ⥤ LocallyRingedSpace 
goal: ∀
  {X Y :
    CategoryTheory.InducedCategory AlgebraicGeometry.LocallyRingedSpace AlgebraicGeometry.Scheme.toLocallyRingedSpace}
  (f : X ⟶ Y), AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.map f = f

full_name: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace_obj
code: /-- The forgetful functor from `Scheme` to `LocallyRingedSpace`. -/
@[simps!]
def forgetToLocallyRingedSpace : Scheme ⥤ LocallyRingedSpace 
goal: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.obj self = self.toLocallyRingedSpace

full_name: AlgebraicGeometry.Scheme.fullyFaithfulForgetToLocallyRingedSpace
code: /-- The forget functor `Scheme ⥤ LocallyRingedSpace` is fully faithful. -/
@[simps!]
def fullyFaithfulForgetToLocallyRingedSpace :
    forgetToLocallyRingedSpace.FullyFaithful 
goal: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.FullyFaithful

full_name: AlgebraicGeometry.Scheme.fullyFaithfulForgetToLocallyRingedSpace_preimage
code: /-- The forget functor `Scheme ⥤ LocallyRingedSpace` is fully faithful. -/
@[simps!]
def fullyFaithfulForgetToLocallyRingedSpace :
    forgetToLocallyRingedSpace.FullyFaithful 
goal: ∀
  {X Y :
    CategoryTheory.InducedCategory AlgebraicGeometry.LocallyRingedSpace AlgebraicGeometry.Scheme.toLocallyRingedSpace}
  (f :
    (CategoryTheory.inducedFunctor AlgebraicGeometry.Scheme.toLocallyRingedSpace).obj X ⟶
      (CategoryTheory.inducedFunctor AlgebraicGeometry.Scheme.toLocallyRingedSpace).obj Y),
  AlgebraicGeometry.Scheme.fullyFaithfulForgetToLocallyRingedSpace.preimage f = f

full_name: AlgebraicGeometry.Scheme.instFullLocallyRingedSpaceForgetToLocallyRingedSpace
code: instance : forgetToLocallyRingedSpace.Full 
goal: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.Full

full_name: AlgebraicGeometry.Scheme.instFaithfulLocallyRingedSpaceForgetToLocallyRingedSpace
code: instance : forgetToLocallyRingedSpace.Faithful 
goal: AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.Faithful

full_name: AlgebraicGeometry.Scheme.forgetToTop_map
code: /-- The forgetful functor from `Scheme` to `TopCat`. -/
@[simps!]
def forgetToTop : Scheme ⥤ TopCat 
goal: ∀ {X Y : AlgebraicGeometry.Scheme} (f : X ⟶ Y),
  AlgebraicGeometry.Scheme.forgetToTop.map f = (AlgebraicGeometry.SheafedSpace.forget CommRingCat).map f.val

full_name: AlgebraicGeometry.Scheme.forgetToTop
code: /-- The forgetful functor from `Scheme` to `TopCat`. -/
@[simps!]
def forgetToTop : Scheme ⥤ TopCat 
goal: AlgebraicGeometry.Scheme ⥤ TopCat

full_name: AlgebraicGeometry.Scheme.forgetToTop_obj
code: /-- The forgetful functor from `Scheme` to `TopCat`. -/
@[simps!]
def forgetToTop : Scheme ⥤ TopCat 
goal: AlgebraicGeometry.Scheme.forgetToTop.obj X = (AlgebraicGeometry.SheafedSpace.forget CommRingCat).obj X.toSheafedSpace

full_name: AlgebraicGeometry.Scheme.hasCoeToTopCat
code: instance hasCoeToTopCat : CoeOut Scheme TopCat 
goal: CoeOut AlgebraicGeometry.Scheme TopCat

full_name: AlgebraicGeometry.Scheme.forgetToTop_obj_eq_coe
code: /-- forgetful functor to `TopCat` is the same as coercion -/
unif_hint forgetToTop_obj_eq_coe (X : Scheme) where ⊢
  forgetToTop.obj X ≟ (X : TopCat)
goal: Prop

full_name: AlgebraicGeometry.Scheme.id_val_base
code: @[simp]
theorem id_val_base (X : Scheme) : (𝟙 X : _).1.base = 𝟙 _ 
goal: (𝟙 X).val.base = 𝟙 ↑X.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.id_app
code: @[simp]
theorem id_app {X : Scheme} (U : X.Opens) :
    (𝟙 X : _).app U = 𝟙 _ 
goal: AlgebraicGeometry.Scheme.Hom.app (𝟙 X) U = 𝟙 (X.presheaf.obj (Opposite.op U))

full_name: AlgebraicGeometry.Scheme.comp_val
code: @[reassoc]
theorem comp_val {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) : (f ≫ g).val = f.val ≫ g.val 
goal: (f ≫ g).val = f.val ≫ g.val

full_name: AlgebraicGeometry.Scheme.comp_coeBase
code: @[simp, reassoc] -- reassoc lemma does not need `simp`
theorem comp_coeBase {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).val.base = f.val.base ≫ g.val.base 
goal: (f ≫ g).val.base = f.val.base ≫ g.val.base

full_name: AlgebraicGeometry.Scheme.comp_val_base
code: @[reassoc]
theorem comp_val_base {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).val.base = f.val.base ≫ g.val.base 
goal: (f ≫ g).val.base = f.val.base ≫ g.val.base

full_name: AlgebraicGeometry.Scheme.comp_val_base_apply
code: theorem comp_val_base_apply {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) :
    (f ≫ g).val.base x = g.val.base (f.val.base x) 
goal: (f ≫ g).val.base x = g.val.base (f.val.base x)

full_name: AlgebraicGeometry.Scheme.comp_app
code: @[simp, reassoc] -- reassoc lemma does not need `simp`
theorem comp_app {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
    (f ≫ g).app U = g.app U ≫ f.app _ 
goal: AlgebraicGeometry.Scheme.Hom.app (f ≫ g) U =
  AlgebraicGeometry.Scheme.Hom.app g U ≫
    AlgebraicGeometry.Scheme.Hom.app f ((TopologicalSpace.Opens.map g.val.base).obj U)

full_name: AlgebraicGeometry.Scheme.appLE_comp_appLE
code: theorem appLE_comp_appLE {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U V W e₁ e₂) :
    g.appLE U V e₁ ≫ f.appLE V W e₂ =
      (f ≫ g).appLE U W (e₂.trans ((Opens.map f.1.base).map (homOfLE e₁)).le) 
goal: AlgebraicGeometry.Scheme.Hom.appLE g U V e₁ ≫ AlgebraicGeometry.Scheme.Hom.appLE f V W e₂ =
  AlgebraicGeometry.Scheme.Hom.appLE (f ≫ g) U W ⋯

full_name: AlgebraicGeometry.Scheme.comp_appLE
code: @[simp, reassoc] -- reassoc lemma does not need `simp`
theorem comp_appLE {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U V e) :
    (f ≫ g).appLE U V e = g.app U ≫ f.appLE _ V e 
goal: AlgebraicGeometry.Scheme.Hom.appLE (f ≫ g) U V e =
  AlgebraicGeometry.Scheme.Hom.app g U ≫
    AlgebraicGeometry.Scheme.Hom.appLE f ((TopologicalSpace.Opens.map g.val.base).obj U) V e

full_name: AlgebraicGeometry.Scheme.congr_app
code: theorem congr_app {X Y : Scheme} {f g : X ⟶ Y} (e : f = g) (U) :
    f.app U = g.app U ≫ X.presheaf.map (eqToHom (by subst e; rfl)).op 
goal: AlgebraicGeometry.Scheme.Hom.app f U =
  AlgebraicGeometry.Scheme.Hom.app g U ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯).op

full_name: AlgebraicGeometry.Scheme.app_eq
code: theorem app_eq {X Y : Scheme} (f : X ⟶ Y) {U V : Y.Opens} (e : U = V) :
    f.app U =
      Y.presheaf.map (eqToHom e.symm).op ≫
        f.app V ≫
          X.presheaf.map (eqToHom (congr_arg (Opens.map f.val.base).obj e)).op 
goal: AlgebraicGeometry.Scheme.Hom.app f U =
  Y.presheaf.map (CategoryTheory.eqToHom ⋯).op ≫
    AlgebraicGeometry.Scheme.Hom.app f V ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯).op

full_name: AlgebraicGeometry.Scheme.eqToHom_c_app
code: theorem eqToHom_c_app {X Y : Scheme} (e : X = Y) (U) :
    (eqToHom e).app U = eqToHom (by subst e; rfl) 
goal: AlgebraicGeometry.Scheme.Hom.app (CategoryTheory.eqToHom e) U = CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.Scheme.presheaf_map_eqToHom_op
code: lemma presheaf_map_eqToHom_op (X : Scheme) (U V : X.Opens) (i : U = V) :
    X.presheaf.map (eqToHom i).op = eqToHom (i ▸ rfl) 
goal: X.presheaf.map (CategoryTheory.eqToHom i).op = CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.Scheme.is_locallyRingedSpace_iso
code: instance is_locallyRingedSpace_iso {X Y : Scheme} (f : X ⟶ Y) [IsIso f] :
    @IsIso LocallyRingedSpace _ _ _ f 
goal: CategoryTheory.IsIso f

full_name: AlgebraicGeometry.Scheme.val_base_isIso
code: instance val_base_isIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso f] : IsIso f.1.base 
goal: CategoryTheory.IsIso f.val.base

full_name: AlgebraicGeometry.Scheme.instIsIsoCommRingCatAppOppositeOpensαTopologicalSpaceCarrierCVal
code: instance {X Y : Scheme} (f : X ⟶ Y) [IsIso f] (U) : IsIso (f.val.c.app U) 
goal: CategoryTheory.IsIso (f.val.c.app U)

full_name: AlgebraicGeometry.Scheme.instIsIsoCommRingCatApp
code: instance {X Y : Scheme} (f : X ⟶ Y) [IsIso f] (U) : IsIso (f.app U) 
goal: CategoryTheory.IsIso (AlgebraicGeometry.Scheme.Hom.app f U)

full_name: AlgebraicGeometry.Scheme.inv_app
code: @[simp]
theorem inv_app {X Y : Scheme} (f : X ⟶ Y) [IsIso f] (U : X.Opens) :
    (inv f).app U =
      X.presheaf.map (eqToHom (show (f ≫ inv f) ⁻¹ᵁ U = U by rw [IsIso.hom_inv_id]; rfl)).op ≫
        inv (f.app ((inv f) ⁻¹ᵁ U)) 
goal: AlgebraicGeometry.Scheme.Hom.app (CategoryTheory.inv f) U =
  X.presheaf.map (CategoryTheory.eqToHom ⋯).op ≫
    CategoryTheory.inv
      (AlgebraicGeometry.Scheme.Hom.app f ((TopologicalSpace.Opens.map (CategoryTheory.inv f).val.base).obj U))

full_name: AlgebraicGeometry.Scheme.inv_app_top
code: theorem inv_app_top {X Y : Scheme} (f : X ⟶ Y) [IsIso f] :
    (inv f).app ⊤ = inv (f.app ⊤) 
goal: AlgebraicGeometry.Scheme.Hom.app (CategoryTheory.inv f) ⊤ = CategoryTheory.inv (AlgebraicGeometry.Scheme.Hom.app f ⊤)

full_name: AlgebraicGeometry.Spec
code: /-- The spectrum of a commutative ring, as a scheme.
-/
def Spec (R : CommRingCat) : Scheme 
goal: AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Spec_toLocallyRingedSpace
code: theorem Spec_toLocallyRingedSpace (R : CommRingCat) :
    (Spec R).toLocallyRingedSpace = Spec.locallyRingedSpaceObj R 
goal: (AlgebraicGeometry.Spec R).toLocallyRingedSpace = AlgebraicGeometry.Spec.locallyRingedSpaceObj R

full_name: AlgebraicGeometry.Spec.map
code: /-- The induced map of a ring homomorphism on the ring spectra, as a morphism of schemes.
-/
def Spec.map {R S : CommRingCat} (f : R ⟶ S) : Spec S ⟶ Spec R 
goal: AlgebraicGeometry.Spec S ⟶ AlgebraicGeometry.Spec R

full_name: AlgebraicGeometry.Spec.map_id
code: @[simp]
theorem Spec.map_id (R : CommRingCat) : Spec.map (𝟙 R) = 𝟙 (Spec R) 
goal: AlgebraicGeometry.Spec.map (𝟙 R) = 𝟙 (AlgebraicGeometry.Spec R)

full_name: AlgebraicGeometry.Spec.map_comp
code: @[reassoc, simp]
theorem Spec.map_comp {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) :
    Spec.map (f ≫ g) = Spec.map g ≫ Spec.map f 
goal: AlgebraicGeometry.Spec.map (f ≫ g) = AlgebraicGeometry.Spec.map g ≫ AlgebraicGeometry.Spec.map f

full_name: AlgebraicGeometry.Scheme.Spec_obj
code: /-- The spectrum, as a contravariant functor from commutative rings to schemes. -/
@[simps]
protected def Scheme.Spec : CommRingCatᵒᵖ ⥤ Scheme 
goal: AlgebraicGeometry.Scheme.Spec.obj R = AlgebraicGeometry.Spec (Opposite.unop R)

full_name: AlgebraicGeometry.Scheme.Spec
code: /-- The spectrum, as a contravariant functor from commutative rings to schemes. -/
@[simps]
protected def Scheme.Spec : CommRingCatᵒᵖ ⥤ Scheme 
goal: CommRingCatᵒᵖ ⥤ AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.Spec_map
code: /-- The spectrum, as a contravariant functor from commutative rings to schemes. -/
@[simps]
protected def Scheme.Spec : CommRingCatᵒᵖ ⥤ Scheme 
goal: ∀ {X Y : CommRingCatᵒᵖ} (f : X ⟶ Y), AlgebraicGeometry.Scheme.Spec.map f = AlgebraicGeometry.Spec.map f.unop

full_name: AlgebraicGeometry.Spec.map_eqToHom
code: lemma Spec.map_eqToHom {R S : CommRingCat} (e : R = S) :
    Spec.map (eqToHom e) = eqToHom (e ▸ rfl) 
goal: AlgebraicGeometry.Spec.map (CategoryTheory.eqToHom e) = CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.instIsIsoSchemeMapOfCommRingCat
code: instance {R S : CommRingCat} (f : R ⟶ S) [IsIso f] : IsIso (Spec.map f) 
goal: CategoryTheory.IsIso (AlgebraicGeometry.Spec.map f)

full_name: AlgebraicGeometry.Spec.map_inv
code: @[simp]
lemma Spec.map_inv {R S : CommRingCat} (f : R ⟶ S) [IsIso f] :
    Spec.map (inv f) = inv (Spec.map f) 
goal: AlgebraicGeometry.Spec.map (CategoryTheory.inv f) = CategoryTheory.inv (AlgebraicGeometry.Spec.map f)

full_name: AlgebraicGeometry.Spec_carrier
code: lemma Spec_carrier (R : CommRingCat.{u}) : (Spec R).carrier = PrimeSpectrum R 
goal: ↑↑(AlgebraicGeometry.Spec R).toPresheafedSpace = PrimeSpectrum ↑R

full_name: AlgebraicGeometry.Spec_sheaf
code: lemma Spec_sheaf (R : CommRingCat.{u}) : (Spec R).sheaf = Spec.structureSheaf R 
goal: (AlgebraicGeometry.Spec R).sheaf = AlgebraicGeometry.Spec.structureSheaf ↑R

full_name: AlgebraicGeometry.Spec_presheaf
code: lemma Spec_presheaf (R : CommRingCat.{u}) : (Spec R).presheaf = (Spec.structureSheaf R).1 
goal: (AlgebraicGeometry.Spec R).presheaf = (AlgebraicGeometry.Spec.structureSheaf ↑R).val

full_name: AlgebraicGeometry.Spec.map_base
code: lemma Spec.map_base : (Spec.map f).1.base = PrimeSpectrum.comap f 
goal: (AlgebraicGeometry.Spec.map f).val.base = PrimeSpectrum.comap f

full_name: AlgebraicGeometry.Spec.map_app
code: lemma Spec.map_app (U) :
    (Spec.map f).app U = StructureSheaf.comap f U (Spec.map f ⁻¹ᵁ U) le_rfl 
goal: AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.Spec.map f) U =
  AlgebraicGeometry.StructureSheaf.comap f U
    ((TopologicalSpace.Opens.map (AlgebraicGeometry.Spec.map f).val.base).obj U) ⋯

full_name: AlgebraicGeometry.Spec.map_appLE
code: lemma Spec.map_appLE {U V} (e : U ≤ Spec.map f ⁻¹ᵁ V) :
    (Spec.map f).appLE V U e = StructureSheaf.comap f V U e 
goal: AlgebraicGeometry.Scheme.Hom.appLE (AlgebraicGeometry.Spec.map f) V U e = AlgebraicGeometry.StructureSheaf.comap f V U e

full_name: AlgebraicGeometry.Scheme.empty
code: /-- The empty scheme. -/
@[simps]
def empty : Scheme 
goal: AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.empty_presheaf
code: /-- The empty scheme. -/
@[simps]
def empty : Scheme 
goal: AlgebraicGeometry.Scheme.empty.presheaf =
  (CategoryTheory.Functor.const (TopologicalSpace.Opens ↑(TopCat.of PEmpty.{u_1 + 1}))ᵒᵖ).obj
    (CommRingCat.of PUnit.{u_1 + 1})

full_name: AlgebraicGeometry.Scheme.empty_carrier
code: /-- The empty scheme. -/
@[simps]
def empty : Scheme 
goal: ↑AlgebraicGeometry.Scheme.empty.toPresheafedSpace = TopCat.of PEmpty.{u_1 + 1}

full_name: AlgebraicGeometry.Scheme.instEmptyCollection
code: instance : EmptyCollection Scheme 
goal: EmptyCollection AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.instInhabited
code: instance : Inhabited Scheme 
goal: Inhabited AlgebraicGeometry.Scheme

full_name: AlgebraicGeometry.Scheme.Γ
code: /-- The global sections, notated Gamma.
-/
def Γ : Schemeᵒᵖ ⥤ CommRingCat 
goal: AlgebraicGeometry.Schemeᵒᵖ ⥤ CommRingCat

full_name: AlgebraicGeometry.Scheme.Γ_def
code: theorem Γ_def : Γ = (inducedFunctor Scheme.toLocallyRingedSpace).op ⋙ LocallyRingedSpace.Γ 
goal: AlgebraicGeometry.Scheme.Γ =
  (CategoryTheory.inducedFunctor AlgebraicGeometry.Scheme.toLocallyRingedSpace).op ⋙
    AlgebraicGeometry.LocallyRingedSpace.Γ

full_name: AlgebraicGeometry.Scheme.Γ_obj
code: @[simp]
theorem Γ_obj (X : Schemeᵒᵖ) : Γ.obj X = Γ(unop X, ⊤) 
goal: AlgebraicGeometry.Scheme.Γ.obj X = (Opposite.unop X).presheaf.obj (Opposite.op ⊤)

full_name: AlgebraicGeometry.Scheme.Γ_obj_op
code: theorem Γ_obj_op (X : Scheme) : Γ.obj (op X) = Γ(X, ⊤) 
goal: AlgebraicGeometry.Scheme.Γ.obj (Opposite.op X) = X.presheaf.obj (Opposite.op ⊤)

full_name: AlgebraicGeometry.Scheme.Γ_map
code: @[simp]
theorem Γ_map {X Y : Schemeᵒᵖ} (f : X ⟶ Y) : Γ.map f = f.unop.app ⊤ 
goal: AlgebraicGeometry.Scheme.Γ.map f = AlgebraicGeometry.Scheme.Hom.app f.unop ⊤

full_name: AlgebraicGeometry.Scheme.Γ_map_op
code: theorem Γ_map_op {X Y : Scheme} (f : X ⟶ Y) : Γ.map f.op = f.app ⊤ 
goal: AlgebraicGeometry.Scheme.Γ.map f.op = AlgebraicGeometry.Scheme.Hom.app f ⊤

full_name: AlgebraicGeometry.Scheme.SpecΓIdentity
code: /--
The counit (`SpecΓIdentity.inv.op`) of the adjunction `Γ ⊣ Spec` as an isomorphism.
This is almost never needed in practical use cases. Use `ΓSpecIso` instead.
-/
def SpecΓIdentity : Scheme.Spec.rightOp ⋙ Scheme.Γ ≅ 𝟭 _ 
goal: AlgebraicGeometry.Scheme.Spec.rightOp ⋙ AlgebraicGeometry.Scheme.Γ ≅ 𝟭 CommRingCat

full_name: AlgebraicGeometry.Scheme.ΓSpecIso
code: /-- The global sections of `Spec R` is isomorphic to `R`. -/
def ΓSpecIso : Γ(Spec R, ⊤) ≅ R 
goal: (AlgebraicGeometry.Spec R).presheaf.obj (Opposite.op ⊤) ≅ R

full_name: AlgebraicGeometry.Scheme.SpecΓIdentity_app
code: @[simp] lemma SpecΓIdentity_app : SpecΓIdentity.app R = ΓSpecIso R 
goal: AlgebraicGeometry.Scheme.SpecΓIdentity.app R = AlgebraicGeometry.Scheme.ΓSpecIso R

full_name: AlgebraicGeometry.Scheme.SpecΓIdentity_hom_app
code: @[simp] lemma SpecΓIdentity_hom_app : SpecΓIdentity.hom.app R = (ΓSpecIso R).hom 
goal: AlgebraicGeometry.Scheme.SpecΓIdentity.hom.app R = (AlgebraicGeometry.Scheme.ΓSpecIso R).hom

full_name: AlgebraicGeometry.Scheme.SpecΓIdentity_inv_app
code: @[simp] lemma SpecΓIdentity_inv_app : SpecΓIdentity.inv.app R = (ΓSpecIso R).inv 
goal: AlgebraicGeometry.Scheme.SpecΓIdentity.inv.app R = (AlgebraicGeometry.Scheme.ΓSpecIso R).inv

full_name: AlgebraicGeometry.Scheme.ΓSpecIso_naturality
code: @[reassoc (attr := simp)]
lemma ΓSpecIso_naturality {R S : CommRingCat.{u}} (f : R ⟶ S) :
    (Spec.map f).app ⊤ ≫ (ΓSpecIso S).hom = (ΓSpecIso R).hom ≫ f 
goal: AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.Spec.map f) ⊤ ≫ (AlgebraicGeometry.Scheme.ΓSpecIso S).hom =
  (AlgebraicGeometry.Scheme.ΓSpecIso R).hom ≫ f

full_name: AlgebraicGeometry.Scheme.ΓSpecIso_inv_naturality
code: @[reassoc (attr := simp)]
lemma ΓSpecIso_inv_naturality {R S : CommRingCat.{u}} (f : R ⟶ S) :
    f ≫ (ΓSpecIso S).inv = (ΓSpecIso R).inv ≫ (Spec.map f).app ⊤ 
goal: f ≫ (AlgebraicGeometry.Scheme.ΓSpecIso S).inv =
  (AlgebraicGeometry.Scheme.ΓSpecIso R).inv ≫ AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.Spec.map f) ⊤

full_name: AlgebraicGeometry.Scheme.ΓSpecIso_inv
code: lemma ΓSpecIso_inv : (ΓSpecIso R).inv = StructureSheaf.toOpen R ⊤ 
goal: (AlgebraicGeometry.Scheme.ΓSpecIso R).inv = AlgebraicGeometry.StructureSheaf.toOpen ↑R ⊤

full_name: AlgebraicGeometry.Scheme.toOpen_eq
code: lemma toOpen_eq (U) :
    (by exact StructureSheaf.toOpen R U) =
    (ΓSpecIso R).inv ≫ (Spec R).presheaf.map (homOfLE le_top).op 
goal: AlgebraicGeometry.StructureSheaf.toOpen (↑R) U =
  (AlgebraicGeometry.Scheme.ΓSpecIso R).inv ≫ (AlgebraicGeometry.Spec R).presheaf.map (CategoryTheory.homOfLE ⋯).op

full_name: AlgebraicGeometry.Scheme.basicOpen
code: /-- The subset of the underlying space where the given section does not vanish. -/
def basicOpen : X.Opens 
goal: X.Opens

full_name: AlgebraicGeometry.Scheme.mem_basicOpen
code: @[simp]
theorem mem_basicOpen (x : U) : ↑x ∈ X.basicOpen f ↔ IsUnit (X.presheaf.germ x f) 
goal: ↑x ∈ X.basicOpen f ↔ IsUnit ((X.presheaf.germ x) f)

full_name: AlgebraicGeometry.Scheme.mem_basicOpen_top'
code: theorem mem_basicOpen_top' {U : X.Opens} (f : Γ(X, U)) (x : X) :
    x ∈ X.basicOpen f ↔ ∃ (m : x ∈ U), IsUnit (X.presheaf.germ (⟨x, m⟩ : U) f) 
goal: x ∈ X.basicOpen f ↔ ∃ (m : x ∈ U), IsUnit ((X.presheaf.germ ⟨x, m⟩) f)

full_name: AlgebraicGeometry.Scheme.mem_basicOpen_top
code: @[simp]
theorem mem_basicOpen_top (f : Γ(X, ⊤)) (x : X) :
    x ∈ X.basicOpen f ↔ IsUnit (X.presheaf.germ (⟨x, trivial⟩ : (⊤ : Opens _)) f) 
goal: x ∈ X.basicOpen f ↔ IsUnit ((X.presheaf.germ ⟨x, trivial⟩) f)

full_name: AlgebraicGeometry.Scheme.basicOpen_res
code: @[simp]
theorem basicOpen_res (i : op U ⟶ op V) : X.basicOpen (X.presheaf.map i f) = V ⊓ X.basicOpen f 
goal: X.basicOpen ((X.presheaf.map i) f) = V ⊓ X.basicOpen f

full_name: AlgebraicGeometry.Scheme.basicOpen_res_eq
code: @[simp 1100]
theorem basicOpen_res_eq (i : op U ⟶ op V) [IsIso i] :
    X.basicOpen (X.presheaf.map i f) = X.basicOpen f 
goal: X.basicOpen ((X.presheaf.map i) f) = X.basicOpen f

full_name: AlgebraicGeometry.Scheme.basicOpen_le
code: @[sheaf_restrict]
theorem basicOpen_le : X.basicOpen f ≤ U 
goal: X.basicOpen f ≤ U

full_name: AlgebraicGeometry.Scheme.basicOpen_restrict
code: @[sheaf_restrict]
lemma basicOpen_restrict (i : V ⟶ U) (f : Γ(X, U)) :
    X.basicOpen (f |_ₕ i) ≤ X.basicOpen f 
goal: X.basicOpen (TopCat.Presheaf.restrict f i) ≤ X.basicOpen f

full_name: AlgebraicGeometry.Scheme.preimage_basicOpen
code: @[simp]
theorem preimage_basicOpen {X Y : Scheme.{u}} (f : X ⟶ Y) {U : Y.Opens} (r : Γ(Y, U)) :
    f ⁻¹ᵁ (Y.basicOpen r) = X.basicOpen (f.app U r) 
goal: (TopologicalSpace.Opens.map f.val.base).obj (Y.basicOpen r) = X.basicOpen ((AlgebraicGeometry.Scheme.Hom.app f U) r)

full_name: AlgebraicGeometry.Scheme.basicOpen_appLE
code: lemma basicOpen_appLE {X Y : Scheme.{u}} (f : X ⟶ Y) (U : X.Opens) (V : Y.Opens) (e : U ≤ f ⁻¹ᵁ V)
    (s : Γ(Y, V)) : X.basicOpen (f.appLE V U e s) = U ⊓ f ⁻¹ᵁ (Y.basicOpen s) 
goal: X.basicOpen ((AlgebraicGeometry.Scheme.Hom.appLE f V U e) s) =
  U ⊓ (TopologicalSpace.Opens.map f.val.base).obj (Y.basicOpen s)

full_name: AlgebraicGeometry.Scheme.basicOpen_zero
code: @[simp]
theorem basicOpen_zero (U : X.Opens) : X.basicOpen (0 : Γ(X, U)) = ⊥ 
goal: X.basicOpen 0 = ⊥

full_name: AlgebraicGeometry.Scheme.basicOpen_mul
code: @[simp]
theorem basicOpen_mul : X.basicOpen (f * g) = X.basicOpen f ⊓ X.basicOpen g 
goal: X.basicOpen (f * g) = X.basicOpen f ⊓ X.basicOpen g

full_name: AlgebraicGeometry.Scheme.basicOpen_pow
code: lemma basicOpen_pow {n : ℕ} (h : 0 < n) : X.basicOpen (f ^ n) = X.basicOpen f 
goal: X.basicOpen (f ^ n) = X.basicOpen f

full_name: AlgebraicGeometry.Scheme.basicOpen_of_isUnit
code: theorem basicOpen_of_isUnit {f : Γ(X, U)} (hf : IsUnit f) : X.basicOpen f = U 
goal: X.basicOpen f = U

full_name: AlgebraicGeometry.Scheme.algebra_section_section_basicOpen
code: instance algebra_section_section_basicOpen {X : Scheme} {U : X.Opens} (f : Γ(X, U)) :
    Algebra Γ(X, U) Γ(X, X.basicOpen f) 
goal: Algebra ↑(X.presheaf.obj (Opposite.op U)) ↑(X.presheaf.obj (Opposite.op (X.basicOpen f)))

full_name: AlgebraicGeometry.Scheme.zeroLocus
code: /--
The zero locus of a set of sections `s` over an open set `U` is the closed set consisting of
the complement of `U` and of all points of `U`, where all elements of `f` vanish.
-/
def zeroLocus {U : X.Opens} (s : Set Γ(X, U)) : Set X 
goal: Set ↑↑X.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.zeroLocus_def
code: lemma zeroLocus_def {U : X.Opens} (s : Set Γ(X, U)) :
    X.zeroLocus s = ⋂ f ∈ s, (X.basicOpen f).carrierᶜ 
goal: X.zeroLocus s = ⋂ f ∈ s, (X.basicOpen f).carrierᶜ

full_name: AlgebraicGeometry.Scheme.zeroLocus_isClosed
code: lemma zeroLocus_isClosed {U : X.Opens} (s : Set Γ(X, U)) :
    IsClosed (X.zeroLocus s) 
goal: IsClosed (X.zeroLocus s)

full_name: AlgebraicGeometry.Scheme.zeroLocus_singleton
code: lemma zeroLocus_singleton {U : X.Opens} (f : Γ(X, U)) :
    X.zeroLocus {f} = (X.basicOpen f).carrierᶜ 
goal: X.zeroLocus {f} = (X.basicOpen f).carrierᶜ

full_name: AlgebraicGeometry.Scheme.zeroLocus_empty_eq_univ
code: @[simp]
lemma zeroLocus_empty_eq_univ {U : X.Opens} :
    X.zeroLocus (∅ : Set Γ(X, U)) = Set.univ 
goal: X.zeroLocus ∅ = Set.univ

full_name: AlgebraicGeometry.Scheme.mem_zeroLocus_iff
code: @[simp]
lemma mem_zeroLocus_iff {U : X.Opens} (s : Set Γ(X, U)) (x : X) :
    x ∈ X.zeroLocus s ↔ ∀ f ∈ s, x ∉ X.basicOpen f 
goal: x ∈ X.zeroLocus s ↔ ∀ f ∈ s, x ∉ X.basicOpen f

full_name: AlgebraicGeometry.basicOpen_eq_of_affine
code: theorem basicOpen_eq_of_affine {R : CommRingCat} (f : R) :
    (Spec R).basicOpen ((Scheme.ΓSpecIso R).inv f) = PrimeSpectrum.basicOpen f 
goal: (AlgebraicGeometry.Spec R).basicOpen ((AlgebraicGeometry.Scheme.ΓSpecIso R).inv f) = PrimeSpectrum.basicOpen f

full_name: AlgebraicGeometry.basicOpen_eq_of_affine'
code: @[simp]
theorem basicOpen_eq_of_affine' {R : CommRingCat} (f : Γ(Spec R, ⊤)) :
    (Spec R).basicOpen f = PrimeSpectrum.basicOpen ((Scheme.ΓSpecIso R).hom f) 
goal: (AlgebraicGeometry.Spec R).basicOpen f = PrimeSpectrum.basicOpen ((AlgebraicGeometry.Scheme.ΓSpecIso R).hom f)

full_name: AlgebraicGeometry.Scheme.Spec_map_presheaf_map_eqToHom
code: theorem Scheme.Spec_map_presheaf_map_eqToHom {X : Scheme} {U V : X.Opens} (h : U = V) (W) :
    (Spec.map (X.presheaf.map (eqToHom h).op)).app W = eqToHom (by cases h; dsimp; simp) 
goal: AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.Spec.map (X.presheaf.map (CategoryTheory.eqToHom h).op)) W =
  CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.Scheme.iso_hom_val_base_inv_val_base
code: @[reassoc (attr := simp)]
lemma Scheme.iso_hom_val_base_inv_val_base {X Y : Scheme.{u}} (e : X ≅ Y) :
    e.hom.val.base ≫ e.inv.val.base = 𝟙 _ 
goal: e.hom.val.base ≫ e.inv.val.base = 𝟙 ↑X.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.iso_hom_val_base_inv_val_base_apply
code: @[simp]
lemma Scheme.iso_hom_val_base_inv_val_base_apply {X Y : Scheme.{u}} (e : X ≅ Y) (x : X) :
    (e.inv.val.base (e.hom.val.base x)) = x 
goal: e.inv.val.base (e.hom.val.base x) = x

full_name: AlgebraicGeometry.Scheme.iso_inv_val_base_hom_val_base
code: @[reassoc (attr := simp)]
lemma Scheme.iso_inv_val_base_hom_val_base {X Y : Scheme.{u}} (e : X ≅ Y) :
    e.inv.val.base ≫ e.hom.val.base = 𝟙 _ 
goal: e.inv.val.base ≫ e.hom.val.base = 𝟙 ↑Y.toPresheafedSpace

full_name: AlgebraicGeometry.Scheme.iso_inv_val_base_hom_val_base_apply
code: @[simp]
lemma Scheme.iso_inv_val_base_hom_val_base_apply {X Y : Scheme.{u}} (e : X ≅ Y) (y : Y) :
    (e.hom.val.base (e.inv.val.base y)) = y 
goal: e.hom.val.base (e.inv.val.base y) = y

full_name: AlgebraicGeometry.Scheme.stalkMap_id
code: @[simp]
lemma stalkMap_id (X : Scheme.{u}) (x : X) :
    (𝟙 X : X ⟶ X).stalkMap x = 𝟙 (X.presheaf.stalk x) 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap (𝟙 X) x = 𝟙 (X.presheaf.stalk x)

full_name: AlgebraicGeometry.Scheme.stalkMap_comp
code: lemma stalkMap_comp {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) :
    (f ≫ g : X ⟶ Z).stalkMap x = g.stalkMap (f.val.base x) ≫ f.stalkMap x 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap (f ≫ g) x =
  AlgebraicGeometry.Scheme.Hom.stalkMap g (f.val.base x) ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f x

full_name: AlgebraicGeometry.Scheme.stalkSpecializes_stalkMap
code: @[reassoc]
lemma stalkSpecializes_stalkMap (x x' : X)
    (h : x ⤳ x') : Y.presheaf.stalkSpecializes (f.val.base.map_specializes h) ≫ f.stalkMap x =
      f.stalkMap x' ≫ X.presheaf.stalkSpecializes h 
goal: Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f x =
  AlgebraicGeometry.Scheme.Hom.stalkMap f x' ≫ X.presheaf.stalkSpecializes h

full_name: AlgebraicGeometry.Scheme.stalkSpecializes_stalkMap_apply
code: lemma stalkSpecializes_stalkMap_apply (x x' : X) (h : x ⤳ x') (y) :
    f.stalkMap x (Y.presheaf.stalkSpecializes (f.val.base.map_specializes h) y) =
      (X.presheaf.stalkSpecializes h (f.stalkMap x' y)) 
goal: (AlgebraicGeometry.Scheme.Hom.stalkMap f x) ((Y.presheaf.stalkSpecializes ⋯) y) =
  (X.presheaf.stalkSpecializes h) ((AlgebraicGeometry.Scheme.Hom.stalkMap f x') y)

full_name: AlgebraicGeometry.Scheme.stalkMap_congr
code: @[reassoc]
lemma stalkMap_congr (f g : X ⟶ Y) (hfg : f = g) (x x' : X)
    (hxx' : x = x') : f.stalkMap x ≫ X.presheaf.stalkSpecializes (specializes_of_eq hxx'.symm) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| hfg ▸ hxx' ▸ rfl) ≫ g.stalkMap x' 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap f x ≫ X.presheaf.stalkSpecializes ⋯ =
  Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap g x'

full_name: AlgebraicGeometry.Scheme.stalkMap_congr_hom
code: @[reassoc]
lemma stalkMap_congr_hom (f g : X ⟶ Y) (hfg : f = g) (x : X) :
    f.stalkMap x = Y.presheaf.stalkSpecializes (specializes_of_eq <| hfg ▸ rfl) ≫
      g.stalkMap x 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap f x = Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap g x

full_name: AlgebraicGeometry.Scheme.stalkMap_congr_point
code: @[reassoc]
lemma stalkMap_congr_point (x x' : X) (hxx' : x = x') :
    f.stalkMap x ≫ X.presheaf.stalkSpecializes (specializes_of_eq hxx'.symm) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| hxx' ▸ rfl) ≫ f.stalkMap x' 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap f x ≫ X.presheaf.stalkSpecializes ⋯ =
  Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f x'

full_name: AlgebraicGeometry.Scheme.stalkMap_hom_inv
code: @[reassoc (attr := simp)]
lemma stalkMap_hom_inv (e : X ≅ Y) (y : Y) :
    e.hom.stalkMap (e.inv.val.base y) ≫ e.inv.stalkMap y =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| by simp) 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap e.hom (e.inv.val.base y) ≫ AlgebraicGeometry.Scheme.Hom.stalkMap e.inv y =
  Y.presheaf.stalkSpecializes ⋯

full_name: AlgebraicGeometry.Scheme.stalkMap_hom_inv_apply
code: @[simp]
lemma stalkMap_hom_inv_apply (e : X ≅ Y) (y : Y) (z) :
    e.inv.stalkMap y (e.hom.stalkMap (e.inv.val.base y) z) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| by simp) z 
goal: (AlgebraicGeometry.Scheme.Hom.stalkMap e.inv y) ((AlgebraicGeometry.Scheme.Hom.stalkMap e.hom (e.inv.val.base y)) z) =
  (Y.presheaf.stalkSpecializes ⋯) z

full_name: AlgebraicGeometry.Scheme.stalkMap_inv_hom
code: @[reassoc (attr := simp)]
lemma stalkMap_inv_hom (e : X ≅ Y) (x : X) :
    e.inv.stalkMap (e.hom.val.base x) ≫ e.hom.stalkMap x =
      X.presheaf.stalkSpecializes (specializes_of_eq <| by simp) 
goal: AlgebraicGeometry.Scheme.Hom.stalkMap e.inv (e.hom.val.base x) ≫ AlgebraicGeometry.Scheme.Hom.stalkMap e.hom x =
  X.presheaf.stalkSpecializes ⋯

full_name: AlgebraicGeometry.Scheme.stalkMap_inv_hom_apply
code: @[simp]
lemma stalkMap_inv_hom_apply (e : X ≅ Y) (x : X) (y) :
    e.hom.stalkMap x (e.inv.stalkMap (e.hom.val.base x) y) =
      X.presheaf.stalkSpecializes (specializes_of_eq <| by simp) y 
goal: (AlgebraicGeometry.Scheme.Hom.stalkMap e.hom x) ((AlgebraicGeometry.Scheme.Hom.stalkMap e.inv (e.hom.val.base x)) y) =
  (X.presheaf.stalkSpecializes ⋯) y

full_name: AlgebraicGeometry.Scheme.stalkMap_germ
code: @[reassoc]
lemma stalkMap_germ (U : Y.Opens) (x : f ⁻¹ᵁ U) :
    Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ ≫ f.stalkMap x =
      f.app U ≫ X.presheaf.germ x 
goal: Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f ↑x =
  AlgebraicGeometry.Scheme.Hom.app f U ≫ X.presheaf.germ x

full_name: AlgebraicGeometry.Scheme.stalkMap_germ_apply
code: lemma stalkMap_germ_apply (U : Y.Opens) (x : f ⁻¹ᵁ U) (y) :
    f.stalkMap x.val (Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ y) =
      X.presheaf.germ x (f.val.c.app (op U) y) 
goal: (AlgebraicGeometry.Scheme.Hom.stalkMap f ↑x) ((Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩) y) =
  (X.presheaf.germ x) ((f.val.c.app (Opposite.op U)) y)

full_name: AlgebraicGeometry.Scheme.stalkMap_germ'
code: @[reassoc (attr := simp)]
lemma stalkMap_germ' (U : Y.Opens) (x : X) (hx : f.val.base x ∈ U) :
    Y.presheaf.germ ⟨f.val.base x, hx⟩ ≫ f.stalkMap x =
      f.app U ≫ X.presheaf.germ (U := f⁻¹ᵁ U) ⟨x, hx⟩ 
goal: Y.presheaf.germ ⟨f.val.base x, hx⟩ ≫ AlgebraicGeometry.Scheme.Hom.stalkMap f x =
  AlgebraicGeometry.Scheme.Hom.app f U ≫ X.presheaf.germ ⟨x, hx⟩

full_name: AlgebraicGeometry.Scheme.stalkMap_germ'_apply
code: @[simp]
lemma stalkMap_germ'_apply (U : Y.Opens) (x : X) (hx : f.val.base x ∈ U) (y) :
    f.stalkMap x (Y.presheaf.germ ⟨f.val.base x, hx⟩ y) =
      X.presheaf.germ (U := (Opens.map f.val.base).obj U) ⟨x, hx⟩ (f.val.c.app (op U) y) 
goal: (AlgebraicGeometry.Scheme.Hom.stalkMap f x) ((Y.presheaf.germ ⟨f.val.base x, hx⟩) y) =
  (X.presheaf.germ ⟨x, hx⟩) ((f.val.c.app (Opposite.op U)) y)