1 Introduction and main results

This paper forms the second part of our project started in [1] and dedicated to the study of regularity of real-valued functions defined on a nonsingular real algebraic set. For the general theory of real algebraic sets and real regular functions we refer to [3, 16]. As in [3, 16] and [1], the notion of nonsingular point and singular point of a real algebraic set will be always understood in the standard algebraic sense. It may happen that a subset of \(\mathbb {R}^n\) is simultaneously a singular real algebraic set and a real analytic manifold (see [1, Example 1.4] for a detailed discussion of this phenomenon).

Real algebraic curves that are analytic manifolds are of special interest in the present paper. In particular, we will prove that regularity of a given function f defined on a nonsingular real algebraic set X is a consequence of regularity of the restriction \(f|_C\) for every real algebraic curve C in X that is an analytic manifold. This result is related to [1, Theorem 1.1], where the curves to which f is restricted are merely \(\mathcal {C}^k\) manifolds for finite k,  but have very special singularities that cannot appear if \(k=+\infty \). A more detailed discussion on the relation between [1] and the present paper is postponed to the following subsection. At the moment let us just mention that purely local techniques of [1] to establish analyticity of f are not sufficient here. In Sect. 2 we develop semi-global tools which enable us to prove our main theorems in Sect. 4.

Unless explicitly stated otherwise, we consider \(\mathbb {R}^n\) and its subsets endowed with the topology induced by the Euclidean norm on \(\mathbb {R}^n.\)

1.1 Main theorem (special case)

One of our goals is the following result.

Theorem 1.1

Let \(f:X\rightarrow \mathbb {R}\) be a function defined on a connected nonsingular algebraic set X in \(\mathbb {R}^n,\) with \(\textrm{dim}X\ge 2.\) Then the following conditions are equivalent:

  1. (a)

    f is regular on X.

  2. (b)

    For every algebraic curve C in X that has at most one singular point and is a real analytic submanifold homeomorphic to the unit circle, the restriction \(f|_C\) is a regular function.

Roughly speaking, regularity of a function can be detected on algebraic curves specified in (b) above. According to [9, Example 2.3], a real-valued function on \(\mathbb {R}^n\) need not be continuous (let alone regular), even if all its restrictions to nonsingular algebraic curves in \(\mathbb {R}^n\) are regular functions and all its restrictions to one-dimensional real analytic submanifolds of \(\mathbb {R}^n\) are real analytic functions. In particular, some algebraic curves in Theorem 1.1 must admit a singular point. Moreover, as already noted in [1, p. 202], some nonsingular real algebraic sets X do not contain rational algebraic curves, so in that case the algebraic curves in Theorem 1.1 cannot all be rational.

Connectedness of the real algebraic set X in Theorem 1.1 is essential. Indeed, suppose that X is irreducible and disconnected, and let \(X_0\) be a connected component of X. Then the function \(f:X\rightarrow \mathbb {R}\) defined 0 on \(X_0\) and 1 on \(X\setminus X_0\) is not regular on X,  but the restriction of f to each connected algebraic curve in X is a regular function.

A more general version of Theorem 1.1 for X irreducible but not necessarily connected is given in Theorem 1.3. In the special case of \(X=\mathbb {R}^n\) discussed in Theorem 1.5, the test curves can be described explicitly and the proof is simpler. Every singular curve in Theorems 1.1, 1.3(c) and 1.5(c) is a real analytic manifold homeomorphic to the unit circle. Such singular curves are thus Nash manifolds Nash diffeomorphic to the unit circle (see [3] for the general theory of Nash manifolds and functions). Theorems 1.1, 1.3 and 1.5 are a continuation of our research undertaken in [1, Theorems 1.1, 1.6 and 1.7]. To get the right perspective, a few points are worth noting.

For the sake of clarity, we summarize the discussion on singularities of real algebraic sets, including the notion of faithfulness, presented in [1, Section 1] (see [3, 16,17,18,19] for the sources). Let Z be an algebraic set in \(\mathbb {R}^n.\) The algebraic complexification of Z is the smallest algebraic subset \(Z_{\mathbb {C}}\) of \(\mathbb {C}^n\) that contains Z (\(\mathbb {R}^n\) is viewed as a subset of \(\mathbb {C}^n\)). Note that Z is nonsingular at a point \(x\in Z\) if and only if \(Z_{\mathbb {C}}\) is nonsingular at x,  which in turn is equivalent to \(Z_{\mathbb {C}}\) being a complex analytic manifold in a neighborhood of x. In particular, if Z is a real analytic manifold in a neighborhood of its singular point x,  then the complex analytic germ of \(Z_{\mathbb {C}}\) at x is reducible. Recall that if Z,  in addition to being a real algebraic set in \(\mathbb {R}^n,\) is also a connected topological manifold, then Z is faithful exactly if the complex analytic germ of \(Z_{\mathbb {C}}\) is irreducible at every point of Z.

By the preceding paragraph, no singular curve in Theorem 1.1 and in Theorems 1.3 and 1.5 (except (b)) can be faithful.

Let k be a positive integer. By [1, Theorem 1.1], a function \(f:X\rightarrow \mathbb {R}\) as in Theorem 1.1 is regular if and only if for every faithful algebraic curve C in X that has at most one singular point and is a \(\mathcal {C}^k\) submanifold homeomorphic to the unit circle, the restriction \(f|_C\) is a regular function. Furthermore, the singularities of the curves referred to in [1, Theorem 1.1] have a simple analytic description. Faithful real algebraic curves that have at most one singular point and are connected \(\mathcal {C}^k\) manifolds appear also in [1, Theorems 1.6 and 1.7]. In [1], faithfulness of test curves was necessary to show that regularity of a function can also be detected on nonsingular algebraic surfaces chosen in an optimal way (see [1, Theorems 1.3 and 1.9]).

In conclusion, Theorem 1.1 and [1, Theorem 1.1] are complementary results, neither of which implies the other. Also, Theorem 1.3 and [1, Theorem 1.7] are complementary to each other, as are Theorem 1.5 and [1, Theorem 1.6].

Let us mention that for real-valued functions defined on a nonsingular algebraic set in \(\mathbb {R}^n\), being regular is equivalent to being real analytic and rational (see for example [1, Lemma 3.1]). The related problem of characterizing which real-valued functions are continuous and rational is discussed in [9] constituting a part of regulous geometry (for which see also [2, 6,7,8, 10,11,12,13] and the references therein). In particular, in [9, Theorem 1.7] continuous rational functions are characterized in terms of restrictions to real algebraic curves.

In the present paper we use some results of [1], which in turn are based on [4, 5, 9, 14, 15]. However, the local methods of [1, Section 2] are largely inadequate in the new context and we therefore make extensive use of semi-global methods developed in Sect. 2 below (see Lemma 2.2 that gives a criterion for irreducibility of complex analytic sets, applied in the proof of Lemma 2.6 which in turn is used to establish analyticity of the function f considered in Theorem 2.1). Section 3 contains auxiliary results for the case of functions defined on \(\mathbb {R}^n.\)

1.2 Main theorem (general case)

From now on we will consider regular functions in a more general context, exactly as in [1].

Let A be any subset of \(\mathbb {R}^n.\) A function \(f:A\rightarrow \mathbb {R}\) is regular if there exist two polynomial functions \(\Phi ,\Psi :\mathbb {R}^n\rightarrow \mathbb {R}\) such that

$$\begin{aligned} \Psi (x)\ne 0 \text{ and } f(x)=\frac{\Phi (x)}{\Psi (x)} \text{ for } \text{ all } x\in A. \end{aligned}$$

The notion of regularity is usually defined locally, but over the field of real numbers the standard local definition is equivalent to the global one (cf. [3, 16]).

A function \(g:A\rightarrow \mathbb {R}\) is real analytic if for every point \(a\in A\) there exist an open neighborhood \(U\subset \mathbb {R}^n\) and a real analytic function \(G:U\rightarrow \mathbb {R}\) (in the usual sense) with \(G=g\) on \(A\cap U.\) Obviously, every regular function on A is real analytic.

Notation 1.2

Let X be a nonsingular real algebraic set in \(\mathbb {R}^n,\) with \(\textrm{dim}X\ge 2,\) and let U be an open subset of X.

  • (1.2.1) Collection \(\mathcal {S}(U).\) We denote by \(\mathcal {S}(U)\) the collection of all irreducible nonsingular algebraic curves C in X,  contained in U,  satisfying one of the following two conditions:

    1. (i)

      If U is connected, then C is homeomorphic to the unit circle.

    2. (ii)

      If U is disconnected, then C has at most two connected components, each homeomorphic to the unit circle.

  • (1.2.2) Collection \(\mathcal {F}(U).\) Let \(\mathcal {F}(U)\) denote the collection of all algebraic curves in X,  contained in U,  that have at most one singular point and are real analytic submanifolds homeomorphic to the unit circle.

Theorem 1.3

Let X be an irreducible nonsingular algebraic set in \(\mathbb {R}^n,\) with \(\textrm{dim}X\ge 2,\) and U a nonempty open subset of X. Then, for a function \(f:U\rightarrow \mathbb {R},\) the following conditions are equivalent:

  1. (a)

    f is regular on U.

  2. (b)

    The restriction of f to every irreducible algebraic curve in X,  contained in U,  is a regular function.

  3. (c)

    The restriction of f to every algebraic curve, which is either in the collection \(\mathcal {S}(U)\) or in the collection \(\mathcal {F}(U),\) is a regular function.

Clearly, Theorem 1.3 is both more general and stronger than Theorem 1.1 and treats the case when X need not be connected.

1.3 Functions on \(\mathbb {R}^n\)

For an integer \(n\ge 2,\) an algebraic set \(\Sigma \) in \(\mathbb {R}^n\) is called a Euclidean circle if it can be expressed as

$$\begin{aligned} \Sigma =\{x\in \mathbb {R}^n:||x-x_0||=r\}\cap Q, \end{aligned}$$

where Q is an affine 2-plane in \(\mathbb {R}^n,\) \(x_0\in Q,\) \(r>0.\)

Notation 1.4

Let \(p\ge 3\) be an odd integer.

  1. (1.4.1)

    Polynomials \(G_p\) and \(H_p.\) We define

    $$\begin{aligned} G_p(x,y):=(x^2+1)(y^2+x^2-2x)^p-\frac{x^p}{10^p} \text{ and } H_p(x,y):=(x^2+1)y^p-x^p. \end{aligned}$$

    By Corollary 3.3 below, the polynomials \(G_p\) and \(H_p\) are irreducible in \(\mathbb {C}[x,y].\)

  2. (1.4.2)

    Curves \(D_p\) and \(E_p.\) We define

    $$\begin{aligned} D_p:=\{(x,y)\in \mathbb {R}^2:G_p(x,y)=0\} \text{ and } E_p:=\{(x,y)\in \mathbb {R}^2:H_p(x,y)=0\}. \end{aligned}$$

Being the graph of a real analytic function \(x\rightarrow \frac{x}{\root p \of {x^2+1}}\), the curve \(E_p\) is a real analytic manifold in \(\mathbb {R}^2\) homeomorphic to \(\mathbb {R}.\) In Sect. 3 we will check that \(D_p\) is a real analytic manifold in \(\mathbb {R}^2\) homeomorphic to the unit circle (see Lemma 3.1). The algebraic curves \(D_p\) and \(E_p\) have the origin of \(\mathbb {R}^2\) as the only singular point.

  • (1.4.3) Collections \(\mathcal {G}(\mathbb {R}^n)\) and \(\mathcal {H}(\mathbb {R}^n).\) For any affine 2-plane Q in \(\mathbb {R}^n,\) with \(n\ge 2,\) we choose once and for all an affine-linear isomorphism \(\varphi _Q:Q\rightarrow \mathbb {R}^2.\) If \(n=2,\) then \(Q=\mathbb {R}^2\) and \(\varphi _{\mathbb {R}^2}\) is chosen to be the identity map. Let \(\mathcal {G}(\mathbb {R}^n)\) (resp. \(\mathcal {H}(\mathbb {R}^n)\)) be the collection of all real algebraic curves C in \(\mathbb {R}^n\) for which there exist an affine 2-plane Q in \(\mathbb {R}^n\) containing C and an odd integer \(p\ge 3\) such that \(\varphi _Q(C)\) is a translate of \(D_p\) (resp. \(E_p\)). The curves in \(\mathcal {G}(\mathbb {R}^2)\) (resp. \(\mathcal {H}(\mathbb {R}^2)\)) are therefore defined explicitly by simple polynomial equations of the form \(G_p\circ T=0\) (resp. \(H_p\circ T=0\)), where T is a translate.

Theorem 1.5

For a function \(f:\mathbb {R}^n\rightarrow \mathbb {R},\) with \(n\ge 2,\) the following conditions are equivalent:

  1. (a)

    f is regular on \(\mathbb {R}^n.\)

  2. (b)

    The restriction of f to every irreducible algebraic curve in \(\mathbb {R}^n\) is a regular function.

  3. (c)

    The restriction of f to every algebraic curve, which is either a Euclidean circle in \(\mathbb {R}^n\) or is in the collection \(\mathcal {G}(\mathbb {R}^n)\), is a regular function.

  4. (d)

    The restriction of f to every algebraic curve, which is either an affine line in \(\mathbb {R}^n\) or is in the collection \(\mathcal {H}(\mathbb {R}^n),\) is a regular function.

Clearly, our task boils down to proving that (c) implies (a) and that (d) implies (a).

2 Restrictions of meromorphic functions on algebraic surfaces to analytic submanifolds

For any \(\mathbb {R}\)- or \(\mathbb {C}\)-valued function F defined on some set Y denote

$$\begin{aligned} \mathcal {Z}(F):=\{y\in Y:F(y)=0\}. \end{aligned}$$

Given an algebraic set V in \(\mathbb {R}^n,\) let \(\textrm{Sing}(V)\) denote the set of singular points of V. For any subset A of \(\mathbb {R}^n,\) let \(\overline{A}\) and \(\textrm{int}(A)\) denote the closure and the interior of A,  respectively, with repect to the Euclidean topology.

The main result of this section is the following

Theorem 2.1

(Analyticity of real meromorphic functions) Let X be a nonsingular real algebraic set in \(\mathbb {R}^n\) with \(\textrm{dim}X=2,\) and \(f:U\rightarrow \mathbb {R}\) a function defined on an open subset U of X. Let a be a point in U and let \(g,h: U\rightarrow \mathbb {R}\) be real analytic functions such that

$$\begin{aligned} \mathcal {Z}(h)=\{a\} \text{ and } f(b)=\frac{g(b)}{h(b)} \text{ for } \text{ all } b\in U\setminus \{a\}. \end{aligned}$$

Assume that for every algebraic curve C in the collection \(\mathcal {F}(U)\) with \(\textrm{Sing}(C)\subset \{a\}\), the restriction \(f|_C\) is a regular function. Then f is real analytic on U.

The proof of Theorem 2.1 requires several auxiliary results discussed below. Let \(\Delta _R\) be an open disc in \(\mathbb {C}\) centered at 0 of radius R. For any subset \(E\subset \mathbb {C}^n,\) a function \(u:E\rightarrow \mathbb {C}\) is called holomorphic if there exist an open subset \(D\subset \mathbb {C}^n\) and a holomorphic (in the standard sense) function \(\tilde{u}:D\rightarrow \mathbb {C}\) such that \(E\subset D\) and \(\tilde{u}|_E=u.\) Let \(\mathcal {O}(E)\) denote the ring of holomorphic functions on E.

Lemma 2.2

(Irreducibility of complex curves) Let D be an open connected relatively compact subset of \(\mathbb {C},\) \(a\in D\) and \(F\in \mathcal {O}(\overline{D}\times \overline{\Delta _R})\) such that \(\mathcal {Z}(F)\subset \overline{D}\times {\Delta _{R'}},\) for some \(0<R'<R\). Then there are \(\delta _0, \eta _0>0\) such that for every \(0<\eta <\eta _0\) and every \(H\in \mathcal {O}(\overline{D}\times \overline{\Delta _R})\) with \(\sup _{\overline{D}\times \overline{\Delta _R}}|H-F|<\delta _0\) the complex analytic curve

$$\begin{aligned} \Gamma _{\eta ,H}:=\{(x,y)\in D\times \Delta _R: H(x,y)\cdot (x-a)=\eta \} \end{aligned}$$

is irreducible.

Proof

Let \(\pi :D\times (\Delta _R\setminus \overline{\Delta _{R'}})\rightarrow \Delta _R\setminus \overline{\Delta _{R'}}\) be the natural projection. Denote

$$\begin{aligned} \Gamma ^{*}_{\eta , H}:=\Gamma _{\eta , H}\cap (D\times (\Delta _{R}\setminus \overline{\Delta _{R'}})). \end{aligned}$$

The proof is conducted in several steps.

Step 1. First, we prove that there are \(\eta _0, \delta _0>0\) such that

$$\begin{aligned} \text {for every } 0<\eta<\eta _0 \text { and every } H\in \mathcal {O}(\overline{D}\times \overline{\Delta _R}) \text { with } \sup _{\overline{D}\times \overline{\Delta _R}}|H-F|<\delta _0 \qquad (*) \end{aligned}$$

the restriction \(\pi |_{\Gamma ^*_{\eta ,H}}:\Gamma ^*_{\eta ,H}\rightarrow \Delta _R\setminus \overline{\Delta _{R'}}\) is a proper map.

Fix a compact neighborhood K of a in D. Observe that for small \(\delta _0>0\) and \(\eta _0>0\) such that \(\sup _{x\in D{\setminus } K}|\frac{\eta _0}{x-a}|\) is small, the following holds. If \(\eta \) and H are bounded as above, then the image of \(\Gamma ^*_{\eta ,H}\) by the natural projection \(\varrho :D\times \Delta _R\rightarrow D\) is contained in K. Indeed, let \(x_0\in D\setminus K.\) If \(y_0\in \overline{\Delta _R}\) satisfies

$$\begin{aligned} H(x_0,y_0)\cdot (x_0-a)=\eta , \end{aligned}$$

then \(y_0\) is close to some root of \(y\rightarrow F(x_0,y).\) Consequently, by assumption on \(\mathcal {Z}(F)\) we have \(y_0\in \Delta _{R'}.\) Hence \(x_0\notin \varrho (\Gamma ^*_{\eta ,H}).\) This means that \(\varrho (\Gamma ^*_{\eta ,H})\subset K\).

Now for \(\eta _0\) and \(\delta _0\) as above, (*) follows easily: let \(K'\) be a compact subset of \(\Delta _{R}\setminus \overline{\Delta _{R'}}.\) Then

$$\begin{aligned} (\pi |_{\Gamma ^*_{\eta ,H}})^{-1}(K')=\Gamma ^*_{\eta ,H}\cap (K\times K') \end{aligned}$$

is compact as a closed subset of the compact set \(K\times K'.\)

Step 2. Choose \(\eta _0,\delta _0>0\) satisfying (*). Fix any \(y'\in \Delta _{R}\setminus \overline{\Delta _{R'}}.\) We prove that, possibly after decreasing \(\eta _0, \delta _0,\) for every \(0<\eta <\eta _0\) and \(H\in \mathcal {O}(\overline{D}\times \overline{\Delta _R})\) with \(\sup _{\overline{D}\times \overline{\Delta _R}}|H-F|<\delta _0,\) the function \(x\rightarrow H(x,y')\cdot (x-a)-\eta \) has only one root in D and this root is single. Suppose the claim is false. Then there are a sequence \(\{\eta _n\}\) of positive real numbers converging to 0 and a sequence \(\{H_{n}\}\subset \mathcal {O}(\overline{D}\times \overline{\Delta _R})\) converging uniformly to F such that \(G_n:D\rightarrow \mathbb {C}\) defined by the formula

$$\begin{aligned} G_n(x)=H_n(x,y')\cdot (x-a)-\eta _n \end{aligned}$$

has more than one root in D (counted with multiplicities). Since \(\{G_n\}\) converges uniformly to \(x\rightarrow F(x,y')\cdot (x-a)\) on D we obtain a contradiction with the classical Hurwitz theorem. Indeed, \(x\rightarrow F(x,y')\) is a unit in \(\mathcal {O}(\overline{D}),\) hence the point a is the only root of \(x\rightarrow F(x,y')\cdot (x-a)\) in D and this root is single.

Step 3. The proof of the lemma will now be completed by showing that if \(\Gamma _{\eta , H}\) is reducible for some \(0<\eta <\eta _0\) and \(H\in \mathcal {O}(\overline{D}\times \overline{\Delta _R})\) satisfying \(\sup _{\overline{D}\times \overline{\Delta _R}}|H-F|<\delta _0,\) then \(x\rightarrow H(x,y')\cdot (x-a)-\eta \) has at least two roots in D,  contrary to the property just proved. Observe that, for every \(\eta >0\) and \(H\in \mathcal {O}(\overline{D}\times \overline{\Delta _R}),\) every irreducible component E of \(\Gamma _{\eta ,H}\) satisfies

$$\begin{aligned} E\cap (D\times (\Delta _R\setminus \overline{\Delta _{R'}}))\ne \emptyset . \end{aligned}$$

Indeed, if the last intersection were empty, then E would be a complex analytic curve in \(D\times \Delta _R\) with proper projection \(\varrho |_E:E\rightarrow D.\) By the Remmert theorem \(\varrho (E)\) would be a complex analytic curve in D. Since D is an open connected subset of \(\mathbb {C}\) we would have \(\varrho (E)=D\) contradicting

$$\begin{aligned} \Gamma _{\eta , H}\cap (\{a\}\times \mathbb {C})=\emptyset \text{ for } \eta >0. \end{aligned}$$

Therefore, if \(\Gamma _{\eta , H}\) is reducible for some \(\eta , H\) bounded as above, then, by (*), \(\Gamma ^*_{\eta , H}\) contains distinct irreducible complex analytic curves \(C_1, C_2\) with proper projection to \(\Delta _R\setminus \overline{\Delta _{R'}}.\) We use the Remmert theorem once again to conclude that \(\pi (C_1), \pi (C_2)\) are complex analytic curves in \(\Delta _R\setminus \overline{\Delta _{R'}}\). Since \(\Delta _R\setminus \overline{\Delta _{R'}}\) is an open connected subset of \(\mathbb {C}\) we obtain

$$\begin{aligned} \pi (C_1)=\pi (C_2)=\Delta _R\setminus \overline{\Delta _{R'}}. \end{aligned}$$

Consequently, for a generic \(y\in \Delta _{R}\setminus \overline{\Delta _{R'}}\) there are distinct points \(x_1, x_2\in D\) such that \((x_1,y)\in C_1\) and \((x_2,y)\in C_2.\) Hence \(x\rightarrow H(x,y)\cdot (x-a)-\eta \) has at least two roots in D (counted with multiplicities) for every \(y\in \Delta _{R}\setminus \overline{\Delta _{R'}},\) which contradicts Step 2. \(\square \)

Let \(\mathcal {O}_2\) denote the ring of germs of holomorphic functions at the origin in \(\mathbb {C}^2.\) Let \(\mathfrak {m}\) be the maximal ideal in \(\mathcal {O}_2.\) For any subset \(A\subset \mathbb {C}^2\) and any function F defined on some subset of \(\mathbb {C}^2,\) we denote by \(A_{(0,0)}\) and \(F_{(0,0)}\) the germs of, respectively, A and F at (0, 0). Moreover, by \(I(A_{(0,0)})\) we denote the ideal of function-germs in \(\mathcal {O}_2\) that vanish on \(A_{(0,0)}.\)

The idea to apply a variant of the following lemma to the problem of characterizing analyticity of real meromorphic functions in terms of their restrictions to real algebraic curves was conveyed to us by S. Donaldson and allowed us to simplify the original proof of Theorem 2.1.

Lemma 2.3

(Nonholomorphicity of meromorphic functions) Let gh be nonzero holomorphic functions defined on an open connected neighborhood D of \((0,0)\in \mathbb {C}^2.\) Assume that \(h(0,0)=0\) and \(\mathcal {Z}(g)\cap \mathcal {Z}(h)\subset \{(0,0)\}.\) Then there is a positive integer \(n_0\) such that for every holomorphic function F defined on an open neighborhood of (0, 0) in D and satisfying:

  • \(\mathcal {Z}(F)\cap \mathcal {Z}(h)=\{(0,0)\},\)

  • \(F_{(0,0)}\) belongs to \({\mathfrak {m}}^{n_0},\)

  • \(F_{(0,0)}\) has no multiple factors,

the restriction \(\frac{g}{h}|_{\mathcal {Z}(F)\setminus \{(0,0)\}}\) does not have a holomorphic extension to \(\mathcal {Z}(F).\)

Proof

Note that the germ of \(\mathcal {Z}(h)\) at the origin is of complex dimension 1 as \(h(0,0)=0\) and \(h\ne 0.\) Let \(T_{(0,0)}\) be an irreducible complex analytic curve germ contained in \(\mathcal {Z}(h)_{(0,0)}.\) Clearly, \(g_{(0,0)}\) does not vanish identically on \(T_{(0,0)}.\)

By the Puiseux theorem we have a holomorphic normalization \(\phi :(\mathbb {C},0)\rightarrow (T,(0,0)).\) Then \(g\circ \phi \) is a nonzero holomorphic function. Define \(n_0\) to be any positive integer strictly greater than the order of zero of \(g\circ \phi \) at 0.

Let F satisfy the hypothesis of the lemma. Suppose that \(\frac{g}{h}|_{\mathcal {Z}(F)\setminus \{(0,0)\}}\) has a holomorphic extension to \(\mathcal {Z}(F)\). Then there is \(u_{(0,0)}\in \mathcal {O}_2\) such that

$$\begin{aligned} g_{(0,0)}-h_{(0,0)}u_{(0,0)}\in I(\mathcal {Z}(F)_{(0,0)}). \end{aligned}$$

Since \(F_{(0,0)}\) has no multiple factors, there is a \(w_{(0,0)}\in \mathcal {O}_2\) such that

$$\begin{aligned} g_{(0,0)}-h_{(0,0)}u_{(0,0)}=w_{(0,0)}F_{(0,0)}. \end{aligned}$$

In particular,

$$\begin{aligned} g\circ \phi =(w\circ \phi )(F\circ \phi ) \end{aligned}$$

in some neighborhood of 0; a contradiction since the order of zero at 0 of the right-hand side is greater than that of the left-hand side.\(\square \)

Lemma 2.4

(Nonvanishing of a gradient) Let p be a positive integer and \(\eta >0.\) Let \(\beta (x,y)\) be a differentiable real function defined on an open subset of \(\mathbb {R}^2\). Let \((a,b)\in \mathcal {Z}(\beta ^p-\eta x^p).\) Assume \(a\ne 0.\) Then, if the gradient of \(\beta -\eta ^\frac{1}{p}x\) does not vanish at (ab),  the gradient of \(\beta ^p-\eta x^p\) does not vanish at (ab) either.

Proof

If \(\frac{\partial }{\partial x}\beta (a,b)-\eta ^{\frac{1}{p}}\ne 0,\) then

$$\begin{aligned}{} & {} \frac{\partial }{\partial x}(\beta ^p-\eta x^p)(a,b)=p\beta (a,b)^{p-1}\frac{\partial }{\partial x}\beta (a,b)-\eta pa^{p-1}\\{} & {} =pa^{p-1}\eta ^{\frac{p-1}{p}}\frac{\partial }{\partial x}\beta (a,b)-\eta pa^{p-1}=pa^{p-1}\eta ^{\frac{p-1}{p}}(\frac{\partial }{\partial x}\beta (a,b)-\eta ^{\frac{1}{p}})\ne 0. \end{aligned}$$

Since \(a\ne 0\) and \((a,b)\in \mathcal {Z}(\beta ^p-\eta x^p),\) we have \(\beta (a,b)\ne 0.\) Therefore, if \(\frac{\partial }{\partial y}\beta (a,b)\ne 0,\) then

$$\begin{aligned} \frac{\partial }{\partial y}(\beta ^p-\eta x^p)(a,b)=p\beta (a,b)^{p-1}\frac{\partial }{\partial y}\beta (a,b)\ne 0, \end{aligned}$$

as required \(\square \)

The following lemma is well known but it is difficult to find a suitable reference.

Lemma 2.5

(\(\mathcal {C}^1\) approximations in the normal bundle) Let U be an open subset of \(\mathbb {R}^n\) and \(\Phi :U\rightarrow \mathbb {R}\) a \(\mathcal {C}^{\infty }\) function with nonvanishing gradient at every point of \(M:=\Phi ^{-1}(0).\) Assume that M is compact. Let N be a compact tubular neighborhood of M in U,  and \(\tau :N\rightarrow M\) the retraction of N onto M along the normal bundle to M. Then, for every \(\mathcal {C}^{\infty }\) function \(\Psi :U\rightarrow \mathbb {R}\) with \(\Psi |_{{N}}\) sufficiently close to \(\Phi |_{{N}}\) in the \(\mathcal {C}^1\) topology, the intersection \(M_{\Psi }:=\Psi ^{-1}(0)\cap \textrm{int}(N)\) is a \(\mathcal {C}^{\infty }\) submanifold of U and the restriction \(\tau |_{M_{\Psi }}: M_{\Psi }\rightarrow M\) is a \(\mathcal {C}^{\infty }\) diffeomorphism.

Proof

Suppose M is nonempty as otherwise the conclusion is obvious. Recall that \(N\subseteq U\) is a compact \(\mathcal {C}^{\infty }\) submanifold with boundary, \(\tau :N\rightarrow M\) is a \(\mathcal {C}^{\infty }\) submersion, and for each point \(x\in M\) the preimage \(\tau ^{-1}(x)\subseteq N\subseteq \mathbb {R}^n\) is a closed segment centered at x and normal to M. Let K be a compact tubular neighborhood of M in U so that \(K\subseteq \textrm{int}(N)\) and \(d_y\Phi (\nabla _{\tau (y)}\Phi )\in \mathbb {R}\setminus \{0\}\) for all \(y\in K,\) where \(d_y\Phi :T_yN=\mathbb {R}^n\rightarrow \mathbb {R}\) and \(\nabla _{\tau (y)}\Phi \) denote the differential and the gradient, respectively. Note that the preimage \((\tau |_K)^{-1}(x)=\tau ^{-1}(x)\cap K\) is a closed subsegment centered at \(x\in M\) of the segment \(\tau ^{-1}(x).\)

Clearly, \(\Phi \) changes sign in a neighborhood of any point in M. If \(\Psi :U\rightarrow \mathbb {R}\) is a \(\mathcal {C}^{\infty }\) function with \(\Psi |_N\) sufficiently close to \(\Phi |_N\) in the \(\mathcal {C}^1\) topology, then the following conditions hold:

  1. (i)

    \(\Psi (N\setminus \textrm{int}(K))\subseteq \mathbb {R}\setminus \{0\},\)

  2. (ii)

    \(d_y\Psi (\nabla _{\tau (y)}\Phi )\in \mathbb {R}\setminus \{0\}\) for all \(y\in K,\)

  3. (iii)

    \(\Psi \) changes sign in each connected component of K.

By (i), (ii) and (iii), \(M_{\Psi }\) is a compact \(\mathcal {C}^{\infty }\) submanifold of U satisfying

$$\begin{aligned} M_{\Psi }=\Psi ^{-1}(0)\cap \textrm{int}(K) \end{aligned}$$

and having a nonempty intersection with each connected component of K.

For each \(x\in M\) and \(y\in \tau ^{-1}(x),\) the vector subspaces \(T_y(\tau ^{-1}(x))\) and \(\textrm{ker}d_y\tau \) of \(\mathbb {R}^n\) are one dimensional. These spaces are equal since the former is contained in the latter. On the other hand, \(\tau ^{-1}(x)\) is a segment and hence all its tangent spaces coincide. Consequently, the vector spaces \(\textrm{ker}d_y\tau \) and \(\textrm{ker}d_x\tau \) are equal and spanned by the vector \(\nabla _{x}\Phi .\) Now, by (ii), we obtain

$$\begin{aligned} \textrm{ker}d_y\tau \cap \textrm{ker}d_y\Psi =\{0\} \text{ for } \text{ all } y\in M_{\Psi }. \end{aligned}$$

Therefore the restriction \(\tau |_{M_{\Psi }}:M_{\Psi }\rightarrow M\) is a submersion and, in particular, the map \(\tau |_{M_{\Psi }}\) is surjective.

It remains to prove that \(\tau |_{M_{\Psi }}\) is injective. To this end choose a point \(x\in M\) and let \(\alpha :[-1,1]\rightarrow \tau ^{-1}(x)\cap K\) be an affine-linear map from the interval \([-1,1]\) onto the segment \(\tau ^{-1}(x)\cap K.\) Note that the tangent vector \(\alpha '(t)\) is a nonzero multiple of the vector \(\nabla _{\tau (\alpha (t))}\Phi \) for all \(t\in [-1,1].\) Consequently, by (ii), the derivative \((\Psi \circ \alpha )'(t)\) is nonzero for all \(t\in [-1,1],\) so \(\Psi \) has at most one zero on the segment \(\tau ^{-1}(x)\cap K.\) Actually, in view of (i), \(\Psi \) has at most one zero on the segment \(\tau ^{-1}(x).\) Thus, \(\tau |_{M_{\Psi }}\) is injective as required. \(\square \)

Auxiliary functions. The following notation will be used systematically in the sequel. For \(c>0,\) define \(Q_c:\mathbb {C}^2\rightarrow \mathbb {C}\) and \(\Sigma _c\) as follows

$$\begin{aligned} Q_c(x,y):= & {} y^2+(x-c)^2-c^2=y^2+x^2-2cx,\\{} & {} \Sigma _c := \mathcal {Z}(Q_c)\cap \mathbb {R}^2. \end{aligned}$$

Let \(B\subset \mathbb {C}^2\) be an open bidisc centered at (0, 0). Set \(B_{\mathbb {R}}:=B\cap \mathbb {R}^2.\) Let \(u:B\rightarrow \mathbb {C}\) be any holomorphic function with \(u(B_{\mathbb {R}})\subset \mathbb {R}.\) For \(\lambda , \eta >0\) and an odd integer \(p\ge 3\), define \(W^u_{\lambda ,c,\eta ,p}:B\rightarrow \mathbb {C},\) \(V^u_{\lambda ,c,\eta ,p}:B_{\mathbb {R}}\rightarrow \mathbb {R},\) \(T_{\lambda ,c,\eta ,p}:\mathbb {R}^2\rightarrow \mathbb {R},\)

$$\begin{aligned}{} & {} W^u_{\lambda ,c,\eta ,p}(x,y):= (x^2+\lambda ^2)(Q_c(x,y)+u(x,y))^p-\eta x^p,\\{} & {} V^u_{\lambda ,c,\eta ,p}(x,y):=Q_c(x,y)+u(x,y)-x\root p \of {\frac{\eta }{(x^2+\lambda ^2)}},\\{} & {} T_{\lambda ,c,\eta ,p}(x,y):=Q_c(x,y)-x\root p \of {\frac{\eta }{(x^2+\lambda ^2)}}. \end{aligned}$$

Put \(C^u_{\lambda ,c,\eta ,p}:=\mathcal {Z}(W^u_{\lambda ,c,\eta ,p}).\) Clearly, the set \(C^u_{\lambda ,c,\eta ,p}(\mathbb {R}):=C^u_{\lambda ,c,\eta ,p}\cap \mathbb {R}^2\) of real points of \(C^u_{\lambda ,c,\eta ,p}\) equals \(\mathcal {Z}(V^u_{\lambda ,c,\eta ,p}).\)

For any open set D in \(\mathbb {R}^n\) or \(\mathbb {C}^n,\) by \(A\subset \subset D\) we mean that A is a relatively compact subset of D.

Lemma 2.6

(Properties of auxiliary functions) Let B be an open bidisc centered at (0, 0). Let \(g,h\in \mathcal {O}({B})\) be such that

$$\begin{aligned} g(B_{\mathbb {R}})\subset \mathbb {R} \text{ and } h(B_{\mathbb {R}})\subset \mathbb {R}, \text{ and } \mathcal {Z}(h|_{B_{\mathbb {R}}})=\{(0,0)\}\subset \mathcal {Z}(g|_{B_{\mathbb {R}}}). \end{aligned}$$

Assume that \(\frac{g}{h}|_{B_{\mathbb {R}}\setminus \{(0,0)\}}\) does not have a real analytic extension in \(B_{\mathbb {R}}.\) Then there are an odd positive integer p and \(c,\lambda ,\eta ,\delta _1>0,\) and an open neighborhood \(\Omega \subset \subset B\) of (0, 0) such that for every holomorphic function \(u:B\rightarrow \mathbb {C}\) with

$$\begin{aligned} u(B_{\mathbb {R}})\subset \mathbb {R} \text{ and } u(0,0)=0, \text{ and } \sup _B|u|<\delta _1, \end{aligned}$$

we have:

  1. (a)

    \(T_{\lambda ,c,\eta ,p}>0\) on \(\mathbb {R}^2\setminus B_{\mathbb {R}},\)

  2. (b)

    the gradient of \(V^u_{\lambda ,c,\eta ,p}\) does not vanish at any point of \(C^u_{\lambda ,c,\eta ,p}(\mathbb {R}),\) which is a real analytic submanifold of B homeomorphic to the unit circle,

  3. (c)

    the complex analytic curve \(A:=C^u_{\lambda ,c,\eta ,p}\cap \Omega \) is irreducible,

  4. (d)

    the set \(Z:=\mathcal {Z}(h)\cap A\) is finite,

  5. (e)

    the restriction \(\frac{g}{h}|_{{A}\setminus Z}\) does not have a holomorphic extension in any neighborhood of (0, 0) in A.

Proof

Choose \(c>0\) so that \(\Sigma _c\subset B\) and \(\mathcal {Z}(h)\cap \mathcal {Z}(Q_c)\cap B\) is a zero-dimensional complex analytic subset of B. Choose \(0<\varepsilon ,R'< R\) satisfying

$$\begin{aligned} \overline{\Delta _{\varepsilon }}\times \overline{\Delta _{R}}\subset B \text{ and } \mathcal {Z}(Q_c|_{\overline{\Delta _{\varepsilon }}\times \overline{\Delta _R}})\subset \overline{\Delta _{\varepsilon }}\times \Delta _{R'}.\hspace{37mm} (\dag ) \end{aligned}$$

Fix a positive \({\lambda }<\varepsilon .\) Choose a disc \(D_0\subset \subset \Delta _{\varepsilon }\setminus \{i{\lambda },-i{\lambda }\}\) centered at 0 and a disc \(D_1\subset \subset \Delta _{\varepsilon }\cap \{z\in \mathbb {C}:\textrm{Im}z>0\}\) centered at \(i{\lambda }\) such that \(D_0\cap D_1\ne \emptyset .\) Define

$$\begin{aligned} \Omega :=(D_0\cup D_1)\times \Delta _R. \end{aligned}$$

Let \(\alpha \) be the greatest common divisor of \(g_{(0,0)},h_{(0,0)}\) in \(\mathcal {O}_2.\) Then the germs \(g_{(0,0)}/\alpha \) and \(h_{(0,0)}/\alpha \) have (nonzero) holomorphic representatives \(\tilde{g}, \tilde{h},\) respectively, defined on some open neighborhood D of \((0,0)\in \mathbb {C}^2\) such that

$$\begin{aligned} \mathcal {Z}(\tilde{g})\cap \mathcal {Z}(\tilde{h})\subset \{ (0,0)\} \end{aligned}$$

and \(\tilde{h}(0,0)=0\) (because \((\tilde{g}/\tilde{h})|_{D_{\mathbb {R}}\setminus \{(0,0)\}}\) does not have a real analytic extension in \(D_{\mathbb {R}}\)). Let \(n_0\) be the positive integer provided in Lemma 2.3 applied to \(\tilde{g}, \tilde{h}.\) Fix an odd positive integer \(p>n_0.\) Now we are ready to prove (a)-(e).

Note that (a) holds for every \(\eta \) small enough.

Let us discuss (b). Let N be a tubular neighborhood of \(\Sigma _c\) relatively compact in \(B_{\mathbb {R}}\) such that the gradient of \(Q_c\) does not vanish at any point of \(\overline{N}.\) Let E be an open simply connected neighborhood of \(B_{\mathbb {R}}\) in B such that \(\frac{1}{x^2+\lambda ^2}=\frac{1}{(x+i\lambda )(x-i\lambda )}\) is bounded on E. Then for small \(\eta \) and \(\delta _1\) (with \(\sup _B|u|<\delta _1\)) the function \(V^u_{\lambda ,c,\eta ,p}\) has a holomorphic extension in E arbitrarily close to \(Q_c|_E.\) Therefore, \(\mathcal {Z}(V^u_{\lambda ,c,\eta ,p})\cap B_{\mathbb {R}}\subset N\) and \(V^u_{\lambda ,c,\eta ,p}|_{\overline{N}}\) is arbitrarily close to \(Q_c|_{\overline{N}}\) in the \(\mathcal {C}^1\) topology. The latter because uniform convergence of holomorphic functions implies the convergence of their derivatives. Now (b) follows by Lemma 2.5.

Let us turn to (c). Apply Lemma 2.2 with \(D=D_1\) and \(a=i{\lambda },\) and

$$\begin{aligned} F(x,y)=\frac{(x+i{\lambda })(Q_c(x,y))^p}{x^p} \end{aligned}$$

to obtain \(\eta _0, \delta _0>0\) such that for every \(0<\eta <\eta _0\) and \(H\in \mathcal {O}(\overline{D_1}\times \overline{\Delta _R})\) with \(\sup _{\overline{D_1}\times \overline{\Delta _R}}|H-F|<\delta _0\) the assertion of Lemma 2.2 holds, that is, \(\Gamma _{\eta ,H}\) is an irreducible complex analytic curve. Let \(\eta _1:=\eta _0\) and let \(\delta _1>0\) so small that for every \(u\in \mathcal {O}(B)\) with \(\sup _B|u|<\delta _1\) the function \(H^u\in \mathcal {O}(\overline{D_1}\times \overline{\Delta _R})\) defined by

$$\begin{aligned} H^u(x,y)=\frac{(x+i{\lambda })(Q_c(x,y)+u(x,y))^p}{x^p} \end{aligned}$$

satisfies \(\sup _{\overline{D_1}\times \overline{\Delta _R}}|H^u-F|<\delta _0.\) Now if \(0<\eta <\eta _1\) and \(\sup _B|u|<\delta _1,\) then

$$\begin{aligned} \Gamma _{\eta , H^u}=C^u_{\lambda ,c,\eta ,p}\cap (D_1\times \Delta _R) \end{aligned}$$

is an irreducible complex analytic curve. The irreducibility of \(\Gamma _{\eta , H^u}\) is clear by Lemma 2.2, and to see the last equality it is sufficient to observe that

$$\begin{aligned} (H^u(x,y)\cdot (x-i\lambda )-\eta )x^p=W^u_{\lambda ,c,\eta ,p}(x,y). \end{aligned}$$

Decreasing \(\eta _1, \delta _1\) we may additionally assume that \(C^u_{\lambda ,c,\eta ,p}\cap (D_0\times \Delta _R)\) has proper projection to \(D_0.\) This is a consequence of \((\dag )\) and the assumption \(D_0\subset \subset \Delta _{\varepsilon }\setminus \{i\lambda ,-i\lambda \}.\)

To prove irreducibility of \(C^u_{\lambda ,c,\eta ,p}\cap \Omega \) (for \(\eta \) and u bounded as above) it is sufficient to check that the set \(\textrm{Reg}(C^u_{\lambda ,c,\eta ,p}\cap \Omega )\) of regular points of the complex analytic curve \(C^u_{\lambda ,c,\eta ,p}\cap \Omega \) is connected. Since \(C^u_{\lambda ,c,\eta ,p}\cap (D_0\times \Delta _R)\) is a branched covering over \(D_0\) we can fix \(a\in D_0\cap D_1\ne \emptyset \) such that the fiber \(\pi _a\) in \(C^u_{\lambda ,c,\eta ,p}\cap (D_0\times \Delta _R)\) over a has maximal cardinality (in particular it contains only regular points of \(C^u_{\lambda ,c,\eta ,p}\cap \Omega \)). Then every regular point of \(C^u_{\lambda ,c,\eta ,p}\cap (D_0\times \Delta _R)\) can be joined with some point of \(\pi _a\) by a path in \(\textrm{Reg}(C^u_{\lambda ,c,\eta ,p}\cap (D_0\times \Delta _R)).\) Since \(C^u_{\lambda ,c,\eta ,p}\cap (D_1\times \Delta _R)\) is irreducible, each point of \(\pi _a\) can be joined with every regular point of \(C^u_{\lambda ,c,\eta ,p}\cap (D_1\times \Delta _R)\) by a path in \(\textrm{Reg}(C^u_{\lambda ,c,\eta ,p}\cap (D_1\times \Delta _R)).\) Hence \(\textrm{Reg}(C^u_{\lambda ,c,\eta ,p}\cap \Omega )\) is connected proving (c).

To prove (d) recall that \(\mathcal {Z}(h)\cap \mathcal {Z}(Q_c)\cap B\) is a zero-dimensional complex analytic subset of B. Let \(E\subset \subset B\) be an open neighborhood of the origin such that \(\frac{1}{x^2+\lambda ^2}\) is bounded on E. Clearly, for \(\eta , \delta _1\) small enough, \(\mathcal {Z}(h)\cap C^u_{\lambda ,c,\eta ,p}\cap E\) is a zero-dimensional complex analytic subset of E. In particular, h does not vanish identically on any irreducible component of \(C^u_{\lambda ,c,\eta ,p}\) that has a nonempty intersection with E. Let \(\Lambda \) be the irreducible component of \(C^u_{\lambda ,c,\eta ,p}\) containing the irreducible complex analytic curve \(A=C^u_{\lambda ,c,\eta ,p}\cap \Omega \) (which in turn contains the origin). Since h does not vanish identically on \(\Lambda \) and \(\Omega \subset \subset B,\) the set \(\mathcal {Z}(h)\cap \Lambda \cap \Omega \) is finite, which completes (d).

Let us prove (e). First observe that the zero-set of the gradient of \(W^u_{\lambda , c,\eta ,p}\) in \(C^u_{\lambda ,c,\eta ,p}\cap \Omega \) is nowhere dense in \(C^u_{\lambda ,c,\eta ,p}\cap \Omega \) for small \(\eta , \delta _1\). In view of (c), it is sufficient to observe that the gradient does not vanish at some point of \(C^u_{\lambda ,c,\eta ,p}\cap \Omega .\) This in turn is an immediate consequence of (b) and Lemma 2.4. It follows that the complex analytic germ of \(W^u_{\lambda ,c,\eta ,p}\) at (0, 0) does not have multiple factors. Consequently, by (d) and Lemma 2.3, the quotient \(\frac{g}{h}|_{A{\setminus } Z }=\frac{\tilde{g}}{\tilde{h}}|_{A{\setminus } Z}\) does not have a holomorphic extension in any neighborhood of (0, 0) in A. \(\square \)

For any \(Y\subset \mathbb {R}^n\) let \(Y_{\mathbb {C}}\) denote the algebraic complexification of Y in \(\mathbb {C}^n,\) that is, the closure of Y in the Zariski topology of \(\mathbb {C}^n.\) By the complexification of an \(\mathbb {R}\)-linear map \(\mathbb {R}^n\rightarrow \mathbb {R}^m\) we mean its uniquely determined \(\mathbb {C}\)-linear extension \(\mathbb {C}^n\rightarrow \mathbb {C}^m.\) We need the following lemma whose proof is in principle the same as the proof of [1, Lemma 2.8].

Lemma 2.7

(Generic proper projection) Let X be an irreducible nonsingular real algebraic set in \(\mathbb {R}^n,\) with \(\textrm{dim}(X)=m\ge 1,\) and let a be a point in X. Then there exists a linear map \(\mathbb {R}^n\rightarrow \mathbb {R}^m\) whose complexification \(\pi :\mathbb {C}^n\rightarrow \mathbb {C}^m\) satisfies the following conditions:

  1. (i)

    The restriction \(\pi |_{X_{\mathbb {C}}}:X_{\mathbb {C}}\rightarrow \mathbb {C}^m\) is a proper map.

  2. (ii)

    The fiber \((\pi |_{X_{\mathbb {C}}})^{-1}(a)\) does not contain singular points of \(X_{\mathbb {C}},\) and the map \(\pi |_{X_{\mathbb {C}}}\) is transverse to \(\pi (a).\)

Proof of Theorem 2.1. Our aim is to prove analyticity of f in some neighborhood of a in U.

Preparation. Without loss of generality, we are allowed to shrink U if convenient. We may assume that the point \(a \in U\) is the origin in \(\mathbb {R}^n\). By Lemma 2.7, there exists a linear map \(\mathbb {R}^n \rightarrow \mathbb {R}^2\) whose complexification \(\pi :\mathbb {C}^n\rightarrow \mathbb {C}^2\) after being restricted to \({X_{\mathbb {C}}}\) is a proper map (hence it has nonempty finite fibers) and is transverse to \((0,0) \in \mathbb {R}^2\subset \mathbb {C}^2\). After a linear coordinate change we may assume that \(\pi :\mathbb {C}^n = \mathbb {C}^2 \times \mathbb {C}^{n-2} \rightarrow \mathbb {C}^2\) is the canonical projection. Now we choose an open bidisc \(B \subset \mathbb {C}^2\) centered at (0, 0) such that

$$\begin{aligned} (\pi |_{X_{\mathbb {C}}})^{-1}(B) = U_1 \cup \cdots \cup U_s, \end{aligned}$$

where the \(U_l\) are pairwise disjoint open subsets of \(X_{\mathbb {C}}\), each \(\pi |_{U_l} :U_l \rightarrow B\) is a biholomorphism, and \(a \in U_1\cap \mathbb {R}^n \subset U\). Let (xyz), where \(z = (z_1, \ldots , z_{n-2})\), be the variables in \(\mathbb {C}^n\). The inverse map \((\pi |_{U_l})^{-1} :B \rightarrow U_l\) is of the form \((x,y) \mapsto (x,y,\varphi ^l(x,y))\), where

$$\begin{aligned} \varphi ^l = (\varphi _1^l, \ldots , \varphi _{n-2}^l) :B \rightarrow \mathbb {C}^{n-2} \end{aligned}$$

is a holomorphic map.

Shrinking U and B we may assume that \(X\cap U_1 = U\) and that for every l,  we have either \(X\cap U_l=\emptyset \) or \(X\cap U_l=(\pi |_{U_l})^{-1}(B_{\mathbb {R}})\) (and then, in particular, \(\varphi ^l(B_{\mathbb {R}})\subset \mathbb {R}^{n-2}\)). Moreover, for some open subset \({\tilde{U}}\) of \(\mathbb {C}^n\) and polynomial functions \(P_1, \ldots , P_{n-2}\) on \(\mathbb {C}^n\) with real coefficients, we have

$$\begin{aligned} \begin{aligned} \det \left( \frac{\partial (P_1, \ldots , P_{n-2})}{\partial (z_1, \ldots , z_{n-2})} (b)\right) \ne 0 \quad \text {for all } b \in U_1,\\ U_1 = X_{\mathbb {C}} \cap {\tilde{U}} = \mathcal {Z}(P_1) \cap \cdots \cap \mathcal {Z}(P_{n-2}) \cap {\tilde{U}}. \end{aligned} \end{aligned}$$
(1)

By construction,

$$\begin{aligned} \tau :B \rightarrow U_1, \quad (x,y) \mapsto (x,y, \varphi ^1(x,y)) \end{aligned}$$

is the inverse of the map \(\pi |_{U_1} :U_1 \rightarrow B\). Note that \(\tau (0,0)=a,\) where a is the origin in \(\mathbb {R}^n\subset \mathbb {C}^n\).

Shrinking UB once again we may assume that the complexifications of gh (which will be denoted by the same letters) are well defined on \(\overline{U_1}\) and each \(\varphi ^l\) is defined on \(\overline{B}.\) From now on, U and B are kept fixed. This completes Preparation.

Claim 2.8

The restriction \(f|_{U \setminus \{a\}}\) has a real analytic extension to U.

Proof of Claim 2.8

Suppose that \(f|_{U \setminus \{a\}}\) does not have a real analytic extension to U. We will construct \(C\in \mathcal {F}(U)\) containing a with \(\textrm{Sing}(C)\subset \{a\}\) such that \(f|_C\) is not a regular function, which contradicts the hypothesis of Theorem 2.1.

Clearly, the restriction \(f \circ \tau |_{B_{\mathbb {R}} {\setminus } \{(0,0)\}}\) does not have a real analytic extension to \(B_{\mathbb {R}}\). Moreover,

$$\begin{aligned} (f \circ \tau )(x,y) = \frac{(g \circ \tau )(x,y)}{(h \circ \tau )(x,y)} \quad \text {for all } (x,y) \in B_{\mathbb {R}}\setminus \{(0,0)\}. \end{aligned}$$

Using Lemma 2.6 with \(g\circ \tau \) and \(h\circ \tau \) we obtain an odd positive integer p and \(c,\lambda ,\eta ,\delta _1>0,\) and an open neighborhood \(\Omega \subset \subset B\) of (0, 0) such that (a)-(e) of that lemma hold. The curve C will be constructed by lifting to X the set of real points of \(C^u_{\lambda ,c,\eta ,p}\) for a suitably chosen u.

We may assume that \(U_l\cap X\ne \emptyset \) exactly for \(l=1,\ldots ,t\le s.\) Let us first discuss the case \(t \ge 2\). Choose a constant \(\varepsilon > 0\) satisfying

$$\begin{aligned} \inf _{2 \le l \le t} \inf _{(x,y) \in \overline{B_{\mathbb {R}}}} \sum _{i=1}^{n-2} (\varphi _i^1(x,y) - \varphi _i^l(x,y))^2 > \varepsilon . \end{aligned}$$
(2)

For \(i=1,\ldots ,n-2\), there exist polynomial functions \(\Phi _i :\mathbb {C}^2 \rightarrow \mathbb {C}\) with real coefficients such that \(\Phi _i(0,0) = \varphi _i^1(0,0)\) and

$$\begin{aligned} \sup _{(x,y)\in {\overline{B}}} \sum _{i=1}^{n-2} |\varphi _i^1(x,y) - \Phi _i(x,y)|^2 < \frac{\varepsilon }{9}. \end{aligned}$$
(3)

Indeed, it is sufficient to define \(\Phi _i\) by truncating the power series of \(\varphi _i^1\) about the origin, which converges uniformly to \(\varphi ^1_i\) on the bidisc \(\overline{B}.\)

Given a positive integer r, we define functions \(L_r, W_r:\mathbb {C}^n\rightarrow \mathbb {C}\), \(V_r:\mathbb {R}^n\rightarrow \mathbb {R}\) by

$$\begin{aligned} L_r(x,y,z)&= \left( \frac{3}{\varepsilon }\sum _{i=1}^{n-2} (z_i - \Phi _i(x,y))^2 \right) ^r,\\ W_r(x,y,z)&= (x^2+{\lambda }^2)(Q_c(x,y) + L_r(x,y,z))^p-\eta x^p,\\ V_r(x,y,z)&=Q_c(x,y)+L_r(x,y,z)-x\root p \of {\frac{\eta }{x^2+{\lambda }^2}.} \end{aligned}$$

Next we denote

$$\begin{aligned} C_r:=\mathcal {Z}(W_r|_X)=\mathcal {Z}(V_r|_X). \end{aligned}$$

It will turn out that the curve C we are looking for can be defined by \(C:=C_r\) for r sufficiently large.

Subclaim 2.8.1. For r large enough, \(C_r\) is a real analytic submanifold of U homeomorphic to the unit circle.

Proof of Subclaim 2.8.1. Using (2), (3) and the triangle inequality for the Euclidean norm in \(\mathbb {R}^{n-2},\) as in [1, Proof of Subclaim 2.10.3], we get

$$\begin{aligned} \inf _{2 \le l \le t} \inf _{(x,y) \in \overline{B_{\mathbb {R}}}} \sum _{i=1}^{n-2} (\varphi _i^l(x,y) - \Phi _i(x,y))^2 > \frac{4\varepsilon }{9}. \end{aligned}$$
(4)

In view of (4), for \(l = 2, \ldots , t\) and \((x,y) \in \overline{B_{\mathbb {R}}}\), we have

$$\begin{aligned} L_r(x,y,\varphi ^l(x,y)) = \left( \frac{3}{\varepsilon }\sum _{i=1}^{n-2} (\varphi _i^l(x,y) - \Phi _i(x,y))^2\right) ^r > \left( \frac{4}{3} \right) ^r. \end{aligned}$$
(5)

By (3), for \((x,y) \in {\overline{B}}\), we obtain

$$\begin{aligned} |L_r(\tau (x,y))| \le \left( \frac{3}{\varepsilon }\sum _{i=1}^{n-2} |\varphi _i^1(x,y) - \Phi _i(x,y)|^2\right) ^r < \left( \frac{1}{3}\right) ^r. \end{aligned}$$
(6)

By (6) we can choose r large enough to ensure that (a)-(e) of Lemma 2.6 hold with \(g\circ \tau ,\) \(h\circ \tau \) and \(u=L_r\circ \tau .\) In particular, \((\mathcal {Z}(W_r\circ \tau ))(\mathbb {R})\) is an analytic submanifold of \(B_{\mathbb {R}}\) homeomorphic to the unit circle.

Let us check that \(C_r\) is an analytic submanifold of U homeomorphic to the unit circle. By Lemma 2.6(a),

$$\begin{aligned} T_{\lambda , c,\eta ,p} > 0 \quad \text {on } \mathbb {R}^2 \setminus B, \end{aligned}$$

which, in combination with the inequality \(L_r|_{\mathbb {R}^n}\ge 0,\) gives

$$\begin{aligned} V_r > 0 \quad \text {on } \mathbb {R}^n \setminus \pi ^{-1}(B). \end{aligned}$$

Moreover, using (5) and increasing r if necessary, we get

$$\begin{aligned} V_r > 0 \quad \text {on } (\pi |_X)^{-1}({\overline{B}}) \setminus U. \end{aligned}$$

Consequently,

$$\begin{aligned} C_r \subset U \quad \text {and} \quad \pi (C_r) = (\pi |_U)(C_r) = \mathcal {Z}(V_r \circ (\tau |_{B_{\mathbb {R}}}))=(\mathcal {Z}(W_r\circ \tau ))(\mathbb {R}). \end{aligned}$$
(7)

Therefore, the curve \(\pi (C_r)\) is an analytic submanifold of \(B_{\mathbb {R}}\) homeomorphic to the unit circle. Since \(\pi |_U :U \rightarrow B_{\mathbb {R}}\) is a real analytic diffeomorphism, the set \(C_r\) is an analytic submanifold of U, homeomorphic to the unit circle. \(\square \)

Subclaim 2.8.2. For r large enough, the singular locus of the real algebraic curve \(C_r\) is contained in \(\{a\}.\)

Proof of Subclaim 2.8.2. By (6) we can choose r large enough to ensure that (a)–(e) of Lemma 2.6 hold with \(g\circ \tau ,\) \(h\circ \tau \) and \(u=L_r\circ \tau .\)

By Lemma 2.6(b), the gradient of \(V_r\circ \tau \) does not vanish at any point of \(\pi (C_r)\). Consequently, by Lemma 2.4, if the gradient of \(W_r \circ \tau \) vanishes at some point \((x,y)\in \pi (C_r),\) then \(x=0.\) Since \(L_r\circ \tau |_{B_{\mathbb {R}}}\) is a real nonnegative function and \(T_{\lambda ,c,\eta ,p}\) is strictly positive on \((\{0\}\times \mathbb {R})\setminus \{(0,0)\},\) we obtain

$$\begin{aligned} \mathcal {Z}(V_r\circ (\tau |_{B_{\mathbb {R}}}))\cap (\{0\}\times \mathbb {R})=\{(0,0)\}. \end{aligned}$$

That is \(\pi (C_r)\cap (\{0\}\times \mathbb {R})=\{(0,0)\}.\) Hence, the gradient of \(W_r\circ \tau \) does not vanish at any point of \(\pi (C_r)\setminus \{(0,0)\}.\) Now, in view of (1), (7) and the fact that \(\pi |_U :U \rightarrow B_{\mathbb {R}}\) is a real analytic diffeomorphism, we obtain

$$\begin{aligned} \textrm{rank} \left( \frac{\partial (W_r, P_1, \ldots , P_{n-2})}{\partial (x,y, z_1, \ldots , z_{n-2})} (b)\right) = n-1 \end{aligned}$$

for all points \(b \in C_r\setminus \{a\}\). Consequently, the algebraic curve \(C_r\) is nonsingular at every point \(b \in C_r {\setminus } \{a\}.\) \(\square \)

Subclaim 2.8.3. For r large enough, the restriction \(f|_{C_r}\) is not a regular function.

Proof of Subclaim 2.8.3. By (6) we can choose r large enough to ensure that (a)–(e) of Lemma 2.6 hold with \(g\circ \tau ,\) \(h\circ \tau \) and \(u=L_r\circ \tau .\) In particular, \(A:=\mathcal {Z}(W_r\circ \tau )\cap \Omega \) is an irreducible complex analytic curve such that \(f\circ \tau |_{{A}\setminus Z}\) does not have a holomorphic extension in any neighborhood of (0, 0) in A,  where \(Z=\mathcal {Z}(h\circ \tau )\cap A\) is finite. Then the complex analytic curve \(\mathcal {Z}(W_r)\cap \tau (\Omega )\) is also irreducible being biholomorphically equivalent to \(A=\mathcal {Z}(W_r\circ \tau )\cap \Omega \). From the finiteness of Z we obtain the finiteness of \(\mathcal {Z}(h)\cap \mathcal {Z}(W_r)\cap \tau (\Omega ).\)

Now assume that \(f|_{C_r}\) is a regular function. Then there exist \(w,v\in \mathbb {R}[x,y,z_1,\ldots ,z_{n-2}]\) such that \(\mathcal {Z}(v)\cap X=\emptyset \) and

$$\begin{aligned} f|_{C_r\setminus \{a\}}=\frac{g}{h}|_{C_r\setminus \{a\}}=\frac{w}{v}|_{C_r\setminus \{a\}}. \end{aligned}$$
(8)

Then \(\frac{w}{v}|_{C_r\cap \tau (\Omega )}\) has a holomorphic extension in \(\mathcal {Z}(W_r)\cap \tau (\Omega ){\setminus } S,\) where S is a finite set with \(a\notin S\). By the identity principle, using (8) and the irreducibility of \(\mathcal {Z}(W_r)\cap \tau (\Omega ),\) we have

$$\begin{aligned} \frac{w}{v}|_{\mathcal {Z}(W_r)\cap \tau (\Omega )\setminus (S\cup \mathcal {Z}(h))}=\frac{g}{h}|_{{\mathcal {Z}(W_r)\cap \tau (\Omega )\setminus (S\cup \mathcal {Z}(h))}}. \end{aligned}$$

Thus \(\frac{g}{h}|_{{\mathcal {Z}(W_r)\cap \tau (\Omega )\setminus \mathcal {Z}(h)}}\) has a holomorphic extension through a and, consequently, \(\frac{g\circ \tau }{h\circ \tau }|_{A\setminus Z}\) has a holomorphic extension through (0, 0) in A. This contradicts the assertion (e) of Lemma 2.6 (with \(u=L_r\circ \tau \)). \(\square \)

Recall that we are studying the case when the number t of \(U_l\)’s for which \(U_l\cap X\ne \emptyset \) is at least 2. By Subclaims 2.8.1, 2.8.2 and 2.8.3, the curve \(C:=C_r,\) for r large enough, satisfies the following properties: \(C\in \mathcal {F}(U),\) \(a\in C,\) \(\textrm{Sing}(C)\subset \{a\}\) and \(f|_C\) is not a regular function (at a).

Now assume that \(t=1.\) Take \(u:=0.\) Regarding \(W^u_{\lambda ,c,\eta ,p}\) as a function on \(\mathbb {C}^n\) independent of the last \(n-2\) variables define

$$\begin{aligned} C:=\mathcal {Z}(W^u_{\lambda ,c,\eta ,p}|_X). \end{aligned}$$

Clearly,

$$\begin{aligned} C=(\pi |_X)^{-1}(C^u_{\lambda ,c,\eta ,p}(\mathbb {R})) \end{aligned}$$

hence, by Lemma 2.6(b) and the assumption \(t=1\), the real algebraic curve C is an analytic manifold homeomorphic to the unit circle. Furthermore, by Lemmas 2.6(b) and 2.4, the gradient of \(W^u_{\lambda ,c,\eta ,p}\) does not vanish at any point of \(C^u_{\lambda ,c,\eta ,p}(\mathbb {R})\setminus \{(0,0)\},\) so \(\textrm{Sing}(C)\subset \{a\}.\)

To complete the proof of Claim 2.8, it remains to check that \(f|_C\) is not a regular function. Suppose \(f|_C\) is a regular function. Then the restriction \(f\circ \tau |_{C^u_{\lambda ,c,\eta ,p}\setminus \mathcal {Z}(h\circ \tau )}=\frac{g\circ \tau }{h\circ \tau }|_{C^u_{\lambda ,c,\eta ,p}\setminus \mathcal {Z}(h\circ \tau )}\) has a holomorphic extension in a neighborhood of (0, 0) in \(C^u_{\lambda ,c,\eta ,p},\) which can be proved by the argument analogous to that used above for the case \(t\ge 2.\) As above, we obtain a contradiction with Lemma 2.6(e) (with \(u=0\)). \(\square \)

Completion of the proof of Theorem 2.1

By Claim 2.8, the restriction \(f|_{U \setminus \{a\}}\) has a real analytic extension to U, say, \(F :U \rightarrow \mathbb {R}\). We need to check that \(f(a) = F(a)\). Let C be the curve in \(\mathcal {F}(U)\) containing a with \(\textrm{Sing}(C)\subset \{a\},\) constructed in the proof of Claim 2.8. Then the restrictions \(f|_C\) and \(F|_C\) are real analytic functions which coincide on \(C \setminus \{a\}.\) Hence we get \(f(a) = F(a)\), as required. \(\square \)

3 Properties of \(G_p\) and \(H_p\)

Recall that the polynomials \(G_p, H_p\) are introduced in (1.4.1). First we discuss some properties of the real algebraic curves \(D_p\) defined in (1.4.2).

Lemma 3.1

Let \(p\ge 3\) be an odd integer. Then \(D_p\) is a real analytic manifold homeomorphic to the unit circle.

Proof

Let \(\tilde{D}_p\) be the translate of \(D_p\) by the vector \((-1,0).\) We show that \(\tilde{D}_p\) is a real analytic manifold homeomorphic to the unit circle. Clearly,

$$\begin{aligned} \tilde{D}_p=\{(x,y)\in \mathbb {R}^2:\tilde{G}_p(x,y)=0\}, \end{aligned}$$

where

$$\begin{aligned} \tilde{G}_p(x,y)= & {} ((x+1)^2+1)(y^2+x^2-1)^p-\frac{(x+1)^p}{10^p}\\{} & {} =\left( (\root p \of {(x+1)^2+1})(y^2+x^2-1)\right) ^p-\frac{(x+1)^p}{10^p}. \end{aligned}$$

Define

$$\begin{aligned} \tilde{F}_p(x,y)=y^2+x^2-1-\frac{x+1}{10\root p \of {(x+1)^2+1}} \end{aligned}$$

and note that

$$\begin{aligned} \tilde{D}_p=\{(x,y)\in \mathbb {R}^2:\tilde{F}_p(x,y)=0\}. \end{aligned}$$

Take any \((\alpha ,\beta )\in \mathbb {R}^2\) such that \({\alpha ^2+\beta ^2}=1.\) Consider the line in \(\mathbb {R}^2\) passing through the origin parameterized by \(t\mapsto (\alpha t,\beta t).\) We check that the line intersects \(\tilde{D}_p\) at precisely two points, one for a positive and one for a negative value of t. Composing \(\tilde{F}_p\) with the parameterization we obtain

$$\begin{aligned} f_{\alpha }(t)=t^2-1-\frac{t\alpha +1}{10\root p \of {(t\alpha +1)^2+1}}. \end{aligned}$$

Elementary computations give

$$\begin{aligned} \left| \frac{t\alpha +1}{10\root p \of {(t\alpha +1)^2+1}}\right| \le \left| \frac{t\alpha +1}{10} \right| \le \frac{9}{40} \text{ for } (t,\alpha )\in \left[ -\frac{5}{4},\frac{5}{4}\right] \times [-1,1]. \end{aligned}$$

Therefore

$$\begin{aligned}{} & {} f_{\alpha }(t)\ne 0 \text{ for } t\in \left[ -\frac{3}{4},\frac{3}{4}\right] ,\\{} & {} f_{\alpha }\left( -\frac{5}{4}\right)>0, f_{\alpha }\left( -\frac{3}{4}\right)<0 \text{ and } f_{\alpha }\left( \frac{3}{4}\right) <0, f_{\alpha }\left( \frac{5}{4}\right) >0. \end{aligned}$$

Since

$$\begin{aligned}{} & {} f_{\alpha }'(t)<0 \text{ for } t\in \left( -\infty ,-\frac{3}{4}\right] ,\\{} & {} f_{\alpha }'(t)>0 \text{ for } t\in \left[ \frac{3}{4},+\infty \right) \end{aligned}$$

(as checked below), we obtain that \(f_{\alpha }\) has precisely two roots: \(t_0\in [-\frac{5}{4},-\frac{3}{4}]\) and \(t_1\in [\frac{3}{4},\frac{5}{4}]\) such that

$$\begin{aligned} f'_{\alpha }(t_0)\ne 0 \text{ and } f'_{\alpha }(t_1)\ne 0. \end{aligned}$$

Consequently, the gradient of \(\tilde{F}_p\) does not vanish at any point of \(\tilde{D}_p,\) so \(\tilde{D}_p\) is a real analytic manifold homeomorphic to the unit circle.

To examine the derivative \(f'_{\alpha }\) consider the function

$$\begin{aligned} h(s)=\frac{s}{10\root p \of {s^2+1}}=\frac{1}{10}s(s^2+1)^{-\frac{1}{p}}. \end{aligned}$$

We have

$$\begin{aligned} |h'(s)|\le \frac{1}{10}(s^2+1)^{- \frac{1}{p}}+\frac{1}{10}s\frac{1}{p}(s^2+1)^{-\frac{1}{p}-1}2s\le \frac{1}{10}+\frac{1}{10}=\frac{1}{5}. \end{aligned}$$

Since \(f_{\alpha }(t)-(t^2-1)=-h(t\alpha +1),\) we obtain \(|f'_{\alpha }(t)-2t|\le \frac{1}{5},\) which clearly implies \(f_{\alpha }'(t)<0 \text{ for } t\in (-\infty ,-\frac{3}{4}]\) and \(f_{\alpha }'(t)>0 \text{ for } t\in [\frac{3}{4},+\infty ).\) \(\square \)

The following lemma is a variant of Lemma 2.2.

Lemma 3.2

Let \(P\in \mathbb {C}[x][y]\) be a monic polynomial in y. Let \(Q\in \mathbb {C}[x]\) satisfy \(Q(i)\ne 0\) and \(Q(-i)\ne 0.\) Then the complex analytic curve

$$\begin{aligned} V=\{(x,y)\in \mathbb {C}^2:(x^2+1)P(x,y)-Q(x)=0\} \end{aligned}$$

is irreducible.

Proof

It is sufficient to prove that the set of regular points of V is connected. Let E be an open disc centered at i of radius \(\frac{1}{2}.\) First observe that every point in \(\textrm{Reg}(V)\) can be connected by a path with some point in \(V\cap (E\times \mathbb {C}).\) To this end, note that V is a branched covering over \(\mathbb {C}\setminus \{-i,i\}.\) Let \(\pi :V\rightarrow \mathbb {C}{\setminus }\{-i,i\}\) and \(Z\subset \mathbb {C}\setminus \{-i,i\}\) denote the covering projection and the branch locus, respectively. Every connected component of \(V\setminus \pi ^{-1}(Z)\) is a complex analytic manifold with surjective projection onto \((\mathbb {C}{\setminus }\{-i,i\}){\setminus } Z.\) Moreover, \(((\mathbb {C}{\setminus }\{-i,i\}){\setminus } Z)\cap E\ne \emptyset ,\) so every point in \(V\setminus \pi ^{-1}(Z)\) can be connected by a path with some point in \(V\cap (E\times \mathbb {C}).\) Clearly, every point in \(\textrm{Reg}(V)\) can be connected with some point in \(V\setminus \pi ^{-1}(Z),\) which proves the observation.

Now to complete the proof of Lemma 3.2 it is enough to show that the complex analytic curve \(V\cap (E\times \mathbb {C})\) is irreducible. Choose \(R>0\) such that

$$\begin{aligned} \inf _{E\times (\mathbb {C}\setminus \Delta _R)}|P(x,y)|>0 \text{ and } \inf _{\partial E\times (\mathbb {C}\setminus \Delta _R)}|(x^2+1)P(x,y)|>\sup _{\partial E}|Q(x)|. \hspace{11mm}(*) \end{aligned}$$

Clearly \(V\cap (\partial E\times (\mathbb {C}\setminus \Delta _R))=\emptyset ,\) so \(V\cap (E\times (\mathbb {C}\setminus \Delta _R))\) has proper projection to \(\mathbb {C}\setminus \Delta _R.\) Fix any \(y\in \mathbb {C}\setminus \Delta _R.\) By \((*)\), i is the only root of \(x\rightarrow (x^2+1)P(x,y)\) in E. Hence, by the Rouché theorem and again by \((*)\), \(x\rightarrow (x^2+1)P(x,y)-Q(x)\) has one root in E and this root is single. We have proved that \(V\cap (E\times (\mathbb {C}\setminus \Delta _R))\) is a one-sheeted covering over \(\mathbb {C}\setminus \Delta _R.\)

Now observe that every irreducible component D of \(V\cap (E\times \mathbb {C})\) intersects \(E\times (\mathbb {C}\setminus \Delta _R).\) Indeed, otherwise D would have a proper and hence surjective projection to E, which is impossible as \(V\cap (\{i\}\times \mathbb {C})=\emptyset .\) Consequently, if \(V\cap (E\times \mathbb {C})\) is reducible, then \(V\cap (E\times (\mathbb {C}\setminus \Delta _R))\) cannot be a one-sheeted covering over \(\mathbb {C}\setminus \Delta _R\). \(\square \)

Corollary 3.3

Let \(p\ge 3\) be an odd integer. Then the polynomials \(G_p\) and \(H_p\) are irreducible in \(\mathbb {C}[x,y],\) hence also in \(\mathbb {R}[x,y]\).

Proof

By Lemma 3.2, complex algebraic curves

$$\begin{aligned} \{(x,y) \in \mathbb {C}^2 : G_p(x,y) = 0\}, \quad \{(x,y) \in \mathbb {C}^2 : H_p(x,y) = 0\} \end{aligned}$$

in \(\mathbb {C}^2\) are irreducible. By Hilbert’s Nullstellensatz, \(G_p\) (resp. \(H_p\)) is a constant multiple of a power of an irreducible polynomial in \(\mathbb {C}[x,y]\). The exponent of this power is 1 because the gradient of \(G_p\) (resp. \(H_p\)) is nonzero at

$$\begin{aligned} \left( 1, \sqrt{1 + \frac{1}{10 \root p \of {2}}}\right) \in D_p \quad \text {(resp. }\left( 1, {\frac{1}{\root p \of {2}}}\right) \in E_p\text {), } \end{aligned}$$

where the indicated roots are real roots. \(\square \)

4 Proofs of the main theorems

Let X be an irreducible nonsingular algebraic set in \(\mathbb {R}^n\) and let \(f:U\rightarrow \mathbb {R}\) be a function defined on a nonempty open subset U of X. We say that f admits a rational representation if there exist two polynomial functions \(G,H:\mathbb {R}^n\rightarrow \mathbb {R}\) such that

$$\begin{aligned} f(x)=\frac{G(x)}{H(x)} \text{ for } \text{ all } x\in U\setminus \mathcal {Z}(H) \end{aligned}$$

and H is not identically zero on X (no restriction on the values of f on the set \(U\cap \mathcal {Z}(H)\) is imposed). If f is real analytic and admits a rational representation, then f is regular on U (this is well known, see for example [1, Lemma 3.1]).

As already noted in Sect. 1, Theorem 1.1 is a special case of Theorem 1.3.

Proof of Theorem 1.3

It is sufficient to prove that (c) implies (a). Suppose that (c) holds. First assume that \(\textrm{dim}X=2.\) Let \(U_0\) be a connected component of U. By [14, Theorem 1.3] the restriction \(f|_{U_0}\) admits a rational representation, so there exist two polynomial functions \(G,H:\mathbb {R}^n\rightarrow \mathbb {R}\) such that the set \(P:=U_0\cap \mathcal {Z}(H)\) is finite and the restrictions \(g:=G|_{U_0}, h:=H|_{U_0}\) are real analytic functions on \(U_0\) with

$$\begin{aligned} \mathcal {Z}(h)=P \text{ and } f(x)=\frac{g(x)}{h(x)} \text{ for } \text{ all } x\in U_0\setminus P. \end{aligned}$$

By Theorem 2.1, the function f is real analytic in a neighborhood of every point in P. Consequently, \(f|_{U_0}\) is a real analytic function. It follows that f is real analytic on U,  the connected component \(U_0\) being arbitrary. Thus, according to [1, Lemma 3.5], f is a regular function on U. In other words, (c) implies (a) for \(\textrm{dim}X=2.\) Therefore, by [1, Theorem 1.7], (c) implies (a) also for \(\textrm{dim}X\ge 3.\) \(\square \)

Proof of Theorem 1.5

It is sufficient to prove that (c) implies (a) and that (d) implies (a). Our proof is valid simultaneously for both cases.

To begin with consider \(n=2\). By [1, Theorems 3.2 and 3.3], there exist polynomials GH in \(\mathbb {R}[x,y]\) with the zero set \(\mathcal {Z}(H)\) finite and \(f= G/H\) on \( \mathbb {R}^2{\setminus } \mathcal {Z}(H)\). The conclusion readily follows if H is a constant polynomial or \(G=0\). Henceforth we assume that H is not constant, \(G\ne 0,\) and GH are relatively prime in \(\mathbb {R}[x,y]\). It suffices to prove that the zero set \(\mathcal {Z}(H)\) is empty.

Let us first show that (0, 0) is not in \(\mathcal {Z}(H)\). Supposing \(H(0,0)=0\), a contradiction can be obtained as follows. Let \(F_p\) stand for either \(G_p\) or \(H_p\), and set \(C_p:= \mathcal {Z}(F_p)\). By assumption, \((G/H)|_{C_p\setminus \mathcal {Z}(H)}\) extends to a regular function on \(C_p\). Thus, there exist polynomials \(A_p, B_p\) in \(\mathbb {R}[x,y]\) such that

$$\begin{aligned} (B_pG - A_pH)|_{C_p} = 0 \quad \text {and}\quad \mathcal {Z}(B_p) \cap C_p = \emptyset . \end{aligned}$$

Since \(\dim \mathcal {Z}(F_p) = 1\) and, by Corollary 3.3, the polynomial \(F_p\) is irreducible, the ideal of all polynomials in \(\mathbb {R}[x,y]\) vanishing on \(C_p\) is generated by \(F_p\). Consequently,

figure a

for some \(U_p\) in \(\mathbb {R}[x,y]\). To indicate that a polynomial P in \(\mathbb {R}[x,y]\) is regarded as a polynomial in \(\mathbb {C}[x,y]\), we will write \(P_{\mathbb {C}}\); so \(\mathcal {Z}(P_{\mathbb {C}}) = \{(x,y) \in \mathbb {C}^2: P_{\mathbb {C}}(x,y)=0\}\). Since the polynomials GH are relatively prime in \(\mathbb {R}[x,y]\), they are also relatively prime in \(\mathbb {C}[x,y]\), and therefore the intersection \(\mathcal {Z}(G_{\mathbb {C}}) \cap \mathcal {Z}(H_{\mathbb {C}})\) is a finite set. In particular, \(G_{\mathbb {C}}\) does not vanish on any irreducible component of \(\mathcal {Z}(H_{\mathbb {C}})\). Let Z be an irreducible component of \(\mathcal {Z}(H_{\mathbb {C}})\) containing (0, 0), and let \(\varphi :Z' \rightarrow Z\) be a normalization of Z. Thus, \(Z'\) is an irreducible nonsingular complex algebraic curve, and \(\varphi \) is a surjective complex regular map. Choose a point b in \(Z'\) such that \(\varphi (b) = (0,0)\). According to (\(*\)), we get

$$\begin{aligned} (B_pG)_{\mathbb {C}} \circ \varphi = (U_p F_p)_{\mathbb {C}} \circ \varphi \end{aligned}$$

on \(Z'\). By construction, \((B_p)_{\mathbb {C}}(\varphi (b)) \ne 0\) and \(G_{\mathbb {C}} \circ \varphi \) is not identically 0 on \(Z'\), and therefore the order of \((B_pG)_{\mathbb {C}} \circ \varphi \) at b is a nonnegative integer independent of p. On the other hand, by definition of \(F_p\), the order of \((U_pF_p)_{\mathbb {C}} \circ \varphi \) at b is at least p. This is a contradiction because p is an arbitrary positive odd integer.

Since the collection \(\mathcal {G}(\mathbb {R}^2)\) (resp. \(\mathcal {H}(\mathbb {R}^2)\)) contains all translates of the curves of the form \(D_p\) (resp. \(E_p\)), the reasoning presented above gives \(\mathcal {Z}(H) = \emptyset \), as required.

Now consider \(n \ge 3\), and let Q be an affine 2-plane in \(\mathbb {R}^n\). We have just proved that the restriction \(f|_Q\) is a regular function. By [5, Theorem 1], f is real analytic on \(\mathbb {R}^n\). Since, by [1, Theorems 3.2 and 3.3], f admits a rational representation, we conclude that f is regular on \(\mathbb {R}^n\). \(\square \)