1 Introduction

The Liouville theorem in classical complex analysis states that there is no bounded nonconstant holomorphic function on the entire complex plane. Its analogue for harmonic functions says that there is no bounded (or positive) nonconstant harmonic function on the entire Euclidean space \(\mathbf {R}^n\). This latter Liouville theorem is a consequence of the fact that positive harmonic functions on the Euclidean space satisfy a Harnack type inequality.

Harnack inequalities hold also for solutions of many nonlinear differential equations, such as the \(p\)-Laplace equation

$$\begin{aligned} \Delta _p u:= {{\,\mathrm{div}\,}}(|\nabla u|^{p-2}\nabla u)=0, \quad 1<p<\infty , \end{aligned}$$

whose (continuous) solutions are \(p\)-harmonic functions. It then follows that every positive \(p\)-harmonic function on the entire Euclidean space \(\mathbf {R}^n\) must be constant. A similar conclusion holds for global solutions of the \(\mathcal {A}\)-harmonic equation \({{\,\mathrm{div}\,}}\mathcal {A}(x,\nabla u)=0\) with \(\mathcal {A}\) of \(p\)-Laplacian type, whose theory in weighted \(\mathbf {R}^n\) has been developed in Heinonen et al. [30]. Note that 2-harmonic functions on unweighted \(\mathbf {R}^n\) are just the classical harmonic functions. For quasilinear equations and systems on \(\mathbf {R}^n\) (with \(p=2\)), bounded Liouville theorems and their connection to regularity of solutions were studied in e.g. [34, 45, 53].

In the setting of certain Riemannian manifolds, Harnack inequalities leading to the Liouville theorem for positive \(p\)-harmonic functions were considered in Coulhon et al. [20]. A similar Liouville theorem on graphs, whose (counting) measure is globally doubling and supports a global \(p\)-Poincaré inequality, was obtained in Holopainen and Soardi [42]. In the last two decades, Harnack inequalities for \(p\)-harmonic functions, as well as for quasiminimizers, were extended to metric spaces equipped with a globally doubling measure supporting a global \(p\)-Poincaré inequality, see Kinnunen and Shanmugalingam [46], Björn and Marola [14] and Björn and Björn [7]. Thus we know that the Liouville theorem holds for positive quasiminimizers (including positive \(p\)-harmonic functions) also in such settings. Recently, a combinatorial analogue of harmonic functions (\(p=2\)) was developed in Ntalampekos [55] for generalized Sierpiński carpets, where the standard Poincaré inequality might not hold, and the bounded Liouville theorem for such functions was established therein, see [55, Theorem 2.74].

Here, and in the rest of the paper, \(1<p<\infty \) is fixed. By a quasiminimizer we mean a function that quasiminimizes the \(p\)-energy, i.e. there exists \(Q\ge 1\) such that for all test functions \(\varphi \),

$$\begin{aligned} \int _{\varphi \ne 0} g^p_u \, d\mu \le Q \int _{\varphi \ne 0} g_{u+\varphi }^p \, d\mu , \end{aligned}$$
(1.1)

where \(g_u\) stands for the minimal \(p\)-weak upper gradient of u, see Definition 3.1. On \(\mathbf {R}^n\) and Riemannian manifolds, \(g_u\) coincides with the modulus of the usual gradient. Quasiminimizers were introduced in Giaquinta and Giusti [24, 25] as a unified treatment of variational inequalities, elliptic partial differential equations and quasiregular mappings, see [15] for further references. When \(Q=1\), (1.1) defines \(p\) -harmonic functions. Under the assumptions considered in this paper, any quasiminimizer has a continuous representative and the discussion in this introduction is intended for these continuous representatives.

Since \(p\)-harmonic functions are local minimizers of \(p\)-energy integrals as in (1.1) with \(Q=1\), it is natural to ask whether there are nonconstant \(p\)-harmonic functions (or quasiminimizers) with finite \(p\)-energy on these metric measure spaces. Such a finite-energy Liouville theorem for \(p\)-harmonic functions on Riemannian manifolds with nonnegative Ricci curvature was obtained in Nakauchi [54] for \(p \ge 2\). See also Holopainen [37], Holopainen et al. [39] and Pigola et al. [57] for Liouville type theorems on such manifolds under various other constraints on the \(p\)-harmonic functions. The manifolds in these papers, as well as in [20], are all equipped with the Riemannian length metric and the corresponding volume measure.

Bounded, positive and \(L^q\)-Liouville theorems for harmonic functions (\(p=2\)) and nonlinear eigenvalue problems (\(p>1\)) on certain weighted complete Riemannian manifolds were established in e.g. [51, 62, 63]. See also [23, 50, 65] and the references therein for bounded and \(L^q\)-Liouville theorems for (sub)harmonic functions (\(p=2\)) on unweighted complete manifolds.

The primary focus of this paper is to see under which geometric conditions on the underlying metric measure space the finite-energy Liouville theorem holds for \(p\)-harmonic functions and quasiminimizers. When the bounded Liouville theorem holds, answering this question boils down to finding out whether there are unbounded \(p\)-harmonic functions or quasiminimizers with finite energy. The following is the first main theorem of this paper.

Theorem 1.1

(Finite-energy Liouville theorem) Let X be a metric space equipped with a globally doubling measure \(\mu \) supporting a global \(p\)-Poincaré inequality. Assume that one of the following conditions holds:

  1. (a)

    There is a point \(x_0\in X\) and an exponent \(\alpha \ge p\) such that

    $$\begin{aligned} \limsup _{r \rightarrow \infty } \frac{\mu (B(x_0,r))}{r^\alpha } > 0, \end{aligned}$$
    (1.2)

    i.e. \(\mu \) has volume growth of exponent \(\alpha \) at infinity.

  2. (b)

    X is annularly quasiconvex around some point \(x_0 \in X\) (see Definition 5.1).

  3. (c)

    \(X=(\mathbf {R},\mu )\), where \(\mu \) is a globally doubling measure supporting a global \(p\)-Poincaré inequality.

  4. (d)

    X is bounded.

Then every quasiminimizer on X with finite energy is constant (up to a set of zero \(p\)-capacity). In particular, this applies to \(p\)-harmonic functions with finite energy.

In fact, in case (d), there are no (essentially) nonconstant quasiminimizers whatsoever, see Proposition 3.8. To avoid misunderstanding, we alert the reader to the fact that the functions in Theorem 1.1 are global quasiminimizers or \(p\)-harmonic functions, defined with respect to the entire metric space X. This means that \(p\)-harmonicity has to be interpreted properly. For example, if X is a sufficiently regular open subset of \(\mathbf {R}^n\), then \(p\)-harmonic functions automatically satisfy the zero Neumann condition on \(\partial X\), see Example 3.3. This is caused by the fact that since X is regarded as a metric space in its own right, \(\partial X\) is not a boundary within X and hence the test functions \(\varphi \) in (1.1) are not forced to vanish on \(\partial X\). The same is true also for less regular domains such as the interior of the von Koch snowflake curve, provided that one interprets the zero Neumann condition in a generalized sense. This phenomenon persists even if X is the closure of the above open sets in \(\mathbf {R}^n\).

We will show by examples that if \(\mu \) supports only local versions of the doubling condition and the \(p\)-Poincaré inequality, then the bounded, positive and finite-energy Liouville theorems can fail, even for weighted \(\mathbf {R}^n\), \(n \ge 1\). For measures on the real line \(\mathbf {R}\) satisfying such local assumptions we will also show that, surprisingly, the bounded and finite-energy Liouville theorems are equivalent, while the bounded and positive ones are not, see Theorems 1.2 and 1.3. We therefore distinguish between these three types of Liouville theorems.

A key ingredient in our proof of Theorem 1.1 is an estimate which follows from the weak Harnack inequality and controls the oscillation of u on balls in terms of its energy, see Lemmas 4.1 and 4.3. Combined with the volume growth (1.2) or applied to chains of balls provided by the annular quasiconvexity, it leads to parts (a) and (b) of Theorem 1.1. A similar, but more precise, estimate for \(p\)-harmonic functions with respect to ends in certain complete Riemannian manifolds was given in Holopainen [36, Lemma 5.3]. As a byproduct of the proof of Theorem 1.1 we obtain lower bounds for the growth of the energy and oscillation of nonconstant quasiminimizers on large balls, see Corollaries 4.2, 5.7 and 5.8. The global estimates in this paper can also be applied more locally to capture the geometry of the space in different directions towards infinity (so-called ends). We pursue this line of research in our forthcoming paper [13].

The geometric conditions (a) and (b) are quite natural. A condition similar to (b), assuming that the diameters of spheres grow sublinearly, was recently used to prove a Liouville type theorem for harmonic functions of polynomial growth on certain weighted complete Riemannian manifolds, see Wu [64, Theorem 1.1].

The annular quasiconvexity from (b) is clearly satisfied by weighted \(\mathbf {R}^n\), \(n\ge 2\), and the case \(n=1\) is covered by (c). So Theorem 1.1 covers all weighted \(\mathbf {R}^n\), \(n\ge 1\), with globally \(p\)-admissible weights, including the setting considered in Heinonen et al. [30]. In complete spaces, annular quasiconvexity follows from sufficiently strong Poincaré inequalities, by Korte [47, Theorem 3.3]. In Lemma 5.4 we show that in noncomplete spaces, such Poincaré inequalities imply a discrete analogue of the annular quasiconvexity, which also implies the conclusion of Theorem 1.1.

Note that we do not require the space X to be complete. This makes our results applicable also e.g. in the setting of Carnot–Carathéodory spaces, which in general need not be complete but do support a global doubling condition and a global 1-Poincaré inequality, see Jerison [44, Theorem 2.1 and Remark, p. 521] and Franchi et al. [22]. In this setting, \(p\)-harmonic functions were first studied in Capogna et al. [17], and are solutions to subelliptic equations on the original Euclidean spaces. Carnot–Carathéodory spaces include Heisenberg groups and are themselves special types of metric measure spaces that satisfy our global assumptions; see Hajłasz and Koskela [28, Section 11] and Remark 2.7. Many results about \(p\)-harmonic functions on Carnot–Carathéodory spaces are thus included in the corresponding theory on metric spaces, studied in e.g. Shanmugalingam [60], Kinnunen and Shanmugalingam [46], Björn and Marola [14] and Björn and Björn [7].

When X is noncomplete, the choice of test functions in (1.1) is a delicate issue, cf. [10]. Our choice of test functions stems from a desire to preserve the standard properties of \(p\)-harmonic functions, such as maximum principles and Harnack inequalities, while including as many \(p\)-harmonic functions as possible. In particular, the \(p\)-harmonic functions on \(B(0,1) \setminus \{0\} \subset \mathbf {R}^n\) are not the same with respect to \(X=\mathbf {R}^n\setminus \{0\}\) as with respect to \(X=\mathbf {R}^n\), regardless of whether \(\{0\}\) is of \(p\)-capacity zero or not, cf. Examples 3.2 and 3.9. On the other hand, Theorem 1.1 is new even on unweighted \(\mathbf {R}^n\) when \(p<2\) (see Nakauchi [54] for \(p \ge 2\)), and its proof would not have been simpler had only the complete case been covered. Readers not comfortable with noncomplete spaces might prefer to assume that X is complete, in which case most of our results are new as well.

Under the assumptions of Theorem 1.1, quasiminimizers on complete spaces are assumed to belong to Sobolev type spaces on every compact subset of X and can be tested in (1.1) by test functions \(\varphi \) with compact support. Noncomplete spaces often possess too few compact sets, which should therefore be replaced by bounded ones in the above two properties, see Definition 3.1. Moreover, by the assumed Poincaré inequality, every function with finite energy automatically belongs to the above Sobolev type spaces.

Volume growth conditions at infinity, similar to (1.2), have been used to classify so-called parabolic and hyperbolic ends in metric spaces and Riemannian manifolds, see e.g. [20, 27, 36, 38]. They also play a role in capacity estimates for large annuli [11] and are related to global Sobolev embedding theorems [7, Theorem 5.50].

In classical conformal geometry, Riemann surfaces have been classified according to the nonexistence of nonconstant harmonic functions which are bounded, positive and/or of finite energy, see e.g. [16, 56, 58]. Similar results for Riemannian manifolds can be found for example in [26, 27, Section 13] and [58]. This theory has been extended to include \(p\)-harmonic functions in [3, 35], and to the setting of metric measure spaces in [38, 40]. The studies undertaken in these papers for metric measure spaces did not take into account the energy of the global \(p\)-harmonic functions as we do here.

We consider quasiminimizers in the Liouville theorem, which means that our results directly apply also to solutions of the \(\mathcal {A}\)-harmonic equation

$$\begin{aligned} {{\,\mathrm{div}\,}}\mathcal {A}(x,\nabla u)=0, \end{aligned}$$
(1.3)

where \(\mathcal {A}:\mathbf {R}^n\times \mathbf {R}^n\rightarrow \mathbf {R}^n\) is a vector field that satisfies certain ellipticity conditions associated with the index p and a globally \(p\)-admissible weight w, as in Heinonen et al. [30]. Note that by [30, Section 3.13], such \(\mathcal {A}\)-harmonic functions are quasiminimizers. Since Riemannian manifolds of nonnegative curvature satisfy a global doubling condition and a global 1-Poincaré inequality, \(p\)-harmonic and \(\mathcal {A}\)-harmonic (in the sense of (1.3)) functions on such manifolds can be treated by Theorem 1.1 as well.

Another reason for including quasiminimizers in our study comes from geometric considerations similar to those described above. The geometric programme of classifying metric measure spaces according to quasiconformal equivalences seeks to identify two metric measure spaces as being equivalent if there is a quasiconformal homeomorphism between them. It follows from [31, Section 7], [32, Theorem 9.10] and [48, Theorem 4.1] that given two uniformly locally Ahlfors \(p\)-regular proper metric spaces supporting uniformly local \(p\)-Poincaré inequalities, any quasiconformal homeomorphism between them induces a morphism between the corresponding classes of quasiminimizers with finite energy. However, it does not in general induce a morphism between the classes of \(p\)-harmonic functions. Now if one of the two spaces supports a nonconstant quasiminimizer with finite energy but the other does not, then there can be no quasiconformal equivalence between them. Thus the results developed in this paper give a useful tool in quasiconformal geometry and provide a framework for potential-theoretic classifications of unbounded metric measure spaces. Such a study is currently being carried out by the authors in [13].

On the unweighted real line \(\mathbf {R}\), both the volume growth condition (1.2), with \(\alpha \ge p>1\), and the annular quasiconvexity fail. At the same time, the only \(p\)-harmonic functions on \(\mathbf {R}\) are affine functions, and for such functions the global energy is clearly infinite unless the function is constant. Even in this simple setting, it is not trivial to show that there are no nonconstant quasiminimizers with finite energy, but we do so in Sect. 6 when proving Theorem 1.1 (c). A similar question for the unweighted strip \(\mathbf {R}\times [0,1]\) is addressed in Example 7.1. Note that even on the unweighted real line, quasiminimizers have a rich theory, see e.g. Martio and Sbordone [52].

On weighted \(\mathbf {R}\), equipped with a locally doubling measure supporting a local \(p\)-Poincaré inequality, we give the following complete characterization of when the bounded and finite-energy Liouville theorems hold.

Theorem 1.2

Let \(\mu \) be a locally doubling measure on \(\mathbf {R}\) supporting a local \(p\)-Poincaré inequality. Then the following five conditions are equivalent:

  1. (a)

    There exists a bounded nonconstant \(p\)-harmonic function on \((\mathbf {R},\mu )\).

  2. (b)

    There exists a nonconstant \(p\)-harmonic function with finite energy on \((\mathbf {R},\mu )\).

  3. (c)

    There exists a bounded nonconstant quasiharmonic function on \((\mathbf {R},\mu )\).

  4. (d)

    There exists a nonconstant quasiharmonic function with finite energy on \((\mathbf {R},\mu )\).

  5. (e)

    There is a weight w such that \(d\mu = w \, dx\) and

    $$\begin{aligned} \int _{-\infty }^\infty w^{1/(1-p)} \, dx < \infty . \end{aligned}$$
    (1.4)

We also show that under the local assumptions of Theorem 1.2, a quasiharmonic function on weighted \(\mathbf {R}\) is bounded if and only if it has finite energy, see Proposition 6.5. This equivalence may be of independent interest, in addition to implying the equivalence of the bounded and the finite-energy Liouville theorems on weighted \(\mathbf {R}\).

Examples 6.7 resp. 7.2 show that on some spaces there exist global \(p\)-harmonic functions that are bounded but without finite energy, and vice versa. For examples of Riemannian manifolds where the finite-energy Liouville theorem for harmonic functions holds but not the bounded Liouville theorem, we refer to Sario et al. [58, Section 1.2].

The Liouville theorem is often given for positive functions, but this is not always equivalent to the bounded (or finite-energy) Liouville theorem, as demonstrated by the following result (together with Theorem 1.2).

Theorem 1.3

Let \(\mu \) be a locally doubling measure on \(\mathbf {R}\) supporting a local \(p\)-Poincaré inequality. Then the following are equivalent:

  1. (a)

    There exists a positive nonconstant \(p\)-harmonic function on \((\mathbf {R},\mu )\).

  2. (b)

    There exists a positive nonconstant quasiharmonic function on \((\mathbf {R},\mu )\).

  3. (c)

    There is a weight w such that \(d\mu = w \, dx\) and

    $$\begin{aligned} \min \biggl \{\int _{-\infty }^0 w^{1/(1-p)} \, dx, \int _0^\infty w^{1/(1-p)} \, dx \biggr \}< \infty . \end{aligned}$$
    (1.5)

If \(d\mu = w\,dx\) on \(\mathbf {R}^n\) and w is any positive function which is locally bounded from above and away from zero, then it is easy to see that \(\mu \) is locally doubling and supports a local 1-Poincaré inequality. It follows that, for \(n=1\), one can easily construct weights such that (1.5) holds but (1.4) fails.

The paper is organized as follows. In Sect. 2 we provide the necessary background about Sobolev type spaces on metric spaces. In Sect. 3 we discuss (quasi)minimizers and \(p\)-harmonic functions in spaces equipped with a locally doubling measure supporting a local \(p\)-Poincaré inequality. Since it is not assumed that the underlying metric space is complete, the choice of test functions in (1.1) plays a crucial role. We prove a general weak maximum principle, which despite its name does not follow from the strong maximum principle. We also show that in bounded spaces, all global quasiharmonic functions are locally constant; from which Theorem 1.1 (d) follows (under the global assumptions therein).

Sections 46 are devoted to the proofs of (a)–(c) of Theorem 1.1, respectively. Moreover, in Sect. 5 we discuss connectivity properties of the space, including a discrete version of annular quasiconvexity. Growth estimates for the energy and the oscillation of nonconstant quasiharmonic functions are also proved therein. Section 6 contains a rather exhaustive study of quasiharmonic functions and functions with finite energy on \(\mathbf {R}\), equipped with a locally doubling measure supporting a local \(p\)-Poincaré inequality, leading up to the proofs of Theorems 1.2 and 1.3. Theorem 1.1 (c) is then a direct consequence of these considerations.

We conclude the paper in Sect. 7 by showing that the finite-energy Liouville theorem holds in the unweighted infinite strip \(\mathbf {R}\times [0,1]\) and that it fails in a weighted binary tree, see Examples 7.1 and 7.2. The latter example also produces an unbounded \(p\)-harmonic function with finite energy.

2 Preliminaries

We assume throughout the paper that \(1< p<\infty \) and that \(X=(X,d,\mu )\) is a metric space equipped with a metric d and a positive complete Borel measure \(\mu \) such that \(0<\mu (B)<\infty \) for all balls \(B \subset X\). For proofs of the facts stated in this section we refer the reader to Björn and Björn [7] and Heinonen et al. [33].

A curve is a continuous mapping from an interval. We will only consider curves which are nonconstant, compact and rectifiable, i.e. of finite length. A curve can thus be parameterized by its arc length ds. A property holds for \(p\) -almost every curve if the curve family \(\Gamma \) for which it fails has zero \(p\)-modulus, i.e. there is a Borel function \(0 \le \rho \in L^p(X)\) such that \(\int _\gamma \rho \,ds=\infty \) for every \(\gamma \in \Gamma \).

Definition 2.1

A measurable function \(g:X \rightarrow [0,\infty ]\) is a \(p\) -weak upper gradient of \(u:X \rightarrow [-\infty ,\infty ]\) if for \(p\)-almost every curve \(\gamma : [0,l_{\gamma }] \rightarrow X\),

$$\begin{aligned} |u(\gamma (0)) - u(\gamma (l_{\gamma }))| \le \int _{\gamma } g\,ds, \end{aligned}$$

where the left-hand side is considered to be \(\infty \) if at least one of the terms therein is \(\pm \infty \).

The \(p\)-weak upper gradients were introduced in Koskela and MacManus [49], see also Heinonen and Koskela [31]. If u has a \(p\)-weak upper gradient in , then it has a minimal \(p\) -weak upper gradient in the sense that for every \(p\)-weak upper gradient of u we have \(g_u \le g\) a.e., see Shanmugalingam [60]. The minimal \(p\)-weak upper gradient is well-defined up to a set of measure zero. Note also that \(g_u=g_v\) a.e. in \(\{x \in X : u(x)=v(x)\}\), in particular \(g_{\min \{u,c\}}=g_u \chi _{\{u < c\}}\) a.e., for \(c \in \mathbf {R}\).

Following Shanmugalingam [59], we define a version of Sobolev spaces on X.

Definition 2.2

For a measurable function \(u:X\rightarrow [-\infty ,\infty ]\), let

$$\begin{aligned} \Vert u\Vert _{N^{1,p}(X)} = \biggl ( \int _X |u|^p \, d\mu + \inf _g \int _X g^p \, d\mu \biggr )^{1/p}, \end{aligned}$$

where the infimum is taken over all \(p\)-weak upper gradients g of u. The Newtonian space on X is

$$\begin{aligned} N^{1,p}(X) = \{u: \Vert u\Vert _{N^{1,p}(X)} <\infty \}. \end{aligned}$$

In this paper we assume that functions in \(N^{1,p}(X)\) are defined everywhere (with values in \([-\infty ,\infty ]\)), not just up to an equivalence class in the corresponding function space. The space \(N^{1,p}(X)/{\sim }\), where \(u \sim v\) if and only if \(\Vert u-v\Vert _{N^{1,p}(X)}=0\), is a Banach space and a lattice, see [59]. For a measurable set \(E\subset X\), the Newtonian space \(N^{1,p}(E)\) is defined by considering \((E,d|_E,\mu |_E)\) as a metric space in its own right.

Definition 2.3

The (Sobolev) capacity of a set \(E\subset X\) is the number

$$\begin{aligned} C_p(E)=C_p^X(E) =\inf _u \Vert u\Vert _{N^{1,p}(X)}^p, \end{aligned}$$

where the infimum is taken over all \(u\in N^{1,p}(X) \) such that \(u=1\) on E.

A property is said to hold quasieverywhere (q.e.) if the set of all points at which the property fails has \(C_p\)-capacity zero. The capacity is the correct gauge for distinguishing between two Newtonian functions. If \(u \in N^{1,p}(X)\), then \(u \sim v\) if and only if \(u=v\) q.e. Moreover, if and \(u= v\) a.e., then \(u=v\) q.e.

We let \(B=B(x,r)=\{y \in X : d(x,y) < r\}\) denote the ball with centre x and radius \(r>0\), and let \(\lambda B=B(x,\lambda r)\). We assume throughout the paper that balls are open. In metric spaces it can happen that balls with different centres and/or radii denote the same set. We will however adopt the convention that a ball B comes with a predetermined centre \(x_B\) and radius \(r_B\). In this generality, it can happen that \(B(x_0,r_0) \subset B(x_1,r_1)\) even when \(r_0 > r_1\), and in disconnected spaces also when \(r_0 > 2 r_1\). If X is connected, then \(B(x_0,r_0) \subset B(x_1,r_1)\) with \(r_0 >2r_1\) is possible only when \(B(x_0,r_0)= B(x_1,r_1)=X\).

We shall use the following local assumptions introduced in Björn and Björn [9].

Definition 2.4

The measure \(\mu \) is doubling within \(B(x_0,r_0)\) if there is \(C>0\) (depending on \(x_0\) and \(r_0\)) such that

$$\begin{aligned} \mu (2B)\le C \mu (B) \end{aligned}$$

for all balls \(B \subset B(x_0,r_0)\).

We say that \(\mu \) is locally doubling (on X) if for every \(x_0 \in X\) there is some \(r_0>0\) (depending on \(x_0\)) such that \(\mu \) is doubling within \(B(x_0,r_0)\).

If \(\mu \) is doubling within every ball \(B(x_0,r_0)\), then it is semilocally doubling, and if moreover C is independent of \(x_0\) and \(r_0\), then \(\mu \) is globally doubling.

Definition 2.5

The \(p\) -Poincaré inequality holds within \(B(x_0,r_0)\) if there are constants \(C>0\) and \(\lambda \ge 1\) (depending on \(x_0\) and \(r_0\)) such that for all balls \(B\subset B(x_0,r_0)\), all integrable functions u on \(\lambda B\), and all \(p\)-weak upper gradients g of u,

(2.1)

where .

We also say that X (or \(\mu \)) supports a local \(p\)-Poincaré inequality (on X) if for every \(x_0 \in X\) there is some \(r_0>0\) (depending on \(x_0\)) such that the \(p\)-Poincaré inequality holds within \(B(x_0,r_0)\).

If the \(p\)-Poincaré inequality holds within every ball \(B(x_0,r_0)\), then X supports a semilocal \(p\)-Poincaré inequality. If moreover C and \(\lambda \) are independent of \(x_0\) and \(r_0\), then X supports a global \(p\)-Poincaré inequality.

Remark 2.6

If X is proper (i.e. every closed and bounded subset of X is compact) and connected, and \(\mu \) is locally doubling and supports a local \(p\)-Poincaré inequality, then \(\mu \) is semilocally doubling and supports a semilocal \(p\)-Poincaré inequality, by Björn and Björn [9, Proposition 1.2 and Theorem 1.3]. This in particular applies to \(\mathbf {R}^n\) equipped with the Euclidean distance and any measure satisfying the local assumptions.

Remark 2.7

If X is locally compact and supports a global \(p\)-Poincaré inequality and \(\mu \) is globally doubling, then \(g_u={{\,\mathrm{Lip}\,}}u\) a.e. for Lipschitz functions u on X, by Theorem 6.1 in Cheeger [18] together with Lemma 8.2.3 in Heinonen et al. [33] (or Theorem 4.1 in Björn and Björn [10]). (Here \({{\,\mathrm{Lip}\,}}u\) is the upper pointwise dilation of u, also called the local upper Lipschitz constant.) Moreover, Lipschitz functions are dense in \(N^{1,p}(X)\), see Shanmugalingam [59].

Hence if \(X= \mathbf {R}^n\), equipped with a \(p\)-admissible measure as in Heinonen et al. [30], then \(g_u= |\nabla u|\) for \(u \in N^{1,p}(X)\), where \(\nabla u\) is the weak Sobolev gradient from [30]. The corresponding identities for the gradients hold also on Riemannian manifolds and Carnot–Carathéodory spaces equipped with their natural measures; see Hajłasz and Koskela [28, Section 11].

If X is connected (which follows from any semilocal Poincaré inequality, see e.g. the proof of Proposition 4.2 in [7]), then the global doubling property implies that there are positive constants \(\sigma \le s\) and C such that

$$\begin{aligned} \frac{1}{C} \Bigl (\frac{r}{R}\Bigr )^s \le \frac{\mu (B(x,r))}{\mu (B(x,R))} \le C \Bigl (\frac{r}{R}\Bigr )^\sigma \end{aligned}$$
(2.2)

whenever \(x\in X\) and \(0<r\le R < 2 {{\,\mathrm{diam}\,}}X\). Example 2.3 in Adamowicz et al. [1] shows that \(\sigma \) may need to be close to 0.

Fixing \(r>0\) and letting \(R\rightarrow \infty \) in (2.2) shows that X has volume growth (1.2) of exponent \(\alpha =\sigma \) at infinity, but it is often possible to have a larger choice of \(\alpha \). At the same time, necessarily \(\alpha \le s\). It is easy to see that (1.2) is independent of \(x_0\). The set of all possible \(\alpha \) in (1.2) is an interval which may be open or closed at the right endpoint. When the right endpoint does not belong to the interval, there is no optimal choice of \(\alpha \).

A measurable function u is of finite energy on an open set \(\Omega \) if it has a \(p\)-weak upper gradient in \(L^p(\Omega )\), in which case its energy on \(\Omega \) is given by \(\int _\Omega g_u^p \, d\mu \). It follows from [7, Proposition 4.14] or [33, Lemma 8.1.5 and Theorem 9.1.2] that if \(\mu \) is locally doubling and supports a local \(p\)-Poincaré inequality, then functions with finite energy on \(\Omega \) belong to . Similar arguments can be used to show that under semilocal assumptions, functions with finite energy on \(\Omega \) belong to the space \(N^{1,p}_{\mathrm{loc,dist}}(\Omega )\). See Sect. 3 below for the definitions of and \(N^{1,p}_{\mathrm{loc,dist}}(\Omega )\).

3 Quasiminimizers and their test functions

We assume in this section that \(\mu \) is locally doubling and supports a local \(p\)-Poincaré inequality. We will take extra care to avoid the requirement that the metric space is complete or even locally compact.

Let \(\Omega \subset X\) be open. We say that if for every \(x \in \Omega \) there exists \(r_x>0\) such that \(B(x,r_x)\subset \Omega \) and \(f \in N^{1,p}(B(x,r_x))\). Traditionally, e.g. in \(\mathbf {R}^n\) and other complete spaces, a quasiminimizer u on \(\Omega \) is required to belong to the local space and the quasiminimizing property is tested by sufficiently smooth (e.g. Lipschitz or Sobolev) test functions \(\varphi \) with compact support in \(\Omega \) (or with zero boundary values) as follows:

$$\begin{aligned} \int _{\varphi \ne 0} g^p_u \, d\mu \le Q \int _{\varphi \ne 0} g_{u+\varphi }^p \, d\mu . \end{aligned}$$

When X is noncomplete there are several natural choices corresponding to as well as several choices of natural test function spaces, and contrary to the complete case these do not all lead to equivalent definitions. Thus we might obtain different classes of quasiminimizers by considering different test classes of \(\varphi \) and by requiring that u belongs to various choices of local Newtonian spaces. See Björn and Björn [10, Section 6] and Björn and Marola [14] for related discussions.

Our choice of test functions is based on the desire to have as large as possible collection of quasiminimizers while retaining potential-theoretic properties such as maximum principles and weak Harnack inequalities for such quasiminimizers. For instance, insisting on compact support could lead to a very small class of test functions if X is not locally compact, and then properties such as the Harnack inequality and maximum principles might fail, see Examples 3.3 and 3.4 below.

We follow the notation in [10] and define

$$\begin{aligned} N^{1,p}_0(\Omega )&= \{\varphi |_\Omega : \varphi \in N^{1,p}(X) \text { and } \varphi =0 \text { in }X\setminus \Omega \}, \\ {\mathcal G}_\mathrm{dist}(\Omega )&= \{G\subset \Omega : G \text { is bounded and open, and } {{\,\mathrm{dist}\,}}(G,X\setminus \Omega )>0 \}, \\ N^{1,p}_{\mathrm{loc,dist}}(\Omega )&= \{u:\Omega \rightarrow [-\infty ,\infty ]: u\in N^{1,p}(G) \text { for all } G \in {\mathcal G}_\mathrm{dist}(\Omega )\}, \\ N^{1,p}_{\mathrm{0,dist}}(\Omega )&= \overline{ \{\varphi :\Omega \rightarrow [-\infty ,\infty ]: \varphi \in N^{1,p}_0(G) \text { for some } G \in {\mathcal G}_\mathrm{dist}(\Omega )\}}, \end{aligned}$$

where the closure is with respect to the Sobolev norm \(\Vert {\,\cdot \,}\Vert _{N^{1,p}(X)}\). We emphasize that the class \({\mathcal G}_\mathrm{dist}(\Omega )\) depends not only on \(\Omega \) but also on the ambient metric space X. Here we adopt the convention that \({{\,\mathrm{dist}\,}}(G,\varnothing )>0\) for all G. In particular, this means that the requirement \({{\,\mathrm{dist}\,}}(G,X\setminus \Omega )>0\) is trivially satisfied for all G when \(\Omega =X\).

Definition 3.1

A function \(u \in N^{1,p}_{\mathrm{loc,dist}}(\Omega )\) is a quasiminimizer in \(\Omega \) if there exists \(Q\ge 1\) such that

$$\begin{aligned} \int _{\varphi \ne 0} g^p_u \,d\mu \le Q \int _{\varphi \ne 0} g^p_{u+\varphi } \,d\mu \end{aligned}$$
(3.1)

for all \(\varphi \in N^{1,p}_{\mathrm{0,dist}}(\Omega )\). If \(Q=1\) in (3.1), then u is a minimizer.

Any quasiminimizer can be modified on a set of capacity zero so that it becomes continuous (by which we mean real-valued continuous in this paper). This follows from the results in Kinnunen and Shanmugalingam [46, p. 417]. The assumptions in [46] are global and guarantee local Hölder continuity of quasiminimizers. See Björn and Björn [10, Theorem 6.2] for how the arguments apply in our situation. Such a continuous representative is called quasiharmonic or, for \(Q=1\), \(p\) -harmonic. The strong maximum principle, saying that if a quasiharmonic function attains its maximum in a domain then it is constant therein, also holds, see [46, Corollary 6.4] and [10, Theorem 6.2].

The following example shows why it is essential to use the nonstandard space \(N^{1,p}_{\mathrm{loc,dist}}(\Omega )\). Namely, requiring only in the definition of quasiminimizers would cause problems with Harnack inequalities and the weak maximum principle.

Example 3.2

Consider the locally compact space \(X=\mathbf {R}^n \setminus \{0\}\) and let \(1<p< n\). The function \(u(x)=|x|^{(p-n)/(p-1)}\) is \(p\)-harmonic in X as an open subset of \(\mathbf {R}^n\). As \(C_p^{\mathbf {R}^n}(\{0\})=0\), it therefore follows that (3.1) holds for all \(\varphi \in N^{1,p}(X) \). However, \(u \notin N^{1,p}_{\mathrm{loc,dist}}(X)\) since \(B(0,1) \cap X \in {\mathcal G}_\mathrm{dist}(X)\), and thus u is not \(p\)-harmonic on X in the sense of Definition 3.1.

Had we only required that , this would instead have been an example of a positive \(p\)-harmonic function violating the Harnack inequality \(\sup _B u\le C\inf _B u\) and the weak maximum principle (3.2) below. On the other hand, by [10, Theorem 6.2] the strong maximum principle would still hold. See [10, Section 6] for further discussion.

If X is proper, then and (3.1) can equivalently be based on test functions from \(N^{1,p}(X)\) (or \({{\,\mathrm{Lip}\,}}(X)\)) with compact support in \(\Omega \). Our definition of quasiminimizers then coincides with the usual definitions used in the literature, see Björn [5, Proposition 3.2].

In the setting of Riemannian manifolds, the notion of global \(p\)-harmonic functions usually requires the test functions to be of compact support rather than just vanishing outside some set \(G\in {\mathcal G}_\mathrm{dist}(X)\), see e.g. Cheeger and Gromoll [19] or Ferrand [21, Theorem 4.1]. Since studies on Riemannian manifolds often do not focus on understanding the boundary of the manifold itself, such a class of test functions is appropriate there. We are interested in the influence of the global structure, including the boundary, and therefore use the test function class \(N^{1,p}_{\mathrm{0,dist}}(X)\). For proper metric spaces and complete connected Riemannian manifolds these two test function classes coincide, as mentioned above.

The following two examples further illustrate what can happen when one uses different classes of test functions.

Example 3.3

Let \(X=\mathbf {R}^{n-1} \times (0,\infty )\) be equipped with the Euclidean distance and the Lebesgue measure. Note that this is a locally compact space. Let

$$\begin{aligned} \Omega =(-1,1)^{n-1}\times (0,1) \quad \text {and} \quad u(x)=x_n. \end{aligned}$$

Then u is not \(p\)-harmonic in \(\Omega \) (seen as a subset of X) because the restriction v to \(\Omega \) of the unique \(p\)-harmonic function in \((-1,1)^n\subset \mathbf {R}^n\) with boundary data \(f(x):=|x_n|\) will have smaller energy on \(\Omega \) than u, since f is not \(p\)-harmonic in \((-1,1)^n\). Indeed, the function \(\varphi =v-u\) belongs to \(N^{1,p}_{\mathrm{0,dist}}(\Omega )\) and can thus be used in Definition 3.1, even though it does not have compact support in \(\Omega \).

In fact, one can see that \(p\)-harmonic functions in subsets of X, as defined in Definition 3.1, satisfy a zero Neumann boundary condition on the “missing boundary” \(\mathbf {R}^{n-1} \times \{0\}\), while this is not in general true for \(p\)-harmonic functions defined using test functions with compact support.

In spaces which are not locally compact the following example shows that the situation can get even worse if one uses test functions with compact support.

Example 3.4

Let \(X=\mathbf {R}^n\setminus \mathbf {Q}^n\), \(n \ge 2\), equipped with the Lebesgue measure, and \(p>n\). Since the capacity \(C_1(\mathbf {Q}^n)=0\), we conclude that 1-almost no curve in \(\mathbf {R}^n\) hits \(\mathbf {Q}^n\), and hence X inherits the global 1-Poincaré inequality from \(\mathbf {R}^n\). It thus follows from Shanmugalingam [59, Theorem 5.1] that every \(u \in N^{1,p}(X)\) has a continuous representative \(v \sim u\). If u has compact support in X, then so does v, but then v has to be identically 0 by the density of \(\mathbf {Q}^n\).

Hence, using only test functions with compact support would mean that every continuous Newtonian function is \(p\)-harmonic, which would violate all types of weak Harnack inequalities as well as both the weak and strong maximum principles.

The weak maximum principle will be an important tool in proving Theorem 1.1 (b) in Sect. 5. We will only need it under global assumptions (of doubling and a \(p\)-Poincaré inequality), but we take the opportunity to deduce it under only local assumptions. Due to the possible noncompleteness, it does not seem to be covered in the literature even under global assumptions, nor does it follow from the strong maximum principle, despite its name, cf. Example 3.2.

Theorem 3.5

(Weak maximum principle) Assume that X is connected. If u is quasiharmonic in \(\Omega \) and \(G \in {\mathcal G}_\mathrm{dist}(\Omega )\), with \(\varnothing \ne G \ne X\), then

$$\begin{aligned} \sup _G u = \sup _{\partial G} u. \end{aligned}$$
(3.2)

Connectedness does not follow from the local \(p\)-Poincaré inequality (in contrast to the semilocal \(p\)-Poincaré inequality) and needs to be imposed explicitly. That connectedness cannot be dropped, even if we require \(\partial G \ne \varnothing \), follows by letting

and , together with the \(p\)-harmonic function .

Proof

As X is connected and \(\varnothing \ne G \ne X\), the boundary \(\partial G \ne \varnothing \). By continuity, \( \sup _G u \ge \sup _{\partial G} u \ne -\infty \), and there is nothing to prove if \(\sup _{\partial G} u= \infty \). By adding a constant, we may thus assume that \(\sup _{\partial G} u=0\). Let

Then \(\varphi \) is continuous in X since \(G \in {\mathcal G}_\mathrm{dist}(\Omega )\), and \(\varphi \in N^{1,p}_0(A) \subset N^{1,p}_{\mathrm{0,dist}}(\Omega )\). Hence

$$\begin{aligned} \int _{A} g^p_{\varphi } \,d\mu = \int _{A} g^p_{u} \,d\mu \le Q \int _{A} g^p_{u-\varphi } \,d\mu =0, \end{aligned}$$

and so \(g_\varphi =0\) a.e. in A. Since \(\varphi =0\) outside A, we also see that \(g_\varphi =0\) a.e. in \(X \setminus A\), and thus a.e. in X. It follows from the local \(p\)-Poincaré inequality and the continuity of \(\varphi \) that \(\varphi \) is locally constant. As X is connected, \(\varphi \) is constant in X. In particular, is constant in . Since \(\sup _{\partial G} u=0\), (3.2) follows. \(\square \)

It is also important to know that the suprema in (3.2) cannot equal \(\infty \). This follows by continuity of u if is compact, and by the weak maximum principle (and continuity) if \(\partial G\) is compact. In general we have the following result.

Proposition 3.6

Assume that \(\mu \) is semilocally doubling and supports a semilocal \(p\)-Poincaré inequality. If u is quasiharmonic in \(\Omega \) and \(G \in {\mathcal G}_\mathrm{dist}(\Omega )\), then u is bounded on G.

The proof of this fact under global assumptions in Björn and Marola [14, Corollary 8.3] applies verbatim under semilocal assumptions. We do not know if this result holds under only local assumptions, although Remark 2.6 implies that it does if X is in addition proper and connected.

In the rest of this paper we are primarily interested in global quasiminimizers (but for some results in Sect. 6), in which case certain issues disappear compared with the situation for arbitrary open subsets of X. Note that

$$\begin{aligned} N^{1,p}_{\mathrm{0,dist}}(X)=N^{1,p}_0(X)=N^{1,p}(X) \end{aligned}$$

and so for functions on all of X, Definition 3.1 coincides with several of the other definitions considered in Björn and Björn [10], but may still differ from the classical notions of \(p\)-harmonic functions and quasiminimizers, cf. Example 3.2.

Under global assumptions, also in noncomplete spaces, the following positive Liouville theorem is implied by the Harnack inequality obtained in Kinnunen and Shanmugalingam [46, Corollary 7.3].

Theorem 3.7

(Positive Liouville theorem) Assume that \(\mu \) is globally doubling and supports a global \(p\)-Poincaré inequality. Then every positive quasiharmonic function on X is constant.

In bounded spaces the situation is particularly simple, even under our standing local assumptions.

Proposition 3.8

If X is bounded, then all quasiharmonic functions on X are locally constant, and thus constant in each component.

Proof

Let u be quasiharmonic on X. Since X is bounded and \({{\,\mathrm{dist}\,}}(X,\varnothing )>0\), we see that

$$\begin{aligned} N^{1,p}_{\mathrm{loc,dist}}(X) = N^{1,p}(X) = N^{1,p}_{\mathrm{0,dist}}(X). \end{aligned}$$

Testing (3.1) with \(-u \in N^{1,p}_{\mathrm{0,dist}}(X)\) then yields

$$\begin{aligned} \int _{u \ne 0} g^p_u \,d\mu \le Q \int _{u \ne 0} g^p_{u-u} \,d\mu =0. \end{aligned}$$

This, together with the local \(p\)-Poincaré inequality and the continuity of u, shows that u is locally constant. \(\square \)

Proof of Theorem 1.1 (d)

Since X supports a global Poincaré inequality, it is connected (see e.g. [7, Proposition 4.2]). Therefore, the theorem follows directly from Proposition 3.8. \(\square \)

Example 3.9

That all quasiharmonic functions on X are constant can happen even for unbounded spaces, as seen by letting \(X=[0,\infty )\) or \(X=(0,\infty )\) (equipped with any locally doubling measure supporting a local \(p\)-Poincaré inequality). To see this, let \(0<a< \infty \), \(G=\{x \in X : x < a\}\) and \(\varphi (x)=u(a)-u(x) \in N^{1,p}_{\mathrm{0,dist}}(G)\). Then,

$$\begin{aligned} \int _0^a g_u^p \, d\mu \le Q \int _0^a g_{u+\varphi }^p \, d\mu =0, \end{aligned}$$

and u must be constant in (0, a) for each \(a>0\), and thus in X.

4 The proof of Theorem 1.1 (a)

In view of Proposition 3.8, we assume in this section that X is unbounded and that \(\mu \) is globally doubling and supports a global \(p\)-Poincaré inequality, with dilation constant \(\lambda \). We also fix \(x_0\in X\) and set \(B_r:=B(x_0,r)\) for \(r>0\).

The goal of this section is to prove Theorem 1.1 (a). To do so, we need an energy growth estimate for quasiharmonic functions in terms of the oscillation of the function. This estimate will also be crucial when establishing Theorem 1.1 (b) in the next section.

Lemma 4.1

Let u be quasiharmonic in a ball \(2\lambda B\). Then,

(4.1)

In particular, if the volume growth condition (1.2) holds, then there is an increasing sequence of radii \(r_j\rightarrow \infty \) such that

(4.2)

Lemma 4.3 below shows that (4.1) is essentially sharp. If the volume growth condition (1.2) holds for all sufficiently large radii, then (4.2) holds for these radii.

In addition to depending on X and \(\mu \), the constant C above is also allowed to depend on the quasiminimizing constant of u. The same is true for similar estimates in the rest of the paper, where C will denote various positive constants whose values may vary even within a line.

Proof

Using the weak Harnack inequality (see Kinnunen and Shanmugalingam [46, Theorem 4.2] or Björn and Marola [14, Theorem 8.2]), we get that

Applying this to \(-u\), we also obtain that

Combining these two estimates with the Poincaré inequality gives us

The second claim of the lemma now follows directly by applying (1.2) to the above inequality. \(\square \)

Proof of Theorem 1.1 (a)

Given the validity of the volume growth condition (1.2), we are able to apply (4.2). Since u has finite energy and \(\alpha \ge p\), letting \(j\rightarrow \infty \) shows that u is bounded. Hence u is constant by the positive Liouville theorem 3.7. \(\square \)

If the volume growth exponent \(\alpha >p\), then Lemma 4.1 also provides the following growth rate for the energy of nonconstant quasiharmonic functions.

Corollary 4.2

Let \(x_0 \in X\) and let u be a nonconstant quasiharmonic function on X. If there is \(\alpha >p\) such that

$$\begin{aligned} \limsup _{r \rightarrow \infty } \frac{\mu (B_r)}{r^\alpha } > 0, \end{aligned}$$
(4.3)

then there is a sequence \(r_j \rightarrow \infty \) such that

$$\begin{aligned} \int _{B_{r_j}}g_u^p\, d\mu \ge C r_j^{\alpha - p}. \end{aligned}$$

If moreover

$$\begin{aligned} \liminf _{r \rightarrow \infty } \frac{\mu (B_r)}{r^\alpha } > 0, \end{aligned}$$
(4.4)

then

$$\begin{aligned} \int _{B_r}g_u^p\, d\mu \ge C r^{\alpha - p} \quad \text {for all large enough }r. \end{aligned}$$
(4.5)

The energy grows also when \(\alpha =p\), by Theorem 1.1 (a), but in this case we have no control on how fast it grows.

Proof

Since u is nonconstant there exists \(R>0\) such that . By (4.3), there is a sequence \( r_j \nearrow \infty \), with each \(r_j >R\), such that \( \mu (B_{r_j}) \ge Cr_j^\alpha \). Thus, by Lemma 4.1 and the doubling property,

If (4.4) holds, then \( \mu (B_{r}) \ge Cr^\alpha \) for all \(r >R\) and (4.5) follows. \(\square \)

Note that there may exist nonconstant \(p\)-harmonic functions on X with zero oscillation on some ball, see Björn [6, Example 10.1] (or [7, Example 12.24]), so we need to choose R large enough in the proof above.

There is also a reverse inequality to the one in Lemma 4.1.

Lemma 4.3

Let u be quasiharmonic in a ball B. Then,

Proof

The Caccioppoli inequality (see Kinnunen and Shanmugalingam [46, Proposition 3.3] or Björn and Marola [14, Proposition 7.1]) yields

\(\square \)

5 The proof of Theorem 1.1 (b)

In view of Proposition 3.8, we assume in this section that X is unbounded and that \(\mu \) is globally doubling and supports a global \(p\)-Poincaré inequality, with dilation constant \(\lambda \). We also fix \(x_0\in X\) and set \(B_r:=B(x_0,r)\) for \(r>0\).

If \(\mu \) satisfies (1.2) with \(\alpha <p\) and u is a nonconstant quasiharmonic function with finite energy, then (4.2) tells us that the oscillation of u on balls \(B_{r_j}\) increases at most polynomially in \(r_j\). Since the volume growth could be too small in relation to p, the above proof of Theorem 1.1 (a) does not apply. In this case we are still able to deduce the finite-energy Liouville theorem, provided that a suitable geometric condition is satisfied. We first define the notion of annular quasiconvexity referred to in the statement of Theorem 1.1 (b).

Definition 5.1

X is annularly quasiconvex around \(x_0\) if there exists \(\Lambda \ge 2\) such that for all \(r>0\), each pair of points \(x,y \in B_{2r}\setminus B_r\) can be connected within the annulus \(B_{\Lambda r}\setminus B_{r/\Lambda }\) by a curve of length at most \(\Lambda d(x,y)\). We say that X is annularly quasiconvex if it is annularly quasiconvex around every \(x_0\in X\) with \(\Lambda \) independent of \(x_0\).

In certain complete spaces, annular quasiconvexity follows from a global q-Poincaré inequality for some sufficiently small \(q\ge 1\), see Korte [47, Theorem 3.3]. In Lemma 5.4 we show that in similar noncomplete spaces, such a global q-Poincaré inequality implies a discrete analogue of annular quasiconvexity, which also implies the conclusion of Theorem 1.1 (b).

Definition 5.2

X is sequentially annularly chainable around \(x_0\) if there are a constant \(\Lambda > 1\) and a sequence of radii \(r_j\nearrow \infty \) such that for every j and \(x,y \in \partial B_{r_j}\), we can find a chain of points \(x=x_1,\ldots , x_m=y\) in \(B_{\Lambda r_j} \setminus B_{r_j /\Lambda }\) satisfying \(d(x_k,x_{k+1}) < r_j/8\lambda \Lambda \) for \(k=1,\ldots ,m-1\).

Proof of Theorem 1.1 (b)

This is a direct consequence of the following two results. \(\square \)

Theorem 5.3

If X is sequentially annularly chainable around some point \(x_0\), and u is a quasiharmonic function on X with finite energy, then u is constant.

We postpone the proof until after the proof of Lemma 5.6. The following lemma provides us with a sufficient condition for sequential annular chainability.

Lemma 5.4

If X supports a global \(\sigma \)-Poincaré inequality with the dimension exponent \(\sigma >1\) as in (2.2), or if X is annularly quasiconvex around \(x_0\), then X is sequentially annularly chainable around \(x_0\) (for every sequence \(r_j \nearrow \infty \)).

Proof

Let \({\widehat{X}}\) be the completion of X taken with respect to the metric d and extend \(\mu \) to \({\widehat{X}}\) so that \(\mu ({\widehat{X}}\setminus X)=0\). This zero extension of \(\mu \) is a complete Borel regular measure on \({\widehat{X}}\), by Lemma 3.1 in Björn and Björn [10]. Proposition 7.1 in Aikawa and Shanmugalingam [2] shows that \(\mu \) supports a global \(\sigma \)-Poincaré inequality on \({\widehat{X}}\). Moreover, it satisfies (2.2) with unchanged s and \(\sigma \).

Theorem 3.3 in Korte [47] shows that \({\widehat{X}}\) is annularly quasiconvex. Hence, there exists \(\Lambda >1\) such that every pair \(x,y\in \partial B_r\) can be connected by a curve \(\gamma \) in \(B_{\Lambda r} \setminus B_{r/\Lambda }\), which provides us with a suitable chain in \({\widehat{X}}\). To conclude the proof, replace each \(x_k\in {\widehat{X}}\) in the chain by a sufficiently close point in X.

If X is annularly quasiconvex around \(x_0\), then we can use X instead of \({\widehat{X}}\) in the above discussion to obtain suitable chains in X itself. \(\square \)

Remark 5.5

A weaker global q-Poincaré inequality with \(q>\sigma \), together with the global doubling property, implies that the completion \({\widehat{X}}\) is quasiconvex. Such quasiconvexity is, however, insufficient for our proof. Indeed, the space \(\{(x_1,x_2)\in \mathbf {R}^2: x_1x_2\ge 0\}\), equipped with the Euclidean metric and the 2-dimensional Lebesgue measure, supports a global q-Poincaré inequality for every \(q>2\) (see [7, Example A.23]) and satisfies (2.2) with \(\sigma =2\), but is not sequentially annularly chainable.

Similarly, the examples \(X=\mathbf {R}\) and \(X=\mathbf {R}\times [0,1]\) with \(\sigma =1\), demonstrate that the sequential annular chainability can fail even if X supports a global 1-Poincaré inequality. Thus the global \(\sigma \)-Poincaré inequality in Lemma 5.4 cannot be replaced by a weaker one, and it is essential that \(\sigma >1\).

The following lemma sets a bound on the effective length of chains in Definition 5.2 and will be used to prove Theorem 5.3.

Lemma 5.6

Let \(\delta >0\) and \(\Lambda >1\). Assume that \(x=x_1,\ldots , x_m=y\) is a chain in \(B_{\Lambda r} \setminus B_{r /\Lambda }\) satisfying \(d(x_k,x_{k+1}) < \delta r\), \(k=1,\dots ,m-1\). Then there is a constant \(N_0\), depending only on \(\delta \), \(\Lambda \) and the doubling constant, such that x and y can be connected by a chain of balls \(\{B^k\}_{k=1}^{N}\), \(N \le N_0\), with radii \(2\delta r\) and centres \(y_k\in B_{\Lambda r} \setminus B_{r /\Lambda }\) so that \(x \in B^1\), \(y \in B^N\) and \(B^k \cap B^{k+1}\) is nonempty for \(k=1,\ldots ,N-1\).

Moreover, \(\tau B^k\subset B_{2\Lambda r} \setminus B_{r /2\Lambda }\) if \(\tau \le 1/4\delta \Lambda \).

Proof

Using the Hausdorff maximality principle and the global doubling condition, we can find a cover of \(B_{\Lambda r} \setminus B_{r /\Lambda }\) by at most \(N_0\) balls

$$\begin{aligned} \widehat{B}^k=B(\hat{y}_k,\delta r) \quad \text {with} \quad \hat{y}_k \in B_{\Lambda r} \setminus B_{r /\Lambda }, \end{aligned}$$

such that \(\tfrac{1}{2}\widehat{B}^k\) are pairwise disjoint, see for example Heinonen [29, Section 10.13]. Here \(N_0\) depends only on \(\delta \), \(\Lambda \) and the doubling constant (and in particular is independent of r).

For each \(l=1,\ldots ,m-1\), there exists \(k_l\) such that \(x_l \in \widehat{B}^{k_l}\). It then follows that \(x_{l+1} \in 2\widehat{B}^{k_l}\). From the sequence \(\{2\widehat{B}^{k_l}\}_{l=1}^{m-1}\) we can therefore extract a subsequence \(\{B^k\}_{k=1}^{N}\) such that \(x \in B^1\), \(y \in B^{N}\), and such that \(B^k \cap B^j\) is nonempty if and only if \(|k-j|\le 1\). As it is extracted from the enlargements of balls in the above cover, we must have \(N \le N_0\).

The last inclusion follows directly if \(\tau \le 1/4\delta \Lambda \). \(\square \)

Proof of Theorem 5.3

Let \(\{r_j\}_{j=1}^\infty \), \(x_0\) and \(\Lambda \) be as in Definition 5.2. Fix j for which \(r_j>8 \lambda \Lambda \). We can find \(x,y \in \partial B_{r_j}\) so that

Let \(x=x_1,x_2,\ldots ,x_m=y\) be the chain from Definition 5.2. Lemma 5.6, with \(\delta =1/8\lambda \Lambda \) and \(\tau =2\lambda \), provides us with a chain of balls \(\{B^k\}_{k=1}^{N}\) of radii \(r_j/4\lambda \Lambda \), such that

$$\begin{aligned} 2\lambda B^k\subset B_{2\Lambda r_j} \setminus B_{r_j /2\Lambda }, \quad k=1,\ldots ,N, \end{aligned}$$

and \(B^k \cap B^{k+1}\) is nonempty for \(k=1,\ldots ,N-1\), where \(N\le N_0\). Find \(z_k \in B^k \cap B^{k+1}\), \(k=1,\ldots ,N-1\), and let \(z_0=x\) and \(z_N=y\). We thus get that, using Lemma 4.1,

Since \(\mu \) is globally doubling, we have \(\mu (B^k) \simeq \mu (B_{r_j})\) and so (with C now depending also on \(\lambda \), \(\Lambda \) and \(N_0\))

$$\begin{aligned} |u(x) -u(y)| \le \frac{Cr_j}{\mu (B_{r_j})^{1/p}} \biggl ( \int _{B_{2\Lambda r_j} \setminus B_{r_j /2\Lambda }} g_u^p\, d\mu \biggr )^{1/p}. \end{aligned}$$

By Lemma 4.3,

Using the weak maximum principle (Theorem 3.5) we see that

Combining the last three estimates shows that

$$\begin{aligned} \biggl ( \int _{B_{r_j /2}} g_u^p \, d\mu \biggr )^{1/p} \le C \biggl ( \int _{B_{2\Lambda r_j} \setminus B_{r_j /2\Lambda }} g_u^p\, d\mu \biggr )^{1/p}. \end{aligned}$$
(5.1)

Now, if u has finite energy, then the right-hand side in (5.1) tends to 0 as \(j\rightarrow \infty \), and hence the left-hand side also tends to 0, showing that \(g_u=0\) a.e. The Poincaré inequality thus shows that u is constant a.e., and since u is continuous it must be constant. \(\square \)

The estimate (5.1) in the above proof of Theorem 5.3 also provides a growth rate for the energy of nonconstant quasiharmonic functions. We express this for annularly quasiconvex X, in which case the growth is at least polynomial. If X is only sequentially annularly chainable, then the growth depends on the corresponding sequence.

Corollary 5.7

If X is annularly quasiconvex around \(x_0\) and u is quasiharmonic on X, then there is a constant \(\beta >0\) such that whenever \(0<r<R\),

$$\begin{aligned} \int _{B_r}g_u^p\, d\mu \le C\Bigl (\frac{r}{R}\Bigr )^\beta \int _{B_R} g_u^p\, d\mu . \end{aligned}$$
(5.2)

If u is nonconstant on \(B_{r/\lambda }\), then \(\int _{B_r}g_u^p\, d\mu >0\), by the \(p\)-Poincaré inequality. Thus from (5.2) we see that if X is annularly quasiconvex around \(x_0\), then \(\int _{B_R}g_u^p\, d\mu \) must grow at least as fast as \(R^\beta \). Note that there may exist nonconstant \(p\)-harmonic functions on X with zero oscillation on some ball, see Björn [6, Example 10.1] (or [7, Example 12.24]).

Proof

For \(r>0\), let

$$\begin{aligned} I(r)=\int _{B_r} g_u^p \, d\mu . \end{aligned}$$

Since X is annularly quasiconvex around \(x_0\), the estimate (5.1) holds for all \(r>0\) and hence

$$\begin{aligned} I(r/2\Lambda ) \le C^p [I(2\Lambda r)-I(r/2\Lambda )]. \end{aligned}$$

Adding \(C^p I(r/2\Lambda )\) to both sides of the inequality yields that (after replacing \(r/2\Lambda \) by r),

$$\begin{aligned} I(r) \le \frac{C^p}{C^p+1} I(4\Lambda ^2 r). \end{aligned}$$

Finally, an iteration of this inequality leads to (5.2) with

\(\square \)

Corollary 5.7 and the comment following its statement, together with Lemmas 4.1 and 4.3, lead to the following estimates which complement the upper bound (4.2). A similar result was obtained for harmonic functions (\(p=2\)) on certain weighted Riemannian manifolds, see Wu [64, Proposition 2.4].

Corollary 5.8

If X is annularly quasiconvex around \(x_0\) and u is quasiharmonic on X, then there exists \(\beta >0\) such that for all sufficiently large \(R> r\),

where s is the dimension exponent from (2.2). Moreover, if \(\mu (B_R)\le CR^p\) for all sufficiently large R and u is nonconstant, then there is \(C>0\) such that

(5.3)

If \(\mu \) is Ahlfors \(p\)-regular and supports a global \(p\)-Poincaré inequality, \(p>1\), then by Korte [47, Theorem 3.3], the assumption of annular quasiconvexity is automatically satisfied, and thus (5.3) holds in this case. Also in spaces that are not Ahlfors regular, the estimate \(\mu (B_R)\le CR^p\) can hold for large R. For instance, in \(\mathbf {R}^n\), equipped with the measure \(d\mu (x)=|x|^{\alpha }\,dx\) for some \(-n < \alpha \le p-n\), the condition \(\mu (B_R)\le CR^p\) in Corollary 5.8 is satisfied for large R, and so (5.3) holds even though \(\mu (B_R)\le CR^p\) fails for small R if \(n+\alpha <p\), when \(x_0=0\). Note that this measure is globally doubling and supports a global 1-Poincaré inequality.

6 The proofs of Theorems 1.1 (c), 1.2 and 1.3

In contrast to \(\mathbf {R}^n\), \(n \ge 2\), the real line \(\mathbf {R}\) is not annularly quasiconvex, and thus Theorem 1.1 (b) is not applicable. It is well known that the only \(p\)-harmonic functions on unweighted \(\mathbf {R}\) are the linear functions \(x \mapsto ax+b\), where \(a,b \in \mathbf {R}\) are arbitrary. From this, both the positive and finite-energy Liouville theorems for \(p\)-harmonic functions follow directly. The positive Liouville theorem for quasiharmonic functions on unweighted \(\mathbf {R}\) is a special case of Theorem 3.7, but the finite-energy Liouville theorem for quasiharmonic functions requires some effort to prove even on unweighted \(\mathbf {R}\).

It turns out that this fact can be shown in greater generality, namely on weighted \((\mathbf {R},\mu )\), where \(\mu \) is globally doubling and supports a global \(p\)-Poincaré inequality. Moreover, under only local assumptions, we characterize the measures for which the bounded, positive and finite-energy Liouville theorems hold. This is the main aim of this section.

We will use the following recent characterization of local assumptions on \(\mathbf {R}\). Recall that w is a global Muckenhoupt \(A_p\) weight on \(\mathbf {R}\), \(1<p<\infty \), if there is a constant \(C>0\) such that

(6.1)

Theorem 6.1

(Björn et al. [12, Theorem 1.2 and Proposition 1.3]) The following are equivalent for a measure \(\mu \) on \(\mathbf {R}\):

  1. (a)

    \(\mu \) is locally doubling and supports a local \(p\)-Poincaré inequality on \(\mathbf {R}\).

  2. (b)

    \(d\mu =w\,dx\) and for each bounded interval \(I\subset \mathbf {R}\) there is a global Muckenhoupt \(A_p\) weight \(\widetilde{w}\) on \(\mathbf {R}\) such that \(\widetilde{w}=w\) on I.

Moreover, under the above assumptions, every is locally absolutely continuous on \(\mathbf {R}\) and \(g_u=|u'|\) a.e.

As discussed in Sect. 3, most of the general results on \(p\)-harmonic functions and quasiminimizers are still available under local assumptions, with the exception of the bounded Liouville theorem.

Throughout the rest of this section, \(d\mu = w \, dx\) is a locally doubling measure on \(\mathbf {R}\) supporting a local \(p\)-Poincaré inequality. In particular, \(w>0\) a.e. We also fix the open subset \(\Omega =(0,\infty )\) of the metric measure space \((\mathbf {R},\mu )\).

On the real line \(\mathbf {R}\), the dilation constant \(\lambda \) in (2.1) can be taken to be 1, see [12, Proposition 3.1]. Note that nonconstant quasiharmonic functions on \(\Omega \) and on \((\mathbf {R},\mu )\) are strictly monotone, by the strong maximum principle.

Lemma 6.2

A function u is \(p\)-harmonic on the open subset \(\Omega =(0,\infty )\) of \((\mathbf {R},\mu )\) if and only if there are constants \(a,b\in \mathbf {R}\) such that

$$\begin{aligned} u(x)=b+a \int _0^x w^{1/(1-p)} \, dt, \quad x \in \Omega . \end{aligned}$$
(6.2)

Moreover, the energy of u on \(\Omega \) is

$$\begin{aligned} \int _{0}^\infty |u'|^p\,d\mu = |a|^p \int _{0}^\infty w^{1/(1-p)} \, dt, \end{aligned}$$
(6.3)

which is finite if and only if u is bounded.

The corresponding statements for functions on \((\mathbf {R},\mu )\) are also true, with the function u given by (6.2) being \(p\)-harmonic on \((\mathbf {R},\mu )\).

Proof

Assume first that u is \(p\)-harmonic. By Theorem 6.1, u is locally absolutely continuous on \(\Omega \) and \(g_u=|u'|\) a.e. We may assume without loss of generality that u is nondecreasing. Moreover, u is a weak solution of the equation

$$\begin{aligned} {{\,\mathrm{div}\,}}(w|\nabla u|^{p-2}\nabla u)=0, \end{aligned}$$

see Heinonen et al. [30, Chapter 3]. Thus in this one-dimensional case we see that in the weak sense,

$$\begin{aligned} (u'(t)^{p-1} w(t))'=0, \end{aligned}$$
(6.4)

and hence \(u'(t)=aw(t)^{1/(1-p)}\) a.e. for some \(a \ge 0\) (see Hörmander [43, Theorem 3.1.4]). From this (6.2) follows, as u is locally absolutely continuous.

Conversely, if u is given by (6.2), then u is locally absolutely continuous on \(\Omega \) and (6.4) holds, i.e. u is \(p\)-harmonic.

Finally, the energy of u is clearly given by (6.3) and since the integrands in (6.2) and (6.3) are the same, u is bounded if and only if it has finite energy.

The corresponding proof for functions on \((\mathbf {R},\mu )\) is similar. \(\square \)

In the rest of this section, we fix the function

$$\begin{aligned} u(x):=\int _0^x w^{1/(1-p)}\, dt, \quad x \in \mathbf {R}, \end{aligned}$$
(6.5)

which is \(p\)-harmonic by Lemma 6.2. Note that

$$\begin{aligned} \int _{x_0}^x (u')^p\,d\mu = u(x)-u(x_0). \end{aligned}$$
(6.6)

Lemma 6.3

Let v be a locally absolutely continuous function on \([0,\infty )\) with finite energy \(\int _0^\infty |v'|^p\,d\mu < \infty \).

  1. (a)

    If \(\displaystyle \int _0^\infty w^{1/(1-p)} \, dt < \infty \), then v is bounded.

  2. (b)

    If \(\displaystyle \int _0^\infty w^{1/(1-p)} \, dt = \infty \), then v satisfies

    $$\begin{aligned} \lim _{x \rightarrow \infty } \frac{|v(x)|}{u(x)^{1-1/p}} = 0, \end{aligned}$$
    (6.7)

    where u is given by (6.5).

Proof

By replacing v by |v| if necessary, we may assume that \(v \ge 0\). Statement (a) follows directly by Hölder’s inequality, since

$$\begin{aligned} |v(x)-v(0)| \le \int _0^x |v'(t)| \, dt \le \biggl ( \int _0^x |v'|^p \,d\mu \biggr )^{1/p} \biggl ( \int _0^x w^{1/(1-p)} \, dt \biggr )^{1-1/p} \end{aligned}$$

is uniformly bounded for all \(x>0\).

To prove (b) assume (for a contradiction) that \(\int _0^\infty w^{1/(1-p)} \, dt = \infty \) and that there exists \(\delta >0\) such that

$$\begin{aligned} \limsup _{x \rightarrow \infty } \frac{v(x)}{u(x)^{1-1/p}} > 2 \delta . \end{aligned}$$

As v has finite energy, there is \(x_0>0\) such that

$$\begin{aligned} \int _{x_0}^\infty |v'|^p \,d\mu < \delta ^p. \end{aligned}$$
(6.8)

By assumption, \(\lim _{x\rightarrow \infty } u(x)=\infty \). It follows that there is \(x_1>x_0\) such that \(v(x_1)> 2\delta u(x_1)^{1-1/p} >2v(x_0)\) . In particular,

$$\begin{aligned} v(x_1)-v(x_0)> \tfrac{1}{2} v(x_1) >\delta u(x_1)^{1-1/p}\ge \delta (u(x_1)-u(x_0))^{1-1/p}. \end{aligned}$$
(6.9)

Next, we compare the energy of v with that of u on the interval \([x_0,x_1]\). It is easily verified that v has the same boundary values on \([x_0,x_1]\) as the function \(a u+b\), where

$$\begin{aligned} a = \frac{v(x_1)-v(x_0)}{u(x_1)-u(x_0)}>0 \quad \text {and} \quad b = v(x_0)- a u(x_0). \end{aligned}$$

Since u is \(p\)-harmonic (by Lemma 6.2), it has minimal energy on these intervals and hence, using also (6.6) and (6.9), we obtain

$$\begin{aligned} \int _{x_0}^{x_1} |v'|^p \,d\mu \ge a^p \int _{x_0}^{x_1} (u')^p \, d\mu = \biggl ( \frac{v(x_1)-v(x_0)}{u(x_1)-u(x_0)} \biggr )^p (u(x_1)-u(x_0)) > \delta ^p. \end{aligned}$$

As this contradicts (6.8), it follows that (6.7) is true. \(\square \)

Lemma 6.4

Let u be as in (6.5). If \(v\in C([0,\infty ))\) is quasiharmonic on \((0,\infty )\), \(v(0)=0\) and

$$\begin{aligned} \liminf _{x \rightarrow \infty } \frac{|v(x)|}{u(x)^{1-1/p}} = 0, \end{aligned}$$
(6.10)

then \(v\equiv 0\).

Proof

By assumption, there is a sequence \(x_j\rightarrow \infty \), \(x_j>0\), such that

$$\begin{aligned} \lim _{j\rightarrow \infty } \frac{|v(x_j)|}{u(x_j)^{1-1/p}} = 0. \end{aligned}$$

Since v(t) has the same boundary values on \([0,x_j]\) as the function \(a_j u(t)\), where \(a_j = v(x_j)/u(x_j)\), the quasiminimizing property of v, together with (6.6), yields

$$\begin{aligned} \int _0^{x_j} |v'|^p \,d\mu \le Q |a_j|^p \int _0^{x_j} (u')^p \, d\mu = Q \frac{|v(x_j)|^p}{u(x_j)^{p-1}} \rightarrow 0, \end{aligned}$$

where Q is a quasiminimizing constant of v. Hence, \(v'=0\) a.e. and as v is locally absolutely continuous (by Theorem 6.1), it must be constant. \(\square \)

Proof of Theorem 1.1 (c)

This is a direct consequence of the positive Liouville theorem 3.7 and the following result. \(\square \)

Proposition 6.5

Let v be quasiharmonic on \((\mathbf {R},\mu )\) or on the open subset \(\Omega =(0,\infty )\) of \((\mathbf {R},\mu )\). Then v has finite energy if and only if it is bounded.

Proof

First, consider the case when v is quasiharmonic on \(\Omega \). By monotonicity, the limit

$$\begin{aligned} \lim _{x\rightarrow 0} v(x) = v(1) -\int _0^1 v'(t)\,dt \end{aligned}$$

exists (finite or infinite). Hölder’s inequality implies that

$$\begin{aligned} \biggl | \int _0^1 v'(t) \, dt \biggr | \le \biggl ( \int _0^1 |v'|^p \,d\mu \biggr )^{1/p} \biggl ( \int _0^1 w^{1/(1-p)} \, dt \biggr )^{1-1/p}, \end{aligned}$$

where the last integral is finite by Theorem 6.1 and the local \(A_p\) condition (6.1). This shows that if v is unbounded at 0 then it has infinite energy.

We can therefore assume that \(v\in C([0,\infty ))\) and \(v(0)=0\). We consider two exhaustive cases:

1. If \(\int _0^\infty w^{1/(1-p)} \, dt = \infty \), then the “only if” part follows from Lemmas 6.3 (b) and 6.4. To see the “if” part of the claim, note that the definition (6.5) of u implies that \(\lim _{x\rightarrow \infty }u(x)=\infty \) and hence (6.10) holds whenever v is bounded. Lemma 6.4 shows that \(v\equiv 0\) and thus of finite energy.

2. If \(\int _0^\infty w^{1/(1-p)} \, dt < \infty \), then the “only if” part is a direct consequence of Lemma 6.3 (a). Conversely, assume that v is bounded and nonconstant. Then, by monotonicity, \(\lim _{x\rightarrow \infty }v(x)\) exists and is finite. Since u is bounded (by Lemma 6.2), we can, after multiplication by a constant, assume that

$$\begin{aligned} 0<\lim _{x\rightarrow \infty }v(x) = \lim _{x\rightarrow \infty }u(x)<\infty . \end{aligned}$$
(6.11)

Let \(x>0\) be arbitrary. Since v has the same boundary values on [0, x] as the function au, where \(a=v(x)/u(x)\), the quasiminimizing property of v (with a quasiminimizing constant Q) yields

$$\begin{aligned} \int _0^{x} |v'|^p \,d\mu \le Q \biggl | \frac{v(x)}{u(x)} \biggr |^p \int _0^{x} (u')^p \, d\mu . \end{aligned}$$

Since u has finite energy (by Lemma 6.2) and in view of (6.11), letting \(x\rightarrow \infty \) shows that also v has finite energy.

Finally, if v is quasiharmonic on \((\mathbf {R},\mu )\), then applying the above to both \((0,\infty )\) and \((-\infty ,0)\) yields the result. \(\square \)

We are now ready to obtain the following characterization, from which Theorems 1.2 and 1.3 will follow rather directly.

Proposition 6.6

The following are equivalent for the open subset \(\Omega =(0,\infty )\) of the metric measure space \((\mathbf {R},\mu )\):

  1. (a)

    There exists a bounded nonconstant \(p\)-harmonic function on \(\Omega \).

  2. (b)

    There exists a nonconstant \(p\)-harmonic function with finite energy on \(\Omega \).

  3. (c)

    There exists a bounded nonconstant quasiharmonic function on \(\Omega \).

  4. (d)

    There exists a nonconstant quasiharmonic function with finite energy on \(\Omega \).

  5. (e)
    $$\begin{aligned} \int _0^\infty w^{1/(1-p)} \, dt < \infty . \end{aligned}$$

Proof

The equivalences (a) \(\Leftrightarrow \) (b) \(\Leftrightarrow \) (e) follow from Lemma 6.2, while Proposition 6.5 implies that (c) \(\Leftrightarrow \) (d). The implication (a) \(\Rightarrow \) (c) is trivial.

Finally, to prove that \(\lnot \)(e) \(\Rightarrow \) \(\lnot \)(c), let v be a bounded quasiharmonic function on \(\Omega \) with \(v(0):=\lim _{t \rightarrow 0} v(t)=0\). The definition (6.5) of u implies that \(\lim _{x\rightarrow \infty }u(x)=\infty \), and hence (6.10) holds. We can therefore use Lemma 6.4 to conclude that \(v\equiv 0\), i.e. (c) fails. \(\square \)

Proof of Theorem 1.2

That \(\mu \) is absolutely continuous follows from Theorem 6.1. Moreover, any nonconstant quasiharmonic function on \((\mathbf {R},\mu )\) is strictly monotone by the strong maximum principle. Thus the implications (a) \(\Rightarrow \) (c) \(\Rightarrow \) (e) and (b) \(\Rightarrow \) (d) \(\Rightarrow \) (e) follow immediately from applying Proposition 6.6 to both \((0,\infty )\) and \((-\infty ,0)\). Conversely, Lemma 6.2 shows that (e) \(\Rightarrow \) (a) \(\Leftrightarrow \) (b).\(\square \)

Proof of Theorem 1.3

(c) \(\Rightarrow \) (a) By Lemma 6.2, the function u, given by (6.5), is \(p\)-harmonic on \((\mathbf {R},\mu )\). On the other hand, by (c) it is bounded from above or below (or both), and thus either \(a+u\) or \(a-u\) is a positive nonconstant \(p\)-harmonic function on \((\mathbf {R},\mu )\) if \(a \in \mathbf {R}\) is large enough.

(a) \(\Rightarrow \) (b) This is trivial.

(b) \(\Rightarrow \) (c) That \(\mu \) is absolutely continuous follows from Theorem 6.1. Let v be a positive nonconstant quasiharmonic function on \((\mathbf {R},\mu )\). Since v is strictly monotone it is either bounded on \((-\infty ,0)\) or on \((0,\infty )\) (or both). In either case, (c) follows from Proposition 6.6 applied to either \((-\infty ,0)\) or \((0,\infty )\). \(\square \)

The results above raise the questions of whether, in a metric space supporting a locally doubling measure and a local Poincaré inequality there can exist a bounded quasiharmonic (or \(p\)-harmonic) function with infinite energy, and whether there can exist an unbounded quasiharmonic (or \(p\)-harmonic) function with finite energy. Both questions have affirmative answers. In the latter case this is shown in Example 7.2 below, and in the former case in the following example.

Example 6.7

Let \(\mu _1\) and \(\mu _2\) be locally doubling measures on \(\mathbf {R}\) supporting local \(p\)-Poincaré inequalities. Then \(\mu = \mu _1 \otimes \mu _2\) is locally doubling and supports a local \(p\)-Poincaré inequality on \(\mathbf {R}^2\), cf. Björn and Björn [8, Theorem 3], which can be proved also under local assumptions.

By Theorem 6.1, there are weights \(w_1\) and \(w_2\) such that \(d\mu _j=w_j\,dx\), \(j=1,2\). Assume that

$$\begin{aligned} \int _{-\infty }^\infty w_1^{1/(1-p)} \, dt < \infty , \end{aligned}$$

and let \(u_1\) be any bounded nonconstant Q-quasiharmonic function on \((\mathbf {R},\mu _1)\), which exists by Theorem 1.2, and which has finite energy by Proposition 6.5.

Extend \(u_1\) to \(\mathbf {R}^2\) by letting \(u(x,y)=u_1(x)\) for \((x,y) \in \mathbf {R}^2\). Then u is Q-quasiharmonic in \((\mathbf {R}^2,\mu )\), by Corollary 8 in [8]. (When \(Q=1\), i.e. the \(p\)-harmonic case, this can be deduced directly from the \(p\)-harmonic equation.) Since u is bounded, it follows that the bounded Liouville theorem fails in \((\mathbf {R}^2,\mu )\).

Now \(g_u(x,y)=g_{u_1}(x)=|u_1'(x)|\) a.e., by Theorem 6.1, and thus

$$\begin{aligned} \int _{\mathbf {R}^2} g_u^p \, d\mu = \mu _2(\mathbf {R})\int _{\mathbf {R}} g_{u_1}^p \, d\mu _1, \end{aligned}$$

where the integral on the right-hand side is finite, since \(u_1\) has finite energy. Hence u has finite energy if and only if \(\mu _2(\mathbf {R})<\infty \), in which case also the finite-energy Liouville theorem fails in \((\mathbf {R}^2,\mu )\). When \(\mu _2(\mathbf {R})=\infty \) (e.g. when \(\mu _2\) is the Lebesgue measure), u is an example of a bounded quasiharmonic function with infinite energy, which is \(p\)-harmonic if \(Q=1\). We do not know if the finite-energy Liouville theorem holds in this case.

7 Further examples in the absence of annular chainability

Example 7.1

\(X=\mathbf {R}\times [0,1]\) is an example of a space for which Theorem 1.1 is not applicable. We shall show that if X is equipped with the Lebesgue measure \(dm=dx\,dy\) then every quasiharmonic function v on X with finite energy must be constant.

The main ideas are as in Sect. 6, but extra care needs to be taken in the y-direction. Let v be a nonconstant quasiharmonic function on X with finite energy. Recall that \(g_v=|\nabla v|\) a.e., see Remark 2.7. For \(x\in \mathbf {R}\) let

$$\begin{aligned} t(x)=\min _{0 \le y \le 1} v(x,y) \quad \text {and} \quad T(x)=\max _{0 \le y \le 1} v(x,y). \end{aligned}$$

As v has finite energy, it follows from Lemma 4.1 that

$$\begin{aligned} \lim _{x \rightarrow \pm \infty } (T(x)-t(x)) \le \lim _{x \rightarrow \pm \infty } C \biggl ( \int _{(x-2\lambda ,x+2\lambda )\times [0,1]} |\nabla v|^p\,dm \biggr )^{1/p} = 0. \end{aligned}$$
(7.1)

By the strong maximum principle, T and t are strictly monotone functions on \(\mathbf {R}\), and because of (7.1) we can therefore assume that they are both strictly increasing and that \(t(0)=0\). We shall now show that

$$\begin{aligned} \lim _{x\rightarrow \infty } \frac{T(x)}{x^{1-1/p}} = \lim _{x\rightarrow \infty } \frac{t(x)}{x^{1-1/p}} = 0. \end{aligned}$$
(7.2)

Since (7.1) implies that

$$\begin{aligned} \lim _{x\rightarrow \infty } \frac{t(x)}{T(x)} = 1 - \lim _{x\rightarrow \infty } \frac{T(x)-t(x)}{T(x)} = 1, \end{aligned}$$

it suffices to consider the second limit in (7.2). Fix \(\delta >0\) arbitrary. As v has finite energy, there is \(x_0>0\) such that

$$\begin{aligned} \int _{(x_0,\infty )\times [0,1]}|\nabla v|^p\,dm < \delta ^p. \end{aligned}$$
(7.3)

Assume that there exists \(x_1>x_0\) such that \(t(x_1)> 2\delta x_1^{1-1/p} > 2T(x_0)\). Then for all \(y\in [0,1]\),

$$\begin{aligned} v(x_1,y)-v(x_0,y) \ge t(x_1)-T(x_0)> \tfrac{1}{2} t(x_1) > \delta x_1^{1-1/p}. \end{aligned}$$
(7.4)

It is easily verified that \(v(\,\cdot \,,y)\) has the same boundary values on \([x_0,x_1]\) as the function \(a(y) x + b(y)\), where

$$\begin{aligned} a(y) = \frac{v(x_1,y)-v(x_0,y)}{x_1-x_0}>0 \quad \text {and} \quad b(y) = v(x_0,y)- a(y) x_0. \end{aligned}$$

Since linear functions on \(\mathbf {R}\) minimize energy, we obtain as in the proof of Lemma 6.3 that for each \(y\in [0,1]\),

$$\begin{aligned} \int _{x_0}^{x_1} |\partial _x v(x,y)|^p \,dx \ge a(y)^p (x_1-x_0) = \frac{(v(x_1,y)-v(x_0,y))^p}{(x_1-x_0)^{p-1}} > \delta ^p, \end{aligned}$$

where the last estimate uses (7.4). Integrating over \(y\in [0,1]\), gives

$$\begin{aligned} \int _0^1 \int _{x_0}^{x_1} |\partial _x v(x,y)|^p \,dx \,dy > \delta ^p, \end{aligned}$$

which contradicts (7.3). So \(\limsup _{x\rightarrow \infty } t(x)/x^{1-1/p}\le 2\delta \), and letting \({\delta }\rightarrow 0\) proves (7.2). Finally, for \(n=1,2,\ldots ,\) let

$$\begin{aligned} \Omega _n = \{(x,y)\in X: 0<v(x,y) < T(n)\} \supset (0,n)\times [0,1], \end{aligned}$$

which is bounded since \(\lim _{x \rightarrow \infty } t(x)=\infty \) by (7.1) and the positive Liouville theorem (Theorem 3.7). Compare the energy of v on \(\Omega _n\) with the energy of the piecewise linear function \(v_n =T(n)\max \{0,\min \{1,x/n\}\}\). Note that \(v=v_n\) on \(\partial \Omega _n\),

$$\begin{aligned} \partial _x v_n(x,y) = \frac{T(n)}{n}\chi _{\{0<x<n\}} \quad \text {a.e. on } X \end{aligned}$$

and \(\partial _y v_n\equiv 0\). Using the quasiharmonicity of v (with a quasiminimizing constant Q), we thus obtain from (7.2) that

$$\begin{aligned} \int _{(0,n)\times [0,1]} |\nabla v|^p \,dm \le \int _{\Omega _n} |\nabla v|^p \,dm \le Q \int _{\Omega _n} |\nabla v_n|^p \,dm = Q \frac{T(n)^p}{n^{p-1}} \rightarrow 0, \end{aligned}$$

as \(n \rightarrow \infty \). This implies that \(\nabla v=0\) a.e. in \((0,\infty )\times [0,1]\), and thus, by continuity, v is constant therein. By the strong maximum principle, v is constant on X.

We saw in Theorem 1.2 that on the real line one can never have an unbounded quasiharmonic function with finite energy. The following example shows that there are spaces which admit unbounded \(p\)-harmonic functions with finite energy.

Example 7.2

Let \(G=(V,E)\) be the infinite binary rooted tree, with root \(v_0 \in V\) having degree 2 and all other vertices having degree 3. The edge between two neighbouring vertices a and b will be denoted [ab]. Each edge is considered to be a line segment of length 1, which makes G into a metric tree. Each vertex, but for the root, has three neighbours: one parent and two children; the root has two children but no parent.

Fixing one geodesic ray \(\gamma =\{v_j\}_{j=0}^\infty \) starting at the root \(v_0\) and with \(v_{j+1}\) being a child of \(v_j\), we equip G with the measure \(\mu \) as follows. On the edge \([v_{j},v_{j+1}]\) we let \(d\mu = 2^{-j} \,dm\), where m is the usual one-dimensional Lebesgue measure. On edges \([a,b]\in E\) that do not belong to the ray \(\gamma \), we let \(d\mu = 2^{-k} \,dm\), where \(v_k\) is the unique vertex on the ray \(\gamma \) that is closest to [ab].

Because of the uniform bound on the degree, the measure \(\mu \) is locally doubling and supports a local 1-Poincaré inequality with uniform constants \(r_0\), C and \(\lambda \) independent of \(x_0\).

A function \(u:G \rightarrow \mathbf {R}\) is \(p\)-harmonic in the sense of Definition 3.1 if and only if it is linear on each edge and

$$\begin{aligned} \sum _{b \sim a} |u(b)-u(a)|^{p-2} (u(b)-u(a)) \mu ([a,b])=0 \end{aligned}$$
(7.5)

holds for each vertex a, where the sum is over all neighbours b of a, see Andersson [4], Holopainen and Soardi [41], Shanmugalingam [61, Lemma 3.3] and Björn and Björn [7, Lemma A.27].

We now construct two nonconstant \(p\)-harmonic functions on G with finite energy, one bounded and one unbounded. Both functions need to be linear on each edge, so we only need to define them on the vertices. We start with the unbounded one.

Let \(u(v_j)=j\), \(j=0,1,\ldots .\) This defines u on the fixed ray \(\gamma \). Each vertex \(v_j\in \gamma \) has two children \(v_{j+1}\) and, say, \(v_{j+1}'\). We let \(u(v_1')=-1\) and \(u(v_{j}')=u(v_{j-1})+1=j\) if \(j \ge 2\). Since

$$\begin{aligned} \mu ([v_{j-1},v_j]) = 2^{1-j} =2\mu ([v_{j},v_{j+1}]) =2\mu ([v_{j},v_{j+1}']), \quad \text {if } j \ge 1, \end{aligned}$$

and \(\mu ([v_0,v_1])=\mu ([v_0,v_1'])\), this makes u satisfy the \(p\)-harmonic condition (7.5) at all vertices \(v_j\in \gamma \). To define u on the remaining vertices we prescribe its change along each of its edges as follows. Any vertex \(a\notin \gamma \) has one parent b and two children c and \(c'\), and the corresponding three edges have equal masses. Letting

$$\begin{aligned} u(c)-u(a)=u(c')-u(a)= -2^{1/(1-p)}(u(b)-u(a)) \end{aligned}$$
(7.6)

recursively makes u satisfy the \(p\)-harmonic condition (7.5) at all vertices, and thus u is \(p\)-harmonic on G.

We will now see that u has finite energy. Let \(G_j\) be the subgraph of G consisting of \(v'_j\) together with all its descendants and corresponding edges. Because of (7.6), the gradient \(g_u\) on the edges of \(G_j\) at distance \(k-1\) from \(v'_j\) is \((2^{1/(1-p)})^k\), and u’s energy on \(G_j\) is thus

$$\begin{aligned} \int _{G_{j}} g_u^p\, d\mu = 2^{1-j} \sum _{k=1}^\infty 2^k (2^{1/(1-p)})^{kp} = 2^{1-j} \sum _{k=1}^\infty 2^{k/(1-p)}, \quad j=1,2,\ldots . \end{aligned}$$

Since \(g_u\) on \(\gamma \) and the adjacent edges is constant 1, while the measure behaves like \(2^{-j}\), the total energy on G is thus

$$\begin{aligned} \int _Gg_u^p\, d\mu = \sum _{j=0}^\infty \biggl ( 2^{-j} + 2^{-j} + \int _{G_{j+1}} g_u^p\, d\mu \biggr ) = 4 + 2 \sum _{k=1}^\infty 2^{k/(1-p)} < \infty , \end{aligned}$$

i.e. u has finite energy. Clearly u is unbounded along the ray \(\gamma \), while it is bounded on \(G_j\) for each j, and thus bounded from below.

The following modification produces a bounded nonconstant \(p\)-harmonic function \(\tilde{u}\) on G. Let \(\tilde{u}(v_0)=0\), \(\tilde{u}(v_j)=1\), \(j \ge 1\), \(\tilde{u}=u\) on \(G_1\),

$$\begin{aligned} \tilde{u}=2^{1/(p-1)}(u-1)+1 \quad \text {on }G_2 \end{aligned}$$

and \(\tilde{u}\equiv 1\) on \(G_j\), \(j\ge 3\). Then \(\tilde{u}\) is a bounded nonconstant \(p\)-harmonic function on G. Moreover, \(\int _G g_{\tilde{u}}^p \,d \mu \le 2^{p/(p-1)} \int _G g_{u}^p \,d \mu < \infty \), i.e. also \(\tilde{u}\) has finite energy.