File: Mathlib/Geometry/RingedSpace/PresheafedSpace.lean

full_name: AlgebraicGeometry.PresheafedSpace.presheaf
code: /-- A `PresheafedSpace C` is a topological space equipped with a presheaf of `C`s. -/
structure PresheafedSpace where
  carrier : TopCat
  protected presheaf : carrier.Presheaf C
goal: TopCat.Presheaf C ↑self

full_name: AlgebraicGeometry.PresheafedSpace.carrier
code: /-- A `PresheafedSpace C` is a topological space equipped with a presheaf of `C`s. -/
structure PresheafedSpace where
  carrier : TopCat
  protected presheaf : carrier.Presheaf C
goal: TopCat

full_name: AlgebraicGeometry.PresheafedSpace
code: /-- A `PresheafedSpace C` is a topological space equipped with a presheaf of `C`s. -/
structure PresheafedSpace where
  carrier : TopCat
  protected presheaf : carrier.Presheaf C
goal: Type (max (max u_1 u_2) (u_3 + 1))

full_name: AlgebraicGeometry.PresheafedSpace.coeCarrier
code: instance coeCarrier : CoeOut (PresheafedSpace C) TopCat 
goal: CoeOut (AlgebraicGeometry.PresheafedSpace C) TopCat

full_name: AlgebraicGeometry.PresheafedSpace.instCoeSortType
code: instance : CoeSort (PresheafedSpace C) Type* 
goal: CoeSort (AlgebraicGeometry.PresheafedSpace C) (Type u_2)

full_name: AlgebraicGeometry.PresheafedSpace.mk_coe
code: theorem mk_coe (carrier) (presheaf) :
    (({ carrier
        presheaf } : PresheafedSpace C) : TopCat) = carrier 
goal: ↑{ carrier := carrier, presheaf := presheaf } = carrier

full_name: AlgebraicGeometry.PresheafedSpace.instTopologicalSpaceαCarrier
code: instance (X : PresheafedSpace C) : TopologicalSpace X 
goal: TopologicalSpace ↑↑X

full_name: AlgebraicGeometry.PresheafedSpace.const
code: /-- The constant presheaf on `X` with value `Z`. -/
def const (X : TopCat) (Z : C) : PresheafedSpace C 
goal: AlgebraicGeometry.PresheafedSpace C

full_name: AlgebraicGeometry.PresheafedSpace.instInhabited
code: instance [Inhabited C] : Inhabited (PresheafedSpace C) 
goal: Inhabited (AlgebraicGeometry.PresheafedSpace C)

full_name: AlgebraicGeometry.PresheafedSpace.Hom.base
code: /-- A morphism between presheafed spaces `X` and `Y` consists of a continuous map
    `f` between the underlying topological spaces, and a (notice contravariant!) map
    from the presheaf on `Y` to the pushforward of the presheaf on `X` via `f`. -/
structure Hom (X Y : PresheafedSpace C) where
  base : (X : TopCat) ⟶ (Y : TopCat)
  c : Y.presheaf ⟶ base _* X.presheaf
goal: ↑X ⟶ ↑Y

full_name: AlgebraicGeometry.PresheafedSpace.Hom
code: /-- A morphism between presheafed spaces `X` and `Y` consists of a continuous map
    `f` between the underlying topological spaces, and a (notice contravariant!) map
    from the presheaf on `Y` to the pushforward of the presheaf on `X` via `f`. -/
structure Hom (X Y : PresheafedSpace C) where
  base : (X : TopCat) ⟶ (Y : TopCat)
  c : Y.presheaf ⟶ base _* X.presheaf
goal: Type (max u_2 u_3)

full_name: AlgebraicGeometry.PresheafedSpace.Hom.c
code: /-- A morphism between presheafed spaces `X` and `Y` consists of a continuous map
    `f` between the underlying topological spaces, and a (notice contravariant!) map
    from the presheaf on `Y` to the pushforward of the presheaf on `X` via `f`. -/
structure Hom (X Y : PresheafedSpace C) where
  base : (X : TopCat) ⟶ (Y : TopCat)
  c : Y.presheaf ⟶ base _* X.presheaf
goal: Y.presheaf ⟶ (TopCat.Presheaf.pushforward C self.base).obj X.presheaf

full_name: AlgebraicGeometry.PresheafedSpace.Hom.ext
code: @[ext]
theorem Hom.ext {X Y : PresheafedSpace C} (α β : Hom X Y) (w : α.base = β.base)
    (h : α.c ≫ whiskerRight (eqToHom (by rw [w])) _ = β.c) : α = β 
goal: α = β

full_name: AlgebraicGeometry.PresheafedSpace.hext
code: theorem hext {X Y : PresheafedSpace C} (α β : Hom X Y) (w : α.base = β.base) (h : HEq α.c β.c) :
    α = β 
goal: α = β

full_name: AlgebraicGeometry.PresheafedSpace.id
code: /-- The identity morphism of a `PresheafedSpace`. -/
def id (X : PresheafedSpace C) : Hom X X 
goal: X.Hom X

full_name: AlgebraicGeometry.PresheafedSpace.homInhabited
code: instance homInhabited (X : PresheafedSpace C) : Inhabited (Hom X X) 
goal: Inhabited (X.Hom X)

full_name: AlgebraicGeometry.PresheafedSpace.comp
code: /-- Composition of morphisms of `PresheafedSpace`s. -/
def comp {X Y Z : PresheafedSpace C} (α : Hom X Y) (β : Hom Y Z) : Hom X Z 
goal: X.Hom Z

full_name: AlgebraicGeometry.PresheafedSpace.comp_c
code: theorem comp_c {X Y Z : PresheafedSpace C} (α : Hom X Y) (β : Hom Y Z) :
    (comp α β).c = β.c ≫ (Presheaf.pushforward _ β.base).map α.c 
goal: (AlgebraicGeometry.PresheafedSpace.comp α β).c = β.c ≫ (TopCat.Presheaf.pushforward C β.base).map α.c

full_name: AlgebraicGeometry.PresheafedSpace.categoryOfPresheafedSpaces
code: /-- The category of PresheafedSpaces. Morphisms are pairs, a continuous map and a presheaf map
    from the presheaf on the target to the pushforward of the presheaf on the source. -/
instance categoryOfPresheafedSpaces : Category (PresheafedSpace C) 
goal: CategoryTheory.Category.{max u_2 u_3, max (max (u_3 + 1) u_2) u_1} (AlgebraicGeometry.PresheafedSpace C)

full_name: AlgebraicGeometry.PresheafedSpace.ext
code: @[ext]
theorem ext {X Y : PresheafedSpace C} (α β : X ⟶ Y) (w : α.base = β.base)
    (h : α.c ≫ whiskerRight (eqToHom (by rw [w])) _ = β.c) : α = β 
goal: α = β

full_name: AlgebraicGeometry.PresheafedSpace.id_base
code: @[simp]
theorem id_base (X : PresheafedSpace C) : (𝟙 X : X ⟶ X).base = 𝟙 (X : TopCat) 
goal: (𝟙 X).base = 𝟙 ↑X

full_name: AlgebraicGeometry.PresheafedSpace.id_c
code: theorem id_c (X : PresheafedSpace C) :
    (𝟙 X : X ⟶ X).c = 𝟙 X.presheaf 
goal: (𝟙 X).c = 𝟙 X.presheaf

full_name: AlgebraicGeometry.PresheafedSpace.id_c_app
code: @[simp]
theorem id_c_app (X : PresheafedSpace C) (U) :
    (𝟙 X : X ⟶ X).c.app U = X.presheaf.map (𝟙 U) 
goal: (𝟙 X).c.app U = X.presheaf.map (𝟙 U)

full_name: AlgebraicGeometry.PresheafedSpace.comp_base
code: @[simp]
theorem comp_base {X Y Z : PresheafedSpace C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).base = f.base ≫ g.base 
goal: (f ≫ g).base = f.base ≫ g.base

full_name: AlgebraicGeometry.PresheafedSpace.instCoeFunHomForallαTopologicalSpaceCarrier
code: instance (X Y : PresheafedSpace C) : CoeFun (X ⟶ Y) fun _ => (↑X → ↑Y) 
goal: CoeFun (X ⟶ Y) fun x => ↑↑X → ↑↑Y

full_name: AlgebraicGeometry.PresheafedSpace.comp_c_app
code: /-- Sometimes rewriting with `comp_c_app` doesn't work because of dependent type issues.
In that case, `erw comp_c_app_assoc` might make progress.
The lemma `comp_c_app_assoc` is also better suited for rewrites in the opposite direction. -/
@[reassoc, simp]
theorem comp_c_app {X Y Z : PresheafedSpace C} (α : X ⟶ Y) (β : Y ⟶ Z) (U) :
    (α ≫ β).c.app U = β.c.app U ≫ α.c.app (op ((Opens.map β.base).obj (unop U))) 
goal: (α ≫ β).c.app U = β.c.app U ≫ α.c.app (Opposite.op ((TopologicalSpace.Opens.map β.base).obj (Opposite.unop U)))

full_name: AlgebraicGeometry.PresheafedSpace.congr_app
code: theorem congr_app {X Y : PresheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl)) 
goal: α.c.app U = β.c.app U ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯)

full_name: AlgebraicGeometry.PresheafedSpace.forget_map
code: /-- The forgetful functor from `PresheafedSpace` to `TopCat`. -/
@[simps]
def forget : PresheafedSpace C ⥤ TopCat 
goal: ∀ {X Y : AlgebraicGeometry.PresheafedSpace C} (f : X ⟶ Y), (AlgebraicGeometry.PresheafedSpace.forget C).map f = f.base

full_name: AlgebraicGeometry.PresheafedSpace.forget
code: /-- The forgetful functor from `PresheafedSpace` to `TopCat`. -/
@[simps]
def forget : PresheafedSpace C ⥤ TopCat 
goal: AlgebraicGeometry.PresheafedSpace C ⥤ TopCat

full_name: AlgebraicGeometry.PresheafedSpace.forget_obj
code: /-- The forgetful functor from `PresheafedSpace` to `TopCat`. -/
@[simps]
def forget : PresheafedSpace C ⥤ TopCat 
goal: (AlgebraicGeometry.PresheafedSpace.forget C).obj X = ↑X

full_name: AlgebraicGeometry.PresheafedSpace.isoOfComponents_inv
code: /-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y 
goal: (AlgebraicGeometry.PresheafedSpace.isoOfComponents H α).inv =
  { base := H.inv, c := TopCat.Presheaf.toPushforwardOfIso H α.hom }

full_name: AlgebraicGeometry.PresheafedSpace.isoOfComponents_hom
code: /-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y 
goal: (AlgebraicGeometry.PresheafedSpace.isoOfComponents H α).hom = { base := H.hom, c := α.inv }

full_name: AlgebraicGeometry.PresheafedSpace.isoOfComponents
code: /-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y 
goal: X ≅ Y

full_name: AlgebraicGeometry.PresheafedSpace.sheafIsoOfIso
code: /-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 
goal: Y.presheaf ≅ (TopCat.Presheaf.pushforward C H.hom.base).obj X.presheaf

full_name: AlgebraicGeometry.PresheafedSpace.sheafIsoOfIso_hom
code: /-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 
goal: (AlgebraicGeometry.PresheafedSpace.sheafIsoOfIso H).hom = H.hom.c

full_name: AlgebraicGeometry.PresheafedSpace.sheafIsoOfIso_inv
code: /-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 
goal: (AlgebraicGeometry.PresheafedSpace.sheafIsoOfIso H).inv =
  TopCat.Presheaf.pushforwardToOfIso ((AlgebraicGeometry.PresheafedSpace.forget C).mapIso H).symm H.inv.c

full_name: AlgebraicGeometry.PresheafedSpace.base_isIso_of_iso
code: instance base_isIso_of_iso (f : X ⟶ Y) [IsIso f] : IsIso f.base 
goal: CategoryTheory.IsIso f.base

full_name: AlgebraicGeometry.PresheafedSpace.c_isIso_of_iso
code: instance c_isIso_of_iso (f : X ⟶ Y) [IsIso f] : IsIso f.c 
goal: CategoryTheory.IsIso f.c

full_name: AlgebraicGeometry.PresheafedSpace.isIso_of_components
code: /-- This could be used in conjunction with `CategoryTheory.NatIso.isIso_of_isIso_app`. -/
theorem isIso_of_components (f : X ⟶ Y) [IsIso f.base] [IsIso f.c] : IsIso f 
goal: CategoryTheory.IsIso f

full_name: AlgebraicGeometry.PresheafedSpace.restrict
code: /-- The restriction of a presheafed space along an open embedding into the space.
-/
@[simps]
def restrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : PresheafedSpace C 
goal: AlgebraicGeometry.PresheafedSpace C

full_name: AlgebraicGeometry.PresheafedSpace.restrict_carrier
code: /-- The restriction of a presheafed space along an open embedding into the space.
-/
@[simps]
def restrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : PresheafedSpace C 
goal: ↑(X.restrict h) = U

full_name: AlgebraicGeometry.PresheafedSpace.restrict_presheaf
code: /-- The restriction of a presheafed space along an open embedding into the space.
-/
@[simps]
def restrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : PresheafedSpace C 
goal: (X.restrict h).presheaf = ⋯.functor.op ⋙ X.presheaf

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict_c_app
code: /-- The map from the restriction of a presheafed space.
-/
@[simps]
def ofRestrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : X.restrict h ⟶ X 
goal: (X.ofRestrict h).c.app V = X.presheaf.map (⋯.adjunction.counit.app (Opposite.unop V)).op

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict
code: /-- The map from the restriction of a presheafed space.
-/
@[simps]
def ofRestrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : X.restrict h ⟶ X 
goal: X.restrict h ⟶ X

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict_base
code: /-- The map from the restriction of a presheafed space.
-/
@[simps]
def ofRestrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : X.restrict h ⟶ X 
goal: (X.ofRestrict h).base = f

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict_mono
code: instance ofRestrict_mono {U : TopCat} (X : PresheafedSpace C) (f : U ⟶ X.1) (hf : OpenEmbedding f) :
    Mono (X.ofRestrict hf) 
goal: CategoryTheory.Mono (X.ofRestrict hf)

full_name: AlgebraicGeometry.PresheafedSpace.restrict_top_presheaf
code: theorem restrict_top_presheaf (X : PresheafedSpace C) :
    (X.restrict (Opens.openEmbedding ⊤)).presheaf =
      (Opens.inclusionTopIso X.carrier).inv _* X.presheaf 
goal: (X.restrict ⋯).presheaf = (TopCat.Presheaf.pushforward C (TopologicalSpace.Opens.inclusionTopIso ↑X).inv).obj X.presheaf

full_name: AlgebraicGeometry.PresheafedSpace.ofRestrict_top_c
code: theorem ofRestrict_top_c (X : PresheafedSpace C) :
    (X.ofRestrict (Opens.openEmbedding ⊤)).c =
      eqToHom
        (by
          rw [restrict_top_presheaf, ← Presheaf.Pushforward.comp_eq]
          erw [Iso.inv_hom_id]
          rw [Presheaf.id_pushforward]
          dsimp) 
goal: (X.ofRestrict ⋯).c = CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.PresheafedSpace.toRestrictTop_c
code: /-- The map to the restriction of a presheafed space along the canonical inclusion from the top
subspace.
-/
@[simps]
def toRestrictTop (X : PresheafedSpace C) : X ⟶ X.restrict (Opens.openEmbedding ⊤) 
goal: X.toRestrictTop.c = CategoryTheory.eqToHom ⋯

full_name: AlgebraicGeometry.PresheafedSpace.toRestrictTop_base
code: /-- The map to the restriction of a presheafed space along the canonical inclusion from the top
subspace.
-/
@[simps]
def toRestrictTop (X : PresheafedSpace C) : X ⟶ X.restrict (Opens.openEmbedding ⊤) 
goal: X.toRestrictTop.base = (TopologicalSpace.Opens.inclusionTopIso ↑X).inv

full_name: AlgebraicGeometry.PresheafedSpace.toRestrictTop
code: /-- The map to the restriction of a presheafed space along the canonical inclusion from the top
subspace.
-/
@[simps]
def toRestrictTop (X : PresheafedSpace C) : X ⟶ X.restrict (Opens.openEmbedding ⊤) 
goal: X ⟶ X.restrict ⋯

full_name: AlgebraicGeometry.PresheafedSpace.restrictTopIso_inv
code: /-- The isomorphism from the restriction to the top subspace.
-/
@[simps]
def restrictTopIso (X : PresheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X 
goal: X.restrictTopIso.inv = X.toRestrictTop

full_name: AlgebraicGeometry.PresheafedSpace.restrictTopIso
code: /-- The isomorphism from the restriction to the top subspace.
-/
@[simps]
def restrictTopIso (X : PresheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X 
goal: X.restrict ⋯ ≅ X

full_name: AlgebraicGeometry.PresheafedSpace.restrictTopIso_hom
code: /-- The isomorphism from the restriction to the top subspace.
-/
@[simps]
def restrictTopIso (X : PresheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X 
goal: X.restrictTopIso.hom = X.ofRestrict ⋯

full_name: AlgebraicGeometry.PresheafedSpace.Γ_map
code: /-- The global sections, notated Gamma.
-/
@[simps]
def Γ : (PresheafedSpace C)ᵒᵖ ⥤ C 
goal: ∀ {X Y : (AlgebraicGeometry.PresheafedSpace C)ᵒᵖ} (f : X ⟶ Y),
  AlgebraicGeometry.PresheafedSpace.Γ.map f = f.unop.c.app (Opposite.op ⊤)

full_name: AlgebraicGeometry.PresheafedSpace.Γ_obj
code: /-- The global sections, notated Gamma.
-/
@[simps]
def Γ : (PresheafedSpace C)ᵒᵖ ⥤ C 
goal: AlgebraicGeometry.PresheafedSpace.Γ.obj X = (Opposite.unop X).presheaf.obj (Opposite.op ⊤)

full_name: AlgebraicGeometry.PresheafedSpace.Γ
code: /-- The global sections, notated Gamma.
-/
@[simps]
def Γ : (PresheafedSpace C)ᵒᵖ ⥤ C 
goal: (AlgebraicGeometry.PresheafedSpace C)ᵒᵖ ⥤ C

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

full_name: AlgebraicGeometry.PresheafedSpace.Γ_map_op
code: theorem Γ_map_op {X Y : PresheafedSpace C} (f : X ⟶ Y) : Γ.map f.op = f.c.app (op ⊤) 
goal: AlgebraicGeometry.PresheafedSpace.Γ.map f.op = f.c.app (Opposite.op ⊤)

full_name: CategoryTheory.Functor.mapPresheaf
code: /-- We can apply a functor `F : C ⥤ D` to the values of the presheaf in any `PresheafedSpace C`,
    giving a functor `PresheafedSpace C ⥤ PresheafedSpace D` -/
def mapPresheaf (F : C ⥤ D) : PresheafedSpace C ⥤ PresheafedSpace D 
goal: AlgebraicGeometry.PresheafedSpace C ⥤ AlgebraicGeometry.PresheafedSpace D

full_name: CategoryTheory.Functor.mapPresheaf_obj_X
code: @[simp]
theorem mapPresheaf_obj_X (F : C ⥤ D) (X : PresheafedSpace C) :
    (F.mapPresheaf.obj X : TopCat) = (X : TopCat) 
goal: ↑(F.mapPresheaf.obj X) = ↑X

full_name: CategoryTheory.Functor.mapPresheaf_obj_presheaf
code: @[simp]
theorem mapPresheaf_obj_presheaf (F : C ⥤ D) (X : PresheafedSpace C) :
    (F.mapPresheaf.obj X).presheaf = X.presheaf ⋙ F 
goal: (F.mapPresheaf.obj X).presheaf = X.presheaf ⋙ F

full_name: CategoryTheory.Functor.mapPresheaf_map_f
code: @[simp]
theorem mapPresheaf_map_f (F : C ⥤ D) {X Y : PresheafedSpace C} (f : X ⟶ Y) :
    (F.mapPresheaf.map f).base = f.base 
goal: (F.mapPresheaf.map f).base = f.base

full_name: CategoryTheory.Functor.mapPresheaf_map_c
code: @[simp]
theorem mapPresheaf_map_c (F : C ⥤ D) {X Y : PresheafedSpace C} (f : X ⟶ Y) :
    (F.mapPresheaf.map f).c = whiskerRight f.c F 
goal: (F.mapPresheaf.map f).c = CategoryTheory.whiskerRight f.c F

full_name: CategoryTheory.NatTrans.onPresheaf
code: /-- A natural transformation induces a natural transformation between the `map_presheaf` functors.
-/
def onPresheaf {F G : C ⥤ D} (α : F ⟶ G) : G.mapPresheaf ⟶ F.mapPresheaf 
goal: G.mapPresheaf ⟶ F.mapPresheaf