# Documentation

Mathlib.CategoryTheory.Iso

# Isomorphisms #

This file defines isomorphisms between objects of a category.

## Main definitions #

• structure Iso : a bundled isomorphism between two objects of a category;
• class IsIso : an unbundled version of iso; note that IsIso f is a Prop, and only asserts the existence of an inverse. Of course, this inverse is unique, so it doesn't cost us much to use choice to retrieve it.
• inv f, for the inverse of a morphism with [IsIso f]
• asIso : convert from IsIso to Iso (noncomputable);
• of_iso : convert from Iso to IsIso;
• standard operations on isomorphisms (composition, inverse etc)

## Notations #

• X ≅ Y : same as Iso X Y;
• α ≪≫ β : composition of two isomorphisms; it is called Iso.trans

## Tags #

category, category theory, isomorphism

structure CategoryTheory.Iso {C : Type u} (X : C) (Y : C) :

An isomorphism (a.k.a. an invertible morphism) between two objects of a category. The inverse morphism is bundled.

See also CategoryTheory.Core for the category with the same objects and isomorphisms playing the role of morphisms.

See .

• hom : X Y

The forward direction of an isomorphism.

• inv : Y X

The backwards direction of an isomorphism.

• hom_inv_id :

Composition of the two directions of an isomorphism is the identity on the source.

• inv_hom_id :

Composition of the two directions of an isomorphism in reverse order is the identity on the target.

Instances For
@[simp]
theorem CategoryTheory.Iso.inv_hom_id_assoc {C : Type u} {X : C} {Y : C} (self : X Y) {Z : C} (h : Y Z) :
@[simp]
theorem CategoryTheory.Iso.hom_inv_id_assoc {C : Type u} {X : C} {Y : C} (self : X Y) {Z : C} (h : X Z) :

Notation for an isomorphism in a category.

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem CategoryTheory.Iso.ext {C : Type u} {X : C} {Y : C} ⦃α : X Y ⦃β : X Y (w : α.hom = β.hom) :
α = β
def CategoryTheory.Iso.symm {C : Type u} {X : C} {Y : C} (I : X Y) :
Y X

Inverse isomorphism.

Equations
Instances For
@[simp]
theorem CategoryTheory.Iso.symm_hom {C : Type u} {X : C} {Y : C} (α : X Y) :
α.symm.hom = α.inv
@[simp]
theorem CategoryTheory.Iso.symm_inv {C : Type u} {X : C} {Y : C} (α : X Y) :
α.symm.inv = α.hom
@[simp]
theorem CategoryTheory.Iso.symm_mk {C : Type u} {X : C} {Y : C} (hom : X Y) (inv : Y X) (hom_inv_id : ) (inv_hom_id : ) :
@[simp]
theorem CategoryTheory.Iso.symm_symm_eq {C : Type u} {X : C} {Y : C} (α : X Y) :
α.symm.symm = α
@[simp]
theorem CategoryTheory.Iso.symm_eq_iff {C : Type u} {X : C} {Y : C} {α : X Y} {β : X Y} :
α.symm = β.symm α = β
theorem CategoryTheory.Iso.nonempty_iso_symm {C : Type u} (X : C) (Y : C) :
@[simp]
theorem CategoryTheory.Iso.refl_inv {C : Type u} (X : C) :
@[simp]
theorem CategoryTheory.Iso.refl_hom {C : Type u} (X : C) :
def CategoryTheory.Iso.refl {C : Type u} (X : C) :
X X

Identity isomorphism.

Equations
Instances For
instance CategoryTheory.Iso.instInhabitedIso {C : Type u} {X : C} :
Equations
• CategoryTheory.Iso.instInhabitedIso = { default := }
@[simp]
theorem CategoryTheory.Iso.refl_symm {C : Type u} (X : C) :
@[simp]
theorem CategoryTheory.Iso.trans_inv {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : Y Z) :
(α ≪≫ β).inv = CategoryTheory.CategoryStruct.comp β.inv α.inv
@[simp]
theorem CategoryTheory.Iso.trans_hom {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : Y Z) :
(α ≪≫ β).hom = CategoryTheory.CategoryStruct.comp α.hom β.hom
def CategoryTheory.Iso.trans {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : Y Z) :
X Z

Composition of two isomorphisms

Equations
Instances For
@[simp]
theorem CategoryTheory.Iso.instTransIso_trans {C : Type u} :
∀ {a b c : C} (α : a b) (β : b c), = α ≪≫ β
instance CategoryTheory.Iso.instTransIso {C : Type u} :
Trans (fun (x x_1 : C) => x x_1) (fun (x x_1 : C) => x x_1) fun (x x_1 : C) => x x_1
Equations
• CategoryTheory.Iso.instTransIso = { trans := fun {a b c : C} => CategoryTheory.Iso.trans }

Notation for composition of isomorphisms.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem CategoryTheory.Iso.trans_mk {C : Type u} {X : C} {Y : C} {Z : C} (hom : X Y) (inv : Y X) (hom_inv_id : ) (inv_hom_id : ) (hom' : Y Z) (inv' : Z Y) (hom_inv_id' : ) (inv_hom_id' : ) (hom_inv_id'' : ) (inv_hom_id'' : ) :
@[simp]
theorem CategoryTheory.Iso.trans_symm {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : Y Z) :
(α ≪≫ β).symm = β.symm ≪≫ α.symm
@[simp]
theorem CategoryTheory.Iso.trans_assoc {C : Type u} {X : C} {Y : C} {Z : C} {Z' : C} (α : X Y) (β : Y Z) (γ : Z Z') :
(α ≪≫ β) ≪≫ γ = α ≪≫ β ≪≫ γ
@[simp]
theorem CategoryTheory.Iso.refl_trans {C : Type u} {X : C} {Y : C} (α : X Y) :
@[simp]
theorem CategoryTheory.Iso.trans_refl {C : Type u} {X : C} {Y : C} (α : X Y) :
@[simp]
theorem CategoryTheory.Iso.symm_self_id {C : Type u} {X : C} {Y : C} (α : X Y) :
α.symm ≪≫ α =
@[simp]
theorem CategoryTheory.Iso.self_symm_id {C : Type u} {X : C} {Y : C} (α : X Y) :
α ≪≫ α.symm =
@[simp]
theorem CategoryTheory.Iso.symm_self_id_assoc {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : Y Z) :
α.symm ≪≫ α ≪≫ β = β
@[simp]
theorem CategoryTheory.Iso.self_symm_id_assoc {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) (β : X Z) :
α ≪≫ α.symm ≪≫ β = β
theorem CategoryTheory.Iso.inv_comp_eq {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : X Z} {g : Y Z} :
= g f =
theorem CategoryTheory.Iso.eq_inv_comp {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : X Z} {g : Y Z} :
g = = f
theorem CategoryTheory.Iso.comp_inv_eq {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : Z Y} {g : Z X} :
= g f =
theorem CategoryTheory.Iso.eq_comp_inv {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : Z Y} {g : Z X} :
g = = f
theorem CategoryTheory.Iso.inv_eq_inv {C : Type u} {X : C} {Y : C} (f : X Y) (g : X Y) :
f.inv = g.inv f.hom = g.hom
theorem CategoryTheory.Iso.hom_comp_eq_id {C : Type u} {X : C} {Y : C} (α : X Y) {f : Y X} :
f = α.inv
theorem CategoryTheory.Iso.comp_hom_eq_id {C : Type u} {X : C} {Y : C} (α : X Y) {f : Y X} :
f = α.inv
theorem CategoryTheory.Iso.inv_comp_eq_id {C : Type u} {X : C} {Y : C} (α : X Y) {f : X Y} :
f = α.hom
theorem CategoryTheory.Iso.comp_inv_eq_id {C : Type u} {X : C} {Y : C} (α : X Y) {f : X Y} :
f = α.hom
theorem CategoryTheory.Iso.hom_eq_inv {C : Type u} {X : C} {Y : C} (α : X Y) (β : Y X) :
α.hom = β.inv β.hom = α.inv
class CategoryTheory.IsIso {C : Type u} {X : C} {Y : C} (f : X Y) :

IsIso typeclass expressing that a morphism is invertible.

• out : ∃ (inv : Y X),

The existence of an inverse morphism.

Instances
noncomputable def CategoryTheory.inv {C : Type u} {X : C} {Y : C} (f : X Y) [I : ] :
Y X

The inverse of a morphism f when we have [IsIso f].

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem CategoryTheory.IsIso.hom_inv_id {C : Type u} {X : C} {Y : C} (f : X Y) [I : ] :
@[simp]
theorem CategoryTheory.IsIso.inv_hom_id {C : Type u} {X : C} {Y : C} (f : X Y) [I : ] :
@[simp]
theorem CategoryTheory.IsIso.hom_inv_id_assoc {C : Type u} {X : C} {Y : C} (f : X Y) [I : ] {Z : C} (g : X Z) :
@[simp]
theorem CategoryTheory.IsIso.inv_hom_id_assoc {C : Type u} {X : C} {Y : C} (f : X Y) [I : ] {Z : C} (g : Y Z) :
noncomputable def CategoryTheory.asIso {C : Type u} {X : C} {Y : C} (f : X Y) :
X Y

Reinterpret a morphism f with an IsIso f instance as an Iso.

Equations
Instances For
@[simp]
theorem CategoryTheory.asIso_hom {C : Type u} {X : C} {Y : C} (f : X Y) :
∀ {x : }, .hom = f
@[simp]
theorem CategoryTheory.asIso_inv {C : Type u} {X : C} {Y : C} (f : X Y) :
∀ {x : }, .inv =
instance CategoryTheory.IsIso.epi_of_iso {C : Type u} {X : C} {Y : C} (f : X Y) :
Equations
• (_ : ) = (_ : )
instance CategoryTheory.IsIso.mono_of_iso {C : Type u} {X : C} {Y : C} (f : X Y) :
Equations
• (_ : ) = (_ : )
theorem CategoryTheory.IsIso.inv_eq_of_hom_inv_id {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (hom_inv_id : ) :
theorem CategoryTheory.IsIso.inv_eq_of_inv_hom_id {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (inv_hom_id : ) :
theorem CategoryTheory.IsIso.eq_inv_of_hom_inv_id {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (hom_inv_id : ) :
theorem CategoryTheory.IsIso.eq_inv_of_inv_hom_id {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (inv_hom_id : ) :
instance CategoryTheory.IsIso.id {C : Type u} (X : C) :
Equations
instance CategoryTheory.IsIso.of_iso {C : Type u} {X : C} {Y : C} (f : X Y) :
Equations
instance CategoryTheory.IsIso.of_iso_inv {C : Type u} {X : C} {Y : C} (f : X Y) :
Equations
instance CategoryTheory.IsIso.inv_isIso {C : Type u} {X : C} {Y : C} {f : X Y} :
Equations
• (_ : ) = (_ : )
instance CategoryTheory.IsIso.comp_isIso {C : Type u} {X : C} {Y : C} {Z : C} {f : X Y} {h : Y Z} :
Equations
• = (_ : )
@[simp]
theorem CategoryTheory.IsIso.inv_id {C : Type u} {X : C} :
@[simp]
theorem CategoryTheory.IsIso.inv_comp {C : Type u} {X : C} {Y : C} {Z : C} {f : X Y} {h : Y Z} :
@[simp]
theorem CategoryTheory.IsIso.inv_inv {C : Type u} {X : C} {Y : C} {f : X Y} :
@[simp]
theorem CategoryTheory.IsIso.Iso.inv_inv {C : Type u} {X : C} {Y : C} (f : X Y) :
CategoryTheory.inv f.inv = f.hom
@[simp]
theorem CategoryTheory.IsIso.Iso.inv_hom {C : Type u} {X : C} {Y : C} (f : X Y) :
CategoryTheory.inv f.hom = f.inv
@[simp]
theorem CategoryTheory.IsIso.inv_comp_eq {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : X Z} {g : Y Z} :
@[simp]
theorem CategoryTheory.IsIso.eq_inv_comp {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : X Z} {g : Y Z} :
@[simp]
theorem CategoryTheory.IsIso.comp_inv_eq {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : Z Y} {g : Z X} :
@[simp]
theorem CategoryTheory.IsIso.eq_comp_inv {C : Type u} {X : C} {Y : C} {Z : C} (α : X Y) {f : Z Y} {g : Z X} :
theorem CategoryTheory.IsIso.of_isIso_comp_left {C : Type u} {X : C} {Y : C} {Z : C} (f : X Y) (g : Y Z) :
theorem CategoryTheory.IsIso.of_isIso_comp_right {C : Type u} {X : C} {Y : C} {Z : C} (f : X Y) (g : Y Z) :
theorem CategoryTheory.IsIso.of_isIso_fac_left {C : Type u} {X : C} {Y : C} {Z : C} {f : X Y} {g : Y Z} {h : X Z} [hh : ] (w : ) :
theorem CategoryTheory.IsIso.of_isIso_fac_right {C : Type u} {X : C} {Y : C} {Z : C} {f : X Y} {g : Y Z} {h : X Z} [hh : ] (w : ) :
theorem CategoryTheory.eq_of_inv_eq_inv {C : Type u} {X : C} {Y : C} {f : X Y} {g : X Y} (p : ) :
f = g
theorem CategoryTheory.IsIso.inv_eq_inv {C : Type u} {X : C} {Y : C} {f : X Y} {g : X Y} :
f = g
theorem CategoryTheory.hom_comp_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : Y X} :
theorem CategoryTheory.comp_hom_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : Y X} :
theorem CategoryTheory.inv_comp_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : X Y} :
theorem CategoryTheory.comp_inv_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : X Y} :
theorem CategoryTheory.isIso_of_hom_comp_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : Y X} :
theorem CategoryTheory.isIso_of_comp_hom_eq_id {C : Type u} {X : C} {Y : C} (g : X Y) {f : Y X} :
theorem CategoryTheory.Iso.inv_ext {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (hom_inv_id : ) :
f.inv = g
theorem CategoryTheory.Iso.inv_ext' {C : Type u} {X : C} {Y : C} {f : X Y} {g : Y X} (hom_inv_id : ) :
g = f.inv

All these cancellation lemmas can be solved by simp [cancel_mono] (or simp [cancel_epi]), but with the current design cancel_mono is not a good simp lemma, because it generates a typeclass search.

When we can see syntactically that a morphism is a mono or an epi because it came from an isomorphism, it's fine to do the cancellation via simp.

In the longer term, it might be worth exploring making mono and epi structures, rather than typeclasses, with coercions back to X ⟶ Y. Presumably we could write X ↪ Y and X ↠ Y.

@[simp]
theorem CategoryTheory.Iso.cancel_iso_hom_left {C : Type u} {X : C} {Y : C} {Z : C} (f : X Y) (g : Y Z) (g' : Y Z) :
g = g'
@[simp]
theorem CategoryTheory.Iso.cancel_iso_inv_left {C : Type u} {X : C} {Y : C} {Z : C} (f : Y X) (g : Y Z) (g' : Y Z) :
g = g'
@[simp]
theorem CategoryTheory.Iso.cancel_iso_hom_right {C : Type u} {X : C} {Y : C} {Z : C} (f : X Y) (f' : X Y) (g : Y Z) :
f = f'
@[simp]
theorem CategoryTheory.Iso.cancel_iso_inv_right {C : Type u} {X : C} {Y : C} {Z : C} (f : X Y) (f' : X Y) (g : Z Y) :
f = f'
@[simp]
theorem CategoryTheory.Iso.cancel_iso_hom_right_assoc {C : Type u} {W : C} {X : C} {X' : C} {Y : C} {Z : C} (f : W X) (g : X Y) (f' : W X') (g' : X' Y) (h : Y Z) :
@[simp]
theorem CategoryTheory.Iso.cancel_iso_inv_right_assoc {C : Type u} {W : C} {X : C} {X' : C} {Y : C} {Z : C} (f : W X) (g : X Y) (f' : W X') (g' : X' Y) (h : Z Y) :
@[simp]
theorem CategoryTheory.Functor.mapIso_inv {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (i : X Y) :
(F.mapIso i).inv = F.map i.inv
@[simp]
theorem CategoryTheory.Functor.mapIso_hom {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (i : X Y) :
(F.mapIso i).hom = F.map i.hom
def CategoryTheory.Functor.mapIso {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (i : X Y) :
F.obj X F.obj Y

A functor F : C ⥤ D sends isomorphisms i : X ≅ Y to isomorphisms F.obj X ≅ F.obj Y

Equations
Instances For
@[simp]
theorem CategoryTheory.Functor.mapIso_symm {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (i : X Y) :
F.mapIso i.symm = (F.mapIso i).symm
@[simp]
theorem CategoryTheory.Functor.mapIso_trans {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} {Z : C} (i : X Y) (j : Y Z) :
F.mapIso (i ≪≫ j) = F.mapIso i ≪≫ F.mapIso j
@[simp]
theorem CategoryTheory.Functor.mapIso_refl {C : Type u} {D : Type u₂} [] (F : ) (X : C) :
F.mapIso = CategoryTheory.Iso.refl (F.obj X)
instance CategoryTheory.Functor.map_isIso {C : Type u} {X : C} {Y : C} {D : Type u₂} [] (F : ) (f : X Y) :
Equations
@[simp]
theorem CategoryTheory.Functor.map_inv {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (f : X Y) :
F.map = CategoryTheory.inv (F.map f)
theorem CategoryTheory.Functor.map_hom_inv {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (f : X Y) :
theorem CategoryTheory.Functor.map_inv_hom {C : Type u} {D : Type u₂} [] (F : ) {X : C} {Y : C} (f : X Y) :