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.

def CategoryTheory.Iso.app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F G : CategoryTheory.Functor C D} (α : 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

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

    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 Y : C} (e : X Y) (Z : D) :
    CategoryTheory.inv ((F.map e.inv).app Z) = (F.map e.hom).app Z
    def CategoryTheory.NatIso.ofComponents {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F 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) := by aesop_cat) :
    F G

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

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem CategoryTheory.NatIso.ofComponents_hom_app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F 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) := by aesop_cat) (X : C) :
      (CategoryTheory.NatIso.ofComponents app naturality).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 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) := by aesop_cat) (X : C) :
      (CategoryTheory.NatIso.ofComponents app naturality).inv.app X = (app X).inv
      @[simp]
      theorem CategoryTheory.NatIso.ofComponents.app {C : Type u₁} [CategoryTheory.Category.{v₁, u₁} C] {D : Type u₂} [CategoryTheory.Category.{v₂, u₂} D] {F 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) :
      (CategoryTheory.NatIso.ofComponents app' naturality).app X = app' X

      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₁ F₂ : CategoryTheory.Functor C D} (e : F₁ F₂) {X Y : C} (f : X Y) :

        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.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.obj X obj X) (a✝ : C) :
          (F.copyObj obj e).obj a✝ = obj a✝
          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.obj X obj X) :
          F F.copyObj obj e

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

          Equations
          Instances For
            @[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.obj X obj X) (X : C) :
            (F.isoCopyObj obj e).hom.app X = (e X).hom
            @[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.obj X obj X) (X : C) :
            (F.isoCopyObj obj e).inv.app X = (e X).inv