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
, thena.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.
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 = CategoryTheory.Iso.mk (α.hom.app X) (α.inv.app X)
Instances For
Equations
- (_ : CategoryTheory.IsIso (α.hom.app X)) = (_ : CategoryTheory.IsIso (α.hom.app X))
Equations
- (_ : CategoryTheory.IsIso (α.inv.app X)) = (_ : 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.
The components of a natural isomorphism are isomorphisms.
Equations
- (_ : CategoryTheory.IsIso (α.app X)) = (_ : CategoryTheory.IsIso (α.app X))
Construct a natural isomorphism between functors by giving object level isomorphisms, and checking naturality only in the forward direction.
Equations
- CategoryTheory.NatIso.ofComponents app = CategoryTheory.Iso.mk (CategoryTheory.NatTrans.mk fun (X : C) => (app X).hom) (CategoryTheory.NatTrans.mk fun (X : C) => (app X).inv)
Instances For
A natural transformation is an isomorphism if all its components are isomorphisms.
Horizontal composition of natural isomorphisms.
Equations
- CategoryTheory.NatIso.hcomp α β = CategoryTheory.Iso.mk (α.hom ◫ β.hom) (α.inv ◫ β.inv)
Instances For
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
The functor constructed with copyObj
is isomorphic to the given functor.