Trace and density results on regular trees

We give characterizations for the existence of traces for first order Sobolev spaces defined on regular trees.


Introduction
Let X be a rooted K-ary tree, K ≥ 1. We introduce a metric structure on X by considering each edge of X to be an isometric copy of the unit interval. Then the distance between two vertices is the number of edges needed to connect them and there is a unique geodesic that minimizes this number. Let us denote the root by 0. If x is a vertex, we define |x| to be the distance between 0 and x. Since each edge is an isometric copy of the unit interval, we may extend this distance naturally to any x belonging to an edge. We define ∂X as the collection of all infinite geodesics starting at the root 0. Then every ξ ∈ ∂X corresponds to an infinite geodesic [0, ξ) (in X) that is an isometric copy of the interval [0, ∞). Hence x → ξ along [0, ξ) has a canonical meaning.
Given a function f defined on X, we are interested in the collection of those ξ ∈ ∂X for which the limit of f (x) exists when x → ξ along [0, ξ). We begin by equipping ∂X with the natural probability measure ν so that ν(I x ) = K −j when x is a vertex with |x| = j and I x = {ξ ∈ ∂X : x ∈ [0, ξ)}. Towards defining the classes of functions that are of interest to us, we define a measure and a new distance function on X. Write d|x| for the length element on X and let µ : [0, ∞) → (0, ∞) be a locally integrable function. We abuse notation and refer also to the measure generated via dµ(x) = µ(|x|)d|x| by µ. Further, let λ : [0, ∞) → (0, ∞) be locally integrable and define a distance via ds(x) = λ(|x|)d|x| by setting d(z, y) = [z,y] ds(x) whenever z, y ∈ X and [z, y] is the unique geodesic between z and y. For convenience, we assume additionally that λ p /µ ∈ L 1/(p−1) loc ([0, ∞)) if p > 1 below and that λ/µ ∈ L ∞ loc ([0, ∞) if p = 1. Then (X, d, µ) is a metric measure space and we let N 1,p (X) := N 1,p (X, d, µ), 1 ≤ p < ∞, be the associated Sobolev space based on upper gradients [10], as introduced in [27]. See Section 2 for the precise definition. We show there that, actually, each u ∈ N 1,p (X) is absolutely continuous on each edge, with u ′ ∈ L p µ (X). As usual, N 1,p 0 (X) is the completion of the family of functions with compact support in N 1,p (X).
In order to state our results, we need two more concepts. Given 1 < p < ∞ we set and we define .
One should view R p as an isoperimetric profile (X, d, µ) : in case of a Riemannian manifold M, the natural version of R p is closely related to the parabolicity of the manifold [28]; R p = ∞ guarantees parabolicity (every compact set is of relative pcapacity zero). This suggests that the existence of limits for Sobolev functions along geodesics might be somehow related to finiteness of R p . Let us say that the trace of a given function f , defined on X, exists if exists for ν-a.e. ξ ∈ ∂X. We then denote by Tr f the trace function of f . For other possible definitions of the trace and connections between them see [23]. Our first result gives a rather complete solution for the existence of traces in the case µ(X) < ∞. Theorem 1.1. Let X be a rooted K-ary tree with distance d and measure µ. Assume µ(X) < ∞. For 1 ≤ p < ∞, the following are equivalent: (i) R p < ∞.
(ii) Tr f exists for any f ∈ N 1,p (X) and Tr : N 1,p (X) → L p ν (∂X) is a bounded linear operator.
(iii) Tr f exists for any f ∈ N 1,p (X). (iv) N 1,p 0 (X) N 1,p (X). In [3,17] the trace spaces of our Sobolev spaces were identified as suitable Besovtype spaces for very specific choices of µ, λ.
Our second result deals with the case of infinite volume.
(3) If p > 1, then R p < +∞ is a sufficient condition for Tr f to exist for any f ∈ N 1,p (X). Furthermore, R 1 < ∞ if and only if Tr f exists for any f ∈ N 1,1 (X). Theorem 1.2 does not claim R p < ∞ to be a necessary condition for the existence of traces. In fact, we give in Section 3 an example of a situation where R p = ∞, p > 1, but Tr f still exists for any f ∈ N 1,p (X).
Our third result gives a complete answer in the case of homogeneous norms, see Section 2 for the relevant definitions.Ṅ 1,p 0 (X) is the completion of the family of functions with compact support inṄ 1,p (X). Theorem 1.3. Let X be a rooted K-ary tree with distance d and measure µ. For 1 ≤ p < ∞, the following are equivalent: (ii) Tr f exists for any f ∈Ṅ 1,p (X) and Tr :Ṅ 1,p (X) → L p ν (∂X) is a bounded linear operator.
Let us close this introduction with some comments on Theorem 1.3. Even though the condition R p = ∞ implies p-parabolicity, finiteness of this quantity does not, in general, prevent p-parabolicity, see [7]. Hence Theorem 1.3 and the preceding theorems are somewhat surprising. In fact, it follows from our results that, in the setting of this paper, R p = ∞ precisely when (X, d, µ) is p-parabolic. See [22] for more on this. Hence the reader familiar with moduli of curve families might wish to view Theorem 1.3 as kind of a version of the equivalence between modulus and capacity.
Partial motivation for this paper comes from boundary value problems for the p-Laplace equation. For the case of manifolds see [12,13] and for the setting of metric spaces see [2,4,15]. Classical trace results on the Euclidean spaces can be found in [1,6,9,14,16,21,25,29,30] and studies of parabolicity on infinite networks in [26,32]. For trace results in the metric setting see [3,17,18,19,20]. Our second motivation comes from the recent paper [24] where a version of Theorem 1.3 was established on regular trees for the case p = 2.
The paper is organized as follows. In Section 2, we introduce regular trees, boundaries of trees and Newtonian spaces on our trees. We study the trace results in Section 3 and the density results are given in Section 4. In Section 5, we give the proofs of Theorems 1.1-1.3.

Preliminaries
Throughout this paper, the letter C (sometimes with a subscript) will denote positive constants that usually depend only on the space and may change at different occurrences; if C depends on a, b, . . ., we write C = C(a, b, . . .). The notation A ≈ B means that there is a constant C such that 1/C · A ≤ B ≤ C · A. The notation A B (A B) means that there is a constant C such that A ≤ C · B (A ≥ C · B).

Regular trees and their boundaries
A graph G is a pair (V, E), where V is a set of vertices and E is a set of edges. We call a pair of vertices x, y ∈ V neighbors if x is connected to y by an edge. The degree of a vertex is the number of its neighbors. The graph structure gives rise to a natural connectivity structure. A tree is a connected graph without cycles. A graph (or tree) is made into a metric graph by considering each edge as a geodesic of length one.
We call a tree X a rooted tree if it has a distinguished vertex called the root, which we will denote by 0. The neighbors of a vertex x ∈ X are of two types: the neighbors that are closer to the root are called parents of x and all other neighbors are called children of x. Each vertex has a unique parent, except for the root itself that has none.
A K-ary tree is a rooted tree such that each vertex has exactly K children. Then all vertices except the root of a K-ary tree have degree K + 1, and the root has degree K. In this paper we say that a tree is regular if it is a K-ary tree for some K ≥ 1.
For x ∈ X, let |x| be the distance from the root 0 to x, that is, the length of the geodesic from 0 to x, where the length of every edge is 1 and we consider each edge to be an isometric copy of the unit interval. The geodesic connecting two vertices x, y ∈ V is denoted by [x, y], and its length is denoted |x − y|. If |x| < |y| and x lies on the geodesic connecting 0 to y, we write x < y and call the vertex y a descendant of the vertex x. More generally, we write x ≤ y if the geodesic from 0 to y passes through x, and in this case |x − y| = |y| − |x|.
On the K-regular tree X, for any n ∈ N, let X n be a subset of X by setting X n := {x ∈ X : |x| < n}.
On the K-regular tree X, we define the metric ds and measure dµ by setting where λ, µ : [0, ∞) → (0, ∞) with λ, µ ∈ L 1 loc ([0, ∞)). Throughout this paper, we let 1 ≤ p < ∞ and assume additionally that λ p /µ ∈ L 1/(p−1) loc Here d |x| is the measure which gives each edge Lebesgue measure 1, as we consider each edge to be an isometric copy of the unit interval and the vertices are the end points of this interval. Hence for any two points z, y ∈ X, the distance between them is where [z, y] is the unique geodesic from z to y in X.
We abuse the notation and let µ(x) and λ(x) denote µ(|x|) and λ(|x|),respectively, for any x ∈ X, if there is no danger of confusion.
Next we construct the boundary of the regular K-ary tree. An element ξ in ∂X is identified with an infinite geodesic in X starting at the root 0. Then we may denote ξ = 0x 1 x 2 · · · , where x i is a vertex in X with |x i | = i, and x i+1 is a child of x i . Given two points ξ, ζ ∈ ∂X, there is an infinite geodesic [ξ, ζ] connecting ξ and ζ.
To avoid confusion, points in X are denoted by Latin letters such as x, y and z, while for points in ∂X we use Greek letters such as ξ, ζ and ω.
We equip ∂X with the natural probability measure ν as in Falconer [5] by distributing the unit mass uniformly on ∂X. For any x ∈ X with |x| = j, if we denote by I x the set {ξ ∈ ∂X : the geodesic [0, ξ) passes through x}, then the measure of I x is K −j . We refer to [3, Lemma 5.2] for a more information on our boundary measure ν.

Newtonian spaces
Let X be a K-regular tree with metric and measure defined as in Section 2.1. Let M denote the family of all nonconstant rectifiable curves in X. We recall the definition of p-modulus of curve families in M , see [8,11] for more detailed discussions. For 1 ≤ p < ∞, we define The number Mod p (Γ) is called the p-modulus of the family Γ.
Proposition 2.2. Let 1 ≤ p < ∞. On the K-regular tree X, the empty family is the only curve family with zero p-modulus.
Proof. First, it follows from the definition that the p-modulus of the empty family is zero. For a given non-empty curve family Γ, let γ ∈ Γ be a rectifiable curve. By picking a subcurve if necessary, we may assume that γ is a part of a geodesic ray. Then it follows from [8, Theorem 5.2 and Lemma 5.3] that Mod p (Γ) ≥ Mod p ({γ}).
For any Borel measurable function ρ ∈ F ({γ}), we have γ ρ ds ≥ 1. By the monotone convergence theorem, we may assume that γ ρ ds ≥ 1/2 for a subcurve, still denoted γ, that is contained in {x ∈ X : |x| ≤ N}. Notice that For p > 1, it follows from the Hölder inequality that Hence we have that For the case p = 1, by a similar argument without using the Hölder inequality, it which finished the proof.
Let u ∈ L 1 loc (X). We say that a Borel function g : whenever z, y ∈ X and γ is the geodesic from z to y. In the setting of a tree any rectifiable curve with end points z and y contains the geodesic connecting z and y, and therefore the upper gradient defined above is equivalent to the definition which requires that inequality (2.3) holds for all rectifiable curves with end points z and y. In [8,11], the notion p-weak upper gradient is given. A Borel function g : 3) holds for all curves γ ∈ M \ Γ, where Mod p (Γ) = 0. Notice that by Proposition 2.2, any p-weak upper gradient is actually an upper gradient here. We refer to [8,11] for more information about p-weak upper gradients. The notion of upper gradients is due to Heinonen and Koskela [10]; we refer interested readers to [2,8,11,27] for a more detailed discussion on upper gradients.
The Newtonian space N 1,p (X), 1 ≤ p < ∞, is defined as the collection of all the functions u for which where the infimum is taken over all upper gradients of u. If u ∈ N 1,p (X), then it has a minimal p-weak upper gradient, which is an upper gradient in our case (by Proposition 2.2). We denote by g u the minimal upper gradient, which is unique up to measure zero and which is minimal in the sense that if g ∈ L p (X) is any upper gradient of u then g u ≤ g a.e. We refer to [8,Theorem 7.16] for proofs of the existence and uniqueness of such minimal upper gradient. Throughout this paper, we denote by g u the (minimal) upper gradient of u.
By Proposition 2.2, it follows from [8, Definition 7.2 and Lemma 7.6] that any function u ∈ L 1 loc (X) with an upper gradient 0 ≤ g ∈ L p (X) is locally absolutely continuous, for example, absolutely continuous on each edge. Moreover, the "classical" derivative u ′ of this locally absolutely continuous function is a minimal upper gradient in the sense that g u = |u ′ (x)|/λ(x) when u is parametrized in the nature way.
We define the homogeneous Newtonian spacesṄ 1,p (X), 1 ≤ p < ∞, the collection of all the continuous functions u that have an upper gradient 0 ≤ g ∈ L p (X), for which the homogeneousṄ 1,p -norm of u defined as is finite. Here 0 is the root of the regular tree X and the infimum is taken over all upper gradients of u.

Trace results
In this section, if we do not specifically mention, we always assume that X is a K-regular tree with measure and metric as in Section 2.1.
Proof. Let f ∈ L p (X). For any ξ ∈ ∂X, let x j = x j (ξ) be the ancestor of ξ with |x j | = j. Then it follows from Fubini's Theorem that is nonzero only if j ≤ |x| ≤ j + 1 and x < ξ. Thus the above equality can be rewritten as Theorem 3.2. Let 1 ≤ p < ∞ and assume that R p < +∞. Then the trace Tr in (1.1) gives a bounded linear operator Tr : Proof. Let f ∈Ṅ 1,p (X). Our task is to show that exists for ν-a.e. ξ ∈ ∂X and that the trace Tr f satisfies the norm estimates.
To show that the limit in (3.1) exists for ν-a.e. ξ ∈ ∂X, it suffices to show that the functionf is the geodesic ray from 0 to ξ and g f is an upper gradient of f . To be more precise, iff * ∈ L p (∂X), we have |f * | < ∞ for ν-a.e. ξ ∈ ∂X, and hence the limit in (3.1) exists for ν-a.e. ξ ∈ ∂X.
Since we have we obtain the estimatẽ For p > 1, it follows from the Hölder inequality that where j(x) is the largest integer such that j(x) ≤ |x|. Here the last inequality holds since Integrating over all ξ ∈ ∂X, since ν(∂X ) = 1, R p < +∞ and g f ∈ L p (X), it follows from Lemma 3.1 that For p = 1, integrating over all ξ ∈ ∂X with respect to estimate (3.2), since ν(∂X) = 1, we obtain by means of Fubini's theorem that Here in the above estimates, the notations I x and j(x) are the same ones as those we used in Lemma 3.
Hence we obtain from estimates (3.3) and (3.4) thatf * is in L p (∂X) for 1 ≤ p < ∞, which gives the existence of the limits in (3.1) for ν-a.e. ξ ∈ ∂X. In particular, since |f | ≤f * , we have the estimate and hence the norm estimate .
Since every f ∈ N 1,p (X) is locally absolutely continuous, a direct computation gives the estimate |f (0)| f N 1,p (X) . Hence we obtain the following result from the above theorem. Corollary 3.3. Let 1 ≤ p < ∞ and assume that R p < +∞. Then the trace Tr in (1.1) gives a bounded linear operator Tr : Next, we study non-existence of the traces when R p = ∞. Before going to the main theorems, we introduce the following lemma.
Theorem 3.5. Let 1 ≤ p < ∞ and assume that R p = +∞. Then there exists a function u ∈Ṅ 1,p (X) such that (3.5) Proof. To construct the function u ∈Ṅ 1,p (X) satisfying (3.5), it suffices to find a nonnegative measurable function g : Given such g, we may define the function u by setting u(0) = 0 and u(x) = |x| 0 g(t)λ(t) dt for any x ∈ X. Then it follows from the definition of upper gradient that g u : is an upper gradient of u. Moreover, we obtain that Hence the condition (3.6) implies u ∈Ṅ 1,p (X) and that (3.5) holds.
= ∞, the sets form a nonincreasing sequence of subsets of [0, ∞) and we have |A k | > 0 for any k, n ∈ N.
Hence there exists an infinite sequence {k n } kn∈N such that |B kn | > 0 for any k n , where otherwise, there will be N ∈ N such that for any k ≥ N, we have |B k | = 0, and hence |A k | = 0 for any k ≥ N, which is a contradiction. Since λ ∈ L 1 loc , we may also assume that 0 < Bn k λ(t) dt < +∞ by replacing B n k with a suitable bounded subset if necessary. Then we define g by setting . Define the function g by setting where α : [0, ∞) → [0, ∞] is be determined. Then to find a function g satisfying (3.6), it suffices to show the existence of a function α satisfying +∞ 0 (3.8) Consider the metric measure space ([0, ∞), d E , µ r ) with d E the Euclidean distance where dµ r = r(t) dt. Since r ∈ L 1 loc , we have that ([0, ∞), d E , µ r ) is a σ-finite metric measure space. Then it follows from (3.7) that µ r ([0, ∞)) = +∞. Hence by Lemma 3.4, we know that L p ([0, ∞), µ r ) L 1 ([0, ∞), µ r ), i.e., there exists a function α : Choosing this α ensures (3.8).
Remark 3.6. If additionally µ(X) < ∞, instead of constructing the above increasing function, we may easily modify the construction so as to obtain a piecewise monotone function u ∈ N 1,p (X) with values in [0, 1] so that u(x) = 1 when |x| = t 2j and u(x) = 0 when |x| = t 2j+1 , where t k → ∞ as k → ∞. Then this oscillatory function u belongs to N 1,p (X), but has no limit along any geodesic ray. Hence we obtain the following result.
The above results give the full answers to the trace results for the homogeneous Newtonian spaceṄ 1,p (X) and also for the Newtonian space N 1,p (X) when µ(X) < ∞. We continue towards the case µ(X) = ∞. and hence Tr f = 0 if Tr f exists.
Proof. Assume that (3.9) is false. Then there exist a function f ∈ L p (X) and a set E ⊂ ∂X with ν(E) > 0 such that Hence for any ξ ∈ E, there exist a constant ǫ(ξ) > 0 and an integer N(ǫ) such that It follows from Lemma 3.1 that where j(t) is the largest integer such that j(t) ≤ t. Since µ(X) = ∞ and µ ∈ L 1 loc (X), for any integer N(ξ), we have Since ǫ(ξ) > 0 for any ξ ∈ E and ν(E) > 0, we obtain that which contradicts the fact that f ∈ L p (X). Thus (3.9) holds. If Tr f exists, then Tr |f | also exists. It follows from the definition of the trace (1.1) and (3.9) that Tr |f | = 0. Hence Tr f = 0. Proposition 3.9. Assume R 1 = +∞. Then there exists a function u ∈ N 1,1 (X) such that lim [0,ξ)∋x→ξ u(x) does not exist, for any ξ ∈ ∂X.
= ∞ that the sequence of sets E n k := t ∈ [n, ∞) : |E n k | > 0 for any n, k ∈ N. Hence we may choose a sequence {t k : where E k = E 0 k . Since µ ∈ L 1 loc ([0, ∞)), we have that for any k ∈ N + , By the absolute continuity of integral with respect to measure, we may divide the interval [t k−1 , t k ] into ⌈2 k M k ⌉ subintervals {I j } j whose interiors are pairwise disjoint such that Since |E k ∩ [t k−1 , t k ]| > 0 from (3.10), we obtain there is at least one subinterval I k ∈ {I j } j such that |E k ∩ I k | > 0. Then we define a function g by setting Since λ(t) is always positive and λ ∈ L 1 loc , the above definition is well-defined. Next we construct the function u. For any k ∈ N + , since we have we may apply the same idea of constructing as in Remark 3.6 on {x ∈ X : t k−1 ≤ |x| ≤ t k } to obtain a piecewise monotone function u with upper gradient g u (x) = g(|x|) and with values in [0, 1] so that u(x) = 0 when |x| = t k−1 , t k and u(x) = 1 when Then the function u has no limit along any geodesic rays.
Thus it remains to show that u ∈ N 1,1 (X). We first estimate the L 1 -norm of the upper gradient g u of u. By the definitions of function g and of E k , it follows from estimate (3.12) that For the L 1 -norm estimate of u, notice that u(x) > 0 only if |x| ∈ I k for some k ∈ N.
Remark 3.10. The above proposition is strong and surprising, since it does not require µ(X) < ∞ anymore. Especially, for p = 1, it follows from the above proposition, Theorem 3.2 and Corollary 3.3 that R 1 < ∞ is a characterization for the existence of traces for both N 1,1 (X) andṄ 1,1 , no matter whether the total measure is finite or not. In the following, we will show that if the total measure is infinite, then R p < ∞ is not a characterization for the existence of traces for N 1,p (X) when 1 < p < ∞.
For simplicity, we consider the special case where λ and µ are piecewise constant. More precisely, assume that where {λ j } j∈N and {µ j } j∈N are two sequences of positive and finite real numbers. Then ds = d λ(z) = λ j d |z| and d µ(z) = µ j d |z|, for j ≤ |z| < j + 1, j ∈ N. (3.13) We establish the following trace result.
Lemma 3.11. Let X be a K-regular tree with measure and metric as in (3.13). Then the following hold: (i) Tr f exists and Tr f = 0 for any f ∈ N 1,p (X) if (ii) There exists a function u ∈ N 1,p (X) such that Tr u does not exists if Proof. (i) Let f ∈ N 1,p (X). Then f and the upper gradient g f of f belong to L p (X). It follows from Lemma 3.1 that Hence for a.e. ξ ∈ ∂X, we have (3.14) Let x j = x j (ξ) be the ancestor of ξ with |x j | = j. By using the Hölder inequality, we obtain that < +∞, it follows from (3.14) that for a.e. ξ ∈ ∂X, |g u | ds → 0, as j → ∞ for a.e. ξ ∈ ∂X. Hence, for a.e. ξ ∈ ∂X, lim sup For any k ∈ N, any edge [x 1 , x 2 ] ⊂ X with |x 1 | = n k and |y 1 | = n k + 1, let z ∈ [x 1 , x 2 ] be the midpoint. Then we define u(x 1 ) = u(x 2 ) = 0, u(z) = 1 and extend u linearly on [x 1 , z] and [z, x 2 ]. For any y ∈ X with |y| / ∈ [n k , n k+1 ] for any k ∈ N, define u(y) = 0. Then the L p -estimate of u is Moreover, since u is linear on [x 1 , z] and on [z, x 2 ], we have g u ≤ 2/λ n k . Hence Thus, u ∈ N 1,p (X) and it is easy to check that lim [0,ξ)∋x→ξ u(x) does not exist, for any ξ ∈ ∂X.
Let us give a concrete example.
Hence it follows from Lemma 3.11 that Tr f exists for each f ∈ N 1,p (X). But for p > 1, we have Thus, for p > 1, R p < +∞ is not a necessary condition for Tr f to exist for all f ∈ N 1,p (X) when µ(X) = +∞.
The following example implies that the conditions obtained in Lemma 3.11 are not characterizations of the existence or non-existence of traces.
Example 3.13. Let 1 < p < ∞ and fix a K-regular tree X. We construct measures such that Tr f exists for any f ∈ N 1,p (X, ds 1 , dµ 1 ) and that there exists a function u ∈ N 1,p (X, ds 2 , dµ 2 ) for which Tr u does not exist. Then Hence (X, ds 1 , dµ 1 ) satisfies the asserted conditions and R p ((X, ds 1 , dµ 1 )) < +∞. It follows from Corollary 3.3 that Tr f exists for any f ∈ N 1,p (X, ds 1 , dµ 1 ). For X 2 , let µ 2 j = K −j and λ 2 j = 2 j . Then we have Next, we will construct a function f ∈ N 1,p (X, ds 2 , dµ 2 ) such that Tr f does not exist. For j ∈ N, let 2β j = 1/λ 2 j = 2 −j ≤ 1. For any edge [x, y] on X with |x| = j and |y| = j + 1, we define the value of f on the point z 1 ∈ [x, y] with |z 1 | = j + β k as 1. Let z 2 ∈ [x, y] be the point with |z 2 | = j + 2β k . Then we define f to be linear on [x, z 1 ] and [z 1 , z 2 ] with f (t) = 0 for any t ∈ {x} ∪ [z 2 , y]. Then we know that |f | ≤ 1, Hence we obtain the estimate Thus, f ∈ N 1,p (X 2 , ds 2 , dµ 2 ). Moreover, for any ξ ∈ ∂X, by the definition of f , it is easy to find two sequences {x n } n∈N and {y n } n∈N on the geodesic [0, ξ) such that

Density
In this section, we focus on the density properties of compactly supported functions in N 1,p (X) and inṄ 1,p (X), 1 ≤ p < ∞. The function 1 is defined by 1(x) = 1 for all x in X and we abuse the notation by using ∇u to denote g u if needed for convenience.
Our first result is an analog of the corresponding result for infinite networks [32], also see [24]. Lemma 4.1. Let 1 ≤ p < ∞ and assume that µ(X) < ∞. Then we have that N 1,p 0 (X) = N 1,p (X) ⇐⇒ 1 ∈ N 1,p 0 (X). Proof. Since it follows from µ(X) < ∞ that 1 ∈ N 1,p (X), we obtain that N 1,p 0 (X) = N 1,p (X) implies 1 ∈ N 1,p 0 (X). Towards the other direction, the hypothesis 1 ∈ N 1,p 0 (X) gives a family of compactly supported functions {1 n } n∈N in N 1,p (X) such that 1 n → 1 in N 1,p (X) as n → ∞. Recall that X m := {x ∈ X : |x| < m} for any m ∈ N. Without loss of generality we may assume that 1 n is nonnegative for any n ∈ N and that We claim that for any n ∈ N, there exists a point x n with x n ∈ X 1 such that |1 − 1 n (x n )| < 1/4. If not, then we have |1 − 1 n (x)| ≥ 1 4 for any x ∈ X 1 . Hence we obtain that , which is a contradiction. By the triangle inequality, we have 1 − 1 n (x n ) ≤ |1 − 1 n (x n )| < 1 4 , and hence 1 n (x n ) > 3 4 . Next, we claim that we may assume 1 n (x) > 1/2 for all x ∈ X n by selecting a subsequence of {1 n } n∈N if necessary. Assume that this claim is not true. Then there exists N ∈ N such that for any n ∈ N, there exists a point y n ∈ X N with 1 n (y n ) ≤ 1/2. Hence for any n ∈ N, we have found two points x n , y n ∈ X N such that |1(x n ) n − 1 n (y n )| ≥ 1/4. Let γ = [x n , y n ] be the geodesic connecting x n and y n . Then γ ∇(1 n ) ds ≥ 1/4 for any n ∈ N.
By an argument similar to that for the estimate (2.1) and (2.2), we have that there exists a constant C(N, p, λ, µ) > 0 such that which is a contradiction to 1 n → 1 in N 1,p (X). Thus, from the arguments above, we may assume that there exists a family of compactly supported functions {1 n } n∈N in N 1,p (X) such that 1 n → 1 in N 1,p (X) as n → ∞, 1 n (x) ≥ 1 2 for any x ∈ X n .
We define1 n := min{2 · 1 n , 1} for all n ∈ N. Then the family (1 n ) n∈N satisfies     1 n → 1 in N 1,p (X) as n → ∞, 1 n ≡ 1 in X n 1 n is a function with compact support.
Given a function u in N 1,p (X), let us show that u n1n → u in N 1,p (X) where u n (x) is a truncation of u with respect to a n := 1 n − 1 −1/2 N 1,p (X) , namely u n (x) = u |u| a n if |u| ≥ a n u if |u| ≤ a n .
From the basic properties of truncation (see for instance [11, Section 7.1]), we have that We first show that u n1n → u in L p (X) as n → ∞. By the triangle inequality, it follows from (4.1) and (4.2) that u n1n − u L p (X) ≤ u n1n − u n L p (X) + u n − u L p (X) ≤ a n 1 n − 1 N 1,p (X) + u n − u L p (X) Recall that every function in N 1,p (X) is locally absolutely continuous, see Section 2.2. By the product rule of locally absolutely continuous functions, we obtain that Hence we obtain from the triangle inequality that which tends to 0 as n → ∞. Therefore, u n1n → u in N 1,p (X) as n → ∞. Since the support of u n1n is compact, it follows from the definition of N 1,p 0 (X) that u ∈ N 1,p 0 (X), and hence N 1,p 0 (X) = N 1,p (X).
Notice that 1 ∈Ṅ 1,p (X) no matter if µ(X) is finite or not. By slightly modifying the previous proof, we obtain the following result.
Corollary 4.2. Let 1 ≤ p < ∞. Then the following statements are equivalenṫ Applying Lemma 4.1, we obtain our first density result.
Proposition 4.3. Let 1 ≤ p < ∞ and assume that µ(X) < ∞. Suppose additionally that R p = ∞. Then we have that Proof. It follows from Lemma 4.1 that it suffices to construct a sequence of compactly supported N 1,p -functions which converges to 1 in N 1,p (X). For p > 1 and we define the family of functions {ϕ n } n∈N as follows. For each n ∈ N, let r n > n be an integer such that We set ϕ n (x) = 1 for all x ∈ X n , ϕ n (x) = 0 for all x ∈ X \ X rn and for all x ∈ X rn \ X n . Since λ p /µ ∈ L 1/(p−1) loc ([0, ∞)) and λ, 1/µ > 0, then ϕ n is well-defined. It is easy to check that ϕ n is compactly supported.
By the construction of ϕ n , an easy computation shows that for all x ∈ (X n ) ∪ (X \ X rn ) and that for all x ∈ X rn \ X n .
Thanks to (4.4) and (4.5), we obtain the estimate Since p > 1 and (4.3) holds, we obtain that rn n λ p p−1 (t)µ Hence we have that ∇(ϕ n − 1) L p (X) → 0 as n → ∞. Moreover, since |ϕ n − 1| ≤ 2χ X\X n , it follows from µ(X) < ∞ that = ∞ that the sequence of sets is a nonincreasing sequence of subset of [0, ∞) and that we have |E k | > 0 for any k ∈ N.
We have E k = lim n→∞ E k ∩ [k, n] and |E k | = lim n→∞ |E k ∩ [k, n]|. Hence there exist a k n > k such that We define a sequence {ϕ k } of functions by setting for all |x| ∈ [k, k n ] and ϕ k (x) = 0 on X \ X kn , ϕ k (x) = 1 on X k .
It follows directly from the definition of ϕ k that each ϕ k has compact support and that Hence, thanks to µ(X) < ∞ and the definition of E kn , we obtain that Hence ϕ k → 1 in N 1,1 (X) as k → ∞.
By using the same construction of the sequence of compactly supported N 1,pfunctions as the one in the above proof, we obtain the following corollary immediately from Corollary 4.2.
Proof. Suppose N 1,p 0 (X) = N 1,p (X). Since 1 ∈ N 1,p (X), it follows that for every ε > 0, there exists a function u ∈ N 1,p (X) with compact support such that 1 − u N 1,p (X) < ε. (4.6) Let ξ ∈ ∂X be arbitrary, and x j := x j (ξ) be the ancestor of ξ with |x j | = j and . By repeating the argument in the beginning of Proof of Lemma 4.1 with the change that we replace µ(X 1 )/4 p and X 1 by ǫ p and [0, x 1 (ξ)], respectively, we obtain the existence of x ξ ∈ [0, x 1 (ξ)] for which the function u in (4.6) satisfies |1 − u(x ξ )| < 1 2 . By the triangle inequality, we have 1 − |u(x ξ )| ≤ |1 − u(x ξ )| < 1 2 , and hence |u(x ξ )| > 1 2 . Notice that u has compact support. Then for any ξ ∈ ∂X, we have lim n→∞ u(x n (ξ)) = 0 and that where the notations I x and j(x) are the same ones as those we used before. Since ν(I x ) ≈ K −j(x) , we obtain the estimate where the second to last inequality holds since every upper gradient of u is also an upper gradient of 1 − u. By choosing ǫ small enough, the above estimate gives a contradiction, and hence N 1,p 0 (X) = N 1,p (X) for p > 1. Since N 1,p 0 (X) ⊂ N 1,p (X) by definition, we obtain N 1,p 0 (X) N 1,p (X) for all p ≥ 1.
Then using an argument similar to the one in the proof of Proposition 4.5 (replace u(x ξ ) with u(0)), we obtain a contradiction. The claim follows.
The above results give a full picture for the density properties for homogeneous Newtonian spacesṄ 1,p (X) and for Newtonian spaces N 1,p (X) when µ(X) < ∞. When the total measure is infinite, the density results for the Newtonian space N 1,p (X) are quite different. Lemma 4.7. Let K = 1, i.e., X be a 1-regular tree and assume that µ(X) = ∞.
Then for any f ∈ N 1,p (X), there exists a sequence of compactly supported N 1,pfunctions {f n } n∈N such that f n → f in N 1,p (X).
Proof. Notice that we may compose any f ∈ N 1,p (X) as Hence we may assume that f ≥ 0.
Since K = 1, ∂X contains only one point ξ 0 and there is a unique geodesic ray. It follows from Proposition 3.8 that Denote by x n the vertex of X with |x n | = n when n ∈ N. Then it follows from (4.8) that We define functions f n by setting Then it is easy to check that f n ∈ N 1,p (X), since 0 ≤ f n ≤ f and g fn ≤ 2g f . Next, we check that f n is compactly supported. Assume not. Since f n is non-increasing for |x| > n by definition, we have that f n (x) > 0 for any |x| > n and hence that Combining this with (4.9), we conclude that Then g f = 0 for |x| > n and it follows from (4.8) that f has to be identically 0 for |x| ≥ n, which is a contradiction. Hence f n is compactly supported.
At last, we estimate the N 1,p -norm of f n − f . By the fact that 0 ≤ f n ≤ f and g fn ≤ 2g f , we obtain the estimate since f ∈ N 1,p (X). Thus {f n } n∈N is a sequence of compactly supported N 1,pfunctions with f n → f in N 1,p (X), which finishes the proof.
If ∞ 0 λ(t) dt = ∞, then X is complete and unbounded with respect to distance d and it follows by using the suitable cutoff functions that N 1,p 0 (X) = N 1,p (X). Our next result shows that this is also the case when X is bounded and not complete if we assume µ(X) = ∞.
Theorem 4.8. Let 1 ≤ p < ∞ and assume that µ(X) = ∞. Then we have that Proof. If K = 1, the result follows directly from Lemma 4.7. Hence we assume K ≥ 2 in the ensuing proof. For any f ∈ N 1,p (X), by the same argument as in Lemma 4.7, we may assume that f ≥ 0. It suffices to construct a sequence {f n } n∈N of compactly supported N 1,p -functions such that f n → f in N 1,p (X). For each n ∈ N, we denote by {x n,j } K n j=1 the vertices of n-level, i.e., |x n,j | = n for all j = 1, · · · , K n . For any x n,j , we study the subtree Γ x n,j which is a subset of X with root x n,j . More precisely, Γ x n,j := {x ∈ X : x n,j < x}.
Since every vertex has exactly K children, we may divide Γ x n,j into K subsets, where each subset contains a subtree whose root is a child of x n,j and an edge connecting this child with x n,j . We denote by {Γ i x n,j } K i=1 these K subsets. Fix f ∈ N 1,p (X). We first study the function u := f | Γx n,j . If f N 1,p (Γx n,j ) > 0, we first modify the function u to a function v with v(x) = v(|x|) for any x ∈ Γ x n,j , i.e., for any x, y ∈ Γ x n,j with |x| = |y|, then v(x) = v(y). The modification procedure is as follows: Step 1 Since Γ x n,j = K i=1 Γ i x n,j , without loss of generality, we may assume u N 1,p (Γ 1 x n,j ) = min{ u N 1,p (Γ i x n,j ) : i = 1, 2, . . . , K}. (4.10) Then we define a function u 1 by identically copying the minimal N 1,p -energy subtree of u (here is u| Γ 1 x n,j ), to the other k − 1 subtrees Γ i x n,j , i = 2, · · · K. More precisely, x n,j (y) with y ∈ Γ 1 x n,j , |y| = |x|, if x ∈ Γ i x n,j .
Step 2 Denote by {x n+1,t } K t=1 the K children of x n,j . We repeat the Step 1 by replacing the function u and Γ x n,j with u 1 and Γ x n+1,t , respectively. Here we repeat the Step 1 for all K subtrees Γ x n+1,t , t = 1, · · · , K. Hence we obtain a function u 2 on Γ x n,j by additionally letting u 2 (x) = u 1 (x) if x ∈ Γ x n,j with n ≤ |x| ≤ n + 1. Moreover, it is easy to check that u 2 N 1,p (Γx n,j ) ≤ u 1 N 1,p (Γx n,j ) ≤ u N 1,p (Γx n,j ) and that u 2 (x) = u 2 (y) for any x, y ∈ Γ x n,j ∩{x ∈ X : n ≤ |x| ≤ n+ 2} with |x| = |y|.
Continuing this procedure, we obtain a sequence of functions {u k } k∈N . We define v = lim k→∞ u k . Then we know from induction that v N 1,p (Γx n,j ) ≤ u N 1,p (Γx n,j ) = f N 1,p (Γx n,j ) (4.11) and that v(x) = v(y) for any x, y ∈ Γ x n,j with |x| = |y|. The value of function v(x) only depends on the distance d(x n,j , x). We may regard v as a function on a 1-regular tree with root x n,j and infinite measure, since µ(Γ x n,j ) = ∞. Hence, from the proof of Lemma 4.7, we are able to choose a compactly supported N 1,p -function f n,j on Γ x n,j with f n,j − v N 1,p (Γx n,j ) ≤ u N 1,p (Γx n,j ) = f N 1,p (Γx n,j ) . (4.12) Then it follows from (4.11) and (4.12) that f n,j − f N 1,p (Γx n,j ) ≤ f n,j − v N 1,p (Γx n,j ) + v − f N 1,p (Γx n,j ) ≤ f n,j − v N 1,p (Γx n,j ) + v N 1,p (Γx n,j ) + f N 1,p (Γx n,j ) ≤ 3 f N 1,p (Γx n,j ) . (4.13) If f N 1,p (Γx n,j ) = 0, then f = 0 on Γ x n,j and we just define f x n,j = f | Γx n,j . At last, we define a function f n by setting Then it is easy to check that f n ∈ N 1,p (X) and that f n is compactly supported, since f n,j are compactly supported for any j = 1, · · · , K n . It follows from estimate (4.13) that f n − f N 1,p (X) = f n − f N 1,p (X∩{|x|≥n}) = K n j=1 f n − f N 1,p (Γx n,j ) = K n j=1 f n,j − f N 1,p (Γx n,j ) ≤ 3 K n j=1 f N 1,p (Γx n,j ) = 3 f N 1,p (X∩{|x|≥n}) → 0, as n → 0, since f ∈ N 1,p (X). Thus we have found a sequence {f n } n∈N of compactly supported N 1,p -functions with f n → f in N 1,p (X), which finishes the proof.