I am struggling to reconcile the two definitions of smooth k-manifold in $R^n$ from M.Spivaks Calculus on Manifolds (pg 109) and J.W Minor's Topology from differential point of view (pg 01).
Milnor's Definition
The key concept in Milnor's definition is smooth function, between arbitrary subsets of Euclidean space. If $f:X \to Y$ and $X \subset R^n, Y\subset R^m$. Then $f$ is smooth if for each point $p \in X$, there is a an open neighbourhood $U \subset R^n$ and a $C^\infty$ function $F:U \to V$ ($V \subset R^m$ is open) that is compatible (an extension of) with $f$. i.e, $F_{|X \cap U} = f_{|X \cap U}$. Now the diffeomorphism between subsets becomes smooth function that has a two-sided inverse which is also smooth.
The definition of a k-manifold is now made quite naturally as a subset of $R^n$ which is diffeomorphic to an open subset in $R^k$.
Spivak's Definition.
Spivak only considers invertible (having two-sided inverse) $C^\infty$ function between open subsets and calls this a diffeomorphism, of course this agrees with Milnor's definition when $X, Y$ above are open subsets. Then Spivak's defines the smooth k-manifold using this diffeomorphism. A subset $M\in R^n$ is a k-manifold if the following criteria are satisfied.
For any $p \in M$, there is an open neighbourhood of $p$, $U\subset R^n$ and a diffeomorphism, $f:U \to V$, $V$ open subset in $R^n$ satisfying,
$f(M\cap U) = V \cap ( R^k \times \{0\} )$
My thoughts
I can see that "Spivak" $\implies $ "Milnor". But I don't find the other direction trivial. Assuming Milnor's definition holds, there is a function $f:M \to V$. Where $M$ is the manifold and $V$ is an open subset of $R^k$ and there is a two-sided inverse to this function $f^{-1}$. Since they are both smooth (according to the definition of Milnor), given a point $p \in M$, we can construct the following $C^\infty$ functions (that reduce to $f, f^{-1}$ where they are commonly defined), for an open neighbourhood $U \subset R^n$ of $p$ and an open set $V' \subset R^k$.
$F:U \to V'$ ($V'$ open in $R^k$)
$G:V' \to U$
Clearly, $F$ is not injective and $G$ is not onto in general ($n \neq k$). How can one build a $C^\infty$ invertible map that Spivak uses in his definition from these functions, i.e by extending the dimension of domain/range appropriately. I am quite puzzled. Perhaps, I am missing something very trivial. I will really appreciate any help since I am doing a self-study. Thanks in advance.
Milnor's Book: http://webmath2.unito.it/paginepersonali/sergio.console/Dispense/Milnor%20Topology%20from%20%23681EA.pdf
Spivak's Book: http://strangebeautiful.com/other-texts/spivak-calc-manifolds.pdf