1 Introduction

Let \( \Omega \subset {{{\mathbb R}}^n}\) be a domain (that is, an open and connected subset) of \({{{\mathbb R}}^n}\) with \(n\ge 2\). We first recall Rademacher’s theorem in Euclidean spaces. See Appendix for some of its consequence related to Sobolev and Lipschitz spaces.

Theorem 1.1

If \(u:{\Omega }\rightarrow {\mathbb R}\) is a Lipschitz function, that is,

$$\begin{aligned} |u(x)-u(y)|\le \lambda |x-y|\quad \forall x,y\in \Omega \quad \text{ for } \text{ some } 0\le \lambda <\infty , \end{aligned}$$
(1.1)

then, at almost all \(x\in \Omega \), u is differentiable and \(|\nabla u(x)| ={\mathrm {\,Lip}}u(x)\). Here \(|\nabla u(x)|\) is the Euclidean length of the derivative \(\nabla u(x)\) at x, and \({\mathrm {\,Lip}}u (x)\) is the pointwise Lipschitz constant at x defined by

$$\begin{aligned} {\mathrm {\,Lip}}u(x):=\limsup _{y\rightarrow x}\frac{|u(y)-u(x)|}{|y-x|} . \end{aligned}$$
(1.2)

The above Rademacher’s theorem was extended to Carnot-Carathéodory spaces \((\Omega , X)\), where X is a family of smooth vector fields in \({\Omega }\) satisfying the Hörmander condition (See Sect. 2). Denote by Xu the distributional horizontal derivative of \(u\in L^1_{\mathrm {\,loc\,}}(\Omega )\). Write \({d_{CC}}\) as the Carnot-Carathéodory distance with respect to X. One then has the following; see [19, 21, 24, 36] and, for the better result in Carnot group and Carnot type vector field, see [40, 42].

Theorem 1.2

If \(u:\Omega \rightarrow {\mathbb R}\) is a Lipschitz function with respect to \({d_{CC}}\), that is,

$$\begin{aligned} |u(x)-u(y)|\le \lambda {d_{CC}}(x,y)\quad \forall x,y\in \Omega \quad \text{ for } \text{ some } 0\le \lambda <\infty , \end{aligned}$$
(1.3)

then, \(Xu \in L^\infty (\Omega ,{\mathbb R}^m)\) and, for almost all \(x\in \Omega \), the length \(|X u(x)| \le \lambda \).

Under the additional assumption that X is a Carnot type vector field in \(\Omega \), or in particular, \((\Omega , X)\) is a domain in some Carnot group, one further has \(|X u(x)| = {\mathrm {\,Lip}}_{d_{CC}}u(x) \) for almost all \(x\in \Omega \), where \({\mathrm {\,Lip}}_{d_{CC}}u(x) \) is defined by (1.2) with \(|y-x|\) replaced by \(d_{CC}(y,x)\).

This paper aims to build up some Rademacher type theorem involving Hamiltonians H(xp) in both of Euclidean and Carnot-Carathéodory spaces. Throughout this paper, the following assumptions are always held for H(xp).

Assumption 1

Suppose that \(H:\Omega \times {\mathbb R}^m\rightarrow {[0,+\infty )}\) is measurable and satisfies

  1. (H1)

    For each \(x\in \Omega \), \(H(x,\cdot )\) is quasi-convex, that is,

    $$\begin{aligned} H(x,t p + (1 - t)q) \le \max \{H(x,p), H(x,q)\}, \quad \forall p, q \in {\mathbb R}^m, \ \forall \, t\in [0,1] \ \text {and} \ \forall x\in \Omega . \end{aligned}$$
  2. (H2)

    For each \( x\in \Omega \), \(H(x,0)=\min _{p\in {{{\mathbb R}}^m}}H(x,p)=0\).

  3. (H3)

    It holds that \(R_\lambda < \infty \) for all \(\lambda \ge 0\), and \(\lim _{\lambda \rightarrow \infty }R_\lambda ' = \infty \), where and in below,

    $$\begin{aligned} R_\lambda := \sup \{|p| \ | \ (x,p)\in \Omega \times {\mathbb R}^{m},H(x,p)\le \lambda \} \end{aligned}$$

    and

    $$\begin{aligned} R'_\lambda := \inf \{|p| \ | \ (x,p)\in \Omega \times {\mathbb R}^{m},H(x,p)\ge \lambda \}. \end{aligned}$$

For any \(\lambda \ge 0\), we define

$$\begin{aligned} d _{\lambda } (x,y):= \sup \{u(y)-u(x) \ | \ u \in \dot{W}^{1,\infty }_{X }(\Omega ) \ \text{ with } \ \Vert H(\cdot , Xu)\Vert _{L^\infty (\Omega )} \le \lambda \}\quad \forall x,y \in \Omega . \end{aligned}$$
(1.4)

Recall that \(\dot{W}^{1,\infty }_{X }(\Omega )\) denotes the set of all functions \(u\in L^\infty (\Omega )\) whose distributional horizontal derivatives \(Xu\in L^\infty (\Omega ;{\mathbb R}^m)\). It was known that any function \( u\in \dot{W}^{1,\infty }_{X }(\Omega )\) admits a continuous representative \(\widetilde{u}\); see [21, Theorem 1.4] and also Theorem 2.3 and Remark 2.4 below. In this paper, in particular, in (1.4) above, we always identify functions in \(\dot{W}^{1,\infty }_X(\Omega )\) as their continuous representatives. We remark that \(d_\lambda \) is not a distance necessarily, but Lemma 2.9 says that \(d_\lambda \) is always a pseudo-distance as defined in Definition 2.8 below.

Given any \(\lambda \ge 0\), by the definition (1.4), if \(u\in \dot{W}_{X}^{1,\infty }(U)\) and \(\Vert H(\cdot ,Xu)\Vert _{L^\infty (U)}\le \lambda \), then \( u(y)-u(x)\le d_{\lambda }(x,y) \ \forall \, x,y\in \Omega .\) It is natural to ask whether the converse is true or not. However, such converse is not necessarily true as witted by the Hamiltonian

$$\begin{aligned} \lfloor |p|\rfloor =\max \{t\in {\mathbb N}\ | \ |p|-t\ge 0\}\quad \forall x\in \Omega ,\, p\in {{{\mathbb R}}^m}; \end{aligned}$$
(1.5)

for details see Remark 1.9 below. The point is that \( \lfloor |p|\rfloor \) is not lower-semicontinuous. Below, the converse is shown to be true if H(xp) is assumed additionally to be lower-semicontinuous in the variable p, that is,

  1. (H0)

    For almost all \(x\in \Omega \), \(H(x,p)\le \liminf _{q\rightarrow p}H(x,q) \quad \forall p\in {\mathbb R}^m.\)

Theorem 1.3

Suppose that H satisfies (H0)-(H3). Given any \(\lambda \ge 0 \) and any function \(u:\Omega \rightarrow {\mathbb R}\), the following are equivalent:

  1. (i)

    \(u\in \dot{W}_{X}^{1,\infty }(\Omega ) \ \text {and} \ \Vert H(\cdot ,Xu)\Vert _{L^\infty (\Omega )}\le \lambda \);

  2. (ii)

    \(u(y)-u(x)\le d_\lambda (x,y)\) \(\forall x,y\in \Omega \);

  3. (iii)

    For any \(x\in \Omega \), there exists a neighborhood \(N(x)\subset \Omega \) such that

    $$\begin{aligned} u(y)-u(z)\le d_\lambda (z,y)\quad \forall y,z \in N(x). \end{aligned}$$

In particular, if \(u:\Omega \rightarrow {\mathbb R}\) satisfies any one of (i)-(iii), then

$$\begin{aligned} \Vert H(\cdot ,Xu)\Vert _{L^\infty (\Omega )}&={\inf }\{\lambda \ge 0 \ | \ \lambda \ \text{ satisfies } \text{(ii) }\}={\inf }\{\lambda \ge 0 \ | \ \lambda \ \text{ satisfies } \text{(iii) }\}. \end{aligned}$$
(1.6)

Using Theorem 1.3, when \(\lambda \ge \lambda _H\) we prove that \(d_\lambda \) has a pseudo-length property, which allows us to get the following. Here and below, define

$$\begin{aligned} \lambda _H:=\inf \{\lambda \ge 0 \ | \ R'_\lambda >0\}. \end{aligned}$$
(1.7)

Since \(R_\lambda '\) defined in (H3) of Assumption 1 is always nonnegative and increasing in \(\lambda \ge 0\) and tends to \(\infty \) as \(\lambda \rightarrow \infty \), we know that \(0\le \lambda _H<\infty \), and moreover, \(\lambda >\lambda _H\) if and only if \(R'_\lambda >0\).

Theorem 1.4

Suppose that H satisfies (H0)-(H3). Given any \(\lambda \ge \lambda _H\) and any function \(u:\Omega \rightarrow {\mathbb R}\), the statement (i) in Theorem 1.3 is equivalent to the following

  1. (iv)

    For any \(x\in \Omega \), there exists a neighborhood \(N(x)\subset \Omega \) such that

    $$\begin{aligned} u(y)-u(x)\le d_\lambda (x,y)\quad \forall y \in N(x). \end{aligned}$$

In particular, if \(u:\Omega \rightarrow {\mathbb R}\) satisfies (iv), then

$$\begin{aligned} \max \{\lambda _H,\Vert H(\cdot ,Xu)\Vert _{L^\infty (\Omega )}\} =\min \{\lambda \ge \lambda _H \ | \ \lambda \ \text{ satisfies } \text{(iv) }\}. \end{aligned}$$
(1.8)

As a consequence of Theorem 1.3 and Theorem 1.4, we have the following Corollary 1.5. Associated to Hamiltonian H(xp), we introduce some notion and notations. Denote by \(\dot{W}^{1,\infty }_H(\Omega )\) the collection of all \(u\in \dot{W}^{1,\infty }_X(\Omega )\) with \(\Vert H(\cdot ,Xu)\Vert _{L^\infty (\Omega )}<\infty \). Denote by \({\mathrm {\,Lip}}_H(\Omega ,X)\) the class of functions \(u:\Omega \rightarrow \infty \) satisfying (ii) for some \(\lambda >0\) equipped with (semi-)norms

$$\begin{aligned} {\mathrm {\,Lip}}_H(u,\Omega )={\inf }\{\lambda \ge \lambda _H \ | \ \lambda \ \text{ satisfies } \text{(ii) }\}. \end{aligned}$$
(1.9)

Denote by \({\mathrm {\,Lip}}_H^*( \Omega )\) the collection of all functions u with

$$\begin{aligned} {\mathrm {\,Lip}}_H^*(u,\Omega )=\sup _{x\in \Omega }{\mathrm {\,Lip}}_Hu(x)<\infty , \end{aligned}$$

where we write the pointwise “Lipschitz" constant

$$\begin{aligned} {\mathrm {\,Lip}}_Hu(x)={\inf }\{\lambda \ge \lambda _H \ | \ \lambda \ \text{ satisfies } \text{(iv) }\}. \end{aligned}$$
(1.10)

Thanks to the right continuity of the map \(\lambda \in [\lambda _H,\infty )\mapsto d_\lambda (x,y)\) as given in Lemma 4.3, the infima in (1.9) and (1.10) are actually minima.

Corollary 1.5

Suppose that H satisfies (H0)-(H3) with \(\lambda _H=0\). Then \(\dot{W}^{1,\infty }_H(\Omega )={\mathrm {\,Lip}}_H(\Omega )={\mathrm {\,Lip}}_H^*( \Omega )\) and

$$\begin{aligned} \Vert H(\cdot ,Xu)\Vert _{L^\infty (\Omega )}={\mathrm {\,Lip}}_H(u,\Omega )={\mathrm {\,Lip}}_H^*(u, \Omega ). \end{aligned}$$

Next, we apply the above Rademacher type property to study a minimization problem for \(L^\infty \)-functionals corresponding to the above Hamiltonian H(xp) in both Euclidean and Caratheódory spaces:

$$\begin{aligned} {\mathcal F}(u,U):=\big \Vert H(\cdot , Xu )\big \Vert _{L^\infty (U)}\ \text{ for } \text{ any } \quad u\in W^{1,\infty }_{X,{\mathrm {\,loc\,}}}(U)\quad \hbox {and domain} \quad U\subset \Omega . \end{aligned}$$

Aronsson [1,2,3, 5] in 1960’s initiated the study in this direction via introducing absolute minimizers. A function \(u\in W^{1,\infty }_{X,{\mathrm {\,loc\,}}}(U)\) is called an absolute minimizer in U for H and X (write \(u\in AM(U;H,X)\) for short) if for any domain \(V\Subset U\), it holds that

$$\begin{aligned} {{\mathcal F}(u,V) \le {\mathcal F}(v,V)} \text{ whenever }\ v\in \dot{W}^{1,\infty }_X(V)\cap C(\overline{V})\ \text{ and } \ u\big |_{\partial V}=v\big |_{\partial V}. \end{aligned}$$

Here and throughout this paper, for domains A and B, the notation \(A\Subset B\) stands for that A is a bounded subdomain of B and its closure \(\overline{A}\subset B\).

The existence of absolute minimizers with a given boundary value has been extensively studied. Apart from the pioneering work by Aronsson mentioned above, we refer the readers to [7, 9, 12, 14, 15, 26, 33] and the references therein in the Euclidean setting. For the existence results in Heisenberg groups, Carrot-Carathéodory spaces and general metric spaces with special type of Hamiltonians, we refer the readers to [10, 34, 36,37,38, 47]. Usually, there are two major approaches to obtain the existence of absolute minimizers. When dealing with \(C^2\) Hamiltonians, one usually transfers the study of absolute minimizers into the study of viscosity solutions of the Aronsson equation (the Euler-Lagrange equation of the \(L^\infty \)-functional \({\mathcal F}\)). Thus, to get the existence of absolute minimizers, it suffices to show the existence of the corresponding viscosity solutions. This approach was employed, for instance, in [3, 4, 9, 15, 25, 33, 47]. To study the the existence of absolute minimizers for Hamiltonians H(xp) with less regularity, one efficient way is to use Perron’s method to first get the existence of absolute minimizing Lipschitz extensions (ALME), and then show the equivalence between ALMEs and absolute minimizers. This idea was adopted in [1, 2, 7, 26, 34, 37, 38]. To see the close connection between ALMEs and absolute minimizers, we refer the readers to [17, 35, 36] and references therein.

Theorem 1.3, Theorem 1.4 and Corollary 1.5 allow us to apply Perron’s method directly and then to establish the following existence result of absolute minimizers. This is partially motivated by [12]. However, since we are faced with measurable Hamiltonians, there are several new barriers to be overcome as illustrated at the end of this section.

Theorem 1.6

Suppose that H satisfies (H0)-(H3) with \(\lambda _H=0\). Given any domain \(U\Subset {\Omega }\) and \(g\in {\mathrm {\,Lip}}_{d_{CC}}(\partial U)\), there must be a function \(u\in AM(U;H,X)\cap {\mathrm {\,Lip}}_{d_{CC}}(\overline{U})\) so that \(u|_{\partial U}=g\).

Theorem 1.3, Theorem 1.4, Corollary 1.5 and Theorem 1.6 improve or extend several previous studies in the literature including Theorem 1.1 and Theorem 1.2 above; see Remark 1.7 and Remark 1.8 below.

Remark 1.7

  1. (i)

    In Euclidean spaces, that is, \(X=\{\frac{\partial }{\partial x_i} \}_{1\le i\le n}\), if \(H(x,p)=|p|\), then Corollary 1.5 coincides with Lemma 6, which is a consequence of Theorem 1.1. In Carnot-Carathéodory spaces \((\Omega , X)\), if \(H(x,p)=|p|\), then Corollary 1.5 coincides with Lemma 2.7, which is a consequence of Theorem 1.2.

  2. (ii)

    In Euclidean spaces, if H(xp) is lower semi-continuous in \(U \times {{{\mathbb R}}^n}\), \(H(x,\cdot )\) is quasi-convex for each \(x \in U\), and satisfies (H2) and (H3), (ii)\(\Leftrightarrow \)(i) in Theorem 1.3 was proved in Champion-De Pascale [14] (see also [6, 15] for convex H(p) in Euclidean spaces).

    The proof in [14] relies on the lower semi-continuity in both of x and p heavily, which allows for approximation H(xp) via a continuous Hamiltonian in x and p. But such an approach fails under the weaker assumptions (H0) &(H1) here. We refer to Sect. 7 for more details and related further discussions.

  3. (iii)

    In both Euclidean and Carrot-Carathéodory spaces, if \(H(x,p)=\sqrt{\langle A(x)p,p\rangle }\), where A(x) is a measurable symmetric matrix-valued function satisfying uniform ellipticity, then Theorem 1.3 was established in [36, 38]. The proofs therein rely on the inner product structure, and also do not work here. For measure spaces endowed with strongly regular nonlocal Dirichlet energy forms, where the Hamiltonian is given by the square root of Dirichlet form, we refer to [22, 37, 38, 44] for some corresponding Rademacher type property.

  4. (iv)

    Under merely (H0)-(H3), one can not expect that \({\mathrm {\,Lip}}_H(x)=H(x,Xu(x)) \) almost everywhere. Recall that in Euclidean spaces, there does exist A(x), which satisfying Remark 1.7(iii) above, so that such pointwise property fails for the Hamiltonian \(\sqrt{\langle A(x)p,p\rangle }\). For more details see [36, 46].

Remark 1.8

  1. (i)

    In Euclidean spaces, that is, \(X=\{\frac{\partial }{\partial x_i}\}_{1\le i\le n}\), if H(xp) is given by Euclidean norm and also any Banach norm, the existence of absolute minimizers was established in Aronsson [1, 2] and Aronsson et al [7]. If H(xp) is given by \(\sqrt{\langle A(x)p,p\rangle }\) with A being as in Remark 1.7 (iii) above, existence of absolute minimizers is given by [36] with the aid of [35]. In a similar way, with the aid of [35], Guo et al [26] also obtained the existence of absolute minimizers if H(xp) is a measurable function in \(\Omega \times {{{\mathbb R}}^n}\), and satisfies that \(\frac{1}{C}< H(x,p)<C\) for all \(x\in \Omega \) and \(p\in S^{n-1}\), where \(C\ge 1\) is a constant, and that \(H(x,\eta p) = |\eta | H(x,p)\) for all \(x\in \Omega \), \(p\in {{{\mathbb R}}^n}\) and \(\eta \in {\mathbb R}\).

  2. (ii)

    In Euclidean spaces, if H(xp) is continuous in both variables xp and quasi-convex in the variable p, with an additional growth assumption in p, Barron et al [9] built up the existence of absolute minimizers. If H(xp) is lower semi-continuous in xp and quasi-convex in p and satisfies (H1)-(H3), Champion-De Pascale [14] established the existence of absolute minimizers with the help of their Rademacher type theorem in Remark 1.7(ii). Recall that the lower semi-continuity of H plays a key role in [14] to obtain the pseudo-length property for \(d_\lambda \).

  3. (iii)

    In Heisenberg groups, if \(H(x,p)=\frac{1}{2}|p|^2\) we refer to [10] for the existence of absolute minimizers. In any Carnot group, if \(H\in C^2(\Omega \times {\mathbb R}^m)\), \(D^2_{pp}H(x, \cdot )\) is positive definite, and there exists \( \alpha \ge 1\) such that

    $$\begin{aligned} H(x,\eta p) = \eta ^{\alpha }H(x,p)\quad \forall x\in \Omega ,\ \eta >0,\ p\in {{{\mathbb R}}^n}, \end{aligned}$$
    (1.11)

    then the existence of absolute minimizers was obtained by Wang [47] via considering viscosity solutions to the corresponding Aronsson equations.

The following remark explains that, without the assumption (H0), Theorem 1.3 does not necessarily hold.

Remark 1.9

The Hamiltonian \(H(x,p)=\lfloor |p|\rfloor \) given in (1.5) satisfies (H1)-(H3) but does not satisfy (H0). Given any \(\lambda \in (0,1)\), we have

$$\begin{aligned} d_{\lambda } (x,y)&=\sup \{u(y)-u(x) \ | \ u \in \dot{W}^{1,\infty }_X(\Omega )\ \text{ with } \ \Vert H(\cdot ,X u)\Vert _{L^\infty (\Omega )}=\Vert \lfloor |X u|\rfloor \Vert _{L^\infty (\Omega )} \le \lambda \} \\&=\sup \{u(y)-u(x) \ | \ u \in \dot{W}^{1,\infty }_X(\Omega ) \ \text{ with } \ \Vert |X u| \Vert _{L^\infty (\Omega )} \le 1\} \\&=d_{CC}(x,y)\quad \forall x,y\in \Omega . \end{aligned}$$

Fix any \( z\in \Omega \) and write \(u(x)=d_\lambda (z,x)\ \forall x\in \Omega \). By the triangle inequality we have

$$\begin{aligned} u(y)-u(x)=d_\lambda (z,y)-d_\lambda (z,x)\le d_\lambda (x,y) \end{aligned}$$

Recall that, when \(X=\{\frac{\partial }{\partial x_j}\}_{1\le j\le n}\) or when X is given by Carnot type Hörmander vector fields, one always has \(|X d_{CC} (z,\cdot ) | =1\) almost everywhere; see [40]. For such X, we conclude that

$$\begin{aligned} \Vert H(\cdot ,X u)\Vert _{L^\infty (\Omega )}=1>\lambda . \end{aligned}$$

Thus Theorem 1.3 fails.

The following remark explains the reasons why we need \(\lambda \ge \lambda _H \) in Theorem 1.4, and why we assume \(\lambda _H=0\) in Theorem 1.6. Note that, in Theorem 1.3 where \(\lambda _H\) maybe not 0, we do get the equivalence among (i), (ii) and (iii) for any \(\lambda \ge 0\).

Remark 1.10

  1. (i)

    To prove (iv) in Theorem 1.4\(\Rightarrow \) (i) in Theorem 1.3, we need a pseudo-length property for \(d_\lambda \) as in Proposition 4.1. When \(\lambda >\lambda _H\) (equivalently, \(R'_\lambda >0\)), to get such pseudo-length property for \(d_\lambda \), our proof does use \(R_\lambda '>0\) so to guarantee that the topology induced by \(\{d_\lambda (x ,\cdot )\}_{x \in \Omega }\) (See Definition 2.8) is the same as the Euclidean topology; see Remark 4.4. When \(\lambda =\lambda _H\), we get such pseudo-length property for \(d_{\lambda _H}\) via approximating by \(d_{\lambda _H+\epsilon }\) with sufficiently small \(\epsilon >0\).

  2. (ii)

    When \( \lambda _H>0\) and \(0\le \lambda <\lambda _H\), we do not know whether \(d_\lambda \) enjoys such pseudo-length property. We remark that there does exist some Hamiltonian H(xp) which satisfies the assumptions (H0)-(H3) with \(\lambda _H>0\) (that is, for some \(\lambda >0\), \(R_\lambda '=0\)) ; but for \(0<\lambda <\lambda _H\), the topology induced by \(\{d_\lambda (x ,\cdot )\}_{x \in \Omega }\) does not coincide with the Euclidean topology; see Remark 2.11 (ii).

  3. (iii)

    To get the existence of absolute minimizers, our approach does need Theorem 1.4 and also several properties of \(d^U_\lambda \), whose proof relies heavily on the pseudo-length property for \(d_\lambda \) and \(R_\lambda '>0\). In Theorem 1.6, we assume \(\lambda _H=0\) so that we can work with all Lipschitz boundary g so to get existence of absolute minimizer.

    In the case \(\lambda _H>0\), our approach will give the existence of of absolute minimizer when the boundary \(g:\partial U\rightarrow {\mathbb R}\) satisfies \(\mu (g,\partial U)>\lambda _H\), but does not work when \(\mu (g,\partial U)\le \lambda _H\). Here \( \mu (g,\partial U)\) is the infimum of \(\lambda \) so that \(g(y)-d(x)\le d^U_\lambda (x,y)\) \(forall x,y\in \partial U\).

The paper is organized as below, where we also clarify the ideas and main novelties to prove Theorem 1.3, Theorem 1.4 and also Theorem 1.6. We emphasize that in our results from Sects 2, 3, 4, 5 and 6, X is a fixed smooth vector field in a domain \({\Omega }\) and satisfies the Hörmander condition; and that the Hamiltonian H(xp) always enjoys (H0)-(H3). In all results from Sects. 5 and 6, we further assume \(\lambda _H=0\).

In Sect. refsps1, we state several facts about the analysis and geometry in Carnot-Carathéodory spaces employed in the proof.

In Sect. 3, we prove (i)\(\Leftrightarrow \)(ii)\(\Leftrightarrow \)(iii) in Theorem 1.3. Since (i)\(\Rightarrow \)(ii) follows from the definition and that (ii)\(\Rightarrow \)(iii) is obvious, it suffices to prove (iii)\(\Rightarrow \)(i). To this end, we borrow some ideas from [22, 36, 44, 45], which were designed for nonlocal Dirichlet energy forms originally.

The key is that, by employing assumptions (H0), (H1) and Mazur’s theorem, we are able to prove that if \(v_j\in \dot{W}^{1,\infty }_X(\Omega )\) with \(\Vert H(\cdot , Xv_j)\Vert _{L^\infty (\Omega )}\le \lambda \) and \(v_j\rightarrow v\) in \(C^0(\Omega )\) as \(j\rightarrow \infty \), then \(v \in \dot{W}^{1,\infty }_X(\Omega )\) with \(\Vert H(\cdot , Xv)\Vert _{L^\infty (\Omega )}\le \lambda \); see Lemma 3.1 for details. Thanks to this, choosing a suitable sequence of approximation functions via the definition of \(d_\lambda \), we then show that

$$\begin{aligned} d _{\lambda }(x,\cdot ) \in W_{X}^{1,\infty }(\Omega )\hbox { and }\Vert H(\cdot ,Xd _{\lambda }(x,\cdot ))\Vert _{L^\infty (\Omega )}\le \lambda \hbox { for all }\lambda >0\hbox { and }x\in \Omega . \end{aligned}$$

See Lemma 3.3. Given any u satisfying (iii), we construct approximation functions \(u_j\) from \(d_\lambda \) and use Lemma 3.4 to show \(H(x,Du_j)\le \lambda \). That is (i) holds.

In Sect. 4, we prove (iii) in Theorem 1.3\(\Leftrightarrow \) (iv) in Theorem 1.4. Since (iii)\(\Rightarrow \)(iv) is obvious, it suffices to show (iv)\(\Rightarrow \)(iii).

This follows from the pseudo-length property of pseudo metric \(d_\lambda \) in Proposition 4.1. To get such a length property we find some special functions which fulfill the assumption Theorem 1.3(iii), and hence we show that the pseudo metric \(d_\lambda \) has a pseudo-length property.

In Sect. 5, we introduce McShane extensions and minimizers, and then gather several properties of them and pseudo-distance in Lemma 5.2 to Lemma 5.9, which are required in Sect. 6. These properties also have their own interests.

Given any domain \(U\Subset {\Omega }\), via the intrinsic distance \(d_\lambda ^U\) induced from U, we introduce McShane extensions \(\mathcal {S}_{g;V}^\pm \) of any \(g\in {\mathrm {\,Lip}}_{d_{CC}}(\partial U)\) in U. There are several reasons to use \(d^U_\lambda \) other than \(d_\lambda \), for example, \(d^U_\lambda \) has the pseudo-length property in U but the restriction of \(d_\lambda \) may not have; moreover, Theorem 1.3, and Theorem 1.4 holds if \((\Omega ,d_\lambda )\) therein is replaced by \( (U,d^U_\lambda )\), but not necessarily hold if \((\Omega ,d_\lambda )\) therein is replaced by \( (U,d _\lambda )\). However, the use of \(d_\lambda ^U\) causes several difficulties. For example, \(d_\lambda ^U\) may be infinity when extended to \(\overline{U}\). This makes it quite implicit to see the continuity of McShane extensions around \(\partial U\) from the definition. In Lemma 5.6, we get such continuity by analyzing the behaviour of \(d_\lambda ^U\) near \(\partial U\). Moreover, as required in Sect. 6, we have to study the relations between \(d_\lambda ^U\) and \(d^V_\lambda \) for subdomains V of U in Lemma 5.3 and Lemma 5.4.

In Sect. 6, we prove Theorem 1.6 in a constructive way by using above Rademacher type property and Perron’s approach, where we borrow some ideas from [9, 12, 14].

The proof consists of crucial Lemma 6.2, Lemma 6.4 and Proposition 6.5. Lemma 6.2 says that McShane extensions \(\mathcal {S}_{g;U}^\pm \) in U of function g in \(\partial U\) are local super/sub minimizers in U. Since \(\mathcal {S}_{g;U}^\pm \) are the maximum/minimum minimizers, the proof of Lemma 6.2 is reduced to showing that for any subdomain \(V \subset U\), the McShane extensions \({\mathcal S}^\pm _{h^\pm , V}\) in V with boundary \(h^\pm =\mathcal {S}_{g;U}^\pm |_{\partial V}\) satisfy

$$\begin{aligned} {\mathcal S}^\pm _{h^\pm ; V}(y) - {\mathcal S}^\pm _{h^\pm ; V}(x) \le d_\lambda ^U(x,y)\quad \hbox { for all }\quad x,y \in \overline{V}; \end{aligned}$$

see Lemma 5.8 and Lemma 5.9 and the proof of Lemma 6.2. However, since Lemma 5.6 only gives

$$\begin{aligned} {\mathcal S}^\pm _{h^\pm ; V}(y) - {\mathcal S}^\pm _{h^\pm ; V}(x) \le d_\lambda ^V(x,y)\hbox { for all }x,y \in \overline{V}, \end{aligned}$$

we must improve \(d_\lambda ^V(x,y)\) here to the smaller one \(d_\lambda ^U(x,y)\). To this end, we show \(d_\lambda ^V= d_\lambda ^U\) locally in Lemma 5.3, and also use the pseudo-length property of \( d_\lambda ^U\) heavily. Lemma 6.4 says that a function which is both of local superminimizers and subminimizer must be an absolute minizimzer. To get the required local minimizing property, we use McShane extensions to construct approximation functions and also need the fact \(d_\lambda ^V= d_\lambda ^{V\setminus \{x_i\}_{1\le i\le m}}\) in \(\overline{V}\times \overline{V}\) as in Lemma 5.4. Proposition 6.5 says that the supremum of local subminimizers are absolute minimizers. Due to Lemma 6.4, it suffices to prove the local super/sub minimizing property of such a supremum. We do prove this via using Lemma 6.2 and Lemma 5.9 repeatedly and a contradiction argument.

In Sect. 7, we aim at explaining some obstacles in using previous approach to establish the Rademacher type theorem and the existence of absolute minimizers. Indeed, in the literature to study Hamiltonians with better regularity or homogeneity, for instance, [14, 26], another intrinsic distance \(\bar{d}_\lambda \) is more common used in those proof which is hard to fit our setting.

In Appendix, we revisit the Rademacher’s theorem in the Euclidean space to show that Theorem 1.3 and Corollary 1.5 are indeed an extension of the Rademacher’s theorem.

2 Preliminaries

In this section, we introduce the background and some known results related to Carnot-Carathéodory spaces employed in the proof.

Let \(X:=\{X_1, ... ,X_m\}\) for some \(m\le n\) be a family of smooth vector fields in \({\Omega }\) which satisfies the Hörmander condition, that is, there is a step \(k \ge 1\) such that, at each point, \(\{X_i\}^{m}_{i=1}\) and all their commutators up to at most order k generate the whole \({{{\mathbb R}}^n}\). Then for each \(i=1,\cdots ,m\), \(X_i\) can be written as

$$\begin{aligned} X_i = \sum _{l=1}^n b_{il} \frac{\partial }{\partial x_l} \text{ in } \Omega \end{aligned}$$

with \(b_{il} \in C^\infty (\Omega )\) for all \(i=1,\cdots ,m\) and \(l=1,\cdots ,n\).

Define the Carnot-Carathéodory distance corresponding to X by

$$\begin{aligned} d_{CC}(x,y):=\inf \{\ell _{d_{CC}}({\gamma }) \ | \ {\gamma }\in \mathcal {ACH}(0,1;x,y;\Omega )\} \end{aligned}$$
(2.1)

Here and below, we write \({\gamma }\in \mathcal {ACH}(0,1;x,y;\Omega )\) if \({\gamma }:[0,1]\rightarrow \Omega \) is absolutely continuous, \({\gamma }(0)=x,{\gamma }(1)=y\), and there exists measurable functions \(c_{i}:[0,1] \rightarrow {\mathbb R}\) with \(1 \le i \le m\) such that \(\dot{\gamma }(t) = \sum _{i=1}^m c_i(t)X_i({\gamma }(t))\) whenever \(\dot{\gamma }(t)\) exists. The length of \({\gamma }\) is

$$\begin{aligned} \ell _{d_{CC}}({\gamma }):=\int _0^1|\dot{\gamma }(t)|\,dt=\int _0^1 \sqrt{\sum _{i=1}^m c_i^2(t)}\,dt. \end{aligned}$$

In the Euclidean case, we have the following remark.

Remark 2.1

In Euclidean case, that is, \(X=\{\frac{\partial }{\partial {x_i}}\}_{1\le i\le n}\), one has \(d_{CC}\) coincides with the intrinsic distance \(d_E^\Omega \) as given in (A.2). In particular, \(d_{CC}(x,y)=d^\Omega _E(x,y)\) for all \( x,y\in \Omega \) with \(|x-y|<{\mathrm {\,dist\,}}(x,\partial \Omega )\). When \(\Omega \) is convex, one further have and \(d_{CC}(x,y)=|x-y|\) for all \(x,y\in \Omega \); however, when \(\Omega \) is not convex, this is not necessarily true. See Lemma A.4 in Appendix for more details.

Since X is a Hörmander vector field in \(\Omega \), for any compact set \(K \subset \Omega \), there exists a constant \(C(K) \ge 1\) such that

$$\begin{aligned} C(K)^{-1} |x - y | \le {d_{CC}}(x,y) \le C(K) |x - y |^{\frac{1}{k}} \quad {\forall x, y \in K}, \end{aligned}$$

see for example [41] and [27, Chapter 11]. This shows that the topology induces by \((\Omega ,d_{CC})\) is exactly the Euclidean topology.

Given a function \(u \in L^1_{{\mathrm {\,loc\,}}}(\Omega )\), its distributional derivative along \(X_i\) is defined by the identity

$$\begin{aligned} \langle X_i u , \phi \rangle = \int _\Omega u X_i^*\phi \, dx \text{ for } \text{ all }\quad \phi \in C_0^\infty (\Omega ), \end{aligned}$$

where \(X_i^*= -\sum _{l=1}^n \frac{\partial }{\partial x_l}(b_{il} \cdot )\) denotes the formal adjoint of \(X_i\). Write \(X^*= (X_1^*, \cdots ,X_m^*)\). We call \(Xu:=(X_1u, \cdots ,X_m u)\) the horizontal distributional derivative for \(u \in L^1_{{\mathrm {\,loc\,}}}(\Omega )\) and the norm |Xu| is defined by

$$\begin{aligned} |Xu|= \sqrt{\sum _{i=1}^m|X_i u|^2} . \end{aligned}$$

For \(1\le p\le \infty \), denote by \(\dot{W}^{1,p}_X(\Omega )\) the p-th integrable horizontal Sobolev space, that is, the collection of all functions \(u\in L^1_{\mathrm {\,loc\,}}(\Omega )\) with its distributional derivative \(Xu\in L^p(\Omega )\). Equip \(\dot{W}^{1,p}_X(\Omega )\) with the semi-norm \(\Vert u\Vert _{\dot{W}^{1,p}_X(\Omega )}=\Vert |Xu|\Vert _{L^p(\Omega )}\).

The following was proved in [23, Lemma 3.5 (II)].

Lemma 2.2

If \( u \in \dot{W}^{1,p}_X(U)\) with \(1\le p<\infty \) and \( U\Subset \Omega \), then \(u^+=\max \{u,0\} \in \dot{W}^{1,p}_X(U)\) with \(Xu^+=(Xu)\chi _{\{x\in U|u>0\}}\) almost everywhere.

We recall the following imbedding of horizontal Sobolev spaces from [24, Theorem 1.4]. For any set \(U\subset \Omega \), the Lipschitz class \({\mathrm {\,Lip}}_{d_{CC}}(U)\) is the collection of all functions \(u:U\rightarrow {\mathbb R}\) with its seminorm

$$\begin{aligned} {\mathrm {\,Lip}}_{d_{CC}}(u,U) := \sup _{x \ne y, x,y \in U} \frac{|u(x)-u(y)|}{{d_{CC}}(x,y) } < \infty . \end{aligned}$$

Theorem 2.3

For any subdomain \(U \Subset \Omega \), if \(u \in \dot{W}^{1,\infty }_X(U)\), then there is a continuous function \(\widetilde{u} \in {\mathrm {\,Lip}}_{d_{CC}}(U)\) with \(\widetilde{u}=u\) almost everywhere and

$$\begin{aligned} {\mathrm {\,Lip}}_{d_{CC}}(\widetilde{u},U)\le C(U,\Omega ) [\Vert u\Vert _{L^\infty (U)}+\Vert u\Vert _{\dot{W}^{1,\infty }_X(U)}]. \end{aligned}$$

Remark 2.4

For any \(u \in \dot{W}^{1,\infty }_X(U)\), we call above \(\widetilde{u}\) given in Theorem 2.3 as the continuous representative of u. Up to considering \(\widetilde{u} \), in this paper we always assume that u itself is continuous.

We have the following dual formula of \({d_{CC}}\).

Lemma 2.5

For any \(x,y\in \Omega \), we have

$$\begin{aligned} d_{CC}(x,y) =\sup \{u(y)-u(x) \ | \ u\in \dot{W}^{1,\infty }_X(\Omega ) \text{ with } \Vert |Xu|\Vert _{L^\infty (\Omega )}\le 1\}. \end{aligned}$$
(2.2)

To prove this we need the following bound for the norm of horizontal derivative of smooth approximation of functions in \(\dot{W}^{1,\infty }_{X}(\Omega )\), see for example [27, Proposition 11.10]. Denote by \(\{\eta _\epsilon \}_{\epsilon \in (0,1)}\) the standard smooth mollifier, that is, \(\eta _\epsilon (x) = \epsilon ^{-n} \eta (\frac{x}{\epsilon }) \quad \forall x\in {{{\mathbb R}}^n}\), where \(\eta \in C^\infty ({{{\mathbb R}}^n})\) is supported in unit ball of \({{{\mathbb R}}^n}\) (with Euclidean distance), \(\eta \ge 0\) and \(\int _{{{{\mathbb R}}^n}} \eta \,dx=1\).

Proposition 2.6

Given any compact set \(K\subset \Omega \), there is \(\epsilon _K\in (0,1)\) such that for any \(\epsilon <\epsilon _K\) and \(u \in \dot{W}^{1,\infty }_{X}(\Omega )\) one has

$$\begin{aligned} |X(u*\eta _\epsilon )(x)| \le \Vert |Xu|\Vert _{L^\infty (\Omega )} +A_\epsilon (u)\quad \forall x\in K, \end{aligned}$$
(2.3)

where \(A_\epsilon (u)\ge 0\) and \(\lim _{\epsilon \rightarrow 0}A_\epsilon (u) \rightarrow 0\) in K.

Proof of Lemma 2.5

Recall that it was shown by [32, Proposition 3.1] that

$$\begin{aligned} d_{CC}(x,y) =\sup \{u(y)-u(x) \ | \ u\in C^\infty (\Omega ) \text{ with } \quad \Vert |Xu|\Vert _{L^\infty (\Omega )}\le 1\} \quad \forall x,y\in \Omega . \end{aligned}$$
(2.4)

It then suffices to show that for any \(u\in \dot{W}^{1,\infty }_X(\Omega ) \) with \( \Vert |Xu|\Vert _{L^\infty (\Omega )}\le 1\), we have

$$\begin{aligned} u(y)-u(x)\le d_{CC}(x,y) \quad \forall x,y\in \Omega . \end{aligned}$$

Note that u is assumed to be continuous as in Remark 2.4.

To this end, given any \(x,y\in \Omega \), for any \( \epsilon >0\) there exists a curve \( {\gamma }_\epsilon \subset \mathcal {ACH}(0,1;x,y;\Omega )\) such that \( \ell _{d_{CC}}({\gamma }_\epsilon )\le (1+\epsilon )d_{CC}(x,y). \) We can find a domain \(U\Subset \Omega \) such that \({\gamma }_\epsilon \subset U\). It is standard that \(u*\eta _t\rightarrow u\) uniformly in \(\overline{U}\) and hence

$$\begin{aligned} u(y)-u(x) =\lim _{t\rightarrow 0}[u*\eta _t(y)-u*\eta _t(x)] . \end{aligned}$$

Next, by Proposition 2.6, for \(0<t<t_{\overline{U}}\) one has

$$\begin{aligned} |X(u*\eta _t)(z)| \le \Vert |Xu|\Vert _{L^\infty (\Omega )} +A_t u(z)\quad \forall z\in \overline{U} , \end{aligned}$$

and moreover, \(A_t u(z) \rightarrow 0\) uniformly in \(\overline{U} \) as \(t \rightarrow 0\). Obviously, we can find \(t_{\epsilon ,\overline{U}}<t_{\overline{U}}\) such that for any \(0<t<t_{\epsilon ,\overline{U}}\), we have \(A_t u(x)\le \epsilon \) and hence, by \(\Vert |Xu|\Vert _{L^\infty (\Omega )}\le 1\), \(|X(u*\eta _t)(z)| \le 1+\epsilon ,\) for all \(z\in \overline{U}\). Therefore

$$\begin{aligned}u*\eta _t(y)-u*\eta _t(x)&=\int _0^1 [(u*\eta _t)\circ {\gamma }_t]'(s)\,ds\\&= \int _0^1 X(u*\eta _t)({\gamma }_t(s))\cdot \dot{\gamma }_t(s)\,ds\\&\le (1+\epsilon )\ell _{d_{CC}}({\gamma }_\epsilon )\\&\le (1+\epsilon )(1+\epsilon )d_{CC}(x,y). \end{aligned}$$

Sending \(t\rightarrow 0\) and \(\epsilon \rightarrow 0\), one concludes \( u(y)-u(x)\le d_{CC}(x,y) \) as desired.\(\square \)

As a consequence of Rademacher type theorem (that is, Theorem 1.2), we have the following, which is an analogue of Lemma 6. Denote by \({\mathrm {\,Lip}}^*_{d_{CC}}(\Omega )\) the collection of all functions u in \(\Omega \)

with

$$\begin{aligned} {\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega ):=\sup _{x \in \Omega }{\mathrm {\,Lip}}_{d_{CC}} u(x)<\infty . \end{aligned}$$
(2.5)

Lemma 2.7

We have \( \dot{W}^{1,\infty }_X(\Omega )={\mathrm {\,Lip}}_{d_{CC}}(\Omega )={\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega )\) with

$$\begin{aligned} \Vert |X u|\Vert _{L^\infty (\Omega )} = {\mathrm {\,Lip}}_{d_{CC}}( u,\Omega )= {\mathrm {\,Lip}}^*_{d_{CC}}( u,\Omega ) \end{aligned}$$
(2.6)

Proof

First, we show \({\mathrm {\,Lip}}_{d_{CC}}(\Omega )= {\mathrm {\,Lip}}^*_{d_{CC}}(\Omega )\) and \({\mathrm {\,Lip}}_{d_{CC}}( u,\Omega )= {\mathrm {\,Lip}}^*_{d_{CC}}( u,\Omega )\). Notice that \({\mathrm {\,Lip}}_{d_{CC}}(u,\Omega )\subset {\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega )\) and \({\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega ) \le {\mathrm {\,Lip}}_{d_{CC}}(u,\Omega )\) are obvious. We prove

$$\begin{aligned} {\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega ) \subset {\mathrm {\,Lip}}_{d_{CC}}(u,\Omega )\hbox { and }{\mathrm {\,Lip}}_{d_{CC}}(u,\Omega ) \le {\mathrm {\,Lip}}_{d_{CC}}^*(u,\Omega ). \end{aligned}$$

Let \(u \in {\mathrm {\,Lip}}^*_{d_{CC}}(u,\Omega )\). Given any \(x,y\in \Omega \), and \({\gamma }\in \mathcal {ACH}(0,1;x,y;\Omega )\), parameterise \({\gamma }\) such that \(|\dot{\gamma }(t)| = \ell _{{d_{CC}}}({\gamma })\) for almost every \(t \in [0,1]\). Since

$$\begin{aligned} A_{x,y}:=\sup _{t\in [0,1]} {\mathrm {\,Lip}}u({\gamma }(t))<\infty , \end{aligned}$$

for each \(t\in [0,1]\) we can find \(r_t>0\) such that

$$\begin{aligned}{} & {} |u({\gamma }(s))-u({\gamma }(t))|\le A_{x,y}|{\gamma }(s)-{\gamma }(t)|=A_{x,y}\ell _{{d_{CC}}}({\gamma })|s-t|\\{} & {} \quad \hbox { whenever}\quad |s-t|\le r_t\hbox { and }s \in [0,1]. \end{aligned}$$

Since \([0,1]\subset \cup _{t\in [0,1]}(t-r_t,t+r_t)\), we can find an increasing sequence \(t_i\in [0,1]\) with \(t_0 = 0\) and \(t_N=1\) such that

$$\begin{aligned}{}[0,1]\subset \cup _{i=1}^N(t_i-\frac{1}{2}r_{t_i},t_i+\frac{1}{2} r_{t_i}). \end{aligned}$$

Write \(x_i={\gamma }(t_i)\) for \(i =0 , \cdots , N.\) We have

$$\begin{aligned}|u(x)-u(y)|&=|\sum _{i=0}^{N-1}[u(x_i)-u(x_{i+1})]|\\&\le \sum _{i=0}^{N-1}|u(x_i)-u(x_{i+1})| \\ {}&\le A_{x,y}\ell _{{d_{CC}}}({\gamma })\sum _{i=0}^{N-1}|t_i-t_{i+1}|\\ {}&=A_{x,y}\ell _{{d_{CC}}}({\gamma }). \end{aligned}$$

Noticing that \(A_{x,y} \le {\mathrm {\,Lip}}^*(u,\Omega ) < \infty \) for all \(x,y \in \Omega \), we deduce that

$$\begin{aligned} |u(y)-u(x)|\le {\mathrm {\,Lip}}_{d_{CC}}^*(u,\Omega )\ell _{d_{CC}}({\gamma }) \quad \forall x,y \in \Omega . \end{aligned}$$
(2.7)

For any \(\epsilon >0\), recalling the definition of \({d_{CC}}\) in (2.1), there exists \(\{{\gamma }_\epsilon \}_{\epsilon >0} \subset \mathcal {ACH}(0,1;x,y;\Omega )\) such that

$$\begin{aligned} \ell _{d_{CC}}({\gamma }_\epsilon )\le (1+\epsilon )d_{CC}(x,y) \quad \forall x,y \in \Omega . \end{aligned}$$
(2.8)

Combining (2.7) and (2.8), we have

$$\begin{aligned} \frac{|u(y)-u(x)|}{d_{CC}(x,y)} \le \lim _{\epsilon \rightarrow 0} \frac{|u(y)-u(x)|}{(1+\epsilon )d_{CC}(x,y)} \le {\mathrm {\,Lip}}_{d_{CC}}^*(u,\Omega ) \quad \forall x,y \in \Omega . \end{aligned}$$

Taking supremum among all \(x,y \in \Omega \) in the above inequality, we deduce that \(u \in {\mathrm {\,Lip}}_{d_{CC}}(u,\Omega )\) and \({\mathrm {\,Lip}}_{d_{CC}}(u,\Omega ) \le {\mathrm {\,Lip}}_{d_{CC}}^*(u,\Omega )\). Hence the second equality in (2.6) holds.

Next, we show \(\dot{W}^{1,\infty }_X(\Omega )={\mathrm {\,Lip}}_{d_{CC}}(\Omega )\) and \({\mathrm {\,Lip}}_{d_{CC}}(u,\Omega ) = \Vert | Xu| \Vert _{L^\infty (\Omega )}\). By Theorem 1.2, we know \({\mathrm {\,Lip}}_{{d_{CC}}}(\Omega ) \subset \dot{W}^{1,\infty }_X (\Omega )\) and \(\Vert | Xu| \Vert _{L^\infty (\Omega )} \le {\mathrm {\,Lip}}_{d_{CC}}(u,\Omega )\).

To see \(\dot{W}^{1,\infty }_X (\Omega ) \subset {\mathrm {\,Lip}}_{{d_{CC}}}(\Omega )\) and \({\mathrm {\,Lip}}_{d_{CC}}(u,\Omega ) \le \Vert | Xu| \Vert _{L^\infty (\Omega )}\), let \(u \in \dot{W}^{1,\infty }_X (\Omega )\). Then \(\Vert |Xu|\Vert _{L^\infty (\Omega )} =:\lambda < \infty .\) If \( \lambda >0\), then \(\lambda ^{-1}u \in \dot{W}^{1,\infty }_X (\Omega )\) and \(\Vert |X (\lambda ^{-1} u )|\Vert _{L^\infty (\Omega )} =1\). Hence \(\lambda ^{-1}u\) could be the test function in (2.2), which implies

$$\begin{aligned} \lambda ^{-1} u(y)- \lambda ^{-1}u(x) \le {d_{CC}}(x,y) \ \forall x,y \in \Omega , \end{aligned}$$

or equivalently,

$$\begin{aligned} \frac{|u(y)- u(x) |}{\Vert |Xu|\Vert _{L^\infty (\Omega )}} \le {d_{CC}}(x,y) \ \forall x,y \in \Omega . \end{aligned}$$

Therefore, \(u \in {\mathrm {\,Lip}}_{{d_{CC}}}(\Omega )\) and \( {\mathrm {\,Lip}}_{{d_{CC}}} (u,\Omega ) \le \Vert |Xu|\Vert _{L^\infty (\Omega )}\). If \(\lambda =0\), then similar as the above discussion, we have for any \(\lambda '>0\)

$$\begin{aligned} \frac{|u(y)- u(x) |}{\lambda '} \le {d_{CC}}(x,y) \ \forall x,y \in \Omega . \end{aligned}$$

Therefore, \(u \in {\mathrm {\,Lip}}_{{d_{CC}}}(\Omega )\) and \( {\mathrm {\,Lip}}_{{d_{CC}}} (u,\Omega ) \le \lambda '\) for any \(\lambda '>0\). Hence \( {\mathrm {\,Lip}}_{{d_{CC}}} (u,\Omega ) =0 = \Vert |Xu|\Vert _{L^\infty (\Omega )}\) and we complete the proof.\(\square \)

Next, we recall some concepts from metric geometry. First we recall the notion of pseudo-distance.

Definition 2.8

We say that \(\rho \) is a pseudo-distance in a set \(\Omega \subset {{{\mathbb R}}^n}\) if \(\rho \) is a function in \(\Omega \times \Omega \) such that

  1. (i)

    \(\rho (x,x)=0\) for all \(x \in \Omega \) and \(\rho (x,y) \ge 0\) for all \(x,y \in \Omega \);

  2. (ii)

    \(\rho (x,z) \le \rho (x,y) + \rho (y,z)\) for all \(x,y,z \in \Omega \).

We call \((\Omega ,\rho )\) as a pseudo-metric space. The topology induced by \(\{\rho (x, \cdot )\}_{x \in \Omega }\) (resp. \(\{\rho (\cdot , x)\}_{x \in \Omega }\)) is the weakest topology on \(\Omega \) such that \(\rho (x, \cdot )\) (resp. \(\rho (\cdot , x)\)) is continuous for all \(x \in \Omega \).

We remark that since the above pseudo-distance \(\rho \) may not have symmetry, the topology induced by \(\{\rho (x, \cdot )\}_{x \in \Omega }\) in \(\Omega \) may be different from that induced by \(\{\rho (\cdot , x)\}_{x \in \Omega }\).

Suppose that H(xp) is an Hamiltonian in \(\Omega \) satisfying assumptions (H0)-(H3). Let \(\{d_\lambda \}_{\lambda \ge 0}\) be defined as in (1.4). Thanks to the convention in Remark 2.4, one has

$$\begin{aligned} d _{\lambda } (x,y):= \sup \{u(y)-u(x) \ | \ u \in \dot{W}^{1,\infty }_{X }(\Omega ) \ \text{ with }\ \Vert H(\cdot , Xu)\Vert _{L^\infty (\Omega )} \le \lambda \}\quad \forall x,y \in \Omega . \end{aligned}$$
(2.9)

The following properties holds for \(d_\lambda \).

Lemma 2.9

The following holds.

  1. (i)

    For any \(\lambda \ge 0\), \(d_\lambda \) is a pseudo distance on \(\Omega \).

  2. (ii)

    For any \(\lambda \ge 0\),

    $$\begin{aligned} R'_\lambda {d_{CC}}(x,y) \le d_\lambda (x,y) \le R_\lambda {d_{CC}}(x,y)<\infty \quad \forall x,y\in \Omega . \end{aligned}$$
    (2.10)
  3. (iii)

    If \(H(x,p)=H(x,-p)\) for all \(p \in {\mathbb R}^m\) and almost all \(x \in \Omega \), then \(d_\lambda (x,y)=d_\lambda (y,x)\) for all \(x, y\in \Omega \).

Proof

To see Lemma 2.9 (i), by choosing constant functions as test functions in (2.9), one has \(\rho (x,y)\ge 0\) for all \(x,y\in \Omega \). Obviously, one has \(d_\lambda (x,x)=0\) for all \(x\in \Omega \). Besides,

$$\begin{aligned} d _{\lambda } (x,z)&= \sup \{u(z)-u(x) : u \in \dot{W}^{1,\infty }_{X }(\Omega ),\ \Vert H(\cdot , Xu)\Vert _{L^\infty (\Omega )} \le \lambda \} \\&\le \sup \{u(y)-u(x) : u \in \dot{W}^{1,\infty }_{X }(\Omega ),\ \Vert H(\cdot , Xu)\Vert _{L^\infty (\Omega )} \le \lambda \} \\&\quad + \sup \{u(z)-u(y) : u \in \dot{W}^{1,\infty }_{X }(\Omega ),\ \Vert H(\cdot , Xu)\Vert _{L^\infty (\Omega )} \le \lambda \} \\&= d _{\lambda } (x,y) + d _{\lambda } (y,z). \end{aligned}$$

By Definition 2.8, \(d_\lambda \) is a pseudo distance.

To see Lemma 2.9 (ii), by (H3), we have

$$\begin{aligned} \{u\in \dot{W}^{1,\infty }_{X }(\Omega ) \ | \ \Vert |Xu|\Vert _{L^\infty (\Omega )} \le R'_\lambda \}&\subset \{u\in \dot{W}^{1,\infty }_{X }(\Omega ) \ | \ \Vert H(x,Xu)\Vert _{L^\infty (\Omega )} \le \lambda \} \\&\subset \{u\in \dot{W}^{1,\infty }_{X }(\Omega ) \ | \ \Vert |Xu|\Vert _{L^\infty (\Omega )} \le R_\lambda \}. \end{aligned}$$

From this and the definitions of \({d_{CC}}\) in (2.2) and \(d_\lambda \) in (2.9), we deduce (2.10) as desired.

Finally we show Lemma 2.9 (iii), since \(H(x,p)=H(x,-p)\) for all \(p \in {\mathbb R}^m\) and almost all \(x \in \Omega \), then

$$\begin{aligned} \Vert H(x,Xu)\Vert _{L^\infty (\Omega )} = \Vert H(x,X(-u))\Vert _{L^\infty (\Omega )} \text{ for } \text{ all } \quad u \in \dot{W}^{1,\infty }_{X }(\Omega ) . \end{aligned}$$

Hence for any \(x, y\in \Omega \), u can be a test function for \(d_\lambda (x,y)\) in the right hand side of (2.9) if and only if \(-u\) can be a test function for \(d_\lambda (y,x)\) in the right hand side of (2.9). As a result, \(d_\lambda (x,y)=d_\lambda (y,x)\), which completes the proof. \(\square \)

As a consequence of Lemma 2.9, we obtain the following.

Corollary 2.10

For any \(\lambda > \lambda _H\), \(d_\lambda \) is comparable with \(d_{CC}\), that is ,

$$\begin{aligned} 0<R'_\lambda \le \frac{d_\lambda (x,y)}{{d_{CC}}(x,y)} \le R_\lambda <\infty \quad \forall x,y\in \Omega . \end{aligned}$$
(2.11)

Consequently, the topology induced by \(\{d_\lambda (x ,\cdot )\}_{x \in \Omega }\) and \(\{d_\lambda (\cdot ,x)\}_{x \in \Omega }\) coincides with the one induced by \({d_{CC}}\) in \(\Omega \), and hence, is the Euclidean topology.

Remark 2.11

(i) We remark that in Lemma 2.9 (iii), without the assumption \(H(x,p)=H(x,-p)\) for all \(p \in {\mathbb R}^m\) and almost all \(x \in \Omega \), \(d_\lambda \) may not be symmetric, that is, \(d_\lambda (x,y)=d_\lambda (y,x)\) may not hold for all \(x, y\in \Omega \).

(ii) If \(R'_\lambda =0\) for some \(\lambda >0\), then the topology induced by \(\{d_\lambda (x,\cdot )\}_{x \in \Omega }\) may be different from the Euclidean topology. To wit this, we construct an Hamiltonian H(p) in Euclidean disk \(\Omega =\{x\in {\mathbb R}^2||x|<1\}\) with \(X=\{\frac{\partial }{\partial x_1}, \frac{\partial }{\partial x_2} \}\), which satisfies (H0)-(H3) with \(\lambda _H>0\). Define \(H: \Omega \times {\mathbb R}^2 \rightarrow [0,\infty )\) by

$$\begin{aligned} H(p) = H(p_1,p_2) =\max \{ |p| ,2 \}\chi _{\{p \in {\mathbb R}^2 | p_1<0\}} + |p|\chi _{\{p \in {\mathbb R}^2 | p_1 \ge 0\}} \end{aligned}$$

where \(\chi _E\) is the characteristic function of the set E. One can check that H(p) satisfies (H0)-(H3). We omit the details.

Now we show

$$\begin{aligned} R_{1}' = \inf \{ |p| \ | \ H(p) \ge 1 \}=0 , \end{aligned}$$

and thus \(\lambda _H \ge 1 >0\). Indeed, for any \( p=(p_1,p_2)\) and \(p_1\ge 0\), one has \(H(p )=|p|\) and hence \(H(p)\ge 1\) implies \(|p|\ge 1\). On the other hand, for any \( p=(p_1,p_2)\) and \(p_1< 0\), we always have \(H(p)=\max \{|p|,2\}\ge 2\), and hence

$$\begin{aligned} R_{1}' = \inf \{ |p| | \ p=(p_1,p_2)\in {\mathbb R}^2 \ \text{ with } \quad |p|<1\hbox { and } p_1<0 \} =0. \end{aligned}$$

Writing \(e_1=(1,0)\), we claim that

$$\begin{aligned} d_1(x,x+ae_1) = 0 \quad \forall x, x+ae_1\in \Omega \ \text{ with }\ a\in (-1,0] . \end{aligned}$$
(2.12)

This claim implies that the topology induced by \(\{d_1(x,\cdot )\}_{x\in \Omega }\) is different with the Euclidean topology.

To see the claim (2.12), writing \(o=(0,0)\), we only need to show that

$$\begin{aligned} d_1(o,ae_1) = 0 \quad \forall a\in (-1,0). \end{aligned}$$
(2.13)

It then suffices to show that \( u(ae_1)- u(0) \le 0 \) for all \(u \in W^{1,\infty }(\Omega ) \text{ with } \Vert H(\nabla u)\Vert _{L^\infty (\Omega )} \le 1\). Given such a function u, observe that \( \Vert H(\nabla u)\Vert _{L^\infty (\Omega )} \le 1\) implies \(\frac{\partial u}{\partial x_1}(x) \ge 0 \) and \(|\nabla u(x)|\le 1\) for almost all \(x \in {\mathbb R}^2\). Let \(\{{\gamma }_\delta \}_{0\le \delta \ll 1}\) be the line segment joining \(\delta e_2\) and \(ae_1+\delta e_2\) with \(e_2=(0,1)\), that is,

$$\begin{aligned} {\gamma }_\delta (t) := t(a,\delta ) + (1-t)(0,\delta ) \quad \forall t \in [0,1]. \end{aligned}$$

Since \(u \in W^{1,\infty }(\Omega )\) implies that u is ACL (see [28, Section 6.1]), there exists \(\{\delta _n\}_{n \in {\mathbb N}}\) depending on u such that u is differentiable almost everywhere on \({\gamma }_{\delta _n}\). Noting that \( \dot{\gamma }_{\delta _n}(t) =-e_1 \) and by \(\frac{\partial u}{\partial x_1}(x) \ge 0 \), one has

$$\begin{aligned} \nabla u ({\gamma }_{\delta _n}(t)) \cdot \dot{\gamma }_{\delta _n}(t) = -\frac{\partial u}{\partial x_1}({\gamma }_{\delta _n}(t))\le 0 \quad \forall t \in [0,1], \end{aligned}$$

and hence

$$\begin{aligned} u((a,\delta _n)) - u((0,\delta _n))&= \int _0^1 \nabla u ({\gamma }_{\delta _n}(t)) \cdot \dot{\gamma }_{\delta _n}(t) \, dt = \int _0^1 -\partial _1 u({\gamma }_{\delta _n}(t)) \, dt \le 0. \end{aligned}$$

Thus

$$\begin{aligned} u(ae_1)- u(0)&= \lim _{n \rightarrow \infty } [u((a,\delta _n)) - u((0,\delta _n))] \le 0 \end{aligned}$$

as desired.

Finally, we introduce the pseudo-length property.

Definition 2.12

We say a pseudo-metric space \((\Omega ,\rho )\) is a pseudo-length space if for all \(x,y \in \Omega \),

$$\begin{aligned} \rho (x, y) := \inf \{\ell _{\rho } ({\gamma }) \ | \ {\gamma }\in \mathcal C(a, b; x, y; \Omega )\} \end{aligned}$$

where \( \mathcal C(a, b; x, y; \Omega )\) denotes the class of all continuous curves \({\gamma }:[a,b]\rightarrow {\Omega }\) with \({\gamma }(a)=x\) and \({\gamma }(b)=y\), and

$$\begin{aligned} \ell _{\rho } ({\gamma }):= \sup \bigg \{\sum _{i=0}^{N-1} \rho ({\gamma }(t_{i}), {\gamma }(t_{i+1}))\ \bigg | \ a=t_0< t_1< \cdots < t_N=b \bigg \}. \end{aligned}$$

3 Proof of Theorem 1.3

In this section, we always suppose that the Hamiltonian H(xp) enjoys assumptions (H0)-(H3). To prove Theorem 1.3, we first need several auxiliary lemmas.

Lemma 3.1

Suppose that \( \{u_j\}_{j\in {\mathbb N}}\subset \dot{W}^{1,\infty }_X(\Omega )\), and there exists \(\lambda \ge 0\) such that

$$\begin{aligned} \Vert H(x,Xu_j)\Vert _{L^\infty (\Omega )}\le \lambda \hbox { for all }j\in {\mathbb N}. \end{aligned}$$

If \(u_j\rightarrow u\) in \(C^0(\Omega )\), then \(u\in \dot{W}^{1,\infty }_X(\Omega )\) and \(\Vert H(x,Xu)\Vert _{L^\infty (\Omega )}\le \lambda \). Here and in below, for any open set \(V \subset \Omega \), \(u_j\rightarrow u\) in \(C^0(V)\) refers to for any \(K \Subset V\), \(u_j\rightarrow u\) in \(C^0(\overline{K})\).

Proof

By Lemma 2.7, one has

$$\begin{aligned} |u(x)-u(y)|=\lim _{j\rightarrow \infty }|u_j(x)-u_j(y)|\le \limsup _{j\rightarrow \infty } \Vert |Xu_j|\Vert _{L^\infty (\Omega )}d_{CC}(x,y). \end{aligned}$$

By (H3) and \(\Vert H(\cdot ,Xu_j)\Vert _{L^\infty (\Omega )}\le \lambda \), we have \(\Vert |Xu_j|\Vert _{L^\infty (\Omega )}\le R_\lambda \) for all j, and hence

$$\begin{aligned} |u(x)-u(y)| \le R_\lambda d_{CC}(x,y), \end{aligned}$$

that is, \( u\in {\mathrm {\,Lip}}_{d_{CC}}(\Omega )\). By Lemma 2.7 again, we have \(u\in {\dot{W}^{1,\infty }_X(\Omega )}\).

Next we show that \(\Vert H(x,Xu)\Vert _{L^\infty (\Omega )}\le \lambda \). It suffices to show that \(\Vert H(x,X(u|_U))\Vert _{L^\infty (U )}\le \lambda \) for any \(U\Subset \Omega \). Given any \(U\Subset \Omega \), we claim that \(X(u_j|_{ U })\) converges to \(X(u|_{ U })\) weakly in \(L^2( U ,{\mathbb R}^m)\), that is, for all \(1\le i\le m\), one has

$$\begin{aligned} \lim _{j \rightarrow \infty }\int _{ U }u_j X_i^*\phi \, dx =\int _{ U } \phi Xu \, dx\ \ \forall \phi \in L^2( U ). \end{aligned}$$

To see this claim, note that \(\Vert |Xu_j|\Vert _{L^\infty (\Omega )}\le R_\lambda \) for all \(j\in {\mathbb N}\), and hence \(\Vert |Xu_j|\Vert _{L^2( U )}\le R_\lambda {| U |^{1/2}}\) for all \(j\in {\mathbb N}\). In other words, for each \(k\in {\mathbb N}\), the set \(\{X(u_{j }|_{ U })\}_{j\in {\mathbb N}}\) is bounded in \(L^2( U ,{\mathbb R}^m)\). By the weak compactness of \(L^2( U ,{\mathbb R}^m)\), any subsequence of \(\{Xu_{j }\}_{j\in {\mathbb N}}\) admits a subsubsequence which converges weakly in \(L^2( U ,{\mathbb R}^m)\). Therefore, to get the above claim, by a contradiction argument we only need to show that for any subsequence \(\{Xu_{j_s}\}_{s\in {\mathbb N}}\) of \(\{Xu_{j }\}_{j\in {\mathbb N}}\), if \( Xu_{j_s} \rightharpoonup q_k\) weakly in \(L^2( U , {\mathbb R}^m )\) as \(s\rightarrow \infty \), then \(X(u|_{ U }) =q_k\). For such \(\{Xu_{j_s}\}_{s\in {\mathbb N}}\), recalling that \(u_j\rightarrow u\) in \(C^0(\Omega )\) as \(j\rightarrow \infty \), for all \(1\le i \le m\) one has

$$\begin{aligned} \int _{ U } u X_i^*\phi \, dx =\lim _{j \rightarrow \infty }\int _{ U }u_j X_i^*\phi \, dx =\lim _{s \rightarrow \infty }\int _{ U }u_{j_s} X_i^*\phi \, dx =\lim _{s \rightarrow \infty }\int _{ U }(X_i u_{j_s})\phi \, dx =\int _{ U }q_k\phi \, dx \end{aligned}$$

for any \(\phi \in C^\infty _c( U )\). This implies that \(Xu|_{ U } =q_k\) as desired.

By Mazur’s Theorem, for any \(l>0\), we can find a finite convex combination \(w_l\) of \(\{X(u_j|_{ U })\}_{j=1}^{\infty }\) so that \(\Vert w_l-X(u|_{U})\Vert _{L^2( U )}\rightarrow 0 \) as \(l\rightarrow \infty \). Here \(w_l\) is a finite convex combination of \(\{X(u_j|_{ U })\}_{j=1}^{\infty }\) if there exist \(\{\eta _{j}\}_{j=1}^{k_l}\) for some \(k_l\) such that

$$\begin{aligned} \sum _{i=1}^{k_l}\eta _i=1\ \text{ and }\ w_l=\sum _{j=1}^{k_l}X(u_j|_{ U }) \end{aligned}$$

By the quasi-convexity of \(H(x,\cdot )\) as in (H1), we have

$$\begin{aligned} H(x,w_l)=H(x,\sum _{j=1}^{k_l}\eta _j X(u_j|_{ U }))\le \sup _{1\le j\le k_l}H(x, X(u_j|_{ U }))\le \lambda \quad \text{ for } \text{ almost } \text{ all } x\in U . \end{aligned}$$

Up to considering subsequence we may assume that \(w_l\rightarrow X(u|_{ U })\) almost everywhere in U. By the lower-semicontinuity of \(H(x,\cdot )\) as in (H0), we conclude that

$$\begin{aligned} H(x,X(u|_{ U }))\le {\liminf }_{l\rightarrow \infty }H(x,w_l)\le \lambda \quad \text{ for } \text{ almost } \text{ all } x\in U . \end{aligned}$$

The proof is complete. \(\square \)

Lemma 3.2

If \(v \in \dot{W}^{1,\infty }_{X }(\Omega )\), then

$$\begin{aligned} v^+=\max \{v,0\}\in \dot{W}^{1,\infty }_{X }(\Omega )\quad \hbox {and} \quad Xv^+=(Xv)\chi _{\{x\in \Omega , v>0\}} \quad \hbox {almost everywhere.} \end{aligned}$$
(3.1)

Consequently, let \(\{v_i\}_{1\le i\le j} \subset \dot{W}^{1,\infty }_{X }(\Omega )\) for some \(j\in {\mathbb N}\). If \( u=\max _{1\le i \le j}\{v_i\}\) or \( u=\min _{1\le i \le j}\{v_i\}\), then

$$\begin{aligned} u\in \dot{W}^{1,\infty }_{X }(\Omega )\hbox { and }\Vert H(x,Xu )\Vert _{L^\infty (\Omega )} \le \max _{1\le i\le j}\{\Vert H(x,Xv_i)\Vert _{L^\infty (\Omega )} \}.\end{aligned}$$
(3.2)

Proof

First we prove (3.1). Let \(v \in \dot{W}^{1,\infty }_{X }(\Omega )\). By Lemma 2.7, \(v \in {\mathrm {\,Lip}}_{{d_{CC}}}(\Omega )\). Observe that

$$\begin{aligned} |v^+(x)-v^+(y)| \le |v(x)-v(y)| \le {\mathrm {\,Lip}}_{{d_{CC}}}(v,\Omega ) {d_{CC}}(x,y) \quad \forall x,y \in \Omega , \end{aligned}$$

that is, \(v^+\in {\mathrm {\,Lip}}_{{d_{CC}}}(\Omega )\). By Lemma 2.7 again, \(v^+ \in \dot{W}^{1,\infty }_{X }(\Omega )\). To get \(Xv^+=(Xv)\chi _{\{x\in \Omega , v>0\}}\) almost everywhere, it suffices to consider the restriction \(v|_U\) of v in any bounded domain \(U \Subset \Omega \), that is, to prove \(X(v|_U)^+=(Xv|_U)\chi _{\{x\in U, v>0\}}\) almost everywhere. But this always holds thanks to Lemma 2.2 and the fact \(v|_U \in \dot{W}^{1,p}_{X}(U)\) for any \(1 \le p < \infty \).

Next we prove (3.2). If \(u =\max \{v_1,v_2\}\), where \(v_i \in \dot{W}^{1,\infty }_{X }(\Omega )\) for \(i=1,2\), then \(u =v_2+(v_1-v_2)^+.\) By (3.1), \(u \in \dot{W}^{1,\infty }_{X }(\Omega )\) and

$$\begin{aligned} Xu&=Xv_2+X(v_1-v_2)^+ \\&=Xv_2+[(X(v_1-v_2)]\chi _{\{x\in \Omega , v_1>v_2\}}\\&=(Xv_2)\chi _{\{x\in \Omega , v_1\le v_2\}}+ (Xv_1 ) \chi _{\{x\in \Omega , v_1>v_2\}}. \end{aligned}$$

Thus

$$\begin{aligned} H(x,Xu(x))= H(x, Xv_2)\chi _{\{x\in \Omega , v_1\le v_2\}}+ H(x, Xv_1 ) \chi _{\{x\in \Omega , v_1>v_2\}} \quad \text{ for } \text{ almost } \text{ all }\quad x\in \Omega . \end{aligned}$$

A similar argument holds for \(u=\min \{v_1,v_2\}\). This gives (3.2) when \(j=2\). By an induction argument, we get (3.2) for all \(j\ge 2\). \(\square \)

Lemma 3.3

For any \( \lambda \ge 0\) and \(x \in \Omega \), we have \( d_\lambda (x, \cdot ), d_\lambda (\cdot ,x)\in \dot{W}^{1,\infty }_{X }(\Omega )\) and

$$\begin{aligned} \Vert H(\cdot ,Xd_\lambda (x, \cdot ))\Vert _{L^\infty (\Omega )} \le \lambda \quad \text{ and }\quad \Vert H(\cdot ,-Xd_\lambda (\cdot ,x))\Vert _{L^\infty (\Omega )} \le \lambda . \end{aligned}$$

Proof

Given any \(x\in \Omega \) and \(\lambda \ge 0\), write \(v(z)=d_\lambda (x,z)\) for all \(z\in \Omega \). To see \(H(\cdot ,Xv)\le \lambda \) almost everywhere, by Lemma 3.1, it suffices to find a sequence of function \(u_j\in { \dot{W}_X^{1,\infty }(\Omega )}\) so that \(H(\cdot ,Xu_j)\le \lambda \) almost everywhere and \(u_j\rightarrow v\) in \(C^0(\Omega )\) as \(j\rightarrow \infty \).

To this end, let \(\{K_j\}_{j \in {\mathbb N}}\) be a sequence of compact subsets in \(\Omega \) with

$$\begin{aligned} \Omega = \bigcup _{j \in {\mathbb N}} K_j\quad \hbox {and} \quad K_j \subset K_{j+1}^{\circ }. \end{aligned}$$

For \(j \in {\mathbb N}\) and \(y \in K_j\), by definition of \(d_\lambda \) we can find a function \(v_{y,j} \in \dot{W}^{1,\infty }_X(\Omega )\) such that \(H(\cdot ,Xv_{y,j})\le \lambda \) almost everywhere,

$$\begin{aligned} d_\lambda (x,y)-\frac{1}{2j}\le v_{y,j}(y) -v_{y,j}(x). \end{aligned}$$

Since Lemma 2.9 implies that \(d_\lambda (x, \cdot )\) is continuous, there exists an open neighbourhood \(N_{y,j}\) of y with

$$\begin{aligned} d_\lambda (x, z) - \frac{1}{j} \le v_{y,j}(z)-v_{y,j}(x), \quad \forall z\in N_{y,j}. \end{aligned}$$

Thanks to the compactness of \(K_j\), there exist \(y_1, \cdots , y_l\in K_j\) such that \(K_j \subset \bigcup _{i=1}^{l} N_{y_i,j}\). Write

$$\begin{aligned} u_j(z) := \max \{v_{y_i,j}(z)-v_{y_i,j}(x) : i = 1, \cdots , l\}\quad \forall z\in K_j. \end{aligned}$$

Then \(u_j(x)=0\), and

$$\begin{aligned} d_\lambda (x,z) \le u_j(z)+ \frac{1}{j} \ \text {for all} \ z\in K_j. \end{aligned}$$

Moreover by Lemma 3.2 we have

$$\begin{aligned} H(\cdot ,Xu_j)\le \lambda \quad \text{ in }\ \Omega . \end{aligned}$$

Since

$$\begin{aligned} d_\lambda (x,z) \ge u_j(z) \ \text {for all} \ z\in K_j \end{aligned}$$

is clear, we conclude that \(u_j\rightarrow {v} \) in \(C^0(K_i)\) as \(j\rightarrow \infty \) for all i, and hence \(u_j\rightarrow {v} \) uniformly in any compact subset of \(\Omega \) as \(j\rightarrow \infty \).

Similarly, we can show \(\Vert H(x,-Xd_\lambda (\cdot , x ))\Vert _{L^\infty (\Omega )} \le \lambda \) which finishes the proof.\(\square \)

In general, for any \(E \subset \Omega \), we define

$$\begin{aligned} d_{\lambda ,E}(z) := \inf _{x \in E} \{d_\lambda (x,z)\}. \end{aligned}$$

Lemma 3.4

For any set \(E\subset \Omega \), we have \(d_{\lambda ,E} \in \dot{W}^{1,\infty }_{X }(\Omega )\) and \(\Vert H(x,Xd_{\lambda ,E} )\Vert _{L^\infty (\Omega )}\le \lambda \).

Proof

Let \(\{K_j\}_{j \in {\mathbb N}}\) be a sequence of compact subsets in \(\Omega \) with \(\Omega = \bigcup _{j \in {\mathbb N}} K_j\) and \(K_j \subset K_{j+1}^{\circ }\). For each j and \(y\in K_j\), we can find \(z_{y,j}\in E\) such that

$$\begin{aligned} d_{\lambda ,E}(y)\le d_{\lambda ,z_{y,j}}(y)\le d_{\lambda ,E}(y)+1/2j. \end{aligned}$$

Thus there exists a neighborhood N(y) of y such that

$$\begin{aligned} d_{\lambda ,E}(y)\le d_{\lambda ,z_{y,j}}(y)\le d_{\lambda ,E}(z)+1/ j\quad \forall z\in N(y). \end{aligned}$$

So we can find \(\{y_1,\cdots , y_{l_j}\}\) such that \(K_j=\cup _{i=1}^{l_j}N(y_i) \) for all \(i=1,\cdots l_j\). Write

$$\begin{aligned}{} & {} u_j(z)={\min _{i=1,\cdots l_j}}\{d_{\lambda ,z_{y_i,j}}(z)\} \quad \forall z\in K_j.\\{} & {} d_{\lambda ,E}\le u_j(z)\le d_{\lambda ,E}+1/j\quad \text{ in }\ K_j . \end{aligned}$$

This means that \(u_j\rightarrow d_{\lambda ,E}\) in \(C^0(\Omega )\) as \(j\rightarrow \infty \). Note that

$$\begin{aligned} \Vert H(\cdot , Xu_j )\Vert _{L^\infty (\Omega )}\le \lambda . \end{aligned}$$

By Lemma 3.1 we have \(d_{\lambda ,E}\in \dot{W}^{1,\infty }_X(\Omega )\) and \(\Vert H(\cdot , Xd_{\lambda ,E})\Vert _{L^\infty (\Omega )}\le \lambda \) as desired. \(\square \)

We are able to prove (i)\(\Rightarrow \)(ii)\(\Rightarrow \)(iii)\(\Rightarrow \)(i) in Theorem 1.3 as below.

Proof

(Proofs of (i)\(\Rightarrow \)(ii)\(\Rightarrow \)(iii)\(\Rightarrow \)(i) in Theorem 1.3) The definition of \(d_\lambda \) directly gives (i)\(\Rightarrow \)(ii). Obviously, (ii)\(\Rightarrow \)(iii). Below we prove (iii)\(\Rightarrow \) (i). Recall that (iii) says that \(u(y)-u(z)\le d_\lambda (z,y)\) for all \(x \in \Omega \) and \(y,z \in N(x)\), where \(N(x)\subset \Omega \) is a neighbourhood of x. To get (i), since \(\Omega =\cup _{x\in \Omega }N(x)\), it suffices to show that for all \(x\in \Omega \), one has \(u\in W_{X}^{1,\infty }(N(x))\) and \(\Vert H(\cdot ,Xu)\Vert _{L^\infty (N(x))}\le \lambda \).

Fix any x, and write \( U=N(x)\). Without loss of generality we assume that U is bounded.

Notice that \(u\in L^\infty (U)\). Let \(M\in {\mathbb N}\) so that \(M\ge \sup _{U} |u|\). For each \(k \in {\mathbb N}\) and \(l \in \{ -Mk, \cdots , Mk\}\), set

$$\begin{aligned} u_{k,l}(z) := l/k + {d_{\lambda ,F_{k,l}} (z)}\quad \forall z\in U \end{aligned}$$

where

$$\begin{aligned} F_{k, l} := \{ y \in U \ | \ u(y) \le \frac{l}{k} \}. \end{aligned}$$

By Lemma 3.4, one has

$$\begin{aligned} \Vert H(\cdot ,{Xu_{k,l}})\Vert _{L^\infty (U)}\le \lambda . \end{aligned}$$

Set

$$\begin{aligned} u_k (z):= \min _{l \in \{ -Mk, \cdots , Mk\}}u_{k,l}(z)\quad \forall z\in U. \end{aligned}$$

To get \(u\in \dot{W}_{X}^{1,\infty }(U)\ \text {and} \ \Vert H(\cdot ,Xu)\Vert _{L^\infty (U)}\le \lambda \), thanks to Lemma 3.1 with \(\Omega =U\), we only need to show \(u_k \rightarrow u\) in \(C^0(U)\) as \(k\rightarrow \infty \).

To see \(u_k \rightarrow u\) in \(C^0(U)\) as \(k\rightarrow \infty \), note that, for any \(k \in {\mathbb N}\), \(-M\le u \le M\) in U implies \(-Mk\le ku \le Mk\) in U. Thus, at any \(z \in U\), we can find \(j\in {\mathbb N}\) with \(-k\le j\le k\), which depends on z, such that \(Mj\le ku(z)\le M(j+1)\). Letting \(l=Mj\), we have \( \frac{l}{k}\le u(z)\le \frac{l+M}{k}\). We claim that \(u_k(z) \in [u(z),\frac{l+M}{k}]\). Obviously, this claim gives

$$\begin{aligned} |u(z)-u_k(z)| \le \frac{M}{k}\quad \forall z\in U, \end{aligned}$$

and hence, the desired convergence \(u_k \rightarrow u\) in \(C^0(U)\) as \(k\rightarrow \infty \).

Below we prove the above claim \(u_k(z) \in [u(z),\frac{l+M}{k}]\). Recall that \(u(z)\in [\frac{l}{k},\frac{l+M}{k}]\) for some \(l =Mj\) with \(-k\le j\le k\).

First, we prove \(u_k(z) \le \frac{l+M}{k}\). If \(l+M > Mk\), then \(M < (l+M)/k\). Since

$$\begin{aligned} F_{k, Mk} = \{ y \in U \ | \ u(y) \le M \}=U, \end{aligned}$$

we have \(d_{\lambda ,F_{k,Mk}} (z)=0\) and hence,

$$\begin{aligned} u_{k,Mk}(z)=M+d_{\lambda ,F_{k,Mk}} (z)=M < \frac{l+M}{k}. \end{aligned}$$

Therefore,

$$\begin{aligned} u_k (z) \le u_{k,Mk}(z) < \frac{l+M}{k}. \end{aligned}$$
(3.3)

If \(l+M\le Mk\), then \(u(z)\in [\frac{l}{k},\frac{l+M}{k}]\) implies \(z \in F_{k,l+M}\) and hence \(d_\lambda (z,F_{k,l+M})=0\). Thus

$$\begin{aligned} u_k(z) \le u_{k,l+M}(z)=\frac{l+M}{k}+d_\lambda (z,F_{k,l+M}) =\frac{l+M}{k}. \end{aligned}$$
(3.4)

Combining (3.4) and (3.3), we have \( u_k(z) \le \frac{l+M}{k} \) as desired.

Next, we prove \(u(z)\le u_k(z)\). For any \(-k\le j\le k\) with \(Mj\le l\), since \(u(z) \ge \frac{l}{k} \ge \frac{Mj}{k}\), we can find \(w \in \partial F_{k,Mj}\) such that \(d_{\lambda ,F_{k,Mj}}(z)=d_\lambda (w,z)\). Since \(w \in \partial F_{k,Mj}\), we deduce that \(u(w)=\frac{Mj}{k}\) and

$$\begin{aligned} u_{k,Mj}(z)=\frac{Mj}{k}+d_{\lambda ,F_{k,Mj}}(z)=u(w)+d_\lambda (w,z). \end{aligned}$$
(3.5)

Note that \(w \in \overline{U}\), hence there exists a sequence \(\{w_s\}_{s \in {\mathbb N}}\subset U\) such that \(w_s\rightarrow w\) as \(s\rightarrow \infty \).

Thus by the assumption (iii),

$$\begin{aligned} u(z)-u(w) =\lim _{s\rightarrow \infty } [u(z)-u(w_s)] \le \lim _{s\rightarrow \infty }d_\lambda (w_s,z) \end{aligned}$$

By the triangle inequality and \(d_\lambda (w_s,w)\le R_\lambda d_{CC}(w_s,w)\) given in Lemma 2.9, we then obtain

$$\begin{aligned} u(z)-u(w) \le \lim _{s\rightarrow \infty }[d_\lambda (w_s,w)+ d_\lambda (w,z)]=d_\lambda (w,z). \end{aligned}$$
(3.6)

Combining (3.5) and (3.6), we have

$$\begin{aligned} u(z)\le u(w)+ d_\lambda (w,z) = u_{k,Mj}(z). \end{aligned}$$
(3.7)

On the other hand, for any \(-k\le j\le k\) with \(Mj>l\), we have

$$\begin{aligned} u_{k,Mj}(z)\ge \frac{ Mj}{k}\ge \frac{M(l+1)}{k}>u(z). \end{aligned}$$

From this and (3.7), it follows that

$$\begin{aligned} u_k(z)= \min _{j\in \{ - k, ... , l/M\}}u_{k,Mj}(z) \ge u(z) \end{aligned}$$

as desired. \(\square \)

4 Proof of Theorem 1.4

In this section, we always suppose that the Hamiltonian H(xp) enjoys assumptions (H0)-(H3).

To prove Theorem 1.4, we need to show that \((\Omega ,d_\lambda )\) is a pseudo-length space for all \(\lambda \ge \lambda _H\) in the sense of Definition 2.12. In other words, define

$$\begin{aligned} \rho _\lambda (x, y) := \inf \{\ell _{d_\lambda } ({\gamma }) \ | \ {\gamma }\in \mathcal C(a, b; x, y; \Omega )\}, \end{aligned}$$

where we recall the pseudo-length \(\ell _{d_\lambda }({\gamma })\) induced by \(d_\lambda \) defined in Definition 2.12 and \(\lambda _H\) in (1.7). We have the following.

Proposition 4.1

For any \(\lambda \ge \lambda _H\), we have \(d _\lambda =\rho _\lambda \).

To prove Proposition 4.1, we need the following approximation midpoint property of \(d_\lambda \).

Proposition 4.2

For any \(\lambda \ge 0\), we have

$$\begin{aligned} \inf _{z\in \Omega }\max \{d_\lambda (x,z),d_\lambda (z,y)\} \le \frac{1}{2}d_\lambda (x,y) \quad \text{ for } \text{ all }\quad x,y \in \Omega . \end{aligned}$$
(4.1)

Proof

We prove by contradiction. Suppose that (4.1) were not true. There exists \(x_0,y_0\in \Omega \) such that

$$\begin{aligned} \inf _{z\in \Omega }\max \{d_\lambda (x_0,z),d_\lambda (z,y_0)\} \ge \frac{1}{2}d_\lambda (x_0,y_0)+\epsilon _0:=r_0 \end{aligned}$$
(4.2)

for some \(\epsilon _0>0\).

Given any \(\delta \in (0,\epsilon _0)\), define \(f(z):=f_1(z)+f_2(z)\) with

$$\begin{aligned} f_1(z) := \min \{d_\lambda (x_0, z)-(r_0 - \delta ), 0\},\ f_2(z):= \max \{(r_0 - \delta ) - d_\lambda (z, y_0), 0\}\quad \forall z\in \Omega . \end{aligned}$$

We claim that f satisfies Theorem 1.3(iii), that is, for any \(z\in \Omega \), there is an open neighborhood N(z) such that

$$\begin{aligned} f(y)-f(w)\le d_\lambda (w,y)\quad \forall w,y\in N(z).\end{aligned}$$
(4.3)

Assume the claim (4.3) holds for the moment. Since we have already shown the equivalence between (ii) and (iii) in Theorem 1.3, we know that f satisfies Theorem 1.3(ii), that is,

$$\begin{aligned} f(y)-f(w)\le d_\lambda (w,y)\quad \forall w,y\in \Omega . \end{aligned}$$

In particular,

$$\begin{aligned} f(y_0)-f(x_0)\le d_\lambda (x_0, y_0). \end{aligned}$$
(4.4)

On the other hand, we have \(f_1(x_0)=-(r_0-\delta )\) and \(f_2(y_0)=r_0-\delta \). Since (4.2) implies

$$\begin{aligned} d_\lambda (x_0,y_0)=\max \{d_\lambda (x_0,x_0),d_\lambda (x_0,y_0)\} \ge \frac{1}{2}d_\lambda (x_0,y_0)+\epsilon _0 =r_0 \end{aligned}$$

and \(f_2(x_0)=0\) and \(f_1(y_0)=0\). Therefore,

$$\begin{aligned} f(y_0) - f(x_0) = f_2(y_0)-f_1(x_0)= 2r_0 - 2\delta = d_\lambda (x_0,y_0)+2\epsilon _0 - 2\delta , \end{aligned}$$

By \(\delta <\epsilon _0\), one has

$$\begin{aligned} f(y_0) - f(x_0) >d_\lambda (x_0,y_0), \end{aligned}$$

which contradicts to (4.4).

Finally we prove the above claim (4.3). Firstly, thanks to Lemma 3.2 and 3.3, \(H(x,Xf_1)\le \lambda \) and \(H(x,Xf_2)\le \lambda \) almost everywhere in \( \Omega \), and hence, by the definition of \(d_\lambda \),

$$\begin{aligned} f_1(y)-f_1(w)\le d_\lambda (w,y)\ \text{ and }\ f_2(y)-f_2(w)\le d_\lambda (w,y) \quad \forall w,y\in \Omega . \end{aligned}$$

Next, set

$$\begin{aligned} \Lambda _1:=\{z\in \Omega \ | \ d_\lambda (x_0,z)<r_0\},\Lambda _2:=\{z\in \Omega \ | \ d_\lambda (z,y_0)<r_0 \}. \end{aligned}$$

and

$$\begin{aligned} \Lambda _3:=\{z\in \Omega \ | \ d_\lambda (x_0,z)> r_0-\delta \ \text{ and } \ d_\lambda (z,y_0)> r_0-\delta \} \end{aligned}$$

For any \(z \in \Lambda _1\), that is, \(d_\lambda (x_0,z)<r_0\), (4.2) implies \(d_\lambda (z,y_0) \ge r_0\). Consequently,

$$\begin{aligned} f_2(z)=\max \{(r_0 - \delta ) - d_\lambda (z, y_0), 0\}= 0 \end{aligned}$$

and hence, \(f(z)=f_1(z).\) Consequently,

$$\begin{aligned} f(w)-f(y)=f_1(w)-f_1(y) \le d_\lambda (y,w)\quad \forall w,y\in \Lambda _1. \end{aligned}$$
(4.5)

Similarly, for any \(z \in \Lambda _2\), that is, \(d_\lambda (z,y_0)<r_0\), (4.2) implies \(d_\lambda (x_0,z) \ge r_0\). Consequently,

$$\begin{aligned} f_1(z)=\min \{d_\lambda (x_0, z)-(r_0 - \delta ), 0\}= 0 \end{aligned}$$

and hence, \( f(z)= f_2(z).\) Consequently,

$$\begin{aligned} f(w)-f(y)=f_2(w)-f_2(y) \le d_\lambda (y,w)\quad \forall w,y\in \Lambda _2. \end{aligned}$$
(4.6)

For any \(z\in \Lambda _3\), that is, \(d_\lambda (x_0,z)> r_0-\delta \) and \( d_\lambda (z,y_0)> r_0-\delta \), we have \(f_1(z)=0=f_2(z)\) and hence \(f(z) =0.\) Consequently

$$\begin{aligned} f(w)-f(y)=0\le d_\lambda (y,w)\quad \forall w,y\in \Lambda _3. \end{aligned}$$
(4.7)

Noticing that \(\{\Lambda _i\}_{i=1,2,3}\) forms an open cover of \(\Omega \), for any \(z \in \Omega \), we choose

$$\begin{aligned} N(z)= \left\{ \begin{array}{ll} \Lambda _1 &{} \quad \text {if } z \in \Lambda _1, \\ \Lambda _2 &{} \quad \text {if } z \in \Lambda _2\setminus \Lambda _1, \\ \Lambda _3 &{} \quad \text {if } z\in \Omega \setminus (\Lambda _1\cup \Lambda _2). \end{array} \right. \end{aligned}$$
(4.8)

From (4.5), (4.6) and (4.7), we obtain (4.3) as desired with the choice of N(z) in (4.8). The proof is complete. \(\square \)

Lemma 4.3

Given any \(x,y\in \Omega \), the map \(\lambda \in [\lambda _H ,\infty )\mapsto d_\lambda (x,y)\in [0,\infty )\) is nondecreasing and right continuous.

Proof

The fact that \(d_\lambda (x,y)\) is non-decreasing with respect to \(\lambda \) is obvious for any \(x,y \in \Omega \) from the definition of \(d_\lambda \). Given any \(x,y \in \Omega \), we show the right-continuity the map \(\lambda \in [\lambda _H ,\infty )\mapsto d_\lambda (x,y)\in [0,\infty )\). We argue by contradiction. Assume there exists \(\lambda _0 \ge \lambda _H\) and \(x,y \in \Omega \) such that

$$\begin{aligned} \liminf _{\lambda \rightarrow \lambda _0+}d_\lambda (x,y)=\lim _{\lambda \rightarrow \lambda _0+}d_\lambda (x,y) =c > d_{\lambda _0}(x,y) . \end{aligned}$$
(4.9)

Let \(w_\lambda (\cdot ):= d_\lambda (x,\cdot )\). By Lemma 3.3, we know \(\Vert H(\cdot ,Xw_\lambda )\Vert _{L^\infty (\Omega )}\le \lambda \). Since \(\{w_\lambda \}_{\lambda >\lambda _0}\) is a non-decreasing sequence with respect to \(\lambda \), \(\{w_\lambda \}\) converges pointwise to a function w as \(\lambda \rightarrow \lambda _0+\) and for any set \(V \Subset \Omega \) and \(x,y \in \overline{V}\), we have \(w_\lambda \rightarrow w\) in \(C^0(\overline{V})\). Then applying Lemma 3.1, we have

$$\begin{aligned} \Vert H(\cdot ,Xw)\Vert _{L^\infty (\overline{V})}\le \lambda \end{aligned}$$

for any \(\lambda >\lambda _0\), which implies

$$\begin{aligned} \Vert H(\cdot ,Xw)\Vert _{L^\infty (\overline{V})}\le \lambda _0. \end{aligned}$$
(4.10)

By the definition of w, we have

$$\begin{aligned} w(x)=\lim _{\lambda \rightarrow \lambda _0+}d_\lambda (x,x)=0, \text { and } w(y)= \lim _{\lambda \rightarrow \lambda _0+}d_\lambda (x,y)=c \end{aligned}$$
(4.11)

Combining (4.10) and (4.11) and applying Theorem 1.3, we have

$$\begin{aligned} c - 0 =w(y) -w(x) \le d_{\lambda _0}(x,y), \end{aligned}$$

which contradicts to (4.9). The proof is complete. \(\square \)

We are in the position to show

Proof of Proposition 4.1

We consider the cases \(\lambda >\lambda _H\) and \(\lambda =\lambda _H\) separately.

Case 1. \(\lambda >\lambda _H\). First, \(d_\lambda \le \rho _\lambda \) follows from the triangle inequality for \(d_\lambda \).

To see \(\rho _\lambda \le d_\lambda \), it suffices to prove that for any \(z\in \Omega \), the function \(\rho _\lambda (z,\cdot ):\Omega \rightarrow {\mathbb R}\) satisfies Theorem 1.3(iii), that is, for any \( x\in \Omega \) we can find a neighborhood N(x) of x such that

$$\begin{aligned} \rho _\lambda (z,y) -\rho _\lambda (z,w) \le d_\lambda (w,y)\quad \forall w,y \in N(x). \end{aligned}$$
(4.12)

Indeed, since we have already shown the equivalence of (i) and (iii) in Theorem 1.3, (4.12) implies that \(\rho _\lambda (z,\cdot )\) satisfies Theorem 1.3(i), that is, \(\rho _\lambda (z,\cdot )\in \dot{W}^{1,\infty }_X(\Omega )\) and \(\Vert H(\cdot ,X\rho _\lambda (z,\cdot ))\Vert _{L^\infty (\Omega )}\le \lambda \). Taking \(\rho _\lambda (z,\cdot )\) as the test function in the definition of \(d_\lambda (z,x)\), one has

$$\begin{aligned} \rho _\lambda (z,x) \le d_\lambda (z,x)\quad \forall x\in \Omega \end{aligned}$$

as desired.

To prove (4.12), let \(z\in \Omega \) be fixed. For any \(x\in \Omega \) and any \(t>0\), write

$$\begin{aligned} B_{d_\lambda }^+(x, t) := \{ y \in \Omega \ | \ d_\lambda (x,y)< t \text{ or } d_\lambda (y,x) < t \} \end{aligned}$$

and

$$\begin{aligned} B_{d_\lambda }^-(x, t) := \{ y \in \Omega \ | \ d_\lambda (x,y)< t \text{ and } d_\lambda (y,x) < t \} . \end{aligned}$$

For any \(x\in \Omega \), letting \(r_x = \min \{\frac{R_\lambda '}{10} {d_{CC}}(x, \partial \Omega ),1\}\), by Corollary 2.10, we have

$$\begin{aligned} B_{d_\lambda }^{+}(x, 6r_x) \subset B_{d_{CC}}(x, \frac{6r_x}{R_\lambda '} ) \Subset \Omega , \end{aligned}$$
(4.13)

where \(R_\lambda '>0\) thanks to (H3). Write \(N(x)= B_{d_\lambda }^-(x, {r_x})\). Given any \(w, y \in N(x)\), it then suffices to prove \(\rho _\lambda (z,y) -\rho _\lambda (z,w)\le d_\lambda (w, y ) \). To this end, for any \(0< \epsilon < \frac{1}{2} d_\lambda (w, y)\), we will construct a curve

$$\begin{aligned} {\gamma }_\epsilon :[0,1]\rightarrow B_{d_\lambda }^+(x,6r_x) \ \text{ with } {\gamma }_\epsilon (0)=w, {\gamma }_\epsilon (1)=y\hbox { and }\ell _{d_\lambda } ({\gamma }_\epsilon )\le d_\lambda (w, y)+\epsilon . \end{aligned}$$
(4.14)

Assume the existence of \({\gamma }_\epsilon \) for the moment. By the triangle inequality for \(\rho _\lambda \), we have

$$\begin{aligned} \rho _\lambda (z,y) -\rho _\lambda (z,w)\le \ell _{d_\lambda }({\gamma }_\epsilon ) \le d_\lambda (w, y )+\epsilon \end{aligned}$$

By sending \(\epsilon \rightarrow 0\), this yields \(\rho _\lambda (z,y) -\rho _\lambda (z,w)\le d_\lambda (w, y ) \) as desired.

Construction of a curve \({\gamma }_\epsilon \) satisfying (4.14). For each \(t \in {\mathbb N}\), set

$$\begin{aligned} D_t:= \{k2^{-t} \ | \ k \in {\mathbb N}, \ 0\le k\le 2^t\}. \end{aligned}$$

We will use induction and Proposition 4.2 to construct a set

$$\begin{aligned} Y_t =\{y_s\}_{s \in D_t} \subset B_{d_\lambda }^+(x,5r_x ) \end{aligned}$$
(4.15)

with \(y_0=w\) and \(y_1=y\) so that \(Y_t \subset Y_{t+1}\) , and that

$$\begin{aligned} d_\lambda (y_{j2^{-t}},y_{(j+1)2^{-t}})\le 2^{-t}(d_\lambda (w, y )+\epsilon ) \text{ for } \text{ any } 0\le j\le 2^t-1. \end{aligned}$$
(4.16)

The construction of \(\{Y_t\}_{t\in {\mathbb N}}\) is postponed to the end of this proof. Assuming that \(\{Y_t\}_{t\in {\mathbb N}}\) are constructed, we are able to construct \({\gamma }_\epsilon \) as below.

Firstly, set \(D:=\cup _{t\in {\mathbb N}} D_t\) and \(Y:=\cup _{t\in {\mathbb N}} Y_t\). Given any \(s_1, s_2 \in D\) with \(s_1 <s_2\), there exists \(t \in {\mathbb N}\) such that \(s_1=l2^{-t} \in D_{t}\), \(s_2=k2^{-t} \in D_{t}\) for some \(l < k\) and hence \(y_{s_1},y_{s_2} \in Y_t\). Using (4.16) and the triangle inequality for \(d_\lambda \), we have

$$\begin{aligned} d_\lambda (y_{s_1},y_{s_2})\le \sum _{j=l}^{k-1} d_\lambda (y_{j2^{-t}}, y_{(j+1)2^{-t}}) \le |k-j| 2^{-t}( d_\lambda (w,y) + \epsilon )= |s_1-s_2|(d_\lambda (w,y) +\epsilon ). \end{aligned}$$
(4.17)

Next, define a map \({\gamma }_\epsilon ^0 : D \rightarrow Y\) by \({\gamma }_\epsilon ^0(s) = y_s\) for all \(s \in D\). The above inequality (4.17) implies that

$$\begin{aligned} \lim _{D \ni s' \rightarrow s}{\gamma }_\epsilon ^0(s') = {\gamma }_\epsilon ^0(s) \text{ for } \text{ all } s \in D. \end{aligned}$$

Since D is dense in [0, 1] and \(\overline{B_{d_\lambda }^+(y_0, {5r_x})}\) is complete, it is standard to extend \({\gamma }_\epsilon ^0\) uniquely to a continuous map \({\gamma }_\epsilon : [0, 1] \rightarrow B_{d_\lambda }^+(y_0, {6r_x})\), that is, \({\gamma }_\epsilon (s)={\gamma }_\epsilon ^0(s)\) for any \(s\in D\) and

$$\begin{aligned} {\gamma }_\epsilon (s)=\lim _{D \ni s'\rightarrow s}{\gamma }_\epsilon (s')=\lim _{D \ni s'\rightarrow s}y_{s'} \text{ for } \text{ any } \quad s\in [0,1]\setminus D. \end{aligned}$$

Recalling (4.17), one therefore has

$$\begin{aligned} d_\lambda ({\gamma }_\epsilon (s_1),{\gamma }_\epsilon (s_2))\le |s_1-s_2|(d_\lambda (x,y)+\epsilon )\quad \forall s_1,s_2\in [0,1],\ s_1\le s_2, \end{aligned}$$

which gives \(\ell _{d_\lambda } ({\gamma }_\epsilon )\le \delta +\epsilon \). Thus the curve \({\gamma }_\epsilon \) satisfies (4.14) as desired.

Construction of \(\{Y_t\}_{t\in {\mathbb N}}\) via induction and Proposition 4.2. Since \(y,w \in B_{d_\lambda }^-(x,r_x)\), we have \(d_\lambda (w,x)<r_x\) and \( d_\lambda (x,y) < r_x\), which implies

$$\begin{aligned} \delta := d_\lambda (w,y) \le d_\lambda (w,x)+d_\lambda (x,y) <2r_x. \end{aligned}$$

We construct \(Y_1=\{y_0,y_{1/2},y_1\}\) which satisfies (4.16) with \(t=1\) and

$$\begin{aligned} Y_1 \subset B_{d_\lambda }^+(x,3r_x)\subset B_{d_\lambda }^+(x,5r_x). \end{aligned}$$
(4.18)

We set \(y_0=w\) and \(y_1=y\). Noting that Proposition 4.2 gives

$$\begin{aligned} \inf _{z\in \Omega }\max \{d_\lambda (y_0,z),d_\lambda (z,y_1)\} \le \frac{1}{2}d_\lambda (y_0,y_1) \end{aligned}$$

we choose \(y_{1/2}\in \Omega \) so that

$$\begin{aligned} \max \{d_\lambda (y_0,y_{1/2}),d_\lambda (y_{1/2},y_1) \}\le \frac{1}{2}\delta +\frac{1}{4}\epsilon . \end{aligned}$$
(4.19)

Obviously, (4.19) gives (4.16). To see (4.18), obviously,

$$\begin{aligned} y_0,y_1 \in B_{d_\lambda }^-(x,r_x) \subset B_{d_\lambda }^+(x,3r_x). \end{aligned}$$

Moreover, noting that \(0<\epsilon<\frac{1}{2}\delta <r_x\) implies

$$\begin{aligned} \frac{1}{2}\delta +\frac{1}{4}\epsilon< \delta <2r_x \end{aligned}$$

and that \( y\in B_{d_\lambda }^-(x,r_x)\) implies \(d_\lambda (y,x)\le r_x\), we have

$$\begin{aligned} d_\lambda (y_{1/2},x) \le d_\lambda (y_{1/2},y_1)+d_\lambda (y_1,x) \le \frac{1}{2}\delta +\frac{1}{4}\epsilon + d_\lambda (y,x) \le 3r_x, \end{aligned}$$

which gives \(y_{1/2} \in B_{d_\lambda }^+(x,3r_x).\)

In general, by induction given any \(t\ge 2\), assume that \(Y_{t-1}=\{y_s\}_{s\in D_{t-1}}\) is constructed so that

$$\begin{aligned} Y_{t-1}\subset B_{d_\lambda }^+(x,(3+\sum _{l=1}^{t-2}2^{-l})r_x+\epsilon \sum _{l=1}^{t-1}2^{-l}) \end{aligned}$$
(4.20)

and that

$$\begin{aligned} d_\lambda (y_{j2^{-(t-1)}}, y_{(j+1)2^{-(t-1)}}) \le 2^{-(t-1)}\bigg (\delta + \epsilon \sum _{l=1}^{t-1}2^{-l} \bigg ) \text{ for } \text{ any } \quad 0 \le j \le 2^{t-1}-1. \end{aligned}$$
(4.21)

Here and in what follows, we make the convention that \(\sum _{l=1}^{t-2}2^{-l} =0\) if \(t=2\). Since

$$\begin{aligned} (3+\sum _{l=1}^\infty 2^{-l})r_x+\epsilon \sum _{l=1}^\infty 2^{-l}\le 4r_x+\epsilon <4r_x+\delta \le 5r_x, \end{aligned}$$
(4.22)

the inclusion (4.20) implies \(Y_{t-1}\subset B_{d_\lambda }^+(x,5r_x)\) and hence (4.15).

Below, we construct \(Y_t=\{y_s\}_{s\in D_t}\) satisfying (4.16) and

$$\begin{aligned} Y_{t}\subset B_{d_\lambda }^+(x,(3+\sum _{l=1}^{t-1}2^{-l})r_x+\epsilon \sum _{l=1}^{t}2^{-l}), \end{aligned}$$
(4.23)

Note that (4.22) and (4.23) imply \(Y_{t}\subset B_{d_\lambda }^+(x,5r_x)\) and hence (4.15).

We define \(Y_t=\{y_s\}_{s\in D_t}\) first. Since \(D_{t-1}\subsetneqq D_{t}\), for \(s \in D_{t-1}\), \(y_s \in Y_{t-1}\) is defined. It is left to define \(y_s\) for \(s\in D_t \setminus D_{t-1}\). Given any \(s\in D_t\setminus D_{t-1}\), we know that \(s=j2^{-t}\in D_t \setminus D_{t-1}\) for some odd j with \(1\le j\le 2^t-1\). Write \(s'=(j-1)2^{-t} \) and \(s''=(j+1)2^{-t} \). Then \(s',s''\in D_{t-1}\) and hence \(y_{s'}\in Y_{t-1}\) and \(y_{s''}\in Y_{t-1}\) are defined. Since Proposition 4.2 gives

$$\begin{aligned} \inf _{z\in \Omega } \max \{d_\lambda (y_{s'},z),d_\lambda (z,y_{s''}) \}\le \frac{1}{2}d_\lambda (y_{s'},y_{s''}) \end{aligned}$$
(4.24)

we choose \(y_s\in \Omega \) such that

$$\begin{aligned} \max \{d_\lambda (y_{s'},y_{s}),d_\lambda (y_{s},y_{s''}) \}\le \frac{1}{2}d_\lambda (y_{s'},y_{s''})+2^{-2t}\epsilon . \end{aligned}$$
(4.25)

Note that (4.25) and (4.21) gives (4.16) directly. Indeed, for any \(0 \le j \le 2^t-1\), if j is odd, applying (4.25) with \(s=j2^{-t}\), \( s'=(j-1)2^{-t}\) and \(s''=(j+1)2^{-t}\), we deduce that

$$\begin{aligned} d_\lambda (y_{j2^{-t}}, y_{(j+1)2^{-t}})=d_\lambda (y_{s},y_{s''})\le \frac{1}{2}d_\lambda (y_{s'},y_{s''})+2^{-2t}\epsilon . \end{aligned}$$

Since \(s',s''\in D_{t-1}\) and \(s''=s'+2^{-(t-1)}\), applying (4.21) to \(y_{s'},y_{s''}\) we have

$$\begin{aligned} d_\lambda (y_{j2^{-t}}, y_{(j+1)2^{-t}})&\le \frac{1}{2} 2^{-(t-1)}\bigg (\delta + \epsilon \sum _{l=1}^{t-1}2^{-l} \bigg )+ 2^{-t}2^{-t}\epsilon = 2^{-t}\bigg (\delta + \epsilon \sum _{l=1}^{t}2^{-l} \bigg ). \end{aligned}$$
(4.26)

If j is even, then \(j\le 2^t-2\). Applying (4.25) with \(s=(j+1)2^{-t}\), \( s'=j2^{-t}\) and \(s''=(j+2)2^{-t}\), we deduce that

$$\begin{aligned} d_\lambda (y_{j2^{-t}}, y_{(j+1)2^{-t}})=d_\lambda (y_{s'},y_{s})\le \frac{1}{2}d_\lambda (y_{s'},y_{s''})+2^{-2t}\epsilon . \end{aligned}$$

Similarly, we also have (4.26).

To see (4.23), since (4.20) gives

$$\begin{aligned} Y_{t-1}\subset B_{d_\lambda }^+(x,(3+\sum _{l=1}^{t-2}2^{-l})r_x+\epsilon \sum _{l=1}^{t-1}2^{-l}) \subset B_{d_\lambda }^+(x,(3+\sum _{l=1}^{t-1}2^{-l})r_x+\epsilon \sum _{l=1}^{t }2^{-l}), \end{aligned}$$
(4.27)

it suffices to check

$$\begin{aligned} Y_{t} \setminus Y_{t-1}=\{y_{j2^{-t}} \ | 1\le j\le 2^t-1,\\ j \text{ is } \text{ odd } \} \subset B_{d_\lambda }^+(x,(3+\sum _{l=1}^{t-1}2^{-l})r_x+\epsilon \sum _{l=1}^{t}2^{-l}). \end{aligned}$$

For any odd number j with \(1 \le j \le 2^t-1\), since \(y_{(j-1)2^{-t}} \in Y_{t-1}\), combining (4.26) and (4.27) and noting \(\epsilon<\delta <2r_x\), we obtain

$$\begin{aligned} d_\lambda (y_{j2^{-t}},x)&\le d_\lambda (y_{j2^{-t}},y_{(j-1)2^{-t}}) + d_\lambda (y_{(j-1)2^{-t}},x) \\&\le 2^{-t}\bigg (2r_x + \epsilon \sum _{l=1}^{t}2^{-l} \bigg )+ \bigg (3+\sum _{l=1}^{t-2}2^{-l} \bigg )r_x+\epsilon \sum _{l=1}^{t-1}2^{-l} \\&\le \bigg (3+\sum _{l=1}^{t-1}2^{-l} \bigg )r_x + \epsilon \sum _{l=1}^{t}2^{-l} \end{aligned}$$

which implies (4.23). We finish the proof of Case 1.

Case 2. \(\lambda =\lambda _H\). Fix \(x,y \in \Omega \). For any \(\epsilon >0\) sufficiently small, by the right continuity of the map \(\lambda \mapsto d_\lambda (x,y)\) at \(\lambda =\lambda _H\) from Lemma 4.3, there exists \(\mu >\lambda _H\) such that

$$\begin{aligned} d_\mu (x,y) < d_{\lambda _H}(x,y) +\frac{\epsilon }{2}. \end{aligned}$$
(4.28)

By Case (i), there exists \({\gamma }:[0,1] \rightarrow \Omega \) joining x and y such that

$$\begin{aligned} \ell _{d_\mu }({\gamma }) < d_\mu (x,y) +\frac{\epsilon }{2}. \end{aligned}$$
(4.29)

By the definition of the pseudo-length and recalling from Lemma 4.3 that the map \(\lambda \mapsto d_\lambda (z,w)\) is non-decreasing for all \(z,w \in \Omega \), we have

$$\begin{aligned} \ell _{d_{\lambda _H}}({\gamma }) \le \ell _{d_\mu }({\gamma }). \end{aligned}$$
(4.30)

Combining (4.28), (4.29) and (4.30), we conclude

$$\begin{aligned} \ell _{d_{\lambda _H}}({\gamma }) < d_{\lambda _H}(x,y) + \epsilon . \end{aligned}$$

The proof is complete.\(\square \)

We are ready to prove Theorem 1.4.

Proof of Theorem 1.4

Obviously, (iii) in Theorem 1.3\(\Rightarrow \) (iv) in Theorem 1.4. To see the converse, let \(\lambda \ge 0\) be as in (iv). Given any x and \(y,z \in N(x)\), where N(x) is given in (iv) we need to show

$$\begin{aligned} u(y)-u(z)\le d_\lambda (z,y). \end{aligned}$$

By Proposition 4.1, we know \((\Omega ,d_\lambda )\) is a pseudo-length space. Hence for any \(\epsilon >0\), there exists a curve \({\gamma }_\epsilon : [0,1] \rightarrow \Omega \) joining z and y such that

$$\begin{aligned} \ell _{d_\lambda }({\gamma }_\epsilon ) \le d_\lambda (z,y) +\epsilon . \end{aligned}$$
(4.31)

Since \({\gamma }_\epsilon \subset \Omega \) is compact, we can find a finite set \(\{t_i\}_{i=0}^n \subset [0,1]\) satisfying

$$\begin{aligned} t_0=0, \ t_n=1, \ \text {and } {\gamma }_\epsilon (t_{i+1}) \in N({\gamma }_\epsilon (t_i)), \ i=0,\cdots , n-1 \end{aligned}$$

where \(N({\gamma }_\epsilon (t_i))\) is the neighbourhood of \({\gamma }_\epsilon (t_i)\) in (iv). Hence by (iv) we have

$$\begin{aligned} u({\gamma }_\epsilon (w_{i+1})) - u({\gamma }_\epsilon (w_i)) \le d_\lambda ({\gamma }_\epsilon (w_{i}),{\gamma }_\epsilon (w_{i+1})), \ i=0, \cdots i-1. \end{aligned}$$

Summing the above inequalities from 0 to \(n-1\), we have

$$\begin{aligned} u(y) - u(z)&= u({\gamma }_\epsilon (w_n)) - u({\gamma }_\epsilon (w_0)) \le \sum _{i=0}^{n-1}d_\lambda ({\gamma }_\epsilon (w_{i}),{\gamma }(w_{i+1})) \le \sum _{i=0}^{n-1} \ell _{d_\lambda }({\gamma }_\epsilon | _{[w_i,w_{i+1}]}) \\&= \ell _{d_\lambda }({\gamma }_\epsilon ) \le d_\lambda (y,z) +\epsilon \end{aligned}$$

where in the last inequality we applied (4.31). Letting \(\epsilon \rightarrow 0\) in the above inequality, we obtain (iii) in Theorem 1.3.

Finally, (1.8) is a direct consequence of (iv)\(\Leftrightarrow \)(i) and thanks to Lemma 4.3, the minimum in (1.8) is achieved.\(\square \)

Remark 4.4

The assumption \(R_\lambda '>0\) is needed in the proof of Proposition 4.1. Indeed, recall the construction of \({\gamma }_\epsilon \) in the proof of Proposition 4.1 below (4.17). To guarantee \({\gamma }_\epsilon \) is a continuous map, especially \({\gamma }_\epsilon ([0,1])\) is compact under the topology induced by \({d_{CC}}\), we need \(\{d_\lambda (x,\cdot )\}_{x \in \Omega }\) induces the same topology as the one by \({d_{CC}}\). By Corollary 2.10, \(R_\lambda '>0\) can guarantee this.

Moreover, to show \({\gamma }_\epsilon \Subset \Omega \) in (4.13) in the proof of Proposition 4.1, for each \(x \in \Omega \), we need the existence of \(r_x>0\), such that

$$\begin{aligned} B^+_{d_\lambda }(x,r_x) \Subset \Omega . \end{aligned}$$
(4.32)

Again, by Corollary 2.10, \(R_\lambda '>0\) can guarantee this. If \(R_\lambda '>0\) does not hold for some \(\lambda >0\), in Remark 2.11 (ii), the example shows that (4.32) may fail for some \(x \in \Omega \).

5 McShane extensions and minimizers

In this section, we always suppose that the Hamiltonian H(xp) enjoys assumptions (H0)-(H3) and further that \(\lambda _H=0\).

Let \(U\Subset \Omega \) be any domain. Note that the restriction of \(d_\lambda \) in U may not have the pseudo-length property in U, and moreover, Theorem 1.3 with \(\Omega \) replaced by U may not hold for the restriction of \(d_\lambda \) in U. Thus instead of \(d_\lambda \), below we use intrinsic pseudo metrics \(\{d^U_\lambda \}_{\lambda > 0}\) in U, which are defined via (1.4) with \( \Omega \) replaced by U, that is,

$$\begin{aligned} d^{U} _{\lambda } (x,y):= \sup \{u(y)-u(x) : u \in \dot{W}^{1,\infty }_{X }(U),\ \Vert H(\cdot , Xu)\Vert _{L^\infty (U)} \le \lambda \}\quad \forall x,y \in U \text{ and } \lambda \ge 0. \end{aligned}$$
(5.1)

Obviously we have proved the following.

Corollary 5.1

Theorem 1.3, Theorem 1.4 and Proposition 4.1 hold with \(\Omega \) replaced by U and \(d_\lambda \) replaced by \(d_\lambda ^U\). In particular, \(d_\lambda ^U\) has the pseudo-length property in U for all \(\lambda \ge 0\).

Observe that, apriori, \(d^U_\lambda \) is only defined in U but not in \(\overline{U}\). Naturally, we extend \(d^U_\lambda :U\times U\rightarrow [0,\infty )\) as a function \(\widetilde{d}^U_\lambda : \overline{U}\times \overline{U}\rightarrow [0,\infty ]\) by

$$\begin{aligned} \widetilde{d}_\lambda ^U(x,y)=\lim _{r\rightarrow 0}\inf \{d_\lambda ^U(z,w) \ | \ (z,w)\in U\times U, |(z,w)-(x,y)|\le r\}. \end{aligned}$$

Obviously, \(\widetilde{d}^U_\lambda (x,y)=d^U_\lambda (x,y)\) for all \((x,y)\in U\times U\), and \(\widetilde{d}_\lambda ^U\) is lower semicontinuous in \(\overline{U}\times \overline{U}\), that is, for any \(a\in {\mathbb R}\), the set

$$\begin{aligned} \{(x,y)\in \overline{U}\times \overline{U} \ | \ \widetilde{d}^U_\lambda (x,y)>a\} \end{aligned}$$

is open in \(\overline{U}\). One may also note that it may happen that \(d^{U}_\lambda (x,y)=+\infty \) for some \((x,y)\notin U\times U\). Below, for the sake of simplicity, we write \(\widetilde{d}_\lambda ^U\) as \(d_\lambda ^U\). We define \(d_{CC}^U\) by letting \(H(x,p)=|p|\) in U and \(\lambda =1\) in (5.1).

The following property will be used later.

Lemma 5.2

Let \(U \Subset \Omega \) be a subdomain and \(\lambda \ge 0\).

  1. (i)

    For any \(x,y\in \overline{U}\), we have \(d^{U}_\lambda (x,y) \ge d_\lambda (x,y)\ge R'_\lambda d_{CC}(x,y)\).

  2. (ii)

    For any \(x\in U\) and \(y \in U\) with \({d_{CC}}(x,y) < {d_{CC}}(x,\partial {U})\), we have \( d^{U}_\lambda (x, y)\le R_\lambda d_{CC}(x,y). \)

  3. (iii)

    For any \(x\in U\), let \(x^*\in \partial U\) be the point such that \( d_{CC}(x,x^*)=d_{CC}(x,\partial U)\). Then

    $$\begin{aligned} d_\lambda ^U (x,x^*)\le R_\lambda d_{CC}(x,x^*)<\infty . \end{aligned}$$
  4. (iv)

    For any \(x\in \overline{U}\) and \( y \in U\) we have

    $$\begin{aligned} d^{U}_\lambda (x, z) \le d^{U}_\lambda (x,y) + d^{U}_\lambda (y,z) \text{ and } d^U_\lambda (z,x) \le d^U_\lambda (z, y)+ d^U_\lambda (y,x) \quad \forall z\in \partial U. \end{aligned}$$
  5. (v)

    Given any \(z\in \partial U\), if \(d^{U}_\lambda (x,z)= \infty \) for some \(x\in \overline{U}\), then \(d^{U}_\lambda (y,z)=+\infty \) for any \(y \in \overline{U}\).

  6. (vi)

    Given any \(x,y\in \overline{U}\times \overline{U}\) the map \(\lambda \in [0,\infty )\mapsto d_\lambda ^U(x,y)\in [0,\infty ]\) is nondecreasing and for \({ 0<\lambda<\mu <\infty }\),

    $$\begin{aligned} d^U_\lambda (x,y)<\infty \text { if and only if } d^U_\mu (x,y)<\infty . \end{aligned}$$

    As a consequence,

    $$\begin{aligned} \overline{U}^*:=\{y\in \overline{U} \ | \ d_{\lambda }^U(x,y)<\infty \quad \text{ for } \text{ some } x\in U \text{ and } \lambda >0 \} \end{aligned}$$

    is well-defined independent of the choice of \(\lambda >0\).

  7. (vii)

    Given any \(x,y\in \overline{U}^*\times \overline{U}^*\), the map \(\lambda \in { [0 ,\infty )}\mapsto d_\lambda ^U(x,y)\in [0,\infty ]\) is right continuous.

Proof

To see (i), for any \(x,y\in U\), since the restriction \(u|_U\) is a test function in the definition of \(d^{U}_\lambda (x,y)\) whenever u is a test function in the definition of \(d_\lambda (x,y)\), we have \(d^U_\lambda (x,y)\ge d_\lambda (x,y)\). In general, given any \((x,y)\in (\overline{U}\times \overline{U})\setminus (U\times U)\), for any \(r>0\) sufficiently small, we have \(d^U_\lambda (z,w)\ge d_\lambda (z,w)\) whenever \(z,w\in U\) and \(|(z,w)-(x,y)|\le r\). By the continuity of \(d_\lambda \) in \(\Omega \times \Omega \), we have

$$\begin{aligned} \lim _{r\rightarrow 0}\inf \{d^U_\lambda (z,w) \ | \ z,w\in U \text{ and } |(z,w)-(x,y)|\le r\}\ge d_\lambda (x,y), \end{aligned}$$

that is, \( d_\lambda ^U(x,y)\ge d_\lambda (x,y)\). Recall that \(d_\lambda (x,y)\ge R'd_{CC}(x,y)\) comes from Lemma 2.1.

To see (ii), given any \(y\in U\) with \({d_{CC}}(x,y)<{d_{CC}}(x,\partial {U})\), there is a geodesic \({\gamma }\) with respect to \({d_{CC}}\) connecting x and y so that \({\gamma }\subset B_{d_{CC}}(x,d_{CC}(x,\partial U))\). For any function \(u\in \dot{W}^{1,\infty }_{X }(U)\) with \(\Vert H(\cdot ,Xu)\Vert _{L^\infty (U)}\le \lambda \), we know that \(\Vert Xu\Vert _{L^\infty (U)}\le R_\lambda \). Let \(U' \Subset U\) and \(x,y \in U'\). Thanks to Proposition 2.6, we can find a sequence \(\{u_k\}_{k\in {\mathbb N}} \subset C^\infty (U')\) such that \(u_k\rightarrow u\) everywhere as \(k\rightarrow \infty \) and \(\Vert Xu_k\Vert _{L^\infty (U')}\le R_\lambda + A_k(u)\) with \(\lim _{k \rightarrow \infty } A_k(u) \rightarrow 0\). Since

$$\begin{aligned}{} & {} u_k(y)-u_k(x)= \int _{\gamma }Xu_k\cdot \dot{\gamma }\le \int _{\gamma }|Xu_k||\dot{\gamma }| \le \int _{\gamma }{(R_\lambda +A_k(u))}|\dot{\gamma }| \\{} & {} \quad = {(R_\lambda +A_k(u))} {d_{CC}}(x,y) \text{ for } \text{ all } k \in {\mathbb N}, \end{aligned}$$

we have

$$\begin{aligned} u(y)-u(x) =\lim _{k \rightarrow \infty }\{u_k(y)-u_k(x)\}\le \lim _{k \rightarrow \infty } [R_\lambda +A_k(u)] {d_{CC}}(x,y) = R_\lambda {d_{CC}}(x,y). \end{aligned}$$

Taking supremum in the above inequality over all such u, we have \(d^U_\lambda (x,y)\le R_\lambda {d_{CC}}(x,y)\).

To see (iii), given any \(x\in U\), there exists \(x^*\in \partial U\) such that \( d_{CC}(x,x^*)=d_{CC}(x,\partial U)\). By (ii) and the definition of \(d^U_\lambda (x,x^*)\), we know that \(d_\lambda ^U (x,x^*)\le R_\lambda d_{CC}(x,x^*)<\infty \).

To get (iv), for any \( x\in \overline{U}\), \(y\in U\) and \(z\in \partial U\), choose \(x_k,z_k\in U\) such that \(d^{U}_\lambda (x_k,y)\rightarrow d^{U}_\lambda (x,y)\) and \(d^{U}_\lambda (y,z_k)\rightarrow d^{U}_\lambda (y,z)\) as \(k\rightarrow \infty \). Since

$$\begin{aligned} d^{U}_\lambda (x_k, z_k) \le d^{U}_\lambda (x_k,y) + d^{U}_\lambda (y,z_k), \end{aligned}$$

letting \(k\rightarrow \infty \) and by the lower-semicontinuous of \(d^U_\lambda \) we get

$$\begin{aligned} d^{U}_\lambda (x, z ) \le d^{U}_\lambda (x,y) + d^{U}_\lambda (y,z ) \end{aligned}$$

In a similar way, we also have

$$\begin{aligned} d^U_\lambda (z,x) \le d^U_\lambda (z, y)+ d^U_\lambda (y,x) \end{aligned}$$

Note that (v) is a direct consequence of (iv).

We show (vi). The fact that \(d_\lambda ^U(x,y)\) is non-decreasing with respect to \(\lambda \) is obvious for any \(x,y \in \overline{U}\). Assume \(0< \lambda<\mu <\infty \). Then \(d^U_\mu (x,y)<+\infty \) implies \(d^U_\lambda (x,y)<+\infty \). Conversely, if \(d_{\mu }^U(x,y)=+\infty \), we show \(d_\lambda ^U(x,y)=+\infty \). This may happen if at least one of x and y lie in \(\partial {U}\). Then for any \(\{x_k\}_{k\in {\mathbb N}} \subset U\) and \(\{y_k\}_{k\in {\mathbb N}}\subset U\) converging to x and y, it holds

$$\begin{aligned} \liminf _{k \rightarrow \infty }d_{\mu }^U(x_k,y_k) = +\infty \end{aligned}$$

where we let \(x_k \equiv x\) (resp. \(y_k \equiv y\)) if \(x \in U\) (resp. \(y\in U\)). By (i) and (ii), we have for any \(\lambda \le \mu \)

$$\begin{aligned} \liminf _{k \rightarrow \infty } d_{\lambda }^U(x_k,y_k) \ge R'_\lambda \liminf _{k \rightarrow \infty } d_{CC} (x_k,y_k) \ge \frac{R'_\lambda }{R_{\mu }} \liminf _{k \rightarrow \infty } d_{\mu }^U(x_k,y_k) = +\infty \end{aligned}$$

where we recall that \(R'_\lambda >0\) for all \(\lambda >0\).

Finally, we show (vii). Since we only consider \(x,y \in \overline{U}^*\), by an approximation argument, it is enough to show the right-continuity for \(x,y \in U\). The proof is similar to the one of Lemma 4.3. We omit the details. The proof of Lemma 5.2 is complete.\(\square \)

Lemma 5.3

Suppose that \( U \Subset \Omega \) and that V is a subdomain of U. For any \(\lambda \ge 0\), one has

$$\begin{aligned} d^U_\lambda (x,y)\le d^V_\lambda (x,y)\quad \forall x,y\in \overline{V}. \end{aligned}$$

Conversely, given any \(\lambda >0\) and \(x \in V\), there exists a neighborhood \(N _\lambda (x) \Subset V\) of x such that

$$\begin{aligned} d^U_\lambda ( x,y) = d^V_\lambda (x,y) \text{ and } d^U_\lambda (y,x) = d^V_\lambda (y,x)\quad \text{ for } \text{ any }\quad y \in N_\lambda (x). \end{aligned}$$

Proof

For any \(u \in \dot{W}^{1,\infty }_{X }(U)\) with \(\Vert H(\cdot , Xu)\Vert _{L^\infty (U)} \le \lambda \), we know that the restriction \(u|_{V} \in \dot{W}^{1,\infty }_{X }(V)\) with \(\Vert H(\cdot , Xu|_V)\Vert _{L^\infty (V)} \le \lambda \). Hence by the definition of \(d^U_\lambda \) and \(d^V_\lambda \), \( d^U_\lambda (x,y) \le d^V_\lambda (x,y) \) for all \( x,y \in V \) and then for all \( x,y \in \overline{V}.\)

Conversely, we just show \(d^U_\lambda (x,\cdot ) = d^V_\lambda (x,\cdot )\) in some neighborhood N(x). In a similar way, we can prove \(d^U_\lambda (\cdot , x) = d^V_\lambda (\cdot ,x)\) in some neighborhood N(x).

By Lemma 5.2 (i), one has \(d_\lambda ^V (x,y) \ge R'_\lambda d_{CC} (x,y) \) for any \(x,y\in V\). Thus for any \(r>0\), \(d^V_\lambda (x,y)\le r\) implies \( d_{CC} (x,y)\le r/R'_\lambda \). Given any \(x\in V\) and \(0<r<{d_{CC}}(x,\partial V)/R'_\lambda \), we therefore have

$$\begin{aligned} N _r(x):=\{y\in V \ | \ d^V_\lambda (x,y)\le r\}\subset B_{d_{CC}}(x,r/R'_\lambda )\Subset V. \end{aligned}$$

Define \(u_{x,r}: \Omega \rightarrow {\mathbb R}\) by

$$\begin{aligned} u_{x,r}(z):=\min \{d^V_\lambda (x,z),r\}\quad \forall z\in \Omega . \end{aligned}$$

If \( r< {d_{CC}}(x,\partial V)R'_\lambda /4\), we claim that

$$\begin{aligned} u_{x,r}\in {\mathrm {\,Lip}}_{d_{CC}}(\Omega )\quad \text{ with }\quad H(z,Xu_{x,r}(z))\le \lambda \quad \text{ for } \text{ almost } \text{ all }\quad z\in \Omega . \end{aligned}$$
(5.2)

Assume claim (5.2) holds for the moment. By (5.2), we are able to take \(u_{x,r}|_{U}\) as a test function in \(d^U_\lambda \) so that

$$\begin{aligned} u_{x,r} (z)-u_{x,r} (w)\le d^U_\lambda (w,z)\quad \forall (w,z)\in U\times U. \end{aligned}$$

On the other hand, for any \(y\in N_r(x)\), since \(d^V _\lambda (x,y)= u_{x,r}(y)-u_{x,r}(x)\), we get \(d^V _\lambda (x,y)\le d^U_\lambda (x,y)\) as desired.

Finally, we prove the claim (5.2).

Proof of the claim (5.2). First, by Lemma 3.3 and Lemma 3.4, the restriction \(u_{x,r}|_V\) of \(u_{x,r}\) in V belongs to \(\dot{W}^{1,\infty }_X(V)\) with \(H(z,X u_{x,r}|_V(z))\le \lambda \) almost everywhere in V, and hence

$$\begin{aligned} u_{x,r}|_V(z)-u_{x,r}|_V(w)\le d^V_\lambda (w,z)\quad \forall (w,z)\in V\times V. \end{aligned}$$
(5.3)

Next, we show \(u \in {\mathrm {\,Lip}}_{d_{CC}}(\Omega )\). Given any \(w,z\in \Omega \), we consider 3 cases separately.

Case 1. \(w \in \overline{B_{d_{CC}}(x,r/R'_\lambda )}\) and \(z\in \overline{ B_{d_{CC}}(x, r /R'_\lambda )}\). We have \(z\in \overline{B_{d_{CC}}(w,2 r/R'_\lambda )}\). Since

$$\begin{aligned} d_{CC}(w,\partial V) \ge d_{CC}(x,\partial V)-d_{CC}(x,w) \ge \frac{4r}{R_\lambda '} - \frac{r}{R_\lambda '} = \frac{3r}{R_\lambda '} > \frac{2r}{R_\lambda '} \ge d_{CC}(w,z), \end{aligned}$$

by Lemma 5.2 (ii), \(d^V_\lambda (w,z)\le R_\lambda d_{CC}(w,z)\), which combined with (5.3), gives

$$\begin{aligned} u_{x,r}(z)-u_{x,r} (w)\le R_\lambda d_{CC}(w,z). \end{aligned}$$

Case 2. \(w,z\notin B_{d_{CC}}(x,r / R'_\lambda )\). Then \(w,z \in \Omega \setminus B_{d_{CC}}(x,r / R'_\lambda )\), since \(u_{x,r} \) is constant r in \(\Omega \setminus B_{d_{CC}}(x,r /R'_\lambda )\), we know that

$$\begin{aligned} u_{x,r} (z)-u_{x,r} (w)=r-r=0\le R_\lambda d_{CC}(w,z). \end{aligned}$$

Case 3. \(w \in \overline{B_{d_{CC}}(x,r/R'_\lambda )}\) and \(z\notin \overline{B_{d_{CC}}(x,r/R'_\lambda )}\). Then for any \(\epsilon >0\), there exists a curve \({\gamma }_\epsilon :[0,1] \rightarrow \Omega \) joining z and w such that

$$\begin{aligned} \ell _{{d_{CC}}}({\gamma }_\epsilon ) \le {d_{CC}}(w,z) + \epsilon \end{aligned}$$

and there exists \(t \in [0,1]\) such that \({\gamma }_\epsilon (t) \in \partial B_{d_{CC}}(x,r/R'_\lambda )\). Thus using Case 1 and Case 2, we deduce

$$\begin{aligned} u_{x,r}(z)-u_{x,r} (w)&= u_{x,r}(z)-u_{x,r} ({\gamma }_\epsilon (t)) +u_{x,r}({\gamma }_\epsilon (t))-u_{x,r} (w) \\&\le R_\lambda d_{CC}(z,{\gamma }_\epsilon (t)) + R_\lambda d_{CC}({\gamma }_\epsilon (t),w)\\&\le R_\lambda \ell _{{d_{CC}}}({\gamma }_\epsilon |_{[0,t]}) + R_\lambda \ell _{{d_{CC}}}({\gamma }_\epsilon |_{[t,1]}) \\&\le R_\lambda [{d_{CC}}(w,z)+\epsilon ]. \end{aligned}$$

Letting \(\epsilon \rightarrow 0\) in the above inequality, we conclude

$$\begin{aligned} u_{x,r}(z)-u_{x,r} (w)\le R_\lambda {d_{CC}}(w,z). \end{aligned}$$

Finally, by Lemma 2.7, \(u_{x,r}\in \dot{W}^{1,\infty }_X(\Omega )\). Note that \(X u_{x,r}=0\) in \(\Omega \setminus \overline{B_{d_{CC}}(x,r/R'_\lambda )}\) implies \(H(z,X u_{x,r}(z) )=0\) almost everywhere. Therefore recalling \(H(z,X u_{x,r}(z) )\le \lambda \) almost everywhere in V and \(\Omega = V \cup (\Omega \setminus \overline{B_{d_{CC}}(x,r/R'_\lambda )})\), we conclude \(H(z,X u_{x,r}(z) )\le \lambda \) almost everywhere in \(\Omega \).\(\square \)

Lemma 5.4

Suppose that \( U \Subset \Omega \) and that \(V=U\setminus \{x_i\}_{1\le i\le m}\) for some \(m\in {\mathbb N}\) and \(\{x_i\}_{1\le i\le m}\subset U\). Then for any \(\lambda \ge 0\), one has

$$\begin{aligned} d^V_\lambda (x,y)=d^U_\lambda (x,y) \text{ for } \text{ all } x,y\in \overline{U}. \end{aligned}$$

Proof

Obviously \(d_\lambda ^U\le d^V_\lambda \) in \(\overline{U}\). Conversely, we show \(d_\lambda ^V\le d^U_\lambda \) in \(\overline{U}\). First, by an approximation argument, it suffices to consider \(x,y \in U\). By the right continuity of \(\lambda \in [0,\infty )\rightarrow d_\lambda ^U(x,y)\) for any \(x,y\in \overline{U}^*\), up to considering \( d_{\mu +\epsilon }^U\) for sufficiently small \(\epsilon >0\), we may assume that \(\mu >0\). For any \(\lambda >0\), by the pseudo-length property of \(d^U_\lambda \) as in Proposition 4.1, it suffices to prove that for any curve \({\gamma }:[a,b] \rightarrow U\), one has

$$\begin{aligned} d^V_\lambda ({\gamma }(a),{\gamma }(b)) \le \ell _{d^U_\lambda }({\gamma }) .\end{aligned}$$
(5.4)

We consider the following 3 cases.

Case 1. \({\gamma }((a,b))\subset V\) and \({\gamma }(\{a,b\}) \subset V\), that is, \({\gamma }( [a,b])\subset V\). Recall from Lemma 5.3 that, for each \(x \in V\), there exists a neighborhood N(x) such that

$$\begin{aligned} d^V_\lambda (x,y) = d^U_\lambda (x,y) \quad \forall y \in N(x). \end{aligned}$$

Since \({\gamma }\subset \cup _{t \in [a,b]}N({\gamma }(t))\), we can find \(a=t_0=0<t_1<\cdots < t_m=b\) such that \({\gamma }\subset \cup _{i=0}^m N({\gamma }(t_i))\) and \({\gamma }([t_i,t_{i+1}])\subset N({\gamma }(t_i))\). By the triangle inequality, one has

$$\begin{aligned} d_\lambda ^V({\gamma }(a),{\gamma }(b))\le \sum _{i=0}^{m-1}d^U_\lambda ({\gamma }(t_{i}),{\gamma }(t_{i+1}))\le \ell _{d^U_\lambda }({\gamma }). \end{aligned}$$

Case 2. \({\gamma }((a,b))\subset V\) and \({\gamma }(\{a,b\})\not \subset V\). Applying Case 1 to \({\gamma }|_{[a+\epsilon ,b-\epsilon ]}\) for sufficiently small \(\epsilon >0\), we get

$$\begin{aligned} d_\lambda ^V({\gamma }(a),{\gamma }(b))\le \lim _{\epsilon \rightarrow 0}d_\lambda ^V({\gamma }(a+\epsilon ),{\gamma }(b-\epsilon )) \le \liminf _{\epsilon \rightarrow 0} \ell _{d^U_\lambda }({\gamma }|_{[a+\epsilon ,b-\epsilon ]}) \le \ell _{d^U_\lambda }({\gamma }). \end{aligned}$$

Case 3. \({\gamma }((a,b))\not \subset V\). Without loss of generality, for each \(x_i\), there is at most one \(t \in (a,b)\) such that \({\gamma }(t )=x_i\). Indeed, let \(t ^\pm \) as the maximum/mimimum \(s\in (a,b)\) such that \({\gamma }(s)=x_1\). Then \( a\le t ^-\le t^+ \le b\). If \(t ^-<t ^+ \), we consider \( {\gamma }_1:[a,b-(t^+ -t^- )]\rightarrow U\) with \({\gamma }_1(t)={\gamma }(t)\) for \(t\in [a,t ^-]\), and \({\gamma }_1(t)={\gamma }(t-(t^+ -t^- ))\) for \(t\in [t^+ ,b]\). Then \(\ell _{d^U_\lambda }({\gamma }_1) \le \ell _{d^U_\lambda }({\gamma }) \). Repeating this procedure for \(x_2,\cdots ,x_m\) in order, we may get a new curve \(\eta \) such that for each \(x_i\), there is at most one \(t\in (a,b)\) such that \({\gamma }(t )=x_i\) and \(\ell _{d^U_\lambda }(\eta )\le \ell _{d^U_\lambda }({\gamma }).\)

Denote by \(\{a_j\}_{j=0}^s\) with \(a=a_0<a_1<\cdots <a_s=b\) such that \({\gamma }( \{a_1,\cdots ,a_{s-1}\}) \subset U\setminus V=\{x_i\}_{1\le i\le m}\) and \({\gamma }([a,b]\setminus \{a_1,\cdots ,a_{s-1}\})\subset V\). Applying Case 2 to \({\gamma }|_{[a_j,a_{j+1}]}\) for all \(0\le j\le s-1\), we obtain

$$\begin{aligned} d_\lambda ^V({\gamma }(a),{\gamma }(b))\le \sum _{j=0}^{s-1} d_\lambda ^V({\gamma }(a_j),{\gamma }(a_{j+1}))\le \sum _{j=0}^{s-1}\ell _{d^U_\lambda }({\gamma }|_{[a_j,a_{j+1}]}) \le \ell _{d^U_\lambda }({\gamma }) \end{aligned}$$

as desired. The proof is complete.\(\square \)

For any \(g\in C^0(\partial U)\), write

$$\begin{aligned} \mu (g, \partial U) := \inf \big \{ \lambda \ge 0 \ | \ g(y) - g(x) \le d^{U}_\lambda (x, y) \quad \forall \ x, y \in \partial {U} \big \}. \end{aligned}$$

The following lemma says the infimum can be reached.

Lemma 5.5

We have

$$\begin{aligned} \mu (g, \partial U)&=\min \big \{ \lambda \ge 0 \ | \ g(y) - g(x) \le d^{U}_\lambda (x, y) \quad \forall \ x, y \in \partial {U}\cap \overline{U}^*\big \}. \end{aligned}$$

Proof

First, if \(x \in \partial {U}\setminus \overline{U}^*\) or \(y \in \partial {U}\setminus \overline{U}^*\), we have \(d^{U}_\lambda (x, y) = \infty \). Hence \(g(y) - g(x) \le d^{U}_\lambda (x, y)\) holds trivially, which implies that

$$\begin{aligned} \mu (g, \partial U) =\inf \big \{ \lambda \ge 0 \ | \ g(y) - g(x) \le d^{U}_\lambda (x, y) \quad \forall \ x, y \in \partial {U}\cap \overline{U}^*\big \}. \end{aligned}$$

Thanks to Lemma 5.2(vii), we finish the proof.\(\square \)

If \(\mu =\mu (g,\partial U)<\infty \), we define

$$\begin{aligned} {\mathcal S}^+_{g;U}(x) := \inf _{y\in \partial U} \{g(y) + d^{U}_\mu (y, x) \} \quad \textrm{and}\quad {\mathcal S}^-_{g; U}(x) := \sup _{y\in \partial U} \{g(y) - d^{U}_\mu (x, y) \}\quad \forall x \in \overline{U}. \end{aligned}$$

Note that \({\mathcal S}^\pm _{g; U}\) serve as “McShane" extensions of g in U.

Lemma 5.6

If \(\mu =\mu (g,\partial U)<\infty \), then we have

  1. (i)

    \(\mathcal {S}_{g;U}^\pm \in \dot{W}^{1,\infty }_X(U)\cap C^0(\overline{U})\) with \(\mathcal {S}_{g;U}^\pm =g\) on \(\partial U\);

  2. (ii)

    for any \( x,y\in \overline{U}\),

    $$\begin{aligned} \mathcal {S}_{g;U}^\pm (y)-\mathcal {S}_{g;U}^\pm (x)\le d^U_\mu (x,y) ;\end{aligned}$$
    (5.5)
  3. (iii)

    \( \Vert H(\cdot ,{X\mathcal {S}_{g;U}^\pm } )\Vert _{L^\infty (U)}\le \mu .\)

Proof

By Corollary 5.1, (ii) implies (iii) and \( \mathcal {S}_{g;U}^\pm \in \dot{W}^{1,\infty }_X(U)\). Below we show \(\mathcal {S}_{g;U}^\pm =g\) on \(\partial U\), (ii) and \(\mathcal {S}_{g;U}^\pm \in C^0(\overline{U})\) in order.

Proof for \(\mathcal {S}_{g;U}^\pm =g\) on \(\partial U\). For any \(x\in \partial U\), by definition we have

$$\begin{aligned} \mathcal {S}_{g;U}^-(x) \ge g(x)\ge \mathcal {S}_{g;U}^+(x). \end{aligned}$$

Conversely, for \(y \in \partial {U}\), one has

$$\begin{aligned} g(y) - d^U_\mu (x, y) \le g(x)\le g(y) + d^U_\mu (y, x) \end{aligned}$$

and hence \(\mathcal {S}_{g;U}^-(x) \le g(x)\le \mathcal {S}_{g;U}^+(x) \) as desired.

Proof of (ii). We only prove (ii) for \(\mathcal {S}_{g;U}^-\); the proof for \(\mathcal {S}_{g;U}^+\) is similar. For \(x,y\in \partial U\), by the definition of \(\mu \) one has

$$\begin{aligned} \mathcal {S}_{g;U}^- (y)-\mathcal {S}_{g;U}^- (x)=g(y)-g(x) \le d^U_\mu (x,y). \end{aligned}$$

For \(x\in U\) and \(y\in \partial U\), by definition

$$\begin{aligned} \mathcal {S}_{g;U}^-(x)&\ge g(y) - d^U_\mu (x, y) = \mathcal {S}_{g;U}^- (y) - d^U_\mu (x, y) \end{aligned}$$

and hence

$$\begin{aligned} \mathcal {S}_{g;U}^- (y)-\mathcal {S}_{g;U}^- (x) \le d^U_\mu (x,y). \end{aligned}$$

For \(x\in \overline{U}\) and \( y \in U\), by Lemma 5.2(iv), we have

$$\begin{aligned} d^U_\mu (x,z)\le d^U_\mu (x,y)+d^U_\mu (y,z) \quad \forall z\in \partial U. \end{aligned}$$

One then has

$$\begin{aligned} \mathcal {S}_{g;U}^-(y)&= \sup _{z \in \partial {U}}\{g(z) - d^U_\mu (y, z) \} \\&\le \sup _{z \in \partial {U}}\{g(z) - d^U_\mu (x, z)+d^U_\mu (x,y) \} \\&\le \mathcal {S}_{g;U}^-(x) +d^U_\mu (x,y), \end{aligned}$$

and hence

$$\begin{aligned} \mathcal {S}_{g;U}^- (y)-\mathcal {S}_{g;U}^- (x) \le d^U_\mu (x,y). \end{aligned}$$

Proof of \(\mathcal {S}_{g;U}^\pm \in C^0(\overline{U})\). We only consider \(\mathcal {S}_{g;U}^-\in C^0(\overline{U})\); the proof for \(\mathcal {S}_{g;U}^+\in C^0(\overline{U})\) is similar. It suffices to show that for any \(x \in \partial {U}\) and a sequence \(\{x_j\} \subset U\) converging to x,

$$\begin{aligned} \lim _{j \rightarrow \infty }\mathcal {S}_{g;U}^-(x_j)=\mathcal {S}_{g;U}^-(x)=g(x). \end{aligned}$$

Choosing \(x^*_j\in \partial U\) such that \(d_{CC}(x_j,x^*_j)={\mathrm {\,dist\,}}_{d_{CC}}(x_j,\partial U)\), one has

$$\begin{aligned} d_{CC}(x_j,x^*_j)\le d_{CC}(x_j,x)\rightarrow 0,\quad \hbox { and hence }d_{CC}(x_j^*, x)\rightarrow 0 . \end{aligned}$$

Thanks to Lemma 5.2(iii) with \(x=x_j\) and \(x^*=x^*_j\) therein, we deduce

$$\begin{aligned} d^U _\mu (x_j,x^*_j)\le R_\mu d_{CC}(x_i,x^*_j)\rightarrow 0. \end{aligned}$$

Since

$$\begin{aligned} \mathcal {S}_{g;U}^-(x_j)\ge g(x_j^*)-d^U _\mu (x_j,x^*_j), \end{aligned}$$

by the continuity of g, we have

$$\begin{aligned} \liminf _{j \rightarrow \infty }\mathcal {S}_{g;U}^-(x_j)\ge g(x). \end{aligned}$$

Assume that

$$\begin{aligned} \liminf _{j \rightarrow \infty }\mathcal {S}_{g;U}^-(w_j)\ge g(x)+2\epsilon \ \text{ for } \text{ some } \{w_j\}_{j\in {\mathbb N}}\subset U\hbox { with }w_j\rightarrow x\hbox { and some }\epsilon >0. \end{aligned}$$

By the definition we can find \(z_j\in \partial U\) such that

$$\begin{aligned} \mathcal {S}_{g;U}^-(w_j)-\epsilon \le g(z_j)-d^U_\mu (w_j,z_j) . \end{aligned}$$

Thus for \(j \in {\mathbb N}\) sufficiently large, we have

$$\begin{aligned} g(z_j)-d^U_\mu (w_j,z_j) \ge g(x)+\epsilon . \end{aligned}$$

Up to some subsequence, we assume that \(z_j\rightarrow z \in \partial U\). Note that

$$\begin{aligned} d^U_\mu (x,z) \le \liminf _{j\rightarrow \infty } d^U_\mu (w_j,z_j) \end{aligned}$$

By the continuity of g, we conclude

$$\begin{aligned} g(z )-d^U_\mu (x,z) \ge g(x)+\epsilon , \end{aligned}$$

which is a contradiction with the definition of \(\mu \) and \(\mu <\infty \).\(\square \)

Write

$$\begin{aligned} \textbf{I}(g,U) =\inf \{\Vert H(\cdot ,Xu)\Vert _{L^\infty (U)} \ | \ u\in \dot{W}_X^{1,\infty }(U)\cap C^0(\overline{U}), u|_{\partial U}=g \}. \end{aligned}$$
(5.6)

A function \( u:\overline{U}\rightarrow {\mathbb R}\) is called as a minimizer for \(\textbf{I}(g,U)\) if

$$\begin{aligned} u\in \dot{W}_X^{1,\infty }(U)\cap C^0(\overline{U}), u|_{\partial U}=g \quad \hbox {and}\quad \Vert H(\cdot ,Xu)\Vert _{L^\infty (U)}=\textbf{I}(g,U). \end{aligned}$$

We have the following existence and properties for minimizers.

Lemma 5.7

For any \(g\in C(\partial U)\) with \(\mu (g,\partial U)<\infty \), we have the following:

  1. (i)

    We have \( \mu (g,\partial U)=\textbf{I}(g,U). \) Both of \(\mathcal {S}_{g;U}^\pm \) are minimizers for \(\textbf{I}(g,U)\).

  2. (ii)

    If u is a minimizer for \(\textbf{I}(g,U)\) then

    $$\begin{aligned} \mathcal {S}_{g;U}^- \le u \le \mathcal {S}_{g;U}^+ \quad \text{ in }\quad \overline{U}\quad \hbox {and } \Vert H(x,Xu) \Vert _{L^\infty (U)} = \textbf{I}(g,U)=\mu (g,\partial U) . \end{aligned}$$
  3. (iii)

    If uv are minimizer for \(\textbf{I}(g,U)\), then \(tu+(1-t)v\) with \(t\in (0,1)\), \(\max \{u, v\}\) and \(\min \{u, v\}\) are minimizers for \(\textbf{I}(g,U)\).

Proof

(i) Since \(\mu (g,\partial U) <\infty \), then by Lemma 5.6, we know that \(\mathcal {S}_{g;U}^\pm \) satisfies the condition required in (5.6) and hence

$$\begin{aligned} \textbf{I}(g,U)\le \Vert H(\cdot ,{X\mathcal {S}_{g;U}^\pm } )\Vert _{L^\infty (U)}\le \mu .\end{aligned}$$
(5.7)

Below we show that \(\mu (g,\partial U)\le \textbf{I}(g,U) .\) Note that combining this and (5.7) we know that

$$\begin{aligned} \textbf{I}(g,U)= \Vert H(\cdot ,{X\mathcal {S}_{g;U}^\pm } )\Vert _{L^\infty (U)}= \mu \end{aligned}$$

and moreover, \(\mathcal {S}_{g;U}^\pm \) are minimizers for \({ \textbf{I}}(g;U)\).

For any \(\lambda >\textbf{I}(g,U)\), there is a function \(u\in \dot{W}^{1,\infty }_X(U)\cap C^0(\overline{U})\) with \(u=g\) on \(\partial U\) such that \( \Vert H(x,Xu)\Vert _{L^\infty (U)}\le \lambda \). By Corollary 5.1,

$$\begin{aligned} { u(y)-u(x)\le d_\lambda ^U(x,y), \ \forall x,y\in U.} \end{aligned}$$

By the continuity of u in \(\overline{U}\) and the definition of \(d^U_\lambda \) in \(\overline{U}\times \overline{U}\) we have

$$\begin{aligned} g(x)-g(y)\le d^U_\lambda (x,y) { \text{ for } \text{ all } x,y \in \partial {U}}. \end{aligned}$$

Thus \(\mu (g,\partial U)\le \textbf{I}(g,U) .\)

(ii) If u is a minimizer for \({ \textbf{I}}(g,U)\), one has

$$\begin{aligned} \Vert H(\cdot , Xu )\Vert _{L^\infty (U)} = \textbf{I}(g,U)=\mu . \end{aligned}$$

By Corollary 5.1, \(u(y) - u(x) \le d_\mu ^U(x, y)\) for any \(x, y \in U\) and hence, by the continuity of u and the definition of \(d_\mu ^U\), for all \(x, y \in \overline{U}\). Since \(u= g\) on \(\partial U\), for any \(x \in U\), one has \(g(y) - d_\mu ^U(x, y) \le u(x)\) for any \(y \in \partial U\), which yields \(\mathcal {S}_{g;U}^-(x) \le u(x)\). By a similar argument, one also has \(u \le \mathcal {S}_{g;U}^+\) in U as desired.

(iii) Suppose that \(u_1,u_2\) are minimizers for \(\textbf{I}(g,U)\). Set

$$\begin{aligned} u_\eta :=(1-\eta ) u_1+ \eta u_2 \text{ for } \text{ any } \quad \eta \in [0, 1]. \end{aligned}$$

Then \(u_\eta \in \dot{W}^{1,\infty }_X(U)\cap C^0(\overline{U})\), and \(u_\eta = g\) on \(\partial U\), and by (H1),

$$\begin{aligned} H(\cdot , Xu_\eta (\cdot )) \le \max _{i=1,2}\{ H(\cdot , Xu_i(\cdot )) \}\le \mu \ \text{ a.e. } \text{ on } \quad U. \end{aligned}$$

This, combined with the definition of \(\textbf{I}(g,U)\), implies that \(u_\eta \) is also a minimizer for \({ \textbf{I}}(g,U)\).

Finally, note that

$$\begin{aligned} \max \{u_1, u_2\} \in \dot{W}^{1,\infty }_X(U)\cap C^0(\overline{U}), \max \{u_1, u_2\} = g\quad \hbox {on} \quad \partial U. \end{aligned}$$

By Lemma 3.2, one has

$$\begin{aligned} H(\cdot , X\max \{u_1, u_2\}(\cdot )) \le \max _{i=1,2}\{ H(\cdot , Xu_i(\cdot )) \}\le \mu \ \text{ a.e. } \text{ on } U. \end{aligned}$$

We know that

$$\begin{aligned} \textbf{I}(g, U )\le {\mathcal F}(\max \{u_1, u_2\}, U)&\le \max \{{\mathcal F}(u, U), {\mathcal F}(v, U)\} = \textbf{I}(g, U ), \end{aligned}$$

that is, \(\max \{u_1, u_2\}\) is a minimizer for \({ \textbf{I}}(g,U)\). Similarly, \(\min \{u_1, u_2\}\) is a minimizer for \({ \textbf{I}}(g,U)\).\(\square \)

We have the following improved regularity for Mschane extension via \(d_\lambda \).

Lemma 5.8

Suppose that \(U\Subset \Omega \) and that \(V \subset U\) is a subdomain. If \(g:\partial V\rightarrow {\mathbb R}\) satisfies

$$\begin{aligned} g(y)-g(x)\le d^U_\lambda (x,y)\quad \forall x,y\in \partial V\end{aligned}$$
(5.8)

for some \(\lambda \ge 0\), then \( \mu (g,\partial U)\le \lambda \) and

$$\begin{aligned} S^\pm _{g,V}(y)- S^\pm _{g,V}(x)\le d^U_\lambda (x,y)\quad \forall x,y\in \overline{V}. \end{aligned}$$
(5.9)

Proof

Since \(d_\lambda ^U\le d^V_\lambda \) in \(\overline{V}\times \overline{V}\), we know that

$$\begin{aligned} g(y)-g(x)\le d^V_\lambda (x,y)\quad \forall x,y\in \partial V \end{aligned}$$

and hence

$$\begin{aligned} \mu (g,\partial V)=\min \{\eta \ge 0 \ | \ g(y)-g(x)\le d^V_\eta (x,y)\quad \forall x,y\in \partial V \}\le \lambda . \end{aligned}$$

To prove (5.9), by the pseudo-length property of \(d_\lambda ^U\) as in Corollary 5.1, it suffices to prove that for any curve \({\gamma }:[a,b] \rightarrow \Omega \) with \({\gamma }(a),{\gamma }(b)\in \overline{V}\), one has

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))-S^\pm _{g,V}({\gamma }(a))\le \ell _{d_\lambda ^U}({\gamma }) . \end{aligned}$$
(5.10)

We consider the following 4 cases.

Case 1. \({\gamma }((a,b))\subset V\) and \({\gamma }(\{a,b\}) \subset V\), that is, \({\gamma }( [a,b])\subset V\). Noting \(\mu =\mu (g,\partial V)\le \lambda \), one then has \(d_\mu ^U \le d_\lambda ^V \) in \( V\times V\). From the definition of \(S^\pm _{g,V}\), it follows

$$\begin{aligned} S^\pm _{g,V}(y)- S^\pm _{g,V}(x)\le d_\mu ^V (x,y) \quad \forall x,y\in V. \end{aligned}$$

Recall from Lemma 5.3 that, for each \(x \in V\), there exists a neighborhood \(N(x) \Subset V\) such that

$$\begin{aligned} d^V_\lambda (x,y) = d_\lambda ^U(x,y) \quad \forall y \in N(x). \end{aligned}$$

We therefore have

$$\begin{aligned} S^\pm _{g,V}(y)- S^\pm _{g,V}(x)\le d_\lambda ^U (x,y)\quad \forall x \in U, y\in N(x). \end{aligned}$$
(5.11)

Since \({\gamma }\subset \cup _{t \in [a,b]}N({\gamma }(t))\), we can find \(a=t_0=0<t_1<\cdots < t_m=b\) such that \({\gamma }\subset \cup _{i=0}^m N({\gamma }(t_i))\) and \({\gamma }([t_i,t_{i+1}])\subset N({\gamma }(t_i))\). Applying (5.11) to \({\gamma }(t_i)\) and \({\gamma }(t_{i+1})\), we have

$$\begin{aligned} S^\pm _{g,V}({\gamma }(t_{i+1}))-S^\pm _{g,V}({\gamma }(t_{i})) \le d_\lambda ^U({\gamma }(t_{i}),{\gamma }(t_{i+1})). \end{aligned}$$

Thus

$$\begin{aligned}{} & {} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))=\sum _{i=0}^{m-1} [S^\pm _{g,V}({\gamma }(t_{i+1}))-S^\pm _{g,V}({\gamma }(t_{i}))]\nonumber \\{} & {} \le \sum _{i=0}^{m-1}d_\lambda ^U ({\gamma }(t_{i}),{\gamma }(t_{i+1}))\le \ell _{d_\lambda ^U}({\gamma }). \end{aligned}$$

Case 2. \({\gamma }((a,b))\subset V\) and \({\gamma }(\{a,b\})\not \subset V\). Applying Case 1 to \({\gamma }|_{[a+\epsilon ,b-\epsilon ]}\) for sufficiently small \(\epsilon >0\), we get

$$\begin{aligned}{} & {} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))= \lim _{\epsilon \rightarrow 0}[S^\pm _{g,V}({\gamma }(b-\epsilon ))- S^\pm _{g,V}({\gamma }(a+\epsilon ))] \\{} & {} \quad \le \liminf _{\epsilon \rightarrow 0} \ell _{d_\lambda ^U}({\gamma }|_{[a+\epsilon ,b-\epsilon ]}) \le \ell _{d_\lambda ^U}({\gamma }). \end{aligned}$$

Case 3. \({\gamma }((a,b))\not \subset V\) and \({\gamma }(\{a,b\})\subset V\). Set

$$\begin{aligned} t_*=\min \{t\in [a,b],{\gamma }(t)\notin V\} \text{ and } t^*=\max \{t\in [0,1],{\gamma }(t)\notin V\}. \end{aligned}$$

Then \({\gamma }(t_*) \in \partial V\) and \({\gamma }(t^*) \in \partial V\). Write

$$\begin{aligned}{} & {} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))=S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(t^*))+ S^\pm _{g,V}({\gamma }(t^*))\\{} & {} \quad - S^\pm _{g,V}({\gamma }(t_*))+S^\pm _{g,V}({\gamma }(t_*))- S^\pm _{g,V}({\gamma }(a)). \end{aligned}$$

Note that

$$\begin{aligned} S^\pm _{g,V}({\gamma }(t^*))- S^\pm _{g,V}({\gamma }(t_*))=g({\gamma }(t^*))-g({\gamma }(t_*))\le d_\lambda ^U ({\gamma }(t_*),{\gamma }(t^*))\le \ell _{d_\lambda ^U}({\gamma }|_{[a,t_*]}) . \end{aligned}$$

By this, and applying Case 2 to \({\gamma }|_{[a,t_*]}\) and \({\gamma }|_{[t^*,b]}\), we obtain

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))\le \ell _{d_\lambda ^U}({\gamma }|_{[t^*,b]}) + \ell _{d_\lambda ^U}({\gamma }|_{[t_*,t^*]})+\ell _{d_\lambda ^U}({\gamma }|_{[a,t_*]}) =\ell _{d_\lambda ^U}({\gamma }) . \end{aligned}$$

Case 4. \({\gamma }((a,b))\not \subset V\) and \({\gamma }(\{a,b\})\not \subset V\). If \({\gamma }(\{a,b\})\subset \partial V\), then

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))=g({\gamma }(b))-g({\gamma }(a))\le d_\lambda ^U ({\gamma }(b),{\gamma }(a))\le \ell _{d_\lambda ^U}({\gamma }) . \end{aligned}$$

If \({\gamma }(a)\in V\) and \({\gamma }(b)\in \partial V\), set \(s^*=\min \{s\in [a,b] \ | \ {\gamma }(s) \in \partial V\}\). Obviously \(a<s^*\le b\), and we can find a sequence of \(\epsilon _i>0\) so that \(\epsilon _i\rightarrow 0\) as \(i\rightarrow \infty \) and \({\gamma }(s^*-\epsilon _i)\in V\). Write

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))= S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(s^*))+ S^\pm _{g,V}({\gamma }(s^*))-S^\pm _{g,V}({\gamma }(a)). \end{aligned}$$

Since \({\gamma }(s^*),{\gamma }(b)\in \partial V\), we have

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(s^*))=g({\gamma }(b))-g({\gamma }(s^*))\le d_\lambda ^U ({\gamma }(b),{\gamma }(s^*))\le \ell _{d_\lambda ^U}({\gamma }|_{[s^*,b]} ) . \end{aligned}$$

Applying Case 3 to \({\gamma }|_{[a,s^*-\epsilon _i]}\), one has

$$\begin{aligned}{} & {} S^\pm _{g,V}({\gamma }(s^*))-S^\pm _{g,V}({\gamma }(a)) = \lim _{i\rightarrow \infty }[S^\pm _{g,V}({\gamma }(s^*-\epsilon _i))-S^\pm _{g,V}({\gamma }(a))]\\{} & {} \quad \le \lim _{i\rightarrow \infty }\ell _{d_\lambda ^U}({\gamma }|_{[a,s^*-\epsilon _i]} )\le \ell _{d_\lambda ^U}({\gamma }|_{[a,s^*]} ). \end{aligned}$$

We therefore have

$$\begin{aligned} S^\pm _{g,V}({\gamma }(b))- S^\pm _{g,V}({\gamma }(a))\le \ell _{d_\lambda ^U}({\gamma }|_{[s^*,b]} ) +\ell _{d_\lambda ^U}({\gamma }|_{[a,s^*]} )=\ell _{d_\lambda ^U}({\gamma }). \end{aligned}$$

If \({\gamma }(a)\in \partial V\) and \({\gamma }(b)\in V\), we could prove in a similar way. Thus (5.10) holds and the proof is complete.\(\square \)

The following will be used in Sect. 6. Let \(U\Subset \Omega \) and \(u\in \dot{W}^{1,\infty }_X(U)\cap C^0(\overline{U}) \) satisfying

$$\begin{aligned} u(y)-u(x)\le d^U_\mu (x,y) \quad \forall x,y\in \overline{U} \end{aligned}$$
(5.12)

for some \(0\le \mu <\infty \). Given any subdomain \(V\subset U\), write \(h =u|_{\partial V}\) as the restriction of u in \(\overline{V}\). Since \(d^U_\mu \le d^V_\lambda \) in \(\overline{V}\times \overline{V}\) as given in Lemma 5.3, one has

$$\begin{aligned} u (y)-u (x) \le d^V_\mu (x,y) \quad \forall x,y\in \partial V \end{aligned}$$

and hence \(\mu (u|_{\partial V}, \partial V) \le \mu \). Denote by \({\mathcal S}_{u|_{\partial V} ,V}^\mp \) the McShane extension of \(u|_{\partial V} \) in V. Define

$$\begin{aligned} u^\pm := \left\{ \begin{array}{lll} {\mathcal S}_{u|_{\partial V},V}^\pm &{} \quad \text {in} &{} \quad V \\ u &{} \quad \text {in}&{}\quad \overline{U} \backslash V. \end{array} \right. \end{aligned}$$
(5.13)

Lemma 5.9

Under the assumption (5.12) for some \(0\le \mu <\infty \), the functions \(u^\pm \) defined in (5.13) are continuous in \(\overline{U}\) and satisfy

$$\begin{aligned} u^\pm (y)-u^\pm (x)\le d_\mu ^U(x,y)\quad \forall x,y\in \overline{U}. \end{aligned}$$
(5.14)

In particular, \(u^\pm \in \dot{W}^{1,\infty }_X(U) \cap C^0(\overline{U})\) and \( \Vert H(\cdot ,Xu^\pm )\Vert _{L^\infty (U)}\le \mu \).

Proof

We only prove Lemma 5.9 for \(u^+\); the proof of Lemma 5.9 for \(u^-\) is similar. By Lemma 5.6, \({\mathcal S}^+_{h,V}\in C^0(\overline{V})\) and \({\mathcal S}^+_{h,V}=u\) on \(\partial V\). These, together with \(u\in C^0(\overline{U})\) imply that \(u^+\in C^0(\overline{U})\). Moreover, by Corollary 5.1, if \(u^+\) satisfies (5.14), then \(u^+\in \dot{W}^{1,\infty }_X(U)\) and \( \Vert H(\cdot ,Xu^\pm )\Vert _{L^\infty (U)}\le \mu \). Below we prove (5.14) for \(u^+\) via the following 3 cases. By the right continuity of \(\lambda \in [0,\infty )\rightarrow d_\lambda ^U(x,y)\) for any \(x,y\in \overline{U}\), up to considering \( d_{\mu +\epsilon }^U\) for sufficiently small \(\epsilon >0\), we may assume that \(\mu >0\).

Case 1. \(x,y\in \overline{U}\setminus V \). By (5.12) we have

$$\begin{aligned} u^+(y)-u^+(x)= {u(y)-u(x)} \le d_\mu ^U(x,y). \end{aligned}$$

Case 2. \(x \in \overline{V} \) and \(y \in V\) or \(x \in V \) and \(y \in \overline{V}\). Applying Lemma 5.8 with \((U, d_\lambda ^U,V,d^V_\lambda ,g)\) replaced by \(( U,d^U_\mu ,V,d^V_\mu , u|_{\partial V})\), one has

$$\begin{aligned} u^+(y)-u^+(x)= {\mathcal S}_{h, V}^+(y)- {\mathcal S}_{h, V}^+(x)\le d^U_\mu (x,y)\quad \forall x,y\in \overline{V}. \end{aligned}$$

Case 3. \(x\in V\) and \(y\in \overline{U}\setminus V \) or \(x\in \overline{U}\setminus V\) and \(y\in V \). For any \(\epsilon >0\), by Corollary 5.1, there exists a curve \({\gamma }\) joining xy such that

$$\begin{aligned} \ell _{d^U_\mu }({\gamma })\le d_\mu ^U(x,y)+\epsilon . \end{aligned}$$

Let \(z\in {\gamma }\cap \partial V\). Applying Case 2 and Case 1, we have

$$\begin{aligned}{} & {} u^+(y)-u^+(x)=u^+(y)-u^+(z)+u^+(z)-u^+(x)\le d^U_\mu (z,y)+d^U_\mu (x,z)\\{} & {} \quad \le \ell _{d^U_\mu }({\gamma })\le d^U_\mu (x,y)+\epsilon . \end{aligned}$$

By the arbitrariness of \(\epsilon >0\), we have \( u^+(y)-u^+(x) \le d^U_\mu (x,y) \) as desired.\(\square \)

6 Proof of Theorem 1.6

In this section, we always suppose that the Hamiltonian H(xp) enjoys assumptions (H0)-(H3) and further that \(\lambda _H=0\).

Definition 6.1

Let \(U\Subset \Omega \) be a domain and \(g\in C^0(\partial U)\) with \(\mu (g,\partial U)<\infty \).

  1. (i)

    A minimizer u for \({ \textbf{I}}(g,U)\) is called a local superminimizer for \({ \textbf{I}}(g,U)\) if \(u \ge {\mathcal S}_{u|_{\partial V}; V}^-\) in V for any subdomain \(V\subset U\).

  2. (ii)

    A minimizer u for \({ \textbf{I}}(g,U)\) is called a local subminimizer for \({ \textbf{I}}(g,U)\) if \(u \le {\mathcal S}_{u|_{\partial V}; V}^+\) in V for any subdomain \(V\subset U\).

The next lemma shows McShane extensions are local super/sub minimizers.

Lemma 6.2

Let \(U\Subset \Omega \) and \(g\in C^0(\partial U)\) with \(\mu (g,\partial U)<\infty \).

  1. (i)

    For any subdomain \(V\subset U\), we have

    $$\begin{aligned} {\mathcal S}_{h^+, V}^- \le {\mathcal S}_{h^+, V}^+ \le \mathcal {S}_{g;U}^+ \text { in }V,\quad \text { where } h^+=\mathcal {S}_{g;U}^+|_{\partial V}. \end{aligned}$$
    (6.1)

    In particular, \(\mathcal {S}_{g;U}^+\) is a local superminimizer for \({ \textbf{I}}(g,U)\).

  2. (ii)

    For any subdomain \(V\subset U\), we have

    $$\begin{aligned} \mathcal {S}_{g;U}^-\le {\mathcal S}_{h^-, V}^- \le {\mathcal S}_{h^-, V}^+ \text { in }V,\text { where}\quad h^-=\mathcal {S}_{g;U}^-|_{\partial V}. \end{aligned}$$
    (6.2)

    In particular, \(\mathcal {S}_{g;U}^-\) is a local subminimizer for \({ \textbf{I}}(g,U)\).

Proof

We only prove (i); the proof for (ii) is similar. Write \(\mu =\mu (g,\partial U).\) By Lemma 5.7, \(\mathcal {S}_{g;U}^+\) is a minimizer for \(\textbf{I}(g,U)\), \(\mu =\textbf{I}(g,U)=\Vert H(\cdot ,X\mathcal {S}_{g;U}^+)\Vert _{L^\infty (U)} \), and

$$\begin{aligned} \mathcal {S}_{g;U}^+(y)-\mathcal {S}_{g;U}^+(x)\le d^U_\mu (x,y) \quad \forall x,y\in \overline{U} \end{aligned}$$
(6.3)

Fix any subdomain \(V\subset U\). Denote by \({\mathcal S}_{h,V}^\pm \) the McShane extension of \(h^+=\mathcal {S}_{g;U}^+|_{\partial V}\) in V. Note that \({\mathcal S}_{h, V}^-\le {\mathcal S}_{h, V}^+ \) in \(\overline{V}\), that is, the first inequality in (6.1) holds.

Below we show \({\mathcal S}_{h, V}^+\le \mathcal {S}_{g;U}^+\) in V, that is, the second inequality in (6.1). Let \( u^+\) be as in the (5.13) with \(u={\mathcal S}_{g,U}^+\), that is,

$$\begin{aligned} u^+:= \left\{ \begin{array}{lll} {\mathcal S}_{h^+,V}^+ &{} \quad \text {in} &{} \quad V \\ \mathcal {S}_{g;U}^+ &{} \quad \text {in}&{}\quad \overline{U} \backslash V. \end{array} \right. \end{aligned}$$

By (6.3), we apply Lemma 5.9 to conclude that \(u^+\in \dot{W}^{1,\infty }_X(U) \cap C^0(\overline{U})\) and \( \Vert H(\cdot ,Xu^+)\Vert _{L^\infty (U)}\le \mu \). Note that \(u^+=\mathcal {S}_{g;U}^+\) on \(\partial U\) and hence, by definition of \(\textbf{I}(g, U )\), one has \(\textbf{I}(g, U )\le \Vert H(\cdot ,Xu^+)\Vert _{L^\infty (U)}.\) Recalling \(\mu = \textbf{I}(g, U )\), one obtains that \(\textbf{I}(g, U )= \Vert H(\cdot ,Xu^+)\Vert _{L^\infty (U)},\) that is, \(u^+\) is a minimizer for \(\textbf{I}(g, U )\). By Lemma 5.7(i) again, \(u^+ \le \mathcal {S}_{g;U}^+\) in U. Since \({\mathcal S}_{h, V}^+= u^+\) in V, we conclude that \({\mathcal S}_{h, V}^+\le \mathcal {S}_{g;U}^+\) in V as desired. The proof is complete.\(\square \)

Lemma 6.3

Let \(V \Subset \Omega \) be a domain and \(P=\{x_j\}_{j \in {\mathbb N}}\subset V\) be a dense subset of V. Assume \(u \in C^{0}(\overline{V})\) and \(\{u_j\}_{j \in {\mathbb N}} \subset \dot{W}_X^{1,\infty }(V) \cap C^{0}(\overline{V})\) such that for any \(j \in {\mathbb N}\),

$$\begin{aligned} |u_j(x_i)-u(x_i)| \le \frac{1}{j} \text{ for } \text{ any } \quad i=1, \cdots ,j, \end{aligned}$$
(6.4)

and

$$\begin{aligned} \Vert H(\cdot ,Xu_j(\cdot ))\Vert _{L^\infty (V)} \le \lambda <\infty . \end{aligned}$$
(6.5)

Then \(u_j \rightarrow u\) in \(C^0(V)\), and moreover,

$$\begin{aligned} u\in \dot{W}^{1,\infty }_X(V ) \text{ and } \Vert H(x,Xu)\Vert _{L^\infty (V)}\le \lambda . \end{aligned}$$
(6.6)

Proof

We only need to prove \(u_j \rightarrow u\) in \(C^0(V)\). Note that (6.6) follows from this and Lemma 3.1.

Since \(u \in C^0(\overline{V})\) and \(\overline{V}\) is compact, u is uniform continuous in \(\overline{V}\), that is, for any \(\epsilon >0\), there exists \(h_\epsilon \in (0,\epsilon )\) such that for all

$$\begin{aligned} |u(x)-u(y)| \le \epsilon \quad \text{ whenever }\quad x,y \in \overline{V}\quad \text {with}\quad |x-y|<h_\epsilon . \end{aligned}$$
(6.7)

Recalling the assumption (H3), by (6.5) one has

$$\begin{aligned} \Vert |Xu_j(\cdot )|\Vert _{L^\infty (V)} \le R_\lambda \quad \forall j \in {\mathbb N}. \end{aligned}$$
(6.8)

By Lemma 2.7,

$$\begin{aligned} u_j(y)-u_j(x)\le R_\lambda d^V_{CC}(x,y ) \quad \forall x,y\in V. \end{aligned}$$

Given any \(K\Subset V\), recall from [41] that

$$\begin{aligned} d_{CC}^V(x,y)\le C(K,V)|x-y|^{1/k} \quad \forall x,y\in \overline{K}. \end{aligned}$$

It then follows

$$\begin{aligned} |u_j(y)-u_j(x)|\le R_\lambda C(K,V)|x-y|^{1/k} \quad \forall x,y\in \overline{K}. \end{aligned}$$

Given any \(\epsilon >0\), thanks to the density of \(\{x_i\}_{i\in {\mathbb N}}\) in V, one has \(\overline{K}\subset \cup _{x_i\in \overline{K}}B(x_i,h_\epsilon )\). By the compactness of \(\overline{K}\), we have

$$\begin{aligned} \overline{K}\subset \cup \{B(x_i,h_\epsilon ) \ | \ 1\le i\le i_K \ \text{ and } \ x_i\in \overline{K}\} \end{aligned}$$

for some \(i_K\in {\mathbb N}\). For any \(j\ge \max \{i_K,1/\epsilon \}\) and for any \(x\in \overline{K}\), choose \(1\le i\le i_K\) such that \(x_i\in \overline{K}\) and \(|x-x_i|\le h_\epsilon <\epsilon \). Thus \(| u(x_i)-u(x)|\le \epsilon \). By (6.4) we have \(| u_j(x_i)-u(x_i)|\le \frac{1}{j}\le \epsilon \). Thus

$$\begin{aligned} | u_j(x)-u(x)|\le | u_j(x)-u_j(x_i)|+ | u_j(x_i)-u(x_i)|+| u(x_i)-u(x)| \\ \le R_\lambda C(K,V)\epsilon ^{1/k}+ 2\epsilon . \end{aligned}$$

This implies that \(u_j\rightarrow u\) in \(C^0(\overline{K})\) as \(j\rightarrow \infty \). The proof is complete.\(\square \)

The following clarifies the relations between absolute minimizers and local super/subminimizers.

Lemma 6.4

Let \(U\Subset \Omega \) and \(g\in C^0(\partial U)\) with \(\mu (g,\partial U)<\infty \). Then a function \(u:\overline{U}\rightarrow {\mathbb R}\) is an absolute minimizer for \({ \textbf{I}}(g,U)\) if and only if it is both a local superminimizer and a local subminimizer for \({ \textbf{I}}(g,U)\).

Proof

If u is an absolute minimizer for \(\textbf{I}(g, U )\), then for every subdomain \(V \subset U\), u is a minimizer for \({ \textbf{I}}(u|_{\partial V},V)\). By Lemma 5.6, \({\mathcal S}_{u|_{\partial V}, V}^- \le u \le {\mathcal S}_{u|_{\partial V}, V}^+\), that is, u is both a local superminimizer and a local subminimizer for \({ \textbf{I}}(g,U)\).

Conversely, suppose that u is both a local superminimizer and a local subminimizer for \({ \textbf{I}}(g,U)\). We need to show that u is absolute minimizer for \(\textbf{I}(g,U)\). It suffices to prove that for any domain \(V\Subset U\), u is a minimizer for \(\textbf{I}(u, V )\), in particular, \(\Vert H(\cdot ,Xu (\cdot ))\Vert _{L^\infty (V)} \le \textbf{I}(u, V)\).

The proof consists of 3 steps.

Step 1. Given any subdomain \(V \subset U\), choose a dense subset \(\{x_j\}_{j \in {\mathbb N}}\) of V. Set \(V_j=V\setminus \{x_i\}_{1\le i\le j}\) and \(V_0=V\). Note that

$$\begin{aligned} \partial V_j=\partial V_{j-1}\cup \{x_j\}=\partial V_0\cup \{x_i\}_{1\le i\le j} \quad \forall j\in {\mathbb N}. \end{aligned}$$

For each \(j\ge 0\), set

$$\begin{aligned} \mu _j=\mu (u|_{\partial V_j},\partial V_j)=\inf \{\lambda \ge 0 | \ u(y) -u(x) \le d_\lambda ^{V_j}(x,y) \quad \forall x,y \in \partial V_j\}. \end{aligned}$$

Since \(\overline{V} \subset \overline{U}\), we have \(d_\mu ^U(x,y)\le d_\mu ^V(x,y)\) for all \( x,y\in \overline{V}^*\), we have

$$\begin{aligned} u(y) -u(x) \le d_\mu ^V(x,y) \quad \forall x,y \in \overline{V}. \end{aligned}$$

and hence \(\mu _0\le \mu \). By Lemma 5.7 (i), \(\textbf{I}(u, V_0)=\mu _0\). In a similar way and by induction, for all \(j\ge 0\), since \(V_{j+1}\subset V_j\), we have

$$\begin{aligned} \textbf{I}(u, V_{j+1})=\mu _{j+1}\le \mu _j=\textbf{I}(u, V_j)\le \mu _0=\textbf{I}(u, V_0)\le \mu =\textbf{I}(u, U). \end{aligned}$$
(6.9)

Step 2. We construct a sequence \(\{u_j\}_{j \in {\mathbb N}}\) of functions so that, for each \(j\in {\mathbb N}\),

$$\begin{aligned} u_j\in \dot{W}^{1,\infty }_X(V_j)\cap C^0(\overline{V}) \text{ and } \quad u_j(x )=u(x ) \quad \text {for any}\quad x\in \partial V_j= \partial V\cup \{x_i\}_{1\le i\le j} \end{aligned}$$
(6.10)

and

$$\begin{aligned} \Vert H(\cdot ,Xu_j(\cdot ))\Vert _{L^\infty (V_{j-1})}=\mu _{j-1}\quad \text {for any}\quad j \in {\mathbb N}. \end{aligned}$$
(6.11)

For any \(j \ge 1\), since u is both a local superminimizer and a local subminimizer for \({ \textbf{I}}(g,U)\), by Definition 6.1,

$$\begin{aligned} {\mathcal S}_{u|_{\partial V_{j-1}}, V_{j-1}}^- \le u \le {\mathcal S}_{u|_{\partial V_{j-1}}, V_{j-1}}^+ \text{ in } V_{j-1}. \end{aligned}$$

At \(x_{j}\), we have

$$\begin{aligned} a_{j}:={\mathcal S}^-_{u|_{\partial V_{j-1}},V_{j-1}}(x_{j}) \le u(x_{j}) \le b_{j}:={\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}}(x_{j}) \end{aligned}$$
(6.12)

Define \(u_{j}: \overline{V}_{j-1} =\overline{V} \rightarrow {\mathbb R}\) by

$$\begin{aligned} u_{j}:= \left\{ \begin{array}{lll} {\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}} &{} \quad \text {if} &{} \quad a_{j}=b_{j}, \\ \frac{u(x_{j})-a_{j}}{b_{j}-a_{j}}{\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}}+ (1-\frac{u(x_{j})-a_{j}}{b_{j}-a_{j}}){\mathcal S}^-_{u|_{\partial V_{j-1}},V_{j-1}} &{} \quad \text {if}&{}\quad a_{j}<b_{j}. \end{array} \right. \end{aligned}$$

To see (6.10), observe that Lemma 5.7 gives \(u_j\in \dot{W}^{1,\infty }_X(V_j)\cap C^0(\overline{V}) \). Moreover, for any \(x\in \partial V_j\), one has either \(x\in \partial V_{j-1}\) or \(x=x_j\). In the case \(x\in \partial V_{j-1}\), by Lemma 5.7one has

$$\begin{aligned} u_{j}(x)={\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}}(x) = {\mathcal S}^-_{u|_{\partial V_{j-1}},V_{j-1}}(x)= u(x). \end{aligned}$$

In the case \(x=x_{j}\), if \(a_{j}=b_{j}\), then (6.12) implies

$$\begin{aligned} u(x_{j}) = {\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}} (x_{j}) =b_{j}=u(x_{j}); \end{aligned}$$

if \(a_{j}<b_{j}\), then

$$\begin{aligned} u_{j}(x_{j})&=\frac{u(x_{j})-a_{j}}{b_{j}-a_{j}}{\mathcal S}^+_{u|_{\partial V_{j-1}},V_{j-1}} (x_{j})+ (1-\frac{u(x_{j})-a_{j}}{b_{j}-a_{j}}){\mathcal S}^-_{u|_{\partial V_{j-1}},V_{j-1}} (x_{j}) \\&= \frac{u(x_{j})-a_{j}}{b_{j}-a_{j}} b_{j} + (1-\frac{u(x_{j})-a_{j}}{b_{j}-a_{j}})a_{j} \\&= u(x_{j}). \end{aligned}$$

To see (6.11), applying Lemma 5.7(iii) with \(t=\frac{u(x_{j})-a_{j}}{b_{j}-a_{j}}\), we deduce that \(u_{j}\) is a minimizer for \(\textbf{I}(u|_{\partial V_{j-1}},V_{j-1})\), that is,

$$\begin{aligned} \Vert H(\cdot ,Xu_{j}(\cdot )) \Vert _{L^\infty (V_{j-1})} = \textbf{I}(u|_{\partial V_{j-1}},V_{j-1})=\mu _{j-1}. \end{aligned}$$
(6.13)

Step 3. We show that, for all \(j \in {\mathbb N}\),

$$\begin{aligned} u_j(z)-u_j(y) \le d^V_{\mu }( y,z) \quad \forall y,z \in V. \end{aligned}$$
(6.14)

Note that, by Corollary 5.1 in V, (6.14) yields that \(u_j \in \dot{W}^{1,\infty }_X(V)\) and \(\Vert H(x,Xu_j)\Vert _{L^\infty (V)}\le \mu \). Applying Lemma 6.3 to \(\{u_j\}_{j\in {\mathbb N}}\) and u, we conclude that \(u\in \dot{W}^{1,\infty }_X(V)\) and \(\Vert H(x,Xu )\Vert _{L^\infty (V)}\le \mu \) as desired.

To see (6.14), using (6.11) and Corollary 5.1 in \(V_{j-1}\), we have

$$\begin{aligned} u_j(z)-u_j(y) \le d^{V_{j-1}}_{\mu _{j-1}}(y,z) \quad \forall y,z \in V_{j-1}. \end{aligned}$$

Thus (6.9) implies

$$\begin{aligned} u_j(z)-u_j(y) \le d^{V_{j-1}}_{\mu }(y,z) \quad \forall y,z \in V_{j-1}. \end{aligned}$$

Thanks to Lemma 5.4 we have \(d^{V_{j-1}}_{\mu }=d_\mu ^V\) in \(V\times V\) and hence

$$\begin{aligned} u_j(z)-u_j(y) \le d^V_{\mu }(y,z) \quad \forall y,z \in V_{j-1}. \end{aligned}$$

By the continuity of \(u_j\) in \(\overline{V}\) we have (6.14) and hence finish the proof.\(\square \)

Finally, using Perron’s approach, we obtain the existence of absolute minimizers.

Proposition 6.5

Let \(U\Subset \Omega \) and \(g\in C^0(\partial U)\) with \(\mu (g,\partial U)<\infty \). Define

$$\begin{aligned} U^+_g(x):=\sup \{u(x) | u :\overline{U}\rightarrow {\mathbb R}\text { is a local subminimizer for}\quad { \textbf{I}}(g,U) \}\quad \forall x\in \overline{U} \end{aligned}$$
(6.15)

and

$$\begin{aligned} U^-_g(x):=\inf \{u(x) | u :\overline{U}\rightarrow {\mathbb R}\ \text { is a local superminimizer for } { \textbf{I}}(g,U) \}\quad \forall x\in \overline{U}. \end{aligned}$$

Then \(U^\pm _g\) are absolute minimizers for \({ \textbf{I}}(g,U)\).

Proof

We only show that \(U^+_g\) is an absolute minimizer for \({ \textbf{I}}(g,U)\); similarly one can prove that \(U^-_g\) is also an absolute minimizer for \({ \textbf{I}}(g,U)\). Thanks to Lemma 6.4, it suffices to show that \(U^+_g\) is a minimizer for \(\textbf{I}(g,U)\), a local subminimizer for \(\textbf{I}(g,U)\) and a local superminimizer for \(\textbf{I}(g,U)\). Note that \(\textbf{I}(g,U)=\mu (g,\partial U)<\infty . \)

Prove that \(U^+_g\) is a minimizer for \(\textbf{I}(g,U)\). Firstly, since any local subminimizer w for \(\textbf{I}(g,U)\) is a minimizer for \(\textbf{I}(g,U)\). We know

$$\begin{aligned} w \in \dot{W}^{1,\infty }_{X }(U) \cap C^0(\overline{U}), \ w|_{\partial U} =g, \text{ and } \Vert H(\cdot , Xw(\cdot ))\Vert _{L^\infty (U)} = \textbf{I}(g,U)<\infty . \end{aligned}$$

Recalling the assumption (H3), we have \( \Vert |Xw |\Vert _{L^\infty (U)} \le R_{\textbf{I}(g,U)} \) and hence \(w\in {\mathrm {\,Lip}}_{d_{CC}}( \overline{U})\) with \({\mathrm {\,Lip}}_{d_{CC}}(w,\overline{U})\le R_{\textbf{I}(g,U)}\). By a direct calculation, one has

$$\begin{aligned} U_g^+\in {\mathrm {\,Lip}}_{d_{CC}}( \overline{U})\quad \text {with} {\mathrm {\,Lip}}_{d_{CC}}(U^+_g,\overline{U})\le R_{\textbf{I}(g,U)} \text {and}\quad U_g^+|_{\partial U}= g. \end{aligned}$$
(6.16)

Next, let \(\{x_i\}_{i \in {\mathbb N}}\) be a dense set of U. For any \(i,j\in {\mathbb N}\), by the definition of \(U_g^+\), there exists a local subminimizer \(u_{ij} \) for \(\textbf{I}(g,U)\) such that

$$\begin{aligned} u_{ij} (x_i) \ge U^+_g(x_i) - \frac{1}{j}. \end{aligned}$$

Note that, by Definition 6.1, \(u_{ij}\) is also a minimizer for \({ \textbf{I}}(g,U)\).

Moreover, for each \(j\in {\mathbb N}\), write

$$\begin{aligned} u_j := \max \{u_{ij} \}_{1\le i\le j}. \end{aligned}$$

Lemma 5.7(iii) implies that \(u_j\) is a minimizer for \(\textbf{I}(g,U)\) and hence

$$\begin{aligned} u_j \in \dot{W}_X^{1,\infty }(U) \text{ and } \Vert H(\cdot ,Xu_j(\cdot ))\Vert _{L^\infty (U)} \le \textbf{I}(g,U) \quad \forall j \in {\mathbb N}. \end{aligned}$$
(6.17)

For \(1\le i\le j\), from the definition of \(U_g^+\), it follows that

$$\begin{aligned} \quad U^+_g(x_i) \ge u_j(x_i) \ge U^+_g(x_i) - \frac{1}{j} . \end{aligned}$$
(6.18)

Finally, combining (6.16), (6.17) and (6.18), we are able to apply Lemma 6.3 to \(U_g^+\) and \(\{u_j\}_{j \in {\mathbb N}}\) so to get

$$\begin{aligned} u_j \rightarrow U^+_g \text{ in } C^0(U), \ U^+_g \in \dot{W}^{1,\infty }_{X }(U) \text{ and } \Vert H(\cdot ,XU^+_g)\Vert _{L^\infty (U)}\le \textbf{I}(g,U). \end{aligned}$$
(6.19)

Hence

$$\begin{aligned} \Vert H(\cdot ,XU^+_g)\Vert _{L^\infty (U)}= \textbf{I}(g,U). \end{aligned}$$

Together with (6.16) yields that \(U^+_g\) is a minimizer for \(\textbf{I}(g,U)\).

Prove that \(U^+_g\) is a local subminimizer for \(\textbf{I}(g,U)\).

We argue by contradiction. Assume on the contrary that \(U^+_g\) is not a local subminimizer for \(\textbf{I}(g,U)\). Then, by definition, there exists a subdomain \(V \subset U\), and some \(x_0\) in V such that

$$\begin{aligned} U^+_g(x_0) > {\mathcal S}_{h^+,V}^+(x_0), \end{aligned}$$

where \({\mathcal S}_{h^+,V}\) is the McShane extension in V of \(h^+=U^+_g|_{\partial V}\). By the definition of \(U^+_g\), there exists a local subminimizer u for \(\textbf{I}(g,U)\) such that

$$\begin{aligned} U^+_g(x_0)\ge u(x_0) > {\mathcal S}_{h^+,V}^+(x_0). \end{aligned}$$
(6.20)

The definition of \(U^+_g\) also gives

$$\begin{aligned} u\le U^+_g \text{ in } \quad U. \end{aligned}$$
(6.21)

Define

$$\begin{aligned} E := \{x\in \overline{V} \ | \ u(x) > {\mathcal S}_{h^+,V}^+(x)\}. \end{aligned}$$

Since both u and \({\mathcal S}_{h^+,V}^+\) are continuous, E is an open subset of \(\overline{V}\). Since

$$\begin{aligned} U^+_g = {\mathcal S}_{h^+,V}^+ \text{ on } \partial V, \end{aligned}$$

by (6.21), we infer that \(u \le {\mathcal S}_{h^+,V}^+ \text{ on } \partial V\) and hence \(E \subset V.\) Obviously, \(x_0\in E\). Denote by \(E_0\) the component of E containing \(x_0\).

Recalling that u is a local subminimizer for \(\textbf{I}(g,U)\), by Definition 6.1, we have \(u \le {\mathcal S}_{u|_{\partial E_0}, E_0}^+\) in E. Since \(x_0 \in E_0\), we have \( {\mathcal S}_{u|_{\partial E_0}, E_0}^+(x_0) \ge u(x_0 ),\) which, combined with (6.20), gives

$$\begin{aligned} {\mathcal S}_{u|_{\partial E_0}, E_0}^+(x_0) \ge u(x_0 ) > {\mathcal S}_{h^+,V}^+(x_0). \end{aligned}$$
(6.22)

On the other hand, we are able to apply Lemma 6.2 with \((U,V,g, h=\mathcal {S}_{g;U}^+|_{\partial V} )\) therein replaced by \((V,E_0, h^+, h= {\mathcal S}^+_{h^+,V}| _{E_0})\) here and then obtain

$$\begin{aligned} {\mathcal S}_{h^+, E_0}^+ \le {\mathcal S}_{h^+,V}^+ \text{ in } \quad E_0. \end{aligned}$$

Since \(u|_{E_0}= {\mathcal S}^+_{h^+,V}| _{E_0}=h\), at \(x_0 \in E\), we arrive at

$$\begin{aligned} {\mathcal S}_{u|_{\partial E_0}, E_0}^+(x_0) \le {\mathcal S}_{h^+,V}^+(x_0). \end{aligned}$$
(6.23)

Note that (6.22) contradicts with (6.23) as desired.

Prove that \(U^+_g\) is a local superminimizer for \(\textbf{I}(g,U)\). By definition, it suffices to prove that, for any given subdomain \(V \subset U\), we have \({\mathcal S}_{h^+, V}^-\le U^+_g\) in V, where we write \(h^+=U^+_g|_{\partial V}\).

To this end, define \(u^+\) as in (5.13) with u therein replaced by \(U^+_g\), that is,

$$\begin{aligned} u^+:= \left\{ \begin{array}{lll} {\mathcal S}_{h^+, V}^- &{} \quad \text {in} &{} \quad V \\ U^+_g &{} \quad \text {in} &{} \quad \overline{U} \backslash V. \end{array} \right. \end{aligned}$$
(6.24)

Then \(u^+\) is a minimizer for \(\textbf{I}(g,U)\). Indeed, since \(U^+_g\) is a minimizer for \(\textbf{I}(g,U)\), we know that \(U^+_g\) satisfies (5.12) with \(\mu =\textbf{I}(g,U)\) therein. This allows us to apply Lemma 5.9 with \(u= U^+_g\) therein and then conclude that \(u^+\in \dot{W}^{1,\infty }_X(U)\cap C^0(U)\), \(u^+=U^+_g =g\) on \(\partial U\), and \(\Vert H(x,Xu^+ )\Vert \le \textbf{I}(g,U) \). Therefore, by definition of \(\textbf{I}(g,U) \), \(\Vert H(x,Xu^+ )\Vert = \textbf{I}(g,U) \), and hence \(u^+\) is a minimizer for \(\textbf{I}(g,U)\).

We further claim that

$$\begin{aligned} u^+ \text { is a local subminimizer for }\textbf{I}(g,U). \end{aligned}$$
(6.25)

Assume that this claim holds. Choosing \(u^+\) as a test function in the definition of \(U^+_g\) in (6.15), we know that

$$\begin{aligned} U^+_g \ge u^+ \text{ in } \quad U. \end{aligned}$$

and in particular \(U^+_g \ge {\mathcal S}_{h^+, V}^- \) in V as desired.

Proof the claim (6.25).

To get (6.25), by Definition 6.1, we still need to show for any subdomain \(B \subset U\),

$$\begin{aligned} u ^+\le {\mathcal S}_{u^+|_{\partial B},B}^+ \text { in }\quad B. \end{aligned}$$
(6.26)

To prove (6.26), we argue by contradiction. Assume that (6.26) is not correct, that is,

$$\begin{aligned} W := \{x \in B \ | \ u^+(x) > {\mathcal S}_{u^+|_{\partial B},B}^+ (x)\}\ne \emptyset . \end{aligned}$$
(6.27)

Up to considering some connected component of W, we may assume that W is connected. Note that

$$\begin{aligned} u^+ = {\mathcal S}_{u^+|_{\partial B},B}^+\hbox { on }\partial W. \end{aligned}$$
(6.28)

Consider the set

$$\begin{aligned} D := \{x \in B \ | \ U^+_g(x) > {\mathcal S}_{u^+|_{\partial B},B}^+ (x)\}. \end{aligned}$$
(6.29)

By continuity, both of W and D are open.

Below, we consider two cases: \(D=\emptyset \) and \(D\ne \emptyset \).

Case \(D=\emptyset \). If D is empty, then we always have \(U^+_g \le {\mathcal S}_{u^+|_{\partial B},B}^+\) in B. Thus

$$\begin{aligned} U^+_g \le {\mathcal S}_{u^+|_{\partial B},B}^+< u^+\text { in }W. \end{aligned}$$

Since \(U^+_g=u^+\in \overline{U}\setminus V\), this implies

$$\begin{aligned} W \subset V. \end{aligned}$$
(6.30)

Since \(u^+= {\mathcal S}_{h^+, V}^-\) in \(\overline{V}\) and \(W \subset V\) gives \( \partial W \subset \overline{V}\), we have

$$\begin{aligned} u^+= {\mathcal S}_{h^+, V}^-\text { on }\partial W. \end{aligned}$$
(6.31)

Moreover, by Lemma 6.2, we know that \( {\mathcal S}_{h^+, V}^-\) with \(h^+=U^+_g|_{\partial V}\) is a local subminimizer for \(\textbf{I}(U^+_g,V)\). By the definition of local subminimizer, and by \(W\subset V\), we have

$$\begin{aligned} {\mathcal S}_{h^+, V}^- \le {\mathcal S}_{u^+|_{\partial W}, W}^+ \quad \text {in } W, \end{aligned}$$
(6.32)

where we recall \({\mathcal S}_{h^+, V}^-|_{\partial W}=u^+|_{\partial W}\) from (6.31).

Applying Lemma 6.2 with \((U,V,g,h^+)\) therein replaced by \((B,W, u^+|_{\partial B}, {\mathcal S}_{u^+|_{\partial B},B}^+|_{\partial W})\) here, recalling \({\mathcal S}_{u^+|_{\partial B},B}^+|_{\partial W}=u^+|_{\partial W}\) from (6.28), we obtain

$$\begin{aligned} {\mathcal S}_{u^+|_{\partial W}, W}^+ \le {\mathcal S}_{u^+|_{\partial B},B}^+ \text{ in }\quad W. \end{aligned}$$
(6.33)

Combing (6.32) and (6.33), by \(W\subset V\), one arrives at

$$\begin{aligned} u^+= {\mathcal S}_{h^+, V}^- \le {\mathcal S}_{u^+|_{\partial B},B}^+ \text{ in } W, \end{aligned}$$

which contradicts with (6.27).

Case \(D\ne \emptyset \). Up to considering some connected component of D, we may assume that D is connected. By the definition of D in (6.29), we infer that

$$\begin{aligned} U^+_g = {\mathcal S}_{u^+|_{\partial B},B}^+ \text{ on } \quad \partial D. \end{aligned}$$
(6.34)

Since \(U^+_g\) is a local subminimizer for \(\textbf{I}(g,U)\) as proved above, we know

$$\begin{aligned} U^+_g \le {\mathcal S}_{U^+_g|_{\partial D},D}^+ \text { in } D. \end{aligned}$$
(6.35)

Applying Lemma 6.2 with \((U,V,g,h^+)\) therein replaced by \((B,D, u^+|_{\partial B}, {\mathcal S}_{u^+|_{\partial B},B}^+|_{\partial D}) \), recalling \({\mathcal S}_{u^+|_{\partial B},B}^+|_{\partial D}=U^+_g |_{\partial D}\) from (6.34), we obtain

$$\begin{aligned} {\mathcal S}_{U^+_g |_{\partial D}, D}^+ \le {\mathcal S}_{u^+|_{\partial B},B}^+ \text{ in }\quad D. \end{aligned}$$
(6.36)

Combining (6.35) and (6.36), we deduce

$$\begin{aligned} U^+_g \le {\mathcal S}_{u^+|_{\partial B},B}^+ \text{ in } \quad D. \end{aligned}$$

Recalling (6.29), this contradicts with \(D\ne \emptyset \). The proof is complete. \(\square \)

Theorem 1.6 is now a direct consequence of the above series of results.

Proof of Theorem 1.6

Let \(g\in {\mathrm {\,Lip}}_{d_{CC}} (\partial U)\). It suffices to show that \(\mu (g,\partial U)<\infty \), which allows us to use Proposition 6.5 and then conclude the desired absolute minimizer \(U_g^+ \) therein.

Taking \(0<\lambda <\infty \) such that \(R_\lambda ' \ge {\mathrm {\,Lip}}_{d_{CC}}(g,\partial U)\), we have

$$\begin{aligned} g(y) -g(x) \le R_\lambda '{d_{CC}}(x,y) \quad \forall x,y \in \partial U. \end{aligned}$$

From Lemma 2.9 (ii), that is, \(R'_\lambda d_{CC} \le d^U_\lambda ,\) it follows that

$$\begin{aligned} g(y) -g(x) \le d_\lambda ^U(x,y) \quad \forall x,y \in \partial U. \end{aligned}$$

and hence that

$$\begin{aligned} \mu (g,\partial U) = \inf \{\mu \ge 0 \ | g(y) -g(x) \le d_\mu (x,y)\} \le \lambda <\infty . \end{aligned}$$

The proof is complete.\(\square \)

7 Further discussion

Note that Rademacher type Theorem 1.3 is a cornerstone when showing the existence of absolute minimizers. Indeed, Champion and Pascale [14] and Guo-Xiang-Yang [26] established partial results similar to Theorem 1.3 for a special class of Hamiltonians considered in this paper to show the existence of absolute minimizers. However, their method seems to be invalid for more general Hamiltonians considered in this paper. We briefly explain the reason below.

Remark 7.1

Champion and Pascale [14] showed the McShane extension is a minimizer for H when H is lower semi-continuous on \(U \times {{{\mathbb R}}^n}\). In fact, they defined another intrinsic distance induced by H(xp). For every \(\lambda \ge 0\),

$$\begin{aligned} L_\lambda (x,q):=\sup _{\{p\in H_\lambda (x)\}} p\cdot q, \quad \forall \ x\in \overline{U} \ \text{ and } \ q\in {{{\mathbb R}}^m}. \end{aligned}$$

where \(H_\lambda (x)\) is the sub-level set at x, namely, \(H_\lambda (x)=\{p \in {\mathbb R}^m \mid H(x,p) \le \lambda \}\).

For \(0\le a<b\le +\infty \), let \({\gamma }:[a,\,b]\rightarrow \overline{U}\) be a Lipschitz curve, that is, there exists a constant \(C>0\) such that \(|{\gamma }(s)-{\gamma }(t)|\le C|s-t|\) whenever \(s,t\in [a,b]\). The \(L_\lambda \)-length of \({\gamma }\) is defined by

$$\begin{aligned} \ell _\lambda ({\gamma }):= \int _a^bL_\lambda \left({\gamma }(\theta ),{\gamma }'(\theta )\right)\,d\theta , \end{aligned}$$

which is nonnegative, since \(L_\lambda (x,q)\ge 0\) for any \(x\in \overline{U}\) and \(q\in {{{\mathbb R}}^n}\). For a pair of points \(x,\,y\in \overline{U}\), the \(\overline{d}_{\lambda }\)-distance from x to y is defined by

$$\begin{aligned} \overline{d}_{\lambda }(x,y):= \inf \Big \{\ell _\lambda ({\gamma })\ |\ \gamma \in \mathcal C(a,b,x,y, \overline{U})\Big \}. \end{aligned}$$

Then, they prove two intrinsic pseudo-distance are equal, that is

$$\begin{aligned} d_\lambda (x,y)=\overline{d}_{\lambda }(x,y) \quad \text {for any} \ \lambda >0 \ \text {and for any} \ x,y \in \overline{U}. \end{aligned}$$
(7.1)

Thanks to the definition of \(\overline{d}_{\lambda }\), they can justify (i)\(\Leftrightarrow \)(ii) in Rademacher type Theorem 1.3.

However, when asserting (7.1), we will meet obstacles in generalizing [14] Proposition A.2 since we are faced with measurable H.

On the other hand, Guo-Xiang-Yang [26] provided another method to identify a weak version of (7.1) for measurable Finsler metrics H, that is

$$\begin{aligned} \lim _{y \rightarrow x}\frac{d_\lambda (x,y)}{\widetilde{d}_\lambda (x,y)}=1 \quad \text {for any} \ \lambda >0 \ \text {and for any} \ x,y \in \overline{U}. \end{aligned}$$
(7.2)

Here \(\widetilde{d}_\lambda \) induced by measurable Finsler metrics H is defined in the following way.

$$\begin{aligned} \widetilde{d}_\lambda (x,y):= \sup _N\inf \Big \{\ell _\lambda ({\gamma })\ |\ \gamma \in \Gamma _N(a,b,x,y, \overline{U})\Big \} \end{aligned}$$
(7.3)

where the supremum is taken over all subsets N of \( \overline{U}\) such that \(|N| = 0\) and \(\Gamma _N(a,b,x,y, U)\) denotes the set of all Lipschitz continuous curves \({\gamma }\) in \( \overline{U}\) with end points x and y such that \(\mathcal H^1(N \cap {\gamma }) = 0\) with \(\mathcal H^1\) being the one dimensional Hausdorff measure.

In fact, (7.2), combined with the method in [14] will be sufficient for validating (i)\(\Leftrightarrow \)(ii) in Rademacher type Theorem 1.3. Unfortunately, since we are coping with Hörmander vector field, a barrier arises when modifying their proofs. Indeed, their method uses a result by [16] that every x-measurable Hamiltonian H can be approximated by a sequence of smooth Hamiltonians \(\{H_n\}_n\) such that two intrinsic distances \(\widetilde{d}_\lambda ^{H_n}\) and \(d_\lambda ^{H_n}\) induced by \(H_n\) by means of (7.3) and (1.4) satisfy \( \lim _{n \rightarrow \infty }d_\lambda ^{H_n} = d_\lambda \) and \( \limsup _{n \rightarrow \infty }\widetilde{d}_\lambda ^{H_n} \le \widetilde{d}_\lambda \) uniformly on \( U\times U\) respectively. The process of the proof of [16] is based on a \(C^1\) Lusin approximation property for curves. Namely, given a Lipschitz curve \({\gamma }: \ [0,1] \rightarrow U\) joining x and y, for any \(\epsilon >0\), there exists a \(C^1\) curve \(\widetilde{{\gamma }}: \ [0,1] \rightarrow U\) with the same endpoints such that

$$\begin{aligned} \mathcal {L}^1 ( \{t \in [0,1] \ | \ \widetilde{{\gamma }}(t) \ne {\gamma }(t) \quad \text {or} \quad \widetilde{{\gamma }}'(t)\ne {\gamma }'(t)\})<\epsilon \end{aligned}$$

where \(\mathcal {L}^1\) denotes the one dimensional Lebesgue measure. Besides,

$$\begin{aligned} \Vert \widetilde{{\gamma }}\Vert _{L^\infty } \le c\Vert {\gamma }\Vert _{L^\infty }, \end{aligned}$$

for some constant c depending only on n. Although this version of \(C^1\) Lusin approximation property holds for horizontal curves in Heisenberg groups ([43]) and step 2 Carnot groups ([39]), it fails for some horizontal curve in Engel group ([43]).

In summary, it is difficult to generalize the properties of the pseudo metric \(\widetilde{d}_\lambda \) not only from Euclidean space to the case of Hörmander vector fields but also from lower-semicontinuous H(xp) to measurable H(xp). Hence we would like to pose the following open problem.

Problem 7.2

Under the assumptions (H0)-(H3), does (7.2) holds?