File: Mathlib/CategoryTheory/Equivalence.lean

full_name: CategoryTheory.Equivalence.functor
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: CategoryTheory.Functor C D

full_name: CategoryTheory.Equivalence
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: Type (max (max (max u₁ u₂) v₁) v₂)

full_name: CategoryTheory.Equivalence.functor_unitIso_comp
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: CategoryTheory.CategoryStruct.comp (self.functor.map (self.unitIso.hom.app X))
    (self.counitIso.hom.app (self.functor.obj X)) =
  CategoryTheory.CategoryStruct.id (self.functor.obj X)

full_name: CategoryTheory.Equivalence.unitIso
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: CategoryTheory.Functor.id C ≅ self.functor.comp self.inverse

full_name: CategoryTheory.Equivalence.counitIso
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: self.inverse.comp self.functor ≅ CategoryTheory.Functor.id D

full_name: CategoryTheory.Equivalence.mk'
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: C ≌ D

full_name: CategoryTheory.Equivalence.inverse
code: /-- We define an equivalence as a (half)-adjoint equivalence, a pair of functors with
  a unit and counit which are natural isomorphisms and the triangle law `Fη ≫ εF = 1`, or in other
  words the composite `F ⟶ FGF ⟶ F` is the identity.

  In `unit_inverse_comp`, we show that this is actually an adjoint equivalence, i.e., that the
  composite `G ⟶ GFG ⟶ G` is also the identity.

  The triangle equation is written as a family of equalities between morphisms, it is more
  complicated if we write it as an equality of natural transformations, because then we would have
  to insert natural transformations like `F ⟶ F1`.

See <https://stacks.math.columbia.edu/tag/001J>
-/
@[ext]
structure Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D] where mk' ::
  /-- A functor in one direction -/
  functor : C ⥤ D
  /-- A functor in the other direction -/
  inverse : D ⥤ C
  /-- The composition `functor ⋙ inverse` is isomorphic to the identity -/
  unitIso : 𝟭 C ≅ functor ⋙ inverse
  /-- The composition `inverse ⋙ functor` is also isomorphic to the identity -/
  counitIso : inverse ⋙ functor ≅ 𝟭 D
  /-- The natural isomorphisms compose to the identity. -/
  functor_unitIso_comp :
    ∀ X : C, functor.map (unitIso.hom.app X) ≫ counitIso.hom.app (functor.obj X) =
      𝟙 (functor.obj X) := by aesop_cat
goal: CategoryTheory.Functor D C

full_name: CategoryTheory._aux_Mathlib_CategoryTheory_Equivalence___unexpand_CategoryTheory_Equivalence_1
code: /-- We infix the usual notation for an equivalence -/
infixr:10 " ≌ " => Equivalence
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.«_aux_Mathlib_CategoryTheory_Equivalence___macroRules_CategoryTheory_term_≌__1»
code: /-- We infix the usual notation for an equivalence -/
infixr:10 " ≌ " => Equivalence
goal: Lean.Macro

full_name: CategoryTheory.Equivalence.unit
code: /-- The unit of an equivalence of categories. -/
abbrev unit (e : C ≌ D) : 𝟭 C ⟶ e.functor ⋙ e.inverse 
goal: CategoryTheory.Functor.id C ⟶ e.functor.comp e.inverse

full_name: CategoryTheory.Equivalence.counit
code: /-- The counit of an equivalence of categories. -/
abbrev counit (e : C ≌ D) : e.inverse ⋙ e.functor ⟶ 𝟭 D 
goal: e.inverse.comp e.functor ⟶ CategoryTheory.Functor.id D

full_name: CategoryTheory.Equivalence.unitInv
code: /-- The inverse of the unit of an equivalence of categories. -/
abbrev unitInv (e : C ≌ D) : e.functor ⋙ e.inverse ⟶ 𝟭 C 
goal: e.functor.comp e.inverse ⟶ CategoryTheory.Functor.id C

full_name: CategoryTheory.Equivalence.counitInv
code: /-- The inverse of the counit of an equivalence of categories. -/
abbrev counitInv (e : C ≌ D) : 𝟭 D ⟶ e.inverse ⋙ e.functor 
goal: CategoryTheory.Functor.id D ⟶ e.inverse.comp e.functor

full_name: CategoryTheory.Equivalence.Equivalence_mk'_unit
code: @[simp]
theorem Equivalence_mk'_unit (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).unit = unit_iso.hom 
goal: { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.unit =
  unit_iso.hom

full_name: CategoryTheory.Equivalence.Equivalence_mk'_counit
code: @[simp]
theorem Equivalence_mk'_counit (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).counit = counit_iso.hom 
goal: { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.counit =
  counit_iso.hom

full_name: CategoryTheory.Equivalence.Equivalence_mk'_unitInv
code: @[simp]
theorem Equivalence_mk'_unitInv (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).unitInv = unit_iso.inv 
goal: { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.unitInv =
  unit_iso.inv

full_name: CategoryTheory.Equivalence.Equivalence_mk'_counitInv
code: @[simp]
theorem Equivalence_mk'_counitInv (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).counitInv = counit_iso.inv 
goal: { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.counitInv =
  counit_iso.inv

full_name: CategoryTheory.Equivalence.functor_unit_comp
code: @[reassoc (attr := simp)]
theorem functor_unit_comp (e : C ≌ D) (X : C) :
    e.functor.map (e.unit.app X) ≫ e.counit.app (e.functor.obj X) = 𝟙 (e.functor.obj X) 
goal: CategoryTheory.CategoryStruct.comp (e.functor.map (e.unit.app X)) (e.counit.app (e.functor.obj X)) =
  CategoryTheory.CategoryStruct.id (e.functor.obj X)

full_name: CategoryTheory.Equivalence.counitInv_functor_comp
code: @[reassoc (attr := simp)]
theorem counitInv_functor_comp (e : C ≌ D) (X : C) :
    e.counitInv.app (e.functor.obj X) ≫ e.functor.map (e.unitInv.app X) = 𝟙 (e.functor.obj X) 
goal: CategoryTheory.CategoryStruct.comp (e.counitInv.app (e.functor.obj X)) (e.functor.map (e.unitInv.app X)) =
  CategoryTheory.CategoryStruct.id (e.functor.obj X)

full_name: CategoryTheory.Equivalence.counitInv_app_functor
code: theorem counitInv_app_functor (e : C ≌ D) (X : C) :
    e.counitInv.app (e.functor.obj X) = e.functor.map (e.unit.app X) 
goal: e.counitInv.app (e.functor.obj X) = e.functor.map (e.unit.app X)

full_name: CategoryTheory.Equivalence.counit_app_functor
code: theorem counit_app_functor (e : C ≌ D) (X : C) :
    e.counit.app (e.functor.obj X) = e.functor.map (e.unitInv.app X) 
goal: e.counit.app (e.functor.obj X) = e.functor.map (e.unitInv.app X)

full_name: CategoryTheory.Equivalence.unit_inverse_comp
code: /-- The other triangle equality. The proof follows the following proof in Globular:
  http://globular.science/1905.001 -/
@[reassoc (attr := simp)]
theorem unit_inverse_comp (e : C ≌ D) (Y : D) :
    e.unit.app (e.inverse.obj Y) ≫ e.inverse.map (e.counit.app Y) = 𝟙 (e.inverse.obj Y) 
goal: CategoryTheory.CategoryStruct.comp (e.unit.app (e.inverse.obj Y)) (e.inverse.map (e.counit.app Y)) =
  CategoryTheory.CategoryStruct.id (e.inverse.obj Y)

full_name: CategoryTheory.Equivalence.inverse_counitInv_comp
code: @[reassoc (attr := simp)]
theorem inverse_counitInv_comp (e : C ≌ D) (Y : D) :
    e.inverse.map (e.counitInv.app Y) ≫ e.unitInv.app (e.inverse.obj Y) = 𝟙 (e.inverse.obj Y) 
goal: CategoryTheory.CategoryStruct.comp (e.inverse.map (e.counitInv.app Y)) (e.unitInv.app (e.inverse.obj Y)) =
  CategoryTheory.CategoryStruct.id (e.inverse.obj Y)

full_name: CategoryTheory.Equivalence.unit_app_inverse
code: theorem unit_app_inverse (e : C ≌ D) (Y : D) :
    e.unit.app (e.inverse.obj Y) = e.inverse.map (e.counitInv.app Y) 
goal: e.unit.app (e.inverse.obj Y) = e.inverse.map (e.counitInv.app Y)

full_name: CategoryTheory.Equivalence.unitInv_app_inverse
code: theorem unitInv_app_inverse (e : C ≌ D) (Y : D) :
    e.unitInv.app (e.inverse.obj Y) = e.inverse.map (e.counit.app Y) 
goal: e.unitInv.app (e.inverse.obj Y) = e.inverse.map (e.counit.app Y)

full_name: CategoryTheory.Equivalence.fun_inv_map
code: @[reassoc, simp]
theorem fun_inv_map (e : C ≌ D) (X Y : D) (f : X ⟶ Y) :
    e.functor.map (e.inverse.map f) = e.counit.app X ≫ f ≫ e.counitInv.app Y 
goal: e.functor.map (e.inverse.map f) =
  CategoryTheory.CategoryStruct.comp (e.counit.app X) (CategoryTheory.CategoryStruct.comp f (e.counitInv.app Y))

full_name: CategoryTheory.Equivalence.inv_fun_map
code: @[reassoc, simp]
theorem inv_fun_map (e : C ≌ D) (X Y : C) (f : X ⟶ Y) :
    e.inverse.map (e.functor.map f) = e.unitInv.app X ≫ f ≫ e.unit.app Y 
goal: e.inverse.map (e.functor.map f) =
  CategoryTheory.CategoryStruct.comp (e.unitInv.app X) (CategoryTheory.CategoryStruct.comp f (e.unit.app Y))

full_name: CategoryTheory.Equivalence.adjointifyη
code: /-- If `η : 𝟭 C ≅ F ⋙ G` is part of a (not necessarily half-adjoint) equivalence, we can upgrade it
to a refined natural isomorphism `adjointifyη η : 𝟭 C ≅ F ⋙ G` which exhibits the properties
required for a half-adjoint equivalence. See `Equivalence.mk`. -/
def adjointifyη : 𝟭 C ≅ F ⋙ G 
goal: CategoryTheory.Functor.id C ≅ F.comp G

full_name: CategoryTheory.Equivalence.adjointify_η_ε
code: @[reassoc]
theorem adjointify_η_ε (X : C) :
    F.map ((adjointifyη η ε).hom.app X) ≫ ε.hom.app (F.obj X) = 𝟙 (F.obj X) 
goal: CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.Equivalence.adjointifyη η ε).hom.app X))
    (ε.hom.app (F.obj X)) =
  CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Equivalence.mk
code: /-- Every equivalence of categories consisting of functors `F` and `G` such that `F ⋙ G` and
    `G ⋙ F` are naturally isomorphic to identity functors can be transformed into a half-adjoint
    equivalence without changing `F` or `G`. -/
protected def mk (F : C ⥤ D) (G : D ⥤ C) (η : 𝟭 C ≅ F ⋙ G) (ε : G ⋙ F ≅ 𝟭 D) : C ≌ D 
goal: C ≌ D

full_name: CategoryTheory.Equivalence.refl_unitIso
code: /-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C 
goal: CategoryTheory.Equivalence.refl.unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id C)

full_name: CategoryTheory.Equivalence.refl
code: /-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C 
goal: C ≌ C

full_name: CategoryTheory.Equivalence.refl_inverse
code: /-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C 
goal: CategoryTheory.Equivalence.refl.inverse = CategoryTheory.Functor.id C

full_name: CategoryTheory.Equivalence.refl_counitIso
code: /-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C 
goal: CategoryTheory.Equivalence.refl.counitIso =
  CategoryTheory.Iso.refl ((CategoryTheory.Functor.id C).comp (CategoryTheory.Functor.id C))

full_name: CategoryTheory.Equivalence.refl_functor
code: /-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C 
goal: CategoryTheory.Equivalence.refl.functor = CategoryTheory.Functor.id C

full_name: CategoryTheory.Equivalence.instInhabited
code: instance : Inhabited (C ≌ C) 
goal: Inhabited (C ≌ C)

full_name: CategoryTheory.Equivalence.symm_unitIso
code: /-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C 
goal: e.symm.unitIso = e.counitIso.symm

full_name: CategoryTheory.Equivalence.symm_counitIso
code: /-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C 
goal: e.symm.counitIso = e.unitIso.symm

full_name: CategoryTheory.Equivalence.symm_functor
code: /-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C 
goal: e.symm.functor = e.inverse

full_name: CategoryTheory.Equivalence.symm
code: /-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C 
goal: D ≌ C

full_name: CategoryTheory.Equivalence.symm_inverse
code: /-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C 
goal: e.symm.inverse = e.functor

full_name: CategoryTheory.Equivalence.trans_unitIso
code: /-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E 
goal: (e.trans f).unitIso =
  e.unitIso ≪≫ CategoryTheory.isoWhiskerLeft e.functor (CategoryTheory.isoWhiskerRight f.unitIso e.inverse)

full_name: CategoryTheory.Equivalence.trans
code: /-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E 
goal: C ≌ E

full_name: CategoryTheory.Equivalence.trans_inverse
code: /-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E 
goal: (e.trans f).inverse = f.inverse.comp e.inverse

full_name: CategoryTheory.Equivalence.trans_functor
code: /-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E 
goal: (e.trans f).functor = e.functor.comp f.functor

full_name: CategoryTheory.Equivalence.trans_counitIso
code: /-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E 
goal: (e.trans f).counitIso =
  CategoryTheory.isoWhiskerLeft f.inverse (CategoryTheory.isoWhiskerRight e.counitIso f.functor) ≪≫ f.counitIso

full_name: CategoryTheory.Equivalence.funInvIdAssoc
code: /-- Composing a functor with both functors of an equivalence yields a naturally isomorphic
functor. -/
def funInvIdAssoc (e : C ≌ D) (F : C ⥤ E) : e.functor ⋙ e.inverse ⋙ F ≅ F 
goal: e.functor.comp (e.inverse.comp F) ≅ F

full_name: CategoryTheory.Equivalence.funInvIdAssoc_hom_app
code: @[simp]
theorem funInvIdAssoc_hom_app (e : C ≌ D) (F : C ⥤ E) (X : C) :
    (funInvIdAssoc e F).hom.app X = F.map (e.unitInv.app X) 
goal: (e.funInvIdAssoc F).hom.app X = F.map (e.unitInv.app X)

full_name: CategoryTheory.Equivalence.funInvIdAssoc_inv_app
code: @[simp]
theorem funInvIdAssoc_inv_app (e : C ≌ D) (F : C ⥤ E) (X : C) :
    (funInvIdAssoc e F).inv.app X = F.map (e.unit.app X) 
goal: (e.funInvIdAssoc F).inv.app X = F.map (e.unit.app X)

full_name: CategoryTheory.Equivalence.invFunIdAssoc
code: /-- Composing a functor with both functors of an equivalence yields a naturally isomorphic
functor. -/
def invFunIdAssoc (e : C ≌ D) (F : D ⥤ E) : e.inverse ⋙ e.functor ⋙ F ≅ F 
goal: e.inverse.comp (e.functor.comp F) ≅ F

full_name: CategoryTheory.Equivalence.invFunIdAssoc_hom_app
code: @[simp]
theorem invFunIdAssoc_hom_app (e : C ≌ D) (F : D ⥤ E) (X : D) :
    (invFunIdAssoc e F).hom.app X = F.map (e.counit.app X) 
goal: (e.invFunIdAssoc F).hom.app X = F.map (e.counit.app X)

full_name: CategoryTheory.Equivalence.invFunIdAssoc_inv_app
code: @[simp]
theorem invFunIdAssoc_inv_app (e : C ≌ D) (F : D ⥤ E) (X : D) :
    (invFunIdAssoc e F).inv.app X = F.map (e.counitInv.app X) 
goal: (e.invFunIdAssoc F).inv.app X = F.map (e.counitInv.app X)

full_name: CategoryTheory.Equivalence.congrLeft
code: /-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E 
goal: CategoryTheory.Functor C E ≌ CategoryTheory.Functor D E

full_name: CategoryTheory.Equivalence.congrLeft_functor
code: /-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E 
goal: e.congrLeft.functor = (CategoryTheory.whiskeringLeft D C E).obj e.inverse

full_name: CategoryTheory.Equivalence.congrLeft_unitIso
code: /-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E 
goal: e.congrLeft.unitIso =
  CategoryTheory.Equivalence.adjointifyη (CategoryTheory.NatIso.ofComponents (fun F => (e.funInvIdAssoc F).symm) ⋯)
    (CategoryTheory.NatIso.ofComponents (fun F => e.invFunIdAssoc F) ⋯)

full_name: CategoryTheory.Equivalence.congrLeft_counitIso
code: /-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E 
goal: e.congrLeft.counitIso = CategoryTheory.NatIso.ofComponents (fun F => e.invFunIdAssoc F) ⋯

full_name: CategoryTheory.Equivalence.congrLeft_inverse
code: /-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E 
goal: e.congrLeft.inverse = (CategoryTheory.whiskeringLeft C D E).obj e.functor

full_name: CategoryTheory.Equivalence.congrRight_counitIso
code: /-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D 
goal: e.congrRight.counitIso =
  CategoryTheory.NatIso.ofComponents
    (fun F => F.associator e.inverse e.functor ≪≫ CategoryTheory.isoWhiskerLeft F e.counitIso ≪≫ F.rightUnitor) ⋯

full_name: CategoryTheory.Equivalence.congrRight_unitIso
code: /-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D 
goal: e.congrRight.unitIso =
  CategoryTheory.Equivalence.adjointifyη
    (CategoryTheory.NatIso.ofComponents
      (fun F => F.rightUnitor.symm ≪≫ CategoryTheory.isoWhiskerLeft F e.unitIso ≪≫ F.associator e.functor e.inverse) ⋯)
    (CategoryTheory.NatIso.ofComponents
      (fun F => F.associator e.inverse e.functor ≪≫ CategoryTheory.isoWhiskerLeft F e.counitIso ≪≫ F.rightUnitor) ⋯)

full_name: CategoryTheory.Equivalence.congrRight
code: /-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D 
goal: CategoryTheory.Functor E C ≌ CategoryTheory.Functor E D

full_name: CategoryTheory.Equivalence.congrRight_inverse
code: /-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D 
goal: e.congrRight.inverse = (CategoryTheory.whiskeringRight E D C).obj e.inverse

full_name: CategoryTheory.Equivalence.congrRight_functor
code: /-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D 
goal: e.congrRight.functor = (CategoryTheory.whiskeringRight E C D).obj e.functor

full_name: CategoryTheory.Equivalence.cancel_unit_right
code: @[simp]
theorem cancel_unit_right {X Y : C} (f f' : X ⟶ Y) :
    f ≫ e.unit.app Y = f' ≫ e.unit.app Y ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f (e.unit.app Y) = CategoryTheory.CategoryStruct.comp f' (e.unit.app Y) ↔ f = f'

full_name: CategoryTheory.Equivalence.cancel_unitInv_right
code: @[simp]
theorem cancel_unitInv_right {X Y : C} (f f' : X ⟶ e.inverse.obj (e.functor.obj Y)) :
    f ≫ e.unitInv.app Y = f' ≫ e.unitInv.app Y ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f (e.unitInv.app Y) = CategoryTheory.CategoryStruct.comp f' (e.unitInv.app Y) ↔
  f = f'

full_name: CategoryTheory.Equivalence.cancel_counit_right
code: @[simp]
theorem cancel_counit_right {X Y : D} (f f' : X ⟶ e.functor.obj (e.inverse.obj Y)) :
    f ≫ e.counit.app Y = f' ≫ e.counit.app Y ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f (e.counit.app Y) = CategoryTheory.CategoryStruct.comp f' (e.counit.app Y) ↔ f = f'

full_name: CategoryTheory.Equivalence.cancel_counitInv_right
code: @[simp]
theorem cancel_counitInv_right {X Y : D} (f f' : X ⟶ Y) :
    f ≫ e.counitInv.app Y = f' ≫ e.counitInv.app Y ↔ f = f' 
goal: CategoryTheory.CategoryStruct.comp f (e.counitInv.app Y) = CategoryTheory.CategoryStruct.comp f' (e.counitInv.app Y) ↔
  f = f'

full_name: CategoryTheory.Equivalence.cancel_unit_right_assoc
code: @[simp]
theorem cancel_unit_right_assoc {W X X' Y : C} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X') (g' : X' ⟶ Y) :
    f ≫ g ≫ e.unit.app Y = f' ≫ g' ≫ e.unit.app Y ↔ f ≫ g = f' ≫ g' 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g (e.unit.app Y)) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' (e.unit.app Y)) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'

full_name: CategoryTheory.Equivalence.cancel_counitInv_right_assoc
code: @[simp]
theorem cancel_counitInv_right_assoc {W X X' Y : D} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X')
    (g' : X' ⟶ Y) : f ≫ g ≫ e.counitInv.app Y = f' ≫ g' ≫ e.counitInv.app Y ↔ f ≫ g = f' ≫ g' 
goal: CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g (e.counitInv.app Y)) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' (e.counitInv.app Y)) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'

full_name: CategoryTheory.Equivalence.cancel_unit_right_assoc'
code: @[simp]
theorem cancel_unit_right_assoc' {W X X' Y Y' Z : C} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z)
    (f' : W ⟶ X') (g' : X' ⟶ Y') (h' : Y' ⟶ Z) :
    f ≫ g ≫ h ≫ e.unit.app Z = f' ≫ g' ≫ h' ≫ e.unit.app Z ↔ f ≫ g ≫ h = f' ≫ g' ≫ h' 
goal: CategoryTheory.CategoryStruct.comp f
      (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.comp h (e.unit.app Z))) =
    CategoryTheory.CategoryStruct.comp f'
      (CategoryTheory.CategoryStruct.comp g' (CategoryTheory.CategoryStruct.comp h' (e.unit.app Z))) ↔
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h')

full_name: CategoryTheory.Equivalence.cancel_counitInv_right_assoc'
code: @[simp]
theorem cancel_counitInv_right_assoc' {W X X' Y Y' Z : D} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z)
    (f' : W ⟶ X') (g' : X' ⟶ Y') (h' : Y' ⟶ Z) :
    f ≫ g ≫ h ≫ e.counitInv.app Z = f' ≫ g' ≫ h' ≫ e.counitInv.app Z ↔
    f ≫ g ≫ h = f' ≫ g' ≫ h' 
goal: CategoryTheory.CategoryStruct.comp f
      (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.comp h (e.counitInv.app Z))) =
    CategoryTheory.CategoryStruct.comp f'
      (CategoryTheory.CategoryStruct.comp g' (CategoryTheory.CategoryStruct.comp h' (e.counitInv.app Z))) ↔
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h')

full_name: CategoryTheory.Equivalence.powNat
code: /-- Natural number powers of an auto-equivalence.  Use `(^)` instead. -/
def powNat (e : C ≌ C) : ℕ → (C ≌ C)
  
goal: ℕ → (C ≌ C)

full_name: CategoryTheory.Equivalence.pow
code: /-- Powers of an auto-equivalence.  Use `(^)` instead. -/
def pow (e : C ≌ C) : ℤ → (C ≌ C)
  
goal: ℤ → (C ≌ C)

full_name: CategoryTheory.Equivalence.instPowInt
code: instance : Pow (C ≌ C) ℤ 
goal: Pow (C ≌ C) ℤ

full_name: CategoryTheory.Equivalence.pow_zero
code: @[simp]
theorem pow_zero (e : C ≌ C) : e ^ (0 : ℤ) = Equivalence.refl 
goal: e ^ 0 = CategoryTheory.Equivalence.refl

full_name: CategoryTheory.Equivalence.pow_one
code: @[simp]
theorem pow_one (e : C ≌ C) : e ^ (1 : ℤ) = e 
goal: e ^ 1 = e

full_name: CategoryTheory.Equivalence.pow_neg_one
code: @[simp]
theorem pow_neg_one (e : C ≌ C) : e ^ (-1 : ℤ) = e.symm 
goal: e ^ (-1) = e.symm

full_name: CategoryTheory.Equivalence.essSurj_functor
code: /-- The functor of an equivalence of categories is essentially surjective.

See <https://stacks.math.columbia.edu/tag/02C3>.
-/
instance essSurj_functor (e : C ≌ E) : e.functor.EssSurj 
goal: e.functor.EssSurj

full_name: CategoryTheory.Equivalence.essSurj_inverse
code: instance essSurj_inverse (e : C ≌ E) : e.inverse.EssSurj 
goal: e.inverse.EssSurj

full_name: CategoryTheory.Equivalence.fullyFaithfulFunctor
code: /-- The functor of an equivalence of categories is fully faithful. -/
def fullyFaithfulFunctor (e : C ≌ E) : e.functor.FullyFaithful 
goal: e.functor.FullyFaithful

full_name: CategoryTheory.Equivalence.fullyFaithfulInverse
code: /-- The inverse of an equivalence of categories is fully faithful. -/
def fullyFaithfulInverse (e : C ≌ E) : e.inverse.FullyFaithful 
goal: e.inverse.FullyFaithful

full_name: CategoryTheory.Equivalence.faithful_functor
code: /-- The functor of an equivalence of categories is faithful.

See <https://stacks.math.columbia.edu/tag/02C3>.
-/
instance faithful_functor (e : C ≌ E) : e.functor.Faithful 
goal: e.functor.Faithful

full_name: CategoryTheory.Equivalence.faithful_inverse
code: instance faithful_inverse (e : C ≌ E) : e.inverse.Faithful 
goal: e.inverse.Faithful

full_name: CategoryTheory.Equivalence.full_functor
code: /-- The functor of an equivalence of categories is full.

See <https://stacks.math.columbia.edu/tag/02C3>.
-/
instance full_functor (e : C ≌ E) : e.functor.Full 
goal: e.functor.Full

full_name: CategoryTheory.Equivalence.full_inverse
code: instance full_inverse (e : C ≌ E) : e.inverse.Full 
goal: e.inverse.Full

full_name: CategoryTheory.Equivalence.changeFunctor_unitIso_hom_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).unitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (e.unitIso.hom.app X) (e.inverse.map (iso.hom.app X))

full_name: CategoryTheory.Equivalence.changeFunctor_unitIso_inv_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).unitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (e.inverse.map (iso.inv.app X)) (e.unitIso.inv.app X)

full_name: CategoryTheory.Equivalence.changeFunctor_inverse
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).inverse = e.inverse

full_name: CategoryTheory.Equivalence.changeFunctor_counitIso_inv_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).counitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (e.counitIso.inv.app X) (iso.hom.app (e.inverse.obj X))

full_name: CategoryTheory.Equivalence.changeFunctor_counitIso_hom_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).counitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (iso.inv.app (e.inverse.obj X)) (e.counitIso.hom.app X)

full_name: CategoryTheory.Equivalence.changeFunctor
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: C ≌ D

full_name: CategoryTheory.Equivalence.changeFunctor_functor
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D 
goal: (e.changeFunctor iso).functor = G

full_name: CategoryTheory.Equivalence.changeFunctor_refl
code: /-- Compatibility of `changeFunctor` with identity isomorphisms of functors -/
theorem changeFunctor_refl (e : C ≌ D) : e.changeFunctor (Iso.refl _) = e 
goal: e.changeFunctor (CategoryTheory.Iso.refl e.functor) = e

full_name: CategoryTheory.Equivalence.changeFunctor_trans
code: /-- Compatibility of `changeFunctor` with the composition of isomorphisms of functors -/
theorem changeFunctor_trans (e : C ≌ D) {G G' : C ⥤ D} (iso₁ : e.functor ≅ G) (iso₂ : G ≅ G') :
    (e.changeFunctor iso₁).changeFunctor iso₂ = e.changeFunctor (iso₁ ≪≫ iso₂) 
goal: (e.changeFunctor iso₁).changeFunctor iso₂ = e.changeFunctor (iso₁ ≪≫ iso₂)

full_name: CategoryTheory.Equivalence.changeInverse_functor
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).functor = e.functor

full_name: CategoryTheory.Equivalence.changeInverse_unitIso_hom_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).unitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (e.unitIso.hom.app X) (iso.hom.app (e.functor.obj X))

full_name: CategoryTheory.Equivalence.changeInverse_unitIso_inv_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).unitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (iso.inv.app (e.functor.obj X)) (e.unitIso.inv.app X)

full_name: CategoryTheory.Equivalence.changeInverse_counitIso_inv_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).counitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (e.counitIso.inv.app X) (e.functor.map (iso.hom.app X))

full_name: CategoryTheory.Equivalence.changeInverse
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: C ≌ D

full_name: CategoryTheory.Equivalence.changeInverse_counitIso_hom_app
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).counitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (e.functor.map (iso.inv.app X)) (e.counitIso.hom.app X)

full_name: CategoryTheory.Equivalence.changeInverse_inverse
code: /-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D 
goal: (e.changeInverse iso).inverse = G

full_name: CategoryTheory.Functor.IsEquivalence
code: /-- A functor is an equivalence of categories if it is faithful, full and
essentially surjective. -/
class Functor.IsEquivalence (F : C ⥤ D) : Prop where
  faithful : F.Faithful := by infer_instance
  full : F.Full := by infer_instance
  essSurj : F.EssSurj := by infer_instance
goal: Prop

full_name: CategoryTheory.Functor.IsEquivalence.full
code: /-- A functor is an equivalence of categories if it is faithful, full and
essentially surjective. -/
class Functor.IsEquivalence (F : C ⥤ D) : Prop where
  faithful : F.Faithful := by infer_instance
  full : F.Full := by infer_instance
  essSurj : F.EssSurj := by infer_instance
goal: F.Full

full_name: CategoryTheory.Functor.IsEquivalence.faithful
code: /-- A functor is an equivalence of categories if it is faithful, full and
essentially surjective. -/
class Functor.IsEquivalence (F : C ⥤ D) : Prop where
  faithful : F.Faithful := by infer_instance
  full : F.Full := by infer_instance
  essSurj : F.EssSurj := by infer_instance
goal: F.Faithful

full_name: CategoryTheory.Functor.IsEquivalence.essSurj
code: /-- A functor is an equivalence of categories if it is faithful, full and
essentially surjective. -/
class Functor.IsEquivalence (F : C ⥤ D) : Prop where
  faithful : F.Faithful := by infer_instance
  full : F.Full := by infer_instance
  essSurj : F.EssSurj := by infer_instance
goal: F.EssSurj

full_name: CategoryTheory.Equivalence.isEquivalence_functor
code: instance Equivalence.isEquivalence_functor (F : C ≌ D) : IsEquivalence F.functor 
goal: F.functor.IsEquivalence

full_name: CategoryTheory.Equivalence.isEquivalence_inverse
code: instance Equivalence.isEquivalence_inverse (F : C ≌ D) : IsEquivalence F.inverse 
goal: F.inverse.IsEquivalence

full_name: CategoryTheory.Functor.IsEquivalence.mk'
code: /-- To see that a functor is an equivalence, it suffices to provide an inverse functor `G` such that
    `F ⋙ G` and `G ⋙ F` are naturally isomorphic to identity functors. -/
protected lemma mk' {F : C ⥤ D} (G : D ⥤ C) (η : 𝟭 C ≅ F ⋙ G) (ε : G ⋙ F ≅ 𝟭 D) :
    IsEquivalence F 
goal: F.IsEquivalence

full_name: CategoryTheory.Functor.inv
code: /-- A quasi-inverse `D ⥤ C` to a functor that `F : C ⥤ D` that is an equivalence,
i.e. faithful, full, and essentially surjective. -/
noncomputable def inv (F : C ⥤ D) [F.IsEquivalence] : D ⥤ C 
goal: CategoryTheory.Functor D C

full_name: CategoryTheory.Functor.asEquivalence_functor
code: /-- Interpret a functor that is an equivalence as an equivalence.

See <https://stacks.math.columbia.edu/tag/02C3>. -/
@[simps functor]
noncomputable def asEquivalence (F : C ⥤ D) [F.IsEquivalence] : C ≌ D 
goal: F.asEquivalence.functor = F

full_name: CategoryTheory.Functor.asEquivalence
code: /-- Interpret a functor that is an equivalence as an equivalence.

See <https://stacks.math.columbia.edu/tag/02C3>. -/
@[simps functor]
noncomputable def asEquivalence (F : C ⥤ D) [F.IsEquivalence] : C ≌ D 
goal: C ≌ D

full_name: CategoryTheory.Functor.isEquivalence_refl
code: instance isEquivalence_refl : IsEquivalence (𝟭 C) 
goal: (CategoryTheory.Functor.id C).IsEquivalence

full_name: CategoryTheory.Functor.isEquivalence_inv
code: instance isEquivalence_inv (F : C ⥤ D) [IsEquivalence F] : IsEquivalence F.inv 
goal: F.inv.IsEquivalence

full_name: CategoryTheory.Functor.isEquivalence_trans
code: instance isEquivalence_trans (F : C ⥤ D) (G : D ⥤ E) [IsEquivalence F] [IsEquivalence G] :
    IsEquivalence (F ⋙ G) 
goal: (F.comp G).IsEquivalence

full_name: CategoryTheory.Functor.instIsEquivalenceObjWhiskeringLeft
code: instance (F : C ⥤ D) [IsEquivalence F] : IsEquivalence ((whiskeringLeft C D E).obj F) 
goal: ((CategoryTheory.whiskeringLeft C D E).obj F).IsEquivalence

full_name: CategoryTheory.Functor.instIsEquivalenceObjWhiskeringRight
code: instance (F : C ⥤ D) [IsEquivalence F] : IsEquivalence ((whiskeringRight E C D).obj F) 
goal: ((CategoryTheory.whiskeringRight E C D).obj F).IsEquivalence

full_name: CategoryTheory.Functor.fun_inv_map
code: @[simp]
theorem fun_inv_map (F : C ⥤ D) [IsEquivalence F] (X Y : D) (f : X ⟶ Y) :
    F.map (F.inv.map f) = F.asEquivalence.counit.app X ≫ f ≫ F.asEquivalence.counitInv.app Y 
goal: F.map (F.inv.map f) =
  CategoryTheory.CategoryStruct.comp (F.asEquivalence.counit.app X)
    (CategoryTheory.CategoryStruct.comp f (F.asEquivalence.counitInv.app Y))

full_name: CategoryTheory.Functor.inv_fun_map
code: @[simp]
theorem inv_fun_map (F : C ⥤ D) [IsEquivalence F] (X Y : C) (f : X ⟶ Y) :
    F.inv.map (F.map f) = F.asEquivalence.unitInv.app X ≫ f ≫ F.asEquivalence.unit.app Y 
goal: F.inv.map (F.map f) =
  CategoryTheory.CategoryStruct.comp (F.asEquivalence.unitInv.app X)
    (CategoryTheory.CategoryStruct.comp f (F.asEquivalence.unit.app Y))

full_name: CategoryTheory.Functor.isEquivalence_of_iso
code: lemma isEquivalence_of_iso {F G : C ⥤ D} (e : F ≅ G) [F.IsEquivalence] : G.IsEquivalence 
goal: G.IsEquivalence

full_name: CategoryTheory.Functor.isEquivalence_iff_of_iso
code: lemma isEquivalence_iff_of_iso {F G : C ⥤ D} (e : F ≅ G) :
    F.IsEquivalence ↔ G.IsEquivalence 
goal: F.IsEquivalence ↔ G.IsEquivalence

full_name: CategoryTheory.Functor.isEquivalence_of_comp_right
code: /-- If `G` and `F ⋙ G` are equivalence of categories, then `F` is also an equivalence. -/
lemma isEquivalence_of_comp_right {E : Type*} [Category E] (F : C ⥤ D) (G : D ⥤ E)
    [IsEquivalence G] [IsEquivalence (F ⋙ G)] : IsEquivalence F 
goal: F.IsEquivalence

full_name: CategoryTheory.Functor.isEquivalence_of_comp_left
code: /-- If `F` and `F ⋙ G` are equivalence of categories, then `G` is also an equivalence. -/
lemma isEquivalence_of_comp_left {E : Type*} [Category E] (F : C ⥤ D) (G : D ⥤ E)
    [IsEquivalence F] [IsEquivalence (F ⋙ G)] : IsEquivalence G 
goal: G.IsEquivalence

full_name: CategoryTheory.Equivalence.essSurjInducedFunctor
code: instance essSurjInducedFunctor {C' : Type*} (e : C' ≃ D) : (inducedFunctor e).EssSurj 
goal: (CategoryTheory.inducedFunctor ⇑e).EssSurj

full_name: CategoryTheory.Equivalence.inducedFunctorOfEquiv
code: noncomputable instance inducedFunctorOfEquiv {C' : Type*} (e : C' ≃ D) :
    IsEquivalence (inducedFunctor e) 
goal: (CategoryTheory.inducedFunctor ⇑e).IsEquivalence

full_name: CategoryTheory.Equivalence.fullyFaithfulToEssImage
code: noncomputable instance fullyFaithfulToEssImage (F : C ⥤ D) [F.Full] [F.Faithful] :
    IsEquivalence F.toEssImage 
goal: F.toEssImage.IsEquivalence

full_name: CategoryTheory.Iso.compInverseIso_inv_app
code: /-- Construct an isomorphism `F ⋙ H.inverse ≅ G` from an isomorphism `F ≅ G ⋙ H.functor`. -/
@[simps!]
def compInverseIso {H : D ≌ E} (i : F ≅ G ⋙ H.functor) : F ⋙ H.inverse ≅ G 
goal: i.compInverseIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (H.unitIso.hom.app (G.obj X)) (H.inverse.map (i.inv.app X))

full_name: CategoryTheory.Iso.compInverseIso_hom_app
code: /-- Construct an isomorphism `F ⋙ H.inverse ≅ G` from an isomorphism `F ≅ G ⋙ H.functor`. -/
@[simps!]
def compInverseIso {H : D ≌ E} (i : F ≅ G ⋙ H.functor) : F ⋙ H.inverse ≅ G 
goal: i.compInverseIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (H.inverse.map (i.hom.app X)) (H.unitIso.inv.app (G.obj X))

full_name: CategoryTheory.Iso.compInverseIso
code: /-- Construct an isomorphism `F ⋙ H.inverse ≅ G` from an isomorphism `F ≅ G ⋙ H.functor`. -/
@[simps!]
def compInverseIso {H : D ≌ E} (i : F ≅ G ⋙ H.functor) : F ⋙ H.inverse ≅ G 
goal: F.comp H.inverse ≅ G

full_name: CategoryTheory.Iso.isoCompInverse
code: /-- Construct an isomorphism `G ≅ F ⋙ H.inverse` from an isomorphism `G ⋙ H.functor ≅ F`. -/
@[simps!]
def isoCompInverse {H : D ≌ E} (i : G ⋙ H.functor ≅ F) : G ≅ F ⋙ H.inverse 
goal: G ≅ F.comp H.inverse

full_name: CategoryTheory.Iso.isoCompInverse_hom_app
code: /-- Construct an isomorphism `G ≅ F ⋙ H.inverse` from an isomorphism `G ⋙ H.functor ≅ F`. -/
@[simps!]
def isoCompInverse {H : D ≌ E} (i : G ⋙ H.functor ≅ F) : G ≅ F ⋙ H.inverse 
goal: i.isoCompInverse.hom.app X =
  CategoryTheory.CategoryStruct.comp (H.unitIso.hom.app (G.obj X)) (H.inverse.map (i.hom.app X))

full_name: CategoryTheory.Iso.isoCompInverse_inv_app
code: /-- Construct an isomorphism `G ≅ F ⋙ H.inverse` from an isomorphism `G ⋙ H.functor ≅ F`. -/
@[simps!]
def isoCompInverse {H : D ≌ E} (i : G ⋙ H.functor ≅ F) : G ≅ F ⋙ H.inverse 
goal: i.isoCompInverse.inv.app X =
  CategoryTheory.CategoryStruct.comp (H.inverse.map (i.inv.app X)) (H.unitIso.inv.app (G.obj X))

full_name: CategoryTheory.Iso.inverseCompIso_inv_app
code: /-- Construct an isomorphism `G.inverse ⋙ F ≅ H` from an isomorphism `F ≅ G.functor ⋙ H`. -/
@[simps!]
def inverseCompIso {G : C ≌ D} (i : F ≅ G.functor ⋙ H) : G.inverse ⋙ F ≅ H 
goal: i.inverseCompIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (H.map (G.counitIso.inv.app X)) (i.inv.app (G.inverse.obj X))

full_name: CategoryTheory.Iso.inverseCompIso
code: /-- Construct an isomorphism `G.inverse ⋙ F ≅ H` from an isomorphism `F ≅ G.functor ⋙ H`. -/
@[simps!]
def inverseCompIso {G : C ≌ D} (i : F ≅ G.functor ⋙ H) : G.inverse ⋙ F ≅ H 
goal: G.inverse.comp F ≅ H

full_name: CategoryTheory.Iso.inverseCompIso_hom_app
code: /-- Construct an isomorphism `G.inverse ⋙ F ≅ H` from an isomorphism `F ≅ G.functor ⋙ H`. -/
@[simps!]
def inverseCompIso {G : C ≌ D} (i : F ≅ G.functor ⋙ H) : G.inverse ⋙ F ≅ H 
goal: i.inverseCompIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (i.hom.app (G.inverse.obj X)) (H.map (G.counitIso.hom.app X))

full_name: CategoryTheory.Iso.isoInverseComp_hom_app
code: /-- Construct an isomorphism `H ≅ G.inverse ⋙ F` from an isomorphism `G.functor ⋙ H ≅ F`. -/
@[simps!]
def isoInverseComp {G : C ≌ D} (i : G.functor ⋙ H ≅ F) : H ≅ G.inverse ⋙ F 
goal: i.isoInverseComp.hom.app X =
  CategoryTheory.CategoryStruct.comp (H.map (G.counitIso.inv.app X)) (i.hom.app (G.inverse.obj X))

full_name: CategoryTheory.Iso.isoInverseComp
code: /-- Construct an isomorphism `H ≅ G.inverse ⋙ F` from an isomorphism `G.functor ⋙ H ≅ F`. -/
@[simps!]
def isoInverseComp {G : C ≌ D} (i : G.functor ⋙ H ≅ F) : H ≅ G.inverse ⋙ F 
goal: H ≅ G.inverse.comp F

full_name: CategoryTheory.Iso.isoInverseComp_inv_app
code: /-- Construct an isomorphism `H ≅ G.inverse ⋙ F` from an isomorphism `G.functor ⋙ H ≅ F`. -/
@[simps!]
def isoInverseComp {G : C ≌ D} (i : G.functor ⋙ H ≅ F) : H ≅ G.inverse ⋙ F 
goal: i.isoInverseComp.inv.app X =
  CategoryTheory.CategoryStruct.comp (i.inv.app (G.inverse.obj X)) (H.map (G.counitIso.hom.app X))