Equivalence of categories #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 isomorphims 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
- if one of the two compositions is the identity, then so is the other, and
- given an equivalence of categories, it is always possible to refine
η
in such a way that the identities are satisfied.
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 #
equivalence
: bundled (half-)adjoint equivalences of categoriesis_equivalence
: type class on a functorF
containing the data of the inverseG
as well as the natural isomorphismsη
andε
.ess_surj
: type class on a functorF
containing the data of the preimages and the isomorphismsF.obj (preimage d) ≅ d
.
Main results #
equivalence.mk
: upgrade an equivalence to a (half-)adjoint equivalenceis_equivalence.equiv_of_iso
: whenF
andG
are isomorphic functors,F
is an equivalence iffG
is.equivalence.of_fully_faithfully_ess_surj
: a fully faithful essentially surjective functor is an equivalence.
Notations #
We write C ≌ D
(\backcong
, not to be confused with ≅
/\cong
) for a bundled equivalence.
- functor : C ⥤ D
- inverse : D ⥤ C
- unit_iso : 𝟭 C ≅ self.functor ⋙ self.inverse
- counit_iso : self.inverse ⋙ self.functor ≅ 𝟭 D
- functor_unit_iso_comp' : (∀ (X : C), self.functor.map (self.unit_iso.hom.app X) ≫ self.counit_iso.hom.app (self.functor.obj X) = 𝟙 (self.functor.obj X)) . "obviously"
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
Instances for category_theory.equivalence
- category_theory.equivalence.has_sizeof_inst
- category_theory.equivalence.inhabited
- category_theory.equivalence.int.has_pow
The unit of an equivalence of categories.
The counit of an equivalence of categories.
The inverse of the unit of an equivalence of categories.
The inverse of the counit of an equivalence of categories.
The other triangle equality. The proof follows the following proof in Globular: http://globular.science/1905.001
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
- category_theory.equivalence.adjointify_η η ε = (((((η ≪≫ category_theory.iso_whisker_left F G.left_unitor.symm) ≪≫ category_theory.iso_whisker_left F (category_theory.iso_whisker_right ε.symm G)) ≪≫ category_theory.iso_whisker_left F (G.associator F G)) ≪≫ (F.associator G (F ⋙ G)).symm) ≪≫ category_theory.iso_whisker_right η.symm (F ⋙ G)) ≪≫ (F ⋙ G).left_unitor
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
- category_theory.equivalence.mk F G η ε = {functor := F, inverse := G, unit_iso := category_theory.equivalence.adjointify_η η ε, counit_iso := ε, functor_unit_iso_comp' := _}
Equivalence of categories is reflexive.
Equations
- category_theory.equivalence.refl = {functor := 𝟭 C _inst_1, inverse := 𝟭 C _inst_1, unit_iso := category_theory.iso.refl (𝟭 C), counit_iso := category_theory.iso.refl (𝟭 C ⋙ 𝟭 C), functor_unit_iso_comp' := _}
Equations
Equivalence of categories is symmetric.
Equations
- e.symm = {functor := e.inverse, inverse := e.functor, unit_iso := e.counit_iso.symm, counit_iso := e.unit_iso.symm, functor_unit_iso_comp' := _}
Equivalence of categories is transitive.
Equations
- e.trans f = {functor := e.functor ⋙ f.functor, inverse := f.inverse ⋙ e.inverse, unit_iso := e.unit_iso ≪≫ category_theory.iso_whisker_left e.functor (category_theory.iso_whisker_right f.unit_iso e.inverse), counit_iso := category_theory.iso_whisker_left f.inverse (category_theory.iso_whisker_right e.counit_iso f.functor) ≪≫ f.counit_iso, functor_unit_iso_comp' := _}
Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.
Equations
- e.fun_inv_id_assoc F = (e.functor.associator e.inverse F).symm ≪≫ category_theory.iso_whisker_right e.unit_iso.symm F ≪≫ F.left_unitor
Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.
Equations
- e.inv_fun_id_assoc F = (e.inverse.associator e.functor F).symm ≪≫ category_theory.iso_whisker_right e.counit_iso F ≪≫ F.left_unitor
If C
is equivalent to D
, then C ⥤ E
is equivalent to D ⥤ E
.
Equations
- e.congr_left = category_theory.equivalence.mk ((category_theory.whiskering_left D C E).obj e.inverse) ((category_theory.whiskering_left C D E).obj e.functor) (category_theory.nat_iso.of_components (λ (F : C ⥤ E), (e.fun_inv_id_assoc F).symm) _) (category_theory.nat_iso.of_components (λ (F : D ⥤ E), e.inv_fun_id_assoc F) _)
If C
is equivalent to D
, then E ⥤ C
is equivalent to E ⥤ D
.
Equations
- e.congr_right = category_theory.equivalence.mk ((category_theory.whiskering_right E C D).obj e.functor) ((category_theory.whiskering_right E D C).obj e.inverse) (category_theory.nat_iso.of_components (λ (F : E ⥤ C), F.right_unitor.symm ≪≫ category_theory.iso_whisker_left F e.unit_iso ≪≫ F.associator e.functor e.inverse) _) (category_theory.nat_iso.of_components (λ (F : E ⥤ D), F.associator e.inverse e.functor ≪≫ category_theory.iso_whisker_left F e.counit_iso ≪≫ F.right_unitor) _)
Equations
- inverse : D ⥤ C
- unit_iso : 𝟭 C ≅ F ⋙ category_theory.is_equivalence.inverse F
- counit_iso : category_theory.is_equivalence.inverse F ⋙ F ≅ 𝟭 D
- functor_unit_iso_comp' : (∀ (X : C), F.map (category_theory.is_equivalence.unit_iso.hom.app X) ≫ category_theory.is_equivalence.counit_iso.hom.app (F.obj X) = 𝟙 (F.obj X)) . "obviously"
A functor that is part of a (half) adjoint equivalence
Instances of this typeclass
- category_theory.is_equivalence.of_equivalence
- category_theory.is_equivalence.of_equivalence_inverse
- category_theory.functor.is_equivalence_refl
- category_theory.functor.is_equivalence_inv
- category_theory.functor.is_equivalence_trans
- category_theory.equivalence.induced_functor_of_equiv
- category_theory.equivalence.fully_faithful_to_ess_image
- category_theory.prod.swap_is_equivalence
- category_theory.from_skeleton.is_equivalence
- category_theory.thin_skeleton.from_thin_skeleton_equivalence
- category_theory.monoidal.to_functor.category_theory.is_equivalence
- Action.to_functor.category_theory.is_equivalence
- category_theory.shift_functor.is_equivalence
- Fintype.skeleton.incl.category_theory.is_equivalence
- simplex_category.skeletal_functor.is_equivalence
- category_theory.monadic_right_adjoint.eqv
- category_theory.comonadic_left_adjoint.eqv
- Compactum_to_CompHaus.is_equivalence
- category_theory.decomposed_to.is_equivalence
- category_theory.sum.swap.is_equivalence
- category_theory.sum.associator_is_equivalence
- category_theory.sum.inverse_associator_is_equivalence
- category_theory.idempotents.to_karoubi.category_theory.is_equivalence
- category_theory.idempotents.functor_extension₂.category_theory.is_equivalence
- category_theory.idempotents.functor_extension.category_theory.is_equivalence
- category_theory.idempotents.obj.category_theory.is_equivalence
- category_theory.prod.associator_is_equivalence
- category_theory.prod.inverse_associator_is_equivalence
- category_theory.localization.construction.lift.category_theory.is_equivalence
- category_theory.localization.whiskering_left_functor.category_theory.is_equivalence
- category_theory.pretriangulated.rotate.category_theory.is_equivalence
- category_theory.pretriangulated.inv_rotate.category_theory.is_equivalence
- local_cohomology.self_le_radical.cast_is_equivalence
- Module.forget₂_AddCommGroup_is_equivalence
- algebraic_geometry.AffineScheme.Γ_is_equiv
Instances of other typeclasses for category_theory.is_equivalence
- category_theory.is_equivalence.has_sizeof_inst
Equations
- category_theory.is_equivalence.of_equivalence F = {inverse := F.inverse, unit_iso := F.unit_iso, counit_iso := F.counit_iso, functor_unit_iso_comp' := _}
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.
Equations
- category_theory.is_equivalence.mk G η ε = {inverse := G, unit_iso := category_theory.equivalence.adjointify_η η ε, counit_iso := ε, functor_unit_iso_comp' := _}
Interpret a functor that is an equivalence as an equivalence.
Equations
- F.as_equivalence = {functor := F, inverse := category_theory.is_equivalence.inverse F _inst_3, unit_iso := category_theory.is_equivalence.unit_iso _inst_3, counit_iso := category_theory.is_equivalence.counit_iso _inst_3, functor_unit_iso_comp' := _}
The inverse functor of a functor that is an equivalence.
Equations
Instances for category_theory.functor.inv
Equations
When a functor F
is an equivalence of categories, and G
is isomorphic to F
, then
G
is also an equivalence of categories.
Equations
- category_theory.is_equivalence.of_iso e hF = {inverse := category_theory.is_equivalence.inverse F hF, unit_iso := category_theory.is_equivalence.unit_iso ≪≫ category_theory.nat_iso.hcomp e (category_theory.iso.refl (category_theory.is_equivalence.inverse F)), counit_iso := category_theory.nat_iso.hcomp (category_theory.iso.refl (category_theory.is_equivalence.inverse F)) e.symm ≪≫ category_theory.is_equivalence.counit_iso, functor_unit_iso_comp' := _}
Compatibility of of_iso
with the composition of isomorphisms of functors
Compatibility of of_iso
with identity isomorphisms of functors
When F
and G
are two isomorphic functors, then F
is an equivalence iff G
is.
Equations
If G
and F ⋙ G
are equivalence of categories, then F
is also an equivalence.
Equations
If F
and F ⋙ G
are equivalence of categories, then G
is also an equivalence.
Equations
An equivalence is essentially surjective.
An equivalence is faithful.
An equivalence is full.
A functor which is full, faithful, and essentially surjective is an equivalence.
See https://stacks.math.columbia.edu/tag/02C3.
Equations
- category_theory.equivalence.of_fully_faithfully_ess_surj F = category_theory.is_equivalence.mk (equivalence_inverse F) (category_theory.nat_iso.of_components (λ (X : C), (F.preimage_iso (F.obj_obj_preimage_iso (F.obj X))).symm) _) (category_theory.nat_iso.of_components F.obj_obj_preimage_iso _)