1 Introduction

Variable exponent Lebesgue-Sobolev and Hölder spaces are nowadays used in the description of non-linear phenomena in elastic [23] and fluid mechanics [18, 20], and in image restoration [14, 22], among other fields. Those situations are modelled in domains of Euclidean space, whose shape or form becomes part of the phenomena itself.

For classical Sobolev and Hölder spaces, the study of conditions on domains in \( {\mathbb {R}}^n \) relevant for the inclusions between these spaces of functions is a classical subject [1]; in turn, the importance of the shape and regularity of the domain is relevant in the description of some models in engineering [9].

This work is a continuation of [5], where inclusions of variable exponent Sobolev spaces on Euclidean domains are studied. In turn, some notions of continuity for the exponent used in [5] are motivated by problems mentioned in [3, 11] concerning the density of smooth functions in those spaces, where the interdependence between some types of continuity of the variable exponent and the regularity of the domain is addressed. In the same spirit as in [5], here we obtain conditions for the inclusions between these function spaces in terms of the continuity of the exponent and the regularity of the domain.

As highlighted in [5], an important progress concerning necessary conditions on the regularity of the domain to obtain inclusions in classical Sobolev spaces was achieved in [10]. Similar results have been obtained in fractional Slobodeckij-Sobolev spaces [7, 24], in Triebel-Lizorkin and Besov spaces [15, 16], and in Hajłasz-Sobolev spaces in metric-measure spaces [2, 6].

This paper is organized as follows. In Sect. 2 we provide a brief description of the spaces of functions,Footnote 1 of the continuity for the exponents, and of the regularity for domains relevant in this work. With those preliminaries we are ready for Sect. 3, where the main results are stated, and their proofs are provided. These results improve those in [5]: the hypothesis on the range of values and continuity of the exponents are weaker, as a conclusion less regularity on the domain is needed for the functional inclusions to hold, see Sect. 3 for the deatils. We conclude in Sect. 4 with a couple of questions that arose during this work.

2 Preliminaries

We denote by \({\mathcal {L}}^n\) the n-dimensional Lebesgue measure, and \(\Omega \) will be a Lebesgue measurable subset of \({\mathbb {R}}^n\). If A is a \({\mathcal {L}}^n\)-measurable subset of \(\Omega \), to abbreviate we write |A| instead of \(\int _A d {\mathcal {L}}^n(x) = {\mathcal {L}}^n(A)\). A variable exponent, or simply an exponent, is a bounded \({\mathcal {L}}^n\)-measurable function \(p: \Omega \rightarrow [1,\infty [\), usually written as \(p(\cdot )\). For such a \(p(\cdot )\), whenever A a \({\mathcal {L}}^n\)-measurable subset of \(\Omega \) define

$$\begin{aligned} p_A^-:= \text {ess} \inf \ \{ p(x): x\ \text {in}\ A \}\ \text {and}\ p_A^+:= \text {ess} \sup \ \{ p(x): x\ \text {in}\ A \}. \end{aligned}$$

If \(A = \Omega \), we simply write \(p^-\) and \(p^+\), respectively.

The Lebesgue space \(L^{{p( \cdot )}}(\Omega )\) is the vector space of measurable functions \(u: \Omega \rightarrow {\mathbb {R}}\) for which the functional

$$\begin{aligned} \rho _{{p( \cdot )}}(u):= \int _{\Omega } |u(x)|^{p(x)} d {\mathcal {L}}^n(x) \end{aligned}$$

is finite. The functional \(\rho _{{p( \cdot )}}\) is convex, and \(L^{{p( \cdot )}}(\Omega )\) is a Banach space with the norm

$$\begin{aligned} \Vert u \Vert _{L^{{p( \cdot )}}(\Omega )}:= \inf \{ t > 0: \rho _{{p( \cdot )}}(u/t) \le 1 \}. \end{aligned}$$

The functionals \(\Vert \ \Vert _{L^{{p( \cdot )}}(\Omega )}\) and \(\rho _{{p( \cdot )}}(\ )\) can be compared using the inequalities

$$\begin{aligned} \min \{\ \rho _{{p( \cdot )}}(u)^{1/p^-},\ \rho _{{p( \cdot )}}(u)^{1/p^+}\ \} \le \Vert u \Vert _{L^{{p( \cdot )}}(\Omega )} \le \max \{\ \rho _{{p( \cdot )}}(u)^{1/p^-},\ \rho _{{p( \cdot )}}(u)^{1/p^+}\ \}, \end{aligned}$$

and the unit ball property follows: \(\Vert u \Vert _{L^{{p( \cdot )}}(\Omega )} \ge 1\) if and only if \(\rho _{{p( \cdot )}}(u) \ge 1\).

The Sobolev space \(W^{1,{p( \cdot )}}(\Omega )\) is the vector space of those functions u in \(L^{{p( \cdot )}}(\Omega )\) for which their distributional gradient (that we denote by \(\nabla u\) if no confusion arises) is also in \(L^{{p( \cdot )}}(\Omega )\). \(W^{1,{p( \cdot )}}(\Omega )\) is also a Banach space with the norm

$$\begin{aligned} \Vert u \Vert _{W^{1,{p( \cdot )}}(\Omega )}:= \Vert u \Vert _{L^{{p( \cdot )}}(\Omega )} + \Vert \nabla u \Vert _{L^{{p( \cdot )}}(\Omega )}. \end{aligned}$$

As in the classical case, \(C^{0,\alpha (\cdot )}(\Omega )\) is the Hölder space of variable exponent \(\alpha (\cdot )\) over \(\Omega \), where now \(\alpha :\Omega \rightarrow ]0,1]\) is a measurable function: given a bounded and continuous function u on \(\Omega \) consider its seminorm

$$\begin{aligned}{}[u]_{\alpha (\cdot )}:= \sup _{x \ne y \in \Omega } \frac{| u(x) - u(y) |}{|x-y|^{\alpha (x)}}, \end{aligned}$$

so that \(C^{0,\alpha (\cdot )}(\Omega )\) is the vector space made up of those u that are bounded, continuous, and for which the seminorm \([u]_{\alpha (\cdot )}\) is finite. \(C^{0,\alpha (\cdot )}(\Omega )\) is a Banach space for the norm

$$\begin{aligned} \Vert u \Vert _{C^{0,\alpha (\cdot )}(\Omega )}:= \Vert u \Vert _{\infty } + [u]_{\alpha (\cdot )}. \end{aligned}$$

To describe the regularity or continuity of the exponent \( {p( \cdot )}\), many moduli of continuity can be used: given a continuous functionFootnote 2\(\phi : {\mathbb {R}}_+ \rightarrow {\mathbb {R}}_+\) with \(\lim _{t\rightarrow 0^+}\phi (t) = 0\), the exponent \({p( \cdot )}: \Omega \rightarrow [1,\infty [\) is \(\phi \)-continuous if there exists a constant \(C_{\phi }\) such that

$$\begin{aligned} | p(x) - p(y) | \le C_{\phi }\ \phi (|x-y|) \end{aligned}$$

for every pair of points \(\{ x,y \}\) in \(\Omega \). If \(\phi _1(t) \le \phi _2(t)\) for t near 0, then \({p( \cdot )}\) is \(\phi _2\)-continuous whenever \({p( \cdot )}\) is \(\phi _1\)-continuous.

Distinguished notions of continuity for \( {p( \cdot )}\) are:

  1. (1)

    log-Hölder continuity, where

    $$\begin{aligned} \phi (t):= 1 / \log (e+1/t), \end{aligned}$$

    and

  2. (2)

    log-log-Hölder continuity, with

    $$\begin{aligned} \phi (t):= \log \log (e+1/t) / \log (e+1/t). \end{aligned}$$

One verifies that log-log-Hölder continuity is a weaker notion than log-Hölder continuity. These notions are important in the study of the density of the smooth functions in \( W^{1,{p( \cdot )}}(\Omega ) \) [3, 4, 11]: if the domain \( \Omega \) has a Lipschitz boundary and \( {p( \cdot )}\) is log-Hölder continuous, the smooth functions are dense in \( W^{1,{p( \cdot )}}(\Omega ) \); on the other hand, if \( \Omega \) is the unit disk in \( {\mathbb {R}}^2 \) and \( {p( \cdot )}\) is log-log-Hölder continuous, such density does not always occur [11]. Those results give a satisfactory but still partial answer to the mentioned density problem.

Concerning domainsFootnote 3, the following notion of regularity was used in [5]: a subset \( \Omega \) of \( {\mathbb {R}}^n \) satisfies the s-measure density condition for some \(s > 0\), if there exists a positive constant c such that for every x in \( {\overline{\Omega }} \) and each R in ]0, 1] one has

$$\begin{aligned} c R^s \le \vert B_R(x) \cap \Omega \vert . \end{aligned}$$

If \(s=n\) in the previous notion, one says that \( \Omega \) satisfies the measure density condition.

In [5] some standard notions of regularity for domains in \( {\mathbb {R}}^n \) were mentioned, with relations between them, including the notion of measure density condition. For the purpose of clarifying those relations, a picture or diagram was drawn, where we wrote \( A \Longrightarrow B \) if whenever \( \Omega \) is a domain with property \( A \), then \( \Omega \) also has property \( B \).

Besides the measure density condition, we consider the following notions of regularity (none of which appears in [5]) for domains in \( {\mathbb {R}}^n \):

  1. (1)

    The \((\epsilon ,\infty )\)-condition,

  2. (2)

    The \((\epsilon ,\delta )\)-condition,

  3. (3)

    The John condition, and

  4. (4)

    The log measure density condition.

The associated diagram for these notions is:

figure a

The first three notions in the list and the relationships between them and the measure density condition are well known to experts, and are scattered in the literature as well. The log measure density notion has been recently introduced in a different context (see the comments after its definition below). To make this work accessible to more readers, we spend some lines in the subject:

Definition 2.1

Assume that \(\epsilon \in (0,\infty )\) and \(\delta \in (0,\infty ].\) A domain \(\Omega \subset {\mathbb {R}}^n\) is said to be an \((\epsilon , \delta )\)-domain if whenever \(x,y\in \Omega \) and \(|x-y|<\delta ,\) there is a rectifiable curve \(\gamma \subset \Omega \) joining x to y satisfying

$$\begin{aligned} l(\gamma )\le \frac{1}{\epsilon }|x-y| \end{aligned}$$
(1)

and

$$\begin{aligned} d(z,\partial \Omega )\ge \frac{\epsilon |x-z| \, |y-z|}{|x-y|}\quad \text {for all}\quad z\in \gamma , \end{aligned}$$
(2)

where \(l(\gamma )\) denotes the length of \(\gamma \), and \(d(z,\partial \Omega )\) the Euclidean distance from z to the boundary of \(\Omega .\)

Definition 2.2

We say that \(\Omega \) is a John domain if there is a constant \(A\ge 1\) such that for every pair of points \(x,y\in \Omega \) there exists a rectifiable curve \(\gamma \) joining them with

$$\begin{aligned} \min \{l(\gamma (x,z)), l(\gamma (y,z))\}\le A\, d(z,\partial \Omega ) \quad \text {for all}\quad z\in \gamma , \end{aligned}$$
(3)

where \(\gamma (x,z)\) is the part of \(\gamma \) between x and z, and \(\gamma (y,z)\) is the part between y and z.

John domains were first introduced by F. John in his work on elasticity [13], and the name was coined by Martio and Sarvas [17]. Our definition also includes the case of unbounded John domains, which is due to [19]. The class of John domains includes all smooth domains, Lipschitz domains and certain fractal domains (for instance snowflake-type domains).

Lemma 2.1 and Lemma 2.2 below show that \((\epsilon ,\delta )\)-domains and John domains satisfy the measure density condition.

Lemma 2.1

Let \(\Omega \subset {\mathbb {R}}^n\) be an \((\epsilon ,\delta )\)-domain for some \(\epsilon >0\) and \(\delta >0\). Then it satisfies the measure density condition.

Proof

Fix \(x\in \Omega \) andFootnote 4\(r\le 1\). Note that it is enough to assume that \(r\le \min \{1,\delta /2\}.\) If \(\Omega \subset B_r(x),\) then there is nothing to prove; so we assume that \(\Omega {\setminus } B_r(x)\ne \emptyset .\) ChooseFootnote 5\(y\in \Omega \cap (B_{2r}(x)\setminus B_r(x))\), and let \(\gamma \) be a curve joining x to y, and pick \(z\in \gamma \) such that \(|x-z|=r/4.\) Then

$$\begin{aligned} d(z)\ge \frac{\epsilon r|y-z|}{4|x-y|}, \end{aligned}$$

where \(d(z)={{\,\textrm{dist}\,}}(z,\partial \Omega ).\) The triangle inequality gives

$$\begin{aligned} |y-z|\ge |x-y|-|x-z|\ge r-\frac{r}{4}=\frac{3r}{4}. \end{aligned}$$

Therefore \(d(z)\ge \frac{3\epsilon }{32}r\) and \(B_{\min \{d(z),3r/4\}}(z)\subset \Omega \cap B_r(x)\). Hence \(|B_r(x)\cap \Omega |\ge Cr^n\), and the measure density condition follows. \(\square \)

Lemma 2.2

Let \(\Omega \subset {\mathbb {R}}^n\) be a John domain. Then it satisfies the measure density condition.

Proof

Let \(x\in \Omega \) and \(r\le 1.\) Note that if \(\Omega \subset B_r(x),\) then there is nothing to prove; so we assume that \(\Omega {\setminus } B_r(x)\ne \emptyset .\) Take \(y\in \Omega {\setminus } B_r(x)\), let \(\gamma \) be the curve joining x to y, and choose \(z\in \gamma \) such that \(|x-z|=r/4.\) Then from the John condition

$$\begin{aligned} d(z)\ge \frac{1}{A}\min \{l(\gamma (x,z)), l(\gamma (y,z))\}\ge \frac{r}{4A}. \end{aligned}$$

On the other hand, we have \(B_{\min \{d(z),3r/4\}}(z) \subset \Omega \cap B_r(x)\). Therefore \(|B_r(x)\cap \Omega |\ge Cr^n.\) \(\square \)

The weakest notion in the diagram is the next one:

Definition 2.3

A subset \(\Omega \) of \({\mathbb {R}}^n\) is said to satisfy the log s-measure density condition if there exists two positive constants \( c \) and \( \alpha \) such that for every x in \({\bar{\Omega }}\) and each R in ]0, 1/2] one has

$$\begin{aligned} c R^s (\log (\frac{1}{R}))^{-\alpha } \le | B_R(x)\cap \Omega |. \end{aligned}$$

If \(s=n\), one says that \( \Omega \) satisfies the log measure density condition.

The notion appears in [12] (see Theorem 1.1 and Remark 1.2(c)) as a necessary condition for certain Orlicz-Sobolev embeddings. It is obvious that if \(\Omega \) satisfies the s-measure density condition, then \(\Omega \) satisfies the log s-measure density condition. The next example shows that the converse is not true.

Example 2.1

Fix some \(\alpha \ge 1\), and consider the function \(f: [0,1/\sqrt{2}] \rightarrow {\mathbb {R}}\) given by

$$\begin{aligned} f(r):=\sqrt{2} r\ \Big \{ \frac{ \sqrt{2} \alpha - n\sqrt{2} \log (\sqrt{2}r)}{(- \log ( \sqrt{2} r))^{\alpha + 1}} \Big \}^{\frac{1}{n-1}}\,\ f(0)=0. \end{aligned}$$

Note that there exists some \(r_0 \le 1/\sqrt{2}\) such that f(r) is increasing and \(f(r) \le r\) whenever \(r \le r_0\).

Consider the domain

$$\begin{aligned} \Omega =\{\ x=(x_1,\ldots ,x_n)\in {\mathbb {R}}^n\,\ 0< x_n< r_0\ \ \text {and}\ \ x_1^2+...+x_{n-1}^2 < f(x_n)^2\ \} \end{aligned}$$

given by a rotation of the area below the graph of f around the \(x_n\) axis, whose cusp is at the origin.

First we will show that \(\Omega \) does not satisfy the measure density condition. Consider the ball \(B_R(0)\) centered at the origin with radius \(R\le r_0\), and consider the positive real number \(r \equiv r(R)\) given by

$$\begin{aligned} R^2 = r^2 + f(r)^2; \end{aligned}$$

since \(f(r) \le r\) it follows that \(R^2 \le 2 r^2\), therefore

$$\begin{aligned} R / \sqrt{2} \le r \le R. \end{aligned}$$
(4)

Note that

$$\begin{aligned} \omega _{n-1} \int _0^r f(x_n)^{n-1} d x_n \le | \Omega \cap B_R(0) | \le \omega _{n-1} \int _0^R f(x_n)^{n-1} d x_n, \end{aligned}$$
(5)

where \(\omega _{k}\) is the volume of the k-dimensional unit ball, and compute

$$\begin{aligned} \int _0^R f(x_n)^{n-1} dx_n = \frac{(\sqrt{2}R)^n}{(-\log (\sqrt{2}R))^{\alpha }}. \end{aligned}$$
(6)

Now use (4), (5) and (6) to infer that

$$\begin{aligned} \omega _{n-1} \frac{R^n}{(- \log R )^{\alpha }} \le | \Omega \cap B_R(0) | \le \omega _{n-1} \frac{(\sqrt{2}R)^n}{(- \log (\sqrt{2} R))^{\alpha }}, \end{aligned}$$

whose right hand side inequality says that \(\Omega \) does not satisfy the n-measure density condition.

Now we prove that the left hand side inequality also holds, up to a constant, for all the balls \(B_R(x)\) centered at \(x\in \Omega ,\) with radius \(R\le r_0/4\). For this purpose, it is enough to consider the points \(x\in \Omega \) which are near the origin: if \(x=(x_1,\ldots ,x_n)\in \Omega \) is such that \(x_n\le r_0/4\), it suffices to prove that \(B_R(0)\cap \Omega + x\subset B_R(x)\cap \Omega ,\) where \(B_R(0)\cap \Omega + x=\{y+x:y\in B_R(0)\cap \Omega \}\) is the translation of \(B_R(0)\cap \Omega \) by x.

Assume that \(y=(y_1,\ldots ,y_n)\in B_R(0)\cap \Omega \), so that \(y+x\in B_R(x)\): we must check that \(y+x\in \Omega \). Since

$$\begin{aligned} \sqrt{(y_1+x_1)^2+\cdots +(y_{n-1}+x_{n-1})^2}\le & {} \sqrt{y_1^2+\cdots +y_{n-1}^2} +\sqrt{x_1^2+\cdots +y_{n-1}^2}\\ {}< & {} f(y_n)+f(x_n), \end{aligned}$$

we have that \(y+x\in \Omega \) if for all s and t in \((0,r_0/4]\)

$$\begin{aligned} f(s)+f(t)\le f(s+t), \end{aligned}$$

namely if f is superadditive. In particular, if f is convex and \(f(0)=0\), then f is superadditive.

The proof of the convexity of f requires some computations that are left to the reader.

3 Main results

As explained in Sect. 1, the results in this work can be seen as an improvement and as an extension of the main results in [5]. Our first result in this section is the improvement of:

Theorem 3.1

(Theorem 3.1 in [5]) Let \(\Omega \) be an open subset of \({\mathbb {R}}^n\), and suppose that for some \(s>1\):

  1. (1)

    The exponent \(p(\cdot )\) is log-Hölder continuous, with \(p^+ <s\).

  2. (2)

    The exponent \(q(\cdot ):= \frac{p(\cdot ) s}{s - p(\cdot )}\) is such that \(\frac{1}{q^-} < \frac{1}{q^+} + \frac{1}{s}\).

  3. (3)

    \(W^{1,p(\cdot )}(\Omega ) \hookrightarrow L^{q(\cdot )}(\Omega )\), where \(q(\cdot ):= \frac{p(\cdot ) s}{s-p(\cdot )}\).

Conclusion: \(\Omega \) satisfies the s-measure density condition.

Such improvement consists in removing Hypothesis 2: this is achieved by modifying the proof given in [5] (see below). We have:

Theorem 3.2

Let \(\Omega \) be an open subset of \({\mathbb {R}}^n\), and suppose that:

  1. (1)

    The exponent \(p(\cdot )\) is log-Hölder continuous, with \(p^+ <s\) for some \(s>1\).

  2. (2)

    \(W^{1,p(\cdot )}(\Omega ) \hookrightarrow L^{q(\cdot )}(\Omega )\), where \(q(\cdot ):= \frac{p(\cdot ) s}{s-p(\cdot )}\).

Conclusion: \(\Omega \) satisfies the s-measure density condition.

The next result is similar to Theorem 3.2, but involves the weaker modulus of log-log-Hölder continuity for the exponents, and the weaker notion of log s-measure density condition for the domain (see Sect. 2 for the definitions).

Theorem 3.3

Let \(\Omega \) be an open subset of \({\mathbb {R}}^n\), and suppose that:

  1. (1)

    The exponent \(p(\cdot )\) is log-log-Hölder continuous, with \(p^+ <s\) for some \(s>1\).

  2. (2)

    \(W^{1,p(\cdot )}(\Omega ) \hookrightarrow L^{q(\cdot )}(\Omega ),\) where \(q(\cdot ):= \frac{p(\cdot ) s}{s-p(\cdot )}.\)

Conclusion: \(\Omega \) satisfies the log s-measure density condition.

Using the technique of Theorem 3.3 in [5], we also get the following result in the supercritical case:

Theorem 3.4

Let \(\Omega \) be an open and connected subset of \({\mathbb {R}}^n\), and suppose that:

  1. (1)

    The exponent \(p(\cdot )\) is log-log-Hölder continuous, with \(p^->s\) for some \(s>0\).

  2. (2)

    \(W^{1,p(\cdot )}(\Omega ) \hookrightarrow C^{0, \alpha (\cdot )}(\Omega )\), where \(\alpha (\cdot ):= 1- s / {p( \cdot )}\).

Conclusion: \(\Omega \) satisfies the log s-measure density condition.

In the rest of this Section we will prove Theorems 3.23.3 and 3.4. We start with the first one which is a modification of Theorem 3.1 in [5]; we give the details for the sake of completeness:

Proof of Theorem 3.2

For a fixed x in \({\bar{\Omega }}\) define \(A_R:=B_R (x) \cap \Omega \), and consider only the case when \(|A_R|\le 1\), otherwise \(|A_R|\ge 1 \ge R^s\) whenever \(R \le 1,\) and there is nothing to prove; moreover, it is enough to consider \(R \le r_0\) for some \(0<r_0\le 1/4\). For such an R, denote by \({\tilde{R}} < R\) the smallest real number such that

$$\begin{aligned} |A_{{\tilde{R}}}| = \frac{1}{2} | A_R|. \end{aligned}$$

At this point we recall from [5] the following Lemma:

Lemma 3.1

Use the same assumptions and notation as in Theorem 3.2. Then there exists a constant \(c_1 > 0\) such that for all x in \({\bar{\Omega }}\) and every R in ]0, 1] one has the estimate

$$\begin{aligned} R- {\tilde{R}} \le c_1 |A_R|^{\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}}. \end{aligned}$$

To continue with the proof of Theorem 3.2, given x in \({\bar{\Omega }}\) and R in \(]0, r_0]\), construct the sequence \(\{ R_i \}\) by setting \(R_0:=R\), and then define \(R_{i+1}:=\tilde{R_i}\) inductively for \(i \ge 0\). It follows that

$$\begin{aligned} |A_{R_{i}}|=\frac{1}{2^i}\ | A_R| \end{aligned}$$

with \(\lim _{i \rightarrow \infty } R_i=0\).

With those ingredients in Lemma 3.1 one observes that

$$\begin{aligned} R_i -R_{i+1} \le c_1 |A_{R_i}|^{\frac{1}{s}+\frac{1}{q_{A_{R_i}}^+}-\frac{1}{q_{A_{R_i}}^-}} \le c_1 |A_{R_i}|^{\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}} = c_1 \frac{|A_R|^{\eta _R}}{2^{i \eta _R}}, \end{aligned}$$
(7)

where the abbreviation \(\eta _R:=\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}\) has been used.

Now, we would like to find a constant \({\tilde{\eta }}>0\), independent of x and R, such that \(\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-} =: \eta _R\ge {\tilde{\eta }}>0\) for all \(R\le r_0.\) Towards this end, first note that the log-Hölder continuity of p gives the log-Hölder continuity of 1/q, probably with a different constant, that we also denote by \({C_{\text {log}}}\): this means that for any z and y in \(A_R\)

$$\begin{aligned} \vert \frac{1}{q(z)}-\frac{1}{q(y)}\vert \le \frac{C_{\text {log}}}{\log (e+1/|z-y|)}, \end{aligned}$$

and taking the supremum over all pairs of points in \(A_R\) one gets

$$\begin{aligned} \frac{1}{q_{A_R}^-}-\frac{1}{q_{A_R}^+}\le \frac{C_{\text {log}}}{\log (1/(2R))}. \end{aligned}$$
(8)

Suppose now that for some \(R\le 1/4\) we have that \(\eta _R\le 0\). Then (8) gives \( \frac{1}{s}\le \frac{C_{\text {log}}}{\log \left( \frac{1}{2R}\right) }\), or \(R\ge \frac{1}{2}e^{-sC_{\text {log}}}\).

The previous discussion allows us to conclude that:

  • If \(\frac{1}{2}e^{-sC_{\text {log}}}>\frac{1}{4}\), then there is no \(R\le \frac{1}{4}\) for which \(\eta _R\le 0\).

  • If \(\frac{1}{2}e^{-sC_{\text {log}}}\le \frac{1}{4}\), then \(\eta _R\le 0\) implies \(R\ge \frac{1}{2}e^{-sC_{\text {log}}}.\)

Therefore if we choose \(r_0=\frac{1}{2}\min \{\frac{1}{4},\frac{1}{2}e^{-sC_{\text {log}}}\}\), then \(\eta _{r_0}>0\), and also

$$\begin{aligned} \frac{1}{s}>\frac{C_{\text {log}}}{\log (1/(2r_0))}. \end{aligned}$$
(9)

But \(\eta _{r_0}\) may depend on the point x fixed at the beginning of the proof. To obtain the required \({\tilde{\eta }}\), we apply again log-Hölder continuity of 1/q on \(A_{r_0}\), to obtain

$$\begin{aligned} \frac{1}{q_{A_{r_0}}^-}-\frac{1}{q_{A_{r_0}}^+}\le \frac{C_{\text {log}}}{\log (1/(2r_0))}, \end{aligned}$$
(10)

and (9) together with (10) give

$$\begin{aligned} \eta _{r_0}=\frac{1}{s}+\frac{1}{q_{A_{r_0}}^+}-\frac{1}{q_{A_{r_0}}^-}\ge \frac{1}{s}-\frac{C_{\text {log}}}{\log (1/(2r_0))}>0. \end{aligned}$$

Choosing \({\tilde{\eta }}:=\frac{1}{s}-\frac{C_{\text {log}}}{\log (1/(2r_0))},\) we get that \(\eta _R\ge \eta _{r_0}\ge {\tilde{\eta }}>0\) for all \(R\le r_0\). This is our desired \({\tilde{\eta }}.\)

Since \(\eta _R \ge {\tilde{\eta }}>0\), we deduce, from (7), that

$$\begin{aligned} R= & {} \sum _{i=0}^{\infty }(R_i -R_{i+1}) \le c_1 |A_R|^{\eta _R} \sum _{i=0}^{\infty }2^{-i\eta _R} = c_1 |A_R|^{\eta _R} \frac{1}{1-2^{-\eta _R}} \nonumber \\\le & {} \max \{1, \frac{c_1}{1-2^{-{\tilde{\eta }}}}\}\ |A_R|^{\eta _R}. \end{aligned}$$
(11)

Moreover, since \(c_2:=1/ \max \{1, \frac{c_1}{1-2^{-{\tilde{\eta }}}}\} \le 1\) one has

$$\begin{aligned} |A_R| \ge c_2^{1 /\eta _R} R^{1/\eta _R} \ge c_2^{ 1 /{\tilde{\eta }}} R^{1 /\eta _R} = c_2^{1 / {\tilde{\eta }}} R^s R^{\beta _R / \eta _R}, \end{aligned}$$
(12)

where \(\beta _R:= 1-s \eta _R\).

From (12) one sees that if a positive lower bound for \(R^{\beta _R / \eta _R}\) is provided, the proof of Theorem 3.2 is finished. To achieve such a lower bound, the log-Hölder continuity of \(p(\cdot )\) will be used: by the hypotheses on \(p(\cdot )\) and \(q(\cdot )\) one has that \({q( \cdot )}\) is log-Hölder continuous as well, hence

$$\begin{aligned} \vert q(z)-q(y)\vert \le \frac{C_{\text {log}}}{\log (e+1/|z-y|)}; \end{aligned}$$

taking the supremum over pairs of points in \(A_R\) one gets

$$\begin{aligned} q_{A_R}^+-q_{A_R}^-\le \frac{C_{\text {log}}}{\log (1/(2R))}, \end{aligned}$$

or

$$\begin{aligned} \log \left( 1 / (2R)^{q_{A_R}^+-q_{A_R}^-}\right) \le C_{\text {log}}, \end{aligned}$$

therefore

$$\begin{aligned} R^{q_{A_R}^+-q_{A_R}^-}\ge \frac{e^{-C_{\text {log}}}}{2^{q_{A_R}^+- q_{A_R}^- }} \ge \frac{e^{-C_{\text {log}}}}{2^{(q^+-q^-)}}. \end{aligned}$$
(13)

But

$$\begin{aligned} R^{\frac{\beta _R}{\eta _R}} \ge R^{\frac{\beta _R}{{\tilde{\eta }}}} = R^{\frac{s(q_{A_R}^+ - q_{A_R}^-)}{{\tilde{\eta }} q_{A_R}^+ q_{A_R}^- }} \ge (R^{q_{A_R}^+ - q_{A_R}^-})^{s / {\tilde{\eta }} (q^-)^2}, \end{aligned}$$

hence using (13) the required bound

$$\begin{aligned} R^{\frac{\beta _R}{\eta _R}} \ge \left( \frac{e^{-C_{\text {log}}}}{2^{(q^+-q^-)}} \right) ^{s / {\tilde{\eta }} (q^-)^2} =: c_3 >0 \end{aligned}$$

follows, and the uniform estimate \(c R^s \le | B_R(x) \cap \Omega |\) is obtained, where \(c:= c_2^{1 / {\tilde{\eta }}} c_3\). \(\square \)

We continue with the proof of our second main result.

Proof of Theorem 3.3

For a fixed x in \({\bar{\Omega }}\) define \(A_R:=B_R (x) \cap \Omega \). It is enough to consider the case when \(|A_R|\le 1\), otherwise \(|A_R|\ge 1 \ge R^s\) whenever \(R \le 1/2\), and there is nothing to prove; moreover, it is enough to consider \(R \le r_1\), where \(r_1 \le \frac{1}{4}.\)

Consider \(R\le T_{\text {crit}}/2\), with \(T_{\text {crit}}:=1/(e^e-e) \thickapprox 0.08\ (< \frac{1}{4})\) such that

$$\begin{aligned} \phi (t) = \log \log (e + 1/t) / \log (e + 1/t) \end{aligned}$$

is increasing on \((0, T_{\text {crit}}].\)

It is easy to see that the log-log-Hölder continuity of \(p(\cdot )\) entails the log-log-Hölder continuity of \(1/q(\cdot )\), probably with a different constant, that we also denote by \(C_{\text {log-log}}\). Therefore

$$\begin{aligned} \vert \frac{1}{q(z)}-\frac{1}{q(y)}\vert \le C_{\text {log-log}}\ \phi (|z-y|); \end{aligned}$$

taking the supremum over all pairs of points in \(A_R\) one gets

$$\begin{aligned} \frac{1}{q_{A_R}^-}-\frac{1}{q_{A_R}^+}\le C_{\text {log-log}}\ \phi (2R), \end{aligned}$$

hence

$$\begin{aligned} \frac{1}{q_{A_R}^-}-\frac{1}{q_{A_R}^+}\le C_{\text {log-log}}\ \log \log (e + 1/(2R))/ \log (1 / (2R)). \end{aligned}$$

Suppose now that \(\eta _R:=\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}\le 0\) for some \(R\le T_{\text {crit}}/2\). Then

$$\begin{aligned} \frac{1}{s}\le C_{\text {log-log}}\ \log \log (e + 1/(2R))/ \log (1 / (2R)), \end{aligned}$$
(14)

or

$$\begin{aligned} \frac{1}{2R}\le (\log (e+1/(2R)))^{C_1}, \end{aligned}$$
(15)

where \(C_1:=s\ C_{\text {log-log}}\). On the other hand

$$\begin{aligned} \lim _{R\rightarrow 0} (\log (e+1/(2R)))^{C_1}(2R)^{\frac{1}{2}}=0. \end{aligned}$$
(16)

Combining (15) and (16) we see that there exists some \(r_0\), such that whenever \(R\le r_0\)

$$\begin{aligned} \frac{1}{2R}\le \left( \frac{1}{2R}\right) ^{\frac{1}{2}}, \end{aligned}$$

and \(R\ge 1/2\) follows. This contradicts our choice of R: however if we take \(R\le \min \{T_{\text {crit}}/2, r_0\}=:r_1\), then \(\eta _R\ge \eta _{r_1}>0\). But \(\eta _{r_1}\) may depend on x, and our aim is to obtain a positive lower bound of \(\eta _R\) which is independent of x and R.

To get the desired lower uniform bound, we apply log-log-Hölder continuity of \(1/q(\cdot )\) on \(A_{r_1}\), and

$$\begin{aligned} \frac{1}{q_{A_{r_1}}^-}-\frac{1}{q_{A_{r_1}}^+}\le C_{\text {log-log}}\ \log \log (e + 1/(2r_1))/ \log (1 / (2r_1)) \end{aligned}$$
(17)

follows. Moreover, from (14) and the previous discussion we have

$$\begin{aligned} \frac{1}{s}> C_{\text {log-log}}\ \log \log (e + 1/(2r_1))/ \log (1 / (2r_1)). \end{aligned}$$
(18)

Therefore, using (17) and (18), we obtain

$$\begin{aligned} \eta _{r_1}=\frac{1}{s}+\frac{1}{q_{A_{r_1}}^+}-\frac{1}{q_{A_{r_1}}^-}\ge \frac{1}{s}-C_{\text {log-log}} \ \log \log (e + 1/(2r_1))/ \log (1 / (2r_1))>0. \end{aligned}$$

Choosing

$$\begin{aligned} {\tilde{\eta }}:=1/s-C_{\text {log-log}} \ \log \log (e + 1/(2r_1))/ \log (1 / (2r_1)), \end{aligned}$$
(19)

we conclude that \(\eta _R\ge \eta _{r_1}\ge {\tilde{\eta }}>0\) for all \(R\le r_1\).

Consider now \(R\le r_1\); for such an R, denote by \({\tilde{R}} < R\) the smallest real number such that

$$\begin{aligned} |A_{{\tilde{R}}}| = \frac{1}{2} | A_R|. \end{aligned}$$

Given x in \({\bar{\Omega }}\) and \(R\le r_1\), construct the sequence \(\{ R_i \}\) by setting \(R_0:=R\), and then define \(R_{i+1}:=\tilde{R_i}\) inductively for \(i \ge 0\). It follows that

$$\begin{aligned} |A_{R_{i}}|=\frac{1}{2^i}\ | A_R|, \end{aligned}$$

with \(\lim _{i \rightarrow \infty } R_i=0\). Using the sequence \(\{ R_i \}\) in Lemma 3.1, one observes that

$$\begin{aligned} R_i -R_{i+1} \le c_1 |A_{R_i}|^{\frac{1}{s}+\frac{1}{q_{A_{R_i}}^+}-\frac{1}{q_{A_{R_i}}^-}} \le c_1 |A_{R_i}|^{\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}} = c_1 \frac{|A_R|^{\eta _R}}{2^{i \eta _R}}, \end{aligned}$$

where \(\eta _R =\frac{1}{s}+\frac{1}{q_{A_R}^+}-\frac{1}{q_{A_R}^-}\) as before.

Note that \(\eta _R \ge {\tilde{\eta }} > 0\) for the \({\tilde{\eta }}\) in (19), to deduce, thanks to the previous observations, that

$$\begin{aligned} R= & {} \sum _{i=0}^{\infty }(R_i -R_{i+1}) \le c_1 |A_R|^{\eta _R} \sum _{i=0}^{\infty }2^{-i\eta _R} = c_1 |A_R|^{\eta _R} \frac{1}{1-2^{-\eta _R}} \nonumber \\\le & {} \max \{1, \frac{c_1}{1-2^{-{\tilde{\eta }}}}\}\ |A_R|^{\eta _R}. \end{aligned}$$
(20)

Moreover, since \(c_2:=1/ \max \{1, \frac{c_1}{1-2^{-{\tilde{\eta }}}}\} <1\) one has

$$\begin{aligned} |A_R| \ge c_2^{1 /\eta _R} R^{1/\eta _R} \ge c_2^{ 1 /{\tilde{\eta }}} R^{1 /\eta _R} = c_2^{1 / {\tilde{\eta }}} R^s R^{\beta _R / \eta _R}, \end{aligned}$$
(21)

where \(\beta _R:= 1-s \eta _R\).

To obtain a lower bound for \(R^{\beta _R / \eta _R}\), we make use of the fact that \(p(\cdot )\) is log-log-Hölder continuous. It is easy to see that the log-log-Hölder continuity of \(p(\cdot )\) entails the log-log-Hölder continuity of \(q(\cdot )\), probably with a different constant, that we also denote by \(C_{\text {log-log}}\). Therefore

$$\begin{aligned} \vert q(z)-q(y)\vert \le C_{\text {log-log}}\ \phi (|z-y|), \end{aligned}$$

and taking the supremum over all pairs of points in \(A_R\) one gets

$$\begin{aligned} q_{A_R}^+-q_{A_R}^-\le C_{\text {log-log}}\ \log \log (e + 1/(2R))/ \log (1 / (2R)), \end{aligned}$$

or

$$\begin{aligned} \log \left( 1 / (2R)^{q_{A_R}^+-q_{A_R}^-}\right) \le C_{\text {log-log}}\ \log \log (e + 1/(2R)), \end{aligned}$$

therefore

$$\begin{aligned} R^{q_{A_R}^+-q_{A_R}^-}\ge & {} \left( \frac{1}{\log (e + 1/(2R))}\right) ^{C_{\text {log-log}}}\frac{1}{2^{q_{A_R}^+- q_{A_R}^- }}\nonumber \\ {}\ge & {} \left( \frac{1}{\log (e + 1/(2R))}\right) ^{C_{\text {log-log}}} \frac{1}{2^{(q^+-q^-)}}. \end{aligned}$$
(22)

But

$$\begin{aligned} R^{\frac{\beta _R}{\eta _R}} \ge R^{\frac{\beta _R}{{\tilde{\eta }}}} = R^{\frac{s(q_{A_R}^+ - q_{A_R}^-)}{{\tilde{\eta }} q_{A_R}^+ q_{A_R}^- }} \ge (R^{q_{A_R}^+ - q_{A_R}^-})^{s / ({\tilde{\eta }} (q^-)^2)}, \end{aligned}$$

hence using (21) and (22) we get

$$\begin{aligned} |A_R| \ge c_2^{1 / {\tilde{\eta }}} R^s \left( \frac{1}{\log (e + 1/(2R))}\right) ^{C_{\text {log-log}}s / ({\tilde{\eta }} (q^-)^2)} \frac{1}{2^{(q^+-q^-)s / ({\tilde{\eta }} (q^-)^2)}}. \end{aligned}$$

If \(c_3:={C_{\text {log-log}}s / ({\tilde{\eta }} (q^-)^2)}\) and \(c_4:= c_2^{1 / {\tilde{\eta }}}\frac{1}{2^{(q^+-q^-)s / ({\tilde{\eta }} (q^-)^2)}}\), we conclude that

$$\begin{aligned} |A_R| \ge c_4 R^s \left( \frac{1}{\log (e + 1/(2R))}\right) ^{c_3} \ge c_4 R^s \left( \frac{1}{\log (1/R)}\right) ^{c_3} \end{aligned}$$

whenever \(R\le r_1\), where the last inequality uses that \( r_1 \le T_{crit}/2 < 1/ (2 e)\), and the log s-measure density condition for the domain follows. \(\square \)

Finally, we give the details of the proof of Theorem 3.4 which, as mentioned above, uses the technique of Theorem 3.3 in [5] together with Theorem 3.3 in this work.

Proof of Theorem 3.4

We use the notations similar to that in Theorems 3.2 and 3.3. Fix x in \({\bar{\Omega }}\) and some \(R\le T_{\text {crit}}/2\), with \(T_{\text {crit}}:=1/(e^e-e) \thickapprox 0.08\ (< \frac{1}{4})\). We assume that \(\Omega {\setminus } B_R(x) \ne \emptyset \), since otherwise \(|A_R|=|\Omega |\). Let \(u(y):=\phi (y-x)\) be a function of \(y \in \Omega \), where \(\phi \) is a cut-off function satisfying:

  1. (1)

    \(\phi :{\mathbb {R}}^n \rightarrow [0,1]\),

  2. (2)

    \(\hbox {spt}\ \phi \subset B_R(0)\),

  3. (3)

    \(\phi (0)=1\), and

  4. (4)

    \(|\nabla \phi | \le {\tilde{c}} / R\) for some constant \({\tilde{c}}\).

The hypothesis \(W^{1,p(\cdot )} \hookrightarrow C^{0, \alpha (\cdot )}\) entails that whenever \(u \in W^{1, {p( \cdot )}}\) one has that

$$\begin{aligned} |u(y)-u(z)|\le C_{\text {sob}}\Vert u\Vert _{ L^{p(\cdot )}_1} |y-z|^{1-s/p(y)} \end{aligned}$$
(23)

for every pair of points \(\{y, z\}\) in \(\Omega \). In (23) choose \(y=x\) and \(z \in (\Omega {\setminus } B_R(x)) \cap B_{2R}(x)\)Footnote 6: one gets

$$\begin{aligned} 1 \le C_{\text {sob}}\Vert u\Vert _{ L^{p(\cdot )}_1} |x-z|^{1-s/p(x)}. \end{aligned}$$
(24)

On the other hand

$$\begin{aligned} \Vert u\Vert _{ L^{p(\cdot )}_1}= \Vert u\Vert _{L^{{p( \cdot )}}} +\Vert \nabla u\Vert _{L^{{p( \cdot )}}} \le \frac{1+{\tilde{c}}}{R}\ \Vert 1_{B_R(x)}\Vert _{L^{{p( \cdot )}}} \le \frac{1+{\tilde{c}}}{R}\ |A_R|^{1/p^+_{A_R}} \end{aligned}$$
(25)

and

$$\begin{aligned} |x-z|^{1-s/p(x)} \le (2 R)^{1-s/p(x)} \le (2R)^{1-s/{p^-_{A_R}}}. \end{aligned}$$
(26)

Using (25) and (26) in (24)

$$\begin{aligned} 1 \le C_{\text {sob}}\ \frac{1+{\tilde{c}}}{R}\ |A_R|^{1 / p^+_{A_R}}\ (2R)^{1- s /p^-_{A_R}} \le 2\ C_{\text {sob}}\ (1+{\tilde{c}})\ |A_R|^{1 / p^+_{A_R}}\ R^{- s / p^-_{A_R}} \end{aligned}$$

follows, therefore

$$\begin{aligned} |A_R| \ge \left( \frac{1}{2\ C_{\text {sob}}\ (1+{\tilde{c}})} \right) ^{p^+_{A_R}}\ R^{s\frac{p^+_{A_R}}{p^-_{A_R}}} \ge C^{p^+}\ R^s\ R^{s\frac{p^+_{A_R}- p^-_{A_R}}{p^-_{A_R}}}, \end{aligned}$$

where \(C= \min \{ 1, 1/ ( 2\ C_{\text {sob}}\ (1+{\tilde{c}}) ) \}\). Finally, we use inequality (22) (from the proof of Theorem 3.3) to obtain

$$\begin{aligned} R^{s\frac{p^+_{A_R}- p^-_{A_R}}{p^-_{A_R}}} \ge \left( R^{(p^+_{A_R}- p^-_{A_R})}\right) ^{s / p^-} \ge \left( \left( \frac{1}{\log (e + 1/(2R))}\right) ^{C_{\text {log-log}}}\frac{1}{2^{(p^+-p^-)}}\right) ^{s / p^-}, \end{aligned}$$

hence the desired estimate

$$\begin{aligned} |A_R| \ge \frac{C^{p^+}}{2^{s(p^+-p^-)/p^-}}\ R^s\ \left( \frac{1}{\log (1/R)}\right) ^{sC_{\text {log-log}}/p^-} \end{aligned}$$

follows whenever \(R\le T_{crit}/2.\) \(\square \)

4 Remarks

Using the Lebesgue differentiation theorem one can prove that if \(\Omega \subset {\mathbb {R}}^n\) satisfies the n-measure density condition, then \(|{\bar{\Omega }}\setminus \Omega |=0\), see [21]. We are led to:

Question 4.1

Assume that \(\Omega \subset {\mathbb {R}}^n\) satisfies the log n-measure density condition. Is it true that \(|{\bar{\Omega }}\setminus \Omega |=0\)?

If a domain satisfies the cone condition, then it also satisfies the measure density condition, see [5] for example. The standard example of a domain which satisfies the measure density condition but not the cone condition is \(\Omega =\ ]-10,10\ [^2{\setminus } K,\) where K is the von Koch snowflake curve with Hausdorff dimension \(\log 4/\log 3.\) Furthermore, it turns out there exists an open subset \(\Omega \) in \({\mathbb {R}}^n\) satisfying the n-measure density condition such that \(\partial \Omega \) is a graph and \(\Omega \) does not satisfy the cone condition [8].Footnote 7