Smooth maps on subsets of $\mathbb R^n$ Here is a definition of smoothness on subsets of $R^k$ from Guillemin-Pollack:

I'm working on the following exersise:

If $k < l$ we can consider $R^k$ to be the subset $\{(a_1,\dots,a_k,0,\dots,0)\}$ in $R^l$. Show that smooth functions on $R^k$, considered as a subset of $R^l$, are the same as usual.

Let $f: R^k\rightarrow R^m$ be a smooth function on the subset $R^k$ of $R^l$. Then for any $x\in R^k$ there is an open subset $U\ni x$ of $R^l$ and a smooth function $F: U\rightarrow R^m$  such that $F\restriction_{U\cap R^k}=f$. We need to show that all partials of $f$ exist and are continuous at all points of $R^k$. From the above we know this is true for all points of $U\cap R^k$. So if $(a_1,\dots,a_k,b_{k+1},\dots,b_l)\in U$, $f$ certainly has the desired property at the point $(a_1,\dots,a_k)$. But $U$ need not contain all points of the form $(a_1,\dots,a_k,b_{k+1},\dots,b_l)$ where $(a_1,\dots,a_k)\in R^k$. So I'm not sure how to prove that at other points the partials of $f$ exist and are continuous.
For the other direction, let $f: R^k\rightarrow R^m$ be smooth where $R^k$ is not considered as a subset. Then all partials of $f$ at all points of $R^k$ exist and are continuous. If we now consider $R^k$ as a subset of $R^l$, to prove smoothness, we need to find an open subset $U$ of $R^l$ and a smooth function $F: U\rightarrow R^m$ whose restriction to $R^k\cap U$ is $f$. The only choice I see for $U$ is $\{(a_1,\dots,a_k,0,\dots,0) : (a_1,\dots,a_k)\in R^k\}$. Is that correct? How to define $F$?
 A: Regarding your first part of the solution: any smooth extension of $f$ to an open subset $U$ of the big euclidean space $\mathbb{R}^{l}$ containing the small one has, by definition, continuous partial derivatives of all orders in all directions. In particular it does in the directions of you smaller euclidean space $\mathbb{R}^{k}$, and these are computed only in terms of $f$ (not the extension). So $f$ is a smooth funciton in $\mathbb{R}^{k}$ in the usual sense.
Regarding your second part of the solution: no, that choice of $U$ is not correct because it is not an open set in $\mathbb{R}^{l}$. It has a "border" (namely the subspace defined by equations $x_{k+1}=\ldots =x_{l}=0$). This second part is a bit more involved (at least the solution I have in mind).
Hint 1: consider the function $g(x)=e^{-\frac{1}{x}}$ for $x> 0$ and $g(x)=0$ for $x\leqslant 0$. Is it smooth? Now consider the function
$$ h(x)=\frac{g(2-x)}{g(2-x)+g(x-1)}$$
What is the value of $h$ for $x\leqslant 1$ and in particular for $x=0$? What is the value of $h$ for $x \geqslant 2$? Is $h$ smoot?
Hint 2: consider the extension $F(x_{1},...,x_{k},x_{k+1},...,x_{l})$ defined as
$$(h(x_{k+1})\cdots h(x_{l})f_{1}(x_{1},...,x_{k}),...,h(x_{k+1})\cdots h(x_{l})f_{m}(x_{1},...,x_{k}))$$
