Lemma 76.49.5. Consider a commutative diagram

$\xymatrix{ X \ar[rr]_ f \ar[rd]_ p & & Y \ar[ld]^ q \\ & Z }$

of algebraic spaces. Assume that

1. $p$ is locally of finite presentation,

2. $p$ is flat,

3. $p$ is closed,

4. $q$ is locally of finite type, and

5. $q$ is closed.

Then there exists an open subspace $W \subset Z$ such that a morphism $Z' \to Z$ factors through $W$ if and only if the base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is surjective and flat.

Proof. By Lemma 76.49.4 we may assume that $f$ is flat. Note that $f$ is locally of finite presentation by Morphisms of Spaces, Lemma 67.28.9. Hence $f$ is open, see Morphisms of Spaces, Lemma 67.30.6. Let $W \subset Z$ be the open subspace (see Properties of Spaces, Lemma 66.4.8) with underlying set of points

$|W| = |Z| \setminus |q|\left(|Y| \setminus |f|(|X|)\right).$

in other words for $z \in |Z|$ we have $z \in |W|$ if and only if the whole fibre of $|Y| \to |Z|$ over $z$ is in the image of $|X| \to |Y|$. Since $q$ is closed this set is open in $|Z|$. The morphism $X_ W \to Y_ W$ is surjective by construction. Finally, suppose that $X_{Z'} \to Y_{Z'}$ is surjective. In order to show that $Z' \to Z$ factors through $W$ it suffices to show that $|Z'| \to |Z|$ has image contained in $|W|$, see Properties of Spaces, Lemma 66.4.9. Hence it suffices to prove the result when $Z'$ is the spectrum of a field. Denote $z \in |Z|$ the image of $|Z'| \to |Z|$. By Properties of Spaces, Lemma 66.4.3 in the commutative diagram

$\xymatrix{ |X_{Z'}| \ar[d] \ar[r] & |Y_{Z'}| \ar[d] \\ |p|^{-1}(\{ z\} ) \ar[r] & |q|^{-1}(\{ z\} ) }$

the vertical arrows are surjective. It follows that $z \in |W|$ as desired. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).