## 26.6 The category of affine schemes

Note that if $Y$ is an affine scheme, then its points are in canonical $1-1$ bijection with prime ideals in $\Gamma (Y, \mathcal{O}_ Y)$.

Lemma 26.6.1. Let $X$ be a locally ringed space. Let $Y$ be an affine scheme. Let $f \in \mathop{Mor}\nolimits (X, Y)$ be a morphism of locally ringed spaces. Given a point $x \in X$ consider the ring maps

\[ \Gamma (Y, \mathcal{O}_ Y) \xrightarrow {f^\sharp } \Gamma (X, \mathcal{O}_ X) \to \mathcal{O}_{X, x} \]

Let $\mathfrak p \subset \Gamma (Y, \mathcal{O}_ Y)$ denote the inverse image of $\mathfrak m_ x$. Let $y \in Y$ be the corresponding point. Then $f(x) = y$.

**Proof.**
Consider the commutative diagram

\[ \xymatrix{ \Gamma (X, \mathcal{O}_ X) \ar[r] & \mathcal{O}_{X, x} \\ \Gamma (Y, \mathcal{O}_ Y) \ar[r] \ar[u] & \mathcal{O}_{Y, f(x)} \ar[u] } \]

(see the discussion of $f$-maps below Sheaves, Definition 6.21.7). Since the right vertical arrow is local we see that $\mathfrak m_{f(x)}$ is the inverse image of $\mathfrak m_ x$. The result follows.
$\square$

Lemma 26.6.2. Let $X$ be a locally ringed space. Let $f \in \Gamma (X, \mathcal{O}_ X)$. The set

\[ D(f) = \{ x \in X \mid \text{image }f \not\in \mathfrak m_ x\} \]

is open. Moreover $f|_{D(f)}$ has an inverse.

**Proof.**
This is a special case of Modules, Lemma 17.23.10, but we also give a direct proof. Suppose that $U \subset X$ and $V \subset X$ are two open subsets such that $f|_ U$ has an inverse $g$ and $f|_ V$ has an inverse $h$. Then clearly $g|_{U\cap V} = h|_{U\cap V}$. Thus it suffices to show that $f$ is invertible in an open neighbourhood of any $x \in D(f)$. This is clear because $f \not\in \mathfrak m_ x$ implies that $f \in \mathcal{O}_{X, x}$ has an inverse $g \in \mathcal{O}_{X, x}$ which means there is some open neighbourhood $x \in U \subset X$ so that $g \in \mathcal{O}_ X(U)$ and $g\cdot f|_ U = 1$.
$\square$

Lemma 26.6.3. In Lemma 26.6.2 above, if $X$ is an affine scheme, then the open $D(f)$ agrees with the standard open $D(f)$ defined previously (in Algebra, Definition 10.16.1).

**Proof.**
Omitted.
$\square$

reference
Lemma 26.6.4. Let $X$ be a locally ringed space. Let $Y$ be an affine scheme. The map

\[ \mathop{Mor}\nolimits (X, Y) \longrightarrow \mathop{\mathrm{Hom}}\nolimits (\Gamma (Y, \mathcal{O}_ Y), \Gamma (X, \mathcal{O}_ X)) \]

which maps $f$ to $f^\sharp $ (on global sections) is bijective.

**Proof.**
Since $Y$ is affine we have $(Y, \mathcal{O}_ Y) \cong (\mathop{\mathrm{Spec}}(R), \mathcal{O}_{\mathop{\mathrm{Spec}}(R)})$ for some ring $R$. During the proof we will use facts about $Y$ and its structure sheaf which are direct consequences of things we know about the spectrum of a ring, see e.g. Lemma 26.5.4.

Motivated by the lemmas above we construct the inverse map. Let $\psi _ Y : \Gamma (Y, \mathcal{O}_ Y) \to \Gamma (X, \mathcal{O}_ X)$ be a ring map. First, we define the corresponding map of spaces

\[ \Psi : X \longrightarrow Y \]

by the rule of Lemma 26.6.1. In other words, given $x \in X$ we define $\Psi (x)$ to be the point of $Y$ corresponding to the prime in $\Gamma (Y, \mathcal{O}_ Y)$ which is the inverse image of $\mathfrak m_ x$ under the composition $ \Gamma (Y, \mathcal{O}_ Y) \xrightarrow {\psi _ Y} \Gamma (X, \mathcal{O}_ X) \to \mathcal{O}_{X, x} $.

We claim that the map $\Psi : X \to Y$ is continuous. The standard opens $D(g)$, for $g \in \Gamma (Y, \mathcal{O}_ Y)$ are a basis for the topology of $Y$. Thus it suffices to prove that $\Psi ^{-1}(D(g))$ is open. By construction of $\Psi $ the inverse image $\Psi ^{-1}(D(g))$ is exactly the set $D(\psi _ Y(g)) \subset X$ which is open by Lemma 26.6.2. Hence $\Psi $ is continuous.

Next we construct a $\Psi $-map of sheaves from $\mathcal{O}_ Y$ to $\mathcal{O}_ X$. By Sheaves, Lemma 6.30.14 it suffices to define ring maps $\psi _{D(g)} : \Gamma (D(g), \mathcal{O}_ Y) \to \Gamma (\Psi ^{-1}(D(g)), \mathcal{O}_ X)$ compatible with restriction maps. We have a canonical isomorphism $\Gamma (D(g), \mathcal{O}_ Y) = \Gamma (Y, \mathcal{O}_ Y)_ g$, because $Y$ is an affine scheme. Because $\psi _ Y(g)$ is invertible on $D(\psi _ Y(g))$ we see that there is a canonical map

\[ \Gamma (Y, \mathcal{O}_ Y)_ g \longrightarrow \Gamma (\Psi ^{-1}(D(g)), \mathcal{O}_ X) = \Gamma (D(\psi _ Y(g)), \mathcal{O}_ X) \]

extending the map $\psi _ Y$ by the universal property of localization. Note that there is no choice but to take the canonical map here! And we take this, combined with the canonical identification $\Gamma (D(g), \mathcal{O}_ Y) = \Gamma (Y, \mathcal{O}_ Y)_ g$, to be $\psi _{D(g)}$. This is compatible with localization since the restriction mapping on the affine schemes are defined in terms of the universal properties of localization also, see Lemmas 26.5.4 and 26.5.1.

Thus we have defined a morphism of ringed spaces $(\Psi , \psi ) : (X, \mathcal{O}_ X) \to (Y, \mathcal{O}_ Y)$ recovering $\psi _ Y$ on global sections. To see that it is a morphism of locally ringed spaces we have to show that the induced maps on local rings

\[ \psi _ x : \mathcal{O}_{Y, \Psi (x)} \longrightarrow \mathcal{O}_{X, x} \]

are local. This follows immediately from the commutative diagram of the proof of Lemma 26.6.1 and the definition of $\Psi $.

Finally, we have to show that the constructions $(\Psi , \psi ) \mapsto \psi _ Y$ and the construction $\psi _ Y \mapsto (\Psi , \psi )$ are inverse to each other. Clearly, $\psi _ Y \mapsto (\Psi , \psi ) \mapsto \psi _ Y$. Hence the only thing to prove is that given $\psi _ Y$ there is at most one pair $(\Psi , \psi )$ giving rise to it. The uniqueness of $\Psi $ was shown in Lemma 26.6.1 and given the uniqueness of $\Psi $ the uniqueness of the map $\psi $ was pointed out during the course of the proof above.
$\square$

Lemma 26.6.5. The category of affine schemes is equivalent to the opposite of the category of rings. The equivalence is given by the functor that associates to an affine scheme the global sections of its structure sheaf.

**Proof.**
This is now clear from Definition 26.5.5 and Lemma 26.6.4.
$\square$

Lemma 26.6.6. Let $Y$ be an affine scheme. Let $f \in \Gamma (Y, \mathcal{O}_ Y)$. The open subspace $D(f)$ is an affine scheme.

**Proof.**
We may assume that $Y = \mathop{\mathrm{Spec}}(R)$ and $f \in R$. Consider the morphism of affine schemes $\phi : U = \mathop{\mathrm{Spec}}(R_ f) \to \mathop{\mathrm{Spec}}(R) = Y$ induced by the ring map $R \to R_ f$. By Algebra, Lemma 10.16.6 we know that it is a homeomorphism onto $D(f)$. On the other hand, the map $\phi ^{-1}\mathcal{O}_ Y \to \mathcal{O}_ U$ is an isomorphism on stalks, hence an isomorphism. Thus we see that $\phi $ is an open immersion. We conclude that $D(f)$ is isomorphic to $U$ by Lemma 26.3.4.
$\square$

Lemma 26.6.7. The category of affine schemes has finite products, and fibre products. In other words, it has finite limits. Moreover, the products and fibre products in the category of affine schemes are the same as in the category of locally ringed spaces. In a formula, we have (in the category of locally ringed spaces)

\[ \mathop{\mathrm{Spec}}(R) \times \mathop{\mathrm{Spec}}(S) = \mathop{\mathrm{Spec}}(R \otimes _{\mathbf{Z}} S) \]

and given ring maps $R \to A$, $R \to B$ we have

\[ \mathop{\mathrm{Spec}}(A) \times _{\mathop{\mathrm{Spec}}(R)} \mathop{\mathrm{Spec}}(B) = \mathop{\mathrm{Spec}}(A \otimes _ R B). \]

**Proof.**
This is just an application of Lemma 26.6.4. First of all, by that lemma, the affine scheme $\mathop{\mathrm{Spec}}(\mathbf{Z})$ is the final object in the category of locally ringed spaces. Thus the first displayed formula follows from the second. To prove the second note that for any locally ringed space $X$ we have

\begin{eqnarray*} \mathop{Mor}\nolimits (X, \mathop{\mathrm{Spec}}(A \otimes _ R B)) & = & \mathop{\mathrm{Hom}}\nolimits (A \otimes _ R B, \mathcal{O}_ X(X)) \\ & = & \mathop{\mathrm{Hom}}\nolimits (A, \mathcal{O}_ X(X)) \times _{\mathop{\mathrm{Hom}}\nolimits (R, \mathcal{O}_ X(X))} \mathop{\mathrm{Hom}}\nolimits (B, \mathcal{O}_ X(X)) \\ & = & \mathop{Mor}\nolimits (X, \mathop{\mathrm{Spec}}(A)) \times _{\mathop{Mor}\nolimits (X, \mathop{\mathrm{Spec}}(R))} \mathop{Mor}\nolimits (X, \mathop{\mathrm{Spec}}(B)) \end{eqnarray*}

which proves the formula. See Categories, Section 4.6 for the relevant definitions.
$\square$

Lemma 26.6.8. Let $X$ be a locally ringed space. Assume $X = U \amalg V$ with $U$ and $V$ open and such that $U$, $V$ are affine schemes. Then $X$ is an affine scheme.

**Proof.**
Set $R = \Gamma (X, \mathcal{O}_ X)$. Note that $R = \mathcal{O}_ X(U) \times \mathcal{O}_ X(V)$ by the sheaf property. By Lemma 26.6.4 there is a canonical morphism of locally ringed spaces $X \to \mathop{\mathrm{Spec}}(R)$. By Algebra, Lemma 10.20.2 we see that as a topological space $\mathop{\mathrm{Spec}}(\mathcal{O}_ X(U)) \amalg \mathop{\mathrm{Spec}}(\mathcal{O}_ X(V)) = \mathop{\mathrm{Spec}}(R)$ with the maps coming from the ring homomorphisms $R \to \mathcal{O}_ X(U)$ and $R \to \mathcal{O}_ X(V)$. This of course means that $\mathop{\mathrm{Spec}}(R)$ is the coproduct in the category of locally ringed spaces as well. By assumption the morphism $X \to \mathop{\mathrm{Spec}}(R)$ induces an isomorphism of $\mathop{\mathrm{Spec}}(\mathcal{O}_ X(U))$ with $U$ and similarly for $V$. Hence $X \to \mathop{\mathrm{Spec}}(R)$ is an isomorphism.
$\square$

## Comments (0)