I am working on exercise II.4.8 in Hartshorne, and am stuck on part (e). The problem asks to show that a property of morphisms of schemes ($\mathscr{P}$) such that
- a closed immersion has $\mathscr{P}$
- a composition of two morphisms having $\mathscr{P}$ has $\mathscr{P}$
- $\mathscr{P}$ is stable under base extension
satisfies the following:
if $f : X \to Y$ and $g : Y \to Z$ are two morphisms, and if $g \circ f$ has $\mathscr{P}$ and $g$ is separated, then $f$ has $\mathscr{P}$.
There is a hint in Hartshorne that says to note that the graph morphism $\Gamma_f : X \to X \times_Z Y$ is obtained by base extension from the diagonal morphism $\Delta : Y \to Y \times_Z Y$. I really don't see how this is the case, could anyone help me out?
We'll show that the following diagram is a pullback square: $$\require{AMScd} \begin{CD} X @>{\Gamma_f}>> X\times_Z Y\\ @V{f}VV @VV{f\times id_Y}V \\ Y @>{\Delta_{Y/Z}}>> Y\times_Z Y \end{CD}$$
Let $T$ be a test object with maps $\phi:T\to Y$ and $\psi:T\to X\times_Z Y$ so that $\Delta_{Y/Z}\circ \phi = (f\times id_Y)\circ \psi$. Let $\pi_1:X\times_Z Y\to X$ be the projection map from the definition of the fiber product. I claim that $\pi_1\circ\psi:T\to X$ makes the diagram commute and is the only map $T\to X$ which does so.
Writing $\pi_1':Y\times_ZY\to Y$ for the projection on to the first factor, we have $\pi_1'\circ\Delta_{Y/Z}=id_Y$ and $\pi_1'\circ(f\times id_Y)=f\circ\pi_1$, so $\pi_1'\circ\Delta_{Y/Z}\circ\phi=\phi$ and $\pi_1'\circ(f\times id_Y)\circ\psi=f\circ \pi_1\circ\psi$, giving $\phi = f\circ \pi_1\circ\psi$, which shows that the triangle consisting of $T,X,Y$ commutes when $T\to X$ is defined by $\pi_1\circ\psi$.
We also get that the triangle consisting of $T,X,X\times_ZY$ commutes and forces $T\to X$ to be $\pi_1\circ\psi$: since $\pi_1\circ\Gamma_f = id_X$, we have $\pi_1\circ\Gamma_f\circ\pi_1\circ\psi=\pi_1\circ\psi$. This shows that our diagram commutes iff $T\to X$ is $\pi_1\circ\psi$, proving the universal property of pullbacks.