Let a function $f$ defined on a closed subset $F$ of $\mathbf{R}$ which is potentially $C^\infty$ in this sense : to define the notion of potential derivative, let us say that $a\in \mathbf{R}$ is a potential derivative of $f$ at $x_0\in F$ if $f(x) = f(x_0) + a(x-x_0) + o(x-x_0)$ for $x\in F$ ($a$ may not be unique because $x_0$ might be isolated in $F$). Let us say that $g$ is a potential derivative of $f$ if $g(x_0)$ is a potential derivative of $f$ at $x_0$ for all $x\in F$. Then, a function $f$ is potentially $C^\infty$ on $F$ if there exists a sequence $(g_n)$ such that $f = g_0$, $g_{n+1}$ is a potential derivative of $g_n$ for all $n\in \mathbf{N}$. Remark that the potential derivative is unique if $x_0 \in F$ is not isolated (it is just the limit of the newton difference quotient).
This enables for instance to have a Taylor expansion of the function which approximates the function at all order : $f(x) = P_n(x-x_0) + o((x-x_0)^n)$, where $P_n(X) = \sum_{k=0}^n g_k(x_0) X^k$ EDIT : I am sorry : this is false. So it is needed to suppose its existence, and also the exitence of the expansion of the $f^{(k)}$. See the Whitney extension theorem for the exact hypothesis needed : https://en.wikipedia.org/wiki/Whitney_extension_theorem. I give a counter-example : $F = \{0\} \cup \cup_{n\in \mathbf{N}} [\frac{1}{4^n}, \frac{2}{4^n}]$, let for $x\in F$ $\phi(x)$ the least element in the same connex component of $x$, and put $f(x) = \phi(x)^2 + x$. $f$ is "potentially $C^\infty$" in the sense I've mentionned, but its "potential Taylor expansion" at 0 $f(x) = x$ is not compatible with f at the order 2.
Does such a function potentially $C^\infty$ admits a $C^\infty$ extension $\phi$ on $\mathbf{R}$ such that the successive derivatives coincide with whatever potential derivatives $g_n$ fixed ? It is well known, by Tietze's extension theorem, that a continuous function on a closed set admits a continuous extension. But what about a $C^\infty$ extension ?
I have also the same question by replacing $\mathbf{R}$ by $\mathbf{R}^n$, $\mathbf{R}^m$ with the natural definition of potential differentiation ; let $f$ a function $F \rightarrow R^m$ defined on $F$ a closed set of $\mathbf{R}^n$. $f$ is said to be potentially differentiable at $x_0 \in F$ if there exist an endomorphism $u$ from $\mathbf{R}^n$ to $\mathbf{R}^m$ such that for $x\in F$, $f(x) = f(x_0) + u(x-x_0) + o(x-x_0)$. Then $u$ is said to be a differential of $f$ on $x_0$. A function $u$ from $f$ to the set of endomorphisms from $\mathbf{R}^n$ to $\mathbf{R}^n$ is said to be a potential differential of $f$ if for all $x_0 \in F$, $u(x_0)$ is a differential of $f$ at $x_0$. Then, $f$ is potentially $C^\infty$ if there exist $(u_n)$ such that $f = u_0$ and $u_{n+1}$ is a potential differential of $u_n$ for all $n\in \mathbf{N}$ . Then, the sequence $(u_n)$ is said to be a sequence of potential iterated differentials of $f$.
There is no unicity of the potential differential because $F$ might lack some directions.
Nevertheless, it is possible to check that theese definitions enable to have an analogous Taylor expansion of the function $f$. EDIT : this is again false. Does a potentially $C^\infty$ function in this sense admits an extension $\phi$ $C^\infty$ such that the successive differentials coincide with whatever potential iterated differentials fixed $(u_n)$ ?
EDIT :
I . For a good notion of "potential differentiability", you need to suppose the existence of taylor expansions, which is not automatic.
Lemma (?) : Let $A$, $B$ two disjoint closed sets of $\mathbf{R}$. Then there exists a $C^\infty$ function such that $f = 0$ on $A$, $f=1$ on $B$ and $f^{(k)} = 0$ on $A \cup B$ for $k\geq 1$. (I think it is true but I must take the time to check this)
– Dlem Jan 10 '19 at 14:50