File: Mathlib/CategoryTheory/Comma/Over.lean

full_name: CategoryTheory.Over
code: /-- The over category has as objects arrows in `T` with codomain `X` and as morphisms commutative
triangles.

See <https://stacks.math.columbia.edu/tag/001G>.
-/
def Over (X : T) 
goal: Type (max u₁ v₁)

full_name: CategoryTheory.instCategoryOver
code: instance (X : T) : Category (Over X) 
goal: CategoryTheory.Category.{v₁, max u₁ v₁} (CategoryTheory.Over X)

full_name: CategoryTheory.Over.inhabited
code: instance Over.inhabited [Inhabited T] : Inhabited (Over (default : T)) 
goal: Inhabited (CategoryTheory.Over default)

full_name: CategoryTheory.Over.OverMorphism.ext
code: @[ext]
theorem OverMorphism.ext {X : T} {U V : Over X} {f g : U ⟶ V} (h : f.left = g.left) : f = g 
goal: f = g

full_name: CategoryTheory.Over.over_right
code: theorem over_right (U : Over X) : U.right = ⟨⟨⟩⟩ 
goal: U.right = { as := PUnit.unit }

full_name: CategoryTheory.Over.id_left
code: @[simp]
theorem id_left (U : Over X) : CommaMorphism.left (𝟙 U) = 𝟙 U.left 
goal: (CategoryTheory.CategoryStruct.id U).left = CategoryTheory.CategoryStruct.id U.left

full_name: CategoryTheory.Over.comp_left
code: @[simp]
theorem comp_left (a b c : Over X) (f : a ⟶ b) (g : b ⟶ c) : (f ≫ g).left = f.left ≫ g.left 
goal: (CategoryTheory.CategoryStruct.comp f g).left = CategoryTheory.CategoryStruct.comp f.left g.left

full_name: CategoryTheory.Over.w
code: @[reassoc (attr := simp)]
theorem w {A B : Over X} (f : A ⟶ B) : f.left ≫ B.hom = A.hom 
goal: CategoryTheory.CategoryStruct.comp f.left B.hom = A.hom

full_name: CategoryTheory.Over.mk_left
code: /-- To give an object in the over category, it suffices to give a morphism with codomain `X`. -/
@[simps! left hom]
def mk {X Y : T} (f : Y ⟶ X) : Over X 
goal: (CategoryTheory.Over.mk f).left = Y

full_name: CategoryTheory.Over.mk
code: /-- To give an object in the over category, it suffices to give a morphism with codomain `X`. -/
@[simps! left hom]
def mk {X Y : T} (f : Y ⟶ X) : Over X 
goal: CategoryTheory.Over X

full_name: CategoryTheory.Over.mk_hom
code: /-- To give an object in the over category, it suffices to give a morphism with codomain `X`. -/
@[simps! left hom]
def mk {X Y : T} (f : Y ⟶ X) : Over X 
goal: (CategoryTheory.Over.mk f).hom = f

full_name: CategoryTheory.Over.coeFromHom
code: /-- We can set up a coercion from arrows with codomain `X` to `over X`. This most likely should not
    be a global instance, but it is sometimes useful. -/
def coeFromHom {X Y : T} : CoeOut (Y ⟶ X) (Over X) 
goal: CoeOut (Y ⟶ X) (CategoryTheory.Over X)

full_name: CategoryTheory.Over.coe_hom
code: @[simp]
theorem coe_hom {X Y : T} (f : Y ⟶ X) : (f : Over X).hom = f 
goal: (CategoryTheory.Over.mk f).hom = f

full_name: CategoryTheory.Over.homMk_right_down_down
code: /-- To give a morphism in the over category, it suffices to give an arrow fitting in a commutative
    triangle. -/
@[simps!]
def homMk {U V : Over X} (f : U.left ⟶ V.left) (w : f ≫ V.hom = U.hom := by aesop_cat) : U ⟶ V 
goal: ⋯ = ⋯

full_name: CategoryTheory.Over.homMk
code: /-- To give a morphism in the over category, it suffices to give an arrow fitting in a commutative
    triangle. -/
@[simps!]
def homMk {U V : Over X} (f : U.left ⟶ V.left) (w : f ≫ V.hom = U.hom := by aesop_cat) : U ⟶ V 
goal: U ⟶ V

full_name: CategoryTheory.Over.homMk_left
code: /-- To give a morphism in the over category, it suffices to give an arrow fitting in a commutative
    triangle. -/
@[simps!]
def homMk {U V : Over X} (f : U.left ⟶ V.left) (w : f ≫ V.hom = U.hom := by aesop_cat) : U ⟶ V 
goal: (CategoryTheory.Over.homMk f w).left = f

full_name: CategoryTheory.Over.isoMk_inv_left
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g 
goal: (CategoryTheory.Over.isoMk hl hw).inv.left = hl.inv

full_name: CategoryTheory.Over.isoMk_hom_left
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g 
goal: (CategoryTheory.Over.isoMk hl hw).hom.left = hl.hom

full_name: CategoryTheory.Over.isoMk
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g 
goal: f ≅ g

full_name: CategoryTheory.Over.isoMk_inv_right_down_down
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g 
goal: ⋯ = ⋯

full_name: CategoryTheory.Over.isoMk_hom_right_down_down
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g 
goal: ⋯ = ⋯

full_name: CategoryTheory.Over.forget
code: /-- The forgetful functor mapping an arrow to its domain.

See <https://stacks.math.columbia.edu/tag/001G>.
-/
def forget : Over X ⥤ T 
goal: CategoryTheory.Functor (CategoryTheory.Over X) T

full_name: CategoryTheory.Over.forget_obj
code: @[simp]
theorem forget_obj {U : Over X} : (forget X).obj U = U.left 
goal: (CategoryTheory.Over.forget X).obj U = U.left

full_name: CategoryTheory.Over.forget_map
code: @[simp]
theorem forget_map {U V : Over X} {f : U ⟶ V} : (forget X).map f = f.left 
goal: (CategoryTheory.Over.forget X).map f = f.left

full_name: CategoryTheory.Over.forgetCocone_ι_app
code: /-- The natural cocone over the forgetful functor `Over X ⥤ T` with cocone point `X`. -/
@[simps]
def forgetCocone (X : T) : Limits.Cocone (forget X) 
goal: (CategoryTheory.Over.forgetCocone X).ι.app self = self.hom

full_name: CategoryTheory.Over.forgetCocone
code: /-- The natural cocone over the forgetful functor `Over X ⥤ T` with cocone point `X`. -/
@[simps]
def forgetCocone (X : T) : Limits.Cocone (forget X) 
goal: CategoryTheory.Limits.Cocone (CategoryTheory.Over.forget X)

full_name: CategoryTheory.Over.forgetCocone_pt
code: /-- The natural cocone over the forgetful functor `Over X ⥤ T` with cocone point `X`. -/
@[simps]
def forgetCocone (X : T) : Limits.Cocone (forget X) 
goal: (CategoryTheory.Over.forgetCocone X).pt = X

full_name: CategoryTheory.Over.map
code: /-- A morphism `f : X ⟶ Y` induces a functor `Over X ⥤ Over Y` in the obvious way.

See <https://stacks.math.columbia.edu/tag/001G>.
-/
def map {Y : T} (f : X ⟶ Y) : Over X ⥤ Over Y 
goal: CategoryTheory.Functor (CategoryTheory.Over X) (CategoryTheory.Over Y)

full_name: CategoryTheory.Over.map_obj_left
code: @[simp]
theorem map_obj_left : ((map f).obj U).left = U.left 
goal: ((CategoryTheory.Over.map f).obj U).left = U.left

full_name: CategoryTheory.Over.map_obj_hom
code: @[simp]
theorem map_obj_hom : ((map f).obj U).hom = U.hom ≫ f 
goal: ((CategoryTheory.Over.map f).obj U).hom = CategoryTheory.CategoryStruct.comp U.hom f

full_name: CategoryTheory.Over.map_map_left
code: @[simp]
theorem map_map_left : ((map f).map g).left = g.left 
goal: ((CategoryTheory.Over.map f).map g).left = g.left

full_name: CategoryTheory.Over.mapId_eq
code: /-- Mapping by the identity morphism is just the identity functor. -/
theorem mapId_eq (Y : T) : map (𝟙 Y) = 𝟭 _ 
goal: CategoryTheory.Over.map (CategoryTheory.CategoryStruct.id Y) = CategoryTheory.Functor.id (CategoryTheory.Over Y)

full_name: CategoryTheory.Over.mapId
code: /-- The natural isomorphism arising from `mapForget_eq`. -/
def mapId (Y : T) : map (𝟙 Y) ≅ 𝟭 _ 
goal: CategoryTheory.Over.map (CategoryTheory.CategoryStruct.id Y) ≅ CategoryTheory.Functor.id (CategoryTheory.Over Y)

full_name: CategoryTheory.Over.mapForget_eq
code: /-- Mapping by `f` and then forgetting is the same as forgetting. -/
theorem mapForget_eq {X Y : T} (f : X ⟶ Y) :
    (map f) ⋙ (forget Y) = (forget X) 
goal: (CategoryTheory.Over.map f).comp (CategoryTheory.Over.forget Y) = CategoryTheory.Over.forget X

full_name: CategoryTheory.Over.mapForget
code: /-- The natural isomorphism arising from `mapForget_eq`. -/
def mapForget {X Y : T} (f : X ⟶ Y) :
    (map f) ⋙ (forget Y) ≅ (forget X) 
goal: (CategoryTheory.Over.map f).comp (CategoryTheory.Over.forget Y) ≅ CategoryTheory.Over.forget X

full_name: CategoryTheory.Over.eqToHom_left
code: @[simp]
theorem eqToHom_left {X : T} {U V : Over X} (e : U = V) :
    (eqToHom e).left = eqToHom (e ▸ rfl : U.left = V.left) 
goal: (CategoryTheory.eqToHom e).left = CategoryTheory.eqToHom ⋯

full_name: CategoryTheory.Over.mapComp_eq
code: /-- Mapping by the composite morphism `f ≫ g` is the same as mapping by `f` then by `g`. -/
theorem mapComp_eq {X Y Z : T} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = (map f) ⋙ (map g) 
goal: CategoryTheory.Over.map (CategoryTheory.CategoryStruct.comp f g) =
  (CategoryTheory.Over.map f).comp (CategoryTheory.Over.map g)

full_name: CategoryTheory.Over.mapComp
code: /-- The natural isomorphism arising from `mapComp_eq`. -/
def mapComp {X Y Z : T} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) ≅ (map f) ⋙ (map g) 
goal: CategoryTheory.Over.map (CategoryTheory.CategoryStruct.comp f g) ≅
  (CategoryTheory.Over.map f).comp (CategoryTheory.Over.map g)

full_name: CategoryTheory.Over.mapFunctor_map
code: /-- The functor defined by the over categories.-/
@[simps] def mapFunctor : T ⥤ Cat 
goal: ∀ {X Y : T} (f : X ⟶ Y), (CategoryTheory.Over.mapFunctor T).map f = CategoryTheory.Over.map f

full_name: CategoryTheory.Over.mapFunctor
code: /-- The functor defined by the over categories.-/
@[simps] def mapFunctor : T ⥤ Cat 
goal: CategoryTheory.Functor T CategoryTheory.Cat

full_name: CategoryTheory.Over.mapFunctor_obj
code: /-- The functor defined by the over categories.-/
@[simps] def mapFunctor : T ⥤ Cat 
goal: (CategoryTheory.Over.mapFunctor T).obj X = CategoryTheory.Cat.of (CategoryTheory.Over X)

full_name: CategoryTheory.Over.forget_reflects_iso
code: instance forget_reflects_iso : (forget X).ReflectsIsomorphisms 
goal: (CategoryTheory.Over.forget X).ReflectsIsomorphisms

full_name: CategoryTheory.Over.mkIdTerminal
code: /-- The identity over `X` is terminal. -/
noncomputable def mkIdTerminal : Limits.IsTerminal (mk (𝟙 X)) 
goal: CategoryTheory.Limits.IsTerminal (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id X))

full_name: CategoryTheory.Over.forget_faithful
code: instance forget_faithful : (forget X).Faithful 
goal: (CategoryTheory.Over.forget X).Faithful

full_name: CategoryTheory.Over.epi_of_epi_left
code: /--
If `k.left` is an epimorphism, then `k` is an epimorphism. In other words, `Over.forget X` reflects
epimorphisms.
The converse does not hold without additional assumptions on the underlying category, see
`CategoryTheory.Over.epi_left_of_epi`.
-/
theorem epi_of_epi_left {f g : Over X} (k : f ⟶ g) [hk : Epi k.left] : Epi k 
goal: CategoryTheory.Epi k

full_name: CategoryTheory.Over.mono_of_mono_left
code: /--
If `k.left` is a monomorphism, then `k` is a monomorphism. In other words, `Over.forget X` reflects
monomorphisms.
The converse of `CategoryTheory.Over.mono_left_of_mono`.

This lemma is not an instance, to avoid loops in type class inference.
-/
theorem mono_of_mono_left {f g : Over X} (k : f ⟶ g) [hk : Mono k.left] : Mono k 
goal: CategoryTheory.Mono k

full_name: CategoryTheory.Over.mono_left_of_mono
code: /--
If `k` is a monomorphism, then `k.left` is a monomorphism. In other words, `Over.forget X` preserves
monomorphisms.
The converse of `CategoryTheory.Over.mono_of_mono_left`.
-/
instance mono_left_of_mono {f g : Over X} (k : f ⟶ g) [Mono k] : Mono k.left 
goal: CategoryTheory.Mono k.left

full_name: CategoryTheory.Over.iteratedSliceForward_map
code: /-- Given f : Y ⟶ X, this is the obvious functor from (T/X)/f to T/Y -/
@[simps]
def iteratedSliceForward : Over f ⥤ Over f.left 
goal: ∀ {X_1 Y : CategoryTheory.Over f} (κ : X_1 ⟶ Y), f.iteratedSliceForward.map κ = CategoryTheory.Over.homMk κ.left.left ⋯

full_name: CategoryTheory.Over.iteratedSliceForward
code: /-- Given f : Y ⟶ X, this is the obvious functor from (T/X)/f to T/Y -/
@[simps]
def iteratedSliceForward : Over f ⥤ Over f.left 
goal: CategoryTheory.Functor (CategoryTheory.Over f) (CategoryTheory.Over f.left)

full_name: CategoryTheory.Over.iteratedSliceForward_obj
code: /-- Given f : Y ⟶ X, this is the obvious functor from (T/X)/f to T/Y -/
@[simps]
def iteratedSliceForward : Over f ⥤ Over f.left 
goal: f.iteratedSliceForward.obj α = CategoryTheory.Over.mk α.hom.left

full_name: CategoryTheory.Over.iteratedSliceBackward_map
code: /-- Given f : Y ⟶ X, this is the obvious functor from T/Y to (T/X)/f -/
@[simps]
def iteratedSliceBackward : Over f.left ⥤ Over f 
goal: ∀ {X_1 Y : CategoryTheory.Over f.left} (α : X_1 ⟶ Y),
  f.iteratedSliceBackward.map α = CategoryTheory.Over.homMk (CategoryTheory.Over.homMk α.left ⋯) ⋯

full_name: CategoryTheory.Over.iteratedSliceBackward_obj
code: /-- Given f : Y ⟶ X, this is the obvious functor from T/Y to (T/X)/f -/
@[simps]
def iteratedSliceBackward : Over f.left ⥤ Over f 
goal: f.iteratedSliceBackward.obj g = CategoryTheory.Over.mk (CategoryTheory.Over.homMk g.hom ⋯)

full_name: CategoryTheory.Over.iteratedSliceBackward
code: /-- Given f : Y ⟶ X, this is the obvious functor from T/Y to (T/X)/f -/
@[simps]
def iteratedSliceBackward : Over f.left ⥤ Over f 
goal: CategoryTheory.Functor (CategoryTheory.Over f.left) (CategoryTheory.Over f)

full_name: CategoryTheory.Over.iteratedSliceEquiv
code: /-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left 
goal: CategoryTheory.Over f ≌ CategoryTheory.Over f.left

full_name: CategoryTheory.Over.iteratedSliceEquiv_functor
code: /-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left 
goal: f.iteratedSliceEquiv.functor = f.iteratedSliceForward

full_name: CategoryTheory.Over.iteratedSliceEquiv_unitIso
code: /-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left 
goal: f.iteratedSliceEquiv.unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun g =>
      CategoryTheory.Over.isoMk
        (CategoryTheory.Over.isoMk
          (CategoryTheory.Iso.refl ((CategoryTheory.Functor.id (CategoryTheory.Over f)).obj g).left.left) ⋯)
        ⋯)
    ⋯

full_name: CategoryTheory.Over.iteratedSliceEquiv_counitIso
code: /-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left 
goal: f.iteratedSliceEquiv.counitIso =
  CategoryTheory.NatIso.ofComponents
    (fun g =>
      CategoryTheory.Over.isoMk
        (CategoryTheory.Iso.refl ((f.iteratedSliceBackward.comp f.iteratedSliceForward).obj g).left) ⋯)
    ⋯

full_name: CategoryTheory.Over.iteratedSliceEquiv_inverse
code: /-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left 
goal: f.iteratedSliceEquiv.inverse = f.iteratedSliceBackward

full_name: CategoryTheory.Over.iteratedSliceForward_forget
code: theorem iteratedSliceForward_forget :
    iteratedSliceForward f ⋙ forget f.left = forget f ⋙ forget X 
goal: f.iteratedSliceForward.comp (CategoryTheory.Over.forget f.left) =
  (CategoryTheory.Over.forget f).comp (CategoryTheory.Over.forget X)

full_name: CategoryTheory.Over.iteratedSliceBackward_forget_forget
code: theorem iteratedSliceBackward_forget_forget :
    iteratedSliceBackward f ⋙ forget f ⋙ forget X = forget f.left 
goal: f.iteratedSliceBackward.comp ((CategoryTheory.Over.forget f).comp (CategoryTheory.Over.forget X)) =
  CategoryTheory.Over.forget f.left

full_name: CategoryTheory.Over.post
code: /-- A functor `F : T ⥤ D` induces a functor `Over X ⥤ Over (F.obj X)` in the obvious way. -/
@[simps]
def post (F : T ⥤ D) : Over X ⥤ Over (F.obj X) 
goal: CategoryTheory.Functor (CategoryTheory.Over X) (CategoryTheory.Over (F.obj X))

full_name: CategoryTheory.Over.post_map
code: /-- A functor `F : T ⥤ D` induces a functor `Over X ⥤ Over (F.obj X)` in the obvious way. -/
@[simps]
def post (F : T ⥤ D) : Over X ⥤ Over (F.obj X) 
goal: ∀ {X_1 Y : CategoryTheory.Over X} (f : X_1 ⟶ Y),
  (CategoryTheory.Over.post F).map f = CategoryTheory.Over.homMk (F.map f.left) ⋯

full_name: CategoryTheory.Over.post_obj
code: /-- A functor `F : T ⥤ D` induces a functor `Over X ⥤ Over (F.obj X)` in the obvious way. -/
@[simps]
def post (F : T ⥤ D) : Over X ⥤ Over (F.obj X) 
goal: (CategoryTheory.Over.post F).obj Y = CategoryTheory.Over.mk (F.map Y.hom)

full_name: CategoryTheory.CostructuredArrow.toOver_obj_right
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: ∀ (X_1 : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)),
  ((CategoryTheory.CostructuredArrow.toOver F X).obj X_1).right = X_1.right

full_name: CategoryTheory.CostructuredArrow.toOver_obj_hom
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: ∀ (X_1 : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)),
  ((CategoryTheory.CostructuredArrow.toOver F X).obj X_1).hom = X_1.hom

full_name: CategoryTheory.CostructuredArrow.toOver_map_right
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: ∀ {X_1 Y : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)}
  (f : X_1 ⟶ Y),
  ((CategoryTheory.CostructuredArrow.toOver F X).map f).right = CategoryTheory.CategoryStruct.id X_1.right

full_name: CategoryTheory.CostructuredArrow.toOver_map_left
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: ∀ {X_1 Y : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)}
  (f : X_1 ⟶ Y), ((CategoryTheory.CostructuredArrow.toOver F X).map f).left = F.map f.left

full_name: CategoryTheory.CostructuredArrow.toOver_obj_left
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: ∀ (X_1 : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)),
  ((CategoryTheory.CostructuredArrow.toOver F X).obj X_1).left = F.obj X_1.left

full_name: CategoryTheory.CostructuredArrow.toOver
code: /-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X 
goal: CategoryTheory.Functor (CategoryTheory.CostructuredArrow F X) (CategoryTheory.Over X)

full_name: CategoryTheory.CostructuredArrow.instFaithfulOverToOver
code: instance (F : D ⥤ T) (X : T) [F.Faithful] : (toOver F X).Faithful 
goal: (CategoryTheory.CostructuredArrow.toOver F X).Faithful

full_name: CategoryTheory.CostructuredArrow.instFullOverToOver
code: instance (F : D ⥤ T) (X : T) [F.Full] : (toOver F X).Full 
goal: (CategoryTheory.CostructuredArrow.toOver F X).Full

full_name: CategoryTheory.CostructuredArrow.instEssSurjOverToOver
code: instance (F : D ⥤ T) (X : T) [F.EssSurj] : (toOver F X).EssSurj 
goal: (CategoryTheory.CostructuredArrow.toOver F X).EssSurj

full_name: CategoryTheory.CostructuredArrow.isEquivalence_toOver
code: /-- An equivalence `F` induces an equivalence `CostructuredArrow F X ≌ Over X`. -/
instance isEquivalence_toOver (F : D ⥤ T) (X : T) [F.IsEquivalence] :
    (toOver F X).IsEquivalence 
goal: (CategoryTheory.CostructuredArrow.toOver F X).IsEquivalence

full_name: CategoryTheory.Under
code: /-- The under category has as objects arrows with domain `X` and as morphisms commutative
    triangles. -/
def Under (X : T) 
goal: Type (max u₁ v₁)

full_name: CategoryTheory.instCategoryUnder
code: instance (X : T) : Category (Under X) 
goal: CategoryTheory.Category.{v₁, max u₁ v₁} (CategoryTheory.Under X)

full_name: CategoryTheory.Under.inhabited
code: instance Under.inhabited [Inhabited T] : Inhabited (Under (default : T)) 
goal: Inhabited (CategoryTheory.Under default)

full_name: CategoryTheory.Under.UnderMorphism.ext
code: @[ext]
theorem UnderMorphism.ext {X : T} {U V : Under X} {f g : U ⟶ V} (h : f.right = g.right) :
    f = g 
goal: f = g

full_name: CategoryTheory.Under.under_left
code: theorem under_left (U : Under X) : U.left = ⟨⟨⟩⟩ 
goal: U.left = { as := PUnit.unit }

full_name: CategoryTheory.Under.id_right
code: @[simp]
theorem id_right (U : Under X) : CommaMorphism.right (𝟙 U) = 𝟙 U.right 
goal: (CategoryTheory.CategoryStruct.id U).right = CategoryTheory.CategoryStruct.id U.right

full_name: CategoryTheory.Under.comp_right
code: @[simp]
theorem comp_right (a b c : Under X) (f : a ⟶ b) (g : b ⟶ c) : (f ≫ g).right = f.right ≫ g.right 
goal: (CategoryTheory.CategoryStruct.comp f g).right = CategoryTheory.CategoryStruct.comp f.right g.right

full_name: CategoryTheory.Under.w
code: @[reassoc (attr := simp)]
theorem w {A B : Under X} (f : A ⟶ B) : A.hom ≫ f.right = B.hom 
goal: CategoryTheory.CategoryStruct.comp A.hom f.right = B.hom

full_name: CategoryTheory.Under.mk_right
code: /-- To give an object in the under category, it suffices to give an arrow with domain `X`. -/
@[simps! right hom]
def mk {X Y : T} (f : X ⟶ Y) : Under X 
goal: (CategoryTheory.Under.mk f).right = Y

full_name: CategoryTheory.Under.mk_hom
code: /-- To give an object in the under category, it suffices to give an arrow with domain `X`. -/
@[simps! right hom]
def mk {X Y : T} (f : X ⟶ Y) : Under X 
goal: (CategoryTheory.Under.mk f).hom = f

full_name: CategoryTheory.Under.mk
code: /-- To give an object in the under category, it suffices to give an arrow with domain `X`. -/
@[simps! right hom]
def mk {X Y : T} (f : X ⟶ Y) : Under X 
goal: CategoryTheory.Under X

full_name: CategoryTheory.Under.homMk_right
code: /-- To give a morphism in the under category, it suffices to give a morphism fitting in a
    commutative triangle. -/
@[simps!]
def homMk {U V : Under X} (f : U.right ⟶ V.right) (w : U.hom ≫ f = V.hom := by aesop_cat) : U ⟶ V 
goal: (CategoryTheory.Under.homMk f w).right = f

full_name: CategoryTheory.Under.homMk_left_down_down
code: /-- To give a morphism in the under category, it suffices to give a morphism fitting in a
    commutative triangle. -/
@[simps!]
def homMk {U V : Under X} (f : U.right ⟶ V.right) (w : U.hom ≫ f = V.hom := by aesop_cat) : U ⟶ V 
goal: ⋯ = ⋯

full_name: CategoryTheory.Under.homMk
code: /-- To give a morphism in the under category, it suffices to give a morphism fitting in a
    commutative triangle. -/
@[simps!]
def homMk {U V : Under X} (f : U.right ⟶ V.right) (w : U.hom ≫ f = V.hom := by aesop_cat) : U ⟶ V 
goal: U ⟶ V

full_name: CategoryTheory.Under.isoMk
code: /-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
def isoMk {f g : Under X} (hr : f.right ≅ g.right)
    (hw : f.hom ≫ hr.hom = g.hom := by aesop_cat) : f ≅ g 
goal: f ≅ g

full_name: CategoryTheory.Under.isoMk_hom_right
code: @[simp]
theorem isoMk_hom_right {f g : Under X} (hr : f.right ≅ g.right) (hw : f.hom ≫ hr.hom = g.hom) :
    (isoMk hr hw).hom.right = hr.hom 
goal: (CategoryTheory.Under.isoMk hr hw).hom.right = hr.hom

full_name: CategoryTheory.Under.isoMk_inv_right
code: @[simp]
theorem isoMk_inv_right {f g : Under X} (hr : f.right ≅ g.right) (hw : f.hom ≫ hr.hom = g.hom) :
    (isoMk hr hw).inv.right = hr.inv 
goal: (CategoryTheory.Under.isoMk hr hw).inv.right = hr.inv

full_name: CategoryTheory.Under.forget
code: /-- The forgetful functor mapping an arrow to its domain. -/
def forget : Under X ⥤ T 
goal: CategoryTheory.Functor (CategoryTheory.Under X) T

full_name: CategoryTheory.Under.forget_obj
code: @[simp]
theorem forget_obj {U : Under X} : (forget X).obj U = U.right 
goal: (CategoryTheory.Under.forget X).obj U = U.right

full_name: CategoryTheory.Under.forget_map
code: @[simp]
theorem forget_map {U V : Under X} {f : U ⟶ V} : (forget X).map f = f.right 
goal: (CategoryTheory.Under.forget X).map f = f.right

full_name: CategoryTheory.Under.forgetCone_pt
code: /-- The natural cone over the forgetful functor `Under X ⥤ T` with cone point `X`. -/
@[simps]
def forgetCone (X : T) : Limits.Cone (forget X) 
goal: (CategoryTheory.Under.forgetCone X).pt = X

full_name: CategoryTheory.Under.forgetCone_π_app
code: /-- The natural cone over the forgetful functor `Under X ⥤ T` with cone point `X`. -/
@[simps]
def forgetCone (X : T) : Limits.Cone (forget X) 
goal: (CategoryTheory.Under.forgetCone X).π.app self = self.hom

full_name: CategoryTheory.Under.forgetCone
code: /-- The natural cone over the forgetful functor `Under X ⥤ T` with cone point `X`. -/
@[simps]
def forgetCone (X : T) : Limits.Cone (forget X) 
goal: CategoryTheory.Limits.Cone (CategoryTheory.Under.forget X)

full_name: CategoryTheory.Under.map
code: /-- A morphism `X ⟶ Y` induces a functor `Under Y ⥤ Under X` in the obvious way. -/
def map {Y : T} (f : X ⟶ Y) : Under Y ⥤ Under X 
goal: CategoryTheory.Functor (CategoryTheory.Under Y) (CategoryTheory.Under X)

full_name: CategoryTheory.Under.map_obj_right
code: @[simp]
theorem map_obj_right : ((map f).obj U).right = U.right 
goal: ((CategoryTheory.Under.map f).obj U).right = U.right

full_name: CategoryTheory.Under.map_obj_hom
code: @[simp]
theorem map_obj_hom : ((map f).obj U).hom = f ≫ U.hom 
goal: ((CategoryTheory.Under.map f).obj U).hom = CategoryTheory.CategoryStruct.comp f U.hom

full_name: CategoryTheory.Under.map_map_right
code: @[simp]
theorem map_map_right : ((map f).map g).right = g.right 
goal: ((CategoryTheory.Under.map f).map g).right = g.right

full_name: CategoryTheory.Under.mapId_eq
code: /-- Mapping by the identity morphism is just the identity functor. -/
theorem mapId_eq (Y : T) : map (𝟙 Y) = 𝟭 _ 
goal: CategoryTheory.Under.map (CategoryTheory.CategoryStruct.id Y) = CategoryTheory.Functor.id (CategoryTheory.Under Y)

full_name: CategoryTheory.Under.mapId
code: /-- Mapping by the identity morphism is just the identity functor. -/
def mapId (Y : T) : map (𝟙 Y) ≅ 𝟭 _ 
goal: CategoryTheory.Under.map (CategoryTheory.CategoryStruct.id Y) ≅ CategoryTheory.Functor.id (CategoryTheory.Under Y)

full_name: CategoryTheory.Under.mapForget_eq
code: /-- Mapping by `f` and then forgetting is the same as forgetting. -/
theorem mapForget_eq {X Y : T} (f : X ⟶ Y) :
    (map f) ⋙ (forget X) = (forget Y) 
goal: (CategoryTheory.Under.map f).comp (CategoryTheory.Under.forget X) = CategoryTheory.Under.forget Y

full_name: CategoryTheory.Under.mapForget
code: /-- The natural isomorphism arising from `mapForget_eq`. -/
def mapForget {X Y : T} (f : X ⟶ Y) :
    (map f) ⋙ (forget X) ≅ (forget Y) 
goal: (CategoryTheory.Under.map f).comp (CategoryTheory.Under.forget X) ≅ CategoryTheory.Under.forget Y

full_name: CategoryTheory.Under.eqToHom_right
code: @[simp]
theorem eqToHom_right {X : T} {U V : Under X} (e : U = V) :
    (eqToHom e).right = eqToHom (e ▸ rfl : U.right = V.right) 
goal: (CategoryTheory.eqToHom e).right = CategoryTheory.eqToHom ⋯

full_name: CategoryTheory.Under.mapComp_eq
code: /-- Mapping by the composite morphism `f ≫ g` is the same as mapping by `f` then by `g`. -/
theorem mapComp_eq {X Y Z : T} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = (map g) ⋙ (map f) 
goal: CategoryTheory.Under.map (CategoryTheory.CategoryStruct.comp f g) =
  (CategoryTheory.Under.map g).comp (CategoryTheory.Under.map f)

full_name: CategoryTheory.Under.mapComp
code: /-- The natural isomorphism arising from `mapComp_eq`. -/
def mapComp {Y Z : T} (f : X ⟶ Y) (g : Y ⟶ Z) : map (f ≫ g) ≅ map g ⋙ map f 
goal: CategoryTheory.Under.map (CategoryTheory.CategoryStruct.comp f g) ≅
  (CategoryTheory.Under.map g).comp (CategoryTheory.Under.map f)

full_name: CategoryTheory.Under.mapFunctor_map
code: /-- The functor defined by the under categories.-/
@[simps] def mapFunctor : Tᵒᵖ  ⥤ Cat 
goal: ∀ {X Y : Tᵒᵖ} (f : X ⟶ Y), (CategoryTheory.Under.mapFunctor T).map f = CategoryTheory.Under.map f.unop

full_name: CategoryTheory.Under.mapFunctor_obj
code: /-- The functor defined by the under categories.-/
@[simps] def mapFunctor : Tᵒᵖ  ⥤ Cat 
goal: (CategoryTheory.Under.mapFunctor T).obj X = CategoryTheory.Cat.of (CategoryTheory.Under (Opposite.unop X))

full_name: CategoryTheory.Under.mapFunctor
code: /-- The functor defined by the under categories.-/
@[simps] def mapFunctor : Tᵒᵖ  ⥤ Cat 
goal: CategoryTheory.Functor Tᵒᵖ CategoryTheory.Cat

full_name: CategoryTheory.Under.forget_reflects_iso
code: instance forget_reflects_iso : (forget X).ReflectsIsomorphisms 
goal: (CategoryTheory.Under.forget X).ReflectsIsomorphisms

full_name: CategoryTheory.Under.mkIdInitial
code: /-- The identity under `X` is initial. -/
noncomputable def mkIdInitial : Limits.IsInitial (mk (𝟙 X)) 
goal: CategoryTheory.Limits.IsInitial (CategoryTheory.Under.mk (CategoryTheory.CategoryStruct.id X))

full_name: CategoryTheory.Under.forget_faithful
code: instance forget_faithful : (forget X).Faithful 
goal: (CategoryTheory.Under.forget X).Faithful

full_name: CategoryTheory.Under.mono_of_mono_right
code: /-- If `k.right` is a monomorphism, then `k` is a monomorphism. In other words, `Under.forget X`
reflects epimorphisms.
The converse does not hold without additional assumptions on the underlying category, see
`CategoryTheory.Under.mono_right_of_mono`.
-/
theorem mono_of_mono_right {f g : Under X} (k : f ⟶ g) [hk : Mono k.right] : Mono k 
goal: CategoryTheory.Mono k

full_name: CategoryTheory.Under.epi_of_epi_right
code: /--
If `k.right` is an epimorphism, then `k` is an epimorphism. In other words, `Under.forget X`
reflects epimorphisms.
The converse of `CategoryTheory.Under.epi_right_of_epi`.

This lemma is not an instance, to avoid loops in type class inference.
-/
theorem epi_of_epi_right {f g : Under X} (k : f ⟶ g) [hk : Epi k.right] : Epi k 
goal: CategoryTheory.Epi k

full_name: CategoryTheory.Under.epi_right_of_epi
code: /--
If `k` is an epimorphism, then `k.right` is an epimorphism. In other words, `Under.forget X`
preserves epimorphisms.
The converse of `CategoryTheory.under.epi_of_epi_right`.
-/
instance epi_right_of_epi {f g : Under X} (k : f ⟶ g) [Epi k] : Epi k.right 
goal: CategoryTheory.Epi k.right

full_name: CategoryTheory.Under.post_obj
code: /-- A functor `F : T ⥤ D` induces a functor `Under X ⥤ Under (F.obj X)` in the obvious way. -/
@[simps]
def post {X : T} (F : T ⥤ D) : Under X ⥤ Under (F.obj X) 
goal: (CategoryTheory.Under.post F).obj Y = CategoryTheory.Under.mk (F.map Y.hom)

full_name: CategoryTheory.Under.post
code: /-- A functor `F : T ⥤ D` induces a functor `Under X ⥤ Under (F.obj X)` in the obvious way. -/
@[simps]
def post {X : T} (F : T ⥤ D) : Under X ⥤ Under (F.obj X) 
goal: CategoryTheory.Functor (CategoryTheory.Under X) (CategoryTheory.Under (F.obj X))

full_name: CategoryTheory.Under.post_map
code: /-- A functor `F : T ⥤ D` induces a functor `Under X ⥤ Under (F.obj X)` in the obvious way. -/
@[simps]
def post {X : T} (F : T ⥤ D) : Under X ⥤ Under (F.obj X) 
goal: ∀ {X_1 Y : CategoryTheory.Under X} (f : X_1 ⟶ Y),
  (CategoryTheory.Under.post F).map f = CategoryTheory.Under.homMk (F.map f.right) ⋯

full_name: CategoryTheory.StructuredArrow.toUnder_obj_left
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: ∀ (X_1 : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))),
  ((CategoryTheory.StructuredArrow.toUnder X F).obj X_1).left = X_1.left

full_name: CategoryTheory.StructuredArrow.toUnder
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: CategoryTheory.Functor (CategoryTheory.StructuredArrow X F) (CategoryTheory.Under X)

full_name: CategoryTheory.StructuredArrow.toUnder_map_right
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: ∀ {X_1 Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))}
  (f : X_1 ⟶ Y), ((CategoryTheory.StructuredArrow.toUnder X F).map f).right = F.map f.right

full_name: CategoryTheory.StructuredArrow.toUnder_obj_right
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: ∀ (X_1 : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))),
  ((CategoryTheory.StructuredArrow.toUnder X F).obj X_1).right = F.obj X_1.right

full_name: CategoryTheory.StructuredArrow.toUnder_obj_hom
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: ∀ (X_1 : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))),
  ((CategoryTheory.StructuredArrow.toUnder X F).obj X_1).hom = X_1.hom

full_name: CategoryTheory.StructuredArrow.toUnder_map_left
code: /-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X 
goal: ∀ {X_1 Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))}
  (f : X_1 ⟶ Y), ((CategoryTheory.StructuredArrow.toUnder X F).map f).left = CategoryTheory.CategoryStruct.id X_1.left

full_name: CategoryTheory.StructuredArrow.instFaithfulUnderToUnder
code: instance (X : T) (F : D ⥤ T) [F.Faithful] : (toUnder X F).Faithful 
goal: (CategoryTheory.StructuredArrow.toUnder X F).Faithful

full_name: CategoryTheory.StructuredArrow.instFullUnderToUnder
code: instance (X : T) (F : D ⥤ T) [F.Full] : (toUnder X F).Full 
goal: (CategoryTheory.StructuredArrow.toUnder X F).Full

full_name: CategoryTheory.StructuredArrow.instEssSurjUnderToUnder
code: instance (X : T) (F : D ⥤ T) [F.EssSurj] : (toUnder X F).EssSurj 
goal: (CategoryTheory.StructuredArrow.toUnder X F).EssSurj

full_name: CategoryTheory.StructuredArrow.isEquivalence_toUnder
code: /-- An equivalence `F` induces an equivalence `StructuredArrow X F ≌ Under X`. -/
instance isEquivalence_toUnder (X : T) (F : D ⥤ T) [F.IsEquivalence] :
    (toUnder X F).IsEquivalence 
goal: (CategoryTheory.StructuredArrow.toUnder X F).IsEquivalence

full_name: CategoryTheory.Functor.toOver
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Over X`, it suffices to
    provide maps `F.obj Y ⟶ X` for all `Y` making the obvious triangles involving all `F.map g`
    commute. -/
@[simps! obj_left map_left]
def toOver (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : S ⥤ Over X 
goal: CategoryTheory.Functor S (CategoryTheory.Over X)

full_name: CategoryTheory.Functor.toOver_map_left
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Over X`, it suffices to
    provide maps `F.obj Y ⟶ X` for all `Y` making the obvious triangles involving all `F.map g`
    commute. -/
@[simps! obj_left map_left]
def toOver (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : S ⥤ Over X 
goal: ∀ {X_1 Y : S} (g : X_1 ⟶ Y), ((F.toOver X f h).map g).left = F.map g

full_name: CategoryTheory.Functor.toOver_obj_left
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Over X`, it suffices to
    provide maps `F.obj Y ⟶ X` for all `Y` making the obvious triangles involving all `F.map g`
    commute. -/
@[simps! obj_left map_left]
def toOver (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : S ⥤ Over X 
goal: ((F.toOver X f h).obj Y).left = F.obj Y

full_name: CategoryTheory.Functor.toOverCompForget
code: /-- Upgrading a functor `S ⥤ T` to a functor `S ⥤ Over X` and composing with the forgetful functor
    `Over X ⥤ T` recovers the original functor. -/
def toOverCompForget (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : F.toOver X f h ⋙ Over.forget _ ≅ F 
goal: (F.toOver X f ⋯).comp (CategoryTheory.Over.forget X) ≅ F

full_name: CategoryTheory.Functor.toOver_comp_forget
code: @[simp]
lemma toOver_comp_forget (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : F.toOver X f h ⋙ Over.forget _ = F 
goal: (F.toOver X f ⋯).comp (CategoryTheory.Over.forget X) = F

full_name: CategoryTheory.Functor.toUnder
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Under X`, it suffices to
    provide maps `X ⟶ F.obj Y` for all `Y` making the obvious triangles involving all `F.map g`
    commute.  -/
@[simps! obj_right map_right]
def toUnder (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : S ⥤ Under X 
goal: CategoryTheory.Functor S (CategoryTheory.Under X)

full_name: CategoryTheory.Functor.toUnder_map_right
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Under X`, it suffices to
    provide maps `X ⟶ F.obj Y` for all `Y` making the obvious triangles involving all `F.map g`
    commute.  -/
@[simps! obj_right map_right]
def toUnder (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : S ⥤ Under X 
goal: ∀ {X_1 Y : S} (g : X_1 ⟶ Y), ((F.toUnder X f h).map g).right = F.map g

full_name: CategoryTheory.Functor.toUnder_obj_right
code: /-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Under X`, it suffices to
    provide maps `X ⟶ F.obj Y` for all `Y` making the obvious triangles involving all `F.map g`
    commute.  -/
@[simps! obj_right map_right]
def toUnder (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : S ⥤ Under X 
goal: ((F.toUnder X f h).obj Y).right = F.obj Y

full_name: CategoryTheory.Functor.toUnderCompForget
code: /-- Upgrading a functor `S ⥤ T` to a functor `S ⥤ Under X` and composing with the forgetful functor
    `Under X ⥤ T` recovers the original functor. -/
def toUnderCompForget (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : F.toUnder X f h ⋙ Under.forget _ ≅ F 
goal: (F.toUnder X f ⋯).comp (CategoryTheory.Under.forget X) ≅ F

full_name: CategoryTheory.Functor.toUnder_comp_forget
code: @[simp]
lemma toUnder_comp_forget (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : F.toUnder X f h ⋙ Under.forget _ = F 
goal: (F.toUnder X f ⋯).comp (CategoryTheory.Under.forget X) = F