The Perron method for $p$-harmonic functions in unbounded sets in $\mathbf{R}^n$ and metric spaces

The Perron method for solving the Dirichlet problem for $p$-harmonic functions is extended to unbounded open sets in the setting of a complete metric space with a doubling measure supporting a $p$-Poincar\'e inequality, $1<p<\infty$. The upper and lower ($p$-harmonic) Perron solutions are studied for $p$-parabolic open sets. It is shown that continuous functions and quasicontinuous Dirichlet functions are resolutive (i.e., that their upper and lower Perron solutions coincide) and that the Perron solution coincides with the $p$-harmonic extension. It is also shown that Perron solutions are invariant under perturbation of the function on a set of capacity zero.


Introduction
The Dirichlet (boundary value) problem associated with p-harmonic functions, 1 < p < ∞, which is a nonlinear generalization of the classical Dirichlet problem, considers the p-Laplace equation, ∆ p u := div(|∇u| p−2 ∇u) = 0, (1.1) with prescribed boundary values u = f on the boundary. A continuous weak solution of (1.1) is said to be p-harmonic.
The nonlinear potential theory of p-harmonic functions has been developed since the 1960s; not only in R n , but also in weighted R n , Riemannian manifolds, and other settings. The books Malý-Ziemer [29] and Heinonen-Kilpeläinen-Martio [19] are two thorough treatments in R n and weighted R n , respectively.
More recently, p-harmonic functions have been studied in complete metric spaces equipped with a doubling measure supporting a p-Poincaré inequality. It is not clear how to employ partial differential equations in such a general setting as a metric measure space. However, the equivalent variational problem of locally minimizing the p-energy integral, among all admissible functions, becomes available when considering the notion of minimal p-weak upper gradient as a substitute for the modulus of the usual gradient. A continuous minimizer of (1.2) is p-harmonic. The reader might want to consult Björn-Björn [3] for the theory of p-harmonic functions and first-order analysis on metric spaces. If the boundary value function f is not continuous, then it is not feasible to require that the solution u attains the boundary values as limits, that is, to demand that u(y) → f (x) as y → x (and y ∈ Ω) for all x ∈ ∂Ω. This is actually often not possible even if f is continuous (see, e.g., Examples 13.3 and 13.4 in Björn-Björn [3]). Therefore it makes more sense to consider boundary data in a weaker (Sobolev) sense. Shanmugalingam [35] solved the Dirichlet problem for p-harmonic functions in bounded domains with Newtonian boundary data taken in Sobolev sense. This result was generalized by Hansevi [17] to unbounded domains with Dirichlet boundary data. For continuous boundary values, the problem was solved in bounded domains using uniform approximation by Björn-Björn-Shanmugalingam [7].
The Perron method for solving the Dirichlet problem for harmonic functions (on R 2 ) was introduced in 1923 by Perron [31] (and independently by Remak [32]). The advantage of the method is that one can construct reasonable solutions for arbitrary boundary data. It provides an upper and a lower solution, and the major question is to determine when these solutions coincide, that is, to determine when the boundary data is resolutive.
The Perron method in connection with the usual Laplace operator has been studied extensively in Euclidean domains (see, e.g., Brelot [12] for the complete characterization of the resolutive functions) and has been extended to degenerate elliptic operators (see, e.g., Kilpeläinen [24] and Heinonen-Kilpeläinen-Martio [19]).
Björn-Björn-Shanmugalingam [8] extended the Perron method for p-harmonic functions to the setting of a complete metric space equipped with a doubling measure supporting a p-Poincaré inequality and proved that Perron solutions are pharmonic and agree with the previously obtained solutions for Newtonian boundary data in Shanmugalingam [35]. More recently, Björn, Björn, and Shanmugalingam have developed the Perron method for p-harmonic functions with respect to the Mazurkiewicz boundary; see [10].
The purpose of this paper is to extend the Perron method for solving the Dirichlet problem for p-harmonic functions to unbounded sets in the setting of a complete metric space equipped with a doubling measure supporting a p-Poincaré inequality. In particular, we show that quasicontinuous functions with finite Dirichlet energy, as well as continuous functions, are resolutive with respect to unbounded p-parabolic sets and that the Perron solution is the unique p-harmonic solution that takes the required boundary data outside sets of capacity zero. We also show that Perron solutions are invariant under perturbations on sets of capacity zero.
The paper is organized as follows. In the next section, we establish notation, review some basic definitions relating to Sobolev-type spaces on metric spaces, and obtain some results that will be used in later sections. In Section 3, we review the obstacle problem associated with p-harmonic functions, which was extended to unbounded sets in Hansevi [17]. It is a useful tool for studying p-harmonic functions. We also obtain a new convergence theorem for the obstacle problem that will play a fundamental role in the later sections. Section 4 reviews p-harmonic functions, and also superharmonic functions, which are used in Section 5 to define Perron solutions, where we confirm that some basic properties for Perron solutions hold also in unbounded sets. We extend the comparison principle (Theorem 5.1) for superharmonic functions to unbounded sets, a result that plays an important role for the Perron method. In Section 6, we then introduce a smaller capacity and a related quasicontinuity property that we will use in the later sections.
The main result on resolutivity of quasicontinuous functions is obtained in Section 8. Finally, in Section 9, we conclude the paper by showing that the resolutivity results hold also for continuous boundary value functions.

Notation and preliminaries
We assume throughout the paper that (X, M, µ, d) is a metric measure space (which we will refer to as X) equipped with a metric d and a measure µ such that 0 < µ(B) < ∞ for all balls B ⊂ X (we make the convention that balls are nonempty and open). The σ-algebra M on which µ is defined is the completion of the Borel σ-algebra.
We start with the assumption that 1 ≤ p < ∞. However, in the next section (and for the rest of the paper), we will assume that 1 < p < ∞.
The measure µ is said to be doubling if there exists a constant C µ ≥ 1 such that for all balls B ⊂ X. We use the notation that if B is a ball with radius r, then the ball with radius λr that is concentric with B is denoted by λB.
The characteristic (or indicator) function χ E of a set E is defined by χ E (x) = 1 if x ∈ E and χ E (x) = 0 otherwise. We say that the set E is compactly contained in A if E (the closure of E) is a compact subset of A and denote this by E ⋐ A. The extended real number system is denoted by R := [−∞, ∞]. Recall also that f + = max{f, 0} and f − = max{−f, 0}, and hence that f = f + −f − and |f | = f + +f − . Continuous functions will be assumed to be real-valued.
By a curve in X we mean a rectifiable nonconstant continuous mapping from a compact interval into X. A curve can thus be parametrized by its arc length ds.
holds for each pair of points x, y ∈ X and every curve γ in X joining x and y.
We make the convention that the left-hand side is infinite when at least one of the terms is.
Clearly, upper gradients are not unique, and g −g is not in general an upper gradient of u−v when g andg are upper gradients of u and v, respectively. However, upper gradients are subadditive, that is, g +g is an upper gradient of u + v and |α|g is an upper gradient of αu, α ∈ R, and therefore g +g is an upper gradient of u − v.
Using upper gradients, it is possible to define so-called Newtonian spaces on the metric space X. This was done by Shanmugalingam [34].
Definition 2.2. The Newtonian space on X, denoted by N 1,p (X), is the space of all everywhere defined, extended real-valued functions in L p (X) such that the seminorm, is finite. (The infimum is taken over all upper gradients g of u.) We also have the associated Dirichlet spaces.
Definition 2.3. The Dirichlet space on X, denoted by D p (X), is the space of all extended real-valued functions on X that are everywhere defined, measurable, and have upper gradients in L p (X).
We emphasize the fact that, in this paper, Newtonian and Dirichlet functions are defined everywhere (not just up to equivalence classes of functions that agree almost everywhere), which is essential for the notion of upper gradient to make sense. Shanmugalingam [34] proved that the associated normed (quotient) space defined by N 1,p (X) = N 1,p (X)/ ∼, where u ∼ v if and only if u − v N 1,p (X) = 0, is a Banach space. Note that some authors denote the space of the everywhere defined functions by N 1,p (X), and then define the Newtonian space, which they denote by N 1,p (X), to be the corresponding space of equivalence classes.
If A is a measurable subset of X, then we can consider A to be a metric space in its own right (with the restriction of d and µ to A). Thus the Dirichlet space D p (A) and Newtonian space N 1,p (A) are also given by Definitions 2.3 and 2.2, respectively. Clearly, a function f in D p (X) (or in N 1,p (X)) has a restriction, f | A , to A that belongs to D p (A) (or N 1,p (A)), and any upper gradient of f remains an upper gradient when restricted to A.
The local spaces are defined analogously to the local space L p loc (X), that is, a function f on X is said to belong to D p loc (X) if for every x ∈ X there is a ball B such that x ∈ B and f ∈ D p (B). However, recall that a metric space is said to be proper if all bounded closed subsets are compact. In particular, this is true if the metric space is complete and the measure is doubling. If X is proper and Ω is an open subset of X, then f ∈ L p loc (Ω) if and only if f ∈ L p (Ω ′ ) for all open Ω ′ ⋐ Ω. This is true also for D p loc and N 1,p loc . The notion of capacity of a set is important in potential theory, and various types and definitions can be found in the literature (see, e.g., Kinnunen-Martio [25] and Shanmugalingam [34]). We will use the following definition. In Sections 8 and 9, we will also use a new capacity defined in Björn-Björn-Shanmugalingam [10].
where the infimum is taken over all u ∈ N 1,p (A) such that u ≥ 1 on E. If such functions do not exist, we set C p (E; A) = ∞. If the capacity is taken with respect to X, then we simplify the notation and write C p (E).
The observant reader might have noticed that we used a slightly different, but equivalent, (semi)norm in Definition 2.2 compared to the norm that was used in Shanmugalingam [34]. The reason is that with our definition the capacity becomes countably subadditive, that is, it satisfies the inequality C p (  can easily be modified to show this, see, e.g., Björn-Björn [3]). Furthermore, C p (∅) = 0, and hence C p is an outer measure. Note also that C p is finer than µ in the sense that the capacity of a set may be positive even when the measure of the same set equals zero.
Whenever a property holds for all points except for points in a set of capacity zero, it is said to hold quasieverywhere (q.e.). Note that we follow the custom of refraining from making the dependence on p explicit here.
Shanmugalingam [34] showed that if two Newtonian functions are equal almost everywhere, then they are in fact equal quasieverywhere. This result extends to functions in D p loc (X). A drawback of upper gradients is that they are not preserved by L p -convergence. It is, however, possible to overcome this problem by relaxing the condition a bit and considering it sufficient if (2.1) in Definition 2.1 holds for p-almost every curve (we say that a property holds for p-almost every (p-a.e.) curve, if it holds for all curves except for a curve family of zero p-modulus; see Definition 2.6).
Definition 2.5. A measurable function g : X → [0, ∞] is said to be a p-weak upper gradient of a function f : X → R whenever (2.1) holds for each pair of points x, y ∈ X and p-almost every curve γ ⊂ X joining x and y.
Lemma 2.4 in Koskela-MacManus [28] asserts that if g is a p-weak upper gradient of a function f , then there is a decreasing sequence {g j } ∞ j=1 of upper gradients of f such that g j − g L p (X) → 0 as j → ∞. This implies that a measurable function belongs to D p (X) whenever it (merely) has a p-weak upper gradient in L p (X).
If u is in D p (X), then u has a minimal p-weak upper gradient. It is denoted by g u and is minimal in the sense that g u ≤ g a.e. for all p-weak upper gradients g of u. This was proved for p > 1 by Shanmugalingam [35] and for p ≥ 1 by Haj lasz [15]. Minimal p-weak upper gradients g u are true substitutes for |∇u| in metric spaces. One of the important properties of minimal p-weak gradients is that they are local in the sense that if two functions u, v ∈ D p (X) coincide on a set E, then g u = g v a.e. in E. Furthermore, if U = {x ∈ X : u(x) > v(x)}, then g u χ U + g v χ X\U is a minimal p-weak upper gradient of max{u, v} and g v χ U + g u χ X\U is a minimal p-weak upper gradient of min{u, v}; see Björn-Björn [2]. It can be useful to know that |g u − g v | ≤ g u−v a.e., which is easy to obtain since g It is well known that the restriction of a minimal p-weak upper gradient to an open subset remains minimal with respect to that subset. This implies that the results above about minimal p-weak upper gradients of functions in D p (X) extend to functions in D p loc (X) having minimal p-weak upper gradients in L p loc (X). Definition 2.6. Let Γ be a family of curves in X. The p-modulus of Γ is the number where the infimum is taken over all nonnegative Borel functions ρ such that γ ρ ds ≥ 1 for all curves γ ∈ Γ.
The p-modulus satisfies the properties (Heinonen-Koskela [21]): Mod p (∅) = 0, If Γ 0 and Γ are two curve families such that every curve in Γ has a subcurve in Γ 0 , then Mod p (Γ) ≤ Mod p (Γ 0 ). For proofs of this and other results in this section, we refer to Björn-Björn [3] or Heinonen-Koskela-Shanmugalingam-Tyson [22] If E is a subset of X, we let Γ E denote the family of all curves that intersect E. Lemma 3.6 in Shanmugalingam [34] asserts that Mod p (Γ E ) = 0 if C p (E) = 0. This implies that two functions have the same set of p-weak upper gradients if they are equal quasieverywhere.
In order to be able to compare boundary values of Dirichlet and Newtonian functions, we introduce the following spaces.
The Newtonian space with zero boundary values in A \ E, denoted by N 1,p 0 (E; A), is defined analogously.
The condition "u = 0 in A \ E" can actually be replaced by "u = 0 q.e. in A \ E" without changing the obtained spaces.
The following lemma from Hansevi [17] can be useful for asserting that certain functions belong to a Dirichlet space with zero boundary values.
in E, then f ∈ D p 0 (E). Next we state three useful results. We will use the first two, Lemma 2.9 (Fuglede's lemma) and Lemma 2.10 to prove the convergence Lemma 2.12, which together with the third result, Corollary 2.11, will be used to prove Theorem 3.4, which in turn will be important when we prove this paper's main result, Theorem 8.1.
where all the integrals are well defined and real-valued.
It was observed in Shanmugalingam [34] that the proof by Fuglede [14] is valid also for metric spaces.
and converges to a function u q.e. on X, then u ∈ N 1,p (X) and be sequences (both defined on X) that are bounded in L p (X) and L p (G k ), for each k = 1, 2, ... , respectively. If g k is a p-weak upper gradient of u k with respect to G k , for every k = 1, 2, ... , and u j → u q.e. on X as j → ∞, then u ∈ D p (X).
Proof. Let k be a positive integer. Clearly, g j is a p-weak upper gradient of u j with respect to G k for every integer j ≥ k. According to Lemma 2.10, there are a p-weak upper gradientg k ∈ L p (G k ) of u with respect to G k and a subsequence of and hence the sequence {g k } ∞ k=1 is bounded in L p (X). Since L p (X) is reflexive, it follows from Banach-Alaoglu's theorem that there is a subsequence, also denoted by {g k } ∞ k=1 , that converges weakly in L p (X) to a function g. By applying Mazur's lemma repeatedly to the sequences {g k } ∞ k=j for j = 1, 2, ... , we can find convex combinations Nj k=j a j,kgk such that g ′ j − g L p (X) < 1/j, and hence we obtain a sequence {g ′ j } ∞ j=1 that converges to g in L p (X). Note that g ∈ L p (X), and that for every n = 1, 2, ... , the sequence {g ′ j } ∞ j=n consists of p-weak upper gradients of u with respect to G n . It suffices to show that g is a p-weak upper gradient of u to complete the proof. By Fuglede's lemma (Lemma 2.9), we can find a subsequence, also denoted by {g ′ j } ∞ j=1 , and a collection of curves Γ in X with Mod p (Γ) = 0, such that for every curve γ / ∈ Γ, it follows that For every n = 1, 2, ... , let Γ n,j , j = n, n + 1, ... , be the collection of curves in G n along which g ′ j is not an upper gradient of u, and set ∞ j=n Mod p (Γ n,j ) = 0. Let γ / ∈ Γ ′ be an arbitrary curve in X with endpoints x and y. Since γ is compact and G 1 , G 2 , ... are open sets that exhaust X, we can find an integer N such that γ ⊂ G N and Hence, by (2.2), it follows that Consequently, g is a p-weak upper gradient of u, and thus u ∈ D p (X).
From the next section on, we will assume that X supports a (p, p)-Poincaré inequality. Requiring a Poincaré inequality to hold is one way of making it possible to control functions by their upper gradients.
Definition 2.13. Let q ≥ 1. We say that X supports a (q, p)-Poincaré inequality (or that X is a (q, p)-Poincaré space) if there exist constants, C PI > 0 and λ ≥ 1 (the dilation constant), such that for all balls B ⊂ X, all integrable functions u on X, and all upper gradients g of u.
In (2.3), we have used the convenient notation For short, we write p-Poincaré inequality instead of (1, p)-Poincaré inequality.
The following theorem shows that a function can be controlled by its minimal p-weak upper gradient. This was proved for Euclidean spaces by Maz ′ ya (see, e.g., [30]), and later J. Björn [11] observed that the proof is valid also for metric spaces. The following version is from Björn-Björn [3] (Theorem 5.53).

The obstacle problem
In this section, and for the rest of the paper, we assume that 1 < p < ∞, that X is proper and supports a (p, p)-Poincaré inequality with dilation constant λ, and that Ω is a nonempty (possibly unbounded ) open subset of X such that C p (X \ Ω) > 0.
Inspired by Kinnunen-Martio [26], the following obstacle problem, which is a generalization that allows for unbounded sets, was defined in Hansevi [17].
Note that the obstacle problem is solved for boundary data in D p (Ω), which is not in general defined on ∂Ω. Therefore we do not really have boundary values, and hence the definition should be understood in a weak Sobolev sense.
It was proved in Hansevi [17] that the K ψ,f -obstacle problem has a unique (up to sets of capacity zero) solution under the natural condition of K ψ,f being nonempty. Note that, if v = u q.e. in Ω and u is a solution of the K ψ,f -obstacle problem, then so is v. Among the results obtained in Hansevi [17], we have a simple criterion for when K ψ,f is nonempty.
Let ψ and f be functions in D p (Ω). Then K ψ,f is nonempty if and only if (ψ − f ) + ∈ D p 0 (Ω). We also have the following comparison principle for obstacle problems. Lemma 3.3. Let ψ j : Ω → R and f j ∈ D p (Ω) be such that K ψj ,fj is nonempty, and let u j be a solution of the K ψj ,fj -obstacle problem, j = 1, 2.
in Ω. If the measure µ is doubling, then there is a unique lsc-regularized solution of the K ψ,f -obstacle problem whenever K ψ,f is nonempty (Theorem 4.1 in Hansevi [17]). The lsc-regularization of a function u is the (lower semicontinuous) function u * defined by where B(x, r) is the ball centered at x with radius r. If the two solutions u 1 and u 2 in Lemma 3.3 are lsc-regularized solutions, then the conclusion, u 1 ≤ u 2 , holds everywhere in Ω.
We conclude this section with a proof of a new convergence theorem that will be used in the proof of Theorem 8.1. It is a generalization to unbounded sets and Dirichlet functions of Proposition 10.18 in Björn-Björn [3]. The special case when ψ j = f j ∈ N 1,p (Ω) had previously been proved in Kinnunen-Shanmugalingam [27] (Proposition 3.2), and a similar result for the double obstacle problem was obtained in Farnana [13] (Theorem 3.3).
be sequences of functions in D p (Ω) that are decreasing q.e. to functions ψ and f in D p (Ω), respectively, and are such that If u j is a solution of the K ψj ,fj -obstacle problem for each j = 1, 2, ... , then the sequence {u j } ∞ j=1 is decreasing q.e. to a function which is a solution of the K ψ,f -obstacle problem.
Proof. Lemma 3.3 asserts that u j+1 ≤ u j q.e. in Ω for each j = 1, 2, ... , and hence by the subadditivity of the capacity there exists a function u such that {u j } ∞ j=1 is decreasing q.e. to u in Ω. We will show that u is a solution of the K ψ,f -obstacle problem.
Let w j = u j − f j and w = u − f , all functions extended by zero outside Ω. Let B ⊂ X be a ball such that B ∩ Ω is nonempty and C p (B ′ \ Ω) > 0 where B ′ := 1 2 B. We claim that the sequences {g wj } ∞ j=1 and {w j } ∞ j=1 are bounded in L p (X) and L p (kB), respectively, for each k = 1, 2, ... . To show this, let k be a positive integer, and let S = ∞ j=1 S j , where S j := {x ∈ X : w j (x) = 0}. Then it follows that Proposition 2.15 asserts that w j ∈ N 1,p loc (X). Maz ′ ya's inequality (Theorem 2.14) implies the existence of a constant C kB > 0 such that . Clearly, h j ∈ K ψj ,fj (Ω), and since u j is a solution of the K ψj ,fj -obstacle problem, it follows that g uj L p (Ω) ≤ g hj L p (Ω) . We also know that g hj ≤ g ψj + g fj a.e. in Ω, and hence the claim follows because ≤ g ψj L p (Ω) + 2 g fj L p (Ω) ≤ g ψj−ψ L p (Ω) + g ψ L p (Ω) + 2 g fj−f L p (Ω) + 2 g f L p (Ω) .
Lemma 2.12 applies here and asserts that w ∈ D p (X), and hence u − f ∈ D p 0 (Ω). Because f ∈ D p (Ω), this also shows that u ∈ D p (Ω). Let Clearly, u ≥ ψ in Ω\A. The subadditivity of the capacity implies that C p (A) = 0 since u j ≥ ψ j ≥ ψ q.e. in Ω, and hence u ≥ ψ q.e. in Ω. We conclude that u ∈ K ψ,f .
Let v be an arbitrary function that belongs to K ψ,f . We complete the proof by showing that Clearly, ϕ j ≥ ψ j and ϕ j ∈ D p (Ω). We also have , and, by Proposition 3.2, . Hence Lemma 2.8 asserts that ϕ j − f j ∈ D p 0 (Ω). We conclude that ϕ j ∈ K ψj ,fj , and therefore decreases to ψ, and v ≥ ψ, respectively. Then where the last two integrals tend to zero as j → ∞. Let Ω k = {x ∈ kB ∩ Ω : dist(x, ∂Ω) > δ/k}, k = 1, 2, ... , where δ > 0 is sufficiently small so that Ω 1 is nonempty. It is clear that Fix a positive integer k. Then g u and g uj are minimal p-weak upper gradients of u and u j , respectively, with respect to Ω k . By Proposition 2.15, the functions f and f j belong to L p loc (Ω), and hence f and f j are in L p (Ω k ). Furthermore, {f j } ∞ j=1 is decreasing to f q.e., and therefore |f j − f | ≤ |f 1 − f | q.e. By (3.1), we can see that We know that g ϕj → g v in L p (Ω), and because u j → u q.e. in Ω as j → ∞, Corollary 2.11 implies that Letting k → ∞ yields (3.2) and the proof is complete.
Under the assumption of µ being doubling, it follows that X is proper if and only if X is complete, and furthermore that X supports a (p, p)-Poincaré inequality if and only if X supports a p-Poincaré inequality (the necessity follows from Hölder's inequality, and the sufficiency was proved in Haj lasz-Koskela [16] (Theorem 5.1)). Hence by also assuming that µ is doubling in the following sections, we make the rather standard assumptions stated in the beginning of the next section.

p-harmonic and superharmonic functions
From now on, we assume that 1 < p < ∞, that X is a complete metric space supporting a p-Poincaré inequality, and that µ is doubling. We also assume that Ω is a nonempty (possibly unbounded ) open subset of X such that C p (X \ Ω) > 0.
There are many equivalent definitions of (super)minimizers (or, more accurately, p-(super)minimizers) in the literature (see, e.g., Proposition 3.2 in A. Björn [1]). We will use the definition from Björn-Björn-Mäkäläinen-Parviainen [5] (and we also follow the custom of not making the dependence on p explicit in the notation).
Definition 4.1. Let V ⊂ X be open and nonempty. We say that a function u in holds for all nonnegative ϕ ∈ N 1,p 0 (V ), and a minimizer in V if (4.1) holds for all ϕ ∈ N 1,p 0 (V ). Moreover, a function is p-harmonic if it is a continuous minimizer.
According to Proposition 3.2 in A. Björn [1], it is in fact only necessary to test (4.1) with (all nonnegative and all, respectively) ϕ ∈ Lip c (V ). Proposition 3.9 in Hansevi [17] asserts that a function u is a superminimizer in Ω if u is a solution of the K ψ,f -obstacle problem.
If f is defined outside V , then we sometimes consider H V f to be equal to f in some set outside V where f is defined.
A Lipschitz function f on ∂V can be extended to a Lipschitz functionf on V (see, e.g., Theorem 6.2 in Heinonen [18]), andf ∈ D p (V ) whenever V is bounded. Lemma 4.3 (below) implies that H Vf does not depend on the particular choice of extensionf . We can therefore define the p-harmonic extension also for Lipschitz functions on the boundary by H V f := H Vf whenever V is bounded. The comparison principle (Lemma 4.3) is valid also for this case. In particular, the conclusion holds under the condition that f 1 , f 2 ∈ D p (Ω) and f 1 ≤ f 2 q.e. on ∂Ω.
A proof of Lemma 4.3 can be found in Hansevi [17].
We end this section with a proof of a proposition that will be used in the proof of Theorem 8.1.
j=1 is a sequence of functions in D p (Ω) that is decreasing q.e. in Ω to f ∈ D p (Ω) and g fj−f L p (Ω) → 0 as j → ∞, then Hf j decreases to Hf locally uniformly in Ω.
Proof. By Lemma 4.3, it follows that Hf j ≥ Hf j+1 ≥ Hf in Ω for all j = 1, 2, ... . Since Hf j and Hf are the continuous solutions of the K fj ,Hf -and K f,Hf -obstacle problems, respectively, it follows from Theorem 3.4 that Hf j decreases to Hf q.e. in Ω as j → ∞.
Because Hf is continuous, and therefore locally bounded, Proposition 5.1 in Shanmugalingam [36] implies that Hf j → Hf locally uniformly in Ω as j → ∞.

Perron solutions and resolutivity
In addition to the standing assumptions described at the beginning of Section 4, we make the convention that the point at infinity, ∞, belongs to the boundary of Ω if Ω is unbounded. All topological notions should therefore be understood with respect to the Aleksandrov one-point compactification X * := X ∪ {∞}.
The topology consists of the open subsets of X together with all subsets of X * whose complement is a compact subset of X. Recall the topological definitions of lim sup and lim inf of a function. If E ⊂ X * with a limit point x 0 (which may be equal to ∞), and f : E → R, then lim sup The following theorem extends the comparison principle, which is fundamental for the nonlinear potential theory of superharmonic functions, and also plays an important role for the Perron method. A direct consequence is that the upper Perron solution is greater than or equal to the lower Perron solution.
Proof. Fix a real number ε > 0. For each x ∈ ∂Ω, it follows from (5.1) that Let Since Ω is compact (with respect to the topology of X * ), there exist integers k > 1/ε and N such that Ω ⊂ Ω k ∪ U x1 ∪ ··· ∪ U xN . It follows that v ≤ u + ε on ∂Ω k . Since v is upper semicontinuous (and does not take the value ∞), it follows that there is a decreasing sequence {ϕ j } ∞ j=1 ⊂ Lip(Ω k ) such that ϕ j → v on Ω k as j → ∞ (see, e.g., Proposition 1.12 in Björn-Björn [3]).
Moreover, since u+ε is lower semicontinuous, the compactness of ∂Ω k shows that there exists an integer M such that ϕ M ≤ u+ε on ∂Ω k , and, by (c) in Definition 4.4, also that H Ω k ϕ M ≤ u + ε in Ω k . Similarly, v ≤ H Ω k ϕ M , and hence v ≤ u + ε in Ω k .
We follow Heinonen-Kinnunen-Martio [19] in defining Perron solutions. Then the upper Perron solution of f is defined by Similarly, we let L f (Ω) be the set of all subharmonic functions v in Ω that are bounded above and such that lim sup and define the lower Perron solution of f by If P Ω f = P Ω f , then we let P Ω f := P Ω f . Moreover, if P Ω f is real-valued, then f is said to be resolutive (with respect to Ω). We often suppress the index and write P f instead of P Ω f .
The following properties of Perron solutions follow more or less directly from the definition or from Theorem 5.1.
3. If f and h are functions from ∂Ω to R with f ≤ h on ∂Ω, then the following are true: (c) P f ≤ P h and P f ≤ P h; (d) P f = lim k→∞ P min{f, k} and P f = lim k→∞ P max{f, −k}; (e) P f ≤ P h whenever f and h are resolutive.
We conclude this section with a result that shows that Perron solutions are indeed p-harmonic, and therefore reasonable candidates for solutions of the Dirichlet problem. A proof can be found in Björn-Björn [3]. Even though their proof is for bounded Ω, it is valid also for our case when Ω is allowed to be unbounded.
Theorem 5.4. If f is a function from ∂Ω to R and G is a component of Ω, then one of the following alternatives is true:

A smaller capacity
In addition to the standing assumptions described at the beginning of Section 4, we make the convention that if Ω is unbounded, then the point at infinity, ∞, belongs to the boundary of Ω ; see the introduction to Section 5.
When Björn-Björn-Shanmugalingam [10] extended the Perron method to the Mazurkiewicz boundary of bounded domains that are finitely connected at the boundary, they introduced a smaller capacity, C p ( · ; Ω), which they used to define C p ( · ; Ω)-quasicontinuous functions. Since it is smaller than the Sobolev capacity, it allows for perturbations on larger sets. This can be an opportunity for obtaining more general results. The resolutivity results in Björn-Björn-Shanmugalingam [8] can indeed be improved; see Section 9 in [10].
The point at infinity was not considered when defining quasicontinuity based on the new capacity in [10]. We use the same definition and therefore consider quasicontinuity on Ω ∩ X (i.e., with the point at infinity excluded). Definition 6.1. Let u be an extended real-valued function that is defined on Ω∩X. We say that u is C p ( · ; Ω)-quasicontinuous on Ω ∩ X if for every ε > 0 there exists a relatively open subset U of Ω ∩ X with C p (U ; Ω) < ε such that the restriction of u to Ω ∩ X \ U is continuous and real-valued.
Compare this definition to the usual definition of quasicontinuity.
Definition 6.2. The function u : X → R is quasicontinuous if for every ε > 0 there is an open set V ⊂ X such that C p (V ) < ε and the restriction u| X\V is continuous and real-valued.
Björn-Björn-Shanmugalingam [10] defined the C p ( · ; Ω)-capacity as follows. Definition 6.3. The C p ( · ; Ω)-capacity of a set E ⊂ Ω is the number where A E is the family of all functions u ∈ N 1,p (Ω) that satisfy both u(x) ≥ 1 for all x ∈ E ∩ Ω and lim inf Ω∋y→x u(y) ≥ 1 for all x ∈ E ∩ ∂Ω.
When a property holds for all points except for points in a set of C p ( · ; Ω)-capacity zero, it is said to hold C p ( · ; Ω)-quasieverywhere (or C p ( · ; Ω)-q.e. for short).
The capacity is hence extended from subsets of Ω to subsets of Ω. One may of course consider the capacity C p ( · ; Ω), but since the new capacity is smaller, we obtain more general results. However, if E ⊂ Ω, then condition (6.1) becomes empty and C p (E; Ω) = C p (E; Ω).
The following lemma is proved in Section 5 in Björn-Björn-Shanmugalingam [10]. The proof is valid also if Ω is unbounded. Note that the inequality can be strict; see the comment after Proposition A.2 in [10]. This shows that the new capacity is indeed smaller than the usual (Sobolev) capacity.
As a direct consequence of Lemma 6.4, it follows that quasicontinuous functions are also C p ( · ; Ω)-quasicontinuous, and we also have the following proposition. Proposition 6.5. Let f be an extended real-valued function that is defined on Proof. Extend f to X by letting f be equal to zero outside Ω so that f ∈ D p (X). Then f ∈ N 1,p loc (X) by Proposition 2.15, and hence Theorem 1.1 in Björn-Björn-Shanmugalingam [9] asserts that f is quasicontinuous in X.
Given ε > 0, there exists an open set V ⊂ X with C p (V ) < ε such that f | X\V is continuous. Let U = V ∩ Ω. Then U is a relatively open subset of Ω ∩ X and f | Ω∩X\U is continuous and real-valued. By Lemma 6.4, C p (U ; Ω) ≤ C p (V ) < ε.
The capacity C p ( · ; Ω) shares several properties with the usual Sobolev capacity C p , for example the following properties, of which the first three follow directly from the definition, and (d) is proved in Björn-Björn-Shanmugalingam [10]. Proposition 6.6. If E, E 1 , E 2 , ... are arbitrary subsets of Ω, then (a) C p (∅, Ω) = 0, We mentioned the fact that C p is an outer capacity. The same is true for C p ( · ; Ω). This was proved for the usual capacity in Björn-Björn-Shanmugalingam [9]. They later adapted the proof (see [10]) to show that this is true also for C p ( · ; Ω).
A slightly modified version of their proof is valid in our setting as well. Note that in Definition 6.3, the infimum may as well be taken over all functions u in Proof. Fix a real number ε such that 0 < ε < 1 and let u ∈ A ′ E with u N 1,p (Ω) ≤ C p (E; Ω) 1/p + ε.
By Theorem 1.1 in Björn-Björn-Shanmugalingam [9], u is quasicontinuous in Ω, and hence there exists an open set U ⊂ Ω such that C p (U ; Ω) 1/p < ε and u| Ω\U is continuous. There is therefore an open set V ⊂ Ω such that Choose a functionũ such thatũ ≥ χ U and ũ N 1,p (Ω) < ε, and let The point at infinity might belong to E ∩ ∂Ω. However, for each is a relatively open subset of Ω containing E and w ∈ A W . Proposition 6.6 (c) implies that C p (E; Ω) ≤ inf G C p (G; Ω) (the infimum is taken over all G ⊃ E which are relatively open in Ω), and hence Letting ε → 0 shows that we must have that C p (E; Ω) = inf G⊃E C p (G; Ω).
k=1 is a decreasing sequence of relatively open subsets of Ω with C p (U k ; Ω) < 2 −kp , then there exists a decreasing sequence of nonnegative functions {ψ j } ∞ j=1 in Ω such that ψ j N 1,p (Ω) < 2 −j and ψ j ≥ k − j in U k ∩ Ω.

p-parabolicity
In addition to the standing assumptions described at the beginning of Section 4, we make the convention that if Ω is unbounded, then the point at infinity, ∞, belongs to the boundary of Ω ; see the introduction to Section 5.
In the proof of Theorem 8.1 (the main result of this paper), we need Ω to be p-parabolic if it is unbounded.
If Ω is unbounded, then we say that Ω is p-parabolic if for every compact K ⊂ Ω, there exist u j ∈ N 1,p (Ω) such that u j ≥ 1 on K for all j = 1, 2, ... , and Ω g p uj dµ → 0 as j → ∞.
Otherwise, Ω is said to be p-hyperbolic.
Holopainen-Shanmugalingam [23] proposed a definition of p-harmonic Green functions (i.e., fundamental solutions of the p-Laplace operator) on metric spaces. The functions they defined did, however, not share all characteristics with Green functions, and therefore they gave them another name; they called them p-singular functions. The following theorem, which uses p-singular functions to characterize phyperbolic spaces (and thus also p-parabolic spaces), was proved (as Theorem 3.14) in [23]. To see this, assume that p ≥ n and let K ⊂ R n be compact. Choose a ball B, centered at the origin, and with radius R sufficiently large so that K ⊂ B. Let u j (x) = min 1, 1 − log |x/R| j + , j = 1, 2, ... .

(7.2)
Then {u j } ∞ j=1 is a sequence of admissible functions for (7.1), and where B j is the ball that is centered at the origin and with radius Re j . It follows that and hence R n g p uj dx → 0 as j → ∞.
The necessity follows from Theorem 7.3, which implies that R n is not p-parabolic if for every y ∈ X there exists a p-singular function with singularity at y. If p < n and y ∈ R n , then is a Green function with singularity at y which is p-harmonic in R n \ {y}.
A set can be p-parabolic if it does not "grow too much" towards infinity, even though the surrounding space is not p-parabolic.
Example 7.5. Let n ≥ 2 and assume that 1 < p < n. Let and q ≤ p − n + 1. (Note that q < 1 as p < n. Thus f increases less than linear functions towards ∞.) Let K ⊂ Ω f be compact. Choose a ball B in R n , centered at the origin, and with radius R sufficiently large so that K ⊂ B. The ball can be chosen large enough so that |x| ≥ R/2 ≥ 1 for all (x ′ ,x) ∈ Ω f \ B. This is possible since q < 1 and f (r) < Cr q . Define the sequence of admissible functions {u j } ∞ j=1 as in (7.2). Then p > 1, and q − p + n − 1 ≤ 0, it follows that Thus Ω f is p-parabolic (while R n is not p-parabolic since p < n in this case).

Resolutivity of Dirichlet functions
In addition to the standing assumptions described at the beginning of Section 4, we make the convention that if Ω is unbounded, then it is p-parabolic and the point at infinity, ∞, belongs to the boundary of Ω ; see the introduction to Section 5.
The following is our main result.
Theorem 8.1. Let f be an extended real-valued function that is defined on Ω. If f | Ω ∈ D p (Ω) and f is C p ( · ; Ω)-quasicontinuous on Ω ∩ X, then f is resolutive and P f = Hf .
Recall that the p-harmonic extension Hf is defined in Definition 4.2. However, P f ≡ f , since f is in fact p-harmonic (it is easy to verify that u = f is a solution of the p-Laplace equation (1.1)) and continuous on Ω, so that f ∈ U f (Ω) and f ∈ L f (Ω) and thus f ≤ P f ≤ P f ≤ f .
Proof of Theorem 8.1. We begin with the extra assumption that f is bounded from below, and without loss of generality we may as well assume that f ≥ 0. Now we start by showing that Hf is C p ( · ; Ω)-quasicontinuous on Ω ∩ X (when we consider Hf to be equal to f on ∂Ω). Proposition 6.5 asserts that Hf − f is C p ( · ; Ω)-quasicontinuous on Ω ∩ X as (Hf − f )| Ω ∈ D p 0 (Ω). It follows that this is true also for Hf , since the C p ( · ; Ω)-capacity is subadditive.
Because Hf is C p ( · ; Ω)-quasicontinuous on Ω ∩ X, we can find a decreasing sequence {U k } ∞ k=1 of relatively open subsets of Ω ∩ X with C p (U k ; Ω) < 2 −kp and such that the restriction of Hf to Ω ∩ X \ U k is continuous.
On the other hand, in the case when Ω is bounded, we let η j ≡ 0 in Ω, j = 1, 2, ... . Let h j = ξ j + η j . Since {η j } ∞ j=1 is decreasing and η j = 0 on K j , it follows that {η j } ∞ j=1 decreases to zero in Ω as j → ∞, and hence {h j } ∞ j=1 decreases to Hf q.e. in Ω. If Ω is bounded, then trivially g ηj L p (Ω) = 0. Otherwise, it follows by (8.1) and (8.2) that and hence {h j } ∞ j=1 ⊂ D p (Ω). Let ϕ j be the lsc-regularized solution of the K hj ,hj -obstacle problem, j = 1, 2, ... . Since (8.4) yields that g hj−Hf L p (Ω) ≤ g ψj L p (Ω) + g ηj L p (Ω) → 0 as j → ∞, and as Hf is a solution of the K Hf,Hf -obstacle problem, it follows from Theorem 3.4 that {ϕ j } ∞ j=1 decreases to Hf q.e. in Ω. This will be used later in the proof. Next we show that Fix a positive integer m and let ε = 1/m. By Lemma 4.3 and Lemma 6.8, Let x ∈ ∂Ω\{∞}. If x / ∈ U m+j , then because the restriction of Hf to (Ω∩X)\U m+j is continuous, there is a relative neighborhood V x ⊂ Ω ∩ X of x such that By combining (8.6) and (8.7), we see that On the other hand, if x ∈ U m+j , then we let V x = U m+j , and see that (8.8) holds also in this case due to (8.6). Because ϕ j ≥ h j q.e. in Ω and ϕ j is lsc-regularized, it follows that and hence lim inf Letting m → ∞ (and thus letting ε → 0) establishes that Finally, if Ω is unbounded, then ϕ j ≥ h j q.e. and h j ≥ η j everywhere in Ω. Since ϕ j is an lsc-regularized superminimizer, Proposition 7.4 in Kinnunen-Martio [26] asserts that ϕ j is superharmonic. As ϕ j is bounded from below and (8.5) holds, it follows that ϕ j ∈ U f (Ω), and hence we know that P f ≤ ϕ j , j = 1, 2, ... . Earlier in the proof, we showed that {ϕ j } ∞ j=1 decreases to Hf q.e. in Ω. We therefore conclude that P f ≤ Hf q.e. in Ω (provided that f is bounded from below). Now we remove the extra assumption of f being bounded from below, and let f k = max{f, −k}, k = 1, 2, ... . Then be an increasing sequence of open sets such that 15 implies that f ∈ L p (Ω j ), and hence µ(Ω ′ j ) = 0 for each Ω j , j = 1, 2, ... . It follows that and therefore χ {x∈Ω:f (x)<−k} → 0 a.e. in Ω as k → ∞. Since in Ω, implies that g f k −f → 0 a.e. in Ω as k → ∞, and because g f ∈ L p (Ω) and g f k −f ≤ g f k + g f ≤ 2g f a.e. in Ω, it follows by dominated convergence that g f k −f → 0 in L p (Ω) as k → ∞. Thus Proposition 4.5 asserts that Hf k → Hf in Ω as k → ∞.
Using Proposition 5.3 (d) and the fact that f k is bounded from below, we obtain P f = lim k→∞ P f k ≤ lim k→∞ Hf k = Hf q.e. in Ω.
As both P f and Hf are continuous, we conclude that P f ≤ Hf everywhere in Ω. By Proposition 5.3 (a) and (b), it follows that P f ≤ Hf = −H(−f ) ≤ −P (−f ) = P f ≤ P f in Ω, and hence Hf = P f = P f in Ω. Thus f is resolutive and P f = Hf .
The following two results are more or less direct consequences of Theorem 8.1.

Proof.
Extend h by zero to Ω and let E = {x ∈ Ω : h(x) = 0}. Then it follows from Proposition 6.7 that given ε > 0, we can find a relatively open subset U of Ω ∩ X with C p (U ; Ω) < ε and such that E ⊂ U , and hence h is C p ( · ; Ω)-quasicontinuous on Ω ∩ X. The subadditivity of the C p ( · ; Ω)-capacity implies that also f + h is C p ( · ; Ω)-quasicontinuous on Ω ∩ X.
Since f + h = f in Ω and f | Ω ∈ D p (Ω), we know that H(f + h) = Hf . We complete the proof by applying Theorem 8.1 to both f and f + h, which shows that f + h is resolutive and that P (f + h) = H(f + h) = Hf = P f. Corollary 8.4. Let f be an extended real-valued function that is defined on Ω, and let u be a bounded function that is p-harmonic in Ω. If f is C p ( · ; Ω)-quasicontinuous on Ω ∩ X, f | Ω ∈ D p (Ω), and there is a set E ⊂ ∂Ω with C p (E ∩ X; Ω) = 0 and such that lim Ω∋y→x u(y) = f (x) for all x ∈ ∂Ω \ E, then u = P f in Ω.
Proof. Since C p (E ∩ X; Ω) = 0, Theorem 8.3 applies to f and h := ∞χ E (and clearly also to f and −h), and because u ∈ U f −h (Ω) and u ∈ L f +h (Ω) (since u is bounded), it follows that We conclude that u = P f .

Resolutivity of continuous functions
In addition to the standing assumptions described at the beginning of Section 4, we make the convention that if Ω is unbounded, then it is p-parabolic and the point at infinity, ∞, belongs to the boundary of Ω ; see the introduction to Section 5.
Proof. We start by choosing a point x 0 ∈ ∂Ω. If Ω is unbounded, then we let x 0 = ∞. Let α := f (x 0 ) ∈ R and let j be a positive integer. Since f ∈ C(∂Ω), there exists a compact set K j ⊂ X such that |f (x) − α| < 1 3j for all x ∈ ∂Ω \ K j .
Let K ′ j = {x ∈ X : dist(x, K j ) ≤ 1}. We can find a function ϕ j ∈ Lip c (X) such that x ∈ X \ K ′ j . Since f j is Lipschitz on X and f j = α outside K ′ j , it follows that f j ∈ D p (X). Let x ∈ ∂Ω. Then |f j (x) − f (x)| ≤ 1/3j whenever x / ∈ K ′ j \ K j . Otherwise it follows that and thus we know that f − 1/j ≤ f j ≤ f + 1/j on ∂Ω. It follows directly from Definition 5.2 that P f − 1 j ≤ P f j ≤ P f + 1 j , and we also get corresponding inequalities for P f j , P (f j + h), and P (f j + h). Theorem 8.3 asserts that f j and f j + h are resolutive and that P (f j + h) = P f j . From this, it follows that P f − 1 j ≤ P f j = P f j ≤ P f + 1 j , (9.1) and by applying Proposition 5.3 (a) to (9.1), we get 0 ≤ P f − P f ≤ 2 j .
Letting j → ∞ shows that f is resolutive. Similarly, we can see that also f + h is resolutive. Finally, by combining the inequalities we obtain |P (f + h) − P f | < 2/j. Letting j → ∞ shows that P (f + h) = P f .
We conclude this paper with the following uniqueness result, corresponding to Corollary 8.4, that follows directly from Theorem 9.1. The proof is identical to the proof of Corollary 8.4, except for applying Theorem 9.1 (instead of Theorem 8.3).
Corollary 9.2. Let f ∈ C(∂Ω). If u is a bounded p-harmonic function in Ω and there is a set E ⊂ ∂Ω with C p (E ∩ X; Ω) = 0 such that lim Ω∋y→x u(y) = f (x) for all x ∈ ∂Ω \ E, then u = P f in Ω.