Let $f:U\rightarrow \Bbb{R}^{m}$ be a function of class $C^{k\geq 1}$, where $U$ is an open subset of $\Bbb{R}^n$. If $f'(a)$ has rank $p$ for some $a\in U$, there exists an embedding (immersion that is homeomorphism into its image) $\phi:V\rightarrow U$ of class $C^\infty,$ where $V\subset\Bbb{R}^{p}$ such that $f\circ \phi:V\rightarrow\Bbb{R}^{m}$ is an embedding.
I have seen this question, and I did understand the intuition, but I'm having problems to write it down.
By a Lemma, since $\dim(\textrm{Im}(f'(a)))$, there exists a decomposition $\Bbb{R}^m=\Bbb{R}^p\bigoplus\Bbb{R}^{m-p}$ such that the projection $$\pi:\Bbb{R}^{m}\rightarrow\Bbb{R}^{p},(x,y)\mapsto x$$ applies $\textrm{Im}(f'(a))$ isomorphically.
Question: How do I construct the map $\phi$?
Maybe I can use this projection to define my $\phi$, but I don't know exactly how to do it.