File: Mathlib/CategoryTheory/Adjunction/Over.lean

full_name: CategoryTheory.Over.pullback
code: /-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X 
goal: CategoryTheory.Functor (CategoryTheory.Over Y) (CategoryTheory.Over X)

full_name: CategoryTheory.Over.pullback_obj_hom
code: /-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X 
goal: ((CategoryTheory.Over.pullback f).obj g).hom = CategoryTheory.Limits.pullback.snd g.hom f

full_name: CategoryTheory.Over.pullback_obj_left
code: /-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X 
goal: ((CategoryTheory.Over.pullback f).obj g).left = CategoryTheory.Limits.pullback g.hom f

full_name: CategoryTheory.Over.pullback_map_left
code: /-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X 
goal: ((CategoryTheory.Over.pullback f).map k).left =
  CategoryTheory.Limits.pullback.lift
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.fst g.hom f) k.left)
    (CategoryTheory.Limits.pullback.snd g.hom f) ⋯

full_name: CategoryTheory.Over.mapPullbackAdj_unit_app
code: /-- `Over.map f` is left adjoint to `Over.pullback f`. -/
@[simps! unit_app counit_app]
def mapPullbackAdj {X Y : C} (f : X ⟶ Y) : Over.map f ⊣ pullback f 
goal: ∀ (X_1 : CategoryTheory.Over X),
  (CategoryTheory.Over.mapPullbackAdj f).unit.app X_1 =
    CategoryTheory.Over.homMk
      (CategoryTheory.Limits.pullback.lift (CategoryTheory.CategoryStruct.id X_1.left) X_1.hom ⋯) ⋯

full_name: CategoryTheory.Over.mapPullbackAdj
code: /-- `Over.map f` is left adjoint to `Over.pullback f`. -/
@[simps! unit_app counit_app]
def mapPullbackAdj {X Y : C} (f : X ⟶ Y) : Over.map f ⊣ pullback f 
goal: CategoryTheory.Over.map f ⊣ CategoryTheory.Over.pullback f

full_name: CategoryTheory.Over.mapPullbackAdj_counit_app
code: /-- `Over.map f` is left adjoint to `Over.pullback f`. -/
@[simps! unit_app counit_app]
def mapPullbackAdj {X Y : C} (f : X ⟶ Y) : Over.map f ⊣ pullback f 
goal: ∀ (Y_1 : CategoryTheory.Over Y),
  (CategoryTheory.Over.mapPullbackAdj f).counit.app Y_1 =
    CategoryTheory.Over.homMk (CategoryTheory.Limits.pullback.fst Y_1.hom f) ⋯

full_name: CategoryTheory.Over.pullbackId
code: /-- pullback (𝟙 X) : Over X ⥤ Over X is the identity functor. -/
def pullbackId {X : C} : pullback (𝟙 X) ≅ 𝟭 _ 
goal: CategoryTheory.Over.pullback (CategoryTheory.CategoryStruct.id X) ≅ CategoryTheory.Functor.id (CategoryTheory.Over X)

full_name: CategoryTheory.Over.pullbackComp
code: /-- pullback commutes with composition (up to natural isomorphism). -/
def pullbackComp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    pullback (f ≫ g) ≅ pullback g ⋙ pullback f 
goal: CategoryTheory.Over.pullback (CategoryTheory.CategoryStruct.comp f g) ≅
  (CategoryTheory.Over.pullback g).comp (CategoryTheory.Over.pullback f)

full_name: CategoryTheory.Over.pullbackIsRightAdjoint
code: instance pullbackIsRightAdjoint {X Y : C} (f : X ⟶ Y) : (pullback f).IsRightAdjoint  
goal: (CategoryTheory.Over.pullback f).IsRightAdjoint

full_name: CategoryTheory.Over.star_obj_left
code: /--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X 
goal: ∀ (X_1 : C), ((CategoryTheory.Over.star X).obj X_1).left = (X ⨯ X_1)

full_name: CategoryTheory.Over.star
code: /--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X 
goal: CategoryTheory.Functor C (CategoryTheory.Over X)

full_name: CategoryTheory.Over.star_obj_hom
code: /--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X 
goal: ∀ (X_1 : C), ((CategoryTheory.Over.star X).obj X_1).hom = CategoryTheory.Limits.prod.fst

full_name: CategoryTheory.Over.star_map_left
code: /--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X 
goal: ∀ {X_1 Y : C} (f : X_1 ⟶ Y),
  ((CategoryTheory.Over.star X).map f).left = CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id X) f

full_name: CategoryTheory.Over.forgetAdjStar
code: /-- The functor `Over.forget X : Over X ⥤ C` has a right adjoint given by `star X`.

Note that the binary products assumption is necessary: the existence of a right adjoint to
`Over.forget X` is equivalent to the existence of each binary product `X ⨯ -`.
-/
def forgetAdjStar [HasBinaryProducts C] : forget X ⊣ star X 
goal: CategoryTheory.Over.forget X ⊣ CategoryTheory.Over.star X

full_name: CategoryTheory.Over.instIsLeftAdjointForgetOfHasBinaryProducts
code: /-- Note that the binary products assumption is necessary: the existence of a right adjoint to
`Over.forget X` is equivalent to the existence of each binary product `X ⨯ -`.
-/
instance [HasBinaryProducts C] : (forget X).IsLeftAdjoint  
goal: (CategoryTheory.Over.forget X).IsLeftAdjoint

full_name: CategoryTheory.Under.pushout
code: /-- When `C` has pushouts, a morphism `f : X ⟶ Y` induces a functor `Under X ⥤ Under Y`,
by pushing a morphism forward along `f`. -/
@[simps]
def pushout {X Y : C} (f : X ⟶ Y) : Under X ⥤ Under Y 
goal: CategoryTheory.Functor (CategoryTheory.Under X) (CategoryTheory.Under Y)

full_name: CategoryTheory.Under.pushout_obj
code: /-- When `C` has pushouts, a morphism `f : X ⟶ Y` induces a functor `Under X ⥤ Under Y`,
by pushing a morphism forward along `f`. -/
@[simps]
def pushout {X Y : C} (f : X ⟶ Y) : Under X ⥤ Under Y 
goal: (CategoryTheory.Under.pushout f).obj x = CategoryTheory.Under.mk (CategoryTheory.Limits.pushout.inr x.hom f)

full_name: CategoryTheory.Under.pushout_map
code: /-- When `C` has pushouts, a morphism `f : X ⟶ Y` induces a functor `Under X ⥤ Under Y`,
by pushing a morphism forward along `f`. -/
@[simps]
def pushout {X Y : C} (f : X ⟶ Y) : Under X ⥤ Under Y 
goal: (CategoryTheory.Under.pushout f).map u =
  CategoryTheory.Under.homMk
    (CategoryTheory.Limits.pushout.desc
      (CategoryTheory.CategoryStruct.comp u.right (CategoryTheory.Limits.pushout.inl x'.hom f))
      (CategoryTheory.Limits.pushout.inr x'.hom f) ⋯)
    ⋯

full_name: CategoryTheory.Under.mapPushoutAdj_counit_app
code: /-- `Under.pushout f` is left adjoint to `Under.map f`. -/
@[simps! unit_app counit_app]
def mapPushoutAdj {X Y : C} (f : X ⟶ Y) : pushout f ⊣ map f 
goal: ∀ (Y_1 : CategoryTheory.Under Y),
  (CategoryTheory.Under.mapPushoutAdj f).counit.app Y_1 =
    CategoryTheory.Under.homMk
      (CategoryTheory.Limits.pushout.desc (CategoryTheory.CategoryStruct.id Y_1.right) Y_1.hom ⋯) ⋯

full_name: CategoryTheory.Under.mapPushoutAdj_unit_app
code: /-- `Under.pushout f` is left adjoint to `Under.map f`. -/
@[simps! unit_app counit_app]
def mapPushoutAdj {X Y : C} (f : X ⟶ Y) : pushout f ⊣ map f 
goal: ∀ (X_1 : CategoryTheory.Under X),
  (CategoryTheory.Under.mapPushoutAdj f).unit.app X_1 =
    CategoryTheory.Under.homMk (CategoryTheory.Limits.pushout.inl X_1.hom f) ⋯

full_name: CategoryTheory.Under.mapPushoutAdj
code: /-- `Under.pushout f` is left adjoint to `Under.map f`. -/
@[simps! unit_app counit_app]
def mapPushoutAdj {X Y : C} (f : X ⟶ Y) : pushout f ⊣ map f 
goal: CategoryTheory.Under.pushout f ⊣ CategoryTheory.Under.map f

full_name: CategoryTheory.Under.pushoutId
code: /-- pushout (𝟙 X) : Under X ⥤ Under X is the identity functor. -/
def pushoutId {X : C} : pushout (𝟙 X) ≅ 𝟭 _ 
goal: CategoryTheory.Under.pushout (CategoryTheory.CategoryStruct.id X) ≅ CategoryTheory.Functor.id (CategoryTheory.Under X)

full_name: CategoryTheory.Under.pullbackComp
code: /-- pushout commutes with composition (up to natural isomorphism). -/
def pullbackComp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) : pushout (f ≫ g) ≅ pushout f ⋙ pushout g 
goal: CategoryTheory.Under.pushout (CategoryTheory.CategoryStruct.comp f g) ≅
  (CategoryTheory.Under.pushout f).comp (CategoryTheory.Under.pushout g)

full_name: CategoryTheory.Under.pushoutIsLeftAdjoint
code: instance pushoutIsLeftAdjoint {X Y : C} (f : X ⟶ Y) : (pushout f).IsLeftAdjoint  
goal: (CategoryTheory.Under.pushout f).IsLeftAdjoint