Built with
doc-gen4, running Lean4.
Bubbles (
) indicate interactive fragments: hover for details, tap to reveal contents.
Use
Ctrl+โCtrl+โto navigate,
Ctrl+๐ฑ๏ธto focus.
On Mac, use
Cmdinstead of
Ctrl.
/-
Copyright (c) 2020 Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bhavik Mehta
Ported by: Joรซl Riou
! This file was ported from Lean 3 source module category_theory.essential_image
! leanprover-community/mathlib commit 550b58538991c8977703fdeb7c9d51a5aa27df11
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.NatIso
import Mathlib.CategoryTheory.FullSubcategory
/-!
# Essential image of a functor
The essential image `essImage` of a functor consists of the objects in the target category which
are isomorphic to an object in the image of the object function.
This, for instance, allows us to talk about objects belonging to a subcategory expressed as a
functor rather than a subtype, preserving the principle of equivalence. For example this lets us
define exponential ideals.
The essential image can also be seen as a subcategory of the target category, and witnesses that
a functor decomposes into a essentially surjective functor and a fully faithful functor.
(TODO: show that this decomposition forms an orthogonal factorisation system).
-/
universe vโ vโ uโ uโ
noncomputable section
namespace CategoryTheory
variable {C : Type uโ} {D : Type uโ} [Category: Type ?u.698 โ Type (max?u.698(vโ+1))
Category.{vโ} C] [Category: Type ?u.192 โ Type (max?u.192(vโ+1))
Category.{vโ} D] {F : C โฅค D}
namespace Functor
/-- 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 := fun Y => โ X : C, Nonempty (F.obj X โ
Y)
#align category_theory.functor.ess_image CategoryTheory.Functor.essImage
/-- Get the witnessing object that `Y` is in the subcategory given by `F`. -/
def essImage.witness {Y : D} (h : Y โ F.essImage) : C :=
h.choose: {ฮฑ : Sort ?u.270} โ {p : ฮฑ โ Prop} โ (โ a, p a) โ ฮฑ
choose
#align category_theory.functor.ess_image.witness CategoryTheory.Functor.essImage.witness
/-- 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 :=
Classical.choice h.choose_spec
#align category_theory.functor.ess_image.get_iso CategoryTheory.Functor.essImage.getIso
/-- 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 :=
hY.imp: โ {ฮฑ : Sort ?u.896} {p q : ฮฑ โ Prop}, (โ (a : ฮฑ), p a โ q a) โ (โ a, p a) โ โ a, q a
imp fun _ => Nonempty.map (ยท โชโซ h)
#align category_theory.functor.ess_image.of_iso CategoryTheory.Functor.essImage.ofIso
/-- 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' :=
hY.imp: โ {ฮฑ : Sort ?u.1211} {p q : ฮฑ โ Prop}, (โ (a : ฮฑ), p a โ q a) โ (โ a, p a) โ โ a, q a
imp fun X => Nonempty.map fun t => h.symm: {C : Type ?u.1268} โ [inst : Category C] โ {X Y : C} โ (X โ
Y) โ (Y โ
X)
symm.app: {C : Type ?u.1292} โ
[inst : Category C] โ
{D : Type ?u.1291} โ [inst_1 : Category D] โ {F G : C โฅค D} โ (F โ
G) โ (X : C) โ F.obj X โ
G.obj X
app X โชโซ t
#align category_theory.functor.ess_image.of_nat_iso CategoryTheory.Functor.essImage.ofNatIso
/-- Isomorphic functors have equal essential images. -/
theorem essImage_eq_of_natIso {F' : C โฅค D} (h : F โ
F') : essImage F = essImage F' :=
funext: โ {ฮฑ : Sort ?u.1470} {ฮฒ : ฮฑ โ Sort ?u.1469} {f g : (x : ฮฑ) โ ฮฒ x}, (โ (x : ฮฑ), f x = g x) โ f = g
funext fun _ => propext: โ {a b : Prop}, (a โ b) โ a = b
propext โจessImage.ofNatIso h, essImage.ofNatIso h.symm: {C : Type ?u.1548} โ [inst : Category C] โ {X Y : C} โ (X โ
Y) โ (Y โ
X)
symmโฉ
#align category_theory.functor.ess_image_eq_of_nat_iso CategoryTheory.Functor.essImage_eq_of_natIso
/-- An object in the image is in the essential image. -/
theorem obj_mem_essImage (F : D โฅค C) (Y : D) : F.obj Y โ essImage F :=
โจY, โจIso.refl: {C : Type ?u.1792} โ [inst : Category C] โ (X : C) โ X โ
X
Iso.refl _โฉโฉ
#align category_theory.functor.obj_mem_ess_image CategoryTheory.Functor.obj_mem_essImage
/-- The essential image of a functor, interpreted of a full subcategory of the target category. -/
-- Porting note: no hasNonEmptyInstance linter yet
def EssImageSubcategory: (F : C โฅค D) โ ?m.1867 F
EssImageSubcategory (F : C โฅค D) :=
FullSubcategory: {C : Type ?u.1870} โ (C โ Prop) โ Type ?u.1870
FullSubcategory F.essImage
#align category_theory.functor.ess_image_subcategory CategoryTheory.Functor.EssImageSubcategory: {C : Type uโ} โ {D : Type uโ} โ [inst : Category C] โ [inst_1 : Category D] โ C โฅค D โ Type uโ
CategoryTheory.Functor.EssImageSubcategory
-- Porting note: `deriving Category` is not able to derive this instance
instance : Category: Type ?u.1937 โ Type (max?u.1937(?u.1938+1))
Category (EssImageSubcategory F) :=
(inferInstance: {ฮฑ : Sort ?u.1997} โ [i : ฮฑ] โ ฮฑ
inferInstance : Category: Type ?u.1993 โ Type (max?u.1993(vโ+1))
Category.{vโ} (FullSubcategory: {C : Type ?u.1994} โ (C โ Prop) โ Type ?u.1994
FullSubcategory _))
/-- The essential image as a subcategory has a fully faithful inclusion into the target category. -/
@[simps!]
def essImageInclusion (F : C โฅค D) : F.EssImageSubcategory โฅค D :=
fullSubcategoryInclusion _
#align category_theory.functor.ess_image_inclusion CategoryTheory.Functor.essImageInclusion
#align category_theory.functor.ess_image_inclusion_obj CategoryTheory.Functor.essImageInclusion_obj
#align category_theory.functor.ess_image_inclusion_map CategoryTheory.Functor.essImageInclusion_map
-- Porting note: `deriving Full` is not able to derive this instance
instance : Full (essImageInclusion F) :=
(inferInstance: {ฮฑ : Sort ?u.2726} โ [i : ฮฑ] โ ฮฑ
inferInstance : Full (fullSubcategoryInclusion _))
-- Porting note: `deriving Faithful` is not able to derive this instance
instance : Faithful (essImageInclusion F) :=
(inferInstance: โ {ฮฑ : Sort ?u.3293} [i : ฮฑ], ฮฑ
inferInstance : Faithful (fullSubcategoryInclusion _))
/--
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 :=
FullSubcategory.lift _ F (obj_mem_essImage _)
#align category_theory.functor.to_ess_image CategoryTheory.Functor.toEssImage
#align category_theory.functor.to_ess_image_map CategoryTheory.Functor.toEssImage_map
#align category_theory.functor.to_ess_image_obj_obj CategoryTheory.Functor.toEssImage_obj_obj
/-- 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 :=
FullSubcategory.lift_comp_inclusion _ _ _: โ (X : ?m.4073), ?m.4077 (?m.4078.obj X)
_
#align category_theory.functor.to_ess_image_comp_essential_image_inclusion CategoryTheory.Functor.toEssImageCompEssentialImageInclusion
#align category_theory.functor.to_ess_image_comp_essential_image_inclusion_hom_app CategoryTheory.Functor.toEssImageCompEssentialImageInclusion_hom_app
#align category_theory.functor.to_ess_image_comp_essential_image_inclusion_inv_app CategoryTheory.Functor.toEssImageCompEssentialImageInclusion_inv_app
end Functor
/-- 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 .
-/
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
#align category_theory.ess_surj CategoryTheory.EssSurj
instance :
EssSurj
F.toEssImage where mem_essImage := fun โจ_, hYโฉ =>
โจ_, โจโจ_, _, hY.getIso.hom_inv_id: โ {C : Type ?u.5199} [inst : Category C] {X Y : C} (self : X โ
Y), self.hom โซ self.inv = ๐ X
hom_inv_id, hY.getIso.inv_hom_id: โ {C : Type ?u.5250} [inst : Category C] {X Y : C} (self : X โ
Y), self.inv โซ self.hom = ๐ Y
inv_hom_idโฉโฉโฉ
variable (F) [EssSurj F]
/-- 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 Functor.objPreimage (Y : D) : C :=
essImage.witness (@EssSurj.mem_essImage _ _ _ _ F _ Y)
#align category_theory.functor.obj_preimage CategoryTheory.Functor.objPreimage: {C : Type uโ} โ {D : Type uโ} โ [inst : Category C] โ [inst_1 : Category D] โ (F : C โฅค D) โ [inst : EssSurj F] โ D โ C
CategoryTheory.Functor.objPreimage
/-- Applying an essentially surjective functor to a preimage of `Y` yields an object that is
isomorphic to `Y`. -/
def Functor.objObjPreimageIso: (Y : D) โ F.obj (objPreimage F Y) โ
Y
Functor.objObjPreimageIso (Y : D) : F.obj (F.objPreimage Y) โ
Y :=
Functor.essImage.getIso _
#align category_theory.functor.obj_obj_preimage_iso CategoryTheory.Functor.objObjPreimageIso
/-- The induced functor of a faithful functor is faithful -/
instance Faithful.toEssImage (F : C โฅค D) [Faithful F] : Faithful F.toEssImage :=
Faithful.of_comp_iso F.toEssImageCompEssentialImageInclusion
#align category_theory.faithful.to_ess_image CategoryTheory.Faithful.toEssImage
/-- The induced functor of a full functor is full -/
instance Full.toEssImage (F : C โฅค D) [Full F] : Full F.toEssImage :=
haveI := Full.ofIso F.toEssImageCompEssentialImageInclusion.symm: {C : Type ?u.6972} โ [inst : Category C] โ {X Y : C} โ (X โ
Y) โ (Y โ
X)
symm
Full.ofCompFaithful F.toEssImage F.essImageInclusion
#align category_theory.full.to_ess_image CategoryTheory.Full.toEssImage
end CategoryTheory