I am trying to prove the following fact for a homework assignment in algebraic geometry:
Let R be a local ring, and X a prescheme. Show that there is a one-one correspondence between R-valued points on X and pairs (x, g) of points x on X and local homomorphisms $g: O_{X, x} \to R$.
Now, given f: Spec R -> X, and writing x for f(M) where M is the maximal ideal of R, the induced map on stalks gives us a map $g: O_{X,x} \to R_M = R$. Then it remains to show that given a point x of X and a map $g: O_{X,x} \to R$, that there is a map f: Spec R -> X such that f(M) = x and such that the induced map is g.
I haven't had any luck yet with associating a map f with a given g. Here are my thoughts and some of the things I've tried:
When R is a field, then Spec R has only a single point, and thus the map f is completely determined by where it sends the zero ideal. This induces a local homomorphism from $O_{X,x}$ to k, which is to say that it induces a map from $O_{X,x} / M_x \to k$ since the maximal ideal $M_x$ of $O_{X,x}$ is contained in the kernel of the local homomorphism. Anyway, as long as there is some local homomorphism from $O_{X,x}$ to k, then the map f sending (0) to x is a well-defined morphism. Now, when R is again just a local ring, it seems unlikely that f is completely determined by where it sends M, and I can't see how to work with this.
I've tried extending the map g to a map of sheaves, thinking that maybe from there I'd be able to find my map of preschemes. But here I get a little lost, and I'm not sure how to make it work.
We know a lot about the topology of Spec R, and this forces some properties of X. For example, the only open neighborhood of M in Spec R is the whole space. Therefore, f(Spec R) covers any open neighborhood of f(M). I haven't pursued this way very far yet, as it seems a little further afield.
I just need a little hint to get me going again -- I've been thinking about this one for a while and I can't seem to get unstuck.