Prove that a map beween manifolds that is smooth when composed by an embedding is smooth. I am studying differential geometry, and I am having problems with the following exercise:
Let $M,N,W$ be smooth manifolds, $F:M\to N$ a smooth map and  $i:W\to N$ a smooth embedding such that there exists a map $G$ such that $F=i\circ G$. Prove that $G$ is smooth.
Since $i$ is an embedding it is a homeomorphism in the image, so there exists $i^{-1}$ and it is continuous. Hence $G=i^{-1}\circ F$, which is continuous becuase it is the composition of two continuous maps. However, I don't know how to prove that $G$ is smooth, the only way I know to find two charts $\phi, \psi$ such that $\phi\circ G\circ\psi^{-1}$ is smooth for every  $p\in G$. So my idea was to use that $i$ and $F$ are smooth to find those charts, but this has no sense, since this aproach does not use the fact that $i$ is an embedding. Another idea I had was to take diferentials to use the fact that $i$ is an immersion , but this aproach fails too, since we can't take the diferential of $G$, because it requires smoothness, which is exactly what we are looking for.
I am looking for an elementary approach (which can be done with the tools given in Lee ''introduction to smooth manifolds'' in chapters 1-4) Thanks for your help.
 A: The question is purely local. Choose $x_0\in M$ and let $y_0=f(x_0)\in W\subset N$. Choose local coordinates $y^1,\dots,y^m$ around $y_0\in N$ so that $W = \{y^{n+1}=y^{n+2}=\dots=y^m=0\}$. That is, $i(y^1,\dots,y^n) = (y^1,\dots,y^n,0,\dots,0)$ gives the inclusion $W\hookrightarrow N$.
Write $F(x) = (f^1(x),\dots,f^m(x)) = (f^1(x),\dots,f^n(x),0,\dots,0)$, since the image of $F$ is contained in $W$. Since projection $\pi\colon\Bbb R^m\to\Bbb R^n$, being linear, is smooth, we see that $G=\pi\circ F$ is smooth.
A: Let $Y$ be an open set of $W$. Then since $\iota$ is an embedding, there is an open set $V$ in $N$ so that $\iota(Y) = V\cap \iota (W)$. Using, this and $F = \iota \circ G$, one has $G^{-1}(Y) = F^{-1}(V)$. Since $F$ is continuous, $F^{-1}(V)$ is open in $M$. Since $Y$ is arbitrary, $G$ is continuous.
Let $p \in M$ and let $q = G(p) \in W$. Since $\iota$ is an immersion, by the rank theorem, there are local charts $(Y, \eta)$, $(V, \psi)$ of $W, N$ respectively so that
$$ \tag{1} \psi \circ \iota \circ \eta^{-1} (x^1, \cdots, x^l) = (x^1, \cdots, x^l, 0,\cdots, 0).$$
Since $G$ is continuous, there is local chart $(U, \varphi)$ of $M$ so that $G(U) \subset Y$. Then
$$ \eta \circ G \circ \varphi^{-1} (y) = (G^1(y), \cdots, G^l(y))$$
for some functions $G^1, \cdots, G^l$ and $y = (y^1, \cdots, y^m)$. Using (1), and $F = G\circ \iota$,
$$ \psi \circ F \circ \varphi^{-1} (y) = \big( (\psi \circ \iota \circ \eta^{-1}) \circ (\eta \circ G \circ\varphi^{-1}) \big) (y) = (G^1(y), \cdots, G^l(y), 0,\cdots, 0).$$
Since $F$ is smooth, $\psi \circ F \circ \varphi^{-1}$ is smooth. Thus implies that $G^1, \cdots, G^l$ are local smooth functions, thus $\eta \circ G \circ \varphi^{-1}$ is smooth. Since this is true for all $p$, $G$ is smooth.
