Smooth maps considered as locally ringed space morphisms? I have heard that for a locally ringed space $X$ whose topology is second countable and Hausdorff, $X$ is a smooth manifold if and only if it is locally ringed space which is locally isomorphic to the sheaf of differentiable functions of some open sets in $\mathbb{R}^n$.
Question: What about the maps between smooth manifolds? Let $M, N$ smooth manifolds and $\phi: M \rightarrow N$ be a continuous map. Does every locally ringed space morphism  $\mathcal{O}_N \rightarrow \phi_* \mathcal{O}_M$ come from $\phi$?
I'm asking this because I thought it was true - so that I agree that locally ringed spaces are useful generalizations of (whatever) manifolds - until I tried to prove it tonight. In the process it seems to me that this is NOT true. But if this is not true, why is locally ringed space a good generalization of manifolds if the maps don't behave well? (As opposed to rings $A \rightarrow B$ and spectrum maps $SpecB \rightarrow SpecA$?)
Thanks!
 A: For a morphism $f: (X,{\mathcal O}_X)\to (Y,{\mathcal O}_Y)$ of locally ringed spaces the locality of the maps $f^{\sharp}_x: {\mathcal O} _{Y,f(x)}\to {\mathcal O} _{X,x}$ implies that for each function $\lambda\in{\mathcal O}_Y(U)$ we have $v(f^{\sharp}_U(\lambda)) = f^{-1}(v(\lambda))$ (here $v(\lambda)$ denotes the zero set of $\lambda$, i.e. the set of all points $y\in U$ such that $\lambda_y\in{\mathfrak m}_y$.
(*) Therefore the zero set of $f^{\sharp}_U (\lambda)$ is determined entirely by the underlying continuous map of $f$, and it equals $f^{-1}(v(\lambda))$
From now on, let $X,Y$ be topological spaces and ${\mathcal O} _X$, ${\mathcal O} _Y$ denote the sheaves of continuous real-valued functions on $X$ and $Y$, respectively. If you know that $f^{\sharp}$ preserves constant functions, then by translating a function $\lambda\in{\mathcal O}_Y (U)$ by a real number $\alpha\in{\mathbb R}$, you see by (*) that the niveau set $v_\alpha(f^{\sharp}_U(\lambda)) := \{x\in f^{-1}(U)\ |\ f^{\sharp}_U(\lambda)(x) = \alpha\}$ equals $f^{-1}(v_\alpha(\lambda))$, so $f^{\sharp}_U(\lambda) = \lambda\circ f$ as suspected.
Now $f^{\sharp}$ has to preserve constant functions, because each map $\overline{f^{\sharp}_x}: {\mathbb R} = {\mathcal O}_{Y,f(x)}/{\mathfrak m}_{Y,f(x)}\to{\mathcal O}_{X,x}/{\mathfrak m}_{X,x} = {\mathbb R}$ is an automorphism of ${\mathbb R}$, thus equals the identity. (Ok, one could use this to argue directly that $f^{\sharp}_U(\lambda)(x)=\lambda(f(x))$ - didn't see this when starting to write)
For a field different from ${\mathbb R}$, this argument doesn't work any more, because there may be nontrivial automorphims. For example, if you take ${\mathbb C}$-valued continuous functions, you could set $f^{\sharp}_U(\lambda) := \text{conj}\circ \lambda\circ f$ for the algebraic component of $f$.
