This is a question about the definition of a smooth function in Guillemin and Pollack's "Differential Topology". G&P define all manifolds as objects embedded in $\mathbb{R}^N$ for some $N$, which (as a zillion people have reminded me) is not how mathematicians usually think of manifolds - nevertheless, this is a question about how things are done in G&P:
Right on the bottom of page 2 and top of page 3, G&P say: "a mapping $f$ is smooth if it has continuous partial derivatives of all orders. However, when the domain of $f$ is not open, on usually cannot speak of partial derivatives...So we adapt the open situation to more general spaces. A map $f:X \to \mathbb{R}^m$ defined on an arbitrary subset $X$ of $\mathbb{R}^n$ is called smooth if it may be locally extended to a smooth map on open sets; that is, if around each point $x$ in $X$ there is an open set $U$ in $\mathbb{R}^n$ and a smooth map $F: U\to\mathbb{R}^m$ such that $F$ equals $f$ on $U \cap X$".
So consider the map $f$ from the $x$-axis in $\mathbb{R}^2$ to $\mathbb{R}$ defined by $f(x,0) = 0$. Since the $x$-axis is not open in $\mathbb{R}^2$, we need to extend $f$ to a smooth function $F$ around (say) $(0,0)$. There are TWO ways to do this (at least): $F(x,y) = y$ and $F(x,y) = 0$ for all points in the plane. These two different extensions give different derivatives around $(0,0)$, so it would seem that when specifying an extension we also need to specify which onee, if we want to talk about "THE" derivative at a point in the domain of $f$.
Clearly I'm misunderstanding something basic - what is it?