1 Introduction

In this note, we are interested in Hartogs-type characterizations of real analytic functions. Let us recall two fundamental results due to Bochnak and Siciak: let \(U \subseteq {\mathbb {R}}^n\) be a nonempty open set and \(f: U \rightarrow {\mathbb {R}}\) any function.

Theorem A

([2, 16]). The function f is real analytic if and only if f is smooth and the restriction of f to each affine line that meets U is real analytic.

Theorem B

([3, 4]). The function f is real analytic if and only if the restriction of f to each affine 2-plane that meets U is real analytic.

In Theorem A, the assumption that f is smooth cannot be omitted. Recently, Bochnak, Kollár, and Kucharz [1] proved a global version of Theorem B: a function \(f: M \rightarrow {\mathbb {R}}\) on a real analytic manifold M of dimension \(n \ge 3\) is real analytic if \(f|_N\) is real analytic for every real analytic submanifold \(N \subseteq M\) that is homeomorphic to the 2-sphere.

We will investigate versions of these results on closed fat subsets X of \({\mathbb {R}}^n\) with cusps (that X is fat means that it is contained in the closure of its interior, i.e., \(X =\overline{X^\circ }\)). Even if X has Lipschitz boundary, we will have to compose f with germs of quadratic polynomial maps instead of just affine maps. It will turn out that the maximal degree of the polynomial maps needed to detect real analyticity is strongly related to the regularity of the boundary (i.e., to the sharpness of the cusps).

A recent result of Kucharz and Kurdyka [9] (see Theorem C below) shows that, for subanalytic functions on real analytic manifolds, real analyticity can be recognized by restriction to real analytic subsets of dimension one. We will discuss a variant on suitable closed fat subsets X of \({\mathbb {R}}^n\).

This note is a natural continuation of our papers [13] and [14]. Before we can state the results, some terminology must be introduced.

1.1 Plot-analytic functions

Let dmn be positive integers. Let \(X \subseteq {\mathbb {R}}^n\) be nonempty. By an (md)-plot in X we mean the germ [p] at 0 of a polynomial map \(p = (p_1,\ldots ,p_n): {\mathbb {R}}^m \rightarrow {\mathbb {R}}^n\)

  • of degree at most d, i.e., \(p_i \in {\mathbb {R}}[x_1,\ldots ,x_m]\) and \(\max _{1 \le i \le n}\deg p_i \le d\),

  • and image contained in X, i.e., there exists a neighborhood U of 0 in \({\mathbb {R}}^m\) such that \(p(U) \subseteq X\).

We will write p instead of [p]; this slight abuse of notation will lead to no confusion.

Let \({\mathcal {P}}_{m,d}(X)\) denote the set of all (md)-plots in X. We will also consider

$$\begin{aligned} {\mathcal {P}}_m(X):= \bigcup _{d =1}^\infty {\mathcal {P}}_{m,d}(X) \end{aligned}$$

and call its elements polynomial m-plots in X.

For any function \(f: X \rightarrow {\mathbb {R}}\) and any \(p \in {\mathcal {P}}_m(X)\), it is meaningful to consider the function germ \(f \circ p\) at 0 in \({\mathbb {R}}^m\). We define \({\mathscr {C}}^\omega _{m,d}(X)\) to be the set of all functions \(f: X \rightarrow {\mathbb {R}}\) such that

$$\begin{aligned} f \circ p \text { is a real analytic germ at } 0 \in {\mathbb {R}}^m \text { for all } p \in {\mathcal {P}}_{m,d}(X). \end{aligned}$$

Furthermore, we set

$$\begin{aligned} {\mathscr {C}}^\omega _{m}(X):= \bigcap _{d=1}^\infty {\mathscr {C}}^\omega _{m,d}(X). \end{aligned}$$

We call the elements of \({\mathscr {C}}^\omega _{m,d}(X)\) (md)-plot-analytic functions. Recall that \(f: X \rightarrow {\mathbb {R}}\) is called arc-analytic if \(f \circ c\) is real analytic for each germ c of a real analytic arc in X. The arc-analytic functions on X form a subset of \({\mathscr {C}}^\omega _1(X)\).

Let \(X \subseteq {\mathbb {R}}^n\) be closed. Let \({\mathcal {C}}^\omega |_X\) (resp. \({\mathcal {C}}^\infty |_X\)) be the set of all functions \(f: X \rightarrow {\mathbb {R}}\) such that there exist an open neighborhood U of X in \({\mathbb {R}}^n\) and a real analytic (resp. smooth) function \(F: U \rightarrow {\mathbb {R}}\) such that \(F|_X=f\). Note that each \(f \in {\mathcal {C}}^\omega |_X\) is the restriction to X of a holomorphic function defined on an open neighborhood of X in \({\mathbb {C}}^n\).

1.2 UPC sets

Let us recall (cf. [12]) that a closed set \(X \subseteq {\mathbb {R}}^n\) is called uniformly polynomially cuspidal (UPC) if there exist positive integers mD and a constant \(M>0\) such that for each \(x \in X\), there is a polynomial curve \(h_x: {\mathbb {R}}\rightarrow {\mathbb {R}}^n\) of degree at most D such that

  1. (1)

    \(h_x(0)=x\),

  2. (2)

    \({\text {dist}}(h_x(t),{\mathbb {R}}^n {\setminus } X) \ge M\, t^m\) for all \(x \in X\) and \(t \in [0,1]\).

In that case, we say that the UPC set X has the characteristic (mD). (The constant M will not be important for us.) Let \({\text {char}}(X)\) be the set of all characteristics of X. Note that if \((m,D) \in {\text {char}}(X)\), then \((m,D) + {\mathbb {N}}^2 \subseteq {\text {char}}(X)\). We define

$$\begin{aligned} d(X):= 2 \min _{(m,D) \in {\text {char}}(X)} \max \{m,D\}. \end{aligned}$$

Any UPC set X is fat. We say that X is simple if each \(x \in \partial X\) has a basis of neighborhoods \({\mathscr {U}}\) such that \(U \cap X^\circ \) is connected for all \(U \in {\mathscr {U}}\). We shall see in Example 3.3 that, regarding our results, to be simple is a natural and indispensable condition.

An important class of UPC sets is the collection of all compact fat subanalytic sets \(X \subseteq {\mathbb {R}}^n\), see Pawłucki and Plesniak [12].

1.3 Hölder and Lipschitz sets

Let \(\alpha \in (0,1]\) and \(r,h >0\). The set

$$\begin{aligned} \Gamma ^\alpha _n(r,h):= \Big \{(x',x_n) \in {\mathbb {R}}^{n-1}\times {\mathbb {R}}: |x'|<r, \, \big (\tfrac{|x'|}{r}\big )^\alpha< \tfrac{x_n}{h} < 1\Big \} \end{aligned}$$

is a truncated open \(\alpha \)-cusp. By an \(\alpha \)-set we mean a closed fat set \(X \subseteq {\mathbb {R}}^n\) such that \(X^\circ \) has the uniform \(\alpha \)-cusp property: for each \(x \in \partial X\), there exist \(\epsilon >0\), a truncated open \(\alpha \)-cusp \(\Gamma = \Gamma ^\alpha _n(r,h)\), and an orthogonal linear map \(A \in O(n)\) such that \(y + A\Gamma \subseteq X^\circ \) for all \(y \in X \cap B(x,\epsilon )\). A bounded open set in \({\mathbb {R}}^n\) has the uniform \(\alpha \)-cusp property if and only if it has \(\alpha \)-Hölder boundary; cf. [14, Remark 2.1]. We say that X is a Hölder set if X is an \(\alpha \)-set for some \(\alpha \in (0,1]\); 1-sets are also called Lipschitz sets. Note that Hölder sets are always simple; see [13, Proposition 3.9].

By definition, any compact \(\alpha \)-set X is a UPC set of characteristic \((\lceil \alpha ^{-1} \rceil ,1)\) so that \(d(X) \le 2 \lceil \alpha ^{-1} \rceil \), where \(\lceil x \rceil \) is the smallest integer \(m \ge x\). If X is not a \(\beta \)-set with \(\lceil \beta ^{-1} \rceil < \lceil \alpha ^{-1} \rceil \), then \(d(X) = 2 \lceil \alpha ^{-1} \rceil \). For instance, we have

$$\begin{aligned} d(\overline{\Gamma }^{1/m}_n(r,h)) = 2m \end{aligned}$$

for the closure \(\overline{\Gamma }^{1/m}_n(r,h)\) of \(\Gamma ^{1/m}_n(r,h)\), where \(m \in {\mathbb {N}}_{\ge 1}\).

1.4 Results

1.4.1 Smooth plot-analytic functions

The first result extends Theorem A to simple closed UPC sets with a precise control of the degree of the required polynomial 1-plots in terms of d(X).

Theorem 1.1

Let \(X \subseteq {\mathbb {R}}^n\) be a simple closed UPC set and let \(d:= d(X)\). Then

$$\begin{aligned} {\mathscr {C}}^\omega _{1,d}(X) \cap {\mathcal {C}}^\infty |_X = {\mathcal {C}}^\omega |_X. \end{aligned}$$

We shall see in Example 3.1 that \(d = d(X)\) is optimal: in general, \({\mathscr {C}}^\omega _{1,d}(X) \cap {\mathcal {C}}^\infty |_X \not \subseteq {\mathcal {C}}^\omega |_X\) if \(d < d(X)\).

If we do not restrict the degree of the polynomial plots, we may infer:

Corollary 1.2

Let \(X \subseteq {\mathbb {R}}^n\) be a simple closed set such that for each \(z \in \partial X\), there exists a closed UPC set \(X_z\) with \(z \in X_z \subseteq X\). Then

$$\begin{aligned} {\mathscr {C}}^\omega _{1}(X) \cap {\mathcal {C}}^\infty |_X = {\mathcal {C}}^\omega |_X. \end{aligned}$$

For instance, the corollary applies to the compact subset \(X = X' \cup \bigcup _{m =1}^\infty X_m\) of \({\mathbb {R}}^2\), where \(X_m:= {\overline{\Gamma }}^{1/m}_2(\frac{1}{m^2},\frac{1}{m}) + (2\sum _{\ell =1}^{m}\frac{1}{\ell ^2}- \frac{1}{m^2}, -\frac{1}{m})\) and \(X' = [0, \tfrac{\pi ^2}{3}] \times [0,1]\). It is simple since the cusps \(X_m\) converge to the point \((\tfrac{\pi ^2}{3},0)\). The spikes \(X_m\) can be replaced by suitable horn-like sets.

1.4.2 Plot-analytic functions that are not presupposed to be smooth

Next we will discuss extensions of Theorem B to closed fat sets. In the following, we will not assume that f is smooth.

By a simplex in \({\mathbb {R}}^n\) we mean the convex hull of any collection of \(n+1\) affinely independent points in \({\mathbb {R}}^n\).

Theorem 1.3

Let \(X \subseteq {\mathbb {R}}^n\), \(n \ge 2\), be a simple closed set such that for each \(z \in \partial X\), there exists a simplex \(X_z\) with \(z \in X_z \subseteq X\). Then

$$\begin{aligned} {\mathscr {C}}^\omega _{2,2}(X) = {\mathcal {C}}^\omega |_X. \end{aligned}$$

This is best possible; see Example 3.2. The assumption is fulfilled for all Lipschitz sets. At this stage, we do not know if there is an analogue of Theorem 1.3 for Hölder sets or simple fat closed subanalytic sets. But in dimension two, we can give a fairly complete answer. Here (for technical reasons) we need to work with

$$\begin{aligned} d'(X):= 2 \min _{(m,D) \in {\text {char}}(X)} m \cdot D. \end{aligned}$$

For all compact Hölder sets X, we have \(d'(X) = d(X)\); in general, \(d'(X)\ge d(X)\).

Theorem 1.4

Let \(X \subseteq {\mathbb {R}}^2\) be a simple compact fat subanalytic or Hölder set and let \(d':= d'(X)\). Then

$$\begin{aligned} {\mathscr {C}}^\omega _{2,d'}(X)= {\mathcal {C}}^\omega |_X. \end{aligned}$$

It is likely that in this statement \(d' = d'(X)\) is not optimal.

Corollary 1.5

Let \(X \subseteq {\mathbb {R}}^2\) be a simple closed set such that for each \(z \in \partial X\), there exists a compact fat subanalytic set \(X_z\) with \(z \in X_z \subseteq X\). Then

$$\begin{aligned} {\mathscr {C}}^\omega _{2}(X)= {\mathcal {C}}^\omega |_X. \end{aligned}$$

Note that for each Hölder set \(X'_z\) with \(z \in X'_z \subseteq X\), we may find a compact fat subanalytic set \(X_z\) with \(z \in X_z \subseteq X'_z\); the converse is not always possible.

1.4.3 Curve-analytic functions

We give an application to curve-analytic functions on closed fat sets which extends a recent result of Kucharz and Kurdyka [9], see Theorem C below.

Let \(X\subseteq {\mathbb {R}}^n\) be nonempty and \(f: X \rightarrow {\mathbb {R}}\) a function. We say that f is curve-analytic if for each real analytic arc \(c: (-\epsilon ,\epsilon ) \rightarrow {\mathbb {R}}^n\) with image contained in X, there exist \(\delta \in (0,\epsilon ]\) and a real analytic function \(F: U \rightarrow {\mathbb {R}}\) defined on an open neighborhood U of c(0) in \({\mathbb {R}}^n\) such that \(c(t) \in U\) and \(F(c(t)) = f(c(t))\) for all \(t \in (-\delta ,\delta )\).

Remark 1.6

If X is a real analytic manifold, then \(f: X \rightarrow {\mathbb {R}}\) is curve-analytic if and only if \(f|_C\) is real analytic for every locally irreducible real analytic set C of dimension 1 in X; see [9, Lemma 2.2]. (That \(f|_C\) is real analytic means that for each \(x \in C\), there is a neighborhood U of x in X and a real analytic function \(F: U \rightarrow {\mathbb {R}}\) such that \(f|_{C\cap U} = F|_{C \cap U}\).)

Theorem C

([9]). A subanalytic function \(f: X \rightarrow {\mathbb {R}}\) on a real analytic manifold X is real analytic if and only if it is curve-analytic.

It is an open question if the assumption that f is subanalytic is necessary.

By definition, if \(f: X \rightarrow {\mathbb {R}}\) is curve-analytic, then f is arc-analytic, in particular, \(f \in {\mathscr {C}}^\omega _1(X)\). Thus, any smooth curve-analytic \(f: X \rightarrow {\mathbb {R}}\) is the restriction of a real analytic function for all X satisfying the assumptions of Corollary 1.2. More interestingly, without presupposing that f is smooth, we have:

Theorem 1.7

Let \(X\subseteq {\mathbb {R}}^n\) be a simple closed set such that one of the following conditions is satisfied:

  1. (1)

    n is arbitrary and for each \(z \in \partial X\), there is a simplex \(X_z\) with \(z \in X_z \subseteq X\).

  2. (2)

    \(n=2\) and for each \(z \in \partial X\), there is a compact fat subanalytic set \(X_z\) with \(z \in X_z \subseteq X\).

Let \(f: X \rightarrow {\mathbb {R}}\) be any function such that \(f|_{X_z}\) is subanalytic for all \(X_z\) appearing in (1) or (2). Then f is curve-analytic if and only if \(f \in {\mathcal {C}}^\omega |_X\).

All the results are proved in Section 2. The examples in Section 3 show that the connection between the degree of polynomial plots that recognize real analyticity and the regularity of the boundary is optimal and complement the investigation.

2 Proofs

2.1 Localization of the problems

Proposition 2.2 shows that it suffices to study the problems locally at boundary points. First we recall a lemma from [13].

Lemma 2.1

([13, Lemma 6.1]). Let \(X \subseteq {\mathbb {R}}^n\) be closed and \(U \subseteq {\mathbb {R}}^n\) open with \(U \cap X \ne \emptyset \). Then there exists an open subset \(U_0 \subseteq U\) with \(U_0 \cap X = U \cap X\) such that for all \(x \in U_0\) and all \(a \in X\) that realize the distance of x to X, i.e., \({\text {dist}}(x,a) = {\text {dist}}(x,X)\), the line segment [xa] is contained in \(U_0\).

Proposition 2.2

Let \(X\subseteq {\mathbb {R}}^n\) be a closed fat set. Let \(f: X^\circ \rightarrow {\mathbb {R}}\) be real analytic. Suppose that for all \(x \in \partial X\), there exists a neighborhood \(U_x\) of x in \({\mathbb {R}}^n\) and a real analytic function \(F_x: U_x \rightarrow {\mathbb {R}}\) such that \(F_x|_{U_x \cap X^\circ } = f|_{U_x \cap X^\circ }\). Then there exists a real analytic extension of f to an open neighborhood of X.

Proof

Let us show that f and the \(F_x\) glue coherently to a global real analytic extension of f. Invoking Lemma 2.1, we replace \(U_x\) by the connected component of \((U_x)_0\) that contains x. Then the open cover \(\{U_x: x \in \partial X\}\cup \{X^\circ \}\) of X has the property that for each \(z \in U_x\) and each \(a \in X\) that realizes the distance of z to X, the segment [za] lies in \(U_x\). Let V be a connected component of \(U_x \cap U_y\). For each \(z \in V\) and each \(a \in X\) that realizes the distance of z to X, the line segment [za] lies in V. Since X is fat, V has nonempty intersection with \(X^\circ \), and on this intersection \(F_x\) and \(F_y\) coincide with f by assumption. By the identity theorem, \(F_x\) and \(F_y\) coincide on V and hence on \(U_x \cap U_y\) since the connected component V was arbitrary. \(\square \)

2.2 Strongly injective homomorphisms

We will use the following result.

Theorem 2.3

([5, 6]). Let \(\Phi : {\mathbb {K}}\{X_1,\ldots ,X_n\} \rightarrow {\mathbb {K}}\{Y_1,\ldots ,Y_k\}\) be a homomorphism of convergent power series rings over the field \({\mathbb {K}}\). Then the following conditions are equivalent:

  1. (1)

    \(\Phi \) is strongly injective, i.e., if \({{\hat{\Phi }}}\) denotes the natural extension of \(\Phi \) to formal power series, then \({{\hat{\Phi }}}(f) \in {\mathbb {K}}\{Y_1,\ldots ,Y_k\}\) implies \(f \in {\mathbb {K}}\{X_1,\ldots ,X_n\}\).

  2. (2)

    The generic rank of \(\Phi \) is n.

2.3 Proof of Theorem 1.1 and Corollary 1.2

Lemma 2.4

Let \(X \subseteq {\mathbb {R}}^n\) be nonempty and closed, \(f \in {\mathcal {C}}^\infty |_X\), and d a positive integer. Then the following conditions are equivalent:

  1. (1)

    \(f \in {\mathscr {C}}^\omega _{1,d}(X)\).

  2. (2)

    \(f \in {\mathscr {C}}^\omega _{m,d}(X)\) for all \(m \ge 1\).

  3. (3)

    \(f \in {\mathscr {C}}^\omega _{m,d}(X)\) for some \(m \ge 1\).

Proof

(1) \(\Rightarrow \) (2) Let \(f \in {\mathscr {C}}^\omega _{1,d}(X)\), \(m \ge 1\), and \(p \in {\mathcal {P}}_{m,d}(X)\). Fix a representative of p, also denoted by p. So there exists an open neighborhood U of \(0 \in {\mathbb {R}}^m\) such that \(p(U) \subseteq X\). Let \(x \in U\), \(v \in {\mathbb {S}}^{n-1}\), and \(q(t):= x +t v\) for t near \(0 \in {\mathbb {R}}\) such that \(q(t) \in U\). Then the germ of q belongs to \({\mathcal {P}}_{1,1}(U)\) and that of \(p \circ q\) to \({\mathcal {P}}_{1,d}(X)\). Thus, \(f \circ p \circ q\) is real analytic by (1). Since \(f \circ p\) is smooth, \(f \circ p\) is real analytic by Theorem A. (In fact, it is clear from the above that \(f \circ p|_{\ell \cap U}\) is real analytic, where \(\ell \) is the affine line generated by q.)

(2) \(\Rightarrow \) (3) Trivial.

(3) \(\Rightarrow \) (1) This follows easily from the fact that \({\mathcal {P}}_{1,d}(X)\) can be identified with a subset of \({\mathcal {P}}_{m,d}(X)\) (viewing \(x_1 \mapsto p(x_1)\) as \((x_1,\ldots ,x_m) \mapsto p(x_1)\)). \(\square \)

Proof of Theorem 1.1

The inclusion \({\mathcal {C}}^\omega |_X \subseteq {\mathscr {C}}^\omega _{1,d}(X) \cap {\mathcal {C}}^\infty |_X\) is clear. Suppose that \(f \in {\mathscr {C}}^\omega _{1,d}(X) \cap {\mathcal {C}}^\infty |_X\). By Theorem A, \(f|_{X^\circ }\) is real analytic. By Proposition 2.2, it suffices to show that for each \(x \in \partial X\), there exist a fat set \(\Pi _x\) such that \(x \in \partial \Pi _x\) and \(\Pi _x^\circ \subseteq X^\circ \), a neighborhood \(U_x\) of x in \({\mathbb {R}}^n\), and a real analytic function \(F_x: U_x \rightarrow {\mathbb {R}}\) such that \(f|_{U_x \cap \Pi _x^\circ }= F_x|_{U_x \cap \Pi _x^\circ }\). Indeed, since X is simple, we may assume (after possibly shrinking \(U_x\)) that \(U_x \cap X^\circ \) is connected. Thus, \(f|_{U_x \cap X^\circ }= F_x|_{U_x \cap X^\circ }\) by the identity theorem, and Proposition 2.2 implies the statement.

Fix \(x \in \partial X\). Since X is a UPC set with \(d = d(X)\), we have \(d = 2 \max \{m,D\}\) for some \((m,D) \in {\text {char}}(X)\). So there is a polynomial curve \(h_x: {\mathbb {R}}\rightarrow {\mathbb {R}}^n\) of degree at most D such that \(h_x(0)=0\) and

$$\begin{aligned} {\text {dist}}(h_x(t),{\mathbb {R}}^n {\setminus } X) \ge M\, t^m, \quad x \in X,\, t \in [0,1]. \end{aligned}$$

We have \(h_x(t) = t^p {\tilde{h}}_x(t)\) for some integer \(p\ge 1\), where \({\tilde{h}}_x(0) \ne 0\). Let \(v_1:= {\tilde{h}}_x(0)/|\tilde{h}_x(0)|\) and choose unit vectors \(v_2,\ldots ,v_n\) in \({\mathbb {R}}^n\) such that \(v_1,\ldots , v_n\) form a basis of \({\mathbb {R}}^n\). Then

$$\begin{aligned} \theta _x(s_1,\ldots ,s_n):= h_x(s_1) + s_2^m v_2 + \cdots + s_n^m v_n \end{aligned}$$

is a polynomial map \(\theta _x: {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) of degree at most \(\max \{m,D\}\) which takes the set \(C:= \{(s_1,\ldots ,s_2): 0 \le s_1 \le 1, \, |s_i| \le \big (\tfrac{M}{2(n-1)}\big )^{1/m} s_1 \text { for } i\ge 2\}\) into X. Indeed,

$$\begin{aligned} {\text {dist}}(\theta _x(s_1,\ldots ,s_n), {\mathbb {R}}^n {\setminus } X)&\ge {\text {dist}}(h_x(s_1), {\mathbb {R}}^n{\setminus } X) - |s_2|^m - \cdots - |s_n|^m \\&\ge M s_1^m - \sum _{j=2}^n \tfrac{M}{2(n-1)} s_1^m \\&= \tfrac{M}{2} s_1^m \end{aligned}$$

if \((s_1,\ldots ,s_n) \in C\). Since C is a 1-set and \(0 \in \partial C\), there is a linear isomorphism \(\ell : {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) such that \(\ell (S)\subseteq C\), where S is the convex hull of \(0,e_1,\ldots ,e_n\). There is an open neighborhood U of 0 in \({\mathbb {R}}^n\) such that \(q: {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) given by

$$\begin{aligned} q(x_1,\ldots ,x_n):= (x_1^2,\ldots ,x_n^2) \end{aligned}$$

takes U into S. Thus the polynomial map \(\psi _x:= \theta _x \circ \ell \circ q: {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) of degree at most d takes U into X and so we may consider the composite \(f \circ \psi _x|_U\). By Lemma 2.4, \(f \circ \psi _x|_U\) is real analytic. Since f is smooth, by assumption, we have its formal Taylor series \(F_x = T_x f\) at x. Then the power series \(F_x \circ \psi _x = T_0 (f \circ \psi _x)\) has positive radius of convergence. By Theorem 2.3, \(F_x\) has positive radius of convergence and thus defines a real analytic function, again denoted by \(F_x\), on an open neighborhood \(U_x\) of x in \({\mathbb {R}}^n\). Clearly, \(f|_{U_x \cap \Pi _x}= F_x|_{U_x \cap \Pi _x}\), where \(\Pi _x:= \psi _x(U)\). This shows the claim and hence completes the proof. \(\square \)

Proof of Corollary 1.2

This follows easily from Theorem 1.1 (applied to each \(X_z\)) and Proposition 2.2. Note that X is fat. \(\square \)

2.4 Proof of Theorem 1.3

We need a variant of Lemma 2.4, where \(f: X \rightarrow {\mathbb {R}}\) is not necessarily smooth.

Lemma 2.5

Let \(X \subseteq {\mathbb {R}}^n\) be nonempty, \(f: X \rightarrow {\mathbb {R}}\) any function, and d a positive integer. Then the following conditions are equivalent:

  1. (1)

    \(f \in {\mathscr {C}}^\omega _{2,d}(X)\).

  2. (2)

    \(f \in {\mathscr {C}}^\omega _{m,d}(X)\) for all \(m \ge 2\).

  3. (3)

    \(f \in {\mathscr {C}}^\omega _{m,d}(X)\) for some \(m \ge 2\).

Proof

(1) \(\Rightarrow \) (2) The proof is analogous to the one of Lemma 2.4 except that now q is a (2, 1)-plot that parameterizes a piece of an affine 2-plane contained in U and we use Theorem B.

(2) \(\Rightarrow \) (3) Trivial.

(3) \(\Rightarrow \) (1) \({\mathcal {P}}_{2,d}(X)\) can be seen as a subset of \({\mathcal {P}}_{m,d}(X)\) if \(m\ge 2\). \(\square \)

Lemma 2.6

Let \(q: {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) be the map defined by \(q(x_1,\ldots ,x_n):= (x_1^2,\ldots , x_n^2)\). Let \(I_r:= (-r,r)^n \subseteq {\mathbb {R}}^n\). Then \(Q_r:= q(I_r)\) is a neighborhood of 0 in the first orthant \(Q:= \{x \in {\mathbb {R}}^n: x_i \ge 0 \text { for all } 1 \le i \le n\}\). For any function \(f: Q_r \rightarrow {\mathbb {R}}\) such that \(f \circ q: I_r \rightarrow {\mathbb {R}}\) is real analytic, there exists a real analytic function \(F: U \rightarrow {\mathbb {R}}\) defined in a neighborhood U of 0 in \({\mathbb {R}}^n\) such that \(F|_{U \cap Q_r} = f|_{U \cap Q_r}\).

Proof

This is a consequence of a theorem of Luna [10] since \(x_1^2,\ldots ,x_d^2\) are the basic invariants of the natural action of the group \(G = {\mathbb {Z}}_2 \times \cdots \times {\mathbb {Z}}_2\) on \({\mathbb {R}}\times \cdots \times {\mathbb {R}}\).

Let us sketch an alternative proof. Take a smooth function \(\chi : {\mathbb {R}}^n \rightarrow {\mathbb {R}}\) such that \(\chi \equiv 1\) in a neighborhood of 0 and \(\chi \equiv 0\) outside \(I_s\), where \(s< r^2\). Then \({\tilde{f}}:= \chi f\) extends by zero to a function defined on all of \(Q = q({\mathbb {R}}^n)\) and \({\tilde{f}} \circ q: {\mathbb {R}}^n \rightarrow {\mathbb {R}}\) is a G-invariant smooth function. Thus, by [7] or [15], there is a smooth function \(g: {\mathbb {R}}^n \rightarrow {\mathbb {R}}\) such that \({\tilde{f}} \circ q = g \circ q\), i.e., g extends \({\tilde{f}}\) to \({\mathbb {R}}^n\). In particular, f has a smooth extension to a neighborhood of 0 in \({\mathbb {R}}^n\). If F denotes the Taylor series at 0 of f (equivalently, of g), then \(F \circ q = T_0(f \circ q)\) has positive radius of convergence since \(f\circ q\) is real analytic. By Theorem 2.3, F converges and defines a real analytic function with the desired properties. \(\square \)

Proof of Theorem 1.3

We have to show \({\mathscr {C}}^\omega _{2,2}(X) \subseteq {\mathcal {C}}^\omega |_X\). Let \(f \in {\mathscr {C}}^\omega _{2,2}(X)\). By Lemma 2.5, \(f \in {\mathscr {C}}^\omega _{n,2}(X)\). Fix \(z \in \partial X\) and let \(X_z\) be a simplex such that \(z \in X_z \subseteq X\). There is an affine isomorphism \(\ell : {\mathbb {R}}^n \rightarrow {\mathbb {R}}^n\) with \(\ell (0) =z\) such that \(X_z\) is the image of the convex hull of \(0,e_1,\ldots ,e_n\) under \(\ell \). So there is an open neighborhood U of \(0 \in {\mathbb {R}}^n\) such that \(f \circ \ell \circ q: U \rightarrow {\mathbb {R}}\) is well-defined and real analytic. It follows from Lemma 2.6 that \(f \circ \ell |_{q(U)}\) has a real analytic extension to some neighborhood of 0 and thus \(f|_{\ell (q(U))}\) has a real analytic extension to some neighborhood of z. Since z was arbitrary, the theorem now follows from Proposition 2.2. \(\square \)

2.5 Proof of Theorem 1.4 and Corollray 1.5

Let \(d \ge 3\) and consider the map \(\sigma = (\sigma _1,\sigma _2): {\mathbb {R}}^2 \rightarrow {\mathbb {R}}^2\) defined by

$$\begin{aligned} \sigma _1(x,y):= x^2 + y^2, \quad \sigma _2(x,y):= \textrm{Re}((x+iy)^d). \end{aligned}$$

Then \(\sigma ({\mathbb {R}}^2) = \{(x,y) \in {\mathbb {R}}^2: x \ge 0,\, |y| \le x^{d/2}\} =:\Sigma \). In fact, in polar coordinates \(\sigma _1(r e^{i\theta }) = r^2\) and \(\sigma _2(r e^{i\theta }) = r^d \cos (d \theta )\) so that \(\sigma \) maps the circle with radius r around 0 onto the vertical line segment between the points \((r^2,\pm r^d)\). The polynomials \(\sigma _1\) and \(\sigma _2\) are the basic invariants of the dihedral group \(G=I^d_2\) consisting of the orthogonal transformations of \({\mathbb {R}}^2\) that preserve the regular d-gon.

Lemma 2.7

Let \(I_r = (-r,r)^2 \subseteq {\mathbb {R}}^2\). Then \(\Sigma _r:= \sigma (I_r)\) is a neighborhood of 0 in \(\Sigma \). For any function \(f: \Sigma _r \rightarrow {\mathbb {R}}\) such that \(f \circ \sigma : I_r \rightarrow {\mathbb {R}}\) is real analytic, there exists a real analytic function \(F: U \rightarrow {\mathbb {R}}\) defined in a neighborhood U of 0 in \({\mathbb {R}}^2\) such that \(F|_{U \cap \Sigma _r} = f|_{U \cap \Sigma _r}\).

Proof

Follow the proof of Lemma 2.6 and make the obvious modifications.

\(\square \)

Proof of Theorem 1.4

We first assume that \(X \subseteq {\mathbb {R}}^2\) is a compact Hölder set. Then \(d:= d(X) =d'(X)\) and for each \(x \in \partial X\), there is an affine isomorphism \(\ell : {\mathbb {R}}^2 \rightarrow {\mathbb {R}}^2\) with \(\ell (0)=x\) and \(r>0\) such that \(\ell (\Sigma _r) \subseteq X\). If \(f \in {\mathscr {C}}^\omega _{2,d}(X)\), then \(f \circ \sigma : I_r \rightarrow {\mathbb {R}}\) is well-defined and real analytic. Now the result follows from Lemma 2.7 and Proposition 2.2.

Let now \(X \subseteq {\mathbb {R}}^2\) be a simple compact fat subanalytic set and \(d' =d'(X)\). Let \(f \in {\mathscr {C}}^\omega _{2,d'}(X)\). Fix \(x \in \partial X\). There exist \((m,D) \in {\text {char}}(X)\) with \(d' = 2 mD\), a polynomial curve \(h_x\) of degree at most D, and a basis \(v_1, v_2\) as in the proof of Theorem 1.1. Consider the polynomial map \(\Theta _x: {\mathbb {R}}^2 \rightarrow {\mathbb {R}}^2\) given by

$$\begin{aligned} \Theta _x(s_1,s_2):= h_x(s_1) + s_2 v_2. \end{aligned}$$

It has degree at most D and takes the cusp \(S =\{(s_1,s_2): 0 \le s_1 \le 1,\, |s_2| \le \tfrac{M}{2} s_1^m \}\) into \(X^\circ \cup \{x\}\). The function \(f \circ \Theta _x|_S\) belongs to \({\mathscr {C}}^{\omega }_{2,2m}(S)\) and hence it is the restriction of a real analytic function defined on a neighborhood of S by Theorem 1.4 for Hölder sets (since \(d'(S)=d(S)=2m\)). We may compute

$$\begin{aligned} \partial _{s_2}^k (f \circ \Theta _x)(s_1,s_2) = d^k_{v_2} f(\Theta _x(s_1,s_2)), \quad k \in {\mathbb {N}}, \end{aligned}$$

for \((s_1,s_2) \in S^\circ \) (since f is real analytic in \(X^\circ \) by Theorem B) and letting \((s_1,s_2) \rightarrow (0,0)\), we see that the directional derivatives on the right-hand side extend continuously to x. This remains true for all \(v_2\) in a small neighborhood of the chosen \(v_2\). By the proof of [13, Theorem 1.14] or [14, Theorem C], we find that f is the restriction to X of a \({\mathcal {C}}^\infty \)-function defined on \({\mathbb {R}}^2\). The cited proof shows that the derivatives of all orders extend continuously to the boundary of X. Since compact fat subanalytic sets are Whitney p-regular for some positive integer p, these derivatives define a Whitney jet of class \({\mathcal {C}}^\infty \) on X which extends to a smooth function on \({\mathbb {R}}^2\).

Now it suffices to invoke Theorem 1.1 and Lemma 2.4 (since \(d'(X) \ge d(X)\)) in order to complete the proof of Theorem 1.4. \(\square \)

Corollary 1.5 follows easily from Theorem 1.4 and Proposition 2.2.

2.6 Proof of Theorem 1.7

If f is the restriction of a real analytic function, then clearly f is curve-analytic. So suppose that f is curve-analytic.

Lemma 2.8

Let \(m\ge 1\). Let \(p \in {\mathcal {P}}_m(X)\) be such that \(f \circ p\) is subanalytic (for instance, if the image of p is contained in \(X_z\) for some z). Then \(f \circ p\) is real analytic.

Proof

Let \(c: (-\epsilon ,\epsilon ) \rightarrow {\mathbb {R}}^m\) be a real analytic arc in the domain of definition of (a representative of) p. Since f is curve-analytic, there exist \(\delta \in (0,\epsilon ]\) and a real analytic function \(F: U \rightarrow {\mathbb {R}}\) on a neighborhood U of p(c(0)) in \({\mathbb {R}}^n\) such that \(p(c(t)) \in U\) and \(F(p(c(t))) = f(p(c(t)))\) for all \(t \in (-\delta ,\delta )\). Thus \(f \circ p\) is curve-analytic and subanalytic so that \(f\circ p\) is real analytic by Theorem C. \(\square \)

By Lemma 2.8, \(f|_{X_z} \in {\mathscr {C}}^\omega _{2}(X_z)\) and hence \(f|_{X_z} \in {\mathcal {C}}^\omega |_{X_z}\) thanks to Theorems  1.3 and 1.4. Then Theorem 1.7 follows from Proposition 2.2.

Remark 2.9

An important step in the proof of Theorem C in [9] is the criterion that an arc-analytic subanalytic function f defined on an open subset U of \({\mathbb {R}}^n\) is real analytic at a point \(x \in U\) if and only if f satisfies the (pq)-test at x for all pairs (pq) of positive integers. That means that for every pair of linearly independent vectors \(\xi ,\nu \in {\mathbb {R}}^n\) and all \(a,b \in {\mathbb {R}}\), \(\varphi (t):= f(x + a t^p \xi + b t^q \nu )\) is a real analytic germ at \(0 \in {\mathbb {R}}\) and the support of \(\varphi \) is contained in \({\mathbb {N}}p + {\mathbb {N}}q\). Theorem 1.7 suggests that often not all (pq)-tests are necessary to detect real analyticity.

3 Examples

The first example shows that in general the degree of polynomial test plots in Theorem 1.1 is optimal.

Example 3.1

Let D be a positive integer. The horn \(H = \{(x,y) \in {\mathbb {R}}^2: 0 \le x \le 1, \, x^{D} \le y \le 2 x^D\}\) is a UPC set with characteristic (DD) and \(d(H) = 2D\). Indeed, every polynomial curve \(h: {\mathbb {R}}\rightarrow {\mathbb {R}}^2\) with \(h(0) = 0\) and \(h([0,1]) \subseteq H\) must be of degree at least D and \({\text {dist}}(h(t),{\mathbb {R}}^2{\setminus } H)\lesssim t^D\) for \(t \in [0,1]\). Every polynomial 1-plot in H through 0 must be of degree at least 2D.

The function \(f: H \rightarrow {\mathbb {R}}\) given by \(f(x,y):= e^{-1/(x^2 +y^2)}\) for \((x,y) \ne (0,0)\) and \(f(0,0):= 0\) belongs to \({\mathcal {C}}^\infty |_H\) and to \({\mathscr {C}}^\omega _{1,2D-1}(H)\), simply because f is real analytic away from 0 and for all \(p \in {\mathcal {P}}_{1,2D-1}(H)\), we have \(p(0) \ne 0\).

On the other hand, \(f \not \in {\mathscr {C}}^{\omega }_{1,2D}(H)\) either by Theorem 1.1 or by observing that for \(p(t):= (t^{2},t^{2D})\), which lies in H for all t near 0, the composite

$$\begin{aligned} (f\circ p)(t) = \exp \Big (-\frac{1}{t^{4}(1+t^{4(D-1)}) }\Big ) \end{aligned}$$

has no analytic extension to \(t=0\).

The following easy example shows that Theorem 1.3 is best possible.

Example 3.2

Let \(X = \{x \in {\mathbb {R}}^n: x_i \ge 0 \text { for all } 1 \le i \le n\}\) be the first orthant. A plot \(p \in {\mathcal {P}}_{m,1}(X)\) (m arbitrary) can satisfy \(p(0) = 0\) only if \(p\equiv 0\). In other words, an arbitrary function \(f \in {\mathscr {C}}^\omega _{m,1}(X)\) is unrestricted at 0.

The next example shows that the assumption of being simple is essential.

Example 3.3

Consider the set \(X_1:= \{(x,y) \in {\mathbb {R}}^2: x\ge 0,\, x^{\sqrt{2}} \le y \le x^{\sqrt{2}}+x^2\}\). Every smooth curve c in \(X_1\) must vanish to infinite order on \(c^{-1}(0)\); see [14, Example 6.7]. Thus \({\mathscr {C}}^\omega _m(X_1)\) (m arbitrary) contains elements that do not have a real analytic extension.

Let \(X_2:= \{(x,y) \in {\mathbb {R}}^2: x\le 0\}\) be the left half-plane and consider \(X:= X_1 \cup X_2\) which is not simple. But for each point z of \(\partial X\), there exists a simple fat compact subanalytic set \(X_z\) such that \(z \in X_z \subseteq X\). Again it is easy to find (even smooth) elements of \({\mathscr {C}}^\omega _m(X)\) that do not admit a real analytic extension.

Note that it was wrongly stated in [13, Corollary 1.17] that, in a related result, the assumption that the set is simple is not needed.

There are algebraic sets X in \({\mathbb {R}}^2\) for which \({\mathscr {C}}^\omega _{m}(X)\) (m arbitrary) is essentially bigger than \({\mathcal {C}}^\omega |_X\):

Example 3.4

Consider the algebraic set \(X = \{(x,y) \in {\mathbb {R}}^2: x^3 = y^2\}\) and the function \(\varphi : X \rightarrow {\mathbb {R}}\) defined by \(\varphi (x,y) = y^{1/3}\). Then \(\varphi \in {\mathscr {C}}^\omega _{m}(X)\) for all \(m\ge 1\). Indeed, let \(p=(p_1,p_2) \in {\mathcal {P}}_m(X)\). The composite \(u = \varphi \circ p\) satisfies \(u^2 = p_1\) and \(u^3 = p_2\) so that u is smooth by a result of Joris [8], and in turn real analytic by [11, Proposition VI.3.11].

In fact, we can completely describe \({\mathscr {C}}^\omega _{m}(X)\): for all \(m \ge 1\),

$$\begin{aligned} {\mathscr {C}}^\omega _{m}(X) = \varphi ^* {\mathcal {C}}^\omega ({\mathbb {R}}):= \{g \circ \varphi : g \in {\mathcal {C}}^\omega ({\mathbb {R}})\}. \end{aligned}$$

That \(\varphi ^* {\mathcal {C}}^\omega ({\mathbb {R}})\) is contained in \({\mathscr {C}}^\omega _m(X)\) is an easy consequence of the fact that \(\varphi \in {\mathscr {C}}^\omega _{m}(X)\). Conversely, suppose that \(f \in {\mathscr {C}}^\omega _m(X)\). Then \(g(t):= f(t^2,t^3)\) defines an element \(g \in {\mathcal {C}}^\omega ({\mathbb {R}})\) satisfying \(g(\varphi (x,y)) = f(y^{2/3},y) = f(x,y)\).