1 Introduction

The classical theorem of Sard [38] asserts that for a \(C^2\)-smooth function f in a planar domain \(\Omega \) almost every value is a regular value. That is, for almost all \(t\in {\mathbb {R}}\) the set \(f^{-1}(t)\) does not intersect the critical set of f, and hence, \(f^{-1}(t)\) is an embedded 1-dimensional \(C^2\)-smooth submanifold of the plane. This theorem is sharp, in the sense that the \(C^2\)-smoothness cannot be relaxed to \(C^1\)-smoothness, as was shown by Whitney [42]. Here and elsewhere in the paper “1-dimensional” refers to the topological dimension.

In fact, Sard’s theorem and some of the other theorems that we quote below have more general statements that hold for maps defined in subsets of \({\mathbb {R}}^n\), taking values in \({\mathbb {R}}^m\), and having appropriate regularity. In order to facilitate the comparison to our results, we will only give formulations in the case of real-valued functions defined in planar domains.

Several generalizations and improvements of Sard’s theorem have been proved since the original theorem was published. In particular, Dubovitskii [9] proved that a \(C^1\)-smooth function f in a planar domain has the property that for almost every value \(t\in {\mathbb {R}}\) the set \(f^{-1}(t)\) intersects the critical set in a set of Hausdorff 1-measure zero. De Pascale [8] extended the conclusion of Sard’s theorem to Sobolev functions of the class \(W^{2,p}\), where \(p>2\). For other versions of Sard’s theorem in the setting of Hölder and Sobolev spaces see [4, 5, 13, 33].

Now, we turn our attention to the structure of the level sets of functions, instead of discussing the critical set. Theorem 1.6 in [5] states that if \(f\in W^{1,p}_{\mathrm{loc}}({\mathbb {R}}^2)\), then there exists a Borel representative of f such that for almost every \(t\in {\mathbb {R}}\) the level set \(f^{-1}(t)\) is equal to \(Z\cup \bigcup _{j\in {\mathbb {N}}} K_j\), where \({\mathcal {H}}^1(Z)=0\), \(K_j\subset K_{j+1}\), and \(K_j\) is contained in an 1-dimensional \(C^1\)-smooth submanifold \(S_j\) of \({\mathbb {R}}^2\) for \(j\in {\mathbb {N}}\).

Under increased regularity, Bourgain et al. [6] proved that if \(f\in W^{2,1}({\mathbb {R}}^2)\) then for almost every \(t\in {\mathbb {R}}\) the level set \(f^{-1}(t)\) is an 1-dimensional \(C^1\)-smooth manifold. We direct the reader to [6] and the references therein for a more detailed exposition of generalizations of Sard’s theorem.

Our first theorem is the following:

Theorem 1.1

Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and \(u:\Omega \rightarrow {\mathbb {R}}\) be a continuous function that lies in \(W^{1,p}_{\mathrm{loc}}(\Omega )\) for some \(1\le p\le \infty \). Then for almost every \(t\in {\mathbb {R}}\) the level set \(u^{-1}(t)\) has locally finite Hausdorff 1-measure and each component of \(u^{-1}(t)\) is either a point, or a Jordan curve, or it is homeomorphic to an interval.

Recall that a Jordan curve is the homeomorphic image of the unit circle. This result generalizes a result of Alberti et al. [1, Theorem 2.5(iv)], who obtained the same conclusion under the weaker assumptions that u is Lipschitz and compactly supported.

Under no further regularity assumptions, the level sets of Sobolev or even Lipschitz functions are not 1-dimensional manifolds in general. Recall that a (possibly disconnected) set \(J\subset {\mathbb {R}}^2\) is an embedded 1-dimensional sumbanifold of \({\mathbb {R}}^2\) if for each point \(x\in J\) there exists an open set U in \({\mathbb {R}}^2\) and a homeomorphism \(\phi :U\rightarrow {\mathbb {R}}^2\) such that \(\phi (J\cap U)={\mathbb {R}}\). In particular, \(J\cap U\) is connected. By the classification of 1-manifolds (see Theorem 5.1), each component of J is homeomorphic to \(S^1\) or to \({\mathbb {R}}\).

It was proved by Konyagin [20] that there exists a \(C^1\)-smooth function \(f:{\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) such that the level set \(f^{-1}(t)\) has uncountably many components for a set of values \(t\in {\mathbb {R}}\) of positive measure. In particular, for such values t there are points of \(f^{-1}(t)\) whose open neighborhoods intersect infinitely many components of \(f^{-1}(t)\). Hence, \(f^{-1}(t)\) is not a 1-dimensional submanifold of \({\mathbb {R}}^2\) for a set of \(t\in {\mathbb {R}}\) of positive measure.

Thus, we need to impose some more restrictions on a Sobolev or Lipschitz function \(f:{\mathbb {R}}^2\rightarrow {\mathbb {R}}\) so that its level sets are 1-dimensional manifolds. We pose some topological restriction:

Definition 1.2

Let \(\Omega \subset {\mathbb {R}}^n\) be an open set and \(f:\Omega \rightarrow {\mathbb {R}}\) be a continuous function. We say that f is monotone if for each open set \(U\subset \subset \Omega \) the maximum and the minimum of f on \(\overline{U}\) are attained on \(\partial U\). That is,

$$\begin{aligned} \max _{ \overline{U}}f= \max _{\partial U}f \,\,\, \text {and} \,\,\, \min _{\overline{U}}f=\min _{\partial U}f. \end{aligned}$$

Here the notation \(U\subset \subset \Omega \) means that \(\overline{U}\) is compact and is contained in \(\Omega \). This definition can also be extended to real-valued functions defined in a locally compact metric space X.

Remark 1.3

If f extends continuously to \(\overline{\Omega }\), then we may take \(U\subset \subset \overline{\Omega }\) in the above definition.

Monotonicity in Definition 1.2 is in the sense of Lebesgue [21]. There are other more general notions of monotonicity; for example there is a notion of weak monotonicity due to Manfredi [27] that agrees with Lebesgue monotonicity for the spaces \(W^{1,p}\), \(p\ge 2\). We now state our main theorem:

Theorem 1.4

Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and \(u:\Omega \rightarrow {\mathbb {R}}\) be a continuous monotone function that lies in \(W^{1,p}_{\mathrm{loc}}(\Omega )\) for some \(1\le p\le \infty \). Then for almost every \(t\in {\mathbb {R}}\) the level set \(u^{-1}(t)\) has locally finite Hausdorff 1-measure and it is an embedded 1-dimensional topological submanifold of \({\mathbb {R}}^2\).

Monotone Sobolev functions appear as infimizers of certain energy functionals, not only in the Euclidean setting, such as \({\mathcal {A}}\)-harmonic functions [15], but also in metric spaces. For example, they appear as real and imaginary parts of “uniformizing” quasiconformal mappings into the plane from metric spaces X that are homeomorphic to the plane; see [36, 37]. Our proof is partly topological and can be applied also in these settings, leading to the understanding of the level sets of the “uniformizing” map, which is crucial for proving injectivity properties. The results in this paper can be used to simplify some of the arguments in [36]. More specifically, our techniques yield the following result in the metric space setting:

Theorem 1.5

Let (Xd) be a metric space homeomorphic to \({\mathbb {R}}^2\) and \(\Omega \) be an open subset of X. Suppose that \(u:\Omega \rightarrow {\mathbb {R}}\) is a continuous function with the property that for almost every \(t\in {\mathbb {R}}\) the level set \(u^{-1}(t)\) has locally finite Hausdorff 1-measure (in the metric of X). Then for almost every \(t\in {\mathbb {R}}\) each component of the level set \(u^{-1}(t)\) is either a point, or a Jordan curve, or it is homeomorphic to an interval.

If, in addition, u is monotone, then for almost every \(t\in {\mathbb {R}}\) the level set \(u^{-1}(t)\) is an embedded 1-dimensional topological submanifold of X.

Monotone Sobolev functions enjoy some important further regularity properties. For example, if \(f=(u_1,\dots ,u_n):{\mathbb {R}}^n\rightarrow {\mathbb {R}}^n\) is continuous and monotone, in the sense that the coordinate functions \(u_i\) are, and \(f\in W^{1,n}_{\mathrm{loc}}({\mathbb {R}}^n)\), then f is differentiable almost everywhere and it has the Luzin property, that is, it maps null sets to null sets; see [16, Lemma 1.3]. For this reason, the approximation of Sobolev functions u in the Sobolev norm by locally weakly monotone Sobolev functions \(u_n\), \(n\in {\mathbb {N}}\), has been established in [16, Theorem 1.3]; a property of the approximants \(u_n\) in this theorem that is important in applications is that the gradient of \(u_n\) vanishes on the set \(\{u\ne u_n\}\). As it is pointed out in that paper, in some cases the approximating functions cannot be taken to be smooth, not even continuous.

As an application of Theorem 1.4 we give the following approximation theorem:

Theorem 1.6

Let \(\Omega \subset {\mathbb {R}}^2\) be a bounded open set and \(u :\Omega \rightarrow {\mathbb {R}}\) be a continuous monotone function that lies in \(W^{1,p}(\Omega )\) for some \(1< p <\infty \). Then there exists \(\alpha >0\) and a sequence \(\{u_n\}_{n\in {\mathbb {N}}}\) of monotone functions in \(\Omega \) such that

  1. (A)

    \(u_n\) is \(C^{1,\alpha }\)-smooth in \(\Omega \), \(n\in {\mathbb {N}}\),

  2. (B)

    \(u_n\) converges uniformly to u in \(\Omega \) as \(n\rightarrow \infty \),

  3. (C)

    \(u_n\) converges to u in \(W^{1,p}(\Omega )\) as \(n\rightarrow \infty \),

  4. (D)

    \(\Vert \nabla u_n\Vert _{L^p(\Omega )}\le \Vert \nabla u\Vert _{L^p(\Omega )}\), \(n\in {\mathbb {N}}\),

  5. (E)

    \(u_n-u \in W^{1,p}_0(\Omega )\), \(n\in {\mathbb {N}}\).

In fact, \(u_n\) may be taken to be p-harmonic on a subset of \(\Omega \) having measure arbitrarily close to full and \(C^\infty \)-smooth, except at a discrete subset of \(\Omega \). If \(p=2\), then the functions \(u_n\) can be taken to be \(C^\infty \)-smooth in \(\Omega \).

Here, a function \(f:\Omega \rightarrow {\mathbb {R}}\) is \(C^{1,\alpha }\)-smooth if it has derivatives of first order that are locally \(\alpha \)-Hölder continuous.

We remark that standard mollification with a smooth kernel does not produce a monotone function and one has to use the structure of the level sets of the monotone function in order to construct its approximants. Therefore, Theorem 1.4 provides us with a powerful tool in this direction.

For our proof we follow the strategy of [18] and [19], where it is proved that Sobolev homeomorphisms of planar domains in the class \(W^{1,p}\), \(p>1\), can be approximated by \(C^\infty \)-smooth diffeomorphisms uniformly and in the Sobolev norm. Namely, we partition the domain \(\Omega \) into disjoint regions and we replace the function u with a p-harmonic function in each region, having the same boundary values as u. In our proof we have to deal with further technicalities, not present in the above mentioned results for homeomorphisms, which are related to the fact that our approximants \(u_n\) might have critical points. Indeed, \(u_n\) will be p-harmonic in a large subset of \(\Omega \) and it is known that at a critical point a p-harmonic function (\(p\ne 2\)) is only expected to be \(C^{1,\alpha }\)-smooth, rather than \(C^{\infty }\)-smooth.

The main motivation for Theorem 1.6 was to study regularity properties of a certain type of infimizers that appear in the setting of Sierpiński carpets and are called carpet-harmonic functions; see [34, Chapter 2]. Namely, these infimizers are restrictions of monotone Sobolev functions (under some geometric assumptions) and the approximation Theorem 1.6 implies some absolute continuity properties for these functions. We will not discuss these applications any further in this paper.

We pose some questions for further study. One of the reasons that we were not able to prove approximation by smooth functions for all \(p\in (1,\infty )\) in Theorem 1.6 was the presence of critical points of p-harmonic functions.

Question 1.7

If u is a p-harmonic function on a planar open set V containing only one critical point \(x_0\), does there exist a \(C^\infty \)-smooth monotone function \({\widetilde{u}}\) on V that agrees with u outside a small neighborhood of \(x_0\) and approximates u uniformly and in the \(W^{1,p}\) norm, when \(p\ne 2\)?

A positive answer to this question would imply that we may use \(C^\infty \)-smooth functions in Theorem 1.6. It would be very surprising if this fails. By standard regularization of the p-Laplacian, one can approximate u near \(x_0\) uniformly and in the \(W^{1,p}\) norm by \(C^\infty \)-smooth functions \(\overline{u}\). However, it is not clear if one can patch together the functions u and \(\overline{u}\) so as to obtain a smooth and monotone function \({\widetilde{u}}\) on V that equals u near \(\partial V\). Gluing and smoothing monotone functions turn out to be very technical procedures. In Sections 2.3 and 5 we establish several such results that are used extensively in the proof of Theorem 1.6.

Another research direction would be to extend these results to higher dimensions.

Question 1.8

Do analogs of Theorems 1.4 and 1.6 hold in higher dimensions?

The diffeomorphic approximation of Sobolev homeomorphisms is still open in higher dimensions ([19, Question 1.1], [3]). Since the coordinate functions of a homeomorphism are monotone, a first step in studying this problem would be to study the smooth approximation of monotone Sobolev functions as in the above question.

Moreover, it would be interesting to obtain the conclusion of Theorem 1.6 in the case \(p=1\). The technique of Iwaniec et al. [18] does not seem to apply in this case so an alternative method has to be used. Recently, Hencl and Pratelli established the diffeomorphic approximation of \(W^{1,1}\) planar Sobolev homeomorphisms [17], extending thus, the result of [18] to the case \(p=1\). We pose as a question for further study, whether the analogous result holds for monotone functions.

Question 1.9

Can a continuous monotone function of class \(W^{1,1}\) in a planar domain be approximated by smooth monotone functions uniformly and in the Sobolev norm?

We end the introduction with a discussion on functions of bounded variation. By a remarkable result of Mulholland [30, Theorem 1, p. 293], a type of coarea formula holds for any continuous function of bounded variation u defined on a convex planar domain \(\Omega \). In particular, this coarea formula implies that

$$\begin{aligned} \int {\mathcal {H}}^1(u^{-1}(t))\, \mathrm{d}t <\infty . \end{aligned}$$

Hence, almost all level sets of u have finite Hausdorff 1-measure. If \(\Omega \) is any planar domain, not necessarily convex, then we can apply the preceding result to the restriction of u in squares contained in \(\Omega \) and obtain that almost all level sets of u have locally finite Hausdorff 1-measure. Thus, we are precisely in the setting of Theorem 1.5. We now state the version of that theorem for functions of bounded variation:

Theorem 1.10

Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and \(u:\Omega \rightarrow {\mathbb {R}}\) be a continuous function that lies in \(BV_{\mathrm{loc}}(\Omega )\). Then for almost every \(t\in {\mathbb {R}}\) each component of the level set \(u^{-1}(t)\) is either a point, or a Jordan curve, or it is homeomorphic to an interval.

If, in addition, u is monotone, then for almost every \(t\in {\mathbb {R}}\) the level set \(u^{-1}(t)\) is an embedded 1-dimensional topological submanifold of \({\mathbb {R}}^2\).

Of course, this theorem implies Theorems 1.1 and 1.4, but we prefer to state it here, at the end of the Introduction, since it was added after a question of one of the referees regarding the validity or failure of Theorems 1.1 and 1.4 in the more general setting of bounded variation.

The paper is structured as follows: in Section 2 we study the level sets of Sobolev functions. In particular, in Section 2.1 we prove Theorem 1.1 and in Section 2.2 we prove Theorem 1.4 and discuss the generalization that gives Theorem 1.5. In Section 2.3 we include some gluing results for monotone functions that are used in the proof of the approximation Theorem 1.6, but also are of independent interest. Section 3 contains preliminaries on p-harmonic functions. The approximation Theorem 1.6 is proved in Section 4. Finally, in Section 5 we include some quite standard smoothing results for monotone functions that are needed for the proof of the approximation theorem.

2 Level Sets of Sobolev and Monotone Functions

Throughout the entire section we assume that \(u:\Omega \rightarrow {\mathbb {R}}\) is a non-constant continuous function on an open set \(\Omega \subset {\mathbb {R}}^2\). We define \(A_t=u^{-1}(t)\) for \(t\in {\mathbb {R}}\), which can be the empty set. For \( s<t\) we define \(A_{s,t}=u^{-1}((s,t))\).

A Jordan arc in a metric space X is the image of the interval [0, 1] under a homeomorphic embedding \(\phi :[0,1] \rightarrow X\). In this case, the set \(\phi ((0,1))\) is called an open Jordan arc. Finally, a Jordan curve is the image of \(S^1\) under a homeomorphic embedding \(\phi :S^1\rightarrow X\). Throughout the paper the notation \(A\subset B\) means that the set A is contained in B, not necessarily strictly.

2.1 Level Sets of Sobolev Functions

In this subsection we study the level sets of Sobolev functions and prove Theorem 1.1.

Lemma 2.1

Suppose that \(u\in W^{1,p}(\Omega )\) for some \(1\le p \le \infty \) and \(\mathrm{Area}(\Omega )<\infty \). Then for almost every \(t\in {\mathbb {R}}\) the level set \(A_t\) has finite Hausdorff 1-measure.

Proof

This follows from the co-area formula [29, Theorem 1.1], which is attributed to Federer [12, Section 3.2], and the \(L^p\)-integrability of \(\nabla u\):

$$\begin{aligned} \int {\mathcal {H}}^1(u^{-1}(t))\, \mathrm{d}t= \int _\Omega |\nabla u| \le \Vert \nabla u\Vert _{L^p(\Omega )} \cdot {\text {Area}}(\Omega )^{1/p'}<\infty , \end{aligned}$$

where \(\frac{1}{p}+\frac{1}{p'}=1\). \(\square \)

Now, we restate and prove Theorem 1.1.

Theorem 2.2

Suppose that u is a continuous function with \(u\in W^{1,p}_{\mathrm{loc}}(\Omega )\) for some \(1\le p\le \infty \). Then for almost every \(t\in {\mathbb {R}}\) the level set \(A_t\) has locally finite Hausdorff 1-measure and each component E of \(A_t\) is either a point, or a Jordan curve, or it is homeomorphic to an interval.

If a level set \(A_t=u^{-1}(t)\) is the empty set then it has no components so the conclusions of the theorem hold trivially; this is also true for other statements later in the paper, so we will not mention again the possibility that the level sets can be empty. In what follows, we will say that a set E, contained in \(\Omega \), exits all compact subsets of \(\Omega \) if it is not contained in any compact subset of \(\Omega \).

Proof

Main Claim Consider an open set U with \(U\subset \subset \Omega \). We restrict u to a neighborhood of \(\overline{U}\) that is compactly contained in \(\Omega \) and apply Lemma 2.1. It follows that for almost every \(t\in {\mathbb {R}}\) we have \({\mathcal {H}}^1(A_t\cap \overline{U})<\infty \). We shall show as our Main Claim that if we further exclude countably many values t, then each component \(E_0\) of \(A_t\cap \overline{U}\) is either a point, or a Jordan arc, or a Jordan curve.

Compact exhaustion argument Assuming that the Main Claim holds for each such U, we consider an exhaustion of \(\Omega \) by a nested sequence of open sets \(\{U_n\}_{n\in {\mathbb {N}}}\), each compactly contained in \(\Omega \), such that for almost every \(t\in {\mathbb {R}}\) the following holds for the level set \(A_t\): \({\mathcal {H}}^1(A_t\cap \overline{U_n})<\infty \) and each component \(E_n\) of \(A_t\cap \overline{U_n}\) is either a point, or a Jordan arc, or a Jordan curve, for all \(n\in {\mathbb {N}}\). We let \(A_t\) be such a level set and fix \(x_0\in A_t\). We will show that the component E of \(A_t\) containing \(x_0\) is either a point, or a Jordan curve, or it is homeomorphic to an interval.

We have \(x_0\in U_n\) for all sufficiently large n. To simplify our notation, we assume that this holds for all \(n\in {\mathbb {N}}\). Let \(E, E_n\) be the component of \(A_t, A_t\cap \overline{U_n}\), respectively, that contains \(x_0\). We have \( E_n \subset E_{n+1} \subset E\) for each \(n\in {\mathbb {N}}\), which follows from the definition of a connected component (as the largest connected set containing a given point). By the continuity of u, \(A_t\) is rel. closed in \(\Omega \), so \(E_n\) is compact for all \(n\in {\mathbb {N}}\). If \(E\subset U_n\) for some \(n\in {\mathbb {N}}\), then \(E_n=E\) and therefore E itself is either a point, or a Jordan curve, or a Jordan arc by the Main Claim. This completes the proof in this case.

Suppose now that E is not contained in \(U_n\) for any \(n\in {\mathbb {N}}\). Then \(E_n\) necessarily intersects \(\partial U_n\) for each \(n\in {\mathbb {N}}\) as we see below using the next lemma, which is a direct consequence of [32, IV.5, Corollary 1, p. 83].

Lemma 2.3

Suppose that F is a connected component of a compact set A in the plane. Then for each open set \(U\supset F\) there exists an open set V with \(F\subset V \subset \subset U\) and \(\partial V \cap A=\emptyset \).

In our case, if \(E_n \subset U_n\), then by the preceding lemma there exists an open set \(V\supset E_n\) with \( V\subset \subset U_n\) and \(\partial V\cap (A_t\cap \overline{U_n})=\emptyset \). This implies that \(\partial V\cap A_t=\emptyset \). Then \(\partial V\cap E=\emptyset \) and it follows that \(V\cap E\) is both open and closed in E, so \(V\cap E=E\) by the connectedness of E. Then \(E=V\cap E\subset U_n\), which contradicts our assumption that \(E\not \subset U_n\) for all \(n\in {\mathbb {N}}\). Therefore, \(E_n\cap \partial U_n \ne \emptyset \) for all \(n\in {\mathbb {N}}\).

This implies that \(E_n\) cannot be a single point since it also contains \(x_0\in U_n\), so \(E_n\) is either a Jordan arc, or a Jordan curve for each \(n\in {\mathbb {N}}\), by the Main Claim. Note that \(E_{n+1} \supsetneq E_n\) for all \(n\in {\mathbb {N}}\), since \(E_{n+1}\cap \partial U_{n+1}\ne \emptyset \) and \(\partial U_{n+1}\cap \partial U_n=\emptyset \), as \(U_n\subset \subset U_{n+1}\). If \(E_n\) is a Jordan curve, then \(E_{n+1}\) can be neither a Jordan curve, nor a Jordan arc, as it is strictly larger than \(E_n\) (this uses the fundamental fact that \(S^1\) is not homeomorphic to [0, 1]). Therefore, \(E_n\) is a Jordan arc for all \(n\in {\mathbb {N}}\), and there exist homeomorphisms \(\phi _n:[0,1]\rightarrow E_n\), \(n\in {\mathbb {N}}\). Since \(E_n\subsetneq E_{n+1}\), these homeomorphisms can be pasted appropriately to obtain a continuous injective map \(\phi :I\rightarrow \bigcup _{n\in {\mathbb {N}}} E_n \,{=}{:}\,{\mathcal {E}}\), where \(I\subset {\mathbb {R}}\) is either \({\mathbb {R}}\) or \([0,\infty )\) (after a change of variables). Assume that \(I=[0,\infty )\); the other case is treated in the same way. The map \(\phi \) has the property that \(\phi ^{-1}(E_n)\) is a compact subinterval of I and \(\phi ^{-1}(E_n)\subsetneq \phi ^{-1}(E_{n+1})\) for \(n\in {\mathbb {N}}\). Moreover, \(\phi (I)={\mathcal {E}}\) exits all compact subsets of \(\Omega \).

It now remains to show that \(\phi \) is a homeomorphism and that \(E= \bigcup _{n\in {\mathbb {N}}} E_n\), concluding therefore that E is homeomorphic to an interval as desired. This is subtle and requires to use the assumption that \({\mathcal {H}}^1(A_t\cap \overline{U_n}) <\infty \) for all \(n\in {\mathbb {N}}\).

We first claim that \(\phi (s)\) does not accumulate at any point of \(\Omega \) as \(s\rightarrow \infty \). Assume for the sake of contradiction that \(\phi (s)\) converges to a point \(y_0\in U_{n_0}\subset \Omega \) along a subsequence of \(s\rightarrow \infty \), for some \(n_0\in {\mathbb {N}}\). Since \(\phi (s)\) exits all sets \(U_n\), we may find disjoint intervals \([a_n,b_n]\), \(n\in {\mathbb {N}}\), such that \(\phi (a_n) \rightarrow y_0\) as \(n\rightarrow \infty \), \(\phi ([a_n,b_n])\subset \overline{U_{n_0}}\), and \(\phi (b_n)\in \partial U_{n_0}\) for all \(n\in {\mathbb {N}}\). It follows that

$$\begin{aligned} \liminf _{n\rightarrow \infty }{\text {diam}}(\phi ([a_n,b_n])) \ge {\text {dist}}(y_0, \partial U_{n_0})>0. \end{aligned}$$

Since the diameter is a lower bound for the Hausdorff 1-measure in connected spaces (see [39, Section 18, p. 18]), we have

$$\begin{aligned} {\mathcal {H}}^1( A_t\cap \overline{U_{n_0}}) \ge \sum _{n\in {\mathbb {N}}} {\mathcal {H}}^1(\phi ([a_n,b_n])) \ge \sum _{n\in {\mathbb {N}}} {\text {diam}}(\phi ([a_n,b_n]))=\infty , \end{aligned}$$

which is a contradiction.

This now implies that \(\phi \) is a homeomorphism of I onto \({\mathcal {E}}\). Indeed, if \(\phi (s_n)=y_n\in {\mathcal {E}}\) is a sequence converging to \(y_0\in {\mathcal {E}}\) and \(s_0=\phi ^{-1}(y_0)\), then \(y_n\) is contained in a compact subset of \(\Omega \) for all \(n\in {\mathbb {N}}\) and therefore \(s_n,s_0\) lie in a compact subinterval \(I_0\) of I for all \(n\in {\mathbb {N}}\). By the injectivity of \(\phi \), \(\phi |I_0\) is a homeomorphism, so \(s_n\rightarrow s_0\), and \(\phi ^{-1}\) is continuous on \({\mathcal {E}}\), as desired. Another implication of the fact that \(\phi (s)\) does not accumulate in \(\Omega \) as \(s\rightarrow \infty \) is that \(\overline{{\mathcal {E}}} \setminus {\mathcal {E}}\) is contained in \(\partial \Omega \) and \({\mathcal {E}}=\overline{{\mathcal {E}}}\cap \Omega = \overline{{\mathcal {E}}}\cap E\) is rel. closed in \(\Omega \) and in E.

We will show that \({\mathcal {E}}\) is also rel. open in E and by the connectedness of E we will have \(E={\mathcal {E}}\) as desired. Let \(x\in {\mathcal {E}}\), so \(x\in U_{n_0}\) for some \(n_0\in {\mathbb {N}}\) and consider an open neighborhood \(V\subset \subset U_{n_0}\) of x. We wish to show that \(V\cap E \subset {\mathcal {E}}\), after shrinking the neighborhood V if necessary. This will complete the proof that \({\mathcal {E}}\) is rel. open in E.

If \(y_0 \in V\cap E\setminus {\mathcal {E}}\), then arguing as we did for the construction of \({\mathcal {E}}\) and using the Main Claim, one can construct a set \({\mathcal {F}} \subset E\) containing \(y_0\) and a homeomorphism \(\phi ' :I' \rightarrow {\mathcal {F}}\), where \(I'={\mathbb {R}}\) or \(I'=[0,\infty )\). Moreover, the set \({\mathcal {F}}\) is, by construction, necessarily disjoint from \({\mathcal {E}}\). To see this, assume that they intersect at a point \(z_0=\phi (s_0)= \phi '(s_0')\). Then there exist non-trivial closed intervals \(I_0\subset I\) and \(I_0'\subset I'\) such that \(\phi (I_0)\) is the subarc of \({\mathcal {E}}\) from \(x_0\) to \(z_0\) and \(\phi '(I_0')\) is the subarc of \({\mathcal {F}}\) from \(y_0\) to \(z_0\). We choose a large \(k\in {\mathbb {N}}\) so that \(\phi (I_0)\cup \phi '(I_0')\subset U_k\). Then by the definition of \(E_k\) we must have \(E_k \supset \phi (I_0)\cup \phi '(I_0')\), since the latter is connected and contains \(x_0\). Then we have \(y_0\in \phi '(I_0')\subset E_k\subset {\mathcal {E}}\), which is a contradiction. Hence, we have indeed \({\mathcal {F}} \cap {\mathcal {E}}=\emptyset \).

Moreover, as in the construction of \({\mathcal {E}}\), since E exits all compact subsets of \(\Omega \), the set \({\mathcal {F}}\) must also have this property; see the statement right before Lemma 2.3. Therefore,

$$\begin{aligned} {\mathcal {H}}^1({\mathcal {F}}\cap \overline{U_{n_0}}) \ge {\text {dist}}(y_0, \partial U_{n_0}) \ge {\text {dist}}(\partial V, \partial U_{n_0}) \,{=}{:}\,\delta >0. \end{aligned}$$

Another property of \({\mathcal {F}}\) is that it is rel. closed in \(\Omega \), for the same reason as \({\mathcal {E}}\).

If \(V\cap E \setminus ({\mathcal {E}}\cup {\mathcal {F}})\ne \emptyset \), by repeating the above procedure we may find sets \({\mathcal {F}}_i\subset A_t\), \(i=1,2,\dots ,N\), with the same properties as \({\mathcal {F}}\,{=}{:}\,{\mathcal {F}}_1\) so that they are disjoint with each other and with \({\mathcal {E}}\), and they intersect V. We have

$$\begin{aligned} \infty > {\mathcal {H}}^1(A_t\cap \overline{U_{n_0}} ) \ge \sum _{i=1}^N {\mathcal {H}}^1({\mathcal {F}}_i\cap \overline{U_{n_0}} ) \ge N\delta . \end{aligned}$$

This implies that we can find only a finite number of such sets \({\mathcal {F}}_i\). Since the compact sets \({\mathcal {F}}_i\cap \overline{V}\) have positive distance from \({\mathcal {E}}\cap \overline{V}\), we may find a smaller neighborhood \(W\subset V\) of \(x\in {\mathcal {E}}\) such that \(W\cap E \subset {\mathcal {E}}\). This completes the proof that \({\mathcal {E}}\) is rel. open in E, as desired.

Proof of Main Claim We will show that for all but countably many \(t\in {\mathbb {R}}\) for which \({\mathcal {H}}^1(A_t\cap \overline{U})<\infty \) we have that each component \(E_0\) of \(A_t\cap \overline{U}\) is either a point, or a Jordan arc, or a Jordan curve.

Suppose that \({\mathcal {H}}^1(A_t\cap \overline{U})<\infty \) and let \(E_0\) be a component of \(A_t\cap \overline{U}\), so \(L\,{:}{=}\,{\mathcal {H}}^1(E_0)<\infty \). Since \(E_0\) is a continuum, it follows that there exists a 2L-Lipschitz continuous parametrization \(\gamma :[0,1]\rightarrow E_0\) of \(E_0\); see [10, Theorem 2a] or [37, Proposition 5.1]. Hence, \(E_0\) is a locally connected, compact set; see [45, Theorem 9.2, p. 60 and Theorem 27.12, p. 200].

Now, we need the following topological lemma that we prove later:

Lemma 2.4

Let X be a Peano space, that is, a connected, locally connected, compact metric space. If X contains more than one point and is not homeomorphic to [0, 1] or \(S^1\), then it must have a junction point x, that is, there exist three Jordan arcs \(A_1,A_2,A_3\subset X\) that meet at x but otherwise they are disjoint.

By our previous discussion, if \({\mathcal {H}}^1(A_t \cap \overline{U})<\infty \) then each component \(E_0\) of \(A_t\cap \overline{U}\) is a Peano space. If there is a component \(E_0\) of \(A_t\cap \overline{U}\) that is not a point or a Jordan arc or a Jordan curve, then by Lemma 2.4, \(E_0\) must have a junction point. Hence, \(A_t\cap \overline{U}\) has a junction point.

A theorem of Moore [28, Theorem 1] (see also [35, Proposition 2.18]) states that there cannot exist an uncountable collection of disjoint compact sets in the plane such that each set has a junction point. Note that \(A_s\cap A_t=\emptyset \) for \(s\ne t\). Hence, for at most countably many \(t\in {\mathbb {R}}\) the set \(A_t\cap \overline{U}\) can have a junction point.

Summarizing, for at most countably many \(t\in {\mathbb {R}}\) for which \({\mathcal {H}}^1(A_t\cap \overline{U})<\infty \) the set \(A_t\cap \overline{U}\) has a component \(E_0\) that has a junction point and is not a Jordan arc or a Jordan curve. \(\square \)

Proof of Lemma 2.4

A point \(x\in X\) is a said to be a non-cut point if \(X\setminus \{x\}\) is connected. Suppose that X contains more than one point and is not homeomorphic to [0, 1]. Then there exist at least three non-cut points \(x_1,x_2,x_3\in X\); see [43, Theorems (6.1) and (6.2), p. 54]. Since X is a Peano space, it is locally path-connected [45, Theorem 31.4, p. 221]. It follows that each of the spaces \(X\setminus \{x_{i}\}\), \(i=1,2,3\), is connected and locally path-connected. Moreover, a connected, locally path-connected space is path-connected [31, Theorem 4.3, p. 162]. Hence, we may find Jordan arcs \(J_{ij} \subset X \setminus \{x_k\}\) with endpoints \(x_i\) and \(x_j\), where \(i,j,k\in \{1,2,3\}\), are distinct and \(i<j\); see also [45, Corollary 31.6, p. 222].

If two of the arcs \(J_{ij}\) intersect at an interior point of one of the arcs, that is, a point different from the endpoints \(x_1,x_2,x_3\), then it is straightforward to consider three subarcs \(A_1,A_2,A_3\) of these arcs that intersect at one point, but otherwise are disjoint, as required in the statement of the lemma.

If the arcs \(J_{ij}\) intersect only at the endpoints, then we can concatenate the three arcs to obtain a Jordan curve J, that is, homeomorphic to \(S^1\). Suppose now that the space X is, in addition, not homeomorphic to \(S^1\). Then, there must exist a point \(x\in X\setminus J\). We claim that there exists a Jordan arc \(J_x\) that connects x to J and intersects J at only one point. Assuming that claim, one can now define \(A_1\,{:}{=}\,J_x\) and \(A_2,A_3\) to be subarcs of J that meet at the point \(J\cap J_x\) but otherwise are disjoint.

To prove the claim note that since X is a Peano space, any two points in X can be joined with a Jordan arc [45, Theorem 31.2, p. 219]. We connect x to any point \(y\in J\) with a Jordan arc \(J_x\), parametrized by \(\gamma :[0,1]\rightarrow J_x\), so that \(\gamma (0)=x\) and \(\gamma (1)=y\). If there exists \(s\in (0,1)\) such that \(\gamma (s)\in J\) then we consider the smallest such s and we restrict \(\gamma \) to [0, s]. This gives the desired Jordan arc. \(\square \)

Remark 2.5

In Theorem 2.2 (Theorem 1.1) the assumption that \(u\in W^{1,p}_{\mathrm{loc}}(\Omega )\) is only used to deduce that almost every level set of u has locally finite Hausdorff 1-measure; the latter is proved in Lemma 2.1 using the co-area formula. All the other arguments rely on planar topology. Thus our proof can be generalized to functions defined on metric spaces homeomorphic to \({\mathbb {R}}^2\) and the first part of Theorem 1.5 follows.

2.2 Level Sets of Monotone Functions

In this subsection we study the level sets of monotone functions and prove Theorem 1.4.

Lemma 2.6

If u is continuous and monotone in \(\Omega \) then for each \(t\in {\mathbb {R}}\) each component E of the level set \(A_t\) satisfies either of the following:

  1. (i)

    E exits all compact subsets of \(\Omega \), or

  2. (ii)

    all bounded components of \({\mathbb {R}}^2 \setminus E\) intersect \(\partial \Omega \) and there exists at least one such component.

In particular,

$$\begin{aligned} \mathrm{diam} (E) \ge \sup _{x\in E} \mathrm{dist}(x,\partial \Omega )>0. \end{aligned}$$

As an example, consider the function \(u(x)=|x|\) defined in \(\Omega =\{x\in {\mathbb {R}}^2: 0<|x|<1\}\). This is a monotone function and its level sets, which are circles centered at the origin, are compactly contained in \(\Omega \). In this case the level sets satisfy the second alternative of the lemma and they all surround the origin, which is contained in \(\partial \Omega \).

Proof of Lemma 2.6

In the proof we will use the following lemma, known as Zoretti’s theorem, which is in the same spirit as Lemma 2.3:

Lemma 2.7

[44, Corollary 3.11, p. 35] Let F be a connected component of a compact set A in the plane. Then for each open set \(U \supset F\) there exists a Jordan region V with \(F\subset V\), \(\partial V\subset U\), and \(\partial V\cap A=\emptyset \).

Suppose that a component E of \(A_t\) is compactly contained in \(\Omega \). First we will show that \({\mathbb {R}}^2\setminus E\) has a bounded component. Suppose that this is not the case. Then \({\widehat{{\mathbb {C}}}}\setminus E\) (here \(\widehat{{\mathbb {C}}}={\mathbb {C}}\cup \{\infty \}\) is the Riemann sphere) is simply connected and contains \(\partial \Omega \), so by using the Riemann mapping theorem we may find arbitrarily close to E Jordan curves surrounding E and separating E from \(\partial \Omega \). Hence, we may find a Jordan region \(U \subset \subset \Omega \) containing E. Consider the compact set \(A_t\cap \overline{U}\). Then E is also a component of \(A_t\cap \overline{U}\). By Lemma 2.7, we can find a Jordan region V such that \(E\subset V\), \(\partial V\subset U\), and \(\partial V\cap A_t=\emptyset \). It follows that \(V\subset U\subset \subset \Omega \). On \(\partial V\) we must have \(u>t\) or \(u<t\). Without loss of generality, suppose that we have \(u>t\) on \(\partial V\). Then by the monotonicity of u we have \(u>t\) on \( V\supset E\), a contradiction. Therefore, \({\mathbb {R}}^2\setminus E\) has a bounded component.

Next, we will show that all bounded components of \({\mathbb {R}}^2\setminus E\) must intersect \(\partial \Omega \). Suppose that a bounded component U of \({\mathbb {R}}^2\setminus E\) does not intersect \(\partial \Omega \). Then \(U\subset \Omega \) and \(\partial U \subset E\subset \subset \Omega \) so \(U\subset \subset \Omega \). Since \(u=t\) on \(\partial U\), by the monotonicity of u we have that \(u=t\) on \(\overline{U}\). Since E is a connected component of \(A_t\), we must have \(U\subset E\), which is a contradiction.

Now we prove the claim involving the diameters. If \(\Omega ={\mathbb {R}}^2\), then E necessarily satisfies the first alternative, so it escapes to \(\infty \) and \({\text {diam}}(E)=\infty \). If \(\Omega \subsetneq {\mathbb {R}}^2\), then for each \(x\in E\) we may consider the largest ball B(xr) contained in \(\Omega \), where \(r={\text {dist}}(x,\partial \Omega )\). Then E cannot be contained in a ball \(B(x,r-\varepsilon )\) for any \(\varepsilon >0\) since this would violate both alternatives. Therefore, \({\text {diam}}(E) \ge r-\varepsilon \) for all \(\varepsilon >0\), which implies that \({\text {diam}}(E) \ge {\text {dist}}(x,\partial \Omega )\), as desired. \(\square \)

We record an immediate corollary:

Corollary 2.8

If \(\Omega \) is simply connected, then a continuous function u in \(\Omega \) is monotone if and only if each component of each level set of u exits all compact subsets of \(\Omega \).

Proof

Suppose that u is monotone. If \(\Omega \) is simply connected, then \(\partial \Omega \) is connected, so it cannot be separated by a level set \(A_t\) of u. Thus, in Lemma 2.6 only the first alternative can occur, as desired.

Conversely, suppose that only the first alternative occurs and let \(U\subset \subset \Omega \). Then for any \(x_0\in U\) the component E of the level set \(A_t\), \(t=u(x_0)\), that contains \(x_0\) has to intersect \(\partial U\). Thus, there exists \(y_0\in \partial U\) with \(u(x_0)=u(y_0)\). This implies the monotonicity of u. \(\square \)

Next, we add the assumption that u lies in a Sobolev space:

Lemma 2.9

Suppose that u is continuous and monotone in \(\Omega \) and lies in \(W^{1,p}_{\mathrm{loc}}(\Omega )\) for some \(1\le p \le \infty \). Then for almost every \(t\in {\mathbb {R}}\) the components of the level set \(A_t\) are rel. open in \(A_t\). In other words, if E is a component of \(A_t\) and \(x\in E\) then there exists an open neighborhood U of x such that \(E\cap U= A_t\cap U\).

Proof

We consider an exhaustion of \(\Omega \) by a nested sequence of open sets \(\{U_n\}_{n\in {\mathbb {N}}}\), each compactly contained in \(\Omega \), such that for almost every \(t\in {\mathbb {R}}\) we have \({\mathcal {H}}^1(A_t\cap \overline{U_n})<\infty \) for all \(n\in {\mathbb {N}}\); the existence of such an exhaustion can be justified using Lemma 2.1.

We fix \(t\in {\mathbb {R}}\) such that \(A_t\ne \emptyset \), and consider a component \(E\subset A_t\) and \(x\in E\). We claim that for each neighborhood \(V\subset \subset \Omega \) of x there are at most finitely many components of \(A_t\) intersecting V.

There exists \(n_0\in {\mathbb {N}}\) such that \(V\subset \overline{V}\subset U_{n_0}\). Suppose that F is a component of \(A_t\) intersecting V. We consider the restriction of u to \(U_{n_0}\), which is still a monotone function and we let \(G\subset F\) be a component of the level set \(A_t\cap U_{n_0}\) of \(u\big |{U_{n_0}}\) such that \(G\cap V\ne \emptyset \). For a point \(y\in G\cap V\) we have

$$\begin{aligned} {\text {diam}}(G) \ge {\text {dist}}(y,\partial U_{n_0}), \end{aligned}$$

by Lemma 2.6. Since \(V\subset \subset U_{n_0}\), we have \({\text {dist}}(y,\partial U_{n_0}) \ge {\text {dist}}(\overline{V}, \partial U_{n_0}) >0\). Moreover, by the connectedness of G we have \({\mathcal {H}}^1(G) \ge {\text {diam}}(G)\); see [39, Section 18, p. 18]. Combining these inequalities, we have

$$\begin{aligned} {\mathcal {H}}^1(F\cap \overline{U_{n_0}} )\ge {\mathcal {H}}^1(G)\ge {\text {diam}}(G)\ge {\text {dist}}(y,\partial U_{n_0})\ge {\text {dist}}(\overline{V}, \partial U_{n_0}) >0. \end{aligned}$$

Since \({\mathcal {H}}^1(A_t\cap \overline{U_{n_0}})<\infty \), there can be at most finitely many components F of \(A_t\) intersecting V.

Since the compact sets \(\overline{V}\cap F\) and \(\overline{V}\cap E\) have positive distance, it follows that if we choose a smaller neighborhood \(U\subset V\) of x, then we have \(E\cap U=A_t\cap U\) as desired. \(\square \)

We will also need the following general lemma:

Lemma 2.10

Let (Xd) be a separable metric space and \(f:X \rightarrow {\mathbb {R}}\) be any function. Then the set of local extremal values of f is at most countable.

Proof

Let E be the set of local maximum values of f. Then, by definition, for each \(y\in E\) there exists \(x\in X\) with \(f(x)=y\) and a ball B(xr) such that for all \(z\in B(x,r)\) we have \(f(z)\le y\). We can write \(E=\bigcup _{n\in {\mathbb {N}}} E_n\), where

$$\begin{aligned} E_n=\{y\in {\mathbb {R}}: y=f(x) \,\,\,\text {for some}\,\,\, x\in X \,\,\, \text {and}\,\,\, f(z)\le y \,\,\, \text {for all}\,\,\, z\in B(x,2/n)\}. \end{aligned}$$

We will show that \(E_n\) is at most countable for each \(n\in {\mathbb {N}}\). Let \(y_1,y_2\in E_n\) be distinct, so there exist points \(x_1,x_2\in X\) with \(f(x_i)=y_i\), \(i=1,2\), as in the definition of \(E_n\). Then the balls \(B(x_1, 1/n)\), \(B(x_2,1/n)\) are necessarily disjoint. Indeed, otherwise, we have \(f(x_2)\le y_1\) and \(f(x_1)\le y_2\), so \(y_1=y_2\), a contradiction. Therefore, the set \(E_n\) is in one-to-one correspondence with a collection of disjoint balls in X. The separability of X implies that there can be at most countably many such balls. The same proof shows that the set of local minimum values of f is at most countable. \(\square \)

Now we have completed the preparation for the proof of Theorem 1.4, restated as follows.

Theorem 2.11

Suppose that u is continuous and monotone in \(\Omega \) and lies in \(W^{1,p}_{\mathrm{loc}}(\Omega )\) for some \(1\le p \le \infty \). Then for almost every \(t\in {\mathbb {R}}\) the level set \(A_t\) is an embedded 1-dimensional topological submanifold of \({\mathbb {R}}^2\) that has locally finite Hausdorff 1-measure.

Proof

By Theorem 2.2 and Lemma 2.9 we conclude that for almost every \(t\in {\mathbb {R}}\) the level set \(A_t\) has locally finite Hausdorff 1-measure, each component E of the level set \(A_t\) is rel. open in \(A_t\), and it is either a point, or a Jordan curve, or it is homeomorphic to an interval. Using Lemma 2.10, we further exclude the countably many local extremal values \(t\in {\mathbb {R}}\) of u in \(\Omega \). We fix a level set \(A_t\) satisfying all the above. In particular, \(A_t\) has the property that if \(x\in A_t\) then each neighborhood U of x contains points \(y_1,y_2\) with \(u(y_1)>t\) and \(u(y_2)<t\).

Our goal is to prove that every component E of \(A_t\) is either a Jordan curve, or it is homeomorphic to \({\mathbb {R}}\). Since each component of \(A_t\) is rel. open in \(A_t\), it will then follow that each \(x\in A_t\) has a neighborhood U such that \(U\cap A_t\) is homeomorphic to an open interval. This shows that \(A_t\) is a 1-manifold. Since there are no wild arcs in the plane (see Remark 2.12 below), each Jordan arc of \(A_t\) can be mapped to \([0,1]\times \{0\}\) with a global homeomorphism of \({\mathbb {R}}^2\). This shows that \(A_t\) is an embedded submanifold of \({\mathbb {R}}^2\), as desired.

We now focus on proving that every component E of \(A_t\) is either a Jordan curve, or it is homeomorphic to \({\mathbb {R}}\).

We already know that E is either a point, or a Jordan curve, or it is homeomorphic to an interval. If E is a point or it is homeomorphic to the closed interval [0, 1], then E is compactly contained in \(\Omega \), so by Lemma 2.6 the set \({\mathbb {R}}^2\setminus E\) must have at least one bounded component. This is a contradiction.

Finally, assume that E is homeomorphic to \(I=[0,\infty )\) under a map \(\phi :I \rightarrow E\). Then \(\phi (s)\) cannot accumulate to any point of \(\Omega \) as \(s\rightarrow \infty \). This is because \(\phi \) is a homeomorphism and E is rel. closed in \(A_t\), and thus in \(\Omega \). Let \(x_0=\phi (0)\) and consider a ball \(B(x_0,r)\subset \subset \Omega \). Then there exists \(s_0\) such that \(\phi (s_0)\in \partial B(x_0,r)\) and \(\phi (s)\notin B(x_0,r)\) for all \(s\ge s_0\). We may straighten \(\phi ([0,s_0])\) to the segment \([0,1]\times \{0\}\) with a homeomorphism of \({\mathbb {R}}^2\) (see Remark 2.12 below) and, using that, we can find a topological ball \(U\subset B(x_0,r)\) containing \(x_0\) such that \(U\setminus E\) is connected. If U is sufficiently small, then by Lemma 2.9 we have that \(U\setminus A_t=U\setminus E\), so \(U\setminus A_t\) is connected. This implies that \(u>t\) or \(u<t\) in \(U\setminus E\). This is a contradiction, since \(u(x_0)=t\) would then be a local extremal value of u in this case. \(\square \)

Remark 2.12

In the proof we used the fact that a Jordan arc J in \({\mathbb {R}}^2\) can be mapped to \([0,1]\times \{0\}\), or equivalently to an arc of the unit circle, with a homeomorphism of \({\mathbb {R}}^2\). That is, there are no wild arcs in the plane. To see this, using the Riemann mapping theorem, one can map the open unit disk with a conformal homeomorphism to the complement of the arc J in the sphere. The conformal map extends continuously to the boundary of the disk by Carathéodory’s theorem, since an arc is locally connected. Moreover, there is an arc C of the unit circle that is homeomorphic to the arc J; see [35, Proposition 2.5]. By taking the chord corresponding to the arc C and taking its image under the conformal map, we obtain a Jordan curve containing the arc J. Now we can apply the Schoenflies theorem to straighten this Jordan curve to the unit circle with a global homeomorphism, so that J is mapped to an arc of the unit circle.

Remark 2.13

As in Remark 2.5 the proof of Theorem 2.11 (Theorem 1.4) can be generalized to monotone functions defined on metric spaces homeomorphic to \({\mathbb {R}}^2\). Indeed, monotonicity is a topological property. This observation yields the second part of Theorem 1.5.

2.3 Gluing Monotone Functions

In this section we include some results that allow us to paste monotone functions in order to obtain a new monotone function. These results will be useful towards the proof of the approximation Theorem 1.6. The proofs are elementary but the assumptions of the statements are finely chosen and cannot be relaxed. Recall that u is continuous in \(\Omega \) and also continuity is incorporated in the definition of monotonicity; see Definition 1.2.

Lemma 2.14

(Gluing Lemma) Suppose that u is continuous and monotone in \(\Omega \) and consider \(t_1,t_2\in {\mathbb {R}}\) with \(t_1<t_2\). Let \(\Upsilon =u^{-1}((t_1,t_2))\) and consider a continuous function v on \(\Upsilon \) such that

  1. (i)

    v is monotone in \(\Upsilon \),

  2. (ii)

    v extends continuously to \(\partial \Upsilon \cap \Omega \) and agrees there with u, and

  3. (iii)

    \(t_1\le v \le t_2\) on \(\Upsilon \).

Then the function \({\widetilde{u}}\) that is equal to u in \(\Omega \setminus \Upsilon \) and to v in \(\Upsilon \) is monotone in \(\Omega \).

The proof we give below is elementary but delicate. Note that it is important to assume that u is monotone in all of \(\Omega \), since the function \(u(x)=|x|\) on \(\{x\in {\mathbb {R}}^2: 1/2<|x|<1\}\) does not have a monotone extension in the unit disk. Moreover, (iii) cannot be relaxed. Indeed, the function \(u(x)=|x|\) is monotone in the punctured unit disk, considered to be the set \(\Omega \); however if we set \({\widetilde{u}}=u\) in \(\{x\in {\mathbb {R}}^2: 1/2\le |x|<1\}\) and \({\widetilde{u}} = 1-|x|\) in \(\{x\in {\mathbb {R}}^2 : 0<|x|<1/2\}=u^{-1}((0,1/2))\), then \({\widetilde{u}}\) is not monotone in \(\Omega \).

Proof

Aiming for a contradiction, suppose that \({\widetilde{u}}\) is not monotone in \(\Omega \), so, without loss of generality, there exists an open set \(U\subset \subset \Omega \) and \(x_0\in U\) such that \({\widetilde{u}}(x_0)=\max _{\overline{U}} {\widetilde{u}} >\max _{\partial U} {\widetilde{u}}\).

Suppose first that \(x_0\in U\cap \Upsilon \), so \({\widetilde{u}}(x_0)=v(x_0)\). Note that \(\overline{U\cap \Upsilon } \subset \overline{\Upsilon }\cap \Omega \), so v is continuous in \(\overline{U\cap \Upsilon } \subset \overline{\Upsilon }\cap \Omega \) by assumption (ii) and monotone in \(U\cap \Upsilon \) by (i). By Remark 1.3 we conclude that there exists \(y_0\in \partial (U\cap \Upsilon ) \subset (U\cap \partial \Upsilon )\cup \partial U\) such that

$$\begin{aligned} {\widetilde{u}}(y_0)=v(y_0)=\max _{\overline{U\cap \Upsilon }}v \ge v(x_0)= {\widetilde{u}}(x_0)= \max _{\overline{U}}{\widetilde{u}}. \end{aligned}$$

It follows that \({\widetilde{u}}(y_0)= {\widetilde{u}}(x_0)=\max _{\overline{U}}{\widetilde{u}}> \max _{\partial U}{\widetilde{u}}\). Hence, \(y_0\notin \partial U\), and we have \(y_0\in U\cap \partial \Upsilon \). Since \(\partial \Upsilon \cap \Omega \subset A_{t_1}\cup A_{t_2}\), we have \({\widetilde{u}}(y_0)=u(y_0)=t_1\) or \({\widetilde{u}}(y_0)=u(y_0)=t_2\).

By the monotonicity of u in \(\Omega \), it follows that there exists \(z_0\in \partial U\) such that

$$\begin{aligned} u(z_0)=\max _{\overline{U}}u\ge u(y_0). \end{aligned}$$

If \(z_0\notin \Upsilon \), then \({\widetilde{u}}(z_0)=u(z_0)\), so \({\widetilde{u}}(z_0)\ge u(y_0)={\widetilde{u}}(y_0)\). If \(z_0\in \Upsilon \), then \(\max _{\overline{U}}u=u(z_0)<t_2\) so on \(U\setminus \Upsilon \supset U\cap \partial \Upsilon \) we necessarily have \(u\le t_1\). Since \(y_0\in U\cap \partial \Upsilon \), we have \({\widetilde{u}}(y_0)=u(y_0)=t_1\). Moreover, \({\widetilde{u}}(z_0)=v(z_0)\) and by assumption (iii) we have \({\widetilde{u}}(z_0)\ge t_1\). It follows that \({\widetilde{u}}(z_0)\ge {\widetilde{u}}(y_0)\) also in this case. Therefore,

$$\begin{aligned} \max _{\overline{U}} {\widetilde{u}}= {\widetilde{u}}(x_0)= {\widetilde{u}}(y_0) \le {\widetilde{u}}(z_0) \le \max _{\partial U} ({\widetilde{u}}), \end{aligned}$$

which is a contradiction.

It remains to treat the case that \(x_0\in U\setminus \Upsilon \), so \({\widetilde{u}}(x_0)=u(x_0) \notin (t_1,t_2)\). If \(u(x_0)\le t_1\), then \(\max _{\partial U}{\widetilde{u}} < u(x_0)\le t_1\), so \({\widetilde{u}}<t_1\) on \(\partial U\). By assumption (iii) we have \(\partial U\cap \Upsilon =\emptyset \), so \(u={\widetilde{u}}\) on \(\partial U\), and \(\max _{\partial U} u =\max _{\partial U} {\widetilde{u}} <u(x_0)\), where \(x_0\in U\). This contradicts the monotonicity of u in \(\Omega \). If \(u(x_0)\ge t_2\), by the monotonicity of u in \(\Omega \), there exists \(z_0\in \partial U\) such that \(u(z_0)=\max _{\overline{U}}u \ge u(x_0) \ge t_2\). This implies that \(z_0\notin \Upsilon \), so \({\widetilde{u}}(z_0)=u(z_0)\). Therefore,

$$\begin{aligned} \max _{\partial U} {\widetilde{u}} \ge {\widetilde{u}}(z_0) =u(z_0)\ge u(x_0)= {\widetilde{u}}(x_0) =\max _{\overline{U}} {\widetilde{u}}, \end{aligned}$$

which is a contradiction. \(\square \)

Lemma 2.15

Let \(\{u_n\}_{n\in {\mathbb {N}}}\) be a sequence of monotone functions in \(\Omega \) converging locally uniformly to a function u. Then u is monotone in \(\Omega \).

Proof

Let \(U\subset \subset \Omega \). Then \(\max _{\overline{U}}u_n =\max _{\partial U}u_n\). Since \(u_n\rightarrow u\) uniformly in \(\overline{U}\), we have \(\max _{\overline{U}}u_n \rightarrow \max _{\overline{U}} u\) and \(\max _{\partial U}u_n \rightarrow \max _{\partial U}u\). The claim for the minima is proved in the same way. \(\square \)

Corollary 2.16

Suppose that u is continuous and monotone in \(\Omega \) and consider a bi-infinite sequence of real numbers \(\{t_i\}_{i\in {\mathbb {Z}}}\), such that \(t_i<t_{i+1}\), \(i\in {\mathbb {Z}}\), and \(\lim _{i\rightarrow \pm \infty } t_i= \pm \infty \). In each region \(\Upsilon _i\,{:}{=}\,u^{-1}((t_i,t_{i+1}))\) consider a function \(v_i\) such that

  1. (i)

    \(v_i\) is monotone in \(\Upsilon _i\),

  2. (ii)

    \(v_i\) extends continuously to \(\partial \Upsilon _i\cap \Omega \) and agrees there with u, and

  3. (iii)

    \(t_i\le v_i\le t_{i+1}\) on \(\Upsilon _i\).

Then the function \({\widetilde{u}}\) that is equal to u on \(\Omega \setminus \bigcup _{i\in {\mathbb {Z}}} \Upsilon _i\) and to \(v_i\) in \(\Upsilon _i\), \(i\in {\mathbb {Z}}\), is continuous and monotone in \(\Omega \).

Proof

By Lemma 2.14 and induction, one can show that for each \(n\in {\mathbb {N}}\) the function

is continuous and monotone in \(\Omega \). The important observation here is that

$$\begin{aligned} u^{-1}((t_j,t_{j+1}))=\Upsilon _j= {\widetilde{u}}_n^{-1}((t_j,t_{j+1})) \end{aligned}$$

for all \(n\in {\mathbb {N}}\) and \(|j|>n\), by assumption (iii).

If \(U\subset \subset \Omega \) is an open set, then there exists \(n\in {\mathbb {N}}\) such that

$$\begin{aligned} t_{-n}< \min _{\overline{U}} u \le \max _{\overline{U}} u <t_n. \end{aligned}$$

Hence, \(\Upsilon _j\cap \overline{U}=\emptyset \) for \(|j|> n\) and \({\widetilde{u}}_m={\widetilde{u}}_n={\widetilde{u}}\) on \(\overline{U}\) for all \(m\ge n\). It follows that \(\{{\widetilde{u}}_n\}_{n\in {\mathbb {N}}}\) converges locally uniformly in \(\Omega \) to \({\widetilde{u}}\), and therefore \({\widetilde{u}}\) is continuous and monotone by Lemma 2.15. \(\square \)

In order to establish the approximation by \(C^{\infty }\)-smooth functions in Theorem 1.6, we need to introduce the notion of strict monotonicity and prove some further, more specialized, gluing lemmas.

Definition 2.17

A continuous function \(f:\Omega \rightarrow {\mathbb {R}}\) is called strictly monotone if it is monotone and for each open set \(U\subset \subset \Omega \) the maximum and minimum of f on \(\overline{U}\) are not attained at any point of U.

Example 2.18

If a function f is of class \(C^1\) and has no critical points in \(\Omega \), then it has no local maxima and minima in \(\Omega \) so it is strictly monotone.

Lemma 2.19

(Gluing Lemma) Let AV be open subsets of \(\Omega \) with \(\overline{V}\cap \Omega \subset A\). Suppose that the continuous function u is monotone when restricted to \(\Omega \setminus \overline{V}\) and strictly monotone when restricted to A. Then u is monotone in \(\Omega \).

Proof

If the statement fails, there exists an open set \(U\subset \subset \Omega \) such that the maximum or minimum of u in U is not attained at \(\partial U\), but at an interior point \(x_0\in U\). Without loss of generality, assume that \(\max _{\partial U} u < \max _{\overline{U}}u =u(x_0)\). Note that U cannot be contained in \(\Omega \setminus \overline{V}\) or in A, by the monotonicity of u there. Hence, U intersects both \(\overline{V}\) and \(\Omega \setminus \overline{A}\).

If \(x_0\in U\cap \overline{V} \subset U\cap A\), then \(u(x_0)= \max _{\overline{U}}u\ge \max _{\overline{U\cap A}}u\) and this contradicts the strict monotonicity of u in A.

If \(x_0\in U\setminus \overline{V}\subset \Omega \setminus \overline{V}\), then by the monotonicity of u there, there exists \(x_1\in \partial (U\setminus \overline{V})\) such that \(u(x_1)\ge u(x_0)> \max _{\partial U}u\). We necessarily have that \(x_1\notin \partial U\). Since \(\partial (U\setminus \overline{V})\subset \partial U \cup (U\cap \partial V)\), it follows that \(x_1\in U\cap \partial V \subset U\cap A\). Then we have \(u(x_1)\ge u(x_0) = \max _{\overline{U}}u \ge \max _{\overline{U\cap A}}u\). Again, this contradicts the strict monotonicity of u in A. \(\square \)

Lemma 2.20

Suppose that J is a connected closed subset of \(\Omega \) that exits all compact subsets of \(\Omega \). If the continuous function u is monotone in \(\Omega \setminus J\) and constant in J, then u is monotone in \(\Omega \).

Proof

Assume that \(u=t\) in J. Suppose that u is not monotone in \(\Omega \), so, without loss of generality, we can find an open set \(U\subset \subset \Omega \) and a point \(x_0\in U\) with \(u(x_0)=\max _{\overline{U}}u >\max _{\partial U}u\). By the monotonicity of u in \(\Omega \setminus J\), we necessarily have that U intersects both \(\Omega \setminus J\) and J, and \(x_0\in J \cap U\). Thus, \(u(x_0)=t=\max _{\overline{U}}u\). Since J is connected and is not contained in \(\overline{U}\), we have \(J\cap \partial U\ne \emptyset \). Hence, there exists \(y_0\in \partial U\) such that \(u(y_0)=t\le \max _{\partial U}u\), which is a contradiction. \(\square \)

3 Preliminaries on p-Harmonic Functions

Let \(\Omega \subset {\mathbb {R}}^2\) be an open set. A function \(u:\Omega \rightarrow {\mathbb {R}}\) is called p-harmonic, \(1<p<\infty \), if \(u\in W^{1,p}_{\mathrm{loc}}(\Omega )\) and

$$\begin{aligned} \Delta _pu \,{:}{=}\,\text {div}(|\nabla u|^{p-2} \nabla u) =0 \end{aligned}$$

in the sense of distributions. That is,

$$\begin{aligned} \int _\Omega \langle |\nabla u|^{p-2} \nabla u , \nabla \phi \rangle =0 \end{aligned}$$

for all \(\phi \in C^\infty _c(\Omega )\), where \(C_c^{\infty }(\Omega )\) is the space of compactly supported smooth functions in \(\Omega \).

We mention some standard facts about p-harmonic functions. There exists an exponent \(\alpha \in (0,1]\) such that every p-harmonic function u on \(\Omega \) lies in \(C^{1,\alpha }_{\mathrm{loc}}(\Omega )\) [11, 24, 40]. In fact, outside the singular set, that is, the set where \(\nabla u=0\), the function u is \(C^\infty \)-smooth by elliptic regularity theory; see [14, Corollary 8.11, p. 186]. The singular set consists of isolated points, unless u is constant [26, Corollary 1]. Finally, the maximum principle [15, p. 111] implies that p-harmonic functions are monotone.

Proposition 3.1

(Solution to the Dirichlet Problem) Let \(\Omega \subset {\mathbb {R}}^2\) be a bounded open set and let \(u_0\in W^{1,p}(\Omega )\) be given Dirichlet data. There exists a unique p-harmonic function \(u\in W^{1,p}(\Omega )\) that minimizes the p-harmonic energy

$$\begin{aligned} E_p(v)\,{:}{=}\,\int _\Omega |\nabla v|^p \end{aligned}$$

among all functions \(v\in W^{1,p}(\Omega )\) with \(v-u_0 \in W^{1,p}_0(\Omega )\).

See for example [15, Chapter 5] for a general approach.

An open Jordan arc J in \({\mathbb {R}}^2\) is \(C^\infty \)-smooth if there exists an open set \(U\supset J\) and a \(C^\infty \)-smooth diffeomorphism \(\phi :U\rightarrow {\mathbb {R}}^2\) such that \(\phi (J)={\mathbb {R}}\). In this case, the open set \(U\supset J\) may be taken to be arbitrarily close to J; see also the classification of 1-manifolds in Theorem 5.1.

Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and \(J\subset \partial \Omega \) be a Jordan arc. We say that J is an essential boundary arc if for each \(x_0\in J\) there exists a neighborhood U of \(x_0\) and a homeomorphism \(\phi :U \rightarrow {\mathbb {R}}^2\) such that \(\phi (J\cap U)={\mathbb {R}}=\{(s,0)\in {\mathbb {R}}^2:s\in {\mathbb {R}}\}\) and \(\phi (\Omega \cap U)= {\mathbb {R}}^2_+= \{(s,t)\in {\mathbb {R}}^2: t>0\}\).

Lemma 3.2

(Continuous extension) Suppose that u and \(u_0\) are as in Proposition 3.1. Assume further that \(J\subset \partial \Omega \) is an essential open Jordan arc. If \(u_0\) extends continuously to \(\Omega \cup J\), then u also extends continuously to \(\Omega \cup J\) and \(u|J=u_0|J\).

This follows from [15, Theorem 6.27], which implies that each point \(x_0\in J\) is a regular point for the p-Laplace operator, since \(\partial \Omega \) is p-thick at \(x_0\); see [23, Lemma 2] for a relevant capacity estimate.

Lemma 3.3

(Comparison) Suppose that u and \(u_0\) are as in Proposition 3.1. If there exists \(M\in {\mathbb {R}}\) such that \(u_0\le M\) in \(\Omega \), then \(u\le M\) in \(\Omega \).

To see this, one can take an exhaustion of \(\Omega \) by regular open sets \(\Omega _n\) (see [15, Corollary 6.32]) and solve the p-Laplace equation in \(\Omega _n\) with boundary data \(u_{0,n}\) that smoothly approximates in \(W^{1,p}(\Omega _n)\) the function \(u_0\) and satisfies \(u_{0,n}\le M+1/n\). The solution \(u_n\) of the p-Laplace equation satisfies \(u_n=u_{0,n}\) on \(\partial \Omega _n\), and by the maximum principle [15, p. 111] we have \(u_n\le M+1/n\) in \(\Omega _n\). Now, by passing to a limit [15, Theorem 6.12], we obtain a p-harmonic function \({\widetilde{u}}\le M\) that necessarily solves the Dirichlet Problem in \(\Omega \). Since the solution is unique, we have \(u={\widetilde{u}}\le M\).

Proposition 3.4

(Non-degeneracy up to boundary) Suppose that u is a p-harmonic function in \(\Omega \). Moreover, suppose that \(J\subset \partial \Omega \) is a \(C^\infty \)-smooth essential open Jordan arc on which u extends continuously and is equal to a constant t, and suppose that \(u\ne t\) in a neighborhood of J in \(\Omega \). Then \(|\nabla u| \ne 0\) in a neighborhood of J in \(\Omega \) and in fact each point \(x_0\in J\) has a neighborhood in \(\Omega \) in which \(|\nabla u|\) is bounded away from 0.

This result follows from [25, Theorem 2.8] and [2, Corollary 6.2]. The first result implies that each \(x_0\in J\) has a neighborhood \(B(x_0,r)\) such that \(|\nabla u(x)| \ge c |u(x)-t|/{\text {dist}}(x,\partial \Omega )\) for all \(x\in B(x_0,r)\cap \Omega \), where \(c>0\) is a constant depending on p and on the geometry of J. The second cited result implies that \(|u(x)-t|/ {\text {dist}}(x,\partial \Omega ) \ge c'\) for all x in a possibly smaller ball \(B(x_0,r')\cap \Omega \), where \(c'>0\) is some constant depending on u.

If \(J\subset \partial \Omega \) is a \(C^\infty \)-smooth essential open Jordan arc, then a function \(u:\Omega \rightarrow {\mathbb {R}}\) is said to be (\(C^\infty \)-)smooth up to J if there exists an open set \(U\supset J\) and u extends to a \(C^\infty \)-smooth function on U. Note that this does not require that u is smooth in all of \(\Omega \). If u is also smooth in \(\Omega \), then we write that u is smooth in \(\Omega \cup J\).

Proposition 3.5

(Boundary regularity) Suppose that u is a p-harmonic function in \(\Omega \). Moreover, suppose that \(J\subset \partial \Omega \) is a \(C^\infty \)-smooth essential open Jordan arc and that u is \(C^\infty \)-smooth when restricted to J. If each \(x_0\in J\) has a neighborhood in \(\Omega \) in which \(|\nabla u|\) is bounded away from 0, then u is \(C^{\infty }\)-smooth up to the arc J.

This follows from [14, Theorem 6.19, p. 111], since under the assumptions the p-harmonic equation is uniformly elliptic up to each compact subarc of the Jordan arc J.

Combining Propositions 3.4 and 3.5 we have:

Corollary 3.6

Suppose that u is a p-harmonic function in \(\Omega \). Moreover, suppose that \(J\subset \partial \Omega \) is a \(C^\infty \)-smooth essential open Jordan arc on which u extends continuously and is equal to a constant t, and suppose that \(u\ne t\) in a neighborhood of J in \(\Omega \). Then u is \(C^\infty \)-smooth up to the arc J and each point of J has a neighborhood in \(\Omega \cup J\) in which \(|\nabla u|\) is bounded away from 0.

4 Proof of the Approximation Theorem

In this section we prove Theorem 1.6. Let us start with an elementary lemma:

Lemma 4.1

Let \(f:\Omega \rightarrow {\mathbb {R}}\) be a continuous function and suppose that \(\{s_i\}_{i\in {\mathbb {Z}}}\) is a bi-infinite sequence of real numbers with \(s_i<s_{i+1}\), \(i\in {\mathbb {Z}}\), and \(\lim _{i\rightarrow \pm \infty } s_i= \pm \infty \). For \(i\in {\mathbb {Z}}\) define \(S_j=f^{-1}((s_j,s_{j+1}))\). If each of the level sets \(f^{-1}(s_i)\), \(i\in {\mathbb {Z}}\), is an embedded 1-dimensional topological submanifold of \({\mathbb {R}}^2\), then

  1. (i)

    \(\bigcup _{i\in {\mathbb {Z}}} f^{-1}(s_i)\) is also an embedded 1-dimensional topological submanifold,

  2. (ii)

    \(\partial S_j\cap \Omega \subset f^{-1}(s_j) \cup f^{-1}(s_{j+1})\) and \(f^{-1}(s_j)\subset \partial S_{j-1} \cup \partial S_j \) for all \(j\in {\mathbb {Z}}\), and

  3. (iii)

    if \(x\in f^{-1}(s_j)\) for some \(j\in {\mathbb {Z}}\), then there exist disjoint Jordan regions \(V_+, V_-\) such that the closure of \(V_+\cup V_-\) contains a neighborhood of x and there exists an open Jordan arc \(J\subset \partial V_+\cap \partial V_- \cap f^{-1}(s_j)\) containing x such that J is an essential boundary arc of \( V_+\) and \( V_-\). Moreover, each of \(V_+,V_-\) is contained in a component of \(S_{j-1}\cup S_j\).

Proof

Let \(x\in \bigcup _{i\in {\mathbb {Z}}} f^{-1}(s_i)\), so \(x\in f^{-1}(s_j)\) for some \(j\in {\mathbb {Z}}\). Then we claim that there exists a neighborhood V of x such that \(V\cap \bigcup _{i\in {\mathbb {Z}}} f^{-1}(s_i)= V\cap f^{-1}(s_j)\). This claim trivially implies (i). Note that x has positive distance from \(f^{-1}(s_i)\), for all \(i\ne j\) by the continuity of f. If the claim were not true, then one would be able to find a sequence \(x_n\in f^{-1}(s_{i_n})\), where \(i_n\) are distinct integers with \(i_n\ne j\), \(n\in {\mathbb {N}}\), such that \(x_n\rightarrow x\) as \(n\rightarrow \infty \). By continuity \(f(x_n)\rightarrow f(x)\) so \(s_{i_n}\rightarrow s_j\) as \(n\rightarrow \infty \). This contradicts the assumptions on the sequence \(\{s_i\}_{i\in {\mathbb {Z}}}\).

Part (ii) follows by the continuity of f. Indeed, if \(x_n \in f^{-1}((s_j,s_{j+1}))\) converges to \(x \in \partial f^{-1}((s_j,s_{j+1}))\cap \Omega \), then \(f(x_n)\) converges to f(x). Note that f(x) cannot lie in \((s_j,s_{j+1})\), otherwise \(f(y)\in (s_j,s_{j+1})\) for all y in a neighborhood of x by continuity, so x would not be a boundary point of \(f^{-1}((s_j,s_{j+1}))\). Therefore \(f(x)=s_j\) or \(f(x)=s_{j+1}\). For the second claim in (ii) note that \(f^{-1}(s_j)\) has empty interior (as a subset of the plane), since it is a 1-manifold. Therefore for each point \(x\in f^{-1}(s_j)\) we can find a sequence of points \(x_n\) converging to x with \(f(x_n)\ne s_j\), so \(f(x_n)\in (s_{j-1},s_j)\cup (s_j,s_{j+1})\) for all sufficiently large n. The claim follows.

For (iii), let \(x\in f^{-1}(s_j)\). By part (i), we conclude that there exists a neighborhood V of x that does not intersect \(f^{-1}(s_i)\) for any \(i\ne j\). Since \(f^{-1}(s_j)\) is an embedded 1-dimensional manifold, after shrinking V if necessary, there exists a homeomorphism \(\phi :V \rightarrow {\mathbb {R}}^2\) such that \(\phi (f^{-1}(s_j)\cap V)={\mathbb {R}}\); see Remark 2.12. Consider small Jordan regions \( V_+ \subset \phi ^{-1}({\mathbb {R}}^2_+)\), \( V_- \subset \phi ^{-1}({\mathbb {R}}^2_-)\) such that the closure of \(V_+\cup V_-\) contains a neighborhood of x. It follows that there exists an open Jordan arc \(J\subset \partial V_+\cap \partial V_- \cap f^{-1}(s_j)\) containing x such that J is an essential boundary arc of \( V_+\) and \( V_-\). By (ii) we have that \(x\in \partial f^{-1}((s_{j-1},s_{j}))\cup \partial f^{-1}((s_j,s_{j+1}))\). Hence, \(V_+,V_-\) must intersect the open set \(f^{-1}((s_{j-1},s_{j}))\cup f^{-1}((s_j,s_{j+1}))\). Since \(V_+\) and \(V_-\) are connected and they do not intersect the boundary of that set (by the choice of V), it follows that they are contained in connected components of \(f^{-1}((s_{j-1},s_{j}))\cup f^{-1}((s_j,s_{j+1}))\). \(\square \)

We let \(u:\Omega \rightarrow {\mathbb {R}}\) be a continuous monotone function with \(u\in W^{1,p}(\Omega )\), as in the statement of Theorem 1.6. In our proof we will follow the steps of [19] and [18]. Namely, using Theorem 1.4, we will first partition \(\Omega \) into disjoint open subsets \(\Upsilon _i\) and smooth the function u in these subsets by replacing it with a p-harmonic function. This is the first step below. Next, we have to mollify the new function along the boundaries of \(\Upsilon _i\). For this purpose, we partition even further \(\Omega \), so that the boundaries of the regions \(\Upsilon _i\) are contained in regions \(\Psi _j\). Following [19], we call this new partition a lens-type partition. In the regions \(\Psi _j\) we consider another p-harmonic replacement. This completes the second step. In the third and final step we have to smooth our function along the boundaries of the regions \(\Psi _j\), using smoothing results from Section 5. Throughout all steps we have to ensure that our functions are monotone. This is guaranteed by the gluing lemmas from Section 2.3 that allow us to paste together the various p-harmonic functions.

4.1 Step 1: Approximation by a Piecewise Smooth Function

4.1.1 Initial Partition of \(\Omega \)

For fixed \(\delta >0\) we consider a bi-infinite sequence of real numbers \(\{t_i\}_{i\in {\mathbb {Z}}}\) such that \(t_i<t_{i+1}\), \(|t_{i+1}-t_i|<\delta \) for \(i\in {\mathbb {Z}}\), and \(\lim _{i\rightarrow \pm \infty } t_i=\pm \infty \). Moreover, we may have that the conclusions of Theorem 2.11 are satisfied for the level sets \(A_{t_i}\); that is, \(A_{t_i}\) is an embedded 1-dimensional topological submanifold of the plane. Note that \(u^{-1}(t_i)\) or \(u^{-1}((t_i,t_{i+1}))\) will be empty if \(t_i\notin u(\Omega )\) or \((t_i,t_{i+1})\cap u(\Omega )=\emptyset \), respectively.

4.1.2 Solution of the Dirichlet Problem

In each region \( \Upsilon _i =u^{-1}((t_i,t_{i+1}))\), using Proposition 3.1, we solve the Dirichlet Problem with boundary data u and obtain a function \(u_i\in W^{1,p}(\Upsilon _i)\). The function \(u_i\) is monotone in \(\Upsilon _i\) since it is p-harmonic. By Lemma 3.3, we have \(t_i\le u_i\le t_{i+1}\).

Moreover, if \(x_0\in \partial \Upsilon _j \cap \Omega \), then \(x_0 \in A_t\), where \(t=t_j\) or \(t=t_{j+1}\) by Lemma 4.1(ii). Part (iii) of the same lemma implies that there exist disjoint Jordan regions \(V_+, V_-\) such that the closure of \(V_+\cup V_-\) contains a neighborhood of \(x_0\) and there exists an open Jordan arc \(J\subset \partial V_+\cap \partial V_-\cap A_t\) containing \(x_0\) such that J is an essential boundary arc of \( V_+\) and \( V_-\). Moreover, \(V_+ \subset \Upsilon _j\) and \(V_- \subset \Upsilon _i\) for some \(i\in {\mathbb {Z}}\). By Lemma 3.2 the functions \(u_j,u_i\) extend continuously to \(V_+\cup J\), \(V_-\cup J\), respectively, and \(u_j\big |J=t\), \(u_i\big |J=t\). Since \(\overline{V_+\cup V_-}\) contains a neighborhood of x, we have that \(u_j\) extends continuously to \(x_0\). Hence, \(u_j\) extends continuously to each point of \(\partial \Upsilon _j\cap \Omega \) and agrees there with u.

Using Corollary 2.16, we “glue” the functions \(u_i\), \(i\in {\mathbb {Z}}\), together with u, to obtain a continuous monotone function \(u_\delta \) on \(\Omega \). Note that

$$\begin{aligned} u_\delta -u= \sum _{i\in {\mathbb {Z}}} [u_i-u]_0, \end{aligned}$$

where \([u_i-u]_0 \in W^{1,p}_0(\Omega )\) denotes the extension of \(u_i-u\) by 0 outside \(u^{-1}((t_i,t_{i+1}))\). The completeness of \(W^{1,p}_0(\Omega )\) implies that \(u_\delta -u\in W^{1,p}_0(\Omega )\). Therefore, by Proposition 3.1 we conclude that

$$\begin{aligned} E_p(u_\delta )\le E_p(u)= \int _\Omega |\nabla u|^p. \end{aligned}$$

If u is not already p-harmonic, which we may assume, then the above inequality is strict by the uniqueness part of Proposition 3.1.

Since, \(t_i\le u_\delta \le t_{i+1}\) in \( A_{t_i,t_{i+1}}\), we have

$$\begin{aligned} |u-u_\delta | \le |u-t_i|+|t_i-u_\delta |\le 2|t_{i+1}-t_i|<2\delta \end{aligned}$$

in \(\Omega \) and so \(u_\delta \) is uniformly close to u. We also observe here that

$$\begin{aligned} u_\delta ^{-1}((t_j,t_{j+1}))\subset A_{t_j,t_{j+1}}, \,\,\, j\in {\mathbb {Z}}, \end{aligned}$$
(4.1)

which will be used later. This follows from the decomposition of \(\Omega \) as

$$\begin{aligned} \Omega = \bigcup _{i\in {\mathbb {Z}}} (A_{t_i,t_{i+1}} \cup A_{t_i}) \end{aligned}$$

and the observation that \(u_\delta ^{-1}((t_i,t_{i+1}))\) cannot intersect \(A_{t_j}\) for any \(i,j\in {\mathbb {Z}}\), since \(u_\delta =u=t_j\) on \(A_{t_j}\).

Since \(\Omega \) is bounded, it follows that \(u_\delta \rightarrow u\) in \(L^p(\Omega )\) as \(\delta \rightarrow 0\). Moreover, \(\Vert u_\delta \Vert _{W^{1,p}(\Omega )}= \Vert u_\delta \Vert _{L^p(\Omega )}+ \Vert \nabla u_\delta \Vert _{L^p(\Omega )}\) is uniformly bounded as \(\delta \rightarrow 0\). By the Banach–Alaoglu theorem it follows that, along a sequence of \(\delta \rightarrow 0\), \(u_\delta \) converges weakly in \(W^{1,p}(\Omega )\) to u, which is also the pointwise limit of \(u_\delta \). Since the limits are unique, we do not need to pass to a subsequence. Hence, by the lower semicontinuity of the norm with respect to the weak convergence, we have

$$\begin{aligned} \Vert \nabla u\Vert _{L^p(\Omega )}\le \liminf _{\delta \rightarrow 0} \Vert \nabla u_\delta \Vert _{L^p(\Omega )} \le \limsup _{\delta \rightarrow 0} \Vert \nabla u_\delta \Vert _{L^p(\Omega )}. \end{aligned}$$

The latter is bounded by \(E_p(u)^{1/p}=\Vert \nabla u\Vert _{L^p(\Omega )}\), hence \(\lim _{\delta \rightarrow 0}\Vert \nabla u_\delta \Vert _{L^p(\Omega )} = \Vert \nabla u\Vert _{L^p(\Omega )}\). This implies that \(\nabla u_\delta \rightarrow \nabla u\) in \(L^p(\Omega )\), due to the uniform convexity of \(L^p\) spaces, when \(1<p<\infty \); see for example [7, pp. 95–97] and [7, Proposition 3.32, p. 78].

We remark that \(u_\delta \) might be constant in some component of a level region \(u^{-1}((t_i,t_{i+1}))\). Summarizing, for each \(\varepsilon >0\) there exists \(\delta _0>0\) such that for \(0<\delta <\delta _0\) there exists a monotone function \(u_\delta \) on \(\Omega \) satisfying the following:

  1. (A)

    \(u_\delta \) is p-harmonic in \(u^{-1}((t_i,t_{i+1}))\), \(i\in {\mathbb {Z}}\),

  2. (B)

    \(\sup _{\Omega }|u_\delta -u|<\varepsilon \),

  3. (C)

    \(\Vert \nabla u_\delta -\nabla u\Vert _{L^p(\Omega )}<\varepsilon \),

  4. (D)

    \(E_p(u_\delta )< E_p(u)\), and

  5. (E)

    \(u_\delta -u \in W^{1,p}_0(\Omega )\).

In the next step, our goal is to approximate in the sense of (B)–(E) the function \(v\,{:}{=}\,u_\delta \), for a small fixed \(\delta \), by functions that are smooth along the level sets \(A_{t_i}\), \(i\in {\mathbb {Z}}\); note that these are the level sets of the original function u!

4.2 Step 2: Smoothing Along the Level Sets \(u^{-1}(t_j)\)

4.2.1 Lens-Type Partition

Note that if a level set \(v^{-1}(t)\) is a 1-dimensional manifold, then it cannot intersect any component of \(\bigcup _{i\in {\mathbb {Z}}}A_{t_i,t_{i+1}}\) where v is constant. Since v is p-harmonic in \(\bigcup _{i\in {\mathbb {Z}}}A_{t_i,t_{i+1}}\), it has at most countably many critical points in each component of \(A_{t_i,t_{i+1}}\), unless it is constant there; see Section 3. For \(\eta >0\) and for each \(j\in {\mathbb {Z}}\) we consider real numbers \(t_j^-, t_j^+\) with \(|t_j^+-t_j^-|<\eta \) such that \(t_{j-1}^+<t_j^-<t_j<t_j^+<t_{j+1}^-\), \(v^{-1}(t_j^{\pm })\) does not contain any critical points of v, and the conclusions of Theorem 2.11 hold for the level sets \(v^{-1}(t_j^\pm )\). In particular, the level sets \(v^{-1}(t_j^{\pm })\) intersect only components of \(\bigcup _{i\in {\mathbb {Z}}}A_{t_i,t_{i+1}}\) in which v is non-constant, and therefore the critical points of v form a discrete set within these components. It follows that each point \(x\in v^{-1}(t_j^\pm )\) has a neighborhood in \(\bigcup _{i\in {\mathbb {Z}}}A_{t_i,t_{i+1}}\) that does not contain any critical points of v.

In each region \(\Psi _j\,{:}{=}\,v^{-1}( (t_{j}^-, t_j^+))\) we solve the Dirichlet Problem with boundary data v as in Section 4.1.2 and obtain p-harmonic functions \(v_j\) with \(t_{j}^-\le v_j\le t_j^+\) that extend continuously to \(\partial \Psi _j\cap \Omega \) and agree there with v. We define a function \(v_\eta \) to be equal to \(v_j\) in \(\Psi _j\), \(j\in {\mathbb {Z}}\), and equal to v on \(\Omega \setminus \bigcup _{j\in {\mathbb {Z}}} \Psi _j\).

This procedure results in a continuous monotone function \(v_\eta \), by Corollary 2.16, that approaches v in the uniform norm and also in \(W^{1,p}(\Omega )\), as \(\eta \rightarrow 0\). Moreover, we have \(E_p(v_\eta )< E_p(v)\) (unless v is p-harmonic in \(\Omega \), which we may assume that is not the case) and \(v_\eta -v\in W^{1,p}_0(\Omega )\). That is, (B)–(E) from Section 4.1.2 are satisfied.

4.2.2 Regularity of the Approximation

The function \(w\,{:}{=}\,v_\eta \) is monotone in \(\Omega \). As far as the regularity of w is concerned, we claim the following:

  1. (a)

    The function w is p-harmonic in \(\Psi _j\) and in \(v^{-1}((t_j^+,t_{j+1}^-))\), for all \(j\in {\mathbb {Z}}\). Therefore, w is \(C^{1,\alpha }\)-smooth in each of these sets and if \(p=2\), it is actually \(C^\infty \)-smooth.

  2. (b)

    Each point \(x_0\in v^{-1}(t_j^\pm )\), \(j\in {\mathbb {Z}}\), has a neighborhood \(V=V_+\cup V_-\) in

    $$\begin{aligned} {\mathcal {W}}\,{:}{=}\,\Omega \setminus \bigcup _{i\in {\mathbb {Z}}} v^{-1}(\{t_i^-,t_i^+\})= \bigcup _{i\in {\mathbb {Z}}} (\Psi _i \cup v^{-1}((t_i^+,t_{i+1}^-))), \end{aligned}$$

    where \(V_+,V_-\) are disjoint Jordan regions contained in connected components of \({\mathcal {W}}\), \(\overline{V}\) contains a neighborhood of \(x_0\), and there exists a \(C^\infty \)-smooth open Jordan arc \(J\subset \partial V_+\cap \partial V_- \cap v^{-1}(t_j^{\pm })\) containing \(x_0\) such that J is an essential boundary arc of \(V_+\) and \(V_-\). Moreover, inside each one of \(V_+, V_-\), \(|\nabla w|\) is either vanishing or bounded below away from 0; in the second case we have \(w\ne t_{j}^\pm \) in the corresponding region. The function w is smooth up to the boundary arc J in each of \(V_+,V_-\).

  3. (c)

    The function w is \(C^{\infty }\)-smooth in \({\mathcal {W}}\), except possibly for a discrete set of points of \({\mathcal {W}}\) that accumulates at \(\partial \Omega \).

For (a) note that, by definition, w is p-harmonic on \(\Psi _j\), while on \(v^{-1}((t_j^+ ,t_{j+1}^-)) \subset \Omega \setminus \bigcup _{i\in {\mathbb {Z}}} \Psi _i\) we have \(w=v\) (by the definition of w) and v is p-harmonic in \(v^{-1}((t_j^+ ,t_{j+1}^-))=u_\delta ^{-1}((t_j^+ ,t_{j+1}^-))\subset u^{-1}( (t_j,t_{j+1}))\); see (4.1). Therefore, by the regularity of p-harmonic functions (see Section 3), w is \(C^{1,\alpha }\)-smooth in the open set \({\mathcal {W}}\) and in fact w is \(C^\infty \)-smooth in \({\mathcal {W}}\), except possibly for the (at most) countably many critical points that are contained in components U of \({\mathcal {W}}\) in which w is non-constant. The critical points form a discrete subset of such components U of \({\mathcal {W}}\), so they could only accumulate in points of \(\partial U\).

Assuming that (b) is true, we will show (c). It suffices to show that the critical points contained in a component U of \({\mathcal {W}}\) where w is non-constant do not have any accumulation point in \(\Omega \), but they can only accumulate at \(\partial \Omega \). Suppose for the sake of contradiction that the critical points contained in U accumulate at a point \(x_0\in \partial U\cap \Omega \). Observe that the values \(t_i^\pm \), \(i\in {\mathbb {Z}}\), form a discrete set of real numbers with no finite accumulation points, and the level sets \(v^{-1}(t_{i}^{\pm })\), \(i\in {\mathbb {Z}}\), are embedded 1-dimensional manifolds, as in the setting of Lemma 4.1. By Lemma 4.1(ii) there exists \(j\in {\mathbb {Z}}\) such that \(x_0 \in v^{-1}(\{t_j^-, t_j^+\})\). Consider the Jordan regions \(V_+,V_- \subset {\mathcal {W}}\) as in (b) such that \(\overline{V_+ \cup V_-}\) contains a neighborhood of \(x_0\). This implies that there are infinitely many critical points of w in, say, \(V_+\), where \(V_+\subset U\); note that at least one of \(V_+,V_-\) has to be contained in U. Since w is non-constant on \(U\supset V_+\), the conclusion of (b) implies that w does not have any critical points in \(V_+\), a contradiction.

Finally we prove (b). Let \(x_0\in v^{-1}(t_j^-)\) for some \(j\in {\mathbb {N}}\); the argument is the same if \(x_0\in v^{-1}(t_j^+)\). By Lemma 4.1(iii) we conclude that there exist disjoint Jordan regions \(V_+,V_-\) such that the closure of \(V_+\cup V_-\) contains a neighborhood of \(x_0\) and there exists an open Jordan arc \(J\subset \partial V_+\cup \partial V_- \cap v^{-1}(t_j^-) \) containing \(x_0\) that is an essential boundary arc of \(V_+\) and \(V_-\). Moreover, the last statement of Lemma 4.1(iii) implies that \(V_+,V_-\) are contained in connected components of \( v^{-1}(( t_{j-1}^+,t_j^-))\cup v^{-1}((t_j^-,t_j^+))\). We will show that \(|\nabla w|\) is vanishing or bounded below in each of \(V_+,V_-\) (after possibly shrinking them) and that w is smooth up to the arc J in \(V_+\) and \(V_-\). We work with \(V_+\).

Let U be the component of \(v^{-1}(( t_{j-1}^+,t_j^-))\cup v^{-1}((t_j^-,t_j^+))\) containing \(V_+\). If w is constant in U then w is obviously smooth up to the arc J inside \(V_+\) and we have nothing to show. We suppose that w is non-constant in U.

Assume first that \(V_+\subset U\) is contained in \(v^{-1}((t_{j-1}^+,t_{j}^-))\). Then \(w=v<t_j^-\) on \(V_+\) by the definition of w. By the choice of \(t_j^-\) in Section 4.2.1, each point of \( v^{-1}(t_j^-)\supset J\) has a neighborhood in \(\bigcup _{i\in {\mathbb {Z}}}A_{t_i,t_{i+1}}\) that does not contain any critical points of v. In particular, each point of the arc J has a neighborhood in which v is non-constant, p-harmonic, and \(|\nabla v|\) is non-zero. It follows that v is smooth in a neighborhood of J; see Section 3. Therefore, after shrinking the Jordan region \(V_+\) if necessary, w is smooth in \(V_+\) up to the arc J, and each point of J has a neighborhood in \(V_+\) in which \(|\nabla w|=|\nabla v|\) is bounded away from 0.

Suppose now that \(V_+\subset U\) is contained in \(\Psi _j=v^{-1}((t_j^-,t_j^+))\). We have \(J\subset v^{-1}(t_j^-)\), so \(w=v=t_j^-\). Since w is p-harmonic on \(V_+\subset U\) and non-constant, we must have \(w>t_j^-\) on \(V_+\) by the strong maximum principle [15, p. 111]. Note that the arc J is \(C^\infty \)-smooth, because \(J\subset v^{-1}(t_j^-)\) and \(t_j^-\) is a regular (that is, non-critical) value of v by the choice of \(t_{j}^{-}\). Now we are exactly in the setting of Corollary 3.6, which implies that each point of J has a neighborhood in \(V_+\) that does not contain any critical points of w and \(|\nabla w|\) is bounded away from 0. If we shrink the Jordan region \(V_+\), we may have that these hold in \(V_+\). By Corollary 3.6 it also follows that w is smooth up to the boundary in the region \(V_+\). The proof of (b) is completed. \(\square \)

We have managed to obtain a monotone function w that is smooth along the level sets \(u^{-1}(t_j)\), but it is not necessarily smooth along \(v^{-1}(t_j^{\pm })\). It has, however, some smoothness up to \(v^{-1}(t_j^\pm )\), as described in (b). In the next subsection we prove that w can be \(C^\infty \)-smoothed at arbitrarily small neighborhoods of the level sets \(v^{-1}(t_{j}^{\pm })\) so as to complete the proof of Theorem 1.6. For this purpose we utilize smoothing results from Section 5.

4.3 Step 3: Smoothing Along the Level Sets \(v^{-1}(t_j^{\pm })\)

We fix \(j\in {\mathbb {Z}}\) and a component J of \(v^{-1}(t_j^-)\). Recall that J is a smooth 1-manifold, since \(t_j^-\) was chosen to be a regular value of v, and v is \(C^\infty \)-smooth in a neighborhood of \(v^{-1}(t_j^-)\). There are two cases: either J is homeomorphic to \({\mathbb {R}}\) or it is homeomorphic to \(S^1\) (see the classification in Theorem 5.1).

By claim (b) from Section 4.2.2, each \(x_0\in J\) has a neighborhood \(V=V_+\cup V_-\) in \(\Omega \setminus v^{-1}(t_j^-)\), where \(V_+,V_-\) are disjoint Jordan regions, \(\overline{V}\) contains a neighborhood of \(x_0\) and there exists an open arc \(J_0\subset J\) containing \(x_0\) that is contained in the common boundary of \(V_+\) and \(V_-\). Moreover, w is \(C^\infty \)-smooth in \({ V_+}\cup J_0\) and in \({V_-}\cup J_0\), and \(|\nabla w|\) is either vanishing or bounded below away from 0 in each of \(V_+, V_-\); in the second case we have \(w\ne t_j^-\) in the corresponding set.

Assume first that J is homeomorphic to \({\mathbb {R}}\). We note that in this case the topological ends of J lie in \(\partial \Omega \), because J is rel. closed in \(\Omega \). By Theorem 5.1, there exists a neighborhood U of J in \({\mathbb {R}}^2\) and a diffeomorphism \(\phi :{\mathbb {R}}^2\rightarrow U\) such that \(\phi ({\mathbb {R}})=J\). The previous paragraph implies that there exist connected neighborhoods \({\widetilde{B}}^+\) and \({\widetilde{B}}^-\) of \({\mathbb {R}}\) in \(\{y>0\}\) and \(\{y<0\}\), respectively, such that \(w\circ \phi \) is smooth in \({\widetilde{B}}^+ \cup {\mathbb {R}}\) and in \({\widetilde{B}}^-\cup {\mathbb {R}}\), and each point of \({\mathbb {R}}\) has a neighborhood in \({\widetilde{B}}^+\cup {\widetilde{B}}^-\) in which \(|\nabla (w\circ \phi )|\) is either vanishing or bounded away from 0. Moreover, in each of \({\widetilde{B}}^+\) and \({\widetilde{B}}^-\) the function \(w\circ \phi \) is either constant or we have \(w\circ \phi > t_j^-\) or \(w\circ \phi <t_j^-\) .

Therefore, there exist disjoint connected open sets \(B^+=\phi ({\widetilde{B}}^+)\) and \(B^-=\phi ({\widetilde{B}}^-)\) so that \(B=B^+\cup B^-\cup J\) is an open set containing J and w satisfies one of the following conditions, with the roles of \(B^+\), \(B^-\) possibly reversed:

  • (i) \(w=t_j^-\) on J, \(w>t_j^-\) on \(B^+\), \(w<t_j^-\) on \(B^-\),

  • (i\('\)) \(w=t_j^-\) on J, \(w>t_j^-\) on \(B^+\), \(w=t_j^-\) on \(B^-\),

  • (i\(''\)) \(w=t_j^-\) on J, \(w>t_j^-\) on \(B^+\), \(w>t_j^-\) on \(B^-\),

  • (i\('''\)) \(w=t_j^-\) on J, \(w=t_j^-\) on \(B^+\), \(w=t_j^-\) on \(B^-\).

Note that (i\('''\)) immediately implies that w is smooth at each point of J.

If (i) holds, then \(|\nabla w|\) must be non-zero in \(B^+\cup B^-\), hence each point of J has a neighborhood in \(B^+\cup B^-\) in which \(|\nabla w|\) is bounded away from 0. We are now exactly in the setting of the smoothing Lemma 5.2. Thus, there exists a monotone function \({\widetilde{w}}\) in \(\Omega \) that is smooth in B, agrees with w outside an arbitrarily small neighborhood A of J, and is arbitrarily close to w in the uniform and in the Sobolev norm. In particular, since \(E_p(w)<E_p(u)\) (cf. (D) from Section 4.1.2) we may have \(E_p({\widetilde{w}}) < E_p(u)\). Finally, we have \({\widetilde{w}} -w \in W^{1,p}_0(\Omega )\) from Lemma 5.2(d) as claimed in (E) in the statement of Theorem 1.6. If (i\('\)) or (i\(''\)) holds instead, then we are in the setting of Lemma 5.3 and obtain the same conclusions.

Now, if J is homeomorphic to \(S^1\) we can find connected open sets \(B^+\), \(B^-\) so that J is their common boundary. In this case, we have the following alternatives:

  • (i) \(w=t_j^-\) on J, \(w>t_j^-\) on \(B^+\), \(w<t_j^-\) on \(B^-\),

  • (i\('\)) \(w=t_j^-\) on J, \(w>t_j^-\) on \(B^+\), \(w=t_j^-\) on \(B^-\),

  • (i\('''\)) \(w=t_j^-\) on J, \(w=t_j^-\) on \(B^+\), \(w=t_j^-\) on \(B^-\).

We note that the alternative (i\(''\)) of the previous case does not occur here, since it would violate the monotonicity of w. We can now apply Lemma 5.4 to smooth the function w near J.

We apply the above smoothing process countably many times in pairwise disjoint, arbitrarily small neighborhoods of components of \(v^{-1}(t_j^{\pm })\), \(j\in {\mathbb {Z}}\). Since these components do not accumulate in \(\Omega \) (see Lemma 4.1(i)), the resulting limiting function \({\widetilde{w}}\) will be \(C^\infty \)-smooth in \(\Omega \), except possibly at a discrete set of points of \(\Omega \) (by (a),(c) in Section 4.2.2), in which \({\widetilde{w}}\) is \(C^{1,\alpha }\)-smooth; if \(p=2\) then \({\widetilde{w}}\) is \(C^\infty \)-smooth everywhere. If the neighborhoods of \(v^{-1}(t_j^{\pm })\), \(j\in {\mathbb {Z}}\), where the smoothing process takes place are arbitrarily small, then \({\widetilde{w}}\) will be p-harmonic on a subset of \(\Omega \) having measure arbitrarily close to full. Moreover, by Lemma 2.15, \({\widetilde{w}}\) is monotone in \(\Omega \). Finally, it satisfies the corresponding conditions (B)–(E) from Section 4.1.2. This completes the proof of Theorem 1.6. \(\square \)

5 Smoothing Results

Theorem 5.1

Let J be an embedded 1-dimensional smooth submanifold of \({\mathbb {R}}^2\) that is connected. Then J is diffeomorphic to X, where \(X={\mathbb {R}}\times \{0\}\subset {\mathbb {R}}^2\) or \(X=S^1\subset {\mathbb {R}}^2\). Moreover, there exists a neighborhood U of J in \({\mathbb {R}}^2\) and a diffeomorphism \(\phi :{\mathbb {R}}^2\rightarrow U\) such that \(\phi (X)=J\).

We direct the reader to [41] for an account on the classification of 1-manifolds. The last statement of Theorem 5.1 can be proved in the same way as the existence of tubular neighborhoods of embedded submanifolds of \({\mathbb {R}}^n\); see for example [22, Theorem 6.24, p. 139].

Lemma 5.2

(Smoothing along a line) Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and let \(J \subset \Omega \) be an embedded 1-dimensional smooth submanifold of \({\mathbb {R}}^2\), homeomorphic to \({\mathbb {R}}\), such that J has no accumulation points in \(\Omega \); that is, the topological ends of J lie in \(\partial \Omega \). Suppose that J is contained in an open set \(B\subset \Omega \) that is the common boundary of two disjoint regions \(B^+\) and \(B^-\) with \(B=B^+\cup B^-\cup J\). Moreover, let \(u\in W^{1,p}(\Omega )\) be a monotone function with the following properties:

  1. (i)

    \(u=0\) on J, \(u>0\) on \(B^+\), \(u<0\) on \(B^-\),

  2. (ii)

    u is smooth in \(B^+\cup J\) and in \(B^-\cup J\),

  3. (iii)

    each point of J has a neighborhood in \(B^+\cup B^-\) in which \(|\nabla u|\) is bounded away from 0.

Then for any open set \(U\subset B\) with \(U\supset J\) and each \(\varepsilon >0\) there exists an open set \(A\subset U\) containing J and a monotone function \({\widetilde{u}}\) in \(\Omega \) such that

  1. (a)

    \({\widetilde{u}}\) agrees with u in \(\Omega \setminus A\) and is smooth in B,

  2. (b)

    \(|{\widetilde{u}}- u|<\varepsilon \) in A,

  3. (c)

    \(\Vert \nabla {\widetilde{u}}-\nabla u\Vert _{L^p(A)}<\varepsilon \), and

  4. (d)

    \({\widetilde{u}}-u\in W^{1,p}_{0}(A)\).

Proof

By using a diffeomorphism \(\phi \) defined in a neighborhood of J in B, given by Theorem 5.1, we may straighten J and assume that \(J={\mathbb {R}}=\{(x,y):y=0\}\), \(B={\mathbb {R}}^2\), \(B^+=\{(x,y):y>0\}\), \(B^-=\{(x,y):y<0\}\). For each \(\varepsilon >0\) we will construct a smooth function \({\widetilde{u}}\) that agrees with u outside an arbitrarily small neighborhood A of \({\mathbb {R}}\), \(|{\widetilde{u}}-u|<\varepsilon \) in A and \(\Vert \nabla {\widetilde{u}} -\nabla u\Vert _{L^q(A)}<\varepsilon \), where \(q>p\) is a fixed exponent (for example, \(q=2p\)). If the neighborhood A is sufficiently thin, then \({\widetilde{u}}-u\in W^{1,q}_0(A)\). Pulling back \({\widetilde{u}}\) under the diffeomorphism \(\phi \) and using Hölder’s inequality will yield the desired conclusions in \(\Omega \). We argue carefully for the monotonicity of \({\widetilde{u}}\) in the end of the proof.

For the construction of \({\widetilde{u}}\), essentially, we are going to interpolate between the function u away from \({\mathbb {R}}\) and the “height function” \((x,y)\mapsto y\) near \({\mathbb {R}}\). Several technicalities arise though, in order to ensure that the new function is monotone.

By assumption (iii), for each \(x\in {\mathbb {R}}\) there exists a constant \(m>0\) such that \(|\nabla u |>m\) in a neighborhood of x in \({\mathbb {R}}^2\setminus {\mathbb {R}}\). Since \(u=0\) on \({\mathbb {R}}\), we have \(u_x=0\) on \({\mathbb {R}}\). Hence, using the smoothness of u in \(B^+\cup {\mathbb {R}}\) and in \(B^-\cup {\mathbb {R}}\) we conclude that for each point \(x\in {\mathbb {R}}\) there exist constants \(m,M>0\) such that \(M>|u_y|>m\) in a neighborhood of x in \({\mathbb {R}}^2\setminus {\mathbb {R}}\). Thus, we may consider positive smooth functions \(\gamma ,\delta :{\mathbb {R}}\rightarrow {\mathbb {R}}\) such that \(\delta (x)>|u_y(x,y)|>\gamma (x)>0\) for all (xy) lying in a small neighborhood of \({\mathbb {R}}\) in \({\mathbb {R}}^2\setminus {\mathbb {R}}\). By assumptions (i) and (ii), we have \(u_y\ge 0\) in a neighborhood of \({\mathbb {R}}\) in \({\mathbb {R}}^2\setminus {\mathbb {R}}\). Therefore,

$$\begin{aligned} \delta (x)>u_y(x,y)>\gamma (x)>0 \end{aligned}$$
(5.1)

for all (xy) lying in a neighborhood of \({\mathbb {R}}\) in \({\mathbb {R}}^2\setminus {\mathbb {R}}\). By choosing a possibly larger \(\delta \) we may also have

$$\begin{aligned} \delta (x)>|u_x(x,y)| \end{aligned}$$
(5.2)

in that neighborhood. We let A be a sufficiently small open neighborhood of \({\mathbb {R}}\) in \({\mathbb {R}}^2\) so that the preceding inequalities hold. Later we will shrink A even further.

For a positive smooth function \(\beta :{\mathbb {R}}\rightarrow {\mathbb {R}}\) we define \(V(\beta )=\{(x,y): |y|<\beta (x)\}\). Note that we may choose \(\beta \) so that \(\overline{V(\beta )}\subset A\). By scaling \(\beta \), we may also have that

$$\begin{aligned} |\beta '|\le 1. \end{aligned}$$
(5.3)

Moreover, we consider a non-negative smooth function \(\alpha :{\mathbb {R}}\rightarrow {\mathbb {R}}\) with \(\alpha (t)=1\) for \(t\ge 1\), \(\alpha (t)=0\) for \(t\le 1/2\), and

$$\begin{aligned} 0\le \alpha '\le 4. \end{aligned}$$
(5.4)

We now define \(s=s(x,y)= |y|/\beta (x)\) and

$$\begin{aligned} {\widetilde{u}}(x,y)= \alpha (s)u(x,y)+ (1-\alpha (s))y\gamma (x). \end{aligned}$$

This function is smooth, agrees with u outside \(V(\beta )\) (where \(s\ge 1\)), and agrees with \((x,y)\mapsto y\gamma (x)\) in \(V(\beta /2)\) (where \(0\le s<1/2\)). We have \(|{\widetilde{u}}-u| \le |1-\alpha (s)| |u-y\gamma |\le |u|+ |y|\gamma \). By (5.1) in A we have

$$\begin{aligned} |u(x,y)| = \left| \int _0^y u_y(x,t)\,\mathrm{d}t \right| \le |y|\delta (x). \end{aligned}$$
(5.5)

Therefore, \(|u|+|y|\gamma < |y|(\gamma +\delta )\). If A is so small that it is contained in the open set \(\{(x,y): |y|<\varepsilon /(\gamma (x)+\delta (x))\}\), then we have \(|{\widetilde{u}}-u|<\varepsilon \) in A, which proves claim (b).

We now compute the derivatives:

$$\begin{aligned} {\widetilde{u}}_x&= -\alpha '(s) \beta '(x) s^2 \frac{u-y\gamma }{|y|} +\alpha (s)u_x + (1-\alpha (s)) y\gamma ' \,\,\,\,\, \text {and}\\ {\widetilde{u}}_y&= \alpha '(s)s \frac{u-y\gamma }{y}+ \alpha (s)u_y+(1-\alpha (s))\gamma . \end{aligned}$$

By (5.3), (5.4), and (5.5) we have

$$\begin{aligned} |{\widetilde{u}}_x|&\le 4(\gamma +\delta )+\delta +|y||\gamma '| \,\,\,\,\, \text {and}\\ |{\widetilde{u}}_y|&\le 4(\gamma +\delta )+ \delta + \gamma \end{aligned}$$

in \(V(\beta )\subset A\). Since the above bounds and (5.1), (5.2) do not depend on A but only on the function u, if A is sufficiently small, then \(\Vert \nabla {\widetilde{u}}- \nabla u\Vert _{L^q(A)}\le \Vert \nabla {\widetilde{u}}\Vert _{L^q(V(\beta ))}+ \Vert \nabla u\Vert _{L^q(V(\beta ))}\) can be made as small as we wish.

We next prove that \({\widetilde{u}}\) is monotone in \({\mathbb {R}}^2\). Note that \(\frac{u-y\gamma }{y} \ge 0\) on A, since \(u_y>\gamma \) on A and \(u=\gamma y=0\) on \({\mathbb {R}}\times \{0\}\). Therefore,

$$\begin{aligned} {\widetilde{u}}_y \ge \gamma >0. \end{aligned}$$

This implies that \(\nabla {\widetilde{u}} \ne 0\) in A, so \({\widetilde{u}}\) does not have any local maximum or minimum in A, and it is strictly monotone there. On the other hand, \({\widetilde{u}} =u\) outside \(\overline{V(\beta )}\subset A\), and therefore \({\widetilde{u}}\) is monotone outside \(V(\beta )\). By the Gluing Lemma 2.19 it follows that \({\widetilde{u}}\) is monotone in \({\mathbb {R}}^2\).

The argument of the previous paragraph and the use of Lemma 2.19 can be carried in \(\Omega \), after precomposing \({\widetilde{u}}\) with the straightening diffeomorphism \(\phi ^{-1}\). We denote the composition, for simplicity, by \({\widetilde{u}}\). So \({\widetilde{u}}\) is a function in \(\Omega \) that is strictly monotone in \(\phi ^{-1}(A)\) and can be extended to agree with u in \(\Omega \setminus \overline{\phi ^{-1}(V(\beta ))}\); in particular, \({\widetilde{u}}\) is monotone in \(\Omega \setminus \overline{\phi ^{-1}(V(\beta ))}\). If we ensure that \(\overline{\phi ^{-1}(V(\beta ))}\cap \Omega \subset \phi ^{-1}(\overline{V(\beta }))\), then \(\overline{\phi ^{-1}(V(\beta ))}\cap \Omega \subset \phi ^{-1}(A)\), so Lemma 2.19 can be applied to yield the monotonicity of \({\widetilde{u}}\) in \(\Omega \).

The latter can be achieved by shrinking \(\beta \) (and thus the neighborhood \(V(\beta )\)) if necessary, using the assumption that the topological ends of J lie in \(\partial \Omega \) and not in \(\Omega \). We provide some details. The assumption that the topological ends of J lie in \(\partial \Omega \) and not in \(\Omega \) implies that \(\phi ^{-1}(z)\) accumulates at \(\partial \Omega \) whenever \(z\in {\mathbb {R}}\times \{0\}\) and \(z\rightarrow \infty \). By shrinking the neighborhood \(V(\beta )\) and using the continuity of \(\phi ^{-1}\), we may achieve that whenever \(z\in V(\beta )\) and \(z\rightarrow \infty \), we also have that \(\phi ^{-1}(z)\) accumulates at \(\partial \Omega \). Suppose now that \(\overline{\phi ^{-1}(V(\beta ))}\cap \Omega \not \subset \phi ^{-1}(\overline{V(\beta }))\), so there exists \(w\in \overline{\phi ^{-1}(V(\beta ))}\cap \Omega \) with \(w\notin \phi ^{-1}(\overline{V(\beta }))\). Then there exists a sequence \(w_n\in \phi ^{-1}(V(\beta ))\) accumulating at w. Since \(w\notin \phi ^{-1}(\overline{V(\beta }))\), the sequence \(z_n=\phi (w_n)\), which is contained in \(V(\beta )\), necessarily accumulates at \(\infty \). It follows that \(w_n=\phi ^{-1}(z_n)\) accumulates at \(\partial \Omega \), so \(w\in \partial \Omega \), which is a contradiction. \(\square \)

Lemma 5.3

The conclusions of Lemma 5.2 hold if the assumptions (i),(iii) are replaced by the assumptions

(i\(')\):

\(u=0\) on J, \(u>0\) on \(B^+\), \(u=0\) on \(B^-\), and

(iii\(')\):

each point of J has a neighborhood in \(B^+\) in which \(|\nabla u|\) is bounded away from 0,

or if (i) is replaced by the assumption

  • (i\('')\) \(u=0\) on J, \(u>0\) on \(B^+\), \(u>0\) on \(B^-\).

Proof

In the first case, one argues as in the proof of Lemma 5.2, by straightening the line J to the real line with a diffeomorphism \(\phi \). This time we interpolate between u and the function \(e^{-1/y}\) instead of the height function y:

$$\begin{aligned} {\widetilde{u}}(x,y)= {\left\{ \begin{array}{ll} \alpha (s)u(x,y)+ (1-\alpha (s)) e^{-1/y} \gamma (x) &{} y>0\\ u &{} y\le 0. \end{array}\right. } \end{aligned}$$

Here \(\gamma \), \(\delta \), \(\beta \), s, \(\alpha (s)\) are as in the previous proof, but working only in the upper half plane, and A, \(V(\beta )=\{(x,y):0<y<\beta (x)\}\) are appropriate neighborhoods of \({\mathbb {R}}\) in the upper half plane \(\{y>0\}\). The function \({\widetilde{u}}\) is smooth and the claims (a)–(d) from Lemma 5.2 follow as in the previous proof. We only have to argue differently for the monotonicity of \({\widetilde{u}}\).

We compute for \(y>0\)

$$\begin{aligned} {\widetilde{u}}_y= \alpha '(s) s \frac{u-e^{-1/y}\gamma }{y}+ \alpha (s) u_y + (1-\alpha (s)) \frac{e^{-1/y}}{y^2}\gamma . \end{aligned}$$

Since \(u_y>\gamma \) on A, we have \(\frac{u-e^{-1/y}\gamma }{y} \ge 0\) for all sufficiently small y. In particular this holds in A if we shrink A. It follows that \({\widetilde{u}}_y>0\) on A. Thus, \({\widetilde{u}}\) is strictly monotone in A. Moreover, outside \(\overline{V(\beta )}\cap \{y\ne 0\} \subset A\) the function \({\widetilde{u}}\) agrees with u. Summarizing, in the domain \({\widetilde{\Omega }} ={\mathbb {R}}^2\setminus {\mathbb {R}}=\{y\ne 0\}\) we have \(\overline{V(\beta )} \cap {\widetilde{\Omega }} \subset A\) and the function \({\widetilde{u}}\) is strictly monotone in A, and monotone in \({\widetilde{\Omega }}\setminus \overline{V(\beta )}\). By Lemma 2.19 we have that \({\widetilde{u}}\) is monotone in \({\widetilde{\Omega }}\).

Arguing as in the previous proof, we transfer the conclusions to \(\Omega \) and deduce that \({\widetilde{u}}\) is monotone in \(\Omega \setminus J\). Note that J is a connected closed subset of \(\Omega \). Since \({\widetilde{u}}=0\) in J and J exists all compact subsets of \(\Omega \), by Lemma 2.20 we conclude that \({\widetilde{u}}\) is monotone in \(\Omega \). This completes the proof under the assumptions (i\('\)) and (iii\('\)).

Now, we assume that (i\('')\) holds in the place of (i). After straightening J, we define

$$\begin{aligned} {\widetilde{u}}(x,y)= {\left\{ \begin{array}{ll} \alpha (s)u(x,y)+ (1-\alpha (s)) e^{-1/|y|} \gamma (x) &{} y\ne 0\\ 0 &{} y= 0 \end{array}\right. }. \end{aligned}$$

This is a smooth function in \({\mathbb {R}}^2\). The conclusions (a)–(d) are again straightforward, so we only argue for the monotonicity. In \(V(\beta )= \{(x,y): 0<|y|<\beta (x)\}\) and in a slightly larger open set \(A\supset \overline{V(\beta )}\) we have \({\widetilde{u}}_y\ne 0\). This implies that \({\widetilde{u}}\) is strictly monotone in A. Using Lemma 2.19, we have that \({\widetilde{u}}\) is monotone in \({\mathbb {R}}^2\setminus {\mathbb {R}}\).

We transfer the conclusions to \(\Omega \) and we obtain a function \({\widetilde{u}}\) that is monotone in \(\Omega \setminus J\). Since J is closed, connected and exits all compact subsets of \(\Omega \), and \({\widetilde{u}}=0\) on J, by Lemma 2.20 we conclude that \({\widetilde{u}}\) is monotone in \(\Omega \). \(\square \)

Lemma 5.4

(Smoothing along a Jordan curve) Let \(\Omega \subset {\mathbb {R}}^2\) be an open set and let \(J \subset \Omega \) be an embedded 1-dimensional smooth submanifold of \({\mathbb {R}}^2\), homeomorphic to \(S^1\). Suppose that J is contained in an open set \(B\subset \Omega \) that it is the common boundary of two disjoint regions \(B^+\) and \(B^-\) with \(B=B^+\cup B^-\cup J\). Moreover, let \(u\in W^{1,p}(\Omega )\) be a monotone function satisfying one of the following triples of conditions:

  1. (i)

    \(u=0\) on J, \(u>0\) on \(B^+\), \(u<0\) on \(B^-\),

  2. (ii)

    u is smooth in \(B^+\cup J\) and in \(B^-\cup J\),

  3. (iii)

    each point of J has a neighborhood in \(B^+\cup B^-\) in which \(|\nabla u|\) is bounded away from 0,

or

(i\(')\):

\(u=0\) on J, \(u>0\) on \(B^+\), \(u=0\) on \(B^-\),

(ii\(')\):

u is smooth in \(B^+\cup J\) and in \(B^-\cup J\),

(iii\(')\):

each point of J has a neighborhood in \(B^+\) in which \(|\nabla u|\) is bounded away from 0.

Then for any open set \(U\subset B\) with \(U\supset J\) and each \(\varepsilon >0\) there exists an open set \(A\subset U\) containing J and a monotone function \({\widetilde{u}}\) in \(\Omega \) such that

  1. (a)

    \({\widetilde{u}}\) agrees with u in \(\Omega \setminus A\) and is smooth in B,

  2. (b)

    \(|{\widetilde{u}}- u|<\varepsilon \) in A,

  3. (c)

    \(\Vert \nabla {\widetilde{u}}-\nabla u\Vert _{L^p(A)}<\varepsilon \), and

  4. (d)

    \({\widetilde{u}}-u \in W^{1,p}_0(A)\).

Proof

We will only sketch the differences with the proofs of Lemmas 5.2 and 5.3. By Theorem 5.1 we may map B with a diffeomorphism to a neighborhood of \(S^1\). After shrinking B, we may assume that this neighborhood of \(S^1\) is an annulus. Then, using logarithmic coordinates, we map \(S^1\) to \({\mathbb {R}}\). Let \(\phi \) denote the composition of the two maps described. By, precomposing u with \(\phi ^{-1}\), we can obtain a periodic function, still denoted by u, in a strip \(\{(x,y):|y|< c\}\). We consider a strip \(V(\beta )= \{ |y|<\beta \}\) under assumption (i), or \(V(\beta )=\{0<y<\beta \}\) under (i\('\)), where \(\beta \) is a constant rather than a function, and a strip \(A \supset \overline{V(\beta )}\). We consider the function \({\widetilde{u}}\) with the same definition as in the proofs of Lemmas 5.2 and 5.3. The function \({\widetilde{u}}\) is also periodic and smooth, so it gives a function in the original domain \(\Omega \), by extending it to be equal to u outside B. We still denote this function by \({\widetilde{u}}\). The properties (a)–(d) are straightforward to obtain, upon shrinking the strip A. We only argue for the monotonicity.

Under the first set of assumptions, and in particular under (i), the function \({\widetilde{u}}\) is strictly monotone in \(\phi ^{-1}(A)\) and agrees with u outside \(\phi ^{-1}(\overline{V(\beta )}) \subset A\). Hence, by Lemma 2.19, \({\widetilde{u}}\) is monotone in \(\Omega \).

Under the second set of assumptions, and in particular under (i\('\)), we can only conclude that \({\widetilde{u}}\) is monotone in \(\Omega \setminus J\); see also the proof of Lemma 5.3. However, now we cannot apply Lemma 2.20, since J does not exit all compact subsets of \(\Omega \). Instead, we are going to use Lemma 2.14. In \(\phi ^{-1}(V(\beta ))\), which is precompact, by continuity we have \(0<{\widetilde{u}}< t\) and \(0<u<t\) for some \(t>0\). We set \(\Upsilon = u^{-1}((0,t))\), so we have \(\phi ^{-1}(V(\beta ))\subset \Upsilon \). Observe that \({\widetilde{u}}\) is monotone in \(\Upsilon \subset \Omega \setminus J\) and \(0\le {\widetilde{u}}\le t\) in \(\Upsilon \). By Lemma 2.14 we conclude that the function

is monotone in \(\Omega \). \(\square \)