## 31.16 Complements of affine opens

In this section we discuss the result that the complement of an affine open in a variety has pure codimension $1$.

Lemma 31.16.1. Let $(A, \mathfrak m)$ be a Noetherian local ring. The punctured spectrum $U = \mathop{\mathrm{Spec}}(A) \setminus \{ \mathfrak m\}$ of $A$ is affine if and only if $\dim (A) \leq 1$.

Proof. If $\dim (A) = 0$, then $U$ is empty hence affine (equal to the spectrum of the $0$ ring). If $\dim (A) = 1$, then we can choose an element $f \in \mathfrak m$ not contained in any of the finite number of minimal primes of $A$ (Algebra, Lemmas 10.31.6 and 10.15.2). Then $U = \mathop{\mathrm{Spec}}(A_ f)$ is affine.

The converse is more interesting. We will give a somewhat nonstandard proof and discuss the standard argument in a remark below. Assume $U = \mathop{\mathrm{Spec}}(B)$ is affine. Since affineness and dimension are not affecting by going to the reduction we may replace $A$ by the quotient by its ideal of nilpotent elements and assume $A$ is reduced. Set $Q = B/A$ viewed as an $A$-module. The support of $Q$ is $\{ \mathfrak m\}$ as $A_\mathfrak p = B_\mathfrak p$ for all nonmaximal primes $\mathfrak p$ of $A$. We may assume $\dim (A) \geq 1$, hence as above we can pick $f \in \mathfrak m$ not contained in any of the minimal ideals of $A$. Since $A$ is reduced this implies that $f$ is a nonzerodivisor. In particular $\dim (A/fA) = \dim (A) - 1$, see Algebra, Lemma 10.60.13. Applying the snake lemma to multiplication by $f$ on the short exact sequence $0 \to A \to B \to Q \to 0$ we obtain

$0 \to Q[f] \to A/fA \to B/fB \to Q/fQ \to 0$

where $Q[f] = \mathop{\mathrm{Ker}}(f : Q \to Q)$. This implies that $Q[f]$ is a finite $A$-module. Since the support of $Q[f]$ is $\{ \mathfrak m\}$ we see $l = \text{length}_ A(Q[f]) < \infty$ (Algebra, Lemma 10.62.3). Set $l_ n = \text{length}_ A(Q[f^ n])$. The exact sequence

$0 \to Q[f^ n] \to Q[f^{n + 1}] \xrightarrow {f^ n} Q[f]$

shows inductively that $l_ n < \infty$ and that $l_ n \leq l_{n + 1}$. Considering the exact sequence

$0 \to Q[f] \to Q[f^{n + 1}] \xrightarrow {f} Q[f^ n] \to Q/fQ$

and we see that the image of $Q[f^ n]$ in $Q/fQ$ has length $l_ n - l_{n + 1} + l \leq l$. Since $Q = \bigcup Q[f^ n]$ we find that the length of $Q/fQ$ is at most $l$, i.e., bounded. Thus $Q/fQ$ is a finite $A$-module. Hence $A/fA \to B/fB$ is a finite ring map, in particular induces a closed map on spectra (Algebra, Lemmas 10.36.22 and 10.41.6). On the other hand $\mathop{\mathrm{Spec}}(B/fB)$ is the punctured spectrum of $\mathop{\mathrm{Spec}}(A/fA)$. This is a contradiction unless $\mathop{\mathrm{Spec}}(B/fB) = \emptyset$ which means that $\dim (A/fA) = 0$ as desired. $\square$

Remark 31.16.2. If $(A, \mathfrak m)$ is a Noetherian local normal domain of dimension $\geq 2$ and $U$ is the punctured spectrum of $A$, then $\Gamma (U, \mathcal{O}_ U) = A$. This algebraic version of Hartogs's theorem follows from the fact that $A = \bigcap _{\text{height}(\mathfrak p) = 1} A_\mathfrak p$ we've seen in Algebra, Lemma 10.157.6. Thus in this case $U$ cannot be affine (since it would force $\mathfrak m$ to be a point of $U$). This is often used as the starting point of the proof of Lemma 31.16.1. To reduce the case of a general Noetherian local ring to this case, we first complete (to get a Nagata local ring), then replace $A$ by $A/\mathfrak q$ for a suitable minimal prime, and then normalize. Each of these steps does not change the dimension and we obtain a contradiction. You can skip the completion step, but then the normalization in general is not a Noetherian domain. However, it is still a Krull domain of the same dimension (this is proved using Krull-Akizuki) and one can apply the same argument.

Remark 31.16.3. It is not clear how to characterize the non-Noetherian local rings $(A, \mathfrak m)$ whose punctured spectrum is affine. Such a ring has a finitely generated ideal $I$ with $\mathfrak m = \sqrt{I}$. Of course if we can take $I$ generated by $1$ element, then $A$ has an affine puncture spectrum; this gives lots of non-Noetherian examples. Conversely, it follows from the argument in the proof of Lemma 31.16.1 that such a ring cannot possess a nonzerodivisor $f \in \mathfrak m$ with $H^0_ I(A/fA) = 0$ (so $A$ cannot have a regular sequence of length $2$). Moreover, the same holds for any ring $A'$ which is the target of a local homomorphism of local rings $A \to A'$ such that $\mathfrak m_{A'} = \sqrt{\mathfrak mA'}$.

Lemma 31.16.4. Let $X$ be a locally Noetherian scheme. Let $U \subset X$ be an open subscheme such that the inclusion morphism $U \to X$ is affine. For every generic point $\xi$ of an irreducible component of $X \setminus U$ the local ring $\mathcal{O}_{X, \xi }$ has dimension $\leq 1$. If $U$ is dense or if $\xi$ is in the closure of $U$, then $\dim (\mathcal{O}_{X, \xi }) = 1$.

Proof. Since $\xi$ is a generic point of $X \setminus U$, we see that

$U_\xi = U \times _ X \mathop{\mathrm{Spec}}(\mathcal{O}_{X, \xi }) \subset \mathop{\mathrm{Spec}}(\mathcal{O}_{X, \xi })$

is the punctured spectrum of $\mathcal{O}_{X, \xi }$ (hint: use Schemes, Lemma 26.13.2). As $U \to X$ is affine, we see that $U_\xi \to \mathop{\mathrm{Spec}}(\mathcal{O}_{X, \xi })$ is affine (Morphisms, Lemma 29.11.8) and we conclude that $U_\xi$ is affine. Hence $\dim (\mathcal{O}_{X, \xi }) \leq 1$ by Lemma 31.16.1. If $\xi \in \overline{U}$, then there is a specialization $\eta \to \xi$ where $\eta \in U$ (just take $\eta$ a generic point of an irreducible component of $\overline{U}$ which contains $\xi$; since $\overline{U}$ is locally Noetherian, hence locally has finitely many irreducible components, we see that $\eta \in U$). Then $\eta \in \mathop{\mathrm{Spec}}(\mathcal{O}_{X, \xi })$ and we see that the dimension cannot be $0$. $\square$

Lemma 31.16.5. Let $X$ be a separated locally Noetherian scheme. Let $U \subset X$ be an affine open. For every generic point $\xi$ of an irreducible component of $X \setminus U$ the local ring $\mathcal{O}_{X, \xi }$ has dimension $\leq 1$. If $U$ is dense or if $\xi$ is in the closure of $U$, then $\dim (\mathcal{O}_{X, \xi }) = 1$.

Proof. This follows from Lemma 31.16.4 because the morphism $U \to X$ is affine by Morphisms, Lemma 29.11.11. $\square$

The following lemma can sometimes be used to produce effective Cartier divisors.

Lemma 31.16.6. Let $X$ be a Noetherian separated scheme. Let $U \subset X$ be a dense affine open. If $\mathcal{O}_{X, x}$ is a UFD for all $x \in X \setminus U$, then there exists an effective Cartier divisor $D \subset X$ with $U = X \setminus D$.

Proof. Since $X$ is Noetherian, the complement $X \setminus U$ has finitely many irreducible components $D_1, \ldots , D_ r$ (Properties, Lemma 28.5.7 applied to the reduced induced subscheme structure on $X \setminus U$). Each $D_ i \subset X$ has codimension $1$ by Lemma 31.16.5 (and Properties, Lemma 28.10.3). Thus $D_ i$ is an effective Cartier divisor by Lemma 31.15.7. Hence we can take $D = D_1 + \ldots + D_ r$. $\square$

Lemma 31.16.7. Let $X$ be a Noetherian scheme with affine diagonal. Let $U \subset X$ be a dense affine open. If $\mathcal{O}_{X, x}$ is a UFD for all $x \in X \setminus U$, then there exists an effective Cartier divisor $D \subset X$ with $U = X \setminus D$.

Proof. Since $X$ is Noetherian, the complement $X \setminus U$ has finitely many irreducible components $D_1, \ldots , D_ r$ (Properties, Lemma 28.5.7 applied to the reduced induced subscheme structure on $X \setminus U$). We view $D_ i$ as a reduced closed subscheme of $X$. Let $X = \bigcup _{j \in J} X_ j$ be an affine open covering of $X$. For all $j$ in $J$, set $U_ j = U \cap X_ j$. Since $X$ has affine diagonal, the scheme

$U_ j = X \times _{(X \times X)} (U \times X_ j)$

is affine. Therefore, as $X_ j$ is separated, it follows from Lemma 31.16.6 and its proof that for all $j \in J$ and $1 \leq i \leq r$ the intersection $D_ i \cap X_ j$ is either empty or an effective Cartier divisor in $X_ j$. Thus $D_ i \subset X$ is an effective Cartier divisor (as this is a local property). Hence we can take $D = D_1 + \ldots + D_ r$. $\square$

Lemma 31.16.8. Let $X$ be a quasi-compact, regular scheme with affine diagonal. Then $X$ has an ample family of invertible modules (Morphisms, Definition 29.12.1.

Proof. Observe that $X$ is a finite disjoint union of integral schemes (Properties, Lemmas 28.9.4 and 28.7.6). Thus we may assume that $X$ is integral as well as Noetherian, regular, and having affine diagonal. Let $x \in X$. Choose an affine open neighbourhood $U \subset X$ of $x$. Since $X$ is integral, $U$ is dense in $X$. By More on Algebra, Lemma 15.121.2 the local rings of $X$ are UFDs. Hence by Lemma 31.16.7 we can find an effective Cartier divisor $D \subset X$ whose complement is $U$. Then the canonical section $s = 1_ D$ of $\mathcal{L} = \mathcal{O}_ X(D)$, see Definition 31.14.1, vanishes exactly along $D$ hence $U = X_ s$. Thus both conditions in Morphisms, Definition 29.12.1 hold and we are done. $\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).