Module docstring
{"# 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
* 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 categoriesFunctor.EssSurj: type class on a functorFcontaining the data of the preimages and the isomorphismsF.obj (preimage d) β d.Functor.IsEquivalence: type class on a functorFwhich is full, faithful and essentially surjective.
Main results
Equivalence.mk: upgrade an equivalence to a (half-)adjoint equivalenceisEquivalence_iff_of_iso: whenFandGare isomorphic functors,Fis an equivalence iffGis.Functor.asEquivalenceFunctor: construction of an equivalence of categories from a functorFwhich satisfies the propertyF.IsEquivalence(i.e.Fis full, faithful and essentially surjective).
Notations
We write C β D (\\backcong, not to be confused with β
/\\cong) for a bundled equivalence.
"}