Lemma 15.1.8. Let \(p\colon E \to C\) be a functor, and consider a commutative square \begin {equation*}

Commutative square with maps X' to X labeled r', Y' to Y labeled r, X' to Y' labeled l', X to Y labeled l.
\end {equation*} in \(E\) where \(l\) is a \(p\)-cartesian morphism. Assume that the image of this square in \(C\) is a pullback square. Then this square is a pullback square if and only if the morphism \(l'\) is \(p\)-cartesian.

Proof. Consider for any object \(Z \in E\) the following two diagrams:

Commutative diagram involving \Hom E(Z,X'), \Hom E(Z, X), \Hom C(pZ,pX), \Hom E(Z,Y'), \Hom E(Z,Y), \Hom C(pZ,pY), with arrows labeled r' circ -, l' circ -, l circ -, p, pl circ -, r circ -.
Commutative diagram involving \Hom E(Z,X'), \Hom C(pZ, pX'), \Hom C(pZ,pX), \Hom E(Z,Y'), \Hom C(pZ,pY'), \Hom C(pZ,pY), with arrows labeled p, l' circ -, pl' circ -, pr' circ -, pl circ -, pr circ -.

The right-hand squares of both diagrams are pullback squares: for the first one since \(l\) is \(p\)-cartesian, for the second one since the image of the given square in \(C\) is a pullback square. As the functor \(p\) preserves composition, the outer rectangles of both diagrams agree, so by the pasting law the left-hand square in the first diagram is a pullback square if and only if the left-hand square in the second diagram is a pullback square. Since the former holds for all \(Z\) if and only if the given diagram is a pullback square and the latter holds for all \(Z\) if and only if \(l'\) is \(p\)-cartesian, this finishes the proof. β–‘