Sharp capacity estimates for annuli in weighted Rn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {R}^n$$\end{document} and in metric spaces

We obtain estimates for the nonlinear variational capacity of annuli in weighted Rn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {R}^n$$\end{document} and in metric spaces. We introduce four different (pointwise) exponent sets, show that they all play fundamental roles for capacity estimates, and also demonstrate that whether an end point of an exponent set is attained or not is important. As a consequence of our estimates we obtain, for instance, criteria for points to have zero (resp. positive) capacity. Our discussion holds in rather general metric spaces, including Carnot groups and many manifolds, but it is just as relevant on weighted Rn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {R}^n$$\end{document}. Indeed, to illustrate the sharpness of our estimates, we give several examples of radially weighted Rn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {R}^n$$\end{document}, which are based on quasiconformality of radial stretchings in Rn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {R}^n$$\end{document}.


Introduction
Our aim in this paper is to give sharp estimates for the variational p-capacity of annuli in metric spaces. Such estimates play an important role for instance in the study of singular solutions and Green functions for (quasi)linear equations in (weighted) Euclidean spaces and in more general settings, such as subelliptic equations associated with vector fields and on Heisenberg groups, see e.g. Serrin [37], Capogna et al. [15], and Danielli et al. [16] for discussion and applications. Recall that analysis and nonlinear potential theory (including capacities) have during the last two decades been developed on very general metric spaces, including compact Riemannian manifolds and their Gromov-Hausdorff limits, and Carnot-Carathéodory spaces.
Sharp capacity estimates depend in a crucial way on good bounds for the (relative) measures of balls. For instance, recall that for 0 < 2r ≤ R, the variational p-capacity cap p (B(x, r ), B(x, R)) of the annulus B(x, R)\B(x, r ) in (unweighted) R n is comparable to r n− p if p < n and to R n− p if p > n, see e.g. Example 2.12 in Heinonen et al. [24]. In both cases, r n and R n are comparable to the Lebesgue measure of one of the balls defining the annulus. For p = n, the p-capacity contains a logarithmic term of the ratio R/r . Thus, the dimension n (or rather the way in which the Lebesgue measure scales on balls with different radii) determines (together with p) the form of the estimates for the p-capacity of annuli.
If X = (X, d, μ) is a metric space equipped with a doubling measure μ (i.e. μ(2B) ≤ Cμ(B) for all balls B ⊂ X ), then an iteration of the doubling condition shows that there exist q > 0 and C > 0 such that for all x ∈ X and 0 < r < R. In addition, a converse estimate, with some exponent 0 < q ≤ q, holds under the assumption that X is connected (see Sect. 2 for details). Motivated by these observations, we introduce the following exponent sets for x ∈ X : Q 0 (x) := q > 0: there is C q so that μ(B(x, r )) μ(B(x, R)) ≤ C q r R q for 0 < r < R ≤ 1 , S 0 (x) := {q > 0: there is C q so that μ(B(x, r )) ≤ C q r q for 0 < r ≤ 1}, S 0 (x) := {q > 0: there is C q > 0 so that μ(B(x, r )) ≥ C q r q for 0 < r ≤ 1}, Here the subscript 0 refers to the fact that only small radii are considered; we shall later define similar exponent sets with large radii as well. In general, all of these sets can be different, as shown in Examples 3.2 and 3.4. The above exponent sets turn out to be of fundamental importance for distinguishing between the cases in which the sharp estimates for capacities are different, in a similar way as the dimension in R n does. Let us mention here that Garofalo and Marola [19] defined a pointwise dimension q(x) (called Q(x) therein) and established certain capacity estimates for the cases p < q(x), p = q(x) and p > q(x). In our terminology their q(x) = sup Q(x), where Q(x) is a global version of Q 0 (x), see Sect. 2. However, it turns out that the situation is in fact even more subtle than indicated in [19], since actually all of the above exponent sets are needed to obtain a complete picture of capacity estimates. Our purpose is to provide a unified approach which not only covers (and in many cases improves) all the previous capacity estimates in the literature, but also takes into account the cases that have been overlooked in the past. We also indicate via Propositions 9.1 and 9. 2 and numerous examples that our estimates are both natural and, in most cases, optimal. In addition, we hope that our work offers clarity and transparency also to the proofs of the previously known results.
The following are some of our main results. Here and later we often drop x from the notation of the exponent sets when the point is fixed, and moreover write e.g. B r = B(x, r ). For simplicity, we state the results here under the standard assumptions of doubling and a Poincaré inequality, but in fact less is needed, as explained below. Throughout the paper, we write a b if there is an implicit constant C > 0 such that a ≤ Cb, where C is independent of the essential parameters involved. We also write a b if b a, and a b if a b a. In particular, in Theorems 1.1 and 1.2 below the implicit constants are independent of r and R, but depend on R 0 . Theorem 1.1 Let 0 < R 0 < 1 4 diam X, 1 ≤ p < ∞, and assume that the measure μ is doubling and supports a p-Poincaré inequality.
Here and elsewhere int Q denotes the interior of a set Q. Already unweighted R n shows that r needs to be bounded away from R in order to have the upper bounds in (1.1) and (1.2) (hence 2r ≤ R above), and that the lower estimate in (1.1) [resp. (1.2)] does not hold in general when p ≥ sup Q 0 (resp. p ≤ inf Q 0 ), even if the borderline exponent is in the respective set. In these borderline cases p = max Q 0 and p = min Q 0 we instead obtain the following estimates involving logarithmic factors. Theorem 1.2 Let 0 < R 0 < 1 4 diam X , and assume that the measure μ is doubling and supports a p 0 -Poincaré inequality for some 1 ≤ p 0 < p.
(a) If p = max Q 0 and 0 < 2r ≤ R ≤ R 0 , then See also (7.1) and (7.2) for improvements of the upper estimates of Theorem 1.2. Actually, Theorem 1.2 (a) holds for all p ∈ Q 0 [resp. (b) for all p ∈ Q 0 ], but for p in the interior of the respective exponent sets Theorem 1.1 gives better estimates. Let us also mention that for p in between the Q-sets we obtain yet other estimates depending on how close p is to the corresponding Q-set, see Propositions 5.1 and 6.2. Also these estimates are sharp, as shown by Proposition 9.1.
We give related capacity estimates in terms of the S-sets as well. In particular, we obtain the following almost characterization of when points have zero capacity. Here C p (E) is the Sobolev capacity of E ⊂ X .

Proposition 1.3
Assume that X is complete and that μ is doubling and supports a p-Poincaré inequality. Let B x be a ball with C p (X \B) > 0.
In the remaining borderline case, when p = min S 0 / ∈ S 0 , we show that the capacity can be either zero or nonzero, depending on the situation, and thus the S-sets are not refined enough to give a complete characterization.
We also obtain similar results in terms of the S ∞ -sets, which can be used to determine if the space X is p-parabolic or p-hyperbolic; see Sect. 8 for details.
For most of our estimates it is actually enough to require that μ is both doubling and reverse-doubling at the point x, and that a Poincaré inequality holds for all balls centred at x. Moreover, Poincaré inequalities and reverse-doubling are only needed when proving the lower bounds for capacities. It is however worth pointing out that the examples showing the sharpness of our estimates are based on p-admissible weights on R n , and so, even though our results hold in very general metric spaces, it is essential to distinguish the cases and define the exponent sets, as we do, already in weighted R n . We construct our examples with the help of a general machinery concerning radial weights, explained in Sect. 10.
Let us now give a brief account on some of the earlier results in the literature. On unweighted R n , where Q 0 = S 0 = (0, n] and Q 0 = S 0 = [n, ∞), similar estimates (and precise calculations) are well known, see e.g. Example 2.11 in Heinonen et al. [24], which also contains an extensive treatise of potential theory on weighted R n , including integral estimates for A p -weighted capacities with p > 1 (Theorems 2.18 and 2.19 therein). Theorem 3.5.6 in Turesson [41] provides essentially our estimates for p = 1 and A 1 -weighted capacities in R n . Estimates for general weighted Riesz capacities in R n (including those equivalent to our capacities) were in somewhat different terms given in Adams [3,Theorem 6.1].
If the radii of the balls B r and B R are comparable, say R = 2r , then it is well known that the estimate cap p (B r , B 2r ) μ(B r )r − p holds (with implicit constants independent of x) in metric spaces satisfying the doubling condition and a p-Poincaré inequality, see e.g. [24, Lemma 2.14] for weighted R n and Björn [12,Lemma 3.3] or Björn and Björn [5,Proposition 6.16].
Garofalo and Marola [19, Theorems 3.2 and 3.3] obtained essentially part (a) of our Theorem 1.1 using an approach different from ours. For the case p = q(x) := sup Q(x) they also gave estimates which are similar to part (a) of Theorem 1.2. However, they implicitly require that q(x) ∈ Q(x) [i.e. q(x) = max Q(x)] in their proofs, and their estimates may actually fail if q(x) / ∈ Q(x), as shown by Example 9.4 (c) below; the same comment applies to their estimates in the case p > q(x) as well. There also seems to be a slight problem in the proof of their lower bounds, since the second displayed line at the beginning of the proof of Theorem 3.2 in [19] does not in general follow from the first line, as can be seen by considering e.g. u(x) = max{0, min{1, 1 + j (r − |x|)}} in R n and letting j → ∞. Instead, this estimate can be derived directly from a 1-Poincaré inequality (see Mäkäläinen [35]), which is a stronger assumption than the p-Poincaré inequality assumed in [19] (and in the present work). Also Adamowicz and Shanmugalingam [2] have given related estimates in metric spaces. They state their results in terms of the p-modulus of curve families, but it is known that the p-modulus coincides with the variational p-capacity, provided that X is complete and μ is doubling and supports a p-Poincaré inequality, see e.g. Heinonen and Koskela [26], Kallunki and Shanmugalingam [31] and Adamowicz et al. [1]. In the setting considered in [2] this equivalence is not known in general. While it is always true that the p-modulus is majorized by the variational p-capacity, the converse is only known under the assumption of a p-Poincaré inequality, which is not required for the upper bounds in [2] nor here. At the same time, the test functions in [2] are admissible also for cap p , showing that their estimates apply also to the variational p-capacity. For p ∈ int Q 0 , Theorem 3.1 in [2] provides an upper bound that can be seen to be weaker than (1.1). In the borderline case p = max Q 0 (when it is attained), the upper estimate (3.6) in [2] coincides with our (5.1). Under the assumption that the space X is Ahlfors Q-regular and supports a p-Poincaré inequality, they also prove lower bounds for capacities. For p > Q, the lower bound in [2,Theorem 4.3] coincides with the one in Theorem 1.1 (b), but for p ≤ Q the lower bound in [2,Theorem 4.9] is weaker than our estimates (1.1) and (1.3).
Neither [2] nor [19] contain any results similar to ours for p ∈ Q 0 , or in terms of q ∈ Q 0 for p / ∈ Q 0 , or involving the S-sets. As mentioned above, p-capacity and p-modulus estimates are closely related, and our estimates trivially give estimates for the p-modulus in all cases when they coincide, e.g. when X is complete and μ is doubling and supports a p-Poincaré inequality, see above. Moreover, our upper estimates are trivially upper bounds of the p-modulus in all cases. We do not know if our lower estimates of the capacity are also lower bounds for the p-modulus, but neither do we know of any example when the p-modulus is strictly smaller than the p-capacity.
Let us also mention that earlier capacity estimates in Carnot groups and Carnot-Carathéodory spaces can be found in Heinonen and Holopainen [23] and in Capogna et al. [15], respectively. In [15], the estimates are then applied to yield information on the behaviour of singular solutions of certain quasilinear equations near the singularity; see also Danielli et al. [16] for related results in more general settings. In addition, Holopainen and Koskela [29] provided a lower bound for the variational capacity in terms of the volume growth in Riemannian manifolds, as well as some related estimates in general metric spaces, which in turn are related to the parabolicity and hyperbolicity of the space. Capacities defined by nonlinear potentials on homogeneous groups were considered by Vodop yanov [43] and some estimates in terms of A p -weights were given in Proposition 2 therein.
The outline of the paper is as follows: In Sect. 2 we introduce some basic terminology and discuss the exponent sets under consideration in this paper, while in Sect. 3 we give some key examples demonstrating various possibilities for the exponent sets. These examples will later, in Sect. 9, be used to show sharpness of our estimates.
In Sect. 4 we introduce the necessary background for metric space analysis, such as capacities and Newtonian (Sobolev) spaces based on upper gradients. Towards the end of the section we obtain a few new results and also the basic estimate used to obtain all our lower capacity bounds (Lemma 4.9).
Sections 5, 6, 7 and 8 are all devoted to the various capacity estimates. In Sect. 5 we obtain upper bounds, which are easier to obtain than lower bounds and in particular require less assumptions on the space. Lower bounds related to the Q-sets are established in Sects. 6 and 7, the latter containing some more involved borderline cases, while in Sect. 8 we study (upper and lower) estimates in terms of the S-sets and in particular prove Proposition 1.3 and the parabolicity/hyperbolicity results mentioned above.
The sharpness of most of our estimates (but for some borderline cases) is demonstrated in Sect. 9. Here we extend our discussion of the examples introduced in Sect. 3 by using the capacity formula for radial weights on R n given in Proposition 10.8. This formula enables us to compute explicitly the capacities in the examples, and thus we can make comparisons with the bounds given by the more general estimates from Sects. 5, 6, 7 and 8. We also obtain stronger and more theoretical sharpness results in Propositions 9.1 and 9.2.
The final Sect. 10 is devoted to proving the capacity formula mentioned above, and along the way we obtain some new results on quasiconformality of radial stretchings and on padmissibility of radial weights.

Exponent sets
We assume throughout the paper that 1 ≤ p < ∞ and that X = (X, d, μ) is a metric space equipped with a metric d and a positive complete Borel measure μ such that 0 < μ(B) < ∞ for all balls B ⊂ X . We adopt the convention that balls are nonempty and open. The σ -algebra on which μ is defined is obtained by the completion of the Borel σ -algebra. It follows that X is separable.

Definition 2.1
We say that the measure μ is doubling at x, if there is a constant C > 0 such that whenever r > 0, we have Here B(x, r ) = {y ∈ X : d(x, y) < r }. If (2.1) holds with the same constant C > 0 for all x ∈ X , we say that μ is (globally) doubling.
The global doubling condition is often assumed in the metric space literature, but for our estimates it will be enough to assume that μ is doubling at x. Indeed, this will be a standing assumption for us from Sect. 5 onward.

Definition 2.2
We say that the measure μ is reverse-doubling at x, if there are constants γ, τ > 1 such that holds for all 0 < r ≤ diam X/2τ .
If X is connected (or uniformly perfect) and μ is globally doubling, then μ is also reversedoubling at every point, with uniform constants; see e.g. Corollary 3.8 in [5]. If μ is merely doubling at x, then the reverse-doubling at x does not follow automatically and has to be imposed separately whenever needed.
If both (2.1) and (2.2) hold, then an iteration of these conditions shows that there exist q, q > 0 and C, C > 0 such that whenever 0 < r ≤ R < 2 diam X . More precisely, the doubling inequality (2.1) leads to the first inequality, while the reverse-doubling (2.2) yields the second inequality of (2.3).
Recall also that the measure μ (and also the space X ) is said to be Ahlfors Q-regular if μ(B(x, r )) r Q for every x ∈ X and all 0 < r < 2 diam X . This in particular implies that (2.3) holds with q = q = Q.
The inequalities in (2.3) will be of fundamental importance to us. Note that in (2.3) one necessarily has q ≥ q and that there can be a gap between the exponents, as demonstrated by Example 3.2 below. Garofalo and Marola [19] introduced the pointwise dimension q(x) (called Q(x) therein) as the supremum of all q > 0 such that the second inequality in (2.3) holds for some C q > 0 and all 0 < r ≤ R < diam X . Furthermore, Adamowicz et al. [1] defined the pointwise dimension set Q(x) consisting of all q > 0 for which there are constants C q > 0 and R q > 0 such that the second inequality in (2.3) holds for all 0 < r ≤ R ≤ R q . It was shown in [1, Example 2.3] that it is possible to have Q(x) = (0, q) for some q, that is, the end point q need not be contained in the interval Q(x). Alternatively see Example 3.1 below.
For us it will be important to make even further distinctions. We consider the exponent sets Q 0 , S 0 , S 0 and Q 0 from the introduction. The pointwise dimension of Garofalo and Marola [19] is then q(x) = sup Q(x), where Q(x) is a global version of Q 0 (x) (see below for the precise definition), and the pointwise dimension set of [1] is Q(x) = Q 0 (x) (to see this, one should also appeal to Lemma 2.5). Recall that we often drop x from the notation, and write B r = B(x, r ).
If μ is doubling at x (resp. reverse-doubling at x), then Q 0 = ∅ (resp. Q 0 = ∅), by (2.3). The sets Q 0 and S 0 are then intervals of the form (0, q) or (0, q], whereas Q 0 and S 0 are intervals of the form (q, ∞) or [q, ∞). Whether the end point is or is not included in the respective intervals will be important in many situations.
We start our discussion of the exponent sets by three lemmas concerning their elementary properties. Note that Lemmas 2.3-2.5 and 2.8 hold for arbitrary measures, without assuming any type of doubling.

Lemma 2.3 It is true that
Moreover, S 0 ∩ S 0 contains at most one point, and when it is nonempty, Q 0 = S 0 and Q 0 = S 0 .
For the second part, let q ∈ S 0 ∩ S 0 . Then μ(B r ) r q and it follows that q ∈ Q 0 and q ∈ Q 0 . That Q 0 = S 0 and Q 0 = S 0 thus follows from the first part.
The following two lemmas show that the bound 1 on the radii in the definitions of the exponent sets can equivalently be replaced by any other fixed bound R 0 . They also provide formulas for the borderline exponents in the S-sets and estimates for the borderline exponents in the Q-sets. Examples 2.6 and 2.7 show that finding the exact end points of the Q-sets may be rather subtle.
Similarly, q ∈ S 0 if and only if there is a constant C > 0 such that Furthermore, let log μ(B r ) log r and q 1 = lim sup r →0 log μ(B r ) log r .
Proof For the first part, assume that q ∈ S 0 . We may assume that R 0 > 1. If 1 ≤ r < R 0 , then i.e. (2.4) holds with C := max{C q , μ(B R 0 )}. The converse implication is proved similarly. For the last part, after taking logarithms we see that q ∈ S 0 if and only if there is C q such that which is easily seen to be possible if q < q 0 , and impossible if q > q 0 . The proofs for S 0 are similar.
The corresponding statement for Q 0 is also true.
Assume furthermore that f (r ) := μ(B r ) is locally absolutely continuous on (0, ∞) and let Then The following example shows that the assumption that f is locally absolutely continuous in Lemma 2.5 is not redundant. Example 2.6 Let X be the usual Cantor ternary set, defined as a subset of [0, 1] and equipped with the normalized d-dimensional Hausdorff measure μ with d = log 2/log 3. Let x = 0. Then f (r ) = μ(B r ) will be the Cantor staircase function which is not absolutely continuous. (See Dovgoshey et al. [18] for the history of the Cantor staircase function.) At the same time, μ is Ahlfors d-regular and hence S 0 On the other hand if X = R n is equipped with a weight w and dμ = w dx, then f automatically is locally absolutely continuous. In particular, this is true if w is a p-admissible weight. We do not know if f is always locally absolutely continuous whenever μ is both globally doubling and supports a global Poincaré inequality.
Proof of Lemma 2. 5 We prove that q ∈ Q 0 implies (2.5). The proofs of the converse implication and for Q 0 are similar. We may assume that R 0 > 1. If 1 ≤ r < R ≤ R 0 , then Thus, (2.5) holds whenever R ≥ 1. For R ≤ 1 the claim follows directly from the assumption q ∈ Q 0 .
Next assume that f is locally absolutely continuous and let q ∈ (0, q). Then h(r ) = log f (r ) is also locally absolutely continuous and h (r ) = f (r )/ f (r ). By assumption there is R such that ρh (ρ) > q for a.e. 0 < ρ ≤ R. Since h is locally absolutely continuous, we By the first part, with R 0 = R, we get that q ∈ Q 0 . Hence (0, q) ⊂ Q 0 . The proof that (q, ∞) ⊂ Q 0 is analogous. The remaining inclusions follow from these inclusions together with the fact that Q 0 ∩ Q 0 contains at most one point (by Lemma 2.3).
The following example shows that q and q (from Lemma 2.5) need not be the end points of Q 0 and Q 0 .
where a k = 2 · 4 −k and n ≥ 1. Note that f is increasing and locally Lipschitz. For a.e.
x ∈ R n set where ω n−1 is the surface area of the (n − 1)-dimensional sphere in R n . With this choice of w we have and r a k on (4 −k , 4 · 4 −k ), we see that w 1 on R n , i.e. μ is comparable to the Lebesgue measure. In particular, μ is Ahlfors n-regular and supports a global 1-Poincaré inequality, Q 0 = (0, n] and Q 0 = [n, ∞). At the same time, considering r ∈ (4 −k , 2 · 4 −k ) and r ∈ (2 · 4 −k , 4 · 4 −k ), respectively, gives f (r ) = n − 1 and ess lim sup It is easy to construct a similar example with a continuous weight w.
If X is unbounded, we will consider the following exponent sets at ∞ for results in large balls and with respect to the whole space: Note that the inequality in S ∞ (x) is reversed from the one in S 0 (x), and similarly for S ∞ (x). This guarantees that rather than the other way round, and also that Q ∞ ⊂ S ∞ and Q ∞ ⊂ S ∞ . Lemmas 2.3, 2.4 and 2.5 above have direct counterparts for these exponent sets at ∞. In addition, Lemma 2.8 below shows that these sets are actually independent of the point x ∈ X , and thus the sets Q ∞ , S ∞ , S ∞ and Q ∞ are well defined objects for the whole space X , not merely a short-hand notation (with a fixed base point x ∈ X ) as in the case of Q 0 , S 0 , S 0 and Q 0 . Note, however, that in general for instance the set S ∞ is different from the set since the constant C q in the definition of S ∞ is allowed to depend on the point x. This can be seen e.g. by letting w(x) = log(2 + |x|), which is a 1-admissible weight on R n by Proposition 10.5 below. Recall that a weight w in R n is p-admissible, p ≥ 1, if the measure dμ = w dx is globally doubling and supports a global p-Poincaré inequality.

Lemma 2.8 Let X be unbounded and fix x ∈ X . Then, for every y
Proof Let y ∈ X . By (the ∞-versions of) Lemmas 2.4 and 2.5 it is enough to verify the definitions of the exponent sets for R > r ≥ 2d(x, y). In this case we have B(x, r/2) ⊂ B(y, r ) ⊂ B(x, 2r ) and similarly for B(y, R). Hence which shows that the inequalities in the definitions of the exponent sets at ∞ hold for y if and only if they hold for x.
Finally, when we want to be able to treat both large and small balls uniformly we need to use the sets If X is bounded, we simply set Q := Q 0 and Q := Q 0 .
Then it is easy to show that q ∈ Q 0 and q ∈ Q 0 if and only if there is a constant C such that Similarly, if X is unbounded, then k is a (q, q , C)-rough quasiisometry on (0, ∞) (resp. on R) for some C if and only if q ∈ Q ∞ and q ∈ Q ∞ (resp. q ∈ Q and q ∈ Q). Much of the current literature on rough quasiisometries call such maps quasiisometries, but we have chosen to follow the terminology of Bonk et al. [14] to avoid confusion with biLipschitz maps.

Examples of exponent sets
In this section we give various examples of the exponent sets. In particular, we shall see that the end points of the four exponent sets can all be different (Examples 3.2, 3.4) and that the borderline exponents may or may not belong to the sets (Examples 3.1, 3.3). See Svensson [40] for further examples with different types of exponent sets.
Our examples are based on radial weights in R n , and all the weights we consider are in fact 1-admissible, i.e. they are globally doubling and support a global 1-Poincaré inequality on R n . Later in Sect. 9 these weights will be used to demonstrate the sharpness of several of our capacity estimates. In Sect. 10 we give a general sufficient condition for 1-admissibility of radial weights.
Here p ≥ 1 and β ∈ R is arbitrary. Fix x = 0 and write B r = B(0, r ). Then it is easily verified that for r ≤ 1/e we have μ(B r ) r p log β (1/r ). Letting r → 0 in the definition of the exponent sets shows that In both cases sup Q = inf Q = p, but only one of these is attained (when β = 0). Letting instead Example 3. 2 We are now going to create an example of a 1-admissible weight in R 2 with showing that the four end points can all be different.
In R 2 we fix x = 0 and consider the measure dμ = w(|y|) dy, where Then 1 2 , and thus w is 1-admissible by Proposition 10.5. We next have that In particular, and thus and Since w(ρ) ≤ ρ for all ρ, we have that μ(B r ) r 3 for all r , which together with (3.5) shows that S 0 = (0, 3]. From the estimates (3.5) and (3.2) we obtain Indeed, when α k+1 ≤ r ≤ 2α k+1 this follows directly from (3.5), and for 2α k+1 ≤ r ≤ β k we use (3.2) to get a lower bound, while the upper bound follows from (3.2) together with (3.5). In particular, we get that Estimating similarly, using instead (3.3) and (3.4), shows that We conclude from the last two estimates and from (3.4) that S 0 = 10 3 , ∞ . Next, we see from (3.6) and (3.8) that It follows from (3.9) that this estimate holds also in the remaining cases when which together with (3.9) show that (The estimates for balls with radii larger than α 0 = 1 2 are easier.) The following example is a modification of Example 3.2. It shows that we can have sup S 0 = inf S 0 while S 0 = Q 0 and S 0 = Q 0 . In this case the common borderline exponent of the S-sets belongs to S 0 but not to S 0 , thus demonstrating the sharpness of Lemma 2.3.

Example 3.3
Consider R 2 and x = 0. Let α k and w be as in Example 3.2. Also let γ k = α k+1 log k and δ k = α k+1 log 2 k, k = 3, 4, . . ., so that α k+1 < γ k < δ k < α k , and let and dμ(y) = w 2 (|y|) dy. It follows from Proposition 10.5 that w 2 is 1-admissible, as It follows that As in Example 3.2 one can show that these are the extreme cases, and thus letting k → ∞ shows that S 0 = (3, ∞). Moreover, As this is the extreme case, we see that There is nothing special about the end points 2, 3, 10 3 and 4 (or the plane R 2 ) in Example 3.2. Indeed, in the following example we indicate how one can construct a 1-admissible weight w in R n , n ≥ 2, such that The reason for the condition a > 1 is that we want to obtain the 1-admissibility of w using Proposition 10.5, see Remark 10.6. and , k = 0, 1, 2, . . . .
Note that λ > 1 and thus α k → 0 as k → ∞. Also, α k+1 β k α k . Then the weight is continuous and 1-admissible on R n . Without going into details, one then argues similarly to Example 3.2 to show that (3.10) holds.

Background results on metric spaces
In this section we are going to introduce the necessary background on Sobolev spaces and capacities in metric spaces. Proofs of most of the results mentioned in the first half of this section can be found in the monographs Björn and Björn [5] and Heinonen et al. [27]. Towards the end of this section we obtain some new results. We begin with the notion of upper gradients as defined by Heinonen and Koskela [26] (who called them very weak gradients).
where we follow the convention that the left-hand side is ∞ whenever at least one of the terms therein is infinite. If g ≥ 0 is a measurable function on X and if (4.1) holds for p-almost every curve (see below), then g is a p-weak upper gradient of f .
A curve is a continuous mapping from an interval, and a rectifiable curve is a curve with finite length. We will only consider curves which are nonconstant, compact and rectifiable, and thus each curve can be parameterized by its arc length ds. A property is said to hold for p-almost every curve if it fails only for a curve family with zero p-modulus, i.e. there exists 0 ≤ ρ ∈ L p (X ) such that γ ρ ds = ∞ for every curve γ ∈ . Note that a p-weak upper gradient need not be a Borel function, it is only required to be measurable. On the other hand, every measurable function g can be modified on a set of measure zero to obtain a Borel function, from which it follows that γ g ds is defined (with a value in [0, ∞]) for p-almost every curve γ .
The p-weak upper gradients were introduced by Koskela and MacManus [34]. It was also shown there that if g ∈ L p (X ) is a p-weak upper gradient of f , then one can find a sequence {g j } ∞ j=1 of upper gradients of f such that g j → g in L p (X ). If f has an upper gradient in L p (X ), then it has a minimal p-weak upper gradient g f ∈ L p (X ) in the sense that for every p-weak upper gradient g ∈ L p (X ) of f we have g f ≤ g a.e., see Shanmugalingam [39] and Hajłasz [21]. The minimal p-weak upper gradient is well defined up to a set of measure zero in the cone of nonnegative functions in L p (X ). Following Shanmugalingam [38], we define a version of Sobolev spaces on the metric measure space X .

Definition 4.2 For a measurable function
where the infimum is taken over all upper gradients of f . The Newtonian space on X is , is a Banach space and a lattice, see Shanmugalingam [38]. In this paper we assume that functions in N 1, p (X ) are defined everywhere, not just up to an equivalence class in the corresponding function space. This is needed for the definition of upper gradients to make sense. For a measurable set E ⊂ X , the Newtonian space

Definition 4.3 The Sobolev p-capacity of an arbitrary set
where the infimum is taken over all u ∈ N 1, p (X ) such that u ≥ 1 on E.
The Sobolev capacity is countably subadditive. We say that a property holds quasieverywhere (q.e.) if the set of points for which it fails has Sobolev capacity zero. The Sobolev capacity is the correct gauge for distinguishing between two Newtonian functions. If u ∈ N 1, p (X ), then u ∼ v if and only if u = v q.e. Moreover, Corollary 3.3 in Shanmugalingam [38] shows that if u, v ∈ N 1, p (X ) and u = v a.e., then u = v q.e. This is the main reason why, unlike in the classical Euclidean setting, we do not need to require the functions admissible in the definition of capacity to be 1 in a neighbourhood of E. Theorem 4.5 in [38] shows that for open ⊂ R n , the quotient space N 1, p ( )/∼ coincides with the usual Sobolev space W 1, p ( ). For weighted R n , the corresponding results can be found in Björn and Björn [5,Appendix A.2]. It can also be shown that in this case C p is the usual Sobolev capacity in (weighted or unweighted) R n . Definition 4. 4 We say that X supports a p-Poincaré inequality at x if there exist constants C > 0 and λ ≥ 1 such that for all balls B = B(x, r ), all integrable functions f on X , and all upper gradients g of f , In the definition of Poincaré inequality we can equivalently assume that g is a p-weak upper gradient-see the comments above. It was shown by Keith and Zhong [32] that if X is complete and μ is globally doubling and supports a global p-Poincaré inequality with p > 1, then μ actually supports a global p 0 -Poincaré inequality for some p 0 < p. The completeness of X is needed for Keith-Zhong's result, as shown by Koskela [33]. In some of our estimates we will need such a better p 0 -Poincaré inequality at x, which (by Koskela's example) does not follow from the p-Poincaré inequality at x.
If X is complete and μ is globally doubling and supports a global p-Poincaré inequality, then the functions in N 1, p (X ) and those in N 1, p ( ), for open ⊂ X , are quasicontinuous, see Björn et al. [10]. This means that in the Euclidean setting N 1, p (R n ) and N 1, p ( ) are the refined Sobolev spaces as defined in Heinonen et al. [24, p. 96], see Björn and Björn [5, Appendix A.2] for a proof of this fact valid in weighted R n .
To be able to define the variational capacity we first need a Newtonian space with zero boundary values. We let, for an open set ⊂ X , where the infimum is taken over all u ∈ N 1, p Also the variational capacity is countably subadditive and coincides with the usual variational capacity in the case when ⊂ R n is open (see Björn and Björn [7, Theorem 5.1] for a proof valid in weighted R n ). We are next going to establish three new results concerning the variational capacity. Propositions 4.6 and 4.7 will only be used in Proposition 8.2 (and Example 9.4) to prove a condition for a point to have positive capacity, while Proposition 4.8 will only be used for proving Propositions 8.6 and 10.8 (and in Example 9.4), which deal with the variational capacity taken with respect to the whole space. These results may also be of independent interest.
It is well known that if X supports a global ( p, p)-Poincaré inequality (i.e. a Poincaré inequality with an L p norm instead of an L 1 norm in the left-hand side), then the variational and Sobolev capacities have the same zero sets (if is bounded and C p (X \ ) > 0). We will need the following generalization of this fact. Since we do not have the same tools available, our proof is different and more direct than those in the literature. Note also that we only require a p-Poincaré inequality (at x), not a ( p, p)-Poincaré inequality.

Proposition 4.6 Assume that X supports a p-Poincaré inequality at some x ∈ X , that is a bounded open set, and that E ⊂ . Then cap p (E, ) = 0 if and only if C p
The Poincaré assumption cannot be completely omitted, as is easily seen by considering a nonconnected example, or a bounded "bow-tie" as in Example 5.5 in Björn and Björn [6]. However, we actually do not need the full p-Poincaré inequality at x, since it is enough to have a p-Poincaré inequality for some large enough ball B (i.e. such that ⊂ B and C p (B\ ) > 0). This somewhat resembles the situation concerning Friedrichs' inequality (also called Poincaré inequality for N 1, p 0 ) and its role in the uniqueness of minimizers, see the discussion in Section 5 in [6]. For an easy example of a space which supports a Poincaré inequality for large balls but not for small balls, see Example 5.9 in [6].
In both cases this yields that cap p (E, ) ≤ g p u dμ = 0. Conversely, assume that cap p (E, ) = 0 and that C p (X \ ) > 0. We need to show that C p (E) = 0. Choose a ball B centred at x and containing such that C p (B\ ) > 0. By Lemma 2.24 in Björn and Björn [5], also C B p (B\ ) > 0, where C B p is the Sobolev capacity with respect to the ambient space B. Let 0 ≤ u ≤ 1 be admissible for cap p (E, ). Then In the former case we let v = (2u − 1)+ := max{2u − 1, 0}, while in the latter we let v = (1 − 2u)+. In both cases g v ≤ 2g u and μ(A) Hence, as 0 ≤ v ≤ 1 and g v ≤ 2g u , we have where the implicit constant in depends on B but is independent of u. Taking infimum over all admissible u shows that, depending on the choices of v, we have at least one of C B p (E) = 0 and C B p (B\ ) = 0, the latter being impossible by the choice of B. Thus C B p (E) = 0 and Lemma 2.24 in [5] completes the proof.
If X is complete and μ is globally doubling and supports a global p-Poincaré inequality, then it is known that the variational capacity is an outer capacity, i.e. if E is a compact subset of then see Björn et al. [10, p. 1199] and Theorem 6.19 in Björn and Björn [5]. We will need a version of this result for sets of zero capacity under our more general assumptions. For the Sobolev capacity such a result was obtained in [10], Proposition 1.4 (which can also be found as Proposition 5.27 in [5]), under the assumption that X is proper. (Recall that a metric space X is proper if all closed bounded subsets are compact. If μ is globally doubling, then X is proper if and only if X is complete.) A modification of that proof yields the following generalization, which only requires local compactness near E and at the same time also gives the conclusion for the variational capacity. This generalization was partly inspired by the discussion of the corresponding result in Heinonen et al. [27]. In combination with Proposition 4.6, Proposition 4.7 gives the outer capacity property for sets of zero variational capacity under very mild assumptions. We outline the main ideas of the proof, see the above references for more details.

Sketch of proof First assume that G is compact, and choose a bounded open set
where ρ is a lower semicontinuous upper gradient of χ E ∈ N 1, p (X ), which exists by the Vitali-Carathéodory property as C p (E) = 0. The function u(x) := min{1, inf γ γ (ρ + 1) ds}, with the infimum taken over all curves connecting x to X \V (including constant curves), has (ρ + 1)χ V as an upper gradient, and u = 1 in E. Lemma 3.3 in [10] shows that u is lower semicontinuous in G and hence everywhere, since u = 0 in X \V by construction. This also shows that u ∈ N 1, p 0 ( ). Using u as a test function for the level set U := {x : u(x) > 1 2 } shows that cap p (U, ) ε and C p (U ) ε, and proves the claim in this case.
If G is merely locally compact, we use separability to find a suitable countable cover of E, and then conclude the result using the countable subadditivity of the capacities.
A direct consequence of Proposition 4.7 is that the assumption that X is proper can be replaced by the assumption that is locally compact in Theorem 5.29 and Propositions 5.28 and 5.33 in Björn and Björn [5], see also Björn et al. [10] and Heinonen et al. [27].
We will also need the following result. B(x, r )).

Lemma 4.8 Let E ⊂ X be bounded and let x ∈ X. Then
Proof That cap p (E, X ) ≤ lim r →∞ cap p (E, B(x, r )) is trivial. To prove the converse, we may assume that cap p (E, X ) < ∞. Let ε > 0 and let u be admissible for cap p (E, X ) and such that X g p u dμ < cap p (E, X ) + ε. Then u n := uη n → u in N 1, p (X ), as n → ∞, where η n (y) = (1 − dist(y, B(x, n)))+. Hence, lim n→∞ cap p (E, B(x, 2n) Letting ε → 0 concludes the proof.
Our lower bound estimates for the capacities are all based on the following telescoping argument, which is well-known under the assumptions that μ is globally doubling and supports a global p-Poincaré inequality. However, it is enough to require the p-Poincaré inequality, as well as the doubling and reverse-doubling conditions, at x only. We therefore recall the short proof.

Lemma 4.9
Assume that μ is doubling and reverse-doubling at x and supports a p-Poincaré inequality at x. Let 0 < r < R ≤ diam X/2τ , where τ > 1 is the constant from the reversedoubling condition (2.2). Write r k = 2 k r and B k = B(x, r k ) for k ∈ Z, and let k 0 be such that r k 0 ≤ R < r k 0 +1 . Then for any u ∈ N 1, p where λ is the dilation constant in the p-Poincaré inequality at x.
Since μ is doubling and reverse-doubling at x, it is easy to verify that The doubling condition and p-Poincaré inequality at x, together with the fact that B k 0 +1 ⊂ B * and A ⊂ B * , then show that The claim follows, since the last integral is comparable to λB k 0 +1 g p u dμ. Remark 4.10 In the forthcoming sections we give several different capacity estimates involving the exponent sets Q and Q. In these results (and in Lemma 4.9 above), the implicit constants in , and will always be independent of r and R, but they may depend on x, X , μ, p and (the auxiliary exponent) q. The dependence on x, X and μ will only be through the constants in the doubling, reverse-doubling and Poincaré assumptions, as well as through the constants C q in the definitions of the Q-sets. In particular, if these conditions hold in all of X with uniform constants, then we obtain capacity estimates which are independent of x as well.
There are also corresponding estimates involving Q 0 , Q ∞ , Q 0 and Q ∞ , which are just easy reformulations with appropriate restrictions on the radii, viz. R ≤ R 0 for the Q 0 -and Q 0 -sets, and r ≥ R 0 for the Q ∞ -and Q ∞ -sets, where 0 < R 0 < ∞ is fixed, cf. Theorems 1.1 and 1.2. In these restricted estimates, as well as in the estimates in Sect. 8 involving the S-sets, the implicit constants in , and will in addition depend on R 0 . Observe also that, by e.g. Lemmas 2.4 and 2.5, the exponent sets are independent of R 0 , but the constants C q do depend on the range of radii.
For these restricted estimates one can also weaken the assumptions a little: The doubling and reverse-doubling conditions and the Poincaré inequality are only needed for balls with radii in the considered range, i.e. for r ≤ max{2, τ }R 0 or for r ≥ R 0 . Arguing as in Lemma 2.5, it is easily seen that in the case of the doubling condition (but not for reversedoubling and the Poincaré inequality) this is equivalent to assuming doubling for all r ≤ 1 or r ≥ 1, respectively. For the reverse-doubling and the Poincaré inequality, the range of radii for which they hold is however essential, as can be seen by e.g. letting X be the union of two disjoint closed balls in R n .
The factor 2 in the above bound max{2, τ }R 0 is only dictated by the dyadic balls in the proof of Lemma 4.9 and can equivalently be replaced by any σ > 1, upon correspondingly changing the choice of balls therein. Again, this will be reflected in the implicit constants.

Upper bounds for capacity
From now on we make the general assumption that μ is doubling at x. Recall also that 1 ≤ p < ∞.
The following simple upper bound for capacity is valid for any 1 ≤ p < ∞. Note that we do not need any Poincaré inequality (nor reverse-doubling) to obtain any of our upper bound estimates.
For p ∈ Q (resp. p ∈ Q), the first (resp. second) term in the minimum gives the sharper estimate, but for p in between the Q-sets the minimum can vary depending on the radii, as can be seen in Example 9.3. See Sect. 6 for corresponding lower estimates.
It is essential to bound r away from R in Proposition 5.1 since typically cap p (B r , B R ) → ∞ as r → R. This is apparent and well-known in unweighted R n (cf. Example 2.12 in Heinonen et al. [24]), but similar behaviour is present in more general metric spaces as well. (This restriction should thus be taken into account in the upper bounds in [15] and [19] as well.) Capacity of thin annuli (with R/2 < r < R) in the metric setting is studied in [9].
Proof Take Both of these are admissible for cap p (B r , B R ), and clearly (by doubling), The following logarithmic upper bounds are particularly useful in the borderline cases p = max Q and p = min Q. These estimates are valid also for p = 1, as well as for p ∈ int Q and p ∈ int Q, but in these cases Proposition 5.1 actually gives better upper bounds for cap p (B r , B R ). Note also that even for the borderline cases p = max Q and p = min Q, the estimates in Proposition 5.1 can be sharp, and better than those in Proposition 5.2 below, as shown at the end of Example 9.3.

Proposition 5.2 Let
Examples 9.4 (b) and 9.5 (b) show that these estimates are sharp.
Proof Choose u(y) = min 1, log(R/d(y, x)) log(R/r ) Then u is admissible for cap p (B r , B R ), and g is a p-weak upper gradient of u, by Theorem 2.16 in Björn and Björn [5]. Write r k = 2 k r and B k = B(x, r k ), and let k 0 ∈ Z be such that r k 0 ≤ R < r k 0 +1 . Then for all k ≥ 1. Since 0 < r ≤ R/2, we have k 0 + 1 log(R/r ), and so both claims follow from (5.3).

Lower bounds for capacity
The results in this section complement the upper bounds in Sect. 5, and for p in the interior of (one of) the Q-sets these together yield the sharp estimates announced in Theorem 1.1. For p in between the Q-sets, the lower and upper bounds do not meet, but we shall see in Proposition 6.2 that the lower bounds indicate the distance from p to the corresponding Q-set. Example 9.3 shows that in this case both the upper bounds in Proposition 5.1 and the lower bounds (6.6) and (6.7) in Proposition 6.2 are optimal. See also Proposition 9.1, which further demonstrates the sharpness of these estimates.
Also note that for the lower bounds without logarithmic terms we do not need the restriction 2r ≤ R, since the capacity of thin annuli is minorized by the capacity of thick annuli. In the borderline cases, where log(R/r ) plays a role, the restriction 2r ≤ R is still needed. As in Lemma 4.9, we however require that R ≤ diam X/2τ , where τ > 1 is the constant from the reverse-doubling condition (2.2). See Remark 4.10 for comments on how the choice of the involved parameters influences the implicit constants in , and .

Proposition 6.1 Assume that μ is reverse-doubling at x and supports a p-Poincaré inequality at x. Let
With this we can now prove Theorem 1.1, which also shows that the estimates in Proposition 6.1 are sharp.
Proof of Theorem 1.1 Combining Propositions 5.1 and 6.1 and appealing to Remark 4.10 yield (a) and (b). The last part follows from Proposition 9.1 below.
The comparison constants in (6.1) and (6.2) depend on p. In particular, the constants in our proof tend to zero as p sup Q in (a) and as p inf Q in (b). This is quite natural, since already unweighted R n shows that these estimates do not always hold when p = max Q and p = min Q, respectively. In fact, if X is Ahlfors p-regular, and thus Q = S 0 = S ∞ = (0, p] and Q = S 0 = S ∞ = [p, ∞), Proposition 8.1 (c) shows that (6.1) and (6.2) fail. Moreover, Proposition 9.1 shows that the estimates in Proposition 6.1 can never hold for all r and R when p is outside of the Q-sets.
Proof of Proposition 6.1 Let u be admissible for cap p (B r , B R ), and let B k be a chain of balls, with radii r k , as in Lemma 4.9. From Lemma 4.9 we obtain, for any 0 < q < ∞, that In (a) we choose q > p such that q ∈ Q, and so we have for all 1 ≤ k ≤ k 0 + 1 that . (6.4) Since 1 − q/ p < 0, the sum in the last line of (6.3) can thus be estimated as Taking infimum over all admissible u finishes the proof of part (a).
In (b) we instead choose q ∈ Q such that q < p, and so we have for all 1 ≤ k ≤ k 0 + 1 that r q k . (6.5) Now 1 − q/ p > 0, and thus the sum in the last line of (6.3) can be estimated as and the claim follows by taking infimum over all admissible u.
A modification of the above proof gives the following result, which is interesting mainly in the case when p is in between the Q-sets, i.e. p / ∈ Q ∪ Q.

Proposition 6.2 Assume that μ is reverse-doubling at x and supports a p-Poincaré inequal-
(a) If 0 < q < p and q ∈ Q, then Proposition 9.1 and Example 9.3 show that this result is sharp, while unweighted R n , with p = n, shows that we cannot allow for q = p in general. Also note that if q ∈ int Q (resp. q ∈ int Q) and 2r ≤ R, then (6.6) [resp. (6.7)] can be written as cap Proof Let u be admissible for cap p (B r , B R ), and let B k be the corresponding balls, with radii r k , from Lemma 4.9. In (a) we proceed as in (6.3) and use (6.4) to obtain since the exponent in the geometric series is 1−q/ p > 0. Taking infimum over all admissible u yields (6.6). In (b) we instead use (6.3) and (6.5) and that the geometric series is r 1−q/ p in this case.
For the borderline cases p = max Q or p = min Q, (6.6) or (6.7) can be used with q arbitrarily close to p, but the following proposition gives better estimates involving logarithmic terms. If X supports a p 0 -Poincaré inequality at x for some 1 ≤ p 0 < p, then even better estimates in the borderline cases are obtained in Proposition 7.1. Nevertheless, the estimates in Proposition 6.3 are of particular interest when p = 1, since the 1-Poincaré inequality is the best possible.

Proposition 6.3 Assume that μ is reverse-doubling at x and supports a p-Poincaré inequal-
In unweighted R it is well known that cap 1 (B r , B R ) = 2 for all 0 < r < R. In this case the right-hand sides in (6.8) and (6.9) both reduce to 2(log(R/r )) −1 , showing that these estimates are not optimal in this particular case.
Proof Let u be admissible for cap p (B r , B R ), and let B k be the corresponding balls, with radii r k , from Lemma 4.9. Then (6.3) with q = p and (6.4) yield Since 0 < 2r ≤ R, we have k 0 +1 k 0 log(R/r ), and taking infimum over all admissible u yields (6.8).

Capacity estimates for borderline exponents
When the borderline exponents are attained, Propositions 5.1 and 5.2 yield for p = max Q, In this section we provide corresponding lower bounds, even though the estimates do not exactly meet, as seen in Theorem 1.2. Nevertheless, Proposition 9.1 and Examples 9.3, 9.4 and 9.5 below show that all these estimates [including both possibilities for the upper bounds in (7.1) and in (7.2)] are in some sense optimal; see also Remark 9.6. The following result holds for all p ∈ Q (resp. p ∈ Q), but because of Proposition 6.1 it is most useful in the limiting case p = max Q (resp. p = min Q). It improves upon Proposition 6.3 at the cost of requiring a better Poincaré inequality; see the discussion on different Poincaré inequalities after Definition 4.4.

Proposition 7.1 Assume that μ is reverse-doubling at x and supports a p 0 -Poincaré inequality at x for some
Examples 9.4 and 9.5 show that these estimates are sharp, while Proposition 9.1 and Examples 9.3, 9.4 and 9.5 show that they do not hold for p outside of the Q-sets. In particular, these lower bounds do not in general hold for p = sup Q / ∈ Q and p = inf Q / ∈ Q, respectively.
Proof Let u be admissible for cap p (B r , B R ), and let B k be the corresponding balls, with radii r k , from Lemma 4.9. Also let A k = λB k \λB k−1 .
Without loss of generality we may assume that p 0 > 1. Lemma 4.9 (with exponent p 0 ) and Hölder's inequality for sums (with p 0 and p 0 /( p 0 − 1)) yield Interchanging the order of summation, the double sum in (7.5) can be estimated by Hölder's inequality for integrals [with exponents p/ p 0 and p/( p − p 0 )] as Let us now take q ∈ Q. [In (a) we can use q = p, but recall that also in (b) we have Q = ∅ by the reverse-doubling.] Then  (7.9) since 1 − p 0 / p > 0, and thus k 0 +1 k= j (r j /r k ) q(1− p 0 / p) 1. Insertion of (7.9) into (7.6) and a use of Hölder's inequality for sums [with exponents p/ p 0 and p/( p − p 0 )] yield Since 0 < 2r ≤ R, we have k 0 + 1 k 0 log(R/r ), and so we conclude from (7.5) and (7.10) that The desired capacity estimates (7.3) and (7.4) now follow from (7.11) by taking infimum over all u admissible for cap p (B r , B R ) and recalling that ρ = r in the case (a) and ρ = R in the case (b).
Proof of Theorem 1.2 Combining Propositions 7.1 and 5.2, and appealing to Remark 4.10 yield (a) and (b). The last part follows from Proposition 9.1 below.

Capacity estimates involving S-sets
Let us first record the following upper bounds related to the S-sets. As before, these upper estimates do not require any Poincaré inequalities. Recall from Sect. 2 that the inequalities defining the S ∞ -sets are reversed from the ones in the S 0 -sets, so that Q ∞ ⊂ S ∞ and Q ∞ ⊂ S ∞ .
In unweighted R n , the capacity cap p (B r , B R ) is comparable to the right-hand sides in the respective cases (with q = n), which shows that these estimates are sharp. See also the end of Example 9.3, where the sharpness of part (a) is shown in a case where q ∈ S 0 \Q 0 . The estimate (c) was already given by Heinonen [22], Lemma 7.18. (The statement therein is slightly different, but the proof applies verbatim to yield our estimate.) It follows immediately from (c) that for 1 < p ∈ S 0 the point x has zero capacity, but in fact the same is true even in the (possibly) larger set [1, ∞)\S 0 , as the following proposition shows. Similarly, it follows from (d) that if p ∈ S ∞ , then for a fixed r > 0 we have cap p (B r , B R ) → 0 as R → ∞, but again we obtain a better result in Proposition 8.6. Recall that by Lemma 2.4 (and its ∞-version).
Conversely, assume that μ is reverse-doubling at x and supports a p-Poincaré inequality at x, and that there is a locally compact neigbourhood G x. If p ∈ int S 0 , then C p ({x}) > 0 and cap p ({x}, B) > 0 for any ball B x with C p (X \B) > 0.
The first part of Proposition 8.2 improves and clarifies the result of Corollary 3.4 in Garofalo and Marola [19]. Note that this part is valid without requiring any Poincaré inequality. Unweighted R shows that the inequality in 1 < p ∈ S 0 is necessary. The second part, on the other hand, is a consequence of Proposition 4.6 and the lower bound in Proposition 8.3 below.
In the remaining case when p = min S 0 and p / ∈ S 0 , the S-sets are not enough to determine if the capacities of {x} are zero or not, as we demonstrate at the end of Example 9.4.

Proposition 8.3 Assume that μ is reverse-doubling at x and supports a p-Poincaré inequal-
ity at x, and fix 0 < R 0 < ∞. Furthermore, assume that 0 < q ∈ S 0 and 0 < r < R ≤ R 0 , or that q ∈ S ∞ and R 0 ≤ r < R < ∞. Then Also here unweighted R n shows that the first two estimates are sharp, and at the end of Example 9.3 their sharpness is shown in a case where q ∈ S 0 \Q 0 . Proposition 9.2 provides a converse of Proposition 8.3.
Proof Let u be admissible for cap p (B r , B R ), and let B k be the corresponding balls, with radii r k , from Lemma 4.9. Since μ(λB k ) ≥ μ(B k ) r q k for all k ∈ N, we have by Lemma 4.9 that The claim then follows by taking infimum over all admissible u.
Conversely, assume that p > q ∈ S 0 (x). By Proposition 8.3 we have for all 0 < r < R=: Remark 8.4 It follows directly from Proposition 8.3 that if we a priori know that the capacity is outer or that the capacity of singletons can be tested by only continuous functions, then actually cap p ({x}, B R ) R q− p whenever p > q ∈ S 0 . Both of the above assumptions hold e.g. if X is complete, μ is doubling and supporting a p-Poincaré inequality, by Theorem 6.19 in [5] or Kallunki and Shanmugalingam [31], see also Theorem 4.1 in Björn and Björn [7].
Let us also record the following logarithmic lower bound, which improves the third lower bound in Proposition 8.3 and is interesting in the borderline cases p = min S 0 and p = max S ∞ . Proposition 8.5 Let 1 < p < ∞ and assume that μ is reverse-doubling at x and supports a p 0 -Poincaré inequality at x for some 1 ≤ p 0 < p. Fix 0 < R 0 < ∞.
(a) If p ∈ S 0 and 0 < 2r ≤ R ≤ R 0 , then Proof We proceed as in the proof of Proposition 7.1, but instead of (7.8) we now have the simple estimate r p k /μ(B k ) 1 for all 1 ≤ k ≤ k 0 +1 [both in (a) and (b)]. Thus the left-hand side of (7.9) is bounded by a constant. Inserting this into (7.6) and then (7.5), together with a use of Hölder's inequality for sums as in (7.10), yields In unbounded spaces we have the following counterpart to Proposition 8.2. Recall that the sets S ∞ and S ∞ are independent of the reference point x ∈ X , by Lemma 2.8.

Proposition 8.6
Assume that X is unbounded. If 1 ≤ p / ∈ S ∞ or 1 < p ∈ S ∞ , then cap p (B r , X ) = 0 for all r > 0, and thus cap p (E, X ) = 0 for all bounded sets E.
Conversely, assume that μ is reverse-doubling at x and supports a p-Poincaré inequality at x. If p ∈ int S ∞ , then Unweighted R again shows that the inequality in 1 < p ∈ S ∞ is necessary. In the remaining case when p = max S ∞ and p / ∈ S ∞ , the S-sets are not enough to determine if the capacities are zero or not, see the end of Example 9.5.
Proof If p / ∈ S ∞ , then there exist R n → ∞ such that μ(B R n ) < R p n /n. By Proposition 5.1 we have and the claim follows from Lemma 4.8.

Remark 8.7
Recall that an unbounded proper space X is said to be p-parabolic, if cap p (K , X ) = 0 for all compact sets K ⊂ X , and otherwise X is p-hyperbolic. From Proposition 8.6 it thus follows that the space X is p-parabolic if 1 ≤ p / ∈ S ∞ (or 1 < p ∈ S ∞ ), and X is p-hyperbolic if p ∈ int S ∞ . See e.g. Holopainen [28], Holopainen and Koskela [29] and Holopainen and Shanmugalingam [30] for more information on parabolic and hyperbolic Riemannian manifolds and metric spaces.
Proof We need to estimate μ(B r )/μ(B R ) in terms of r/R for all 0 < r < R. It is enough to do this for 0 < 2r ≤ R, since R/2 < r < R can be treated by the doubling property of μ at x. If (6.1) or (6.2) holds, then Proposition 5.1 yields which is equivalent to p ∈ Q or p ∈ Q, respectively.
Next, if (6.6) holds for some q > 0, then using Proposition 5.1 we see that which after division by R q− p shows that q ∈ Q. Similarly, if (6.7) holds for some q > 0, then q ∈ Q. Finally, if (6.8) holds, and in particular if (7.3) holds, then Proposition 5.1 yields for all ε > 0 that where the last implicit constant depends on ε. Thus p − ε ∈ Q for every ε > 0, showing that p ≤ sup Q. The implications (7.4) ⇒ (6.9) ⇒ p ≥ inf Q are proved similarly.
We have a corresponding result for the S-sets as well.

Proposition 9.2
If for some q > 0 and all 0 < 2r ≤ R ≤ R 0 , Proof We prove only the case 0 < 2r ≤ R ≤ R 0 , the other case being similar.
If (9.1) holds and q ≤ p, then Proposition 5.1 implies that R q− p cap p (B r , B R ) R − p μ(B R ) for all R ≤ R 0 , showing that q ∈ S 0 . If instead q ≥ p and (9.1) holds, then we get r q− p cap p (B r , B R ) r − p μ(B r ) for all r ≤ R 0 /2, and the same conclusion follows.
In the rest of this section we continue our study of the examples from Sect. 3, using a general formula for the capacity on weighted R n with radial weights. The proof of this formula is postponed until Sect. 10, see Proposition 10.8.

Example 9.3
We continue with Example 3.2. First, for p > 2 and 2α k+1 ≤ 2r ≤ R ≤ β k , we estimate using Proposition 10.8 with f (ρ) w(ρ)ρ and (3.6) that showing that the second upper bound in Proposition 5.1 cannot be improved. With r = α k+1 and R = β k it also follows that since p > 2. This illustrates the fact (known from Proposition 9.1) that the lower estimates (6.1), (6.8) and (7.3) do not hold for p > 2, i.e. for p / ∈ Q. In addition, the equivalence in (9.4) shows that the lower bound in (6.6) is sharp (with q = 2 ∈ Q). Since log β k α k+1 we also conclude from (9.3) (with r = α k+1 and R = β k ) that the estimate (5.1) does not hold for p > 2, i.e. for p / ∈ Q. If 1 < p < 4 and 2β k ≤ 2r ≤ R ≤ α k , then by Proposition 10.8 with f (ρ) w(ρ)ρ and (3.8), showing that the first upper bound in Proposition 5.1 cannot be improved. In particular, (9.3) and (9.5) show that each of the upper bounds in Proposition 5.1 can give a sharp estimate for certain radii even when p / ∈ Q ∪ Q. With r = β k and R = α k it follows from (9.5) that since p < 4. Thus we here have a concrete case where the lower estimates (6.2), (6.9) and (7.4) do not hold for p < 4, i.e. for p / ∈ Q, and we also see that (6.7) is sharp as well (with q = 4 ∈ Q). Moreover, as we conclude from (9.5) (with r = β k and R = α k ) that the estimate (5.2) does not hold for 1 < p < 4, i.e. for p / ∈ Q. From (9.5) and (9.3) with p = 2 and p = 4, respectively, we see that which shows that the lower bounds in (7.3) and (7.4) are not always comparable to cap p (B r , B R ) when p = max Q or p = min Q, and that the estimates provided by Proposition 5.1 are in this case optimal (and better than those in Proposition 5.2). Finally, choosing R = β k and p > q = 10 3 = min S 0 in (9.3) [or r = β k and 1 < p < q = 10 3 = min S 0 in (9.5)] shows, together with (3.4), that the first two lower bounds in Proposition 8.3 are sharp. Similarly for p < q = 3 = max S 0 , we see from (3.5) and (9.5) with r = 1 2 α k and R = α k that the upper bounds in Proposition 8.1 (a) are sharp.
(a) If β < 0, then p = max Q and σ > 0. Thus (9.8) yields If instead σ > 0, i.e. if 0 < β < p − 1, then lim r →0 cap p (B r , B R ) = 0, by (9.6), from which it directly follows that cap p ({0}, B) = 0 for every ball B 0. Using that in R n , n ≥ 2, where p > 1 and β ∈ R is arbitrary, as in the second part of Example 3.1. This example is similar to the previous example, but the roles of r and R are in a sense reversed and thus we obtain different estimates. As in Example 9.4, we have sup Q = inf Q = p, but if β > 0 it is now sup Q that is attained, while for β < 0 we have that inf Q is attained. Since we have by Proposition 10.8 for e < r < R the estimate The simplification of (9.11) can be carried out analogously to the previous example, and we obtain for σ > 0 that This yields the following conclusions in the cases corresponding to (a) and (b) of Example 9.4: (a) If β < 0, then p = min Q and σ > 0. Thus (9.12) shows the sharpness of the lower estimate in Proposition 7.1 (b). It also shows that (7.3) fails in this case, despite the fact that p = sup Q.
(b) If 0 < β < p − 1, then p = max Q and σ > 0, and from (9.12) we can conclude that also the upper estimate in Proposition 5.2 (a) is sharp.
We also mention that the case σ < 0 can be studied just as in Example 9.4 (c), this time showing the sharpness of the lower bound in Proposition 7.1 (a), although this was already known from the case (a) of Example 9.4; see however Remark 9.6 below.
Finally, if β > 0, then S ∞ = Q = (0, p] and S ∞ = Q = ( p, ∞), and thus Proposition 8.6 is of no use. Considering the two cases σ > 0 and σ < 0 shows that indeed both possibilities cap p (B r , X ) = 0 and cap p (B r , X ) > 0 can happen in this case, cf. the end of Example 9.4. Remark 9.6 In Example 9.4 we have Q = Q 0 and Q = Q 0 , and thus the conclusions of this example also show the sharpness of the respective restricted capacity estimates, that is, the analogues of Proposition 5.2 (b) and Proposition 7.1 (a) and (b) for Q 0 and Q 0 and for radii 0 < 2r ≤ R ≤ R 0 . In particular, Theorem 1.2, with the exception of the upper bound in (1.3), is shown to be sharp.
Similarly, in Example 9.5 we have Q = Q ∞ and Q = Q ∞ , and so we obtain the sharpness of the analogues of Proposition 5.2 (a) and Proposition 7.1 (a) and (b) for Q ∞ and Q ∞ and for radii R 0 ≤ r ≤ R/2.
Nevertheless, these examples still leave open the sharpness of one of the upper bounds in each of the restricted versions of Proposition 5.2: We do not know if the upper estimate (5.1) is sharp for p ∈ Q 0 and 0 < 2r ≤ R ≤ R 0 , or if (5.2) is sharp for p ∈ Q ∞ and R 0 ≤ r ≤ R/2.

Radial weights and stretchings in R n
In this section we consider radial weights in R n , n ≥ 2, and give a sufficient condition for when they are admissible, and in particular satisfy the global doubling condition and a global Poincaré inequality, thus providing a basis for our examples in Sect. 9. This will be achieved by comparing such weights with suitable powers of Jacobians of quasiconformal mappings on R n . In particular, in Theorem 10.2 we characterize those radial stretchings in R n which are quasiconformal. The same condition was considered in R 2 by Astala et al. [ [42]. Both in [4] and [36], the result is obtained by differentiation and uses the analytic definition of quasiconformal mappings, based on the Jacobian determinant. Our assumptions are weaker and the method is different and based on more direct estimates of the linear dilation, rather than on the differentiable structure of R n . We use the following metric definition of quasiconformal mappings, provided by e.g. Theorem 34.1 in [42], and applicable also in metric spaces. We shall consider radial stretchings F : R n → R n given by where h(ρ) = k(ρ)/ρ, and k is a locally absolutely continuous homeomorphism of [0, ∞) satisfying k(0) = 0 and for a.e. ρ ∈ [0, ∞) and some 0 < m ≤ M < ∞. It is easily verified that the inverse mapping of F is given by where the inverse k −1 is (under our assumptions) also locally absolutely continuous, and by (10.2) we have for a.e. ρ ∈ [0, ∞) that where the implicit constants in are 1/M and 1/m. We are going to obtain the following characterization.
Theorem 10.2 Assume that the mapping F : R n → R n , n ≥ 2, is defined as in (10.1). Then F is quasiconformal if and only if (10.2) holds for a.e. ρ ∈ [0, ∞) and some 0 < m ≤ M < ∞.
The following lemma gives a basis for the sufficiency part of the theorem.

Lemma 10.3
If F : R n → R n is as in (10.1) and satisfies (10.2), then for all x, y ∈ R n , with |x| ≤ |y| and x = y, we have Proof For x = 0 this is easily checked using the definition of F, so assume for the rest of the proof that x = 0. The triangle inequality yields Note that h is also locally absolutely continuous and the assumption (10.2) gives for a.e. |x| ≤ ξ ≤ |y| that Hence Inserting this into (10.5) proves the second inequality in (10.4).
To prove the first inequality we use the inverse mapping F −1 (z) = k −1 (|z|)z/|z|. By (10.3), it satisfies (10.2) with m and M replaced by 1/M and 1/m. The first part of the proof applied to F −1 with z = F(x) and w = F(y) then yields Inserting this into the definition of H F (x) and letting r → 0 shows that F is quasiconformal.
Conversely, assume that F is quasiconformal. Since the linear dilation H F (x) is bounded, Theorem 32.1 in Väisälä [42] shows that F is differentiable a.e. It follows that k exists a.e. in (0, ∞). To prove (10.2), choose K > 0 such that H F < K in R n . Fix x ∈ R n with |x| = 1 and let ρ > 0 be arbitrary but such that k (ρ) exists. Then there exists 0 < r 0 < ρ such that L(ρx, r ) ≤ K l(ρx, r ) whenever 0 < r ≤ r 0 . For each such r find y ∈ R n such that |y| = 1 and |x − y| = r/ρ. Then |ρx − ρy| = r and On the other hand, and the quotient (k(ρ) − k(ρ − r ))/r can be treated similarly. Letting r → 0 shows that k (ρ) ≤ K k(ρ)/ρ. Applying the same argument to the quasiconformal mapping F −1 yields, with ζ = k(ρ), Now assume that F is as in Lemma 10.3. The Jacobian J F of F is the infinitesimal area distortion under F, and thus (10.6) implies that J F (x) h(|x|) n for a.e. x ∈ R n . Since Jacobians of quasiconformal mappings are strong A ∞ weights (by a result due to Gehring [20], cf. pp. 101-102 in David and Semmes [17] and Theorem 1.5 in Heinonen and Koskela [25]), Theorem 1 in Björn [11] shows that the weight is p-admissible when 1 ≤ p ≤ n. (For 1 < p ≤ n, one can instead use Theorem 15.33 in Heinonen et al. [24] or Corollary 1.10 in Heinonen and Koskela [25].) We thus have the following result. Now let w be a radial weight on R n , n ≥ 2, i.e. w(x) = w(|x|) where 0 ≤ w ∈ L 1 loc (0, ∞). Here we abuse the notation and use w both for the weight itself and for its one-dimensional representation on (0, ∞). With the help of Theorem 10.4 we obtain the following sufficient condition for admissibility of radial weights. Proposition 10.5 Assume that w : (0, ∞) → (0, ∞) is locally absolutely continuous and that for some γ 1 < n − 1, γ 2 < ∞ and a.e. ρ > 0 we have, Then the radial weight w(x) = w(|x|) is 1-admissible in R n , n ≥ 2. with α > 1 − n and β ∈ R, are 1-admissible in R n , n ≥ 2. We expect these weights to be 1-admissible (and even A 1 ) for −n < α ≤ 1 − n as well, but the A 1 condition needs to be checked in this case. This is well known for β = 0, see Heinonen et al. [24, p. 10], thus showing that the above condition for admissibility is not sharp. Note also that for n = 1 a weight is p-admissible if and only if it is an A p weight, by Theorem 2 in Björn et al. [13], and that the above "Jacobian" technique does not apply in this case.
We end this section by calculating the variational capacity of annuli with respect to radial weights in R n . Proposition 10.8 Let w(x) = w(|x|) be a radial weight on R n , n ≥ 2, such that w > 0 a.e. and w ∈ L 1 loc (R n ). Assume that the corresponding measure dμ = w d x supports a p-Poincaré inequality at 0, where p > 1. Let f (r ) = μ(B r ), where B r = B(0, r ) ⊂ R n . Then In Sect. 9 we applied this formula to various weights including weights of logarithmic type. In Theorems 2.18 and 2.19 in Heinonen et al. [24], an integral estimate was obtained for nonradial weights satisfying the A p condition. See also Theorem 3.1 in Holopainen and Koskela [29], where capacity of annuli in Riemannian manifolds is estimated in a similar way.
Remark 10.9 For Proposition 10.8, we actually do not need the full p-Poincaré inequality at 0; it is enough to have it for some ball B ⊃ B R with μ(B\B R ) > 0. The Poincaré inequality is only used when proving Lemma 10.10, which in turn is used to show that the minimizer u for cap p (B r , B R ) is absolutely continuous on rays and that g u = |u |.
These consequences are not always true if the Poincaré assumption is omitted. Indeed, if e.g.
where {q j } ∞ j=1 is an enumeration of the positive rational numbers, then is for everyr ∈ (r, R) an upper gradient of u := χ Br , since γ g ds = ∞ for every curve γ crossing over ∂ Br . Thus u ∈ N 1, p 0 (B R , w dx) and Corollary 2.21 in Björn and Björn [5] implies that g u = 0 a.e. in B R . It follows that the minimizer is not unique (and may also be nonradial) and cap p (B r , B R ) = 0 in this case. Moreover, g ∈ N 1, p (B R , w dx) (with itself as an upper gradient), but g / ∈ L 1 loc (R n , dx), so g need not be defined (e.g. in the distributional sense). Cf. also the discussion after Proposition 4.6 and the discussion about gradients on p. 13 in Heinonen et al. [24].
On the other hand, if w is p-admissible, then Theorem 8.6 in [24] directly shows that cap p (B r , B R ) = B R \B r |∇u| p w dx, where u is the solution of div(w(x)|∇u(x)| p−2 ∇u(x)) = 0 in B R \B r with the boundary data 1 on ∂ B r and 0 on ∂ B R , and only the second half of the proof below is needed in this case, cf. Example 2.22 in [24]. More general weights require more care and are treated using the metric space theory.
Proof of Proposition 10.8 By Lemma 4.8 we may assume that R < ∞. where ω n−1 is the surface area of the (n − 1)-dimensional unit sphere in R n . To calculate cap p (B r , B R ) we need to minimize B R \B r g p u w dx among functions u with u = 1 on B r and u = 0 on ∂ B R . We shall also see below that under our assumptions, g u = |u | a.e.
Since the data are bounded, no Poincaré inequality nor doubling property is needed for the existence of a minimizer (i.e. a competing function having p-energy equal to cap p (B r , B R )), by e.g. Theorem 5.13 in Björn and Björn [6]. Without such assumptions the minimizer need not be unique and there may exist a nonradial minimizer, but there always exists at least one radial minimizer. Indeed, if v is a minimizer, then Letting u(x) = v(|x|θ 0 ) and g(x) = g v (|x|θ 0 ) it is easily verified that g is a p-weak upper gradient of u and that, by (10.9), Thus u is a radial minimizer. As usual, we write u(x) = u(|x|), where u : [0, ∞) → R. We may clearly assume that u is decreasing, and so u (ρ) exists for a.e. ρ. By Proposition 3.1 in Shanmugalingam [38] (or Theorem 1.56 in [5]), u is absolutely continuous on all curves, except for a curve family with zero p-modulus (with respect to the measure μ). Lemma 10.10 below shows that the family of all radial rays connecting B r to R n \B R has positive p-modulus. By symmetry, it then follows that u is absolutely continuous on the interval [r, R] and hence, by Lemma 2.14 in [5], g u = |u | a.e.
Thus, Proof Assume on the contrary that the p-modulus of r,R is zero. Then there exists g ∈ L p (B R \B r , μ) such that for every radial ray γ connecting r θ to Rθ , where θ ∈ S n−1 , we have γ g ds = R r g(ρθ ) dρ = ∞.
Since R rg dt = ∞, we can by successively halving intervals find a decreasing sequence of intervals [a j , b j ] such that b j a jg dt = ∞ and b j − a j → 0, as j → ∞. Lettingr = lim j→∞ a j we see that either r r −εg dt = ∞ for all ε > 0, or r +ε rg dt = ∞ for all ε > 0 (or both). Let in the former case E = Br and in the latter case E = Br .
If γ : [0, l γ ] → R n is any (possibly nonradial) curve connecting E to R n \E, then using the symmetry ofg it is easily verified that Thusg is an upper gradient of u n = nχ E for every n = 1, 2, . . . . Since u n ∈ N 1, p (B 2R , μ), applying the p-Poincaré inequality at 0 to u n gives Letting n → ∞ leads to a contradiction, showing that r,R has positive p-modulus.