A reference for this fact is [II, Err 1, Prop. 1.8.1, EGA] where it is attributed to J. Tate.

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

$\mathop{\mathrm{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$

Comment #2592 by Rogier Brussee on

This lemma basically shows that affine schemes are universal in the following sense.

For every ring $R$, every locally ringed space $(X, \mathcal{O}_X$ and every ring homomorphism $f: R \to \Gamma(X, \mathcal{O}_X)$, there is a unique map of locally ringed spaces $F: X \to \mathrm{spec}(R)$ such that $f = F^\sharp: \Gamma(\mathrm{spec}(R), \mathcal{O})\to \Gamma(X, \mathcal{O}_X)$ under the identification $\Gamma(\mathrm{spec}(R), \mathcal{O}) = R$.

This lemma is in SGA 3 somewhere.

Comment #2622 by on

Hi Rogier Brussee! Yes, indeed it does. In general, if you want me to add a reference for this lemma or any other lemma, please point out an exact reference and I will do so.

Comment #3056 by on

A reference for this fact is EGAI<sub>new</sub>, Prop. 1.6.3, or EGAII, Err<sub>1</sub>, Prop. 1.8.1. The latter attributes this fact to J. Tate.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).