File: Mathlib/CategoryTheory/Adjunction/Reflective.lean

full_name: CategoryTheory.Reflective.L
code: /--
A functor is *reflective*, or *a reflective inclusion*, if it is fully faithful and right adjoint.
-/
class Reflective (R : D ⥤ C) extends R.Full, R.Faithful where
  /-- a choice of a left adjoint to `R` -/
  L : C ⥤ D
  /-- `R` is a right adjoint -/
  adj : L ⊣ R
goal: CategoryTheory.Functor C D

full_name: CategoryTheory.Reflective.adj
code: /--
A functor is *reflective*, or *a reflective inclusion*, if it is fully faithful and right adjoint.
-/
class Reflective (R : D ⥤ C) extends R.Full, R.Faithful where
  /-- a choice of a left adjoint to `R` -/
  L : C ⥤ D
  /-- `R` is a right adjoint -/
  adj : L ⊣ R
goal: CategoryTheory.Reflective.L R ⊣ R

full_name: CategoryTheory.Reflective
code: /--
A functor is *reflective*, or *a reflective inclusion*, if it is fully faithful and right adjoint.
-/
class Reflective (R : D ⥤ C) extends R.Full, R.Faithful where
  /-- a choice of a left adjoint to `R` -/
  L : C ⥤ D
  /-- `R` is a right adjoint -/
  adj : L ⊣ R
goal: Type (max (max (max u₁ u₂) v₁) v₂)

full_name: CategoryTheory.reflector
code: /-- The reflector `C ⥤ D` when `R : D ⥤ C` is reflective. -/
def reflector [Reflective i] : C ⥤ D 
goal: CategoryTheory.Functor C D

full_name: CategoryTheory.reflectorAdjunction
code: /-- The adjunction `reflector i ⊣ i` when `i` is reflective. -/
def reflectorAdjunction [Reflective i] : reflector i ⊣ i 
goal: CategoryTheory.reflector i ⊣ i

full_name: CategoryTheory.instIsRightAdjointOfReflective
code: instance [Reflective i] : i.IsRightAdjoint 
goal: i.IsRightAdjoint

full_name: CategoryTheory.instIsLeftAdjointReflector
code: instance [Reflective i] : (reflector i).IsLeftAdjoint 
goal: (CategoryTheory.reflector i).IsLeftAdjoint

full_name: CategoryTheory.Functor.fullyFaithfulOfReflective
code: /-- A reflective functor is fully faithful. -/
def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful 
goal: i.FullyFaithful

full_name: CategoryTheory.unit_obj_eq_map_unit
code: /-- For a reflective functor `i` (with left adjoint `L`), with unit `η`, we have `η_iL = iL η`.
-/
theorem unit_obj_eq_map_unit [Reflective i] (X : C) :
    (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =
      i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) 
goal: (CategoryTheory.reflectorAdjunction i).unit.app (i.obj ((CategoryTheory.reflector i).obj X)) =
  i.map ((CategoryTheory.reflector i).map ((CategoryTheory.reflectorAdjunction i).unit.app X))

full_name: CategoryTheory.Functor.essImage.unit_isIso
code: /-- If `A` is essentially in the image of a reflective functor `i`, then `η_A` is an isomorphism.
This gives that the "witness" for `A` being in the essential image can instead be given as the
reflection of `A`, with the isomorphism as `η_A`.

(For any `B` in the reflective subcategory, we automatically have that `ε_B` is an iso.)
-/
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) :
    IsIso ((reflectorAdjunction i).unit.app A) 
goal: CategoryTheory.IsIso ((CategoryTheory.reflectorAdjunction i).unit.app A)

full_name: CategoryTheory.mem_essImage_of_unit_isSplitMono
code: /-- If `η_A` is a split monomorphism, then `A` is in the reflective subcategory. -/
theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C}
    [IsSplitMono ((reflectorAdjunction i).unit.app A)] : A ∈ i.essImage 
goal: A ∈ i.essImage

full_name: CategoryTheory.Reflective.comp
code: /-- Composition of reflective functors. -/
instance Reflective.comp (F : C ⥤ D) (G : D ⥤ E) [Reflective F] [Reflective G] :
    Reflective (F ⋙ G) 
goal: CategoryTheory.Reflective (F.comp G)

full_name: CategoryTheory.unitCompPartialBijectiveAux
code: /-- (Implementation) Auxiliary definition for `unitCompPartialBijective`. -/
def unitCompPartialBijectiveAux [Reflective i] (A : C) (B : D) :
    (A ⟶ i.obj B) ≃ (i.obj ((reflector i).obj A) ⟶ i.obj B) 
goal: (A ⟶ i.obj B) ≃ (i.obj ((CategoryTheory.reflector i).obj A) ⟶ i.obj B)

full_name: CategoryTheory.unitCompPartialBijectiveAux_symm_apply
code: /-- The description of the inverse of the bijection `unitCompPartialBijectiveAux`. -/
theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D}
    (f : i.obj ((reflector i).obj A) ⟶ i.obj B) :
    (unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A ≫ f 
goal: (CategoryTheory.unitCompPartialBijectiveAux A B).symm f =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.reflectorAdjunction i).unit.app A) f

full_name: CategoryTheory.unitCompPartialBijective
code: /-- If `i` has a reflector `L`, then the function `(i.obj (L.obj A) ⟶ B) → (A ⟶ B)` given by
precomposing with `η.app A` is a bijection provided `B` is in the essential image of `i`.
That is, the function `fun (f : i.obj (L.obj A) ⟶ B) ↦ η.app A ≫ f` is bijective,
as long as `B` is in the essential image of `i`.
This definition gives an equivalence: the key property that the inverse can be described
nicely is shown in `unitCompPartialBijective_symm_apply`.

This establishes there is a natural bijection `(A ⟶ B) ≃ (i.obj (L.obj A) ⟶ B)`. In other words,
from the point of view of objects in `D`, `A` and `i.obj (L.obj A)` look the same: specifically
that `η.app A` is an isomorphism.
-/
def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage) :
    (A ⟶ B) ≃ (i.obj ((reflector i).obj A) ⟶ B) 
goal: (A ⟶ B) ≃ (i.obj ((CategoryTheory.reflector i).obj A) ⟶ B)

full_name: CategoryTheory.unitCompPartialBijective_symm_apply
code: @[simp]
theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage)
    (f) : (unitCompPartialBijective A hB).symm f = (reflectorAdjunction i).unit.app A ≫ f 
goal: (CategoryTheory.unitCompPartialBijective A hB).symm f =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.reflectorAdjunction i).unit.app A) f

full_name: CategoryTheory.unitCompPartialBijective_symm_natural
code: theorem unitCompPartialBijective_symm_natural [Reflective i] (A : C) {B B' : C} (h : B ⟶ B')
    (hB : B ∈ i.essImage) (hB' : B' ∈ i.essImage) (f : i.obj ((reflector i).obj A) ⟶ B) :
    (unitCompPartialBijective A hB').symm (f ≫ h) = (unitCompPartialBijective A hB).symm f ≫ h 
goal: (CategoryTheory.unitCompPartialBijective A hB').symm (CategoryTheory.CategoryStruct.comp f h) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.unitCompPartialBijective A hB).symm f) h

full_name: CategoryTheory.unitCompPartialBijective_natural
code: theorem unitCompPartialBijective_natural [Reflective i] (A : C) {B B' : C} (h : B ⟶ B')
    (hB : B ∈ i.essImage) (hB' : B' ∈ i.essImage) (f : A ⟶ B) :
    (unitCompPartialBijective A hB') (f ≫ h) = unitCompPartialBijective A hB f ≫ h 
goal: (CategoryTheory.unitCompPartialBijective A hB') (CategoryTheory.CategoryStruct.comp f h) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.unitCompPartialBijective A hB) f) h

full_name: CategoryTheory.instIsIsoAppUnitReflectorAdjunctionObjEssImage
code: instance [Reflective i] (X : Functor.EssImageSubcategory i) :
  IsIso (NatTrans.app (reflectorAdjunction i).unit X.obj) 
goal: CategoryTheory.IsIso ((CategoryTheory.reflectorAdjunction i).unit.app X.obj)

full_name: CategoryTheory.equivEssImageOfReflective_counitIso_app
code: /-- The counit isomorphism of the equivalence `D ≌ i.EssImageSubcategory` given
by `equivEssImageOfReflective` when the functor `i` is reflective. -/
def equivEssImageOfReflective_counitIso_app [Reflective i] (X : Functor.EssImageSubcategory i) :
    ((Functor.essImageInclusion i ⋙ reflector i) ⋙ Functor.toEssImage i).obj X ≅ X 
goal: ((i.essImageInclusion.comp (CategoryTheory.reflector i)).comp i.toEssImage).obj X ≅ X

full_name: CategoryTheory.equivEssImageOfReflective_map_counitIso_app_hom
code: lemma equivEssImageOfReflective_map_counitIso_app_hom [Reflective i]
    (X : Functor.EssImageSubcategory i) :
  (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).hom =
    inv (NatTrans.app (reflectorAdjunction i).unit X.obj) 
goal: i.essImageInclusion.map (CategoryTheory.equivEssImageOfReflective_counitIso_app X).hom =
  CategoryTheory.inv ((CategoryTheory.reflectorAdjunction i).unit.app X.obj)

full_name: CategoryTheory.equivEssImageOfReflective_map_counitIso_app_inv
code: lemma equivEssImageOfReflective_map_counitIso_app_inv [Reflective i]
    (X : Functor.EssImageSubcategory i) :
  (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).inv =
    (NatTrans.app (reflectorAdjunction i).unit X.obj) 
goal: i.essImageInclusion.map (CategoryTheory.equivEssImageOfReflective_counitIso_app X).inv =
  (CategoryTheory.reflectorAdjunction i).unit.app X.obj

full_name: CategoryTheory.equivEssImageOfReflective_unitIso
code: /-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory 
goal: CategoryTheory.equivEssImageOfReflective.unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun X => (CategoryTheory.asIso ((CategoryTheory.reflectorAdjunction i).counit.app X)).symm) ⋯

full_name: CategoryTheory.equivEssImageOfReflective
code: /-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory 
goal: D ≌ i.EssImageSubcategory

full_name: CategoryTheory.equivEssImageOfReflective_inverse
code: /-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory 
goal: CategoryTheory.equivEssImageOfReflective.inverse = i.essImageInclusion.comp (CategoryTheory.reflector i)

full_name: CategoryTheory.equivEssImageOfReflective_counitIso
code: /-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory 
goal: CategoryTheory.equivEssImageOfReflective.counitIso =
  CategoryTheory.NatIso.ofComponents CategoryTheory.equivEssImageOfReflective_counitIso_app ⋯

full_name: CategoryTheory.equivEssImageOfReflective_functor
code: /-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory 
goal: CategoryTheory.equivEssImageOfReflective.functor = i.toEssImage

full_name: CategoryTheory.Coreflective
code: /--
A functor is *coreflective*, or *a coreflective inclusion*, if it is fully faithful and left
adjoint.
-/
class Coreflective (L : C ⥤ D) extends L.Full, L.Faithful where
  /-- a choice of a right adjoint to `L` -/
  R : D ⥤ C
  /-- `L` is a left adjoint -/
  adj : L ⊣ R
goal: Type (max (max (max u₁ u₂) v₁) v₂)

full_name: CategoryTheory.Coreflective.R
code: /--
A functor is *coreflective*, or *a coreflective inclusion*, if it is fully faithful and left
adjoint.
-/
class Coreflective (L : C ⥤ D) extends L.Full, L.Faithful where
  /-- a choice of a right adjoint to `L` -/
  R : D ⥤ C
  /-- `L` is a left adjoint -/
  adj : L ⊣ R
goal: CategoryTheory.Functor D C

full_name: CategoryTheory.Coreflective.adj
code: /--
A functor is *coreflective*, or *a coreflective inclusion*, if it is fully faithful and left
adjoint.
-/
class Coreflective (L : C ⥤ D) extends L.Full, L.Faithful where
  /-- a choice of a right adjoint to `L` -/
  R : D ⥤ C
  /-- `L` is a left adjoint -/
  adj : L ⊣ R
goal: L ⊣ CategoryTheory.Coreflective.R L

full_name: CategoryTheory.coreflector
code: /-- The coreflector `D ⥤ C` when `L : C ⥤ D` is coreflective. -/
def coreflector [Coreflective j] : D ⥤ C 
goal: CategoryTheory.Functor D C

full_name: CategoryTheory.coreflectorAdjunction
code: /-- The adjunction `j ⊣ coreflector j` when `j` is coreflective. -/
def coreflectorAdjunction [Coreflective j] : j ⊣ coreflector j 
goal: j ⊣ CategoryTheory.coreflector j

full_name: CategoryTheory.instIsLeftAdjointOfCoreflective
code: instance [Coreflective j] : j.IsLeftAdjoint 
goal: j.IsLeftAdjoint

full_name: CategoryTheory.instIsRightAdjointCoreflector
code: instance [Coreflective j] : (coreflector j).IsRightAdjoint 
goal: (CategoryTheory.coreflector j).IsRightAdjoint

full_name: CategoryTheory.Functor.fullyFaithfulOfCoreflective
code: /-- A coreflective functor is fully faithful. -/
def Functor.fullyFaithfulOfCoreflective [Coreflective j] : j.FullyFaithful 
goal: j.FullyFaithful

full_name: CategoryTheory.counit_obj_eq_map_counit
code: lemma counit_obj_eq_map_counit [Coreflective j] (X : D) :
    (coreflectorAdjunction j).counit.app (j.obj ((coreflector j).obj X)) =
      j.map ((coreflector j).map ((coreflectorAdjunction j).counit.app X)) 
goal: (CategoryTheory.coreflectorAdjunction j).counit.app (j.obj ((CategoryTheory.coreflector j).obj X)) =
  j.map ((CategoryTheory.coreflector j).map ((CategoryTheory.coreflectorAdjunction j).counit.app X))

full_name: CategoryTheory.Functor.essImage.counit_isIso
code: lemma Functor.essImage.counit_isIso [Coreflective j] {A : D} (h : A ∈ j.essImage) :
    IsIso ((coreflectorAdjunction j).counit.app A) 
goal: CategoryTheory.IsIso ((CategoryTheory.coreflectorAdjunction j).counit.app A)

full_name: CategoryTheory.mem_essImage_of_counit_isSplitEpi
code: lemma mem_essImage_of_counit_isSplitEpi [Coreflective j] {A : D}
    [IsSplitEpi ((coreflectorAdjunction j).counit.app A)] : A ∈ j.essImage 
goal: A ∈ j.essImage

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