Harmonic functions on metric measure spaces

We introduce and study strongly and weakly harmonic functions on metric measure spaces defined via the mean value property holding for all and, respectively, for some radii of balls at every point of the underlying domain. Among properties of such functions we investigate various types of Harnack estimates on balls and compact sets, weak and strong maximum principles, comparison principles, the Hölder and the Lipschitz estimates and some differentiability properties. The latter one is based on the notion of a weak upper gradient. The Dirichlet problem for functions satisfying the mean value property is studied via the dynamical programming method related to stochastic games. Finally, we discuss and prove the Liouville type theorems. Our results are obtained for various types of measures: continuous with respect to a metric, doubling, uniform, measures satisfying the annular decay condition. Relations between such measures are presented as well. The presentation is illustrated by examples.


Introduction
Harmonic functions and the related Dirichlet problem are one of the most classical and fundamental subjects of studies in mathematical analysis and theory of PDEs. One studies harmonic functions and their generalizations in various settings and contexts, for instance in the Euclidean domains, on manifolds, in the setting of trees, also in Banach spaces. Recent two decades have been the period of an intensive development of yet another area of mathematics, the analysis on metric measure spaces. Its studies bring new approaches and sheds new light also on the theory of harmonic functions. The results due to Cheeger [9], Hajłasz-Koskela [16], Heinonen-Koskela [25] and Shanmugalingam [46], to mention just few mathematicians contributing to the growth of the analysis on metric spaces, laid foundations for the first order Calculus and notions of gradient in metric spaces. See, for instance, a survey by Heinonen [24] for the panorama of the area and further references. Basing on the notion of the weak upper gradient one can study the minima of the Dirichlet energy obtaining counterparts of p-harmonic functions and mappings in the metric setting with the harmonic case corresponding to p = 2, see e.g. Shanmugalingam [47]. Related is an approach based on the Cheeger derivative and a metric counterpart of the tangent space, see [9].
In this work we present another approach to harmonicity on metric measure spaces based on functions which satisfy the mean value property for all balls centered at the points of the given open set and contained in this set. Harmonic functions of such kind were introduced by Gaczkowski and Górka [13]. Namely, in [13] the authors study locally integrable real-valued functions defined on an open subset ⊂ X of a metric measure space (X , d, μ) requiring that the mean value property for f holds at every x ∈ and for all balls B(x, r ) : In this work we call such functions strongly harmonic, see Definition 3.1. We continue investigations of their properties, as well as introduce the so-called weakly harmonic functions which are required to satisfy the mean value property only for at least one admissible radius at every point of an open set. Our definition is motivated by the classical and subtle investigations in the Euclidean setting due to e.g. Koebe, Volterra and Kellogg, Hansen and Nadirashvili, and Blaschke, Privaloff and Zaremba. We refer to Sect. 3 for a brief historical sketch of the studies on the size of the set of admissible radii sufficient to imply the harmonicity. Moreover, one of the main goals of our work is to provide a uniform approach to the mean-value harmonicity and extract the properties shared by functions with the mean-value property in various settings, as illlustrated by examples in Sect. 3. In Preliminaries we introduce and recall some basic definitions of the metric analysis. In particular, we define continuity of a measure with respect to a metric, see Definition 2.1. Such a property has been important in the previous studies of harmonic functions, see [13] (also [15]). Moreover, we study some properties of a measure implying its continuity with respect to the given metric and notice that this condition gives us wide class of metric measure spaces. It turns out, for instance, that doubling measures in geodesic spaces have this property, see Proposition 2.1. Our studies involve various other types of measures, e.g. uniform measures and measures satisfying δ-annular decay condition for some δ ∈ (0, 1]. However, measures continuous with respect to a distance appear to be the most general among the aforementioned measures (see the discussion and the diagram following Proposition 2.1 in Preliminaries).
In Sect. 3 we bring on stage main characters of the paper, i.e. strongly and weakly harmonic functions, motivate their definitions and introduce some of their basic properties and natural relatives such as sub-and superharmonic functions. The latter two notions will play a vital role in the studies of the Dirichlet problem in Sect. 6. Furthermore, we study how to generate new sub-and superharmonic functions from the existing ones; we also mention the p-harmonic functions as defined via the minimization of the p-Dirichlet energy and address their relation to harmonic functions as studied in our work. Additionally, we provide a number of examples of strongly and weakly harmonic functions in various settings, including manifolds, trees and weighted R n .
The key geometric and regularity properties of harmonic functions are presented and studied in Sects. 4 and 5. We identify conditions implying continuity of strongly and weakly harmonic functions as well as we discuss various Harnack inequalities on balls and compact sets. This allows us to obtain important tools of the potential and geometric function theories, namely the weak and strong maximum principles, and the comparison principle. While for strongly harmonic functions such properties could be expected, the fact that they are also available in the setting of weakly harmonic functions might be surprising. Having established the aforementioned properties of harmonic functions, we show one of the main results of Sect. 4, namely the local Hölder continuity of strongly and weakly harmonic functions (i.e. Hölder continuity on compact subsets of an underlying domain), see Theorem 4.1. For strongly harmonic functions we prove this result for geodesic doubling measure spaces with the Hölder exponent depending on the doubling constant only, whereas for weakly harmonic functions we, additionally, require that a compact set K remains enough away from the boundary of the domain and the admissible radii for points in K are uniformly separated from zero and uniformly bounded from the above. The final topic studied in Sect. 4 is the Hölder and Lipschitz regularity of harmonic functions in spaces satisfying the so-called δ-annular decay property for some δ ∈ (0, 1] with the Lipschitz case corresponding to δ = 1, see e.g. Buckley [8]. Roughly speaking, such a property relates the measure of an annular ring to its thinness, cf. Definition 4.1. Moreover, it turns out that length doubling metric spaces have an annular decay property for some δ while a space with measure continuous with respect to a distance possesses 1-annular decay property. In Theorem 4.2 we provide the Hölder and Lipschitz estimates on balls and compact sets. By imposing stronger assumptions on measure than in Theorem 4.1 we are able to obtain finer estimates on balls already in the Hölder case, while on compact subsets we not only show the Hölder regularity as in Theorem 4.1 but also provide estimates with explicit constants and exponent δ. In the Lipschitz case not covered by Theorem 4.1 we also have explicit constants, however our estimates depend additionally on a Lebesgue number of a choosen covering. We continue studies of the regularity properties of harmonic functions in Sect. 5. There, we study uniform measures, i.e. such measures μ that every ball B of radius r > 0 satisfies μ(B) = C r Q , for given C > 0 and Q ≥ 1.
Uniform measures appear in geometric measure theory, for example in relation to the Marstrand theorem, in the studies of rectifiable measures and in the theory of incompressible flows in PDEs, see the discussion following Definition 5.1. Proposition 5.1 shows that in spaces with uniform measures strongly and weakly harmonic functions are locally Lipschitz. Moreover, we compute Lipschitz constants more accurately than in Theorem 4.2. In particular we avoid using a Lebesgue number of a covering. These observations allow us to complete the presentation in Sections 4 and 5 with differentiability results based on Cheeger's work [9]. In Corollaries 5.1 and 5.2 we describe conditions on metric measure spaces implying that strongly and weakly harmonic functions have weak upper gradients. The (1, p)-Poincaré inequality plays a crucial role for such results to hold. Section 6 is entirely devoted to studying the Dirichlet problem for harmonic functions. We address the following fundamental problems: whether there exists a function with given boundary data satisfying the mean value property inside the domain and whether it is unique, and if so how to construct such a function? In order to solve the first problem we take an approach based on the dynamical programming principle. The idea of this method originates from the stochastic games, especially tug-of-war games and related p-harmonious functions (see e.g. Manfredi et al. [37]), and is based on setting up an integral operator, iterating it and proving that such an iteration process converges to a function. We adapt method by Luiro, Parviainen and Saksman [36], recently developed for the Euclidean domains, in the metric setting. According to our best knowledge such an approach to the Dirichlet problem on metric spaces is new in the literature. In Theorem 6.1 we show that given a domain and a measurable boundary data one obtains a function which satisfies the mean value property with respect to exactly one radius at every point of the domain, provided that this point is enough far away from the boundary. Moreover, such a solution satisfies the boundary data condition. Furthermore, Theorem 6.2 extends the previous result to the setting of continuous boundary data. We also prove that if a Dirichlet problem has a continuous subharmonic solution, then it has the weakly harmonic solution with the same continuous boundary data, see Theorem 6.3.
In the final section of the paper we discuss another fundamental geometric properties of harmonic functions, namely the Liouville type theorems. In Theorem 7.1 we provide a fairly general condition for a measure which implies that a strongly(weakly) bounded harmonic function defined in the whole space must be constant. Furthermore, we discuss some sufficient conditions on measure to guarantee that the hypotheses of Theorem 7.1 is satisfied. In particular, this is the case if the measure of the space is finite or in the length spaces with a doubling measure. Our discussion is illustrated with examples. We, for instance, show that even in a simple case of R there exist non-Lebesgue measures for which bounded entire harmonic functions need not be constant.

Preliminaries
Let (X , d, μ) be a metric measure space equipped with a metric d and measure μ. A ball in space X is denoted by B := B(x, r ) for x ∈ X and a radius r > 0. In what follows we will assume that μ is a Borel regular measure with 0 < μ(B) < ∞ for any ball B ⊂ X . Moreover, we assume that X is proper, that is closed bounded subsets of X are compact. For the sake of convenience we also assume that X is connected.
We say that a measure μ is doubling if there is a constant C μ > 0 such that for all balls where 2B(x, r ) = B(x, 2r ). If μ is doubling, then X is complete if and only if it is proper (i.e. every closed bounded set is compact), see Proposition 3.1 in Björn-Björn [4].
One of the consequences of doubling property of μ is that there exist C, Q > 0 such that for all x ∈ X , 0 < r ≤ R and y ∈ B(x, R), In fact, Q = log 2 C μ and C = C 2 μ will do, see Lemma 3.3 in Björn-Björn [4], but there may exist a better, that is smaller, exponent Q. Moreover, we note that (1) implies that μ is doubling, i.e. μ is doubling if and only if there is an exponent Q such that (1) holds.
Furthermore, in what follows we will often appeal, without mentioning it explicitly, to the following property of doubling measures. If (X , d, μ) is a doubling metric measure space and ⊂ X is bounded with μ( ) > 0 (e.g. is a domain), then for any x ∈ and 0 < r < diam it holds that We say that X is Ahlfors Q-regular if there is a constant C such that If we only require the left hand side of the inequality to hold, then we say that X is lower Q-Ahlfors regular.
One of the important properties of the metric spaces considered in the paper is the following relation between the metric and the measure.
Recall that A B stands for a symmetric difference of sets A, B ⊂ X and is defined as follows: The measure μ is called metrically continuous.
According to our best knowledge the above notion appeared for the first time in the literature in Górka [15].
The following lemma collects some basic facts about continuity of a measure with respect to the metric (see [13] for the proofs). In the presentation below we will appeal to these properties a number of times and, therefore, for the sake of convenience we present them here. Lemma 2.1 Let (X , d, μ) be a metric space with a Borel regular measure μ. Then the following hold: 1. If μ is continuous with respect to the metric d, then the map x → μ(B(x, r )) is continuous in d.

2.
If for every x ∈ X and every r > 0 it holds that μ(∂ B(x, r )) = 0, then μ is continuous with respect to the metric d. 3. If for every x ∈ X the function r → μ(B(x, r )) is continuous, then μ is continuous with respect to the metric d.
Proof For the proof of Property 1, see Corollary 2.1 in [13]. Property 2 is proved in Lemma 2.1 in [13], while Property 3 is proved in Theorem 2.1 in [13].
Following [13], we recall that a metric space (X , d) has the segment property if for any x, y ∈ X there exists a continuous curve γ : [0, 1] → X joining x and y and such that for all t ∈ [0, 1] we have that Recall further, that a metric space (X , d) is geodesic if any two points x, y ∈ X can be joint by a curve γ whose length equals distance d(x, y). For a large class of metric spaces we can easily show their bi-Lipschitz equivalence to geodesic spaces. Namely, let X be a Loewner Ahlfors regular space (see Definition 3.1 in Heinonen-Koskela [25]). Then X is quasiconvex, see Theorem 8.23 in Heinonen [23]. If X is additionally proper, then one can introduce a new metric in X by taking the infimum of lengths of all rectifiable curves joining two points, see Remark 9.11 and Chapter 8 in [23], also [25] for further discussion on Loewner spaces. According to Theorem 2.2 in [13], if (X , d, μ) is a doubling measure space with the segment property, then μ is continuous with respect to metric d. In a consequence we get the following result.  [13] it is enough to show that a geodesic space has the segment property. Indeed, let x, y ∈ X and let γ xy be a curve such that d(x, y) = l(γ xy ). Choose t ∈ [0, 1] and denote z = γ (t). Then l(γ xy ) = l(γ xz ) + l(γ zy ). Moreover, l(γ xz ) = d(x, z) and l(γ zy ) = d(z, y). Otherwise, suppose that l(γ xz ) > d(x, z). Then, d(x, z)+d(z, y) < l(γ xz )+l(γ zy ) = d(x, y), contradicting the triangle inequality. Therefore, we have that Hence, X has a segment property and the proof of the proposition is completed.
In the paper we investigate other types of measures, for instance uniform measures (Definition 5.1) and measures satisfying δ-annular decay condition for some δ ∈ (0, 1] (Definition 4.1). As mentioned in the Introduction, it turns out that measures continuous with respect to a metric seem to be most general among the aforementioned measures. We present the following list of relations between measures studied below.
Then, the following inclusions hold: We close the preliminary part of our presentation with recalling some basic definitions and facts about the first order Calculus on metric spaces. The presented results will be employed in Sect. 5 in the studies of differentiability properties of harmonic functions in metric spaces. For foundations of the analysis on metric spaces we refer e.g. to a book and a survey article by Heinonen [23,24], see also Heinonen-Koskela [25] and Hajłasz-Koskela [16].
We say that a property holds for p-a.e. rectifiable curve, if it fails only for a curve family with zero p-modulus, see e.g. Väisälä [51] and Section 2 in [25] for definitions and properties of the modulus of curve families in Euclidean and metric settings, respectively. We say that a nonnegative Borel function g f on X is an upper gradient of f for all nonconstant rectifiable curves γ : [0, l(γ )] → X , parameterized by arc length ds, we have whenever both f (γ (0)) and f (γ (l(γ ))) are finite, and γ g f ds = ∞ otherwise. If g f is a nonnegative measurable function on X and if (2) holds for p-a.e. nonconstant rectifiable curve, then g f is called a p-weak upper gradient of f .
Upper gradients were introduced in [25], whereas p-weak upper gradients were first defined in Koskela-MacManus [30]. A relation between those two notions follows from a result in [30], where it is also shown that a p-weak upper gradient of f can be approximated by a sequence of upper gradients of f in L p (X ). Moreover, if f has an upper gradient in L p (X ), then it has a minimal p-weak upper gradient in L p (X ), see Corollary 3.7 in Shanmugalingam [47].
Let p ≥ 1. We say that X supports a (1, p)-Poincaré inequality if there exist constants C P I > 0 and λ ≥ 1 such that for all balls B ⊂ X and all integrable functions f on X and all upper gradients g f of f , functions for subsets of metric measure spaces, both based on the mean value property. Our first definition corresponds to the most classical mean value property required to hold at every point of the underlying domain. Functions with such property will be called strongly harmonic. However, in what follows we will often drop term strongly and write, harmonic functions.

Definition 3.1 Let
⊂ X be an open set. A locally integrable function f : → R is called (strongly) harmonic in if the following inequality holds for all balls B(x, r ) with x ∈ and r > 0: The set of all harmonic functions in will be denoted H( , μ) and H( ) in case the measure is fixed.
The studies of relations between the harmonicity and the mean value property in the Euclidean setting have long history. It was Gauss who, perhaps first, observed that harmonic functions posses the mean value property. The opposite question, whether one need to require mean value property to hold for all radii of balls centered at the given point has also been investigated by several mathematicians, to mention results due to Koebe, Volterra and Kellogg, Hansen and Nadirashvili, and Blaschke, Privaloff and Zaremba. We refer to Section 2 in Llorente [35] for an interesting historical account on the mean value property and harmonicity; also to Heath [20] for further studies on to what extent the restricted mean value property is sufficient for harmonicity in the Euclidean setting. In order to motivate Definition 3.2 below more thoroughly, let us just mention that Koebe, for instance, showed that in order for a continuous function in a domain ⊂ R n to be harmonic it is enough to satisfy the mean value property at every x ∈ with respect to some family of radii r x with inf r x = 0. If we strengthen the assumption on function and require it to be continuous on the closure of a domain, then Volterra and Kellogg proved that one radius at every point is enough for the mean value property to imply the harmonicity. Hansen and Nadirashvili [17,18] improved the previous results by substituting continuity of a function up to the boundary by its boundedness. Blaschke, Privaloff and Zaremba independently observed that an asymptotic mean value property is enough to imply the harmonicity. Their results facilitated the discovery of p-harmonious functions, see Manfredi-Parviainen-Rossi [37] for the definitions and relations between p-harmonious functions and stochastic tug-of-war games.
In order to provide examples of studies beyond the Euclidean framework, let us mention that the mean value property appears in the setting of differential geometry, e.g. in the studies of the so-called harmonic manifolds and related notions of horospheres and the Lichnerowicz Conjecture. Recall, that a complete Riemannian manifold M is called harmonic if harmonic functions on M satisfy the mean value property, see Willmore [53], Ranjan-Shah [44], also Todjihounde [50] for further definitions and references. Furthermore, see e.g. Picardello-Woess [42] and Zucca [56] for the studies of mean value property in the context of harmonic functions on trees.
Motivated by the above considerations and the literature, we introduce the following more general variant of harmonic functions on metric measure spaces.

Definition 3.2 Let ⊂ X be an open set.
A locally integrable function f : → R is called weakly harmonic in if for every x ∈ there exists a non-empty set of positive radii r x α for α ∈ I such that the following inequality holds for all balls B(x, r x α ) : The set of all weakly harmonic functions in will be denoted wH( , μ) and wH( ) in case the measure is fixed.
A priori we allow set of indexes I to be any non-empty set, e.g. I can be uncountable.
However, in what follows we will study weakly harmonic functions under minimal assumptions, namely that at every point there is at least one admissible radii and that I is at most countable.
We denote by In what follows also the minimal radius at the point will play a role. Namely, for any x ∈ we denote by We will often require r x m > 0 or r m > 0. Similarly we define super-and subharmonic functions. with x ∈ and r > 0: We denote S − H( , μ) the set of all subharmonic functions in with respect to the measure μ while the set of all superharmonic functions in will be denoted S + H( , μ). For the sake of simplicity when the measure is fixed, we will often write S − H( ) (S + H( )).
We present now further properties of harmonic functions.

Proposition 3.1
The following properties hold: The analogous properties hold for weakly harmonic (sub-, and superharmonic) functions.
a ball centered at x ∈ with r > 0. In order to show Property 1 we note that Similarly, we show that The Young inequality gives us Property 2.
If f ∈ H( ), then the first inequality above becomes equality giving us the second part of Property 2. The proof of Property 3 follows the same lines as the one for Property 2. In this case inequalities in (3) are reversed due to convexity of F.
For the proofs of Properties 1-3 for weakly sub/super/harmonic functions one proceeds as above restricting the discussion only to balls with admissible radii.

Examples of weakly and strongly harmonic functions, relations to p-subharmonic functions
We begin with an example showing that already in simple one-dimensional case of R with the weighted Lebesgue measure, weakly and strongly harmonic functions may differ.
Example 1 Let (R, | · |, |x|dx) be a metric measure space equipped with the Euclidean distance and a measure μ such that dμ := dμ(x) = |x|dx. Define a function f : Then f is weakly harmonic but not harmonic. Indeed, f is locally integrable and by letting y = 0 and r < |y|, we find that Moreover, for any r > 0 we have On the other hand, if we take y > 0 and r > y, then and thus Similar situation occurs in R n for n > 1, as illustrated by the following example.
Example 2 Let X = R n be equipped with the Euclidean distance and the Lebesgue measure. One considers a sequence of annuli B(0, k + 1)\B(0, k) for k = 0, 1, . . . and related functions: u k (x) = a k φ n (x) + b k , where φ n stands for the fundamental harmonic solution in R n and coefficients a k , b k are choosen properly, so that the resulting function u : Moreover, u turns out to be weakly-, but not strongly harmonic. Similar construction can be obtained in the unit disc in R n . (See the discussion following Example 2.1.3 in Llorente [35] and the references therein for the details of the aforementioned constructions.) It turns out that already the Euclidean setting with the weighted Lebesgue measure leads to interesting results in the context of the mean-value property. [7] asserts that for a C 2 -regular weight w being a harmonic eigeinvalue, a C 2 function u is strongly harmonic in a domain ⊂ R n , for n ≥ 2 with respect to the weighted Lebesgue measure wdx if and only if u satisfies the following equation in :
The next two examples relate the mean-value harmonic functions to the studies in the context of manifolds (cf. the discussion above).

Example 4
The notion of the harmonic manifold grows from the studies of counterparts of the fundamental solution of the Laplace equation on manifold (H.S. Ruse, 1930). The Lichnerowicz conjecture, confirmed for dimensions 2-5, characterizes harmonic manifolds as either flat or rank-one symmetric, see [32], see also Nikolayevsky [41]. Recently, characterization of homogeneous harmonic manifolds has been obtained by Heber [21]. From our point of view the following result due to Willmore is interesting, see Theorem 3 in [53]: A Riemannian manifold M is harmonic if and only if every solution to the Beltrami-Laplace operator has the mean-value property over any geodesic sphere.

Example 5 Let M be a complete Riemmanian manifold with the sectional curvature
Suppose further that R is less than the injectivity radius of M. Then, Theorem in Chapter II.6 (pg. 75) in Schoen-Yau [45], asserts that any smooth nonnegative function u on M with u ≥ 0 has the sub meanvalue property on B(x, R). Therefore, if M has the sectional curvature K M bounded uniformly from above by k, then u is weakly sub-harmonic in M with admissible radii less the injectivity radius of M. More general, u is weakly sub-harmonic in those subdomains of M, where K M is bounded from above.
Analogous observation for super weakly-harmonic functions holds if, instead of the bound on the sectional curvature, the lower bound is imposed on the Ricci curvature, see Theorem 10 in [40].
In the following example we discuss the mean-value harmonic functions in the context of Carnot-Carathéodory groups (CC groups, for short).

Example 6
In [1] we studied relations between the mean-value harmonicity in the setting of CC groups and, in particular, in Heisenberg groups. Theorem 4.2 in [1] shows that strongly harmonic functions in such groups are smooth. Moreover, functions in H are also subelliptic harmonic, i.e. satisfy the L-harmonic equation, see Theorem 4.3 in [1]. Hence, functions in H are 2-harmonic in the sense of minimization of the 2-Dirichlet energy of the horizontal gradient. In fact, we provide examples showing that the opposite inclusion does not hold in general. Moreover, we identify a large class of subelliptic harmonic functions that are strongly harmonic. Namely, a subclass of the so-called spherical harmonic polynomials, see Observation 5.1 and Example 6 in [1].
An important setting, in which weakly and strongly harmonic function appear, is the one of the discrete metric spaces, such as graphs.

Example 7
Let T denote the homogeneous infinite tree of degree n such that each vertex has exactly the same number of neighbours n + 1. Then, it is fairly easy to see that a function satisfying the discrete Laplace equation defined as follows is also strongly harmonic (cf. Lemma 1 in [42]): where the sum is taken with respect to all verticies adjacent to vertex x. In fact, the stronger result holds. Namely, suppose that u > 0 is weakly harmonic with exactly one admissible radius r x at each vertex x of T . Then u is harmonic in the sense of the discrete laplasian provided that admissible radii satisfy the certain Lipschitz-type growth (see Theorem in [42]). Moreover this condition is also necessary.
Another definition of harmonic functions in the Euclidean setting comes from the minimization of the 2-Dirichlet energy and the fact that the related Euler-Lagrange equation is the Laplace equation. Such a variational approach allows to define the corresponding harmonic, or more general p-harmonic, functions also in the setting of metric measure spaces. The properties of p-harmonic functions and their potential theory have been intensively studied in last two decades by several authors, e.g. by Aikawa-Shanmugalingam [3], Björn-Björn [4], Björn-Björn-Shanmugalingam [5], Shanmugalingam [47,48], Kinnunen-Shanmugalingam [29]. Let us point out some differences between such functions and harmonic functions studied here. First, recall that most of results for p-harmonic functions are obtained under assumptions that the underlying space is a complete doubling metric measure space supporting (1, p)-Poincaré inequality, whereas in our setting we allow various kinds of measures, see for instance Proposition 2.1 and the discussion following it. Moreover, we do not necessarily assume a Poincaré inequality to hold. The most important difference between the p-harmonic functions and harmonic functions as in Definition 3.1 is that p-harmonic functions barely ever satisfy the mean value property (see e.g. Zalcman [55] for more discussion on the mean value property for various differential operators). This property may fail even if p = 2 and X = R n , but the measure μ is not the Lebesgue measure. Nevertheless, relations between the mean value property and p-harmonicity play important role in stochastic games, see e.g. [37].
Some counterparts of the sub mean-value property for L p -norms are known to hold in the manifold setting, see e.g. Li-Schoen [33, Theorem 2.1] and in the metric setting, see [3,Formula (9)]. Below, we employ some potential theoretic results to relate p-subminimizers to weakly harmonic functions.

Example 8
Let (X , d, μ) be an unbounded doubling metric measure space satisfying the (1, p)-Poincaré inequality and let u ≥ 0 be a bounded continuous p-subminimizer in X in the sense of Definition 7.7 in [4]. We will now investigate when u is weakly subharmonic in X \{x ∈ X : u(x) = sup X u}.
We remark that already in R n for n ≥ 3 equipped with the Lebesgue measure and the Euclidean distance, the Liouville theorem for subharmonic function may fail, see e.g. a counterexample in Remark (iv), pg. 132 in Protter-Weinberger [52]. Therefore, u need not be constant.
Set w := sup X u − u. Since u is bounded in X , it holds that inf X w = 0 and, thus, for all > 0, x ∈ X and a radius R > 0 such that inf B(x ,R ) w < . Observe that w ≥ 0 is bounded p-superminimizer in X . Therefore, by the weak Harnack inequality, see Theorem 8.10 in [4], we may find q, C > 0 such that for all R ≥ R where q and C depend only on p, doubling constant and the constants in the (1, p)-Poincaré inequality. Indeed, the estimate follows from [4] in case B(x , R ) ⊂ B(y, R). Otherwise, one needs to increase R so that the corresponding inclusion holds. Then, by applying the Young inequality, we obtain We claim that at every y ∈ := X \{x ∈ X : and so u is weakly subharmonic in . Suppose that (5) fails at a given y ∈ . Then, for all R the opposite inequality holds at y contradicting (4), unless u(y) = sup X u which is ruled out by the definition of set . Notice, that in order to ensure that a ball of radius R y , where (5) holds, is contained in we need, for instance, to assume that sup X u is not attained by u in X .
Similarly it holds that u ∈ wH( ), for any ⊂ where (5) can be verified for all y ∈ , see Corollary 7.11 and Proposition 7.16 in [4].

Harnack estimates, maximum principles, Hölder and Lipschitz continuity
In this section we show several geometric properties of strongly and weakly harmonic functions such as the Harnack inequalities on balls and compact sets, strong and weak maximum principles and comparison principles. One of the main results of this section is the Hölder continuity of harmonic functions as in In other words in Proposition 4.1 we require that all points y in every neighborhood U of a point x have at least one common radius with the set of admissible radii at x for a weakly harmonic function f . Then, f is continuous at all points x ∈ where such property holds. We note that here we do not assume that μ is doubling.
Proof Suppose that x, y ∈ and fix r > 0. Then, we have Recall that, by definition, function f ∈ H( , μ) belongs to L 1 loc ( ). Let now y → x in metric d. Then, by the continuity of μ with respect to d we have that μ(B(x, r ) B(y, r )) → 0. This assumption together with the absolute continuity of the Lebesgue integral with respect to the measure imply that f (y) → f (x).
Let now f ∈ wH( ) and x ∈ satisfy the assumptions of proposition. Thus, for any sequence {y k } ∞ k=1 converging to x for k → ∞ in metric d we have that for some i ∈ N and all j, k ∈ N it holds that r x i = r y k j . Denote such a radius by r . This gives us a radius common for points x and all y k for which the mean value property for f holds. Then, estimate (7) holds for r and, as previously, completing the proof of the proposition.
The following observation is an immediate consequence of Proposition 4.1.
. Then the following inequality holds where C H = C 3 μ and C μ stands for a doubling constant of μ.
Then, the Harnack inequality (8) holds with constant Proof We follow the steps of reasoning in [13] and note that by assumptions on a strongly harmonic function f the following inequality holds for any y, z ∈ B Hence, the harmonicity of f and the doubling property of μ together with the fact that Similarly, if f is weakly harmonic, then the above approach gives us for y, z ∈ B that In the last estimate we have also used the assumption that sup y∈B r y m < r , and hence there exists an admissible radius at z such that r z i 0 < r . Moreover, it holds that since by assumptions 3r < inf y∈B r y M . By the analogy to the case of f ∈ H( ), we obtain Here, we also appealed to the doubling property of μ.
Since both (9) and (10) hold for any y, z ∈ B they hold for supremum and infimum as well resulting in the assertion of the lemma.
In order to show the Harnack estimate on compact sets for weakly harmonic functions we will need the following variant of Lemma 4.1. Proof We follow the steps of Lemma 4.1 and, upon notation of the lemma, we arrive at the following estimates By combining these inequalities we obtain an analog of (10): where the final constant arises from the doubling property of measure μ. From this the Harnack inequality follows immediately.
As an immediate consequence we obtain the Harnack estimate on compact sets.
where C > 0 is a constant whose value is independent of f , but depends among other parameters on C μ , a doubling constant of μ.
Moreover, for f ∈ wH( , μ) estimate (11) holds provided that 0 < r m ≤ r x ≤ r M < ∞ for all x ∈ K and dist(K , ∂ ) > 2r K M and both r m and 3r M are admissible radii for all y ∈ K . In such a case the Harnack constant C = C(C μ , r m , r M ). [13] the Harnack inequality is proved for connected sets which are not necessarily path-connected. Furthermore, here we estimate Harnack constants in terms of the doubling constants and admissible radii.

Remark 1 (1) In
(2) Note that open set need not be bounded. Therefore, we assume that r M < ∞ in order to ensure that the Harnack constant C in (11) is finite.

Proof of Corollary 4.2
The proof follows the standard reasoning and, therefore, we will present only a sketch of it. For every x ∈ K we find a ball B(x, r x ) such that B (x, 6r x ) . The collection of such balls gives us a open cover of K , and by compactness of K we may choose a finite subcover consisting of N balls. Next, take points x, y ∈ K and connect them by a curve γ . Indeed, since the space X is geodesic and , Lemma 4.38 in Björn-Björn [4] implies that any two points in K can be joint by a rectifiable curve.
This, together with continuity of f , Proposition 4.1 imply the assertion of the corollary with C := C 2N μ . The reasoning for weakly harmonic functions is similar. We cover set K with open balls C := {B(x, r x )} x∈K such that we can apply a variant of the Harnack estimate on every B x as in Lemma 4.2. Namely, we assume that r x := r m for all x ∈ K . Moreover, we need to ensure at every x ∈ K that a ball B : . This, follows from the condition that dist(K , ∂ ) > 2r K M . Using compactness of K we choose from the cover C a finite cover of K by balls {B i } for i = 1, . . . , n as in the case of strongly harmonic functions.
The remaining part of the chaining argument stays the same as in the case of strongly harmonic functions. Observe, that for all i = 1, 2, . . . , n it holds that r B i M ≤ r M and r B i m ≥ r K m . In a consequence we arrive at the following chain of estimates, cf. Lemmas 4.1 and 4.2:  In a consequence, f ≡ M and the proof is completed in the case of strongly harmonic functions.
If f ∈ wH( , μ), then the above approach may fail. Indeed, in the previous reasoning we need to know that for a set , there is a ball B ⊂ such that B ∩ = ∅ and 3B . For porous sets ensuring existence of a point x ∈ and a radii r x i for some i = 1, 2, . . . may require r x m = 0 which, in turn, is prevented by assumptions of the Harnack inequality, cf. Corollary 4.2. Instead, we follow the approach of Theorem 3.1 in [13].
Let be as in the previous part of the proof. Continuity assumption on f ∈ wH( ) imply that is a relatively closed subset of .
Moreover, let us choose any x 0 ∈ with B(x 0 , r x 0 i ) for some admissible radius r x 0 i . By the harmonicity of f we have that is open and, as in the case of strongly harmonic functions, we get that f ≡ M in .
Recall that a metric space X is locally connected if every neighborhood of a point x ∈ X contains a connected neighborhood. Then, the Mazurkiewicz-Moore-Menger theorem stays that X is locally pathconnected provided that it is proper metric space, see Theorem 1, pg. 254, in Kuratowski [31]. In particular, every component of an open set is open and pathconnected, see Theorem 2, pg. 253, in [31].
A connected space need not be locally connected (see e.g. the topologist's sine curve). Therefore, we present two variants of the weak maximum principle, related to different connectivity assumptions on the metric space. The weak maximum principle follows immediately from Proposition 4.2 (cf. Theorem 3.2 in [13] proved under stronger assumptions than the one below).
Proof we will show only the second inequality, the first one follows the same steps. Suppose opposite, that sup f > sup ∂ f . Then the maximum of f is attained in , giving by Proposition 4.2, that f ≡ sup f contradicting the continuity assumption of f .
The proof of the corollary in the case of f ∈ wH( , μ) follows the above lines, since under our assumptions f is continuous in .
Next we show the comparison principle for harmonic functions on domains. The result follows from Proposition 4.2 (cf. Theorem 3.2 in [13] proved under stronger assumptions on the domain).

Corollary 4.4 (Comparison principle) Let (X , d, μ) be a metric measure space and X be a domain. Let, further, f , g ∈ H( , μ) ∩ C( ) be such that f ≥ g on ∂ . Then f ≥ g in .
Furthermore, the assertion holds also for f , g ∈ wH( , μ) ∩ C( ) provided that at every x ∈ the sets of admissible radii of functions f and g have at least one common radius.
Proof Since both f and g are harmonic in , then so is also f − g. Since f ≥ g on ∂ , then inf ∂ ( f − g) ≥ 0. By the Corollary 4.3 we obtain that From this, we obtain that sup g ≤ inf f and the comparison principle follows.
The proof of the corollary in the case of f ∈ wH( , μ) follows the above lines. Indeed, f and g are continuous in by assumptions and f − g is weakly harmonic in , as sets of admissible radii of functions f and g have a common radius at every x ∈ .
We are in a position to state and prove the main result of this section, local Hölder continuity of harmonic functions. The proof of this result relies on the Harnack estimate on balls and holds for strongly harmonic functions. The iteration method used below requires that for every ball of radius r one is able to apply the Harnack estimate on a ball with radius r /t for some t > 4. This, however, need not be satisfied for weakly harmonic functions in a domain unless r m = 0, which leads constant C in Lemma 4.1 to be unbounded.
From this we get Let y ∈ B(x, r ) be such that r t n+1 ≤ d(x, y) < r t n for some n = 0, 1 . . .. (Such bounds always hold for some n ∈ N depending on y.) We iterate inequality (13) and obtain the following estimate: Indeed, set Then From this, estimate (14) follows immediately. Let now B := B(x 0 , r ) and let x, y ∈ B for B such that 4B . We distinguish two cases. Case 1: d(x, y) < r . Then, by repeating the above discussion we obtain Therefore, f is locally Hölder continuous with exponent α as in (15). If f ∈ wH( , μ), then the above reasoning can be repeated using second parts of Lemma 4.1 and Corollary 4.2.
We close this section with yet another Hölder and Lipschitz regularity result for harmonic functions. First, we need the following definition, cf. Section 1 in Buckley [8]. (X , d, μ) be a metric measure space with a doubling measure μ. We say that X satisfies the δ-annular decay property with some δ ∈ (0, 1] if there exists A ≥ 1 such that for all x ∈ X , r > 0 and ∈ (0, 1) it holds that μ (B(x, r )\B(x, r (1 − ))) ≤ A δ μ (B(x, r )).

Definition 4.1 Let
If δ = 1, then we say that X satisfies the strong annular decay property. Spaces with annular decay property appear, for instance, in the context of the Hardy-Littlewood and fractional maximal operators, see Buckley [8] and Heikkinen-Lehrbäck-Nuutinen-Tuominen [22] respectively, parabolic De Giorgi classes, see Masson-Siljander [39].
Among examples of spaces with strong annular decay property let us mention geodesic metric spaces with uniform measures, R n with the Lebesgue measure and Heisenberg groups H n equipped with a left-invariant Haar measures. Moreover, Corollary 2.2 in [8] stays that if (X , d, μ) is a length metric measure space with a doubling measure μ, then X has the δ-annular decay property for some δ ∈ (0, 1] with δ depending only on a doubling constant of μ. In fact, Theorem 2.1 in [8] asserts that it is enough for (X , d) to be the so-called (α, β)-chain space in order to conclude that X has the δ-annular decay property. In such a case δ depends additionally on α and β. We refer to the discussion in Section 2 in [8] for relations between (α, β)-chain spaces and the Boman chain condition and C(λ, M)-condition of Hajłasz-Koskela [16].

Remark 2
Let us comment on relation between measures satisfying Definition 4.1 and measures continuous with respect to distance. Let x, y ∈ X and suppose that d(x, y) < r for some r > 0. If (X , d, μ) has δ-annular decay property for some δ ∈ (0, 1], then , r + d(x, y)).
By letting d(x, y) → 0 we obtain that μ (B(x, r ) B(y, r )) → 0 and, hence, μ is continuous with respect to d.
The following example shows that the opposite relation need not hold, i.e. a measure continuous with respect to a metric may fail δ-annular decay property for any δ ∈ (0, 1].

Example 9
Let X = R with the Euclidean metric and a measure dμ(x) = e −|x| dx. It is easy to check that μ is continuous with respect to d. Namely, for any ball B(x, r ) = (x − r , x + r ) one need to consider three cases: (1) x + r ≤ 0, (2) x − r ≥ 0 and (3) −r < x < r , depending on the position of B(x, r ) with respect to 0. In all cases one gets that for any fixed x, the function r → μ (B(x, r )) is continuous and hence, by Part (3) of Lemma 2.1 our claim holds true.
We will show that for large enough x, y > 0 and large enough radii r < x, r < y condition (16) fails. By computations we get for any ∈ (0, 1) that μ (B(x, r ) μ(B(x, r ) B(y, r ) Therefore, by letting = 1/r , we obtain the following equality Hence, for large enough x, y and r we get that condition (16) may not be satisfied with any A > 0 and δ ∈ (0, 1].
In next theorem we show Hölder and Lipschitz estimates on balls and compact sets, thus extending Theorem 4.1. Previous assumptions on measure allow us to establish Hölder estimates for some constant and exponent, whose exact values are not determined. Here, the δ-annular decay property satisfied by a measure enables us to obtain finer estimates on balls already in the Hölder case. Moreover, on compact subsets we obtain the Hölder regularity as in Theorem 4.1 but, additionally, provide estimates with explicit constants and exponent δ. Both for the Hölder case and the new Lipschitz one, we also have explicit constants, however a dependence on a Lebesgue number of a chosen covering comes into play. Such a dependence is removed in one of our next results, see Proposition 5.1. (X , d, μ) be a doubling metric measure space with a δ-annular decay property for some δ ∈ (0, 1].

Theorem 4.2 Let
If δ ∈ (0, 1), then a locally bounded strongly harmonic function f in a domain ⊂ X is δ-Hölder continuous on every ball B := B(x 0 , r ) ⊂ centered at x 0 ∈ such that 3B . If δ = 1, then f is locally L-Lipschitz continuous on every ball B ⊂ such that 3B . In both cases we have that for x, y ∈ B(x 0 , r 2 ). Here, C μ stands for a doubling constant of μ and A is as in (16).
we set the latter expression to be . In a consequence estimate (19) takes the following form , r − d(x, y))) .
As a result we have that holds for all x, y ∈ B(x, r /2). Suppose now, that x, y ∈ B(x 0 , r /2) such that 2B(x 0 , r ) . Let us consider two cases. x 0 ). Then, the estimate (20) together with the triangle inequality imply that Then, y ∈ B(x, r /2) and B(x, 2r ) ⊂  B(x 0 , 3r ) . Thus, from (20) we obtain We note that f L ∞ (B(x,2r )) ≤ f L ∞ (B(x 0 ,3r )) and combine inequalities obtained in both cases to obtain the assertion of Theorem 4.2 for balls.
Let K be a compact subset of and r = dist(K , ∂ ). Since K is compact, we can cover it by open balls B(x, r /2) centered at points x ∈ K and choose a finite subcover, denoted by B i := B(x i , r /2) for i = 1, 2, . . . , N for some N . Hence, Let us denote by η a Lebesgue number of covering {B i }. If x, y ∈ K are such that d(x, y) ≤ η, then there exists i 0 ∈ {1, ..., N } such that x, y ∈ B i 0 . This allows us to apply (17) and obtain the following inequality This completes the proof of the second part of Theorem 4.2 and the whole proof is, thus, completed.

The Lipschitz regularity and uniform measures: weak upper gradients of harmonic functions
In this section we study some differentiability properties of harmonic functions and our main result is Proposition 5.1. There, we show the Lipschitz regularity of strongly and weakly harmonic functions in the case of the uniform measure growth. Such measures play a fundamental role e.g. in the geometric measure theory, see the discussion and references below. Then, by using the celebrated Cheeger's results on differentiability of Lipschitz functions, in Corollaries 5.1 and 5.2 we study the existence of weak upper gradient for strongly and weakly harmonic functions. (X , d, μ) be a geodesic metric space equipped with a Borel regular measure μ. We call μ a Q-uniform measure for some Q ≥ 1, if there exists a constant C > 0 such that for any x ∈ X and all r > 0

Definition 5.1 Let
Uniform measures play an important role in geometric measure theory. For instance, if X = R n , then Marstrand [38] proved that for a non-trivial Q-uniform measure it necessarily holds that Q ∈ N (see also Chousionis-Tyson [10] for a discussion of Marstrand's theorem and uniform measures in the setting of Heisenberg groups). One of results of the celebrated paper by Preiss [43] stays that for Q = 1, 2 uniform measures are flat. Let us also mention that uniform measures have been employed to investigate relations between harmonic measures and non-tangentially accessible domains (NTA-domains), see Kenig-Preiss-Toro [27] and in the studies of rectifiable measures, see Tolsa [49]. Moreover, uniform measure appear in potential and stochastic analysis, see Bogdan-Stós-Sztonyk [6], in the theory of incompressible flows with vorticities, see Cieślak-Szumańska [11].

Remark 4
It is easy to see that uniform measures satisfy 1-annular decay property, see Definition 4.1 and so for strongly harmonic functions Proposition 5.1 follows from the Theorem 4.2. However, below we are able to describe more accurately dependence of the Lipschitz constant on the parameters of the underlying space and the harmonic function. In particular, we avoid using a Lebesgue number of a covering. Moreover, the result below gives also the Lipschitz regularity for weakly harmonic functions. f ∈ H( , μ). Note that μ is a doubling measure with a doubling constant C μ = 2 Q . Then, Proposition 2.1 implies that μ is continuous with respect to metric d. In a consequence, we infer from Corollary 4.1 that f is locally bounded. Denote by M an upper bound of f on some compact set K ⊂ . The estimate similar to (7) in Proposition 4.1 gives us that μ(B(x, r )) B(x,r ) B(y,r ) | f (z)|dμ(z) μ(B(y, r ))| μ(B(x, r ))μ (B(y, r )) , r ) B(y, r )) μ (B(x, r )) . (22) As in Theorem 7.2 we assume that r > d(x, y). Then, by (33) and (21) μ (B(x, r ) B(y, r )) ≤ μ (B(x, r + d(x, y))\B(x, r − d(x, y)))

Proof of Proposition 5.1 Let
Hence, by the mean value theorem applied to function s Q , we obtain that μ (B(x, r ) B(y, r )) μ (B(x, r )) where s ≤ 1 + d(x,y) r < 2. Choose x, y ∈ K and let r : If f ∈ wH( , μ), then by assumptions for all x, y ∈ K we are able to find at least one radius, denoted by r , such that (22) and estimates following it hold for r . Then, in the final step we have that and so in this case L = Q2 Q+1 M r K m , as desired. The proof is therefore completed.
One of the consequences of Proposition 5.1 is the differentiability of Lipschitz weakly and strongly harmonic functions on compact sets.
Let f be a locally Lipschitz function in ⊂ X . We define a lower pointwise dilatation of f as follows Similarly, we define an upper pointwise dilatation of f by the formula: We refer to the following result due to Cheeger, see also Preliminaries for a discussion on weak upper gradients and the Poincaré inequalities.  (X , d, μ) be a complete geodesic metric space such with a Quniform measure μ for some Q ≥ 1 and supporting (1, p)-Poincaré inequality for p > 1. Suppose that f is a strongly harmonic function in a compact set K ⊂ . Then, the minimal p-weak upper gradient g f of f exists and g f = lip f = Lip f a.e. in K.
Furthermore, the assertion holds for a weakly harmonic function f in K provided that f satisfies the assumptions of the second part of Proposition 5.1.
Similarly, by combining the Cheeger's theorem with Theorem 4.2 we arrive at the following result.

Corollary 5.2 Let (X , d, μ) be a complete doubling metric measure space with a 1annular decay property supporting (1, p)-Poincaré inequality for p > 1. Suppose that f is a strongly harmonic function in a ball B ⊂ 2B
. Then, the minimal p-weak upper gradient g f of f exists and g f = lip f = Lip f a.e. in B.

The Dirichlet problem
We begin this section with an observation that in general, the Dirichlet boundary value problem need not have a solution even in the simplest one-dimensional case as the following example shows.
Consider the Dirichlet problem of finding a harmonic function g in H((0, 1), | · |, xdx) such that g(0) = g (1). Then, by the above reasoning there is no solution of such problem.
The purpose of this section is to study the following questions: Although these questions are nowadays classical in the Euclidean setting, see e.g. Gilbarg-Trudinger [14], their metric counterparts have been intensively studied mainly in past two decades, see e.g. Section 10 in Björn-Björn [4] and references therein.
However, results in [4] apply to harmonic functions defined as minimizers of the 2-Dirichlet energy, whereas we study the above two questions for harmonic functions defined via the mean value property.
We approach the solvability of the Dirichlet problem by employing the so-called Dynamical programming principle, generalized to the metric setting and based on studies conducted for p-harmonious functions in Euclidean domains by Luiro-Parviainen-Saksman [36] and Manfredi-Parviainen-Rossi [37]. Our results apply to some functions with the mean value property for measurable and continuous boundary data. For the further discussion and description of some challenges when applying the Dynamical programming principle in our case we refer to Remarks 1 and 2 in Liu-Schikorra [34].
First, we extend the dynamical programming principle as presented in [36] to the setting of metric spaces with Borel regular measures. Theorems 6.1 and 6.2 below extend Theorems 2.1 and 4.1 in [36] for measurable and continuous data, respectively. Moreover, Theorem 6.1 provides us with a function u , the solution to the Dirichlet problem with measurable data, such that it satisfies the mean value property on balls with radii . In Theorem 6.2 we show that the similar property holds for solutions to the Dirichlet problem with continuous data at points with -distance from the complement of the domain. Finally, we show that in metric measure spaces with the δ-annular decay property the existence of subharmonic solution of the boundary value problem with continuous data implies existence of the weakly harmonic continuous function with the same continuous boundary data, see Theorem 6.3.
We follow the notation of Section 2.1 in [36] and for > 0 define the -boundary strip of a domain ⊂ X : In order to ensure that = ∅ we need to assume that is such that ⊂ X . This assumption will not weaken our results, as in fact we apply them only for balls B compactly contained in the underlying domain with radii small enough so that B ∪ remains a subset of the domain. Denote by := ∪ .
In fact, u is the uniform limit of a sequence {u i } ∞ i=0 defined via the following iteration scheme: Proof First, notice that T u i is Borel bounded measurable function in for every i = 0, 1, . . .. In order to verify this observation, first notice that u 0 is measurable. Next, we compute The continuity of μ with respect to d gives us that u 1 (x) is continuous for x ∈ , whereas for x ∈ \ the measurability of u 1 follows the same argument as for u 0 . Indeed, by Lemma 2.1(1) we have that a function x → μ(B(x, )) is continuous in . Similarly, a function x → B(x, ) u 0 (y)dμ(y) is measurable as a quotient of two measurable functions. The measurability of u i+1 = T u i for i = 1, 2, . . . follows the same steps by induction and we omit details.
We continue the proof following the reasoning for Theorem 2.1 in [36]. It is immediate to check that u 1 ≥ u 0 in . In order to give an idea about formulas describing functions u i we compute also This yields u 2 = T u 1 ≥ T u 0 = u 1 . The same reasoning allows us to conclude that u i ≤ u i+1 in for all i = 0, 1, . . .. Definitions of u 0 and operator T together with easy argument by induction imply that the sequence {u i } ∞ i=0 is increasing and uniformly bounded from above by sup F < ∞. The latter property is a consequence of a simple induction applied with (24). Namely, since |u 0 | ≤ sup F in , then so is u 1 . Then, by assuming that |u i | ≤ sup F in for some i > 1 we trivially obtain that for while otherwise, in \ , the boundedness of u i+1 immediately follows from its definition. Therefore, we are in a position to define the following bounded Borel measurable function u : → R: Next, one shows that the convergence is uniform and the proof is by contradiction. This proof follows steps of the corresponding proof of Theorem 2.1 in [36] for α = 0 and β = 1 and, therefore, will be omitted. Let us comment, that the uniform convergence implies that u satisfies (23) and, by construction, has the boundary data F.
Using the Tietze extension theorem applied to ∂ and a continuous function g : ∂ → R we obtain a continuous function F : , → R such that F| ∂ = g. Moreover, Let us remark, that if F is an extension of g for some 1 , then F can be taken also for all ≤ 1 . → R which solves the following boundary value problem: In particular, u | ∂ = g.
Proof Following the idea of the proof of Theorem 6.1 we define a function u 0 : → R as Moreover, for bounded functions u : → R we let T be an operator defined as follows: u(y)dμ(y).
By convention, we will interpret that for all x ∈ \ , . By an iterative scheme we define u i+1 := T u i for i = 0, 1, . . . and show that {u i } ∞ i=0 is a monotone increasing bounded sequence of continuous functions in . Furthermore, as in Lemma 6.1, the sequence {u i } ∞ i=0 is uniformly bounded from above by sup ∂ g < ∞ and the argument for this to hold follows again from definitions of u 0 , T and induction.
The natural modification of the proof of Theorem 6.1 allows us to conclude that function u := lim i→∞ u i is continuous and satisfies (25).
In order to show the uniqueness, let us suppose that u 1 and u 2 solve (25) and u 1 ≡ u 2 . Set Furthermore, note that it is enough to consider sup z∈ (u 1 (z) − u 2 (z)) instead of the supremum for absolute values of u 1 −u 2 , as the case u 2 −u 1 follows by the symmetric argument. The definition of immediately implies that is non-empty. Moreover, let us notice that contains a ball B(x, ). Indeed, let us consider two cases. Case 1 \ , = ∅. Then for x ∈ \ , it holds that Hence, u 1 − u 2 ≡ M in B(x, ). Choose a point z ∈ ∂ and some point x ∈ close enough to z. Since is path-connected, there exists a continuous curve γ joining x and x in . By the compactness of |γ | we may find a finite cover C = {B i } N i=1 of γ by balls centered at points x i ∈ γ with radii /2 such that x 1 = x and x N = x . Let B(x , ) be a ball in C with x ∈ γ and x ∈ B(x, /2) ∩ B(x 2 , /2). We apply reasoning at (26) to B(x , ) using again the mean value property for u 1 and u 2 and obtain that u 1 − u 2 ≡ M in B(x , ). We continue this procedure along γ till we reach first point x ∈ γ , such that x ∈ \ , ∩ B(x i , ) for some 2 ≤ i ≤ N − 1. Then by the definition of u in (25) we get Thus, by repeating the last step at most once more, we have approached ∂ obtaining a contradiction with the fact that u 1 | ∂ = g = u 2 | ∂ . Namely, for z ∈ ∂ it holds that u 1 (z) − u 2 (z) = 0, even though for points y ∈ U ∩ for an arbitrarily small neighborhood U of z we have that u 1 (y) − u 2 (y) = M > 0, contradicting continuity of u 1 and u 2 . Case 2 \ , = ∅. Then, since is non-empty, there exists x ∈ ∩ , and the above procedure simplifies. In fact we immediately reach the contradiction, since for z ∈ ∂ ∩ B(x, ) on one hand we have that u 1 (z) − u 2 (z) = 0, but on the other hand for points y ∈ U ∩ for an arbitrarily small neighborhood U of z it holds that u 1 (y) − u 2 (y) = M > 0 by (27) applied for x := x.
The proof of the uniqueness and the whole proof of the theorem are, therefore, completed.
The last result of this section shows that if we know that a Dirichlet problem has a continuous subharmonic solution, then the weakly harmonic solution exists and satisfies the same continuous boundary data. where r x ≤ 1 2 dist(x, ∂ ) is a given single admissible radius at x. In order to see that T is well defined, let us consider any u ∈ C b ( ) and denote M := u L ∞ ( ) . The standard computations then imply that Moreover, for all x and y with d(x, y) small enough, and B(x, r x ) ∪ B(y, r y ) ⊂ B(x, max r x , r y + d(x, y)). Hence, We combine (28) and (29), which hold for y → x in d and get that the δ-annular decay property of X implies T u ∈ C( ), cf. Definition 4.1. By basic properties of the mean value one also obtains that T u ∞ ≤ M.
We use operator T to construct the following sequence of functions: u n := T u n−1 for n = 1, 2, . . ..
We easily see that all u n ∈ C b ( ) and u n L ∞ ( ) ≤ v L ∞ ( ) . Next, observe that every u n is weakly subharmonic in with admissible radii r x = r x . Indeed, u 0 = v is subharmonic, so by the definition Moreover, note that if v ≤ w, then T v ≤ T w. Hence, by induction we get The above reasoning shows also that sequence {u n } ∞ n=0 is increasing at every x ∈ . We extend sequence {u n } ∞ n=0 to in such a way that u n | ∂ = g for all n = 0, 1, . . .. Indeed, this is possible for u 0 because v is continuous up to the boundary and v| ∂ = g. In order to see that the same holds true for u n for n ≥ 1 let us first consider any w ∈ C( ) with w| ∂ = g. Then for all x ∈ ∂ and > 0 there exists δ > 0 such that In a consequence, T w ∈ C( ) and T w| ∂ = g. We apply this reasoning with w = u n for n = 0, 1, . . . and obtain that {u n } ∞ n=1 is bounded increasing sequence of continuous functions on compact set, such that all u n | ∂ = g.
We are now in a position to define the following Borel function: One can show that {u n } ∞ n=1 converges uniformly in and the reasoning is similar to the one in the proof of Theorem 2.1 in [36], cf. presentation in the proof of Theorem 6.1 above. Since u n | ∂ = g for all n, the sequence converges uniformly also in . Hence, u ∈ C( ) and u| ∂ = g. By employing the monotone convergence theorem to the sequence we get that u ∈ wH( ).
It is a work in progress to establish a viable method for proving the existence of the solutions to the Dirichlet problem via the Perron method or by the dynamical programming method (see e.g. Theorem 4.1 in [37]). Regarding the first approach, our efforts are focused on establishing a counterpart of the Poisson modification in the setting of strongly harmonic functions. Such modifications have several variants e.g. for superminimizers and superharmonic functions in the setting of Newtonian spaces, see e.g. Sections 8.7 and 10.9 in Björn-Björn [4]. Furthermore, one can also obtain a counterpart of the notion of a barrier function at a boundary point x 0 ∈ ∂ for the mean-value harmonicity, by studying continuous functions f : → R which satisfy: Let (X , d, μ) be a metric space with metrically continuous measure such that all balls are connected. Suppose that ⊂ X is a domain and g : ∂ → R is a continuous function. Moreover, let us assume that the harmonic Dirichlet problem is solvable on all balls B ⊂ for an arbitrary continuous boundary data.
Then, the Dirichlet problem has a solution in if and only if at every x ∈ ∂ there exists a barrier function, and for every ball in there exists a solution of the Dirichlet problem with g.
We remark that the solvability of the Dirichlet problem on balls leads to interesting problems. For instance, in the Heisenberg setting, a ball in a Carnot-Carathéodory metric need not be a regular set for 2-harmonic functions, see Example 14.4 in [4].

The Liouville theorem
The Liouville theorem is a classical result in the theory of harmonic functions in R n . The purpose of this section is to establish similar results for strongly and weakly harmonic functions on metric measure spaces. It turns out that already on R we may choose such a measure, so that the Liouville theorem fails, cf. Example 11. However, below we establish a fairly general condition on a measure resulting in the Liouville theorem, see (31) and (32) Hence, we obtain that h ∈ H( , μ). In order to show the opposite implication, let us .
Let now f , g ∈ wH( , μ) and f > 0. Then, the above reasoning holds at every ball B = B(x, r x i ) for all i, since sets of admissible radii are the same for both functions.
Before proving Liouville-type results, let us give an example illustrating that, in general, the Liouville property need not hold.

Example 11
There exists a measure μ on (R, | · |) and f ∈ H(R, μ) which is bounded and nonconstant.
Let f (x) = 2e x cosh x = 1 + e 2x . Then f ∈ H(R, e −x dx). Indeed, for every x ∈ R and r > 0 we have Hence, we obtain that 1 μ (B(x, r ) However, by virtue of Proposition 7.1 applied with f (x) = 2e x cosh x, measure μ = e −x we get that a entire nonconstant bounded harmonic function g : (30).
We turn now to the question of the structure and dimension of the space of harmonic functions on the whole space. Similar studies in the setting of manifolds have been studied by several authors, e.g. Colding-Minicozzi [12] for Riemannian manifolds, Theorem 1.4 in Hua-Kell-Xia [26] in the setting of RCD*(0, N ). Next, we take any b > y. If f is not strictly monotone on [y, b], then we split this interval into the intervals where f is monotone and apply the following reasoning on such intervals. Therefore, let us suppose that f is monotone increasing on [y, b], then by the the strong maximum principle in Proposition 4.2 applied to [x, b], we get that f is constant on [x, b]. We obtain the same conclusion if f is monotone decreasing, since then we use the strong minimum principle (an immediate consequence of Proposition 4.2). The analogous reasoning gives us that f must be constant on any interval [a, y] for a < x. From this, we have that f is constant on any interval [a, b] containing the set [x, y] and the claim is proven. Now, we are in position to prove the assertion of the example. Let f , g ∈ H(R, d, μ) be such that f , g are non-constant. Then, by the claim f and g are strictly monotone. Hence, there exists A ∈ R such that f (1) − f (−1) = A(g(1) − g(−1)). Thus, In fact dim H can be smaller then 2, since it holds that dim H(R, | · |, |x|dx) = 1.
Finally, note that the similar result for weakly harmonic functions fails since such functions do not have a natural structure of a linear space. In order to ensure such structure one would have to assume, for instance, that all functions in wH( , μ) have the same sets of admissible radii at every point of .
The following result is related to a work of Yau [54] for Liouville theorems on complete Riemannian manifolds with the Ricci curvature bounded from below.
Before proving the theorem we present two observations regarding sufficient conditions for functions and for a space and a measure for (32) and (31) to hold, respectively.

Remark 5
Suppose that at every point x ∈ X : (1) f has the same sets of admissible radii r x n for n = 1, 2, . . ., and (2) r x M = sup n∈N r x n = ∞. Then in assumption (32) one can consider, for instance, sequences r x n = r y n for n = 1, 2, . . ..
Now let r 1 = r 2 = r . We take lim inf for r → ∞ and thus, by assumption (31), we get that f (x) = f (y) for every x, y ∈ X . From this the proof for strongly harmonic functions follows.
Let now f ∈ wH(X , μ). Then we set r 1 = r x n and r 2 = r y n for n = 1, 2, . . . and appeal to (32) in order to complete the proof of the theorem for weakly harmonic functions.  + d(x, y)).
Therefore, assumption (31) of Theorem 7.1 is satisfied and hence every bounded harmonic function in H(X , μ) is constant. The proof of the theorem for strongly harmonic functions is completed. Now let f ∈ wH(X ) with r x M = ∞ for all x ∈ X . Therefore, at every x ∈ X we may choose monotone sequences of admissible radii (r x n ) and (r y n ), such that lim Let us construct the following subsequences of (r n ) and (s n ): (1) r 1 := r n 1 , s 1 := s n 1 , for some n 1 ≥ 1, (2) for l = 2, 3, . . . we set s l := s n k+1 , such that s n k+1 > r n k and r l := r n k+1 .
Therefore, for i = j we have that B(x, r i )\B(x, s i ) ∩ B(x, r j )\B(x, s j ) = ∅.
Hence, by additionally appealing to the finiteness of the measure μ of X , we get μ(B(x, r x n k ) B(y, r y n k )) μ(B(x, r x n k )) ≤ μ B(x, r n )\B(x, s n ) μ(B(x, r x 1 )) → 0, for n → ∞.
Thus, assumption (32) of Theorem 7.1 is satisfied implying that f is constant. The proof of the theorem is, therefore, completed.
The Liouville theorem can also be obtain from the Harnack inequality on balls, see Lemma 4.1. Below we assume that μ is bounded, restricting the set of admissible measures, but on the other hand we require harmonic function to be bounded from below only. Namely, the following result holds. Proof Let f ∈ H(X , μ) and define g = f − inf X f ≥ 0. By Proposition 3.1(1) we have that g ∈ H(X , μ). By the Harnack inequality, see Lemma 4.1, we have that for all x ∈ X and any ball B(x, r ) ∈ X g(x) ≤ sup g → 0, as r → ∞.
Hence, g ≡ 0 and, in turn, f is constant.
In the setting of weakly harmonic functions the same type of argument cannot be applied. Indeed, if r B M → ∞, then the Harnack constant C H in Lemma 4.1 grows unbounded.