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
def CategoryTheory.Iso.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} (α : F G) (X : C) :
F.toPrefunctor.obj X G.toPrefunctor.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

Equations
Instances For
    @[simp]
    theorem CategoryTheory.Iso.hom_inv_id_app_assoc {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} (h : F.toPrefunctor.obj X Z) :
    @[simp]
    theorem CategoryTheory.Iso.inv_hom_id_app_assoc {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} (h : G.toPrefunctor.obj X Z) :
    @[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
    Equations
    Equations

    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.toPrefunctor.obj X Z) (g' : G.toPrefunctor.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.toPrefunctor.obj X Z) (g' : F.toPrefunctor.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.toPrefunctor.obj Y) (f' : X F.toPrefunctor.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.toPrefunctor.obj Y) (f' : X G.toPrefunctor.obj Y) :
    theorem CategoryTheory.NatIso.naturality_1 {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} {X : C} {Y : C} (α : F G) (f : X Y) :
    CategoryTheory.CategoryStruct.comp (α.inv.app X) (CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (α.hom.app Y)) = G.toPrefunctor.map f
    theorem CategoryTheory.NatIso.naturality_2 {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} {X : C} {Y : C} (α : F G) (f : X Y) :
    CategoryTheory.CategoryStruct.comp (α.hom.app X) (CategoryTheory.CategoryStruct.comp (G.toPrefunctor.map f) (α.inv.app Y)) = F.toPrefunctor.map f
    theorem CategoryTheory.NatIso.naturality_1' {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} {X : C} {Y : C} (α : F G) (f : X Y) :
    ∀ {x : CategoryTheory.IsIso (α.app X)}, CategoryTheory.CategoryStruct.comp (CategoryTheory.inv (α.app X)) (CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (α.app Y)) = G.toPrefunctor.map f
    @[simp]
    theorem CategoryTheory.NatIso.naturality_2'_assoc {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} {X : C} {Y : C} (α : F G) (f : X Y) :
    ∀ {x : CategoryTheory.IsIso (α.app Y)} {Z : D} (h : F.toPrefunctor.obj Y Z), CategoryTheory.CategoryStruct.comp (α.app X) (CategoryTheory.CategoryStruct.comp (G.toPrefunctor.map f) (CategoryTheory.CategoryStruct.comp (CategoryTheory.inv (α.app Y)) h)) = CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) h
    @[simp]
    theorem CategoryTheory.NatIso.naturality_2' {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} {X : C} {Y : C} (α : F G) (f : X Y) :
    ∀ {x : CategoryTheory.IsIso (α.app Y)}, CategoryTheory.CategoryStruct.comp (α.app X) (CategoryTheory.CategoryStruct.comp (G.toPrefunctor.map f) (CategoryTheory.inv (α.app Y))) = F.toPrefunctor.map f

    The components of a natural isomorphism are isomorphisms.

    Equations
    @[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.toPrefunctor.map e.inv).app Z) = (F.toPrefunctor.map e.hom).app Z
    @[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.toPrefunctor.obj X G.toPrefunctor.obj X) (naturality : autoParam (∀ {X Y : C} (f : X Y), CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (app Y).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.toPrefunctor.map f)) _auto✝) (X : C) :
    (CategoryTheory.NatIso.ofComponents app).inv.app X = (app X).inv
    @[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.toPrefunctor.obj X G.toPrefunctor.obj X) (naturality : autoParam (∀ {X Y : C} (f : X Y), CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (app Y).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.toPrefunctor.map f)) _auto✝) (X : C) :
    (CategoryTheory.NatIso.ofComponents app).hom.app X = (app X).hom
    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.toPrefunctor.obj X G.toPrefunctor.obj X) (naturality : autoParam (∀ {X Y : C} (f : X Y), CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (app Y).hom = CategoryTheory.CategoryStruct.comp (app X).hom (G.toPrefunctor.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.toPrefunctor.obj X G.toPrefunctor.obj X) (naturality : ∀ {X Y : C} (f : X Y), CategoryTheory.CategoryStruct.comp (F.toPrefunctor.map f) (app' Y).hom = CategoryTheory.CategoryStruct.comp (app' X).hom (G.toPrefunctor.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) :
        CategoryTheory.IsIso (F₁.toPrefunctor.map f) CategoryTheory.IsIso (F₂.toPrefunctor.map f)
        @[simp]
        theorem CategoryTheory.Functor.copyObj_obj {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] (F : CategoryTheory.Functor C D) (obj : CD) (e : (X : C) → F.toPrefunctor.obj X obj X) :
        ∀ (a : C), (CategoryTheory.Functor.copyObj F obj e).toPrefunctor.obj a = obj a
        def CategoryTheory.Functor.copyObj {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] (F : CategoryTheory.Functor C D) (obj : CD) (e : (X : C) → F.toPrefunctor.obj X obj X) :

        Constructor for a functor that is isomorphic to a given functor F : C ⥤ D, while being definitionally equal on objects to a given map obj : C → D such that for all X : C, we have an isomorphism F.obj X ≅ obj X.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem CategoryTheory.Functor.isoCopyObj_inv_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] (F : CategoryTheory.Functor C D) (obj : CD) (e : (X : C) → F.toPrefunctor.obj X obj X) (X : C) :
          (CategoryTheory.Functor.isoCopyObj F obj e).inv.app X = (e X).inv
          @[simp]
          theorem CategoryTheory.Functor.isoCopyObj_hom_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] (F : CategoryTheory.Functor C D) (obj : CD) (e : (X : C) → F.toPrefunctor.obj X obj X) (X : C) :
          (CategoryTheory.Functor.isoCopyObj F obj e).hom.app X = (e X).hom
          def CategoryTheory.Functor.isoCopyObj {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] (F : CategoryTheory.Functor C D) (obj : CD) (e : (X : C) → F.toPrefunctor.obj X obj X) :

          The functor constructed with copyObj is isomorphic to the given functor.

          Equations
          Instances For