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: lean nat_iso.of_components (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 nat_iso
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
- category_theory.nat_iso.hom_app_is_iso α X = {inv := α.inv.app X, hom_inv_id' := _, inv_hom_id' := _}
Equations
- category_theory.nat_iso.inv_app_is_iso α X = {inv := α.hom.app X, hom_inv_id' := _, inv_hom_id' := _}
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.
A natural transformation is an isomorphism if all its components are isomorphisms.
Equations
- category_theory.nat_iso.is_iso_of_is_iso_app α = {inv := {app := λ (X : C), category_theory.is_iso.inv (α.app X), naturality' := _}, hom_inv_id' := _, inv_hom_id' := _}
The components of a natural isomorphism are isomorphisms.
Equations
- category_theory.nat_iso.is_iso_app_of_is_iso α X = {inv := (category_theory.is_iso.inv α).app X, hom_inv_id' := _, inv_hom_id' := _}
Construct a natural isomorphism between functors by giving object level isomorphisms, and checking naturality only in the forward direction.
Equations
- category_theory.nat_iso.of_components app naturality = {hom := {app := λ (X : C), (app X).hom, naturality' := naturality}, inv := category_theory.is_iso.inv {app := λ (X : C), (app X).hom, naturality' := naturality} (category_theory.nat_iso.is_iso_of_is_iso_app {app := λ (X : C), (app X).hom, naturality' := naturality}), hom_inv_id' := _, inv_hom_id' := _}
Horizontal composition of natural isomorphisms.
Equations
- category_theory.nat_iso.hcomp α β = {hom := α.hom ◫ β.hom, inv := α.inv ◫ β.inv, hom_inv_id' := _, inv_hom_id' := _}