# Global sections of affine variety finitely generated?

Ravi Vakil defines in his notes an affine $$k$$-variety (for a field $$k$$) as an affine scheme that is reduced and of finite type over $$k$$.

The subsequent exercise is to show that $$\def\Spec{\operatorname{Spec}}\Spec k[x_1,...,x_n]/I$$ is an affine $$k$$-variety if and only if the ideal $$I \subseteq k[x_1,...,x_n]$$ is radical.

What is for me much more important, however, would be the statement: "Every affine variety over $$k$$ is isomorphic to $$\Spec k[x_1,...,x_n]/I$$ for some $$n \in \mathbb{N}$$ and $$I \subseteq k[x_1,...,x_n]$$ radical."

A proof of this would come down to showing that the ring of global sections $$\def\O{\mathcal{O}}\O_{\Spec A}(\Spec A)$$ is finitely generated as a $$k$$-algebra.

However, I don't know if that is true. Vakil gives an example (20.11.13 in the 2022-12-31 version) of a variety whose global sections are not finitely generated, but this variety is (I believe) not affine.

Can somebody tell me if the global sections of an affine variety (above definition) is finitely generated? If not, do you have a (link to a) counterexample?

## 2 Answers

Yes, the global sections of an affine variety are finitely generated over the base field. This follows from the fact that a morphism $$f:X\to Y$$ is locally of finite type iff for every pair of affine opens $$U\subset X$$ and $$V\subset Y$$ with $$U\subset f^{-1}(V)$$ we have $$\mathcal{O}_X(U)$$ finitely generated as a $$\mathcal{O}_Y(V)$$-algebra (ref Stacks 01T2).

I think this also follows from (2) in Lemma 10.23.2 here.