I'm studying abelian varieties from Milne's book, but I'm having difficulty juggling different conventions and definitions of basic concepts, like those of algebraic and projective varieties. First, let me write some terminology the way I understand it.
Classically, an affine $k$-variety is a Zariski closed (zero set of some family of polynomial), irreducible subset of $k^n$ where $k$ is any field, and an affine algebraic set is just any Zariski closed subset. A projective $k$-variety is a Zariski closed (zero set of some family of homogeneous polynomials) subset of $\mathbb P^n$.
The definition of an algebraic ($k$-)variety is somewhat more delicate. According to Milne's Algebraic Geometry notes, an affine $k$-variety is any locally ringed space isomorphic to some $(V,\mathcal{O}_V)$ where $V$ is affine algebraic and $\mathcal{O}_V(U)$ is the set of regular functions on $U$ (rational functions with a denominator that doesn't vanish on $U$). First question: how is this definition of an affine $k$-variety related to the one above?
Next, Milne defines an algebraic prevariety over $k$ as a locally ringed space admitting a finite open cover of affine $k$-varieties, and then an algebraic $k$-variety is a separated algebraic prevariety over $k$. What confuses me with this definition is that I don't recognize a scheme structure on Milne's definition of a variety. My second question is, is it true that the affine $k$-varieties $(V,\mathcal{O}_V)$ are affine (k-)schemes. In particular, to what ring $R$ is $(V,\mathcal{O}_V)$ isomorphic to $\operatorname{Spec} R$?
Finally, Qing Liu's definition of an algebraic $k$-variety is as follows. An affine $k$-variety is "the affine scheme associated to a finitely generated (reduced) $k$-aglebra". Which affine scheme is this? Is it simply $\operatorname{Spec} k[T_1,\dots,T_n]/I$ with $I$ radical? How does one make this association precise? Finally, Liu's algebraic $k$-variety is a $k$-scheme admitting an finite cover of affine $k$-varieties.
I suppose the ultimate question is this. What is the relationship between affine algebraic sets in $k^n$, sheaves of reduced, finitely-generated $k$-algebras, and the scheme $\operatorname{Spec}k[T_1,\dots,T_n]/I$ where $I$ is a radical ideal, and what does it mean for a variety to be affine or projective in these contexts?
Best Answer
Each one of these definitions is morally just a restricted version of each of the more general definitions. To be precise, there are fully faithful functors from the less general definitions to the more general definitions which in some cases are equivalences of categories. Let's rewrite the definitions here so we have a quick reference. We'll cover the affine case first and then explain how to patch everything together to the global case afterwards.
Basically what's going on here is that each of these definitions is slowly, grudgingly accepting greater generality and more extensible structure on the road to the general definition.
Milne's definition adds the structure sheaf, but is not yet all the way to a scheme - it's missing generic points. This in particular shows that generally $(V,\mathcal{O}_V)$ is not the spectrum of a ring. (Milne's definition is set up in such a way that there's only one way to get the structure sheaf, so there's an equivalence of categories between the "classical" category and Milne's category.)
From here, Liu's definition adds the generic points - there is a fully faithful functor between Milne's definition and Liu's definition, which has image exactly the irreducible varieties in Liu's definition.
The road from Liu's definition to the general definition is easy: we stop requiring reducedness, which is a technical advantage for some more advanced properties one may wish to consider later on (eg those involving cohomology).
The proof that there are fully faithful functors between all these definitions can be found (among other places) in Hartshorne II.2.6:
The idea of the proof is that one can add the generic points of each irreducible positive-dimensional closed subset and then construct the structure sheaf on this new space in a canonical way, which produces for you a scheme verifying the properties claimed. (In case you're wondering about Hartshorne's definition, Hartshorne defines his category of varieties as quasiprojective integral varieties, of which the affine varieties of the "classical" and Milne's definitions are full subcategories. This same idea of the proof works in all cases.)
This provides us the answer to the first part of your main question: there are fully faithful functors which lets you consider each category as a part of the next more general category. This means that you can generalize without fear.
Now we can talk about gluing and non-affine varieties. In full generality, just like a manifold is some space locally modeled on $\Bbb R^n$, we should have that varieties are locally modeled on affine varieties (and schemes are locally modeled on affine schemes). This is what Milne's getting at with his definition of a prevariety, and what Liu is getting at with the finite cover condition.
There are some pathologies one may wish to avoid, like the line with two origins, which one can get by gluing to copies of $\Bbb A^1$ along the open sets which are the complements of the origin in each copy. Such varieties are non-separated, and that's what the separated condition in Milne's "algebraic $k$-varieties" excludes.
The most general definition one normally sees of a variety over a field is the following:
This allows non-reduced, non-irreducible, non-separated schemes, but keeps the essential finiteness condition of "finite type", which implies that any $k$-variety has a finite cover by affine open $k$-varieties, which is exactly the finiteness condition that Liu and Milne both require. Be warned that many modern authors of papers will take this general definition plus some adjectives, and are not always clear on which adjectives they take. (If you're writing papers in algebraic geometry, please include a sentence in your conventions section which makes it clear what adjectives you take when you write "variety"!)
In this most general situation, affineness and projectiveness are easy to describe. Each is exactly the condition that our variety admits a closed embedding in to $\Bbb A^n_k$ or $\Bbb P^n_k$, respectively, for some $n$. (To connect this with the affine definition as $\operatorname{Spec} A$ of a finitely-generated $k$-algebra, note that we can choose a surjection $k[x_1,\cdots,x_n]\to A$, which gives us $A\cong k[x_1,\cdots,x_n]/I$ for some ideal $I$, and this exactly shows us that $\operatorname{Spec} A \to \operatorname{Spec} k[x_1,\cdots,x_n]=\Bbb A^n_k$ is a closed immersion.)