# Question about the spec and global section functors

In "points in algebraic geometry why shift from m-spec to spec", Anton said that the global sections functor $\Gamma: \mathrm{LRSp} \to \mathrm{CRing}$ is left adjoint to the Spec functor $\mathrm{Spec}:\mathrm{CRing } \to \mathrm{LRSp}$, where $\mathrm{LRSp}$ is the category of locally ringed spaces.

It is an exercise in Hartshorne (II 2.4) to show that this is true when $\mathrm{LRSp}$ is replaced with the category of schemes. I can solve this exercise, but my argument relies heavily on being able to cover a scheme with open affine schemes.

Can anyone point me towards a reference where this is proved or give me some hints?

-
What is wrong with proving it by covering your scheme with open affines? This is pretty much how you prove anything about schemes... –  Steven Gubkin Mar 8 '11 at 5:23
You can't cover an arbitrary locally ringed space with open affine schemes? Should I rewrite my question? –  Daniel Barter Mar 8 '11 at 6:26
@Daniel: Yes, it's not clear which result you're asking about (the one with LRS or the one with schemes). –  Qiaochu Yuan Mar 8 '11 at 10:17

EGA 1 (Springer edition), proposition (1.6.3).

-

I just sum up the well-known construction: If $X$ is a locally ringed space, then define $f : X \to \text{Spec}(\Gamma(X,\mathcal{O}_X))$ as follows:

For every $x \in X$, let $f(x)$ be the kernel of the canonical homomorphism $\Gamma(X,\mathcal{O}_X) \to \kappa(x), s \mapsto s(x)$. This defines $f$ as a map. Remark that the preimage of the basic-open subset $D(s)$ is $X_s$, which is open. There is a canonical homomorphism $\Gamma(X,\mathcal{O}_X)_s \to \Gamma(X_s,\mathcal{O}_X)$ which extends the restriction map. This defines the algebraic portion of $f$. So basically $f$ is just "evaluation".

Besides we have an isomorphism $\Gamma(\text{Spec}(R),\mathcal{O}) \cong R$. It is easy to verify the two triangular identities, so we have an adjunction between the oppositve category of rings and the category of locally ringed spaces.

-