TITLE: Can a $C^r$ differentiable function on a arbitrary set be extend to a $G_\delta$ set?
QUESTION [1 upvotes]: Let $S\subseteq\mathbb R^n$ be a arbitrary set, $0\le r\le\infty$.
For $r<\infty$, call a function $f:S\to\mathbb R$ is $C^r$, if there are continuous functions $\{f_\alpha:S\to\mathbb R\}_{0\le|\alpha|\le r}$ such that $f(x+h)=\sum_{0\le|\alpha|\le r}f_\alpha(x)h^\alpha+o(|h|^r)$ holds for all $x\in S$.
Say $f$ is $C^\infty$, if $f$ is $C^r$ for all finite $r$.
If $f:S\to\mathbb R$ is such a $C^r$ function, can we find a $G_\delta$ set contain $S$ such that $f$ has a $C^r$ extension on the open set?
I edit the question from open set to $G_\delta$ set, I hope it might work...

REPLY [0 votes]: Suppose that the closure of $S$ has non-empty interior $V$. If $f$ is continuous on the set $S\cap V$ then it has a continuous extension to a $G_\delta$ set in the closure of $S\cap V$ (countable intersection of open dense set). Conversely, given a $G_\delta$ dense set $\Omega$ in Euclidean space you may construct a continuous function on $\Omega$ that admits no continuous extension. For example, a function $f$ defined and continuous on the irrationals admitting no continuous extension to a rational.
For higher order derivatives with  your (slightly unusual) definition, I suspect the conclusion is the same.
{"set_name": "stack_exchange", "score": 1, "question_id": 2192298}