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

Corollary (Grothendieck). Let $U: \operatorname{\mathcal{E}}\rightarrow \operatorname{\mathcal{C}}$ be functor between categories. The following conditions are equivalent:


The functor $U$ is a cocartesian fibration and each fiber of $U$ is a small category.


There exists a functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}$ and an isomorphism $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{E}}$ whose composition with $U$ coincides with the forgetful functor $\int _{\operatorname{\mathcal{C}}} \mathscr {F} \rightarrow \operatorname{\mathcal{C}}$.

Proof. We will show that $(1) \Rightarrow (2)$; the reverse implication follows from Corollary Note that the map $\operatorname{N}_{\bullet }(U): \operatorname{N}_{\bullet }(\operatorname{\mathcal{E}}) \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$ is a cocartesian fibration of simplicial sets (Example and an inner covering map (Proposition By virtue of Proposition, there exists a morphism of simplicial sets $\mathscr {F}': \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}}) \rightarrow \operatorname{N}_{\bullet }^{\operatorname{D}}( \operatorname{Pith}( \mathbf{Cat}) )$ and an isomorphism of simplicial sets $V: \int _{\operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})} \mathscr {F} \simeq \operatorname{N}_{\bullet }(\operatorname{\mathcal{E}})$ which is compatible with $\operatorname{N}_{\bullet }(U)$. By virtue of Theorem (and Corollary, we have $\mathscr {F}' = \operatorname{N}_{\bullet }^{\operatorname{D}}( \mathscr {F} )$ for a unique functor of $2$-categories $\mathscr {F}: \operatorname{\mathcal{C}}\rightarrow \mathbf{Cat}$. In this case, we can use Proposition to identify $\int _{ \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})} \mathscr {F}'$ with the nerve of the ordinary category of elements $\int _{\operatorname{\mathcal{C}}} \mathscr {F}$. Under this identification, $V$ corresponds to the nerve of an isomorphism $\int _{\operatorname{\mathcal{C}}} \mathscr {F}' \simeq \operatorname{\mathcal{E}}$ which is compatible with $U$. $\square$