Construction 8.7.5. Given \(S\) as above, we now construct a functor \[ \Un\colon \Fun(S,\Cat) \to \Cat_{/S}. \] The intended assignment is simple: a functor \(S\to\Cat\) is sent to the small cocartesian fibration that it classifies, and a natural transformation is sent to the corresponding cocartesian functor. To assemble these assignments into a functor, we work uniformly in an arbitrary parameter category \(B\).

Given a category \(B\) and a functor \(\Phi\colon B\to\Fun(S,\Cat)\), we may uncurry \(\Phi\) into a functor of the form \[ F\colon B \times S \to \Cat \] and then consider the small cocartesian fibration classified by \(F\): \[ p\colon E \to B \times S\, . \] Observe that the projection map \(\pr_B\colon B \times S \to B\) sits in a pullback square of the form Commutative diagram; see the PDF for its LaTeX source and hence \(\pr_B\) is a small cocartesian fibration classified by the constant functor \(\const_s\colon B \to \Cat\). Since \(\Cat\) is a regular universe, the composite \(q := \pr_B \circ p\colon E \to B\) is a small cocartesian fibration as well, thus classified by some functor \(e\colon B \to \Cat\).

We may regard the functor \(p\colon E \to B \times S\) as a functor over \(B\) in this way, and it follows from Lemma 4.7.7 that \(p\) is a cocartesian functor over \(B\). By directed univalence of \(\Cat\), more specifically by Theorem 8.3.15, it follows that \(p\) corresponds to a natural transformation \(e \to \const_s\) of functors \(B \to \Cat\). But by Lemma 4.3.2 such a natural transformation precisely corresponds to a functor \[ \Un(\Phi)\colon B \to \Cat_{/S} \] of the desired form. Consider now \(B=\Fun(S,\Cat)\) and the identity of \(B\). The previous construction applied to the identity of \(\Fun(S,\Cat)\) defines a functor of the desired type: \[ \Un\colon \Fun(S,\Cat) \to \Cat_{/S}\, . \]

From Section 8.7, Straightening/unstraightening.