2.4 Finiteness in HoTT
2.4.4 Equivalence of P and B
Finally, we turn to the equivalence ofP andB, with a goal of defining inverse functors [−] :P → B and # :B → P. We begin with [−].
Definition 2.4.14. The functor [−] :P → B is defined as follows; the essential idea is to send the natural number n to the canonical finite set Fin n, and permutations to paths.
• On objects, [n] :≡ (Fin n,|(n,id)|), where id : Fin n ' Fin n witnesses the finiteness of Fin n.
• Recall that a morphism ψ :m⇒P n is an equivalence ψ :Fin m'Fin n. Thus
ua ψ :Finm=Finn, and we define [ψ] :≡u(uaψ) : [m] = [n], whereu is some function witnessing the fact, mentioned immediately following Definition 2.4.7, that paths in UkFink are characterized by paths between their underlying types.
Before turning to # : B → P, we note the following property of [−]:
Lemma 2.4.15. [−] :P → B is full and faithful.
Proof. For any m, n : P, we must exhibit an equivalence between (m ⇒P n) ≡
(Fin m ' Fin n) and ([m] ⇒B [n]) ≡ ([m] = [n]) ' (Fin m = Fin n). such an
equivalence is given by univalence. SDG
On the other hand, it is not at all obvious how to directly define a functor # : B → P. Just as with B → P, defining its action on morphisms requires a specific choice of equivalence A ' Fin n. The objects of B contain such equivalences, in the proofs of finiteness, but they are propositionally truncated; the type of functors B → P is decidedly not a mere proposition, so it seems the recursion principle for truncation does not apply.
However, all is not lost! We could try porting the concept of anafunctor into HoTT, but it turns out that there is a better way. Recall that in set theory, every fully faithful, essentially surjective functor is an equivalence if and only if the axiom of choice holds. In HoTT the situation turns out much better, thanks to the richer notion of equality and the extra axiom associated with a category.
First, there are two relevant notions of essential surjectivity (taken from the HoTT book):
Definition 2.4.16. A functor F : C → D between precategories C and D is split
essentially surjective if for each object D : D there constructively exists an object
C :C such that F C ∼=D. That is,
splitEssSurj(F) :≡(D:D)→(C :C)×(F C ∼=D).
Definition 2.4.17. A functor F : C → D between precategories C and D is essen-
tially surjective if for each object D:D theremerely exists an object C :C such that
F C ∼=D. That is,
It turns out that being split essentially surjective is a rather strong notion. In particular:
Proposition 2.4.18. For any precategories C and D and functor F : C → D, F is fully faithful and split essentially surjective if and only if it is an equivalence.
Proof. See the HoTT book [2013, Lemma 9.4.5]. Intuitively, the split essential sur-
jectivity gives us exactly what we need to unambiguously construct an inverse func- tor G : D → C: the action of G on D : D is defined to be the C—which exists
constructively—such that F C ∼=D. SDG
That is, a fully faithful, essentially surjective functor is an equivalence given AC; a fully faithful,split essentially surjective functor is an equivalence even without AC.
Now, what about [−] :P → B? We have the following:
Proposition 2.4.19. [−] is essentially surjective.
Proof. Given (S, f) :B, we must show that there merely exists somen :P such that
[n]∼=S—but this is precisely the content of theisFinite proof f. SDG
On the other hand, it would seem that [−] is not split essentially surjective, since that would require extracting finiteness proofs from the propositional truncation, which is not allowed in general. However:
Proposition 2.4.20 (HoTT book, Lemma 9.4.7). If F : C → D is fully faithful
and C is a category, then for any D : D the type (C : C)×(F C ∼= D) is a mere
proposition.
Proof (sketch). From F C ∼= D and F C0 ∼= D we derive F C ∼= F C0, and thus
C ∼=C0 (since F is fully faithful), and C =C0 (since C is a category). The transport of the isomorphism (F C ∼= D) along this derived path C = C0 is precisely the
isomorphism (F C0 ∼=D). SDG
Intuitively, for a fully faithful functor F : C → D out of a category C, there is “only one way” for some object D :D to be isomorphic to the image of an object of
C. That is, if it is isomorphic to the image of multiple objects of C, then those objects must in fact be equal.
This brings us to the punchline:
Corollary 2.4.21. IfC is a category, a fully faithful functorF :C → D is essentially surjective if and only if it is split essentially surjective.
Corollary 2.4.22. Since [−] is a fully faithful and essentially surjective functor out
of a category, it is in fact split essentially surjective and thus an equivalence. In
particular, it has an inverse (up to natural isomorphism) which we call # : B → P,
and thus
As a final remark, note that this is at root an instance of the “trick” explained at the end of §1.3.7, whereby a function kAk → B may be defined, even if B is not a mere proposition, as long as the value of B produced can be uniquely characterized. Computationally speaking, # : B → P does precisely what we thought was not allowed—its action on morphisms works by extracting concrete equivalences out of the finiteness proofs in the objects of B and using them to construct the required permutation, just as in the construction of the anafunctor # : B → P in §2.3. Indeed, we are not allowed to project finiteness evidence out from the propositional truncation when defining arbitrary functors B → P. However, we are not interested in constructing any old functor, but rather a very specific one, namely, an inverse to [−] : P → B—and the inverse is uniquely determined. In essence, the construction of # proceeds by first constructing a functor paired with a proof that, together with [−], it forms an equivalence—altogether a mere proposition—and then projecting out the functor.