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:

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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : F G) (X : C) :
(α.app X).hom = α.hom.app X
@[simp]
theorem CategoryTheory.Iso.app_inv {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : F G) (X : C) :
(α.app X).inv = α.inv.app X

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

Equations
Instances For
    @[simp]
    theorem CategoryTheory.NatIso.trans_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} {H : CategoryTheory.Functor C D} (α : F G) (β : G H) (X : C) :
    (α ≪≫ β).app X = α.app X ≪≫ β.app X
    theorem CategoryTheory.NatIso.app_hom {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : F G) (X : C) :
    (α.app X).hom = α.hom.app X
    theorem CategoryTheory.NatIso.app_inv {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : F G) (X : C) :
    (α.app X).inv = α.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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : 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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : 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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : 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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (α : F G) {X : D} {Y : C} (f : X G.obj Y) (f' : X G.obj Y) :
    @[simp]
    theorem CategoryTheory.NatIso.inv_map_inv_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {E : Type u₃} [CategoryTheory.Category.{v₃, u₃} E] (F : CategoryTheory.Functor C (CategoryTheory.Functor D E)) {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₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {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).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.map f)) _auto✝) (X : C) :
    (CategoryTheory.NatIso.ofComponents app).hom.app X = (app X).hom
    @[simp]
    theorem CategoryTheory.NatIso.ofComponents_inv_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {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).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.map f)) _auto✝) (X : C) :
    (CategoryTheory.NatIso.ofComponents app).inv.app X = (app X).inv
    def CategoryTheory.NatIso.ofComponents {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {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).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.

    Equations
    Instances For
      @[simp]
      theorem CategoryTheory.NatIso.ofComponents.app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F : CategoryTheory.Functor C D} {G : CategoryTheory.Functor C D} (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) :

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

      Horizontal composition of natural isomorphisms.

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