A function $f$ is arc-smooth if the composite $f\o c$ with every smooth curve $c$ in its domain of definition
is smooth. On open sets in smooth manifolds the arc-smooth functions are precisely the smooth
functions by a classical theorem of Boman. Recently, we extended this result to certain tame closed
sets (namely, Hölder sets and simple fat subanalytic sets).
In this paper we link, in a precise way, the cuspidality of the (boundary of the) set
to the loss of regularity, i.e., how many derivatives of $f\o c$ are needed in order to determine the derivatives of $f$.
We also discuss how flatness of $f \o c$ affects flatness of $f$.
Besides Hölder sets and subanalytic sets we treat sets that are definable in certain polynomially bounded
o-minimal expansions of the real field.

Supported by FWF-Project P 32905-N

[2020]

§ INTRODUCTION

A real valued function $f$ is called arc-smooth if $f \o c \in \cC^\infty$
for each $\cC^\infty$-curve $c$ in the domain of definition of $f$.
By a theorem of Boman [4], the arc-smooth functions defined on open subsets of $\R^d$ (or of smooth manifolds)
are precisely the $\cC^\infty$-functions. In our recent paper [27], arc-smooth functions defined on closed sets were studied
and far-reaching extensions of Boman's results were obtained:

* The arc-smooth functions on Hölder sets in $\R^d$ are precisely the restrictions of the $\cC^\infty$-function on $\R^d$.

* The arc-smooth functions on simple fat closed subanalytic sets in $\R^d$ are precisely the restrictions of the $\cC^\infty$-function on $\R^d$.

We also found analytic and ultradifferentiable analogs.
A precursor for convex fat sets (even in infinite dimensions) is due to [16].
By Hölder sets we mean closed sets that satisfy a uniform cusp property; see <Ref>.
Recall that a set $X \subseteq \R^d$ is called fat if it is contained in the closure of its interior: $X \subseteq \ol{X^\o}$.
It is called simple if each $x \in X$ has a basis of neighborhoods $\sU$ such that $U \cap X^\o$ is connected for all $U \in \sU$.
In the terminology of [27], these results mean that Hölder sets and simple fat closed subanalytic sets are
$\cA^\infty$-admissible (just us open sets). These closed sets may have cusps (e.g. $\{(x,y) \in \R^2 : x\ge 0,\, -x^2 \le y \le x^2\}$)
and horns (e.g. $\{(x,y) \in \R^2 : x\ge 0,\, x^2 \le y \le 2 x^2\}$).

The sharpness of the cusps and horns is related to the loss of regularity implicit in (1) and (2).
In fact, to determine the derivatives of order $n$ of an arc-smooth function $f$ at boundary points of $X$,
derivatives of higher order $N$ of the composites $f \o c$ are needed.
In this paper, we will establish an explicit and generally optimal connection between the
cuspidality of the (boundary of the) sets and the discrepancy between $N$ and $n$.
In the process, we shall also see how flatness of $f \o c$ affects flatness of $f$.

In order to formulate our results, we refine the notion of arc-smooth functions to arc-differentiable functions.

§.§ Arc-differentiable functions

Let $X$ be a non-empty subset of $\R^d$.
We denote by $\cC^\infty(\R,X)$ the set of all $\cC^\infty$-curves $c : \R \to \R^d$ with $c(\R) \subseteq X$.
For a real valued function $f : X \to \R$ on $X$ we consider

\[
f_* \cC^\infty(\R,X) := \big\{f_* c := f \o c : c \in \cC^\infty(\R,X)\big\}.
\]

For $k \in \N$ and $\be \in (0,1]$
we define

\[
\cA^{k,\be}(X) := \big\{f : X \to \R : f_* \cC^\infty(\R,X) \subseteq \cC^{k,\be}(\R,\R)\big\}.
\]

The elements of $\cA^{k,\be}(X)$ are called arc-differentiable functions (of class $\cC^{k,\be}$) or arc-$\cC^{k,\be}$ functions on $X$.
Recall that $\cC^{k,\be}(\R,\R)$ is the space of $k$-times continuously differentiable functions $c : \R \to \R$ such that the $k$-th derivative $c^{(k)}$ is
locally $\be$-Hölder continuous.

For each $\be \in (0,1]$,

\begin{align*}
\cA^\infty(X) := \big\{f : X \to \R : f_* \cC^\infty(\R,X) \subseteq \cC^{\infty}(\R,\R)\big\} = \bigcap_{k \in \N} \cA^{k,\be}(X).
\end{align*}

The elements of $\cA^\infty(X)$ are the arc-smooth functions on $X$.
It is immediate from the definition that arc-smooth mappings can be composed:
if $X_i \subseteq \R^{d_i}$, $i=1,2$, $f \in \cA^\infty(X_2)$, and $\vh = (\vh_1,\ldots,\vh_{d_2}) : X_1 \to X_2$ with $\vh_j \in \cA^\infty(X_1)$, $j=1,\ldots,d_2$,
then $f \o \vh \in \cA^\infty(X_1)$.

Assume that $X \subseteq \R^d$ is a fat closed set so that $X = \ol {X^\o}$.
By definition, $\cC^{k,\be}(X)$ is the set of functions $f : X \to \R$ such that

* $f|_{X^\o} \in \cC^{k}(X^\o)$,

* all derivatives $(f|_{X^\o})^{(j)} : X^\o  \to L^j(\R^d,\R)$, $j \le k$, have continuous extensions
$f^{(j)} : X \to L^j(\R^d,\R)$ to $X$,

* $f^{(k)}$ is $\be$-Hölder continuous on compact subsets of $X$.

By $\cC^{k}(X)$ we mean the set of functions $f : X \to \R$ satisfying (1) and (2),
and $\cC^{\infty}(X) := \bigcap_{k \in \N} \cC^{k}(X)$.
These definitions also apply to open sets $X$; in that case (2) is vacuous.
(Note that the definition of $\cC^{\infty}(X)$ differs from the one in [27]
but in most cases treated in this paper they are equivalent; cf. <cit.>.)

Let $Y$ be a subset of $X$. Let $\cA^{k,\be}_Y(X)$ (resp. $\cA^{\infty}_Y(X)$) be the set of all
$f \in \cA^{k,\be}(X)$ (resp. $f \in \cA^{\infty}(X)$) such that for all $y \in Y$ and all $c \in \cC^\infty(\R,X)$ with $c(0)=y$ we have

\[
(f \o c)^{(j)}(0) = 0 \quad \text{ for } j \le k \quad\text{ (resp.\ $j \in \N$).}
\]

Similarly, let $\cC^{k,\be}_Y(X)$ (resp. $\cC^{\infty}_Y(X)$) be the set of all
$f \in \cC^{k,\be}(X)$ (resp. $f \in \cC^{\infty}(X)$) such that

\[
f^{(j)}|_Y = 0  \quad \text{ for } j \le k \quad\text{ (resp.\ $j \in \N$).}
\]

Then we say that $f$ is $k$-flat (resp. $\infty$-flat) on $Y$.

The $\be$-Hölder condition can be generalized to an $\om$-Hölder condition, where $\om$ is a modulus of continuity,
i.e., an increasing subadditive function $\om : [0,\infty) \to [0,\infty)$ such that $\lim_{t \to 0}\om(t) = 0$ and $t \mapsto t/\om(t)$ is locally bounded.
In that case we write $\cA^{k,\om}$, $\cA^{k,\om}_Y$, $\cC^{k,\om}$, and $\cC^{k,\om}_Y$.

§.§ Main results

If $X \subseteq \R^d$ is an open set, then $\cA^{k,\be}(X) = \cC^{k,\be}(X)$, by [4],
$\cA^{k,\om}(X) = \cC^{k,\om}(X)$, by [8], and consequently $\cA^\infty(X) = \cC^\infty(X)$.
We see that on open sets no loss of regularity occurs.
Moreover, there is no gain (or loss) in considering
smooth plots $p : \R^e \to X \subseteq \R^d$ of arbitrary dimension $e$ in the definition of $\cA^{k,\be}$.
We want to point out that the Hölder condition on the derivative of highest order cannot be omitted without replacement:
$f_* \cC^\infty(\R,X) \subseteq \cC^k(\R,\R)$ does not guarantee $f \in \cC^k(X)$, cf. <cit.>.

Let $\al \in (0,1]$. By an $\al$-set we mean a closed fat set $X \subseteq \R^d$ such that $X^\o$
has the uniform $\al$-cusp property. If $X$ is compact, then this is equivalent to the fact that $X$
has $\al$-Hölder boundary.
A Hölder set is an $\al$-set for some $\al \in (0,1]$.
For precise definitions see <Ref>.

Note that $\al$ measures the `cuspidality' of an $\al$-set.
We associate two integers with $\al$ which measure the mentioned loss of regularity of arc-smooth functions on $\al$-sets:

\begin{align} \label{eq:defpq}
p(\al) := \Big\lceil\frac{2}{\al} \Big\rceil \quad \text{ and } \quad q(\al) := \Big\lceil\frac{1}{\al} \Big\rceil,
\end{align}

where $\lceil x \rceil$ is the least integer greater or equal $x$.

Let $X \subseteq \R^d$ be an $\al$-set. Then:

* For all $\be \in (0,1]$ and $n \in \N$ we have

\[
\cA^{np(\al),\be}(X) \subseteq \cC^{n,\frac{\al\be}{2q(\al)}}(X).
\]

More generally, if $\om$ is a modulus of continuity, then

\[
\cA^{np(\al),\om}(X) \subseteq \cC^{n,\widetilde \om}(X),
\]

where $\widetilde \om(t) = \om(t^{\frac{\al}{2q(\al)}})$.

* If $Y$ is any subset of $X$, then $\cA^{np(\al),\om}_Y(X) \subseteq \cC^{n,\widetilde \om}_Y(X)$.

The loss of derivatives expressed by $p(\al)$ is essentially best possible, see <Ref> and <Ref>.
In the Lipschitz case, where $\al =1$, $p(\al)=2$, and $q(\al)=1$,
also the degradation of the Hölder index $\be$ to $\frac{\be}2$ is optimal, see <Ref>.
There are many examples, where the degradation $\frac{\al}{2q(\al)}$ can actually be replaced by $\frac{1}{2q(\al)}$.
We do not know whether in general the worse factor $\frac{\al}{2q(\al)}$ is really necessary or just an artefact of our proof;
see <Ref>.

The supplement (2) is particularly interesting for $Y = \p X$.
The reason it is true is that all boundary points $x$ of an $\al$-set $X$ can be reached by $\cC^\infty$-curves in $X$ that
vanish of finite order (at most $p(\al)$) at $x$. See <Ref> for an interesting set of finite cuspidality
with a boundary point at which all $\cC^\infty$-curves in the set must vanish to infinite order
and hence cannot discriminate points of flatness.

<Ref> implies the following corollary the first part of which was also obtained in [27].

Let $X \subseteq \R^d$ be a Hölder set (and $Y$ any subset of $X$).
The elements of $\cA^\infty(X)$ (of $\cA^\infty_Y(X)$) are precisely the restrictions to $X$
of $\cC^\infty$-functions on $\R^d$ (that vanish to infinite order on $Y$).

In the second part of the paper, we will extend our results to subanalytic sets and, more generally,
to sets that are definable in certain polynomially bounded o-minimal expansions of the real field.
These families of sets also admit horns which are not possible for Hölder sets.
The assumption that the o-minimal structure is polynomially bounded is essential, since
on an infinitely flat cusp $X$ there are functions $f \in \cA^\infty(X)$ that are not of class $\cC^1$,
see <cit.> and <Ref>.

An important requirement of the proof is that the sets under consideration are uniformly polynomially cuspidal (UPC); cf. [22].
Recall that a closed subset $X \subseteq \R^d$ is UPC if
there exist positive constants $M,m$ and a positive integer $N$ such that
for each $x \in X$ there is a polynomial curve $h_x : \R \to \R^d$ of degree at most $N$

* $h_x((0,1]) \subseteq X^\o$ and $h_x(0)=x$,

* $\on{dist}(h_x(t),\R^d \setminus X) \ge M t^m$ for all $x \in X$ and $t \in [0,1]$.

We may assume that $m$ is a positive integer. We call the reciprocal $\al = \frac{1}{m}$ a UPC-index of $X$.
It is again a measure for the `cuspidality' of $X$.

Let $X \subseteq \R^d$ be a fat compact definable set, that means definable with respect to a fixed
polynomially bounded o-minimal expansion of the real field. We shall see that if $X$ admits
smooth rectilinearization (defined in <Ref>), then $X$ is UPC and we have the following theorem.

Let $X \subseteq \R^d$ be a simple fat compact definable set
admitting smooth rectilinearization
and let $\al$ be a UPC-index of $X$.
Let $n \in \N_{\ge 1}$ and $\be \in (0,1]$.
Then for each $f \in \cA^{np(\al),\be}(X)$ (resp. $f \in \cA^{np(\al),\be}_Y(X)$ where $Y$ is any subset of $X$)
the Fréchet derivatives $f^{(p)}$, $p\le n$, are globally bounded on $X^\o$
and for $p \le n-1$ they extend continuously to $\p X$ (and vanish on $Y$).
The statement remains true if $\be$ is replaced by an arbitrary modulus of continuity $\om$.

Being definable in an polynomially bounded o-minimal structure, $X$ is $m$-regular for some $m \in \N_{\ge 1}$
and, consequently, $f \in \cC^{n-1,\frac{1}m}(X)$.

As a consequence of <Ref> we obtain

Let $X \subseteq \R^d$ be a simple fat compact definable set
admitting smooth rectilinearization (and $Y$ any subset of $X$).
The elements of $\cA^\infty(X)$ (of $\cA^\infty_Y(X)$) are precisely the restrictions to $X$
of $\cC^\infty$-functions on $\R^d$ (that vanish to infinite order on $Y$).

In particular, <Ref> and <Ref> hold for each simple fat compact $X \subseteq \R^d$ that is
subanalytic or definable in a structure $\R_\cQ$, where $\cQ$ is a suitable quasianalytic class; cf. [3, 29].
It is easy to see (cf. <cit.>) that the assumption that $X$ be simple cannot be
omitted; note that Hölder sets are simple by definition.
We do not know if the assumption of smooth rectifiability is necessary.

As a by-product of our proofs
we obtain a result (<Ref>) on weakly flat functions on closed UPC sets (not necessarily simple or definable)
in the spirit of [30].

§.§ Invariance under diffeomorphisms

Let $X \subseteq \R^d$ be a closed fat set.
Suppose that $\vh : U \to V$ is a $\cC^\infty$-diffeomorphism between open sets $U,V \subseteq \R^d$ with $X \subseteq U$.
Then $Y := \vh(X)$ is a closed fat set. Fix $k \in \N$ and $\be \in (0,1]$.

Now $f \in \cA^{k,\be}(Y)$ if and only if $f \o \vh \in \cA^{k,\be}(X)$.
Indeed if $c \in \cC^\infty(\R,Y)$ then $\vh^{-1} \o c \in \cC^\infty(\R,X)$ and
$f \o c = f \o \vh \o \vh^{-1} \o c$ is of class $\cC^{k,\be}$.
We also see easily that $f \in \cA^{k,\be}_{\vh(Z)}(Y)$ if and only if $f \o \vh \in \cA^{k,\be}_Z(X)$, where $Z$ is any subset of $X$.

$f \in \cC^{k,\be}(Y)$ if and only if $f \o \vh \in \cC^{k,\be}(X)$
and, more generally,
$f \in \cC^{k,\be}_{\vh(Z)}(Y)$ if and only if $f \o \vh \in \cC^{k,\be}_Z(X)$.
For, suppose that $f \in \cC^{k,\be}(Y)$. Then $f|_{Y^\o} \in \cC^k(Y^\o)$ and $\vh|_{X^\o} : X^\o \to Y^\o$ is $\cC^\infty$.
Thus $f \o \vh|_{X^\o} \in \cC^k(X^\o)$ and its derivatives up to order $k$ can be computed by Faà di Bruno's formula.
In view of this formula we see that $f \o \vh|_{X^\o}$ and all its derivatives up to order $k$ extend continuously to $\p X$,
since this it true for $f$ and $\vh$ and their respective derivatives.
Similarly, one checks that the $k$-th order derivative of $f \o \vh$ satisfies a local $\be$-Hölder condition on $X$.

Clearly, invariance of $\cC^{k,\be}$ on closed fat sets holds even with respect to $\cC^{k,\be}$-diffeomorphisms.
And we have invariance of

\[
\ul \cA^{k,\be}(X) := \big\{f : X \to \R : f_* \cC^{k,\be}(\R,X) \subseteq \cC^{k,\be}(\R,\R)\big\}
\]

under $\cC^{k,\be}$-diffeomorphisms.
Indeed, the composite of $\cC^{k,\be}$-maps is $\cC^{k,\be}$, provided that $k\ge 1$; cf. <cit.> or <cit.>.
The inclusions $\ul \cA^{k,\be}(X) \subseteq \cA^{k,\be}(X)$ and $\ul \cA^{\infty}(X) := \bigcap_{k \in \N} \ul \cA^{k,\be}(X) \subseteq \cA^{\infty}(X)$ are evident.
Note that $\sqrt{\cdot} \not\in \ul \cA^{0,1}([0,\infty))$, but $\sqrt{\cdot} \in \cA^{0,1}([0,\infty))$,
by Glaeser's inequality (see (<ref>)), but in general it is not clear if the inclusions are strict.
However, as a consequence of <Ref> and <Ref> we have $\ul \cA^\infty(X) = \cA^\infty(X)$
for simple fat compact definable sets admitting smooth rectilinearization or Hölder sets.

All this is also true if $\be$ is replaced by a general modulus of continuity $\om$.

Since all notions are local, we see that our results continue to hold if the set $X$ in question is replaced by a set
that is locally diffeomorphic to $X$.

§.§ Related results connecting analytic properties of functions with the geometry of their domain

The influence of the geometric properties of the boundary of a domain on the analytic aspects of functions on that domain is well-known.
We want to mention some closely related results.
In [5], the Sobolev–Gagliardo–Nirenberg inequalities and Markov type inequalities
are shown to be valid on compact subanalytic domains if the inequalities are equipped with a suitable parameter
which measures the cuspidality of the domain.
Markov type inequalities play an important role in approximation theory and differential analysis,
since they are intimately connected to the Whitney extension property (WEP), i.e., the existence
of a continuous linear extension operator of $\cC^\infty$ Whitney jets;
cf. [22, 23, 26, 5, 9].
UPC sets $X \subseteq \R^d$ satisfy the Markov inequality (see [22]):
there exist positive constants $C,r$ such that for all polynomials $p : \R^d \to \R$ we have

\begin{equation} \label{MI}
\tag{MI}
\sup_{x \in X} |\nabla p(x)| \le C (\deg p)^r \sup_{x \in X}|p(x)|.
\end{equation}

A compact set $X \subseteq \R^d$ has WEP if and only if a weaker inequality of Markov type holds (see <cit.> and (<ref>)).
All sets in our results fulfil WEP,
in particular, they form examples of Whitney manifold germs as introduced in [19];
see also [28] for a related concept.

§.§ Outline of the paper

In <Ref>, we define Hölder sets and collect some relevant properties.
<Ref> and <Ref> will be proved in the <Ref>.
While <Ref> deals with the continuous extension of derivatives of
arc-differentiable functions to the boundary of a Hölder set,
<Ref> addresses their Hölder continuity.
In <Ref>, we explore the optimality and limitations of <Ref> and show in particular
that the loss of derivatives and degradation of the Hölder index expressed by the integers $p(\al)$ and
$q(\al)$ is generally best possible.
<Ref> is devoted to the study of arc-differentiable functions on definable set,
in particular, to the proofs of <Ref> and <Ref>.

§.§ Notation

We use $\N = \{0,1,2,\ldots\}$ and $\N_{\ge k} = \{k,k+1,k+2,\ldots\}$.
Let $e_1,e_2,\ldots,e_d$ be the standard unit vectors of $\R^d$.
The open ball in $\R^d$ with center $x$ and radius $r$ is denoted by $B(x,r)$.
For a function $f : U \to \R$ defined on an open subset $U$ of $\R^d$
let $f^{(k)}(x)(v_1,\ldots,v_k)$ be the $k$-th order Fréchet derivative at $x \in U$ evaluated at the vectors $v_1,\ldots,v_k \in \R^d$.
Then $f^{(k)}(x)$ is an element of the space $L^k(\R^d,\R)$ of $k$-linear mappings $\R^d \times \cdots \times \R^d \to \R$
which we endow with the operator norm $\|\cdot\|_{L^k(\R^d,\R)}$.
We write $d_v^k f(x) := \p_t^k|_{t = 0} f(x +  tv)$ for the $k$-fold directional derivative of $f$ at $x$ in direction $v$.
We will make use of the standard multi-index notation.

§ HÖLDER SETS

In this section we review the uniform cusp property and Hölder sets.

§.§ Truncated $\al$-cusps

Let us consider $\R^d = \R^{d-1} \times \R$ with the Euclidean coordinates $x = (x_1,\ldots,x_d) = (x_{\le d-1},x_d) = (x',x_d)$.
Let $\al \in (0,1]$ and $r,h>0$.
The set

\[
\Ga_d^{\al}(r,h)
:= \Big\{(x',x_d) \in \R^{d-1} \times \R : |x'| < r ,\, h \Big(\frac{|x'|}{r} \Big)^{\al} < x_d < h\Big\}
\]

is a truncated open $\al$-cusp of radius $r$ and height $h$.

Note that $\Ga_d^{\al}(r,h)$ is the union of the images of all curves $c(t) = (t x', t^{\al}h)$, $t \in (0,1)$, with $|x'| < r$.
We could replace the $(d-1)$-dimensional ball $\{|x'| <r\}$ by an open polyhedron $P \subseteq \R^{d-1}$ containing the origin
consider the union $\Pi_d^{\al}(P,h)$ of
the images of all curves $c(t) = (t x', t^{\al}h)$, $t \in (0,1)$, with $x' \in P$.
Then there are radii $r_1 < r_2$ such that

\begin{equation} \label{eq:ballpolyhedron}
\Ga_d^{\al}(r_1,h) \subseteq \Pi_d^{\al}(P,h) \subseteq \Ga_d^{\al}(r_2,h).
\end{equation}

§.§ Uniform cusp property and $\al$-sets

We denote by $B(x,\ep) := \{y \in \R^d : |x-y| < \ep\}$ the open ball with center $x$ and radius $\ep$ in $\R^d$.

Let $\al \in (0,1]$.
We say that an open set $U \subseteq \R^d$ has the uniform $\al$-cusp property
if for every $x \in \p U$ there exist $\ep>0$, a truncated open $\al$-cusp $\Ga = \Ga_d^{\al}(r,h)$, and an
orthogonal linear map $A \in \on{O}(d)$ such that $y + A\Ga \subseteq U$
for all $y \in \ol U \cap B(x,\ep)$.

Note that, by (<ref>), we can equivalently replace $\Ga_d^{\al}(r,h)$ by $\Pi_d^{\al}(P,h)$, where $P$ is a polyhedron $P \subseteq \R^{d-1}$ containing the origin.

By an $\al$-set we mean a closed fat set $X\subseteq \R^d$ such that $X^\o$ has the
uniform $\al$-cusp property.
Let $\sH^\al(\R^d)$ denote the collection of all $\al$-sets in $\R^d$.
We say that $X \subseteq \R^d$ is a Hölder set if it is an $\al$-set for some $\al \in (0,1]$
and denote by $\sH(\R^d)$ the collection of all Hölder sets in $\R^d$.
The elements of $\sH^1(\R^d)$ we also call Lipschitz sets in $\R^d$.

Note that $\sH^1(\R^d) \subsetneq \sH^\al(\R^d) \subsetneq \sH^\be(\R^d) \subsetneq \sH(\R^d)$ if $1\ge \al \ge \be >0$
(since $\al\ge \be$ if and only if $\Ga_d^{\al}(r,h) \supseteq \Ga_d^{\be}(r,h)$).

A bounded open set $U \subseteq \R^d$ has the uniform $\al$-cusp property
if and only if $U$ has $\al$-Hölder boundary;
see <cit.> and <cit.>.
That means the following.
At each point $p\in \p U$ there is an orthogonal system of coordinates $(x',x_d)$ and an $\al$-Hölder function $a = a(x')$
such that in a neighborhood of $p$
the boundary of $U$ is given by $\{x_d = a(x')\}$ and the set $U$ is of the form $\{x_d > a(x')\}$.

The boundary of an $\al$-set with $\al<1$ can be quite irregular.
The Hausdorff dimension $\dim_\cH X$ of a compact $X \in \sH^\al(\R^d)$ is not larger than $d-\al$,
but there are examples $X \in \sH^\al(\R^d)$ with $\dim_\cH X = d-\al$.
See <cit.>.

(1) The closure of a truncated open $\al$-cusp $\Ga^{\al}_d(r,h)$ or of $\Pi_d^{\al}(P,h)$ is an $\al$-set.

(2) Let $C \subseteq [0,1]$ be the ternary Cantor set and let $f : [0,1] \to \R$ be defined by
$f(x) := \on{dist}(x,C)^\al$. Then the set $X = \{(x,y) \in \R^2 : -1\le x \le 2,\,  f(x)\le y \le 2 \text{ if } x \in [0,1], \,
0\le y \le 2 \text{ if } x \not\in [0,1]\}$ is an $\al$-set.

(3) Convex closed fat sets $X \subseteq \R^d$ are $1$-sets.

(4) The horn-like set $X = \{(x,y) \in \R^2 : x\ge 0, \,  x^2 \le y \le  2x^{2}\}$ is not a Hölder set,
but $X$ is the image of the $\frac{1}{2}$-set $\{(x,y) \in \R^2 : x\ge 0, \,  |y| \le \frac{1}{2} x^{2}\}$ under the
diffeomorphism $(x,y) \mapsto (x,y+\frac{3}{2}x^2)$ of $\R^2$.

(5) The set $X = \{(x,y) \in \R^2 : x\ge 0, \, x^{3/2} \le y \le 2 x^{3/2}\}$ is not a Hölder set
and there is no smooth diffeomorphism of $\R^2$ which maps $X$ to a Hölder set. But $X$ is subanalytic.

(6) The flat cusp $X = \{(x,y) \in \R^2 : x\ge 0, \,  |y| \le e^{-1/x^2}\}$ is not a Hölder set.

§.§ Some properties of Hölder sets

Let $X \subseteq \R^d$.
The $c^\infty$-topology on $X$ is the final topology with respect to all
$\cC^\infty$-curves $c : \R \to \R^d$ satisfying $c(\R) \subseteq X$.
The $c^\infty$-topology on $\R^d$ coincides with the usual topology; cf. <cit.>.

The $c^\infty$-topology on each Hölder set $X \in  \sH(\R^d)$ coincides with the trace topology from $\R^d$.

Recall that a set $X \subseteq \R^d$ is called $p$-regular, where $p \in \R_{\ge 1}$,
if each $x \in X$ has a compact neighborhood $K$ in $X$ and there is a constant $D>0$
such that any two points $y_1,y_2 \in K$ can be joined by a rectifiable path $\ga$ contained in $K$ of length

\begin{equation*}
\ell(\ga) \le D |y_1-y_2|^{1/p}.
\end{equation*}

Each $X\in \sH^\al (\R^d)$ is $\frac{1}{\al}$-regular.

Each $X \in \sH(\R^d)$ is simple.

§ CONTINUOUS EXTENSION OF DERIVATIVES TO THE BOUNDARY OF $\AL$-SETS

We start with the proof of <Ref>.
Let $X \subseteq \R^d$ be an $\al$-set and $Y$ any subset of $X$ (including the empty set).
In this section, we will show that

\begin{equation*}
\cA^{np(\al),\om}_Y(X) \subseteq \cC^{n}_Y(X),
\end{equation*}

for each $n \in \N_{\ge 1}$ and each modulus of continuity $\om$.
Then it is easy to complete the proof of <Ref> in <Ref>.

§.§ Computing derivatives

We recall a simple formula for the derivatives of composite functions which will be useful below.
We will use the abbreviation $f^{(j)}(x)(v^j) = f^{(j)}(x)(v,\ldots,v)$.

Let $1 \le b\le a$ be integers.
Fix $x \in \R^d$ and $v = (v',v_d) \in \R^d$
and consider $c(t) = x + (t^{a} v', t^{b}v_d)$, for $t$ in a neighborhood of $0 \in \R$. Let
$f$ be of class $\cC^{a}$ in a neighborhood of the image of $c$.

\begin{align*}
\frac{1}{k!} (f\o c)^{(k)}(0) =
\begin{cases}
\frac{1}{j!} f^{(j)}(x)((0,v_d)^j) & \text{ if } k= jb < a,
\\
f'(x)((v',0)) & \text{ if } k =a \not\in b\N,
\\
f'(x)((v',0)) + \frac{1}{j!} f^{(j)}(x)((0,v_d)^j) & \text{ if } k = jb=a.
\end{cases}
\end{align*}

For all other $k<a$ we have $(f\o c)^{(k)}(0)=0$.

If $y \in \R^d$ and $\ga(t)= x + t^r y$, then

\[
\frac{1}{(rj)!} (f \o \ga)^{(rj)}(0) = \frac{1}{j!} f^{(j)}(x)(y^j)
\]

and $(f \o \ga)^{(k)}(0) = 0$ if $k \not\in r\N$.
From this the lemma follows easily.

§.§ The integer $p(\al)$

Let $\al \in (0,1]$. We define (cf. (<ref>))

\begin{align*}
p(\al) &:= \Big\lceil\frac{2}{\al} \Big\rceil
\begin{cases}
2 & \text{ if } \al = 1,
\\
p & \text{ if } \al \in [\tfrac{2}{p},\tfrac{2}{p-1}), ~ p \in \N_{\ge 3}.
\end{cases}
\end{align*}

The expedience of $p(\al)$ and its optimality is expressed in next lemma.

Let $(v',v_d) \in \Ga^\al_d(r,h)$. Then:

* $(t^{p(\al)} v',t^2 v_d) \in \Ga^\al_d(r,h)$ whenever $0<|t|\le 1$.

* Among all pairs of positive integers $(a,b)$ with $(t^a v',t^b v_d) \in \Ga^\al_d(r,h)$ for arbitrary $(v',v_d) \in \Ga^\al_d(r,h)$ whenever $0<|t|\le 1$
the pair $(p(\al),2)$ is minimal in the sense that

\[
p(\al) = \max \{p(\al),2\} \le \max\{a,b\} = a.
\]

That $(t^a v',t^b v_d) \in \Ga^\al_d(r,h)$ for arbitrary $(v',v_d) \in \Ga^\al_d(r,h)$ whenever $0<|t|\le 1$ is equivalent to

\[
|t|^{a \al} \le t^{b} \quad \text{ for all } 0<|t|\le 1.
\]

This is in turn equivalent to

\begin{equation} \label{eq:abal}
b \in 2 \N_{\ge 1} \quad \text{ and } \quad a \al \ge b.
\end{equation}

Taking $b = 2$ we may infer $(1)$.
Moreover, (<ref>) implies $a \ge \frac{b}{\al} \ge \frac{2}{\al}$ and thus $a \ge p(\al)$, that is (2).

§.§ Derivatives of arc-differentiable functions

We first show that arc-differentiable functions have arc-differentiable derivatives and minimize the involved loss of regularity.

Let $\al \in (0,1]$, $k \ge p(\al)$ an integer, and $\om$ a modulus of continuity.
Let $X \in  \sH^\al(\R^d)$
and $f \in \cA^{k,\om}(X)$. Then $f|_{X^\o}$ is of class $\cC^{k,\om}$
and its derivative $(f|_{X^\o})'$ extends uniquely to a mapping
$f' : X \to L(\R^d,\R)$ which belongs to $\cA^{k - p(\al), \om}(X, L(\R^d,\R))$, i.e.,

\begin{equation*}
(f')_* \cC^\infty(\R,X) \subseteq \cC^{k - p(\al), \om}(\R,L(\R^d,\R)).
\end{equation*}

If $Z$ is any subset of $X$ and $f \in \cA^{k,\om}_Z(X)$, then $f' \in \cA^{k - p(\al), \om}_Z(X, L(\R^d,\R))$.

That $f|_{X^\o}$ is of class $\cC^{k,\om}$ is well-known; see [4] and [8].

Let us first show that an extension $f' \in \cA^{k - p(\al), \om}(X, L(\R^d,\R))$ of $(f|_{X^\o})'$ is unique:
Suppose that $f'^{_2} \in \cA^{k - p(\al), \om}(X, L(\R^d,\R))$ is another extension.
Let $x_0 \in \p X$ and take a $\cC^\infty$-curve $\R \ni s \mapsto x(s)$ in $X$ such that $x(s) \in X^\o$ for $0<|s| \le 1$ and $x(0)= x_0$.

\begin{align*}
f'(x_0) = \lim_{s \to 0} f'(x(s)) = \lim_{s \to 0} f'^{_2}(x(s)) = f'^{_2}(x_0),
\end{align*}

since both $f' \o x$ and $f'^{_2} \o x$ are continuous.

For the existence we observe that, since $X$ is an $\al$-set and the statement is local and invariant under an orthogonal change of coordinates,
it suffices to show that $(f|_{Y \cap X^\o})'$ extends uniquely to a mapping
$f' : Y \to L(\R^d,\R)$ which belongs to $\cA^{k - p(\al), \om}(Y, L(\R^d,\R))$,
where $Y$ is an open subset of $X$ with the following property:
There is a truncated open $\al$-cusp $\Ga = \Ga_d^{\al}(r,h)$
such that for all $y \in Y$ we have $y + \Ga \subseteq X^\o$.

Let $p= p(\al)$, $x \in Y$, and $v = (v',v_d) \in  \Ga$. Set $u = (v',0)$ and $w = (0,v_d)$
and note that $w \in \Ga$.
The curves

\[
c_{x,v}(t) :=   x+ (t^{p} v',t^{2} v_d) \quad \text{ and } \quad \ell_{x,w} = x + t^2 w
\]

both lie in $X^\o$ for $0<|t|<1$ and
$c_{x,v}(0) = \ell_{x,w}(0) = x$; see <Ref>.
Note that $c_{x,v}(t) = \ell_{x,w}(t) + t^p u$.
Since $f \in \cA^{k,\om}(X)$, the composites $f \o c_{x,v}$ and $f \o \ell_{x,w}$ are of class $\cC^{k,\om}$.

We will define $f'(x)$ on points $x \in (\p X) \cap Y$ in two steps.

Step 1.
Let $v \in \Ga$ be fixed. For $x \in Y$ set

\begin{align} \label{eq:deffprimev}
f'(x)(v) :=
\begin{cases}
\frac{1}{p!}(f \o c_{x,v})^{(p)}(0) + \frac{1}{2} (f \o \ell_{x,w})^{(2)}(0) & \text{ if } p \not\in 2 \N,
\\
\frac{1}{p!}(f \o c_{x,v})^{(p)}(0) - \frac{1}{p!}(f \o \ell_{x,w})^{(p)}(0) + \frac{1}{2} (f \o \ell_{x,w})^{(2)}(0)
& \text{ if } p \in 2 \N.
\end{cases}
\end{align}

This definition becomes a correct statement if $x \in X^\o$, by <Ref>. Indeed,
$\frac{1}{j!} f^{(j)}(x)(w^j) = \frac{1}{(2j)!} (f \o \ell_{x,w})^{(2j)}(0)$ and
$f'(x)(u) = \frac{1}{p!}(f \o c_{x,v})^{(p)}(0)$, if $p \not\in 2 \N$.
Otherwise, $p = 2q$ and so
$f'(x)(u) = \frac{1}{p!}(f \o c_{x,v})^{(p)}(0) - \frac{1}{q!} f^{(q)}(x)(w^{q}) =
\frac{1}{p!}(f \o c_{x,v})^{(p)}(0) - \frac{1}{p!} (f \o \ell_{x,w})^{(p)}(0)$.

We claim that

\begin{equation} \label{smooth}
\text{$f'(\cdot)(v) :  Y \to \R$ maps $\cC^\infty$-curves to $\cC^{k-p,\om}$-curves.}
\end{equation}

Let $\R \ni s \mapsto x(s)$ be a $\cC^\infty$-curve in $Y$.
$(s,t) \mapsto c_{x(s),v}(t)$ and $(s,t) \mapsto \ell_{x(s),w}(t)$ are $\cC^\infty$-mappings
defined on the open strip $\{(s,t) \in \R^2 : |t| < 1\}$ with values in $X$.
Thus the composites $(s,t) \mapsto f(c_{x(s),v}(t))$ and $(s,t) \mapsto f(\ell_{x(s),w}(t))$ are of class $\cC^{k,\om}$, by [4] and [8].
So, in particular,
$s \mapsto \p_t^j|_{t=0} f(c_{x(s),v}(t))$ and $(s,t) \mapsto \p_t^j|_{t=0} f(\ell_{x(s),w}(t))$
are of class $\cC^{k-j,\om}$ for all $j \le k$.
In view of (<ref>) we find that
$s \mapsto  f'(x(s))(v)$ is of class $\cC^{k-p,\om}$, and the claim is proved.

Let $x_0 \in (\p X) \cap Y$ and
let $s \mapsto x(s)$ be any $\cC^\infty$-curve in $Y$ such that $x(s) \in X^\o$ for $0<|s| \le 1$ and $x(0)=x_0$.
Then $s \mapsto f'(x(s))(v)$ is continuous, by (<ref>), and hence

\begin{align*}
f'(x_0)(v) =  \lim_{s\to 0} f'(x(s))(v).
\end{align*}

Step 2.
Now let $v \in \R^d$ be arbitrary.
Since $\Ga$ is open, there exist $\ep>0$ and $\xi \in \Ga$ such that $\ep v+\xi \in \Ga$.
For all $x \in X^\o \cap Y$, we have

\begin{equation} \label{eq:def2}
f'(x)(v) =   \frac{f'(x)(\ep v + \xi) - f'(x)(\xi)}{\ep},
\end{equation}

and the right-hand side of (<ref>)
extends to points $x \in (\p X) \cap Y$ and satisfies (<ref>), by the arguments in Step 1.

Thus for $x_0 \in (\p X) \cap Y$ we define

\[
f'(x_0)(v) := \lim_{s \to 0} f'(x(s))(v),
\]

where $s \mapsto x(s)$ is a $\cC^\infty$-curve in $Y$
with $x(0) = x_0$ and $x(s) \in X^\o$ for $0<|s|\le 1$.
The last paragraph of Step 1 implies that the definition does not depend on the choice of the curve $x$.
We also see that $f'(x_0)$ is linear as the pointwise limit of $f'(x(s)) \in L(\R^d,\R)$.

Let us finally show that $f' : Y \to L(\R^d,\R)$ belongs to $\cA^{k-p,\om}(Y,L(\R^d,\R))$.
Let $x : \R \to Y$ be a $\cC^\infty$-curve and $v \in \R^d$.
It suffices to check that $s \mapsto f'(x(s))(v)$ is of class $\cC^{k-p,\om}$.
For $v \in  \Ga$ this follows from (<ref>).
For general $v$, $f'(x(s))(v)$ is a linear combination of
$f'(x(s))(v_1)$ and $f'(x(s))(v_2)$ for $v_i \in  \Ga$
which locally is independent of $s$.

To show the supplement assume that $f \in \cA^{k,\om}_Z(Y)$ and let
$s \mapsto x(s)$ be a $\cC^\infty$-curve in $Y$ with $x(0)=x_0 \in Z$.
We must prove that

\begin{equation} \label{eq:Zflat}
\p_s^j|_{s=0} \big(f'(x(s))(v) \big) = 0 \quad \text{ for } j \le k-p
\end{equation}

and all $v \in \R^d$. By construction, it suffices to prove it for $v \in \Ga$.
To this end consider (as in the paragraph after (<ref>)) the $C^{k,\om}$-functions
$(s,t) \mapsto f(c_{x(s),v}(t))$ and $(s,t) \mapsto f(\ell_{x(s),w}(t))$
defined on the open strip $\{(s,t) \in \R^2 : |t| < 1\}$.
If we compose them with any $\cC^\infty$-curve $r \mapsto (s(r),t(r))$ such that $s(0)=t(0)=0$, we obtain
functions that vanish to order $k$ at $r=0$, by the assumption on $f$.
It follows that $(s,t) \mapsto f(c_{x(s),v}(t))$ and $(s,t) \mapsto f(\ell_{x(s),w}(t))$
vanish to order $k$ at $(s,t)=(0,0)$ (e.g. in view of the polarization formula <cit.>).
Thus, considering (<ref>), we may conclude (<ref>).
The proof is complete.

Let $\al \in (0,1]$, $n \ge 1$ an integer, and $\om$ a modulus of continuity.
For each $X \in  \sH^\al(\R^d)$ we have $\cA^{np(\al),\om}(X) \subseteq \cC^{n}(X)$.
If $Y$ is any subset of $X$ then $\cA^{np(\al),\om}_Y(X) \subseteq \cC^{n}_Y(X)$.

Let $f \in \cA^{np(\al),\om}(X)$.
<Ref> implies by induction that
the Fréchet derivatives $(f|_{X^\o})^{(m)}$, $m \le n$, have unique extensions
$f^{(m)} : X \to L^m(\R^d,\R)$ which satisfy

\begin{equation} \label{eq:derA}
(f^{(m)})_* \cC^\infty(\R,X) \subseteq \cC^{(n-m)p(\al),\om}(\R,L^m(\R^d,\R)).
\end{equation}

Since the $c^\infty$-topology of $X$
coincides with the trace topology from $\R^d$, by <Ref>,
we may conclude that $f \in \cC^{n}(X)$.
If $f \in \cA^{np(\al),\om}_Y(X)$, then the supplement of <Ref> implies that
$f^{(m)}|_Y=0$ for $m \le n$.

§.§ Proof of <Ref>

Let $X \in \sH(\R^d)$ and $f \in \cA^\infty(X)$.
<Ref> implies that $f|_{X^\o}$ is smooth and its derivatives of all orders extend continuously to $\p X$.
By <Ref>,
$f$ defines a Whitney jet of class $\cC^\infty$ on $X$ (cf. <cit.>
or the proof of <cit.>)
which has a $\cC^\infty$-extension to $\R^d$, by Whitney's extension theorem [33].
That, conversely, the restriction to $X$ of any $\cC^\infty$-function on $\R^d$ belongs to $\cA^\infty(X)$ is obvious.

If $f \in \cA^\infty_Y(X)$, then <Ref> gives $f \in \cC^{\infty}_Y(X)$ and thus any $\cC^\infty$-extension
vanishes to infinite order on $Y$.
Conversely, any $\cC^\infty$-function $f$ on $\R^d$ that vanishes to infinite order on $Y$
satisfies $(f \o c)^{(j)}(0)=0$ for all $j \in \N$ and all $\cC^\infty$-curves $c$ with $c(0) \in Y$ (by the chain rule).

§ HÖLDER CONTINUITY OF ARC-DIFFERENTIABLE FUNCTIONS ON $\AL$-SETS

In this section we prove

Let $\al,\be \in (0,1]$ and $X \in \sH^\al(\R^d)$.

\begin{equation}  \label{eq:incltoshow}
\cA^{0,\be}(X) \subseteq \cC^{0,\frac{\al\be}{2q(\al)}}(X)
\end{equation}

More generally, if $\om$ is a modulus of continuity then

\begin{equation} \label{eq:incltoshowomega}
\cA^{0,\om}(X) \subseteq \cC^{0,\widetilde \om}(X),
\end{equation}

where $\widetilde \om(t) = \om(t^{\frac{\al}{2q(\al)}})$.

<Ref> imply <Ref>, since $f^{(n)} \in \cA^{0,\om}(X, L^n(\R^d,\R))$
in view of (<ref>).
The proof of <Ref> requires several steps and will fill the rest of the section.
We shall give full details for $\be \in (0,1]$ and comment briefly on the case that $\om$ is a general
modulus of continuity.

Recall (cf. (<ref>)) that
the integer $q(\al)$ is defined by

\begin{align*}
q(\al) := \Big\lceil\frac{1}{\al} \Big\rceil
\begin{cases}
1 & \text{ if } \al = 1,
\\
q & \text{ if } \al \in [\tfrac{1}{q},\tfrac{1}{q-1}), ~ q \in \N_{\ge 2}.
\end{cases}
\end{align*}

Evidently, $p(\al) \le 2 q(\al)$ and  $p(\frac{1}{n}) = 2 q(\frac{1}{n})$ for $n \in \N_{\ge 1}$.

§.§ Step 0.

We will make repeated use of variants of the General Curve Lemma 12.2 in [17].
Let us recall it and fix notation.

Let $s_n \ge 0$ be a sequence of real numbers with $\sum_n s_n < \infty$.
Consider the sequences

\begin{equation} \label{eq:rntn}
r_n = \sum_{k<n} \Big(\frac{2}{k^2} + 2 s_k\Big) \quad \text{ and } \quad t_n = \frac{1}{2}(r_n + r_{n+1}).
\end{equation}

as well as the intervals

\begin{equation} \label{eq:intervals}
I_n := \Big[-\frac{1}{n^2} -s_n,\frac{1}{n^2}+s_n\Big] \quad \text{ and } \quad J_n := [-s_n,s_n].
\end{equation}

Note that the intervals
$t_n + I_n = [r_n,r_{n+1}]$ have pairwise disjoint interior
and the sequences $r_n$ and $t_n$ have a common finite limit.

[above](c)$t_{n-1} + I_{n-1}$
[above](e)$t_{n}+ I_n$

Let $c_n \in \cC^\infty(\R,\R^d)$ be a sequence of $\cC^\infty$-curves
that converges fast to $0$, i.e.,
for each $k \in \N$ the sequence $n^k c_n$ is bounded in $\cC^\infty(\R,\R^d)$.
The following fact <cit.> (an easy consequence of the Markov inequality on $[-1,1]$) will be useful:
If $c_n$ are polynomials of uniformly bounded degree, then $c_n$ converges fast to $0$ in $\cC^\infty(\R,\R^d)$
provided that the sequence $n \mapsto \sup_{t \in [-1,1]} |c_n(t)|$ converges fast to $0$.

Let $h : \R \to [0,1]$ be a $\cC^\infty$-function with $h|_{\{t \le -1\}} =0$ and $h|_{\{t \ge 0\}} =1$.

\begin{equation} \label{eq:hn}
h_n(t) := h(n^2(s_n +t))h(n^2(s_n -t))
\end{equation}

has support in $I_n$
and equals $1$ on $J_n$.
It follows that

\begin{equation} \label{eq:c}
c(t) = \sum_n h_n(t-t_n) c_n(t-t_n)
\end{equation}

defines a curve
$c \in \cC^\infty(\R,\R^d)$ such that $c(t+t_n) = c_n(t)$ for $|t| \le s_n$ and all $n$.

Indeed, at most one summand is non-zero for each $t \in \R$. Since $|h_n^{(j)}(t)| \le n^{2j} H_j$ with $H_j := \max_{t \in \R} |h^{(j)}(t)|$ ,
we have

\begin{align*}
\MoveEqLeft
n^2 \sup_{t \in \R} |\p_t^k (h_n(t-t_n) c_n(t-t_n))| =  n^2 \sup_{t \in I_n} |\p_t^k (h_n(t) c_n(t))|
\\
&\le n^2 \sum_{j=0}^k \binom{k}{j} n^{2j} H_j \sup_{t \in I_n} |c_n^{(k-j)}(t)|
\le \Big(\sum_{j=0}^k \binom{k}{j} n^{2j+2} H_j\Big) \sup_{t \in I_n, \, i\le k} |c_n^{(i)}(t)|.
\end{align*}

Since the right-hand side is bounded in $n$, as $c_n$ converges fast to $0$, $c$ is smooth.

§.§ Step 1. Halfspaces and quadrants

Suppose that $X$ is a halfspace $\{x \in \R^d : x_d\ge 0\}$ or a quadrant
$\{x \in \R^d : x_j \ge 0, \, j=1,\ldots,d \}$.
In either case $\al = 1$ and $q(1)=1$.
We will show that $\cA^{0,\be}(X) \subseteq \cC^{0,\frac{\be}2}(X)$.

Let $f \in \cA^{0,\be}(X)$.
Suppose for contradiction that $f$ is not locally $\ga$-Hölder near $0 \in X$ with $\ga = \frac{\be}{2}$.
Note that $0$ is the most singular point in $X$; at points in the interior of $X$ we already know that $f$
is even locally $\be$-Hölder and all other boundary points can be treated in a way similar to $0$.
Then there are sequences $a_n$ and $b_n$ in $X$ such that

\begin{align} \label{eq:sequences}
\begin{split}
|a_n| \le 4^{-n},~ |b_n| \le 4^{-n},
\text{ and } \frac{|f(a_n) - f(b_n)|}{|a_n - b_n|^\ga} \ge n 2^{n}  \text{ for all } n.
\end{split}
\end{align}

If $X$ is a quadrant, we work with quadratic Bézier curves.
Let $z_n \in X$ be the point with coordinates $z_{n,j} := \min\{a_{n,j},b_{n,j}\}$, $j = 1,\ldots,d$, and consider
the quadratic Bézier curve associated with the triple $(a_n,z_n,b_n)$,

\[
B_n(t) = z_n + (1-t)^2 (a_n-z_n) + t^2 (b_n-z_n), \quad t \in \R.
\]

Then $B_n$ is a parabola through the points $B_n(0)=a_n$ and $B_n(1) = b_n$
tangent in $a_n$ to the line through $a_n$ and $z_n$ and in $b_n$ to the line through $z_n$ and $b_n$.
If $z_n = a_n$, then the image of $B_n$ is the halfline $a_n + t^2 (b_n -a_n)$.
If $z_n = b_n$, we interchange the role of $a_n$ and $b_n$.
In any case $B_n(t)$ is contained in $X$ for all $t \in \R$, by the definition of $z_n$.

If $X$ is a halfspace, at least one of the two halflines $a_n + t^2 (b_n-a_n)$ and $b_n + t^2(a_n -b_n)$, $t \in \R$,
is contained in $X$. By interchanging $a_n$ and $b_n$ if necessary, we may assume that it is always $a_n + t^2 (b_n-a_n)$
which is the Bézier curve $B_n(t)$ associated with the triple $(a_n,a_n,b_n)$.

Set $s_n^2 := 2^n |a_n - b_n|$ and $c_n(t) := B_n(\frac{t}{s_n})$.
Then the sequence of $\cC^\infty$-curves $c_n$ is contained in $X$ and converges fast to $0$.
Indeed, the $c_n$ are quadratic polynomials and

\begin{equation} \label{eq:Bezierest}
\max\{|a_n - z_n|,|b_n - z_n|\}  \le |a_n - b_n|  = \frac{s_n^2}{2^n}
\end{equation}

from which the claim follows easily.

We may conclude that the $\cC^\infty$-curve $c$ defined in (<ref>) lies in $X$,
because each $c_n$ does and multiplication by $h_n$ acts pointwise as a homothety with center $0$ and positive ratio.
Since $c(t+t_n) = c_n(t)$ for $t \in [-s_n,s_n]$,
we have, in view of (<ref>) and as $\be=2\ga$ and $2^{\ga n} \le 2^n$,

\begin{align} \label{eq:contradiction}
\frac{1}{s_n^\be} |(f \o c)(t_n+s_n) - (f \o c)(t_n)| \ge  \frac{|f(b_n) - f(a_n)|}{2^{n} |a_n - b_n|^{\ga}} \ge n,
\end{align}

contradicting $f \in \cA^{0,\be}(X)$.

Let us briefly indicate how to modify the arguments if $f \in \cA^{0,\om}(X)$, where $\om$ is a modulus of continuity.
For contradiction we may suppose that there are sequences $a_n$ and $b_n$ in $X$ with $|a_n| \le 4^{-n}$, $|b_n| \le 4^{-n}$

\[
|f(a_n) - f(b_n)| \ge n 2^{n} \om(|a_n - b_n|^{1/2})
\]

for all $n$. With the same choices as above we find a $\cC^\infty$-curve $c$ in $X$ such that

\begin{align*}
\frac{1}{\om(s_n)} |(f \o c)(t_n+s_n) - (f \o c)(t_n)| \ge  \frac{|f(b_n) - f(a_n)|}{2^{n} \om(|a_n - b_n|^{1/2})} \ge n,
\end{align*}

since $\om(s_n) = \om(2^{n/2} |a_n - b_n|^{1/2}) \le 2^{n} \om(|a_n - b_n|^{1/2})$ as $\om$ is increasing and subadditive.

§.§ Step 2. Simplicial and cubical cusps

Let $q \in \N_{\ge 1}$.
Consider the unbounded simplicial cusp

\[
S_q = \{(x_1,\ldots,x_d) \in \R^d : 0 \le x_1 \le x_{2} \le \cdots \le x_{d-1} \le x_d^q \}.
\]

There is the homeomorphism $\vh : S_1 \to S_q$ given by

\[
\vh(x_1,\ldots,x_d) = (x_1^q,\ldots,x_{d-1}^q,x_d)
\]

and $S_q$ is the union of the curves $(t^q x',t)$, $t \in [0,\infty)$, where $x' \in \{0 \le x_1 \le x_{2} \le \cdots \le x_{d-1} \le 1\}$.
Note that $S_1$ is the image of the quadrant $\{x \in \R^d: x_j \ge 0, \, j =1,\ldots,d\}$
under a linear isomorphism.
If $a,b$ are two different points in $S_q$, we may consider the points $\vh^{-1}(a)$ and $\vh^{-1}(b)$ in $S_1$.
By Step 1,
there is a quadratic curve $B : \R \to S_1$ with $B(0)=\vh^{-1}(a)$ and $B(1)=\vh^{-1}(b)$.
Thus the smooth curve $\vh \o B$ lies entirely in $S_q$ and satisfies $(\vh \o B)(0)=a$ and $(\vh \o B)(1)=b$.

Actually, $S_q$ is not a Hölder set, since the uniform cusp property fails at the tip.
But for technical reasons it is convenient to transit
this intermediate step. Let us show that

\begin{equation} \label{eq:caseSq}
\cA^{0,\be}(S_q) \subseteq \cC^{0,\frac{\be}{2q}}(S_q).
\end{equation}

Let $f \in \cA^{0,\be}(S_q)$.
Suppose for contradiction that $f$ is not locally $\ga$-Hölder near $0 \in S_q$ with $\ga = \frac{\be}{2q}$;
as in Step 1 it is enough to consider the most singular point.
Then there are sequences $a_n$ and $b_n$ in $S_q$ satisfying (<ref>).
Let $\vh \o B_n : \R \to S_q$ be the smooth curve satisfying $(\vh \o B_n)(0)=a_n$ and $(\vh \o B_n)(0)=b_n$
that was constructed at the beginning of Step 2.

Set $s_n^{2q} := 2^n |a_n - b_n|$  and $c_n(t) := \vh(B_n(\frac{t}{s_n}))$.
The sequence of curves $c_n$ is clearly contained in $S_q$.
It converges fast to $0$.
Indeed, $c_n$ is a polynomial of degree $2q$, so it suffices to check that $\sup_{t \in [-1,1]} |c_n(t)|$ tends fast to $0$.
$\tilde a_n := \vh^{-1}(a_n)$
$\tilde b_n :=\vh^{-1}(b_n)$. Then $\tilde a_{n,j} = a_{n,j}^{1/q}$ and $\tilde b_{n,j} = b_{n,j}^{1/q}$ for $j \le d-1$
as well as $\tilde a_{n,d} = a_{n,d}$ and $\tilde b_{n,d} = b_{n,d}$.
Up to a linear isomorphism we may suppose that $\tilde a_n$ and $\tilde b_n$ lie in the quadrant $\{x \in \R^d: x_j \ge 0, \, j =1,\ldots,d\}$
so that $B_n(t)$ is the quadratic Bézier curve from Step 1 with associated control point $\tilde z_n$. We may conclude that

\begin{equation*}
\max\{|\tilde a_n - \tilde z_n|,|\tilde b_n - \tilde z_n|\}  \le |\tilde a_n - \tilde b_n| \le \sqrt{d}\, |a_n-b_n|^{1/q} = \sqrt{d}\,\frac{s_n^{2}}{2^{n/q}}
\end{equation*}

as in (<ref>), since

\begin{align*}
|\tilde a_n - \tilde b_n|^2
&= \sum_{j=1}^{d-1} |a_{n,j}^{1/q}-b_{n,j}^{1/q}|^2 + |a_{n,d}-b_{n,d}|^2
\\
&\le   \sum_{j=1}^{d-1} |a_{n,j}-b_{n,j}|^{2/q} + |a_{n,d}-b_{n,d}|^{2/q}
\le d\, |a_n-b_n|^{2/q}.
\end{align*}

It follows that the maximum of $|B_n(\frac{t}{s_n})|$ on $[-1,1]$ converges fast to $0$
and hence all the more that of $|\vh(B_n(\frac{t}{s_n}))|$.

With the sequences $r_n$ and $t_n$
and the functions $h_n$ from Step 0 we construct a smooth curve $c$ in the following way.
First note that,
if $\ch : \R \to [0,1]$ and $z = (z_1,\ldots, z_d): \R \to S_q$, then the weighted homothety with center $0$ and ratio $\ch$,

\[
\ch \wmult z := (\ch^q z_1, \ch^q z_2,\ldots,\ch^q z_{d-1},\ch z_{d}),
\]

also takes values in $S_q$. So

\[
c(t) = \sum_n  (h_n \wmult c_n)(t-t_n)
\]

defines a curve $c : \R \to S_q$ of class $\cC^\infty$, by a calculation similar to the one at the end of Step 0,
since at most one summand is non-zero for each $t \in \R$ and the sequence $c_n$ converges fast to $0$.
In view of $c(t+t_n) = c_n(t)$ for $t \in [-s_n,s_n]$,
we are led to the contradiction (<ref>), since $a_n$ and $b_n$ satisfy (<ref>) and as $\be=2 q \ga$.
Thus (<ref>) is proved.

For a general modulus of continuity $\om$ and $f \in \cA^{0,\om}(S_q)$ we analogously get

\begin{align*}
\frac{1}{\om(s_n)} |(f \o c)(t_n+s_n) - (f \o c)(t_n)| \ge  \frac{|f(b_n) - f(a_n)|}{2^{n} \om(|a_n - b_n|^{1/(2q)})} \ge n.
\end{align*}

We may symmetrize the result (<ref>) in the following way.

\[
\Si_q := \bigcup_{\si \in G} \si S_q,
\]

where $G$ is the group of isometries of $\R^d$ generated by the reflections in the hyperplanes $\{x_j =0\}$, $j=1,\ldots,d-1$, and $\{x_j = x_k\}$, $1 \le j<k \le d-1$.
Then $\Si_q$ is the union of the curves $(t^q x',t)$, $t \in [0,\infty)$, where $x' \in [-1,1]^{d-1}$.
The cubical cusp $\Si_q$ belongs to $\sH^{1/q}(\R^d)$.

[   view=12025,
axis line style=draw=none,
tick style=draw=none,
label style=draw=none

3[variable=t,mesh,color=black,style=very thick,domain=0:1] (t^2,t^2,t);
3[variable=t,mesh,color=black,style=very thick,domain=0:1] (0,t^2,t);
3[variable=t,mesh,color=black,style=very thick,domain=0:1] (0,0,t);
3[variable=t,mesh,color=black,style=very thick,domain=0:1] (0,t,1);
3[variable=t,mesh,color=black,style=very thick,domain=0:1] (t,t,1);
3[variable=t,mesh,color=black,style=very thick,domain=0:1] (t,1,1);

3[variable=t,mesh,color=black,dotted,domain=0:1] (t^2,0,t);
3[variable=t,mesh,color=black,dotted,domain=-1:1] (t,0,1);
3[variable=t,mesh,color=black,domain=-1:1] (1,t,1);

3[variable=t,mesh,color=black,domain=0:1] (t^2,-t^2,t);
3[variable=t,mesh,color=black,dotted,domain=-1:1] (t,-t,1);
3[variable=t,mesh,color=black,dotted,domain=0:1] (-t,-t,1);
3[variable=t,mesh,color=black,dotted,domain=0:1] (0,-t,1);

3[variable=t,mesh,color=black,domain=-1:1] (t,-1,1);
3[variable=t,mesh,color=black,domain=-1:1] (-1,t,1);
3[variable=t,mesh,color=black,domain=0:1] (-t,1,1);

3[variable=t,mesh,color=black,domain=0:1] (-t^2,t^2,t);
3[variable=t,mesh,color=black,dotted,domain=0:1] (0,-t^2,t);
3[variable=t,mesh,color=black,domain=0:1] (-t^2,-t^2,t);
3[variable=t,mesh,color=black,dotted,domain=0:1] (-t^2,0,t);

The simplicial cusp $S_q$ and the cubical cusp $\Si_q$ (truncated at $\{x_d = r\}$).

We claim that

\begin{equation} \label{eq:caseSiq0}
\cA^{0,\be}(\Si_q) \subseteq \cC^{0,\frac{\be}{2q}}(\Si_q).
\end{equation}

let $P$ be the union of the hyperplanes that separate the chambers $\si S_q$, $\si \in G$.
Let $f \in \cA^{0,\be}(\Si_q)$, $r>0$, and $y_1, y_2 \in \Si_q \cap B(0,r)$.
Now $\Si_q \cap B(0,r)$ is quasiconvex: There is a rectifiable curve $\pi$ in $\Si_q \cap B(0,r)$ joining $y_1$ and $y_2$
of length $\ell(\pi) \le C \, |y_1-y_2|$, where the constant $C>0$ depends only on $q$, $d$, and $r$.
Let $p_1,p_2,\ldots$ be the points, where $\pi$ intersects $P$.
We may assume that any two consecutive points in the list $p_0:=y_1,p_1,\ldots,p_k,p_{k+1}:=y_2$ belong to the same chamber $\si S_q$
and no chamber contains three or more points in the list, by omitting redundant points. Then $k$ is bounded by a constant that depends only on the number of chambers.
Then, for some constant $D>0$,

\begin{align} \label{eq:symmetric}
|f(y_1) - f(y_2)|
&\le \sum_{j = 0}^k |f(p_j) - f(p_{j+1})|
\\
&\le \sum_{j = 0}^k D\, |p_j -p_{j+1}|^{\frac{\be}{2q}} \notag
\\
&\le D (k+1) \ell(\pi)^{\frac{\be}{2q}}
\le D C^{\frac{\be}{2q}}  |y_1 -y_2|^{\frac{\be}{2q}}, \notag
\end{align}

because $f|_{\si S_q} \in \cA^{0,\be}(\si S_q)\subseteq \cC^{0,\frac{\be}{2q}}(\si S_q)$ by (<ref>).
Thus (<ref>) is proved.
For a general modulus of continuity $\om$ the same argument applies, since $\om$ is assumed to be increasing and subadditive.

In the next step, we shall need the result for truncated cubical cusps

\[
\Si_q(r) := \Si_q \cap \{x \in \R^d : x_d \le r\}, \quad r>0.
\]

That is

\begin{equation} \label{eq:caseSiq}
\cA^{0,\be}(\Si_q(r)) \subseteq \cC^{0,\frac{\be}{2q}}(\Si_q(r)).
\end{equation}

To see this let $f \in \cA^{0,\be}(\Si_q(r))$.
It suffices to show that each point of $\Si_q(r)$ has a neighborhood $U$ in $\Si_q(r)$ such that $f$ is $\frac{\be}{2q}$-Hölder
on $U$.
Observe that near each of its points the set $\Si_q(r)$ is diffeomorphic to an open subset of one of the sets $X$ already treated;
note that the affine hyperplane $\{x_d = r\}$ meets each boundary face of $\Si_q$ transversally.
Using a smooth cut-off function we may assume that there is $\tilde f \in \cA^{0,\be}(X)$ with $\tilde f|_U = f|_U$
so that $f$ is $\frac{\be}{2q}$-Hölder on $U$ (cf. <Ref>).
The reasoning for a general modulus of continuity is the same.

§.§ Step 3. The general case

Let $\al,\be \in (0,1]$ and $X \in \sH^\al(\R^d)$.
Our goal is to show the inclusion (<ref>) (and (<ref>)).

Let $q := q(\al) \in \N_{\ge 1}$, i.e., $\al \in [\frac{1}{q},\frac{1}{q-1})$ if $q \ge 2$ or $\al = 1$ if $q=1$.
In any case, $X \in \sH^{1/q}(\R^d)$, since $\sH^\al(\R^d) \subseteq \sH^{1/q}(\R^d)$.

We will need the truncated cusps $\Si_q(r)$ and

\[
S_q(r) := S_q \cap \{x \in \R^d : x_d \le r\}
\]

as well as their translates

\[
\Si_q(y,r) := y + \Si_q(r) \quad \text{ and } \quad S_q(y,r) := y + S_q(r).
\]

First observe that
there is a universal constant $c>0$ such that for sufficiently small $r_1,r_2>0$ we have that

\begin{equation} \label{eq:intersectingcusps}
|y_1 - y_2| < c \min\{r_1^q,r_2^q\} \text{ implies } S_q(y_1,r_1) \cap S_q(y_2,r_2) \ne \emptyset.
\end{equation}

Indeed, suppose that $r_1 \le r_2$ and initially $y_1 = y_2 =0$ so that $S_q(r_1) = S_q(y_1,r_1) \subseteq S_q(y_2,r_2) = S_q(r_2)$.
Then we take any direction $v \in \mathbb S^{d-1}$ and
move $S_q(r_1)$ in direction $v$ as long as $S_q(tv,r_1) = tv + S_q(r_1)$, $t > 0$, and $S_q(r_2)$ have a common point.
Let $t_v$ be supremum of such $t$. A lower bound for $\inf_{v \in \mathbb S^{d-1}} t_v$ is
the minimal distance of a vertex of the simplicial cusp $S_q(r_1)$ to its opposite facet
(the only facet that does not contain the vertex as a boundary point).
If $r_1$ is sufficiently small, then the vertex with the minimal
distance $\de$ to its opposite face is $r_1 e_d$. In the case $q=1$, it is now easy to conclude (<ref>).
Suppose that $q>1$.
We clearly have $\de \le r_1^q$.
The point $p$ in the opposite facet that realizes the distance has the form $p_{d}^q e_{d-1} + p_d e_d$
so that

\[
\de = \sqrt{p_d^{2q} + (r_1-p_d)^2}.
\]

This implies $\de \ge r_1 - p_d$ and thus
$p_d \ge \frac{r_1}{2}$, since otherwise
$\frac{r_1}{2} < \de \le r_1^q$, a contradiction for $r_1 < \frac{1}{2}$.
Consequently, $\de \ge p_{d}^{q} \ge (\frac{r_1}{2})^{q}$ and (<ref>) follows.
Note that clearly also the symmetric cusps $\Si_q(y_i,r_i)$ have the property (<ref>).

[domain=0:1, scale = 1]
[black, line width = 0.20mm]   plot[smooth,domain=0:1] (, 2* ()^(1/2));

[left](b)$r_1 e_d$
[right](p)$p = p_{d}^q e_{d-1} + p_d e_d$

Now let $f \in \cA^{0,\be}(X)$.
We will show that each $z \in X$ has a neighborhood on which $f$ is
$\ga$-Hölder with

\[
\ga = \frac{\al\be}{2q}.
\]

We may assume without loss of generality that $z =0$.
Since $X \in \sH^{1/q}(\R^d)$, we may suppose that (after an affine transformation)

\begin{equation} \label{eq:cone}
\text{for all $y \in X  \cap B(0,\ep)$ we have $\Si_q(y,1) \subseteq X$}
\end{equation}

provided that $\ep>0$ is sufficiently small.
We know from (<ref>) that $f$ is $\ga'$-Hölder on $\Si_q(y,1)$, where

\[
\ga':=  \frac{\ga}{\al} =  \frac{\be}{2q},
\]

thus in particular on the subsets

\[
\mathbf \Si_n(y) := \Si_q(y,4^{-n}), \quad n \in \N.
\]

Let $H_n(y)$ by the $\ga'$-Hölder constant of $f$ on $\mathbf \Si_n(y)$, i.e.,

\[
H_n(y) = \sup_{a \ne b \in \mathbf \Si_n(y)} \frac{|f(a)-f(b)|}{|a-b|^{\ga'}}.
\]

Let $c>0$ be the constant from (<ref>) and

\[
H_n := \sup \big\{H_n(y) : y \in X  \cap B(0,c\, 4^{-(n+2)q})\big\} \in [0,\infty]
\]

for all large integers $n$ (so that $c\, 4^{-(n+2)q}$ is smaller than the $\ep$ in (<ref>)).
We shall distinguish the following two cases:

(i) There exists $n$ such that $H_n<\infty$.

(ii) $H_n= \infty$ for all $n$.

§.§.§ Case i

By assumption there is some integer $n$ such that $H_n<\infty$.
Fix this $n$.
Taking $0< \ep_1 \le  c\, 4^{-(n+2)q}$ small enough,
we may assume that in a neighborhood of $B(0,\ep_1)$ the set $X$
is the epigraph $\{x_d \ge \ps(x')\}$ of an $\al$-Hölder function $\ps$, where $x' = (x_1,\ldots,x_{d-1})$
ranges over some convex open set in $\R^{d-1}$; see <Ref>.
Since $\ps$ is uniformly continuous, we may assume that
$\sup_{x',y'} |\ps(x') -\ps(y')| \le 4^{-(n+1)}$
if we shrink $\ep$ if necessary.
Thus, for each $y \in X \cap B(0,\ep_1)$ the cubical cusp $\mathbf \Si_n(y)$
is contained in $X$, by (<ref>), and, having height $4^{-n}$, has non-empty intersection with

\[
K := \Big\{x : x_d > \sup_{x'} \ps(x') + 4^{-(n+1)}\Big\}.
\]

We know that $f$ is $\be$-Hölder
on $K$, say with Hölder constant $H$, since $K$ is relatively compact in the interior of $X$.
Let $u=(u',u_d)$ and $v=(v',v_d)$ be any two different points in $X \cap B(0,\ep_1)$.
Then we find $\tilde u \in \mathbf \Si_n(u) \cap K$
and $\tilde v \in \mathbf  \Si_n(v) \cap K$
such that $\tilde u'$ and $\tilde v'$ lie on the line segment $[u',v']$,
$\tilde u_d  = \tilde v_d$,

\[
|u_d - \tilde u_d| \le C\, |u' - \tilde u'|^{\al}
\quad \text{ and } \quad
|v_d - \tilde v_d| \le C\, |v' - \tilde v'|^{\al}.
\]

\[
|u - \tilde u|^2 =   |u' - \tilde u'|^2 + |u_d - \tilde u_d|^2 \le C_1^2\,  |u' - \tilde u'|^{2\al}
\]

and analogously

\[
|v - \tilde v|^2 \le C_1^2 \, |v' - \tilde v'|^{2\al}.
\]

Since $|\tilde u - \tilde v| = |\tilde u' - \tilde v'|$, we conclude

\begin{align*}
|f(u) - f(v)| &\le |f(u) - f(\tilde u)| + |f(\tilde u) - f(\tilde v)| + |f(\tilde v) - f(v)|
\\
&\le H_n |u - \tilde u|^{\ga'} + H  |\tilde u - \tilde v|^{\be}  + H_n |v - \tilde v|^{\ga'}
\\
&\le H_n C_1^{\ga'} |u' - \tilde u'|^{\al \ga'} + H |\tilde u' - \tilde v'|^{\be}  + H_n C_1^{\ga'}  |v' - \tilde v'|^{\al \ga'}
\\
&\le C_2\, |u' - v'|^{\ga}
\\
&\le C_2\, |u - v|^{\ga}.
\end{align*}

Since $u$ and $v$ were arbitrary, we proved that $f$ is $\ga$-Hölder on $X \cap B(0,\ep_1)$.
So Case (i) is done.

§.§.§ Case ii

In this case, we prove that $f$ is even $\ga'$-Hölder in a neighborhood of $0 \in X$.
By assumption,
for each sufficiently large $n$
there is a sequence $(y^n_m)_m \subseteq X \cap B(0,c\, 4^{-(n+2)q})$ such that
$\{H_n(y^n_m) : m \in \N\}$ is unbounded.

Let $H^{\si}_n(y^n_m)$ denote the $\ga'$-Hölder constant of $f$ on $\si S_q(y^n_m, 4^{-n})$, where $\si \in G$.
The argument surrounding (<ref>) shows that

\[
H_n(y^n_m) \le \on{const} \cdot \sum_{\si \in G} H^{\si}_n(y^n_m).
\]

Since $G$ is finite, we may pass to a subsequence of $m$ and assume that
$H^{\si_n}_n(y^n_m) \to \infty$ as $m \to \infty$ for some $\si_n \in G$.
Passing to a subsequence of $m$ again, we may suppose
that $H^{\si_n}_n(y^n_m) > m 2^{m}$ for all $m \in \N$.
In particular, the diagonal sequence $y_n := y^n_n$ satisfies
$y_n \in X  \cap B(0,c\, 4^{-(n+2)q})$ and
$H^{\si_n}_n(y_n)> n 2^{n}$ for all sufficiently large $n$, say $n \ge N$.
Using the finiteness of $G$ again, we find $\ta \in G$ and
a strictly increasing subsequence $n_k \ge N$ of $n$ such that $\si_{n_k} = \ta$.
Thus $H^{\ta}_{n_k}(y_{n_k})> n_k 2^{n_k}$ for all $k$.
We may assume without loss of generality that $\ta = \id$.
For all $n \ge N$ we set

\[
\mathbf S_{n} := S_q(y_{n}, 4^{-n}).
\]

there exist $a_{n_k} \ne b_{n_k} \in \mathbf S_{n_k}$ such that

\begin{align} \label{eq:contra}
|f(a_{n_k}) - f(b_{n_k})| \ge n_k 2^{n_k} |a_{n_k} - b_{n_k}|^{\ga'} \quad \text{ for all } k.
\end{align}

\[
|y_{n} - y_{n+1}| \le |y_{n}| + |y_{n+1}| \le c\, 4^{-(n+2)q} + c\, 4^{-(n+3)q} \le \frac{c}{2}\, 4^{-(n+1)q},
\]

there exists $u_n \in \mathbf S_n \cap \mathbf S_{n+1}$ for all $n \ge N$, by (<ref>).
For each $n$ in the complement
of the sequence $(n_k)$ in $\N_{\ge N}$
let $a_n := u_{n-1}$ and $b_n := u_n$; we may assume that $u_{n-1}\ne u_n$.
Then $a_n \ne b_n \in \mathbf S_n$ for all $n\ge N$.

Set $s^{2q}_n = 2^{n} |a_n - b_n|$.
By Step 2, for each $n \ge N$ there exists a $\cC^\infty$-curve $c_n$ such that

* $c_n(0)=a_n$, $c_n(s_n)=b_n$,

* $c_n$ converges fast to $0$, and

* $c_n|_{[0,s_n]}$ is contained in $\mathbf S_n$ and $c_n|_{I_n}$ is contained in $X$, by (<ref>),
where $I_n = [-\frac{1}{n^2} - s_n,\frac{1}{n^2} + s_n]$; cf. (<ref>).

Let $r_n$ and $t_n$ be the sequences from (<ref>) and $h_n$ the function defined in (<ref>).
Note that, if $\ch : \R \to [0,1]$ and $z,w : \R \to S_q(y,r)$, then also
$\ch \wmult z + (1-\ch) \wmult w$ takes values in $S_q(y,r)$. Indeed,
up to a translation we may assume that $y = 0$. Then

\begin{align*}
0 &\le \ch^q z_{1} + (1-\ch)^q w_1,
\\
\ch^q z_{j} + (1-\ch)^q  w_{j} &\le \ch^q z_{j+1} + (1-\ch)^q  w_{j+1}, \quad j = 1,\cdots, d-2,
\\
\ch^q z_{d-1}  + (1-\ch)^q w_{d-1} &\le \ch^q z_{d}^q  + (1-\ch)^q  w_{d}^q \le (\ch z_{d} + (1-\ch)  w_{d})^q,
\\
\ch z_d + (1-\ch)  w_d &\le \ch r + (1-\ch)  r = r.
\end{align*}

We set

\begin{align*}
A_n(t) &:= (h_n \wmult c_n)(t-t_n),
\\
B_n(t) &:= (1-h_n) \wmult \big( u_{n-1} \mathbf{1}_{(r_n,t_n]} + u_n \mathbf{1}_{[t_n,r_{n+1}]}\big)(t-t_n),
\intertext{where $\mathbf{1}_A$ is the characteristic function of the set $A$, and }
c(t) &:= \sum_n (A_n(t) + B_n(t)).
\end{align*}

By the above observations and a calculation similar to the one at the end of Step 0,
we see that $c$ is a $\cC^\infty$-curve in $X$;
hereby we use that $u_n$ converges fast to $0$ and $h_n$ has support in $I_n$ and equals $1$ on $[-s_n,s_n]$.
Since $c(t+t_n) = c_n(t)$ for $t \in [-s_n,s_n]$ and $\be=2q\ga'$,
we have, in view of (<ref>),

\begin{align*}
\frac{1}{s_{n_k}^\be} |(f \o c)(t_{n_k}+s_{n_k}) - (f \o c)(t_{n_k})| \ge  \frac{|f(b_{n_k}) - f(a_{n_k})|}{2^{n_k} |b_{n_k} - a_{n_k}|^{\ga'}} \ge {n_k},
\end{align*}

contradicting $f \in \cA^{0,\be}(X)$.
Thus (<ref>) is proved.

If $\om$ is a general modulus of continuity, then these arguments also
give a proof of (<ref>): it suffices to replace the moduli $t \mapsto t^\ga$ and $t \mapsto t^{\ga'}$
by $\widetilde \om(t) :=  \om(t^{\frac{\al}{2q}})$ and $\widetilde \om'(t) :=  \om(t^{\frac{1}{2q}})$, respectively.
The proof of <Ref> is complete.

We do not know if $\frac{\al}{2q(\al)}$ in the statement of <Ref> and <Ref> can be replaced by
as in the special cases of cusps. The factor $\al$ stems from Case (i) in Step 3, but it is possible that it is just
an artefact of the proof.

§ ON THE OPTIMALITY OF THE RESULTS

Let us discuss the optimality and limitations of <Ref>.
The reader's attention is also drawn to
<Ref> and the examples in <cit.>, especially Example 10.4.

§.§ Loss of derivatives

By <Ref>, any function $f \in \cA^{np(\al),\om}(X)$ on an $\al$-set $X$ possesses $n$ continuous Fréchet derivatives on $X$.
<Ref> shows that the integer $p(\al)$ is optimal in following the sense:
if $p'<p(\al)$ is another integer, then not every function $f \in \cA^{np',\om}(X)$ has $n$ continuous Fréchet derivatives on $X$.
Actually, for the set $X$ in <Ref> we find $\cA^{np(\al)-3,1}(X) \not\subseteq \cC^{n}(X)$ for suitable $\al$ and $n$.

Fix $\al \in (0,1)$
and set

\[
X := \big\{(x,y) \in \R^2 : x\ge 0, \, |y| \le x^{1/\al}\big\} \in \sH^\al(\R^2).
\]

For $n \in \N$ consider the function $f_n : X \to \R$ defined by

\[
f_n(x,y) :=
\begin{cases}
\frac{y^{n+1}}{x} & \text{ if } x \ne 0,
\\
0 & \text{ if } x=0.
\end{cases}
\]

Then $f_n$ is smooth on $X^\o$ and extends continuously to $\p X$; indeed, $|\frac{y^{n+1}}{x}| \le x^{\frac{n+1}{\al}-1} \to 0$ as $x \to 0$, since $n+1 > \al$.
$\p_y^m f_n = \frac{(n+1)!}{(n+1-m)!} f_{n-m}$
extends continuously to $\p X$ for all $m\le n$, but $\p_y^{n+1} f_n(x,y) = (n+1)!\frac{1}{x}$ does not.
Moreover, $\p_x^m f_n(x,y) = (-1)^m m!\, \frac{y^{n+1}}{x^{m+1}}$ extends continuously to $\p X$ for all $m \le n$.
Similarly, one sees that the mixed partial derivatives $\p_x^\ell \p_y^m f_n$ extend continuously to $\p X$ if $\ell+m \le n$.
That means $f_n \in \cC^{n}(X) \setminus \cC^{n+1}(X)$.
We also see that $f_n$ is $n$-flat on $\{0\}$.

Let $c(t) = (x(t),y(t))$ be a $\cC^\infty$-curve in $X$.
Then $f_n\o c$ is of class $\cC^{\lfloor \be \rfloor}$, where $\be = \frac{2(n+1)}{\al} - 2$ and $\lfloor \be \rfloor$ is the largest integer $\le \be$.
Consequently, $f_n \in \cA^{\lfloor \be \rfloor-1,1}(X)$.
This is a consequence of
the following result <cit.>:
If $\vh,\ps : \R \to \R$ satisfy $\ps \in \cC^\infty$, $\vh \ps \in \cC^\infty$, and $|\vh| \le |\ps|^\ga$ for some positive constant
$\ga$, then $\vh \in \cC^{\lfloor 2\ga \rfloor}$.
Take $\vh = f_n \o c$ and $\ps = x$.

Now we specify to $\al = \frac{2}{p}$ for some $p \in \N_{\ge 3}$ so that $p(\al)=p$ and $\lfloor \be \rfloor= (n+1)p-2$.
Thus $f_n \in \cA^{(n+1)p-3,1}(X) \subseteq \cA^{np,1}(X)$. <Ref> yields $f_n \in \cC^n(X)$, confirming what we checked directly above.
We also see that $\cA^{(n+1)p-3,1}(X) \not \subseteq \cC^{n+1}(X)$.

Moreover, if there were a positive integer $p'<p$ such that
$\cA^{(n+1)p',1}(X) \subseteq \cC^{n+1}(X)$, then
$f_n \in \cA^{np,1}(X) \subseteq \cA^{(n+1)p',1}(X) \subseteq \cC^{n+1}(X)$ as soon as $n \ge \frac{p'}{p-p'}$, a contradiction.

Note that <Ref> also shows that
the partial derivatives of order $n+1$ of a function $f \in \cA^{np(\al),1}(X)$, where $X \in \sH^\al(\R^d)$,
which exist in $X^\o$ (since $n+1 \le n p(\al)$)
are in general unbounded at the boundary $\p X$.

There are closed fat sets $X \subseteq \R^d$ such that each $f \in \cA^\infty(X)$ has a $\cC^\infty$-extension to $\R^d$,
but the loss of derivatives cannot be expressed by an integer
$p$ such that $\cA^{np,1}(X) \subseteq \cC^{n}(X)$ for all $n$:

\[
K(\al):= \ol {\Ga^{\al}_2(\tfrac{1}{2},1)} = \big\{(x_1,x_2) \in \R^2 : |x_1| \le \tfrac{1}{2},\, (2|x_1|)^\al \le x_2 \le 1\big\}
\]

be the truncated closed $\al$-cusp of radius $\frac{1}{2}$ and height $1$ in dimension $2$.

\[
X := \bigcup_{m\in \N_{\ge 1}} \big(m e_1 + K(\tfrac{1}{m})\big) \cup \big\{(x_1,x_2) \in \R^d : x_1 \ge 0, \, 1 \le x_2 \le 2\big\}
\]

is an infinite comb with sharper and sharper teeth.
Each $f \in \cA^\infty(X)$ has a $\cC^\infty$-extension to $\R^2$
which follows from <Ref>, since $X \cap B(0,n)$ is a Hölder set for each integer $n\ge 1$ and
the respective extensions can be glued together by a partition of unity.
On the other hand, we may infer from
<Ref> that there is no positive integer $p$ such that
$\cA^{np,1}(X) \subseteq \cC^{n}(X)$ for all $n$.

§.§ Degradation of the Hölder index

For a $1$-set $X$, <Ref> yields $\cA^{2n,\be}(X) \subseteq \cC^{n,\frac{\be}{2}}(X)$ for all $n \in \N$ and $\be \in (0,1]$.
That division of the Hölder index by $2$ is optimal is seen by the following example.

Consider the halfspace $X := \{x \in \R^d : x_d \ge 0\}$.
The function $f : X \to \R$, $x \mapsto (x_d)^{n+\frac{1}{2}}$, belongs to $\cC^{n,\frac{1}2}(X)$, but $f^{(n)}$ is not $\ga$-Hölder
near $\p X$ for any $\ga>\frac{1}{2}$.
On the other hand $f \in \cA^{2n,1}(X)$, by Glaeser's inequality [10]:

\begin{equation} \label{eq:Glaeser}
u'(t)^2 \le 2 u(t) \sup_{s \in \R} |u''(s)| \quad \text{ if }\quad u : \R \to [0,\infty).
\end{equation}

To see this it suffices check that $u^{n+\frac{1}{2}}$ is of class $\cC^{2n,1}$ if $u \in \cC^\infty(\R,[0,\infty))$; we may assume without loss of
generality that $u$ has compact support.
On the set $U:=\{t \in \R : u(t) \ne 0\}$ we may differentiate indefinitely: for $k\ge 1$ we find

\[
\p_t^k (u^{n+\frac{1}{2}}) = \sum_{j= 1}^k \sum_{\substack{\al_1 + \cdots + \al_j= k \\  \al_i>0}} C_{j,\al} u^{n-j+\frac{1}{2}} u^{(\al_1)} \cdots u^{(\al_j)},
\]

where $C_{j,\al}$ are numerical constants.
We claim that for each $k \le 2n$ all summands on the right-hand side extend continuously by $0$ to the complement of $U$.
This is clear for $k\le n$, because then the exponent $n-j+\frac{1}{2}$ is positive.
If $n < j \le k \le 2n$, then $\al_1 + \cdots + \al_j = k$ implies that at least $2(j - n)$ among the $\al_i$ must equal $1$ so that

\[
u^{n-j+\frac{1}{2}} u^{(\al_1)} \cdots u^{(\al_j)}  = \frac{(u')^{2(j-n)}}{u^{j-n-\frac{1}{2}}} \cdot P =u' \cdot \Big( \frac{u'}{u^{\frac{1}{2}}} \Big)^{2(j-n)-1} \cdot P,
\]

where $P$ is the product of the remaining factors. By (<ref>), $u'/u^{\frac{1}{2}}$ is bounded and $u'$ vanishes on the complement of $U$.
Thus $u^{n+\frac{1}{2}}$ is of class $\cC^{2n}$.
For $k = 2n+1$ a similar argument shows that at least $2(j - n)-1$ among the $\al_i$ must equal $1$ so that all summands
are globally bounded on $U$.
That means that $v:= \p_t^{2k} (u^{n+\frac{1}{2}})$ is Lipschitz on each connected component of $U$ with uniform Lipschitz constant $L$.
Since $v$ is zero on the complement of $U$, it follows that $v$ is Lipschitz on $\R$.
Indeed, if $t_1 < t_2$ are not in the same component, take $s_1 \le s_2$ in $[t_1,t_2]$ such that
$s_i$ is an endpoint of the component of $t_i$ if $t_i \in U$ and $s_i = t_i$ otherwise.
Thus, $v(s_i)=0$ for $i =1,2$ and

\[
|v(t_2) - v(t_1)| \le |v(t_2) - v(s_2)| + |v(s_1) - v(t_1)| \le L(t_2-s_2) + L(s_1- t_1) \le L(t_2-t_1).
\]

§.§ Locally finite unions of $\al$-sets

The conclusion of <Ref> can be (partially) extended to locally finite unions of $\al$-sets if
the overlaps of the pieces are not too “thin”. Intersections do in general not preserve the conclusion as
is shown by the infinitely flat cusp <cit.>.

Let $X \subseteq \R^d$ be a locally finite union of $\al$-sets $X_j$ such that:

($\star$) If $x \in \p X$ and $x \in X_i \cap X_j$, then there exists a non-empty $\al$-set $Y$ such that
$x \in Y \subseteq X_i \cap X_j$.

Then $\cA^{n p(\al), \be}(X) \subseteq \cC^{n}(X)$ for all $\be \in (0,1]$ and $n \in \N$.
If, additionally,

($\star\star$) $X$ is $m$-regular,

then $\cA^{n p(\al), \be}(X) \subseteq \cC^{n, \frac{\al \be}{2q(\al) m}}(X)$.
Note that $\be$ may be replaced by a general modulus of continuity $\om$.

Let $f \in \cA^{n p(\al), \be}(X)$.
Then $f|_{X_j} \in \cA^{n p(\al), \be}(X_j)$ for each $j$.
Since $X_j$ is an $\al$-set, we have $f|_{X_j} \in \cC^n(X_j)$ for each $j$, by <Ref>.
It remains to check that the derivatives up to order $n$ of $f|_{X_j}$ and $f|_{X_i}$
for $j \ne i$ coincide at points $x \in \p X$
with belong to $X_j \cap X_i$.
But that follows from condition ($\star$), since the derivatives are uniquely determined by the restriction $f|_Y$.
Note that ($\star$) implies that $X$ is simple.

Fix $a \in X$. By ($\star\star$), there is a compact neighborhood $K \subseteq X$ of $a$
such that any two points $x,y$ in $K$ can be joined by a rectifiable path $c$ in $K$ with

\[
\ell(c) \le C |x-y|^{1/m}.
\]

There is only a finite number of $X_j$ with $K \cap X_j \ne \emptyset$.
Let $H$ be the maximum of the $\ga:= \frac{\al \be}{2q(\al)}$-Hölder constants of $f^{(n)}|_{X_j}$; see <Ref>.
Then we find a sequence of points $x_0 :=x,x_1,\ldots,x_k:=y$ on $c$
such that any two consecutive points $x_i,x_{i+1}$ belong to the same $X_j$
and these two are the only points in the sequence that are contained in $X_j$.

\begin{align*}
\|f^{(n)}(x) - f^{(n)}(y)\|_{L^n(\R^d,\R)} &\le \sum_{i=0}^{k-1} \|f^{(n)}(x_i) - f^{(n)}(x_{i+1})\|_{L^n(\R^d,\R)}
\\
&\le H \sum_{i=0}^{k-1} |x_i - x_{i+1}|^{\ga} \le H k\, \ell(c)^{\ga} \le C^\ga H k\, |x-y|^{\frac{\ga}{m}}.
\end{align*}

The reasoning for an arbitrary modulus of continuity is analogous.

Without an additional condition such as ($\star\star$) we cannot expect that the derivatives of any order satisfy a Hölder condition
as is seen by the following example.

Cf. <cit.> and <cit.>.
Let $X$ be the complement in $\R^2$ of the flat cusp $\{(x,y) \in \R^2 : x>0,\, |y| < e^{-1/x^2}\}$.
It was observed in <cit.> that $\cA^\infty(X) = \cC^\infty(X)$.
Indeed, we have $\cA^{2n, \be}(X) \subseteq \cC^{n}(X)$ for all $n \in \N$ and $\be \in (0,1]$, by <Ref>,
since $X$ is the union of the two $1$-sets

\[
X_\pm := \big\{(x,y) \in \R^2 : x>0,\, \pm y \ge e^{-1/x^2} \big\} \cup \big\{(x,y) \in \R^2 : x\le 0\big\},
\]

and $X_+ \cap X_- = \{(x,y) \in \R^2 : x\le 0 \}$ is also a $1$-set.

Consider the function $f : X \to \R$ defined by

\[
f(x,y) :=
\begin{cases}
e^{-1/x} & \text{ if } x>0,\, y \ge e^{-1/x^2},
\\
e^{-2/x} & \text{ if } x>0,\, y \le - e^{-1/x^2},
\\
0 & \text{ if } x\le 0.
\end{cases}
\]

Then $f \in \cA^\infty(X) = \cC^\infty(X)$.

\begin{align*}
\frac{|f(x,e^{-1/x^2}) - f(x,-e^{-1/x^2})|}{|(x,e^{-1/x^2}) - (x,-e^{-1/x^2})|^\ga}
=\frac{e^{-1/x}(1 - e^{-1/x})}{2^\ga e^{-\ga/x^2}} \to \infty \quad \text{ as } x\searrow 0,
\end{align*}

that is,
$f$ is not $\ga$-Hölder near $0 \in X$ for any $\ga \in (0,1]$.
Since $\p_x^{n} f(x,e^{-1/x^2}) = p_1(\frac{1}{x}) e^{-1/x}$ and $\p_x^{n} f(x,-e^{-1/x^2}) = p_2(\frac{1}{x}) e^{-2/x}$ for polynomials $p_1,p_2 \in \R[x]$,
we may likewise conclude that
$\p_x^{n} f$ is not $\ga$-Hölder near $0 \in X$ for any $\ga \in (0,1]$.

§.§ Other building blocks

One might be tempted to consider smooth curves defined on $\R_+ := [0,\infty)$ as basic building blocks.
Given $X \subseteq \R^d$
let $\cC^\infty(\R_+,X)$ be the set of all curves $c : \R_+ \to \R^d$ with $c(\R_+) \subseteq X$ that have
a $\cC^\infty$-extension $\tilde c : \R \to \R^d$ (we do not require $\tilde c(\R) \subseteq X$)
and set

\[
\cA^{k,\be}_+(X) := \big\{f : X \to \R : f_* \cC^\infty(\R_+,X) \subseteq \cC^{k,\be}(\R_+,\R) \big\}.
\]

By definition, $\cA^{k,\be}_+(\R_+) = \cC^{k,\be}(\R_+)$ and thus $\cA^{k,\be}_+(\R_+) \ne \cA^{k,\be}(\R_+)$, by <Ref>.
The notions are however not too far apart:

Let $k \in \N$, $\be \in (0,1]$,
and $X \subseteq \R^d$ arbitrary.

* $\cA^{k,\be}_+(X) \subseteq \cA^{k,\be}(X)$ and $\cA^{2k,\be}(X) \subseteq \cA^{k,\frac{\be}2}_+(X)$.

* $\cA^{\infty}_+(X) := \bigcap_{k \in \N} \cA^{k,\be}_+(X) = \cA^{\infty}(X)$.

* If $X \subseteq \R^d$ is open, then $\cA^{k,\be}_+(X) = \cA^{k,\be}(X)$.

Analogous versions hold if $\be$
is replaced by a general modulus of continuity.

Suppose that $f \in \cA^{k,\be}_+(X)$ and let us show $f \in \cA^{k,\be}(X)$.
For any $\cC^\infty$-curve $c$ in $X$ the curves
$c_+:= c|_{\R_+}$ and $c_{-}(t) := c(-t)$ for $t\ge 0$ belong $\cC^\infty(\R_+,X)$. Then

\[
(f\o c)(t) =
\begin{cases}
(f \o c_+)(t) & \text{ if } t \ge 0,
\\
(f \o c_-)(-t) & \text{ if } t \le 0,
\end{cases}
\]

is of class $\cC^{k,\be}$ off $0$.
To see that $f\o c$ is of class $\cC^{k,\be}$ at $0$ observe that
$c_1(t) := c(t-1)$ for $t \ge 0$ belongs to $\cC^\infty(\R_+,X)$ and

\[
(f\o c)(t) = (f\o c_1)(t+1) \quad \text{ for } t \ge -1.
\]

To prove the second inequality in (1) we take an arbitrary $f \in \cA^{2k,\be}(X)$ and $c \in \cC^\infty(\R_+,X)$ and show that $f \o c \in \cC^{k,\frac{\be}2}(\R_+,\R)$.
For any $\cC^\infty$-curve $\ga : \R \to \R_+$ the composite

\[
(f \o c) \o \ga = f \o (c \o \ga)
\]

is of class $\cC^{2k,\be}$, i.e., $f \o c \in \cA^{2k,\be}(\R_+)$.
Thus $f\o c \in \cC^{k,\frac{\be}2}(\R_+)$,
by <Ref>.

(2) is a direct consequence of (1).

(3) In view of (1), it suffices to show $\cA^{k,\be}(X) \subseteq \cA^{k,\be}_+(X)$.
If $X$ is open, then $\cA^{k,\be}(X) = \cC^{k,\be}(X)$ so that the desired inclusion
follows from the fact that the composite of a $\cC^{k,\be}$-function with a $\cC^\infty$-curve
is a $\cC^{k,\be}$-function.

§ ARC-DIFFERENTIABLE FUNCTIONS ON DEFINABLE SETS

In this section, we will study arc-differentiable functions on sets that are definable in
polynomially bounded o-minimal expansions of the real field.
We shall prove <Ref> and <Ref>.

§.§ Polynomially bounded o-minimal expansions of the real field

We recall the definition of an o-minimal structure over the real field and some background;
cf. [32] and [31].

A structure $\sS = (\sS_d)_{d\ge 1}$ over the real field $(\R,+,\cdot)$ is a sequence, where
each $\sS_d$ is a collection of subsets of $\R^d$, such that for all $d,d'\ge 1$:

* $\sS_d$ is a boolean algebra with respect to the usual set-theoretic operations.

* $\sS_d$ contains all semialgebraic subsets of $\R^d$.

* If $X \in \sS_{d}$ and $X' \in \sS_{d'}$, then $X \times X' \in \sS_{d+d'}$.

* If $d \ge d'$ and $X \in \sS_{d}$, then $\pi(X) \in \sS_{d'}$, where $\pi : \R^{d}\to \R^{d'}$
is the projection on the first $d'$ coordinates.

A subset $X \subseteq \R^d$ is said to be definable in the structure $\sS$ if $X \in \sS_d$.
A map $f : X \to \R^{d'}$ is called definable in $\sS$ if its graph is definable.
A structure $\sS$ is called o-minimal if

* the boundary of every set in $\sS_1$ is finite.

A structure $\sS$ is called polynomially bounded if for every function $f : \R \to \R$ that is definable in $\sS$
there exists $N \in \N$ such that $f(t) = O(t^N)$ as $t \to \infty$.
An o-minimal structure $\sS$ either is polynomially bounded or the exponential function $\exp : \R \to \R$ is definable in $\sS$
(see [20]).

Here are a few examples of o-minimal structures relevant for this paper:

* The collection of all semialgebraic sets in $\R^d$ for $d \ge 1$ is a polynomially bounded o-minimal structure.

* The family of globally subanalytic sets in $\R^d$ for $d \ge 1$ is a polynomially bounded o-minimal structure.
It is the smallest structure over $(\R,+,\cdot)$ containing all restricted analytic functions
$f : \R^d \to \R$, i.e., $f|_{[-1,1]^d}$ is analytic and $f=0$ off $[-1,1]^d$.
It is denoted by $\R_{\text{an}} := (\R,+,\cdot,(f)_{f \text{ restricted analytic}})$.

* The expansion $\R^\R_{\text{an}} := (\R_{\text{an}},(x^r)_{r \in \R})$ of $\R_{\text{an}}$
by all real powers $x^r : \R \to \R$, $t \mapsto t^r$ if $t >0$ and $t\mapsto 0$ if $t\le 0$,
is a polynomially bounded o-minimal structure.

* The expansion $\R_{\text{an},\exp} := (\R_{\text{an}},\exp)$ of $\R_{\text{an}}$ by
the unrestricted exponential function $\exp : \R \to \R$ is an o-minimal structure which is not polynomially bounded.

In this paper, we will be concerned only with polynomially bounded o-minimal structures.
In fact, if the exponential function is definable, then infinitely flat cusps are definable and on such arc-differentiable functions need not
be of class $C^1$; see <cit.>.

From now on we suppose that $\sS$ is an arbitrary polynomially bounded o-minimal structure over the real field.
If we say that a set or a map is definable, we mean definable in $\sS$ (unless stated otherwise).

§.§ Łojasiewicz inequality

Cf. <cit.>.
Let $f,g : X \to \R$ be continuous definable functions on a compact definable set $X$ such that $f^{-1}(0) \subseteq g^{-1}(0)$.
Then there exist constants $N,C>0$ such that

\begin{equation} \label{eq:Lojasiewicz}
|g(x)|^N \le C |f(x)|, \quad  x \in X.
\end{equation}

§.§ Whitney regularity

Cf. <cit.>.
Let $X \subseteq \R^d$ be a compact connected definable set.
There exist $r,C>0$ and a definable map $\ga : X^2 \times [0,1] \to X$ such that, for all $x,y \in X$,
$[0,1] \ni t \mapsto \ga(x,y,t) \in X$ is a rectifiable path from $x$ to $y$ of length $\le C |x-y|^r$.

§.§ Quasiconvex decomposition

Any definable set $X \subseteq \R^d$ can be decomposed into a finite disjoint union $X = \bigcup_j X_j$ of
$M$-quasiconvex sets $X_j$,
where $M$ depends only on the dimension $d$; see <cit.>.
Here a set $Y \subseteq \R^d$ is called $M$-quasiconvex if any two points $y_1,y_2 \in Y$ can be joined
in $Y$ by a piecewise smooth path of length at most $M |y_1 - y_2|$. (Note that for this result the underlying o-minimal structure
need not necessarily be polynomially bounded.)

Let $X \subseteq  \R^d$ be a fat closed definable set. Let $x \in \p X$ and suppose there is a
basis of neighborhoods $\sU$ of $x$ such that $U \cap X^\o$ is connected for all $U \in \sU$.
For all $U \in \sU$ and
any two points $y,z \in U \cap X^\o$, there exists a
rectifiable path $\ga$ in $X^\o$ from $y$ to $z$ of length

\[
\ell(\ga) \le C  \on{diam}(U).
\]

We only sketch the argument;
details can be found in the proof of <cit.>.
There is a finite disjoint decomposition of $X^\o$ into
$M$-quasiconvex sets $A_j$. Fix $U \in \sU$ and $y,z \in U \cap X^\o$.
There is a path $\si : [0,1] \to U \cap X^\o$ with $\si(0)=y$ and $\si(1)=z$.
We find a finite partition $0 = t_0 < t_1 < \cdots < t_{h-1} < t_h = 1$ of $[0,1]$
such that the points $z_i := \si(t_i)$ have the following properties:
If $\ep>0$ is such that the balls $B_i = B(z_i,\ep)$ are contained in $U \cap X^\o$,
then for each $0 \le i \le h-1$ there is a piece $A_{j_i}$ which intersects
$B_i$ and $B_{i+1}$, and all pieces in the list $A_{j_0},A_{j_1},\ldots$
are different.
Using that the sets $A_j$ are $M$-quasiconvex, it is now easy to find a
rectifiable path $\ga$ in $X^\o$ from $y$ to $z$ of length at most
$C \on{diam}(U)$, where $C$ depends only on $M$ and the number of pieces $A_j$.

§.§ Uniformly polynomially cuspidal sets

Recall the definition of a closed UPC set $X \subseteq \R^d$ from the introduction:
there exist positive constants $M,m$ and a positive integer $N$ such that
for each $x \in X$ there is a polynomial curve $h_x : \R \to \R^d$ of degree at most $N$

* $h_x((0,1]) \subseteq X^\o$ and $h_x(0)=x$,

* $\on{dist}(h_x(t),\R^d \setminus X) \ge M t^m$ for all $x \in X$ and $t \in [0,1]$.

Note that a UPC set is necessarily fat. All Hölder sets $X \in \sH(\R^d)$ are UPC, which is an easy consequence of the definition.
O-minimal structures that are not polynomially bounded contain sets (e.g. infinitely flat cusps) that are not UPC.
Also polynomially bounded o-minimal structures may contain fat sets that are not UPC.
For instance, $X=\{(x,y) \in \R^2 : 0\le x^{\sqrt 2} \le y \le x^{\sqrt 2} + x^2\}$ is definable in $\R_{\text{an}}^\R$,
but every $\cC^\infty$-curve in $X$ through the origin must vanish to infinite order (see <Ref>).
It was shown in [24] that a compact subset $X$ of $\R^2$ definable in some polynomially
bounded o-minimal structure is UPC if and only if it is fat and
for each $x \in X$, each $r>0$, and each connected component $S$ of $X^\o \cap B(x,r)$ with $x \in \ol S$
there is a polynomial curve $c : (0,1) \to S$ such that $c(t) \to x$ as $t \to 0$.

On the other hand there are lots of examples of UPC sets in $\R^d$:

* Fat compact subanalytic sets; cf. <cit.>.

* Fat compact sets definable in $\R_\cQ$, the o-minimal expansion of the real field by restricted functions in a suitable
quasianalytic class $\cQ$; cf. [24].

* Fat compact sets definable in a certain substructure of the structure generated by generalized power series; cf.  [25].

§.§ Smooth rectilinearization

Let $X \subseteq \R^d$ be a fat compact definable set.
We say that $X$ admits smooth rectilinearization if
there is a finite number of  definable $\cC^\infty$-maps $\ps_j : \R^d \to \R^d$
such that

\[
\ps_j((-1,1)^d) \subseteq X^\o, \quad \text{ for each } j, \quad \text { and } \quad
\bigcup_j \ps_j([-1,1]^d) = X.
\]

For instance, if $X$ is subanalytic or definable in $\R_{\cQ}$, where $\cQ$ is a suitable quasianalytic class, then it admits smooth rectilinearization;
cf. [12], [22],  [2, 3], and [29].

Let $X \subseteq \R^d$ be a fat compact definable set admitting smooth rectilinearization.
There is a finite number of definable $\cC^\infty$-maps $\vh_j : \R^d \times \R \to \R^d$ such that

\begin{gather*}
\vh_j(I^d \times (0,1]) \subseteq X^\o, \quad \text{ for each }j,  \quad \text { and } \quad
\bigcup_j \vh_j(I^d \times \{0\}) = X,
\end{gather*}

where $I^d := [-1,1]^d$.

Compose $\ps_j$ with $(x_1,\ldots,x_d,t) \mapsto (x_1(1-t),\ldots,x_d(1-t))$.

The following arguments are taken from the proof of <cit.> and adapted to the definable setting.
For each $j$, the function

\[
I^d \times [0,1] \ni (y,t) \mapsto \on{dist}(\vh_j(y,t), \R^d \setminus X)
\]

is definable.
By the Łojasiewicz inequality (<ref>),
there exist $L>0$ and $m \in \N_{\ge 1}$ such that

\begin{equation} \label{eq:Lojasiewicz2}
\on{dist}(\vh_j(y,t), \R^d \setminus X) \ge L t^{m}, \quad  (y,t) \in I^d\times [0,1].
\end{equation}

The constants $L$, $m$ may be assumed to be independent of $j$ by taking the minimum and maximum, respectively.

\[
\vh_j(y,t)  = T_j(y,t) + t^{m+1} Q_j(y,t), \quad (y,t) \in \R^d \times \R,
\]

where $T_j(y,\cdot)$ is the Taylor polynomial at $0$ of degree $m$ of $\vh_j(y,\cdot)$.
If we choose $\de \in (0,1]$ such that
$|tQ_j(y,t)| \le L/2$ for all $j$, $y \in I^d$, and $t \in [0,\de]$, then

\[
\on{dist}(T_j(y,t), \R^d \setminus X) \ge L t^m - \frac{L}{2} t^m = \frac{L}{2} t^m, \quad (y,t) \in I^d \times [0,\de].
\]

Replacing $t$ by $\de t$, we obtain

\[
\on{dist}(T_j(y,\de t), \R^d \setminus X) \ge  M t^m, \quad (y,t) \in I^d \times [0,1],
\]

where $M:= \frac{1}{2}L \de^m$. Clearly, $\bigcup_j T_j(I^d \times \{0\}) = \bigcup_j \vh_j(I^d \times \{0\}) = X$.
From this it is easy to conclude

Any fat compact definable set $X \subseteq \R^d$  admitting smooth rectilinearization
is UPC.

We recall that the reciprocal $\al = \frac{1}{m}$ of the integer $m$ that appears in (<ref>)
is called a UPC-index of $X$.

The following lemma will be an important tool in the proof of <Ref>.

Let $X \subseteq \R^d$ be a fat compact definable set admitting smooth rectilinearization and
$\al$ a UPC-index of $X$.
Let $n \in \N_{\ge 1}$ and $\om$ a modulus of continuity.
For each $f \in \cA^{np(\al),\om}(X)$
the Fréchet derivatives $f^{(k)}$, $k \le n$, are bounded on $X^\o$.

Note that the derivatives of $f \in \cA^{np(\al),\om}(X)$ exist up to order $np(\al)$ (by [4, 8]), but
$f^{(n+1)}$ need not be globally bounded on $X^\o$ as seen in <Ref>.

Let $k \le n$ be fixed.
For contradiction, suppose that there is a sequence $(x_\ell)$ in $X^\o$ such that
$\{f^{(k)}(x_\ell): \ell \in \N\}$ is unbounded.
Let $\vh_j$ be the maps from <Ref>.
After passing to a subsequence, we may assume that $x_\ell \in \vh_{j_0}(I^d \times \{0\})$ for all $\ell$
and some $j_0$.
Choose $y_\ell \in I^d$ such that $\vh_{j_0}(y_\ell,0) = x_\ell$. Since $I^d$ is compact,
after repeatedly passing to subsequences we may assume that $y_\ell$ converges to $y \in I^d$
and that $y_\ell - y$ tends fast to $0$.
The infinite polygon through the points $y_\ell$ and $y$ can be parameterized by a $\cC^\infty$-curve $c : \R \to I^d$
such that $c(\frac{1}\ell) = y_\ell$ and $c(0) = y$ (cf. <cit.>).
Then $s \mapsto \vh_{j_0}(c(s),0)$ is a $\cC^\infty$-curve in $X$ through the points $x_\ell$ and $x = \vh_{j_0}(y,0)$.

Let $v \in \mathbb S^{d-1}$ be arbitrary.
By <Ref>,

\begin{equation*}
(s,t_1,t_2) \to f\big(\vh_{j_0}(c(s),t_1) + t_2 v\big)
\end{equation*}

is of class $\cC^n$ for small $s \in \R$, $t_1 \ge 0$, and $|t_2| \le \frac{L}2 t_1^m$.
Indeed, such $(s,t_1,t_2)$ range over an $\al$-set (where $\al = \frac{1}{m}$) and the point $\vh_{j_0}(c(s),t_1) + t_2$ lies in $X$, since,
by (<ref>),

\begin{align*}
\on{dist}(\vh_{j_0}(c(s),t_1) + t_2 v, \R^d \setminus X) &\ge \on{dist}(\vh_{j_0}(c(s),t_1), \R^d \setminus X) - |t_2|
\\
&\ge L t_1^m - \frac{L}2 t_1^m = \frac{L}2 t_1^m.
\end{align*}

But this implies that the directional derivative $d_v^k f(x_\ell)$ is bounded in $\ell$.
Since $v$ was arbitrary, $f^{(k)}(x_\ell)$
is bounded (e.g. in view of the polarization formula <cit.>),
a contradiction.

As a by-product we obtain

Let $X \subseteq \R^d$ be a fat compact definable set admitting smooth rectilinearization.
The $c^\infty$-topology of $X$ coincides with the trace topology of $\R^d$.

Let $A$ be a $c^\infty$-closed subset of $X$ and let $\ol A$ be the closure of $A$ in $\R^d$.
We have to show that $\ol A \subseteq A$. Let $x \in \ol A$ and $x_\ell$ a sequence in $A$ with $x_\ell \to x$.
If we find a $\cC^\infty$-curve in $X$ through a subsequence of $x_\ell$ and through $x$, we have $x \in A$ and are done.
Since $X$ admits smooth rectilinearization, there exists a $\cC^\infty$-map $\ps : \R^d \to \R^d$
and an infinite subsequence of $x_\ell$, again denoted by $x_\ell$, which is contained in
Choose $y_{\ell} \in [-1,1]^d$ such that $\ps(y_{\ell}) = x_{\ell}$.
As in the proof of <Ref> we may pass to a fast converging subsequence $y_\ell \to y \in [-1,1]^d$
and find a $\cC^\infty$-curve $c$ in $[-1,1]^d$ which passes through this subsequence and $y$.
Then $\ps \o c$ is a $\cC^\infty$-curve in $X$ through the corresponding $x_\ell = \ps(y_{\ell})$ and $x= \ps(y)$.

§.§ Proof of <Ref>

Let $X \subseteq \R^d$ be a simple fat compact definable set
admitting smooth rectilinearization
and let $\al$ be a UPC-index for $X$.
Let $n$ be a positive integer and $\om$ a modulus of continuity.
Let $f \in \cA^{np(\al),\om}(X)$.
Then the Fréchet derivatives $f^{(k)}$ exist and are continuous on $X^\o$ for all $k \le np(\al)$, by [4, 8],
and they are globally bounded on $X^\o$ for all $k \le n$, by <Ref>.
It remains to show that
for all $k \le n-1$ they extend continuously to $\p X$.

Fix $x \in \p X$.
By <Ref>, there exist $m,N \in \N_{\ge 1}$ with $\al = \frac{1}{m}$, $M >0$, and a polynomial curve $h_x : \R \to \R^d$
of degree at most $N$ such that

* $h_x((0,1]) \subseteq X^\o$ and $h_x(0)=x$,

* $\on{dist}(h_x(t),\R^d \setminus X) \ge Mt^m$ for all $t \in (0,1]$.

Then $h_x(t) - x$ vanishes to finite order.
So there is a positive integer $j=j(x)$ such that $h_x(t) - x = t^j \tilde h_x(t)$, where $\tilde h_x(0) \ne 0$.
Set $v_1 := \frac{\tilde h_x(0)}{|\tilde h_x(0)|} \in \mathbb S^{d-1}$.
Choose $d-1$ directions $v_2,\ldots, v_d \in \mathbb S^{d-1}$ such that $v_1,v_2,\ldots, v_d$ are linearly independent and
consider the map $\Ps_{x,v} : \R^d \to \R^d$ defined by

\begin{equation} \label{eq:Ps}
\Ps_{x,v}(t_1,t_2,\ldots,t_d) := h_x(t_1) + t_2 v_2 + \cdots + t_d v_d.
\end{equation}

The restriction of $\Ps_{x,v}$ to

\begin{equation} \label{eq:Y}
Y :=\big\{(t_1,\ldots,t_d) \in \R^d : t_1 \in (0,\de),\, |t_j| < \tfrac{M}{2(d-1)} t_1^m \text{ for } 2\le j \le d\big\},
\end{equation}

for small $\de>0$,
is a diffeomorphism onto the open subset $H_{x,v} := \Ps_{x,v}(Y)$
of $X^\o$ and it extends to a homeomorphism between $Y\cup\{0\}$ and $H_{x,v} \cup \{x\}$.

\begin{align*}
\on{dist}(\Ps_{x,v}(t),\R^d \setminus X) &\ge \on{dist}(h_x(t_1),\R^d \setminus X) - |t_2| - \cdots - |t_d|
\\
& > M t_1^m - \frac{M}{2} t_1^m = \frac{M}{2} t_1^m >0,
\end{align*}

for $t \in Y$.
This also shows that $\Ps_{x,v}(\ol Y)\subseteq X$.
Since $f$ is of class $\cC^{n}$ in $X^\o$, we have

\begin{equation} \label{eq:defcontder}
\p_{t_2}^{j_2} \cdots \p_{t_d}^{j_d} (f \o \Ps_{x,v})(t) =  d_{v_2}^{j_2} \cdots d_{v_d}^{j_d} f(\Ps_{x,v}(t)),
\end{equation}

for all $t \in Y$ and $0 \le j_2 + \cdots + j_d \le n$; actually even up to order $n p(\al)$ but we will not need this.
The function $f \o \Ps_{x,v}|_{\ol Y}$ belongs to $\cA^{np(\al),\om}(\ol Y)$ and hence to $\cC^{n}(\ol Y)$,
by <Ref>, as $\ol Y$ is an $\al$-set.
It follows that
the left-hand side of (<ref>) extends continuously to $t=0$
for all $0 \le j_2 + \cdots + j_d \le n$.
So the directional derivatives
$d_{v_2}^{j_2} \cdots d_{v_d}^{j_d} f$, $0 \le j_2 + \cdots + j_d \le n$, extend continuously from $H_{x,v}$ to $x$.

If we perturb the directions $v_2,\ldots, v_d$ a little such that $v_1,v_2,\ldots,v_d$ remain
linearly independent and take the intersection $H_x$ of the corresponding sets $H_{x,v}$,
then $H_x$ still is an open subset of $X^\o$ with $h_x(t) \in H_x$ for small $t>0$ and $x \in \ol H_x$.
So the directional derivatives $d_{w_2}^{j_2} \cdots d_{w_d}^{j_d} f$, $0 \le j_2 + \cdots + j_d \le n$, extend continuously from $H_{x}$ to $x$
for all $w_2,\ldots,w_d$ near $v_2,\ldots, v_d$.
Thus the Fréchet derivatives $f^{(k)}$, for $k \le n$, extend continuously from
$H_x$ to $x$ (in view of the polarization formula <cit.>).

For each $x \in \p X$
we define

\[
f^{(k)}(x) := \lim_{H_x \ni y \to x} f^{(k)}(y), \quad p \le n.
\]

It remains to prove that the so defined extension of $f^{(k)}$ to $\p X$ is continuous at $\p X$ if $k \le n-1$.
To this end fix $x \in \p X$ and let
$(x_j)$ and $(y_j)$ be two sequences in
$X^\o$ converging to $x$.
By <Ref>, for each $\ep>0$ there exists $j_0 \in \N$ such that for all $j \ge j_0$
the points $x_j$ and $y_j$ can be joined by a rectifiable path $\ga_j$ in $X^\o$ of length $\ell(\ga_j) \le \ep$.

\[
\|f^{(k)}(x_j) - f^{(k)}(y_j)\|_{L^k(\R^d,\R)} \le \Big(\sup_{z \in \ga_j} \|f^{(k+1)}(z)\|_{L^{k+1}(\R^d,\R)}\Big) \, \ell(\ga_j)
\]

tends to $0$ as $j \to \infty$ if $k \le n-1$, since $f^{(k+1)}$ is globally bounded on $X^\o$, by <Ref>.
If we assume that the sequence $(x_j)$ lies in $H_x$,
we obtain

\[
= \lim_{X^\o \ni y \to x} f^{(k)}(y), \quad k \le n-1.
\]

Finally, suppose that $\p X \ni x_j \to x$.
Choose $y_j \in H_{x_j} \cap B(x_j,j^{-1})$.

\begin{multline*}
\|f^{(k)}(x) - f^{(k)}(x_j)\|_{L^k(\R^d,\R)}
\\
\le \|f^{(k)}(x) - f^{(k)}(y_j)\|_{L^k(\R^d,\R)} +
\|f^{(k)}(x_j) - f^{(k)}(y_j)\|_{L^k(\R^d,\R)}
\end{multline*}

tends to $0$ as $j \to \infty$.
Thus $f^{(k)}$ extends continuously to $x$.

Now suppose that $Z$ is any non-empty subset of $X$ and $f \in \cA^{np(\al),\om}_Z(X)$. Fix $x \in Z$.
We want to show that $f^{(k)}(x) = 0$ for all $k \le n-1$; actually, it is true even for $k = n$.
The assertion is easy to see if $x \in X^\o$. So let us assume that $x \in \p X$ and let $\Ps_{x,v}$ be the map from (<ref>) and $Y$ the set from (<ref>).
Then $f \o \Ps_{x,v}|_{\ol Y}$ belongs to $\cA^{np(\al),\om}_{\{0\}}(\ol Y)$ and thus to $\cC^n_{\{0\}}(\ol Y)$, by <Ref>.
In view of (<ref>) and the perturbation argument shortly after (<ref>),
we may conclude that
$f^{(k)}(x) =0$ for $k \le n$.
<Ref> is proved.

§.§ Proof of <Ref>

This follows in analogy to the proof of <Ref> (see <Ref>) from <Ref>,
where we use Whitney regularity <ref> instead of <Ref>.

§.§ Weak flatness on UPC sets

Let $X\subseteq \R^d$ be a fat closed set and $x \in X$. Let $r\ge 0$.
A function $f: X \to \R$ is called weakly $r$-flat at $x$ in $X$ if

\[
\frac{|f(y)|}{|y-x|^r} \to 0 \quad \text{ as } X \ni y \to x.
\]

It is called weakly $\infty$-flat at $x$ in $X$ if it is
weakly $n$-flat at $x$ for each $n \in \N$.

Let $X \subseteq \R^d$ be a closed UPC set (not necessarily simple or definable) and let $\al$ be a
UPC-index of $X$.  Let $x \in X$. Let $n \in \N$ and $\om$ a modulus of continuity.
Assume that $f \in \cA^{n p(\al),\om}(X) \cap \cC^{n}(X)$ is weakly $\frac{np(\al)}{2}$-flat at $x$ in $X$.
Then $f$ is $n$-flat at $x$.

Since $X$ is UPC  and $\al$ is a UPC-index of $X$, we find as in the proof of <Ref>
an $\al$-set $\ol Y$ and a map $\Ps_{x,v} : \R^d \to \R^d$ such that
$\Ps_{x,v}(\ol Y) \subseteq X$, $\Ps_{x,v}(0) = x$, and
$g:= f \o \Ps_{x,v}|_{\ol Y}$ belongs to $\cA^{n p(\al),\om}(\ol Y)$.
In view of <Ref>, (<ref>),  and the perturbation argument shortly after (<ref>),
it suffices to show that $g$ actually belongs to $\cA^{n p(\al),\om}_{\{0\}}(\ol Y)$.
So we fix $c \in \cC^\infty(\R,\ol Y)$ with $c(0)=0$ and check that $(g \o c)^{(j)}(0)=0$ for all $j \le np(\al)$.
The shape of $\ol Y$ imposes that $c$ vanishes to order at least $2$ at $0$, i.e., $c(t) = t^2 \tilde c(t)$.
Since $f$ is weakly $r:=\frac{np(\al)}{2}$-flat at $x$ in $X$,
also $g$ is weakly $r$-flat at $0$ in $\ol Y$:

\[
\frac{|g(y)|}{|y|^r} = \frac{|f(\Ps_{x,v}(y))|}{|\Ps_{x,v}(y) -x|^r} \frac{|\Ps_{x,v}(y) -x|^r}{|y|^r}\to 0 \quad \text{ as } \ol Y \ni y \to 0,
\]

since $\Ps_{x,v}$ is locally Lipschitz. Consequently,

\[
\frac{|g(c(t))|}{|c(t)|^{r}} = \frac{|g(c(t))|}{|t|^{2r}|\tilde c(t)|^{r}}  \to 0 \quad \text{ as } t \to 0,
\]

and we see that $g \o c$ is weakly $np(\al)$-flat at $0$ in $\R$.
It follows that $(g \o c)^{(j)}(0)=0$ for all $j \le np(\al)$ and we are done.

A similar result has been obtained in <cit.>:
A $\cC^n$-function $f$ defined on a neighborhood of $x$ in $\R^d$ is $n$-flat at $x$,
if $f$ is weakly $n p$-flat at $x$ in $X$ and $X\subseteq \R^d$ contains a sequence of balls $B(x_k,r_k)$
such that $|x_k - x|^p/r_k \to 0$.
See also [13].
In the language of [13], the corollary implies that the $\cC^\infty$-Spallek function $S^\infty_{X,x}$
of a closed UPC set $X$ with UPC-index $\al$ and $x \in X$ satisfies $S^\infty_{X,x}(n) \le n p(\al)$.

§.§ Open problem

Our proof of <Ref> uses that the set $X$ admits smooth rectilinearization and (as a consequence)
is UPC. We do now know if these assumptions can be relaxed.
There are polynomially bounded o-minimal expansions of the real field in which sets that lack these
properties are definable. For instance, the set $X$ in <Ref> below is definable in the structure
$\R_{\text{an}}^\R$, but it is not UPC (cf. <Ref>).
Any $\cC^\infty$-curve $c$ in $X$ through the boundary point $0$ has to vanish to infinite order on $c^{-1}(0)$.
It could be an indication that $\cC^\infty$-curves may no be enough to detect derivatives at some boundary points
even though the set has finite cuspidality.
Be that as it may,
the $\cC^\infty$-curves certainly do not discriminate points of flatness:
The function $f(x,y) = x$ belongs to $\cA^\infty_{\{0\}}(X)$ but $\p_x f(0) =1$.
Furthermore, the smooth function $g(x,y) =e^{-1/x^2}$ if $x \ne 0$ and $g(0,y)=0$
is not analytic near the origin,
but, trivially, $g \o c$ is analytic for all analytic curves $c$ in $X$; so the Bochnak–Siciak theorem fails on $X$,
while it holds on fat closed subanalytic sets and Hölder sets; cf.<cit.>.

Let $\si>1$ be an irrational number and $p> \si$ an integer.

\[
X := \{(x,y) \in \R^2 : 0 \le x \le 1, \, x^\si \le y \le x^{\si} + x^p\}.
\]

Each $\cC^\infty$-curve $c : \R \to X$ must be infinitely flat on $c^{-1}(0)$.
Suppose for contradiction that
$c(0) = 0$ and
$c(t) = (x(t),y(t))$ vanishes only to finite order at $t=0$.
There exist positive integers $k,\ell$ such that
$x(t) = t^k \tilde x(t)$ and $y(t) = t^\ell \tilde y(t)$, where $\tilde x, \tilde y$ are smooth.

\[
0 \le t^{\si k} \tilde x(t)^\si \le t^\ell \tilde y(t) \le t^{\si k} \tilde x(t)^\si + t^{p k} \tilde x(t)^p.
\]

Several cases must be discussed:

* $\tilde x(0) \ne 0$ and $\si k -\ell <0$ is impossible, since it would mean that $\tilde y(t)$ is unbounded at $0$.

* $\tilde x(0) \ne 0$ and $\si k -\ell >0$ implies that $\tilde y(0)=0$. So we may replace $\ell$ by $\ell +1$ and repeat the reasoning.
We either end up in case (1) or $y(t)$ vanishes to infinite order at $t=0$. But the latter contradicts $\tilde x(0) \ne 0$. So case (2) is impossible.

* $\tilde y(0) \ne 0$ and $\si k -\ell >0$ is impossible.

* $\tilde y(0) \ne 0$ and $\si k -\ell <0$ implies that $\tilde x(0)=0$. As in case (2), we may replace $k$ by $k+1$ and repeat the argument.
This leads to case (3) or $x(t)$ vanishes to infinite order. But then also $y(t)$ vanishes to infinite order at $t=0$, a contradiction.

It seems to be unknown if $X$ satisfies the Markov inequality (<ref>) (cf. <cit.>), but
it has the Whitney extension property WEP (e.g., by <cit.>) and hence admits a weaker
inequality of Markov type, by <cit.>:
for all $\th \in (0,1)$ there exist $C,r\ge 1$ such that

\begin{equation} \label{eq:wMI}
\sup_{x \in X} |\nabla p(x)| \le C (\deg p)^r  \sup_{x \in X} |p(x)|^\th  \sup_{x \in K} |p(x)|^{1-\th}
\end{equation}

for all polynomials $p$,
where $K \subseteq \R^2$ is any compact set with $X \subseteq K^\o$.

[1]
E. Bierstone, Differentiable functions, Bol. Soc. Brasil. Mat.
11 (1980), no. 2, 139–189.

[2]
E. Bierstone and P. D. Milman, Canonical desingularization in
characteristic zero by blowing up the maximum strata of a local invariant,
Invent. Math. 128 (1997), no. 2, 207–302.

[3]
, Resolution of singularities in Denjoy-Carleman classes,
Selecta Math. (N.S.) 10 (2004), no. 1, 1–28.

[4]
J. Boman, Differentiability of a function and of its compositions with
functions of one variable, Math. Scand. 20 (1967), 249–268.

[5]
L. P. Bos and P. D. Milman, Sobolev-Gagliardo-Nirenberg and Markov
type inequalities on subanalytic domains, Geom. Funct. Anal. 5
(1995), no. 6, 853–923 (English).

[6]
R. de la Llave and R. Obaya, Regularity of the composition operator in
spaces of Hölder functions, Discrete Contin. Dynam. Systems 5
(1999), no. 1, 157–184.

[7]
M. C. Delfour and J.-P. Zolésio, Shapes and geometries. Metrics,
analysis, differential calculus, and optimization. 2nd ed., 2nd ed. ed.,
Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM), 2011

[8]
C.-A. Faure, Sur un théorème de Boman, C. R. Acad. Sci. Paris
Sér. I Math. 309 (1989), no. 20, 1003–1006.

[9]
L. Frerick, Extension operators for spaces of infinite differentiable
Whitney jets, Journal für die reine und angewandte Mathematik (Crelles
Journal) 2007 (2007), no. 602.

[10]
G. Glaeser, Racine carrée d'une fonction différentiable, Ann. Inst.
Fourier (Grenoble) 13 (1963), no. 2, 203–210.

[11]
P. Grisvard, Elliptic problems in nonsmooth domains, Monographs and
Studies in Mathematics, vol. 24, Pitman (Advanced Publishing Program),
Boston, MA, 1985.

[12]
H. Hironaka, Introduction to real-analytic sets and real-analytic maps,
Quaderni dei Gruppi di Ricerca Matematica del Consiglio Nazionale delle
Ricerche. Istituto Matematico "L. Tonelli” dell'Università di Pisa,
Pisa, 1973.

[13]
S. Izumi, Flatness of differentiable functions along a subset of a real
analytic set, Journal d'Analyse Mathématique
86 (2002), no. 1, 235–246.

[15]
H. Joris and E. Preissmann, Quotients of smooth functions, Kodai Math.
J. 13 (1990), no. 2, 241–264.

[16]
A. Kriegl, Remarks on germs in infinite dimensions, Acta Math. Univ.
Comenian. (N.S.) 66 (1997), no. 1, 117–134.

[17]
A. Kriegl and P. W. Michor, The convenient setting of global analysis,
Mathematical Surveys and Monographs, vol. 53, American Mathematical Society,
Providence, RI, 1997, http://www.ams.org/online_bks/surv53/.

[18]
K. Kurdyka and A. Parusiński, Quasi-convex decomposition in o-minimal
structures. Application to the gradient conjecture, Singularity theory and
its applications, Adv. Stud. Pure Math., vol. 43, Math. Soc. Japan, Tokyo,
2006, pp. 137–177.

[19]
P. W. Michor, Manifolds of mappings for continuum mechanics,
Geometric continuum mechanics, Cham: Birkhäuser, 2020, pp. 3–75 (English).

[20]
C. Miller, Exponentiation is hard to avoid, Proc. Amer. Math. Soc.
122 (1994), no. 1, 257–259.

[21]
D. N. Nenning and A. Rainer, On groups of Hölder diffeomorphisms and
their regularity, Trans. Amer. Math. Soc. 370 (2018),
no. 8, 5761–5794.

[22]
W. Pawłucki and W. Pleśniak, Markov's inequality and $C^\infty$
functions on sets with polynomial cusps, Math. Ann. 275 (1986),
no. 3, 467–480.

[23]
, Extension of $C^\infty$ functions from sets with polynomial
cusps, Studia Math. 88 (1988), no. 3, 279–287.

[24]
R. Pierzchała, UPC condition in polynomially bounded o-minimal
structures, J. Approx. Theory 132 (2005), no. 1, 25–33.

[25]
, Markov's inequality in the o-minimal structure of convergent
generalized power series, Adv. Geom. 12 (2012), no. 4, 647–664.

[26]
W. Pleśniak, Markov's inequality and the
existence of an extension operator for $C^\infty$ functions, Journal of
Approximation Theory 61 (1990), no. 1, 106–117.

[27]
A. Rainer, Arc-smooth functions on closed sets, Compos. Math.
155 (2019), 645–680.

[28]
D. M. Roberts and A. Schmeding, Extending Whitney's extension theorem:
nonlinear function spaces, Ann. Inst. Fourier (Grenoble) 71 (2021),
no. 3, 1241–1286.

[29]
J.-P. Rolin, P. Speissegger, and A. J. Wilkie, Quasianalytic
Denjoy-Carleman classes and o-minimality, J. Amer. Math. Soc.
16 (2003), no. 4, 751–777 (electronic).

[30]
K. Spallek, l-Platte Funktionen auf semianalytischen Mengen,
Mathematische Annalen 227 (1977), no. 3, 277–286.

[31]
L. van den Dries, Tame topology and o-minimal structures, London
Mathematical Society Lecture Note Series, vol. 248, Cambridge University
Press, Cambridge, 1998.

[32]
L. van den Dries and C. Miller, Geometric categories and o-minimal
structures, Duke Math. J. 84 (1996), no. 2, 497–540.

[33]
H. Whitney, Analytic extensions of differentiable functions defined in
closed sets, Trans. Amer. Math. Soc. 36 (1934), no. 1, 63–89.