On density of compactly supported smooth functions in fractional Sobolev spaces

We describe some sufficient conditions, under which smooth and compactly supported functions are or are not dense in the fractional Sobolev space $W^{s,p}(\Omega)$ for an open, bounded set $\Omega\subset\mathbb{R}^{d}$. The density property is closely related to the lower and upper Assouad codimension of the boundary of $\Omega$. We also describe explicitly the closure of $C_{c}^{\infty}(\Omega)$ in $W^{s,p}(\Omega)$ under some mild assumptions about the geometry of $\Omega$. Finally, we prove a variant of a fractional order Hardy inequality.


Introduction
We discuss the problem of density of compactly supported smooth functions in the fractional Sobolev space W s,p (Ω), which is well known to hold when Ω is a bounded Lipschitz domain and sp ≤ 1 [14,Theorem 1.4.2.4], [26,Theorem 3.4.3]. We extend this result to bounded, plump open sets with a dimension of the boundary satisfying certain inequalities. To this end, we use the Assouad dimensions and codimensions. We also describe explicitly the closure of C ∞ c (Ω) in the fractional Sobolev space, provided that Ω satisfies the fractional Hardy inequality.
Let Ω ⊂ R d be an open set. Let 0 < s < 1 and 1 ≤ p < ∞. We recall that the fractional Sobolev space is defined as W s,p (Ω) = f ∈ L p (Ω) : Ω Ω |f (x) − f (y)| p |x − y| d+sp dy dx < ∞ . This is a Banach space endowed with the norm where [f ] W s,p (Ω) = Ω Ω |f (x)−f (y)| p |x−y| d+sp dy dx 1/p is called the Gagliardo seminorm. Through-valid also for complex-valued functions, by means of decomposing them into a sum of real and imaginary part.
Definition 1. By W s,p 0 (Ω) we denote the closure of C ∞ c (Ω) (the space of all smooth functions with compact support in Ω) in W s,p (Ω) with respect to the Sobolev norm.
The following theorem is our main result on the connection between W s,p 0 (Ω) and W s,p (Ω). For the relevant geometric definitions, we refer the Reader to Section 2. Here we only note that for bounded Lipschitz domains one has co dim A (∂Ω) = co dim A (∂Ω) = 1 and the other geometrical assumptions of Theorem 2 do hold (that is, bounded Lipschitz domains are (d − 1)-homogeneous and κ-plump), hence the classical case is included.
We remark that a result similar to the part (I) and (III) in the Theorem 2 was obtained by Caetano in [6] in the context of Besov spaces and Triebel-Lizorkin spaces, but with the Minkowski dimension instead of Assouad dimension. That result is not directly comparable with ours, as for less regular domains spaces W s,p do not necessiraly coincide with the appropriate Triebel-Lizorkin spaces. We refer the Reader to [5] for a discussion on the space W s,p 0 and different similarly defined spaces. We also want to mention that analogous, but slightly different problems were considered in [12] (spaces of functions vanishing outside Ω), [8] (the weighted case) and [1] (spaces with variable exponents).
In the case (III) above we also obtain the following characterisation of the space W s,p 0 (Ω). For the proof, see Section 5. Theorem 3. Let 0 < s < 1 and 1 ≤ p < ∞. Suppose that Ω = ∅ is a bounded, open κ-plump set. If co dim A (∂Ω) < sp, then In the case (I) of Theorem 2 equality (1) also holds, or in other words, we have an inclusion between the Sobolev and weighted L p space, W s,p (Ω) ⊂ L p (Ω, dist(x, ∂Ω) −sp ). This fact is made quantitative in the next theorem; for its proof, see Section 5 as well.
Finally, we extend the results of [11,Theorem 1,Corollary 3]. Namely, we prove the case (T') in the following version of the fractional Hardy inequality. For the definitions of the conditions WLSC and WUSC we refer the reader to the Appendix, while the plumpness and Assouad dimensions are defined in Section 2. We would also like to note that a special case of (T') (assuming in particular p = 2) was proved in [25,Lemma 3.32] and [7]. Theorem 5 ( [11] in cases (T) and (F)). Let 0 < p < ∞, H ∈ (0, 1] and η ∈ R. Suppose Ω = ∅ is a proper κ-plump open set in R d and φ : (0, ∞) → (0, ∞) is a function so that either condition (T), or condition (T'), or condition (F) holds , Ω is bounded or ∂Ω is unbounded, and φ ∈ WLSC(η, 0, H).
Then there exist constants c = c(d, s, p, Ω, φ) and R such that the following inequality holds for all measurable functions u for which the left hand side is finite, with ξ = 0 in the cases (T ) and (F ) and ξ = 1 in the case (T ′ ).
There is a huge literature about fractional Hardy inequalities; we refer the Reader to [9,11,17] and the references therein. We would also like to draw Reader's attention to a paper [23] from 1999 by Farman Mamedov. This not very well-known paper is one of the first to deal with multidimensional fractional order Hardy inequalities.
The authors would like to thank Lorenzo Brasco for helpful discussions on the subject, in particular for providing a part of the proof of Theorem 2, and the anonymous referee for numerous comments which led to an improvement of the manuscript.

Geometrical definitions
We denote the distance from For open sets Ω ⊂ R d we define the inner tubular neighbourhood of Ω as Ω r = {x ∈ Ω : d Ω (x) ≤ r} , and for arbitrary sets E ⊂ R d we define the tubular neighbourhood of E as is defined as the supremum of all q ≥ 0, for which there exists a constant C = C(q) ≥ 1 such that for all x ∈ E and 0 < r < R < diam E it holds Conversely, the upper Assouad codimension co dim A (E) is defined as the infimum of all s ≥ 0, for which there exists a constant c = c(s) > 0 such that for all x ∈ E and 0 < r < R < diam E it holds We remark that having strict inequality R < diam E above makes the definitions applicable also for unbounded sets E; for bounded sets E we could have R ≤ diam E. In and dim A (E) denote respectively the well known lower and upper Assouad dimension -see for example [18,Section 2] for this result. Recall that the upper Assouad dimension of a given set E is defined as the infimum of all exponents s ≥ 0 for which there exists a constant C = C(s) ≥ 1 such that for all x ∈ E and 0 < r < R < diam E the ball B(x, R) ∩ E can be covered by at most C(R/r) s balls with radius r, centered at E. Analogously, the lower Assouad dimension is characterized by the supremum of all exponents t ≥ 0 for which there is a constant c = c(t) > 0 such that the ball B(x, R) ∩ E can be covered by at least c(R/r) t balls with radius r and centered at E. If co dim A (E) = co dim A (E), we simply denote it by co dim A (E).
We recall a geometric notion from [27].
If 0 < r < R < diam(E), then taking λ = R/r in the definition gives Finally, let us note that for example in part I of Theorem 2, we need the assumption sp < co dim A (∂Ω) only to obtain the bound (5). For that a slightly weaker assumption in terms of Minkowski (co)dimension would suffice, however, we need Assouad (co)dimensions for other parts of the paper and therefore we prefer to use only them. Let us only recall that the upper Minkowski dimension of a set E ⊂ R d is defined as see for example [15,Section 2]. The statement of the part (I) of Theorem 2 remains true if we assume that sp < d − dim M (∂Ω).

Lemmas
The following lemma is the key to our further computations. We recall that Ω 3 n appearing in (4) is the inner tubular neighbourhood of Ω, see Definition 6.
There exists a constant C = C(d, s, p, Ω) > 0 such that the following inequality holds for all functions f ∈ W s,p (Ω) Proof. Fix f ∈ W s,p (Ω) and define f n = f v n . We have First we estimate J 1 , Since |v n | ≤ 1, we obtain Since |v n | ≤ 1, for J 2 we have Hence, we obtain for some (new) constant C that Definition 11. By W s,p c (Ω) we denote the closure of all compactly supported functions in W s,p (Ω) (not necessarily smooth) with respect to the Sobolev norm.
The key property, which allows us to get rid of the smoothness and rely only on the compactness of the support, is the result below.
It turns out that to prove the density of compactly supported functions in the fractional Sobolev space, we only need to find a sequence which approximates the function 1 Ω (the indicator of Ω).

Lemma 13.
Let Ω be an open set such that |Ω| < ∞. We have W s,p 0 (Ω) = W s,p (Ω) ⇐⇒ 1 Ω ∈ W s,p 0 (Ω) Proof. Implication " =⇒ " is obvious, therefore we proceed to prove the implication from right to left. According to Proposition 12, we need to prove that if the function 1 Ω can be approximated by some family of functions g n ∈ W s,p c (Ω), then every function f ∈ W s,p (Ω) can be approximated by functions from W s,p c (Ω). Since L ∞ (Ω) ∩ W s,p (Ω) is dense in W s,p (Ω) (because the truncated functions f N = min {max {f, −N} , N} tend to f in W s,p (Ω), as N −→ ∞), we may assume that f ∈ L ∞ (Ω). Moreover, we may also assume that 0 ≤ g n ≤ 1, because if g n −→ 1 Ω in W s,p (Ω), then also g n = max{min{g n , 1}, 0} −→ 1 Ω , since we have | g n (x) − g n (y)| ≤ |g n (x) − g n (y)|.
Define f n = f g n ∈ W s,p c (Ω). Observe that Since g n −→ 1 Ω in L p (Ω), there is a subsequence g n k −→ 1 Ω almost everywhere. Hence, for such a subsequence we have The first term above is convergent to 0, since g n k −→ 1 Ω in W s,p (Ω). The convergence of the second term follows from Lebesgue dominated convergence theorem. Moreover, it is trivial to show that f n −→ f in L p (Ω) and hence the proof is finished.

Proof of Theorem 2
Proof of Theorem 2, case I. According to Lemma 13, we only need to prove that the function f = 1 Ω can be approximated by compactly supported functions. Let f n = f v n , where v n is as in the Lemma 10 and let d = co dim A (∂Ω). By Lemma 10 (note that in this case the second term in inequality (4) is 0) we have If sp < d, then, by the definition of lower Assouad codimension, for every ε > 0 we have Hence, for some new constant C we have [f n ] p W s,p (Ω) ≤ Cn sp n ε−d −→ 0, when n −→ ∞, by choosing 0 < ε < d−sp, which is feasible thanks to our assumption.
Proof of Theorem 2, case II. We proceed like in the above proof of the first part of the Theorem 2 and obtain Since Ω is (d−sp)-homogeneous and co dim A (∂Ω) = sp, then it follows that Ω 3 n ≤ C ′ n −sp and, in consequence, the sequence {f n } n∈N is bounded in W s,p (Ω).
The following argument was kindly pointed out to us by Lorenzo Brasco, see also [4,Theorem 4.4] for a similar argument. It is well known that for p > 1 the space W s,p (Ω) is reflexive. Hence, by Banach-Alaoglu and Eberlein-Šmulian theorem, there exists a subsequence {f n k } k∈N weakly convergent to some f . Since W s,p 0 (Ω) is both closed and convex subset of W s,p (Ω), by [3,Theorem 2.3.6] it is also weakly closed, so we have f ∈ W s,p 0 (Ω). Then it suffices to see that f = 1 Ω by the uniqueness of the limit, since f n k strongly converges to 1 Ω in L p (Ω). This ends the proof.
Proof of Theorem 2, case III. Let d = co dim A (∂Ω). We will show that the indicator of Ω cannot be approximated by functions with compact support. Indeed, let u n be any sequence of compactly supported function such that u n − 1 Ω W s,p (Ω) −→ 0. In particular u n −→ 1 Ω in L p (Ω), so there is a subsequence u n k convergent almost everywhere to 1 Ω . If sp > d, we can use the fractional Hardy inequality from [11,Corollary 3] in the case (F) with β = 0 to obtain We obtain a contradiction. Example 15. (Koch snowflake) Let Ω ⊂ R 2 denote the domain bounded by the Koch snowflake. It is well known that the Hausdorff dimension of the Koch curve is log 4 log 3 . Thus also its Assouad dimension is log 4 log 3 , since it is a self-similar set satisfying open set condition, see [13,Corollary 2.11]. The Koch snowflake is a finite union of copies of Koch curves, therefore its Assouad dimension is again log 4 log 3 , see [13,Theorem 2.2] and [22,Theorem A.5(3)]. Hence co dim A (∂Ω) = 2 − log 4 log 3 . Moreover, by [21, Theorem 1.1] the volume of the inner tubular neighbourhood of Ω is described by the formula where G 1 and G 2 are continuous, periodic functions (in consequence bounded). Hence, for r < 1 we have |Ω r | = O r 2− log 4 log 3 . Since in addition Ω is κ -plump, by Theorem 2 we obtain that if p = 1, 5. The space W s,p 0 (Ω) Based on our previous results, we are able to describe explicitly the space W s,p 0 (Ω) in some particular cases. Namely, we can describe this space for Ω, s and p satisfying the following weak fractional Hardy inequality.
Definition 16. We say that Ω admits a weak (s, p)-fractional Hardy inequality, if there exists a constant c = c(d, s, p, Ω) such that for every f ∈ C ∞ c (Ω) it holds In the case when the norm f W s,p (Ω) above can be replaced by the seminorm [f ] W s,p (Ω) , we say that Ω admits an (s, p)-fractional Hardy inequality.
Theorem 17. Suppose that Ω admits a weak (s, p)-fractional Hardy inequality. Then when n −→ ∞. In fact, for that part we do not need the assumption about Hardy inequality. Suppose that Ω admits a weak (s, p)-Hardy inequality and f ∈ W s,p 0 (Ω). Let f n be a sequence of smooth and compactly supported functions convergent to f in W s,p (Ω). In particular, f n −→ f in L p (Ω), so there exists a subsequence f n k convergent to f almost everywhere. We have by Fatou lemma Proof of Theorem 3. From part (F) of Theorem 5 with η = sp, ϕ(t) = t sp , Ω admits an (s, p)-fractional Hardy inequality and also a weak (s, p)-fractional Hardy inequality. Thus the result follows from Theorem 17.
Proof of Theorem 4. From part (T') of Theorem 5, inequality (2) holds for all functions f for which the left hand side of (2) is finite. Thus by Theorem 3, it holds for all functions f ∈ W s,p 0 (Ω). However, by part (I) of Theorem 2, W s,p 0 (Ω) = W s,p (Ω) and the result follows.

Appendix
We recall from [2, Section 3] the notion of a global weak lower (or upper) scaling condition (WLSC or WUSC for short). As in [11], we will use a different, but equivalent formulation. We note that in our setting the middle parameter in WLSC or WUSC is always zero and thus we could omit it, however we prefer to keep the notation consistent with [2,11].
We begin with the following observation: (7) If Ω ⊂ R d is a nonempty open bounded set, then dim A (∂Ω) ≥ d − 1.
For the proof, we will provide the following argument by the user rpotrie from [24]. Since ∂Ω disconnects R d , its topological dimension has to be at least d −  (7) holds.
Proof of case (T') in Theorem 5. It seems possible to adapt the original proof for this case, however, since the proof was quite involved and technical, we prefer to choose another strategy. Namely, we will reduce (T') to the case (T). Let us assume that the general assumptions of Theorem 5 and the assumptions in (T') hold. Let us fix x 0 ∈ Ω and put M = diam Ω.
We may also need to redefine the function φ. To this end, put η 0 = η if η > 0, while in the case when η ≤ 0, we choose η 0 > 0 such that We note that this is possible, because κ-plumpness of Ω implies that ∂Ω is porous, and that in turn by [22,Theorem 5.2] implies that dim A (∂Ω) < d. We define We claim that such a function ψ satisfies the condition WUSC(η 0 , 0, H −1 ). We omit a straightforward check of (6) in three possible cases, when the two numbers st ≤ s in that equation lie in either (0, M] or (M, ∞).
We apply the case (T) of the Theorem 5 (proved in [11]) to the open set G, the number η 0 and the function ψ ∈ WUSC(η 0 , 0, H −1 ). It follows that there exist constants c and R such that holds for all measurable functions u : G → R for which the left hand side is finite. Let us consider an arbitrary measurable functions u : Ω → R for which Ω |u(x)| p φ(d G (x)) dx < ∞, and extend it by zero on Ω 1 to obtain a function defined on the whole set G. Inequality (8) for this function u has the following form, |u(y)| p ψ(d G (x))d G (x) d dy dx + c Ω Ω 1 ∩B(x,Rd G (x))) |u(x)| p ψ(d G (x))d G (x) d dy dx =: c(I 1 + I 2 + I 3 ).
Therefore the integral in (9) is convergent and so I 2 ≤ c ′ u p L p (Ω) . For the integral I 3 we observe that when x ∈ Ω and y ∈ Ω 1 ∩ B(x, Rd G (x)), then d G (x) = d Ω (x) and M ≤ |y − x| ≤ Rd G (x), so d G (x) ≥ M/R. Therefore by (10) the function ψ(d G (x)) −1 d G (x) −d is bounded from above. Furthermore, since |y − x 0 | ≤ M + |y − x| ≤ M + Rd G (x) ≤ M(1 + R), the following inclusion Ω 1 ∩ B(x, Rd G (x)) ⊂ B(x 0 , M(1 + R)) holds for all x ∈ Ω. Thus also in this case I 3 ≤ c ′ u p L p (Ω) . Consequently, I 1 is equal to the first term on the right side of (3), while I 2 and I 3 are bounded by the second term.