# Can a scheme be defined by gluing open affines such that the intersections are affine?

One way to think of a manifold is as a family of of open subsets $U_i \subset \mathbb{R}^n$, together with distinguished subsets $V_{ij} \subset U_i$ and isomorphisms $\psi_{ij}: V_{ij} \to V_{ji}$ that satisfy the cocycle condition. This may not be useful practically, but occasionally it might be an intuitive crutch. Now, just as manifolds are obtained by gluing together subsets of $\mathbb{R}^n$, a scheme is obtained by gluing together affines. In other words, we have open affines $U_i = \mathrm{Spec} A_i$ for suitable rings $A_i$, open subsets $V_{ij} \subset U_i$, and isomorphisms $\psi_{ij}$ (of locally ringed spaces) as before. However, the open subsets $V_{ij}$ need not be themselves affine.

Question: Is it possible to formulate this definition such that the sets $V_{ij}$ are affine? I know this can be done if the scheme is separated (because the intersection of open affines is affine).

One of the nice things about this is that wouldn't have to worry about the isomorphisms $\psi_{ij}$ being isomorphisms of locally ringed spaces, just isomorphisms of the corresponding rings.

This is probably a bad way of thinking of schemes in general; the only reason I was interested in it was because then the fibered product could perhaps be thought of more "explicitly."

Question': Is there an easy way to tell when the complement of $V(\mathfrak{a}) \subset \mathrm{Spec} A$ is affine? Of course, this is true when $\mathfrak{a}$ is principal. (Answered: see the comments of Matthew Emerton and David Speyer.)

-
Under fairly general hypotheses (locally Noetherian is okay), one finds that if the complement of a closed subscheme $Y$ of a scheme $X$ is affine, $\mathcal O_{X,\eta}$ has dimension at most 1, for each generic point $\eta$ of $Y$. If $X =$ Spec $A$, say with $A$ Noetherian, and $Y= V(\mathfrak a)$ has affine complement, this says that the local ring $A_{\mathfrak p}$ has dimension at most 1 for each minimal prime $\mathfrak p$ of $\mathfrak a$. This is a fairly restrictive condition on $\mathfrak a$ (it says that each component of $V(\mathfrak a)$ is of codimension at most 1). –  Emerton Jul 12 '10 at 14:52
All schemes you get this way will be "semi-separated," meaning that the intersection of two affines is affine (of course). In particular, you won't get the plane with the doubled origin. This is the problem that Charles Staats solves, but it may not be worth the bother to remove the hypothesis. –  Ben Wieland Jul 12 '10 at 16:32
Akhil, the best "explicit" way to think about fiber products is functorially (coupled with concrete knowledge of how it interacts with open and closed immersions). That is more useful in many cases than mucking around with open affines. To amplify Emerton's comment, the spectrum of the local noetherian ring $A = O_ {X,\eta}$ has the property that the complement of its closed point is affine, which forces "local cohomology" modules ${\rm{H}}^i_ {\mathfrak{m}}(A,M)$ to vanish for all $i > 1$ and all $A$-modules $M$. Theory of local cohomology then leads to the dim. bound Emerton mentions. –  BCnrd Jul 12 '10 at 17:14
Thanks! Actually, the question that prompted me to ask this (which wasn't MO-appropriate) was the exercise in Hartshorne about showing that a scheme of finite type over a field $k$ is geometrically irreducible if $X \times_k \bar{k}$ is, and while reducing it to a statement of commutative algebra the affine cover business came up. –  Akhil Mathew Jul 12 '10 at 18:18
Akhil, concerning your parenthetical comment, connectedness of $X \otimes_k \overline{k}$ is not a consequence of mere irreducibility of $X$. Consider $X = {\rm{Spec}}(k')$ for a nontrivial finite separable extension $k'/k$; then $X \otimes_k \overline{k}$ is disconnected but $X$ is irreducible. That sequence of exercises in Hartshorne is super-duper important, so well worth the investment of time to figure out for yourself (I won't tell you where it is all done in EGA). –  BCnrd Jul 12 '10 at 20:11

You can, if you use a slightly more general notion of gluing. (The notion of gluing you present is "wrong", or at least simplistic, in roughly the same way that it is "wrong" to require that a basis for a topology be closed under intersections. E.g., if you do this, then the set of open balls in $\mathbb{R}^n$ for $n > 1$ does not form a "basis.")

Let $X$ be a scheme. Consider the diagram whose objects are open affine subschemes of $X$, and whose morphisms are inclusions $U \hookrightarrow V$ such that $U$ is a distinguished open subset of $V$. Whenever $U$ and $V$ are two objects and $x \in U \cap V$, there exists an object $W \subset U \cap V$ such that $x \in W$ and $W \hookrightarrow U$, $W \hookrightarrow V$ are both morphisms: Since the distinguished open subsets of $U$ form a basis for the topology, there is a distinguished open $W'$ in $U$ such that $x \in W' \subset U \cap V$. Similarly, there is a section $f$ over $V$ such that $x \in V_f \subset W'$. But then $V_f = W'_f$ is a distinguished open subset of both $U$ and $V$, so we let $W = W'_f$.

It is also not too hard to show that whenever we have a category as above, we can glue things together to form a scheme (i.e., the diagram has a unique colimit in the category of schemes). If someone asks for a precise statement of this, I'll try to cook one up, but it's not particularly nice. (Not quite horrendous, but not very nice either.)

In particular, the fiber product is obtained by gluing together schemes of the form $\mathrm{Spec} A \otimes_C B$, where $\mathrm{Spec} C$ contains the images of both $\mathrm{Spec} A$ and $\mathrm{Spec} B$, with "overlap inclusions" specified by morphisms $A \otimes_C B \to A_f \otimes_C B_g$. An important note here: if $C \to D$ is a ring epimorphism (e.g., corresponds to an open immersion), and $A, B$ are $D$-algebras, then $A \otimes_C B$ is naturally isomorphic to $A \otimes_D B$.

-
Thanks! Is there some other condition you need for a ring epimorphism to be an open immersion? (E.g. $\mathbb{Z} \to \mathbb{Q}$) –  Akhil Mathew Jul 12 '10 at 18:33
Akhil, you may be interested to see the nice answers I received to the following quesiton: mathoverflow.net/questions/20782/… –  Manny Reyes Jul 12 '10 at 19:01
There's no general "functorial criterion" for flatness, so I prefer the functorial criterion that a scheme map is open immersion if and only if it is locally of finite presentation, etale (= formally etale, given lfp), and a monomorphism (either on category of "all" schemes, or really just affines with suitable finiteness conditions over the base is enough, or even more restricted class depending on whether you're willing to impose noetherian hypotheses, etc.). Works purely in the affine setting too, where "ring epic" = "affine monic". This criterion works for alg. spaces too. –  BCnrd Jul 12 '10 at 20:45
Hm, will have to look this up (eventually) whenever I read EGA. –  Akhil Mathew Jul 12 '10 at 23:09