File: Mathlib/CategoryTheory/Whiskering.lean

full_name: CategoryTheory.whiskerLeft
code: /-- If `α : G ⟶ H` then
`whiskerLeft F α : (F ⋙ G) ⟶ (F ⋙ H)` has components `α.app (F.obj X)`.
-/
@[simps]
def whiskerLeft (F : C ⥤ D) {G H : D ⥤ E} (α : G ⟶ H) :
    F ⋙ G ⟶ F ⋙ H 
goal: F.comp G ⟶ F.comp H

full_name: CategoryTheory.whiskerLeft_app
code: /-- If `α : G ⟶ H` then
`whiskerLeft F α : (F ⋙ G) ⟶ (F ⋙ H)` has components `α.app (F.obj X)`.
-/
@[simps]
def whiskerLeft (F : C ⥤ D) {G H : D ⥤ E} (α : G ⟶ H) :
    F ⋙ G ⟶ F ⋙ H 
goal: (CategoryTheory.whiskerLeft F α).app X = α.app (F.obj X)

full_name: CategoryTheory.whiskerRight_app
code: /-- If `α : G ⟶ H` then
`whisker_right α F : (G ⋙ F) ⟶ (G ⋙ F)` has components `F.map (α.app X)`.
-/
@[simps]
def whiskerRight {G H : C ⥤ D} (α : G ⟶ H) (F : D ⥤ E) :
    G ⋙ F ⟶ H ⋙ F 
goal: (CategoryTheory.whiskerRight α F).app X = F.map (α.app X)

full_name: CategoryTheory.whiskerRight
code: /-- If `α : G ⟶ H` then
`whisker_right α F : (G ⋙ F) ⟶ (G ⋙ F)` has components `F.map (α.app X)`.
-/
@[simps]
def whiskerRight {G H : C ⥤ D} (α : G ⟶ H) (F : D ⥤ E) :
    G ⋙ F ⟶ H ⋙ F 
goal: G.comp F ⟶ H.comp F

full_name: CategoryTheory.whiskeringLeft_map_app_app
code: /-- Left-composition gives a functor `(C ⥤ D) ⥤ ((D ⥤ E) ⥤ (C ⥤ E))`.

`(whiskeringLeft.obj F).obj G` is `F ⋙ G`, and
`(whiskeringLeft.obj F).map α` is `whiskerLeft F α`.
-/
@[simps]
def whiskeringLeft : (C ⥤ D) ⥤ (D ⥤ E) ⥤ C ⥤ E 
goal: ∀ {X Y : CategoryTheory.Functor C D} (τ : X ⟶ Y) (H : CategoryTheory.Functor D E) (c : C),
  (((CategoryTheory.whiskeringLeft C D E).map τ).app H).app c = H.map (τ.app c)

full_name: CategoryTheory.whiskeringLeft
code: /-- Left-composition gives a functor `(C ⥤ D) ⥤ ((D ⥤ E) ⥤ (C ⥤ E))`.

`(whiskeringLeft.obj F).obj G` is `F ⋙ G`, and
`(whiskeringLeft.obj F).map α` is `whiskerLeft F α`.
-/
@[simps]
def whiskeringLeft : (C ⥤ D) ⥤ (D ⥤ E) ⥤ C ⥤ E 
goal: CategoryTheory.Functor (CategoryTheory.Functor C D)
  (CategoryTheory.Functor (CategoryTheory.Functor D E) (CategoryTheory.Functor C E))

full_name: CategoryTheory.whiskeringLeft_obj_obj
code: /-- Left-composition gives a functor `(C ⥤ D) ⥤ ((D ⥤ E) ⥤ (C ⥤ E))`.

`(whiskeringLeft.obj F).obj G` is `F ⋙ G`, and
`(whiskeringLeft.obj F).map α` is `whiskerLeft F α`.
-/
@[simps]
def whiskeringLeft : (C ⥤ D) ⥤ (D ⥤ E) ⥤ C ⥤ E 
goal: ((CategoryTheory.whiskeringLeft C D E).obj F).obj G = F.comp G

full_name: CategoryTheory.whiskeringLeft_obj_map
code: /-- Left-composition gives a functor `(C ⥤ D) ⥤ ((D ⥤ E) ⥤ (C ⥤ E))`.

`(whiskeringLeft.obj F).obj G` is `F ⋙ G`, and
`(whiskeringLeft.obj F).map α` is `whiskerLeft F α`.
-/
@[simps]
def whiskeringLeft : (C ⥤ D) ⥤ (D ⥤ E) ⥤ C ⥤ E 
goal: ∀ {X Y : CategoryTheory.Functor D E} (α : X ⟶ Y),
  ((CategoryTheory.whiskeringLeft C D E).obj F).map α = CategoryTheory.whiskerLeft F α

full_name: CategoryTheory.whiskeringRight_obj_obj
code: /-- Right-composition gives a functor `(D ⥤ E) ⥤ ((C ⥤ D) ⥤ (C ⥤ E))`.

`(whiskeringRight.obj H).obj F` is `F ⋙ H`, and
`(whiskeringRight.obj H).map α` is `whiskerRight α H`.
-/
@[simps]
def whiskeringRight : (D ⥤ E) ⥤ (C ⥤ D) ⥤ C ⥤ E 
goal: ((CategoryTheory.whiskeringRight C D E).obj H).obj F = F.comp H

full_name: CategoryTheory.whiskeringRight
code: /-- Right-composition gives a functor `(D ⥤ E) ⥤ ((C ⥤ D) ⥤ (C ⥤ E))`.

`(whiskeringRight.obj H).obj F` is `F ⋙ H`, and
`(whiskeringRight.obj H).map α` is `whiskerRight α H`.
-/
@[simps]
def whiskeringRight : (D ⥤ E) ⥤ (C ⥤ D) ⥤ C ⥤ E 
goal: CategoryTheory.Functor (CategoryTheory.Functor D E)
  (CategoryTheory.Functor (CategoryTheory.Functor C D) (CategoryTheory.Functor C E))

full_name: CategoryTheory.whiskeringRight_obj_map
code: /-- Right-composition gives a functor `(D ⥤ E) ⥤ ((C ⥤ D) ⥤ (C ⥤ E))`.

`(whiskeringRight.obj H).obj F` is `F ⋙ H`, and
`(whiskeringRight.obj H).map α` is `whiskerRight α H`.
-/
@[simps]
def whiskeringRight : (D ⥤ E) ⥤ (C ⥤ D) ⥤ C ⥤ E 
goal: ∀ {X Y : CategoryTheory.Functor C D} (α : X ⟶ Y),
  ((CategoryTheory.whiskeringRight C D E).obj H).map α = CategoryTheory.whiskerRight α H

full_name: CategoryTheory.whiskeringRight_map_app_app
code: /-- Right-composition gives a functor `(D ⥤ E) ⥤ ((C ⥤ D) ⥤ (C ⥤ E))`.

`(whiskeringRight.obj H).obj F` is `F ⋙ H`, and
`(whiskeringRight.obj H).map α` is `whiskerRight α H`.
-/
@[simps]
def whiskeringRight : (D ⥤ E) ⥤ (C ⥤ D) ⥤ C ⥤ E 
goal: ∀ {X Y : CategoryTheory.Functor D E} (τ : X ⟶ Y) (F : CategoryTheory.Functor C D) (c : C),
  (((CategoryTheory.whiskeringRight C D E).map τ).app F).app c = τ.app (F.obj c)

full_name: CategoryTheory.faithful_whiskeringRight_obj
code: instance faithful_whiskeringRight_obj {F : D ⥤ E} [F.Faithful] :
    ((whiskeringRight C D E).obj F).Faithful 
goal: ((CategoryTheory.whiskeringRight C D E).obj F).Faithful

full_name: CategoryTheory.Functor.FullyFaithful.whiskeringRight
code: /-- If `F : D ⥤ E` is fully faithful, then so is
`(whiskeringRight C D E).obj F : (C ⥤ D) ⥤ C ⥤ E`. -/
@[simps]
def Functor.FullyFaithful.whiskeringRight {F : D ⥤ E} (hF : F.FullyFaithful)
    (C : Type*) [Category C] :
    ((whiskeringRight C D E).obj F).FullyFaithful 
goal: ((CategoryTheory.whiskeringRight C D E).obj F).FullyFaithful

full_name: CategoryTheory.Functor.FullyFaithful.whiskeringRight_preimage_app
code: /-- If `F : D ⥤ E` is fully faithful, then so is
`(whiskeringRight C D E).obj F : (C ⥤ D) ⥤ C ⥤ E`. -/
@[simps]
def Functor.FullyFaithful.whiskeringRight {F : D ⥤ E} (hF : F.FullyFaithful)
    (C : Type*) [Category C] :
    ((whiskeringRight C D E).obj F).FullyFaithful 
goal: ∀ {X Y : CategoryTheory.Functor C D}
  (f : ((CategoryTheory.whiskeringRight C D E).obj F).obj X ⟶ ((CategoryTheory.whiskeringRight C D E).obj F).obj Y)
  (X_1 : C), ((hF.whiskeringRight C).preimage f).app X_1 = hF.preimage (f.app X_1)

full_name: CategoryTheory.full_whiskeringRight_obj
code: instance full_whiskeringRight_obj {F : D ⥤ E} [F.Faithful] [F.Full] :
    ((whiskeringRight C D E).obj F).Full 
goal: ((CategoryTheory.whiskeringRight C D E).obj F).Full

full_name: CategoryTheory.whiskerLeft_id
code: @[simp]
theorem whiskerLeft_id (F : C ⥤ D) {G : D ⥤ E} :
    whiskerLeft F (NatTrans.id G) = NatTrans.id (F.comp G) 
goal: CategoryTheory.whiskerLeft F (CategoryTheory.NatTrans.id G) = CategoryTheory.NatTrans.id (F.comp G)

full_name: CategoryTheory.whiskerLeft_id'
code: @[simp]
theorem whiskerLeft_id' (F : C ⥤ D) {G : D ⥤ E} : whiskerLeft F (𝟙 G) = 𝟙 (F.comp G) 
goal: CategoryTheory.whiskerLeft F (CategoryTheory.CategoryStruct.id G) = CategoryTheory.CategoryStruct.id (F.comp G)

full_name: CategoryTheory.whiskerRight_id
code: @[simp]
theorem whiskerRight_id {G : C ⥤ D} (F : D ⥤ E) :
    whiskerRight (NatTrans.id G) F = NatTrans.id (G.comp F) 
goal: CategoryTheory.whiskerRight (CategoryTheory.NatTrans.id G) F = CategoryTheory.NatTrans.id (G.comp F)

full_name: CategoryTheory.whiskerRight_id'
code: @[simp]
theorem whiskerRight_id' {G : C ⥤ D} (F : D ⥤ E) : whiskerRight (𝟙 G) F = 𝟙 (G.comp F) 
goal: CategoryTheory.whiskerRight (CategoryTheory.CategoryStruct.id G) F = CategoryTheory.CategoryStruct.id (G.comp F)

full_name: CategoryTheory.whiskerLeft_comp
code: @[simp, reassoc]
theorem whiskerLeft_comp (F : C ⥤ D) {G H K : D ⥤ E} (α : G ⟶ H) (β : H ⟶ K) :
    whiskerLeft F (α ≫ β) = whiskerLeft F α ≫ whiskerLeft F β 
goal: CategoryTheory.whiskerLeft F (CategoryTheory.CategoryStruct.comp α β) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft F α) (CategoryTheory.whiskerLeft F β)

full_name: CategoryTheory.whiskerRight_comp
code: @[simp, reassoc]
theorem whiskerRight_comp {G H K : C ⥤ D} (α : G ⟶ H) (β : H ⟶ K) (F : D ⥤ E) :
    whiskerRight (α ≫ β) F = whiskerRight α F ≫ whiskerRight β F 
goal: CategoryTheory.whiskerRight (CategoryTheory.CategoryStruct.comp α β) F =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight α F) (CategoryTheory.whiskerRight β F)

full_name: CategoryTheory.isoWhiskerLeft
code: /-- If `α : G ≅ H` is a natural isomorphism then
`iso_whisker_left F α : (F ⋙ G) ≅ (F ⋙ H)` has components `α.app (F.obj X)`.
-/
def isoWhiskerLeft (F : C ⥤ D) {G H : D ⥤ E} (α : G ≅ H) : F ⋙ G ≅ F ⋙ H 
goal: F.comp G ≅ F.comp H

full_name: CategoryTheory.isoWhiskerLeft_hom
code: @[simp]
theorem isoWhiskerLeft_hom (F : C ⥤ D) {G H : D ⥤ E} (α : G ≅ H) :
    (isoWhiskerLeft F α).hom = whiskerLeft F α.hom 
goal: (CategoryTheory.isoWhiskerLeft F α).hom = CategoryTheory.whiskerLeft F α.hom

full_name: CategoryTheory.isoWhiskerLeft_inv
code: @[simp]
theorem isoWhiskerLeft_inv (F : C ⥤ D) {G H : D ⥤ E} (α : G ≅ H) :
    (isoWhiskerLeft F α).inv = whiskerLeft F α.inv 
goal: (CategoryTheory.isoWhiskerLeft F α).inv = CategoryTheory.whiskerLeft F α.inv

full_name: CategoryTheory.isoWhiskerRight
code: /-- If `α : G ≅ H` then
`iso_whisker_right α F : (G ⋙ F) ≅ (H ⋙ F)` has components `F.map_iso (α.app X)`.
-/
def isoWhiskerRight {G H : C ⥤ D} (α : G ≅ H) (F : D ⥤ E) : G ⋙ F ≅ H ⋙ F 
goal: G.comp F ≅ H.comp F

full_name: CategoryTheory.isoWhiskerRight_hom
code: @[simp]
theorem isoWhiskerRight_hom {G H : C ⥤ D} (α : G ≅ H) (F : D ⥤ E) :
    (isoWhiskerRight α F).hom = whiskerRight α.hom F 
goal: (CategoryTheory.isoWhiskerRight α F).hom = CategoryTheory.whiskerRight α.hom F

full_name: CategoryTheory.isoWhiskerRight_inv
code: @[simp]
theorem isoWhiskerRight_inv {G H : C ⥤ D} (α : G ≅ H) (F : D ⥤ E) :
    (isoWhiskerRight α F).inv = whiskerRight α.inv F 
goal: (CategoryTheory.isoWhiskerRight α F).inv = CategoryTheory.whiskerRight α.inv F

full_name: CategoryTheory.isIso_whiskerLeft
code: instance isIso_whiskerLeft (F : C ⥤ D) {G H : D ⥤ E} (α : G ⟶ H) [IsIso α] :
    IsIso (whiskerLeft F α) 
goal: CategoryTheory.IsIso (CategoryTheory.whiskerLeft F α)

full_name: CategoryTheory.isIso_whiskerRight
code: instance isIso_whiskerRight {G H : C ⥤ D} (α : G ⟶ H) (F : D ⥤ E) [IsIso α] :
    IsIso (whiskerRight α F) 
goal: CategoryTheory.IsIso (CategoryTheory.whiskerRight α F)

full_name: CategoryTheory.whiskerLeft_twice
code: @[simp]
theorem whiskerLeft_twice (F : B ⥤ C) (G : C ⥤ D) {H K : D ⥤ E} (α : H ⟶ K) :
    whiskerLeft F (whiskerLeft G α) = whiskerLeft (F ⋙ G) α 
goal: CategoryTheory.whiskerLeft F (CategoryTheory.whiskerLeft G α) = CategoryTheory.whiskerLeft (F.comp G) α

full_name: CategoryTheory.whiskerRight_twice
code: @[simp]
theorem whiskerRight_twice {H K : B ⥤ C} (F : C ⥤ D) (G : D ⥤ E) (α : H ⟶ K) :
    whiskerRight (whiskerRight α F) G = whiskerRight α (F ⋙ G) 
goal: CategoryTheory.whiskerRight (CategoryTheory.whiskerRight α F) G = CategoryTheory.whiskerRight α (F.comp G)

full_name: CategoryTheory.whiskerRight_left
code: theorem whiskerRight_left (F : B ⥤ C) {G H : C ⥤ D} (α : G ⟶ H) (K : D ⥤ E) :
    whiskerRight (whiskerLeft F α) K = whiskerLeft F (whiskerRight α K) 
goal: CategoryTheory.whiskerRight (CategoryTheory.whiskerLeft F α) K =
  CategoryTheory.whiskerLeft F (CategoryTheory.whiskerRight α K)

full_name: CategoryTheory.Functor.leftUnitor_inv_app
code: /-- The left unitor, a natural isomorphism `((𝟭 _) ⋙ F) ≅ F`.
-/
@[simps]
def leftUnitor (F : A ⥤ B) :
    𝟭 A ⋙ F ≅ F 
goal: F.leftUnitor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.leftUnitor_hom_app
code: /-- The left unitor, a natural isomorphism `((𝟭 _) ⋙ F) ≅ F`.
-/
@[simps]
def leftUnitor (F : A ⥤ B) :
    𝟭 A ⋙ F ≅ F 
goal: F.leftUnitor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.leftUnitor
code: /-- The left unitor, a natural isomorphism `((𝟭 _) ⋙ F) ≅ F`.
-/
@[simps]
def leftUnitor (F : A ⥤ B) :
    𝟭 A ⋙ F ≅ F 
goal: (CategoryTheory.Functor.id A).comp F ≅ F

full_name: CategoryTheory.Functor.rightUnitor_hom_app
code: /-- The right unitor, a natural isomorphism `(F ⋙ (𝟭 B)) ≅ F`.
-/
@[simps]
def rightUnitor (F : A ⥤ B) :
    F ⋙ 𝟭 B ≅ F 
goal: F.rightUnitor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.rightUnitor_inv_app
code: /-- The right unitor, a natural isomorphism `(F ⋙ (𝟭 B)) ≅ F`.
-/
@[simps]
def rightUnitor (F : A ⥤ B) :
    F ⋙ 𝟭 B ≅ F 
goal: F.rightUnitor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.rightUnitor
code: /-- The right unitor, a natural isomorphism `(F ⋙ (𝟭 B)) ≅ F`.
-/
@[simps]
def rightUnitor (F : A ⥤ B) :
    F ⋙ 𝟭 B ≅ F 
goal: F.comp (CategoryTheory.Functor.id B) ≅ F

full_name: CategoryTheory.Functor.associator
code: /-- The associator for functors, a natural isomorphism `((F ⋙ G) ⋙ H) ≅ (F ⋙ (G ⋙ H))`.

(In fact, `iso.refl _` will work here, but it tends to make Lean slow later,
and it's usually best to insert explicit associators.)
-/
@[simps]
def associator (F : A ⥤ B) (G : B ⥤ C) (H : C ⥤ D) :
    (F ⋙ G) ⋙ H ≅ F ⋙ G ⋙ H 
goal: (F.comp G).comp H ≅ F.comp (G.comp H)

full_name: CategoryTheory.Functor.associator_hom_app
code: /-- The associator for functors, a natural isomorphism `((F ⋙ G) ⋙ H) ≅ (F ⋙ (G ⋙ H))`.

(In fact, `iso.refl _` will work here, but it tends to make Lean slow later,
and it's usually best to insert explicit associators.)
-/
@[simps]
def associator (F : A ⥤ B) (G : B ⥤ C) (H : C ⥤ D) :
    (F ⋙ G) ⋙ H ≅ F ⋙ G ⋙ H 
goal: ∀ (x : A), (F.associator G H).hom.app x = CategoryTheory.CategoryStruct.id (((F.comp G).comp H).obj x)

full_name: CategoryTheory.Functor.associator_inv_app
code: /-- The associator for functors, a natural isomorphism `((F ⋙ G) ⋙ H) ≅ (F ⋙ (G ⋙ H))`.

(In fact, `iso.refl _` will work here, but it tends to make Lean slow later,
and it's usually best to insert explicit associators.)
-/
@[simps]
def associator (F : A ⥤ B) (G : B ⥤ C) (H : C ⥤ D) :
    (F ⋙ G) ⋙ H ≅ F ⋙ G ⋙ H 
goal: ∀ (x : A), (F.associator G H).inv.app x = CategoryTheory.CategoryStruct.id ((F.comp (G.comp H)).obj x)

full_name: CategoryTheory.Functor.assoc
code: protected theorem assoc (F : A ⥤ B) (G : B ⥤ C) (H : C ⥤ D) : (F ⋙ G) ⋙ H = F ⋙ G ⋙ H 
goal: (F.comp G).comp H = F.comp (G.comp H)

full_name: CategoryTheory.Functor.triangle
code: theorem triangle (F : A ⥤ B) (G : B ⥤ C) :
    (associator F (𝟭 B) G).hom ≫ whiskerLeft F (leftUnitor G).hom =
      whiskerRight (rightUnitor F).hom G 
goal: CategoryTheory.CategoryStruct.comp (F.associator (CategoryTheory.Functor.id B) G).hom
    (CategoryTheory.whiskerLeft F G.leftUnitor.hom) =
  CategoryTheory.whiskerRight F.rightUnitor.hom G

full_name: CategoryTheory.Functor.pentagon
code: theorem pentagon :
    whiskerRight (associator F G H).hom K ≫
        (associator F (G ⋙ H) K).hom ≫ whiskerLeft F (associator G H K).hom =
      (associator (F ⋙ G) H K).hom ≫ (associator F G (H ⋙ K)).hom 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (F.associator G H).hom K)
    (CategoryTheory.CategoryStruct.comp (F.associator (G.comp H) K).hom
      (CategoryTheory.whiskerLeft F (G.associator H K).hom)) =
  CategoryTheory.CategoryStruct.comp ((F.comp G).associator H K).hom (F.associator G (H.comp K)).hom