# Whiskering #

Given a functor F : C ⥤ D and functors G H : D ⥤ E and a natural transformation α : G ⟶ H, we can construct a new natural transformation F ⋙ G ⟶ F ⋙ H, called whiskerLeft F α. This is the same as the horizontal composition of 𝟙 F with α.

This operation is functorial in F, and we package this as whiskeringLeft. Here (whiskeringLeft.obj F).obj G is F ⋙ G, and (whiskeringLeft.obj F).map α is whiskerLeft F α. (That is, we might have alternatively named this as the "left composition functor".)

We also provide analogues for composition on the right, and for these operations on isomorphisms.

At the end of the file, we provide the left and right unitors, and the associator, for functor composition. (In fact functor composition is definitionally associative, but very often relying on this causes extremely slow elaboration, so it is better to insert it explicitly.) We also show these natural isomorphisms satisfy the triangle and pentagon identities.

@[simp]
theorem CategoryTheory.whiskerLeft_app {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) (X : C) :
.app X = α.app (F.obj X)
@[elab_without_expected_type]
def CategoryTheory.whiskerLeft {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) :
F.comp G F.comp H

If α : G ⟶ H then whiskerLeft F α : (F ⋙ G) ⟶ (F ⋙ H) has components α.app (F.obj X).

Equations
• = { app := fun (X : C) => α.app (F.obj X), naturality := }
Instances For
@[simp]
theorem CategoryTheory.whiskerRight_app {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) (X : C) :
.app X = F.map (α.app X)
@[elab_without_expected_type]
def CategoryTheory.whiskerRight {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) :
G.comp F H.comp F

If α : G ⟶ H then whisker_right α F : (G ⋙ F) ⟶ (G ⋙ F) has components F.map (α.app X).

Equations
• = { app := fun (X : C) => F.map (α.app X), naturality := }
Instances For
@[simp]
theorem CategoryTheory.whiskeringLeft_obj_map (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] (F : ) :
∀ {X Y : } (α : X Y), (.obj F).map α =
@[simp]
theorem CategoryTheory.whiskeringLeft_map_app_app (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] :
∀ {X Y : } (τ : X Y) (H : ) (c : C), ((.map τ).app H).app c = H.map (τ.app c)
@[simp]
theorem CategoryTheory.whiskeringLeft_obj_obj (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] (F : ) (G : ) :
(.obj F).obj G = F.comp G
def CategoryTheory.whiskeringLeft (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] :

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 α.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem CategoryTheory.whiskeringRight_obj_map (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] (H : ) :
∀ {X Y : } (α : X Y), (.obj H).map α =
@[simp]
theorem CategoryTheory.whiskeringRight_map_app_app (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] :
∀ {X Y : } (τ : X Y) (F : ) (c : C), ((.map τ).app F).app c = τ.app (F.obj c)
@[simp]
theorem CategoryTheory.whiskeringRight_obj_obj (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] (H : ) (F : ) :
(.obj H).obj F = F.comp H
def CategoryTheory.whiskeringRight (C : Type u₁) [] (D : Type u₂) [] (E : Type u₃) [] :

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.

Equations
• One or more equations did not get rendered due to their size.
Instances For
instance CategoryTheory.faithful_whiskeringRight_obj {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {F : } [F.Faithful] :
(.obj F).Faithful
Equations
• =
@[simp]
theorem CategoryTheory.Functor.FullyFaithful.whiskeringRight_preimage_app {D : Type u₂} [] {E : Type u₃} [] {F : } (hF : F.FullyFaithful) (C : Type u_1) [] :
∀ {X Y : } (f : (.obj F).obj X (.obj F).obj Y) (X_1 : C), ((hF.whiskeringRight C).preimage f).app X_1 = hF.preimage (f.app X_1)
def CategoryTheory.Functor.FullyFaithful.whiskeringRight {D : Type u₂} [] {E : Type u₃} [] {F : } (hF : F.FullyFaithful) (C : Type u_1) [] :
(.obj F).FullyFaithful

If F : D ⥤ E is fully faithful, then so is (whiskeringRight C D E).obj F : (C ⥤ D) ⥤ C ⥤ E.

Equations
• One or more equations did not get rendered due to their size.
Instances For
instance CategoryTheory.full_whiskeringRight_obj {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {F : } [F.Faithful] [F.Full] :
(.obj F).Full
Equations
• =
@[simp]
theorem CategoryTheory.whiskerLeft_id {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } :
@[simp]
theorem CategoryTheory.whiskerLeft_id' {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } :
@[simp]
theorem CategoryTheory.whiskerRight_id {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } (F : ) :
@[simp]
theorem CategoryTheory.whiskerRight_id' {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } (F : ) :
theorem CategoryTheory.whiskerLeft_comp_assoc {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } {K : } (α : G H) (β : H K) {Z : } (h : F.comp K Z) :
@[simp]
theorem CategoryTheory.whiskerLeft_comp {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } {K : } (α : G H) (β : H K) :
theorem CategoryTheory.whiskerRight_comp_assoc {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } {K : } (α : G H) (β : H K) (F : ) {Z : } (h : K.comp F Z) :
@[simp]
theorem CategoryTheory.whiskerRight_comp {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } {K : } (α : G H) (β : H K) (F : ) :
def CategoryTheory.isoWhiskerLeft {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) :
F.comp G F.comp H

If α : G ≅ H is a natural isomorphism then iso_whisker_left F α : (F ⋙ G) ≅ (F ⋙ H) has components α.app (F.obj X).

Equations
• = (.obj F).mapIso α
Instances For
@[simp]
theorem CategoryTheory.isoWhiskerLeft_hom {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) :
.hom =
@[simp]
theorem CategoryTheory.isoWhiskerLeft_inv {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) :
.inv =
def CategoryTheory.isoWhiskerRight {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) :
G.comp F H.comp F

If α : G ≅ H then iso_whisker_right α F : (G ⋙ F) ≅ (H ⋙ F) has components F.map_iso (α.app X).

Equations
• = (.obj F).mapIso α
Instances For
@[simp]
theorem CategoryTheory.isoWhiskerRight_hom {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) :
.hom =
@[simp]
theorem CategoryTheory.isoWhiskerRight_inv {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) :
.inv =
instance CategoryTheory.isIso_whiskerLeft {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {G : } {H : } (α : G H) :
Equations
• =
instance CategoryTheory.isIso_whiskerRight {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {G : } {H : } (α : G H) (F : ) :
Equations
• =
@[simp]
theorem CategoryTheory.whiskerLeft_twice {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {B : Type u₄} [] (F : ) (G : ) {H : } {K : } (α : H K) :
@[simp]
theorem CategoryTheory.whiskerRight_twice {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {B : Type u₄} [] {H : } {K : } (F : ) (G : ) (α : H K) :
theorem CategoryTheory.whiskerRight_left {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {B : Type u₄} [] (F : ) {G : } {H : } (α : G H) (K : ) :
@[simp]
theorem CategoryTheory.Functor.leftUnitor_hom_app {A : Type u₁} [] {B : Type u₂} [] (F : ) (X : A) :
F.leftUnitor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)
@[simp]
theorem CategoryTheory.Functor.leftUnitor_inv_app {A : Type u₁} [] {B : Type u₂} [] (F : ) (X : A) :
F.leftUnitor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)
def CategoryTheory.Functor.leftUnitor {A : Type u₁} [] {B : Type u₂} [] (F : ) :
.comp F F

The left unitor, a natural isomorphism ((𝟭 _) ⋙ F) ≅ F.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem CategoryTheory.Functor.rightUnitor_inv_app {A : Type u₁} [] {B : Type u₂} [] (F : ) (X : A) :
F.rightUnitor.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)
@[simp]
theorem CategoryTheory.Functor.rightUnitor_hom_app {A : Type u₁} [] {B : Type u₂} [] (F : ) (X : A) :
F.rightUnitor.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)
def CategoryTheory.Functor.rightUnitor {A : Type u₁} [] {B : Type u₂} [] (F : ) :
F.comp F

The right unitor, a natural isomorphism (F ⋙ (𝟭 B)) ≅ F.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem CategoryTheory.Functor.associator_hom_app {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] {D : Type u₄} [] (F : ) (G : ) (H : ) :
∀ (x : A), (F.associator G H).hom.app x = CategoryTheory.CategoryStruct.id (((F.comp G).comp H).obj x)
@[simp]
theorem CategoryTheory.Functor.associator_inv_app {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] {D : Type u₄} [] (F : ) (G : ) (H : ) :
∀ (x : A), (F.associator G H).inv.app x = CategoryTheory.CategoryStruct.id ((F.comp (G.comp H)).obj x)
def CategoryTheory.Functor.associator {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] {D : Type u₄} [] (F : ) (G : ) (H : ) :
(F.comp G).comp H F.comp (G.comp H)

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.)

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem CategoryTheory.Functor.assoc {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] {D : Type u₄} [] (F : ) (G : ) (H : ) :
(F.comp G).comp H = F.comp (G.comp H)
theorem CategoryTheory.Functor.triangle {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] (F : ) (G : ) :
CategoryTheory.CategoryStruct.comp (F.associator G).hom (CategoryTheory.whiskerLeft F G.leftUnitor.hom) = CategoryTheory.whiskerRight F.rightUnitor.hom G
theorem CategoryTheory.Functor.pentagon {A : Type u₁} [] {B : Type u₂} [] {C : Type u₃} [] {D : Type u₄} [] {E : Type u₅} [] (F : ) (G : ) (H : ) (K : ) :
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