# Documentation

Mathlib.CategoryTheory.NatIso

# Natural isomorphisms #

For the most part, natural isomorphisms are just another sort of isomorphism.

We provide some special support for extracting components:

• if α : F ≅ G, then a.app X : F.obj X ≅ G.obj X, and building natural isomorphisms from components:
NatIso.ofComponents
(app : ∀ X : C, F.obj X ≅ G.obj X)
(naturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f) :
F ≅ G


only needing to check naturality in one direction.

## Implementation #

Note that NatIso is a namespace without a corresponding definition; we put some declarations that are specifically about natural isomorphisms in the Iso namespace so that they are available using dot notation.

@[simp]
theorem CategoryTheory.Iso.app_hom {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
(α.app X).hom = α.hom.app X
@[simp]
theorem CategoryTheory.Iso.app_inv {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
(α.app X).inv = α.inv.app X
def CategoryTheory.Iso.app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
F.obj X G.obj X

The application of a natural isomorphism to an object. We put this definition in a different namespace, so that we can use α.app

Instances For
@[simp]
theorem CategoryTheory.Iso.hom_inv_id_app_assoc {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) {Z : D} (h : F.obj X Z) :
@[simp]
theorem CategoryTheory.Iso.hom_inv_id_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
@[simp]
theorem CategoryTheory.Iso.inv_hom_id_app_assoc {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) {Z : D} (h : G.obj X Z) :
@[simp]
theorem CategoryTheory.Iso.inv_hom_id_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
@[simp]
theorem CategoryTheory.NatIso.trans_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {H : } (α : F G) (β : G H) (X : C) :
(α ≪≫ β).app X = α.app X ≪≫ β.app X
theorem CategoryTheory.NatIso.app_hom {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
(α.app X).hom = α.hom.app X
theorem CategoryTheory.NatIso.app_inv {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
(α.app X).inv = α.inv.app X
instance CategoryTheory.NatIso.hom_app_isIso {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
CategoryTheory.IsIso (α.hom.app X)
instance CategoryTheory.NatIso.inv_app_isIso {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :
CategoryTheory.IsIso (α.inv.app X)

Unfortunately we need a separate set of cancellation lemmas for components of natural isomorphisms, because the simp normal form is α.hom.app X, rather than α.app.hom X.

(With the later, the morphism would be visibly part of an isomorphism, so general lemmas about isomorphisms would apply.)

In the future, we should consider a redesign that changes this simp norm form, but for now it breaks too many proofs.

@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_hom_left {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {X : C} {Z : D} (g : G.obj X Z) (g' : G.obj X Z) :
@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_inv_left {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {X : C} {Z : D} (g : F.obj X Z) (g' : F.obj X Z) :
@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_hom_right {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {X : D} {Y : C} (f : X F.obj Y) (f' : X F.obj Y) :
@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_inv_right {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {X : D} {Y : C} (f : X G.obj Y) (f' : X G.obj Y) :
@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_hom_right_assoc {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {W : D} {X : D} {X' : D} {Y : C} (f : W X) (g : X F.obj Y) (f' : W X') (g' : X' F.obj Y) :
@[simp]
theorem CategoryTheory.NatIso.cancel_natIso_inv_right_assoc {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) {W : D} {X : D} {X' : D} {Y : C} (f : W X) (g : X G.obj Y) (f' : W X') (g' : X' G.obj Y) :
@[simp]
theorem CategoryTheory.NatIso.inv_inv_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (e : F G) (X : C) :
CategoryTheory.inv (e.inv.app X) = e.hom.app X
theorem CategoryTheory.NatIso.naturality_1 {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {X : C} {Y : C} (α : F G) (f : X Y) :
CategoryTheory.CategoryStruct.comp (α.inv.app X) (CategoryTheory.CategoryStruct.comp (F.map f) (α.hom.app Y)) = G.map f
theorem CategoryTheory.NatIso.naturality_2 {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {X : C} {Y : C} (α : F G) (f : X Y) :
CategoryTheory.CategoryStruct.comp (α.hom.app X) (CategoryTheory.CategoryStruct.comp (G.map f) (α.inv.app Y)) = F.map f
theorem CategoryTheory.NatIso.naturality_1' {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {X : C} {Y : C} (α : F G) (f : X Y) :
@[simp]
theorem CategoryTheory.NatIso.naturality_2'_assoc {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {X : C} {Y : C} (α : F G) (f : X Y) :
@[simp]
theorem CategoryTheory.NatIso.naturality_2' {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } {X : C} {Y : C} (α : F G) (f : X Y) :
instance CategoryTheory.NatIso.isIso_app_of_isIso {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) (X : C) :

The components of a natural isomorphism are isomorphisms.

@[simp]
theorem CategoryTheory.NatIso.isIso_inv_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) :
∀ {x : } (X : C), ().app X = CategoryTheory.inv (α.app X)
@[simp]
theorem CategoryTheory.NatIso.inv_map_inv_app {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] (F : ) {X : C} {Y : C} (e : X Y) (Z : D) :
CategoryTheory.inv ((F.map e.inv).app Z) = (F.map e.hom).app Z
@[simp]
theorem CategoryTheory.NatIso.ofComponents_hom_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (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).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.map f)) _auto✝) (X : C) :
().hom.app X = (app X).hom
@[simp]
theorem CategoryTheory.NatIso.ofComponents_inv_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (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).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.map f)) _auto✝) (X : C) :
().inv.app X = (app X).inv
def CategoryTheory.NatIso.ofComponents {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (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).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.map f)) _auto✝) :
F G

Construct a natural isomorphism between functors by giving object level isomorphisms, and checking naturality only in the forward direction.

Instances For
@[simp]
theorem CategoryTheory.NatIso.ofComponents.app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (app' : (X : C) → F.obj X G.obj X) (naturality : ∀ {X Y : C} (f : X Y), CategoryTheory.CategoryStruct.comp (F.map f) (app' Y).hom = CategoryTheory.CategoryStruct.comp (app' X).hom (G.map f)) (X : C) :
().app X = app' X
theorem CategoryTheory.NatIso.isIso_of_isIso_app {C : Type u₁} [] {D : Type u₂} [] {F : } {G : } (α : F G) [∀ (X : C), CategoryTheory.IsIso (α.app X)] :

A natural transformation is an isomorphism if all its components are isomorphisms.

@[simp]
theorem CategoryTheory.NatIso.hcomp_hom {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {F : } {G : } {H : } {I : } (α : F G) (β : H I) :
().hom = α.hom β.hom
@[simp]
theorem CategoryTheory.NatIso.hcomp_inv {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {F : } {G : } {H : } {I : } (α : F G) (β : H I) :
().inv = α.inv β.inv
def CategoryTheory.NatIso.hcomp {C : Type u₁} [] {D : Type u₂} [] {E : Type u₃} [] {F : } {G : } {H : } {I : } (α : F G) (β : H I) :

Horizontal composition of natural isomorphisms.

Instances For
theorem CategoryTheory.NatIso.isIso_map_iff {C : Type u₁} [] {D : Type u₂} [] {F₁ : } {F₂ : } (e : F₁ F₂) {X : C} {Y : C} (f : X Y) :