## 36.38 Zariski's Main Theorem

In this section we prove Zariski's main theorem as reformulated by Grothendieck. Often when we say “Zariski's main theorem” in this content we mean either of Lemma 36.38.1, Lemma 36.38.2, or Lemma 36.38.3. In most texts people refer to the last of these as Zariski's main theorem. These lemmas have many consequences some of which the reader can find in this section.

We have already proved the algebraic version in Algebra, Theorem 10.122.13 and we have already restated this algebraic version in the language of schemes, see Morphisms, Theorem 28.53.1. The version in this section is more subtle; to get the full result we use the étale localization techniques of Section 36.36 to reduce to the algebraic case.

Lemma 36.38.1. Let $f : X \to S$ be a morphism of schemes. Assume $f$ is of finite type and separated. Let $S'$ be the normalization of $S$ in $X$, see Morphisms, Definition 28.51.3. Picture:

\[ \xymatrix{ X \ar[rd]_ f \ar[rr]_{f'} & & S' \ar[ld]^\nu \\ & S & } \]

Then there exists an open subscheme $U' \subset S'$ such that

$(f')^{-1}(U') \to U'$ is an isomorphism, and

$(f')^{-1}(U') \subset X$ is the set of points at which $f$ is quasi-finite.

**Proof.**
By Morphisms, Lemma 28.53.2 the subset $U \subset X$ of points where $f$ is quasi-finite is open. The lemma is equivalent to

$U' = f'(U) \subset S'$ is open,

$U = f^{-1}(U')$, and

$U \to U'$ is an isomorphism.

Let $x \in U$ be arbitrary. We claim there exists an open neighbourhood $f'(x) \in V \subset S'$ such that $(f')^{-1}V \to V$ is an isomorphism. We first prove the claim implies the lemma. Namely, then $(f')^{-1}V \cong V$ is both locally of finite type over $S$ (as an open subscheme of $X$) and for $v \in V$ the residue field extension $\kappa (v) \supset \kappa (\nu (v))$ is algebraic (as $V \subset S'$ and $S'$ is integral over $S$). Hence the fibres of $V \to S$ are discrete (Morphisms, Lemma 28.19.2) and $(f')^{-1}V \to S$ is locally quasi-finite (Morphisms, Lemma 28.19.8). This implies $(f')^{-1}V \subset U$ and $V \subset U'$. Since $x$ was arbitrary we see that (a), (b), and (c) are true.

Let $s = f(x)$. Let $(T, t) \to (S, s)$ be an elementary étale neighbourhood. Denote by a subscript ${}_ T$ the base change to $T$. Let $y = (x, t) \in X_ T$ be the unique point in the fibre $X_ t$ lying over $x$. Note that $U_ T \subset X_ T$ is the set of points where $f_ T$ is quasi-finite, see Morphisms, Lemma 28.19.13. Note that

\[ X_ T \xrightarrow {f'_ T} S'_ T \xrightarrow {\nu _ T} T \]

is the normalization of $T$ in $X_ T$, see Lemma 36.17.2. Suppose that the claim holds for $y \in U_ T \subset X_ T \to S'_ T \to T$, i.e., suppose that we can find an open neighbourhood $f'_ T(y) \in V' \subset S'_ T$ such that $(f'_ T)^{-1}V' \to V'$ is an isomorphism. The morphism $S'_ T \to S'$ is étale hence the image $V \subset S'$ of $V'$ is open. Observe that $f'(x) \in V$ as $f'_ T(y) \in V'$. Observe that

\[ \xymatrix{ (f'_ T)^{-1}V' \ar[r] \ar[d] & (f')^{-1}(V) \ar[d] \\ V' \ar[r] & V } \]

is a fibre square (as $S'_ T \times _{S'} X = X_ T$). Since the left vertical arrow is an isomorphism and $\{ V' \to V\} $ is a étale covering, we conclude that the right vertical arrow is an isomorphism by Descent, Lemma 34.20.17. In other words, the claim holds for $x \in U \subset X \to S' \to S$.

By the result of the previous paragraph we may replace $S$ by an elementary étale neighbourhood of $s = f(x)$ in order to prove the claim. Thus we may assume there is a decomposition

\[ X = V \amalg W \]

into open and closed subschemes where $V \to S$ is finite and $x \in V$, see Lemma 36.36.4. Since $X$ is a disjoint union of $V$ and $W$ over $S$ and since $V \to S$ is finite we see that the normalization of $S$ in $X$ is the morphism

\[ X = V \amalg W \longrightarrow V \amalg W' \longrightarrow S \]

where $W'$ is the normalization of $S$ in $W$, see Morphisms, Lemmas 28.51.10, 28.42.4, and 28.51.12. The claim follows and we win.
$\square$

Lemma 36.38.2. Let $f : X \to S$ be a morphism of schemes. Assume $f$ is quasi-finite and separated. Let $S'$ be the normalization of $S$ in $X$, see Morphisms, Definition 28.51.3. Picture:

\[ \xymatrix{ X \ar[rd]_ f \ar[rr]_{f'} & & S' \ar[ld]^\nu \\ & S & } \]

Then $f'$ is a quasi-compact open immersion and $\nu $ is integral. In particular $f$ is quasi-affine.

**Proof.**
This follows from Lemma 36.38.1. Namely, by that lemma there exists an open subscheme $U' \subset S'$ such that $(f')^{-1}(U') = X$ (!) and $X \to U'$ is an isomorphism! In other words, $f'$ is an open immersion. Note that $f'$ is quasi-compact as $f$ is quasi-compact and $\nu : S' \to S$ is separated (Schemes, Lemma 25.21.15). It follows that $f$ is quasi-affine by Morphisms, Lemma 28.12.3.
$\square$

reference
Lemma 36.38.3 (Zariski's Main Theorem). Let $f : X \to S$ be a morphism of schemes. Assume $f$ is quasi-finite and separated and assume that $S$ is quasi-compact and quasi-separated. Then there exists a factorization

\[ \xymatrix{ X \ar[rd]_ f \ar[rr]_ j & & T \ar[ld]^\pi \\ & S & } \]

where $j$ is a quasi-compact open immersion and $\pi $ is finite.

**Proof.**
Let $X \to S' \to S$ be as in the conclusion of Lemma 36.38.2. By Properties, Lemma 27.22.13 we can write $\nu _*\mathcal{O}_{S'} = \mathop{\mathrm{colim}}\nolimits _{i \in I} \mathcal{A}_ i$ as a directed colimit of finite quasi-coherent $\mathcal{O}_ X$-algebras $\mathcal{A}_ i \subset \nu _*\mathcal{O}_{S'}$. Then $\pi _ i : T_ i = \underline{\mathop{\mathrm{Spec}}}_ S(\mathcal{A}_ i) \to S$ is a finite morphism for each $i$. Note that the transition morphisms $T_{i'} \to T_ i$ are affine and that $S' = \mathop{\mathrm{lim}}\nolimits T_ i$.

By Limits, Lemma 31.4.11 there exists an $i$ and a quasi-compact open $U_ i \subset T_ i$ whose inverse image in $S'$ equals $f'(X)$. For $i' \geq i$ let $U_{i'}$ be the inverse image of $U_ i$ in $T_{i'}$. Then $X \cong f'(X) = \mathop{\mathrm{lim}}\nolimits _{i' \geq i} U_{i'}$, see Limits, Lemma 31.2.2. By Limits, Lemma 31.4.16 we see that $X \to U_{i'}$ is a closed immersion for some $i' \geq i$. (In fact $X \cong U_{i'}$ for sufficiently large $i'$ but we don't need this.) Hence $X \to T_{i'}$ is an immersion. By Morphisms, Lemma 28.3.2 we can factor this as $X \to T \to T_{i'}$ where the first arrow is an open immersion and the second a closed immersion. Thus we win.
$\square$

Lemma 36.38.4. Let $f : X \to S$ be a morphism of schemes. The following are equivalent:

$f$ is finite,

$f$ is proper with finite fibres,

$f$ is proper and locally quasi-finite,

$f$ is universally closed, separated, locally of finite type and has finite fibres.

**Proof.**
We have (1) implies (2) by Morphisms, Lemmas 28.42.11, 28.19.10, and 28.42.10. We have (2) implies (3) by Morphisms, Lemma 28.19.7. We have (3) implies (4) by the definition of proper morphisms and Morphisms, Lemmas 28.19.9 and 28.19.10.

Assume (3). Pick $s \in S$. By Morphisms, Lemma 28.19.7 we see that all the finitely many points of $X_ s$ are isolated in $X_ s$. Choose an elementary étale neighbourhood $(U, u) \to (S, s)$ and decomposition $X_ U = V \amalg W$ as in Lemma 36.36.6. Note that $W_ u = \emptyset $ because all points of $X_ s$ are isolated. Since $f$ is universally closed we see that the image of $W$ in $U$ is a closed set not containing $u$. After shrinking $U$ we may assume that $W = \emptyset $. In other words we see that $X_ U = V$ is finite over $U$. Since $s \in S$ was arbitrary this means there exists a family $\{ U_ i \to S\} $ of étale morphisms whose images cover $S$ such that the base changes $X_{U_ i} \to U_ i$ are finite. Note that $\{ U_ i \to S\} $ is an étale covering, see Topologies, Definition 33.4.1. Hence it is an fpqc covering, see Topologies, Lemma 33.9.6. Hence we conclude $f$ is finite by Descent, Lemma 34.20.23.
$\square$

As a consequence we have the following useful results.

Lemma 36.38.5. Let $f : X \to S$ be a morphism of schemes. Let $s \in S$. Assume that $f$ is proper and $f^{-1}(\{ s\} )$ is a finite set. Then there exists an open neighbourhood $V \subset S$ of $s$ such that $f|_{f^{-1}(V)} : f^{-1}(V) \to V$ is finite.

**Proof.**
The morphism $f$ is quasi-finite at all the points of $f^{-1}(\{ s\} )$ by Morphisms, Lemma 28.19.7. By Morphisms, Lemma 28.53.2 the set of points at which $f$ is quasi-finite is an open $U \subset X$. Let $Z = X \setminus U$. Then $s \not\in f(Z)$. Since $f$ is proper the set $f(Z) \subset S$ is closed. Choose any open neighbourhood $V \subset S$ of $s$ with $f(Z) \cap V = \emptyset $. Then $f^{-1}(V) \to V$ is locally quasi-finite and proper. Hence it is quasi-finite (Morphisms, Lemma 28.19.9), hence has finite fibres (Morphisms, Lemma 28.19.10), hence is finite by Lemma 36.38.4.
$\square$

Lemma 36.38.6. Consider a commutative diagram of schemes

\[ \xymatrix{ X \ar[rr]_ h \ar[rd]_ f & & Y \ar[ld]^ g \\ & S } \]

Let $s \in S$. Assume

$X \to S$ is a proper morphism,

$Y \to S$ is separated and locally of finite type, and

the image of $X_ s \to Y_ s$ is finite.

Then there is an open subspace $U \subset S$ containing $s$ such that $X_ U \to Y_ U$ factors through a closed subscheme $Z \subset Y_ U$ finite over $U$.

**Proof.**
Let $Z \subset Y$ be the scheme theoretic image of $h$, see Morphisms, Section 28.6. By Morphisms, Lemma 28.39.10 the morphism $X \to Z$ is surjective and $Z \to S$ is proper. Thus $X_ s \to Z_ s$ is surjective. We see that either (3) implies $Z_ s$ is finite. Hence $Z \to S$ is finite in an open neighbourhood of $s$ by Lemma 36.38.5.
$\square$

Lemma 36.38.7. Let $f : Y \to X$ be a quasi-finite morphism. There exists a dense open $U \subset X$ such that $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite.

**Proof.**
If $U_ i \subset X$, $i \in I$ is a collection of opens such that the restrictions $f|_{f^{-1}(U_ i)} : f^{-1}(U_ i) \to U_ i$ are finite, then with $U = \bigcup U_ i$ the restriction $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite, see Morphisms, Lemma 28.42.3. Thus the problem is local on $X$ and we may assume that $X$ is affine.

Assume $X$ is affine. Write $Y = \bigcup _{j = 1, \ldots , m} V_ j$ with $V_ j$ affine. This is possible since $f$ is quasi-finite and hence in particular quasi-compact. Each $V_ j \to X$ is quasi-finite and separated. Let $\eta \in X$ be a generic point of an irreducible component of $X$. We see from Morphisms, Lemmas 28.19.10 and 28.49.1 that there exists an open neighbourhood $\eta \in U_\eta $ such that $f^{-1}(U_\eta ) \cap V_ j \to U_\eta $ is finite. We may choose $U_\eta $ such that it works for each $j = 1, \ldots , m$. Note that the collection of generic points of $X$ is dense in $X$. Thus we see there exists a dense open $W = \bigcup _\eta U_\eta $ such that each $f^{-1}(W) \cap V_ j \to W$ is finite. It suffices to show that there exists a dense open $U \subset W$ such that $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite. Thus we may replace $X$ by an affine open subscheme of $W$ and assume that each $V_ j \to X$ is finite.

Assume $X$ is affine, $Y = \bigcup _{j = 1, \ldots , m} V_ j$ with $V_ j$ affine, and the restrictions $f|_{V_ j} : V_ j \to X$ are finite. Set

\[ \Delta _{ij} = \Big(\overline{V_ i \cap V_ j} \setminus V_ i \cap V_ j\Big) \cap V_ j. \]

This is a nowhere dense closed subset of $V_ j$ because it is the boundary of the open subset $V_ i \cap V_ j$ in $V_ j$. By Morphisms, Lemma 28.46.7 the image $f(\Delta _{ij})$ is a nowhere dense closed subset of $X$. By Topology, Lemma 5.21.2 the union $T = \bigcup f(\Delta _{ij})$ is a nowhere dense closed subset of $X$. Thus $U = X \setminus T$ is a dense open subset of $X$. We claim that $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite. To see this let $U' \subset U$ be an affine open. Set $Y' = f^{-1}(U') = U' \times _ X Y$, $V_ j' = Y' \cap V_ j = U' \times _ X V_ j$. Consider the restriction

\[ f' = f|_{Y'} : Y' \longrightarrow U' \]

of $f$. This morphism now has the property that $Y' = \bigcup _{j = 1, \ldots , m} V'_ j$ is an affine open covering, each $V'_ j \to U'$ is finite, and $V_ i' \cap V_ j'$ is (open and) closed both in $V'_ i$ and $V'_ j$. Hence $V_ i' \cap V_ j'$ is affine, and the map

\[ \mathcal{O}(V'_ i) \otimes _{\mathbf{Z}} \mathcal{O}(V'_ j) \longrightarrow \mathcal{O}(V'_ i \cap V'_ j) \]

is surjective. This implies that $Y'$ is separated, see Schemes, Lemma 25.21.8. Finally, consider the commutative diagram

\[ \xymatrix{ \coprod _{j = 1, \ldots , m} V'_ j \ar[rd] \ar[rr] & & Y' \ar[ld] \\ & U' & } \]

The south-east arrow is finite, hence proper, the horizontal arrow is surjective, and the south-west arrow is separated. Hence by Morphisms, Lemma 28.39.8 we conclude that $Y' \to U'$ is proper. Since it is also quasi-finite, we see that it is finite by Lemma 36.38.4, and we win.
$\square$

Lemma 36.38.8. Let $f : X \to S$ be flat, locally of finite presentation, separated, locally quasi-finite with universally bounded fibres. Then there exist closed subsets

\[ \emptyset = Z_{-1} \subset Z_0 \subset Z_1 \subset Z_2 \subset \ldots \subset Z_ n = S \]

such that with $S_ r = Z_ r \setminus Z_{r - 1}$ the stratification $S = \coprod _{r = 0, \ldots , n} S_ r$ is characterized by the following universal property: Given $g : T \to S$ the projection $X \times _ S T \to T$ is finite locally free of degree $r$ if and only if $g(T) \subset S_ r$ (set theoretically).

**Proof.**
Let $n$ be an integer bounding the degree of the fibres of $X \to S$. By Morphisms, Lemma 28.54.6 we see that any base change has degrees of fibres bounded by $n$ also. In particular, all the integers $r$ that occur in the statement of the lemma will be $\leq n$. We will prove the lemma by induction on $n$. The base case is $n = 0$ which is obvious.

We claim the set of points $s \in S$ with $\deg _{\kappa (s)}(X_ s) = n$ is an open subset $S_ n \subset S$ and that $X \times _ S S_ n \to S_ n$ is finite locally free of degree $n$. Namely, suppose that $s \in S$ is such a point. Choose an elementary étale morphism $(U, u) \to (S, s)$ and a decomposition $U \times _ S X = W \amalg V$ as in Lemma 36.36.6. Since $V \to U$ is finite, flat, and locally of finite presentation, we see that $V \to U$ is finite locally free, see Morphisms, Lemma 28.46.2. After shrinking $U$ to a smaller neighbourhood of $u$ we may assume $V \to U$ is finite locally free of some degree $d$, see Morphisms, Lemma 28.46.5. As $u \mapsto s$ and $W_ u = \emptyset $ we see that $d = n$. Since $n$ is the maximum degree of a fibre we see that $W = \emptyset $! Thus $U \times _ S X \to U$ is finite locally free of degree $n$. By Descent, Lemma 34.20.30 we conclude that $X \to S$ is finite locally free of degree $n$ over $\mathop{\mathrm{Im}}(U \to S)$ which is an open neighbourhood of $s$ (Morphisms, Lemma 28.34.13). This proves the claim.

Let $S' = S \setminus S_ n$ endowed with the reduced induced scheme structure and set $X' = X \times _ S S'$. Note that the degrees of fibres of $X' \to S'$ are universally bounded by $n - 1$. By induction we find a stratification $S' = S_0 \amalg \ldots \amalg S_{n - 1}$ adapted to the morphism $X' \to S'$. We claim that $S = \coprod _{r = 0, \ldots , n} S_ r$ works for the morphism $X \to S$. Let $g : T \to S$ be a morphism of schemes and assume that $X \times _ S T \to T$ is finite locally free of degree $r$. As remarked above this implies that $r \leq n$. If $r = n$, then it is clear that $T \to S$ factors through $S_ n$. If $r < n$, then $g(T) \subset S' = S \setminus S_ d$ (set theoretically) hence $T_{red} \to S$ factors through $S'$, see Schemes, Lemma 25.12.6. Note that $X \times _ S T_{red} \to T_{red}$ is also finite locally free of degree $r$ as a base change. By the universal property of the stratification $S' = \coprod _{r = 0, \ldots , n - 1} S_ r$ we see that $g(T) = g(T_{red})$ is contained in $S_ r$. Conversely, suppose that we have $g : T \to S$ such that $g(T) \subset S_ r$ (set theoretically). If $r = n$, then $g$ factors through $S_ n$ and it is clear that $X \times _ S T \to T$ is finite locally free of degree $n$ as a base change. If $r < n$, then $X \times _ S T \to T$ is a morphism which is separated, flat, and locally of finite presentation, such that the restriction to $T_{red}$ is finite locally free of degree $r$. Since $T_{red} \to T$ is a universal homeomorphism, we conclude that $X \times _ S T_{red} \to X \times _ S T$ is a universal homeomorphism too and hence $X \times _ S T \to T$ is universally closed (as this is true for the finite morphism $X \times _ S T_{red} \to T_{red}$). It follows that $X \times _ S T \to T$ is finite, for example by Lemma 36.38.4. Then we can use Morphisms, Lemma 28.46.2 to see that $X \times _ S T \to T$ is finite locally free. Finally, the degree is $r$ as all the fibres have degree $r$.
$\square$

Lemma 36.38.9. Let $f : X \to S$ be a morphism of schemes which is flat, locally of finite presentation, separated, and quasi-finite. Then there exist closed subsets

\[ \emptyset = Z_{-1} \subset Z_0 \subset Z_1 \subset Z_2 \subset \ldots \subset S \]

such that with $S_ r = Z_ r \setminus Z_{r - 1}$ the stratification $S = \coprod S_ r$ is characterized by the following universal property: Given a morphism $g : T \to S$ the projection $X \times _ S T \to T$ is finite locally free of degree $r$ if and only if $g(T) \subset S_ r$ (set theoretically). Moreover, the inclusion maps $S_ r \to S$ are quasi-compact.

**Proof.**
The question is local on $S$, hence we may assume that $S$ is affine. By Morphisms, Lemma 28.54.10 the fibres of $f$ are universally bounded in this case. Hence the existence of the stratification follows from Lemma 36.38.8.

We will show that $U_ r = S \setminus Z_ r \to S$ is quasi-compact for each $r \geq 0$. This will prove the final statement by elementary topology. Since a composition of quasi-compact maps is quasi-compact it suffices to prove that $U_ r \to U_{r - 1}$ is quasi-compact. Choose an affine open $W \subset U_{r - 1}$. Write $W = \mathop{\mathrm{Spec}}(A)$. Then $Z_ r \cap W = V(I)$ for some ideal $I \subset A$ and $X \times _ S \mathop{\mathrm{Spec}}(A/I) \to \mathop{\mathrm{Spec}}(A/I)$ is finite locally free of degree $r$. Note that $A/I = \mathop{\mathrm{colim}}\nolimits A/I_ i$ where $I_ i \subset I$ runs through the finitely generated ideals. By Limits, Lemma 31.8.8 we see that $X \times _ S \mathop{\mathrm{Spec}}(A/I_ i) \to \mathop{\mathrm{Spec}}(A/I_ i)$ is finite locally free of degree $r$ for some $i$. (This uses that $X \to S$ is of finite presentation, as it is locally of finite presentation, separated, and quasi-compact.) Hence $\mathop{\mathrm{Spec}}(A/I_ i) \to \mathop{\mathrm{Spec}}(A) = W$ factors (set theoretically) through $Z_ r \cap W$. It follows that $Z_ r \cap W = V(I_ i)$ is the zero set of a finite subset of elements of $A$. This means that $W \setminus Z_ r$ is a finite union of standard opens, hence quasi-compact, as desired.
$\square$

Lemma 36.38.10. Let $f : X \to S$ be a flat, locally of finite presentation, separated, and locally quasi-finite morphism of schemes. Then there exist open subschemes

\[ S = U_0 \supset U_1 \supset U_2 \supset \ldots \]

such that a morphism $\mathop{\mathrm{Spec}}(k) \to S$ factors through $U_ d$ if and only if $X \times _ S \mathop{\mathrm{Spec}}(k)$ has degree $\geq d$ over $k$.

**Proof.**
The statement simply means that the collection of points where the degree of the fibre is $\geq d$ is open. Thus we can work locally on $S$ and assume $S$ is affine. In this case, for every $W \subset X$ quasi-compact open, the set of points $U_ d(W)$ where the fibres of $W \to S$ have degree $\geq d$ is open by Lemma 36.38.9. Since $U_ d = \bigcup _ W U_ d(W)$ the result follows.
$\square$

Lemma 36.38.11. Let $f : X \to S$ be a morphism of schemes which is flat, locally of finite presentation, and locally quasi-finite. Let $g \in \Gamma (X, \mathcal{O}_ X)$ nonzero. Then there exist an open $V \subset X$ such that $g|_ V \not= 0$, an open $U \subset S$ fitting into a commutative diagram

\[ \xymatrix{ V \ar[r] \ar[d]_\pi & X \ar[d]^ f \\ U \ar[r] & S, } \]

a quasi-coherent subsheaf $\mathcal{F} \subset \mathcal{O}_ U$, an integer $r > 0$, and an injective $\mathcal{O}_ U$-module map $\mathcal{F}^{\oplus r} \to \pi _*\mathcal{O}_ V$ whose image contains $g|_ V$.

**Proof.**
We may assume $X$ and $S$ affine. We obtain a filtration $\emptyset = Z_{-1} \subset Z_0 \subset Z_1 \subset Z_2 \subset \ldots \subset Z_ n = S$ as in Lemmas 36.38.8 and 36.38.9. Let $T \subset X$ be the scheme theoretic support of the finite $\mathcal{O}_ X$-module $\mathop{\mathrm{Im}}(g : \mathcal{O}_ X \to \mathcal{O}_ X)$. Note that $T$ is the support of $g$ as a section of $\mathcal{O}_ X$ (Modules, Definition 17.5.1) and for any open $V \subset X$ we have $g|_ V \not= 0$ if and only if $V \cap T \not= \emptyset $. Let $r$ be the smallest integer such that $f(T) \subset Z_ r$ set theoretically. Let $\xi \in T$ be a generic point of an irreducible component of $T$ such that $f(\xi ) \not\in Z_{r - 1}$ (and hence $f(\xi ) \in Z_ r$). We may replace $S$ by an affine neighbourhood of $f(\xi )$ contained in $S \setminus Z_{r - 1}$. Write $S = \mathop{\mathrm{Spec}}(A)$ and let $I = (a_1, \ldots , a_ m) \subset A$ be a finitely generated ideal such that $V(I) = Z_ r$ (set theoretically, see Algebra, Lemma 10.28.1). Since the support of $g$ is contained in $f^{-1}V(I)$ by our choice of $r$ we see that there exists an integer $N$ such that $a_ j^ N g = 0$ for $j = 1, \ldots , m$. Replacing $a_ j$ by $a_ j^ r$ we may assume that $Ig = 0$. For any $A$-module $M$ write $M[I]$ for the $I$-torsion of $M$, i.e., $M[I] = \{ m \in M \mid Im = 0\} $. Write $X = \mathop{\mathrm{Spec}}(B)$, so $g \in B[I]$. Since $A \to B$ is flat we see that

\[ B[I] = A[I] \otimes _ A B \cong A[I] \otimes _{A/I} B/IB \]

By our choice of $Z_ r$, the $A/I$-module $B/IB$ is finite locally free of rank $r$. Hence after replacing $S$ by a smaller affine open neighbourhood of $f(\xi )$ we may assume that $B/IB \cong (A/IA)^{\oplus r}$ as $A/I$-modules. Choose a map $\psi : A^{\oplus r} \to B$ which reduces modulo $I$ to the isomorphism of the previous sentence. Then we see that the induced map

\[ A[I]^{\oplus r} \longrightarrow B[I] \]

is an isomorphism. The lemma follows by taking $\mathcal{F}$ the quasi-coherent sheaf associated to the $A$-module $A[I]$ and the map $\mathcal{F}^{\oplus r} \to \pi _*\mathcal{O}_ V$ the one corresponding to $A[I]^{\oplus r} \subset A^{\oplus r} \to B$.
$\square$

Lemma 36.38.12. Let $f : X \to Y$ be a separated, locally quasi-finite morphism with $Y$ affine. Then every finite set of points of $X$ is contained in an open affine of $X$.

**Proof.**
Let $x_1, \ldots , x_ n \in X$. Choose a quasi-compact open $U \subset X$ with $x_ i \in U$. Then $U \to Y$ is quasi-affine by Lemma 36.38.2. Hence there exists an affine open $V \subset U$ containing $x_1, \ldots , x_ n$ by Properties, Lemma 27.29.5.
$\square$

Lemma 36.38.13. Let $U \to X$ be a surjective étale morphism of schemes. Assume $X$ is quasi-compact and quasi-separated. Then there exists a surjective integral morphism $Y \to X$, such that for every $y \in Y$ there is an open neighbourhood $V \subset Y$ such that $V \to X$ factors through $U$. In fact, we may assume $Y \to X$ is finite and of finite presentation.

**Proof.**
Since $X$ is quasi-compact, there exist finitely many affine opens $U_ i \subset U$ such that $U' = \coprod U_ i \to X$ is surjective. After replacing $U$ by $U'$, we see that we may assume $U$ is affine. Then there exists an integer $d$ bounding the degree of the geometric fibres of $U \to X$ (see Morphisms, Lemma 28.54.10). We will prove the lemma by induction on $d$ for all quasi-compact and separated schemes $U$ mapping surjective and étale onto $X$. If $d = 1$, then $U = X$ and the result holds with $Y = U$. Assume $d > 1$.

We apply Lemma 36.38.2 and we obtain a factorization

\[ \xymatrix{ U \ar[rr]_ j \ar[rd] & & Y \ar[ld]^\pi \\ & X } \]

with $\pi $ integral and $j$ a quasi-compact open immersion. We may and do assume that $j(U)$ is scheme theoretically dense in $Y$. Note that

\[ U \times _ X Y = U \amalg W \]

where the first summand is the image of $U \to U \times _ X Y$ (which is closed by Schemes, Lemma 25.21.11 and open because it is étale as a morphism between schemes étale over $Y$) and the second summand is the (open and closed) complement. The image $V \subset Y$ of $W$ is an open subscheme containing $Y \setminus U$.

The étale morphism $W \to Y$ has geometric fibres of cardinality $< d$. Namely, this is clear for geometric points of $U \subset Y$ by inspection. Since $U \subset Y$ is dense, it holds for all geometric points of $Y$ for example by Lemma 36.38.8 (the degree of the fibres of a quasi-compact étale morphism does not go up under specialization). Thus we may apply the induction hypothesis to $W \to V$ and find a surjective integral morphism $Z \to V$ with $Z$ a scheme, which Zariski locally factors through $W$. Choose a factorization $Z \to Z' \to Y$ with $Z' \to Y$ integral and $Z \to Z'$ open immersion (Lemma 36.38.2). After replacing $Z'$ by the scheme theoretic closure of $Z$ in $Z'$ we may assume that $Z$ is scheme theoretically dense in $Z'$. After doing this we have $Z' \times _ Y V = Z$. Finally, let $T \subset Y$ be the induced reduced closed subscheme structure on $Y \setminus V$. Consider the morphism

\[ Z' \amalg T \longrightarrow X \]

This is a surjective integral morphism by construction. Since $T \subset U$ it is clear that the morphism $T \to X$ factors through $U$. On the other hand, let $z \in Z'$ be a point. If $z \not\in Z$, then $z$ maps to a point of $Y \setminus V \subset U$ and we find a neighbourhood of $z$ on which the morphism factors through $U$. If $z \in Z$, then we have a neighbourhood $V \subset Z$ which factors through $W \subset U \times _ X Y$ and hence through $U$. This proves existence.

Assume we have found $Y \to X$ integral and surjective which Zariski locally factors through $U$. Choose a finite affine open covering $Y = \bigcup V_ j$ such that $V_ j \to X$ factors through $U$. We can write $Y = \mathop{\mathrm{lim}}\nolimits Y_ i$ with $Y_ i \to X$ finite and of finite presentation, see Limits, Lemma 31.7.2. For large enough $i$ we can find affine opens $V_{i, j} \subset Y_ i$ whose inverse image in $Y$ recovers $V_ j$, see Limits, Lemma 31.4.11. For even larger $i$ the morphisms $V_ j \to U$ over $X$ come from morphisms $V_{i, j} \to U$ over $X$, see Limits, Proposition 31.6.1. This finishes the proof.
$\square$

## Comments (5)

Comment #1594 by kollar on

Comment #3041 by Rankeya on

Comment #3149 by Johan on

Comment #3229 by Katha on

Comment #3230 by Katha on