Proposition 44.2.6. Let $X \to S$ be a morphism of schemes. Let $d \geq 0$. Assume for all $(s, x_1, \ldots , x_ d)$ where $s \in S$ and $x_1, \ldots , x_ d \in X_ s$ there exists an affine open $U \subset X$ with $x_1, \ldots , x_ d \in U$. Then $\mathrm{Hilb}^ d_{X/S}$ is representable by a scheme.

Proof. Either using relative glueing (Constructions, Section 27.2) or using the functorial point of view (Schemes, Lemma 26.15.4) we reduce to the case where $S$ is affine. Details omitted.

Assume $S$ is affine. For $U \subset X$ affine open, denote $F_ U \subset \mathrm{Hilb}^ d_{X/S}$ the subfunctor such that for a scheme $T/S$ an element $Z \in \mathrm{Hilb}^ d_{X/S}(T)$ is in $F_ U(T)$ if and only if $Z \subset U_ T$. We will use Schemes, Lemma 26.15.4 and the subfunctors $F_ U$ to conclude.

Condition (1) is Lemma 44.2.1.

Condition (2)(a) follows from the fact that $F_ U = \mathrm{Hilb}^ d_{U/S}$ and that this is representable by Lemma 44.2.5. Namely, if $Z \in F_ U(T)$, then $Z$ can be viewed as a closed subscheme of $U_ T$ which is finite locally free of degree $d$ over $T$ and hence $Z \in \mathrm{Hilb}^ d_{U/S}(T)$. Conversely, if $Z \in \mathrm{Hilb}^ d_{U/S}(T)$ then $Z \to U_ T \to X_ T$ is a closed immersion1 and we may view $Z$ as an element of $F_ U(T)$.

Let $Z \in \mathrm{Hilb}^ d_{X/S}(T)$ for some scheme $T$ over $S$. Let

$B = (Z \to T)\left((Z \to X_ T \to X)^{-1}(X \setminus U)\right)$

This is a closed subset of $T$ and it is clear that over the open $T_{Z, U} = T \setminus B$ the restriction $Z_{t'}$ maps into $U_{T'}$. On the other hand, for any $b \in B$ the fibre $Z_ b$ does not map into $U$. Thus we see that given a morphism $T' \to T$ we have $Z_{T'} \in F_ U(T')$ $\Leftrightarrow$ $T' \to T$ factors through the open $T_{Z, U}$. This proves condition (2)(b).

Condition (2)(c) follows from our assumption on $X/S$. All we have to do is show the following: If $T$ is the spectrum of a field and $Z \subset X_ T$ is a closed subscheme, finite flat of degree $d$ over $T$, then $Z \to X_ T \to X$ factors through an affine open $U$ of $X$. This is clear because $Z$ will have at most $d$ points and these will all map into the fibre of $X$ over the image point of $T \to S$. $\square$

[1] This is clear if $X \to S$ is separated as in this case Morphisms, Lemma 29.41.7 tells us that the immersion $\varphi : Z \to X_ T$ has closed image and hence is a closed immersion by Schemes, Lemma 26.10.4. We suggest the reader skip the rest of this footnote as we don't know of any instance where the assumptions on $X \to S$ hold but $X \to S$ is not separated. In the general case, let $x \in X_ T$ be a point in the closure of $\varphi (Z)$. We have to show that $x \in \varphi (Z)$. Let $t \in T$ be the image of $x$. By assumption on $X \to S$ we can choose an affine open $W \subset X_ T$ containing $x$ and $\varphi (Z_ t)$. Then $\varphi ^{-1}(W)$ is an open containing the whole fibre $Z_ t$ and since $Z \to T$ is closed, we may after replacing $T$ by an open neighbourhood of $t$ assume that $Z = \varphi ^{-1}(W)$. Then $\varphi (Z) \subset W$ is closed by the separated case (as $W \to T$ is separated) and we conclude $x \in \varphi (Z)$.

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).