{'fraction_non_alphanumeric': 0.07264731168573507, 'fraction_numerical': 0.014879968256067721, 'mean_word_length': 3.3204285714285713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Eikonal equations on ramified spaces

We generalize the results in [16] to higher dimensional ramified spaces. For this purpose we introduce ramified manifolds and, as special cases, locally elementary polygonal ramified spaces (LEP spaces). On LEP spaces we develop a theory of viscosity solutions for Hamilton-Jacobi equations, providing existence and uniqueness results.


Introduction
In [15], [16] a theory of viscosity solution for Hamilton-Jacobi equations of eikonal type on topological networks was developed providing existence, uniqueness and stability results. In this paper we generalize these results to higher dimensional ramified spaces.
In literature, many different ways of introducing ramified spaces (cf. [11], [13], [14]) or branched manifolds (cf. [17]) are available. The definitions vary in different aspects, depending on the kind of theory to be developed. In a general approach, subsets of classic differentiable manifolds are glued together along parts of their boundaries by means of the topological gluing operation. Another, more specific, definition requires the uniqueness of the tangent space at ramification points (cf. [17]) by describing how the branches should be situated relatively to each other in the ambient space.
Here we choose an approach which is very similar to the concept of a manifold with boundary. The basic idea is that, in contrast to classic topological manifolds, besides points at which it is locally homeomorphic to an Euclidean space (simple points), a ramified topological manifold may also contain ramification points at which it is locally homeomorphic to some kind of "Euclidean ramified space". The latter, called elementary ramified space, can be visualized as a collection of closed Euclidean half spaces glued together at their boundary hyperplanes. Consequently, small neighborhoods of a given ramification point split up into different branches corresponding to the branches of the homeomorphic elementary ramified space. If we endow these ramified topological manifolds with suitable differentiable structures, then we end up with an extension of the concept of tangent space at ramification points. This generalization should have the property that a real function defined in a neighborhood of a ramification point can be differentiated in the direction of each branch (of course, incident at the ramification point). In other words, each branch contributes a different tangent space.
Once we have introduced the differentiable structure on ramified spaces, we will see that for each of the branches emanating from a fixed ramification point x, a normal direction at x on this branch is well-defined. The possibility to differentiate in the normal directions at ramification points is crucial for our theory, as it will turn out that a general definition of viscosity solutions on ramified manifolds depends on this very possibility. In fact, the notion of viscosity solutions introduced in [15], [16] differs from its classical origin by the transition conditions we have additionally imposed at ramification points. The concept of (j, k)-test functions (see definition 3.7) allows us to ignore the ramification set by treating two branches as a single connected one; indeed, the (j, k)-differentiability links the two derivatives of a function with respect to a given pair of branches which are incident at the same ramification point. It suggests itself to apply this pattern in case of manifolds of dimension n which have a certain manifold of dimension n − 1 in common, as long as this manifold is smooth enough to ensure that we have well-defined normal derivatives with respect to each incident branch manifold.
In order not to get lost in too general approaches, we restrict ourselves to a rather simple, but still sufficiently general, kind of ramified manifolds, the so-called locally elementary polygonal ramified spaces (briefly, LEP spaces), which are characterized by two main criteria: on the one hand, LEP spaces are ramified spaces in the sense of Lumer [11] (see definition 2.1) meeting the additional requirement that each branch is a flat n-dimensional submanifold of R n+1 . On the other hand, they are ramified manifolds in the sense described above. Hence they can be visualized as polygonal subsets of hyperplanes in R n+1 which are glued together along certain edges, with the restriction that corner points cannot occur. The term "locally elementary" refers to the fact that they are locally homeomorphic to an open subset either of a n-dimensional Euclidean space or of an elementary ramified space. Once the notion of viscosity solutions has been correctly extended to LEP spaces, the development of the theory follows the line of the one devised for topological networks in [16]. Consequently we prove a comparison principle giving the uniqueness of the continuous viscosity solution. Moreover we show existence of the viscosity solution via an adaptation of the Perron's method and we also provide a representation formula for the solution of the Dirichlet problem.
We mention that Hamilton-Jacobi equation and viscosity solutions on differentiable manifolds have been studied in [2], [12]. The theory of linear and semilinear differential equations on nonsmooth manifolds such as ramified spaces has been developed, since the seminal paper [11], in a large extent [9] and it is currently an active field of research ([10], [6]). For fully nonlinear equations such as Hamilton-Jacobi equations, the theory is at the beginning and, besides [16] and the companion paper [5], different approaches have been pursued for the case of networks in the recent papers [1] and [8] and for stratified domains in [4] . The present paper can been seen as a first attempt to extend the theory of viscosity solutions to general ramified spaces.
The paper is organized as follows. In section 2 we introduce the definition and give various examples of ramified spaces. In section 3 we study the differential structure of a ramified space. Section 4 is devoted to the notion of viscosity solution, while in section 5 and 6 we prove uniqueness and, respectively, existence of a viscosity solution. In section 7 we consider the Dirichlet problem and we obtain a representation formula for its solution.

Ramified spaces
In this section we introduce the geometric objects we will study in this paper. The general definition of ramified space is due to Lumer [11].
Definition 2.1. Let R ⋆ be a non-empty, locally compact space with a countable basis. Let L = {R j } j∈J be a countable family of non empty open subsets R j of R ⋆ and let N ⋆ E be a closed, possible empty, subset of N ⋆ := R ⋆ \ ∪ j∈J R j with the property that it contains each point of N ⋆ which is contained in the boundary of exactly one R j . Then R : We also consider polygonal ramified space.
We give some examples of ramified spaces and polygonal ramified space.
Example 2.1. A topological network is a collection of pairwise different points in R n connected by continuous, non self-intersecting curves. More precisely (see [16]), let V = {v i , i ∈ I} be a finite collection of pairwise different points in R n and let {π j , j ∈ J} be a finite collection of continuous, non self-intersecting curves in R n given by π j : [0, l j ] → R n , l j > 0, j ∈ J. Defined e j := π j ((0, l j )),ē j := π j ([0, l j ]) and E := {e j : j ∈ J}, assume that i) π j (0), π j (l j ) ∈ V for all j ∈ J, ii) #(ē j ∩ V ) = 2 for all j ∈ J, iii)ē j ∩ē k ⊂ V , and #(ē j ∩ē k ) ≤ 1 for all j, k ∈ J, j = k. iv) For all v, w ∈ V there is a path with end-points v and w (i.e. a sequence of edges {e j } N j=1 such that #(ē j ∩ē j+1 ) = 1 and v ∈ē 1 , w ∈ē N ). ThenΓ := j∈Jē j ⊂ R n is called a (finite) topological network in R n . A topological network is a ramified space with R ⋆ = V ∪ E, R j = e j , N ⋆ = V , N ⋆ E any subset of V containing all the vertices with only one incident edge and N R = N ⋆ \ N ⋆ E . Example 2.2. Let Γ be a topological network as in Example 2.1. For v ∈ V , set deg(v) the number of the arc e j , j ∈ J, incident at the vertex v and defineΓ = Γ \ {v ∈ V : deg(v) = 1}. Then for n ≥ 2, the set M :=Γ × R n−1 is called a n-dimensional topological network ( [14]). In this case If the edges {e j } j∈J of a topological network Γ are segments, then Γ and the corresponding n-dimensional topological networks defined as in example 2.2 are polygonal ramified spaces in the sense of definition 2.2. See figure 1.

Example 2.3.
Let Ω ⋆ be the surface of the (n + 1)-dimensional cube C n+1 ⊂ R n+1 and let Ω j , j = 1, . . . , 2(n+1), be its open faces. Furthermore let ∂Ω := N ⋆ E be any closed (possible empty) subset of the union of the edges of the cube with the property that Ω = Ω ⋆ \ N ⋆ E is connected. Then Ω := Ω ⋆ \ N ⋆ E is a polygonal ramified space.
An important example of ramified space is the elementary ramified space, since it is the space of the parameters for LEP spaces and ramified manifolds we will define in the following. Definition 2.3. Given n ≥ 1 and r ≥ 2, a n-dimensional elementary ramified space of order r, denoted by R n r , is the union of r half spaces R n r,j , j ∈ {1, . . . , r}, of dimension n which are included in R n+1 and have R n−1 in common.
, then we can identify R n r and R n r,j with R n r = (R n ≥0 × {1, . . . , r})/ℜ R n r,j = {(x, j) : x ∈ R n ≥0 } where ℜ is the equivalence relation which for each choice of x ′ ∈ R n−1 identifies the points ((0, x ′ ), j) ∈ R n j for j ∈ {1, . . . , r}. The set R n r,j is said the (closed) j-branch of R n r while the set . . , r}} is called the ramification space of R n r . Endowed with the topology induced by the path distance, R n r is a connected, separable, locally compact topological space. Observe that R n r can be identified with R n if r = 2. In order to give the definition of ramified manifolds, we need to introduce the notion of diffeomorphism on R n r . Definition 2.4. 1) Let U ⊂ R n r be an open set and f : U → R m . Then, for 1 ≤ l ≤ ∞, f is said C l -differentiable at x ∈ U if the following holds: i) If x ∈ R n r,j \ Σ n r , for some j ∈ {1, . . . , r}, then f is l times continuously differentiable at x in the standard sense. ii) If x ∈ Σ n r , then for each j ∈ {1, . . . , r}, there is a domain V j ⊂ R n and f j ∈ C l (V j , R m ) such that x ∈ V j and f j ≡ f on V j ∩ R n r,j (having identified R n r,j with R n ≥0 ). 2) Let U, V ⊂ R n r be open sets and ϕ : U → V an homeomorphism. Then ϕ is said a diffeomorphism if for all j ∈ {1, . . . , r} the respective restrictions of ϕ and ϕ −1 to R n r,j ∩ U and to R n r,j ∩ V are C ∞ -differentiable. We are now ready to give the definition of topological ramified manifold and differentiable ramified manifold.
Definition 2.5. A set M is called a n-dimensional topological ramified manifold if it is endowed with a Hausdorff topology and if for any The set of all ramification points is denoted by Σ and it is called ramification space of M. If x ∈ Σ, we set Inc x := {j ∈ J : x ∈ ∂Ω j }.
Remark 2.1. Observe that, since R n 2 can be identified with R n , topological ramified manifolds are locally homeomorphic to a n-dimensional Euclidean space at simple points. Definition 2.6. A set M is called a n-dimensional differentiable ramified manifold if M is a n-dimensional topological ramified manifold and there is a family of local charts are open in R n r(α) and R n r(α ′ ) , respectively. Moreover the map ϕ : iii) The family {U α , X α } is maximal with respect to the conditions i) and ii).
We introduce a class of flat ramified manifolds.
Definition 2.7. A n-dimensional polygonal ramified space Ω (see definition 2.2) is called locally elementary if it is also a differentiable manifold. Locally elementary ramified space will be called LEP spaces in the following.
Example 2.4. Topological networks and n-dimensional topological networks are topological ramified manifolds. If the maps {π j } j∈J in the definition of Γ are diffeomorphisms, they are also differentiable ramified manifolds. If the edges {e j } j∈J of Γ are segments, a n-dimensional topological network is a LEP space.
The set of ramification points Σ is given by Example 2.5. The cube in the example 2.3 is not locally homeomorphic to an elementary ramified space at the corner points. It is a LEP space if all the 2 n corner points are contained in N ⋆ E = ∂Ω. 3. The differential structure of a ramified manifold In this section we extend the notion of tangent space to a differentiable ramified manifold. In fact, the interpretation of tangent vectors as equivalence classes of curves in M can be easily transferred to ramification points.
Throughout this section, M and Σ stand respectively for a n-dimensional differentiable ramified manifold and for its ramification set. Let us now introduce some definitions regarding the differential structure of M.
Definition 3.2. Let x ∈ Σ and r = r(x). Let γ : (−ǫ, ǫ) → M with γ(0) = x be a continuous curve and j ∈ {1, . . . , r}. We say that γ reaches x from the branch j whenever there exists a chart (U, X) with x ∈ U and δ > 0 such that We denote by C j (x) the set of all the curves reaching x from the branch j and we set where the derivatives are left-sided. We denote the set of equivalence classes by T x M, the tangent space of M at x, and we say that ξ ∈ T x M is a j-tangent vector at x, 1 ≤ j ≤ r, if ξ contains a curve reaching x from the branch j. We set The set of all j-tangent vectors at x (j-tangent space at x) is denoted by T j x M. The set T x Σ := ∩ j T j x M is called the Σ-tangent space at x and any ξ ∈ T x Σ is said a Σ-tangent vector at x.
We consider the case of an elementary ramified space and we introduce some notations for the derivatives at the ramification set.
Definition 3.5. Let r ≥ 3 and let x ∈ Σ n r ⊂ R n r . Let u : R n r → R be continuously differentiable at x. We denote by ∂ 1 u(x), . . . , ∂ n−1 u(x) the directional derivatives of u at x with respect to the canonical basis e 1 , . . . , e n−1 of Σ n r ≡ R n−1 . For 1 ≤ j ≤ r we denote by ∂ ν j u(x) the directional derivative of u at x with respect to the inward unit normal ν j of R n r,j ≡ R n ≥0 at x. See figure 2.
We now restrict our attention to LEP spaces, which have the important property that around any given point we can always choose a chart induced by the canonical identification with the Euclidean space R n or a suitable elementary ramified space. This is stated in the following proposition.
Let Ω be a LEP space and Σ its ramification set. For any x ∈ Ω, there is a neighborhood V x of x and a canonical identification . In the latter case, i x induces a bijective map I x between the index set Inc x and the set {1, . . . , r(x)}.
We now consider derivatives of a function on a LEP space at ramification points. For any x ∈ Ω, we always fix a canonical identification chart (V x , i x ) as defined in proposition 3.1 and all the concepts will be expressed in terms of the chart i x for sake of simplicity. However it is easy to verify that they in fact do not depend on the choice of specific chart.
Definition 3.6. Let Ω be a LEP space with rampification set Σ. Let x ∈ Σ, r = r(x). Let V ⊂ Ω be a neighborhood of x and let u : V → R be a function which is continuously differentiable at x. Following the notation of definition 3.5, we set where I x is defined as in proposition 3.1 (note that for each j ∈ Inc x the collection {∂ 1 , . . . ∂ n−1 , ∂ ν j } form a basis of T j x Ω). Figure 2 Σ For any function u : Ω → R and each j ∈ J we denote by u j :Ω j → R the restriction of u toΩ j , i.e. u j (x) := u • i −1 x (0) for x ∈Ω j We denote by C(Ω) the space of continuous function on Ω. This in particular implies that u j ∈ C(Ω j ) and u j (x) = u k (x) for any x ∈ Σ, j, k ∈ Inc x .
In a similar way we define the space of upper semi-continuous functions USC(Ω) and the space of lower semi-continuous functions LSC(Ω), respectively. In [16], we introduced the concept of (j, k)-test function on a topological network Γ, treating two edges j and k incident at a vertex v i as one connected edge and imposing that the derivatives in the direction of the incident edges, taking into account their orientations, coincide at v i . In other terms, a test function, considered as a function defined on e j ∪ e k , is differentiable at the interior point v i .
Here we follow a similar idea for LEP spaces, linking the two normal derivatives of a test function for a given couple of branch manifolds incident at a point x ∈ Σ.
• Let j ∈ J and let x ∈ Ω j . We say that ϕ is an upper (lower) test function of u at x if ϕ is C 1 -differentiable at x and u − ϕ attains a local maximum (minimum) at x. • Let x ∈ Σ and k, l ∈ Inc x , k = l. We say that ϕ is a (k, l) upper (lower) test function of u at x if ϕ is (k, l)-differentiable at x and u−ϕ attains a local maximum (minimum) at x with respect to Ω k,l :=Ω k ∪Ω l .
Since now on, Ω and Σ stand respectively for a LEP space and for its ramification set. We introduce the class of Hamilton-Jacobi equations of eikonal type we consider in this paper. An Hamiltonian H = (H j ) j∈J is a family of mappings H j :Ω j × T j x Ω → R with H j ∈ C 0 (Ω j × R n ) (recall: ∂ R Ω j := ∂Ω j ∩ Σ,Ω j = Ω j ∪ ∂ R Ω J ). By means of the canonical identification map i x around a fixed point x ∈Ω j we can think of H j as a mappingH j : V × R n → R defined by the identification (4.1) H j (y, D j u(y)) =H j (i x (y), ∂ j u(y)) ∀y ∈ V x (see (3.2) and (3.3)) where V is a neighborhood of 0 ∈ R n or 0 ∈ R n ≥0 provided that x ∈ Ω j or x ∈ Σ, respectively. In the sequel we will speak of H j under the canonical identification (around x) whenever we refer to H j in the sense of (4.1). We assume the Hamiltonian H = (H j ) j∈J fulfills the following properties for each x ∈ Σ, j ∈ Inc x , p → H j (x, (p 1 , . . . , p n−1 , ·) is not decreasing for p ≥ 0; (4.4) for each x ∈ Σ, j, k ∈ Inc x , H j (x, p) = H k (x, p) ∀p ∈ R n ; (4.5) for each x ∈ Σ, j ∈ Inc x , H j (x, (p ′ , p n )) = H j (x, (p ′ , −p n )) ∀p ′ ∈ R n−1 , p n ∈ R.  [7]) to ensure existence and uniqueness of the solution. Assumptions (4.5) and (4.6) represent compatibility conditions across the ramification set; the former guarantees a continuity condition at x ∈ Σ for the Hamiltonians defined on two different branches while the latter states the invariance with respect to orientation of the inward normal ν j .
We introduce the definition of viscosity solution for the Hamilton-Jacobi equation of eikonal type (4.7) H(x, Du) = 0, x ∈ Ω.
For x ∈ Σ, we define by π j : T j x Ω → T x Σ the projection on the tangent space of Σ, i.e. in Ω if the following holds: i) For any x ∈ Ω j , j ∈ J, and for any upper test function ϕ of u at x we have ii) For any x ∈ Σ, for any j, k ∈ Inc x and for any (j, k) upper test function ϕ of u at x we have H j (x, D j ϕ(x)) ≤ 0. A function u ∈ LSC(Ω) is called a (viscosity) supersolution of (4.7) in Ω if the following holds: i) For any x ∈ Ω j , j ∈ J, and for any lower test function ϕ of u at x we have ii) For any x ∈ Σ, p ′ ∈ T x Σ (see definition 3.3) and j ∈ Inc x , there exists k ∈ Inc x , k = j such that H j (x, D j ϕ(x)) ≥ 0 for any (j, k) lower test function ϕ of u at x satisfying π j (D j ϕ(x)) = p ′ . A continuous function u ∈ C(Ω) is called a (viscosity) solution of (4.7) if it is both a viscosity subsolution and a viscosity supersolution.

Remark 4.2. i) Near
x ∈ Σ the set Ω k ∪ Ω j is locally diffeomorphic to R n with a tangent space given by T j x Ω ∪ T k x Ω. The tangent space is composed by vectors (p ′ , p n ) with p ′ ∈ T x Σ ⊂ T j x Ω ∩ T k x Ω and p n ⊥ T x Σ. Taking into account the condition of differentiability (3.4), we see that if ϕ is a (j, k)-test function of u at x ∈ Σ, then by (4.5)-(4.6), In other terms, at a ramification point, the equation (4.7) can be equivalently replaced by one of the two couples (H j (x, p), T j x Ω) and (H k (x, p), T k x Ω). ii) The definitions of subsolution and supersolution are not symmetric at a ramification point. It turns out that solutions of eikonal equations are distance-like functions from the boundary (see section 7); this definition of supersolution reflects the idea these functions have to be solutions of (4.7). Since there is always a shortest path from a ramification point to the boundary, for any branch Ω j and for any x ∈ Σ ∩ Ω j we can connect the x to the boundary contained in the branch Ω k by a shortest path. Then (j, k)-lower test functions satisfies the definition of supersolution. It is also worth to observe that, for r(x) = 2, our definition of solution (resp., sub-or super-solution) coincides with the standard notion of viscosity solution (resp., sub-or super-solution).
Remark 4.3. The definition of viscosity solution is not affected by the fact that x belongs or not to the ramification set Σ. At ramification points, it requires a suitable class of test functions (different from the classical one) with appropriate differentiability properties. In this respect, our approach is different from the one in [1,4,8] which require to suitably redefine the Hamiltonian at ramification points.

A comparison result
This section is devoted to the proof of a comparison theorem for (4.7). The coerciveness of the Hamiltonian (stated in (4.3)) implies the Lipschitz-continuity of subsolutions; such a regularity which will be exploited in the comparison theorem.
Lemma 5.1. Let K be a compact subset of Ω and let u be a subsolution of (4.7). Then there exists a constant C K depending only on K such that The proof is standard in viscosity theory and we refer the reader to [3, Prop.II.4.1].
If x ∈ Ω j , then ϕ x (·) is differentiable at y, and If x ∈ Σ, then we have We conclude that for any k ∈ Inc x , k = j, ϕ x (·) is (j, k)-differentiable at y. A corresponding property holds for ϕ y (·).
Since u − ϕ y has a maximum point at x and v + ϕ x has a minimum point at y, we get Fix R > 0 and denote by ω j , the modulus of continuity of H j with respect to (x, p) ∈ Ω j × [−R, R] n . Hence, for sufficiently small ǫ > 0 we have for some η > 0. By (5.5) we get a contradiction for ǫ → 0. Case 2.
Since x ∈ Ω j , y ∈ Ω k , by (5.6) there exists z ∈Ω j ∩Ω k ⊂ Σ such that d(x, y) = d(x, z) + d(z, y) and, definedz = i x 0 (z) ∈ Σ n r , we have Moreover taking into account the definition of ν j , ν k . As in Case 1, ϕ x and ϕ y are (j, k)-differentiable and u − ϕ y has a maximum point at x and v + ϕ x has a minimum point at y. Therefore Fix R > 0 and denote by ω, the modulus of continuity of every H l with respect to (x, p) ∈Ω l × [−R, R] n . For sufficiently small ǫ > 0 we have By (4.5), (4.6),(5.7) and (5.8) we get which gives a contradiction for ǫ → 0 + since by (5.4), x, y → x 0 for ǫ → 0. ⊓ ⊔ Remark 5.1. For H = (h j (p)−f j (x)) j∈J , with h j positively homogeneous, the comparison principle can be also obtained by means of Kružkov transform (see [3]).
Lemma 6.1. Let V be an arbitrary set of viscosity subsolutions of (4.7). Define u(x) := sup v∈V v(x) for all x ∈ Ω and assume that u * (x) < ∞ in Ω. Then u * is a viscosity subsolution of (4.7).
Proof. We assume that x ∈ Σ, otherwise we can use standard arguments in viscosity solution theory. We consider a (j, k)-upper test function ϕ at x and we have to show that Let η > 0 be such that u * − ϕ has a local maximum point at Since Ω is a LEP space we can assume that η > 0 is sufficiently small such that B η (x) ∩ Σ is contained in a (n − 1)-dimensional affine linear subspace of R n+1 . We consider the function ϕ δ (y) = ϕ(y) + δd x (y) 2 , for δ > 0, where d x (·) = d(x, ·). Then u * − ϕ δ has a strict maximum point at x. Let η n → 0 for n → ∞ and x n ∈ B n := B ηn (x) such that sup Bn u − u(x n ) ≤ 1/n. By the definition of u, there is u n ∈ V such that u(x n ) − u n (x n ) ≤ 1/n. Hence Let y n be a maximum point for u n − ϕ δ inB. Up to a subsequence, we can assume that y n → z ∈B. By lemma 5.1 there exists a constant C = CB such that Taking the lim sup for n → ∞ in the previous inequality, by (6.3) and the definition of lim sup * we get and therefore x = z since u * − ϕ δ has a strict maximum point at x. Moreover (6.5) lim y n = x and lim n u n (y n ) = u * (x).
We distinguish two cases. Case 1. There are infinitely many y n with y n ∈ Σ. Then there exists a subsequence -also denoted with {y n } n -which is completely contained in either Ω k or Ω j . Without restriction we assume that y n ∈ Ω k for all n. Since ϕ δ is an upper test function for u n at y n and ϕ δ is differentiable at y n , we get (6.6) H k (y n , D k ϕ δ (y n )) =H k ỹ n , ∂ k ϕ(ỹ n ) + 2d(x, y n )ỹ n |ỹ n | ≤ 0 whereỹ n = i x (y n ) (recall that i x is the canonical identification around x with i x (x) = 0). Case 2. By possible truncating the sequence {y n } n we can assume that y n ∈ Σ ∩B for any n. Since Σ is contained in a (n − 1)-dimensional linear subspace of R n+1 , we have In particular d x is (j, k)-differentiable in Σ ∩B and therefore ϕ δ is (j, k)-differentiable in Σ ∩ B with ∂ m ϕ δ (0) = ∂ m ϕ(0) for either m = j or m = k. Since ϕ δ is a (j, k)-upper test function for u n at x we get (6.7) H m (y n , D m ϕ δ (y n )) =H m (ỹ n , ∂ m ϕ(ỹ n )) ≤ 0.
Then, u * and u * are respectively a subsolution and a supersolution to problem (4.7) in Ω with u = g on ∂Ω.
Proof. We first show that u is a subsolution of (4.7) with u = g on ∂Ω. Observe that x ∈ ∂Ω.
Hence u = u * = u * = g on ∂Ω. Moreover, by lemma 6.1, u * is a viscosity subsolution of (4.7) in Ω. Let us prove by contradiction that u * is a viscosity supersolution of (4.7) in Ω: we assume that u * does not satisfy the supersolution condition at some point x 0 ∈ Ω. We only consider the case x 0 ∈ Σ, since the case x 0 ∈ Σ is based upon similar, but easier, arguments. We assume that there exist a vector p 0 ∈ T x 0 Σ, an index j ∈ Inc x 0 such that for any k ∈ K := Inc x 0 \ {j}, there exists a (j, k)-lower test function ϕ k of u * at x 0 with π j (Dϕ k (x 0 )) = p 0 and (6.10) By adding a quadratic function as in the proof of lemma 6.1, it is not restrictive to assume that x 0 is a strict minimum point for u * − ϕ k , for k ∈ K. Hence we can assume that u * (x 0 ) = ϕ k (x 0 ) and there exists η > 0 such that where B η (x 0 ) = {y ∈ Ω : d(x 0 , y) < η}. Moreover, by the continuity of H and Dϕ, if z ∈ Ω k . Observe that since ϕ k are continuous on Σ with ϕ k (x 0 ) = u * (x 0 ) and π j (D j ϕ k (x 0 )) = p 0 for any k ∈ K, then the functionṽ is continuous B η (x 0 ). We claim thatṽ is a subsolution of (4.7) in B η (x 0 ).
By (6.14), (6.15) and since ψ is (l, m)-differentiable at x, we have By the assumptions (4.2)-(4.6), for s ∈ Inc x , the function h : R → R defined by is independent of s, symmetric at p n = 0, and increasing in |p n |. Hence by (6.12), (6.16) and we obtain (6.13).
We now consider the case where one of the indices l, m coincides with j, i.e. ψ is a (j, m)-upper test function ofṽ at x. As above we get that and therefore Hence we proceed as above to show the subsolution condition (6.13). Case 2: Let x ∈ B η (x 0 )\Σ. If x ∈ Ω l , l = j, thenṽ(x) = ϕ l (x). Since ϕ l is differentiable at x, we get immediately the subsolution condition by (6.12). If l = j, then by (6.12), we have H k (x, D k ϕ k (x)) < 0, for any k ∈ K and the claim follows by lemma 6.1. We setṽ ǫ =ṽ + ǫ. Thenṽ ǫ is still a subsolution and by (6.11), for ǫ sufficiently small, v ǫ (x) < u * (x) for x ∈ ∂B η (x 0 ). Since u * ≤ u on Ω we haveṽ ǫ < u on ∂B η (x 0 ). Hence the function v : Ω → R given by is upper semi-continuous in Ω and, by lemma 6.1, it is a subsolution of (4.7). It follows that v ∈ X. Since v(x 0 ) = u * (x 0 ) + ǫ, there isx ∈ B η (x 0 ) such that v(x) > u(x) and we get a contradiction to the definition of u. ⊓ ⊔ The proof of the next proposition is based on arguments similar to those used for lemma 6.1 and theorem 6.1 (see also [16, prop.3

.5])
Proposition 6.1. Let V be an arbitrary set of solutions of (4.7). Define u(x) := inf v∈V v(x) for all x ∈ Ω and assume that u(x) ∈ R for some x ∈ Ω. Then u is a solution of (4.7).

A representation formula for the solution of the Dirichlet problem
In this section, we shall assume that, beside hypotheses (4.2)-(4.6), H also fulfills (7.1) H j (x, p) is strictly convex in p ∈ R n , for x ∈Ω j .
Observe that, under assumptions (7.1) and (4.6), hypothesis (4.4) becomes redundant (see also remark 4.1 for others comments on the hypotheses). Our aim is to introduce a distance-like function and to give a representation formula for the solution of the Dirichlet problem. where L(γ l ) is the usual length in R n . For x, y ∈ Ω, we define where B T x,y as in definition 7.1 and L = (L j ) j∈J is a family of mappings L j :Ω j ×T j x Ω → R defined by L j (x, q) := sup p∈R {p · q − H j (x, p)} x ∈ Ω j , q ∈ R n . Proposition 7.1. Assume that there exists a subsolution of (4.7). Then (i) For any x, y ∈ Ω, S(x, y) is finite, Lipschitz continuous in its variables, S(x, x) = 0 and satisfies the triangular inequality. Moreover for any subsolution u of (4.7) (7. 3) u(x) − u(y) ≤ S(y, x) for any x, y ∈ Ω.
Proof. The proof of (i) is standard and for details we refer to [7]. For (ii), we first prove that u is a subsolution in Ω. We consider y ∈ Ω and we distinguish two cases.
Case 1: y ∈ Ω j for some j ∈ J. We recall that, near y, Ω is locally homeomorphic to a n-dimensional Euclidean space via the canonical identification chart (V y , i y ) (see prop. 3.1). Recall also that i y (y) = 0. For q ∈ R n , we consider t > 0 sufficiently small in such a way thatz t := tq ∈ i y (V y ) and set z t = i −1 y (tq) ∈ V y . Define a trajectory γ ∈ B t zt,y by γ t (s) = i −1 y ((1 − s/t)z t ), s ∈ [0, t]. Let ψ be an upper test function for u(·) = S(x, ·) at y, hence u(y) − ψ(y) ≥ u(z) − ψ(z) for z ∈ V y . We want to show that (7.4) H j (y, D j ψ(y)) ≤ 0.
If we assume by contradiction that u is not a supersolution at some point z ∈ Ω \ {y}, we get a contradiction to (7.9) showing as in the proof of theorem 6.1 that there exists a subsolution v of (4.7) such that v(z) > u(z). ⊓ ⊔ In the following theorem, we give a representation formula for the solution of the Dirichlet problem for (4.7). Consider the Hamilton-Jacobi equation (4.7) with the boundary condition (7.11) u(x) = g(x), x ∈ ∂Ω