Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
\input{preamble}
% OK, start here.
%
\begin{document}
\title{Morphisms of Schemes}
\maketitle
\phantomsection
\label{section-phantom}
\tableofcontents
\section{Introduction}
\label{section-introduction}
\noindent
In this chapter we introduce some types of morphisms of schemes.
A basic reference is \cite{EGA}.
\section{Closed immersions}
\label{section-closed-immersions}
\noindent
In this section we elucidate some of the results obtained previously on closed
immersions of schemes. Recall that a morphism of schemes $i : Z \to X$
is defined to be a closed immersion if (a) $i$ induces a homeomorphism onto
a closed subset of $X$, (b) $i^\sharp : \mathcal{O}_X \to i_*\mathcal{O}_Z$
is surjective, and (c) the kernel of $i^\sharp$ is locally generated by
sections, see Schemes, Definitions \ref{schemes-definition-immersion}
and \ref{schemes-definition-closed-immersion-locally-ringed-spaces}. It turns
out that, given that $Z$ and $X$ are schemes, there are many different
ways of characterizing a closed immersion.
\begin{lemma}
\label{lemma-closed-immersion}
Let $i : Z \to X$ be a morphism of schemes.
The following are equivalent:
\begin{enumerate}
\item The morphism $i$ is a closed immersion.
\item For every affine open $\Spec(R) = U \subset X$,
there exists an ideal $I \subset R$ such that
$i^{-1}(U) = \Spec(R/I)$ as schemes over $U = \Spec(R)$.
\item There exists an affine open covering $X = \bigcup_{j \in J} U_j$,
$U_j = \Spec(R_j)$ and for every $j \in J$ there exists
an ideal $I_j \subset R_j$ such that
$i^{-1}(U_j) = \Spec(R_j/I_j)$ as schemes over $U_j = \Spec(R_j)$.
\item The morphism $i$ induces a homeomorphism of $Z$ with a closed subset
of $X$ and $i^\sharp : \mathcal{O}_X \to i_*\mathcal{O}_Z$ is surjective.
\item The morphism $i$ induces a homeomorphism of $Z$ with a closed subset
of $X$, the map $i^\sharp : \mathcal{O}_X \to i_*\mathcal{O}_Z$ is surjective,
and the kernel $\Ker(i^\sharp)\subset \mathcal{O}_X$ is a quasi-coherent
sheaf of ideals.
\item The morphism $i$ induces a homeomorphism of $Z$ with a closed subset
of $X$, the map $i^\sharp : \mathcal{O}_X \to i_*\mathcal{O}_Z$ is surjective,
and the kernel $\Ker(i^\sharp)\subset \mathcal{O}_X$ is a
sheaf of ideals which is locally generated by sections.
\end{enumerate}
\end{lemma}
\begin{proof}
Condition (6) is our definition of a closed immersion, see Schemes,
Definitions \ref{schemes-definition-closed-immersion-locally-ringed-spaces}
and \ref{schemes-definition-immersion}.
So (6) $\Leftrightarrow$ (1). We have (1) $\Rightarrow$ (2) by
Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}.
Trivially (2) $\Rightarrow$ (3).
\medskip\noindent
Assume (3). Each of the morphisms
$\Spec(R_j/I_j) \to \Spec(R_j)$ is
a closed immersion, see
Schemes, Example \ref{schemes-example-closed-immersion-affines}.
Hence $i^{-1}(U_j) \to U_j$ is a homeomorphism onto its image
and $i^\sharp|_{U_j}$ is surjective. Hence $i$ is a homeomorphism
onto its image and $i^\sharp$ is surjective since this may be
checked locally. We conclude that (3) $\Rightarrow$ (4).
\medskip\noindent
The implication (4) $\Rightarrow$ (1) is
Schemes, Lemma \ref{schemes-lemma-characterize-closed-immersions}.
The implication (5) $\Rightarrow$ (6) is trivial.
And the implication (6) $\Rightarrow$ (5) follows
from Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}.
\end{proof}
\begin{lemma}
\label{lemma-closed-immersion-ideals}
Let $X$ be a scheme. Let $i : Z \to X$ and $i' : Z' \to X$
be closed immersions and consider the ideal sheaves
$\mathcal{I} = \Ker(i^\sharp)$ and $\mathcal{I}' = \Ker((i')^\sharp)$
of $\mathcal{O}_X$.
\begin{enumerate}
\item The morphism $i : Z \to X$ factors as $Z \to Z' \to X$
for some $a : Z \to Z'$ if and only if $\mathcal{I}' \subset \mathcal{I}$.
If this happens, then $a$ is a closed immersion.
\item We have $Z \cong Z'$ over $X$ if and only if
$\mathcal{I} = \mathcal{I}'$.
\end{enumerate}
\end{lemma}
\begin{proof}
This follows from our discussion of closed subspaces in
Schemes, Section \ref{schemes-section-closed-immersion} especially
Schemes, Lemmas
\ref{schemes-lemma-closed-immersion} and
\ref{schemes-lemma-characterize-closed-subspace}.
It also follows in a straightforward way from characterization
(3) in Lemma \ref{lemma-closed-immersion} above.
\end{proof}
\begin{lemma}
\label{lemma-closed-immersion-bijection-ideals}
Let $X$ be a scheme.
Let $\mathcal{I} \subset \mathcal{O}_X$ be a sheaf of ideals.
The following are equivalent:
\begin{enumerate}
\item $\mathcal{I}$ is locally generated by
sections as a sheaf of $\mathcal{O}_X$-modules,
\item $\mathcal{I}$ is quasi-coherent as
a sheaf of $\mathcal{O}_X$-modules, and
\item there exists a closed immersion $i : Z \to X$ of schemes whose
corresponding sheaf of ideals $\Ker(i^\sharp)$ is equal to $\mathcal{I}$.
\end{enumerate}
\end{lemma}
\begin{proof}
The equivalence of (1) and (2) is immediate from
Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}.
If (1) holds, then there is a closed subspace $i : Z \to X$
with $\mathcal{I} = \Ker(i^\sharp)$ by
Schemes, Definition \ref{schemes-definition-closed-subspace}
and Example \ref{schemes-example-closed-subspace}.
By Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}
this is a closed immersion of schemes and (3) holds.
Conversely, if (3) holds, then (2) holds by
Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}
(which applies because a closed immersion of schemes is a fortiori a
closed immersion of locally ringed spaces).
\end{proof}
\begin{lemma}
\label{lemma-base-change-closed-immersion}
The base change of a closed immersion is a closed immersion.
\end{lemma}
\begin{proof}
See Schemes, Lemma \ref{schemes-lemma-base-change-immersion}.
\end{proof}
\begin{lemma}
\label{lemma-composition-closed-immersion}
A composition of closed immersions is a closed immersion.
\end{lemma}
\begin{proof}
We have seen this in
Schemes, Lemma \ref{schemes-lemma-composition-immersion},
but here is another
proof. Namely, it follows from the characterization (3) of closed immersions
in Lemma \ref{lemma-closed-immersion}. Since if $I \subset R$
is an ideal, and $\overline{J} \subset R/I$ is an ideal, then
$\overline{J} = J/I$ for some ideal $J \subset R$ which contains
$I$ and $(R/I)/\overline{J} = R/J$.
\end{proof}
\begin{lemma}
\label{lemma-closed-immersion-quasi-compact}
A closed immersion is quasi-compact.
\end{lemma}
\begin{proof}
This lemma is a duplicate of
Schemes, Lemma \ref{schemes-lemma-closed-immersion-quasi-compact}.
\end{proof}
\begin{lemma}
\label{lemma-closed-immersion-separated}
A closed immersion is separated.
\end{lemma}
\begin{proof}
This lemma is a special case of
Schemes, Lemma \ref{schemes-lemma-immersions-monomorphisms}.
\end{proof}
\section{Immersions}
\label{section-immersions}
\noindent
In this section we collect some facts on immersions.
\begin{lemma}
\label{lemma-immersion-permanence}
Let $Z \to Y \to X$ be morphisms of schemes.
\begin{enumerate}
\item If $Z \to X$ is an immersion, then $Z \to Y$ is an immersion.
\item If $Z \to X$ is a quasi-compact immersion and $Y \to X$ is
quasi-separated, then $Z \to Y$ is a quasi-compact immersion.
\item If $Z \to X$ is a closed immersion and $Y \to X$ is separated,
then $Z \to Y$ is a closed immersion.
\end{enumerate}
\end{lemma}
\begin{proof}
In each case the proof is to contemplate the commutative diagram
$$
\xymatrix{
Z \ar[r] \ar[rd] & Y \times_X Z \ar[r] \ar[d] & Z \ar[d] \\
& Y \ar[r] & X
}
$$
where the composition of the top horizontal arrows is the identity.
Let us prove (1). The first horizontal arrow is a section of
$Y \times_X Z \to Z$, whence an immersion by
Schemes, Lemma \ref{schemes-lemma-section-immersion}.
The arrow $Y \times_X Z \to Y$ is a base change of $Z \to X$ hence
an immersion (Schemes, Lemma \ref{schemes-lemma-base-change-immersion}).
Finally, a composition of immersions is an immersion
(Schemes, Lemma \ref{schemes-lemma-composition-immersion}). This proves (1).
The other two results are proved in exactly the same manner.
\end{proof}
\begin{lemma}
\label{lemma-factor-quasi-compact-immersion}
Let $h : Z \to X$ be an immersion.
If $h$ is quasi-compact, then we can factor
$h = i \circ j$ with $j : Z \to \overline{Z}$ an
open immersion and $i : \overline{Z} \to X$ a closed immersion.
\end{lemma}
\begin{proof}
Note that $h$ is quasi-compact and quasi-separated (see
Schemes, Lemma \ref{schemes-lemma-immersions-monomorphisms}).
Hence $h_*\mathcal{O}_Z$ is a quasi-coherent sheaf of $\mathcal{O}_X$-modules
by Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}.
This implies that
$\mathcal{I} = \Ker(\mathcal{O}_X \to h_*\mathcal{O}_Z)$
is a quasi-coherent sheaf of ideals, see
Schemes, Section \ref{schemes-section-quasi-coherent}.
Let $\overline{Z} \subset X$ be the closed subscheme corresponding
to $\mathcal{I}$, see Lemma \ref{lemma-closed-immersion-bijection-ideals}.
By Schemes, Lemma \ref{schemes-lemma-characterize-closed-subspace}
the morphism $h$ factors as
$h = i \circ j$ where $i : \overline{Z} \to X$ is the inclusion morphism.
To see that $j$ is an open immersion, choose an open subscheme
$U \subset X$ such that $h$ induces a closed immersion of $Z$
into $U$. Then it is clear that $\mathcal{I}|_U$ is the
sheaf of ideals corresponding to the closed immersion $Z \to U$.
Hence we see that $Z = \overline{Z} \cap U$.
\end{proof}
\begin{lemma}
\label{lemma-factor-reduced-immersion}
Let $h : Z \to X$ be an immersion.
If $Z$ is reduced, then we can factor
$h = i \circ j$ with $j : Z \to \overline{Z}$ an
open immersion and $i : \overline{Z} \to X$ a closed immersion.
\end{lemma}
\begin{proof}
Let $\overline{Z} \subset X$ be the closure of $h(Z)$ with the reduced
induced closed subscheme structure, see
Schemes, Definition \ref{schemes-definition-reduced-induced-scheme}.
By Schemes, Lemma \ref{schemes-lemma-map-into-reduction}
the morphism $h$ factors as
$h = i \circ j$ with $i : \overline{Z} \to X$ the inclusion morphism
and $j : Z \to \overline{Z}$. From the definition of an immersion we
see there exists an open subscheme $U \subset X$ such that
$h$ factors through a closed immersion into $U$. Hence
$\overline{Z} \cap U$ and $h(Z)$ are reduced closed subschemes
of $U$ with the same underlying closed set. Hence by the uniqueness
in Schemes, Lemma \ref{schemes-lemma-reduced-closed-subscheme}
we see that $h(Z) \cong \overline{Z} \cap U$.
So $j$ induces an isomorphism of $Z$ with $\overline{Z} \cap U$.
In other words $j$ is an open immersion.
\end{proof}
\begin{example}
\label{example-thibaut}
Here is an example of an immersion which is not a composition of an
open immersion followed by a closed immersion.
Let $k$ be a field.
Let $X = \Spec(k[x_1, x_2, x_3, \ldots])$.
Let $U = \bigcup_{n = 1}^{\infty} D(x_n)$.
Then $U \to X$ is an open immersion.
Consider the ideals
$$
I_n =
(x_1^n, x_2^n, \ldots, x_{n - 1}^n, x_n - 1, x_{n + 1}, x_{n + 2}, \ldots)
\subset
k[x_1, x_2, x_3, \ldots][1/x_n].
$$
Note that $I_n k[x_1, x_2, x_3, \ldots][1/x_nx_m] = (1)$
for any $m \not = n$. Hence the quasi-coherent ideals
$\widetilde I_n$ on $D(x_n)$ agree on $D(x_nx_m)$, namely
$\widetilde I_n|_{D(x_nx_m)} = \mathcal{O}_{D(x_n x_m)}$ if
$n \not = m$. Hence these ideals glue to a quasi-coherent sheaf of ideals
$\mathcal{I} \subset \mathcal{O}_U$.
Let $Z \subset U$ be the closed subscheme corresponding to
$\mathcal{I}$. Thus $Z \to X$ is an immersion.
\medskip\noindent
We claim that we cannot factor $Z \to X$ as
$Z \to \overline{Z} \to X$, where $\overline{Z} \to X$ is closed
and $Z \to \overline{Z}$ is open. Namely, $\overline{Z}$ would
have to be defined by an ideal $I \subset k[x_1, x_2, x_3, \ldots]$
such that $I_n = I k[x_1, x_2, x_3, \ldots][1/x_n]$.
But the only element $f \in k[x_1, x_2, x_3, \ldots]$
which ends up in all $I_n$ is $0$! Hence $I$ does not exist.
\end{example}
\begin{lemma}
\label{lemma-check-immersion}
Let $f : Y \to X$ be a morphism of schemes. If for all $y \in Y$
there is an open subscheme $f(y) \in U \subset X$ such that
$f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is an immersion, then $f$ is
an immersion.
\end{lemma}
\begin{proof}
This statement follows readily from the discussion of closed subschemes
at the end of Schemes, Section \ref{schemes-section-immersions}
but we will also give a detailed proof.
Let $Z \subset X$ be the closure of $f(Y)$. Since taking closures
commutes with restricting to opens, we see from the assumption that
$f(Y) \subset Z$ is open. Hence $Z' = Z \setminus f(Y)$ is closed.
Hence $X' = X \setminus Z'$ is an open subscheme of $X$ and
$f$ factors as $f : Y \to X'$ followed by the inclusion.
If $y \in Y$ and $U \subset X$ is as in the statement
of the lemma, then $U' = X' \cap U$ is an open neighbourhood
of $f'(y)$ such that $(f')^{-1}(U') \to U'$ is an immersion
(Lemma \ref{lemma-immersion-permanence}) with closed image.
Hence it is a closed immersion, see
Schemes, Lemma \ref{schemes-lemma-immersion-when-closed}.
Since being a closed immersion is local on the target
(for example by Lemma \ref{lemma-closed-immersion})
we conclude that $f'$ is a closed immersion as desired.
\end{proof}
\section{Closed immersions and quasi-coherent sheaves}
\label{section-closed-immersions-quasi-coherent}
\noindent
The following lemma finally does for quasi-coherent sheaves on schemes
what Modules, Lemma \ref{modules-lemma-i-star-exact} does for abelian sheaves.
See also the discussion in
Modules, Section \ref{modules-section-closed-immersion}.
\begin{lemma}
\label{lemma-i-star-equivalence}
Let $i : Z \to X$ be a closed immersion of schemes. Let
$\mathcal{I} \subset \mathcal{O}_X$ be the quasi-coherent sheaf of ideals
cutting out $Z$. The functor
$$
i_* :
\QCoh(\mathcal{O}_Z)
\longrightarrow
\QCoh(\mathcal{O}_X)
$$
is exact, fully faithful, with essential image those quasi-coherent
$\mathcal{O}_X$-modules $\mathcal{G}$ such that $\mathcal{I}\mathcal{G} = 0$.
\end{lemma}
\begin{proof}
A closed immersion is quasi-compact and separated, see
Lemmas \ref{lemma-closed-immersion-quasi-compact} and
\ref{lemma-closed-immersion-separated}. Hence
Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}
applies and the pushforward of a quasi-coherent
sheaf on $Z$ is indeed a quasi-coherent sheaf on $X$.
\medskip\noindent
By Modules, Lemma \ref{modules-lemma-i-star-equivalence}
the functor $i_*$ is fully faithful.
\medskip\noindent
Now we turn to the description of the essential image of the
functor $i_*$. We have $\mathcal{I}(i_*\mathcal{F}) = 0$
for any quasi-coherent $\mathcal{O}_Z$-module, for example by
Modules, Lemma \ref{modules-lemma-i-star-equivalence}.
Next, suppose that $\mathcal{G}$
is any quasi-coherent $\mathcal{O}_X$-module such that
$\mathcal{I}\mathcal{G} = 0$. It suffices to show that the canonical map
$$
\mathcal{G} \longrightarrow i_* i^*\mathcal{G}
$$
is an isomorphism\footnote{This was proved in a more general situation
in the proof of Modules, Lemma \ref{modules-lemma-i-star-equivalence}.}.
In the case of schemes and quasi-coherent modules, working affine locally
on $X$ and using Lemma \ref{lemma-closed-immersion} and
Schemes, Lemma \ref{schemes-lemma-widetilde-pullback}
it suffices to prove the following algebraic statement: Given a ring
$R$, an ideal $I$ and an $R$-module $N$ such that $IN = 0$ the canonical map
$$
N \longrightarrow N \otimes_R R/I,\quad
n \longmapsto n \otimes 1
$$
is an isomorphism of $R$-modules. Proof of this easy algebra fact is omitted.
\end{proof}
\noindent
Let $i : Z \to X$ be a closed immersion. Because of the lemma above we often,
by abuse of notation, denote $\mathcal{F}$ the sheaf $i_*\mathcal{F}$ on $X$.
\begin{lemma}
\label{lemma-largest-quasi-coherent-subsheaf}
Let $X$ be a scheme. Let $\mathcal{F}$ be a quasi-coherent
$\mathcal{O}_X$-module. Let $\mathcal{G} \subset \mathcal{F}$
be a $\mathcal{O}_X$-submodule. There exists a unique quasi-coherent
$\mathcal{O}_X$-submodule $\mathcal{G}' \subset \mathcal{G}$
with the following property: For every quasi-coherent $\mathcal{O}_X$-module
$\mathcal{H}$ the map
$$
\Hom_{\mathcal{O}_X}(\mathcal{H}, \mathcal{G}')
\longrightarrow
\Hom_{\mathcal{O}_X}(\mathcal{H}, \mathcal{G})
$$
is bijective. In particular $\mathcal{G}'$ is the largest quasi-coherent
$\mathcal{O}_X$-submodule of $\mathcal{F}$ contained in $\mathcal{G}$.
\end{lemma}
\begin{proof}
Let $\mathcal{G}_a$, $a \in A$ be the set of quasi-coherent
$\mathcal{O}_X$-submodules contained in $\mathcal{G}$.
Then the image $\mathcal{G}'$ of
$$
\bigoplus\nolimits_{a \in A} \mathcal{G}_a \longrightarrow \mathcal{F}
$$
is quasi-coherent as the image of a map of quasi-coherent sheaves
on $X$ is quasi-coherent and since a direct sum of quasi-coherent sheaves
is quasi-coherent, see
Schemes, Section \ref{schemes-section-quasi-coherent}.
The module $\mathcal{G}'$ is contained in $\mathcal{G}$. Hence this is the
largest quasi-coherent $\mathcal{O}_X$-module contained in $\mathcal{G}$.
\medskip\noindent
To prove the formula, let $\mathcal{H}$ be a quasi-coherent
$\mathcal{O}_X$-module and let $\alpha : \mathcal{H} \to \mathcal{G}$
be an $\mathcal{O}_X$-module map. The image of the composition
$\mathcal{H} \to \mathcal{G} \to \mathcal{F}$ is quasi-coherent
as the image of a map of quasi-coherent sheaves. Hence it is contained
in $\mathcal{G}'$. Hence $\alpha$ factors through $\mathcal{G}'$
as desired.
\end{proof}
\begin{lemma}
\label{lemma-i-upper-shriek}
Let $i : Z \to X$ be a closed immersion of schemes.
There is a functor\footnote{This is likely nonstandard notation.}
$i^! : \QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_Z)$
which is a right adjoint to $i_*$. (Compare
Modules, Lemma \ref{modules-lemma-i-star-right-adjoint}.)
\end{lemma}
\begin{proof}
Given quasi-coherent $\mathcal{O}_X$-module $\mathcal{G}$ we consider
the subsheaf $\mathcal{H}_Z(\mathcal{G})$ of $\mathcal{G}$ of local sections
annihilated by $\mathcal{I}$. By
Lemma \ref{lemma-largest-quasi-coherent-subsheaf}
there is a canonical largest quasi-coherent $\mathcal{O}_X$-submodule
$\mathcal{H}_Z(\mathcal{G})'$. By construction we have
$$
\Hom_{\mathcal{O}_X}(i_*\mathcal{F}, \mathcal{H}_Z(\mathcal{G})')
=
\Hom_{\mathcal{O}_X}(i_*\mathcal{F}, \mathcal{G})
$$
for any quasi-coherent $\mathcal{O}_Z$-module $\mathcal{F}$.
Hence we can set $i^!\mathcal{G} = i^*(\mathcal{H}_Z(\mathcal{G})')$.
Details omitted.
\end{proof}
\noindent
Using the $1$-to-$1$ corresponding between quasi-coherent sheaves
of ideals and closed subschemes (see
Lemma \ref{lemma-closed-immersion-bijection-ideals})
we can define scheme theoretic intersections and unions
of closed subschemes.
\begin{definition}
\label{definition-scheme-theoretic-intersection-union}
Let $X$ be a scheme. Let $Z, Y \subset X$ be closed subschemes
corresponding to quasi-coherent ideal sheaves
$\mathcal{I}, \mathcal{J} \subset \mathcal{O}_X$.
The {\it scheme theoretic intersection} of $Z$ and $Y$
is the closed subscheme of $X$ cut out by $\mathcal{I} + \mathcal{J}$.
The {\it scheme theoretic union} of $Z$ and $Y$
is the closed subscheme of $X$ cut out by
$\mathcal{I} \cap \mathcal{J}$.
\end{definition}
\begin{lemma}
\label{lemma-scheme-theoretic-intersection}
Let $X$ be a scheme. Let $Z, Y \subset X$ be closed subschemes.
Let $Z \cap Y$ be the scheme theoretic intersection of $Z$ and $Y$.
Then $Z \cap Y \to Z$ and $Z \cap Y \to Y$ are closed immersions
and
$$
\xymatrix{
Z \cap Y \ar[r] \ar[d] & Z \ar[d] \\
Y \ar[r] & X
}
$$
is a cartesian diagram of schemes, i.e., $Z \cap Y = Z \times_X Y$.
\end{lemma}
\begin{proof}
The morphisms $Z \cap Y \to Z$ and $Z \cap Y \to Y$ are closed immersions
by Lemma \ref{lemma-closed-immersion-ideals}.
Let $U = \Spec(A)$ be an affine open of $X$ and let $Z \cap U$ and $Y \cap U$
correspond to the ideals $I \subset A$ and $J \subset A$. Then
$Z \cap Y \cap U$ corresponds to $I + J \subset A$. Since
$A/I \otimes_A A/J = A/(I + J)$ we see that the diagram is
cartesian by our description of fibre products of schemes
in Schemes, Section \ref{schemes-section-fibre-products}.
\end{proof}
\begin{lemma}
\label{lemma-scheme-theoretic-union}
Let $S$ be a scheme. Let $X, Y \subset S$ be closed subschemes.
Let $X \cup Y$ be the scheme theoretic union of $X$ and $Y$.
Let $X \cap Y$ be the scheme theoretic intersection of $X$ and $Y$.
Then $X \to X \cup Y$ and $Y \to X \cup Y$ are closed immersions, there is a
short exact sequence
$$
0 \to \mathcal{O}_{X \cup Y} \to \mathcal{O}_X \times \mathcal{O}_Y
\to \mathcal{O}_{X \cap Y} \to 0
$$
of $\mathcal{O}_S$-modules, and the diagram
$$
\xymatrix{
X \cap Y \ar[r] \ar[d] & X \ar[d] \\
Y \ar[r] & X \cup Y
}
$$
is cocartesian in the category of schemes, i.e.,
$X \cup Y = X \amalg_{X \cap Y} Y$.
\end{lemma}
\begin{proof}
The morphisms $X \to X \cup Y$ and $Y \to X \cup Y$ are closed immersions
by Lemma \ref{lemma-closed-immersion-ideals}. In the short exact sequence
we use the equivalence of Lemma \ref{lemma-i-star-equivalence} to think of
quasi-coherent modules on closed subschemes of $S$ as quasi-coherent modules
on $S$. For the first map in the sequence we use the canonical maps
$\mathcal{O}_{X \cup Y} \to \mathcal{O}_X$ and
$\mathcal{O}_{X \cup Y} \to \mathcal{O}_Y$
and for the second map we use the canonical map
$\mathcal{O}_X \to \mathcal{O}_{X \cap Y}$ and
the negative of the canonical map
$\mathcal{O}_Y \to \mathcal{O}_{X \cap Y}$. Then to check
exactness we may work affine locally.
Let $U = \Spec(A)$ be an affine open of $S$ and let $X \cap U$ and $Y \cap U$
correspond to the ideals $I \subset A$ and $J \subset A$. Then
$(X \cup Y) \cap U$ corresponds to $I \cap J \subset A$
and $X \cap Y \cap U$ corresponds to $I + J \subset A$.
Thus exactness follows from the exactness of
$$
0 \to A/I \cap J \to A/I \times A/J \to A/(I + J) \to 0
$$
To show the diagram is cocartesian, suppose we are given a scheme $T$
and morphisms of schemes $f : X \to T$, $g : Y \to T$ agreeing
as morphisms $X \cap Y \to T$. Goal: Show there exists a unique
morphism $h : X \cup Y \to T$ agreeing with $f$ and $g$.
To construct $h$ we may work affine locally on $X \cup Y$, see
Schemes, Section \ref{schemes-section-glueing-schemes}.
If $s \in X$, $s \not \in Y$, then $X \to X \cup Y$ is
an isomorphism in a neighbourhood of $s$ and it is clear
how to construct $h$. Similarly for $s \in Y$, $s \not \in X$.
For $s \in X \cap Y$ we can pick an affine open
$V = \Spec(B) \subset T$ containing $f(s) = g(s)$.
Then we can choose an affine open $U = \Spec(A) \subset S$
containing $s$ such that $f(X \cap U)$ and $g(Y \cap U)$
are contained in $V$. The morphisms $f|_{X \cap U}$
and $g|_{Y \cap V}$ into $V$ correspond to ring maps
$$
B \to A/I
\quad\text{and}\quad
B \to A/J
$$
which agree as maps into $A/(I + J)$. By the short exact sequence
displayed above there is a unique lift of these ring homomorphism
to a ring map $B \to A/I \cap J$ as desired.
\end{proof}
\section{Supports of modules}
\label{section-support}
\noindent
In this section we collect some elementary results on supports of
quasi-coherent modules on schemes.
Recall that the support of a sheaf of modules has been defined in
Modules, Section \ref{modules-section-support}.
On the other hand, the support of a module was defined in
Algebra, Section \ref{algebra-section-support}.
These match.
\begin{lemma}
\label{lemma-support-affine-open}
Let $X$ be a scheme. Let $\mathcal{F}$ be a quasi-coherent sheaf on $X$.
Let $\Spec(A) = U \subset X$ be an affine open, and set
$M = \Gamma(U, \mathcal{F})$.
Let $x \in U$, and let $\mathfrak p \subset A$ be the corresponding prime.
The following are equivalent
\begin{enumerate}
\item $\mathfrak p$ is in the support of $M$, and
\item $x$ is in the support of $\mathcal{F}$.
\end{enumerate}
\end{lemma}
\begin{proof}
This follows from the equality $\mathcal{F}_x = M_{\mathfrak p}$, see
Schemes, Lemma \ref{schemes-lemma-spec-sheaves}
and the definitions.
\end{proof}
\begin{lemma}
\label{lemma-support-closed-specialization}
Let $X$ be a scheme.
Let $\mathcal{F}$ be a quasi-coherent sheaf on $X$.
The support of $\mathcal{F}$ is closed under specialization.
\end{lemma}
\begin{proof}
If $x' \leadsto x$ is a specialization and $\mathcal{F}_x = 0$
then $\mathcal{F}_{x'}$ is zero, as $\mathcal{F}_{x'}$ is a localization
of the module $\mathcal{F}_x$. Hence the complement of
$\text{Supp}(\mathcal{F})$ is closed under generalization.
\end{proof}
\noindent
For finite type quasi-coherent modules the support is closed,
can be checked on fibres, and commutes with base change.
\begin{lemma}
\label{lemma-support-finite-type}
Let $\mathcal{F}$ be a finite type quasi-coherent module
on a scheme $X$. Then
\begin{enumerate}
\item The support of $\mathcal{F}$ is closed.
\item For $x \in X$ we have
$$
x \in \text{Supp}(\mathcal{F})
\Leftrightarrow
\mathcal{F}_x \not = 0
\Leftrightarrow
\mathcal{F}_x \otimes_{\mathcal{O}_{X, x}} \kappa(x) \not = 0.
$$
\item For any morphism of schemes $f : Y \to X$ the pullback
$f^*\mathcal{F}$ is of finite type as well and we have
$\text{Supp}(f^*\mathcal{F}) = f^{-1}(\text{Supp}(\mathcal{F}))$.
\end{enumerate}
\end{lemma}
\begin{proof}
Part (1) is a reformulation of
Modules, Lemma \ref{modules-lemma-support-finite-type-closed}.
You can also combine
Lemma \ref{lemma-support-affine-open},
Properties, Lemma \ref{properties-lemma-finite-type-module},
and
Algebra, Lemma \ref{algebra-lemma-support-closed}
to see this. The first equivalence in (2) is the definition
of support, and the second equivalence follows from
Nakayama's lemma, see
Algebra, Lemma \ref{algebra-lemma-NAK}.
Let $f : Y \to X$ be a morphism of schemes. Note that
$f^*\mathcal{F}$ is of finite type by
Modules, Lemma \ref{modules-lemma-pullback-finite-type}.
For the final assertion, let $y \in Y$ with image $x \in X$.
Recall that
$$
(f^*\mathcal{F})_y =
\mathcal{F}_x \otimes_{\mathcal{O}_{X, x}} \mathcal{O}_{Y, y},
$$
see
Sheaves, Lemma \ref{sheaves-lemma-stalk-pullback-modules}.
Hence $(f^*\mathcal{F})_y \otimes \kappa(y)$ is nonzero
if and only if $\mathcal{F}_x \otimes \kappa(x)$ is nonzero.
By (2) this implies $x \in \text{Supp}(\mathcal{F})$ if and only
if $y \in \text{Supp}(f^*\mathcal{F})$, which is the content of
assertion (3).
\end{proof}
\begin{lemma}
\label{lemma-scheme-theoretic-support}
Let $\mathcal{F}$ be a finite type quasi-coherent module
on a scheme $X$. There exists a smallest closed subscheme
$i : Z \to X$ such that there exists a quasi-coherent
$\mathcal{O}_Z$-module $\mathcal{G}$ with
$i_*\mathcal{G} \cong \mathcal{F}$. Moreover:
\begin{enumerate}
\item If $\Spec(A) \subset X$ is any affine open, and
$\mathcal{F}|_{\Spec(A)} = \widetilde{M}$ then
$Z \cap \Spec(A) = \Spec(A/I)$ where $I = \text{Ann}_A(M)$.
\item The quasi-coherent sheaf $\mathcal{G}$ is unique up to unique
isomorphism.
\item The quasi-coherent sheaf $\mathcal{G}$ is of finite type.
\item The support of $\mathcal{G}$ and of $\mathcal{F}$ is $Z$.
\end{enumerate}
\end{lemma}
\begin{proof}
Suppose that $i' : Z' \to X$ is a closed subscheme which satisfies the
description on open affines from the lemma. Then by
Lemma \ref{lemma-i-star-equivalence}
we see that $\mathcal{F} \cong i'_*\mathcal{G}'$ for some unique
quasi-coherent sheaf $\mathcal{G}'$ on $Z'$. Furthermore, it is clear
that $Z'$ is the smallest closed subscheme with this property (by the
same lemma). Finally, using
Properties, Lemma \ref{properties-lemma-finite-type-module}
and
Algebra, Lemma \ref{algebra-lemma-finite-over-subring}
it follows that $\mathcal{G}'$ is of finite type. We have
$\text{Supp}(\mathcal{G}') = Z$ by
Algebra, Lemma \ref{algebra-lemma-support-closed}.
Hence, in order to prove the lemma it suffices to show that
the characterization in (1) actually does define a closed subscheme.
And, in order to do this it suffices to prove that the given rule
produces a quasi-coherent sheaf of ideals, see
Lemma \ref{lemma-closed-immersion-bijection-ideals}.
This comes down to the following algebra fact: If $A$ is a ring, $f \in A$,
and $M$ is a finite $A$-module, then
$\text{Ann}_A(M)_f = \text{Ann}_{A_f}(M_f)$.
We omit the proof.
\end{proof}
\begin{definition}
\label{definition-scheme-theoretic-support}
Let $X$ be a scheme. Let $\mathcal{F}$ be a quasi-coherent
$\mathcal{O}_X$-module of finite type. The {\it scheme theoretic support
of $\mathcal{F}$} is the closed subscheme $Z \subset X$ constructed in
Lemma \ref{lemma-scheme-theoretic-support}.
\end{definition}
\noindent
In this situation we often think of $\mathcal{F}$ as a quasi-coherent
sheaf of finite type on $Z$ (via the equivalence of categories of
Lemma \ref{lemma-i-star-equivalence}).
\section{Scheme theoretic image}
\label{section-scheme-theoretic-image}
\noindent
Caution: Some of the material in this section is ultra-general and
behaves differently from what you might expect.
\begin{lemma}
\label{lemma-scheme-theoretic-image}
Let $f : X \to Y$ be a morphism of schemes. There exists a closed
subscheme $Z \subset Y$ such that $f$ factors through $Z$ and such
that for any other closed subscheme $Z' \subset Y$ such that $f$
factors through $Z'$ we have $Z \subset Z'$.
\end{lemma}
\begin{proof}
Let $\mathcal{I} = \Ker(\mathcal{O}_Y \to f_*\mathcal{O}_X)$.
If $\mathcal{I}$ is quasi-coherent then we just take $Z$ to be the
closed subscheme determined by $\mathcal{I}$, see
Lemma \ref{lemma-closed-immersion-bijection-ideals}. This works by
Schemes, Lemma \ref{schemes-lemma-characterize-closed-subspace}.
In general the same lemma requires us to show that there exists
a largest quasi-coherent sheaf of ideals $\mathcal{I}'$ contained in
$\mathcal{I}$.
This follows from Lemma \ref{lemma-largest-quasi-coherent-subsheaf}.
\end{proof}
\begin{definition}
\label{definition-scheme-theoretic-image}
Let $f : X \to Y$ be a morphism of schemes. The {\it scheme theoretic image}
of $f$ is the smallest closed subscheme $Z \subset Y$ through which $f$
factors, see Lemma \ref{lemma-scheme-theoretic-image} above.
\end{definition}
\noindent
For a morphism $f : X \to Y$ of schemes with scheme theoretic image $Z$
we often denote $f : X \to Z$ the factorization of $f$
through its scheme theoretic image. If the morphism $f$ is not
quasi-compact, then (in general)
\begin{enumerate}
\item the set theoretic inclusion $\overline{f(X)} \subset Z$
is not an equality, i.e., $f(X) \subset Z$ is not a dense subset, and
\item the construction of the scheme theoretic image does not commute with
restriction to open subschemes to $Y$.
\end{enumerate}
In Examples, Section \ref{examples-section-scheme-theoretic-image}
the reader finds an example for both phenomena.
These phenomena can arise even for immersions, see
Examples, Section \ref{examples-section-strange-immersion}.
However, the next lemma shows that both disasters are avoided
when the morphism is quasi-compact.
\begin{lemma}
\label{lemma-quasi-compact-scheme-theoretic-image}
Let $f : X \to Y$ be a morphism of schemes.
Let $Z \subset Y$ be the scheme theoretic image of $f$.
If $f$ is quasi-compact then
\begin{enumerate}
\item the sheaf of ideals
$\mathcal{I} = \Ker(\mathcal{O}_Y \to f_*\mathcal{O}_X)$
is quasi-coherent,
\item the scheme theoretic image $Z$ is the closed subscheme
determined by $\mathcal{I}$,
\item for any open $U \subset Y$ the scheme theoretic image of
$f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is equal to $Z \cap U$, and
\item the image $f(X) \subset Z$ is a dense subset of $Z$, in other
words the morphism $X \to Z$ is dominant
(see Definition \ref{definition-dominant}).
\end{enumerate}
\end{lemma}
\begin{proof}
Part (4) follows from part (3). To show (3) it suffices
to prove (1) since the formation of $\mathcal{I}$ commutes with restriction to
open subschemes of $Y$. And if (1) holds then in the proof of
Lemma \ref{lemma-scheme-theoretic-image}
we showed (2). Thus it suffices to prove that $\mathcal{I}$ is quasi-coherent.
Since the property of being quasi-coherent is
local we may assume $Y$ is affine. As $f$ is quasi-compact,
we can find a finite affine open covering
$X = \bigcup_{i = 1, \ldots, n} U_i$. Denote $f'$ the composition
$$
X' = \coprod U_i \longrightarrow X \longrightarrow Y.
$$
Then $f_*\mathcal{O}_X$ is a subsheaf of $f'_*\mathcal{O}_{X'}$,
and hence $\mathcal{I} = \Ker(\mathcal{O}_Y \to f'_*\mathcal{O}_{X'})$.
By Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}
the sheaf $f'_*\mathcal{O}_{X'}$ is quasi-coherent on $Y$. Hence we win.
\end{proof}
\begin{example}
\label{example-scheme-theoretic-image}
If $A \to B$ is a ring map with kernel $I$, then the scheme theoretic image
of $\Spec(B) \to \Spec(A)$ is the closed subscheme
$\Spec(A/I)$ of $\Spec(A)$. This follows from
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}.
\end{example}
\noindent
If the morphism is quasi-compact, then the scheme theoretic image only
adds points which are specializations of points in the image.
\begin{lemma}
\label{lemma-reach-points-scheme-theoretic-image}
Let $f : X \to Y$ be a quasi-compact morphism.
Let $Z$ be the scheme theoretic image of $f$.
Let $z \in Z$\footnote{By
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image} set-theoretically
$Z$ agrees with the closure of $f(X)$ in $Y$.}.
There exists a valuation ring $A$ with
fraction field $K$ and a commutative diagram
$$
\xymatrix{
\Spec(K) \ar[rr] \ar[d] & & X \ar[d] \ar[ld] \\
\Spec(A) \ar[r] & Z \ar[r] & Y
}
$$
such that the closed point of $\Spec(A)$ maps to $z$. In particular
any point of $Z$ is the specialization of a point of $f(X)$.
\end{lemma}
\begin{proof}
Let $z \in \Spec(R) = V \subset Y$ be an affine open
neighbourhood of $z$. By
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}
the intersection $Z \cap V$ is the scheme theoretic image of
$f^{-1}(V) \to V$. Hence we may replace $Y$ by $V$
and assume $Y = \Spec(R)$ is affine.
In this case $X$ is quasi-compact as $f$ is quasi-compact.
Say $X = U_1 \cup \ldots \cup U_n$
is a finite affine open covering. Write $U_i = \Spec(A_i)$.
Let $I = \Ker(R \to A_1 \times \ldots \times A_n)$.
By Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}
again we see that $Z$ corresponds to the closed subscheme
$\Spec(R/I)$ of $Y$. If $\mathfrak p \subset R$ is
the prime corresponding to $z$, then we see that
$I_{\mathfrak p} \subset R_{\mathfrak p}$ is not an
equality. Hence (as localization is exact, see
Algebra, Proposition \ref{algebra-proposition-localization-exact})
we see that
$R_{\mathfrak p} \to
(A_1)_{\mathfrak p} \times \ldots \times (A_n)_{\mathfrak p}$
is not zero. Hence one of the rings $(A_i)_{\mathfrak p}$ is not zero.
Hence there exists an $i$ and a prime $\mathfrak q_i \subset A_i$
lying over a prime $\mathfrak p_i \subset \mathfrak p$.
By Algebra, Lemma \ref{algebra-lemma-dominate} we can choose a valuation ring
$A \subset K = \kappa(\mathfrak q_i)$ dominating
the local ring
$R_{\mathfrak p}/\mathfrak p_iR_{\mathfrak p} \subset \kappa(\mathfrak q_i)$.
This gives the desired diagram. Some details omitted.
\end{proof}
\begin{lemma}
\label{lemma-factor-factor}
Let
$$
\xymatrix{
X_1 \ar[d] \ar[r]_{f_1} & Y_1 \ar[d] \\
X_2 \ar[r]^{f_2} & Y_2
}
$$
be a commutative diagram of schemes. Let $Z_i \subset Y_i$, $i = 1, 2$ be
the scheme theoretic image of $f_i$. Then the morphism
$Y_1 \to Y_2$ induces a morphism $Z_1 \to Z_2$ and a
commutative diagram
$$
\xymatrix{
X_1 \ar[r] \ar[d] & Z_1 \ar[d] \ar[r] & Y_1 \ar[d] \\
X_2 \ar[r] & Z_2 \ar[r] & Y_2
}
$$
\end{lemma}
\begin{proof}
The scheme theoretic inverse image of $Z_2$ in $Y_1$
is a closed subscheme of $Y_1$ through
which $f_1$ factors. Hence $Z_1$ is contained in this.
This proves the lemma.
\end{proof}
\begin{lemma}
\label{lemma-scheme-theoretic-image-reduced}
Let $f : X \to Y$ be a morphism of schemes.
If $X$ is reduced, then the scheme theoretic image of $f$ is
the reduced induced scheme structure on $\overline{f(X)}$.
\end{lemma}
\begin{proof}
This is true because the reduced induced scheme structure on $\overline{f(X)}$
is clearly the smallest closed subscheme of $Y$ through which $f$ factors,
see
Schemes, Lemma \ref{schemes-lemma-map-into-reduction}.
\end{proof}
\begin{lemma}
\label{lemma-scheme-theoretic-image-of-partial-section}
Let $f : X \to Y$ be a separated morphism of schemes.
Let $V \subset Y$ be a retrocompact open. Let $s : V \to X$
be a morphism such that $f \circ s = \text{id}_V$.
Let $Y'$ be the scheme theoretic image of $s$.
Then $Y' \to Y$ is an isomorphism over $V$.
\end{lemma}
\begin{proof}
The assumption that $V$ is retrocompact in $Y$
(Topology, Definition \ref{topology-definition-quasi-compact})
means that $V \to Y$ is a quasi-compact morphism.
By Schemes, Lemma \ref{schemes-lemma-quasi-compact-permanence}
the morphism $s : V \to X$ is quasi-compact.
Hence the construction of the scheme theoretic image $Y'$
of $s$ commutes with restriction to opens by
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}.
In particular, we see that $Y' \cap f^{-1}(V)$ is the
scheme theoretic image of a section of the separated
morphism $f^{-1}(V) \to V$. Since a section of a separated
morphism is a closed immersion
(Schemes, Lemma \ref{schemes-lemma-section-immersion}),
we conclude that
$Y' \cap f^{-1}(V) \to V$ is an isomorphism as desired.
\end{proof}
\section{Scheme theoretic closure and density}
\label{section-scheme-theoretic-closure}
\noindent
We take the following definition from \cite[IV, Definition 11.10.2]{EGA}.
\begin{definition}
\label{definition-scheme-theoretically-dense}
Let $X$ be a scheme. Let $U \subset X$ be an open subscheme.
\begin{enumerate}
\item The scheme theoretic image of the morphism $U \to X$
is called the {\it scheme theoretic closure of $U$ in $X$}.
\item We say $U$ is {\it scheme theoretically dense in $X$}
if for every open $V \subset X$ the scheme theoretic closure
of $U \cap V$ in $V$ is equal to $V$.
\end{enumerate}
\end{definition}
\noindent
With this definition it is
{\bf not} the case that $U$ is scheme theoretically dense in $X$ if and
only if the scheme theoretic closure of $U$ is $X$, see
Example \ref{example-scheme-theretically-dense-not-dense}.
This is somewhat inelegant; but see
Lemmas \ref{lemma-scheme-theoretically-dense-quasi-compact} and
\ref{lemma-reduced-scheme-theoretically-dense}
below. On the other hand, with this definition $U$ is scheme theoretically
dense in $X$ if and only if for every $V \subset X$ open the ring map
$\mathcal{O}_X(V) \to \mathcal{O}_X(U \cap V)$ is injective, see
Lemma \ref{lemma-characterize-scheme-theoretically-dense}
below. In particular we see that scheme theoretically dense implies dense
which is pleasing.
\begin{example}
\label{example-scheme-theretically-dense-not-dense}
Here is an example where scheme theoretic closure being $X$ does not
imply dense for the underlying topological spaces.
Let $k$ be a field.
Set $A = k[x, z_1, z_2, \ldots]/(x^n z_n)$
Set $I = (z_1, z_2, \ldots) \subset A$.
Consider the affine scheme $X = \Spec(A)$ and the
open subscheme $U = X \setminus V(I)$.
Since $A \to \prod_n A_{z_n}$ is injective we see that the scheme theoretic
closure of $U$ is $X$. Consider the morphism
$X \to \Spec(k[x])$. This morphism is surjective
(set all $z_n = 0$ to see this). But the restriction
of this morphism to $U$ is not surjective because it maps
to the point $x = 0$. Hence $U$ cannot be topologically dense
in $X$.
\end{example}
\begin{lemma}
\label{lemma-scheme-theoretically-dense-quasi-compact}
Let $X$ be a scheme.
Let $U \subset X$ be an open subscheme.
If the inclusion morphism $U \to X$ is quasi-compact, then $U$
is scheme theoretically dense in $X$ if and only if the scheme theoretic
closure of $U$ in $X$ is $X$.
\end{lemma}
\begin{proof}
Follows from Lemma \ref{lemma-quasi-compact-scheme-theoretic-image} part (3).
\end{proof}
\begin{example}
\label{example-scheme-theoretic-closure}
Let $A$ be a ring and $X = \Spec(A)$.
Let $f_1, \ldots, f_n \in A$ and let $U = D(f_1) \cup \ldots \cup D(f_n)$.
Let $I = \Ker(A \to \prod A_{f_i})$.
Then the scheme theoretic closure of $U$ in $X$
is the closed subscheme $\Spec(A/I)$ of $X$.
Note that $U \to X$ is quasi-compact. Hence by
Lemma \ref{lemma-scheme-theoretically-dense-quasi-compact}
we see $U$ is scheme theoretically dense in $X$ if and only if $I = 0$.
\end{example}
\begin{lemma}
\label{lemma-characterize-scheme-theoretically-dense}
Let $j : U \to X$ be an open immersion of schemes.
Then $U$ is scheme theoretically dense in $X$ if and only if
$\mathcal{O}_X \to j_*\mathcal{O}_U$ is injective.
\end{lemma}
\begin{proof}
If $\mathcal{O}_X \to j_*\mathcal{O}_U$ is injective,
then the same is true when restricted to any open $V$ of $X$.
Hence the scheme theoretic closure of $U \cap V$ in $V$
is equal to $V$, see proof of Lemma \ref{lemma-scheme-theoretic-image}.
Conversely, suppose that the scheme theoretic
closure of $U \cap V$ is equal to $V$ for all opens $V$.
Suppose that $\mathcal{O}_X \to j_*\mathcal{O}_U$ is not injective.
Then we can find an affine open, say $\Spec(A) = V \subset X$
and a nonzero element $f \in A$ such that $f$ maps to zero in
$\Gamma(V \cap U, \mathcal{O}_X)$. In this case the scheme theoretic
closure of $V \cap U$ in $V$ is clearly contained in $\Spec(A/(f))$
a contradiction.
\end{proof}
\begin{lemma}
\label{lemma-intersection-scheme-theoretically-dense}
Let $X$ be a scheme. If $U$, $V$ are scheme theoretically dense
open subschemes of $X$, then so is $U \cap V$.
\end{lemma}
\begin{proof}
Let $W \subset X$ be any open.
Consider the map
$\mathcal{O}_X(W) \to \mathcal{O}_X(W \cap V)
\to \mathcal{O}_X(W \cap V \cap U)$.
By Lemma \ref{lemma-characterize-scheme-theoretically-dense}
both maps are injective. Hence the composite is injective.
Hence by Lemma \ref{lemma-characterize-scheme-theoretically-dense}
$U \cap V$ is scheme theoretically dense in $X$.
\end{proof}
\begin{lemma}
\label{lemma-quasi-compact-immersion}
Let $h : Z \to X$ be an immersion. Assume either $h$ is quasi-compact
or $Z$ is reduced. Let $\overline{Z} \subset X$ be the scheme theoretic
image of $h$. Then the morphism $Z \to \overline{Z}$ is an open immersion
which identifies $Z$ with a scheme theoretically dense open
subscheme of $\overline{Z}$. Moreover, $Z$ is topologically
dense in $\overline{Z}$.
\end{lemma}
\begin{proof}
By Lemma \ref{lemma-factor-quasi-compact-immersion} or
Lemma \ref{lemma-factor-reduced-immersion} we can factor
$Z \to X$ as $Z \to \overline{Z}_1 \to X$ with $Z \to \overline{Z}_1$
open and $\overline{Z}_1 \to X$ closed. On the other hand, let
$Z \to \overline{Z} \subset X$ be the scheme theoretic closure of
$Z \to X$. We conclude that $\overline{Z} \subset \overline{Z}_1$.
Since $Z$ is an open subscheme of $\overline{Z}_1$ it follows
that $Z$ is an open subscheme of $\overline{Z}$ as well.
In the case that $Z$ is reduced we know that $Z \subset \overline{Z}_1$
is topologically dense by the construction of $\overline{Z}_1$ in
the proof of Lemma \ref{lemma-factor-reduced-immersion}.
Hence $\overline{Z}_1$ and $\overline{Z}$ have the same
underlying topological spaces. Thus $\overline{Z} \subset \overline{Z}_1$
is a closed immersion into a reduced scheme which induces a bijection
on underlying topological spaces, and hence it is an isomorphism.
In the case that $Z \to X$ is quasi-compact we argue as follows:
The assertion that $Z$ is scheme theoretically dense in
$\overline{Z}$ follows from
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image} part (3).
The last assertion follows from
Lemma \ref{lemma-quasi-compact-scheme-theoretic-image} part (4).
\end{proof}
\begin{lemma}
\label{lemma-reduced-scheme-theoretically-dense}
Let $X$ be a reduced scheme and let $U \subset X$ be an open subscheme.
Then the following are equivalent
\begin{enumerate}
\item $U$ is topologically dense in $X$,
\item the scheme theoretic closure of $U$ in $X$ is $X$, and
\item $U$ is scheme theoretically dense in $X$.
\end{enumerate}
\end{lemma}
\begin{proof}
This follows from
Lemma \ref{lemma-quasi-compact-immersion}
and the fact that a closed subscheme $Z$ of $X$ whose
underlying topological space equals $X$ must be equal to $X$
as a scheme.
\end{proof}
\begin{lemma}
\label{lemma-reduced-subscheme-closure}
Let $X$ be a scheme and let $U \subset X$ be a reduced open subscheme.
Then the following are equivalent
\begin{enumerate}
\item the scheme theoretic closure of $U$ in $X$ is $X$, and
\item $U$ is scheme theoretically dense in $X$.
\end{enumerate}
If this holds then $X$ is a reduced scheme.
\end{lemma}
\begin{proof}
This follows from
Lemma \ref{lemma-quasi-compact-immersion}
and the fact that the scheme theoretic closure of $U$ in $X$ is
reduced by
Lemma \ref{lemma-scheme-theoretic-image-reduced}.
\end{proof}
\begin{lemma}
\label{lemma-equality-of-morphisms}
Let $S$ be a scheme. Let $X$, $Y$ be schemes over $S$.
Let $f, g : X \to Y$ be morphisms of schemes over $S$.
Let $U \subset X$ be an open subscheme such that
$f|_U = g|_U$. If the scheme theoretic closure of $U$
in $X$ is $X$ and $Y \to S$ is separated, then $f = g$.
\end{lemma}
\begin{proof}
Follows from the definitions and
Schemes, Lemma \ref{schemes-lemma-where-are-they-equal}.
\end{proof}
\section{Dominant morphisms}
\label{section-dominant}
\noindent
The definition of a morphism of schemes being dominant is a little
different from what you might expect if you are used to the notion
of a dominant morphism of varieties.
\begin{definition}
\label{definition-dominant}
A morphism $f : X \to S$ of schemes is called {\it dominant} if the
image of $f$ is a dense subset of $S$.
\end{definition}
\noindent
So for example, if $k$ is an infinite field and $\lambda_1, \lambda_2, \ldots$
is a countable collection of distinct elements of $k$, then the morphism
$$
\coprod\nolimits_{i = 1, 2, \ldots } \Spec(k)
\longrightarrow
\Spec(k[x])
$$
with $i$th factor mapping to the point $x = \lambda_i$ is dominant.
\begin{lemma}
\label{lemma-generic-points-in-image-dominant}
Let $f : X \to S$ be a morphism of schemes.
If every generic point of every irreducible component of $S$
is in the image of $f$, then $f$ is dominant.
\end{lemma}
\begin{proof}
This is a topological fact which follows directly from the fact that
the topological space underlying a scheme is sober, see
Schemes, Lemma \ref{schemes-lemma-scheme-sober}, and that
every point of $S$ is contained in an irreducible component of
$S$, see Topology, Lemma \ref{topology-lemma-irreducible}.
\end{proof}
\noindent
The expectation that morphisms are dominant only if generic points of the
target are in the image does hold if the morphism is quasi-compact.
\begin{lemma}
\label{lemma-quasi-compact-dominant}
\begin{slogan}
Morphisms whose image contains the generic points are dominant
\end{slogan}
Let $f : X \to S$ be a quasi-compact morphism of schemes.
Then $f$ is dominant (if and) only if for every irreducible
component $Z \subset S$ the generic point of $Z$ is in the
image of $f$.
\end{lemma}
\begin{proof}
Let $V \subset S$ be an affine open.
Because $f$ is quasi-compact we may choose finitely many affine
opens $U_i \subset f^{-1}(V)$, $i = 1, \ldots, n$ covering
$f^{-1}(V)$. Consider the morphism of affines
$$
f' :
\coprod\nolimits_{i = 1, \ldots, n} U_i
\longrightarrow
V.
$$
A disjoint union of affines is affine, see
Schemes, Lemma \ref{schemes-lemma-disjoint-union-affines}.
Generic points of irreducible components of $V$
are exactly the generic points of the irreducible components of
$S$ that meet $V$. Also, $f$ is dominant if and only if $f'$ is dominant
no matter what choices of $V, n, U_i$ we make above. Thus we
have reduced the lemma to the case of a morphism of affine schemes.
The affine case is
Algebra, Lemma \ref{algebra-lemma-image-dense-generic-points}.
\end{proof}
\noindent
Here is a slightly more useful variant of the lemma above.
\begin{lemma}
\label{lemma-quasi-compact-generic-point-not-in-image}
Let $f : X \to S$ be a quasi-compact morphism of schemes.
Let $\eta \in S$ be a generic point of an irreducible
component of $S$. If $\eta \not \in f(X)$ then there
exists an open neighbourhood $V \subset S$ of $\eta$
such that $f^{-1}(V) = \emptyset$.
\end{lemma}
\begin{proof}
Let $Z \subset S$ be the scheme theoretic image of $f$.
We have to show that $\eta \not \in Z$.
This follows from
Lemma \ref{lemma-reach-points-scheme-theoretic-image}
but can also be seen as follows.
By Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}
the morphism $X \to Z$ is dominant, which by
Lemma \ref{lemma-quasi-compact-dominant}
means all the generic points of all irreducible components of $Z$
are in the image of $X \to Z$. By assumption we see that
$\eta \not \in Z$ since $\eta$ would be the generic
point of some irreducible component of $Z$ if it were in $Z$.
\end{proof}
\noindent
There is another case where dominant is the same as having all
generic points of irreducible components in the image.
\begin{lemma}
\label{lemma-dominant-finite-number-irreducible-components}
Let $f : X \to S$ be a morphism of schemes.
Suppose that $X$ has finitely many irreducible components.
Then $f$ is dominant (if and) only if for every irreducible
component $Z \subset S$ the generic point of $Z$ is in the
image of $f$. If so, then $S$ has finitely many irreducible
components as well.
\end{lemma}
\begin{proof}
Assume $f$ is dominant.
Say $X = Z_1 \cup Z_2 \cup \ldots \cup Z_n$ is the decomposition
of $X$ into irreducible components. Let $\xi_i \in Z_i$ be
its generic point, so $Z_i = \overline{\{\xi_i\}}$.
Note that $f(Z_i)$ is an irreducible subset of $S$.
Hence
$$
S = \overline{f(X)} = \bigcup \overline{f(Z_i)} =
\bigcup \overline{\{f(\xi_i)\}}
$$
is a finite union of irreducible subsets whose generic
points are in the image of $f$. The lemma follows.
\end{proof}
\begin{lemma}
\label{lemma-dominant-between-integral}
Let $f : X \to Y$ be a morphism of integral schemes. The following
are equivalent
\begin{enumerate}
\item $f$ is dominant,
\item $f$ maps the generic point of $X$ to the generic point of $Y$,
\item for some nonempty affine opens $U \subset X$ and $V \subset Y$
with $f(U) \subset V$ the ring map $\mathcal{O}_Y(V) \to \mathcal{O}_X(U)$
is injective,
\item for all nonempty affine opens $U \subset X$ and $V \subset Y$
with $f(U) \subset V$ the ring map $\mathcal{O}_Y(V) \to \mathcal{O}_X(U)$
is injective,
\item for some $x \in X$ with image $y = f(x) \in Y$ the local ring
map $\mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$ is injective, and
\item for all $x \in X$ with image $y = f(x) \in Y$ the local ring
map $\mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$ is injective.
\end{enumerate}
\end{lemma}
\begin{proof}
The equivalence of (1) and (2) follows from
Lemma \ref{lemma-dominant-finite-number-irreducible-components}.
Let $U \subset X$ and $V \subset Y$ be nonempty affine opens with
$f(U) \subset V$. Recall that the rings $A = \mathcal{O}_X(U)$
and $B = \mathcal{O}_Y(V)$ are integral domains.
The morphism $f|_U : U \to V$ corresponds to a ring map
$\varphi : B \to A$. The generic points of $X$ and $Y$ correspond
to the prime ideals $(0) \subset A$ and $(0) \subset B$. Thus
(2) is equivalent to the condition $(0) = \varphi^{-1}((0))$,
i.e., to the condition that $\varphi$ is injective.
In this way we see that (2), (3), and (4) are equivalent.
Similarly, given $x$ and $y$ as in (5) the local rings
$\mathcal{O}_{X, x}$ and $\mathcal{O}_{Y, y}$ are domains
and the prime ideals $(0) \subset \mathcal{O}_{X, x}$
and $(0) \subset \mathcal{O}_{Y, y}$ correspond to the
generic points of $X$ and $Y$ (via the identification of
the spectrum of the local ring at $x$
with the set of points specializing to $x$, see
Schemes, Lemma \ref{schemes-lemma-specialize-points}).
Thus we can argue in the exact same manner as above
to see that (2), (5), and (6) are equivalent.
\end{proof}
\section{Surjective morphisms}
\label{section-surjective}
\begin{definition}
\label{definition-surjective}
A morphism of schemes is said to be {\it surjective}
if it is surjective on underlying topological
spaces.
\end{definition}
\begin{lemma}
\label{lemma-composition-surjective}
The composition of surjective morphisms is surjective.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-when-point-maps-to-pair}
Let $X$ and $Y$ be schemes over a base scheme $S$. Given points $x \in X$ and
$y \in Y$, there is a point of $X \times_S Y$ mapping to $x$ and $y$ under the
projections if and only if $x$ and $y$ lie above the same point of $S$.
\end{lemma}
\begin{proof}
The condition is obviously necessary, and the converse follows from the proof
of Schemes, Lemma \ref{schemes-lemma-points-fibre-product}.
\end{proof}
\begin{lemma}
\label{lemma-base-change-surjective}
The base change of a surjective morphism is surjective.
\end{lemma}
\begin{proof}
Let $f: X \to Y$ be a morphism of schemes over a base scheme $S$.
If $S' \to S$ is a morphism of schemes, let $p: X_{S'} \to X$
and $q: Y_{S'} \to Y$ be the canonical projections. The commutative
square
$$
\xymatrix{
X_{S'} \ar[d]_{f_{S'}} \ar[r]_p & X \ar[d]^{f} \\
Y_{S'} \ar[r]^{q} & Y.
}
$$
identifies $X_{S'}$ as a fibre product of $X \to Y$ and
$Y_{S'} \to Y$. Let $Z$ be a subset of the underlying topological
space of $X$. Then $q^{-1}(f(Z)) = f_{S'}(p^{-1}(Z))$, because
$y' \in q^{-1}(f(Z))$ if and only if $q(y') = f(x)$ for some $x \in Z$,
if and only if, by Lemma \ref{lemma-when-point-maps-to-pair}, there exists
$x' \in X_{S'}$ such that $f_{S'}(x') = y'$ and $p(x') = x$. In particular
taking $Z = X$ we see that if $f$ is surjective so is the base change
$f_{S'}: X_{S'} \to Y_{S'}$.
\end{proof}
\begin{example}
\label{example-injective-not-preserved-base-change}
Bijectivity is not stable under base change, and so neither is injectivity.
For example consider the bijection
$\Spec(\mathbf{C}) \to \Spec(\mathbf{R})$.
The base change
$\Spec(\mathbf{C} \otimes_{\mathbf{R}} \mathbf{C}) \to
\Spec(\mathbf{C})$
is not injective, since there is an isomorphism
$\mathbf{C} \otimes_{\mathbf{R}} \mathbf{C} \cong \mathbf{C} \times \mathbf{C}$
(the decomposition comes from the idempotent
$\frac{1 \otimes 1 + i \otimes i}{2}$) and hence
$\Spec(\mathbf{C} \otimes_{\mathbf{R}} \mathbf{C})$ has two points.
\end{example}
\begin{lemma}
\label{lemma-surjection-from-quasi-compact}
Let
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & &
Y \ar[dl]^q \\
& Z
}
$$
be a commutative diagram of morphisms of schemes.
If $f$ is surjective and $p$ is quasi-compact, then $q$ is quasi-compact.
\end{lemma}
\begin{proof}
Let $W \subset Z$ be a quasi-compact open. By assumption $p^{-1}(W)$
is quasi-compact. Hence by
Topology, Lemma \ref{topology-lemma-image-quasi-compact}
the inverse image $q^{-1}(W) = f(p^{-1}(W))$ is quasi-compact too.
This proves the lemma.
\end{proof}
\section{Radicial and universally injective morphisms}
\label{section-radicial}
\noindent
In this section we define what it means for a morphism of schemes to
be {\it radicial} and what it means for a morphism of schemes to be
{\it universally injective}. We then show that these notions agree.
The reason for introducing both is that in the case of algebraic spaces
there are corresponding notions which may not always agree.
\begin{definition}
\label{definition-universally-injective}
Let $f : X \to S$ be a morphism.
\begin{enumerate}
\item We say that $f$ is {\it universally injective} if and only
if for any morphism of schemes $S' \to S$ the base change
$f' : X_{S'} \to S'$ is injective (on underlying topological spaces).
\item We say $f$ is {\it radicial} if $f$ is injective as a
map of topological spaces, and for every $x \in X$ the field
extension $\kappa(x)/\kappa(f(x))$ is purely inseparable.
\end{enumerate}
\end{definition}
\begin{lemma}
\label{lemma-universally-injective}
Let $f : X \to S$ be a morphism of schemes.
The following are equivalent:
\begin{enumerate}
\item For every field $K$ the induced map
$\Mor(\Spec(K), X) \to \Mor(\Spec(K), S)$
is injective.
\item The morphism $f$ is universally injective.
\item The morphism $f$ is radicial.
\item The diagonal morphism $\Delta_{X/S} : X \longrightarrow X \times_S X$
is surjective.
\end{enumerate}
\end{lemma}
\begin{proof}
Let $K$ be a field, and let $s : \Spec(K) \to S$ be a morphism.
Giving a morphism $x : \Spec(K) \to X$ such that $f \circ x = s$
is the same as giving a section of the projection
$X_K = \Spec(K) \times_S X \to \Spec(K)$, which in turn
is the same as giving a point $x \in X_K$ whose residue field is $K$.
Hence we see that (2) implies (1).
\medskip\noindent
Conversely, suppose that (1) holds. Assume that $x, x' \in X_{S'}$
map to the same point $s' \in S'$. Choose a commutative diagram
$$
\xymatrix{
K & \kappa(x) \ar[l] \\
\kappa(x') \ar[u] & \kappa(s') \ar[l] \ar[u]
}
$$
of fields. By Schemes, Lemma \ref{schemes-lemma-characterize-points}
we get two morphisms $a, a' : \Spec(K) \to X_{S'}$. One corresponding
to the point $x$ and the embedding $\kappa(x) \subset K$ and
the other corresponding to the point $x'$ and the embedding
$\kappa(x') \subset K$. Also we have $f' \circ a = f' \circ a'$.
Condition (1) now implies that the compositions of $a$ and $a'$ with
$X_{S'} \to X$ are equal. Since $X_{S'}$ is the fibre product
of $S'$ and $X$ over $S$ we see that $a = a'$. Hence $x = x'$.
Thus (1) implies (2).
\medskip\noindent
If there are two different points $x, x' \in X$ mapping to the same point of $s$
then (2) is violated.
If for some $s = f(x)$, $x \in X$ the field extension
$\kappa(x)/\kappa(s)$ is not purely inseparable, then
we may find a field extension $K/\kappa(s)$ such that
$\kappa(x)$ has two $\kappa(s)$-homomorphisms into $K$. By
Schemes, Lemma \ref{schemes-lemma-characterize-points} this
implies that the map
$\Mor(\Spec(K), X) \to \Mor(\Spec(K), S)$
is not injective, and hence (1) is violated.
Thus we see that the equivalent conditions (1) and (2) imply
$f$ is radicial, i.e., they imply (3).
\medskip\noindent
Assume (3). By
Schemes, Lemma \ref{schemes-lemma-characterize-points}
a morphism $\Spec(K) \to X$ is given by a pair $(x, \kappa(x) \to K)$.
Property (3) says exactly that associating to the pair
$(x, \kappa(x) \to K)$ the pair $(s, \kappa(s) \to \kappa(x) \to K)$
is injective. In other words (1) holds. At this point we know that
(1), (2) and (3) are all equivalent.
\medskip\noindent
Finally, we prove the equivalence of (4) with (1), (2) and (3).
A point of $X \times_S X$ is given by a quadruple
$(x_1, x_2, s, \mathfrak p)$, where $x_1, x_2 \in X$,
$f(x_1) = f(x_2) = s$ and
$\mathfrak p \subset \kappa(x_1) \otimes_{\kappa(s)} \kappa(x_2)$
is a prime ideal, see
Schemes, Lemma \ref{schemes-lemma-points-fibre-product}.
If $f$ is universally injective, then
by taking $S'=X$ in the definition of universally injective,
$\Delta_{X/S}$ must be surjective since it is a section of
the injective morphism
$X \times_S X \longrightarrow X$.
Conversely, if
$\Delta_{X/S}$ is surjective, then always $x_1 = x_2 = x$ and there
is exactly one such prime ideal $\mathfrak p$, which means that
$\kappa(s) \subset \kappa(x)$ is purely inseparable.
Hence $f$ is radicial.
Alternatively, if $\Delta_{X/S}$ is surjective,
then for any $S' \to S$ the base
change $\Delta_{X_{S'}/S'}$ is surjective which implies that $f$
is universally injective. This finishes the proof of the lemma.
\end{proof}
\begin{lemma}
\label{lemma-universally-injective-separated}
A universally injective morphism is separated.
\end{lemma}
\begin{proof}
Combine
Lemma \ref{lemma-universally-injective}
with the remark that $X \to S$ is separated if and only if the image
of $\Delta_{X/S}$ is closed in $X \times_S X$, see
Schemes, Definition \ref{schemes-definition-separated}
and the discussion following it.
\end{proof}
\begin{lemma}
\label{lemma-base-change-universally-injective}
A base change of a universally injective morphism is universally injective.
\end{lemma}
\begin{proof}
This is formal.
\end{proof}
\begin{lemma}
\label{lemma-composition-universally-injective}
A composition of radicial morphisms is radicial, and so the same holds
for the equivalent condition of being universally injective.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\section{Affine morphisms}
\label{section-affine}
\begin{definition}
\label{definition-affine}
A morphism of schemes $f : X \to S$ is called {\it affine} if
the inverse image of every affine open of $S$ is an affine
open of $X$.
\end{definition}
\begin{lemma}
\label{lemma-affine-separated}
An affine morphism is separated and quasi-compact.
\end{lemma}
\begin{proof}
Let $f : X \to S$ be affine. Quasi-compactness is immediate from
Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine}.
We will show $f$ is separated using
Schemes, Lemma \ref{schemes-lemma-characterize-separated}. Let
$x_1, x_2 \in X$ be points of $X$ which map to the same point $s \in S$.
Choose any affine open $W \subset S$ containing $s$. By assumption
$f^{-1}(W)$ is affine. Apply the lemma cited with $U = V = f^{-1}(W)$.
\end{proof}
\begin{lemma}
\label{lemma-characterize-affine}
\begin{reference}
\cite[II, Corollary 1.3.2]{EGA}
\end{reference}
Let $f : X \to S$ be a morphism of schemes.
The following are equivalent
\begin{enumerate}
\item The morphism $f$ is affine.
\item There exists an affine open covering $S = \bigcup W_j$
such that each $f^{-1}(W_j)$ is affine.
\item There exists a quasi-coherent sheaf of $\mathcal{O}_S$-algebras
$\mathcal{A}$ and an isomorphism
$X \cong \underline{\Spec}_S(\mathcal{A})$
of schemes over $S$. See
Constructions, Section \ref{constructions-section-spec} for notation.
\end{enumerate}
Moreover, in this case $X = \underline{\Spec}_S(f_*\mathcal{O}_X)$.
\end{lemma}
\begin{proof}
It is obvious that (1) implies (2).
\medskip\noindent
Assume $S = \bigcup_{j \in J} W_j$ is an affine open covering such that
each $f^{-1}(W_j)$ is affine. By
Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine} we see
that $f$ is quasi-compact. By
Schemes, Lemma \ref{schemes-lemma-characterize-quasi-separated}
we see the morphism $f$ is quasi-separated. Hence by
Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent} the
sheaf $\mathcal{A} = f_*\mathcal{O}_X$ is a quasi-coherent sheaf
of $\mathcal{O}_S$-algebras. Thus we have the scheme
$g : Y = \underline{\Spec}_S(\mathcal{A}) \to S$ over $S$.
The identity map
$\text{id} : \mathcal{A} = f_*\mathcal{O}_X \to f_*\mathcal{O}_X$
provides, via the definition of the relative spectrum,
a morphism $can : X \to Y$ over $S$, see
Constructions, Lemma \ref{constructions-lemma-canonical-morphism}.
By assumption and the lemma just cited
the restriction $can|_{f^{-1}(W_j)} : f^{-1}(W_j) \to g^{-1}(W_j)$
is an isomorphism. Thus $can$ is an isomorphism.
We have shown that (2) implies (3).
\medskip\noindent
Assume (3). By Constructions, Lemma \ref{constructions-lemma-spec-properties}
we see that the inverse image of every affine open is affine, and hence
the morphism is affine by definition.
\end{proof}
\begin{remark}
\label{remark-direct-argument}
We can also argue directly that (2) implies (1) in
Lemma \ref{lemma-characterize-affine} above as follows.
Assume $S = \bigcup W_j$ is an affine open covering
such that each $f^{-1}(W_j)$ is affine.
First argue that $\mathcal{A} = f_*\mathcal{O}_X$ is quasi-coherent
as in the proof above.
Let $\Spec(R) = V \subset S$ be affine open.
We have to show that $f^{-1}(V)$ is affine. Set
$A = \mathcal{A}(V) = f_*\mathcal{O}_X(V) = \mathcal{O}_X(f^{-1}(V))$.
By Schemes, Lemma \ref{schemes-lemma-morphism-into-affine} there is
a canonical morphism $\psi : f^{-1}(V) \to \Spec(A)$ over
$\Spec(R) = V$.
By Schemes, Lemma \ref{schemes-lemma-good-subcover} there exists
an integer $n \geq 0$, a standard open covering
$V = \bigcup_{i = 1, \ldots, n} D(h_i)$, $h_i \in R$, and a map
$a : \{1, \ldots, n\} \to J$ such that each $D(h_i)$ is also
a standard open of the affine scheme $W_{a(i)}$. The inverse image
of a standard open under a morphism of affine schemes is standard open, see
Algebra, Lemma \ref{algebra-lemma-spec-functorial}. Hence we see
that $f^{-1}(D(h_i))$ is a standard open of $f^{-1}(W_{a(i)})$,
in particular that $f^{-1}(D(h_i))$ is affine. Because $\mathcal{A}$
is quasi-coherent we have
$A_{h_i} = \mathcal{A}(D(h_i)) = \mathcal{O}_X(f^{-1}(D(h_i)))$,
so $f^{-1}(D(h_i))$ is the spectrum of $A_{h_i}$.
It follows that the morphism $\psi$ induces an isomorphism of the open
$f^{-1}(D(h_i))$ with the open $\Spec(A_{h_i})$ of
$\Spec(A)$. Since $f^{-1}(V) = \bigcup f^{-1}(D(h_i))$
and $\Spec(A) = \bigcup \Spec(A_{h_i})$ we win.
\end{remark}
\begin{lemma}
\label{lemma-affine-equivalence-algebras}
Let $S$ be a scheme. There is an anti-equivalence of categories
$$
\begin{matrix}
\text{Schemes affine} \\
\text{over }S
\end{matrix}
\longleftrightarrow
\begin{matrix}
\text{quasi-coherent sheaves} \\
\text{of }\mathcal{O}_S\text{-algebras}
\end{matrix}
$$
which associates to $f : X \to S$ the sheaf $f_*\mathcal{O}_X$.
Moreover, this equivalence is compatible with arbitrary base change.
\end{lemma}
\begin{proof}
The functor from right to left is given by $\underline{\Spec}_S$.
The two functors are mutually inverse by
Lemma \ref{lemma-characterize-affine} and
Constructions, Lemma \ref{constructions-lemma-spec-properties} part (3).
The final statement is
Constructions, Lemma \ref{constructions-lemma-spec-properties} part (2).
\end{proof}
\begin{lemma}
\label{lemma-affine-equivalence-modules}
Let $f : X \to S$ be an affine morphism of schemes.
Let $\mathcal{A} = f_*\mathcal{O}_X$.
The functor $\mathcal{F} \mapsto f_*\mathcal{F}$ induces
an equivalence of categories
$$
\left\{
\begin{matrix}
\text{category of quasi-coherent}\\
\mathcal{O}_X\text{-modules}
\end{matrix}
\right\}
\longrightarrow
\left\{
\begin{matrix}
\text{category of quasi-coherent}\\
\mathcal{A}\text{-modules}
\end{matrix}
\right\}
$$
Moreover, an $\mathcal{A}$-module is
quasi-coherent as an $\mathcal{O}_S$-module if and only if
it is quasi-coherent as an $\mathcal{A}$-module.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-composition-affine}
The composition of affine morphisms is affine.
\end{lemma}
\begin{proof}
Let $f : X \to Y$ and $g : Y \to Z$ be affine morphisms.
Let $U \subset Z$ be affine open. Then $g^{-1}(U)$ is affine
by assumption on $g$. Whereupon $f^{-1}(g^{-1}(U))$ is affine
by assumption on $f$. Hence $(g \circ f)^{-1}(U)$ is affine.
\end{proof}
\begin{lemma}
\label{lemma-base-change-affine}
The base change of an affine morphism is affine.
\end{lemma}
\begin{proof}
Let $f : X \to S$ be an affine morphism. Let $S' \to S$ be any morphism.
Denote $f' : X_{S'} = S' \times_S X \to S'$ the base change of $f$.
For every $s' \in S'$ there exists an open affine neighbourhood
$s' \in V \subset S'$ which maps into some open affine $U \subset S$.
By assumption $f^{-1}(U)$ is affine. By the material in
Schemes, Section \ref{schemes-section-fibre-products} we see
that $f^{-1}(U)_V = V \times_U f^{-1}(U)$ is affine and equal
to $(f')^{-1}(V)$. This proves that $S'$ has an open covering by
affines whose inverse image under $f'$ is affine. We conclude
by Lemma \ref{lemma-characterize-affine} above.
\end{proof}
\begin{lemma}
\label{lemma-closed-immersion-affine}
A closed immersion is affine.
\end{lemma}
\begin{proof}
The first indication of this is
Schemes, Lemma \ref{schemes-lemma-closed-immersion-affine-case}.
See Schemes, Lemma \ref{schemes-lemma-closed-subspace-scheme}
for a complete statement.
\end{proof}
\begin{lemma}
\label{lemma-affine-s-open}
Let $X$ be a scheme.
Let $\mathcal{L}$ be an invertible $\mathcal{O}_X$-module.
Let $s \in \Gamma(X, \mathcal{L})$.
The inclusion morphism $j : X_s \to X$ is affine.
\end{lemma}
\begin{proof}
This follows from Properties, Lemma \ref{properties-lemma-affine-cap-s-open}
and the definition.
\end{proof}
\begin{lemma}
\label{lemma-affine-permanence}
Suppose $g : X \to Y$ is a morphism of schemes over $S$.
\begin{enumerate}
\item If $X$ is affine over $S$ and $\Delta : Y \to Y \times_S Y$ is affine,
then $g$ is affine.
\item If $X$ is affine over $S$ and $Y$ is separated over $S$,
then $g$ is affine.
\item A morphism from an affine scheme to a scheme with affine
diagonal is affine.
\item A morphism from an affine scheme to a separated scheme is affine.
\end{enumerate}
\end{lemma}
\begin{proof}
Proof of (1). The base change $X \times_S Y \to Y$ is affine by
Lemma \ref{lemma-base-change-affine}.
The morphism $(1, g) : X \to X \times_S Y$ is the base change of
$Y \to Y \times_S Y$ by the morphism $X \times_S Y \to Y \times_S Y$.
Hence it is affine by
Lemma \ref{lemma-base-change-affine}.
The composition of affine morphisms is affine
(see Lemma \ref{lemma-composition-affine}) and (1) follows.
Part (2) follows from (1) as a closed immersion is affine
(see Lemma \ref{lemma-closed-immersion-affine}) and $Y/S$ separated
means $\Delta$ is a closed immersion. Parts (3) and (4) are special
cases of (1) and (2).
\end{proof}
\begin{lemma}
\label{lemma-morphism-affines-affine}
A morphism between affine schemes is affine.
\end{lemma}
\begin{proof}
Immediate from Lemma \ref{lemma-affine-permanence} with
$S = \Spec(\mathbf{Z})$. It also follows directly from the
equivalence of (1) and (2) in Lemma \ref{lemma-characterize-affine}.
\end{proof}
\begin{lemma}
\label{lemma-Artinian-affine}
Let $S$ be a scheme.
Let $A$ be an Artinian ring.
Any morphism $\Spec(A) \to S$ is affine.
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-get-affine}
Let $j : Y \to X$ be an immersion of schemes.
Assume there exists an open $U \subset X$ with complement
$Z = X \setminus U$ such that
\begin{enumerate}
\item $U \to X$ is affine,
\item $j^{-1}(U) \to U$ is affine, and
\item $j(Y) \cap Z$ is closed.
\end{enumerate}
Then $j$ is affine. In particular, if $X$ is affine, so is $Y$.
\end{lemma}
\begin{proof}
By Schemes, Definition \ref{schemes-definition-immersion} there exists an
open subscheme $W \subset X$ such that $j$ factors as a closed immersion
$i : Y \to W$ followed by the inclusion morphism $W \to X$.
Since a closed immersion is affine
(Lemma \ref{lemma-closed-immersion-affine}),
we see that for every $x \in W$ there is an affine open
neighbourhood of $x$ in $X$ whose inverse image under $j$ is affine.
If $x \in U$, then the same thing is true by assumption (2).
Finally, assume $x \in Z$ and $x \not \in W$. Then $x \not \in j(Y) \cap Z$.
By assumption (3) we can find an affine open neighbourhood
$V \subset X$ of $x$ which does not meet $j(Y) \cap Z$.
Then $j^{-1}(V) = j^{-1}(V \cap U)$ which is affine
by assumptions (1) and (2). It follows that $j$ is affine by
Lemma \ref{lemma-characterize-affine}.
\end{proof}
\section{Families of ample invertible modules}
\label{section-families-ample-invertible-modules}
\noindent
A short section on the notion of a family of ample invertible modules.
\begin{definition}
\label{definition-family-ample-invertible-modules}
\begin{reference}
\cite[II Definition 2.2.4]{SGA6}
\end{reference}
Let $X$ be a scheme. Let $\{\mathcal{L}_i\}_{i \in I}$
be a family of invertible $\mathcal{O}_X$-modules. We say
$\{\mathcal{L}_i\}_{i \in I}$ is an
{\it ample family of invertible modules on $X$} if
\begin{enumerate}
\item $X$ is quasi-compact, and
\item for every $x \in X$ there exists an $i \in I$, an $n \geq 1$,
and $s \in \Gamma(X, \mathcal{L}_i^{\otimes n})$ such
that $x \in X_s$ and $X_s$ is affine.
\end{enumerate}
\end{definition}
\noindent
If $\{\mathcal{L}_i\}_{i \in I}$ is an ample family of invertible
modules on a scheme $X$, then there exists a finite subset $I' \subset I$ such
that $\{\mathcal{L}_i\}_{i \in I'}$ is an ample family of invertible
modules on $X$ (follows immediately from quasi-compactness).
A scheme having an ample family of invertible modules has an affine
diagonal by the next lemma and hence is a fortiori quasi-separated.
\begin{lemma}
\label{lemma-affine-diagonal}
Let $X$ be a scheme such that for every point $x \in X$ there exists
an invertible $\mathcal{O}_X$-module $\mathcal{L}$ and a global
section $s \in \Gamma(X, \mathcal{L})$ such that $x \in X_s$ and
$X_s$ is affine. Then the diagonal of $X$ is an affine morphism.
\end{lemma}
\begin{proof}
Given invertible $\mathcal{O}_X$-modules $\mathcal{L}$, $\mathcal{M}$
and global sections $s \in \Gamma(X, \mathcal{L})$,
$t \in \Gamma(X, \mathcal{M})$ such that $X_s$ and $X_t$ are affine
we have to prove $X_s \cap X_t$ is affine. Namely, then
Lemma \ref{lemma-characterize-affine}
applied to $\Delta : X \to X \times X$ and the fact that
$\Delta^{-1}(X_s \times X_t) = X_s \cap X_t$ shows that $\Delta$
is affine. The fact that $X_s \cap X_t$ is affine follows from
Properties, Lemma \ref{properties-lemma-affine-cap-s-open}.
\end{proof}
\begin{remark}
\label{remark-affine-s-opens-cover-family}
In Properties, Lemma \ref{properties-lemma-affine-s-opens-cover-quasi-separated}
we see that a scheme which has an ample invertible module
is separated. This is wrong for schemes having an ample
family of invertible modules. Namely, let $X$ be as in
Schemes, Example \ref{schemes-example-affine-space-zero-doubled}
with $n = 1$, i.e., the affine line with zero doubled. We use the notation
of that example except that we write $x$ for $x_1$ and $y$
for $y_1$. There is, for every integer $n$, an invertible
sheaf $\mathcal{L}_n$ on $X$ which is trivial on $X_1$ and
$X_2$ and whose transition function $U_{12} \to U_{21}$ is
$f(x) \mapsto y^n f(y)$. The global sections of
$\mathcal{L}_n$ are pairs $(f(x), g(y)) \in k[x] \oplus
k[y]$ such that $y^n f(y) = g(y)$. The sections $s = (1,
y)$ of $\mathcal{L}_1$ and $t = (x, 1)$ of
$\mathcal{L}_{-1}$ determine an open affine cover because
$X_s = X_1$ and $X_t = X_2$. Therefore $X$ has an
ample family of invertible modules but it is not separated.
\end{remark}
\section{Quasi-affine morphisms}
\label{section-quasi-affine}
\noindent
Recall that a scheme $X$ is called {\it quasi-affine} if it is quasi-compact
and isomorphic to an open subscheme of an affine scheme, see
Properties, Definition \ref{properties-definition-quasi-affine}.
\begin{definition}
\label{definition-quasi-affine}
A morphism of schemes $f : X \to S$ is called {\it quasi-affine} if the
inverse image of every affine open of $S$ is a quasi-affine scheme.
\end{definition}
\begin{lemma}
\label{lemma-quasi-affine-separated}
A quasi-affine morphism is separated and quasi-compact.
\end{lemma}
\begin{proof}
Let $f : X \to S$ be quasi-affine.
Quasi-compactness is immediate from
Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine}.
Let $U \subset S$ be an affine open. If we can show that
$f^{-1}(U)$ is a separated scheme, then $f$ is separated
(Schemes, Lemma \ref{schemes-lemma-characterize-separated}
shows that being separated is local on the base).
By assumption $f^{-1}(U)$ is isomorphic to an open subscheme
of an affine scheme. An affine scheme is separated and hence
every open subscheme of an affine scheme is separated as desired.
\end{proof}
\begin{lemma}
\label{lemma-characterize-quasi-affine}
Let $f : X \to S$ be a morphism of schemes.
The following are equivalent
\begin{enumerate}
\item The morphism $f$ is quasi-affine.
\item There exists an affine open covering $S = \bigcup W_j$
such that each $f^{-1}(W_j)$ is quasi-affine.
\item There exists a quasi-coherent sheaf of $\mathcal{O}_S$-algebras
$\mathcal{A}$ and a quasi-compact open immersion
$$
\xymatrix{
X \ar[rr] \ar[rd] & & \underline{\Spec}_S(\mathcal{A}) \ar[dl] \\
& S &
}
$$
over $S$.
\item Same as in (3) but with $\mathcal{A} = f_*\mathcal{O}_X$
and the horizontal arrow the canonical morphism of
Constructions, Lemma \ref{constructions-lemma-canonical-morphism}.
\end{enumerate}
\end{lemma}
\begin{proof}
It is obvious that (1) implies (2) and that (4) implies (3).
\medskip\noindent
Assume $S = \bigcup_{j \in J} W_j$ is an affine open covering such that
each $f^{-1}(W_j)$ is quasi-affine. By
Schemes, Lemma \ref{schemes-lemma-quasi-compact-affine} we see
that $f$ is quasi-compact. By
Schemes, Lemma \ref{schemes-lemma-characterize-quasi-separated}
we see the morphism $f$ is quasi-separated. Hence by
Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent} the
sheaf $\mathcal{A} = f_*\mathcal{O}_X$ is a quasi-coherent sheaf
of $\mathcal{O}_X$-algebras. Thus we have the scheme
$g : Y = \underline{\Spec}_S(\mathcal{A}) \to S$ over $S$.
The identity map
$\text{id} : \mathcal{A} = f_*\mathcal{O}_X \to f_*\mathcal{O}_X$
provides, via the definition of the relative spectrum,
a morphism $can : X \to Y$ over $S$, see
Constructions, Lemma \ref{constructions-lemma-canonical-morphism}.
By assumption, the lemma just cited, and
Properties, Lemma \ref{properties-lemma-quasi-affine}
the restriction $can|_{f^{-1}(W_j)} : f^{-1}(W_j) \to g^{-1}(W_j)$
is a quasi-compact open immersion. Thus $can$ is a quasi-compact
open immersion. We have shown that (2) implies (4).
\medskip\noindent
Assume (3). Choose any affine open $U \subset S$.
By Constructions, Lemma \ref{constructions-lemma-spec-properties}
we see that the inverse image of $U$ in the relative spectrum
is affine. Hence we conclude that $f^{-1}(U)$ is quasi-affine
(note that quasi-compactness is encoded in (3) as well).
Thus (3) implies (1).
\end{proof}
\begin{lemma}
\label{lemma-composition-quasi-affine}
The composition of quasi-affine morphisms is quasi-affine.
\end{lemma}
\begin{proof}
Let $f : X \to Y$ and $g : Y \to Z$ be quasi-affine morphisms.
Let $U \subset Z$ be affine open. Then $g^{-1}(U)$ is quasi-affine
by assumption on $g$. Let $j : g^{-1}(U) \to V$ be a quasi-compact
open immersion into an affine scheme $V$.
By Lemma \ref{lemma-characterize-quasi-affine} above
we see that $f^{-1}(g^{-1}(U))$
is a quasi-compact open subscheme of the relative spectrum
$\underline{\Spec}_{g^{-1}(U)}(\mathcal{A})$ for
some quasi-coherent sheaf of $\mathcal{O}_{g^{-1}(U)}$-algebras
$\mathcal{A}$. By
Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}
the sheaf $\mathcal{A}' = j_*\mathcal{A}$
is a quasi-coherent sheaf of $\mathcal{O}_V$-algebras
with the property that $j^*\mathcal{A}' = \mathcal{A}$.
Hence we get a commutative diagram
$$
\xymatrix{
f^{-1}(g^{-1}(U)) \ar[r] &
\underline{\Spec}_{g^{-1}(U)}(\mathcal{A})
\ar[r] \ar[d] &
\underline{\Spec}_V(\mathcal{A}') \ar[d] \\
& g^{-1}(U) \ar[r]^j & V
}
$$
with the square being a fibre square,
see Constructions, Lemma \ref{constructions-lemma-spec-properties}.
Note that the upper right corner is an affine scheme.
Hence $(g \circ f)^{-1}(U)$ is quasi-affine.
\end{proof}
\begin{lemma}
\label{lemma-base-change-quasi-affine}
The base change of a quasi-affine morphism is quasi-affine.
\end{lemma}
\begin{proof}
Let $f : X \to S$ be a quasi-affine morphism.
By Lemma \ref{lemma-characterize-quasi-affine} above
we can find a quasi-coherent sheaf
of $\mathcal{O}_S$-algebras $\mathcal{A}$ and a quasi-compact
open immersion $X \to \underline{\Spec}_S(\mathcal{A})$
over $S$.
Let $g : S' \to S$ be any morphism.
Denote $f' : X_{S'} = S' \times_S X \to S'$ the base change of $f$.
Since the base change of a quasi-compact open immersion is
a quasi-compact open immersion we see that
$X_{S'} \to \underline{\Spec}_{S'}(g^*\mathcal{A})$
is a quasi-compact open immersion
(we have used Schemes, Lemmas
\ref{schemes-lemma-quasi-compact-preserved-base-change} and
\ref{schemes-lemma-base-change-immersion} and
Constructions, Lemma \ref{constructions-lemma-spec-properties}).
By Lemma \ref{lemma-characterize-quasi-affine} again
we conclude that $X_{S'} \to S'$ is quasi-affine.
\end{proof}
\begin{lemma}
\label{lemma-quasi-compact-immersion-quasi-affine}
A quasi-compact immersion is quasi-affine.
\end{lemma}
\begin{proof}
Let $X \to S$ be a quasi-compact immersion. We have to show the
inverse image of every affine open is quasi-affine. Hence,
assuming $S$ is an affine scheme, we have to show
$X$ is quasi-affine. By Lemma \ref{lemma-quasi-compact-immersion}
the morphism $X \to S$ factors as $X \to Z \to S$ where $Z$ is a closed
subscheme of $S$ and $X \subset Z$ is a quasi-compact open.
Since $S$ is affine Lemma \ref{lemma-closed-immersion} implies
$Z$ is affine. Hence we win.
\end{proof}
\begin{lemma}
\label{lemma-affine-quasi-affine}
Let $S$ be a scheme. Let $X$ be an affine scheme.
A morphism $f : X \to S$ is quasi-affine if and only if it is quasi-compact.
In particular any morphism from an affine scheme to a quasi-separated
scheme is quasi-affine.
\end{lemma}
\begin{proof}
Let $V \subset S$ be an affine open. Then $f^{-1}(V)$ is an open subscheme
of the affine scheme $X$, hence quasi-affine if and only if it is
quasi-compact. This proves the first assertion. The quasi-compactness of any
$f : X \to S$ where $X$ is affine and $S$ quasi-separated follows from
Schemes, Lemma \ref{schemes-lemma-quasi-compact-permanence}
applied to $X \to S \to \Spec(\mathbf{Z})$.
\end{proof}
\begin{lemma}
\label{lemma-quasi-affine-permanence}
Suppose $g : X \to Y$ is a morphism of schemes over $S$.
If $X$ is quasi-affine over $S$ and $Y$ is quasi-separated over $S$,
then $g$ is quasi-affine. In particular, any morphism from a
quasi-affine scheme to a quasi-separated scheme is quasi-affine.
\end{lemma}
\begin{proof}
The base change $X \times_S Y \to Y$ is quasi-affine by
Lemma \ref{lemma-base-change-quasi-affine}.
The morphism $X \to X \times_S Y$ is
a quasi-compact immersion as $Y \to S$ is quasi-separated, see
Schemes, Lemma \ref{schemes-lemma-section-immersion}.
A quasi-compact immersion is quasi-affine by
Lemma \ref{lemma-quasi-compact-immersion-quasi-affine}
and the composition of quasi-affine morphisms is quasi-affine
(see Lemma \ref{lemma-composition-quasi-affine}). Thus we win.
\end{proof}
\section{Types of morphisms defined by properties of ring maps}
\label{section-properties-ring-maps}
\noindent
In this section we study what properties of ring maps
allow one to define local properties of morphisms of schemes.
\begin{definition}
\label{definition-property-local}
Let $P$ be a property of ring maps.
\begin{enumerate}
\item We say that $P$ is {\it local} if the following hold:
\begin{enumerate}
\item For any ring map $R \to A$, and any $f \in R$ we have
$P(R \to A) \Rightarrow P(R_f \to A_f)$.
\item For any rings $R$, $A$, any $f \in R$, $a\in A$, and any ring map
$R_f \to A$ we have $P(R_f \to A) \Rightarrow P(R \to A_a)$.
\item For any ring map $R \to A$, and $a_i \in A$ such that
$(a_1, \ldots, a_n) = A$ then
$\forall i, P(R \to A_{a_i}) \Rightarrow P(R \to A)$.
\end{enumerate}
\item We say that $P$ is {\it stable under base change} if for any
ring maps $R \to A$, $R \to R'$ we have
$P(R \to A) \Rightarrow P(R' \to R' \otimes_R A)$.
\item We say that $P$ is {\it stable under composition} if for any
ring maps $A \to B$, $B \to C$ we have
$P(A \to B) \wedge P(B \to C) \Rightarrow P(A \to C)$.
\end{enumerate}
\end{definition}
\begin{definition}
\label{definition-locally-P}
Let $P$ be a property of ring maps.
Let $f : X \to S$ be a morphism of schemes.
We say $f$ is {\it locally of type $P$} if for any $x \in X$
there exists an affine open neighbourhood $U$ of $x$
in $X$ which maps into an affine open $V \subset S$ such that
the induced ring map $\mathcal{O}_S(V) \to \mathcal{O}_X(U)$
has property $P$.
\end{definition}
\noindent
This is not a ``good'' definition unless the property $P$ is
a local property. Even if $P$ is a local property we will not
automatically use this definition to say that a morphism is
``locally of type $P$'' unless we also explicitly state the
definition elsewhere.
\begin{lemma}
\label{lemma-locally-P}
Let $f : X \to S$ be a morphism of schemes.
Let $P$ be a property of ring maps.
Let $U$ be an affine open of $X$,
and $V$ an affine open of $S$ such that
$f(U) \subset V$.
If $f$ is locally of type $P$ and $P$ is local,
then $P(\mathcal{O}_S(V) \to \mathcal{O}_X(U))$ holds.
\end{lemma}
\begin{proof}
As $f$ is locally of type $P$ for every $u \in U$ there exists an
affine open $U_u \subset X$ mapping into an affine open $V_u \subset S$
such that $P(\mathcal{O}_S(V_u) \to \mathcal{O}_X(U_u))$ holds.
Choose an open neighbourhood $U'_u \subset U \cap U_u$ of $u$
which is standard affine open in both $U$ and $U_u$, see
Schemes, Lemma \ref{schemes-lemma-standard-open-two-affines}.
By Definition \ref{definition-property-local} (1)(b)
we see that $P(\mathcal{O}_S(V_u) \to \mathcal{O}_X(U'_u))$ holds.
Hence we may assume that $U_u \subset U$ is a standard affine open.
Choose an open neighbourhood $V'_u \subset V \cap V_u$
of $f(u)$ which is standard affine open in both $V$ and $V_u$, see
Schemes, Lemma \ref{schemes-lemma-standard-open-two-affines}.
Then $U'_u = f^{-1}(V'_u) \cap U_u$ is a standard affine open
of $U_u$ (hence of $U$) and we have
$P(\mathcal{O}_S(V'_u) \to \mathcal{O}_X(U'_u))$ by
Definition \ref{definition-property-local} (1)(a).
Hence we may assume both $U_u \subset U$ and $V_u \subset V$
are standard affine open. Applying
Definition \ref{definition-property-local} (1)(b)
one more time we conclude that $P(\mathcal{O}_S(V) \to \mathcal{O}_X(U_u))$
holds. Because $U$ is quasi-compact we may choose a finite number
of points $u_1, \ldots, u_n \in U$ such that
$$
U = U_{u_1} \cup \ldots \cup U_{u_n}.
$$
By Definition \ref{definition-property-local} (1)(c)
we conclude that $P(\mathcal{O}_S(V) \to \mathcal{O}_X(U))$ holds.
\end{proof}
\begin{lemma}
\label{lemma-locally-P-characterize}
Let $P$ be a local property of ring maps.
Let $f : X \to S$ be a morphism of schemes.
The following are equivalent
\begin{enumerate}
\item The morphism $f$ is locally of type $P$.
\item For every affine opens $U \subset X$, $V \subset S$
with $f(U) \subset V$ we have $P(\mathcal{O}_S(V) \to \mathcal{O}_X(U))$.
\item There exists an open covering $S = \bigcup_{j \in J} V_j$
and open coverings $f^{-1}(V_j) = \bigcup_{i \in I_j} U_i$ such
that each of the morphisms $U_i \to V_j$, $j\in J, i\in I_j$
is locally of type $P$.
\item There exists an affine open covering $S = \bigcup_{j \in J} V_j$
and affine open coverings $f^{-1}(V_j) = \bigcup_{i \in I_j} U_i$ such
that $P(\mathcal{O}_S(V_j) \to \mathcal{O}_X(U_i))$ holds, for all
$j\in J, i\in I_j$.
\end{enumerate}
Moreover, if $f$ is locally of type $P$ then for
any open subschemes $U \subset X$, $V \subset S$ with $f(U) \subset V$
the restriction $f|_U : U \to V$ is locally of type $P$.
\end{lemma}
\begin{proof}
This follows from Lemma \ref{lemma-locally-P} above.
\end{proof}
\begin{lemma}
\label{lemma-composition-type-P}
Let $P$ be a property of ring maps.
Assume $P$ is local and stable under composition.
The composition of morphisms locally of type $P$ is
locally of type $P$.
\end{lemma}
\begin{proof}
Let $f : X \to Y$ and $g : Y \to Z$ be morphisms locally of type $P$.
Let $x \in X$. Choose an affine open neighbourhood $W \subset Z$ of
$g(f(x))$. Choose an affine open neighbourhood $V \subset g^{-1}(W)$
of $f(x)$. Choose an affine open neighbourhood $U \subset f^{-1}(V)$
of $x$. By Lemma \ref{lemma-locally-P-characterize} the ring maps
$\mathcal{O}_Z(W) \to \mathcal{O}_Y(V)$ and
$\mathcal{O}_Y(V) \to \mathcal{O}_X(U)$ satisfy $P$.
Hence $\mathcal{O}_Z(W) \to \mathcal{O}_X(U)$ satisfies $P$
as $P$ is assumed stable under composition.
\end{proof}
\begin{lemma}
\label{lemma-base-change-type-P}
Let $P$ be a property of ring maps.
Assume $P$ is local and stable under base change.
The base change of a morphism locally of type $P$
is locally of type $P$.
\end{lemma}
\begin{proof}
Let $f : X \to S$ be a morphism locally of type $P$.
Let $S' \to S$ be any morphism. Denote
$f' : X_{S'} = S' \times_S X \to S'$ the base change of $f$.
For every $s' \in S'$ there exists an open affine neighbourhood
$s' \in V' \subset S'$ which maps into some open affine $V \subset S$.
By Lemma \ref{lemma-locally-P-characterize} the open $f^{-1}(V)$ is a
union of affines $U_i$ such that the ring maps
$\mathcal{O}_S(V) \to \mathcal{O}_X(U_i)$ all satisfy $P$.
By the material in Schemes, Section \ref{schemes-section-fibre-products}
we see that $f^{-1}(U)_{V'} = V' \times_V f^{-1}(V)$ is
the union of the affine opens $V' \times_V U_i$.
Since $\mathcal{O}_{X_{S'}}(V' \times_V U_i) =
\mathcal{O}_{S'}(V') \otimes_{\mathcal{O}_S(V)} \mathcal{O}_X(U_i)$
we see that the ring maps
$\mathcal{O}_{S'}(V') \to \mathcal{O}_{X_{S'}}(V' \times_V U_i)$
satisfy $P$ as $P$ is assumed stable under base change.
\end{proof}
\begin{lemma}
\label{lemma-properties-local}
The following properties of a ring map $R \to A$ are local.
\begin{enumerate}
\item (Isomorphism on local rings.)
For every prime $\mathfrak q$ of $A$ lying over $\mathfrak p \subset R$
the ring map $R \to A$ induces an isomorphism
$R_{\mathfrak p} \to A_{\mathfrak q}$.
\item (Open immersion.)
For every prime $\mathfrak q$ of $A$ there exists an $f \in R$,
$\varphi(f) \not \in \mathfrak q$ such that the ring map $\varphi : R \to A$
induces an isomorphism $R_f \to A_f$.
\item (Reduced fibres.)
For every prime $\mathfrak p$ of $R$ the fibre ring
$A \otimes_R \kappa(\mathfrak p)$ is reduced.
\item (Fibres of dimension at most $n$.)
For every prime $\mathfrak p$ of $R$ the fibre ring
$A \otimes_R \kappa(\mathfrak p)$ has Krull dimension at most $n$.
\item (Locally Noetherian on the target.)
The ring map $R \to A$ has the property that $A$ is Noetherian.
\item Add more here as needed\footnote{But only those properties
that are not already dealt with separately elsewhere.}.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-properties-base-change}
The following properties of ring maps are stable under base change.
\begin{enumerate}
\item (Isomorphism on local rings.)
For every prime $\mathfrak q$ of $A$ lying over $\mathfrak p \subset R$
the ring map $R \to A$ induces an isomorphism
$R_{\mathfrak p} \to A_{\mathfrak q}$.
\item (Open immersion.)
For every prime $\mathfrak q$ of $A$ there exists an $f \in R$,
$\varphi(f) \not \in \mathfrak q$ such that the ring map $\varphi : R \to A$
induces an isomorphism $R_f \to A_f$.
\item Add more here as needed\footnote{But only those properties
that are not already dealt with separately elsewhere.}.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\begin{lemma}
\label{lemma-properties-composition}
The following properties of ring maps are stable under composition.
\begin{enumerate}
\item (Isomorphism on local rings.)
For every prime $\mathfrak q$ of $A$ lying over $\mathfrak p \subset R$
the ring map $R \to A$ induces an isomorphism
$R_{\mathfrak p} \to A_{\mathfrak q}$.
\item (Open immersion.)
For every prime $\mathfrak q$ of $A$ there exists an $f \in R$,
$\varphi(f) \not \in \mathfrak q$ such that the ring map $\varphi : R \to A$
induces an isomorphism $R_f \to A_f$.
\item (Locally Noetherian on the target.)
The ring map $R \to A$ has the property that $A$ is Noetherian.
\item Add more here as needed\footnote{But only those properties
that are not already dealt with separately elsewhere.}.
\end{enumerate}
\end{lemma}
\begin{proof}
Omitted.
\end{proof}
\section{Morphisms of finite type}
\label{section-finite-type}
\noindent
Recall that a ring map $R \to A$ is said to be of finite type if
$A$ is isomorphic to a quotient of $R[x_1, \ldots, x_n]$ as an $R$-algebra, see
Algebra, Definition \ref{algebra-definition-finite-type}.
\begin{definition}
\label{definition-finite-type}
Let $f : X \to S$ be a morphism of schemes.
\begin{enumerate}
\item We say that $f$ is of {\it finite type at $x \in X$} if
there exists an affine open neighbourhood $\Spec(A) = U \subset X$
of $x$ and an affine open $\Spec(R) = V \subset S$
with $f(U) \subset V$ such that the induced ring map
$R \to A$ is of finite type.
\item We say that $f$ is {\it locally of finite type} if it is
of finite type at every point of $X$.
\item We say that $f$ is of {\it finite type} if it is locally of
finite type and quasi-compact.
\end{enumerate}
\end{definition}
\begin{lemma}
\label{lemma-locally-finite-type-characterize}
Let $f : X \to S$ be a morphism of schemes.
The following are equivalent
\begin{enumerate}
\item The morphism $f$ is locally of finite type.
\item For all affine opens $U \subset X$, $V \subset S$
with $f(U) \subset V$ the ring map
$\mathcal{O}_S(V) \to \mathcal{O}_X(U)$ is of finite type.
\item There exist an open covering $S = \bigcup_{j \in J} V_j$
and open coverings $f^{-1}(V_j) = \bigcup_{i \in I_j} U_i$ such
that each of the morphisms $U_i \to V_j$, $j\in J, i\in I_j$
is locally of finite type.
\item There exist an affine open covering $S = \bigcup_{j \in J} V_j$
and affine open coverings $f^{-1}(V_j) = \bigcup_{i \in I_j} U_i$ such
that the ring map $\mathcal{O}_S(V_j) \to \mathcal{O}_X(U_i)$ is
of finite type, for all $j\in J, i\in I_j$.
\end{enumerate}
Moreover, if $f$ is locally of finite type then for
any open subschemes $U \subset X$, $V \subset S$ with $f(U) \subset V$
the restriction $f|_U : U \to V$ is locally of finite type.
\end{lemma}
\begin{proof}
This follows from Lemma \ref{lemma-locally-P} if we show that
the property ``$R \to A$ is of finite type'' is local.
We check conditions (a), (b) and (c) of Definition
\ref{definition-property-local}.
By Algebra, Lemma \ref{algebra-lemma-base-change-finiteness}
being of finite type is stable under base change and hence
we conclude (a) holds. By Algebra, Lemma
\ref{algebra-lemma-compose-finite-type} being of finite type
is stable under composition and trivially for any ring
$R$ the ring map $R \to R_f$ is of finite type.
We conclude (b) holds. Finally, property (c) is true
according to Algebra, Lemma \ref{algebra-lemma-cover-upstairs}.
\end{proof}
\begin{lemma}
\label{lemma-composition-finite-type}
The composition of two morphisms which are locally of finite type is
locally of finite type. The same is true for morphisms of finite type.
\end{lemma}
\begin{proof}
In the proof of Lemma \ref{lemma-locally-finite-type-characterize}
we saw that being of finite type is a local property of ring maps.
Hence the first statement of the lemma follows from
Lemma \ref{lemma-composition-type-P} combined
with the fact that being of finite type is a property of ring maps that is
stable under composition, see
Algebra, Lemma \ref{algebra-lemma-compose-finite-type}.
By the above and the fact that compositions of
quasi-compact morphisms are quasi-compact, see
Schemes, Lemma \ref{schemes-lemma-composition-quasi-compact}
we see that the composition of morphisms of finite type is
of finite type.
\end{proof}
\begin{lemma}
\label{lemma-base-change-finite-type}
The base change of a morphism which is locally of finite type
is locally of finite type. The same is true for morphisms of
finite type.
\end{lemma}
\begin{proof}
In the proof of Lemma \ref{lemma-locally-finite-type-characterize}
we saw that being of finite type is a local property of ring maps.
Hence the first statement of the lemma follows from
Lemma \ref{lemma-base-change-type-P} combined
with the fact that being of finite type is a property of ring maps that is
stable under base change, see
Algebra, Lemma \ref{algebra-lemma-base-change-finiteness}.
By the above and the fact that a base change of a
quasi-compact morphism is quasi-compact, see
Schemes, Lemma \ref{schemes-lemma-quasi-compact-preserved-base-change}
we see that the base change of a morphism of finite type is
a morphism of finite type.
\end{proof}
\begin{lemma}
\label{lemma-immersion-locally-finite-type}
A closed immersion is of finite type.
An immersion is locally of finite type.
\end{lemma}
\begin{proof}
This is true because an open immersion is a local isomorphism,
and a closed immersion is obviously of finite type.
\end{proof}
\begin{lemma}
\label{lemma-finite-type-noetherian}
Let $f : X \to S$ be a morphism.
If $S$ is (locally) Noetherian and $f$ (locally) of finite type
then $X$ is (locally) Noetherian.
\end{lemma}
\begin{proof}
This follows immediately from the fact that a ring
of finite type over a Noetherian ring is Noetherian,
see Algebra, Lemma \ref{algebra-lemma-Noetherian-permanence}.
(Also: use the fact that the source of a quasi-compact morphism
with quasi-compact target is quasi-compact.)
\end{proof}
\begin{lemma}
\label{lemma-finite-type-Noetherian-quasi-separated}
Let $f : X \to S$ be locally of finite type with $S$ locally Noetherian.
Then $f$ is quasi-separated.
\end{lemma}
\begin{proof}
In fact, it is true that $X$ is quasi-separated, see
Properties, Lemma \ref{properties-lemma-locally-Noetherian-quasi-separated}
and Lemma \ref{lemma-finite-type-noetherian} above.
Then apply Schemes, Lemma \ref{schemes-lemma-compose-after-separated}
to conclude that $f$ is quasi-separated.
\end{proof}
\begin{lemma}
\label{lemma-permanence-finite-type}
Let $X \to Y$ be a morphism of schemes over a base scheme $S$.
If $X$ is locally of finite type over $S$, then $X \to Y$
is locally of finite type.
\end{lemma}
\begin{proof}
Via Lemma \ref{lemma-locally-finite-type-characterize} this translates
into the following algebra