Proposition 6.5.1. Let \(f\colon C \to D\) be a functor. Then \(f\) is a cartesian fibration if and only if, for every object \(x\) of \(C\) and every morphism \(v\colon y\to f(x)\) in \(D\), there exists an \(f\)-cartesian lift \(u\colon\tilde{y}\to x\) of \(v\). Dually, \(f\) is a cocartesian fibration if and only if every morphism \(v\colon f(x)\to y\) admits an \(f\)-cocartesian lift with source \(x\).
Proof
The forward implication follows from the dual of Lemma 4.5.7. For the converse, write \(F\colon \Fun([1],C) \to D \vectimes{f} C\) for the directed evaluation map \(\vec{\ev}^f_1\). By Theorem 6.2.1, it suffices to show that, for every object \((v,x)\) of \(D \vectimes{f} C\), the relative slice \(\Fun([1],C)_{/(v,x)}\) admits a terminal object.
Work with the universal object \((v,x)\) in context \((D\vectimes{f}C)^{\simeq}\). An object of this relative slice consists of a morphism \(a\colon z_0\to z_1\) in \(C\), morphisms \(\beta\colon f(z_0)\to y\) and \(\gamma\colon z_1\to x\), and an identification \[ v\beta = f(\gamma)f(a). \] Choose an \(f\)-cartesian lift \(u\colon \tilde{y}\to x\) of \(v\). The specified identification \(F(u) = (v,x)\) defines an object of the relative slice. A morphism from the object above to this chosen object amounts to a morphism \(\delta\colon z_0\to\tilde{y}\) satisfying \[ u\delta = \gamma a \qquadtext{and}\qquad f(\delta) = \beta, \] compatibly with the displayed identification. Since \(u\) is \(f\)-cartesian, the defining pullback square applied to \(z_0\) says precisely that the anima of such choices of \(\delta\) is contractible. Hence the chosen object is terminal. We conclude that \(F\) admits a right adjoint. By the refined form of Theorem 6.2.1 recorded in Remark 6.2.2, these chosen terminal objects assemble into a right adjoint \(G\) of \(F\) whose counit at \((v,x)\) is the specified identification \(F(u) = (v,x)\). Hence the counit is a natural isomorphism, so \(G\) is a right adjoint section of \(F\). Therefore \(f\) is a cartesian fibration. The cocartesian statement is dual.
From Section 6.5, Pointwise and fiberwise criteria for fibrations.