Our next goal is to define the universe of all (small) categories, i.e. a category \(\Cat\) whose objects classify (small) categories. We require that \(\Cat\) comes equipped with a directed univalent cocartesian fibration \(\pi_{\univ}\colon \Cat_{\bullet} \to \Cat\), so that we may identify the objects and morphisms of \(\Cat\) with (small) categories and functors between them. To ensure that \(\Cat\) does indeed behave like a universe of categories, we will have to enforce that all the categorical constructions of categories we have introduced so far admit analogues internal to \(\Cat\).

8.4.1 Universes

Let us start by introducing some general terminology regarding universes.

Definition 8.4.1 ((Regular) Universe). A universe is a category \(U\) equipped with a directed univalent cocartesian fibration \(\pi\colon U_{\bullet} \to U\).

A universe \(U\) is called regular if \(U\)-small cocartesian fibrations are closed under composition.

Remark 8.4.2. By Theorem 8.3.18, we may suppress the contractibly unique \(U\)-small structure and treat \(U\)-smallness as a property.

While there can a priori be many different universes, the collection of universes behaves like a partially ordered set:

Theorem 8.4.3. Let \(U\) be a universe with directed univalent cocartesian fibration \(\pi\colon U_{\bullet} \to U\), and let \(i\colon V \to U\) be a functor. Then the following two conditions are equivalent:

  1. (1) The base change \(V_{\bullet} := V \times_U U_{\bullet} \to V\) exhibits \(V\) as a universe;

  2. (2) The functor \(i\) is fully faithful.

Proof

Consider the map \(\pi'\colon V_{\bullet} \to V\) defined as the base change of \(\pi\) along \(i\): Commutative diagram; see the PDF for its LaTeX source By taking the cartesian product of this square with a degenerate pullback square, we obtain two pullback squares Commutative diagram; see the PDF for its LaTeX source As a consequence, we obtain from Corollary 8.1.14 a pullback square Commutative diagram; see the PDF for its LaTeX source Since the square Commutative diagram; see the PDF for its LaTeX source commutes, we obtain pullback squares Commutative diagram; see the PDF for its LaTeX source Consider now the following commutative diagram: Commutative diagram; see the PDF for its LaTeX source Since the bottom square is a pullback square, it follows from the pasting rule for pullback squares that \(i\) is fully faithful if and only if the top square is cartesian. Since the upper right vertical map \(\St_U\) is an equivalence, this happens if and only if the left vertical map \(\St_V\) is also an equivalence, i.e. if the cocartesian fibration \(V_{\bullet} \to V\) is directed univalent. This finishes the proof.

Lemma 8.4.4. Let \(\Gamma\) be an anima and let \(U\) be a universe. Then the category \(U_{\Gamma}\) in context \(\Gamma\) is a universe for categories in context \(\Gamma\).

Proof

It is clear that \(U_\Gamma\) is a cocartesian fibration. Since \(\Gamma\) is an anima, a family of functors \(f(x)\colon A(x)\to B(x)\) parametrized by terms \(x : \Gamma\) is a cocartesian fibration in context \(\Gamma\) if and only if its associated functor \[ \Sigma_{x : \Gamma}f(x)\colon \Sigma_{x : \Gamma}A(x)\to\Sigma_{x : \Gamma}B(x) \] is cocartesian in the absolute context. Similarly, if \(S(x)\) is a family of categories indexed by terms \(x : \Gamma\) with associated category in the absolute context \(S=\Sigma_{x : \Gamma}S(x)\), a functor between cocartesian fibrations over \(S(x)\) in context \(\Gamma\) is cocartesian over \(S(x)\) in context \(\Gamma\) if and only if it is cocartesian in context \(S\) in the absolute context. This implies that \[ \ul{\CoCart}_{U \times U}(U_{\bullet} \times U, U \times U_{\bullet})_\Gamma \to (U\times U)_\Gamma=U_\Gamma\times_\Gamma U_\Gamma \] classifies cocartesian functors between cocartesian fibrations that are pullbacks of the cocartesian fibration \(U_\bullet\to U\) in context \(\Gamma\). Since we also have \[ \Fun([1],U)_\Gamma =\Fun_\Gamma([1],U_\Gamma) \] this implies right away that \(U_\Gamma\) is a directed univalent universe in context \(\Gamma\) simply because the operation \((-)_\Gamma\) preserves equivalences.

8.4.2 The universe of categories

We will now introduce the universe \(\Cat\). The preceding lemma records that a universe remains a universe under anima parameters; this will justify the parametrized uses of the constructions below.

Definition 8.4.5 (Universe of categories). We say that a universe \(U\) is a universe of categories if the following conditions are satisfied:

  1. (Cat1) (Regularity) The composite of two \(U\)-small cocartesian fibrations is \(U\)-small;

  2. (Cat2) (Terminal category) The category \(*\) is \(U\)-small;

  3. (Cat3) (Pullbacks) Given \(U\)-small cocartesian fibrations \(C \to S\), \(D \to S\) and \(E \to S\), and cocartesian functors \(C \to E\) and \(D \to E\) over \(S\), the cocartesian fibration \(C \times_E D \to S\) from Proposition 6.5.12 is \(U\)-small;

  4. (Cat4) (Subcategories) Let \(p\colon C \to S\) be a \(U\)-small cocartesian fibration and let \(M \hookrightarrow \Map([1],C)\) be a collection of morphisms closed under composition such that the composite \(p\circ i_M\colon \lra{M}_C \to S\) is a cocartesian fibration. Then \(p\circ i_M\) is a \(U\)-small cocartesian fibration;

  5. (Cat5) (Joins) If \(C \to S\) and \(D \to S\) are \(U\)-small cocartesian fibrations, then their relative join \(C \star_S D \to S\) (in the sense of Definition 3.6.7) exists and is again a \(U\)-small cocartesian fibration;

  6. (Cat6) (Dependent products) For any \(U\)-small category \(S\), any \(U\)-small cocartesian fibration \(f\colon C \to D\) and any functor \(D \to S\), the functor \((p_S)_*(f)\colon (p_S)_*(C) \to (p_S)_*(D)\) is a \(U\)-small cocartesian fibration;

  7. (Cat7) (Localizations) If \(C\) is \(U\)-small and \(W \to \Map([1],C)\) is an embedding, then there exists a localization of \(C\) at \(W\) which is \(U\)-small;

  8. (Cat8) (Regular subuniverses) For any \(U\)-small subcategory \(V\) of \(U\) there exists a \(U\)-small subcategory \(V \subseteq V' \subseteq U\) such that \(V'\) is a regular universe;

  9. (Cat9) (Small fibers) A cocartesian fibration with \(U\)-small fibers is \(U\)-small.

  10. (Cat10) A synthetic category \(C\) is \(U\)-small if and only if the groupoid \(\Map([1],C)\) is \(U\)-small.

Conceptually, conditions (Cat1)–(Cat7) provide closure under the categorical constructions used in this chapter, condition (Cat8) provides enlargement inside a regular universe, and condition (Cat9) recognizes small families from their fibers.

Proposition 8.4.6 (Equivalent forms of subcategory closure). Item (Cat4) is equivalent to the following condition: if \(p\colon C\to S\) is \(U\)-small and \(i\colon C'\hookrightarrow C\) is a subcategory such that \(p\circ i\colon C'\to S\) is a cocartesian fibration, then \(p\circ i\) is \(U\)-small.

Proof

The displayed condition implies (Cat4) by Corollary 3.1.12. Conversely, given \(i\colon C'\hookrightarrow C\), apply (Cat4) to \[ M_{C'}:=\Map([1],C')\hookrightarrow\Map([1],C). \] By Lemma 3.1.13, the resulting subcategory \(\lra{M_{C'}}_C\) is equivalent to \(C'\) over \(C\), hence over \(S\). The claim follows from equivalence-invariance of smallness.

In (Cat9) we used the following terminology.

Definition 8.4.7 (\(U\)-small fibers). Let \(U\) be a universe in the sense of Definition 8.4.1, and let \(f\colon C \to D\) be a functor. We say that \(f\) has \(U\)-small fibers if for any \(U\)-small category \(T\) and any functor \(T \to D\) the pullback \(C \times_D T\) is \(U\)-small.

Directed univalence and the closure conditions describe an individual universe. The following axiom asserts that sufficiently large universes carrying this structure exist.

Axiom N (Directed Univalence Axiom). For any cocartesian fibration \(q\colon E \to B\), there exists a universe of categories \(U\) such that \(B\) is \(U\)-small and \(q\) has \(U\)-small fibers.

In practice, we will mostly just need a single universe of categories; we will frequently fix a choice and denote it by \(\Cat\). We denote the associated universal cocartesian fibration by \[ \pi_{\univ}\colon \Cat_{\bullet} \to \Cat. \] We will say that a category \(C\) is small if it is \(\Cat\)-small in the sense of Definition 8.3.1, i.e. if there exists an object \(c\colon * \to \Cat\) and a pullback square Commutative diagram; see the PDF for its LaTeX source We will similarly speak of small cocartesian fibrations, etcetera. The reader should keep in mind that all results stated for the fixed universe \(\Cat\) will hold for any universe of categories \(U\).

We now derive the closure properties needed to construct initial and terminal objects, products, coproducts, pullbacks, and functor categories internally in \(\Cat\).

Lemma 8.4.8 (Identity functors). For every category \(S\), the identity functor \(\id_S \colon S \to S\) is a small cocartesian fibration.

Proof

The identity functor on \(S\) is a base change along \(p_S\colon S \to *\) of the functor \(\id_* \colon * \to *\), and hence this follows from (Cat2).

Lemma 8.4.9 (Initial category). For every category \(S\), the functor \(\emptyset \to S\) is a small cocartesian fibration.

Proof

This follows from Proposition 8.4.6, applied to the embedding \(\emptyset \hookrightarrow S\), together with the fact that \(\id_S\colon S \to S\) is small by the previous lemma.

Lemma 8.4.10 (Products). Let \(p\colon C \to S\) and \(q\colon D \to S\) be small cocartesian fibrations. Then also \(C \times_S D \to S\) is a small cocartesian fibration.

Proof

This functor may be written as a composite \(C \times_S D \xrightarrow{\pr_C} C \xrightarrow{p} S\) of two small cocartesian fibrations, hence the claim follows from (Cat1).

Lemma 8.4.11 (Groupoid cores). Let \(C\) be a small category. Then also its groupoid core \(C^{\simeq}\) is small.

Proof

This follows from Proposition 8.4.6, applied to the embedding \(C^{\simeq} \hookrightarrow C\) from Corollary 2.5.3.

Lemma 8.4.12 (Universality of coproducts). Let \(S\) and \(T\) be categories. A cocartesian fibration \(p\colon C \to S \sqcup T\) is small if and only if its pullbacks \(p_S\colon C_S \to S\) and \(p_T\colon C_T \to T\) are small.

Proof

The β€˜only if’-direction is clear since \(U\)-small cocartesian fibrations are closed under base change. Conversely, assume that the cocartesian fibrations \(p_S\colon C_S \to S\) and \(p_T\colon C_T \to T\) are represented by functors \(F_S\colon S \to \Cat\) and \(F_T\colon T \to \Cat\), respectively. We claim that \(p\) is represented by the functor \(F := \lra{F_S,F_T}\colon S \sqcup T \to \Cat\). Indeed, if \(D \to S \sqcup T\) denotes the small cocartesian fibration classified by \(F\), then \(D\) pulls back to \(C_S \to S\) and \(C_T \to T\). By Axiom B.5', we therefore have equivalences \(D \simeq C_S \sqcup C_T \simeq C\) over \(S\sqcup T\).

Lemma 8.4.13 (Coproducts). Given small cocartesian fibrations \(p\colon C \to S\) and \(q\colon D \to S\), their coproduct \(\lra{p,q}\colon C \sqcup D \to S\) is a small cocartesian fibration.

Proof

We may factor this functor as \(C \sqcup D \xrightarrow{p \sqcup q} S \sqcup S \xrightarrow{\lra{\id_S,\id_S}} S\). The first functor is a small cocartesian fibration by Lemma 8.4.12. The second functor is a base change of the functor \(* \sqcup * \to *\), hence it remains to show that \(* \sqcup *\) is small. But since \(* \sqcup * = [1]^{\simeq}\), this follows from applying Lemma 8.4.11 to the small category \([1]\).

Lemma 8.4.14. The product \(p \times q\colon E \times F \to C \times D\) of two small cocartesian fibrations \(p\colon E \to C\) and \(q\colon F \to D\) is again small.

Proof

We may factor \(p \times q\) as a composite \[ E \times F \xrightarrow{p \times \id_F} C \times F \xrightarrow{\id_C \times q} C \times D. \] The maps \(p \times \id_F\) and \(\id_C \times q\) are small, and hence so is their composite by (Cat1).

Lemma 8.4.15. Let \(p\colon C \to S\) be a small cocartesian fibration. Then \(p\) has small fibers.

Proof

Let \(T\) be a small category equipped with a functor \(T\to S\). The pullback \(C_T\to T\) is small by base-change stability. Since \(T\to *\) is small, regularity implies that the composite \(C_T\to T\to *\) is small. Thus \(p\) has small fibers in the sense of Definition 8.4.7.

Lemma 8.4.16. Let \(C\) be a small category and \(p\colon D \to S\) a small cocartesian fibration. Then also \(p_*\colon \Fun(C,D) \to \Fun(C,S)\) is a small cocartesian fibration.

Proof

The functor \(p \times \id_C \colon D \times C \to S \times C\) is a small cocartesian fibration, being a base change of \(p\). The projection maps to \(C\) exhibit it as a cocartesian fibration over \(C\). By (Cat6), the functor \((p_C)_*(D \times C) \to (p_C)_*(S \times C)\) is again a small cocartesian fibration. But this functor is precisely \(p_*\colon \Fun(C,D) \to \Fun(C,S)\), hence we are done.

Lemma 8.4.17 (Functor categories). If \(C\) and \(D\) are small categories, then also \(\Fun(C,D)\) is small.

Proof

This is a special case of Lemma 8.4.16 by taking \(S = *\).