Every manifold is locally the inverse image of a regular value

Suppose $M \subset \mathbb{R}^{m+d}$ is a manifold of dimension $m$. I need to prove that $M$ is locally $g^{-1}(0)$ where $g:U \subset M \rightarrow \mathbb{R}^p$ is a submersion. I am suppose to use the fact that every manifold is locally expressible as a graph but I can't seem to understand how. In $Guillemin-pollack$ is a similar problem, they call it the partial converse 2, and to prove it they just say it is a consequence of the local immersion theorem but I don't see why. I tried constructing such s function $g$ but I get stuck trying to prove it is indeed a submersion.

In my opinion, it is more intuitive to prove that a submanifold is locally given by equations from the definition stating that a $m$-submanifold is a subset of $\mathbb{R}^n$ modelled on $m$-plans :
Let $x\in M$, there exists $U\subseteq\mathbb{R}^{m+d}$ an open neighborhood of $x$, $V\subset\mathbb{R}^{m+d}$ an open neighborhood of $0$ and $\varphi\colon U\rightarrow V$ a $C^1$-diffeomorphism such that: $$\varphi(M\cap U)=(\mathbb{R}^m\times\{0\})\cap V.$$ Let $f:=(\varphi_{m+1},\cdots,\varphi_{m+d})\colon U\rightarrow\mathbb{R}^{d}$, since $\varphi$ is a $C^1$-diffeomorphism, the linear functionals $\mathrm{d}_p\varphi_i$ are linearly independant for all $p\in M$. This implies that $\mathrm{d}_pf:\mathbb{R}^{m+d}\rightarrow\mathbb{R}^d$ has full rank for all $p\in M$, namely $f$ is a submersion. Furthermore, by construction, one has: $$M\cap U=f^{-1}(\{0\}).$$
Let $x\in M$, there exists $U\subseteq\mathbb{R}^m$ an open neighborhood of $x$, $V\subseteq\mathbb{R}^d$ an open neighboorhood of $0$ and $h\colon U\rightarrow V$ a $\mathcal{C}^1$-map such that: $$M\cap(U\times V)=\{(x,h(x));x\in U\}.$$ Let $f\colon U\times V\rightarrow\mathbb{R}^d,(x,y)\mapsto y-h(x)$, one has: $$M\cap (U\times V)=f^{-1}(\{0\}).$$ Let us write $f$ in the following explicit form: $$f(x_1,\cdots,x_{m+d})=(x_{m+1}-h_1(x_1,\cdots,x_m),\cdots,x_{m+d}-h_d(x_1,\cdots,x_m)).$$ It is now clear, that for all $p=(p_1,p_2)\in(\mathbb{R}^m\times\mathbb{R}^d)\cap M$, one has: $$\textrm{Jac}_p(f)=(-\textrm{Jac}_{p_1}(h)\vert I_d).$$ Therefore, $\textrm{Jac}_p(f)$ has at least rank $d$ and $f$ is a submersion.
• why does such $\varphi$ exist? is it a consequence of the local inmersion theorem since $M$ is immersed in $\mathbb{R}^{m+d}$? – allizdog Nov 28 '16 at 23:04