# Kerodon

$\Newextarrow{\xRightarrow}{5,5}{0x21D2}$

### 5.1.4 Cartesian Fibrations of Categories

Let $\operatorname{\mathcal{C}}$ be a category. Our goal in this section (and §5.1.5) is to give an intrinsic characterization of those categories which arise as a Grothendieck construction $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, for some functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$. We have already partially addressed this problem in §5.1.2. Recall that if $\mathscr {F}$ is a functor from $\operatorname{\mathcal{C}}^{\operatorname{op}}$ to the category of sets, then the forgetful functor $U: \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a fibration in sets (Remark 5.1.2.7); moreover, up to isomorphism, every fibration in sets can be obtained in this way (Corollary 5.1.2.18). For a more general functor $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$, the forgetful functor $U: \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ need not be a fibration in sets: that is, a morphism $\overline{f}: \overline{Y} \rightarrow U(Z)$ in the category $\operatorname{\mathcal{C}}$ generally cannot be lifted uniquely to a morphism $f: Y \rightarrow Z$ in the category $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$. However, we will see in a moment that $\overline{f}$ admits a preferred lifting to a morphism $f$ of $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, which is characterized (up to isomorphism) by the requirement that it is $U$-cartesian in the following sense:

Definition 5.1.4.1. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories, and let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$. We say that $f$ is $U$-cartesian if, for every object $W \in \operatorname{\mathcal{D}}$, the diagram of sets

$\xymatrix@R =50pt@C=50pt{ \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,X) \ar [r]^-{f \circ } \ar [d]^{U} & \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,Y) \ar [d] \\ \operatorname{Hom}_{\operatorname{\mathcal{C}}}( U(W), U(X) ) \ar [r]^-{U(f) \circ } & \operatorname{Hom}_{\operatorname{\mathcal{C}}}( U(W), U(Y) ) }$

is a pullback square.

Variant 5.1.4.2. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories, and let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$. We say that $f$ is $U$-cocartesian if, for every object $Z \in \operatorname{\mathcal{D}}$, the diagram of sets

$\xymatrix@R =50pt@C=50pt{ \operatorname{Hom}_{\operatorname{\mathcal{D}}}(Y,Z) \ar [r]^-{\circ f} \ar [d]^{U} & \operatorname{Hom}_{\operatorname{\mathcal{D}}}(X,Z) \ar [d] \\ \operatorname{Hom}_{\operatorname{\mathcal{C}}}( U(Y), U(Z) ) \ar [r]^-{\circ U(f)} & \operatorname{Hom}_{\operatorname{\mathcal{C}}}( U(X), U(Z) ) }$

is a pullback square.

Remark 5.1.4.3. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories and let $U^{\operatorname{op}}: \operatorname{\mathcal{D}}^{\operatorname{op}} \rightarrow \operatorname{\mathcal{C}}^{\operatorname{op}}$ be the induced functor of opposite categories. Let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$, which we identify with a morphism $f^{\operatorname{op}}: Y \rightarrow X$ in the opposite category $\operatorname{\mathcal{D}}^{\operatorname{op}}$. Then $f$ is $U$-cartesian if and only if $f^{\operatorname{op}}$ is $U^{\operatorname{op}}$-cocartesian.

Example 5.1.4.4. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories, and let $f: X \rightarrow Y$ be a morphism in $\operatorname{\mathcal{D}}$. Assume that $U(f)$ is an isomorphism in $\operatorname{\mathcal{C}}$. Then the following conditions are equivalent:

• The morphism $f$ is $U$-cartesian.

• The morphism $f$ is $U$-cocartesian.

• The morphism $f$ is an isomorphism in $\operatorname{\mathcal{D}}$.

In particular, every isomorphism in $\operatorname{\mathcal{D}}$ is both $U$-cartesian and $U$-cocartesian.

Example 5.1.4.5. We define a category $\operatorname{Mod}(\operatorname{ Ab })$ as follows:

• The objects of $\operatorname{Mod}(\operatorname{ Ab })$ are pairs $(A,M)$, where $A$ is a commutative ring and $M$ is an $A$-module.

• A morphism from $(A,M)$ to $(B,N)$ in the category $\operatorname{Mod}(\operatorname{ Ab })$ is a pair $(u,f)$, where $u: A \rightarrow B$ is a homomorphism of commutative rings and $f: M \rightarrow N$ is a homomorphism of $A$-modules.

Let $\operatorname{CAlg}( \operatorname{ Ab })$ denote the category of commutative rings, so that the construction $(A,M) \mapsto A$ determines a forgetful functor $U: \operatorname{Mod}(\operatorname{ Ab }) \rightarrow \operatorname{CAlg}(\operatorname{ Ab })$. Then:

• A morphism $(u,f): (A,M) \rightarrow (B,N)$ in the category $\operatorname{Mod}(\operatorname{ Ab })$ is $U$-cartesian if and only if the underlying $A$-module homomorphism $f: M \rightarrow N$ is an isomorphism (so that the $A$-module $M$ is obtained from the $B$-module $N$ by restriction of scalars along the ring homomorphism $u$).

• A morphism $(u,f): (A,M) \rightarrow (B,N)$ in the category $\operatorname{Mod}(\operatorname{ Ab })$ is $U$-cocartesian if and only if the underlying $A$-module homomorphism $f: M \rightarrow N$ induces a $B$-module isomorphism $B \otimes _{A} M \simeq N$ (so that the $B$-module $N$ is obtained from the $A$-module $M$ by extension of scalars along the ring homomorphism $u$).

Remark 5.1.4.6. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories, and suppose we are given a pair of morphisms $f: X \rightarrow Y$ and $g: Y \rightarrow Z$ in $\operatorname{\mathcal{D}}$. Then:

• If $g$ is $U$-cartesian, then $f$ is $U$-cartesian if and only if $g \circ f$ is $U$-cartesian.

• If $f$ is $U$-cocartesian, then $g$ is $U$-cocartesian if and only if $g \circ f$ is $U$-cocartesian.

In particular, the collections of $U$-cartesian and $U$-cocartesian morphisms of $\operatorname{\mathcal{D}}$ are closed under composition.

Remark 5.1.4.7. Suppose we are given a pullback diagram of categories

$\xymatrix@R =50pt@C=50pt{ \operatorname{\mathcal{D}}' \ar [r]^-{V} \ar [d]^{U'} & \operatorname{\mathcal{D}}\ar [d]^{U} \\ \operatorname{\mathcal{C}}' \ar [r] & \operatorname{\mathcal{C}}, }$

and let $f: X \rightarrow Y$ be a morphism of the category $\operatorname{\mathcal{D}}'$. If $V(f)$ is a $U$-cartesian morphism of $\operatorname{\mathcal{D}}$, then $f$ is a $U'$-cartesian morphism of $\operatorname{\mathcal{D}}'$. Similarly, if $V(f)$ is a $U$-cocartesian morphism of $\operatorname{\mathcal{D}}$, then $f$ is a $U$-cocartesian morphism of $\operatorname{\mathcal{D}}'$.

Definition 5.1.4.8. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. We say that $U$ is a cartesian fibration if it satisfies the following condition:

• For every object $Y$ of the category $\operatorname{\mathcal{D}}$ and every morphism $\overline{f}: \overline{X} \rightarrow U(Y)$ in the category $\operatorname{\mathcal{C}}$, there exists a pair $(X, f)$ where $X$ is an object of $\operatorname{\mathcal{D}}$ satisfying $U(X) = \overline{X}$ and $f: X \rightarrow Y$ is a $U$-cartesian morphism of $\operatorname{\mathcal{D}}$ satisfying $U(f) = \overline{f}$.

We say that $U$ is an cocartesian fibration if it satisfies the following dual condition:

• For every object $X$ of the category $\operatorname{\mathcal{D}}$ and every morphism $\overline{f}: U(X) \rightarrow \overline{Y}$ in the category $\operatorname{\mathcal{C}}$, there exists a pair $(Y, f)$ where $X$ is an object of $\operatorname{\mathcal{D}}$ satisfying $U(X) = \overline{X}$ and $f: X \rightarrow Y$ is a $U$-cocartesian morphism of $\operatorname{\mathcal{D}}$ satisfying $U(f) = \overline{f}$.

Remark 5.1.4.9. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. Then $U$ is a cartesian fibration if and only if the opposite functor $U^{\operatorname{op}}: \operatorname{\mathcal{D}}^{\operatorname{op}} \rightarrow \operatorname{\mathcal{C}}^{\operatorname{op}}$ is a cocartesian fibration.

Example 5.1.4.10. Let $\operatorname{Mod}(\operatorname{ Ab })$ be the category described in Example 5.1.4.5. Then the forgetful functor $U: \operatorname{Mod}(\operatorname{ Ab }) \rightarrow \operatorname{CAlg}(\operatorname{ Ab })$ is both a cartesian fibration and a cocartesian fibration.

Remark 5.1.4.11. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a cartesian fibration of categories. Then $U$ is an isofibration (Definition 4.4.1.1). If $Y$ is an object of $\operatorname{\mathcal{C}}$ and $\overline{f}: \overline{X} \rightarrow U(Y)$ is an isomorphism in the category $\operatorname{\mathcal{C}}$, then our assumption that $U$ is a cartesian fibration guarantees that we can choose a $U$-cartesian morphism $f: X \rightarrow Y$ of $\operatorname{\mathcal{D}}$ satisfying $U(f) = \overline{f}$, and the morphism $f$ is automatically an isomorphism (Example 5.1.4.4).

Proposition 5.1.4.12. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. Then:

• The functor $U$ is a fibration in sets (in the sense of Definition 5.1.2.1) if and only if it is a cartesian fibration (in the sense of Definition 5.1.4.8) and, for every object $C \in \operatorname{\mathcal{C}}$, the fiber $\operatorname{\mathcal{D}}_{C} = \{ C\} \times _{\operatorname{\mathcal{C}}} \operatorname{\mathcal{D}}$ is a discrete category.

• The functor $U$ is an opfibration in sets (in the sense of Variant 5.1.2.2) if and only if it is an cocartesian fibration (in the sense of Definition 5.1.4.8) and, for every object $C \in \operatorname{\mathcal{C}}$, the fiber $\operatorname{\mathcal{D}}_{C} = \{ C\} \times _{\operatorname{\mathcal{C}}} \operatorname{\mathcal{D}}$ is a discrete category.

Proof. We will prove the first assertion; the second follows by a similar argument. Assume first that $U$ is a fibration in sets. Then, for each object $C \in \operatorname{\mathcal{C}}$, the projection map $\operatorname{\mathcal{D}}_{C} \rightarrow \{ C \}$ is also a fibration in sets (Remark 5.1.2.6), so that $\operatorname{\mathcal{D}}_{C}$ is a discrete category by virtue of Example 5.1.2.5. We wish to show that $U$ is a cartesian fibration. Suppose that we are given an object $Y$ of the category $\operatorname{\mathcal{D}}$ and a morphism $\overline{f}: \overline{X} \rightarrow U(Y)$ in $\operatorname{\mathcal{C}}$. By virtue of our assumption that $U$ is a fibration in sets, we can lift $\overline{f}$ uniquely to a morphism $f: X \rightarrow Y$ in the category $\operatorname{\mathcal{D}}$. We claim that the morphism $f$ is $U$-cartesian. To prove this, suppose that we are given a diagram

$\xymatrix@R =50pt@C=50pt{ & X \ar [dr]^{f} & \\ W \ar [rr]^{h} & & Y }$

in the category $\operatorname{\mathcal{D}}$ and a morphism $\overline{g}: U(W) \rightarrow U(Y)$ in $\operatorname{\mathcal{D}}$ satisfying $U(h) = U(f) \circ \overline{g}$; we wish to show that there is a unique morphism $g: W \rightarrow X$ in $\operatorname{\mathcal{D}}$ satisfying $U(g) = \overline{g}$ and $h = f \circ g$. Invoking our assumption that $U$ is a fibration in sets, we deduce that there is a unique pair $(W', g')$, where $W'$ is an object of $\operatorname{\mathcal{D}}$ satisfying $U(X') = U(X)$ and $g': W' \rightarrow X$ is a morphism satisfying $U(g') = \overline{g}$. To complete the proof, it will suffice to show that $W' = W$ and $f \circ g' = h$. This follows from our assumption that $U$ is a fibration in sets, since $U(W') = U(W)$ and $U(f \circ g') = U(f) \circ U(g') = U(f) \circ \overline{g} = U(h)$.

We now prove the converse. Assume that $U$ is a cartesian fibration and that, for every object $C \in \operatorname{\mathcal{C}}$, the fiber $\operatorname{\mathcal{D}}_{C} = \{ C\} \times _{\operatorname{\mathcal{C}}} \operatorname{\mathcal{D}}$ is a discrete category. We wish to show that $U$ is a fibration in sets. Fix an object $Y \in \operatorname{\mathcal{D}}$ and a morphism $\overline{f}: \overline{X} \rightarrow U(Y)$ in the category $\operatorname{\mathcal{C}}$. Since $U$ is a cartesian fibration, we can choose an object $X \in \operatorname{\mathcal{D}}$ satisfying $F(X) = \overline{X}$ and a $U$-cartesian morphism $f: X \rightarrow Y$ satisfying $U(f) = \overline{f}$. To complete the proof, it will suffice to show that if $X'$ is any object of $\operatorname{\mathcal{D}}$ satisfying $U(X') = \overline{X}$ and $f': X' \rightarrow Y$ is any morphism satisfying $U(f') = \overline{f}$, then $X' = X$ and $f' = f$. Invoking our assumption that $f$ is $U$-cartesian, we see that there is a unique commutative diagram

$\xymatrix@R =50pt@C=50pt{ & X \ar [dr]^{f} & \\ X' \ar [ur]^{e} \ar [rr]^{f'} & & Y }$

in the category $\operatorname{\mathcal{D}}$ satisfying $U(e) = \operatorname{id}_{ \overline{X} }$. In this case, our assumption that the fiber $\operatorname{\mathcal{D}}_{ \overline{X} }$ is a discrete category guarantees that $e$ is an identity morphism. It follows that $X = X'$ and $f' = f \circ e = f \circ \operatorname{id}_{X} = f$, as desired. $\square$

Proposition 5.1.4.13. Let $\operatorname{\mathcal{C}}$ be a category. Then:

• For every functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$, the forgetful functor $\int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a cartesian fibration of categories.

• For every functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}$, the forgetful functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a cocartesian fibration of categories.

We will deduce Proposition 5.1.4.13 from a more general statement (Proposition 5.1.4.25), which applies in the situation where $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$ is a unitary lax functor between $2$-categories. In this case, the forgetful functor $\int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ need not be a cartesian fibration of categories, but satisfies a slightly weaker lifting property.

Definition 5.1.4.14. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories and let $f: X \rightarrow Y$ be a morphism in $\operatorname{\mathcal{D}}$ having image $\overline{f}: \overline{X} \rightarrow \overline{Y}$ in the category $\operatorname{\mathcal{C}}$.

• We say that $f$ is locally $U$-cartesian if, for every object $W$ of the fiber category $\operatorname{\mathcal{D}}_{ \overline{X} } = \{ \overline{X} \} \times _{ \operatorname{\mathcal{C}}} \operatorname{\mathcal{D}}$, postcomposition with $f$ induces a bijection

$\operatorname{Hom}_{ \operatorname{\mathcal{D}}_{\overline{X}} }( W, X) \xrightarrow {f \circ } \{ f' \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(X,Y): U(f') = U(f) \} .$
• We say that $f$ is locally $U$-cocartesian if, for every object $Z$ of the fiber category $\operatorname{\mathcal{D}}_{ \overline{Y} } = \{ \overline{Y} \} \times _{ \operatorname{\mathcal{C}}} \operatorname{\mathcal{D}}$, precomposition with $f$ induces a bijection

$\operatorname{Hom}_{ \operatorname{\mathcal{D}}_{\overline{Y}} }( Y, Z) \xrightarrow {\circ f} \{ f' \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(X,Z): U(f') = U(f) \} .$

Remark 5.1.4.15. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories and let $U^{\operatorname{op}}: \operatorname{\mathcal{D}}^{\operatorname{op}} \rightarrow \operatorname{\mathcal{C}}^{\operatorname{op}}$ be the induced functor of opposite categories. Let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$, which we identify with a morphism $f^{\operatorname{op}}: Y \rightarrow X$ in the opposite category $\operatorname{\mathcal{D}}^{\operatorname{op}}$. Then $f$ is locally $U$-cartesian if and only if $f^{\operatorname{op}}$ is locally $U^{\operatorname{op}}$-cocartesian.

Remark 5.1.4.16. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories and let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$. Then the image $U(f)$ can be identified with a functor from the partially ordered set $ = \{ 0 < 1 \}$ to the category $\operatorname{\mathcal{C}}$ (carrying $0$ to the object $U(X)$, and $1$ to the object $U(Y)$). Form a pullback diagram of categories

$\xymatrix@R =50pt@C=50pt{ \operatorname{\mathcal{D}}' \ar [r] \ar [d]^-{U'} & \operatorname{\mathcal{D}}\ar [d]^{U} \\ {} \ar [r]^-{U(f)} & \operatorname{\mathcal{C}}. }$

By construction, $f$ can be lifted uniquely to a morphism $f': X' \rightarrow Y'$ in the category $\operatorname{\mathcal{D}}'$ satisfying $U'(X') = 0$ and $U'(Y') = 1$. Then:

• The morphism $f$ is locally $U$-cartesian (in the sense of Definition 5.1.4.14) if and only if $f'$ is $U'$-cartesian (in the sense of Definition 5.1.4.1).

• The morphism $f$ is locally $U$-cocartesian (in the sense of Definition 5.1.4.14) if and only if $f'$ is $U'$-cocartesian (in the sense of Variant 5.1.4.2).

Remark 5.1.4.17. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories and let $f: X \rightarrow Y$ be a morphism in the category $\operatorname{\mathcal{D}}$. If $f$ is $U$-cartesian, then it is locally $U$-cartesian. If $f$ is $U$-cocartesian, then it is locally $U$-cocartesian. This follows from Remarks 5.1.4.7 and 5.1.4.16.

Remark 5.1.4.18 (Uniqueness). Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor of categories. Suppose we are given a pair of morphisms $f: X \rightarrow Y$ and $f': X' \rightarrow Y$ in the category $\operatorname{\mathcal{D}}$ having the same target, with $U(X') = U(X)$ and $U(f') = U(f)$. If the morphism $f$ is locally $U$-cartesian, then the morphism $f'$ factors uniquely as a composition $f' = f \circ e$, where $e: X' \rightarrow X$ is a morphism satisfying $U(e) = \operatorname{id}_{ U(X)}$. In this case, the morphism $f'$ is locally $U$-cartesian if and only if $e$ is an isomorphism.

We can summarize the situation more informally as follows: if $Y$ is an object of the category $\operatorname{\mathcal{D}}$ and $\overline{f}: \overline{X} \rightarrow Y$ is a morphism in $\operatorname{\mathcal{C}}$ which can be lifted to a locally cartesian morphism $f: X \rightarrow Y$ in $\operatorname{\mathcal{D}}$, then the morphism $f$ is uniquely determined up to isomorphism.

Example 5.1.4.19. Let $\operatorname{\mathcal{C}}$ be a category, let $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$ be unitary lax functor, let $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ denote the Grothendieck construction on $\mathscr {F}$ (Construction 5.1.3.1), and let $U: \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ be the forgetful functor. Suppose we are given a morphism $(f,u): (C,X) \rightarrow (D,Y)$ in the category $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, so that $f: C \rightarrow D$ is a morphism in the category $\operatorname{\mathcal{C}}$ and $u: X \rightarrow \mathscr {F}(f)(Y)$ is a morphism in the category $\mathscr {F}(C)$. For any other object $X' \in \mathscr {F}(C)$, postcomposition with $(f,u)$ determines a function

$\theta : \operatorname{Hom}_{ (\int ^{\operatorname{\mathcal{C}}} \mathscr {F})_{C} }( X', X ) \rightarrow \operatorname{Hom}_{ \int ^{\operatorname{\mathcal{C}}} \mathscr {F} }( (C,X'), (D,Y) ) \times _{ \operatorname{Hom}_{\operatorname{\mathcal{C}}}(C,D) } \{ f\} .$

Using the assumption that $\mathscr {F}$ is unitary (together with Example 5.1.3.12), we can identify $\theta$ with the map $\operatorname{Hom}_{\mathscr {F}(C)}( X', X) \rightarrow \operatorname{Hom}_{\mathscr {F}(C) }( X', \mathscr {F}(f)(Y) )$ given by postcomposition with $u$. It follows that $(f,u)$ is a locally $U$-cartesian morphism of the category $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$ if and only if $u$ is an isomorphism in the category $\mathscr {F}(C)$.

Definition 5.1.4.20. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. We say that $U$ is a locally cartesian fibration if it satisfies the following condition:

• For every object $Y$ of the category $\operatorname{\mathcal{D}}$ and every morphism $\overline{f}: \overline{X} \rightarrow U(Y)$ in the category $\operatorname{\mathcal{C}}$, there exists a pair $(X, f)$ where $X$ is an object of $\operatorname{\mathcal{D}}$ satisfying $U(X) = \overline{X}$ and $f: X \rightarrow Y$ is a locally $U$-cartesian morphism of $\operatorname{\mathcal{D}}$ satisfying $U(f) = \overline{f}$.

We say that $U$ is a locally cocartesian fibration if it satisfies the following dual condition:

• For every object $X$ of the category $\operatorname{\mathcal{D}}$ and every morphism $\overline{f}: U(X) \rightarrow \overline{Y}$ in the category $\operatorname{\mathcal{C}}$, there exists a pair $(Y, f)$ where $X$ is an object of $\operatorname{\mathcal{D}}$ satisfying $U(X) = \overline{X}$ and $f: X \rightarrow Y$ is a locally $U$-cocartesian morphism of $\operatorname{\mathcal{D}}$ satisfying $U(f) = \overline{f}$.

Example 5.1.4.21. Let $\operatorname{\mathcal{C}}$ be a category and let $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$ be a unitary lax functor. Then the forgetful functor $\int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a locally cartesian fibration (see Example 5.1.4.19). Similarly, if $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}^{\operatorname{c}}$ is a unitary lax functor, then the forgetful functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a locally cocartesian fibration.

Example 5.1.4.22. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. If $U$ is a cartesian fibration, then it is a locally cartesian fibration. If $U$ is a cocartesian fibration, then it is a locally cocartesian fibration.

Beware that the converse of Example 5.1.4.22 is false in general:

Exercise 5.1.4.23. Let $Q$ be a partially ordered set, let $\operatorname{Chain}[Q]$ denote the collection of all finite nonempty subsets of $Q$ (Notation 3.3.2.1), and let $\mathrm{Max}: \operatorname{Chain}[Q] \rightarrow Q$ be the map which carries each element $S \in \operatorname{Chain}[Q]$ to the largest element of $S$.

• Show that, when regarded as a functor, $\mathrm{Max}: \operatorname{Chain}[Q] \rightarrow Q$ is a locally cocartesian fibration.

• Show that, if $Q = [n]$ for $n \geq 2$, the functor $\mathrm{Max}: \operatorname{Chain}[Q] \rightarrow Q$ is not a cocartesian fibration.

Proposition 5.1.4.24. Let $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ be a functor between categories. The following conditions are equivalent:

$(1)$

The functor $U$ is a cartesian fibration of categories.

$(2)$

The functor $U$ is a locally cartesian fibration of categories and every locally $U$-cartesian morphism of $\operatorname{\mathcal{D}}$ is $U$-cartesian.

$(3)$

The functor $U$ is a locally cartesian fibration of categories and the collection of locally $U$-cartesian morphisms in $\operatorname{\mathcal{D}}$ is closed under composition.

Proof. The implication $(2) \Rightarrow (1)$ is immediate from the definition. We now show that $(1) \Rightarrow (2)$. Assume that $U: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ is a cartesian fibration of categories. Then $U$ is also a locally cartesian fibration (Example 5.1.4.22). Let $f: X \rightarrow Y$ be a locally $U$-cartesian morphism in $\operatorname{\mathcal{D}}$. Since $U$ is a cartesian fibration, we can choose a $U$-cartesian morphism $f': X' \rightarrow Y$ satisfying $U(X') = U(X)$ and $U(f') = U(f)$. Using our assumption that $f$ is locally $U$-cartesian, we deduce that $f'$ factors uniquely as a composition $f \circ e$, where $e: X' \rightarrow X$ has the property that $U(e) = \operatorname{id}_{ U(X)}$. Since $f'$ is locally $U$-cartesian, the morphism $e$ is an isomorphism (Remark 5.1.4.18). Applying Remark 5.1.4.6, we deduce that $f = f' \circ e^{-1}$ is also $U$-cartesian.

The implication $(2) \Rightarrow (3)$ follows from Remark 5.1.4.6. We will complete the proof by showing that $(3) \Rightarrow (2)$. Assume that $U$ is a locally cartesian fibration of categories and that the collection of locally $U$-cartesian morphisms of $\operatorname{\mathcal{D}}$ is closed under composition. Let $g: X \rightarrow Y$ be a locally $U$-cartesian morphism in $\operatorname{\mathcal{D}}$; we wish to show that $g$ is $U$-cartesian. Fix an object $W \in \operatorname{\mathcal{D}}$ and a morphism $\overline{f}: U(W) \rightarrow U(X)$, so that postcomposition with $g$ induces a function

$\theta : \{ f \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,X): U(f) = \overline{f} \} \rightarrow \{ h \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,Y): U(h) = U(g) \circ \overline{f} \} .$

We wish to show that $\theta$ is a bijection. To prove this, we invoke our assumption that $U$ is a locally cartesian fibration to choose a locally $U$-cartesian morphism $f': W' \rightarrow X$ in $\operatorname{\mathcal{D}}$ satisfying $U(W') = U(W)$ and $U(f') = \overline{f}$. We then have a commutative diagram

$\xymatrix@R =50pt@C=-50pt{ & \{ e \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,W'): U(e) = \operatorname{id}_{U(W)} \} \ar [dl]_{f' \circ } \ar [dr]^{g \circ f' \circ } & \\ \{ f \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,X): U(f) = \overline{f} \} \ar [rr]^-{\theta } & & \{ h \in \operatorname{Hom}_{\operatorname{\mathcal{D}}}(W,Y): U(h) = U(g) \circ \overline{f} \} . }$

Since $f'$ and $g \circ f'$ are locally $U$-cartesian, the vertical maps in this diagram are bijections. It follows that $\theta$ is also a bijection, as desired. $\square$

We now prove a more refined version of Proposition 5.1.4.13.

Proposition 5.1.4.25. Let $\operatorname{\mathcal{C}}$ be a category. Then:

• For every unitary lax functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$, the forgetful functor $U: \int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a locally cartesian fibration of categories. It is a cartesian fibration if and only if $\mathscr {F}$ is a functor.

• For every unitary lax functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}^{\operatorname{c}}$, the forgetful functor $U: \int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a locally cocartesian fibration of categories. It is a cocartesian fibration if and only if $\mathscr {F}$ is a functor.

Proof. We will prove the first assertion; the proof of the second is similar. Let $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$ be a unitary lax functor of $2$-categories. Suppose we are given an object $(D,Y)$ of the Grothendieck construction $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, so that $D$ is an object of the category $\operatorname{\mathcal{C}}$ and $Y$ is an object of the category $\mathscr {F}(D)$. For every morphism $f: C \rightarrow D$ in the category $\operatorname{\mathcal{C}}$, we can choose an isomorphism $u: X \rightarrow \mathscr {F}(f)(Y)$ in the category $\mathscr {F}(C)$ (for example, we can take $X = \mathscr {F}(f)(Y)$ and $u$ to be the identity morphism). Then $(f,u)$ is a morphism from $(C,X)$ to $(D,Y)$ in the category $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, and our assumption that $\mathscr {F}$ is unitary guarantees that $(f,u)$ is locally $U$-cartesian (Example 5.1.4.19). This proves that $U$ is a locally cartesian fibration of categories. Suppose that we are given another locally $U$-cartesian morphism $(g, v): (D,Y) \rightarrow (E,Z)$ in $\int ^{\operatorname{\mathcal{C}}} \mathscr {F}$, so that $g: D \rightarrow E$ is a morphism in $\operatorname{\mathcal{C}}$ and $v: Y \simeq \mathscr {F}(g)(Z)$ is an isomorphism in the category $\mathscr {F}(D)$ (Example 5.1.4.19). The composition $(g,v) \circ (f,u)$ can then be identified with $(g \circ f, w)$, where $w$ is given by the composition

$X \xrightarrow {u} \mathscr {F}(f)(Y) \xrightarrow { \mathscr {F}(f)(v) } (\mathscr {F}(f) \circ \mathscr {F}(g))(Z) \xrightarrow { \mu _{f,g}(Z)} \mathscr {F}(g \circ f)(Z);$

here $\mu _{f,g}$ denotes the composition constraint for the lax functor $\mathscr {F}$. Invoking Example 5.1.4.19 again, we conclude that $(g,v) \circ (f,u)$ is locally $U$-cartesian if and only if $\mu _{f,g}(Z)$ is an isomorphism. Allowing $f$, $g$, and $Z$ to vary (and invoking the criterion of Proposition 5.1.4.24), we conclude that $U$ is a cartesian fibration if and only if each of the composition constraints $\mu _{f,g}$ is an isomorphism: that is, if and only if the lax functor $\mathscr {F}$ is a functor. $\square$