## 80.14 Compactifications

This section is the analogue of More on Flatness, Section 38.33. The theorem in this section is the main theorem in [CLO].

Let $B$ be a quasi-compact and quasi-separated algebraic space over some base scheme $S$. We will say an algebraic space $X$ over $B$ has a compactification over $B$ or is compactifyable over $B$ if there exists a quasi-compact open immersion $X \to \overline{X}$ into an algebraic space $\overline{X}$ proper over $B$. If $X$ has a compactification over $B$, then $X \to B$ is separated and of finite type. The main theorem of this section is that the converse is true as well.

Lemma 80.14.1. Let $S$ be a scheme. Let $X \to Y$ be a morphism of algebraic spaces over $S$. If $(U \subset X, f : V \to X)$ is an elementary distinguished square such that $U \to Y$ and $V \to Y$ are separated and $U \times _ X V \to U \times _ Y V$ is closed, then $X \to Y$ is separated.

Proof. We have to check that $\Delta : X \to X \times _ Y X$ is a closed immersion. There is an étale covering of $X \times _ Y X$ given by the four parts $U \times _ Y U$, $U \times _ Y V$, $V \times _ Y U$, and $V \times _ Y V$. Observe that $(U \times _ Y U) \times _{(X \times _ Y X), \Delta } X = U$, $(U \times _ Y V) \times _{(X \times _ Y X), \Delta } X = U \times _ X V$, $(V \times _ Y U) \times _{(X \times _ Y X), \Delta } X = V \times _ X U$, and $(V \times _ Y V) \times _{(X \times _ Y X), \Delta } X = V$. Thus the assumptions of the lemma exactly tell us that $\Delta$ is a closed immersion. $\square$

Lemma 80.14.2. Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$. Let $U \subset X$ be a quasi-compact open.

1. If $Z_1, Z_2 \subset X$ are closed subspaces of finite presentation such that $Z_1 \cap Z_2 \cap U = \emptyset$, then there exists a $U$-admissible blowing up $X' \to X$ such that the strict transforms of $Z_1$ and $Z_2$ are disjoint.

2. If $T_1, T_2 \subset |U|$ are disjoint constructible closed subsets, then there is a $U$-admissible blowing up $X' \to X$ such that the closures of $T_1$ and $T_2$ are disjoint.

Proof. Proof of (1). The assumption that $Z_ i \to X$ is of finite presentation signifies that the quasi-coherent ideal sheaf $\mathcal{I}_ i$ of $Z_ i$ is of finite type, see Morphisms of Spaces, Lemma 66.28.12. Denote $Z \subset X$ the closed subspace cut out by the product $\mathcal{I}_1 \mathcal{I}_2$. Observe that $Z \cap U$ is the disjoint union of $Z_1 \cap U$ and $Z_2 \cap U$. By Divisors on Spaces, Lemma 70.19.5 there is a $U \cap Z$-admissible blowup $Z' \to Z$ such that the strict transforms of $Z_1$ and $Z_2$ are disjoint. Denote $Y \subset Z$ the center of this blowing up. Then $Y \to X$ is a closed immersion of finite presentation as the composition of $Y \to Z$ and $Z \to X$ (Divisors on Spaces, Definition 70.19.1 and Morphisms of Spaces, Lemma 66.28.2). Thus the blowing up $X' \to X$ of $Y$ is a $U$-admissible blowing up. By general properties of strict transforms, the strict transform of $Z_1, Z_2$ with respect to $X' \to X$ is the same as the strict transform of $Z_1, Z_2$ with respect to $Z' \to Z$, see Divisors on Spaces, Lemma 70.18.3. Thus (1) is proved.

Proof of (2). By Limits of Spaces, Lemma 69.14.1 there exists a finite type quasi-coherent sheaf of ideals $\mathcal{J}_ i \subset \mathcal{O}_ U$ such that $T_ i = V(\mathcal{J}_ i)$ (set theoretically). By Limits of Spaces, Lemma 69.9.8 there exists a finite type quasi-coherent sheaf of ideals $\mathcal{I}_ i \subset \mathcal{O}_ X$ whose restriction to $U$ is $\mathcal{J}_ i$. Apply the result of part (1) to the closed subspaces $Z_ i = V(\mathcal{I}_ i)$ to conclude. $\square$

Lemma 80.14.3. Let $S$ be a scheme. Let $f : X \to Y$ be a proper morphism of quasi-compact and quasi-separated algebraic spaces over $S$. Let $V \subset Y$ be a quasi-compact open and $U = f^{-1}(V)$. Let $T \subset |V|$ be a closed subset such that $f|_ U : U \to V$ is an isomorphism over an open neighbourhood of $T$ in $V$. Then there exists a $V$-admissible blowing up $Y' \to Y$ such that the strict transform $f' : X' \to Y'$ of $f$ is an isomorphism over an open neighbourhood of the closure of $T$ in $|Y'|$.

Proof. Let $T' \subset |V|$ be the complement of the maximal open over which $f|_ U$ is an isomorphism. Then $T', T$ are closed in $|V|$ and $T \cap T' = \emptyset$. Since $|V|$ is a spectral topological space (Properties of Spaces, Lemma 65.15.2) we can find constructible closed subsets $T_ c, T'_ c$ of $|V|$ with $T \subset T_ c$, $T' \subset T'_ c$ such that $T_ c \cap T'_ c = \emptyset$ (choose a quasi-compact open $W$ of $|V|$ containing $T'$ not meeting $T$ and set $T_ c = |V| \setminus W$, then choose a quasi-compact open $W'$ of $|V|$ containing $T_ c$ not meeting $T'$ and set $T'_ c = |V| \setminus W'$). By Lemma 80.14.2 we may, after replacing $Y$ by a $V$-admissible blowing up, assume that $T_ c$ and $T'_ c$ have disjoint closures in $|Y|$. Let $Y_0$ be the open subspace of $Y$ corresponding to the open $|Y| \setminus \overline{T}'_ c$ and set $V_0 = V \cap Y_0$, $U_0 = U \times _ V V_0$, and $X_0 = X \times _ Y Y_0$. Since $U_0 \to V_0$ is an isomorphism, we can find a $V_0$-admissible blowing up $Y'_0 \to Y_0$ such that the strict transform $X'_0$ of $X_0$ maps isomorphically to $Y'_0$, see More on Morphisms of Spaces, Lemma 75.39.4. By Divisors on Spaces, Lemma 70.19.3 there exists a $V$-admissible blow up $Y' \to Y$ whose restriction to $Y_0$ is $Y'_0 \to Y_0$. If $f' : X' \to Y'$ denotes the strict transform of $f$, then we see what we want is true because $f'$ restricts to an isomorphism over $Y'_0$. $\square$

Lemma 80.14.4. Let $S$ be a scheme. Consider a diagram

$\xymatrix{ X \ar[d]_ f & U \ar[l] \ar[d]_{f|_ U} & A \ar[d] \ar[l] \\ Y & V \ar[l] & B \ar[l] }$

of quasi-compact and quasi-separated algebraic spaces over $S$. Assume

1. $f$ is proper,

2. $V$ is a quasi-compact open of $Y$, $U = f^{-1}(V)$,

3. $B \subset V$ and $A \subset U$ are closed subspaces,

4. $f|_ A : A \to B$ is an isomorphism, and $f$ is étale at every point of $A$.

Then there exists a $V$-admissible blowing up $Y' \to Y$ such that the strict transform $f' : X' \to Y'$ satisfies: for every geometric point $\overline{a}$ of the closure of $|A|$ in $|X'|$ there exists a quotient $\mathcal{O}_{X', \overline{a}} \to \mathcal{O}$ such that $\mathcal{O}_{Y', f'(\overline{a})} \to \mathcal{O}$ is finite flat.

As you can see from the proof, more is true, but the statement is already long enough and this will be sufficient later on.

Proof. Let $T' \subset |U|$ be the complement of the maximal open on which $f|_ U$ is étale. Then $T'$ is closed in $|U|$ and disjoint from $|A|$. Since $|U|$ is a spectral topological space (Properties of Spaces, Lemma 65.15.2) we can find constructible closed subsets $T_ c, T'_ c$ of $|U|$ with $|A| \subset T_ c$, $T' \subset T'_ c$ such that $T_ c \cap T'_ c = \emptyset$ (see proof of Lemma 80.14.3). By Lemma 80.14.2 there is a $U$-admissible blowing up $X_1 \to X$ such that $T_ c$ and $T'_ c$ have disjoint closures in $|X_1|$. Let $X_{1, 0}$ be the open subspace of $X_1$ corresponding to the open $|X_1| \setminus \overline{T}'_ c$ and set $U_0 = U \cap X_{1, 0}$. Observe that the scheme theoretic image $\overline{A}_1 \subset X_1$ of $A$ is contained in $X_{1, 0}$ by construction.

After replacing $Y$ by a $V$-admissible blowing up and taking strict transforms, we may assume $X_{1, 0} \to Y$ is flat, quasi-finite, and of finite presentation, see More on Morphisms of Spaces, Lemmas 75.39.1 and 75.37.3. Consider the commutative diagram

$\vcenter { \xymatrix{ X_1 \ar[rr] \ar[rd] & & X \ar[ld] \\ & Y } } \quad \text{and the diagram}\quad \vcenter { \xymatrix{ \overline{A}_1 \ar[rr] \ar[rd] & & \overline{A} \ar[ld] \\ & \overline{B} } }$

of scheme theoretic images. The morphism $\overline{A}_1 \to \overline{A}$ is surjective because it is proper and hence the scheme theoretic image of $\overline{A}_1 \to \overline{A}$ must be equal to $\overline{A}$ and then we can use Morphisms of Spaces, Lemma 66.40.8. The statement on étale local rings follows by choosing a lift of the geometric point $\overline{a}$ to a geometric point $\overline{a}_1$ of $\overline{A}_1$ and setting $\mathcal{O} = \mathcal{O}_{X_1, \overline{a}_1}$. Namely, since $X_1 \to Y$ is flat and quasi-finite on $X_{1, 0} \supset \overline{A}_1$, the map $\mathcal{O}_{Y', f'(\overline{a})} \to \mathcal{O}_{X_1, \overline{a}_1}$ is finite flat, see Algebra, Lemmas 10.156.3 and 10.153.3. $\square$

Lemma 80.14.5. Let $S$ be a scheme. Let $X \to B$ and $Y \to B$ be morphisms of algebraic spaces over $S$. Let $U \subset X$ be an open subspace. Let $V \to X \times _ B Y$ be a quasi-compact morphism whose composition with the first projection maps into $U$. Let $Z \subset X \times _ B Y$ be the scheme theoretic image of $V \to X \times _ B Y$. Let $X' \to X$ be a $U$-admissible blowup. Then the scheme theoretic image of $V \to X' \times _ B Y$ is the strict transform of $Z$ with respect to the blowing up.

Proof. Denote $Z' \to Z$ the strict transform. The morphism $Z' \to X'$ induces a morphism $Z' \to X' \times _ B Y$ which is a closed immersion (as $Z'$ is a closed subspace of $X' \times _ X Z$ by definition). Thus to finish the proof it suffices to show that the scheme theoretic image $Z''$ of $V \to Z'$ is $Z'$. Observe that $Z'' \subset Z'$ is a closed subspace such that $V \to Z'$ factors through $Z''$. Since both $V \to X \times _ B Y$ and $V \to X' \times _ B Y$ are quasi-compact (for the latter this follows from Morphisms of Spaces, Lemma 66.8.9 and the fact that $X' \times _ B Y \to X \times _ B Y$ is separated as a base change of a proper morphism), by Morphisms of Spaces, Lemma 66.16.3 we see that $Z \cap (U \times _ B Y) = Z'' \cap (U \times _ B Y)$. Thus the inclusion morphism $Z'' \to Z'$ is an isomorphism away from the exceptional divisor $E$ of $Z' \to Z$. However, the structure sheaf of $Z'$ does not have any nonzero sections supported on $E$ (by definition of strict transforms) and we conclude that the surjection $\mathcal{O}_{Z'} \to \mathcal{O}_{Z''}$ must be an isomorphism. $\square$

Lemma 80.14.6. Let $S$ be a scheme. Let $B$ be a quasi-compact and quasi-separated algebraic space over $S$. Let $U$ be an algebraic space of finite type and separated over $B$. Let $V \to U$ be an étale morphism. If $V$ has a compactification $V \subset Y$ over $B$, then there exists a $V$-admissible blowing up $Y' \to Y$ and an open $V \subset V' \subset Y'$ such that $V \to U$ extends to a proper morphism $V' \to U$.

Proof. Consider the scheme theoretic image $Z \subset Y \times _ B U$ of the “diagonal” morphism $V \to Y \times _ B U$. If we replace $Y$ by a $V$-admissible blowing up, then $Z$ is replaced by the strict transform with respect to this blowing up, see Lemma 80.14.5. Hence by More on Morphisms of Spaces, Lemma 75.39.4 we may assume $Z \to Y$ is an open immersion. If $V' \subset Y$ denotes the image, then we see that the induced morphism $V' \to U$ is proper because the projection $Y \times _ B U \to U$ is proper and $V' \cong Z$ is a closed subspace of $Y \times _ B U$. $\square$

The following lemma is formulated for finite type separated algebraic spaces over a finite type algebraic space over $\mathbf{Z}$. The version for quasi-compact and quasi-separated algebraic spaces is true as well (with essentially the same proof), but will be trivially implied by the main theorem in this section. We strongly urge the reader to read the proof of this lemma in the case of schemes first.

Lemma 80.14.7. Let $B$ be an algebraic space of finite type over $\mathbf{Z}$. Let $U$ be an algebraic space of finite type and separated over $B$. Let $(U_2 \subset U, f : U_1 \to U)$ be an elementary distinguished square. Assume $U_1$ and $U_2$ have compactifications over $B$ and $U_1 \times _ U U_2 \to U$ has dense image. Then $U$ has a compactification over $B$.

Proof. Choose a compactification $U_ i \subset X_ i$ over $B$ 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 $U_ i \to U$, see Lemma 80.14.6. Picture

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

Denote $Z_1 \subset U$ the reduced closed subspace corresponding to the closed subset $|U| \setminus |U_2|$. Recall that $f^{-1}Z_1$ is a closed subspace of $U_1$ mapping isomorphically to $Z_1$. Denote $Z_2 \subset U$ the reduced closed subspace corresponding to the closed subset $|U| \setminus \mathop{\mathrm{Im}}(|f|) = |U_2| \setminus \mathop{\mathrm{Im}}(|U_1 \times _ U U_2| \to |U_2|)$. Thus we have

$U = U_2 \amalg Z_1 = Z_2 \amalg \mathop{\mathrm{Im}}(f) = Z_2 \amalg \mathop{\mathrm{Im}}(U_1 \times _ U U_2 \to U_2) \amalg Z_1$

set theoretically. Denote $Z_{i, i} \subset V_ i$ the inverse image of $Z_ i$ under $\psi _ i$. Observe that $\psi _2$ is an isomorphism over an open neighbourhood of $Z_2$. Observe that $Z_{1, 1} = \psi _1^{-1}Z_1 = f^{-1}Z_1 \amalg T$ for some closed subspace $T \subset V_1$ disjoint from $f^{-1}Z_1$ and furthermore $\psi _1$ is étale along $f^{-1}Z_1$. 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 subspaces of $U$, we see that $Z_{i, i}$ and $Z_{i, j}$ are disjoint closed subspaces of $V_ i$.

Denote $\overline{Z}_{i, i}$ and $\overline{Z}_{i, j}$ the scheme theoretic images of $Z_{i, i}$ and $Z_{i, j}$ in $X_ i$. We recall that $|Z_{i, j}|$ is dense in $|\overline{Z}_{i, j}|$, see Morphisms of Spaces, Lemma 66.17.7. 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 80.14.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. Hence we may replace $X_1$ by another $V_1$-admissible blowup and assume $|\overline{Z}_{1, 1}|$ is the disjoint union of the closures of $|T|$ and $|f^{-1}Z_1|$ in $|X_1|$.

Set $V_{12} = V_1 \times _ U V_2$. We have an immersion $V_{12} \to X_1 \times _ B X_2$ which is the composition of the closed immersion $V_{12} = V_1 \times _ U V_2 \to V_1 \times _ B V_2$ (Morphisms of Spaces, Lemma 66.4.5) and the open immersion $V_1 \times _ B V_2 \to X_1 \times _ B X_2$. Let $X_{12} \subset X_1 \times _ B X_2$ be the scheme theoretic image of $V_{12} \to X_1 \times _ B 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 $B$. 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 80.14.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 subspace

$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 80.14.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 result of the previous paragraph tells us that

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

where the intersection taken in $X_1 \times _ B 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.

It turns out that we need to do one additional blowing up before we can conclude the argument. Namely, let $V_2 \subset W_2 \subset X_2$ be the open subspace with underlying topological space

$|W_2| = |V_2| \cup (|X_2| \setminus |\overline{Z}_{2, 1}|) = |X_2| \setminus \left(|\overline{Z}_{2, 1}| \setminus |Z_{2, 1}|\right)$

Since $p_2(p_1^{-1}\overline{Z}_{1, 2})$ is contained in $W_2$ (see above) we see that replacing $X_2$ by a $W_2$-admissible blowup and $X_{21}$ by the corresponding strict transform will preserve the property of $p_1$ being an isomorphism over an open neighbourhood of $\overline{Z}_{1, 2}$. Since $\overline{Z}_{2, 1} \cap W_2 = \overline{Z}_{2, 1} \cap V_2 = Z_{2, 1}$ we see that $Z_{2, 1}$ is a closed subspace of $W_2$ and $V_2$. Observe that $V_{12} = V_1 \times _ U V_2 = p_1^{-1}(V_1) = p_2^{-1}(V_2)$ as open subspaces of $X_{12}$ as it is the largest open subspace of $X_{12}$ over which the morphism $\psi : V_{12} \to U$ extends; details omitted1. We have the following equalities of closed subspaces of $V_{12}$:

$p_2^{-1}Z_{2, 1} = p_2^{-1} \psi _2^{-1} Z_1 = p_1^{-1} \psi _1^{-1} Z_1= p_1^{-1}Z_{1, 1} = p_1^{-1}f^{-1}Z_1 \amalg p_1^{-1}T$

Here and below we use the slight abuse of notation of writing $p_2$ in stead of the restriction of $p_2$ to $V_{12}$, etc. Since $p_2^{-1}(Z_{2, 1})$ is a closed subspace of $p_2^{-1}(W_2)$ as $Z_{2, 1}$ is a closed subspace of $W_2$ we conclude that also $p_1^{-1}f^{-1}Z_1$ is a closed subspace of $p_2^{-1}(W_2)$. Finally, the morphism $p_2 : X_{12} \to X_2$ is étale at points of $p_1^{-1}f^{-1}Z_1$ as $\psi _1$ is étale along $f^{-1}Z_1$ and $V_{12} = V_1 \times _ U V_2$. Thus we may apply Lemma 80.14.4 to the morphism $p_2 : X_{12} \to X_2$, the open $W_2$, the closed subspace $Z_{2, 1} \subset W_2$, and the closed subspace $p_1^{-1}f^{-1}Z_1 \subset p_2^{-1}(W_2)$. Hence after replacing $X_2$ by a $W_2$-admissible blowup and $X_{12}$ by the corresponding strict transform, we obtain for every geometric point $\overline{y}$ of the closure of $|p_1^{-1}f^{-1}Z_1|$ a local ring map $\mathcal{O}_{X_{12}, \overline{y}} \to \mathcal{O}$ such that $\mathcal{O}_{X_2, p_2(\overline{y})} \to \mathcal{O}$ is finite flat.

Consider the algebraic space

$W_2 = U \coprod \nolimits _{U_2} (X_2 \setminus \overline{Z}_{2, 1}),$

and with $T \subset V_1$ as in the first paragraph the algebraic space

$W_1 = U \coprod \nolimits _{U_1} (X_1 \setminus \overline{Z}_{1, 2} \cup \overline{T}),$

obtained by pushout, see Lemma 80.9.2. Let us apply Lemma 80.14.1 to see that $W_ i \to B$ is separated. First, $U \to B$ and $X_ i \to B$ are separated. Let us check the quasi-compact immersion $U_ i \to U \times _ B (X_ i \setminus \overline{Z}_{i, j})$ is closed using the valuative criterion, see Morphisms of Spaces, Lemma 66.42.1. Choose a valuation ring $A$ over $B$ with fraction field $K$ and compatible morphisms $(u, x_ i) : \mathop{\mathrm{Spec}}(A) \to U \times _ B X_ i$ and $u_ i : \mathop{\mathrm{Spec}}(K) \to U_ i$. Since $\psi _ i$ is proper, we can find a unique $v_ i : \mathop{\mathrm{Spec}}(A) \to V_ i$ compatible with $u$ and $u_ i$. Since $X_ i$ is proper over $B$ we see that $x_ i = v_ i$. If $v_ i$ does not factor through $U_ i \subset V_ i$, then we conclude that $x_ i$ maps the closed point of $\mathop{\mathrm{Spec}}(A)$ into $Z_{i, j}$ or $T$ when $i = 1$. This finishes the proof because we removed $\overline{Z}_{i, j}$ and $\overline{T}$ in the construction of $W_ i$.

On the other hand, for any valuation ring $A$ over $B$ with fraction field $K$ and any morphism

$\gamma : \mathop{\mathrm{Spec}}(K) \to \mathop{\mathrm{Im}}(U_1 \times _ U U_2 \to U)$

over $B$, we claim that after replacing $A$ by an extension of valuation rings, there is an $i$ and an extension of $\gamma$ to a morphism $h_ i : \mathop{\mathrm{Spec}}(A) \to W_ i$. Namely, we first extend $\gamma$ to a morphism $g_2 : \mathop{\mathrm{Spec}}(A) \to X_2$ using the valuative criterion of properness. If the image of $g_2$ does not meet $\overline{Z}_{2, 1}$, then we obtain our morphism into $W_2$. Otherwise, denote $\overline{z} \in \overline{Z}_{2, 1}$ a geometric point lying over the image of the closed point under $g_2$. We may lift this to a geometric point $\overline{y}$ of $X_{12}$ in the closure of $|p_1^{-1}f^{-1}Z_1|$ because the map of spaces $|p_1^{-1}f^{-1}Z_1| \to |\overline{Z}_{2, 1}|$ is closed with image containing the dense open $|Z_{2, 1}|$. After replacing $A$ by its strict henselization (More on Algebra, Lemma 15.123.5) we get the following diagram

$\xymatrix{ A \ar@{..>}[rr] & & A' \\ \mathcal{O}_{X_2, \overline{z}} \ar[r] \ar[u] & \mathcal{O}_{X_{12}, \overline{y}} \ar[r] & \mathcal{O} \ar@{..>}[u] }$

where $\mathcal{O}_{X_{12}, \overline{y}} \to \mathcal{O}$ is the map we found in the 5th paragraph of the proof. Since the horizontal composition is finite and flat we can find an extension of valuation rings $A'/A$ and dotted arrow making the diagram commute. After replacing $A$ by $A'$ this means that we obtain a lift $g_{12} : \mathop{\mathrm{Spec}}(A) \to X_{12}$ whose closed point maps into the closure of $|p_1^{-1}f^{-1}Z_1|$. Then $g_1 = p_1 \circ g_{12} : \mathop{\mathrm{Spec}}(A) \to X_1$ is a morphism whose closed point maps into the closure of $|f^{-1}Z_1|$. Since the closure of $|f^{-1}Z_1|$ is disjoint from the closure of $|T|$ and contained in $|\overline{Z}_{1, 1}|$ which is disjoint from $|\overline{Z}_{1, 2}|$ we conclude that $g_1$ defines a morphism $h_1 : \mathop{\mathrm{Spec}}(A) \to W_1$ as desired.

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 More on Morphisms of Spaces, Lemma 75.40.1. 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] & B }$

where $\mathop{\mathrm{Im}}(\gamma ) \subset \mathop{\mathrm{Im}}(U_1 \times _ U U_2 \to U)$ there is an $i$ and an extension $h_ i : \mathop{\mathrm{Spec}}(A) \to W_ i$ of $\gamma$ after possibly replacing $A$ by an extension of valuation rings. 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 after possibly extending $A$. Since $W$ is separated over $B$, we see that the choice of extension isn't needed and the arrow is unique as well, see Morphisms of Spaces, Lemmas 66.41.5 and 66.43.1. Then finally the existence of the dotted arrow implies that $W \to B$ is universally closed by Morphisms of Spaces, Lemma 66.42.5. As $W \to B$ is already of finite type and separated, we win. $\square$

Lemma 80.14.8. Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$. Let $U \subset X$ be a proper dense open subspace. Then there exists an affine scheme $V$ and an étale morphism $V \to X$ such that

1. the open subspace $W = U \cup \mathop{\mathrm{Im}}(V \to X)$ is strictly larger than $U$,

2. $(U \subset W, V \to W)$ is a distinguished square, and

3. $U \times _ W V \to U$ has dense image.

Proof. Choose a stratification

$\emptyset = U_{n + 1} \subset U_ n \subset U_{n - 1} \subset \ldots \subset U_1 = X$

and morphisms $f_ p : V_ p \to U_ p$ as in Decent Spaces, Lemma 67.8.6. Let $p$ be the smallest integer such that $U_ p \not\subset U$ (this is possible as $U \not= X$). Choose an affine open $V \subset V_ p$ such that the étale morphism $f_ p|_ V : V \to X$ does not factor through $U$. Consider the open $W = U \cup \mathop{\mathrm{Im}}(V \to X)$ and the reduced closed subspace $Z \subset W$ with $|Z| = |W| \setminus |U|$. Then $f^{-1}Z \to Z$ is an isomorphism because we have the corresponding property for the morphism $f_ p$, see the lemma cited above. Thus $(U \subset W, f : V \to W)$ is a distinguished square. It may not be true that the open $I = \mathop{\mathrm{Im}}(U \times _ W V \to U)$ is dense in $U$. The algebraic space $U' \subset U$ whose underlying set is $|U| \setminus \overline{|I|}$ is Noetherian and hence we can find a dense open subscheme $U'' \subset U'$, see for example Properties of Spaces, Proposition 65.13.3. Then we can find a dense open affine $U''' \subset U''$, see Properties, Lemmas 28.5.7 and 28.29.1. After we replace $f$ by $V \amalg U''' \to X$ everything is clear. $\square$

Theorem 80.14.9. Let $S$ be a scheme. Let $B$ be a quasi-compact and quasi-separated algebraic space over $S$. Let $X \to B$ be a separated, finite type morphism. Then $X$ has a compactification over $B$.

Proof. We first reduce to the Noetherian case. We strongly urge the reader to skip this paragraph. First, we may replace $S$ by $\mathop{\mathrm{Spec}}(\mathbf{Z})$. See Spaces, Section 64.16 and Properties of Spaces, Definition 65.3.1. There exists a closed immersion $X \to X'$ with $X' \to B$ of finite presentation and separated. See Limits of Spaces, Proposition 69.11.7. If we find a compactification of $X'$ over $B$, then taking the scheme theoretic closure of $X$ in this will give a compactification of $X$ over $B$. Thus we may assume $X \to B$ is separated and of finite presentation. We may write $B = \mathop{\mathrm{lim}}\nolimits B_ i$ as a directed limit of a system of Noetherian algebraic spaces of finite type over $\mathop{\mathrm{Spec}}(\mathbf{Z})$ with affine transition morphisms. See Limits of Spaces, Proposition 69.8.1. We can choose an $i$ and a morphism $X_ i \to B_ i$ of finite presentation whose base change to $B$ is $X \to B$, see Limits of Spaces, Lemma 69.7.1. After increasing $i$ we may assume $X_ i \to B_ i$ is separated, see Limits of Spaces, Lemma 69.6.9. If we can find a compactification of $X_ i$ over $B_ i$, then the base change of this to $B$ will be a compactification of $X$ over $B$. This reduces us to the case discussed in the next paragraph.

Assume $B$ is of finite type over $\mathbf{Z}$ in addition to being quasi-compact and quasi-separated. Let $U \to X$ be an étale morphism of algebraic spaces such that $U$ has a compactification $Y$ over $\mathop{\mathrm{Spec}}(\mathbf{Z})$. The morphism

$U \longrightarrow B \times _{\mathop{\mathrm{Spec}}(\mathbf{Z})} Y$

is separated and quasi-finite by Morphisms of Spaces, Lemma 66.27.10 (the displayed morphism factors into an immersion hence is a monomorphism). Hence by Zariski's main theorem (More on Morphisms of Spaces, Lemma 75.34.3) there is an open immersion of $U$ into an algebraic space $Y'$ finite over $B \times _{\mathop{\mathrm{Spec}}(\mathbf{Z})} Y$. Then $Y' \to B$ is proper as the composition $Y' \to B \times _{\mathop{\mathrm{Spec}}(\mathbf{Z})} Y \to B$ of two proper morphisms (use Morphisms of Spaces, Lemmas 66.45.9, 66.40.4, and 66.40.3). We conclude that $U$ has a compactification over $B$.

There is a dense open subspace $U \subset X$ which is a scheme. (Properties of Spaces, Proposition 65.13.3). In fact, we may choose $U$ to be an affine scheme (Properties, Lemmas 28.5.7 and 28.29.1). Thus $U$ has a compactification over $\mathop{\mathrm{Spec}}(\mathbf{Z})$; this is easily shown directly but also follows from the theorem for schemes, see More on Flatness, Theorem 38.33.8. By the previous paragraph $U$ has a compactification over $B$. By Noetherian induction we can find a maximal dense open subspace $U \subset X$ which has a compactification over $B$. We will show that the assumption that $U \not= X$ leads to a contradiction. Namely, by Lemma 80.14.8 we can find a strictly larger open $U \subset W \subset X$ and a distinguished square $(U \subset W, f : V \to W)$ with $V$ affine and $U \times _ W V$ dense image in $U$. Since $V$ is affine, as before it has a compactification over $B$. Hence Lemma 80.14.7 applies to show that $W$ has a compactification over $B$ which is the desired contradiction. $\square$

 Namely, $V_1 \times _ U V_2$ is proper over $U$ so if $\psi$ extends to a larger open of $X_{12}$, then $V_1 \times _ U V_2$ would be closed in this open by Morphisms of Spaces, Lemma 66.40.6. Then we get equality as $V_{12} \subset X_{12}$ is dense.

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