# Extension of a smooth function on a set of manifold

I encountered the following proposition:

If a function is smooth on an arbitrary set $S\in M$, where $M$ is a smooth manifold, then it has a smooth extension to an open set containing $S$.

It seems the proof needs the partition of unit, but I don't think this proposition is correct.

First of all, I don't know what does smooth on an arbitrary set mean.

Does it mean $f$ is smooth at every point $P$ in $S$, which by definition means there exists a chart $(U, \varphi)$ with $p\in U$ and $f\circ\varphi^{-1}$ if smooth?

If so, does the proposition implies that $S$ is an open set because each point in $S$ should have a neighborhood on which $f$ is defined and smooth?

If so, why emphizie an arbitrary set $S$?

Consider the function $f:\mathbb{Q}\rightarrow\mathbb{R}$ defined as $f(x)=x$ when $x\geq 0$ and $f(x)=-x$ when $x<0$, is it smooth on $\mathbb{Q}$?

-
I know this as the definition of smoothness on an arbitrary $S \subseteq M$: A function $f \colon S \to N$ is called smooth, if there is an open $U \supseteq S$ and a smooth $g \colon U \to N$, extending $f$. – martini Oct 22 '12 at 7:23
..........but it appears as an exercise in Lee's book Manifold and differential geometry, in the chapter of partition of unit..so it should be able to be proved. – hxhxhx88 Oct 22 '12 at 7:25
... how does Lee define smoothness on an arbitrary $S \subseteq M$ then? – martini Oct 22 '12 at 7:26
Ok, on page 25, Lee defines: A continuous map $f \colon S \to N$, $S \subseteq M$ arbitrary is called smooth, if each point $s \in S$ has an open neighbourhood $U_s$ and a smooth $g_s \colon S \to N$ such that $g_s|_{U_s \cap S} = f|_{U_s \cap S}$. For a function $f \colon S \to \mathbb R$, you can take these local extensions and glue them with a partition of unity. – martini Oct 22 '12 at 7:32
Oh yes... I didn't notice it.. Thank you! – hxhxhx88 Oct 22 '12 at 10:16