# Retrieve affine schemes by adjunction

In an introductory course about schemes, I've seen the adjunction $${\mathbf{LocRngSpace}}^{\mathrm{op}} \overset{\mathrm{Spec}}{\underset{\Gamma}{\leftrightarrows}} \mathbf{Ring},$$ where $\mathbf{LocRngSpace}$ is the category of locally ringed spaces, $\mathbf{Ring}$ the category of commutative unitary rings, $\Gamma$ the global sections functor and $\mathrm{Spec}$ the usual functor taking a ring to the affine scheme on its spectrum.

I'm then trying to work out the following idea (as an exercise) : retrieving the notion of affine schemes by applying Freyd's adjoint theorem to the global sections functor $${\mathbf{LocRngSpace}}^{\mathrm{op}} \overset{\Gamma}{\to} \mathbf{Ring}.$$ I have already showed that $\mathbf{LocRngSpace}$ is cocomplete and that $\Gamma$ commutes with limits (of ${\mathbf{LocRngSpace}}^{\mathrm{op}}$).

It remains to prove that $\Gamma$ satisfies the set condition : that is for every ring $R$ there exists a set $I$ indexing a family $(X_i)$ of locally ringed spaces and a family of ring morphisms $(r_i \colon R \to \Gamma X_i)$ such that for every locally ringed space $X$ and $f \colon R \to \Gamma X$, there is $i \in I$ and a morphism of locally ringed spaces $h \colon X \to X_i$ such that commutes $$\require{AMScd} \begin{CD} R @>{f}>> \Gamma X \\ @V{r_i}VV @| \\ \Gamma X_i @>>{\Gamma h}> \Gamma X. \end{CD}$$ Of course, I'm trying to avoid using $I = \{\ast\}$ and $X_\ast = \mathrm{Spec R}$… However, knowing about $\mathrm{Spec}$, I know that $\Gamma X$ could be any ring : so I can't expect some simplification about the $f$s. I've tried to take $I$ the set of prime ideals $\mathfrak p$ of $R$ and $X_{\mathfrak p} = (\{\ast\}, R_{\mathfrak p})$ but it will factorize only the $f \colon R \to B$ such that the ideal of $R$ generated by $R \setminus f^{-1}(B^\times)$ is strict. So it seems that I have to consider (for the $X_i$) locally ringed spaces that aren't (all) singleton as a topological space : but then I dangerously drift to $\mathrm{Spec} R$…

Any hint ?

-

I have pondered about the same question a few months ago, but couldn't verify the solution set condition either. Note that since $\{\mathbb{Z}[T]\}$ is colimit-dense in $\mathsf{CRing}$, it suffices to consider $R=\mathbb{Z}[T]$. Therefore, it suffices to find a solution set for global sections, or equivalently to show that $\Gamma$ considered as a functor $\mathsf{LRS}^{\mathrm{op}} \to \mathsf{Set}$ is a representable functor. But I don't know how to do that.
1. Assume that we already know that there is a functor $\mathrm{Spec}$ solving the desired adjunction $\hom(X,\mathrm{Spec}(R)) = \hom(R,\Gamma(X))$. Taking $X=(*,K)$ for a field $K$, it follows easily that the underlying set of $\mathrm{Spec}(R)$ is the set of prime ideals of $R$, and that the residue field at a prime ideal $\mathfrak{p}$ is precisely $\mathrm{Quot}(R/\mathfrak{p})$. Taking $X=(*,A)$ for some local rings $A$, it follows more precisely that the stalk at $\mathfrak{p}$ is $R_{\mathfrak{p}}$ and that we have $\mathfrak{p} \prec \mathfrak{q}$ iff $\mathfrak{q} \subseteq \mathfrak{p}$. These are well-known properties of the spectrum constructed in the usual way, but as you can see this follows from the adjunction! Unfortunately I don't know how to derive the topology and the sheaf completely. In particular, I don't know how to derive from the adjunction that $\mathrm{Spec}$ is fully faithful, or equivalently if the counit $R \to \Gamma(\mathrm{Spec}(R))$ is an isomorphism. Remember that this requires some calculation with the explicit construction of $\mathrm{Spec}(R)$ - somehow I doubt that we can get rid of it.
2. Actually the global section functor factors as $\mathsf{LRS} \to \mathsf{RS} \to \mathsf{CRing}^{\mathrm{op}}$. Here, $\mathsf{RS}$ ($\mathsf{LRS}$) denotes the category of (locally) ringed spaces. In order to show that it has a right adjoint, it suffices to find right adjoints for a) the global section functor $\mathsf{RS} \to \mathsf{CRing}^{\mathrm{op}}$, and b) for the forgetful functor $\mathsf{LRS} \to \mathsf{RS}$. For a) we just take $R \mapsto (*,R)$. For b), one might still try to appeal to Freyd's Adjoint Functor Theorem, but actually it's much easier to construct the right adjoint directly: Given a ringed space $X$, we would like to "make" the stalks $\mathcal{O}_{X,x}$ local. The idea is to add prime ideals $\mathfrak{p} \subseteq \mathcal{O}_{X,x}$ to our space $\tilde{X}$ and define the structure sheaf in such a way that $\mathcal{O}_{\tilde{X},(x,\mathfrak{p})} = (\mathcal{O}_{X,x})_{\mathfrak{p}}$, because this is a local ring. The details of this construction can be found in Gillam's paper Localization of ringed spaces. But I would like to point out that in some sense this construction is very evident, you could have come up with it yourself. In my opinion, the generalization from commutative rings to arbitrary ringed spaces does not make the adjunction more complicated, but rather it decomposes the adjunction into its essential parts, each one being easy to achieve.