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 = { hom := α.hom.app X, inv := α.inv.app X, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
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.
The components of a natural isomorphism are isomorphisms.
Equations
- ⋯ = ⋯
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
A natural transformation is an isomorphism if all its components are isomorphisms.
Horizontal composition of natural isomorphisms.
Equations
- CategoryTheory.NatIso.hcomp α β = { hom := α.hom ◫ β.hom, inv := α.inv ◫ β.inv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
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.