Lemma 31.13.3. Let $S$ be a scheme. Let $Z \subset S$ be a locally principal closed subscheme. Let $U = S \setminus Z$. Then $U \to S$ is an affine morphism.
Proof. The question is local on $S$, see Morphisms, Lemmas 29.11.3. Thus we may assume $S = \mathop{\mathrm{Spec}}(A)$ and $Z = V(f)$ for some $f \in A$. In this case $U = D(f) = \mathop{\mathrm{Spec}}(A_ f)$ is affine hence $U \to S$ is affine. $\square$
Comments (0)
There are also: