1 Introduction

1.1 Main result

The present note deals with the fractional Hardy inequality in Sobolev–Slobodeckiĭ spaces. For \(1<p<\infty \), \(0<s<1\) and \(\Omega \subsetneq {\mathbb {R}}^N\) an open set, this takes the form

$$\begin{aligned} C\,\int _\Omega \frac{|u|^p}{d_\Omega ^{s\,p}}\,dx\le \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy,\!\quad \hbox { for every } u\in C^\infty _0(\Omega ), \end{aligned}$$
(1.1)

where

$$\begin{aligned} d_\Omega (x)=\min _{y\in \partial \Omega } |x-y|,\qquad \hbox { for }x\in \Omega . \end{aligned}$$

This note can be seen as a companion paper of [2], where the main result here presented is applied. We refer the reader to [2] for more details on (1.1). The paper [2] deals with the problem of determining the sharp constant in (1.1). This is the quantity defined by

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega ):=\inf _{u\in C^\infty _0(\Omega )}\left\{ \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy\,:\, \int _\Omega \frac{|u|^p}{d_\Omega ^{s\,p}}\,dx=1\right\} . \end{aligned}$$

In order to present the main result, we need to introduce the equation

$$\begin{aligned} (-\Delta _p)^s u=\lambda \,\frac{|u|^{p-2}\,u}{d_\Omega ^{s\,p}},\qquad \hbox { in }\Omega , \end{aligned}$$
(1.2)

where \(\lambda \ge 0\). The symbol \((-\Delta _p)^s\) stands for the fractional \(p-\) Laplacian of order s, defined in weak form by the first variation of the convex functional

$$\begin{aligned} u\mapsto \frac{1}{p}\,[u]_{W^{s,p}({\mathbb {R}}^N)}^p:=\frac{1}{p}\,\iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy, \end{aligned}$$

see Sect. 2 for more details.

Actually, There is a tight connection between positive supersolutions of (1.2) and the constant \({\mathfrak {h}}_{s,p}(\Omega )\). This connection is encoded in the following result, which is the main goal of the present note. We refer to the comments below, for a comparison with known results.

Theorem 1.1

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set. Then we have

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )=\sup \Big \{\lambda \ge 0\,:\, \text{ equation } \,\,(1.2)\,\, \text{ admits } \text{ a } \text{ positive } \text{ local } \text{ weak } \text{ supersolution }\Big \}. \end{aligned}$$

The proof of this result is a direct consequence of the following equivalence (see Lemmas 4.1 and 4.2 below)

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )>0\qquad \Longleftrightarrow \qquad \begin{array}{c} \, \text{ The } \text{ equation }\,\, (1.2)\,\, \text{ admits } \text{ a } \text{ positive }\\ \hbox { local weak supersolution for some} \, \lambda >0. \end{array} \end{aligned}$$

Such an equivalence is quite well-known among experts, at least in the local case, i.e. for standard Sobolev spaces. The case \(p=2\) is contained for example in the classical paper [1, Appendix] by Alano Ancona and it has been generalized to \(p\not =2\) by Juha Kinnunen and Riika Korte, see [10, Theorem 5.1]. We should notice that the case \(p=2\) and \(0<s<1\) can be obtained from [8, Theorem 1.9] by Patrick Joseph Fitzsimmons, which is concerned with the more general framework of Dirichlet forms associated to symmetric Markov processes. We point out that in [8] the author uses a probabilistic approach, which can not be applied to the case \(p\not =2\).

In all these references, the proof of the implication “\(\Longrightarrow \)” is based on the Lax-Milgram Theorem for coercive bilinear forms and its non-Hilbertian variants.Footnote 1 Our proof of this fact is slightly different: more precisely, we use a purely variational approach (see Lemma 4.2 below) in order to show existence of a supersolution. This is quite delicate, since in Theorem 1.1 we do not have any assumption on the open set \(\Omega \), apart from the fact that it admits a Hardy inequality. Thus, when employing the Direct Method in the Calculus of Variations, some non-trivial compactness issues arise. A careful study of a suitable weighted Sobolev–Slobodeckiĭ space is needed at that point (see Sect. 3). This also gives us the opportunity to make some precisions on the correct functional analytic setting which is needed for this result (see Remark 3.7).

1.2 Plan of the paper

In Sect. 2 we introduce the main notation and definitions. Section 3 is devoted to discuss in detail a weighted Sobolev–Slobodeckiĭ space. This in an essential tool in the proof of Theorem 1.1, which can be found in Sect. 4.

2 Notation and definitions

For every \(1<p<\infty \), we indicate by \(J_p:{\mathbb {R}}\rightarrow {\mathbb {R}}\) the monotone increasing continuous function defined by

$$\begin{aligned} J_p(t)=|t|^{p-2}\,t,\qquad \hbox { for every } t\in {\mathbb {R}}. \end{aligned}$$

For \(x_0\in {\mathbb {R}}^N\) and \(R>0\), we will set

$$\begin{aligned} B_R(x_0)=\Big \{x\in {\mathbb {R}}^N\,:\, |x-x_0|<R\Big \}, \end{aligned}$$

and \(\omega _N:=|B_1(x_0)|\). For an open set \(\Omega \subsetneq {\mathbb {R}}^N\), we denote by

$$\begin{aligned} d_\Omega (x)=\min _{y\in \partial \Omega } |x-y|,\qquad \hbox { for every }x\in \Omega , \end{aligned}$$

the distance function from the boundary. Whenever such a distance is bounded, we will set

$$\begin{aligned} r_\Omega :=\Vert d_\Omega \Vert _{L^\infty (\Omega )}. \end{aligned}$$
(2.1)

This will be called inradius of the set \(\Omega \). For two open sets \(\Omega '\subset \Omega \subset {\mathbb {R}}^N\), we will write \(\Omega '\Subset \Omega \) to indicate that the closure \(\overline{\Omega '}\) is a compact set contained in \(\Omega \).

For \(1<p<\infty \) and \(0<s<1\), we consider the fractional Sobolev space

$$\begin{aligned} W^{s,p}({\mathbb {R}}^N)=\Big \{u\in L^p({\mathbb {R}}^N)\,:\, [u]_{W^{s,p}({\mathbb {R}}^N)}<+\infty \Big \}, \end{aligned}$$

where

$$\begin{aligned}{}[u]_{W^{s,p}({\mathbb {R}}^N)}:=\left( \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy\right) ^\frac{1}{p}. \end{aligned}$$

This is a reflexive Banach space, when endowed with the natural norm

$$\begin{aligned} \Vert u\Vert _{W^{s,p}({\mathbb {R}}^N)}=\Vert u\Vert _{L^p({\mathbb {R}}^N)}+[u]_{W^{s,p}({\mathbb {R}}^N)}, \end{aligned}$$

see for example [11, Proposition 17.6 and Theorem 17.41]. For an open set \(\Omega \subset {\mathbb {R}}^N\), we indicate by \({\widetilde{W}}^{s,p}_0(\Omega )\) the closure of \(C^\infty _0(\Omega )\) in \(W^{s,p}({\mathbb {R}}^N)\). It is intended that functions in \(C^\infty _0(\Omega )\) are considered as elements of \(C^\infty _0({\mathbb {R}}^N)\), by extending them to be zero outside \(\Omega \). Occasionally, for an open set \(\Omega \subset {\mathbb {R}}^N\), we will need the fractional Sobolev space defined by

$$\begin{aligned} W^{s,p}(\Omega )=\Big \{u\in L^p(\Omega )\,:\, [u]_{W^{s,p}(\Omega )}<+\infty \Big \}, \end{aligned}$$

where

$$\begin{aligned}{}[u]_{W^{s,p}(\Omega )}:=\left( \iint _{\Omega \times \Omega } \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy\right) ^\frac{1}{p}. \end{aligned}$$

Finally, \(W^{s,p}_{\textrm{loc}}(\Omega )\) is the space of functions \(u\in L^p_{\textrm{loc}}(\Omega )\) such that \(u\in W^{s,p}(\Omega ')\) for every \(\Omega '\Subset \Omega \).

For \(0<\beta <\infty \), we also denote by \(L^\beta _{s\,p}({\mathbb {R}}^N)\) the following weighted Lebesgue space

$$\begin{aligned} L^\beta _{s\,p}({\mathbb {R}}^N)=\left\{ u\in L^\beta _\textrm{loc}({\mathbb {R}}^N)\,:\, \int _{{\mathbb {R}}^N} \frac{|u(x)|^\beta }{(1+|x|)^{N+s\,p}}\,dx<+\infty \right\} . \end{aligned}$$

We observe that this is a Banach space for \(\beta \ge 1\), when endowed with the natural norm. Moreover, it is not difficult to see that

$$\begin{aligned} L^\beta _{s\,p}({\mathbb {R}}^N)\subset L^{\beta '}_{s\,p}({\mathbb {R}}^N),\qquad \hbox { for } 0<\beta '<\beta <\infty . \end{aligned}$$
(2.2)

It is sufficient to use that

$$\begin{aligned} \int _{{\mathbb {R}}^N} \frac{1}{(1+|x|)^{N+s\,p}}\,dx<+\infty ,\qquad \hbox { for every }N\ge 1,\ 1<p<\infty \ \hbox { and } 0<s<1, \end{aligned}$$

and then apply Jensen’s inequality.

Definition 2.1

We say that \(u\in W^{s,p}_{\textrm{loc}}(\Omega )\cap L^{p-1}_{s\,p}({\mathbb {R}}^N)\) is a

  • local weak supersolution of (1.2) if

    $$\begin{aligned} \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{J_p(u(x)-u(y))\,(\varphi (x)-\varphi (y))}{|x-y|^{N+s\,p}}\,dx\,dy \ge \lambda \,\int _\Omega \frac{|u(x)|^{p-2}\,u(x)}{d_\Omega (x)^{s\,p}}\,\varphi (x)\,dx,\nonumber \\ \end{aligned}$$
    (2.3)

    for every non-negative \(\varphi \in W^{s,p}({\mathbb {R}}^N)\) with compact support in \(\Omega \);

  • local weak solution of (1.2) if (2.3) holds as an equality, for every \(\varphi \in W^{s,p}({\mathbb {R}}^N)\) with compact support in \(\Omega \).

Remark 2.2

Under the assumptions taken on u and the test functions, the previous definition is well-posed, i.e.

$$\begin{aligned} \frac{J_p(u(x)-u(y))\,(\varphi (x)-\varphi (y))}{|x-y|^{N+s\,p}}\in L^1({\mathbb {R}}^N\times {\mathbb {R}}^N). \end{aligned}$$

We also observe that if a local weak solution u belongs to \({{\widetilde{W}}}^{s,p}_0(\Omega )\), then by a density argument we can take \(\varphi =u\) itself as a test function in the weak formulation.

3 A weighted fractional Sobolev space

In the proof of Theorem 1.1, we will crucially exploit a suitable weighted fractional Sobolev space, whose definition is inspired by [1, Appendix].

Definition 3.1

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set, we define

$$\begin{aligned} {\mathcal {X}}^{s,p}(\Omega ; d_{\Omega }):= \left\{ u \in L^{p}_{s\,p}({\mathbb {R}}^N): [u]_{W^{s,p}({\mathbb {R}}^N)} < +\infty \ \hbox { and }\ \frac{u}{d_{\Omega }^s} \in L^p(\Omega )\right\} , \end{aligned}$$

endowed with the norm

$$\begin{aligned} \Vert u \Vert _{{\mathcal {X}}^{s,p}(\Omega ; d_{\Omega })}:= [u]_{W^{s,p}({\mathbb {R}}^N)} + \left( \int _{\Omega } \frac{|u|^p}{d_{\Omega }^{s\,p}} \,dx \right) ^\frac{1}{p},\quad \hbox { for every } u\in {\mathcal {X}}^{s,p}(\Omega ; d_{\Omega }). \end{aligned}$$

Then we define \({\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\) as the closure of \(C^{\infty }_0(\Omega )\) in \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\).

Remark 3.2

We observe that if the open set \(\Omega \subsetneq {\mathbb {R}}^N\) is such that \({\mathfrak {h}}_{s,p}(\Omega )>0\), then by a simple density argument we can assure that Hardy’s inequality holds in \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\), as well. That is, we have

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )\,\int _{\Omega } \frac{|u|^p}{d_{\Omega }^{s\,p}} \,dx \le [u]^p_{W^{s,p}({\mathbb {R}}^N)},\quad \hbox { for every } u\in {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega ). \end{aligned}$$

Accordingly, this implies that in this case

$$\begin{aligned} u\mapsto [u]_{W^{s,p}({\mathbb {R}}^N)}, \end{aligned}$$

defines an equivalent norm on \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\).

Proposition 3.3

Let \(1<p<\infty \) and \(0<s<1\). Let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set. Then

$$\begin{aligned} {\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\subset W^{s,p}_{\textrm{loc}}(\Omega )\cap L^{p-1}_{s\,p}({\mathbb {R}}^N), \end{aligned}$$

and we have the estimate

$$\begin{aligned} \left( \int _{{\mathbb {R}}^N} \frac{|u(x)|^p}{(1+|x|)^{N+s\,p}}\,dx\right) ^\frac{1}{p}\le C_\Omega \,\Vert u \Vert _{{\mathcal {X}}^{s,p}(\Omega ;d_\Omega )},\quad \hbox { for every } u\in {\mathcal {X}}^{s,p}(\Omega ;d_\Omega ).\nonumber \\ \end{aligned}$$
(3.1)

Moreover, \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\) and \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\) are Banach spaces.

Proof

The first fact is straightforward, by also taking into account (2.2).

We prove the estimate (3.1). We take a ball \(B_{R}(x_0)\Subset \Omega \) such that \(B_{2\,R}(x_0)\Subset \Omega \), as well. We then write

$$\begin{aligned} \begin{aligned} {}[u]_{W^{s,p}({\mathbb {R}}^N)}&=\left( \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy\right) ^\frac{1}{p}\\&\ge \left( \iint _{B_{R}(x_0)\times ({\mathbb {R}}^N\setminus B_{2\,R}(x_0))} \frac{|u(x)-u(y)|^p}{|x-y|^{N+s\,p}}\,dx\,dy\right) ^\frac{1}{p}\\&\ge \left( \int _{B_{R}(x_0)}\left( \int _{{\mathbb {R}}^N\setminus B_{2\,R}(x_0)} \frac{|u(y)|^p}{|x-y|^{N+s\,p}}\,dy\right) \,dx\right) ^\frac{1}{p}\\&\quad -\left( \int _{B_{R}(x_0)}|u(x)|^p\,\left( \int _{{\mathbb {R}}^N\setminus B_{2\,R}(x_0)} \frac{1}{|x-y|^{N+s\,p}}\,dy\right) \,dx\right) ^\frac{1}{p}, \end{aligned} \end{aligned}$$

thanks to Minkowski’s inequality. By observing that

$$\begin{aligned} |x-y|\ge \frac{1}{2}\,|y-x_0|,\qquad \hbox { for every } x\in B_R(x_0), \ y\not \in B_{2\,R}(x_0), \end{aligned}$$

we have

$$\begin{aligned} \begin{aligned}&\int _{B_{R}(x_0)}|u(x)|^p\,\left( \int _{{\mathbb {R}}^N\setminus B_{2\,R}(x_0)} \frac{1}{|x-y|^{N+s\,p}}\,dy\right) \,dx\\&\le \frac{N\,\omega _N\,2^N}{s\,p}\,R^{-s\,p}\,\int _{B_R(x_0)} |u|^p\,dx\\&\quad \le \frac{N\,\omega _N\,2^N}{s\,p}\,R^{-s\,p}\,\left( \int _{\Omega } \frac{|u|^p}{d_\Omega ^{s\,p}}\,dx\right) \,\Vert d_\Omega \Vert ^{s\,p}_{L^\infty (B_R(x_0))}. \end{aligned} \end{aligned}$$

This implies that we have

$$\begin{aligned} \left( \int _{B_{R}(x_0)}\left( \int _{{\mathbb {R}}^N\setminus B_{2\,R}(x_0)} \frac{|u(y)|^p}{|x-y|^{N+s\,p}}\,dy\right) \,dx\right) ^\frac{1}{p}\le C\,\Vert u \Vert _{{\mathcal {X}}^{s,p}(\Omega ; d_{\Omega })}, \end{aligned}$$
(3.2)

for a constant \(C=C(N,s,p,\Omega ,B_R(x_0))>0\). We now use that

$$\begin{aligned} |x-y|\le 2\,|x_0-y|,\qquad \hbox { for every } x\in B_R(x_0), \ y\not \in B_{2\,R}(x_0), \end{aligned}$$

together with the fact that

$$\begin{aligned} |x_0-y|\le |x_0|+|y|\le (1+|x_0|)\,(1+|y|). \end{aligned}$$

By using these in (3.2), we get

$$\begin{aligned} \left( \int _{{\mathbb {R}}^N\setminus B_{2\,R}(x_0)} \frac{|u(y)|^p}{(1+|y|)^{N+s\,p}}\,dy\right) ^\frac{1}{p}\le C\,\Vert u \Vert _{{\mathcal {X}}^{s,p}(\Omega ; d_{\Omega })}, \end{aligned}$$

possibly with a different constant \(C=C(N,s,p,\Omega ,B_R(x_0))>0\). The proof of estimate (3.1) is almost over: it is now sufficient to add on both sides of the previous estimate the term

$$\begin{aligned} \left( \int _{B_{2\,R}(x_0)} \frac{|u(y)|^p}{(1+|y|)^{N+s\,p}}\,dy\right) ^\frac{1}{p}. \end{aligned}$$

By using that

$$\begin{aligned} \begin{aligned} \int _{B_{2\,R}(x_0)} \frac{|u(y)|^p}{(1+|y|)^{N+s\,p}}\,dy&\le \int _{B_{2\,R}(x_0)} |u|^p\,dy\le \left( \int _{\Omega } \frac{|u|^p}{d_\Omega ^{s\,p}}\,dy\right) \,\Vert d_\Omega \Vert ^{s\,p}_{L^\infty (B_{2\,R}(x_0))}\\&\le C\,\Vert u\Vert ^p_{{\mathcal {X}}^{s,p}(\Omega ;d_\Omega )}, \end{aligned} \end{aligned}$$

for some \(C=C(s,p,\Omega ,B_{2\,R}(x_0))>0\), we eventually get the desired conclusion.

We prove the second part of the statement. We first observe that it is sufficient to prove that \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\) is a Banach space. We take \(\{u_n\}_{n\in {\mathbb {N}}}\subset {\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\) to be a Cauchy sequence. Then we get that this is a Cauchy sequence in the Banach space \(L^p(\Omega ;d_\Omega ^{-s\,p})\) and that

$$\begin{aligned} \{D^s u_n\}_{n\in {\mathbb {N}}}\qquad \hbox { where } D^s \varphi (x,y):=\frac{\varphi (x)-\varphi (y)}{|x-y|^{\frac{N}{p}+s}}, \end{aligned}$$

is a Cauchy sequence in \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\). This follows from the fact that

$$\begin{aligned}{}[u_n]_{W^{s,p}({\mathbb {R}}^N)}=\Vert D^s u_n\Vert _{L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)}. \end{aligned}$$

Moreover, according to (3.1), the sequence \(\{u_n\}_{n\in {\mathbb {N}}}\) is also a Cauchy sequence in the Banach space \(L^p_{s\,p}({\mathbb {R}}^N)\). The last fact implies that there exists \(u\in L^p_{s\,p}({\mathbb {R}}^N)\) such that

$$\begin{aligned} \lim _{n\rightarrow \infty }\int _{{\mathbb {R}}^N} \frac{|u_n(x)-u(x)|^p}{(1+|x|)^{N+s\,p}}\,dx=0. \end{aligned}$$

In particular, up to a subsequence, we can suppose that \(u_n\) converges to u almost everywhere in \({\mathbb {R}}^N\). By using the completeness of \(L^p(\Omega ;d_\Omega ^{-s\,p})\), we get similarly the existence of \({\widetilde{u}}\in L^p(\Omega ;d_\Omega ^{-s\,p})\) such that

$$\begin{aligned} \lim _{n\rightarrow \infty } \int _\Omega \frac{|u_n-{{\widetilde{u}}}|^p}{d_\Omega ^{s\,p}}\,dx=0. \end{aligned}$$

By uniqueness of the limit, we must have \(u={{\widetilde{u}}}\) almost everywhere in \(\Omega \). Finally, by using that \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\) is a Banach space, we get that there exists \(\phi \in L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\) such that

$$\begin{aligned} \lim _{n\rightarrow \infty } \Vert D^s u_n-\phi \Vert _{L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)}=0. \end{aligned}$$

This in particular would imply that

$$\begin{aligned} \lim _{n\rightarrow \infty }D^s u_n(x,y)=\phi (x,y),\qquad \hbox { for a. e. } (x,y)\in {\mathbb {R}}^N\times {\mathbb {R}}^N, \end{aligned}$$

up to a subsequence. On the other hand, by using the almost everywhere convergence of \(u_n\) previously inferred, we also obtain that

$$\begin{aligned} \lim _{n\rightarrow \infty }D^s u_n(x,y)=D^s u(x,y),\qquad \hbox { for a. e. } (x,y)\in {\mathbb {R}}^N\times {\mathbb {R}}^N. \end{aligned}$$

By using the uniqueness of the limit, we get at the same time that

$$\begin{aligned}{}[u]_{W^{s,p}({\mathbb {R}}^N)}<+\infty \qquad \hbox { and } \lim _{n\rightarrow \infty } \Vert D^s u_n-D^s u\Vert _{L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)}=\lim _{n\rightarrow \infty } [u_n-u]_{W^{s,p}({\mathbb {R}}^N)}=0. \end{aligned}$$

This concludes the proof. \(\square \)

In the next technical lemma, we show that the summability of a negative power of the distance implies certain geometric properties of the open set.

Lemma 3.4

Let \(N\ge 1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set such that

$$\begin{aligned} \int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx<+\infty , \end{aligned}$$

for some \(\alpha >0\). Then we must have \(\alpha <N\). Moreover, we have the estimates

$$\begin{aligned} r_\Omega \le \left( \frac{2^\alpha }{\omega _N}\,\int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx\right) ^\frac{1}{N-\alpha }\qquad \hbox { and }\qquad |\Omega |\le \left( \frac{2^\alpha }{\omega _N}\right) ^\frac{\alpha }{N-\alpha }\,\left( \int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx\right) ^\frac{N}{N-\alpha },\nonumber \\ \end{aligned}$$
(3.3)

where \(r_\Omega \) is defined in (2.1).

Proof

We take \(x_0\in \Omega \) and consider the open ball \(B_r(x_0)\) with radius \(r=d_\Omega (x_0)\). This implies that

$$\begin{aligned} B_r(x_0)\subset \Omega \qquad \hbox { and }\qquad \partial B_r(x_0)\cap \partial \Omega \not =\emptyset . \end{aligned}$$

Let us call \({\widetilde{x}}_0\) a point contained in this intersection. By observing that

$$\begin{aligned} d_\Omega (x)\le |x-{\widetilde{x}}_0|,\qquad \hbox { for every } x\in B_{r}(x_0), \end{aligned}$$

we get

$$\begin{aligned} +\infty >\int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx\ge \int _{B_r(x_0)} \frac{1}{|x-{\widetilde{x}}_0|^\alpha }\,dx. \end{aligned}$$

By using spherical coordinates, we see that the last integral diverges for \(\alpha \ge N\). Thus we get the first statement.

In order to get the claimed estimates, we go on by estimating from below the last integral as follows

$$\begin{aligned} +\infty >\int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx\ge \frac{1}{2^\alpha \,r^\alpha }\,\int _{B_{r}(x_0)} \,dx=\frac{\omega _N}{2^\alpha }\,r^{N-\alpha }=\frac{\omega _N}{2^\alpha }\,d_\Omega (x_0)^{N-\alpha }. \end{aligned}$$

Since \(\alpha <N\) from the first part of the proof, we can take the supremum on \(x_0\in \Omega \) and get that the distance function is actually bounded. Moreover, we obtain the first estimate in (3.3), thus in particular the inradius is finite. In turn, by using this fact we get

$$\begin{aligned} \int _\Omega \frac{1}{d_\Omega ^\alpha }\,dx\ge \frac{1}{r_\Omega ^\alpha } \int _{\Omega }\,dx =\frac{|\Omega |}{r_\Omega ^\alpha }, \end{aligned}$$

which shows that the volume is finite, as well, together with the second estimate in (3.3). This concludes the proof. \(\square \)

As a straightforward consequence of Lemma 3.4, we get the following

Lemma 3.5

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set. Then for \(s\,p\ge N\) the unique constant function contained in \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\) is the null one.

The same conclusion holds also for \(s\,p<N\), if we additionally suppose that \(|\Omega |=+\infty \).

In the next result we compare the two spaces \({\widetilde{W}}^{s,p}_0(\Omega )\) and \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\).

Proposition 3.6

Let \(1<p<\infty \) and \(0<s<1\). Let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set such that \({\mathfrak {h}}_{s,p}(\Omega )>0\). Then we have

$$\begin{aligned} {\widetilde{W}}^{s,p}_0(\Omega )\subseteq {\mathcal {X}}^{s,p}_0(\Omega ;d_{\Omega }), \end{aligned}$$
(3.4)

and the inclusion is continuous. Moreover, if we assume that \(r_\Omega <+\infty \), then

$$\begin{aligned} {\widetilde{W}}^{s,p}_0(\Omega )= {\mathcal {X}}^{s,p}_0(\Omega ;d_{\Omega }), \end{aligned}$$

and

$$\begin{aligned} \varphi \mapsto [\varphi ]_{W^{s,p}({\mathbb {R}}^N)}, \end{aligned}$$
(3.5)

is an equivalent norm on this space. Finally, if we further require that \(|\Omega |<+\infty \), then we have the continuous embedding

$$\begin{aligned} {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\hookrightarrow L^p(\Omega ), \end{aligned}$$

and this is compact, as well.

Proof

By recalling Remark 3.2, we know that (3.5) is an equivalent norm on \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\). Since we trivially have

$$\begin{aligned}{}[\varphi ]_{W^{s,p}({\mathbb {R}}^N)} \le \Vert \varphi \Vert _{W^{s,p}({\mathbb {R}}^N)},\qquad \hbox { for every } \varphi \in C^\infty _0(\Omega ), \end{aligned}$$

the continuous inclusion (3.4) easily follows.

We now assume that \(r_\Omega <+\infty \). In conjuction with Hardy’s inequality and recalling (2.1), this yields

$$\begin{aligned} \int _\Omega |\varphi |^p\,dx\le r_\Omega ^{s\,p}\,\int _\Omega \frac{|\varphi |^p}{d_\Omega ^{s\,p}}\,dx\le \frac{r_\Omega ^{s\,p}}{{\mathfrak {h}}_{s,p}(\Omega )}\,[\varphi ]^p_{W^{s,p}({\mathbb {R}}^N)},\qquad \hbox { for every } \varphi \in C^\infty _0(\Omega ). \end{aligned}$$

Thus we get that

$$\begin{aligned} \varphi \mapsto \Vert \varphi \Vert _{{\mathcal {X}}^{s,p}({\mathbb {R}}^N)}\qquad \hbox { and }\qquad \varphi \mapsto \Vert \varphi \Vert _{W^{s,p}({\mathbb {R}}^N)}, \end{aligned}$$

are equivalent norms on \(C^\infty _0(\Omega )\), again thanks to Remark 3.2. Then the claimed identity of the two closures immediately follows. The last statement is now an easy consequence of the same property for the space \({\widetilde{W}}^{s,p}_0(\Omega )\), which is well-known. \(\square \)

Remark 3.7

Under the sole assumption that \({\mathfrak {h}}_{s,p}(\Omega )>0\), in general we have

$$\begin{aligned} {\widetilde{W}}^{s,p}_0(\Omega ) \subset {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\qquad \hbox { and }\qquad {\widetilde{W}}^{s,p}_0(\Omega ) \not = {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega }), \end{aligned}$$

contrary to what incorrectly stated in [10, Theorem 5.1], for the local case \(s=1\). As a counter-example, it is sufficient to take any open set \(\Omega \subsetneq {\mathbb {R}}^N\) such that

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )>0\qquad \hbox { and }\qquad \inf _{\varphi \in C^\infty _0(\Omega )} \left\{ [\varphi ]^p_{W^{s,p}({\mathbb {R}}^N)}\,:\, \int _\Omega |\varphi |^p\,dx=1\right\} =0. \end{aligned}$$

For example, we can take \(\Omega \) to be a half-space. In such a case, we have by construction

$$\begin{aligned} {\widetilde{W}}^{s,p}_0(\Omega )\hookrightarrow L^p(\Omega ), \end{aligned}$$

while

$$\begin{aligned} {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\not \hookrightarrow L^p(\Omega ). \end{aligned}$$

We can finally prove a compactness result for the space \({\mathcal {X}}^{s,p}_0(\Omega )\), under minimal assumptions on the open set \(\Omega \). This will be crucially exploited in the proof of Lemma 4.2.

Theorem 3.8

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set such that \({\mathfrak {h}}_{s,p}(\Omega )>0\). Let \(\{u_n\}_{n \in {\mathbb {N}}}\subset {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\) be such that

$$\begin{aligned}{}[u_n]^p_{W^{s,p}({\mathbb {R}}^N)}\le M,\qquad \hbox { for every } n\in {\mathbb {N}}, \end{aligned}$$

for some \(M>0\). Then there exist a function \(u \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\) and a subsequence \(\{u_{n_k}\}_{k\in {\mathbb {N}}}\) such that

$$\begin{aligned} \lim _{k\rightarrow \infty }u_{n_k}(x)= u(x), \qquad \hbox { for a. e. } x\in {\mathbb {R}}^N. \end{aligned}$$

Moreover, for every \(\Omega '\Subset \Omega \), we also have

$$\begin{aligned} \lim _{k\rightarrow \infty } \Vert u_{n_k}-u\Vert _{L^p(\Omega ')}=0, \end{aligned}$$

up to a possible further subsequence.

Proof

We need two distinguish two cases: either \(|\Omega |<+\infty \) or \(|\Omega |=+\infty \).

Case 1: \(\Omega \) has finite volume. This is the easiest case: here the result plainly follows from Proposition 3.6. We also observe that the last statement actually holds in a stronger form, since we can infer convergence in \(L^p(\Omega )\).

Case 2: \(\Omega \) has infinite volume. We still use the notation \(D^s \varphi \) for a measurable function, as in Proposition 3.3. Thus, by assumption, we get that \(\{D^s u_n\}_{n\in {\mathbb {N}}}\) is a bounded sequence in \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\). This entails that, up to a subsequence, it is weakly converging in \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\). For simplicity, we do not relabel the subsequence. Let us call \(\phi \) such a limit. We may apply Mazur’s Lemma (see [12, Theorem 2.13]) and get that for every \(n\in {\mathbb {N}}\) there exists

$$\begin{aligned} \big \{t_\ell (n)\big \}_{\ell =0}^n\subset [0,1],\qquad \hbox { such that } \qquad \sum _{\ell =0}^n t_\ell (n)=1, \end{aligned}$$

and such that the new sequence made of convex combinations

$$\begin{aligned} \widetilde{\phi }_{n}(x,y)=\sum _{\ell =0}^n t_\ell (n)\,D^s u_\ell (x,y), \end{aligned}$$

strongly converges in \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\) to \(\phi \), as n goes to \(\infty \). Observe that by construction we have

$$\begin{aligned} \sum _{\ell =0}^n t_\ell (n)\,D^s u_\ell =D^s\left( \sum _{\ell =0}^n t_\ell (n)\,u_\ell \right) , \end{aligned}$$

and

$$\begin{aligned} {\widetilde{u}}_n:=\sum _{\ell =0}^n t_\ell (n)\,u_\ell \in {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega ), \end{aligned}$$

since the latter is a vector space. This proves that \(\{D^s {\widetilde{u}}_n\}_{n\in {\mathbb {N}}}\) is a Cauchy sequence in \(L^p({\mathbb {R}}^N\times {\mathbb {R}}^N)\) and this, in turn, implies that \(\{{{\widetilde{u}}}_n\}_{n\in {\mathbb {N}}}\) is a Cauchy sequence in \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\), thanks to Remark 3.2. By using that \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\) is a Banach space, we get that \(\{{{\widetilde{u}}}_n\}_{n\in {\mathbb {N}}}\) converges in this space to a limit function \(u\in {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\). In particular, we must have

$$\begin{aligned} D^s u=\phi . \end{aligned}$$

We now want to prove that \(\{u_n\}_{n\in {\mathbb {N}}}\) converges almost everywhere on \({\mathbb {R}}^N\) to the function u, up to a subsequence. We first observe that all the elements of \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\) vanish almost everywhere in \({\mathbb {R}}^N\setminus \Omega \), by construction. Thus we only need to prove convergence almost everywhere in \(\Omega \).

We denote by \(\{\Omega _k\}_{k \in {\mathbb {N}}}\) an exhausting sequence for \(\Omega \), made of bounded open subsets with smooth boundary: in other words

$$\begin{aligned} \Omega _k\Subset \Omega ,\quad \Omega _k \Subset \Omega _{k+1} \hbox { for every }k\in {\mathbb {N}}\quad \hbox { and }\quad \bigcup _{k \in {\mathbb {N}}} \Omega _k = \Omega , \end{aligned}$$

see [6, Proposition 8.2.1]. We preliminary observe that, thanks to the assumption \({\mathfrak {h}}_{s,p}(\Omega )>0\), we have for every \(k,n\in {\mathbb {N}}\)

$$\begin{aligned} \int _{\Omega _k} |u_n|^p \, dx\le & {} \Vert d_\Omega \Vert _{L^{\infty }({\Omega _k})}^{s\,p} \int _{\Omega _k} \frac{|u_n|^p}{d_{\Omega }^{s\,p}} \, dx \le \frac{1}{{\mathfrak {h}}_{s,p}(\Omega )}\, \Vert d_\Omega \Vert _{L^{\infty }({\Omega _k})}^{s\,p}\, [u_n]^p_{W^{s,p}({\mathbb {R}}^N)}\\\le & {} C_k\,M, \end{aligned}$$

which entails that \(\{u_n\}_{n \in {\mathbb {N}}}\) is a bounded sequence in each \(W^{s,p}(\Omega _k)\). By using the compactness of the embedding \(W^{s,p}({\Omega _k}) \hookrightarrow L^p({\Omega _k})\) (see for example [7, Theorem 7.1]) and a diagonal argument, we can obtain existence of a function \(U\in W^{s,p}_{\textrm{loc}}(\Omega )\) and of a subsequence \(\{u_{n_k}\}_{k\in {\mathbb {N}}}\) such that

$$\begin{aligned} \lim _{k\rightarrow \infty }u_{n_k}(x)= U(x), \qquad \hbox { for a. e. } x\in \Omega . \end{aligned}$$

We then extend U to be 0 outside \(\Omega \): by using Fatou’s Lemma and the almost everywhere convergence, we get

$$\begin{aligned}{}[U]^p_{W^{s,p}({\mathbb {R}}^N)}\le \lim _{k\rightarrow \infty } [u_{n_k}]_{W^{s,p}({\mathbb {R}}^N)}^p\le M. \end{aligned}$$

By further using Hardy’s inequality and (3.1), we also get

$$\begin{aligned} \int _{\Omega } \frac{|U|^p}{d_\Omega ^{s\,p}}\,dx\le \liminf _{k\rightarrow \infty }\int _{\Omega } \frac{|u_{n_k}|^p}{d_\Omega ^{s\,p}}\,dx\le \frac{M}{{\mathfrak {h}}_{s,p}(\Omega )}, \end{aligned}$$

and

$$\begin{aligned} \begin{aligned} \left( \int _{{\mathbb {R}}^N} \frac{|U(x)|^p}{(1+|x|)^{N+s\,p}}\,dx\right) ^\frac{1}{p}&\le \liminf _{k\rightarrow \infty } \left( \int _{{\mathbb {R}}^N} \frac{|u_{n_k}(x)|^p}{(1+|x|)^{N+s\,p}}\,dx\right) ^\frac{1}{p}\\&\le C_\Omega \,\liminf _{k\rightarrow \infty } \left[ [u_{n_k}]_{W^{s,p}({\mathbb {R}}^N)} + \left( \int _{\Omega } \frac{|u_{n_k}|^p}{d_{\Omega }^{s\,p}} \,dx \right) ^\frac{1}{p}\right] \\&\le {\widetilde{C}}. \end{aligned} \end{aligned}$$

This shows that

$$\begin{aligned} U\in {\mathcal {X}}^{s,p}(\Omega ;d_\Omega ). \end{aligned}$$

We now observe that from the first part of the proof, by uniqueness of the weak limit we must have

$$\begin{aligned} D^s u=D^s U,\qquad \hbox { a. e. in } {\mathbb {R}}^N\times {\mathbb {R}}^N. \end{aligned}$$

By recalling the definition of \(D^s\), this in turn implies that there exists a constant \(c\in {\mathbb {R}}\) such that

$$\begin{aligned} u=U+c,\qquad \hbox { a. e. in } {\mathbb {R}}^N. \end{aligned}$$

By using that \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\) is a vector space, the function constantly equal to c must belong to \({\mathcal {X}}^{s,p}(\Omega ;d_\Omega )\). In light of Lemma 3.5, we get that \(c=0\) and thus the desired conclusion holds. \(\square \)

4 Proof of Theorem 1.1

Lemma 4.1

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set. Then:

  • (i) if there exists \(\lambda \ge 0\) such that the Eq. (1.2) admits a positive local weak supersolution u, then \(\lambda \le {\mathfrak {h}}_{s,p}(\Omega )\);

  • (ii) in particular, if u is a positive weak solution in \( {\widetilde{W}}^{s,p}_0(\Omega )\), then \(\lambda ={\mathfrak {h}}_{s,p}(\Omega )\) and u is a minimizer for \({\mathfrak {h}}_{s,p}(\Omega )\).

Proof

In order to prove (i), for every \(\eta \in C^\infty _0(\Omega )\), we test the weak formulation with

$$\begin{aligned} \varphi =\frac{|\eta |^p}{(\varepsilon +u)^{p-1}}, \end{aligned}$$

where \(\varepsilon >0\). We observe that this is a feasible test function, thanks to [2, Lemma 2.7]. By using the discrete Picone inequality (see [9, Lemma 2.6] or [3, Proposition 4.2]), we obtain

$$\begin{aligned} \begin{aligned} \lambda \,\int _\Omega \frac{u^{p-1}}{d_\Omega ^{s\,p}}\,\frac{|\eta |^p}{(\varepsilon +u)^{p-1}}\,dx&\le \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{J_p(u(x)-u(y))\,\left( \dfrac{|\eta |^{p}}{(\varepsilon +u)^{p-1}}(x) -\dfrac{|\eta |^{p}}{(\varepsilon +u)^{p-1}}(y)\right) }{|x-y|^{N+s\,p}}\,dx\,dy\\&\le \iint _{{\mathbb {R}}^N\times {\mathbb {R}}^N} \frac{\Big ||\eta (x)|-|\eta (y)|\Big |^p}{|x-y|^{N+s\,p}}\,dx\,dy\le [\eta ]_{W^{s,p}({\mathbb {R}}^N)}^p. \end{aligned} \end{aligned}$$

In the last inequality we used that

$$\begin{aligned} \big [|\eta |\big ]_{W^{s,p}({\mathbb {R}}^N)}^p\le [\eta ]_{W^{s,p}({\mathbb {R}}^N)}^p, \end{aligned}$$
(4.1)

and the inequality is strict, unless \(\eta \) has constant sign almost everywhere (see the proof of [2, Lemma 3.2]). By taking the limit as \(\varepsilon \) goes to 0 on the left-hand side, using Fatou’s lemma, the positivity of u on \(\Omega \) and the arbitrariness of \(\eta \in C^\infty _0(\Omega )\), this finally gives that \(\lambda \le {\mathfrak {h}}_{s,p}(\Omega )\), as desired.

In order to prove point (ii), we observe that if \(u\in {\widetilde{W}}^{s,p}_0(\Omega )\), we can test the weak formulation of the equation with the solution itself. This yields

$$\begin{aligned}{}[u]_{W^{s,p}({\mathbb {R}}^N)}^p=\lambda \,\int _\Omega \frac{u^p}{d_\Omega ^{s\,p}}\,dx. \end{aligned}$$

On the other hand, by definition of \({\mathfrak {h}}_{s,p}(\Omega )\), we know that

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )\,\int _\Omega \frac{u^p}{d_\Omega ^{s\,p}}\,dx\le [u]_{W^{s,p}({\mathbb {R}}^N)}^p. \end{aligned}$$

This shows that \({\mathfrak {h}}_{s,p}(\Omega )\le \lambda \). Since the reverse inequality holds from (i), we conclude that it must result \(\lambda ={\mathfrak {h}}_{s,p}(\Omega )\). \(\square \)

In the next Lemma, we will use the weighted space \({\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\) studied in Sect. 3.

Lemma 4.2

Let \(1<p<\infty \), \(0<s<1\) and let \(\Omega \subsetneq {\mathbb {R}}^N\) be an open set such that

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )>0. \end{aligned}$$

Then for every \(0\le \lambda <{\mathfrak {h}}_{s,p}(\Omega )\) there exists a positive local weak supersolution \(u_\lambda \in {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\) of the Eq. (1.2). More precisely, the function \(u_\lambda \) is a weak solution of the equation

$$\begin{aligned} (-\Delta _p)^s u=\lambda \,\frac{u^{p-1}}{d_\Omega ^{s\,p}}+1_{B},\qquad \hbox { in }\Omega , \end{aligned}$$
(4.2)

where \(B \Subset \Omega \) is a fixed ball.

Proof

We first observe that, for every \(\varphi \in {\mathcal {X}}^{s,p}_0(\Omega , d_{\Omega })\), we have

$$\begin{aligned} \int _B |\varphi | \,dx\le |B|^{\frac{p-1}{p}} \Vert d_\Omega \Vert _{L^{\infty }(B)}^{s} \, \left( \int _\Omega \frac{|\varphi |^p}{d_\Omega ^{s\,p}}\,dx\right) ^{\frac{1}{p}} \le |B|^{\frac{p-1}{p}} \,\Vert d_\Omega \Vert _{L^{\infty }(B)}^{s} \, \left( \frac{1}{{\mathfrak {h}}_{s,p}(\Omega )}\right) ^{\frac{1}{p}}\,[\varphi ]_{W^{s,p}({\mathbb {R}}^N)}, \end{aligned}$$

thanks to Hölder’s inequality, the definition of \({\mathfrak {h}}_{s,p}(\Omega )\) and the fact that Hardy’s inequality holds in \({\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\), as well (see Remark 3.2). This shows that we have the continuous embedding \({\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\hookrightarrow L^1(B)\), for every \(B \Subset \Omega \) as in the statement.

Let \(0\le \lambda <{\mathfrak {h}}_{s,p}(\Omega )\), we consider the functional

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(\varphi )=\frac{1}{p}\,[\varphi ]^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{\lambda }{p}\,\int _\Omega \frac{|\varphi |^p}{d_\Omega ^{s\,p}}\,dx-\int _B \varphi \,dx,\quad \hbox { for every } \varphi \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega }). \end{aligned}$$

We will construct the desired supersolution as a minimizer of the following problem

$$\begin{aligned} m(\lambda ):=\inf _{\varphi \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })} {\mathfrak {F}}_{\lambda }(\varphi ). \end{aligned}$$

We first notice that by Hardy’s inequality we have, for every \(\varphi \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\)

$$\begin{aligned} \begin{aligned} {\mathfrak {F}}_{\lambda }(\varphi )&\ge \frac{1}{p}\,\left( 1-\frac{\lambda }{{\mathfrak {h}}_{s,p}(\Omega )}\right) \,[\varphi ] ^p_{W^{s,p}({\mathbb {R}}^N)}-\int _B \varphi \,dx\\&\ge \frac{1}{p}\,\left( 1-\frac{\lambda }{{\mathfrak {h}}_{s,p}(\Omega )}\right) \,[\varphi ] ^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{p-1}{p}\,\varepsilon ^\frac{1}{1-p}\,\int _B d_\Omega ^{\frac{s\,p}{p-1}} \,dx\\&\quad -\frac{\varepsilon }{p}\,\int _B \frac{|\varphi |^p}{d_\Omega ^{s\,p}}\,dx\\&\ge \frac{1}{p}\,\left( 1-\frac{\lambda }{{\mathfrak {h}}_{s,p}(\Omega )}\right) \,[\varphi ] ^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{p-1}{p}\,\varepsilon ^\frac{1}{1-p}\,\int _B d_\Omega ^{\frac{s\,p}{p-1}} \,dx\\&\quad -\frac{\varepsilon }{p}\,\frac{1}{{\mathfrak {h}}_{s,p}(\Omega )}\,[\varphi ]^p_{W^{s,p}({\mathbb {R}}^N)}, \end{aligned} \end{aligned}$$

with \(\varepsilon >0\), where we also used Young’s inequality. In particular, by choosing

$$\begin{aligned} \varepsilon =\frac{{\mathfrak {h}}_{s,p}(\Omega )-\lambda }{2}, \end{aligned}$$

we can infer that

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(\varphi )\ge c_1\,[\varphi ]^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{1}{C_1},\qquad \hbox { for every } \varphi \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega }), \end{aligned}$$
(4.3)

where \(c_1>0\) and \(C_1>0\) do not depend on \(\varphi \). This in particular shows that \(m(\lambda )>-\infty \).

Let us now take a minimizing sequence \(\{u_n\}_{n\in {\mathbb {N}}}\subset {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\) such that

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(u_n)\le m(\lambda )+\frac{1}{n+1},\qquad \hbox { for every } n\in {\mathbb {N}}. \end{aligned}$$

By appealing to (4.3), we get in particular that there exists a constant \(M>0\) such that

$$\begin{aligned}{}[u_n]^p_{W^{s,p}({\mathbb {R}}^N)}\le M,\qquad \hbox { for every } n\in {\mathbb {N}}. \end{aligned}$$

By applying Theorem 3.8, we can infer existence of \(u \in {\mathcal {X}}^{s,p}_0(\Omega ; d_{\Omega })\) such that the sequence converges almost everywhere in \({\mathbb {R}}^N\) and such that

$$\begin{aligned} \int _B u_n\,dx=\int _B u\,dx+o(1),\qquad \hbox { as }n\rightarrow \infty , \end{aligned}$$

up to a subsequence. Observe that by construction we have

$$\begin{aligned} m(\lambda )+\frac{1}{n+1}\ge \frac{1}{p}\,[u_n]^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{\lambda }{p}\,\int _\Omega \frac{|u_n|^p}{d_\Omega ^{s\,p}}\,dx-\int _B u_n\,dx\ge m(\lambda ), \end{aligned}$$

which in particular implies that

$$\begin{aligned} \frac{1}{p}\,[u_n]^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{\lambda }{p}\,\int _\Omega \frac{|u_n|^p}{d_\Omega ^{s\,p}}\,dx-\int _B u_n\,dx=m(\lambda )+o(1),\qquad \hbox { as }n\rightarrow \infty .\nonumber \\ \end{aligned}$$
(4.4)

By applying the Brézis-Lieb Lemma (see [5, Theorem 1] and also [4, Lemma 2.2]), we get

$$\begin{aligned} \frac{\lambda }{p}\,\int _\Omega \frac{|u_n|^p}{d_\Omega ^{s\,p}}\,dx=\frac{\lambda }{p}\,\int _\Omega \frac{|u|^p}{d_\Omega ^{s\,p}}\,dx+\frac{\lambda }{p}\,\int _\Omega \frac{|u_n-u|^p}{d_\Omega ^{s\,p}}\,dx+o(1),\qquad \hbox {as }n\rightarrow \infty , \end{aligned}$$

and

$$\begin{aligned}{}[u_n]^p_{W^{s,p}({\mathbb {R}}^N)}=[u]^p_{W^{s,p}({\mathbb {R}}^N)}+[u_n-u]^p_{W^{s,p}({\mathbb {R}}^N)}+o(1),\qquad \hbox { as } n\rightarrow \infty . \end{aligned}$$

By inserting these informations in (4.4), we obtain

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(u)+\frac{1}{p}\,[u_n-u]^p_{W^{s,p}({\mathbb {R}}^N)}-\frac{\lambda }{p}\,\int _\Omega \frac{|u_n-u|^p}{d_\Omega ^{s\,p}}\,dx=m(\lambda )+o(1),\qquad \hbox { as }n\rightarrow \infty . \end{aligned}$$

We can now use Hardy’s inequality for the function \(u_n-u\in {\mathcal {X}}^{s,p}_0(\Omega ;d_\Omega )\). Thanks to the choice of \(\lambda \), it holds that

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(u)\le m(\lambda )+o(1),\qquad \hbox {as }n\rightarrow \infty , \end{aligned}$$

and by taking the limit as n goes to \(\infty \), we finally get that u is a minimizer.

By minimality, we get that u must be non-negative. Indeed, by using (4.1) and observing that

$$\begin{aligned} -\int _B u\,dx\ge -\int _B |u|\,dx, \end{aligned}$$

we have

$$\begin{aligned} {\mathfrak {F}}_{\lambda }(u)\ge {\mathfrak {F}}_{\lambda }(|u|). \end{aligned}$$

Moreover, the inequality sign in the latter is strict, unless u has constant sign almost everywhere. By virtue of the inequality for the integral on B, we get that such a sign must be non-negative, i.e. we must have \(u\ge 0\) almost everywhere in \(\Omega \), as claimed.

Additionally, by minimality u is a weak solution of the Euler-Lagrange equation (4.2). This in particular proves that \(u\not \equiv 0\), thanks to the presence of the term \(1_B\). Observe that (see Proposition 3.3)

$$\begin{aligned} {\mathcal {X}}^{s,p}_0(\Omega )\subset W^{s,p}_{\textrm{loc}}(\Omega )\cap L^{p-1}_{s\,p}({\mathbb {R}}^N), \end{aligned}$$

thus u is a local weak supersolution, in the sense of Definition 2.1. Finally, by using the minimum principle, we get that u is positive on \(\Omega \) (one can proceed as in the proof of [2, Lemma 3.2], for example). \(\square \)

By joining the previous two technical results, we finally get the characterization of the sharp fractional \((s,p)-\)Hardy constant stated in Theorem 1.1.

Proof of Theorem 1.1

We first observe that the set of admissible \(\lambda \) is non-empty: indeed, it always contains \(\lambda =0\). To see this, it is sufficient to observe that any positive constant function is a local weak solution of

$$\begin{aligned} (-\Delta _p)^s u=0,\qquad \hbox { in }\Omega , \end{aligned}$$

which is (1.2) for \(\lambda =0\).

In order to prove the claimed identity, we first consider the case \({\mathfrak {h}}_{s,p}(\Omega )=0\). Then, the previous discussion and Lemma 4.1 imply that the set of admissible \(\lambda \) is actually given by the singleton \(\{0\}\). Thus the conclusion holds.

In the case \({\mathfrak {h}}_{s,p}(\Omega )>0\), again by Lemma 4.1, we have that \({\mathfrak {h}}_{s,p}(\Omega )\ge \lambda \) for every \(\lambda \) such that (1.2) admits a positive local weak supersolution. On the other hand, from Lemma 4.2 we have that for every \(\varepsilon >0\) if we take

$$\begin{aligned} {\mathfrak {h}}_{s,p}(\Omega )-\varepsilon<\lambda <{\mathfrak {h}}_{s,p}(\Omega ), \end{aligned}$$

then (1.2) admits a positive local weak supersolution. This concludes the proof. \(\square \)