Lemma 38.33.7. Let $S$ be a Noetherian scheme. Let $U$ be a scheme of finite type and separated over $S$. Let $U = U_1 \cup U_2$ be opens such that $U_1$ and $U_2$ have compactifications over $S$ and such that $U_1 \cap U_2$ is dense in $U$. Then $U$ has a compactification over $S$.

Proof. Choose a compactification $U_ i \subset X_ i$ for $i = 1, 2$. We may assume $U_ i$ is scheme theoretically dense in $X_ i$. We may assume there is an open $V_ i \subset X_ i$ and a proper morphism $\psi _ i : V_ i \to U$ extending $\text{id} : U_ i \to U_ i$, see Lemma 38.33.6. Picture

$\xymatrix{ U_ i \ar[r] \ar[d] & V_ i \ar[r] \ar[dl]^{\psi _ i} & X_ i \\ U }$

If $\{ i, j\} = \{ 1, 2\}$ denote $Z_ i = U \setminus U_ j = U_ i \setminus (U_1 \cap U_2)$ and $Z_ j = U \setminus U_ i = U_ j \setminus (U_1 \cap U_2)$. Thus we have

$U = U_1 \amalg Z_2 = Z_1 \amalg U_2 = Z_1 \amalg (U_1 \cap U_2) \amalg Z_2$

Denote $Z_{i, i} \subset V_ i$ the inverse image of $Z_ i$ under $\psi _ i$. Observe that $\psi _ i$ is an isomorphism over an open neighbourhood of $Z_ i$. Denote $Z_{i, j} \subset V_ i$ the inverse image of $Z_ j$ under $\psi _ i$. Observe that $\psi _ i : Z_{i, j} \to Z_ j$ is a proper morphism. Since $Z_ i$ and $Z_ j$ are disjoint closed subsets of $U$, we see that $Z_{i, i}$ and $Z_{i, j}$ are disjoint closed subsets of $V_ i$.

Denote $\overline{Z}_{i, i}$ and $\overline{Z}_{i, j}$ the closures of $Z_{i, i}$ and $Z_{i, j}$ in $X_ i$. After replacing $X_ i$ by a $V_ i$-admissible blowup we may assume that $\overline{Z}_{i, i}$ and $\overline{Z}_{i, j}$ are disjoint, see Lemma 38.33.2. We assume this holds for both $X_1$ and $X_2$. Observe that this property is preserved if we replace $X_ i$ by a further $V_ i$-admissible blowup.

Set $V_{12} = V_1 \times _ U V_2$. We have an immersion $V_{12} \to X_1 \times _ S X_2$ which is the composition of the closed immersion $V_{12} = V_1 \times _ U V_2 \to V_1 \times _ S V_2$ (Schemes, Lemma 26.21.9) and the open immersion $V_1 \times _ S V_2 \to X_1 \times _ S X_2$. Let $X_{12} \subset X_1 \times _ S X_2$ be the scheme theoretic image of $V_{12} \to X_1 \times _ S X_2$. The projection morphisms

$p_1 : X_{12} \to X_1 \quad \text{and}\quad p_2 : X_{12} \to X_2$

are proper as $X_1$ and $X_2$ are proper over $S$. If we replace $X_1$ by a $V_1$-admissible blowing up, then $X_{12}$ is replaced by the strict transform with respect to this blowing up, see Lemma 38.33.5.

Denote $\psi : V_{12} \to U$ the compositions $\psi = \psi _1 \circ p_1|_{V_{12}} = \psi _2 \circ p_2|_{V_{12}}$. Consider the closed subscheme

$Z_{12, 2} = (p_1|_{V_{12}})^{-1}(Z_{1, 2}) = (p_2|_{V_{12}})^{-1}(Z_{2, 2}) = \psi ^{-1}(Z_2) \subset V_{12}$

The morphism $p_1|_{V_{12}} : V_{12} \to V_1$ is an isomorphism over an open neighbourhood of $Z_{1, 2}$ because $\psi _2 : V_2 \to U$ is an isomorphism over an open neighbourhood of $Z_2$ and $V_{12} = V_1 \times _ U V_2$. By Lemma 38.33.3 there exists a $V_1$-admissible blowing up $X_1' \to X_1$ such that the strict tranform $p'_1 : X'_{12} \to X'_1$ of $p_1$ is an isomorphism over an open neighbourhood of the closure of $Z_{1, 2}$ in $X'_1$. After replacing $X_1$ by $X'_1$ and $X_{12}$ by $X'_{12}$ we may assume that $p_1$ is an isomorphism over an open neighbourhood of $\overline{Z}_{1, 2}$.

The reduction of the previous paragraph tells us that

$X_{12} \cap (\overline{Z}_{1, 2} \times _ S \overline{Z}_{2, 1}) = \emptyset$

where the intersection taken in $X_1 \times _ S X_2$. Namely, the inverse image $p_1^{-1}(\overline{Z}_{1, 2})$ in $X_{12}$ maps isomorphically to $\overline{Z}_{1, 2}$. In particular, we see that $Z_{12, 2}$ is dense in $p_1^{-1}(\overline{Z}_{1, 2})$. Thus $p_2$ maps $p_1^{-1}(\overline{Z}_{1, 2})$ into $\overline{Z}_{2, 2}$. Since $\overline{Z}_{2, 2} \cap \overline{Z}_{2, 1} = \emptyset$ we conclude.

Consider the schemes

$W_ i = U \coprod \nolimits _{U_ i} (X_ i \setminus \overline{Z}_{i, j}), \quad i = 1, 2$

obtained by glueing. Let us apply Lemma 38.33.1 to see that $W_ i \to S$ is separated. First, $U \to S$ and $X_ i \to S$ are separated. The immersion $U_ i \to U \times _ S (X_ i \setminus \overline{Z}_{i, j})$ is closed because any specialization $u_ i \leadsto u$ with $u_ i \in U_ i$ and $u \in U \setminus U_ i$ can be lifted uniquely to a specialization $u_ i \leadsto v_ i$ in $V_ i$ along the proper morphism $\psi _ i : V_ i \to U$ and then $v_ i$ must be in $Z_{i, j}$. Thus the image of the immersion is closed, whence the immersion is a closed immersion.

On the other hand, for any valuation ring $A$ over $S$ with fraction field $K$ and any morphism $\gamma : \mathop{\mathrm{Spec}}(K) \to (U_1 \cap U_2)$ over $S$, there is an $i$ and an extension of $\gamma$ to a morphism $h_ i : \mathop{\mathrm{Spec}}(A) \to W_ i$. Namely, for both $i = 1, 2$ there is a morphism $g_ i : \mathop{\mathrm{Spec}}(A) \to X_ i$ extending $\gamma$ by the valuative criterion of properness for $X_ i$ over $S$, see Morphisms, Lemma 29.42.1. Thus we only are in trouble if $g_ i(\mathfrak m_ A) \in \overline{Z}_{i, j}$ for $i = 1, 2$. This is impossible by the emptyness of the intersection of $X_{12}$ and $\overline{Z}_{1, 2} \times _ S \overline{Z}_{2, 1}$ we proved above.

Consider a diagram

$\xymatrix{ W_1' \ar[d] \ar[r] & W & W_2' \ar[l] \ar[d] \\ W_1 & U \ar[l] \ar[lu] \ar[u] \ar[ru] \ar[r] & W_2 }$

as in Lemma 38.33.4. By the previous paragraph for every solid diagram

$\xymatrix{ \mathop{\mathrm{Spec}}(K) \ar[r]_\gamma \ar[d] & W \ar[d] \\ \mathop{\mathrm{Spec}}(A) \ar@{..>}[ru] \ar[r] & S }$

where $\mathop{\mathrm{Im}}(\gamma ) \subset U_1 \cap U_2$ there is an $i$ and an extension $h_ i : \mathop{\mathrm{Spec}}(A) \to W_ i$ of $\gamma$. Using the valuative criterion of properness for $W'_ i \to W_ i$, we can then lift $h_ i$ to $h'_ i : \mathop{\mathrm{Spec}}(A) \to W'_ i$. Hence the dotted arrow in the diagram exists. Since $W$ is separated over $S$, we see that the arrow is unique as well. This implies that $W \to S$ is universally closed by Morphisms, Lemma 29.42.2. As $W \to S$ is already of finite type and separated, we win. $\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).