File: Mathlib/CategoryTheory/Iso.lean

full_name: CategoryTheory.Iso.inv_hom_id
code: /-- 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 <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp self.inv self.hom = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.Iso.hom
code: /-- 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 <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat
goal: X ⟶ Y

full_name: CategoryTheory.Iso.inv
code: /-- 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 <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat
goal: Y ⟶ X

full_name: CategoryTheory.Iso.hom_inv_id
code: /-- 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 <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp self.hom self.inv = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.Iso
code: /-- 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 <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat
goal: Type v

full_name: CategoryTheory._aux_Mathlib_CategoryTheory_Iso___unexpand_CategoryTheory_Iso_1
code: /-- Notation for an isomorphism in a category. -/
infixr:10 " ≅ " => Iso
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.«_aux_Mathlib_CategoryTheory_Iso___macroRules_CategoryTheory_term_≅__1»
code: /-- Notation for an isomorphism in a category. -/
infixr:10 " ≅ " => Iso
goal: Lean.Macro

full_name: CategoryTheory.Iso.ext
code: @[ext]
theorem ext ⦃α β : X ≅ Y⦄ (w : α.hom = β.hom) : α = β 
goal: α = β

full_name: CategoryTheory.Iso.symm
code: /-- Inverse isomorphism. -/
@[symm]
def symm (I : X ≅ Y) : Y ≅ X 
goal: Y ≅ X

full_name: CategoryTheory.Iso.symm_hom
code: @[simp]
theorem symm_hom (α : X ≅ Y) : α.symm.hom = α.inv 
goal: α.symm.hom = α.inv

full_name: CategoryTheory.Iso.symm_inv
code: @[simp]
theorem symm_inv (α : X ≅ Y) : α.symm.inv = α.hom 
goal: α.symm.inv = α.hom

full_name: CategoryTheory.Iso.symm_mk
code: @[simp]
theorem symm_mk {X Y : C} (hom : X ⟶ Y) (inv : Y ⟶ X) (hom_inv_id) (inv_hom_id) :
    Iso.symm { hom, inv, hom_inv_id := hom_inv_id, inv_hom_id := inv_hom_id } =
      { hom := inv, inv := hom, hom_inv_id := inv_hom_id, inv_hom_id := hom_inv_id } 
goal: { hom := hom, inv := inv, hom_inv_id := hom_inv_id, inv_hom_id := inv_hom_id }.symm =
  { hom := inv, inv := hom, hom_inv_id := inv_hom_id, inv_hom_id := hom_inv_id }

full_name: CategoryTheory.Iso.symm_symm_eq
code: @[simp]
theorem symm_symm_eq {X Y : C} (α : X ≅ Y) : α.symm.symm = α 
goal: α.symm.symm = α

full_name: CategoryTheory.Iso.symm_eq_iff
code: @[simp]
theorem symm_eq_iff {X Y : C} {α β : X ≅ Y} : α.symm = β.symm ↔ α = β 
goal: α.symm = β.symm ↔ α = β

full_name: CategoryTheory.Iso.nonempty_iso_symm
code: theorem nonempty_iso_symm (X Y : C) : Nonempty (X ≅ Y) ↔ Nonempty (Y ≅ X) 
goal: Nonempty (X ≅ Y) ↔ Nonempty (Y ≅ X)

full_name: CategoryTheory.Iso.refl_hom
code: /-- Identity isomorphism. -/
@[refl, simps]
def refl (X : C) : X ≅ X 
goal: (CategoryTheory.Iso.refl X).hom = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.Iso.refl_inv
code: /-- Identity isomorphism. -/
@[refl, simps]
def refl (X : C) : X ≅ X 
goal: (CategoryTheory.Iso.refl X).inv = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.Iso.refl
code: /-- Identity isomorphism. -/
@[refl, simps]
def refl (X : C) : X ≅ X 
goal: X ≅ X

full_name: CategoryTheory.Iso.instInhabited
code: instance : Inhabited (X ≅ X) 
goal: Inhabited (X ≅ X)

full_name: CategoryTheory.Iso.nonempty_iso_refl
code: theorem nonempty_iso_refl (X : C) : Nonempty (X ≅ X) 
goal: Nonempty (X ≅ X)

full_name: CategoryTheory.Iso.refl_symm
code: @[simp]
theorem refl_symm (X : C) : (Iso.refl X).symm = Iso.refl X 
goal: (CategoryTheory.Iso.refl X).symm = CategoryTheory.Iso.refl X

full_name: CategoryTheory.Iso.trans
code: /-- Composition of two isomorphisms -/
@[trans, simps]
def trans (α : X ≅ Y) (β : Y ≅ Z) : X ≅ Z 
goal: X ≅ Z

full_name: CategoryTheory.Iso.trans_inv
code: /-- Composition of two isomorphisms -/
@[trans, simps]
def trans (α : X ≅ Y) (β : Y ≅ Z) : X ≅ Z 
goal: (α ≪≫ β).inv = CategoryTheory.CategoryStruct.comp β.inv α.inv

full_name: CategoryTheory.Iso.trans_hom
code: /-- Composition of two isomorphisms -/
@[trans, simps]
def trans (α : X ≅ Y) (β : Y ≅ Z) : X ≅ Z 
goal: (α ≪≫ β).hom = CategoryTheory.CategoryStruct.comp α.hom β.hom

full_name: CategoryTheory.Iso.instTransIso
code: @[simps]
instance instTransIso : Trans (α := C) (· ≅ ·) (· ≅ ·) (· ≅ ·) 
goal: Trans (fun x x_1 => x ≅ x_1) (fun x x_1 => x ≅ x_1) fun x x_1 => x ≅ x_1

full_name: CategoryTheory.Iso.instTransIso_trans
code: @[simps]
instance instTransIso : Trans (α := C) (· ≅ ·) (· ≅ ·) (· ≅ ·) 
goal: ∀ {a b c : C} (α : a ≅ b) (β : b ≅ c), Trans.trans α β = α ≪≫ β

full_name: CategoryTheory.Iso.«_aux_Mathlib_CategoryTheory_Iso___macroRules_CategoryTheory_Iso_term_≪≫__1»
code: /-- Notation for composition of isomorphisms. -/
infixr:80 " ≪≫ " => Iso.trans
goal: Lean.Macro

full_name: CategoryTheory.Iso._aux_Mathlib_CategoryTheory_Iso___unexpand_CategoryTheory_Iso_trans_1
code: /-- Notation for composition of isomorphisms. -/
infixr:80 " ≪≫ " => Iso.trans
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.Iso.trans_mk
code: @[simp]
theorem trans_mk {X Y 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'') :
    Iso.trans ⟨hom, inv, hom_inv_id, inv_hom_id⟩ ⟨hom', inv', hom_inv_id', inv_hom_id'⟩ =
     ⟨hom ≫ hom', inv' ≫ inv, hom_inv_id'', inv_hom_id''⟩ 
goal: { hom := hom, inv := inv, hom_inv_id := hom_inv_id, inv_hom_id := inv_hom_id } ≪≫
    { hom := hom', inv := inv', hom_inv_id := hom_inv_id', inv_hom_id := inv_hom_id' } =
  { hom := CategoryTheory.CategoryStruct.comp hom hom', inv := CategoryTheory.CategoryStruct.comp inv' inv,
    hom_inv_id := hom_inv_id'', inv_hom_id := inv_hom_id'' }

full_name: CategoryTheory.Iso.trans_symm
code: @[simp]
theorem trans_symm (α : X ≅ Y) (β : Y ≅ Z) : (α ≪≫ β).symm = β.symm ≪≫ α.symm 
goal: (α ≪≫ β).symm = β.symm ≪≫ α.symm

full_name: CategoryTheory.Iso.trans_assoc
code: @[simp]
theorem trans_assoc {Z' : C} (α : X ≅ Y) (β : Y ≅ Z) (γ : Z ≅ Z') :
    (α ≪≫ β) ≪≫ γ = α ≪≫ β ≪≫ γ 
goal: (α ≪≫ β) ≪≫ γ = α ≪≫ β ≪≫ γ

full_name: CategoryTheory.Iso.refl_trans
code: @[simp]
theorem refl_trans (α : X ≅ Y) : Iso.refl X ≪≫ α = α 
goal: CategoryTheory.Iso.refl X ≪≫ α = α

full_name: CategoryTheory.Iso.trans_refl
code: @[simp]
theorem trans_refl (α : X ≅ Y) : α ≪≫ Iso.refl Y = α 
goal: α ≪≫ CategoryTheory.Iso.refl Y = α

full_name: CategoryTheory.Iso.symm_self_id
code: @[simp]
theorem symm_self_id (α : X ≅ Y) : α.symm ≪≫ α = Iso.refl Y 
goal: α.symm ≪≫ α = CategoryTheory.Iso.refl Y

full_name: CategoryTheory.Iso.self_symm_id
code: @[simp]
theorem self_symm_id (α : X ≅ Y) : α ≪≫ α.symm = Iso.refl X 
goal: α ≪≫ α.symm = CategoryTheory.Iso.refl X

full_name: CategoryTheory.Iso.symm_self_id_assoc
code: @[simp]
theorem symm_self_id_assoc (α : X ≅ Y) (β : Y ≅ Z) : α.symm ≪≫ α ≪≫ β = β 
goal: α.symm ≪≫ α ≪≫ β = β

full_name: CategoryTheory.Iso.self_symm_id_assoc
code: @[simp]
theorem self_symm_id_assoc (α : X ≅ Y) (β : X ≅ Z) : α ≪≫ α.symm ≪≫ β = β 
goal: α ≪≫ α.symm ≪≫ β = β

full_name: CategoryTheory.Iso.inv_comp_eq
code: theorem inv_comp_eq (α : X ≅ Y) {f : X ⟶ Z} {g : Y ⟶ Z} : α.inv ≫ f = g ↔ f = α.hom ≫ g 
goal: CategoryTheory.CategoryStruct.comp α.inv f = g ↔ f = CategoryTheory.CategoryStruct.comp α.hom g

full_name: CategoryTheory.Iso.eq_inv_comp
code: theorem eq_inv_comp (α : X ≅ Y) {f : X ⟶ Z} {g : Y ⟶ Z} : g = α.inv ≫ f ↔ α.hom ≫ g = f 
goal: g = CategoryTheory.CategoryStruct.comp α.inv f ↔ CategoryTheory.CategoryStruct.comp α.hom g = f

full_name: CategoryTheory.Iso.comp_inv_eq
code: theorem comp_inv_eq (α : X ≅ Y) {f : Z ⟶ Y} {g : Z ⟶ X} : f ≫ α.inv = g ↔ f = g ≫ α.hom 
goal: CategoryTheory.CategoryStruct.comp f α.inv = g ↔ f = CategoryTheory.CategoryStruct.comp g α.hom

full_name: CategoryTheory.Iso.eq_comp_inv
code: theorem eq_comp_inv (α : X ≅ Y) {f : Z ⟶ Y} {g : Z ⟶ X} : g = f ≫ α.inv ↔ g ≫ α.hom = f 
goal: g = CategoryTheory.CategoryStruct.comp f α.inv ↔ CategoryTheory.CategoryStruct.comp g α.hom = f

full_name: CategoryTheory.Iso.inv_eq_inv
code: theorem inv_eq_inv (f g : X ≅ Y) : f.inv = g.inv ↔ f.hom = g.hom 
goal: f.inv = g.inv ↔ f.hom = g.hom

full_name: CategoryTheory.Iso.hom_comp_eq_id
code: theorem hom_comp_eq_id (α : X ≅ Y) {f : Y ⟶ X} : α.hom ≫ f = 𝟙 X ↔ f = α.inv 
goal: CategoryTheory.CategoryStruct.comp α.hom f = CategoryTheory.CategoryStruct.id X ↔ f = α.inv

full_name: CategoryTheory.Iso.comp_hom_eq_id
code: theorem comp_hom_eq_id (α : X ≅ Y) {f : Y ⟶ X} : f ≫ α.hom = 𝟙 Y ↔ f = α.inv 
goal: CategoryTheory.CategoryStruct.comp f α.hom = CategoryTheory.CategoryStruct.id Y ↔ f = α.inv

full_name: CategoryTheory.Iso.inv_comp_eq_id
code: theorem inv_comp_eq_id (α : X ≅ Y) {f : X ⟶ Y} : α.inv ≫ f = 𝟙 Y ↔ f = α.hom 
goal: CategoryTheory.CategoryStruct.comp α.inv f = CategoryTheory.CategoryStruct.id Y ↔ f = α.hom

full_name: CategoryTheory.Iso.comp_inv_eq_id
code: theorem comp_inv_eq_id (α : X ≅ Y) {f : X ⟶ Y} : f ≫ α.inv = 𝟙 X ↔ f = α.hom 
goal: CategoryTheory.CategoryStruct.comp f α.inv = CategoryTheory.CategoryStruct.id X ↔ f = α.hom

full_name: CategoryTheory.Iso.hom_eq_inv
code: theorem hom_eq_inv (α : X ≅ Y) (β : Y ≅ X) : α.hom = β.inv ↔ β.hom = α.inv 
goal: α.hom = β.inv ↔ β.hom = α.inv

full_name: CategoryTheory.Iso.homToEquiv_symm_apply
code: /-- The bijection `(Z ⟶ X) ≃ (Z ⟶ Y)` induced by `α : X ≅ Y`. -/
@[simps]
def homToEquiv (α : X ≅ Y) {Z : C} : (Z ⟶ X) ≃ (Z ⟶ Y) 
goal: α.homToEquiv.symm g = CategoryTheory.CategoryStruct.comp g α.inv

full_name: CategoryTheory.Iso.homToEquiv_apply
code: /-- The bijection `(Z ⟶ X) ≃ (Z ⟶ Y)` induced by `α : X ≅ Y`. -/
@[simps]
def homToEquiv (α : X ≅ Y) {Z : C} : (Z ⟶ X) ≃ (Z ⟶ Y) 
goal: α.homToEquiv f = CategoryTheory.CategoryStruct.comp f α.hom

full_name: CategoryTheory.Iso.homToEquiv
code: /-- The bijection `(Z ⟶ X) ≃ (Z ⟶ Y)` induced by `α : X ≅ Y`. -/
@[simps]
def homToEquiv (α : X ≅ Y) {Z : C} : (Z ⟶ X) ≃ (Z ⟶ Y) 
goal: (Z ⟶ X) ≃ (Z ⟶ Y)

full_name: CategoryTheory.Iso.homFromEquiv_symm_apply
code: /-- The bijection `(X ⟶ Z) ≃ (Y ⟶ Z)` induced by `α : X ≅ Y`. -/
@[simps]
def homFromEquiv (α : X ≅ Y) {Z : C} : (X ⟶ Z) ≃ (Y ⟶ Z) 
goal: α.homFromEquiv.symm g = CategoryTheory.CategoryStruct.comp α.hom g

full_name: CategoryTheory.Iso.homFromEquiv_apply
code: /-- The bijection `(X ⟶ Z) ≃ (Y ⟶ Z)` induced by `α : X ≅ Y`. -/
@[simps]
def homFromEquiv (α : X ≅ Y) {Z : C} : (X ⟶ Z) ≃ (Y ⟶ Z) 
goal: α.homFromEquiv f = CategoryTheory.CategoryStruct.comp α.inv f

full_name: CategoryTheory.Iso.homFromEquiv
code: /-- The bijection `(X ⟶ Z) ≃ (Y ⟶ Z)` induced by `α : X ≅ Y`. -/
@[simps]
def homFromEquiv (α : X ≅ Y) {Z : C} : (X ⟶ Z) ≃ (Y ⟶ Z) 
goal: (X ⟶ Z) ≃ (Y ⟶ Z)

full_name: CategoryTheory.IsIso
code: /-- `IsIso` typeclass expressing that a morphism is invertible. -/
class IsIso (f : X ⟶ Y) : Prop where
  /-- The existence of an inverse morphism. -/
  out : ∃ inv : Y ⟶ X, f ≫ inv = 𝟙 X ∧ inv ≫ f = 𝟙 Y
goal: Prop

full_name: CategoryTheory.IsIso.out
code: /-- `IsIso` typeclass expressing that a morphism is invertible. -/
class IsIso (f : X ⟶ Y) : Prop where
  /-- The existence of an inverse morphism. -/
  out : ∃ inv : Y ⟶ X, f ≫ inv = 𝟙 X ∧ inv ≫ f = 𝟙 Y
goal: ∃ inv,
  CategoryTheory.CategoryStruct.comp f inv = CategoryTheory.CategoryStruct.id X ∧
    CategoryTheory.CategoryStruct.comp inv f = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.inv
code: /-- The inverse of a morphism `f` when we have `[IsIso f]`.
-/
noncomputable def inv (f : X ⟶ Y) [I : IsIso f] : Y ⟶ X 
goal: Y ⟶ X

full_name: CategoryTheory.IsIso.hom_inv_id
code: @[simp]
theorem hom_inv_id (f : X ⟶ Y) [I : IsIso f] : f ≫ inv f = 𝟙 X 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.inv f) = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.IsIso.inv_hom_id
code: @[simp]
theorem inv_hom_id (f : X ⟶ Y) [I : IsIso f] : inv f ≫ f = 𝟙 Y 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.inv f) f = CategoryTheory.CategoryStruct.id Y

full_name: CategoryTheory.IsIso.hom_inv_id_assoc
code: @[simp]
theorem hom_inv_id_assoc (f : X ⟶ Y) [I : IsIso f] {Z} (g : X ⟶ Z) : f ≫ inv f ≫ g = g 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp (CategoryTheory.inv f) g) = g

full_name: CategoryTheory.IsIso.inv_hom_id_assoc
code: @[simp]
theorem inv_hom_id_assoc (f : X ⟶ Y) [I : IsIso f] {Z} (g : Y ⟶ Z) : inv f ≫ f ≫ g = g 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.inv f) (CategoryTheory.CategoryStruct.comp f g) = g

full_name: CategoryTheory.Iso.isIso_hom
code: lemma Iso.isIso_hom (e : X ≅ Y) : IsIso e.hom 
goal: CategoryTheory.IsIso e.hom

full_name: CategoryTheory.Iso.isIso_inv
code: lemma Iso.isIso_inv (e : X ≅ Y) : IsIso e.inv 
goal: CategoryTheory.IsIso e.inv

full_name: CategoryTheory.asIso
code: /-- Reinterpret a morphism `f` with an `IsIso f` instance as an `Iso`. -/
noncomputable def asIso (f : X ⟶ Y) [IsIso f] : X ≅ Y 
goal: X ≅ Y

full_name: CategoryTheory.asIso_hom
code: @[simp]
theorem asIso_hom (f : X ⟶ Y) {_ : IsIso f} : (asIso f).hom = f 
goal: ∀ {x : CategoryTheory.IsIso f}, (CategoryTheory.asIso f).hom = f

full_name: CategoryTheory.asIso_inv
code: @[simp]
theorem asIso_inv (f : X ⟶ Y) {_ : IsIso f} : (asIso f).inv = inv f 
goal: ∀ {x : CategoryTheory.IsIso f}, (CategoryTheory.asIso f).inv = CategoryTheory.inv f

full_name: CategoryTheory.IsIso.epi_of_iso
code: instance (priority := 100) epi_of_iso (f : X ⟶ Y) [IsIso f] : Epi f 
goal: CategoryTheory.Epi f

full_name: CategoryTheory.IsIso.mono_of_iso
code: instance (priority := 100) mono_of_iso (f : X ⟶ Y) [IsIso f] : Mono f 
goal: CategoryTheory.Mono f

full_name: CategoryTheory.IsIso.inv_eq_of_hom_inv_id
code: @[aesop apply safe (rule_sets := [CategoryTheory])]
theorem inv_eq_of_hom_inv_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (hom_inv_id : f ≫ g = 𝟙 X) :
    inv f = g 
goal: CategoryTheory.inv f = g

full_name: CategoryTheory.IsIso.inv_eq_of_inv_hom_id
code: theorem inv_eq_of_inv_hom_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (inv_hom_id : g ≫ f = 𝟙 Y) :
    inv f = g 
goal: CategoryTheory.inv f = g

full_name: CategoryTheory.IsIso.eq_inv_of_hom_inv_id
code: @[aesop apply safe (rule_sets := [CategoryTheory])]
theorem eq_inv_of_hom_inv_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (hom_inv_id : f ≫ g = 𝟙 X) :
    g = inv f 
goal: g = CategoryTheory.inv f

full_name: CategoryTheory.IsIso.eq_inv_of_inv_hom_id
code: theorem eq_inv_of_inv_hom_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (inv_hom_id : g ≫ f = 𝟙 Y) :
    g = inv f 
goal: g = CategoryTheory.inv f

full_name: CategoryTheory.IsIso.id
code: instance id (X : C) : IsIso (𝟙 X) 
goal: CategoryTheory.IsIso (CategoryTheory.CategoryStruct.id X)

full_name: CategoryTheory.IsIso.inv_isIso
code: instance inv_isIso [IsIso f] : IsIso (inv f) 
goal: CategoryTheory.IsIso (CategoryTheory.inv f)

full_name: CategoryTheory.IsIso.comp_isIso
code: instance (priority := 900) comp_isIso [IsIso f] [IsIso h] : IsIso (f ≫ h) 
goal: CategoryTheory.IsIso (CategoryTheory.CategoryStruct.comp f h)

full_name: CategoryTheory.IsIso.inv_id
code: @[simp]
theorem inv_id : inv (𝟙 X) = 𝟙 X 
goal: CategoryTheory.inv (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id X

full_name: CategoryTheory.IsIso.inv_comp
code: @[simp]
theorem inv_comp [IsIso f] [IsIso h] : inv (f ≫ h) = inv h ≫ inv f 
goal: CategoryTheory.inv (CategoryTheory.CategoryStruct.comp f h) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.inv h) (CategoryTheory.inv f)

full_name: CategoryTheory.IsIso.inv_inv
code: @[simp]
theorem inv_inv [IsIso f] : inv (inv f) = f 
goal: CategoryTheory.inv (CategoryTheory.inv f) = f

full_name: CategoryTheory.IsIso.Iso.inv_inv
code: @[simp]
theorem Iso.inv_inv (f : X ≅ Y) : inv f.inv = f.hom 
goal: CategoryTheory.inv f.inv = f.hom

full_name: CategoryTheory.IsIso.Iso.inv_hom
code: @[simp]
theorem Iso.inv_hom (f : X ≅ Y) : inv f.hom = f.inv 
goal: CategoryTheory.inv f.hom = f.inv

full_name: CategoryTheory.IsIso.inv_comp_eq
code: @[simp]
theorem inv_comp_eq (α : X ⟶ Y) [IsIso α] {f : X ⟶ Z} {g : Y ⟶ Z} : inv α ≫ f = g ↔ f = α ≫ g 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.inv α) f = g ↔ f = CategoryTheory.CategoryStruct.comp α g

full_name: CategoryTheory.IsIso.eq_inv_comp
code: @[simp]
theorem eq_inv_comp (α : X ⟶ Y) [IsIso α] {f : X ⟶ Z} {g : Y ⟶ Z} : g = inv α ≫ f ↔ α ≫ g = f 
goal: g = CategoryTheory.CategoryStruct.comp (CategoryTheory.inv α) f ↔ CategoryTheory.CategoryStruct.comp α g = f

full_name: CategoryTheory.IsIso.comp_inv_eq
code: @[simp]
theorem comp_inv_eq (α : X ⟶ Y) [IsIso α] {f : Z ⟶ Y} {g : Z ⟶ X} : f ≫ inv α = g ↔ f = g ≫ α 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.inv α) = g ↔ f = CategoryTheory.CategoryStruct.comp g α

full_name: CategoryTheory.IsIso.eq_comp_inv
code: @[simp]
theorem eq_comp_inv (α : X ⟶ Y) [IsIso α] {f : Z ⟶ Y} {g : Z ⟶ X} : g = f ≫ inv α ↔ g ≫ α = f 
goal: g = CategoryTheory.CategoryStruct.comp f (CategoryTheory.inv α) ↔ CategoryTheory.CategoryStruct.comp g α = f

full_name: CategoryTheory.IsIso.of_isIso_comp_left
code: theorem of_isIso_comp_left {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso f] [IsIso (f ≫ g)] :
    IsIso g 
goal: CategoryTheory.IsIso g

full_name: CategoryTheory.IsIso.of_isIso_comp_right
code: theorem of_isIso_comp_right {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso g] [IsIso (f ≫ g)] :
    IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.IsIso.of_isIso_fac_left
code: theorem of_isIso_fac_left {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} {h : X ⟶ Z} [IsIso f]
    [hh : IsIso h] (w : f ≫ g = h) : IsIso g 
goal: CategoryTheory.IsIso g

full_name: CategoryTheory.IsIso.of_isIso_fac_right
code: theorem of_isIso_fac_right {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} {h : X ⟶ Z} [IsIso g]
    [hh : IsIso h] (w : f ≫ g = h) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.eq_of_inv_eq_inv
code: theorem eq_of_inv_eq_inv {f g : X ⟶ Y} [IsIso f] [IsIso g] (p : inv f = inv g) : f = g 
goal: f = g

full_name: CategoryTheory.IsIso.inv_eq_inv
code: theorem IsIso.inv_eq_inv {f g : X ⟶ Y} [IsIso f] [IsIso g] : inv f = inv g ↔ f = g 
goal: CategoryTheory.inv f = CategoryTheory.inv g ↔ f = g

full_name: CategoryTheory.hom_comp_eq_id
code: theorem hom_comp_eq_id (g : X ⟶ Y) [IsIso g] {f : Y ⟶ X} : g ≫ f = 𝟙 X ↔ f = inv g 
goal: CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.id X ↔ f = CategoryTheory.inv g

full_name: CategoryTheory.comp_hom_eq_id
code: theorem comp_hom_eq_id (g : X ⟶ Y) [IsIso g] {f : Y ⟶ X} : f ≫ g = 𝟙 Y ↔ f = inv g 
goal: CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.id Y ↔ f = CategoryTheory.inv g

full_name: CategoryTheory.inv_comp_eq_id
code: theorem inv_comp_eq_id (g : X ⟶ Y) [IsIso g] {f : X ⟶ Y} : inv g ≫ f = 𝟙 Y ↔ f = g 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.inv g) f = CategoryTheory.CategoryStruct.id Y ↔ f = g

full_name: CategoryTheory.comp_inv_eq_id
code: theorem comp_inv_eq_id (g : X ⟶ Y) [IsIso g] {f : X ⟶ Y} : f ≫ inv g = 𝟙 X ↔ f = g 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.inv g) = CategoryTheory.CategoryStruct.id X ↔ f = g

full_name: CategoryTheory.isIso_of_hom_comp_eq_id
code: theorem isIso_of_hom_comp_eq_id (g : X ⟶ Y) [IsIso g] {f : Y ⟶ X} (h : g ≫ f = 𝟙 X) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.isIso_of_comp_hom_eq_id
code: theorem isIso_of_comp_hom_eq_id (g : X ⟶ Y) [IsIso g] {f : Y ⟶ X} (h : f ≫ g = 𝟙 Y) : IsIso f 
goal: CategoryTheory.IsIso f

full_name: CategoryTheory.Iso.inv_ext
code: @[aesop apply safe (rule_sets := [CategoryTheory])]
theorem inv_ext {f : X ≅ Y} {g : Y ⟶ X} (hom_inv_id : f.hom ≫ g = 𝟙 X) : f.inv = g 
goal: f.inv = g

full_name: CategoryTheory.Iso.inv_ext'
code: @[aesop apply safe (rule_sets := [CategoryTheory])]
theorem inv_ext' {f : X ≅ Y} {g : Y ⟶ X} (hom_inv_id : f.hom ≫ g = 𝟙 X) : g = f.inv 
goal: g = f.inv

full_name: CategoryTheory.Iso.cancel_iso_hom_left
code: @[simp]
theorem cancel_iso_hom_left {X Y Z : C} (f : X ≅ Y) (g g' : Y ⟶ Z) :
    f.hom ≫ g = f.hom ≫ g' ↔ g = g' 
goal: CategoryTheory.CategoryStruct.comp f.hom g = CategoryTheory.CategoryStruct.comp f.hom g' ↔ g = g'

full_name: CategoryTheory.Iso.cancel_iso_inv_left
code: @[simp]
theorem cancel_iso_inv_left {X Y Z : C} (f : Y ≅ X) (g g' : Y ⟶ Z) :
    f.inv ≫ g = f.inv ≫ g' ↔ g = g' 
goal: CategoryTheory.CategoryStruct.comp f.inv g = CategoryTheory.CategoryStruct.comp f.inv g' ↔ g = g'

full_name: CategoryTheory.Iso.cancel_iso_hom_right
code: @[simp]
theorem cancel_iso_hom_right {X Y Z : C} (f f' : X ⟶ Y) (g : Y ≅ Z) :
    f ≫ g.hom = f' ≫ g.hom ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f g.hom = CategoryTheory.CategoryStruct.comp f' g.hom ↔ f = f'

full_name: CategoryTheory.Iso.cancel_iso_inv_right
code: @[simp]
theorem cancel_iso_inv_right {X Y Z : C} (f f' : X ⟶ Y) (g : Z ≅ Y) :
    f ≫ g.inv = f' ≫ g.inv ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f g.inv = CategoryTheory.CategoryStruct.comp f' g.inv ↔ f = f'

full_name: CategoryTheory.Iso.cancel_iso_hom_right_assoc
code: @[simp]
theorem cancel_iso_hom_right_assoc {W X X' Y Z : C} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X')
    (g' : X' ⟶ Y) (h : Y ≅ Z) : f ≫ g ≫ h.hom = f' ≫ g' ≫ h.hom ↔ f ≫ g = f' ≫ g' 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h.hom) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h.hom) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'

full_name: CategoryTheory.Iso.cancel_iso_inv_right_assoc
code: @[simp]
theorem cancel_iso_inv_right_assoc {W X X' Y Z : C} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X')
    (g' : X' ⟶ Y) (h : Z ≅ Y) : f ≫ g ≫ h.inv = f' ≫ g' ≫ h.inv ↔ f ≫ g = f' ≫ g' 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h.inv) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h.inv) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'

full_name: CategoryTheory.Iso.map_hom_inv_id
code: @[reassoc (attr := simp)]
lemma map_hom_inv_id (F : C ⥤ D) :
    F.map e.hom ≫ F.map e.inv = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp (F.map e.hom) (F.map e.inv) = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Iso.map_inv_hom_id
code: @[reassoc (attr := simp)]
lemma map_inv_hom_id (F : C ⥤ D) :
    F.map e.inv ≫ F.map e.hom = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp (F.map e.inv) (F.map e.hom) = CategoryTheory.CategoryStruct.id (F.obj Y)

full_name: CategoryTheory.Functor.mapIso
code: /-- A functor `F : C ⥤ D` sends isomorphisms `i : X ≅ Y` to isomorphisms `F.obj X ≅ F.obj Y` -/
@[simps]
def mapIso (F : C ⥤ D) {X Y : C} (i : X ≅ Y) : F.obj X ≅ F.obj Y 
goal: F.obj X ≅ F.obj Y

full_name: CategoryTheory.Functor.mapIso_inv
code: /-- A functor `F : C ⥤ D` sends isomorphisms `i : X ≅ Y` to isomorphisms `F.obj X ≅ F.obj Y` -/
@[simps]
def mapIso (F : C ⥤ D) {X Y : C} (i : X ≅ Y) : F.obj X ≅ F.obj Y 
goal: (F.mapIso i).inv = F.map i.inv

full_name: CategoryTheory.Functor.mapIso_hom
code: /-- A functor `F : C ⥤ D` sends isomorphisms `i : X ≅ Y` to isomorphisms `F.obj X ≅ F.obj Y` -/
@[simps]
def mapIso (F : C ⥤ D) {X Y : C} (i : X ≅ Y) : F.obj X ≅ F.obj Y 
goal: (F.mapIso i).hom = F.map i.hom

full_name: CategoryTheory.Functor.mapIso_symm
code: @[simp]
theorem mapIso_symm (F : C ⥤ D) {X Y : C} (i : X ≅ Y) : F.mapIso i.symm = (F.mapIso i).symm 
goal: F.mapIso i.symm = (F.mapIso i).symm

full_name: CategoryTheory.Functor.mapIso_trans
code: @[simp]
theorem mapIso_trans (F : C ⥤ D) {X Y Z : C} (i : X ≅ Y) (j : Y ≅ Z) :
    F.mapIso (i ≪≫ j) = F.mapIso i ≪≫ F.mapIso j 
goal: F.mapIso (i ≪≫ j) = F.mapIso i ≪≫ F.mapIso j

full_name: CategoryTheory.Functor.mapIso_refl
code: @[simp]
theorem mapIso_refl (F : C ⥤ D) (X : C) : F.mapIso (Iso.refl X) = Iso.refl (F.obj X) 
goal: F.mapIso (CategoryTheory.Iso.refl X) = CategoryTheory.Iso.refl (F.obj X)

full_name: CategoryTheory.Functor.map_isIso
code: instance map_isIso (F : C ⥤ D) (f : X ⟶ Y) [IsIso f] : IsIso (F.map f) 
goal: CategoryTheory.IsIso (F.map f)

full_name: CategoryTheory.Functor.map_inv
code: @[simp]
theorem map_inv (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) [IsIso f] : F.map (inv f) = inv (F.map f) 
goal: F.map (CategoryTheory.inv f) = CategoryTheory.inv (F.map f)

full_name: CategoryTheory.Functor.map_hom_inv
code: @[reassoc]
theorem map_hom_inv (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) [IsIso f] :
    F.map f ≫ F.map (inv f) = 𝟙 (F.obj X) 
goal: CategoryTheory.CategoryStruct.comp (F.map f) (F.map (CategoryTheory.inv f)) = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Functor.map_inv_hom
code: @[reassoc]
theorem map_inv_hom (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) [IsIso f] :
    F.map (inv f) ≫ F.map f = 𝟙 (F.obj Y) 
goal: CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.inv f)) (F.map f) = CategoryTheory.CategoryStruct.id (F.obj Y)