I've heard it been said that the construction of Spec$R$ is a canonical way of taking the ring $A$ and producing a locally ringed space with $A$ as the ring of global sections. This is certainly informal; but is it correct in some technical sense? If it was, we might expect to find $\text{Spec}(-):\text{Ring}^{op}\to\text{LRSpace}$ (or indeed $\text{Spec}(A)$) characterized by some universal property. So I wonder: is this so?
Sincerely, Eivind