If R is a commutative ring (with unit) then we have an affine scheme Spec(R) which is an object of the category of ringed topological spaces. Is there any way of characterising this object relative to the category of ringed topological spaces? The underlying space of an affine scheme is compact and the structure sheaf is a ring, but these statements hardly go any way towards characterising an affine scheme. I am not looking for an answer that is necessarily strictly tied to the structure of the category of ringed topological spaces  just something that is topological and/or about the algebraic structure of the structure sheaf.
A nonanswer is: 'An affine scheme is a ringed topological space of the form SpecR for some cummutative ring R.'
Thanks for any pointers, Christopher



An affine scheme can be characterized in the category of locally ringed spaces (one needs the "locally" if I remember correctly). A l.r.s. $X$ is an affine scheme i.f.f. $Hom(Y,X)$ functorially equals $Hom(\Gamma(X,\mathcal{O}_X),\Gamma(Y,\mathcal{O}_Y))$, for $Y$ a l.r.s. In other words, the affine scheme construction is the construction of a right adjoint to $\Gamma: ( l.r.s. ) \to ( rings )^{op}$. 


Look at Eisenbud and Harris, The Geometry of Schemes, page 21. The conditions for a ringed space $(X,\mathcal{O})$ to be isomorphic to $Spec(R)$, where $R=\mathcal{O}(X)$, are: 1) For each $f\in R$, let $U_f\subset X$ be the set of $x$ such that $f$ maps to a unit in the stalk $\mathcal{O}_x$. Then $\mathcal{O}(U_f)=R[f^{1}]$. 2) The stalks $\mathcal{O}_x$ are local rings. 3) The natural map $X\to \left Spec(R)\right$ that takes $x$ to the preimage in $R$ of the maximal ideal in $\mathcal{O}_x$ is a homeomorphism. 


The characterizations mentioned so far are purely formal. There is a nontrivial cohomological characterization by Serre of affine schemes within quasicompact quasiseparated schemes $X$ (see EGA II, 5.2). Namely, $X$ is affine iff $\Gamma : \mathrm{Qcoh}(X) \to \mathrm{Ab}$ is exact (i.e. $\mathcal{O}_X$ is a projective object in $\mathrm{Qcoh}(X)$) iff all cohomology groups $H^i(X,F)$ vanish, where $F$ is a quasicoherent sheaf on $X$ and $i>0$. Actually it suffices to take $i=1$ and $F$ a finite type ideal of $\mathcal{O}_X$. 


Maybe you will be interested in the thesis of Mel Hochster. He characterizes the image of Spec in Top. The article based on it is called Prime Ideal Structures in Commutative Rings and appeared in the Transactions of the AMS in 1969. 


There is a purely categorytheoretical way to describe affine schemes. Consider an arbitrary scheme $X$. For any ring $R$ we can consider a set of $R$points of $X$, that is $X(R)=\mathrm{Hom}_{Schm}\left( \mathrm{Spec}\;R,X \right)$. This is a functor $X: Ring \to Set$. For an affine $X=\mathrm{Spec}\;A$ it equals to $X(R)= \mathrm{Hom}_{Ring}\left( A, R \right)$. Affine schemes are exactly such representable functors $Ring\to Set$. There's also a concrete theorem, describing affine schemes. If $X$ is a scheme and $\mathcal{J}$ is a nilpotent quasicoherent sheaf of ideals of $\mathcal{O}_X$, then $X$ is affine iff the closed subscheme $V(\mathcal{J})$ of $X$ is affine. (see Gabriel, Demazure, p.80). 

