The main lines of the proof follow the proof of [1]} where a similar characterization is obtained for the validity of the \(p\) -Hardy inequality, that is the case \(p=q\)  and \(\beta =0\) .
First assume that \((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) holds in \(\Omega \) , with a constant \(C>0\) .
Let \(E\Subset \Omega \) ,
and let \(u\in N_c^{1,p}(\Omega )\)  be such that \(u(x)\ge 1\) , for every \(x\in E\) .
Then
\(\begin{split}\int _E\frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)&\le \int _\Omega \frac{|u(x)|^q}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}\,d\mu (x)\\&\le C^q\biggl (\int _\Omega g(x)^p \,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p},\end{split}\) 
where \(g\in \mathcal {D}^p(u)\) .
By taking infimum over all \(g\in \mathcal {D}^p(u)\) , and then over all functions \(u\)  as above,
we obtain (REF ) with \(C_1=C^q\) .
Then assume that inequality (REF ) holds with a constant \(C_1\)  for all sets
\(E\Subset \Omega \) . Let \(u\in N_c^{1,p}(\Omega )\)  and
\(g\in \mathcal {D}^p(u)\) .
For \(j\in \mathbb {Z}\) , define
\(E_j=\lbrace x\in \Omega : |u(x)|>2^j\rbrace .\) 
Since \(E_j\Subset \Omega \)  for every \(j\in \mathbb {Z}\) ,
by (REF ) we have
\(&\int _\Omega \frac{|u(x)|^q}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}\,d\mu (x)\\&\qquad \le \sum _{j=-\infty }^\infty 2^{(j+2)q}\int _{E_{j+1}\setminus E_{j+2}}\frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)\\&\qquad \le \sum _{j=-\infty }^\infty 2^{(j+2)q}\int _{E_{j+1}}\frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)\\&\qquad \le 4^q C_1\sum _{j=-\infty }^\infty 2^{jq}\operatorname{cap}_{p,\beta }(E_{j+1},\Omega )^\frac{q}{p}.\) 

For every \(j\in \mathbb {Z}\) , define \(u_j\colon X\rightarrow [0,1]\)  by
\(u_j(x)={\left\lbrace \begin{array}{ll}1, & \textrm {if }|u(x)|\ge 2^{j+1},\\2^{-j}|u(x)|-1, & \textrm {if } 2^{j}<|u(x)|<2^{j+1},\\0,&\textrm {if }|u(x)|\le 2^{j}.\end{array}\right.}\) 
Then \(u_j\in N_c^{1,p}(\Omega )\)  and \(u_j=1\)  in \(E_{j+1}\) . From the gluing lemma [2]} we obtain that
\(g_{j}=2^{-j}g{\mbox{\Large $\chi $}}\)\(\scriptstyle E_j\setminus E_{j+1}\) Dp(uj)\(.Using \) uj\( as a test function for the weighted capacity \) capp,(Ej+1,)\(, we obtain{\begin{@align*}{1}{-1}\operatorname{cap}_{p,\beta }(E_{j+1},\Omega )&\le \int _{\Omega } g_{j}(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\\&= \int _{E_{j}\setminus E_{j+1}} g_{j}(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\le 2^{-jp}\int _{E_{j}\setminus E_{j+1}} g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x).\end{@align*}}Since \) q/p1\(, it follows that{\begin{@align*}{1}{-1}\sum _{j=-\infty }^\infty 2^{jq}\operatorname{cap}_{p,\beta }(E_{j+1},\Omega )^\frac{q}{p}&\le \sum _{j=-\infty }^\infty \biggl (\int _{E_{j}\setminus E_{j+1}} g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}\\&\le \Bigg (\sum _{j=-\infty }^\infty \int _{E_{j}\setminus E_{j+1}} g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\Biggr )^\frac{q}{p}\\&=\biggl (\int _\Omega g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}.\end{@align*}}This shows that the \) (q,p,)\(-Hardy--Sobolev inequality holds with the constant \) C=4C11/q\( for every function\) uNc1,p()\( and for every \) gDp(u)\(.\)
Let \(B=B(x,r)\in \mathcal {W}_c(\Omega )\) , \(0<c<1/3\) , be a Whitney ball defined as above and set \(B^*=LB\)  with \(L=1/(3c)\) .
In this case \(B^*\Subset \Omega \)  and we can take the Lipschitz function
\(\varphi (x)=\max \left\lbrace 0,1-\frac{d(x,B)}{d(B,X\setminus B^*)}\right\rbrace , \qquad x\in X,\) 
as a test function for the capacity \(\operatorname{cap}_{p,\beta }(B,\Omega )\) . Then, by the properties of Whitney balls,
see Lemma REF , and by the doubling condition for measure \(\mu \) , it follows that
there exists a constant \(C\) , depending on the parameter \(c\) 
and the doubling constant \(C_\mu \) , such that
\(\operatorname{cap}_{p,\beta }(B,\Omega )\le C\mu (B)r^{\beta -p},\) 
for every ball \(B=B(x,r)\in \mathcal {W}_c(\Omega )\) .
By the following lemma, if a \((q,p,\beta )\) -Hardy–Sobolev inequality holds in \(\Omega \) , then the corresponding lower bound for the capacity is valid as well, and, therefore, the value of \(\operatorname{cap}_{p,\beta }(B,\Omega )\)  is comparable to \(\mu (B)r^{\beta -p}\) 
for every ball \(B=B(x,r)\in \mathcal {W}_c(\Omega )\) .
Lemma 3.2 
Let \(1\le p, q<\infty \)  and \(\beta \in \mathbb {R}\) , and assume that a \((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) holds in an open set \(\Omega \subsetneq X\) . Then
there exists a constant \(C>0\)  such that
\(\operatorname{cap}_{p,\beta }(B,\Omega ) \ge C \mu (B)r^{\beta -p}\) 
for every ball \(B=B(x,r) \in \mathcal {W}_c(\Omega )\) .

By applying the estimate in (REF ) (which holds also if \(q<p\) )
and the property REF  of Whitney balls, we have
\(\operatorname{cap}_{p,\beta }(B,\Omega )^{\frac{q}{p}}&\ge C\int _B \frac{\mu (B(y,d(y,\Omega ^c)))^\frac{q-p}{p}}{d(y,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (y)\\&\ge C \int _B \mu (B)^\frac{q-p}{p}r^{\frac{q}{p}(\beta -p)}\,d\mu (y)=C\big (\mu (B)r^{\beta -p}\big )^\frac{q}{p}.\) 

The claim follows by raising this to power \(p/q>0\) .

Local maximal functions and discrete convolutions
Let \(\Omega \subsetneq X\)  be an open set and let \(0<\kappa <1\) .
For a measurable function \(f\)  on \(\Omega \) , define the local maximal function
\({{\mathcal {M}}}_{\Omega ,\kappa }f(x) =\sup _{0<r<\kappa d(x,\Omega ^c)} \mathop {\mathchoice{\displaystyle }{\hspace{0.0pt}}{0}{.}22\hrule width 0.6}\hspace{0.0pt}\) 
B(x,r) f d,      x.
\(For convenience, we set \) 
M,f(x)=0\( if \) xX\(.Recall that the usual (centered)Hardy--Littlewood maximal operator \) M\( is defined for all \) xX\(by using the integral averages as in the definition of\) M,\( but omitting the upper bound \) r<d(x,c)\(for the radii. Hence\) M,f(x)Mf(x)\(whenever \) f\( is measurable on \) X\( and \) xX\(.\)
It is well known that \({\mathcal {M}}\)  is bounded on \(L^s(X,d\mu )\)  for all \(1<s<\infty \) ;
see, for instance, [2]}.
The next lemma gives a similar boundedness
result for the local maximal operator \({{\mathcal {M}}}_{\Omega ,\kappa }\) 
on the weighted space \(L^s(\Omega ;w_\beta \,d\mu )\) ,
when \(1<s<\infty \) , \(0<\kappa <1/5\) 
and \(w_\beta (x)=d(x,\Omega ^c)^\beta \) 
is a distance weight, for \(\beta \in \mathbb {R}\)  and \(x\in \Omega \) .
Lemma 4.1 
Let \(0<\kappa <1/5\)  and \(1<s<\infty \) , and let \(\Omega \subsetneq X\)  be an open set.
Let \(\beta \in \mathbb {R}\)  and define \(w_\beta (x)=d(x,\Omega ^c)^\beta \) , for \(x\in \Omega \) .
Then \({{\mathcal {M}}}_{\Omega ,\kappa }\)  is
bounded on \(L^s(\Omega ;w_\beta \,d\mu )\) , that is, there is a constant
\(C\)  such that
\(\int _{\Omega } \bigl ({{\mathcal {M}}}_{\Omega ,\kappa } f\bigr )^{s} w_\beta \,d\mu \le C\int _{\Omega } \vert f\vert ^s w_\beta \,d\mu ,\) 
for every \(f\in L^s(\Omega ;w_\beta \,d\mu )\) .

Let \({\mathcal {W}}_c(\Omega )=\lbrace  B_i:i\in \mathbb {N}\rbrace \) 
be a Whitney cover of \(\Omega \) , with \(c=1/9\) ,
and take \(L=3\) .
Suppose \(x\in B_i=B(x_i,r_i)\) . If \(y\in B(x,\kappa d(x,\Omega ^c))\) , then
\(d(y,x_i)\le r_i+\kappa d(x,\Omega ^c) < r_i+\tfrac{1}{5}(r_i+9r_i)=3r_i,\) 
which implies that
\(B(x,\kappa d(x,\Omega ^c))\subset B(x_i,3r_i)= B_i^*.\) 
Hence, by the definition of the local maximal function, for every \(x\in B_i\) ,

\({{\mathcal {M}}}_{\Omega ,\kappa }(f)(x)={{\mathcal {M}}}_{\Omega ,\kappa }(f{\mbox{\Large $\chi $}}\) 
\(\scriptstyle B_i^*\) )(x)
M(f\(\chi \)\(\scriptstyle B_i^*\) )(x).
\(This observation, together with the properties of Whitney ballsand the boundedness of \) 
M\( on \) Ls(X,d)\(, gives{\begin{@align*}{1}{-1}&\int _\Omega ({{\mathcal {M}}}_{\Omega ,\kappa } f(x))^s w_\beta (x) d\mu (x)\le \sum _i \int _{B_i} ({{\mathcal {M}}}_{\Omega ,\kappa } f(x))^s d(x,\Omega ^c)^\beta d\mu (x)\\&\qquad \le C\sum _i r_i^\beta \int _{B_i} ({{\mathcal {M}}}(f{\mbox{\Large $\chi $}}\end{@align*}_{\scriptstyle B_i^*}})(x))^s d\mu (x)\le C\sum _i r_i^\beta \int _X |f(x)|^s{\mbox{\Large $\chi $}}\)\(\scriptstyle B_i^*\) (x) d(x)
      Ci Bi* |f(x)|s d(x,c)d(x)
C|f(x)|s w(x) d(x).

This proves the claim.
Let \(0<t<1\)  be a scaling parameter and let \({\mathcal {W}}_c(\Omega )=\lbrace  B_i:i\in \mathbb {N}\rbrace \)  be a Whitney cover
of an open set \(\Omega \subsetneq X\)  with \(c=t/18\) . There is a sequence of Lipschitz functions \(\lbrace \varphi _i\rbrace _{i\in \mathbb {N}}\) 
corresponding to the cover \({\mathcal {W}}_c(\Omega )\)  such that \(\varphi _i\)  satisfies the following properties
for every \(i\in \mathbb {N}\) : \(0\le \varphi _i\le 1\) , \(\varphi _i=0\)  outside of the balls \(6B_i\) , \(\varphi _i\ge \nu >0\)  on \(3B_i\) ,
and \(\varphi _i\)  is Lipschitz with constant \(K/r_i\) , where \(\nu \)  and \(K\) 
only depend on the doubling constant of the measure \(\mu \) . Moreover,
\(\sum _{i=1}^{\infty }\varphi _i(x)=1\) 
for every \(x\in \Omega \) .
Then the discrete convolution of a locally integrable function \(u\)  at the scale \(t\)  is
\(u_t(x)=\sum _{i=1}^{\infty }\varphi _i(x)u_{3B_i}, \qquad x\in X.\) 
Notice that \(u_t(x)\le C {\mathcal {M}}u(x)\) , for every \(x\in X\) ,
where \({\mathcal {M}}\)  is the standard Hardy–Littlewood maximal operator on \(X\) .
Hence, the boundedness of \({\mathcal {M}}\) 
implies that if \(1<s<\infty \)  and \(u\in L^s(X,d\mu )\) , then \(u_t\in L^s(X,d\mu )\)  as well.
The proof of the following lemma is strongly inspired by the proof of [4]}.
However, since Lemma REF  contains an additional parameter \(\kappa \) ,
we present the details for the convenience of the reader.
Lemma 4.2 
Let \(1<p<\infty \)  and \(0<\kappa \le 1\) , and let
\(\Omega \subsetneq X\)  be an open set.
Assume that \(X\)  supports a \((1,s)\) -Poincaré inequality for some \(1<s<p\)  with a dilation constant \(\lambda \) , and let \(0<t<\min \lbrace 1,6\kappa /(3\lambda +2\kappa )\rbrace \) . Then
there is a constant \(C\)  such that if \(u\in N^{1,p}_0(\Omega )\)  and \(g\in \mathcal {D}^p(u)\) ,
then \(C({{\mathcal {M}}}_{\Omega ,\kappa }g^s)^{1/s}\in \mathcal {D}^p(u_t)\) .

Let \(u\in N^{1,p}_0(\Omega )\)  and \(g\in \mathcal {D}^p(u)\) .
Since
\({{\mathcal {M}}}_{\Omega ,\kappa }g\)  depends only on the values of \(g\)  in \(\Omega \) ,
by the gluing lemma [2]} we may assume that \(g=0\)  in \(X\setminus \Omega \) .
Take a Whitney cover \({\mathcal {W}}_c(\Omega )=\lbrace  B_i:i\in \mathbb {N}\rbrace \)  with \(c=t/18\) , set \(L=6\) ,
and write \(u_t(x)\)  for \(x\in X\)  as
\(u_t(x)=u(x)+\sum _{i=1}^{\infty }\varphi _i(x)\bigl (u_{B(x_i,3r_i)}-u(x)\bigr ).\) 
By the properties of the Lipschitz functions \(\varphi _i\) , see above, and by the product rule,
see for instance [2]},
we have that

\(\biggl (\frac{K}{r_i}|u-u_{B(x_i,3r_i)}|+g\biggr ){\mbox{\Large $\chi $}}\) 
\(\scriptstyle B(x_i,6r_i)\)
\(belongs to \) 
Dp(i(uB(xi,3ri)-u))\(. This implies that\)\(g+\sum _{i=1}^{\infty }\biggl (\frac{K}{r_i}|u-u_{B(x_i,3r_i)}|+g\biggr ){\mbox{\Large $\chi $}}\)\(\scriptstyle B(x_i,6r_i)\) Dp(ut).
\(\) 
To estimate this \(p\) -weak upper gradient of \(u_t\)  in terms of \({{\mathcal {M}}}_{\Omega ,\kappa }g^s\) , we fix a Lebesgue point \(x\in B(x_i,6r_i)\)  of function \(u\) ,
notice that \(B(x_i,3r_i)\subset B(x,9r_i)\) , and write
\(|u(x)-u_{B(x_i,3r_i)}|\le |u(x)-u_{B(x,9r_i)}|+|u_{B(x,9r_i)}-u_{B(x_i,3r_i)}|.\) 
For the second term on the right-hand side of (REF ) we have
\(|u_{B(x,9r_i)}-u_{B(x_i,3r_i)}|&\le \mathop {\mathchoice{\displaystyle }{\hspace{0.0pt}}{0}{.}22\hrule width 0.6}\hspace{0.0pt}\) 
B(xi,3ri)|u-uB(x,9ri)| dCB(x,9ri)|u-uB(x,9ri)| d
C ri(B(x,9ri) g(y)s  d(y))1sCri (M,gs(x))1/s.

Here we use the fact that \(g\)  is also an \(s\) -weak upper gradient of \(u\) , and
the last estimate follows from the definition of maximal function \({{\mathcal {M}}}_{\Omega ,\kappa }g^s\) 
and the inequality
\(9\lambda r_i\le 9\lambda \biggl (\frac{18}{t}-6\biggr )^{-1}d(x,\Omega ^c) < 9\lambda \biggl (\frac{9\lambda +6\kappa }{\kappa }-6\biggr )^{-1}d(x,\Omega ^c) \le \kappa d(x,\Omega ^c).\) 
For the first term on the right-hand side of (REF ), by a standard telescoping argument we have for
the Lebesgue point \(x\in B(x_i,6r_i)\)  of \(u\)  that
\(|u(x)-u_{B(x,9r_i)}|&\le C\sum _{j=0}^{\infty }\mathop {\mathchoice{\displaystyle }{\hspace{0.0pt}}{0}{.}22\hrule width 0.6}\hspace{0.0pt}\) 
B(x,32-jri)|u-uB(x,32-jri)| d
Cj=032-jri(B(x, 32-j ri) g(y)s  d(y))1s
Cri (M,gs(x))1/s.

The last inequality is true for the same reason as above since \(B(x,3^{2-j}\lambda r_i)\subset B(x,9\lambda r_i)\) 
for every \(j=0,1,\dots \) .
Hence, we obtain for every Lebesgue point \(x\in B(x_i,6r_i)\)  of \(u\)  that
\(|u(x)-u_{B(x_i,3r_i)}|\le Cr_i ({{\mathcal {M}}}_{\Omega ,\kappa }g^s(x))^{1/s}.\) 
This, together with the fact that \(g=0\)  in \(X\setminus \Omega \) , gives

\(g(x)+\sum _{i=1}^{\infty }\biggl (\frac{K}{r_i}|u(x)-u_{B(x_i,3r_i)}|+g\biggr ){\mbox{\Large $\chi $}}\) 
\(\scriptstyle B(x_i,6r_i)\) (x)C(M,gs(x))1/s,
\(for almost every \) 
X\(.This, in turn, implies that \) C(M,gs)1/s\( is a \) p\(-weak upper gradient of \) ut\(; see e.g.~\cite [Corollary 1.44]{BjornBjorn2011}. Notice that here the constant \) C\( does not depend on \) u\(.Finally, since \) M,gsMgs\(and \) gDp(u)\(, where \) 1s<p\(,the maximal function theorem (with exponent \) p/s>1\() implies that\) (M,gs)1/sLp(X;d)\(.Hence we conclude that \) C(M,gs)1/sDp(ut)\(,as desired.\)
Quasiadditivity of capacity and Hardy–Sobolev inequalities
This section contains our main results, which relate
weighted Hardy–Sobolev inequalities to the quasiadditivity
of the weighted capacities.
The general approach in the proofs is similar
to those in [7]}, [8]}, [9]}, [10]},
but the present context requires different tools on the level of details.
We first show that the validity of the
\((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) in \(\Omega \) ,
for \(1<p\le q<\infty \) , implies the quasiadditivity property for
the weighted relative capacity
with respect to Whitney balls.
Theorem 5.1 
Let \(1<p\le q<\infty \)  and let \(\Omega \subsetneq X\)  be an open set. Assume that \((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) holds in \(\Omega \)  with a constant \(C_1\) , and let
\(\mathcal {W}_c(\Omega )=\lbrace B_i:i\in \mathbb {N}\rbrace \)  be a Whitney cover of \(\Omega \) 
for some \(0<c<1/3\) . Then there exists a constant \(C\)  such that
\(\sum _{i\in \mathbb {N}} \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}} \le C \operatorname{cap}_{p,\beta }(E,\Omega )^{\frac{q}{p}},\) 
for every set \(E\Subset \Omega \) .

Let \(E\Subset \Omega \) .
Let \(u\in N^{1,p}_c(\Omega )\)  be such that \(u(x)\ge 1\) , for every \(x\in E\) , and let \(g\in \mathcal {D}^p(u)\) .
Fix \(L>1\) 
satisfying \(c<(3L)^{-1}\)  and recall that \(B_i^*=LB_i\) , \(i\in \mathbb {N}\) .
For every \(i\in \mathbb {N}\)  we choose a Lipschitz function \(\varphi _i\)  satisfying the
following properties: \(\varphi _i(x)=1\)  for every \(x\in B_i\) , \(\varphi _i\)  is \(K/r_i\) -Lipschitz, for some \(K\ge 1\) ,
and \(0\le \varphi _i(x)\le {\mbox{\Large $\chi $}}\)\(\scriptstyle B_i^*\) (x)\(, for every \) xX\(.For instance, we can take\)\(\varphi _i(x)=\max \left\lbrace 0,1-\frac{d(x,B_i)}{d(B_i,X\setminus B_i^*)}\right\rbrace , \qquad x\in X,\)\(in which case we can choose \) K=(L-1)-1\(.Then, for every \) iN\(, \) ui=uiN1,pc()\(,and the product rule (see~\cite [Lemma~2.15]{BjornBjorn2011})implies that the function\)\(g_{i}(x)=(g(x)+Kr_i^{-1}|u(x)|) {\mbox{\Large $\chi $}}\)\(\scriptstyle B_i^*\) (x),   xX,
\(belongs to \) 
Dp(ui)\(.Hence \) ui\( is a capacity test functionfor \) EBi\( and\)\(\operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )\le \int _\Omega g_{i}(x)^p\,d(x,\Omega ^c)^{\beta } \,d\mu (x).\)\(Since \) ri-1C d(x,c)-1\(, for every \) xBi*\(,{\begin{@align*}{1}{-1}&\biggl (\int _\Omega g_{i}(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}\\&\qquad \le C \biggl (\int _{B_i^*}g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}+C\biggl (\int _{B_i^*}|u(x)|^p d(x,\Omega ^c)^{-p+\beta }\,d\mu (x)\biggr )^\frac{q}{p}.\end{@align*}}Since \) qp\(, we can write{\begin{@align*}{1}{-1}&\sum _{i=1}^{\infty } \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}}\le \sum _{i=1}^{\infty } \biggl (\int _\Omega g_{i}(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}\\&\qquad \le C\sum _{i=1}^{\infty } \biggl (\int _{B_i^*}g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}+C\sum _{i=1}^{\infty } \biggl (\int _{B_i^*}|u(x)|^p d(x,\Omega ^c)^{-p+\beta }\,d\mu (x)\biggr )^\frac{q}{p} \\&\qquad \le C\Biggl (\sum _{i=1}^{\infty }\int _{B_i^*}g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\Biggr )^\frac{q}{p}+C\sum _{i=1}^{\infty }\mu (B_i^*)^{\frac{q}{p}\frac{q-p}{q}}\int _{B_i^*}\frac{|u(x)|^q}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x).\end{@align*}}For the first term on the right-hand side, due to the finite overlap of the balls \) Bi*\(, we get\)\(\Biggl (\sum _{i=1}^{\infty }\int _{B_i^*}g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\Biggr )^\frac{q}{p}\le C\biggl (\int _{\Omega }g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}.\)\(To estimate the second term, we notice from Lemma~\ref {whitney} that \) Bi*B(x,d(x,c))\(, for every \) xBi*\(. This inclusion together with the finite overlap of the balls \) Bi*\( andinequality~(\ref {eq:(p,q)-weightedhardy}) gives{\begin{@align*}{1}{-1}&\sum _{i=1}^{\infty }\mu (B_i^*)^{\frac{q-p}{p}}\int _{B_i^*}\frac{|u(x)|^q}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)\\&\qquad \le C\sum _{i=1}^{\infty }\int _{B_i^*} \frac{|u(x)|^{q}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\mu (B(x,d(x,\Omega ^c)))^{\frac{q-p}{p}}\,d\mu (x)\\&\qquad \le C\int _{\Omega }\frac{|u(x)|^q}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\mu (B(x,d(x,\Omega ^c)))^{\frac{q-p}{p}}\,d\mu (x)\\&\qquad \le C\biggl (\int _{\Omega }g(x)^p\,d(x,\Omega ^c)^{\beta }\,d\mu (x)\biggr )^\frac{q}{p}.\end{@align*}}After collecting the estimates above, and taking the infimum first over all \) gDp(u)\(and then over all functions \) u\( as above, the claim follows.\)
For \(q\le \frac{Qp}{Q-p}\)  and sufficiently small parameters \(c\) , there is also a
partial converse of Theorem REF . In addition
to the quasiadditivity property in part REF ,
the next result contains the weak quasiadditivity property
in part REF .
Theorem 5.2 
Let \(1<p\le q\le \frac{Qp}{Q-p}\)  and
assume that \(X\)  supports a \((1,s)\) -Poincaré inequality for some \(1<s<p\)  with a dilation constant \(\lambda \) .
Let \(\Omega \subsetneq X\)  be an open set and let \(\mathcal {W}_c(\Omega )=\lbrace B_i:i\in \mathbb {N}\rbrace \)  be a
Whitney cover of \(\Omega \)  with \(0<c<\frac{1}{45\lambda +8}\) .
Then the following conditions are equivalent:

 The \((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) holds in \(\Omega \) .

 There exist constants \(C_1\)  and \(C_2\)  such that
\(\sum _{i=1}^\infty \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}}\le C_1 \operatorname{cap}_{p,\beta }(E,\Omega )^{\frac{q}{p}},\) 
for every set \(E\Subset \Omega \) ,
and the capacity lower bound (REF ) holds with the constant \(C_2\) 
for every ball \(B_i\in \mathcal {W}_c(\Omega )\) .

 There exist constants \(C_1\)  and \(C_2\)  such that
\(\sum _{i\in I} \operatorname{cap}_{p,\beta }( B_{i},\Omega )^{\frac{q}{p}}\le C_1 \operatorname{cap}_{p,\beta }\Biggl (\bigcup _{i\in I} B_{i},\Omega \Biggr )^{\frac{q}{p}},\) 
whenever \(I\subset \mathbb {N}\)  is a finite set,
and the capacity lower bound (REF ) holds with the constant \(C_2\) 
for every ball \(B_i\in \mathcal {W}_c(\Omega )\) .


The implication from REF  to REF  follows from
Lemma REF  and
Theorem REF .
The implication from REF  to REF 
follows
by considering \(E=\bigcup _{i\in I} B_{i}\) .
Assume now that condition REF  holds with a constant \(C_1\) .
To show that REF  holds,
by Theorem REF  it suffices
to prove that there exists a constant \(C\)  such that
\(\int _E \frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)\le C\operatorname{cap}_{p,\beta }(E,\Omega )^{\frac{q}{p}},\) 
for every set \(E\Subset \Omega \) .
To this end, fix \(E\Subset \Omega \) ,
let \(u\in N^{1,p}_c(\Omega )\)  be such that \(u(x)\ge 1\)  for every \(x\in E\) , and let
\(g\in \mathcal {D}^p(u)\) .
By considering \(\vert u\vert \)  instead of \(u\) , we may assume that \(u\ge 0\)  in \(X\) ;
observe that \(\vert u\vert \in N^{1,p}_c(\Omega )\)  and
\(g\in \mathcal {D}^p(\vert u\vert )\) .
Partition \(\mathcal {W}_c(\Omega )=\lbrace B_i : i\in \mathbb {N}\rbrace \)  into two subfamilies:
\(\mathcal {W}^1 = \lbrace B_i\in \mathcal {W}_c(\Omega ) : u_{B_i} < \tfrac{1}{2}\rbrace \) 
and \(\mathcal {W}^2 = \mathcal {W}_c(\Omega )\setminus \mathcal {W}^1\) .
Observe that \(\mathcal {W}^2\)  is necessarily finite since \(u\in N^{1,p}_c(\Omega )\) .
The left-hand side of (REF ) can be estimated from above by
\(\Bigg (\sum _{B\in \mathcal {W}^1} + \sum _{B\in \mathcal {W}^2}\Bigg )\int _{E\cap B}\frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x).\) 
To estimate the first sum, we
observe that, for every \(B_i\in \mathcal {W}^1\)  and every \(x\in E\cap B_i\) ,
\(\tfrac{1}{2} = 1-\tfrac{1}{2} < u(x) - u_{B_i} = \vert u(x)- u_{B_i}\vert .\) 
By the definition and the properties of Whitney balls, see Lemma REF , if \(B_i\in \mathcal {W}_c(\Omega )\)  and \(x\in B_i\) , then
\(B_i\subset B(x, d(x, \Omega ^c))\quad \text{ and }\quad (1/c-1)r_i\le d(x, \Omega ^c)\le (1/c+1)r_i.\) 
Consequently,
\(\mu (B_i)\le \mu (B(x,d(x,\Omega ^c)))\quad \text{ and }\quad \mu (B(x,d(x,\Omega ^c)))\le C \mu (B_i)\) 
for every \(x\in B_i\) .
Since \(X\)  supports a \((1,s)\) -Poincaré inequality for \(1<s<p\)  with the dilation constant \(\lambda \) , then \(X\)  supports a \((1,p)\) -Poincaré inequality with the same dilation constant \(\lambda \) , and hence the \((q,p)\) -Poincaré inequality with the dilation constant \(2\lambda \) ; see [2]}.
The observations above lead to the estimates
\(\sum _{B\in \mathcal {W}^1} \int _{E\cap B} \frac{\mu (B(x,d(x,\Omega ^c)))^{\frac{q-p}{p}}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)&\le C \sum _{B_i\in \mathcal {W}^1} \frac{\big (\mu (B_i)r_i^\beta \big )^{\frac{q}{p}}}{r_i^{q}} \mathop {\mathchoice{\displaystyle }{\hspace{0.0pt}}{0}{.}22\hrule width 0.6}\hspace{0.0pt}\) 
Bi u(x)- uBiq d(x)
 C BiW1 ((Bi)ri)qpriq riq (2Bi g(x)p  d(x))q p
 C (BW12B g(x)p  d(x, c) d(x))q p
 C ( g(x)p  d(x, c) d(x))q p.

The last inequality follows from the finite overlap of dilated Whitney balls \(2\lambda B\)  which is guaranteed by the relation between \(c\)  and \(\lambda \)  in the formulation of the theorem.
To estimate the second sum in (REF ),
let \(B_i=B(x_i,r_i)\in \mathcal {W}^2\)  and \(x\in B_i\) . Recall that \(r_i=c d(x_i,\Omega ^c)\) ,
where \(c<\tfrac{1}{45\lambda +8}<\tfrac{1}{20}\) .
Choose a number \(t\)  such that
\(\frac{18c}{1-2c}<t<\frac{6}{15\lambda +2}\) ; then, in particular, \(0<t<1\) .
Let \(\mathcal {W}_{t/18}(\Omega )=\lbrace B(x^{\prime }_j,r^{\prime }_j) : j\in \mathbb {N}\rbrace \)  be a Whitney cover of \(\Omega \) ,
\(\lbrace \varphi _j\rbrace \)  be a partition of unity related to \(\mathcal {W}_{t/18}(\Omega )\) ,
and \(u_t\)  be the the discrete convolution of \(u\ge 0 \)  at scale \(t\)  as
in (REF ). Then \(x\in B(x^{\prime }_j,r^{\prime }_j)\)  for some \(j\in \mathbb {N}\) 
and the choice of \(t\)  guarantees that \(r_i\le r^{\prime }_j\) , since by property (3) of Lemma REF  we have
\((1/c-1)r_i\le d(x,\Omega ^c)\le (18/t+1)r^{\prime }_j,\) 
which implies
\(r_i\le \frac{18/t+1}{1/c-1}r^{\prime }_j\le r^{\prime }_j.\) 
Similarly, we obtain that \(r_j^{\prime }\le Cr_i\) , for some \(C>0\) , since
\((18/t-1)r^{\prime }_j\le d(x,\Omega ^c)\le (1/c+1)r_i.\) 
By the definition of the discrete convolution \(u_t\) , properties of functions \(\varphi _j\) ,
the inclusion
\(B(x_i,r_i)\subset B(x^{\prime }_j,3r^{\prime }_j)\)  (from \(r_i\le r^{\prime }_j\) ),
and the doubling condition for measure \(\mu \) , we obtain
\(\begin{split}u_t(x) & \ge \varphi _j(x)\mathop {\mathchoice{\displaystyle }{\hspace{0.0pt}}{0}{.}22\hrule width 0.6}\hspace{0.0pt}\end{split}{\textstyle }\hspace{0.0pt}\hrule width 0.6\) 
B(x'j,3r'j) u(y) d(y)
CB(x'j,3r'j) u(y) d(y)
 C B(xi,ri) u(y) d(y) C uBi C2,


where \(C\)  depends on \(\lambda \) , \(c\) , and the doubling constant of the measure \(\mu \) .
Since \(u\in N^{1,p}_c(\Omega )\) , we have that \(u\in L^p(X;d\mu )\) , and hence \(u_t\in L^p(X;d\mu )\) ;
see the comment before Lemma REF . Furthermore, by Lemma REF  the set \(\mathcal {D}^p(u_t)\)  is nonempty, and
as the sum in (REF ) has only finitely many non-zero terms for \(u\in N^{1,p}_c(\Omega )\) , the support of \(u_t\) 
is bounded and has a positive distance to \(\Omega ^c\) . Thus we conclude that \(u_t\in N^{1,p}_c(\Omega )\) .
By (REF ) there exists \(C_2>0\)  such that \(C_2u_t\ge 1\)  in \(\bigcup _{B\in \mathcal {W}^2} B\) .
Hence, \(C_2 u_t\)  is a capacity test function for
\(\operatorname{cap}_{p,\beta }\bigl (\bigcup _{B\in \mathcal {W}^2} B,\Omega \bigr )\) . Since \(t<6/(15\lambda +2)\) , we can choose
\(0<\kappa < 1/5\)  such that \(t<6\kappa /(3\lambda +2\kappa )\) , and, by
Lemma REF , there is a constant \(C_3\)  such that
\(C_3({{\mathcal {M}}}_{\Omega ,\kappa }g^s)^{1/s}\in \mathcal {D}^p(u_t)\) .
Let \(B_i=B(x_i,r_i)\in \mathcal {W}^2\) .
By inequalities (REF ) and (REF ), it follows that
\(\int _{E\cap B_i} \frac{\mu (B(x,d(x,\Omega ^c)))^{\frac{q-p}{p}}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)& \le C\mu (B_i)^{\frac{q}{p}-1} \int _{E\cap B_i}d(x,\Omega ^c)^{\frac{q}{p}(\beta -p)}\,d\mu (x)\\& \le C\big (\mu (B_i)r_i^{\beta -p}\big )^{q/p}\le C\operatorname{cap}_{p,\beta }(B_i,\Omega )^{q/p}.\) 

Since \(\mathcal {W}^2\)  is finite, we obtain
from the assumed condition REF 
that
\(\sum _{B\in \mathcal {W}^2}\int _{E\cap B} \frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)&\le C \sum _{B\in \mathcal {W}^2} \operatorname{cap}_{p,\beta }(B,\Omega )^{\frac{q}{p}}\\&\le C \operatorname{cap}_{p,\beta }\Biggl (\bigcup _{B\in \mathcal {W}^2} B,\Omega \Biggr )^{\frac{q}{p}}\\&\le C \biggl (\int _{\Omega } ({{\mathcal {M}}}_{\Omega ,\kappa } g^s(x))^{p/s}\,d(x, \Omega ^c)^\beta \,d\mu (x)\biggr )^{\frac{q}{p}}\\&\le C \biggl (\int _{\Omega } g(x)^p\,d(x, \Omega ^c)^\beta \,d\mu \biggr )^{\frac{q}{p}},\) 

where the last inequality is valid since \(s<p\) , and thus the maximal operator \({{\mathcal {M}}}_{\Omega ,\kappa }\)  is bounded on \(L^{p/s}(\Omega ,w_{\beta }\,d\mu )\)  by Lemma REF .
By combining the estimates for \(\mathcal {W}^1\)  and \(\mathcal {W}^2\) 
we obtain
\(\begin{split}\int _E \frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)& \le \sum _{B\in \mathcal {W}} \int _{E\cap B}\frac{\mu (B(x,d(x,\Omega ^c)))^\frac{q-p}{p}}{d(x,\Omega ^c)^{\frac{q}{p}(p-\beta )}}\,d\mu (x)\\&\le C\biggl (\int _{\Omega }g(x)^p\,d(x, \Omega ^c)^\beta \,d\mu \biggr )^{\frac{q}{p}}.\end{split}\) 
The desired estimate (REF ) follows
by taking infimum over all \(g\in \mathcal {D}^p(u)\)  and then over all functions
\(u\)  as above.
Theorem REF  gives the
following implication for the validity
of \((q,p,\beta )\) -Hardy–Sobolev inequalities for different values of
the parameter \(q\) . Observe that this is not completely obvious from the
statement of the Hardy–Sobolev inequality.
Remark 5.3 
Let \(1<p\le q<p^*=\frac{Qp}{Q-p}\)  and \(\beta \in \mathbb {R}\) , and
assume that \(X\)  supports a \((1,s)\) -Poincaré inequality for some \(1<s<p\) .
If a \((q,p,\beta )\) -Hardy–Sobolev inequality holds in an open set \(\Omega \subsetneq X\) ,
then also \((q^{\prime },p,\beta )\) -Hardy–Sobolev inequalities hold in \(\Omega \)  for every \(q\le q^{\prime } \le p^*\) .
This follows from Theorem REF  and the fact that if \(q\le q^{\prime }\) , then
\(\Biggl (\sum _{i=1}^\infty \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q^{\prime }}{p}}\Biggr )^{\frac{p}{q^{\prime }}}\le \Biggl (\sum _{i=1}^\infty \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}}\Biggr )^{\frac{p}{q}}\) 
whenever \(E\subset \Omega \)  and
\(\mathcal {W}_c(\Omega )=\lbrace B_i:i\in \mathbb {N}\rbrace \)  is a
Whitney cover of \(\Omega \) .

Special cases and examples
The main results of the paper are obtained under the assumption that the measure \(\mu \)  is doubling. In particular,
\(\mu \)  satisfies for some \(Q>0\)  the inequality
\(\frac{\mu (B(y,r))}{\mu (B(x,R))}\ge C\Bigl (\frac{r}{R}\Bigr )^Q,\) 
whenever \(0<r\le R<\operatorname{diam}X\)  and \(y\in B(x,R)\) .
If \(X\)  is connected
(this is guaranteed in our setting by the Poincaré inequalities), then there exists
also a constant \(Q_u\)  satisfying \(0<Q_u\le Q\)  and such that
\(\frac{\mu (B(y,r))}{\mu (B(x,R))}\le C\Bigl (\frac{r}{R}\Bigr )^{Q_u},\) 
whenever \(0<r\le R<\operatorname{diam}X\)  and \(y\in B(x,R)\) ; see e.g. [2]}.
If there are uniform upper and lower bounds for the measures of
the balls, that is,
\(C^{-1} r^Q\le \mu (B(x,r))\le C r^Q\) 
for every \(x\in X\)  and all \(0<r<\operatorname{diam}(X)\) , the measure \(\mu \)  is said
to be Ahlfors \(Q\) -regular.
The above exponent \(Q>0\)  plays the same role as \(n\)  does in \(\mathbb {R}^n\) .
In the \(Q\) -regular case
the \((q,p,\beta )\) -Hardy–Sobolev inequality (REF ) can be written in a simpler form
\(\biggl (\int _{\Omega } |u(x)|^q d(x,\Omega ^c)^{\frac{q}{p}(Q-p+\beta )-Q} \,d\mu (x)\biggr )^{\frac{1}{q}}\le C\biggl (\int _{\Omega } g(x)^p \,d(x,\Omega ^c)^{\beta }\,d\mu \biggr )^{\frac{1}{p}},\) 
and Theorem REF  implies the following characterization.
In \(X=\mathbb {R}^n\)  (equipped with the usual Euclidean distance and the Lebesgue measure),
the corresponding result in terms of Whitney cubes has been considered in [9]}
in the unweighted case \(\beta =0\) ,
but the weighted result is new even in \(\mathbb {R}^n\) .
Since \(N^{1,p}(\mathbb {R}^n)=W^{1,p}(\mathbb {R}^n)\)  and \(\mathbb {R}^n\)  supports \((1,s)\) -Poincaré inequalities for every \(s\ge 1\)  with \(\lambda =1\) ,
Theorem REF  follows from Corollary REF .
Corollary 6.1 
Let \(X\)  be a metric space equipped with an Ahlfors \(Q\) -regular measure \(\mu \)  and let \(1<p\le q\le \frac{Qp}{Q-p}\) .
Assume that \(X\)  supports a \((1,s)\) -Poincaré inequality for some \(1<s<p\)  with a dilation constant \(\lambda \) . Let \(\mathcal {W}_c(\Omega )=\lbrace B_i:i\in \mathbb {N}\rbrace \) , \(B_i=(x_i,r_i)\) , be a
Whitney cover of an open set \(\Omega \subsetneq X\) ,
with \(0<c<\frac{1}{45\lambda +8}\) .
Then the following conditions are equivalent:

 Hardy–Sobolev inequality (REF ) holds in \(\Omega \) .

 There exist constants \(C_1\)  and \(C_2\)  such that
\(\sum _{i=1}^\infty \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}}\le C_1 \operatorname{cap}_{p,\beta }(E,\Omega )^{\frac{q}{p}},\) 
for every set \(E\Subset \Omega \) , and \(\operatorname{cap}_{p,\beta }(B_i,\Omega ) \ge C_2 r_i^{Q+\beta -p}\)  for every \(i\in \mathbb {N}\) .

 There exist constants \(C_1\)  and \(C_2\)  such that
\(\sum _{i\in I} \operatorname{cap}_{p,\beta }( B_{i},\Omega )^{\frac{q}{p}}\le C_1 \operatorname{cap}_{p,\beta }\Biggl (\bigcup _{i\in I} B_{i},\Omega \Biggr )^{\frac{q}{p}},\) 
whenever \(I\subset \mathbb {N}\)  is a finite set, and \(\operatorname{cap}_{p,\beta }(B_i,\Omega ) \ge C_2 r_i^{Q+\beta -p}\)  for every \(i\in \mathbb {N}\) .


When \(1<p<Q\)  and \(\beta =0\) ,
the capacity lower bound
\(\operatorname{cap}_{p}(B,\Omega )\ge C r^{Q-p}\) 
holds for all Whitney balls
\(B=B(x,r)\in \mathcal {W}_c(\Omega )\) , at least if
\(X\)  is unbounded or \(\operatorname{diam}(\Omega ) < \frac{1}{4}\operatorname{diam}(X)\) ;
see [14]}
and [15]} for details.
Here \(\operatorname{cap}_{p}(B,\Omega )= \operatorname{cap}_{p,0}(B,\Omega )\) .
(More generally, the capacity lower bound (REF )
holds in the unweighted case \(\beta =0\)  if \(1<p<Q_u\) , by the same references.)
Consequently, in certain cases,
for instance if \(X\)  is an unbounded \(Q\) -regular space
and \(1<p<Q\) , \(\beta =0\) , there is no need to assume the capacity lower bound in conditions REF  and REF  in Corollary REF . This also shows that
the weighted capacity lower bound (REF ), for every Whitney ball, is not alone sufficient for the
\((q,p,\beta )\) -Hardy–Sobolev inequality in Theorem REF .
For instance, consider \(X=\mathbb {R}^n\)  equipped with the usual Euclidean distance and the Lebesgue measure.
Then \(Q=n\) , and
for every \(1<p<n\)  and \(p\le q < \frac{np}{n-p}\) 
there are open sets where the \((q,p,0)\) -Hardy–Sobolev inequality does not hold.
When \(1<p=q<n\) , one such an example is given by the complement of any (non-empty) Ahlfors \((n-p)\) -regular set,
by [16]};
see also [17]} for counterexamples in more general cases.
On the other hand, even if the capacity lower bound (REF )
is not always needed,
it is not possible to remove this part
from conditions REF  and REF  in Theorem REF .
This is illustrated by the next example.
Example 6.2 Consider \(X=\mathbb {R}^n\) , equipped with the usual Euclidean distance and the Lebesgue measure.
Then \(N^{1,p}(\mathbb {R}^n)=W^{1,p}(\mathbb {R}^n)\) , and \(\vert \nabla u\vert \in \mathcal {D}_p(u)\)  if
\(u\in W^{1,p}(\mathbb {R}^n)\) ; see e.g. [2]}.
Let \(1<p<\infty \)  and \(\beta \ge 0\) ,
and choose \(\Omega =B(0,1)\subset \mathbb {R}^n\) . For every \(j\in \mathbb {N}\) , let
\(u_j\)  be a Lipschitz continuous function in \(\mathbb {R}^n\) ,
satisfying the following properties:
\(u_j=1\)  in \(B(0,1-2^{-j})\) ,
\(u_j=0\)  in \(\mathbb {R}^n\setminus B(0,1-2^{-j-1})\) ,
and \(\vert \nabla u\vert \le 2^{j+1}\)  almost everywhere in
\(A_j=B(0,1-2^{-j-1})\setminus B(0,1-2^{-j})\) .
Then we have for every \(j\in \mathbb {N}\)  that
\(u_j\in W_0^{1,p}(\Omega )\) 
has a compact support in \(\Omega \)  and
\(\int _{\Omega } \vert \nabla u_j(x)\vert ^p \,d(x,\Omega ^c)^{\beta }\,d\mu \le \mu (A_j)2^{(j+1)p}2^{-j\beta } \le C 2^{-j(1-p+\beta )}.\) 
If \(\beta >p-1\) , then \(2^{-j(1-p+\beta )}\rightarrow 0\)  as \(j\rightarrow \infty \) .
Let \(\mathcal {W}_c(\Omega )=\lbrace B_i:i\in \mathbb {N}\rbrace \)  be a
Whitney cover of \(\Omega \) .
When \(i\in \mathbb {N}\)  is fixed,
the functions \(u_j\)  are test functions
for the capacity \(\operatorname{cap}_{p,\beta }(B_i,\Omega )\)  for all sufficiently large \(j\) .
Thus the above computation shows that if \(\beta > p-1\) ,
then \(\operatorname{cap}_{p,\beta }(B_i,\Omega )=0\)  for all Whitney balls \(B_i\in \mathcal {W}_c(\Omega )\) ,
and so the capacity lower bound (REF ) does not hold in this case.
Lemma REF  (or a direct computation for the functions \(u_j\) )
implies that neither does the \((q,p,\beta )\) -Hardy–Sobolev inequality hold when \(\beta >p-1\) .
Nevertheless, the quasiadditivity property
\(\sum _{i\in \mathbb {N}} \operatorname{cap}_{p,\beta }(E\cap B_i,\Omega )^{\frac{q}{p}} \le C \operatorname{cap}_{p,\beta }(E,\Omega )^{\frac{q}{p}}\) 
holds trivially
for every set \(E\Subset \Omega \) , since all the terms on the left-hand side are zero.
This shows that
in addition to the quasiadditivity property, also
the capacity lower bound is really needed in assertions
REF  and REF 
of Theorem REF 
and in the corresponding assertions of Corollary REF .

