Natural isomorphisms #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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:
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
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.
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 := {app := λ (X : C), (app X).inv, naturality' := _}, hom_inv_id' := _, inv_hom_id' := _}
A natural transformation is an isomorphism if all its components are isomorphisms.
Horizontal composition of natural isomorphisms.
Equations
- category_theory.nat_iso.hcomp α β = {hom := α.hom ◫ β.hom, inv := α.inv ◫ β.inv, hom_inv_id' := _, inv_hom_id' := _}