# The Stacks Project

## Tag 0ATT

### 46.16. Compactifications

We interrupt the flow of the arguments for a little bit of geometry.

Let $S$ be a quasi-compact and quasi-separated scheme. We will say a scheme $X$ over $S$ has a compactification over $S$ or is compactifyable over $S$ if there exists an open immersion $X \to \overline{X}$ into a scheme $\overline{X}$ proper over $S$. If $X$ has a compactification over $S$, then $X \to S$ is separated and of finite type. It is a theorem of Nagata (see [Lutkebohmert], [Conrad-Nagata], [Nagata-1], [Nagata-2], [Nagata-3], and [Nagata-4]) that the converse is true as well (we will give a precise statement and a proof if we ever need this result).

Let $S$ be a quasi-compact and quasi-separated scheme. Let $X$ be a scheme over $S$. The category of compactifications of $X$ over $S$ is the category whose objects are open immersions $j : X \to \overline{X}$ over $S$ with $\overline{X} \to S$ proper and whose morphisms $(j' : X' \to \overline{X}') \to (j : X \to \overline{X})$ are morphisms $f : \overline{X}' \to \overline{X}$ of schemes over $S$ such that $f \circ j' = j$.

Lemma 46.16.1. Let $S$ be a quasi-compact and quasi-separated scheme. Let $X$ be a compactifyable scheme over $S$. The category of compactifications of $X$ over $S$ is cofiltered.

Proof. We have to check conditions (1), (2), (3) of Categories, Definition 4.20.1. Condition (1) holds exactly because we assumed that $X$ is compactifyable. Let $j_i : X \to \overline{X}_i$, $i = 1, 2$ be two compactifications. Then we can consider the scheme theoretic closure $\overline{X}$ of $(j_1, j_2) : X \to \overline{X}_1 \times_S \overline{X}_2$. This determines a third compactification $j : X \to \overline{X}$ which dominates both $j_i$: $$\xymatrix{ (X, \overline{X}_1) & (X, \overline{X}) \ar[l] \ar[r] & (X, \overline{X}_2) }$$ Thus (2) holds. Let $f_1, f_2 : \overline{X}_1 \to \overline{X}_2$ be two morphisms between compactifications $j_i : X \to \overline{X}_i$, $i = 1, 2$. Let $\overline{X} \subset \overline{X}_1$ be the equalizer of $f_1$ and $f_2$. As $\overline{X}_2 \to S$ is separated, we see that $\overline{X}$ is a closed subscheme of $\overline{X}_1$ and hence proper over $S$. Moreover, we obtain an open immersion $X \to \overline{X}$ because $f_1|_X = f_2|_X = \text{id}_X$. The morphism $(X \to \overline{X}) \to (j_1 : X \to \overline{X}_1)$ given by the closed immersion $\overline{X} \to \overline{X}_1$ equalizes $f_1$ and $f_2$ which proves condition (3) and finishes the proof. $\square$

We can also consider the category of all compactifications (for varying $X$). It turns out that this category, localized at the set of morphisms which induce an isomorphism on the interior is equivalent to the category of compactifyable schemes over $S$.

Lemma 46.16.2. Let $S$ be a quasi-compact and quasi-separated scheme. Let $f : X \to Y$ be a morphism of schemes over $S$ with $Y$ separated and of finite type over $S$ and $X$ compactifyable over $S$. Then $X$ has a compactification over $Y$.

Proof. Let $f : X \to Y$ be a morphism of schemes over $S$ with $Y$ separated and of finite type over $S$. Let $j : X \to \overline{X}$ be a compactification of $X$ over $S$. Then we let $\overline{X}'$ be the scheme theoretic image of $(j, f) : X \to \overline{X} \times_S Y$. The morphism $\overline{X}' \to Y$ is proper because $\overline{X} \times_S Y \to Y$ is proper as a base change of $\overline{X} \to S$. On the other hand, since $Y$ is separated over $S$, the morphism $(1, f) : X \to X \times_S Y$ is a closed immersion (Schemes, Lemma 25.21.11) and hence $X \to \overline{X}'$ is an open immersion. $\square$

Let $S$ be a quasi-compact and quasi-separated scheme. We define the category of compactifications to be the category whose objects are pairs $(X, \overline{X})$ where $\overline{X}$ is a scheme proper over $S$ and $X \subset \overline{X}$ is a quasi-compact open and whose morphisms are commutative diagrams $$\xymatrix{ X \ar[d] \ar[r]_f & Y \ar[d] \\ \overline{X} \ar[r]^{\overline{f}} & \overline{Y} }$$ of morphisms of schemes over $S$.

Lemma 46.16.3. Let $S$ be a quasi-compact and quasi-separated scheme. The collection of morphisms $(u, \overline{u}) : (X', \overline{X}') \to (X, \overline{X})$ such that $u$ is an isomorphism forms a right multiplicative system (Categories, Definition 4.26.1) of arrows in the category of compactifications.

Proof. Axiom RMS1 is trivial to verify. Let us check RMS2 holds. Suppose given a diagram $$\xymatrix{ & (X', \overline{X}') \ar[d]_{(u, \overline{u})} \\ (Y, \overline{Y}) \ar[r]^{(f, \overline{f})} & (X, \overline{X}) }$$ with $u : X' \to X$ an isomorphism. Then we let $Y' = Y \times_X X'$ with the projection map $v : Y' \to Y$ (an isomorphism). We also set $\overline{Y}' = \overline{Y} \times_{\overline{X}} \overline{X}'$ with the projection map $\overline{v} : \overline{Y}' \to \overline{Y}$ It is clear that $Y' \to \overline{Y}'$ is an open immersion. The diagram $$\xymatrix{ (Y', \overline{Y}') \ar[r]_{(g, \overline{g})} \ar[d]_{(v, \overline{v})} & (X', \overline{X}') \ar[d]_{(u, \overline{u})} \\ (Y, \overline{Y}) \ar[r]^{(f, \overline{f})} & (X, \overline{X}) }$$ shows that axiom RMS2 holds.

Let us check RMS3 holds. Suppose given a pair of morphisms $(f, \overline{f}), (g, \overline{g}) : (X, \overline{X}) \to (Y, \overline{Y})$ of compactifications and a morphism $(v, \overline{v}) : (Y, \overline{Y}) \to (Y', \overline{Y}')$ such that $v$ is an isomorphism and such that $(v, \overline{v}) \circ (f, \overline{f}) = (v, \overline{v}) \circ (g, \overline{g})$. Then $f = g$. Hence if we let $\overline{X}' \subset \overline{X}$ be the equalizer of $\overline{f}$ and $\overline{g}$, then $(u, \overline{u}) : (X, \overline{X}') \to (X, \overline{X})$ will be a morphism of the category of compactifications such that $(f, \overline{f}) \circ (u, \overline{u}) = (g, \overline{g}) \circ (u, \overline{u})$ as desired. $\square$

Lemma 46.16.4. Let $S$ be a quasi-compact and quasi-separated scheme. The functor $(X, \overline{X}) \mapsto X$ defines an equivalence from the category of compactifications localized (Categories, Lemma 4.26.11) at the right multiplicative system of Lemma 46.16.3 to the category of compactifyable schemes over $S$.

Proof. Denote $\mathcal{C}$ the category of compactifications and denote $Q : \mathcal{C} \to \mathcal{C}'$ the localization functor of Categories, Lemma 4.26.16. Denote $\mathcal{D}$ the category of compactifyable schemes over $S$. It is clear from the lemma just cited and our choice of multiplicative system that we obtain a functor $\mathcal{C}' \to \mathcal{D}$. This functor is clearly essentially surjective. If $f : X \to Y$ is a morphism of compactifyable schemes, then we choose an open immersion $Y \to \overline{Y}$ into a scheme proper over $S$, and then we choose an embedding $X \to \overline{X}$ into a scheme $\overline{X}$ proper over $\overline{Y}$ (possible by Lemma 46.16.2 applied to $X \to \overline{Y}$). This gives a morphism $(X, \overline{X}) \to (Y, \overline{Y})$ of compactifications which produces our given morphism $X \to Y$. Finally, suppose given a pair of morphisms in the localized category with the same source and target: say $$a = ((f, \overline{f}) : (X', \overline{X}') \to (Y, \overline{Y}), (u, \overline{u}) : (X', \overline{X}') \to (X, \overline{X}))$$ and $$b = ((g, \overline{g}) : (X'', \overline{X}'') \to (Y, \overline{Y}), (v, \overline{v}) : (X'', \overline{X}'') \to (X, \overline{X}))$$ which produce the same morphism $X \to Y$ over $S$, in other words $f \circ u^{-1} = g \circ v^{-1}$. By Categories, Lemma 4.26.13 we may assume that $(X', \overline{X}') = (X'', \overline{X}'')$ and $(u, \overline{u}) = (v, \overline{v})$. In this case we can consider the equalizer $\overline{X}''' \subset \overline{X}'$ of $\overline{f}$ and $\overline{g}$. The morphism $(w, \overline{w}) : (X', \overline{X}''') \to (X', \overline{X}')$ is in the multiplicative subset and we see that $a = b$ in the localized category by precomposing with $(w, \overline{w})$. $\square$

The code snippet corresponding to this tag is a part of the file duality.tex and is located in lines 3519–3734 (see updates for more information).

\section{Compactifications}
\label{section-compactify}

\noindent
We interrupt the flow of the arguments for a little bit of geometry.

\medskip\noindent
Let $S$ be a quasi-compact and quasi-separated scheme. We will say a
scheme $X$ over $S$ {\it has a compactification over $S$}
or {\it is compactifyable over $S$} if there exists
an open immersion $X \to \overline{X}$ into a scheme $\overline{X}$
proper over $S$. If $X$ has a compactification over $S$, then $X \to S$
is separated and of finite type. It is a theorem of Nagata (see
\cite{Nagata-2}, \cite{Nagata-3}, and \cite{Nagata-4}) that the converse is
true as well (we will give a
precise statement and a proof if we ever need this result).

\medskip\noindent
Let $S$ be a quasi-compact and quasi-separated scheme.
Let $X$ be a scheme over $S$. The category
of {\it compactifications of $X$ over $S$} is the category whose
objects are open immersions $j : X \to \overline{X}$ over $S$ with
$\overline{X} \to S$ proper and whose morphisms
$(j' : X' \to \overline{X}') \to (j : X \to \overline{X})$
are morphisms $f : \overline{X}' \to \overline{X}$ of schemes over $S$
such that $f \circ j' = j$.

\begin{lemma}
\label{lemma-compactifications-cofiltered}
Let $S$ be a quasi-compact and quasi-separated scheme.
Let $X$ be a compactifyable scheme over $S$.
The category of compactifications of $X$ over $S$ is
cofiltered.
\end{lemma}

\begin{proof}
We have to check conditions (1), (2), (3) of
Categories, Definition \ref{categories-definition-codirected}.
Condition (1) holds exactly because we assumed that $X$
is compactifyable.
Let $j_i : X \to \overline{X}_i$, $i = 1, 2$ be two compactifications.
Then we can consider the scheme theoretic closure $\overline{X}$
of $(j_1, j_2) : X \to \overline{X}_1 \times_S \overline{X}_2$.
This determines a third compactification $j : X \to \overline{X}$
which dominates both $j_i$:
$$\xymatrix{ (X, \overline{X}_1) & (X, \overline{X}) \ar[l] \ar[r] & (X, \overline{X}_2) }$$
Thus (2) holds. Let $f_1, f_2 : \overline{X}_1 \to \overline{X}_2$
be two morphisms between compactifications
$j_i : X \to \overline{X}_i$, $i = 1, 2$.
Let $\overline{X} \subset \overline{X}_1$ be the equalizer of
$f_1$ and $f_2$. As $\overline{X}_2 \to S$ is separated, we see
that $\overline{X}$ is a closed subscheme of $\overline{X}_1$
and hence proper over $S$. Moreover, we obtain an
open immersion $X \to \overline{X}$ because $f_1|_X = f_2|_X = \text{id}_X$.
The morphism $(X \to \overline{X}) \to (j_1 : X \to \overline{X}_1)$
given by the closed immersion $\overline{X} \to \overline{X}_1$
equalizes $f_1$ and $f_2$ which proves condition (3) and
finishes the proof.
\end{proof}

\noindent
We can also consider the category of all compactifications (for varying $X$).
It turns out that this category, localized at the set of morphisms
which induce an isomorphism on the interior
is equivalent to the category of compactifyable schemes over $S$.

\begin{lemma}
\label{lemma-compactifyable}
Let $S$ be a quasi-compact and quasi-separated scheme. Let $f : X \to Y$
be a morphism of schemes over $S$ with $Y$ separated and of finite type
over $S$ and $X$ compactifyable over $S$. Then $X$ has a compactification
over $Y$.
\end{lemma}

\begin{proof}
Let $f : X \to Y$ be a morphism of schemes over $S$ with $Y$ separated
and of finite type over $S$. Let $j : X \to \overline{X}$ be a
compactification of $X$ over $S$. Then we let $\overline{X}'$ be
the scheme theoretic image of $(j, f) : X \to \overline{X} \times_S Y$.
The morphism $\overline{X}' \to Y$ is proper because
$\overline{X} \times_S Y \to Y$ is proper as a base change of
$\overline{X} \to S$. On the other hand, since $Y$ is separated
over $S$, the morphism $(1, f) : X \to X \times_S Y$ is a closed
immersion (Schemes, Lemma \ref{schemes-lemma-semi-diagonal})
and hence $X \to \overline{X}'$ is an open immersion.
\end{proof}

\noindent
Let $S$ be a quasi-compact and quasi-separated scheme.
We define the {\it category of compactifications} to be the category
whose objects are pairs $(X, \overline{X})$ where $\overline{X}$
is a scheme proper over $S$ and $X \subset \overline{X}$ is a
quasi-compact open and whose morphisms
are commutative diagrams
$$\xymatrix{ X \ar[d] \ar[r]_f & Y \ar[d] \\ \overline{X} \ar[r]^{\overline{f}} & \overline{Y} }$$
of morphisms of schemes over $S$.

\begin{lemma}
\label{lemma-right-multiplicative-system}
Let $S$ be a quasi-compact and quasi-separated scheme.
The collection of morphisms
$(u, \overline{u}) : (X', \overline{X}') \to (X, \overline{X})$
such that $u$ is an isomorphism forms a right multiplicative system
(Categories, Definition \ref{categories-definition-multiplicative-system})
of arrows in the category of compactifications.
\end{lemma}

\begin{proof}
Axiom RMS1 is trivial to verify. Let us check RMS2 holds.
Suppose given a diagram
$$\xymatrix{ & (X', \overline{X}') \ar[d]_{(u, \overline{u})} \\ (Y, \overline{Y}) \ar[r]^{(f, \overline{f})} & (X, \overline{X}) }$$
with $u : X' \to X$ an isomorphism. Then we let $Y' = Y \times_X X'$
with the projection map $v : Y' \to Y$ (an isomorphism). We also
set $\overline{Y}' = \overline{Y} \times_{\overline{X}} \overline{X}'$
with the projection map $\overline{v} : \overline{Y}' \to \overline{Y}$
It is clear that $Y' \to \overline{Y}'$ is an open immersion.
The diagram
$$\xymatrix{ (Y', \overline{Y}') \ar[r]_{(g, \overline{g})} \ar[d]_{(v, \overline{v})} & (X', \overline{X}') \ar[d]_{(u, \overline{u})} \\ (Y, \overline{Y}) \ar[r]^{(f, \overline{f})} & (X, \overline{X}) }$$
shows that axiom RMS2 holds.

\medskip\noindent
Let us check RMS3 holds. Suppose given a pair of morphisms
$(f, \overline{f}), (g, \overline{g}) : (X, \overline{X}) \to (Y, \overline{Y})$
of compactifications and a morphism
$(v, \overline{v}) : (Y, \overline{Y}) \to (Y', \overline{Y}')$
such that $v$ is an isomorphism and such that
$(v, \overline{v}) \circ (f, \overline{f}) = (v, \overline{v}) \circ (g, \overline{g})$. Then $f = g$.
Hence if we let $\overline{X}' \subset \overline{X}$
be the equalizer of $\overline{f}$ and $\overline{g}$,
then $(u, \overline{u}) : (X, \overline{X}') \to (X, \overline{X})$
will be a morphism of the category of compactifications
such that $(f, \overline{f}) \circ (u, \overline{u}) = (g, \overline{g}) \circ (u, \overline{u})$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-invert-right-multiplicative-system}
Let $S$ be a quasi-compact and quasi-separated scheme.
The functor $(X, \overline{X}) \mapsto X$ defines an
equivalence from the category of compactifications localized
(Categories, Lemma \ref{categories-lemma-right-localization})
at the right
multiplicative system of Lemma \ref{lemma-right-multiplicative-system}
to the category of compactifyable schemes over $S$.
\end{lemma}

\begin{proof}
Denote $\mathcal{C}$ the category of compactifications and
denote $Q : \mathcal{C} \to \mathcal{C}'$ the localization
functor of Categories, Lemma
\ref{categories-lemma-properties-right-localization}.
Denote $\mathcal{D}$ the category of compactifyable schemes
over $S$. It is clear from the lemma just cited and our
choice of multiplicative system that we
obtain a functor $\mathcal{C}' \to \mathcal{D}$.
This functor is clearly essentially surjective.
If $f : X \to Y$ is a morphism of compactifyable
schemes, then we choose an open immersion $Y \to \overline{Y}$
into a scheme proper over $S$, and then we choose an embedding
$X \to \overline{X}$ into a scheme $\overline{X}$ proper over
$\overline{Y}$ (possible by Lemma \ref{lemma-compactifyable}
applied to $X \to \overline{Y}$). This gives a morphism
$(X, \overline{X}) \to (Y, \overline{Y})$ of compactifications
which produces our given morphism $X \to Y$.
Finally, suppose given a pair of morphisms in the
localized category with the same source and target: say
$$a = ((f, \overline{f}) : (X', \overline{X}') \to (Y, \overline{Y}), (u, \overline{u}) : (X', \overline{X}') \to (X, \overline{X}))$$
and
$$b = ((g, \overline{g}) : (X'', \overline{X}'') \to (Y, \overline{Y}), (v, \overline{v}) : (X'', \overline{X}'') \to (X, \overline{X}))$$
which produce the same morphism $X \to Y$ over $S$, in other words
$f \circ u^{-1} = g \circ v^{-1}$. By
Categories, Lemma \ref{categories-lemma-morphisms-right-localization}
we may assume that $(X', \overline{X}') = (X'', \overline{X}'')$
and $(u, \overline{u}) = (v, \overline{v})$. In this case we
can consider the equalizer $\overline{X}''' \subset \overline{X}'$
of $\overline{f}$ and $\overline{g}$. The morphism
$(w, \overline{w}) : (X', \overline{X}''') \to (X', \overline{X}')$ is in
the multiplicative subset and we see that $a = b$ in the localized
category by precomposing with $(w, \overline{w})$.
\end{proof}

Comment #2064 by Hu Fei on June 13, 2016 a 2:55 pm UTC

There are some typos before in the definition of the category of compactifications of $X$. It should be ...whose morphisms $(j' : X \to \overline{X}') \to (j : X \to \overline{X})$ are morphisms $f : \overline{X}' \to \overline{X}$ such that $f \circ j' = j$.'' Another thing: it seems thatcompactifyable scheme'' has not be exactly defined. I have to guess it means a scheme can be compactified. Although this is straightforward, but it would be better if give its definition after the definition of compactification. (I was checking duality theorem which involves the schemes of this kind).

Comment #2065 by Hu Fei on June 13, 2016 a 2:59 pm UTC

There are some typos in the definition of the category of compactifications of $X$. It should be ...whose morphisms $(j' : X \to \overline{X}') \to (j : X \to \overline{X})$ are morphisms $f : \overline{X}' \to \overline{X}$ such that $f \circ j' = j$.'' Another thing: it seems thatcompactifyable scheme'' has not be exactly defined. I have to guess it means a scheme can be compactified. Although this is straightforward, but it would be better if give its definition after the definition of compactification. (I was checking duality theorem which involves the schemes of this kind). Is it compactifiable''?

Comment #2093 by Johan (site) on June 16, 2016 a 3:22 pm UTC

Thanks, fixed here.

Comment #2996 by Ko Aoki on November 14, 2017 a 10:36 am UTC

The second paragraph says "If X has a compactification over S, then X→S is separated and of finite type," but it seems to be incorrect without a qc assumption for $X \to \overline{X}$.

## Add a comment on tag 0ATT

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 lower-right corner).