**Proof.**
Assume (1). Then for $x \in X \setminus U$ the inverse image $U_ x$ of $U$ under the canonical morphism $f_ x : \mathop{\mathrm{Spec}}(\mathcal{O}_{X, x}) \to X$ is affine and does not contain $x$. Thus $\mathfrak m_ x \Gamma (U_ x, \mathcal{O}_{U_ x})$ is the unit ideal. In particular, we see that we can write

\[ 1 = \sum f_ i g_ i \]

with $f_ i \in \mathfrak m_ x$ and $g_ i \in \Gamma (U_ x, \mathcal{O}_{U_ x})$. By Lemma 30.29.3 we have $\Gamma (U_ x, \mathcal{O}_{U_ x}) = \mathop{\mathrm{colim}}\nolimits \mathcal{F}^{[n]}_ x$ with transition maps given by multiplication by $s$. Hence for some $n > 0$ we have

\[ s^ n = \sum f_ i t_ i \]

for some $t_ i = s^ ng_ i \in \mathcal{F}^{[n]}_ x$. Thus (2) holds.

Conversely, assume that (2) holds. To prove $j$ is affine is local on $X$, see Morphisms, Lemma 28.11.3. Thus we may and do assume that $X$ is affine. Our goal is to show that $U$ is affine. By Cohomology of Schemes, Lemma 29.17.8 it suffices to show that $H^ p(U, \mathcal{O}_ U) = 0$ for $p > 0$. Since $H^ p(U, \mathcal{O}_ U) = H^0(X, R^ pj_*\mathcal{O}_ U)$ (Cohomology of Schemes, Lemma 29.4.6) and since $R^ pj_*\mathcal{O}_ U$ is quasi-coherent (Cohomology of Schemes, Lemma 29.4.5) it is enough to show the stalk $(R^ pj_*\mathcal{O}_ U)_ x$ at a point $x \in X$ is zero. Consider the base change diagram

\[ \xymatrix{ U_ x \ar[d]_{j_ x} \ar[r] & U \ar[d]^ j \\ \mathop{\mathrm{Spec}}(\mathcal{O}_{X, x}) \ar[r] & X } \]

By Cohomology of Schemes, Lemma 29.5.2 we have $(R^ pj_*\mathcal{O}_ U)_ x = R^ pj_{x, *}\mathcal{O}_{U_ x}$. Hence we may assume $X$ is local with closed point $x$ and we have to show $U$ is affine (because this is equivalent to the desired vanishing by the reference given above). In particular $d = \dim (X)$ is finite (Algebra, Proposition 10.59.8). If $x \in U$, then $U = X$ and the result is clear. If $d = 0$ and $x \not\in U$, then $U = \emptyset $ and the result is clear. Now assume $d > 0$ and $x \not\in U$. Since $j_*\mathcal{O}_ U = \mathop{\mathrm{colim}}\nolimits \mathcal{F}^{[n]}$ our assumption means that we can write

\[ 1 = \sum f_ i g_ i \]

for some $n > 0$, $f_ i \in \mathfrak m_ x$, and $g_ i \in \mathcal{O}(U)$. By induction on $d$ we know that $D(f_ i) \cap U$ is affine for all $i$: going through the whole argument just given with $X$ replaced by $D(f_ i)$ we end up with Noetherian local rings whose dimension is strictly smaller than $d$. Hence $U$ is affine by Properties, Lemma 27.27.3 as desired.
$\square$

## Comments (0)