Kerodon

$\Newextarrow{\xRightarrow}{5,5}{0x21D2}$ $\newcommand\empty{}$
$\Newextarrow{\xhookrightarrow}{10,10}{0x21AA}$

Corollary 5.6.1.16. Let $\operatorname{\mathcal{C}}$ be a category. If $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}$ is a functor of $2$-categories, then the forgetful functor $U: \int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a cocartesian fibration of categories. If $\mathscr {F}: \operatorname{\mathcal{C}}^{\operatorname{op}} \rightarrow \mathbf{Cat}$ is a functor of $2$-categories, then the forgetful functor $\int ^{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$ is a cartesian fibration of categories.

Proof. We will prove the first assertion; the second follows by a similar argument. Let $(C,X)$ be an object of the category $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$ and let $f: C \rightarrow D$ be a morphism in $\operatorname{\mathcal{C}}$; we wish to show that $f$ can be lifted to a $U$-cocartesian morphism $(f,u): (C,X) \rightarrow (D,Y)$ of $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$. This follows immediately from the criterion of Proposition 5.6.1.15: for example, we can take $Y = \mathscr {F}(f)(X)$ and $u$ to be the identity morphism. $\square$