I'm trying to show that manifolds are affine, i.e. $\text{Man}(M,N)\cong \mathbb{R}\text{-Alg}(C^\infty(N),C^\infty(M)) $. If I could show this for $N=\mathbb{R}^n$, then I know how to do the rest using the strong Whitney's embedding theorem. But it seems hard to show the surjectivity of $ \text{Man}(M,\mathbb{R}^n)\hookrightarrow \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M)):f\mapsto f^\*$.


I found this post [Are all manifolds are affine?](https://mathoverflow.net/questions/88986/are-all-manifolds-affine), but it didn't mention any explicit material about this, and I failed finding anything other than that post. I learned that $\text{Man}(M,\mathbb{R}^n)\cong C^\infty\text{-Ring}(C^\infty(\mathbb{R}^n),C^\infty(M))$ from *Models for Smooth Infinitesimal Analysis*, but I don't know how to show that $C^\infty\text{-Ring}(C^\infty(\mathbb{R}^n),C^\infty(M))\cong \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))$.


Thanks in advance for any solution or material about this.


**EDIT:** I had a further investigation (but no success) and I'm putting it here with supplementary details of my question.


The images of the coordinates functions on $\mathbb{R}^n$ consist to give a map $ \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))\to \text{Man}(M,\mathbb{R}^n)$, which tells the injectivity of $ \text{Man}(M,\mathbb{R}^n)\hookrightarrow \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))$. To show the desired surjectivity, we still need to verify that the composition $$\mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))\to \text{Man}(M,\mathbb{R}^n)\hookrightarrow \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))$$
is the identity.


I find that it suffices to show that, for any $\mathbb{R}$-algebra homomorphism $\varphi:C^\infty(\mathbb{R}^n)\to C^\infty(M)$, if $\rho\in C^\infty(\mathbb{R}^n)$ satisfies $\rho|\_V=0$ for some open subset $V\subset\mathbb{R}^n$, then $\varphi(\rho)|\_{f^{-1}(V)}=0$, where $f:M\to \mathbb{R}^n$ is given by the images of the coordinate functions on $\mathbb{R}^n$ under $\varphi$. If this is true, then we can define the restriction of $\varphi$ to any open subset $U\subset \mathbb{R}^n$,


$$ \varphi|\_U :C^\infty(U)\to C^\infty(f^{-1}(U)),$$


by putting, for any $g\in C^\infty(U)$, $\varphi|\_U(g)$ to be the unique smooth function such that


$$\varphi|\_U(g)|\_{f^{-1}(V)}=\varphi(G)|\_{f^{-1}(V)} $$


for any open set $V\subset U$ and $G\in C^\infty(\mathbb{R}^n)$ such that $G|\_V=g|\_V$; to show that $\varphi(G)|\_{f^{-1}(V)} $ does not depend on the choice of $G$ requires exactly the property I claimed above.


If the restrictions of $\varphi$ can be defined, then we obtain a sheaf morphism. Investigating the germs and we can find that $\varphi$ is indeed the pullback by $f$.



How to show that $\text{Man}(M,\mathbb{R}^n)\cong \mathbb{R}\text{-Alg}(C^\infty(\mathbb{R}^n),C^\infty(M))$?
The proof of this fact is available in modern textbooks.


For example, see Theorem 7.16 in Jet Nestruev's *Smooth Manifolds and Observables* (Second Edition, 2020).


In fact, the cited book contains a lot of material that explains how to pass between differential geometric objects and the corresponding algebraic objects, e.g., vector bundles and modules, differential forms and Kähler differentials, etc.


