File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf
code: /-- A subpresheaf of a presheaf consists of a subset of `F.obj U` for every `U`,
compatible with the restriction maps `F.map i`. -/
@[ext]
structure Subpresheaf (F : Cᵒᵖ ⥤ Type w) where
  /-- If `G` is a sub-presheaf of `F`, then the sections of `G` on `U` forms a subset of sections of
    `F` on `U`. -/
  obj : ∀ U, Set (F.obj U)
  /-- If `G` is a sub-presheaf of `F` and `i : U ⟶ V`, then for each `G`-sections on `U` `x`,
    `F i x` is in `F(V)`. -/
  map : ∀ {U V : Cᵒᵖ} (i : U ⟶ V), obj U ⊆ F.map i ⁻¹' obj V
goal: Type (max u w)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.map
code: /-- A subpresheaf of a presheaf consists of a subset of `F.obj U` for every `U`,
compatible with the restriction maps `F.map i`. -/
@[ext]
structure Subpresheaf (F : Cᵒᵖ ⥤ Type w) where
  /-- If `G` is a sub-presheaf of `F`, then the sections of `G` on `U` forms a subset of sections of
    `F` on `U`. -/
  obj : ∀ U, Set (F.obj U)
  /-- If `G` is a sub-presheaf of `F` and `i : U ⟶ V`, then for each `G`-sections on `U` `x`,
    `F i x` is in `F(V)`. -/
  map : ∀ {U V : Cᵒᵖ} (i : U ⟶ V), obj U ⊆ F.map i ⁻¹' obj V
goal: self.obj U ⊆ F.map i ⁻¹' self.obj V

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.obj
code: /-- A subpresheaf of a presheaf consists of a subset of `F.obj U` for every `U`,
compatible with the restriction maps `F.map i`. -/
@[ext]
structure Subpresheaf (F : Cᵒᵖ ⥤ Type w) where
  /-- If `G` is a sub-presheaf of `F`, then the sections of `G` on `U` forms a subset of sections of
    `F` on `U`. -/
  obj : ∀ U, Set (F.obj U)
  /-- If `G` is a sub-presheaf of `F` and `i : U ⟶ V`, then for each `G`-sections on `U` `x`,
    `F i x` is in `F(V)`. -/
  map : ∀ {U V : Cᵒᵖ} (i : U ⟶ V), obj U ⊆ F.map i ⁻¹' obj V
goal: Set (F.obj U)

full_name: CategoryTheory.GrothendieckTopology.instPartialOrderSubpresheaf
code: instance : PartialOrder (Subpresheaf F) 
goal: PartialOrder (CategoryTheory.GrothendieckTopology.Subpresheaf F)

full_name: CategoryTheory.GrothendieckTopology.instTopSubpresheaf
code: instance : Top (Subpresheaf F) 
goal: Top (CategoryTheory.GrothendieckTopology.Subpresheaf F)

full_name: CategoryTheory.GrothendieckTopology.instNonemptySubpresheaf
code: instance : Nonempty (Subpresheaf F) 
goal: Nonempty (CategoryTheory.GrothendieckTopology.Subpresheaf F)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.toPresheaf_obj
code: /-- The subpresheaf as a presheaf. -/
@[simps!]
def Subpresheaf.toPresheaf : Cᵒᵖ ⥤ Type w 
goal: G.toPresheaf.obj U = ↑(G.obj U)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.toPresheaf_map_coe
code: /-- The subpresheaf as a presheaf. -/
@[simps!]
def Subpresheaf.toPresheaf : Cᵒᵖ ⥤ Type w 
goal: ↑(G.toPresheaf.map i x) = F.map i ↑x

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.toPresheaf
code: /-- The subpresheaf as a presheaf. -/
@[simps!]
def Subpresheaf.toPresheaf : Cᵒᵖ ⥤ Type w 
goal: Cᵒᵖ ⥤ Type w

full_name: CategoryTheory.GrothendieckTopology.instCoeHeadObjOppositeToPresheaf
code: instance {U} : CoeHead (G.toPresheaf.obj U) (F.obj U) 
goal: CoeHead (G.toPresheaf.obj U) (F.obj U)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.ι
code: /-- The inclusion of a subpresheaf to the original presheaf. -/
@[simps]
def Subpresheaf.ι : G.toPresheaf ⟶ F 
goal: G.toPresheaf ⟶ F

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.ι_app
code: /-- The inclusion of a subpresheaf to the original presheaf. -/
@[simps]
def Subpresheaf.ι : G.toPresheaf ⟶ F 
goal: G.ι.app U x = ↑x

full_name: CategoryTheory.GrothendieckTopology.instMonoFunctorOppositeTypeι
code: instance : Mono G.ι 
goal: CategoryTheory.Mono G.ι

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe
code: /-- The inclusion of a subpresheaf to a larger subpresheaf -/
@[simps]
def Subpresheaf.homOfLe {G G' : Subpresheaf F} (h : G ≤ G') : G.toPresheaf ⟶ G'.toPresheaf 
goal: G.toPresheaf ⟶ G'.toPresheaf

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe_app_coe
code: /-- The inclusion of a subpresheaf to a larger subpresheaf -/
@[simps]
def Subpresheaf.homOfLe {G G' : Subpresheaf F} (h : G ≤ G') : G.toPresheaf ⟶ G'.toPresheaf 
goal: ↑((CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe h).app U x) = ↑x

full_name: CategoryTheory.GrothendieckTopology.instMonoFunctorOppositeTypeHomOfLe
code: instance {G G' : Subpresheaf F} (h : G ≤ G') : Mono (Subpresheaf.homOfLe h) 
goal: CategoryTheory.Mono (CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe h)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe_ι
code: @[reassoc (attr := simp)]
theorem Subpresheaf.homOfLe_ι {G G' : Subpresheaf F} (h : G ≤ G') :
    Subpresheaf.homOfLe h ≫ G'.ι = G.ι 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe h ≫ G'.ι = G.ι

full_name: CategoryTheory.GrothendieckTopology.instIsIsoFunctorOppositeTypeιTopSubpresheaf
code: instance : IsIso (Subpresheaf.ι (⊤ : Subpresheaf F)) 
goal: CategoryTheory.IsIso ⊤.ι

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.eq_top_iff_isIso
code: theorem Subpresheaf.eq_top_iff_isIso : G = ⊤ ↔ IsIso G.ι 
goal: G = ⊤ ↔ CategoryTheory.IsIso G.ι

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.lift_app_coe
code: /-- If the image of a morphism falls in a subpresheaf, then the morphism factors through it. -/
@[simps!]
def Subpresheaf.lift (f : F' ⟶ F) (hf : ∀ U x, f.app U x ∈ G.obj U) : F' ⟶ G.toPresheaf 
goal: ↑((G.lift f hf).app U x) = f.app U x

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.lift
code: /-- If the image of a morphism falls in a subpresheaf, then the morphism factors through it. -/
@[simps!]
def Subpresheaf.lift (f : F' ⟶ F) (hf : ∀ U x, f.app U x ∈ G.obj U) : F' ⟶ G.toPresheaf 
goal: F' ⟶ G.toPresheaf

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.lift_ι
code: @[reassoc (attr := simp)]
theorem Subpresheaf.lift_ι (f : F' ⟶ F) (hf : ∀ U x, f.app U x ∈ G.obj U) :
    G.lift f hf ≫ G.ι = f 
goal: G.lift f hf ≫ G.ι = f

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sieveOfSection
code: /-- Given a subpresheaf `G` of `F`, an `F`-section `s` on `U`, we may define a sieve of `U`
consisting of all `f : V ⟶ U` such that the restriction of `s` along `f` is in `G`. -/
@[simps]
def Subpresheaf.sieveOfSection {U : Cᵒᵖ} (s : F.obj U) : Sieve (unop U) 
goal: CategoryTheory.Sieve (Opposite.unop U)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sieveOfSection_apply
code: /-- Given a subpresheaf `G` of `F`, an `F`-section `s` on `U`, we may define a sieve of `U`
consisting of all `f : V ⟶ U` such that the restriction of `s` along `f` is in `G`. -/
@[simps]
def Subpresheaf.sieveOfSection {U : Cᵒᵖ} (s : F.obj U) : Sieve (unop U) 
goal: (G.sieveOfSection s).arrows f = (F.map f.op s ∈ G.obj (Opposite.op V))

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.familyOfElementsOfSection
code: /-- Given an `F`-section `s` on `U` and a subpresheaf `G`, we may define a family of elements in
`G` consisting of the restrictions of `s` -/
def Subpresheaf.familyOfElementsOfSection {U : Cᵒᵖ} (s : F.obj U) :
    (G.sieveOfSection s).1.FamilyOfElements G.toPresheaf 
goal: CategoryTheory.Presieve.FamilyOfElements G.toPresheaf (G.sieveOfSection s).arrows

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.family_of_elements_compatible
code: theorem Subpresheaf.family_of_elements_compatible {U : Cᵒᵖ} (s : F.obj U) :
    (G.familyOfElementsOfSection s).Compatible 
goal: (G.familyOfElementsOfSection s).Compatible

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.nat_trans_naturality
code: theorem Subpresheaf.nat_trans_naturality (f : F' ⟶ G.toPresheaf) {U V : Cᵒᵖ} (i : U ⟶ V)
    (x : F'.obj U) : (f.app V (F'.map i x)).1 = F.map i (f.app U x).1 
goal: ↑(f.app V (F'.map i x)) = F.map i ↑(f.app U x)

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify
code: /-- The sheafification of a subpresheaf as a subpresheaf.
Note that this is a sheaf only when the whole presheaf is a sheaf. -/
def Subpresheaf.sheafify : Subpresheaf F 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf F

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.le_sheafify
code: theorem Subpresheaf.le_sheafify : G ≤ G.sheafify J 
goal: G ≤ CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.eq_sheafify
code: theorem Subpresheaf.eq_sheafify (h : Presieve.IsSheaf J F) (hG : Presieve.IsSheaf J G.toPresheaf) :
    G = G.sheafify J 
goal: G = CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify_isSheaf
code: theorem Subpresheaf.sheafify_isSheaf (hF : Presieve.IsSheaf J F) :
    Presieve.IsSheaf J (G.sheafify J).toPresheaf 
goal: CategoryTheory.Presieve.IsSheaf J (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G).toPresheaf

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.eq_sheafify_iff
code: theorem Subpresheaf.eq_sheafify_iff (h : Presieve.IsSheaf J F) :
    G = G.sheafify J ↔ Presieve.IsSheaf J G.toPresheaf 
goal: G = CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G ↔ CategoryTheory.Presieve.IsSheaf J G.toPresheaf

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.isSheaf_iff
code: theorem Subpresheaf.isSheaf_iff (h : Presieve.IsSheaf J F) :
    Presieve.IsSheaf J G.toPresheaf ↔
      ∀ (U) (s : F.obj U), G.sieveOfSection s ∈ J (unop U) → s ∈ G.obj U 
goal: CategoryTheory.Presieve.IsSheaf J G.toPresheaf ↔
  ∀ (U : Cᵒᵖ) (s : F.obj U), G.sieveOfSection s ∈ J.sieves (Opposite.unop U) → s ∈ G.obj U

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify_sheafify
code: theorem Subpresheaf.sheafify_sheafify (h : Presieve.IsSheaf J F) :
    (G.sheafify J).sheafify J = G.sheafify J 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
    (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G) =
  CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafifyLift
code: /-- The lift of a presheaf morphism onto the sheafification subpresheaf.  -/
noncomputable def Subpresheaf.sheafifyLift (f : G.toPresheaf ⟶ F') (h : Presieve.IsSheaf J F') :
    (G.sheafify J).toPresheaf ⟶ F' 
goal: (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G).toPresheaf ⟶ F'

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.to_sheafifyLift
code: theorem Subpresheaf.to_sheafifyLift (f : G.toPresheaf ⟶ F') (h : Presieve.IsSheaf J F') :
    Subpresheaf.homOfLe (G.le_sheafify J) ≫ G.sheafifyLift f h = f 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe ⋯ ≫ G.sheafifyLift f h = f

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.to_sheafify_lift_unique
code: theorem Subpresheaf.to_sheafify_lift_unique (h : Presieve.IsSheaf J F')
    (l₁ l₂ : (G.sheafify J).toPresheaf ⟶ F')
    (e : Subpresheaf.homOfLe (G.le_sheafify J) ≫ l₁ = Subpresheaf.homOfLe (G.le_sheafify J) ≫ l₂) :
    l₁ = l₂ 
goal: l₁ = l₂

full_name: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify_le
code: theorem Subpresheaf.sheafify_le (h : G ≤ G') (hF : Presieve.IsSheaf J F)
    (hG' : Presieve.IsSheaf J G'.toPresheaf) : G.sheafify J ≤ G' 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G ≤ G'

full_name: CategoryTheory.GrothendieckTopology.imagePresheaf
code: /-- The image presheaf of a morphism, whose components are the set-theoretic images. -/
@[simps]
def imagePresheaf (f : F' ⟶ F) : Subpresheaf F 
goal: CategoryTheory.GrothendieckTopology.Subpresheaf F

full_name: CategoryTheory.GrothendieckTopology.imagePresheaf_obj
code: /-- The image presheaf of a morphism, whose components are the set-theoretic images. -/
@[simps]
def imagePresheaf (f : F' ⟶ F) : Subpresheaf F 
goal: (CategoryTheory.GrothendieckTopology.imagePresheaf f).obj U = Set.range (f.app U)

full_name: CategoryTheory.GrothendieckTopology.top_subpresheaf_obj
code: @[simp]
theorem top_subpresheaf_obj (U) : (⊤ : Subpresheaf F).obj U = ⊤ 
goal: ⊤.obj U = ⊤

full_name: CategoryTheory.GrothendieckTopology.imagePresheaf_id
code: @[simp]
theorem imagePresheaf_id : imagePresheaf (𝟙 F) = ⊤ 
goal: CategoryTheory.GrothendieckTopology.imagePresheaf (𝟙 F) = ⊤

full_name: CategoryTheory.GrothendieckTopology.toImagePresheaf
code: /-- A morphism factors through the image presheaf. -/
@[simps!]
def toImagePresheaf (f : F' ⟶ F) : F' ⟶ (imagePresheaf f).toPresheaf 
goal: F' ⟶ (CategoryTheory.GrothendieckTopology.imagePresheaf f).toPresheaf

full_name: CategoryTheory.GrothendieckTopology.toImagePresheaf_app_coe
code: /-- A morphism factors through the image presheaf. -/
@[simps!]
def toImagePresheaf (f : F' ⟶ F) : F' ⟶ (imagePresheaf f).toPresheaf 
goal: ↑((CategoryTheory.GrothendieckTopology.toImagePresheaf f).app U x) = f.app U x

full_name: CategoryTheory.GrothendieckTopology.toImagePresheafSheafify_app_coe
code: /-- A morphism factors through the sheafification of the image presheaf. -/
@[simps!]
def toImagePresheafSheafify (f : F' ⟶ F) : F' ⟶ ((imagePresheaf f).sheafify J).toPresheaf 
goal: ∀ (a : F'.obj X), ↑((J.toImagePresheafSheafify f).app X a) = f.app X a

full_name: CategoryTheory.GrothendieckTopology.toImagePresheafSheafify
code: /-- A morphism factors through the sheafification of the image presheaf. -/
@[simps!]
def toImagePresheafSheafify (f : F' ⟶ F) : F' ⟶ ((imagePresheaf f).sheafify J).toPresheaf 
goal: F' ⟶
  (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf f)).toPresheaf

full_name: CategoryTheory.GrothendieckTopology.toImagePresheaf_ι
code: @[reassoc (attr := simp)]
theorem toImagePresheaf_ι (f : F' ⟶ F) : toImagePresheaf f ≫ (imagePresheaf f).ι = f 
goal: CategoryTheory.GrothendieckTopology.toImagePresheaf f ≫ (CategoryTheory.GrothendieckTopology.imagePresheaf f).ι = f

full_name: CategoryTheory.GrothendieckTopology.imagePresheaf_comp_le
code: theorem imagePresheaf_comp_le (f₁ : F ⟶ F') (f₂ : F' ⟶ F'') :
    imagePresheaf (f₁ ≫ f₂) ≤ imagePresheaf f₂ 
goal: CategoryTheory.GrothendieckTopology.imagePresheaf (f₁ ≫ f₂) ≤ CategoryTheory.GrothendieckTopology.imagePresheaf f₂

full_name: CategoryTheory.GrothendieckTopology.isIso_toImagePresheaf
code: instance isIso_toImagePresheaf {F F' : Cᵒᵖ ⥤ TypeMax.{v, w}} (f : F ⟶ F') [hf : Mono f] :
  IsIso (toImagePresheaf f) 
goal: CategoryTheory.IsIso (CategoryTheory.GrothendieckTopology.toImagePresheaf f)

full_name: CategoryTheory.GrothendieckTopology.imageSheaf
code: /-- The image sheaf of a morphism between sheaves, defined to be the sheafification of
`image_presheaf`. -/
@[simps]
def imageSheaf {F F' : Sheaf J (Type w)} (f : F ⟶ F') : Sheaf J (Type w) 
goal: CategoryTheory.Sheaf J (Type w)

full_name: CategoryTheory.GrothendieckTopology.imageSheaf_val
code: /-- The image sheaf of a morphism between sheaves, defined to be the sheafification of
`image_presheaf`. -/
@[simps]
def imageSheaf {F F' : Sheaf J (Type w)} (f : F ⟶ F') : Sheaf J (Type w) 
goal: (CategoryTheory.GrothendieckTopology.imageSheaf f).val =
  (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf f.val)).toPresheaf

full_name: CategoryTheory.GrothendieckTopology.toImageSheaf
code: /-- A morphism factors through the image sheaf. -/
@[simps]
def toImageSheaf {F F' : Sheaf J (Type w)} (f : F ⟶ F') : F ⟶ imageSheaf f 
goal: F ⟶ CategoryTheory.GrothendieckTopology.imageSheaf f

full_name: CategoryTheory.GrothendieckTopology.toImageSheaf_val
code: /-- A morphism factors through the image sheaf. -/
@[simps]
def toImageSheaf {F F' : Sheaf J (Type w)} (f : F ⟶ F') : F ⟶ imageSheaf f 
goal: (CategoryTheory.GrothendieckTopology.toImageSheaf f).val = J.toImagePresheafSheafify f.val

full_name: CategoryTheory.GrothendieckTopology.imageSheafι
code: /-- The inclusion of the image sheaf to the target. -/
@[simps]
def imageSheafι {F F' : Sheaf J (Type w)} (f : F ⟶ F') : imageSheaf f ⟶ F' 
goal: CategoryTheory.GrothendieckTopology.imageSheaf f ⟶ F'

full_name: CategoryTheory.GrothendieckTopology.imageSheafι_val
code: /-- The inclusion of the image sheaf to the target. -/
@[simps]
def imageSheafι {F F' : Sheaf J (Type w)} (f : F ⟶ F') : imageSheaf f ⟶ F' 
goal: (CategoryTheory.GrothendieckTopology.imageSheafι f).val =
  (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf f.val)).ι

full_name: CategoryTheory.GrothendieckTopology.toImageSheaf_ι
code: @[reassoc (attr := simp)]
theorem toImageSheaf_ι {F F' : Sheaf J (Type w)} (f : F ⟶ F') :
    toImageSheaf f ≫ imageSheafι f = f 
goal: CategoryTheory.GrothendieckTopology.toImageSheaf f ≫ CategoryTheory.GrothendieckTopology.imageSheafι f = f

full_name: CategoryTheory.GrothendieckTopology.instMonoSheafTypeImageSheafι
code: instance {F F' : Sheaf J (Type w)} (f : F ⟶ F') : Mono (imageSheafι f) 
goal: CategoryTheory.Mono (CategoryTheory.GrothendieckTopology.imageSheafι f)

full_name: CategoryTheory.GrothendieckTopology.instEpiSheafTypeToImageSheaf
code: instance {F F' : Sheaf J (Type w)} (f : F ⟶ F') : Epi (toImageSheaf f) 
goal: CategoryTheory.Epi (CategoryTheory.GrothendieckTopology.toImageSheaf f)

full_name: CategoryTheory.GrothendieckTopology.imageMonoFactorization
code: /-- The mono factorization given by `image_sheaf` for a morphism. -/
def imageMonoFactorization {F F' : Sheaf J (Type w)} (f : F ⟶ F') : Limits.MonoFactorisation f 
goal: CategoryTheory.Limits.MonoFactorisation f

full_name: CategoryTheory.GrothendieckTopology.imageFactorization
code: /-- The mono factorization given by `image_sheaf` for a morphism is an image. -/
noncomputable def imageFactorization {F F' : Sheaf J TypeMax.{v, u}} (f : F ⟶ F') :
    Limits.ImageFactorisation f 
goal: CategoryTheory.Limits.ImageFactorisation f

full_name: CategoryTheory.GrothendieckTopology.instHasImagesSheafType
code: instance : Limits.HasImages (Sheaf J (Type max v u)) 
goal: CategoryTheory.Limits.HasImages (CategoryTheory.Sheaf J (Type (max v u)))