Furthering the quest of making this the most technical blog with the highest abstraction level, I offer the following for your perusal.

Let (X, O_X) be a ringed space. For any open U and any f ∈ O_X(U) there is a largest open U_f where f is invertible. Then X is a locally ringed space if and only if

U = U_f ∪ U_{1-f}

for all U and f. Denoting j : U_f —> U the inclusion map, there is a natural map

O_U[1/f] —-> j_*O_{U_f}

where the left hand side is the sheafification of the naive thing. If X is a scheme, then this map is an isomorphism of sheaves of rings on U. Furthermore, we can ask if every point of X has a neighbourhood U such that

U is quasi-compact and a basis for the topology on U is given by the U_f

If X is a scheme this is true because we can take an affine neighbourhood. If U is quasi-affine (quasi-compact open in affine), then U also has this property, however, so this condition does not characterize affine opens.

We ask the question: Do these three properties characterize schemes among ringed spaces? The answer is no, for example because we can take a Jacobson scheme (e.g., affine n-space over a field) and throw out the nonclosed points. We can get around this issue by asking the question: Is the ringed topos of such an X equivalent to the ringed topos of a scheme? I think the answer is yes, but I haven’t worked out all the details.

You can formulate each of the three properties in the setting of a ringed topos. (There are several variants of the third condition; we choose the strongest one.) An example would be the big Zariski topos of a scheme.