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 categoriesIsEquivalence
: type class on a functorF
containing the data of the inverseG
as well as the natural isomorphismsη
andε
.EssSurj
: 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 equivalenceIsEquivalence.equivOfIso
: whenF
andG
are isomorphic functors,F
is an equivalence iffG
is.Equivalence.ofFullyFaithfullyEssSurj
: 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.
- mk' :: (
- functor : CategoryTheory.Functor C D
A functor in one direction
- inverse : CategoryTheory.Functor D C
A functor in the other direction
- unitIso : CategoryTheory.Functor.id C ≅ CategoryTheory.Functor.comp s.functor s.inverse
- counitIso : CategoryTheory.Functor.comp s.inverse s.functor ≅ CategoryTheory.Functor.id D
- functor_unitIso_comp : ∀ (X : C), CategoryTheory.CategoryStruct.comp (s.functor.map (s.unitIso.hom.app X)) (s.counitIso.hom.app (s.functor.obj X)) = CategoryTheory.CategoryStruct.id (s.functor.obj X)
The natural isomorphisms compose to the identity.
- )
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
We infix the usual notation for an equivalence
Equations
- CategoryTheory.«term_≌_» = Lean.ParserDescr.trailingNode `CategoryTheory.term_≌_ 10 11 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≌ ") (Lean.ParserDescr.cat `term 10))
Instances For
The unit of an equivalence of categories.
Equations
- e.unit = e.unitIso.hom
Instances For
The counit of an equivalence of categories.
Equations
- e.counit = e.counitIso.hom
Instances For
The inverse of the unit of an equivalence of categories.
Equations
- e.unitInv = e.unitIso.inv
Instances For
The inverse of the counit of an equivalence of categories.
Equations
- e.counitInv = e.counitIso.inv
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
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
Equations
- CategoryTheory.Equivalence.instInhabitedEquivalence = { default := CategoryTheory.Equivalence.refl }
Equivalence of categories is symmetric.
Equations
- e.symm = CategoryTheory.Equivalence.mk' e.inverse e.functor e.counitIso.symm e.unitIso.symm
Instances For
Equivalence of categories is transitive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composing a functor with both functors of an equivalence yields a naturally isomorphic functor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
Natural number powers of an auto-equivalence. Use (^)
instead.
Equations
- CategoryTheory.Equivalence.powNat e 0 = CategoryTheory.Equivalence.refl
- CategoryTheory.Equivalence.powNat e 1 = e
- CategoryTheory.Equivalence.powNat e (Nat.succ (Nat.succ n)) = e.trans (CategoryTheory.Equivalence.powNat e (n + 1))
Instances For
Powers of an auto-equivalence. Use (^)
instead.
Equations
- CategoryTheory.Equivalence.pow e x = match x with | Int.ofNat n => CategoryTheory.Equivalence.powNat e n | Int.negSucc n => CategoryTheory.Equivalence.powNat e.symm (n + 1)
Instances For
Equations
- CategoryTheory.Equivalence.instPowEquivalenceInt = { pow := CategoryTheory.Equivalence.pow }
- mk' :: (
- inverse : CategoryTheory.Functor D C
The inverse functor to
F
- unitIso : CategoryTheory.Functor.id C ≅ CategoryTheory.Functor.comp F (CategoryTheory.IsEquivalence.inverse F)
Composition
F ⋙ inverse
is isomorphic to the identity. - counitIso : CategoryTheory.Functor.comp (CategoryTheory.IsEquivalence.inverse F) F ≅ CategoryTheory.Functor.id D
Composition
inverse ⋙ F
is isomorphic to the identity. - functor_unitIso_comp : ∀ (X : C), CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.IsEquivalence.unitIso.hom.app X)) (CategoryTheory.IsEquivalence.counitIso.hom.app (F.obj X)) = CategoryTheory.CategoryStruct.id (F.obj X)
The natural isomorphisms are inverse.
- )
A functor that is part of a (half) adjoint equivalence
Instances
Equations
- CategoryTheory.IsEquivalence.ofEquivalence F = CategoryTheory.IsEquivalence.mk' F.inverse F.unitIso F.counitIso
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
Instances For
Interpret a functor that is an equivalence as an equivalence.
Equations
- CategoryTheory.Functor.asEquivalence F = CategoryTheory.Equivalence.mk' F (CategoryTheory.IsEquivalence.inverse F) CategoryTheory.IsEquivalence.unitIso CategoryTheory.IsEquivalence.counitIso
Instances For
Equations
- CategoryTheory.Functor.isEquivalenceRefl = CategoryTheory.IsEquivalence.ofEquivalence CategoryTheory.Equivalence.refl
The inverse functor of a functor that is an equivalence.
Instances For
When a functor F
is an equivalence of categories, and G
is isomorphic to F
, then
G
is also an equivalence of categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility of ofIso
with the composition of isomorphisms of functors
Compatibility of ofIso
with identity isomorphisms of functors
When F
and G
are two isomorphic functors, then F
is an equivalence iff G
is.
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If F
and F ⋙ G
are equivalence of categories, then G
is also an equivalence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An equivalence is essentially surjective.
An equivalence is faithful.
An equivalence is full.
See https://stacks.math.columbia.edu/tag/02C3.
Equations
- One or more equations did not get rendered due to their size.
A functor which is full, faithful, and essentially surjective is an equivalence.
See https://stacks.math.columbia.edu/tag/02C3.
Equations
- One or more equations did not get rendered due to their size.