Documentation

Mathlib.CategoryTheory.Equivalence

Equivalence of categories #

An equivalence of categories C and D is a pair of functors F : C ⥤ D and G : D ⥤ C such that η : 𝟭 C ≅ F ⋙ G and ε : G ⋙ F ≅ 𝟭 D. In many situations, equivalences are a better notion of "sameness" of categories than the stricter isomorphism of categories.

Recall that one way to express that two functors F : C ⥤ D and G : D ⥤ C are adjoint is using two natural transformations η : 𝟭 C ⟶ F ⋙ G and ε : G ⋙ F ⟶ 𝟭 D, called the unit and the counit, such that the compositions F ⟶ FGF ⟶ F and G ⟶ GFG ⟶ G are the identity. Unfortunately, it is not the case that the natural isomorphisms η and ε in the definition of an equivalence automatically give an adjunction. However, it is true that

For this reason, in mathlib we define an equivalence to be a "half-adjoint equivalence", which is a tuple (F, G, η, ε) as in the first paragraph such that the composite F ⟶ FGF ⟶ F is the identity. By the remark above, this already implies that the tuple is an "adjoint equivalence", i.e., that the composite G ⟶ GFG ⟶ G is also the identity.

We also define essentially surjective functors and show that a functor is an equivalence if and only if it is full, faithful and essentially surjective.

Main definitions #

Main results #

Notations #

We write C ≌ D (\backcong, not to be confused with /\cong) for a bundled equivalence.

structure CategoryTheory.Equivalence (C : Type u₁) (D : Type u₂) [Category.{v₁, u₁} C] [Category.{v₂, u₂} D] :
Type (max (max (max u₁ u₂) v₁) v₂)

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.

Stacks Tag 001J

Instances For
    theorem CategoryTheory.Equivalence.ext {C : Type u₁} {D : Type u₂} {inst✝ : Category.{v₁, u₁} C} {inst✝¹ : Category.{v₂, u₂} D} {x y : C D} (functor : x.functor = y.functor) (inverse : x.inverse = y.inverse) (unitIso : HEq x.unitIso y.unitIso) (counitIso : HEq x.counitIso y.counitIso) :
    x = y

    We infix the usual notation for an equivalence

    Equations
    Instances For
      @[reducible, inline]

      The unit of an equivalence of categories.

      Equations
      Instances For
        @[reducible, inline]

        The counit of an equivalence of categories.

        Equations
        Instances For
          @[reducible, inline]

          The inverse of the unit of an equivalence of categories.

          Equations
          Instances For
            @[reducible, inline]

            The inverse of the counit of an equivalence of categories.

            Equations
            Instances For
              @[simp]
              theorem CategoryTheory.Equivalence.Equivalence_mk'_unit {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (functor : Functor C D) (inverse : Functor D C) (unit_iso : Functor.id C functor.comp inverse) (counit_iso : inverse.comp functor Functor.id D) (f : ∀ (X : C), CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) = CategoryStruct.id (functor.obj X)) :
              { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso, functor_unitIso_comp := f }.unit = unit_iso.hom
              @[simp]
              theorem CategoryTheory.Equivalence.Equivalence_mk'_counit {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (functor : Functor C D) (inverse : Functor D C) (unit_iso : Functor.id C functor.comp inverse) (counit_iso : inverse.comp functor Functor.id D) (f : ∀ (X : C), CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) = CategoryStruct.id (functor.obj X)) :
              { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso, functor_unitIso_comp := f }.counit = counit_iso.hom
              @[simp]
              theorem CategoryTheory.Equivalence.Equivalence_mk'_unitInv {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (functor : Functor C D) (inverse : Functor D C) (unit_iso : Functor.id C functor.comp inverse) (counit_iso : inverse.comp functor Functor.id D) (f : ∀ (X : C), CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) = CategoryStruct.id (functor.obj X)) :
              { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso, functor_unitIso_comp := f }.unitInv = unit_iso.inv
              @[simp]
              theorem CategoryTheory.Equivalence.Equivalence_mk'_counitInv {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (functor : Functor C D) (inverse : Functor D C) (unit_iso : Functor.id C functor.comp inverse) (counit_iso : inverse.comp functor Functor.id D) (f : ∀ (X : C), CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) = CategoryStruct.id (functor.obj X)) :
              { functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso, functor_unitIso_comp := f }.counitInv = counit_iso.inv
              @[simp]

              The other triangle equality. The proof follows the following proof in Globular: http://globular.science/1905.001

              @[simp]

              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.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem CategoryTheory.Equivalence.adjointify_η_ε {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {F : Functor C D} {G : Functor D C} (η : Functor.id C F.comp G) (ε : G.comp F Functor.id D) (X : C) :
                theorem CategoryTheory.Equivalence.adjointify_η_ε_assoc {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {F : Functor C D} {G : Functor D C} (η : Functor.id C F.comp G) (ε : G.comp F Functor.id D) (X : C) {Z : D} (h : F.obj X Z) :
                def CategoryTheory.Equivalence.mk {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (F : Functor C D) (G : Functor D C) (η : Functor.id C F.comp G) (ε : G.comp F Functor.id D) :
                C D

                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.

                Equations
                Instances For

                  Equivalence of categories is reflexive.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Equivalence of categories is symmetric.

                    Equations
                    Instances For
                      def CategoryTheory.Equivalence.trans {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] (e : C D) (f : D E) :
                      C E

                      Equivalence of categories is transitive.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[simp]
                        @[simp]

                        Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.

                        Equations
                        Instances For
                          @[simp]
                          theorem CategoryTheory.Equivalence.funInvIdAssoc_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] (e : C D) (F : Functor C E) (X : C) :
                          (e.funInvIdAssoc F).hom.app X = F.map (e.unitInv.app X)
                          @[simp]
                          theorem CategoryTheory.Equivalence.funInvIdAssoc_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] (e : C D) (F : Functor C E) (X : C) :
                          (e.funInvIdAssoc F).inv.app X = F.map (e.unit.app X)

                          Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.

                          Equations
                          Instances For
                            @[simp]
                            theorem CategoryTheory.Equivalence.invFunIdAssoc_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] (e : C D) (F : Functor D E) (X : D) :
                            (e.invFunIdAssoc F).hom.app X = F.map (e.counit.app X)
                            @[simp]
                            theorem CategoryTheory.Equivalence.invFunIdAssoc_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] (e : C D) (F : Functor D E) (X : D) :

                            If C is equivalent to D, then C ⥤ E is equivalent to D ⥤ E.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              If C is equivalent to D, then E ⥤ C is equivalent to E ⥤ D.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[simp]
                                theorem CategoryTheory.Equivalence.cancel_unit_right {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (e : C D) {X Y : C} (f f' : X Y) :
                                @[simp]
                                @[simp]
                                theorem CategoryTheory.Equivalence.cancel_unit_right_assoc {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (e : C D) {W X X' Y : C} (f : W X) (g : X Y) (f' : W X') (g' : X' Y) :
                                @[simp]
                                def CategoryTheory.Equivalence.powNat {C : Type u₁} [Category.{v₁, u₁} C] (e : C C) :
                                → (C C)

                                Natural number powers of an auto-equivalence. Use (^) instead.

                                Equations
                                Instances For
                                  def CategoryTheory.Equivalence.pow {C : Type u₁} [Category.{v₁, u₁} C] (e : C C) :
                                  → (C C)

                                  Powers of an auto-equivalence. Use (^) instead.

                                  Equations
                                  Instances For
                                    @[simp]
                                    @[simp]
                                    theorem CategoryTheory.Equivalence.pow_one {C : Type u₁} [Category.{v₁, u₁} C] (e : C C) :
                                    e ^ 1 = e
                                    @[simp]
                                    theorem CategoryTheory.Equivalence.pow_neg_one {C : Type u₁} [Category.{v₁, u₁} C] (e : C C) :
                                    e ^ (-1) = e.symm

                                    The functor of an equivalence of categories is essentially surjective.

                                    Stacks Tag 02C3

                                    The functor of an equivalence of categories is fully faithful.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      The inverse of an equivalence of categories is fully faithful.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        The functor of an equivalence of categories is faithful.

                                        Stacks Tag 02C3

                                        The functor of an equivalence of categories is full.

                                        Stacks Tag 02C3

                                        def CategoryTheory.Equivalence.changeFunctor {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (e : C D) {G : Functor C D} (iso : e.functor G) :
                                        C D

                                        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.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[simp]

                                          Compatibility of changeFunctor with identity isomorphisms of functors

                                          theorem CategoryTheory.Equivalence.changeFunctor_trans {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (e : C D) {G G' : Functor C D} (iso₁ : e.functor G) (iso₂ : G G') :
                                          (e.changeFunctor iso₁).changeFunctor iso₂ = e.changeFunctor (iso₁ ≪≫ iso₂)

                                          Compatibility of changeFunctor with the composition of isomorphisms of functors

                                          def CategoryTheory.Equivalence.changeInverse {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (e : C D) {G : Functor D C} (iso : e.inverse G) :
                                          C D

                                          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.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            @[simp]

                                            A functor is an equivalence of categories if it is faithful, full and essentially surjective.

                                            Instances

                                              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.

                                              noncomputable def CategoryTheory.Functor.inv {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (F : Functor C D) [F.IsEquivalence] :

                                              A quasi-inverse D ⥤ C to a functor that F : C ⥤ D that is an equivalence, i.e. faithful, full, and essentially surjective.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                noncomputable def CategoryTheory.Functor.asEquivalence {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] (F : Functor C D) [F.IsEquivalence] :
                                                C D

                                                Interpret a functor that is an equivalence as an equivalence.

                                                Stacks Tag 02C3

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  If G and F ⋙ G are equivalence of categories, then F is also an equivalence.

                                                  If F and F ⋙ G are equivalence of categories, then G is also an equivalence.

                                                  def CategoryTheory.Equivalence.ofFullSubcategory {C : Type u₁} [Category.{v₁, u₁} C] {Z Z' : CProp} (h : ∀ (X : C), Z X Z' X) :

                                                  A biimplication of properties on the objects of a category C induces an equivalence of the respective induced full subcategories of C.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    @[simp]
                                                    @[simp]
                                                    def CategoryTheory.Iso.compInverseIso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : F G.comp H.functor) :

                                                    Construct an isomorphism F ⋙ H.inverse ≅ G from an isomorphism F ≅ G ⋙ H.functor.

                                                    Equations
                                                    Instances For
                                                      @[simp]
                                                      theorem CategoryTheory.Iso.compInverseIso_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : F G.comp H.functor) (X : C) :
                                                      @[simp]
                                                      theorem CategoryTheory.Iso.compInverseIso_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : F G.comp H.functor) (X : C) :
                                                      def CategoryTheory.Iso.isoCompInverse {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : G.comp H.functor F) :

                                                      Construct an isomorphism G ≅ F ⋙ H.inverse from an isomorphism G ⋙ H.functor ≅ F.

                                                      Equations
                                                      Instances For
                                                        @[simp]
                                                        theorem CategoryTheory.Iso.isoCompInverse_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : G.comp H.functor F) (X : C) :
                                                        @[simp]
                                                        theorem CategoryTheory.Iso.isoCompInverse_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {G : Functor C D} {H : D E} (i : G.comp H.functor F) (X : C) :
                                                        def CategoryTheory.Iso.inverseCompIso {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : F G.functor.comp H) :

                                                        Construct an isomorphism G.inverse ⋙ F ≅ H from an isomorphism F ≅ G.functor ⋙ H.

                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.inverseCompIso_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : F G.functor.comp H) (X : D) :
                                                          @[simp]
                                                          theorem CategoryTheory.Iso.inverseCompIso_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : F G.functor.comp H) (X : D) :
                                                          def CategoryTheory.Iso.isoInverseComp {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : G.functor.comp H F) :

                                                          Construct an isomorphism H ≅ G.inverse ⋙ F from an isomorphism G.functor ⋙ H ≅ F.

                                                          Equations
                                                          Instances For
                                                            @[simp]
                                                            theorem CategoryTheory.Iso.isoInverseComp_inv_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : G.functor.comp H F) (X : D) :
                                                            @[simp]
                                                            theorem CategoryTheory.Iso.isoInverseComp_hom_app {C : Type u₁} [Category.{v₁, u₁} C] {D : Type u₂} [Category.{v₂, u₂} D] {E : Type u₃} [Category.{v₃, u₃} E] {F : Functor C E} {H : Functor D E} {G : C D} (i : G.functor.comp H F) (X : D) :