Lemma 27.29.6. Let $X$ be a scheme. Let $\mathcal{L}$ be an ample invertible sheaf on $X$. Let

$E \subset W \subset X$

with $E$ finite and $W$ open in $X$. Then there exists an $n > 0$ and a section $s \in \Gamma (X, \mathcal{L}^{\otimes n})$ such that $X_ s$ is affine and $E \subset X_ s \subset W$.

Proof. The reader can modify the proof of Lemma 27.29.5 to prove this lemma; we will instead deduce the lemma from it. By Lemma 27.29.5 we can choose an affine open $U \subset W$ such that $E \subset U$. Consider the graded ring $S = \Gamma _*(X, \mathcal{L}) = \bigoplus _{n \geq 0} \Gamma (X, \mathcal{L}^{\otimes n})$. For each $x \in E$ let $\mathfrak p_ x \subset S$ be the graded ideal of sections vanishing at $x$. It is clear that $\mathfrak p_ x$ is a prime ideal and since some power of $\mathcal{L}$ is globally generated, it is clear that $S_{+} \not\subset \mathfrak p_ x$. Let $I \subset S$ be the graded ideal of sections vanishing on all points of $X \setminus U$. Since the sets $X_ s$ form a basis for the topology we see that $I \not\subset \mathfrak p_ x$ for all $x \in E$. By (graded) prime avoidance (Algebra, Lemma 10.56.6) we can find $s \in I$ homogeneous with $s \not\in \mathfrak p_ x$ for all $x \in E$. Then $E \subset X_ s \subset U$ and $X_ s$ is affine by Lemma 27.26.4. $\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).