File: Mathlib/CategoryTheory/EssentialImage.lean

full_name: CategoryTheory.Functor.essImage
code: /-- The essential image of a functor `F` consists of those objects in the target category which are
isomorphic to an object in the image of the function `F.obj`. In other words, this is the closure
under isomorphism of the function `F.obj`.
This is the "non-evil" way of describing the image of a functor.
-/
def essImage (F : C ⥤ D) : Set D 
goal: Set D

full_name: CategoryTheory.Functor.essImage.witness
code: /-- Get the witnessing object that `Y` is in the subcategory given by `F`. -/
def essImage.witness {Y : D} (h : Y ∈ F.essImage) : C 
goal: C

full_name: CategoryTheory.Functor.essImage.getIso
code: /-- Extract the isomorphism between `F.obj h.witness` and `Y` itself. -/
-- Porting note: in the next, the dot notation `h.witness` no longer works
def essImage.getIso {Y : D} (h : Y ∈ F.essImage) : F.obj (essImage.witness h) ≅ Y 
goal: F.obj (CategoryTheory.Functor.essImage.witness h) ≅ Y

full_name: CategoryTheory.Functor.essImage.ofIso
code: /-- Being in the essential image is a "hygienic" property: it is preserved under isomorphism. -/
theorem essImage.ofIso {Y Y' : D} (h : Y ≅ Y') (hY : Y ∈ essImage F) : Y' ∈ essImage F 
goal: Y' ∈ F.essImage

full_name: CategoryTheory.Functor.essImage.ofNatIso
code: /-- If `Y` is in the essential image of `F` then it is in the essential image of `F'` as long as
`F ≅ F'`.
-/
theorem essImage.ofNatIso {F' : C ⥤ D} (h : F ≅ F') {Y : D} (hY : Y ∈ essImage F) :
    Y ∈ essImage F' 
goal: Y ∈ F'.essImage

full_name: CategoryTheory.Functor.essImage_eq_of_natIso
code: /-- Isomorphic functors have equal essential images. -/
theorem essImage_eq_of_natIso {F' : C ⥤ D} (h : F ≅ F') : essImage F = essImage F' 
goal: F.essImage = F'.essImage

full_name: CategoryTheory.Functor.obj_mem_essImage
code: /-- An object in the image is in the essential image. -/
theorem obj_mem_essImage (F : D ⥤ C) (Y : D) : F.obj Y ∈ essImage F 
goal: F.obj Y ∈ F.essImage

full_name: CategoryTheory.Functor.EssImageSubcategory
code: /-- The essential image of a functor, interpreted as a full subcategory of the target category. -/
-- Porting note: no hasNonEmptyInstance linter yet
def EssImageSubcategory (F : C ⥤ D) 
goal: Type u₂

full_name: CategoryTheory.Functor.instCategoryEssImageSubcategory
code: instance : Category (EssImageSubcategory F) 
goal: CategoryTheory.Category.{v₂, u₂} F.EssImageSubcategory

full_name: CategoryTheory.Functor.essImageInclusion_obj
code: /-- The essential image as a subcategory has a fully faithful inclusion into the target category. -/
@[simps!]
def essImageInclusion (F : C ⥤ D) : F.EssImageSubcategory ⥤ D 
goal: F.essImageInclusion.obj self = self.obj

full_name: CategoryTheory.Functor.essImageInclusion_map
code: /-- The essential image as a subcategory has a fully faithful inclusion into the target category. -/
@[simps!]
def essImageInclusion (F : C ⥤ D) : F.EssImageSubcategory ⥤ D 
goal: ∀ {X Y : CategoryTheory.InducedCategory D CategoryTheory.FullSubcategory.obj} (f : X ⟶ Y), F.essImageInclusion.map f = f

full_name: CategoryTheory.Functor.essImageInclusion
code: /-- The essential image as a subcategory has a fully faithful inclusion into the target category. -/
@[simps!]
def essImageInclusion (F : C ⥤ D) : F.EssImageSubcategory ⥤ D 
goal: CategoryTheory.Functor F.EssImageSubcategory D

full_name: CategoryTheory.Functor.instFullEssImageSubcategoryEssImageInclusion
code: instance : Full (essImageInclusion F) 
goal: F.essImageInclusion.Full

full_name: CategoryTheory.Functor.instFaithfulEssImageSubcategoryEssImageInclusion
code: instance : Faithful (essImageInclusion F) 
goal: F.essImageInclusion.Faithful

full_name: CategoryTheory.Functor.toEssImage_obj_obj
code: /--
Given a functor `F : C ⥤ D`, we have an (essentially surjective) functor from `C` to the essential
image of `F`.
-/
@[simps!]
def toEssImage (F : C ⥤ D) : C ⥤ F.EssImageSubcategory 
goal: (F.toEssImage.obj X).obj = F.obj X

full_name: CategoryTheory.Functor.toEssImage
code: /--
Given a functor `F : C ⥤ D`, we have an (essentially surjective) functor from `C` to the essential
image of `F`.
-/
@[simps!]
def toEssImage (F : C ⥤ D) : C ⥤ F.EssImageSubcategory 
goal: CategoryTheory.Functor C F.EssImageSubcategory

full_name: CategoryTheory.Functor.toEssImage_map
code: /--
Given a functor `F : C ⥤ D`, we have an (essentially surjective) functor from `C` to the essential
image of `F`.
-/
@[simps!]
def toEssImage (F : C ⥤ D) : C ⥤ F.EssImageSubcategory 
goal: ∀ {X Y : C} (f : X ⟶ Y), F.toEssImage.map f = F.map f

full_name: CategoryTheory.Functor.toEssImageCompEssentialImageInclusion_hom_app
code: /-- The functor `F` factorises through its essential image, where the first functor is essentially
surjective and the second is fully faithful.
-/
@[simps!]
def toEssImageCompEssentialImageInclusion (F : C ⥤ D) : F.toEssImage ⋙ F.essImageInclusion ≅ F 
goal: F.toEssImageCompEssentialImageInclusion.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.toEssImageCompEssentialImageInclusion
code: /-- The functor `F` factorises through its essential image, where the first functor is essentially
surjective and the second is fully faithful.
-/
@[simps!]
def toEssImageCompEssentialImageInclusion (F : C ⥤ D) : F.toEssImage ⋙ F.essImageInclusion ≅ F 
goal: F.toEssImage.comp F.essImageInclusion ≅ F

full_name: CategoryTheory.Functor.toEssImageCompEssentialImageInclusion_inv_app
code: /-- The functor `F` factorises through its essential image, where the first functor is essentially
surjective and the second is fully faithful.
-/
@[simps!]
def toEssImageCompEssentialImageInclusion (F : C ⥤ D) : F.toEssImage ⋙ F.essImageInclusion ≅ F 
goal: F.toEssImageCompEssentialImageInclusion.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.EssSurj.mem_essImage
code: /-- A functor `F : C ⥤ D` is essentially surjective if every object of `D` is in the essential
image of `F`. In other words, for every `Y : D`, there is some `X : C` with `F.obj X ≅ Y`.

See <https://stacks.math.columbia.edu/tag/001C>.
-/
class EssSurj (F : C ⥤ D) : Prop where
  /-- All the objects of the target category are in the essential image. -/
  mem_essImage (Y : D) : Y ∈ F.essImage
goal: Y ∈ F.essImage

full_name: CategoryTheory.Functor.EssSurj
code: /-- A functor `F : C ⥤ D` is essentially surjective if every object of `D` is in the essential
image of `F`. In other words, for every `Y : D`, there is some `X : C` with `F.obj X ≅ Y`.

See <https://stacks.math.columbia.edu/tag/001C>.
-/
class EssSurj (F : C ⥤ D) : Prop where
  /-- All the objects of the target category are in the essential image. -/
  mem_essImage (Y : D) : Y ∈ F.essImage
goal: Prop

full_name: CategoryTheory.Functor.EssSurj.toEssImage
code: instance EssSurj.toEssImage : EssSurj F.toEssImage 
goal: F.toEssImage.EssSurj

full_name: CategoryTheory.Functor.essSurj_of_surj
code: theorem essSurj_of_surj (h : Function.Surjective F.obj) : EssSurj F 
goal: F.EssSurj

full_name: CategoryTheory.Functor.objPreimage
code: /-- Given an essentially surjective functor, we can find a preimage for every object `Y` in the
    codomain. Applying the functor to this preimage will yield an object isomorphic to `Y`, see
    `obj_obj_preimage_iso`. -/
def objPreimage (Y : D) : C 
goal: C

full_name: CategoryTheory.Functor.objObjPreimageIso
code: /-- Applying an essentially surjective functor to a preimage of `Y` yields an object that is
    isomorphic to `Y`. -/
def objObjPreimageIso (Y : D) : F.obj (F.objPreimage Y) ≅ Y 
goal: F.obj (F.objPreimage Y) ≅ Y

full_name: CategoryTheory.Functor.Faithful.toEssImage
code: /-- The induced functor of a faithful functor is faithful. -/
instance Faithful.toEssImage (F : C ⥤ D) [Faithful F] : Faithful F.toEssImage 
goal: F.toEssImage.Faithful

full_name: CategoryTheory.Functor.Full.toEssImage
code: /-- The induced functor of a full functor is full. -/
instance Full.toEssImage (F : C ⥤ D) [Full F] : Full F.toEssImage 
goal: F.toEssImage.Full

full_name: CategoryTheory.Functor.instEssSurjId
code: instance instEssSurjId : EssSurj (𝟭 C) 
goal: (CategoryTheory.Functor.id C).EssSurj

full_name: CategoryTheory.Functor.essSurj_of_iso
code: lemma essSurj_of_iso {F G : C ⥤ D} [EssSurj F] (α : F ≅ G) : EssSurj G 
goal: G.EssSurj

full_name: CategoryTheory.Functor.essSurj_comp
code: instance essSurj_comp (F : C ⥤ D) (G : D ⥤ E) [F.EssSurj] [G.EssSurj] :
    (F ⋙ G).EssSurj 
goal: (F.comp G).EssSurj

full_name: CategoryTheory.Functor.essSurj_of_comp_fully_faithful
code: lemma essSurj_of_comp_fully_faithful (F : C ⥤ D) (G : D ⥤ E) [(F ⋙ G).EssSurj]
    [G.Faithful] [G.Full] : F.EssSurj 
goal: F.EssSurj