Is the inverse function theorem for manifolds applicable here? Let $\mathbb{M}$ be some $m$-dimensional manifold with boundary and let $\varphi \mathpunct{:} \mathbb{R}^m \to \mathbb{M}$ be some smooth function. If the Jacobian $D\varphi(x)$ has rank $m$ in some point $x$, can I make any statements about local invertability and smoothness of the inverse? What about if $\varphi(x)$ is in the interior of $\mathbb{M}$? What if I have some open set $U \subset \mathbb{R}^m$ such that $\varphi$ restricted to $U$ is injective and $D\varphi$ has rank $m$ on all of $U$?
This feels like the inverse function theorem but the conditions are not quite correct since $\mathbb{M}$ has a boundary and I have information on the rank of the Jacobian instead of the tangent map. Can I still do anything here?
 A: In fact, if $D\varphi(x)$ has maximal rank, then $\varphi(x)$ cannot lie in the boundary of $M$.
Consider $d\!M$ the double of $M$, which consists in two copies of $M$ glued together along their common boundary.
It is a $m$-dimensional manifold without boundary, and since $M\subset d\!M$, then $\varphi\colon \Bbb R^m \to d\!M$ is well defined.
We still have that $\mathrm{Im}(\varphi)\subset M$.
Let $x\in \Bbb R^n$ be such that $D\varphi(x)$ has maximal rank.
By the inverse function Theorem (for manifolds without boundary), $\varphi$ induces a diffeomorphism between an open neighbourhood $U$ of $x$ in $\Bbb R^n$ and an open neighbourhood $\varphi(U)$ of $\varphi(x)$ in $d\!M$.
Recall that $\varphi(U)\subset \mathrm{Im}(\varphi)\subset M$.
Then, $\varphi$ induces a diffeomorphism between an open neighbourhood of $x$ in $\Bbb R^n$ and an open neighbourhood of $\varphi(x)$ in $M$.
To conclude, note that no open neighbourhood of any boundary point of a manifold can be diffeomorphic (even homeomorphic) to an open subset of $\Bbb R^n$.
Thus, $\varphi(x)$ did not lie in $\partial M$.

Remark: instead of working with the double, one would have preferred to glue a collar neighbourhood $\partial M \times [0,1)$ to $M$ along $\partial M$ (with $x \sim (x,0)$).
The rest of the proof remains the same.
