The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.CategoryTheory.NatTrans

18 declarations. Mathlib docs · Source

Natural transformations

Defines natural transformations between functors.

A natural transformation α : NatTrans F G consists of morphisms α.app X : F.obj X ⟶ G.obj X, and the naturality squares α.naturality f : F.map f ≫ α.app Y = α.app X ≫ G.map f, where f : X ⟶ Y.

Note that we make NatTrans.naturality a simp lemma, with the preferred simp normal form pushing components of natural transformations to the left.

See also CategoryTheory.FunctorCat, where we provide the category structure on functors and natural transformations.

Introduces notations

  • τ.app X for the components of natural transformations,
  • F ⟶ G for the type of natural transformations between functors F and G (this and the next require CategoryTheory.FunctorCat),
  • σ ≫ τ for vertical compositions, and
  • σ ◫ τ for horizontal compositions.

theorem CategoryTheory.NatTrans.mk.inj E1 #

∀ {C : Type u₁} {inst : CategoryTheory.Category.{v₁, u₁} C} {D : Type u₂} {inst_1 : CategoryTheory.Category.{v₂, u₂} D}
  {F G : CategoryTheory.Functor C D} {app : (X : C) → F.obj X ⟶ G.obj X}
  {naturality :
    autoParam
      (∀ ⦃X Y : C⦄ (f : X ⟶ Y),
        CategoryTheory.CategoryStruct.comp (F.map f) (app Y) = CategoryTheory.CategoryStruct.comp (app X) (G.map f))
      CategoryTheory.NatTrans.naturality._autoParam}
  {app_1 : (X : C) → F.obj X ⟶ G.obj X}
  {naturality_1 :
    autoParam
      (∀ ⦃X Y : C⦄ (f : X ⟶ Y),
        CategoryTheory.CategoryStruct.comp (F.map f) (app_1 Y) = CategoryTheory.CategoryStruct.comp (app_1 X) (G.map f))
      CategoryTheory.NatTrans.naturality._autoParam},
  { app := app, naturality := naturality } = { app := app_1, naturality := naturality_1 } → app = app_1

theorem CategoryTheory.NatTrans.mk.injEq E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} (app : (X : C) → F.obj X ⟶ G.obj X)
  (naturality :
    autoParam
      (∀ ⦃X Y : C⦄ (f : X ⟶ Y),
        CategoryTheory.CategoryStruct.comp (F.map f) (app Y) = CategoryTheory.CategoryStruct.comp (app X) (G.map f))
      CategoryTheory.NatTrans.naturality._autoParam)
  (app_1 : (X : C) → F.obj X ⟶ G.obj X)
  (naturality_1 :
    autoParam
      (∀ ⦃X Y : C⦄ (f : X ⟶ Y),
        CategoryTheory.CategoryStruct.comp (F.map f) (app_1 Y) = CategoryTheory.CategoryStruct.comp (app_1 X) (G.map f))
      CategoryTheory.NatTrans.naturality._autoParam),
  ({ app := app, naturality := naturality } = { app := app_1, naturality := naturality_1 }) = (app = app_1)

def CategoryTheory.NatTrans.ctorIdx E1 #

{C : Type u₁} →
  {inst : CategoryTheory.Category.{v₁, u₁} C} →
    {D : Type u₂} →
      {inst_1 : CategoryTheory.Category.{v₂, u₂} D} →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.NatTrans F G → ℕ

structure CategoryTheory.NatTrans E3 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] →
        CategoryTheory.Functor C D → CategoryTheory.Functor C D → Type (max u₁ v₂)

NatTrans F G represents a natural transformation between functors F and G.

The field app provides the components of the natural transformation.

Naturality is expressed by α.naturality.

theorem CategoryTheory.NatTrans.ext E1 #

∀ {C : Type u₁} {inst : CategoryTheory.Category.{v₁, u₁} C} {D : Type u₂} {inst_1 : CategoryTheory.Category.{v₂, u₂} D}
  {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.NatTrans F G}, x.app = y.app → x = y

theorem CategoryTheory.NatTrans.ext_iff E0 #

∀ {C : Type u₁} {inst : CategoryTheory.Category.{v₁, u₁} C} {D : Type u₂} {inst_1 : CategoryTheory.Category.{v₂, u₂} D}
  {F G : CategoryTheory.Functor C D} {x y : CategoryTheory.NatTrans F G}, x = y ↔ x.app = y.app

ctor CategoryTheory.NatTrans.mk E0 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] →
        {F G : CategoryTheory.Functor C D} →
          (app : (X : C) → F.obj X ⟶ G.obj X) →
            autoParam
                (∀ ⦃X Y : C⦄ (f : X ⟶ Y),
                  CategoryTheory.CategoryStruct.comp (F.map f) (app Y) =
                    CategoryTheory.CategoryStruct.comp (app X) (G.map f))
                CategoryTheory.NatTrans.naturality._autoParam →
              CategoryTheory.NatTrans F G

abbrev CategoryTheory.NatTrans.app E1 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] →
        {F G : CategoryTheory.Functor C D} → CategoryTheory.NatTrans F G → (X : C) → F.obj X ⟶ G.obj X

The component of a natural transformation.

theorem CategoryTheory.NatTrans.naturality E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} (self : CategoryTheory.NatTrans F G) ⦃X Y : C⦄ (f : X ⟶ Y),
  CategoryTheory.CategoryStruct.comp (F.map f) (self.app Y) = CategoryTheory.CategoryStruct.comp (self.app X) (G.map f)

The naturality square for a given morphism.

theorem CategoryTheory.NatTrans.naturality_map_assoc E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} (self : CategoryTheory.NatTrans F G) ⦃X Y : C⦄ (f : X ⟶ Y) {D_1 : Type u_1}
  [_instD : CategoryTheory.Category.{u_2, u_1} D_1] (F_1 : CategoryTheory.Functor D D_1) {Z : D_1}
  (h : F_1.obj (G.obj Y) ⟶ Z),
  CategoryTheory.CategoryStruct.comp (F_1.map (F.map f)) (CategoryTheory.CategoryStruct.comp (F_1.map (self.app Y)) h) =
    CategoryTheory.CategoryStruct.comp (F_1.map (self.app X)) (CategoryTheory.CategoryStruct.comp (F_1.map (G.map f)) h)

The naturality square for a given morphism.

theorem CategoryTheory.NatTrans.naturality_map E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} (self : CategoryTheory.NatTrans F G) ⦃X Y : C⦄ (f : X ⟶ Y) {D_1 : Type u_1}
  [_instD : CategoryTheory.Category.{u_2, u_1} D_1] (F_1 : CategoryTheory.Functor D D_1),
  CategoryTheory.CategoryStruct.comp (F_1.map (F.map f)) (F_1.map (self.app Y)) =
    CategoryTheory.CategoryStruct.comp (F_1.map (self.app X)) (F_1.map (G.map f))

The naturality square for a given morphism.

theorem CategoryTheory.NatTrans.naturality_assoc E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} (self : CategoryTheory.NatTrans F G) ⦃X Y : C⦄ (f : X ⟶ Y) {Z : D}
  (h : G.obj Y ⟶ Z),
  CategoryTheory.CategoryStruct.comp (F.map f) (CategoryTheory.CategoryStruct.comp (self.app Y) h) =
    CategoryTheory.CategoryStruct.comp (self.app X) (CategoryTheory.CategoryStruct.comp (G.map f) h)

The naturality square for a given morphism.

theorem CategoryTheory.congr_app E1 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G : CategoryTheory.Functor C D} {α β : CategoryTheory.NatTrans F G}, α = β → ∀ (X : C), α.app X = β.app X

def CategoryTheory.NatTrans.id E1 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] → (F : CategoryTheory.Functor C D) → CategoryTheory.NatTrans F F

NatTrans.id F is the identity natural transformation on a functor F.

theorem CategoryTheory.NatTrans.id_app' E0 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  (F : CategoryTheory.Functor C D) (X : C),
  (CategoryTheory.NatTrans.id F).app X = CategoryTheory.CategoryStruct.id (F.obj X)

instance CategoryTheory.NatTrans.instInhabited E0 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] →
        (F : CategoryTheory.Functor C D) → Inhabited (CategoryTheory.NatTrans F F)

def CategoryTheory.NatTrans.vcomp E1 #

{C : Type u₁} →
  [inst : CategoryTheory.Category.{v₁, u₁} C] →
    {D : Type u₂} →
      [inst_1 : CategoryTheory.Category.{v₂, u₂} D] →
        {F G H : CategoryTheory.Functor C D} →
          CategoryTheory.NatTrans F G → CategoryTheory.NatTrans G H → CategoryTheory.NatTrans F H

vcomp α β is the vertical compositions of natural transformations.

theorem CategoryTheory.NatTrans.vcomp_app E1 #

∀ {C : Type u₁} [inst : CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [inst_1 : CategoryTheory.Category.{v₂, u₂} D]
  {F G H : CategoryTheory.Functor C D} (α : CategoryTheory.NatTrans F G) (β : CategoryTheory.NatTrans G H) (X : C),
  (α.vcomp β).app X = CategoryTheory.CategoryStruct.comp (α.app X) (β.app X)