Lemma 32.37.4. Let $X$ be an integral separated scheme. Let $U \subset X$ be a nonempty affine open such that $X \setminus U$ is a finite set of points $x_1, \ldots , x_ r$ with $\mathcal{O}_{X, x_ i}$ Noetherian of dimension $1$. Then there exists a globally generated invertible $\mathcal{O}_ X$-module $\mathcal{L}$ and a section $s$ such that $U = X_ s$.

Proof. Say $U = \mathop{\mathrm{Spec}}(A)$ and let $K$ be the function field of $X$. Write $B_ i = \mathcal{O}_{X, x_ i}$ and $\mathfrak m_ i = \mathfrak m_{x_ i}$. Since $x_ i \not\in U$ we see that the open $U \times _ X \mathop{\mathrm{Spec}}(B_ i)$ of $\mathop{\mathrm{Spec}}(B_ i)$ has only one point, i.e., $U \times _ X \mathop{\mathrm{Spec}}(B_ i) = \mathop{\mathrm{Spec}}(K)$. Since $X$ is separated, we find that $\mathop{\mathrm{Spec}}(K)$ is a closed subscheme of $U \times \mathop{\mathrm{Spec}}(B_ i)$, i.e., the map $A \otimes B_ i \to K$ is a surjection. By Lemma 32.36.8 we can find a nonzero $f \in A$ such that $f^{-1} \in \mathfrak m_ i$ for $i = 1, \ldots , r$. Pick opens $x_ i \in U_ i \subset X$ such that $f^{-1} \in \mathcal{O}(U_ i)$. Then

$\mathcal{U} : X = U \cup \bigcup U_ i$

is an open covering of $X$. Consider the $2$-cocycle with values in $\mathcal{O}_ X^*$ given by $f$ on $U \cap U_ i$ and by $1$ on $U_ i \cap U_ j$. This defines a line bundle $\mathcal{L}$ with two sections:

1. a section $s$ defined by $1$ on $U$ and $f^{-1}$ on $U_ i$ is as in the statement of the lemma, and

2. a section $t$ defined by $f$ on $U$ and $1$ on $U_ i$.

Note that $X_ t \supset U_1 \cup \ldots \cup U_ r$. Hence $s, t$ generate $\mathcal{L}$ and the lemma is proved. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).