# Does the ring of global sections functor on the category of locally ringed spaces have an adjoint functor?

Let $Rng$ be the category of commutative rings. Let $Loc$ be the category of locally ringed spaces. Let $(X, \mathcal{O}_X)$ be an locally ringed space. Then $\Gamma(X) = \Gamma(X, \mathcal{O}_X)$ is an commutative ring. Hence $\Gamma(X)$ induces an functor $\Gamma\colon Loc \rightarrow Rng^o$, where $Rng^o$ is the oposite category of $Rng$. Does $\Gamma$ have an adjoint functor?

-
See my answer to this question: math.stackexchange.com/questions/56854/… –  Keenan Kidwell Nov 23 '12 at 23:51
Dear @Rankeya, Thanks for the kind words. –  Keenan Kidwell Nov 24 '12 at 0:13
I just want to mention that when I learned this result, particularly the fact that, when you have a morphism $X\rightarrow\mathrm{Spec}(A)$ with $X$ an LRS, the map on global sections determines the underlying map of topological spaces in the only possible way it could, it completely changed my understanding of schemes, and how to work with affine opens of general (non-affine) schemes. I use to be bothered by the definition of an affine open of an abstract scheme as "an open which is isomorphic as an LRS to the spectrum of some ring." Does the isomorphism matter? Are there lots of them? –  Keenan Kidwell Nov 24 '12 at 0:30
With this result you can prove that a LRS (not just a scheme!) $X$ admits a unique morphism of LRS $can:X\rightarrow\mathrm{Spec}(\mathscr{O}_X(X))$, and it is an isomorphism if and only $X$ is an affine scheme in the sense that it admits some isomorphism to the spectrum of some ring. I actually greatly prefer to think of the definition of an affine scheme as "a locally ringed space for which the canonical morphism to the spectrum of its global sections is an isomorphism." I felt like I broke through a major barrier in understanding of schemes when I learned this result in the context of LRS. –  Keenan Kidwell Nov 24 '12 at 0:32

The $Spec$ functor is the desired adjoint functor to the category of locally ringed spaces (it is right adjoint to $\Gamma$). I think Hartshorne has an exercise where he asks us to prove this when $Loc$ is replaced by the category of schemes.
It's Lemma 01I1 in Stacks. –  Zhen Lin Nov 24 '12 at 8:39