File: Mathlib/Geometry/RingedSpace/Stalks.lean

full_name: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap
code: /-- A morphism of presheafed spaces induces a morphism of stalks.
-/
def Hom.stalkMap {X Y : PresheafedSpace.{_, _, v} C} (α : Hom X Y) (x : X) :
    Y.presheaf.stalk (α.base x) ⟶ X.presheaf.stalk x 
goal: Y.presheaf.stalk (α.base x) ⟶ X.presheaf.stalk x

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap_germ
code: @[elementwise, reassoc]
theorem stalkMap_germ {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) (U : Opens Y)
    (x : (Opens.map α.base).obj U) :
    Y.presheaf.germ ⟨α.base x.1, x.2⟩ ≫ α.stalkMap ↑x = α.c.app (op U) ≫ X.presheaf.germ x 
goal: Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α ↑x =
  α.c.app (Opposite.op U) ≫ X.presheaf.germ x

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap_germ'
code: @[simp, elementwise, reassoc]
theorem stalkMap_germ' {X Y : PresheafedSpace.{_, _, v} C}
    (α : X ⟶ Y) (U : Opens Y) (x : X) (hx : α.base x ∈ U) :
    Y.presheaf.germ ⟨α.base x, hx⟩ ≫ α.stalkMap x = α.c.app (op U) ≫
      X.presheaf.germ (U := (Opens.map α.base).obj U) ⟨x, hx⟩ 
goal: Y.presheaf.germ ⟨α.base x, hx⟩ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x =
  α.c.app (Opposite.op U) ≫ X.presheaf.germ ⟨x, hx⟩

full_name: AlgebraicGeometry.PresheafedSpace.restrictStalkIso
code: /-- For an open embedding `f : U ⟶ X` and a point `x : U`, we get an isomorphism between the stalk
of `X` at `f x` and the stalk of the restriction of `X` along `f` at t `x`.
-/
def restrictStalkIso {U : TopCat} (X : PresheafedSpace.{_, _, v} C) {f : U ⟶ (X : TopCat.{v})}
    (h : OpenEmbedding f) (x : U) : (X.restrict h).presheaf.stalk x ≅ X.presheaf.stalk (f x) 
goal: (X.restrict h).presheaf.stalk x ≅ X.presheaf.stalk (f x)

full_name: AlgebraicGeometry.PresheafedSpace.restrictStalkIso_hom_eq_germ
code: @[elementwise, reassoc]
theorem restrictStalkIso_hom_eq_germ {U : TopCat} (X : PresheafedSpace.{_, _, v} C)
    {f : U ⟶ (X : TopCat.{v})} (h : OpenEmbedding f) (V : Opens U) (x : U) (hx : x ∈ V) :
    (X.restrict h).presheaf.germ ⟨x, hx⟩ ≫ (restrictStalkIso X h x).hom =
    X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ 
goal: (X.restrict h).presheaf.germ ⟨x, hx⟩ ≫ (X.restrictStalkIso h x).hom = X.presheaf.germ ⟨f x, ⋯⟩

full_name: AlgebraicGeometry.PresheafedSpace.restrictStalkIso_inv_eq_germ
code: @[simp, elementwise, reassoc]
theorem restrictStalkIso_inv_eq_germ {U : TopCat} (X : PresheafedSpace.{_, _, v} C)
    {f : U ⟶ (X : TopCat.{v})} (h : OpenEmbedding f) (V : Opens U) (x : U) (hx : x ∈ V) :
    X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ ≫
        (restrictStalkIso X h x).inv =
      (X.restrict h).presheaf.germ ⟨x, hx⟩ 
goal: X.presheaf.germ ⟨f x, ⋯⟩ ≫ (X.restrictStalkIso h x).inv = (X.restrict h).presheaf.germ ⟨x, hx⟩

full_name: AlgebraicGeometry.PresheafedSpace.restrictStalkIso_inv_eq_ofRestrict
code: theorem restrictStalkIso_inv_eq_ofRestrict {U : TopCat} (X : PresheafedSpace.{_, _, v} C)
    {f : U ⟶ (X : TopCat.{v})} (h : OpenEmbedding f) (x : U) :
    (X.restrictStalkIso h x).inv = (X.ofRestrict h).stalkMap x 
goal: (X.restrictStalkIso h x).inv = AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (X.ofRestrict h) x

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict_stalkMap_isIso
code: instance ofRestrict_stalkMap_isIso {U : TopCat} (X : PresheafedSpace.{_, _, v} C)
    {f : U ⟶ (X : TopCat.{v})} (h : OpenEmbedding f) (x : U) :
    IsIso ((X.ofRestrict h).stalkMap x) 
goal: CategoryTheory.IsIso (AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (X.ofRestrict h) x)

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.id
code: @[simp]
theorem id (X : PresheafedSpace.{_, _, v} C) (x : X) :
    (𝟙 X : X ⟶ X).stalkMap x = 𝟙 (X.presheaf.stalk x) 
goal: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (𝟙 X) x = 𝟙 (X.presheaf.stalk x)

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.comp
code: @[simp]
theorem comp {X Y Z : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) (β : Y ⟶ Z) (x : X) :
    (α ≫ β).stalkMap x =
      (β.stalkMap (α.base x) : Z.presheaf.stalk (β.base (α.base x)) ⟶ Y.presheaf.stalk (α.base x)) ≫
        (α.stalkMap x : Y.presheaf.stalk (α.base x) ⟶ X.presheaf.stalk x) 
goal: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (α ≫ β) x =
  AlgebraicGeometry.PresheafedSpace.Hom.stalkMap β (α.base x) ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.congr
code: /-- If `α = β` and `x = x'`, we would like to say that `stalk_map α x = stalk_map β x'`.
Unfortunately, this equality is not well-formed, as their types are not _definitionally_ the same.
To get a proper congruence lemma, we therefore have to introduce these `eqToHom` arrows on
either side of the equality.
-/
theorem congr {X Y : PresheafedSpace.{_, _, v} C} (α β : X ⟶ Y)
    (h₁ : α = β) (x x' : X) (h₂ : x = x') :
    α.stalkMap x ≫ eqToHom (show X.presheaf.stalk x = X.presheaf.stalk x' by rw [h₂]) =
      eqToHom (show Y.presheaf.stalk (α.base x) = Y.presheaf.stalk (β.base x') by rw [h₁, h₂]) ≫
        β.stalkMap x' 
goal: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x ≫ CategoryTheory.eqToHom ⋯ =
  CategoryTheory.eqToHom ⋯ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap β x'

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.congr_hom
code: theorem congr_hom {X Y : PresheafedSpace.{_, _, v} C} (α β : X ⟶ Y) (h : α = β) (x : X) :
    α.stalkMap x =
      eqToHom (show Y.presheaf.stalk (α.base x) =
        Y.presheaf.stalk (β.base x) by rw [h]) ≫ β.stalkMap x 
goal: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x =
  CategoryTheory.eqToHom ⋯ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap β x

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.congr_point
code: theorem congr_point {X Y : PresheafedSpace.{_, _, v} C}
    (α : X ⟶ Y) (x x' : X) (h : x = x') :
    α.stalkMap x ≫ eqToHom (show X.presheaf.stalk x = X.presheaf.stalk x' by rw [h]) =
      eqToHom (show Y.presheaf.stalk (α.base x) =
        Y.presheaf.stalk (α.base x') by rw [h]) ≫ α.stalkMap x' 
goal: AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x ≫ CategoryTheory.eqToHom ⋯ =
  CategoryTheory.eqToHom ⋯ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x'

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.isIso
code: instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (α.stalkMap x) 
goal: CategoryTheory.IsIso (AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x)

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.stalkIso
code: /-- An isomorphism between presheafed spaces induces an isomorphism of stalks.
-/
def stalkIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ≅ Y) (x : X) :
    Y.presheaf.stalk (α.hom.base x) ≅ X.presheaf.stalk x 
goal: Y.presheaf.stalk (α.hom.base x) ≅ X.presheaf.stalk x

full_name: AlgebraicGeometry.PresheafedSpace.stalkMap.stalkSpecializes_stalkMap
code: @[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ f.stalkMap x =
      f.stalkMap y ≫ X.presheaf.stalkSpecializes h 
goal: Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap f x =
  AlgebraicGeometry.PresheafedSpace.Hom.stalkMap f y ≫ X.presheaf.stalkSpecializes h