1 Introduction

It is no doubt useful to be able to approximate Lipschitz functions by smooth Lipschitz functions preserving the Lipschitz constants as much as possible in Banach spaces. The Lasry–Lions method [1] provides uniform approximation of Lipschitz functions by differentiable Lipschitz functions with Lipschitz derivatives without increasing the Lipschitz constant of the initial functions, in Hilbert spaces. This result was extended to a wider class of functions in [2]. As a consequence of the main theorem of [3], one can obtain approximation of locally Lipschitz functions by smooth locally Lipschitz functions on open subsets of a finite-dimensional space, in which the approximation can be taken with locally Lipschitz constants arbitrarily close to the original locally Lipschitz constants, and such that the approximating function is continuously close to the initial function. In [4], it was proved a similar result for separable (possibly) infinite-dimensional Riemannian manifolds. In more general Banach space, the results in [5,6,7] yield Lipschitz and smooth approximation of Lipschitz functions, in which the Lipschitz constant of the approximating function is controlled by the Lipschitz constant of the initial function, up to factor which only depends on the space and is bigger than 1 in general.

In this paper, we study approximation of Lipschitz functions defined on open subsets of Banach spaces by smooth functions preserving both the Lipschitz constant and the boundary value of the initial function. In addition, we study approximation of Lipschitz functions defined on the closure of an open subset of a finite-dimensional space by almost classical solutions of the Eikonal equation introduced in [8], with a Lipschitz boundary value; i.e., 1-Lipschitz differentiable functions, which satisfy the Eikonal equation almost everywhere and coincide with a given 1-Lipschitz boundary data.

2 Description of the Main Results

Throughout this paper, for every metric space (Ed) and every function \(f:E \rightarrow \mathbb {R},\) we will denote the Lipschitz constant or Lipschitz rate of f on E by \({{\,\mathrm{Lip}\,}}(f,E),\) that is,

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(f,E):= \inf \lbrace L >0 \, : \, |f(x)-f(y)| \le L d(x,y) \quad \text {for all} \quad x,y\in E \rbrace . \end{aligned}$$

Also, if \(\lambda \ge 0,\) we will say that \(f:E \rightarrow \mathbb {R}\) is \(\lambda \)-Lipschitz on E whenever \(|f(x)-f(y)| \le \lambda d(x,y)\) for every \(x,y\in E.\) We will denote by \(B[x_0,r]\) the closed ball centered at \(x_0\) and with radius \(r>0\) with respect to the metric on E. The closure of any subset A will be denoted by \({{\,\mathrm{cl}\,}}(A).\) Finally, for any Banach space X with norm \(\Vert \cdot \Vert ,\) the dual norm on \(X^*\) will be denoted by \(\Vert \cdot \Vert _*.\)

In this paper, we deal with the following problem.

Problem 2.1

Let X be a Banach space, let \(u_0: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a Lipschitz function defined on the closure of an open subset \(\varOmega \) of X and let \(k \in \mathbb {N}\cup \lbrace \infty \rbrace .\) Given \(\varepsilon >0,\) does there exist a function \(v: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) of class \(C^k(\varOmega )\) with \({{\,\mathrm{Lip}\,}}(v, {{\,\mathrm{cl}\,}}(\varOmega )) \le {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )), \, v=u_0 \) on \(\partial \varOmega \) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega )\)?

In finite-dimensional spaces, the integral convolution with mollifiers provides uniform approximation by \(C^\infty \) functions preserving the Lipschitz constant of the function to be approximated. However, this approximation does not necessarily preserve the value of \(u_0\) on \(\partial \varOmega .\) On the other hand, it was proved in [3, Theorem 2.2] an approximation theorem for locally Lipschitz functions defined on open subsets of \(\mathbb {R}^n\) which implies that for any continuous function \(\delta : \varOmega \rightarrow ]0,+\,\infty [,\) and any locally Lipschitz function \(u_0\) there exists a function v of class \(C^\infty \) satisfying (among other properties) that

$$\begin{aligned} |u_0(x)-v(x)| \le \delta (x) \quad \text {and} \quad | Dv(x)| \le {{\,\mathrm{Lip}\,}}( u_0 , B[x, \delta (x)] \cap \varOmega ) + \delta (x), \quad x\in \varOmega . \end{aligned}$$

Using the above result with \(\delta (x)= \min \lbrace \varepsilon , {{\,\mathrm{dist}\,}}(x,\partial \varOmega ) \rbrace ,\) we get a smooth Lipschitz approximation v of \(u_0\) that extends continuously to \({{\,\mathrm{cl}\,}}(\varOmega )\) by setting \(v=u_0\) on \(\partial \varOmega .\) The function v has Lipschitz constant arbitrarily close to \({{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )),\) but bigger than \({{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega ))\) in general. Thus, this does not yield any answer to Problem 2.1.

In the infinite-dimensional case, it was proved in [4, Theorem 1] that every Lipschitz function defined on an open subset \(\varOmega \) of a separable Hilbert space (or even a separable infinite-dimensional Riemannian manifold) can be approximated in the \(C^0\)-fine topology by \(C^\infty \) functions whose Lipschitz constant can be taken to be arbitrarily close to the Lipschitz constant of \(u_0,\) i.e., for any given continuous function \(\delta : \varOmega \rightarrow ]0,+\,\infty [\) and \(r>0,\) there exists v of class \(C^\infty \) such that

$$\begin{aligned} |u_0(x)-v(x)| \le \delta (x), \quad x\in \varOmega \quad \text {and} \quad {{\,\mathrm{Lip}\,}}(v, \varOmega ) \le {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega ))+r. \end{aligned}$$

One can find in [5,6,7] some results on approximation of Lipschitz functions by \(C^k\)-smooth Lipschitz functions in more general Banach spaces. In these results, the approximating function preserves the Lipschitz constant of the original function up to a factor \(C_0\ge 1,\) which only depends on the space and is bigger than 1 in general.

In this paper, we show that the answer to Problem 2.1 depends on the relation between \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega )\) and \({{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )).\) Let us now state our main results in this direction.

Theorem 2.1

Let X be a finite-dimensional normed space, or a separable Hilbert space or the space \(c_0(\varGamma ),\) for an arbitrary set of indices \(\varGamma .\) Let \(\varOmega \) be an open subset of X and let \(u_0 : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a Lipschitz function such that \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) < {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )).\) Given \(\varepsilon >0,\) there exists a function \(v: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that v is of class \(C^\infty (\varOmega ), \, v\) is Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega )\) with \({{\,\mathrm{Lip}\,}}(v, {{\,\mathrm{cl}\,}}(\varOmega ))\le {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )), \, v=u_0\) on \(\partial \varOmega \) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

For nonseparable Hilbert spaces, we have the following.

Theorem 2.2

Let X be a Hilbert space. Let \(\varOmega \) be an open subset of X and let \(u_0 : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a Lipschitz function such that \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) < {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )).\) Given \(\varepsilon >0,\) there exists a function \(v: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that v is of class \(C^1(\varOmega ), \, v\) is Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega )\) with \({{\,\mathrm{Lip}\,}}(v, {{\,\mathrm{cl}\,}}(\varOmega )) \le {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )), \, v=u_0\) on \(\partial \varOmega \) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

Theorems 2.1 and 2.2 give a positive answer to Problem 2.1 for the \(C^1(\varOmega )\) or \(C^\infty (\varOmega )\) class, when \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) < {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )),\) in certain Banach spaces. These theorems will be proved by combining approximation techniques in the pertinent space with the following result.

Theorem 2.3

Let \(k\in \mathbb {N}\cup \lbrace \infty \rbrace \) and let X be a Banach space with the property that for every Lipschitz function \(f: X \rightarrow \mathbb {R}\) and every \(\eta >0,\) there exists a function \(g :X \rightarrow \mathbb {R}\) of class \(C^k(X)\) such that \(|f-g| \le \eta \) on X and \({{\,\mathrm{Lip}\,}}(g, B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(f, B[x_0, r+\eta ] ) + \eta \) for every ball \(B[x_0,r] \subset X.\) Then, if \(\varOmega \) is an open subset of X\(u_0 : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) is a Lipschitz function such that \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) < {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega ))\) and \(\varepsilon >0,\) there exists a function \(v: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that v is of class \(C^k(\varOmega ), \, v\) is Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega )\) with \({{\,\mathrm{Lip}\,}}(v, {{\,\mathrm{cl}\,}}(\varOmega )) \le {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )), \, v=u_0\) on \(\partial \varOmega \) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

In Sect. 6, we will see an example on \(\mathbb {R}^2\) with the \(\ell _1\) norm showing that Problem 2.1 has a negative answer (even for the class of functions which are merely differentiable on \(\varOmega \)) if we allow \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) = {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega )).\) Therefore, one can say that Theorem 2.1 is optimal (in the sense of Problem 2.1), at least in the setting of finite-dimensional normed spaces.

We now consider a subproblem of Problem 2.1 when X is a finite-dimensional normed space.

Problem 2.2

Let \((X, \Vert \cdot \Vert )\) be a finite-dimensional normed space with \(\dim (X) \ge 2\) and let \(u_0: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a 1-Lipschitz function defined on the closure of an open subset \(\varOmega \) of X. Given \(\varepsilon >0,\) does there exist a 1-Lipschitz function \(w: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that w is differentiable on \(\varOmega \) with \(\Vert Dw\Vert _*=1\) almost everywhere on \(\varOmega , \, w=u_0 \) on \(\partial \varOmega \) and \(|u_0-w| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega )\)?

Observe that, if \(w=u_0\) on \(\partial \varOmega \) and \({{\,\mathrm{Lip}\,}}(u_0,\partial \varOmega ) <1,\) then the Mean Value Theorem yields the existence of \(x\in \varOmega \) such that \(\Vert Dw(x)\Vert _* <1.\) Therefore, the function w (if it exists) has no continuous derivative in this case.

The following theorem gives a positive answer to Problem 2.2 when \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) <1.\)

Theorem 2.4

Let \(\varOmega \) be an open subset of a finite-dimensional normed space \((X, \Vert \cdot \Vert )\) with \( \dim (X) \ge 2.\) Let \(u_0: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a 1-Lipschitz function such that \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) <1.\) Given \(\varepsilon >0,\) there exists a differentiable 1-Lipschitz function \(w: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that \(\Vert D w\Vert _*=1 \) almost everywhere on \(\varOmega , \, w=u_0\) on \(\partial \varOmega \) and \(|u_0-w| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

In Sect. 6, we prove, using the theory of absolutely minimizing Lipschitz extensions, that if \(\varOmega \) is an open subset in a 2-dimensional Euclidean space and if \(u_0: \partial \varOmega \rightarrow \mathbb {R}\) is a 1-Lipschitz function, then there exists a differentiable 1-Lipschitz function \(w: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that \(\Vert D w\Vert _*=1 \) almost everywhere on \(\varOmega \) and \(\, w=u_0\) on \(\partial \varOmega \). However, Example 6.1 shows that Problem 2.2 may have a negative answer if we drop the hypothesis \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) <1\). Observe that Theorem 2.4 covers the case of homogeneous Dirichlet conditions. Also, we notice that the above theorem does not hold when \(X= \mathbb {R}.\) Indeed, if \(u_0: [0,1] \rightarrow \mathbb {R}\) is 1-Lipschitz and differentiable on ]0, 1[,  with \(|u_0(1)-u_0(0)| <1,\) then a result of A. Denjoy [9] tells us that either \(\lbrace x \, : \, |u_0'(x)| <1 \rbrace \) is empty or else it has positive Lebesgue measure. But this subset is nonempty by the Mean Value Theorem.

The contents of the paper are as follows. In Sect. 3, we show that in general metric spaces, one can approximate a Lipschitz function \(u_0\) by a function which coincides with \(u_0\) on a given subset and has, on bounded subsets, better Lipschitz constants. In Sect. 4, we will give the proof of Theorems 2.32.1 and 2.2 with the decisive help of the above result. In Sect. 5, we use Theorem 2.1 and the results in [10] to prove Theorem 2.4. Finally, in Sect. 6, we consider the case \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) = {{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega ))\): although a partial positive result in the Euclidean setting can be obtained, we show that Problem 2.1 does not always have a positive answer in this limiting case.

3 Approximation by Functions with Smaller Lipschitz Constants

Throughout this section, all the sets involved are considered to be subsets of a metric space (Xd) and all the Lipschitz constants are taken with respect to the distance d. The following result will be very useful in Sect. 4, and it is interesting in itself.

Theorem 3.1

Let E and F be two nonempty closed sets such that \(F \subset E,\) let \(u_0: E \rightarrow \mathbb {R}\) be a K-Lipschitz function such that \(\lambda _0:={{\,\mathrm{Lip}\,}}(u_0,F) <K.\) Given \(\varepsilon >0,\) there exists a function \(u: E \rightarrow \mathbb {R}\) such that \(|u-u_0| \le \varepsilon \) on \(E, \, u=u_0\) on F and u has the property that \({{\,\mathrm{Lip}\,}}(u,B) <K\) for every bounded subset B of E.

A crucial step for proving the above theorem is the following lemma. For any two nonempty subsets A and B of X and for any \(x\in X\), we will denote

$$\begin{aligned} {{\,\mathrm{dist}\,}}(x,B):= & {} \inf \lbrace d(x,y)\, :\, y\in B \rbrace ,\\ {{\,\mathrm{gap}\,}}(A,B):= & {} \inf \lbrace d(x,y)\, : x\in A,\, y\in B \rbrace \quad \text {and}\quad {{\,\mathrm{diam}\,}}(A):= \sup \lbrace d(x,y)\,:\, x,y\in A \rbrace . \end{aligned}$$

Lemma 3.1

Let E and F be two nonempty closed subsets such that \(F \subset E\) and \(E {\setminus } F\) is bounded. Let \(u_0: E \rightarrow \mathbb {R}\) be a 1-Lipschitz function, let \(u_\mu : F \rightarrow \mathbb {R}\) be \(\mu \)-Lipschitz, with \(\mu < 1,\) let \(\delta \ge 0\) and assume that \(| u_\mu -u_0| \le \delta \) on F. For every \( \mu< \lambda < 1,\) there exists a function \(u_\lambda : E \rightarrow \mathbb {R}\) such that \(u_\lambda \) is \(\lambda \)-Lipschitz on E with \(u_\lambda = u_\mu \) on F and \(| u_0- u_\lambda |\le \delta + \varepsilon ( \lambda , \mu , E, F)\) on E;  where

$$\begin{aligned} \varepsilon ( \lambda , \mu , E, F) = \frac{1-\lambda }{\lambda -\mu }(\lambda + \mu ) \left( {{\,\mathrm{diam}\,}}({{\,\mathrm{cl}\,}}(E{\setminus } F)) + {{\,\mathrm{gap}\,}}( {{\,\mathrm{cl}\,}}(E{\setminus } F), F ) \right) >0 \end{aligned}$$

and \(\varepsilon ( \lambda , \mu , E, F) =0\) whenever \(E {\setminus } F= \emptyset .\)

Proof

In the case when \(E {\setminus } F = \emptyset ,\) we have that \(E=F\) and then it is enough to take \(u_\lambda = u_\mu .\) From now on, we assume that \(E {\setminus } F\ne \emptyset \), we fix \(\mu<\lambda < 1\), and we denote \(\varepsilon _\lambda = \varepsilon ( \lambda , \mu , E, F)\). We now define the strategy of proof of the lemma. We first show that the family

$$\begin{aligned} {\mathcal {C}}_\lambda := \lbrace u : E \rightarrow \mathbb {R}\, : \, u \,\,\text {is} \, \, \lambda \text {-Lipschitz on} \,\, E, \, u\le u_0 + \delta + \varepsilon _\lambda \,\, \text {on} \,\, E, \, u=u_\mu \,\, \text {on} \,\, F \rbrace \end{aligned}$$

is nonempty, and then we define the function \(u_\lambda \) by:

$$\begin{aligned} u_\lambda (x) := \sup \lbrace u(x) \, : \, u \in {\mathcal {C}}_\lambda \rbrace , \quad x\in E. \end{aligned}$$
(1)

In order to prove that the function \(u_\lambda \) is the required solution, it will be enough to check that \(u_\lambda \in {\mathcal {C}}_\lambda \) and that \(u_0 \le u_\lambda + \delta + \varepsilon _\lambda \) on E.

1. We now prove that the family \({\mathcal {C}}_\lambda \) is nonempty. Consider the function

$$\begin{aligned} v(x)= \sup _{y\in F} \lbrace u_\mu (y)-\lambda d(x,y) \rbrace , \quad x\in E, \end{aligned}$$

and let us see that \(v\in C_\lambda .\) Since \(u_\mu \) is \(\lambda \)-Lipschitz (in fact, \(\mu \)-Lipschitz) on F,  it follows from standard calculations concerning the sup convolution of Lipschitz functions that v is a well defined \(\lambda \)-Lipschitz function on E with \(v=u_\mu \) on F. Now, given \(x \in E{\setminus } F\) and \(y \in F\) let us see that \(u_\mu (y)-\lambda d(x,y) \le u_0(x) + \delta + \varepsilon _\lambda .\) For every \(\eta >0,\) we can find a point \(z_\eta \in F\) with

$$\begin{aligned} {{\,\mathrm{dist}\,}}(x,F ) + \eta \ge d(x,z_\eta ). \end{aligned}$$
(2)

In the case when \(u_\mu (y)-\lambda d(x,y) < u_\mu (z_\eta )-\lambda d(x,z_\eta ),\) by the assumption that \(|u_\mu -u_0| \le \delta \) on F together with (2) and the fact that \({{\,\mathrm{dist}\,}}(x,F)\le \varepsilon _\lambda \), we have that

$$\begin{aligned}&u_\mu (y)-\lambda d(x,y) \\&\quad < u_\mu (z_\eta )-\lambda d(x,z_\eta ) \le u_0(z_\eta ) +\delta - \lambda d(x,z_\eta ) \le u_0(x)+ \delta \\&\quad \quad +\,(1-\lambda ) d(x,z_\eta ) \\&\quad \le u_0(x)+ \delta + (1-\lambda ) \left( {{\,\mathrm{dist}\,}}(x,F ) + \eta \right) \le u_0(x)+ \delta +\varepsilon _\lambda + (1-\lambda ) \eta . \end{aligned}$$

In the case when \(u_\mu (y)-\lambda d(x,y) \ge u_\mu (z_\eta )-\lambda d(x,z_\eta ).\) The fact that \(u_\mu \) is \(\mu \)-Lipschitz on F yields

$$\begin{aligned} u_\mu (y)-\lambda d(x,y)&\ge u_\mu (z_\eta )-\lambda d(x,z_\eta ) \ge u_\mu (y)-\mu d(y,z_\eta )-\lambda d(x,z_\eta ) \\&\ge u_\mu (y) -\mu d(x,y)- \mu d(x,z_\eta )-\lambda d(x,z_\eta ), \end{aligned}$$

which in turn implies

$$\begin{aligned} (\lambda - \mu ) d(x,y) \le (\lambda + \mu ) d(x,z_\eta ). \end{aligned}$$
(3)

Using first that \(u_0\) is 1-Lipschitz on E and then (3) and (2), we obtain

$$\begin{aligned} u_\mu (y)-\lambda d(x,y)&\le u_0(y)+ \delta -\lambda d(x,y) \le u_0(x)+ \delta + (1-\lambda ) d(x,y) \\&\le u_0(x)+ \delta + \frac{1-\lambda }{\lambda -\mu }(\lambda + \mu ) d(x,z_\eta ) \le u_0(x)\\&\quad +\, \delta + \frac{1-\lambda }{\lambda -\mu }(\lambda + \mu ) \left( {{\,\mathrm{dist}\,}}(x,F)+ \eta \right) \\&\le u_0(x)+ \delta + \varepsilon _\lambda + \frac{1-\lambda }{\lambda -\mu }(\lambda + \mu ) \, \eta . \end{aligned}$$

Hence, in both cases, we have that

$$\begin{aligned} u_\mu (y)-\lambda d(x,y) \le u_0(x)+ \delta + \varepsilon _\lambda + \frac{1-\lambda }{\lambda -\mu }(\lambda + \mu ) \, \eta , \end{aligned}$$

and letting \(\eta \rightarrow 0^+,\) it follows that \(v(x) \le u_0(x)+ \delta + \varepsilon _\lambda \) for every \(x\in {{\,\mathrm{cl}\,}}(E {\setminus } F).\) This proves the inequality \(v \le u_0+ \delta + \varepsilon _\lambda \) on E,  which shows that \(v\in {\mathcal {C}}_\lambda .\)

2. The function \(u_\lambda \) belongs to \({\mathcal {C}}_\lambda \) because a supremum of \(\lambda \)-Lipschitz functions is a \(\lambda \)-Lipschitz function, and because inequalities and equalities are preserved by taking supremum. Before proving the inequality \(u_0 \le u_\lambda + \delta + \varepsilon _\lambda \) on E, we first show that \(u_\lambda \) coincides with the function

$$\begin{aligned} v_\lambda (x):= \inf _{y \in F \cup S_\lambda } \lbrace u_\lambda (y) + \lambda d(x,y) \rbrace , \quad x\in E, \end{aligned}$$

where

$$\begin{aligned} S_\lambda = \left\{ x\in E \, : \, u_\lambda (x) \ge u_0(x)+\delta + \frac{\varepsilon _\lambda }{2} \right\} . \end{aligned}$$

Observe that, since \(u_\mu \le u_0+ \delta \) on \(F, \, S_\lambda \) and F are disjoint. Since \(u_\lambda \) is \(\lambda \)-Lipschitz on E (and, in particular, on \(F \cup S_\lambda \)), the function \(v_\lambda \) is the greatest \(\lambda \)-Lipschitz extension of \(u_\lambda \) from the set \(F \cup S_\lambda .\) Thus \(v_\lambda = u_\lambda \) on \(F \cup S_\lambda \) and \(u_\lambda \le v_\lambda \) on E. Hence, by (1), we will have that \(v_\lambda = u_\lambda \) as soon as we see that \(v_\lambda \le u_0 + \delta + \varepsilon _\lambda \) on E. Let us define

$$\begin{aligned} G_\lambda = \lbrace x\in E {\setminus } \left( F \cup S_\lambda \right) \, : \, v_\lambda (x) \ge u_0(x) + \delta + \varepsilon _\lambda \rbrace . \end{aligned}$$

Claim 3.1

\(G_\lambda = \emptyset .\)

Assume that \(G_\lambda \ne \emptyset .\) Since \(E{\setminus } F\) is bounded, then \(v_\lambda -u_0\) is bounded on \(G_\lambda \) and we can define

$$\begin{aligned} a:= \sup _{G_\lambda } \lbrace v_\lambda - u_0 \rbrace . \end{aligned}$$

It is obvious that \(a \ge \delta + \varepsilon _\lambda .\) We can pick a point \(y \in G_\lambda \) such that

$$\begin{aligned} v_\lambda (y)-u_0(y) \ge a - \frac{\varepsilon _\lambda }{2}. \end{aligned}$$
(4)

We next define the function

$$\begin{aligned} w_\lambda : = \max \lbrace u_\lambda , v_\lambda -a + \delta + \varepsilon _\lambda \rbrace : E \rightarrow \mathbb {R}. \end{aligned}$$

The function \(w_\lambda \) is \(\lambda \)-Lipschitz on E and satisfies the following.

(i):

On the set \( F \cup S_\lambda ,\) we have \(v_\lambda = u_\lambda .\) Since \(a \ge \delta + \varepsilon _\lambda ,\) we have that \(w_\lambda = u_\lambda \) on \(F \cup S_\lambda .\) In particular \(w_\lambda = u_\mu \) on F.

(ii):

On \(G_\lambda ,\) we have, by the definition of a,  that \( v_\lambda -a \le u_0. \) Since we always have \(u_\lambda \le u_0 + \delta + \varepsilon _\lambda ,\) the function \(w_\lambda \) satisfies \(w_\lambda \le u_0 + \delta + \varepsilon _\lambda \) on \(G_\lambda .\)

(iii):

If \(x\in E {\setminus } (G_\lambda \cup F \cup S_\lambda ),\) then

$$\begin{aligned} v_\lambda (x)-a < u_0(x)+ \delta + \varepsilon _\lambda - a \le u_0(x), \end{aligned}$$

together with \(u_\lambda \le u_0 + \delta + \varepsilon _\lambda \) on E,  this implies \(w_\lambda (x) \le u_0(x) + \delta + \varepsilon _\lambda .\)

From the remarks (i), (ii) and (iii) above we obtain that \(w_\lambda \le u_0 + \delta + \varepsilon _\lambda \) on E with \(w_\lambda = u_\mu \) on F. By (1) we must have \(w_\lambda \le u_\lambda \) on E. But, for the point \(y \in G_\lambda ,\) (see (4)) it follows that

$$\begin{aligned} u_\lambda (y) \ge w_\lambda (y) \ge v_\lambda (y)-a+ \delta + \varepsilon _\lambda \ge u_0(y)+ \delta + \frac{\varepsilon _\lambda }{2} . \end{aligned}$$

It turns out that y belongs to \(S_\lambda ,\) which is a contradiction since \(G_\lambda \) and \(S_\lambda \) are disjoint subsets. This proves Claim 3.1.

Finally, because \(G_\lambda = \emptyset ,\) it is clear that \(v_\lambda \le u_0 + \delta + \varepsilon _\lambda \) on E and therefore

$$\begin{aligned} u_\lambda (x) = v_\lambda (x) = \inf _{y\in F \cup S_\lambda } \lbrace u_\lambda (y) + \lambda d(x,y) \rbrace , \quad x\in E. \end{aligned}$$
(5)

3. We now show that \(u_0(x) \le u_\lambda (x) + \delta + \varepsilon _\lambda \) for every \(x\in E.\) Since \(u_0 \le u_\mu + \delta =u_\lambda + \delta \) on F,  we only need to consider the situation when \(x\in E {\setminus } F.\) Let us fix \(\eta >0.\) We can find a point \(z_\eta \in F\) with

$$\begin{aligned} {{\,\mathrm{dist}\,}}(x,F) + \eta \ge d(x,z_\eta ). \end{aligned}$$
(6)

Moreover, by (5), it is clear that there exists \(y_\eta \in F \cup S_\lambda \) such that

$$\begin{aligned} u_\lambda (y_\eta ) + \lambda d(x,y_\eta ) \le \min \left\{ u_\lambda (z_\eta ) + \lambda d(x,z_\eta ), u_\lambda (x)+\eta \right\} . \end{aligned}$$
(7)

Suppose first that \(y_\eta \in S_\lambda .\) In particular \(y_\eta \in E {\setminus } F\) and \(u_\lambda (y_\eta )\ge u_0(y_\eta )+ \delta + \frac{\varepsilon _\lambda }{2}.\) Using that \(u_0\) is 1-Lipschitz together with (7) we obtain

$$\begin{aligned} u_0(x)&\le u_0(y_\eta ) + d(x,y) = u_0(y_\eta ) + \lambda d(x,y_\eta ) + (1- \lambda ) d(x,y_\eta ) \\&\le u_\lambda (y_\eta )-\delta - \frac{\varepsilon _\lambda }{2} + \lambda d(x,y_\eta )+ (1- \lambda ) d(x,y_\eta ) \\&\le u_\lambda (x)+\eta -\delta - \frac{\varepsilon _\lambda }{2}+ (1-\lambda ) {{\,\mathrm{diam}\,}}( {{\,\mathrm{cl}\,}}(E{\setminus } F)) \le u_\lambda (x) + \delta +\varepsilon _\lambda + \eta . \end{aligned}$$

Suppose now that \(y_\eta \in F.\) Using (7) and the fact that \(u_\lambda \) is \(\mu \)-Lipschitz on F,  we can write

$$\begin{aligned} u_\lambda (z_\eta ) + \lambda d(x,z_\eta )&\ge u_\lambda (y_\eta ) + \lambda d(x,y_\eta ) \ge u_\lambda (z_\eta )- \mu d(y_\eta ,z_\eta )+\lambda d(x,y_\eta ) \\&\ge u_\lambda (z_\eta )- \mu d(x,z_\eta )+(\lambda - \mu ) d(x,y_\eta ) , \end{aligned}$$

which implies, taking into account (6),

$$\begin{aligned} d(x,y_\eta ) \le \frac{\lambda + \mu }{\lambda -\mu } d(x,z_\eta ) \le \frac{\lambda + \mu }{\lambda -\mu } ({{\,\mathrm{dist}\,}}(x,F)+\eta ) \le \frac{\varepsilon _\lambda }{1-\lambda } + \frac{\lambda + \mu }{\lambda -\mu } \, \eta . \end{aligned}$$
(8)

Bearing in mind that \(u_\lambda + \delta = u_\mu + \delta \ge u_0\) on F and using (7) and (8) we obtain

$$\begin{aligned} u_0(x)&\le u_0(y_\eta ) + \lambda d(x,y_\eta ) + (1- \lambda ) d(x,y_\eta ) \\&\le u_\lambda (y_\eta ) + \delta + \lambda d(x,y_\eta ) + (1- \lambda ) d(x,y_\eta ) \\&\le u_\lambda (x) + \eta + \delta + \varepsilon _\lambda + (1-\lambda ) \frac{\lambda + \mu }{\lambda -\mu } \, \eta . \end{aligned}$$

We have thus shown the inequality

$$\begin{aligned} u_0(x) \le u_\lambda (x) + \delta + \varepsilon _\lambda + \eta + (1-\lambda ) \frac{\lambda + \mu }{\lambda -\mu } \, \eta \quad \text {on} \quad E. \end{aligned}$$

Letting \(\eta \downarrow 0,\) we conclude that \(u_0(x) \le u_\lambda (x) + \delta + \varepsilon _\lambda \) for every \(x\in E.\)\(\square \)

Proof of Theorem 3.1

Without loss of generality we may and do assume that \(K=1.\) Let us fix a point \(p\in F\) and set \(E_n = \left( E \cap B[p,n] \right) \cup F\) and \(F_n=E_{n-1}\) for every \(n \ge 1,\) where \(F_1 = E_0 = F.\) It is clear that we can construct an increasing sequence of numbers \(\lbrace \lambda _n \rbrace _{n \ge 1}\) with \(\lambda _0 < \lambda _1\) and \(\lambda _n <1\) for every \(n \ge 1\) such that

$$\begin{aligned} \frac{1-\lambda _n}{\lambda _n-\lambda _{n-1}}(\lambda _n + \lambda _{n-1}) \left( {{\,\mathrm{diam}\,}}( {{\,\mathrm{cl}\,}}(E_n{\setminus } F_n)) + {{\,\mathrm{gap}\,}}( {{\,\mathrm{cl}\,}}(E_n{\setminus } F_n), F_n ) \right) \le \frac{\varepsilon }{2^n} \end{aligned}$$
(9)

for every \(n \ge 1\) such that \(E_n {\setminus } F_n \ne \emptyset .\) Let us construct by induction a sequence of functions \(\lbrace u_n \rbrace _{n \ge 1}\) such that each \(u_n : E_n \rightarrow \mathbb {R}\) is \(\lambda _n\)-Lipschitz on \(E_n\) and satisfy \(u_n=u_{n-1}\) on \(E_{n-1}\) and \(|u_n-u_0| \le \varepsilon \) on \(E_n\) for every \(n \ge 1.\)

Since \(u_0|_F\) is \(\lambda _0\)-Lipschitz, we can apply Lemma 3.1 with \(F_1 \subset E_1, \, \delta =0, \, u_0: E_1 \rightarrow \mathbb {R}, \, \mu = \lambda _0, \, u_\mu =u_0|_{F_1}\) in order to obtain a \(\lambda _1\)-Lipschitz function \(u_1: E_1 \rightarrow \mathbb {R}\) such that \(u_1=u_\mu =u_0\) on \(F_1\) and \( |u_1-u_0| \le \frac{\varepsilon }{2}\) on \( E_1,\) thanks to (9). Observe that \(u_1=u_0\) on F.

Now assume that we have constructed functions \(u_1, \ldots , u_n\), respectively, defined on \(E_1, \ldots , E_n\) such that each \(u_k\) is \(\lambda _k\)-Lipschitz on \(E_k,\) with \(u_k=u_{k-1}\) on \(E_{k-1}=F_k\) and

$$\begin{aligned} | u_k- u_0| \le \frac{\varepsilon }{2}+ \cdots + \frac{\varepsilon }{2^k} \quad \text {on} \quad E_k, \end{aligned}$$

for every \(1 \le k \le n.\) Then we apply Lemma 3.1 with \(\delta = \varepsilon /2+ \cdots + \varepsilon /2^n, \, E_n=F_{n+1} \subset E_{n+1}, \, \mu = \lambda _n,\)\(u_\mu = u_n: E_n \rightarrow \mathbb {R}\) and \(u_0: E_{n+1} \rightarrow \mathbb {R}\) to obtain a \(\lambda _{n+1}\)-Lipschitz function \(u_{n+1}: E_{n+1} \rightarrow \mathbb {R}\) such that \(u_{n+1}=u_0\) on \(E_n\) and, thanks to (9),

$$\begin{aligned} | u_{n+1}- u_0| \le \frac{\varepsilon }{2}+ \cdots + \frac{\varepsilon }{2^{n+1}} \quad \text {on} \quad E_{n+1}. \end{aligned}$$

This proves the induction. We now define the function \(u: E \rightarrow \mathbb {R}\) as follows: given \(x\in E,\) we take a positive integer n with \(x\in E_n\) and set \(u(x):=u_n(x).\) Since \(E = \bigcup _{n \ge 1} E_n\) and each \(u_n\) coincides with \(u_{n-1}\) on \(E_{n-1},\) the function u is well defined. Because \(u=u_n\) on each \(E_n,\) we have that

$$\begin{aligned} |u-u_0| = |u_n-u_0| \le \varepsilon \quad \text {on} \quad E_n, \end{aligned}$$

which implies that \(|u-u_0| \le \varepsilon \) on E. Also, note that \(u=u_0\) on F because \(u=u_1\) on \(E_1\) and \(u_1=u_0\) on \(F \subset E_1.\) Finally, given a bounded subset B of E,  we can find some natural n with \(B \subset E_n.\) This implies that \(u=u_n\) on B,  where \(u_n\) is \(\lambda _n\)-Lipschitz and \(\lambda _n <1.\)\(\square \)

4 Approximation by Smooth Lipschitz Functions: Proof of Theorem 2.3

This section contains the proofs of Theorems 2.3, 2.1 and 2.2. Let us start with the proof of Theorem 2.3, so let us assume from now on that X is a Banach space satisfying the hypothesis of Theorem 2.3 for some \(k\in \mathbb {N}\cup \lbrace \infty \rbrace .\) We will need the following two claims.

Claim 4.1

Let \(\varOmega \subset X\) be an open subset and let \(u : \varOmega \rightarrow \mathbb {R}\) be a Lipschitz function. For every continuous function \(\varepsilon : \varOmega \rightarrow ]0,+ \infty [\) there exists \(v : \varOmega \rightarrow \mathbb {R}\) of class \(C^k(\varOmega )\) such that

(a):

\(|u(x)-v(x)| \le \varepsilon (x)\) for every \(x\in \varOmega .\)

(b):

\(\Vert D v(x) \Vert _* \le {{\,\mathrm{Lip}\,}}( u , B[x, \varepsilon (x)] \cap \varOmega ) + \varepsilon (x)\) for every \(x\in \varOmega .\)

Proof

By replacing \(\varepsilon \) with \(\min \lbrace \varepsilon , \frac{1}{2} {{\,\mathrm{dist}\,}}( \varvec{\cdot }, \partial \varOmega ) \rbrace ,\) we may and do assume that \(\varepsilon \le \frac{1}{2} {{\,\mathrm{dist}\,}}( \varvec{\cdot }, \partial \varOmega )\) on \(\varOmega ,\) which implies that \(B[x, \varepsilon (x)]\) is contained in \(\varOmega \) for every \(x\in \varOmega .\) By continuity of \(\varepsilon ,\) for each \(p \in \varOmega ,\) there exists \(0< \delta _p \le \varepsilon (p)/4\) such that \(\varepsilon (x) \ge \varepsilon (p)/2\) for all \(x\in B[p, \delta _p].\) The assumption on X implies in particular that there exists a constant \(C_0 \ge 1\) such that, for every Lipschitz function \(f: X \rightarrow \mathbb {R}\) and every \(\eta >0,\) there exists a \(C^k\) Lipschitz function \(g: X \rightarrow \mathbb {R}\) such that \(|f-g| \le \eta \) on X and \({{\,\mathrm{Lip}\,}}(g,X) \le C_0 {{\,\mathrm{Lip}\,}}(f,X).\) Then, as a consequence of [6, Lemma 3.6], there exists a partition of unity \(\lbrace \varphi _{n,p} \rbrace _{(n,p)\in \mathbb {N}\times \varOmega }\) of class \(C^k(\varOmega )\) and Lipschitz such that \({{\,\mathrm{supp}\,}}(\varphi _{n,p}) \subset B[p,\delta _p]\) for every \((n,p) \in \mathbb {N}\times \varOmega ,\) and for every \(x\in \varOmega ,\) there exists an open neighborhood \(U_x\) of x and a positive integer \(n_x\) such that

$$\begin{aligned}&\text {If} \quad n >n_x, \quad \text {then} \quad U_x \cap {{\,\mathrm{supp}\,}}(\varphi _{n,p})= \emptyset \quad \text {for every} \, \, p\in \varOmega .\nonumber \\&\text {If} \quad n \le n_x, \quad \text {then} \quad U_x \cap {{\,\mathrm{supp}\,}}(\varphi _{n,p}) \ne \emptyset \quad \text {for at most one} \, \, p\in \varOmega . \end{aligned}$$
(10)

We can assume that u is extended to all of X with the same Lipschitz constant. Using the assumption on X,  we can find a family of \(C^k(X)\) Lipschitz functions \(\lbrace v_{n,p} \rbrace _{(n,p)\in \mathbb {N}\times \varOmega }\) such that, for every \((n,p) \in \mathbb {N}\times \varOmega ,\)

$$\begin{aligned}&| u-v_{n,p}| \le \frac{\varepsilon (p)}{(1+{{\,\mathrm{Lip}\,}}(\varphi _{n,p}))2^{n+2}} \quad \text {on} \quad X \quad \text {and}\end{aligned}$$
(11)
$$\begin{aligned}&{{\,\mathrm{Lip}\,}}(v_{n,p}, B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(u, B[x_0, r+\delta _p]) + \delta _p \le {{\,\mathrm{Lip}\,}}(u, B[x_0, r+ \delta _p]) + \frac{\varepsilon (p)}{4}\nonumber \\ \end{aligned}$$
(12)

for every ball \(B[x_0,r]\) contained in \(\varOmega .\) We define the approximation \(v: \varOmega \rightarrow \mathbb {R}\) by

$$\begin{aligned} v(x)= \sum _{(n,p) \in \mathbb {N}\times \varOmega } v_{n,p}(x) \varphi _{n,p}(x), \quad x\in \varOmega . \end{aligned}$$

By the properties of the partition \(\lbrace \varphi _{n,p} \rbrace _{(n,p)\in \mathbb {N}\times \varOmega },\) the function v is well defined and is of class \(C^k(\varOmega ).\) Given \(x\in \varOmega ,\) (11) implies

$$\begin{aligned}&|u(x)-v(x)| \\&\quad \le \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } | u(x)- v_{n,p}(x)| \, \varphi _{n,p}(x) \le \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } \frac{\varepsilon (p)}{2} \, \varphi _{n,p}(x) \\&\quad \le \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } \varepsilon (x) \, \varphi _{n,p}(x) = \varepsilon (x). \end{aligned}$$

This proves part (a) of our claim. Now, let us estimate \(\Vert Dv(x)\Vert _*.\) Since \(\sum _{(n,p)} \varphi _{n,p}=1,\) we have that \(\sum _{(n,p)} D \varphi _{n,p}=0\) on \( \varOmega .\) Then, taking into account that \({{\,\mathrm{supp}\,}}(\varphi _{n,p}) \subset B[p, \delta _p]\) for every \((n,p) \in \mathbb {N}\times \varOmega ,\) we can write

$$\begin{aligned} Dv(x)= & {} \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } D v_{n,p} (x) \varphi _{n,p} (x) \\&+ \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } (v_{n,p}(x)-u(x)) D \varphi _{n,p}(x). \end{aligned}$$

Hence, (11) together with (10) lead us to

$$\begin{aligned} \Vert Dv(x)\Vert _*&\le \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } \Vert D v_{n,p} (x)\Vert _* \, \varphi _{n,p} (x) \\&\quad +\, \sum _{ \lbrace (n,p) \, : \, \varphi _{n,p}(x) \ne 0 \rbrace } \frac{\varepsilon (p)}{(1+{{\,\mathrm{Lip}\,}}(\varphi _{n,p}))2^{n+2}} \Vert D \varphi _{n,p}(x)\Vert _* \\&\le \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } \Vert D v_{n,p} (x)\Vert _* \, \varphi _{n,p} (x) +\frac{\varepsilon (x)}{2} . \end{aligned}$$

Note that if \(p \in \varOmega \) is such that \(x\in B[p,\delta _p],\) then \(\varepsilon (x) \ge \varepsilon (p)/2 \ge 2 \delta _p\) and we can write, by virtue of (12), that

$$\begin{aligned} \Vert Dv_{n,p}(x)\Vert _*\le & {} {{\,\mathrm{Lip}\,}}( v_{n,p}, B[x, \varepsilon (x)-\delta _p]) \le {{\,\mathrm{Lip}\,}}( u, B[x, \varepsilon (x)])\\&+ \frac{\varepsilon (p)}{4} \le {{\,\mathrm{Lip}\,}}( u, B[x, \varepsilon (x)]) + \frac{\varepsilon (x)}{2}. \end{aligned}$$

Therefore, we obtain

$$\begin{aligned} \Vert Dv(x)\Vert _*\le & {} \sum _{ \lbrace (n,p) \, : \, B[p,\delta _p] \ni x \rbrace } \left( {{\,\mathrm{Lip}\,}}( u, B[x, \varepsilon (x)]) + \frac{\varepsilon (x)}{2} \right) \varphi _{n,p}(x) +\frac{\varepsilon (x)}{2}\\= & {} {{\,\mathrm{Lip}\,}}( u, B[x, \varepsilon (x)]) + \varepsilon (x). \end{aligned}$$

This completes the proof of (b). \(\square \)

Claim 4.2

Let \(\varOmega \subset X\) be an open subset and let \(u: \varOmega \rightarrow \mathbb {R}\) be a K-Lipschitz function with the property that \({{\,\mathrm{Lip}\,}}(u,B) <K\) for every bounded subset B of \(\varOmega .\) Then, given a continuous function \(\varepsilon : \varOmega \rightarrow ]0,+ \infty [,\) there exists \(v: \varOmega \rightarrow \mathbb {R}\) of class \(C^k(\varOmega )\) such that

(a):

\(|u(x)-v(x)| \le \varepsilon (x)\) for every \(x\in \varOmega .\)

(b):

\(\Vert D v (x)\Vert _* <K\) for every \(x\in \varOmega .\)

Proof

Let us define \(L(r) = {{\,\mathrm{Lip}\,}}(u, B[0, r+1] \cap \varOmega )\) for every \(r>0.\) The function given by \(\delta (r)= \frac{K-L(r)}{2},\) for every \(r \ge 0,\) is positive and nonincreasing. The function \({\tilde{\delta }} : [0,+ \infty [ \rightarrow \mathbb {R}\) given by

$$\begin{aligned} {\tilde{\delta }}(t) = \int _{t}^{t+1} \delta (s) \mathrm{d}s, \quad t\ge 0, \end{aligned}$$

is continuous and satisfies \({\tilde{\delta }} \left( [0,+ \infty [ \right) \subset \, ]0,K[\) and \({\tilde{\delta }} \le \delta \) on \([0,+\infty [.\) Let us define the mapping \( \rho : \varOmega \rightarrow ]0,+\infty [\) by \(\rho (x)= {\tilde{\delta }}( \Vert x\Vert )\) for every \(x\in \varOmega .\) Then \(\rho \) is continuous and we can replace \(\varepsilon \) by \( \min \lbrace 1, \varepsilon ,\rho , \frac{1}{2}{{\,\mathrm{dist}\,}}(\varvec{\cdot }, \partial \varOmega )\rbrace \) on \(\varOmega .\) In particular, this implies that \(B[x,\varepsilon (x)] \subset \varOmega \) for every \(x\in \varOmega .\) We thus have from Claim 4.1 that there exists \(v \in C^k(\varOmega )\) such that

$$\begin{aligned} |u(x)-v(x)|\le & {} \varepsilon (x), \quad x\in \varOmega , \quad \text {and}\\ \Vert Dv(x)\Vert _*\le & {} {{\,\mathrm{Lip}\,}}(u, B[x, \varepsilon (x)] ) + \varepsilon (x), \quad x\in \varOmega . \end{aligned}$$

Since \(\varepsilon \le 1,\) the ball \(B[x, \varepsilon (x)]\) is contained in \(B[0, \Vert x\Vert + 1] \cap \varOmega .\) Hence, the last inequality leads us to

$$\begin{aligned} \Vert Dv(x)\Vert _* \le L( \Vert x\Vert ) + \varepsilon (x) \le L( \Vert x\Vert ) + \rho (x) \le \frac{K+L( \Vert x\Vert )}{2} \end{aligned}$$

for every \(x\in \varOmega .\) This shows that \(\Vert Dv(x)\Vert _*<K\) on \(\varOmega .\)

We are now ready to prove Theorem 2.3. \(\square \)

Proof of Theorem 2.3

Assume that X satisfies the hypothesis of Theorem 2.3 for some \(k\in \mathbb {N}\cup \lbrace \infty \rbrace .\) Let us denote by \(\lambda _0\) and K the Lipschitz constants \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega )\) and \({{\,\mathrm{Lip}\,}}(u_0, {{\,\mathrm{cl}\,}}(\varOmega ))\) of \(u_0\) on \(\partial \varOmega \) and \({{\,\mathrm{cl}\,}}(\varOmega )\), respectively. By Theorem 3.1, there exists a function \(u : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) with

$$\begin{aligned} |u_0-u| \le \varepsilon /2 \quad \text {on} \quad {{\,\mathrm{cl}\,}}(\varOmega ) , \quad u=u_0 \quad \text {on} \quad \partial \varOmega , \end{aligned}$$
(13)

and the Lipschitz constant of u on every bounded subset of \({{\,\mathrm{cl}\,}}(\varOmega )\) is strictly smaller than K. Now, applying Claim 4.2 for u,  we can find a function \(v: \varOmega \rightarrow \mathbb {R}\) of class \(C^k(\varOmega )\) such that

$$\begin{aligned} |u(x)-v(x)| \le \min \left\{ \frac{\varepsilon }{2}, {{\,\mathrm{dist}\,}}( x, \partial \varOmega ) \right\} \quad \text {and} \quad \Vert Dv(x)\Vert _* <K \quad \text {for all} \quad x\in \varOmega .\nonumber \\ \end{aligned}$$
(14)

If we extend v to the boundary \(\partial \varOmega \) of \(\varOmega \) by setting \(v= u\) on \(\partial \varOmega \) and we use the inequality (14), we obtain, for every \(x\in \partial \varOmega , \, y\in \varOmega ,\) that

$$\begin{aligned} |v(x)-v(y)|\le & {} |u(x)-u(y)| + |u(y)-v(y)| \le K \Vert x-y\Vert + {{\,\mathrm{dist}\,}}(y, \partial \varOmega ) \\\le & {} (1+K) \Vert x-y\Vert . \end{aligned}$$

This proves that the function v is continuous on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Therefore, the fact that v is K-Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega )\) is a consequence of the following well-known fact.

Fact 4.1

If \(w: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) is continuous on \({{\,\mathrm{cl}\,}}(\varOmega )\), is differentiable on \(\varOmega ,\) is K-Lipschitz on \(\partial \varOmega \) and satisfies \(\Vert Dw(x)\Vert _* \le K\) for every \(x\in \varOmega ,\) then w is K-Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

It only remains to see that v is \(\varepsilon \)-close to \(u_0.\) Indeed, by using (13) and (14) we obtain

$$\begin{aligned} |u_0-v| \le |u_0-u| + |u-v| \le \frac{\varepsilon }{2} + \frac{\varepsilon }{2} = \varepsilon \quad \text {on} \quad {{\,\mathrm{cl}\,}}(\varOmega ). \end{aligned}$$

\(\square \)

4.1 Finite-Dimensional and Hilbert Spaces

We are now going to prove that if X is a finite-dimensional space or a Hilbert space, then X satisfies the assumption of Theorem 2.3 with \(k=\infty \) in the separable case and with \(k=1\) in the nonseparable case.

Lemma 4.1

Let X be a separable Hilbert space or a finite-dimensional normed space. Given a K-Lipschitz function \(f: X \rightarrow \mathbb {R}\) and \(\varepsilon >0,\) there exists a function g of class \(C^\infty (X)\) such that \(|g-f| \le \varepsilon \) on X and \({{\,\mathrm{Lip}\,}}(g, B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(f, B[x_0,r+ \varepsilon ])+ \varepsilon \) for every ball \(B[x_0,r] \subset X.\) On the other hand, if X is a nonseparable Hilbert space, the statement holds replacing \(C^\infty \) smoothness with \(C^1.\)

Proof

Let us first consider that \(X=\mathbb {R}^d\) is endowed with an arbitrary norm. If \(f: \mathbb {R}^d \rightarrow \mathbb {R}\) is Lipschitz and, for \(\delta >0,\) we consider a function \(\theta _\delta : \mathbb {R}^d \rightarrow \mathbb {R}\) of class \(C^\infty (\mathbb {R}^d)\) with \({{\,\mathrm{supp}\,}}(\theta _\delta ) \subseteq B[0,\delta ]\) and \(\int _{\mathbb {R}^d} \theta _\delta = 1,\) it is well known that the integral convolution \( f_\delta = f* \theta _\delta \) is a Lipschitz function of class \(C^\infty \) such that

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(f_\delta , S) \le {{\,\mathrm{Lip}\,}}(f, S+ B[0,\delta ]) \quad \text {for every subset} \quad S \subset \mathbb {R}^d. \end{aligned}$$

In addition, \(f_\delta \rightarrow f\) uniformly on \(\mathbb {R}^d\) as \(\delta \rightarrow 0.\) This proves the lemma in the finite-dimensional case.

Now, let X be a Hilbert space and let us denote by \(\Vert \cdot \Vert \) the norm on X. If \(g: X \rightarrow \mathbb {R}\) is a K-Lipschitz function, then the functions defined by

$$\begin{aligned} g_\lambda (x)= \inf _{y\in X} \left\{ f(y) + \tfrac{1}{2\lambda }\Vert x-y\Vert ^2 \right\} , \quad g^\mu (x)= \sup _{y\in X} \left\{ f(y) - \tfrac{1}{2\mu }\Vert x-y\Vert ^2 \right\} \end{aligned}$$

for all \(x\in X\) and \( \lambda , \mu >0,\) are K-Lipschitz as well. Also, it is easy to see that the infimum/supremum defining \(g_\lambda (x)\) and \(g^\mu (x)\) can be restricted to the ball \(B[x, 2 \lambda K]\) and \(B[x,2 \mu K]\), respectively. Let us now prove the following relation between the local Lipschitz constants of g and \(g_\lambda :\)

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(g_\lambda , B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(g, B[x_0,r+2\lambda K]) \quad \text {for every ball} \quad B[x_0,r] \subset X. \end{aligned}$$
(15)

Indeed, let us fix a ball \(B[x_0,r],\) two points \(x,x'\in B[x_0,r]\) and \(\varepsilon >0.\) We can find \(y \in B[x', 2 \lambda K]\) such that

$$\begin{aligned} g(y)+\tfrac{1}{2\lambda }\Vert x'-y\Vert ^2 \le g_\lambda (x') + \varepsilon . \end{aligned}$$

The points y and \(x-x'+y\) belong to \(B[x_0,r+ 2\lambda K]\) and then we can write

$$\begin{aligned} g_\lambda (x)-g_\lambda (x')&\le g(x-x'+y) + \tfrac{1}{2\lambda }\Vert x-(x-x'+y)\Vert ^2-g(y)\\&\quad -\, \tfrac{1}{2\lambda } \Vert x'-y\Vert ^2+ \varepsilon \le {{\,\mathrm{Lip}\,}}(g, B[x_0,r+2\lambda K]) \Vert x-x'\Vert + \varepsilon , \end{aligned}$$

which easily implies (15). Similarly, we show that

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(g^\mu , B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(g, B[x_0,r+2\mu K]) \quad \text {for every ball} \quad B[x_0,r] \subset X.\qquad \end{aligned}$$
(16)

Now, we consider the Lasry–Lions sup-inf convolution formula for g,  that is

$$\begin{aligned} g_\lambda ^\mu (x)= \sup _{z\in X} \inf _{y\in X} \left\{ f(y)+ \tfrac{1}{2\lambda } \Vert z-y\Vert ^2- \tfrac{1}{2 \mu } \Vert x-z\Vert ^2 \right\} \end{aligned}$$

for all \(x\in X\) and \(0< \mu < \lambda .\) By the preceding remarks, the function \(g_\lambda ^\mu \) is K-Lipschitz and satisfies that

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(g_\lambda ^\mu , B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(g, B[x_0,r+2(\lambda + \mu ) K]) \quad \text {for every ball} \quad B[x_0,r] \subset X.\nonumber \\ \end{aligned}$$
(17)

Moreover, in [1, 2] it is proved that \(g_\lambda ^\mu \) is of class \(C^1(X)\) and \(g_\lambda ^\mu \) converges uniformly to g as \(0< \mu < \lambda \rightarrow 0.\) Now, given our K-Lipschitz function \(f: X \rightarrow \mathbb {R}\) and \(\varepsilon >0,\) we can find \(0< \mu < \lambda \) small enough so that the function \(f_\lambda ^\mu \) is K-Lipschitz and of class \(C^1(X),\) with \(| f_\lambda ^\mu -f| \le \varepsilon /2\) on X and, by virtue of (17),

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(f_\lambda ^\mu , B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(f, B[x_0,r+ \varepsilon ])\quad \text {for every ball} \quad B[x_0,r] \subset X. \end{aligned}$$
(18)

If we further assume that X is separable, then we can use [11, Theorem 1] in order to obtain a function \(g \in C^\infty (X)\) such that

$$\begin{aligned} | f_\lambda ^\mu - g| \le \frac{\varepsilon }{2} \quad \text {and} \quad \Vert D f_\lambda ^\mu - Dg\Vert _* \le \varepsilon \quad \text {on} \quad X, \end{aligned}$$

where \(\Vert \cdot \Vert _*\) denotes the dual norm of \(\Vert \cdot \Vert .\) From the first inequality we see that \(| f- g| \le \varepsilon \) on X. The second one together with (18) shows that

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(g,B[x_0,r]) \le {{\,\mathrm{Lip}\,}}(f_\lambda ^\mu , B[x_0,r])+ \varepsilon \le {{\,\mathrm{Lip}\,}}(f, B[x_0,r+ \varepsilon ])+ \varepsilon \end{aligned}$$

for every ball \(B[x_0,r]\) of X. \(\square \)

Combining Lemma 4.1 with Theorem 2.3, we obtain Theorems 2.2 and 2.1 when X is a separable Hilbert space or a finite-dimensional space.

Remark 4.1

In the case when the function to be approximated vanishes on the boundary, the proof of Theorem 2.1 for finite-dimensional spaces can be very much simplified as we do not need to use Theorem 3.1. Indeed, if \(\mathbb {R}^n\) is endowed with an arbitrary norm and \(u_0: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) is a Lipschitz function with \(u_0=0\) on \(\partial \varOmega ,\) given \(\varepsilon >0,\) we define the function \(\varphi _\varepsilon : \mathbb {R}\rightarrow \mathbb {R}\) by

$$\begin{aligned} \varphi _\varepsilon (t) = \left\{ \begin{array}{lll} t+\frac{\varepsilon }{2}, &{}\quad \text{ if } \;\; t \le - \frac{\varepsilon }{2}, \\ 0, &{}\quad \text{ if } \;\; -\,\frac{\varepsilon }{2}\le t\le \frac{\varepsilon }{2}, \\ t-\frac{\varepsilon }{2}, &{}\quad \text{ if } \;\; t \ge \frac{\varepsilon }{2}. \end{array} \right. \end{aligned}$$
(19)

We can assume that \(u_0\) is extended to all of \(\mathbb {R}^n\) by putting \(u_0=0\) on \(\mathbb {R}^n {\setminus } {{\,\mathrm{cl}\,}}(\varOmega ),\) preserving the Lipschitz constant. The function \(u = \varphi _\varepsilon \circ u_0\) defined on \(\mathbb {R}^n\) is Lipschitz because so are \(u_0\) and \(\varphi _\varepsilon \), and \({{\,\mathrm{Lip}\,}}(u,\mathbb {R}^n) \le {{\,\mathrm{Lip}\,}}(u_0, \mathbb {R}^n).\) Also, since \(| \varphi _\varepsilon (t)-t| \le \varepsilon /2\) for every \(t\in \mathbb {R},\) it is clear that

$$\begin{aligned} | u(x)-u_0(x)| = | \varphi _\varepsilon (u_0(x))- u_0(x)| \le \frac{\varepsilon }{2} \quad \text {for all} \quad x\in \mathbb {R}^d. \end{aligned}$$

Now we define

$$\begin{aligned} v(x)=(u * \theta _\delta )(x)= \int _{\mathbb {R}^d} u(y) \theta _\delta (x-y) \mathrm{d}y, \quad x\in \mathbb {R}^d, \end{aligned}$$

where \(\theta _\delta : \mathbb {R}^d \rightarrow \mathbb {R}\) is a \(C^\infty (\mathbb {R}^d)\) such that \(\theta _\delta \ge 0, \, \int _{\mathbb {R}^d}\theta _\delta =1\) and \({{\,\mathrm{supp}\,}}(\theta _\delta ) \subseteq B[0,\delta ].\) Using the preceding remarks together with the well-known properties of the integral convolution of Lipschitz functions with mollifiers, it is straightforward to check that, for \(\delta >0\) small enough, v is the desired approximating function, i.e., v is of class \(C^\infty (\mathbb {R}^d)\) with \(v=0\) on \(\partial \varOmega , \, {{\,\mathrm{Lip}\,}}(v, \mathbb {R}^n) \le {{\,\mathrm{Lip}\,}}(u_0, \mathbb {R}^n)\) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\)

4.2 The Space \(c_0(\varGamma )\)

Let us now prove that the space \(X= c_0(\varGamma )\) satisfies the hypothesis of Theorem 2.3 with \(k=\infty .\) In order to do this, we will use the construction given in [12, Theorem 1] and we will observe that the local Lipschitz constants are preserved.

Lemma 4.2

If \(\varGamma \) is an arbitrary subset, \(X=c_0(\varGamma )\) and \(f: X \rightarrow \mathbb {R}\) is a Lipschitz function, then, for every \(\varepsilon >0,\) there exists a function \(g: X \rightarrow \mathbb {R}\) of class \(C^\infty (X)\) such that \(|f-g| \le \varepsilon \) on X and \({{\,\mathrm{Lip}\,}}(g,B[x_0,r]) \le {{\,\mathrm{Lip}\,}}( f, B[x_0, r+ \varepsilon ])\) for every ball \(B[x_0,r] \subset X.\)

Proof

If K denotes the Lipschitz constant of f,  let us consider \(0< \eta <\frac{\varepsilon }{2(1+K)}.\) Let us define the function \(\phi : X \rightarrow X\) by \(\phi (x) = (\varphi _{2\eta }(x_\gamma ))_{\gamma \in \varGamma }\) for every \(x=(x_\gamma )_{\gamma \in \varGamma } \in X,\) where \(\varphi _{2\eta }\) is defined in (19). Thus \(\phi \) is 1-Lipschitz and satisfies \(\Vert \phi (x)-x\Vert \le \eta \) for every \(x\in X.\) By composing f with \(\phi \) we obtain a function \(h = f \circ \phi \) satisfying \(|f-h| \le \frac{\varepsilon }{2}\) and with the property that, for every \(x\in X,\) there exists a finite subset F of \(\varGamma \) such that whenever \(y,y'\in B[x, \frac{\eta }{2}]\) and \(P_F(y)=P_F(y')\) (here \(P_F(z) = \sum _{\gamma \in F} e^*_\gamma (z) e_\gamma \) for every \(z\in X\)) we have \(h(y)=h(y').\) Moreover, we observe that if \(x,y\in B[x_0,r] \subset X,\) then \(\phi (x), \phi (y) \in B[x_0, r+\eta ]\) and therefore

$$\begin{aligned} |h(x)-h(y)| \le {{\,\mathrm{Lip}\,}}( f, B[x_0,r+\eta ] ) \Vert \phi (x)-\phi (y)\Vert \le {{\,\mathrm{Lip}\,}}( f, B[x_0,r+\eta ] ) \Vert x-y\Vert ; \end{aligned}$$

which shows that \({{\,\mathrm{Lip}\,}}(h,B[x_0,r]) \le {{\,\mathrm{Lip}\,}}( f, B[x_0,r+\eta ] ).\) Now we use the construction of [12, Lemma 6] to obtain the desired approximation g :  let us define g as the limit of the net \(\lbrace g_F \rbrace _{F\in \varGamma ^{<\omega }},\) where each \(g_F\) is defined by

$$\begin{aligned} g_F(x) =\int _{\mathbb {R}^{|F|}} h \left( x- \sum _{\gamma \in F} t_\gamma e_\gamma \right) \prod _{\gamma \in F} \theta (t_\gamma ) \mathrm{d} \lambda _{|F|}(t), \quad x\in X; \end{aligned}$$

and \(\theta \) is a even \(C^\infty \) smooth nonnegative function on \(\mathbb {R}\) such that \(\int _{\mathbb {R}} \theta =1\) and \({{\,\mathrm{supp}\,}}(\theta ) \subset [ - c \varepsilon , c \varepsilon ],\) for a suitable small constant \(c>0.\) It turns out that g is of class \(C^\infty (X)\) with \(|g-h| \le \frac{\varepsilon }{2}\) on X and with the property that, for every \(x\in X,\) there exists a finite subset \(F_x\) of \(\varGamma \) such that \(g(x)=g_H(x)\) for every finite subset H of \(\varGamma \) containing \(F_x.\) See [12, Lemma 6] for details. In addition, we notice that if \(x,y\in B[x_0,r],\) and we consider finite subsets \(F_x\) and \(F_y\) of \(\varGamma \) with the above property, then for the set \(H=F_x \cup F_y,\) we have that

$$\begin{aligned} | g(x) -g(y)|&= |g_H(x)-g_H(y)| \le \int _{\mathbb {R}^{|H|}} \Bigg | h \left( x- \sum _{\gamma \in H} t_\gamma e_\gamma \right) \\&\quad -\, h \left( y-\sum _{\gamma \in H} t_\gamma e_\gamma \right) \Bigg | \prod _{\gamma \in H} \theta (t_\gamma ) \mathrm{d} \lambda _{|H|}(t) \\&\le {{\,\mathrm{Lip}\,}}( h, B[x_0, r+ c\varepsilon ]) \Vert x-y\Vert \int _{{{\,\mathrm{supp}\,}}(\theta )^{|H|}} \prod _{\gamma \in H} \theta (t_\gamma ) \mathrm{d} \lambda _{|H|}(t)\\&= {{\,\mathrm{Lip}\,}}( h, B[x_0, r+ c\varepsilon ]) \Vert x-y\Vert . \end{aligned}$$

This shows that

$$\begin{aligned} {{\,\mathrm{Lip}\,}}(g,B[x_0,r]) \le {{\,\mathrm{Lip}\,}}( h, B[x_0, r+ c\varepsilon ]) \le {{\,\mathrm{Lip}\,}}( f, B[x_0,r+c\varepsilon + \eta ] ), \end{aligned}$$

for every ball \(B[x_0,r] \subset X.\) This proves the lemma. \(\square \)

Combining Lemma 4.2 with Theorem 2.3, we obtain Theorem 2.1 in the case \(X=c_0(\varGamma ).\)

5 Approximation by Almost Classical Solutions of the Eikonal Equation

Throughout this section, X will denote a finite-dimensional normed space with \(\dim (X) \ge 2.\) At the end of the section we will complete the proof of Theorem 2.4.

We need to recall the notion of almost classical solutions of stationary Hamilton-Jacobi equations with Dirichlet boundary condition. This concept was introduced in [8] for the Eikonal equation and was generalized in [10] as follows.

Definition 5.1

Let \(\varOmega \) be an open subset of X and let \(F : \mathbb {R}\times \varOmega \times X^* \rightarrow \mathbb {R}\) and \(u_0: \partial \varOmega \rightarrow \mathbb {R}\) be continuous. A continuous function \(u: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) is an almost classical solution of the equation \(F( u(x), x, Du(x))=0\) with Dirichlet condition \(u=u_0\) on \(\partial \varOmega \) if:

(i):

\(u=u_0\) on \(\partial \varOmega .\)

(ii):

u is differentiable on \(\varOmega \) and \(F( u(x), x, Du(x))\le 0\) for all \(x\in \varOmega .\)

(iii):

\(F( u(x), x, Du(x))=0\) for almost every \(x\in \varOmega .\)

In [8, Theorem 4.1] it was proved the existence of almost classical solutions of the Eikonal equation with homogeneous boundary data, that is, the equation \(|D v| =1\) on \(\varOmega \) and \(v=0\) on \(\partial \varOmega .\) This result was extended in [10] to more general Hamilton-Jacobi equations. See [10, Theorem 3.1] or Proposition 5.1.

We start by proving a slight refinement of [10, Theorem 3.1] for the existence of almost classical solutions, in which these solutions can be taken with arbitrarily small supremum norm.

Proposition 5.1

Let \(\varOmega \subset X\) be an open subset and let \(F: \mathbb {R}\times \varOmega \times X^* \rightarrow \mathbb {R}\) be a continuous mapping. Assume the following two conditions on F.

(i):

\(F(0,x,0) \le 0\) for every \(x\in \varOmega .\)

(ii):

For every compact subset K of \(\varOmega \) there exist constants \(\alpha _K, M_K >0\) such that for all \(x\in K, \, r\in [0, \alpha _K]\) and \( x^* \in X^*\) with \(\Vert x^* \Vert _* \ge M_k\) we have \(F(r,x,x^*)>0.\)

Then, given \(\varepsilon >0,\) there exists a function \(u \ge 0\) on \({{\,\mathrm{cl}\,}}(\varOmega )\) such that \(| u |\le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega )\) and u is an almost classical solution of the equation \(F(u(x),x,Du(x))=0\) on \(\varOmega \) with Dirichlet condition \(u=0\) on \(\partial \varOmega .\) Moreover, the extension \({\tilde{u}}\) of u defined by \({\tilde{u}}=0\) on \(X {\setminus } \varOmega \) is differentiable on X.

Proof

Although [10, Theorem 3.1] was originally stated when \(X=\mathbb {R}^n\) is endowed with the Euclidean norm, we can easily rewrite its statement (and its proof) for general finite-dimensional normed spaces by using the following proposition, which is an easy consequence of [8, Corollary 3.6].

Proposition 5.2

Suppose that B is a closed ball of \(X^*.\) There exists a mapping \(t : B \rightarrow S_{X^{**}}\) such that if \((\sigma _n)_n \subset B\) is a sequence with \(t(\sigma _n)(\sigma _{n+1}-\sigma _n) \ge 0\) for every n,  then \((\sigma _n)_n\) converges.

In [10, Theorem 3.1], \(\varOmega \) is decomposed as \(\varOmega = \bigcup _{j \ge 1} C_j,\) where \(\lbrace C_j\rbrace _{j \ge 1}\) is a locally finite family of closed cubes and the function u satisfies \(u=0\) on \(\bigcup _{j \ge 1} \partial C_j\) (because u is the sum of a series of functions all vanishing on this union). Moreover, it is possible to choose the covering \(\lbrace C_j\rbrace _{j \ge 1}\) so that \({{\,\mathrm{diam}\,}}(C_j) \le \varepsilon \) for every \(j \ge 1,\) and then, the Mean Value Theorem yields that \(|u| \le \varepsilon \) on \(\varOmega .\)\(\square \)

Proof of Theorem 2.4

Given a 1-Lipschitz function \(u_0: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that \(u_0\) is \(\lambda _0\)-Lipschitz on \(\partial \varOmega \) for some \(\lambda _0<1\) and given \(\varepsilon >0,\) we can find, thanks to Theorem 2.1, a 1-Lipschitz function \(v : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) of class \(C^\infty (\varOmega )\) such that

$$\begin{aligned} |u_0-v| \le \frac{\varepsilon }{2} \quad \text {on} \quad {{\,\mathrm{cl}\,}}(\varOmega ), \quad v=u_0 \quad \text {on} \quad \partial \varOmega . \end{aligned}$$
(20)

Let us define \(F: \varOmega \times X^* \rightarrow \mathbb {R}\) by \(F(x, x^*) = \Vert x^* + D v (x) \Vert _*-1,\) for every \((x, x^*) \in \varOmega \times X^*.\) Because v is 1-Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega ),\) we have \(F(x,0) \le 0\) for every \(x\in \varOmega \), which means that the function identically 0 is a subsolution to the problem

$$\begin{aligned} \begin{array}{ll} F(x,D u(x))=0 &{}\quad \text { on }\;\; \varOmega , \\ u = 0 &{}\quad \text { on } \;\; \partial \varOmega . \end{array} \end{aligned}$$
(21)

Also, observe that, whenever \(\Vert x^*\Vert _*\ge 3\), we have, for all \(x\in \varOmega \), \(F(x, x^*) \ge 1\). Hence, Proposition 5.1 provides an almost classical solution u to problem (21) such that \(| u| \le \varepsilon /2\) on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Let us define \(w = u+ v\) on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Then w is continuous on \({{\,\mathrm{cl}\,}}(\varOmega )\) and differentiable on \(\varOmega \) with \(\Vert Dw(x)\Vert _* = \Vert D u(x)+ Dv(x)\Vert _* \le 1\) for every \(x\in \varOmega \) and \(\Vert Dw(x)\Vert _*=1\) for almost every \(x\in \varOmega .\) Also, w satisfies that \(w=v=u_0\) on \(\partial \varOmega \) and \(|w-v| \le \varepsilon /2\) on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Using Fact 4.1, we obtain that w is in fact 1-Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Finally, using (20), we obtain

$$\begin{aligned} |u_0-w| \le |v-w| + |u_0-v| \le \frac{\varepsilon }{2} + \frac{\varepsilon }{2} \le \varepsilon \quad \text {on} \quad {{\,\mathrm{cl}\,}}(\varOmega ). \end{aligned}$$

This completes the proof of Theorem 2.4. \(\square \)

6 The Limiting Case

In this section, we are concerned about constructions of functions \(u_0\) with prescribed values on the boundary of \(\varOmega \) such that \(u_0\) is differentiable on \(\varOmega \) and \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) = {{\,\mathrm{Lip}\,}}(u_0, \varOmega ).\)

The notion of Absolutely Minimizing Lipschitz (AML for short) function will be involved in the proof of the following proposition. Given an open subset \(\varOmega \) of \(\mathbb {R}^n,\) we say that a Lipschitz function \(u: \varOmega \rightarrow \mathbb {R}\) is an AML function provided that \({{\,\mathrm{Lip}\,}}(u,V) = {{\,\mathrm{Lip}\,}}(u, \partial V)\) for every V open such that \({{\,\mathrm{cl}\,}}(V)\) is a compact subset of \(\varOmega .\) If, in addition, u agrees with a Lipschitz function \(u_0: \partial \varOmega \rightarrow \mathbb {R}\) on \(\partial \varOmega ,\) we say that u is an Absolutely Minimizing Lipschitz Extension (AMLE) of \(u_0.\) The existence of these AMLE of a boundary data \(u_0\) and its equivalence with infinity harmonic functions (that is, viscosity solutions of the Infinity-Laplace equation) was proved in [13], while the uniqueness was shown in [14]. The regularity of these solutions was studied in [15, 16]. See [17] for a survey paper on the theory of absolutely minimizing Lipschitz functions.

Proposition 6.1

If \(\varOmega \subset \mathbb {R}^2\) is open and \(u_0: \partial \varOmega \rightarrow \mathbb {R}\) is 1-Lipschitz for the usual Euclidean distance, then there exists a differentiable 1-Lipschitz function \(w: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) such that \(| \nabla w| =1\) almost everywhere on \(\varOmega \) and \(w=u_0\) on \(\partial \varOmega ,\) i.e, there exist almost classical solutions of the Eikonal equation with boundary value \(u_0.\)

Proof

We know by O. Savin’s results in [15] that the AMLE of \(u_0\) to \({{\,\mathrm{cl}\,}}(\varOmega )\) is of class \(C^1(\varOmega ).\) In particular, there exists a 1-Lipschitz extension \(v: {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) of \(u_0\) such that \(v \in C^1(\varOmega ).\) If we consider the problem

$$\begin{aligned} \begin{array}{ll} | \nabla u + \nabla v |=1 &{}\quad \text { on } \;\; \varOmega , \\ u = 0 &{}\quad \text { on }\;\; \partial \varOmega , \end{array} \end{aligned}$$
(22)

and define \(F: \varOmega \times \mathbb {R}^2 \rightarrow \mathbb {R}\) by \(F(x,p) = | p + \nabla v(x)|, \, x\in \varOmega ,\, p \in \mathbb {R}^2,\) we have that F is a continuous function which is easily checked to satisfy the hypothesis of [10, Theorem 3.1] (see Proposition 5.1 in Sect. 5) for the existence of an almost classical solution to problem (22). If we denote by u this solution and we set \(w = u+v\) on \({{\,\mathrm{cl}\,}}(\varOmega ),\) it is clear that w is the desired function. \(\square \)

We notice that the proof of Proposition 6.1 cannot be adapted for dimension \(n \ge 3,\) because it is unknown whether or not the AMLE of \(u_0\) is of class \(C^1.\) We only know from the results in [16], that these AMLE are differentiable everywhere.

Example 6.1

Consider the \(\ell _1\) norm on \(\mathbb {R}^2\) and define \(\varOmega = \lbrace (x,y) \in \mathbb {R}^2 \, : \, x^2+y^2<1 \rbrace \) and the function \(u_0(x,y)= |x|-|y|\) on the boundary \(\partial \varOmega \) of \(\varOmega .\) The function \(u_0\) is 1-Lipschitz and all possible 1-Lipschitz extensions of \(u_0\) to \({{\,\mathrm{cl}\,}}(\varOmega )\) are not differentiable at (0, 0).

Proof

Given \((x,y), (x',y') \in \partial \varOmega ,\) we can easily write

$$\begin{aligned} | u(x,y)-u(x',y')|= & {} \big | |x|-|x'| + |y'|-|y| \big | \le |x-x'| + |y-y'| \\= & {} \Vert (x,y)-(x',y')\Vert _1, \end{aligned}$$

where the above inequalities are sharp. Thus, \(u_0\) is a 1-Lipschitz function on \(\partial \varOmega .\) Now, let \(u : {{\,\mathrm{cl}\,}}(\varOmega ) \rightarrow \mathbb {R}\) be a 1-Lipschitz extension of \(u_0.\) We have that \(u(0,0)\le 0\) since \( u(0,0)+1 = u(0,0)-u(0,1) \le 1.\) On the other hand, for every \(x\in [-\,1,1],\) we can write

$$\begin{aligned} u(x,0)&\ge u({{\,\mathrm{sign}\,}}(x),0) - \Vert ({{\,\mathrm{sign}\,}}(x),0)-(x,0)\Vert _1 = 1 -(1-|x|) = |x|\\ u(x,0)&\le u(0,0)+ \Vert (x,0)-(0,0)\Vert _1 \le |x| ; \end{aligned}$$

which implies that \(u(x,0)=|x|\) for every \(x\in [-\,1,1].\) Therefore u is not differentiable at (0, 0). \(\square \)

The above example shows in particular that, if \(u_0\) is extended to a 1-Lipschitz on \({{\,\mathrm{cl}\,}}(\varOmega )\) and \(\varepsilon >0,\) then there is no 1-Lipschitz function v on \({{\,\mathrm{cl}\,}}(\varOmega )\) which is differentiable on \(\varOmega , \, v=u_0\) on \(\partial \varOmega \) and \(|u_0-v| \le \varepsilon \) on \({{\,\mathrm{cl}\,}}(\varOmega ).\) Thus Problem 2.1 has a negative answer in the limiting case \({{\,\mathrm{Lip}\,}}(u_0, \partial \varOmega ) = {{\,\mathrm{Lip}\,}}(u_0,{{\,\mathrm{cl}\,}}(\varOmega )).\) An example with the same properties can be obtained with the \(\ell _\infty \) norm by means of the isometry \(T : (\mathbb {R}^2, \Vert \cdot \Vert _1) \rightarrow (\mathbb {R}^2, \Vert \cdot \Vert _\infty ),\) defined by \(T(x,y)=(x+y,x-y).\)

7 Conclusions

We studied the problem of approximating Lipschitz functions defined on an open subset of a Banach space by differentiable Lipschitz functions preserving both the Lipschitz constant and the boundary value. In order to do that, we first obtained the following purely metric result, that can be of independent interest: Given a real-valued Lipschitz function on a metric space, such that its restriction to a given closed subset has a better Lipschitz constant, we can approximate it uniformly by a function with better Lipschitz constant on bounded sets, and which coincides with the initial function on the given closed subset. This intermediate result allowed us to give a positive answer to our problem, when the Lipschitz constant on the boundary of the function to be approximated is smaller than its global Lipschitz constant. The order of differentiability of the approximating functions depends on the regularity of the partitions of unity of the pertinent space, and then the approximations can be taken infinitely many times differentiable in finite-dimensional and Hilbert spaces. These results yield approximation of 1-Lipschitz functions by everywhere-differentiable functions, which satisfy the Eikonal equation almost everywhere and coincides in the boundary with the initial function, provided that the restriction of the function to the boundary has Lipschitz constant less than 1. We proved the optimality of these results by exhibiting an example of a 1-Lipschitz function defined on the boundary of an open subset of a two-dimensional normed space, which does not admit any 1-Lipschitz differentiable extension. The question whether the main problem of this paper, without restrictions on the boundary value of the function to be approximated, has a positive solution in a finite-dimensional Euclidean space remains open. A related question would be to find conditions on the norm of a finite-dimensional space for which our problem has a positive solution, whitout restrictions on the boundary value of the initial function.