Locally ringed spaces and varieties I'm trying to define varieties in term of locally ringed spaces. My main problem is to verify that a locally ringed space morphism when applied to varieties has already an intrinsic sheaf morphism, that is, the one given by composition. 
Let $(f,f^\natural)$ be a map of locally ringed spaces between the following varieties,
$(X,o_X)\rightarrow (Y,o_Y)$.
I want to prove that the sheaf morphism correlated is given by
$g\mapsto g\circ f$.
I think that the proof will mainly rely on the fact that varieties are reduced, so that I can consider the sheaves as functions, but I really can't get out of it. Thank you for your attention. I hope it is comprehensible enough.
 A: Fix an open set $U \subset Y$, and consider the morphism
$$ \mathcal O_Y(U)\overset{f^\natural(U)}\longrightarrow \mathcal O_X(f^{-1}(U)).$$
Given a regular function $g\in \mathcal O_Y(U)$, our goal is to prove that
$$ f^\natural(g)=g \circ f.$$
To do this, pick a point $p \in f^{-1}(U)$. We'll verify  that
$$ f^\natural(g)(p) = g \circ f (p).$$
(I'm thinking of $f^\natural(g)$ as a regular function on $f^{-1}(U)$, and I'm evaluating it at the point $p$.) If we can verify  this for every possible choice of $p$, then we're done.
To prove this, consider the regular function $g(x) - g(f(p)).1 \in \mathcal O_Y(U)$. This function vanishes when evaluated at the point $f(p)$, so
$$ g(x) - g(f(p)).1 \in m_{f(p)},$$
where $m_{f(p)}$ is the (unique) maximal ideal in the stalk $\mathcal O_{Y,f(p)}$.
Now we'll use the fact that $f^\natural$ is a morphism of locally ringed spaces. This tells us that
$$ f^\natural (g(x) - g(f(p)).1) = f^\natural(g)(x) - g(f(p)).1 \in m_{p},$$
where $m_p$ is the maximal ideal in $\mathcal O_{X, p}$. So the function $f^\natural(g)(x) - g(f(p)).1$ vanishes when evaluated at the point $p$:
$$ f^\natural(g)(p) - g(f(p)).1 = 0,$$
i.e. $f^\natural(g)(p)  = g\circ f(p)$, which is exactly what we wanted to show.
