I know two definitions of smoothness on an arbitrary set. Let $M$ be a smooth manifold, $A\subseteq M$ be an arbitrary subset of $M$ and $f:A\rightarrow \mathbb{R}$.
- $f$ is smooth iff there is an open set $U$, $A\subseteq U$ and a smooth function $\bar{f}:U\rightarrow \mathbb{R}$ such that $f = \bar{f}$ on $A$.
- $f$ is smooth iff for every $p\in A$ there is an open neighborhood $U$ of $p$ and a smooth function $\bar{f}:U\rightarrow \mathbb{R}$ such that $\bar{f}=f$ on $U\cap A$.
Which is standard one?
The standard definition for me, is defined with local parametrizations. Let $M$ be an $n$-manifold and $f: A \subset M \to \mathbb{R}$. Let $(\phi,U)$ and $(\psi, V)$ be local charts on $M$ and $\mathbb{R}$. Then we say $f$ is smooth if $\psi \circ \tilde{f} \circ \phi^{-1}: \phi(U) \subset\mathbb{R}^n \to \psi(V) \subset \mathbb{R}$ is smooth. Here we take $x \in A$ and $U$ is an open set about $x$ for which $\tilde{f}|_A = f$. In other words $f$ is smooth, if there is an extension where this composition is smooth and the extension has the other property given.
Edit: The local chart on $\mathbb{R}$ can be dropped since we know the coordinate system there and so we only need $\tilde{f} \circ \phi^{-1}$ to be smooth.