1 Introduction

In 1961, John and Nirenberg studied the well-known space of bounded mean oscillation BMO and proved the profound John–Nirenberg inequality for BMO functions [10]. The space BMO plays a vital role in harmonic analysis and it has been studied very extensively. For example, a celebrated result of Fefferman and Stein states that BMO can be characterized as the dual space of the real Hardy space \(H^1\) [7]. In [10], John and Nirenberg also defined a generalization of BMO, which is now known as the John–Nirenberg space, or \(JN_p\), with a parameter \(1< p < \infty \), see Definition 2.3 below. In addition, they proved the John–Nirenberg inequality for \(JN_p\) functions, see Theorem 2.4 below. From this theorem, it follows that \(JN_p(Q_0) \subset L^{p,\infty }(Q_0)\), where \(Q_0 \subset \mathbb {R}^n\) is a bounded cube. It is also easy to see that \(L^p(Q_0) \subset JN_p(Q_0)\). Both of these inclusions are strict; however, this is far from trivial. An example of a function in \(JN_p \setminus L^p\) was discovered in 2018 [4]. Thus, the space \(JN_p\) is a nontrivial space between \(L^p\) and \(L^{p,\infty }\). However, there are still many unanswered questions related to the study of John–Nirenberg spaces.

Various John–Nirenberg type spaces have attracted attention in recent years, including the dyadic John–Nirenberg space [11], the congruent John–Nirenberg space [9, 22], the John–Nirenberg–Campanato space [17, 19], and the sparse John–Nirenberg space [5]. The John–Nirenberg space can also be defined with medians instead of using integral averages [13]. Hurri-Syrjänen et al. established a local-to-global result for the space \(JN_p(\Omega )\), where \(\Omega \subset \mathbb {R}^n\) is an open set [8] and Marola and Saari found similar results for \(JN_p\) in the setting of metric measure spaces [12].

The spaces VMO and CMO are well-known vanishing subspaces of BMO. They were introduced by Sarason [16] and Neri [14], respectively. The aforementioned duality phenomenon of Fefferman and Stein was later complemented by Coifman and Weiss who showed that \(H^1\) is the dual space of CMO [3]. Recently, there has been research on the \(JN_p\) counterparts of these spaces, which are denoted by \(VJN_p\) and \(CJN_p\) [20]. Brudnyi and Brudnyi showed that \(VJN_p\) is a predual to the Hardy-type space \(HK_{p'}\) among other duality results for a family of related spaces \(V_{pq}^{k \lambda }\) on a bounded cube [2]. The space \(HK_{p'}\) was first introduced by Dafni et al. as a predual to the space \(JN_p\) [4]. Here, \(p'\) is the conjugate index of p, i.e., \(1/p + 1/p' = 1\). It follows directly from the definitions of \(VJN_p\) and \(CJN_p\) that \(L^p \subseteq CJN_p \subseteq VJN_p \subseteq JN_p\). Moreover, examples in [18] demonstrate that \(L^p \ne CJN_p\) and \(VJN_p \ne JN_p\). However, it has been an open question whether the set \(VJN_p\setminus CJN_p\) is nonempty, see [18, 20]. As our main result, we show that \(VJN_p\) and \(CJN_p\) coincide.

Our method is to study Morrey or weak \(L^p\) type integrals

$$\begin{aligned} |Q|^{\frac{1}{p}-1} \int _Q |f|, \end{aligned}$$
(1.1)

where Q is a cube. We prove that if \(f \in JN_p\), then these integrals tend to zero both when \(|Q| \rightarrow 0\) and when \(|Q| \rightarrow \infty \). See Theorems 3.5 and 3.8 below for precise statements of these results. Note that \(L^p\) functions have this property, but weak \(L^p\) functions do not. From Theorem 3.5, it follows easily that \(CJN_p = VJN_p\), see Corollary 3.7.

In Sect. 2 we briefly study the more general version of the John–Nirenberg type spaces \(JN_{p,q}(X)\), where the \(L^1\)-norm of the oscillation term is replaced with the \(L^q\)-norm where \(q \ge 1\). This generalization has been studied in [4, 21, 22]. It has turned out that in case X is a bounded cube, the \(JN_{p,q}\) norm is equivalent with the \(JN_p\) norm (for \(q<p\)) or \(L^q\) norm (for \(q \ge p\)). In case \(X = \mathbb {R}^n\), the \(JN_{p,q}\) norm is equivalent with the \(JN_p\) norm (for \(q<p\)), and if \(q>p\), the space contains only functions that are constant almost everywhere. We complete this picture by showing that in the borderline case \(p = q\) and \(X = \mathbb {R}^n\), this space is equivalent with the space \(L^p(\mathbb {R}^n) / \mathbb {R}\), i.e., the space of functions f for which there is a constant b such that \(f - b \in L^p(\mathbb {R}^n)\). The result answers a question raised in [22, Remark 2.9].

2 Preliminaries

Throughout this paper by a cube, we mean an open cube with edges parallel to the coordinate axes. We let \(X \subseteq \mathbb {R}^n\) be either a bounded cube or the entire space \(\mathbb {R}^n\). If Q is a cube, we denote by l(Q) its side length. For any \(r > 0\), we denote by rQ the cube with the same center as Q but with side length \(r \cdot l(Q)\). For any measurable set \(E \subset \mathbb {R}^n\), such that \(0< |E| < \infty \), we denote the integral average of a function f over E by

Definition 2.1

(Weak \(L^p\)-spaces) Let \(1 \le p < \infty \). For a measurable function f, we define

$$\begin{aligned} \Vert f \Vert _{L^{p,\infty }(X)}:= \sup _{t> 0} t | \{ x \in X: |f(x)| > t \} |^{1/p}. \end{aligned}$$

We say that f is a weak \(L^p\) function, or \(f \in L^{p,\infty }(X)\), if \(\Vert f \Vert _{L^{p,\infty }(X)}\) is finite. We define

where E is any measurable set. We say that \(f \in L^{p,w}(X)\), if \(\Vert f \Vert _{L^{p,w}(X)}\) is finite.

Remark 2.2

The expression \(\Vert \cdot \Vert _{L^{p,\infty }(X)}\) is not a norm, since the triangle inequality fails to hold. However, \(\Vert \cdot \Vert _{L^{p,w}(X)}\) does define a norm. Additionally, if \(p > 1\), \(\Vert f \Vert _{L^{p,\infty }(X)}\) and \(\Vert f \Vert _{L^{p,w}(X)}\) are comparable and therefore \(L^{p,w}(X) = L^{p,\infty }(X)\), see Chap. 2.8.3 in [6].

Definition 2.3

(\(JN_p\)) Let \(1< p < \infty \). A function f is in \(JN_p(X)\) if \(f \in L_{loc}^1(X)\) and there is a constant \(K < \infty \) such that

for all countable collections of pairwise disjoint cubes \((Q_i)_{i=1}^{\infty }\) in X. We denote the smallest such number K by \(\Vert f\Vert _{JN_p(X)}\).

The space \(JN_p\) is related to BMO in the sense that the BMO norm of a function is the limit of the function’s \(JN_p\) norm when p tends to infinity. It is easy to see that

$$\begin{aligned} \Vert |f| \Vert _{JN_p(X)} \le 2 \Vert f \Vert _{JN_p(X)}. \end{aligned}$$
(2.1)

Likewise, it is clear that \(L^p(X) \subset JN_p(X)\), as we get from Hölder’s inequality that \(\Vert f \Vert _{JN_p(X)} \le 2 \Vert f \Vert _{L^p(X)}\). If X is a bounded cube, then \(JN_p(X) \subset L^{p, \infty } (X)\). This is known as the John–Nirenberg inequality for \(JN_p\) functions.

Theorem 2.4

(John–Nirenberg inequality for \(JN_p\)) Let \(1< p < \infty \), \(Q_0 \subset \mathbb {R}^n\) a bounded cube and \(f \in JN_p(Q_0)\). Then \(f \in L^{p,\infty }(Q_0)\) and

$$\begin{aligned} \Vert f - f_{Q_0} \Vert _{L^{p,\infty }(Q_0)} \le c \Vert f \Vert _{JN_p(Q_0)} \end{aligned}$$

with some constant \(c = c(n,p)\).

The proof can be found in [1, 10], for example. In [18], this result was extended to the space \(JN_p(\mathbb {R}^n)\). Also a more general John–Nirenberg space \(JN_{p,q}\) has been studied, for example, in [4, 21, 22].

Definition 2.5

(\(JN_{p,q}\)) Let \(1 \le p < \infty \) and \(1 \le q < \infty \). A function f is in \(JN_{p,q}(X)\) if \(f \in L_{loc}^1(X)\), and there is a constant \(K < \infty \) such that

for all countable collections of pairwise disjoint cubes \((Q_i)_{i=1}^{\infty }\) in X. We denote the smallest such number K by \(\Vert f\Vert _{JN_{p,q}(X)}\).

It was shown in [4, Proposition 5.1] that if X is a bounded cube, then \(JN_{p,q}(X) = JN_p(X)\), if \(1 \le q < p\) and \(JN_{p,q}(X) = L^q(X)\) if \(p \le q < \infty \). The same proof also shows us that \(JN_{p,q}(\mathbb {R}^n) = JN_p(\mathbb {R}^n)\), if \(1 \le q < p\). It was shown in [22, Corollary 2.8] that the space \(JN_{p,q}(\mathbb {R}^n)\) contains only functions that are constant almost everywhere, if \(p< q < \infty \). However, it was stated in [22, Remark 2.9] that the situation is unclear if \(q = p\). We complete the picture by showing that \(JN_{p,p}(\mathbb R^n)\) is equal to \(L^p(\mathbb R^n)\) up to a constant. This also answers [21, Question 15].

Proposition 2.6

Let \(1 \le p < \infty \). Then \(JN_{p,p}(\mathbb {R}^n) = L^p(\mathbb {R}^n) / \mathbb {R}\) and there is a constant \(c = c(p)\) such that for any function \(f \in L_{loc}^1(\mathbb {R}^n)\), we have

$$\begin{aligned} \frac{1}{c} \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)} \le \inf _{b \in \mathbb {R}} \Vert f-b \Vert _{L^p(\mathbb {R}^n)} \le c \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}. \end{aligned}$$

Proof

First assume that \(f \in L^p / \mathbb {R}\), that is there is a constant b such that \(f - b \in L^p\). Then for any set of pairwise disjoint cubes \(Q_i\),

$$\begin{aligned} \sum _{i=1}^{\infty } \int _{Q_i} | f - f_{Q_i} |^p= & {} \sum _{i=1}^{\infty } \int _{Q_i} | (f-b) - (f-b)_{Q_i} |^p \nonumber \\\le & {} \sum _{i=1}^{\infty } 2^{p} \int _{Q_i} |f-b|^p \le 2^p \int _{\mathbb {R}^n} |f-b|^p \end{aligned}$$

and therefore \(f \in JN_{p,p}(\mathbb {R}^n)\).

Now assume that \(f \in JN_{p,p}(\mathbb {R}^n)\). Clearly

$$\begin{aligned} \int _Q |f - f_Q|^p \le \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}^p \end{aligned}$$

for every cube \(Q \subset \mathbb {R}^n\). Let \((Q_k)_{k=1}^{\infty }\) be a sequence of cubes such that the center of every cube is the origin and \(|Q_k| = 2^k\). Then \(Q_1 \subset Q_2 \subset ...\) and \(\cup _{k=1}^{\infty } Q_k = \mathbb {R}^n\). We shall prove that the sequence of integral averages \((f_{Q_k})_{k=1}^{\infty }\) is a Cauchy sequence. For any integer i, we have

This means that

Then for any positive integers m and k, we get

$$\begin{aligned} \begin{aligned} |f_{Q_m} - f_{Q_k}|&\le \sum _{i = \min (m,k)}^{\max (m,k) - 1} |f_{Q_{i+1}} - f_{Q_i}| \le \sum _{i = \min (m,k)}^{\infty } 2^{1 - \frac{1}{p}} \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)} 2^{-i/p} \\&= c \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)} 2^{-\min (m,k)/p}, \end{aligned} \end{aligned}$$
(2.2)

where the constant c depends only on p. Therefore, \((f_{Q_k})_{k=1}^{\infty }\) is a Cauchy sequence. Then by using (2.2), we get

$$\begin{aligned} \int _{\mathbb {R}^n} \left| f - \lim _{k \rightarrow \infty } f_{Q_k} \right| ^p&= \lim _{m \rightarrow \infty } \int _{Q_m} \left| f - \lim _{k \rightarrow \infty } f_{Q_k} \right| ^p \\&\le \lim _{m \rightarrow \infty } \int _{Q_m} 2^{p-1} \left( |f - f_{Q_m}|^p + \left| f_{Q_m} - \lim _{k \rightarrow \infty } f_{Q_k} \right| ^p \right) \\&\le \lim _{m \rightarrow \infty } 2^{p-1} \left( \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}^p + 2^m \lim _{k \rightarrow \infty } \left| f_{Q_m} - f_{Q_k} \right| ^p \right) \\&\le 2^{p-1} \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}^p \left( 1 + \lim _{m \rightarrow \infty } 2^m \lim _{k \rightarrow \infty } c 2^{-\min (m,k)} \right) \\&= 2^{p-1} \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}^p \left( 1 + \lim _{m \rightarrow \infty } 2^m c 2^{-m} \right) = c \Vert f \Vert _{JN_{p,p}(\mathbb {R}^n)}^p, \end{aligned}$$

where the constant c depends only on p. This means that \(f - \lim _{k \rightarrow \infty } f_{Q_k} \in L^p\) and therefore \(f \in L^p / \mathbb {R}\). This completes the proof. \(\square \)

The spaces \(VJN_p\) and \(CJN_p\) were studied in [18, 20]. These spaces are \(JN_p\) counterparts of the spaces VMO and CMO, which are subspaces of BMO. The spaces \(VJN_p\) and \(CJN_p\) can also be defined in a bounded cube \(Q_0\) instead of \(\mathbb {R}^n\) as in the following definitions. However, in that case, it is clear that the spaces coincide [18, 20]. In this paper, we only define the spaces in \(\mathbb {R}^n\) and we write \(VJN_p = VJN_p(\mathbb {R}^n)\) and \(CJN_p = CJN_p(\mathbb {R}^n)\) to simplify the notation.

Definition 2.7

(\(VJN_p\)) Let \(1< p < \infty \). Then the vanishing subspace \(VJN_p\) of \(JN_p\) is defined by setting

$$\begin{aligned} VJN_p:= \overline{D_p(\mathbb {R}^n) \cap JN_p}^{JN_p}, \end{aligned}$$

where

$$\begin{aligned} D_p(\mathbb {R}^n):= \{ f \in C^{\infty }(\mathbb {R}^n): |\nabla f| \in L^p(\mathbb {R}^n) \}. \end{aligned}$$

Definition 2.8

(\(CJN_p\)) Let \(1< p < \infty \). Then the subspace \(CJN_p\) of \(JN_p\) is defined by setting

$$\begin{aligned} CJN_p:= \overline{C_c^{\infty }(\mathbb {R}^n) }^{JN_p}, \end{aligned}$$

where \(C_c^{\infty }(\mathbb {R}^n)\) denotes the set of smooth functions with compact support in \(\mathbb {R}^n\).

As in the case of vanishing subspaces of BMO, there exist characterizations of \(VJN_p\) and \(CJN_p\) as \(JN_p\) functions for which certain integrals vanish, see [20, Theorems 3.2 and 4.3].

Theorem 2.9

Let \(1< p < \infty \). Then \(f \in VJN_p\) if and only if \(f \in JN_p\) and

where the supremum is taken over all collections of pairwise disjoint cubes \((Q_i)_{i=1}^{\infty }\) in \(\mathbb {R}^n\), such that the side length of each \(Q_i\) is at most a.

Theorem 2.10

Let \(1< p < \infty \). Then \(f \in CJN_p\) if and only if \(f \in VJN_p\) and

where the supremum is taken over all cubes \(Q \subset \mathbb {R}^n\) such that the side length of Q is at least a.

From the definitions, we can see that \(L^p / \mathbb {R} \subseteq CJN_p \subseteq VJN_p \subseteq JN_p\). It was shown in [18] that \(L^p / \mathbb {R} \ne CJN_p\) and \(VJN_p \ne JN_p\). However, the question of whether \(CJN_p\) and \(VJN_p\) coincide remained open.

3 Equality of \(VJN_p\) and \(CJN_p\)

Let \(1< p < \infty \). In this section, we prove the equality of \(VJN_p\) and \(CJN_p\) by showing that for any \(JN_p\) function f, integrals of the type

tend to zero both when \(|Q| \rightarrow 0\) and when \(|Q| \rightarrow \infty \). This type of integral appears in the Morrey norm, see for example [15]. Compare it also to the weak \(L^p\) norm (Definition 2.1), where the supremum is taken over such integrals with the cube Q replaced with an arbitrary measurable set.

The aforementioned results follow from Proposition 3.1.

Proposition 3.1

Let \(X \subseteq \mathbb {R}^n\) be either a bounded cube or the entire space \(\mathbb {R}^n\). Let \(Q \subset X\) be a cube such that \(3 Q \subseteq X\). Let \(1< p < \infty \), \(0< A < \infty \) and \(0 < \epsilon \le \epsilon _0(n,p)\). Suppose that \(f \in L_{loc}^1(X)\) is a nonnegative function such that

(3.1)

and for any cube \(Q' \subset X\) with \(l(Q') = \frac{2}{3} l(Q)\) or \(l(Q') = \frac{4}{3} l(Q)\) we have

(3.2)

Then there exist two cubes \(Q_1 \subset 3 Q\) and \(Q_2 \subset 3Q\) such that for \(i \in \{ 1, 2\}\), we have

(3.3)
(3.4)
(3.5)

where \(c = c(n,p)\) is a positive constant.

To prove this proposition, we first need to prove Lemmas 3.2 and 3.4.

Lemma 3.2

Let \(0< \alpha< 1 < \beta \). Let \(Q' \subset Q \subset {\tilde{Q}} \subset \mathbb {R}^n\) be cubes such that \(l(Q') = \alpha l(Q)\) and \(l({\tilde{Q}}) = \beta l(Q)\). Suppose that \(f \in L^1({\tilde{Q}})\) is a nonnegative function, \(1< p < \infty \), \(0< A < \infty \) and \(0 < \epsilon \le \epsilon _0(n, p, \alpha , \beta )\). Assume also that (3.1) holds for Q and (3.2) holds for \(Q'\) and \({\tilde{Q}}\). Then we have

where \(c_1 = c_1(n, p, \alpha , \beta )\) is a positive constant.

Proof

From the assumptions of the lemma, we get directly

$$\begin{aligned} \int _{{\tilde{Q}} \setminus Q'} \left| f - f_{{\tilde{Q}} \setminus Q'} \right|&\ge \left| \int _{{\tilde{Q}} \setminus Q} f - \frac{|{\tilde{Q}} \setminus Q|}{|{\tilde{Q}} \setminus Q'|} \int _{{\tilde{Q}} \setminus Q'} f \right| + \left| \int _{Q \setminus Q'} f - \frac{|Q \setminus Q'|}{|{\tilde{Q}} \setminus Q'|} \int _{{\tilde{Q}} \setminus Q'} f \right| \\&= 2 \left| \int _Q f - \frac{1 - \alpha ^n}{\beta ^n - \alpha ^n} \int _{{\tilde{Q}}} f - \frac{\beta ^n - 1}{\beta ^n - \alpha ^n} \int _{Q'} f \right| \\&\ge 2 \bigg ( A (1 - \epsilon ) |Q|^{1 - \frac{1}{p}} - \frac{1 - \alpha ^n}{\beta ^n - \alpha ^n} A (1 + \epsilon ) |{\tilde{Q}}|^{1 - \frac{1}{p}} \\&\quad - \frac{\beta ^n - 1}{\beta ^n - \alpha ^n} A (1 + \epsilon ) |Q'|^{1 - \frac{1}{p}} \bigg ) \\&= 2 A |Q|^{1 - \frac{1}{p}} \bigg ( 1 - \epsilon - \frac{1 - \alpha ^n}{\beta ^n - \alpha ^n} (1 + \epsilon ) \left( \beta ^n \right) ^{1 - \frac{1}{p}} \\&\quad - \frac{\beta ^n - 1}{\beta ^n - \alpha ^n} (1 + \epsilon ) \left( \alpha ^n \right) ^{1 - \frac{1}{p}} \bigg ). \end{aligned}$$

Thus, we have

Notice that

$$\begin{aligned} \lim _{\epsilon \rightarrow 0} C(n , p , \alpha , \beta , \epsilon )&= C(n , p , \alpha , \beta , 0) \\&= 2 \left( \beta ^n - \alpha ^n \right) ^{\frac{1}{p} - 1} \left( 1 - \frac{1 - \alpha ^n}{\beta ^n - \alpha ^n} \beta ^{n - \frac{n}{p}} - \frac{\beta ^n - 1}{\beta ^n - \alpha ^n} \alpha ^{n - \frac{n}{p}} \right) . \end{aligned}$$

This is positive for every n, p, \(\alpha \), and \(\beta \). Indeed, we have \(C(n, p, \alpha , \beta , 0 ) = 2 (\beta ^n - \alpha ^n)^{\frac{1}{p} - 1} h(\frac{1}{p})\) with

$$\begin{aligned} h(x) = 1 - \frac{1 - \alpha ^n}{\beta ^n - \alpha ^n} \beta ^{n - n x} - \frac{\beta ^n - 1}{\beta ^n - \alpha ^n} \alpha ^{n - n x}. \end{aligned}$$

We notice that \(h(0) = h(1) = 0\) and the second derivative of h is strictly negative. Thus h is concave and \(h(x) > 0\) for every \(0< x < 1\). In conclusion, if \(\epsilon \) is small enough, we have

$$\begin{aligned} C(n, p, \alpha , \beta , \epsilon ) \ge \frac{1}{2} C(n, p, \alpha , \beta , 0):= c_1 (n, p, \alpha , \beta ) > 0. \end{aligned}$$

This completes the proof. \(\square \)

For the reader’s convenience, we start by giving a proof of Proposition 3.1 in the special case \(n=1\) as it is technically much simpler. The idea of the proof is the same also in the multidimensional case.

Proof of Proposition 3.1 in the case \(n = 1\)

Let us assume that \(Q = [a, a + L]\). Define \({\tilde{Q}} = \left[ a, a + \frac{4}{3} L \right] \) and \(Q' = \left[ a, a + \frac{2}{3} L \right] \). We set \(Q_1:= {\tilde{Q}} {\setminus } Q' = \left[ a + \frac{2}{3} L, a + \frac{4}{3} L \right] \) and we get from Lemma 3.2 and the assumptions in Proposition 3.1 that

if \(\epsilon \) is small enough. Here \(c_1 = c_1(n,p,\alpha ,\beta )\) with \(n=1\), \(\alpha = \frac{2}{3}\) and \(\beta = \frac{4}{3}\).

On the other hand, if we set \({\tilde{Q}} = \left[ a - \frac{1}{3} L, a + L \right] \) and \(Q' = \big [ a + \frac{1}{3} L, a + L \big ] \) and define \(Q_2:= {\tilde{Q}} {\setminus } Q' = \left[ a - \frac{1}{3} L, a + \frac{1}{3} L \right] \), then we get from Lemma 3.2 that

if \(\epsilon \) is small enough. Finally we notice that the distance between the cubes \(Q_1\) and \(Q_2\) is \(\frac{1}{3} L\). This completes the proof. \(\square \)

The case \(n \ge 2\) is more complicated as the set \({\tilde{Q}} {\setminus } Q'\) is usually not a cube. Before the actual proof, we fix some notation about directions and projections.

Definition 3.3

Let \(\{v_1,\ldots ,v_n\}\) denote the standard orthonormal basis for \(\mathbb R^n\). Let \(Q_1 \subset \mathbb {R}^n\) and \(Q_2 \subset \mathbb {R}^n\) be cubes. The cubes can be presented as Cartesian products of intervals as

$$\begin{aligned} Q_1&= I_1^1 \times I_2^1 \times ... \times I_n^1 \text { and } \\ Q_2&= I_1^2 \times I_2^2 \times ... \times I_n^2. \end{aligned}$$

We say that \(P_k(Q_1):= I_k^1\) is the projection of cube \(Q_1\) to the subspace spanned by the base vector \(v_k\). Fix an index k with \(1\le k\le n\). If for every \(x_k \in P_k(Q_1)\) and \(y_k \in P_k(Q_2)\) we have \(x_k \le y_k\), then we say that \(Q_2\) is located in direction \(\uparrow ^k\) from \(Q_1\) and \(Q_1\) is located in direction \(\downarrow ^k\) from \(Q_2\).

Lemma 3.4

Let \(Q \subset \mathbb {R}^n\) be a cube. Let \(Q' \subset Q \subset {\tilde{Q}}\) be cubes with \(l(Q') = \frac{2}{3} l(Q)\) and \(l({\tilde{Q}}) = \frac{4}{3} l(Q)\) such that all the cubes share a corner. By symmetry, we may assume that \(Q = \left[ 0, L \right] ^n\), \(Q' = \left[ 0, \frac{2}{3} L \right] ^n\) and \({\tilde{Q}} = \left[ 0, \frac{4}{3} L \right] ^n\). Let \(f \in L^1 \left( [0, 2\,L]^n \right) \) be a nonnegative function, \(1< p < \infty \), \(0< A < \infty \) and \(0 < \epsilon \le \epsilon _0\) from Lemma 3.2 with \(\alpha = \frac{2}{3}\) and \(\beta = \frac{4}{3}\). Suppose also that (3.1) holds for Q and (3.2) holds for \(Q'\) and \({\tilde{Q}}\). Then there exists a cube \({\bar{Q}} \subset [0, 2L]^n \setminus Q'\) such that either

  1. (a)

    \(l({\bar{Q}}) = \frac{2}{3} L\) and \({\bar{Q}} \subset {\tilde{Q}}\)

    or

  2. (b)

    \(l({\bar{Q}}) = \frac{4}{3} L\) and \(P_k({\bar{Q}}) = P_k({\tilde{Q}}) = [0, \frac{4}{3} L]\) for every \(1 \le k \le n\) except one

and in addition

where \(c_2 = c_2(n,p)\) is a positive constant.

Proof

Let us divide the cube \({\tilde{Q}}\) dyadically into \(2^n\) subcubes. Then one of them is \(Q'\). Let us define \(Q_0 = \left[ \frac{2}{3} L, \frac{4}{3} L \right] ^n\) and let us denote the rest of the subcubes by \((Q_i)_{i=1}^{2^n - 2}\). Notice that \(Q'\) does not have an index unlike all the other dyadic subcubes. For any \(1 \le j \le n\), we define

$$\begin{aligned} Q_j':= I_1 \times I_2 \times ... \times I_n, \end{aligned}$$

where

$$\begin{aligned} I_k= {\left\{ \begin{array}{ll} {[}\frac{2}{3} L, 2L],&{} k=j,\\ {[}0, \frac{4}{3} L], &{} k\ne j.\\ \end{array}\right. } \end{aligned}$$

See Fig. 1 to see how these cubes are located with respect to each other. It is simple to check that then

$$\begin{aligned} Q_0 \subset Q_j' \subset [0, 2L]^n \setminus Q' \quad \text { and }\quad l(Q_j') = 2 l(Q_0) \end{aligned}$$

for every j. Also for every \(Q_i\) with \(1\le i\le 2^n-2\), there exists at least one cube \(Q_j'\) such that \(Q_i \subset Q_j'\). For every \(Q_i\), let us denote by \(Q_{j_i}'\) one of these cubes \(Q_j'\).

Fig. 1
figure 1

The cubes Q, \(Q'\), \({\tilde{Q}}\), \((Q_i)_{i=0}^{2^n-2}\) and \((Q_j')_{j=1}^n\), when \(n = 2\). We have \({\tilde{Q}} = Q' \cup Q_0 \cup Q_1 \cup Q_2\), \(Q_0 \cup Q_1 \subset Q_1'\) and \(Q_0 \cup Q_2 \subset Q_2'\)

Let us prove that for at least one of the cubes \(Q_i\) or \(Q_j'\), we have

(3.6)

where \(c_1 = c_1(n, p, \alpha , \beta )\) is the constant from Lemma 3.2 with \(\alpha = \frac{2}{3}\) and \(\beta = \frac{4}{3}\). We prove this by contradiction. Assume that (3.6) does not hold for any \(Q_i\) or \(Q_j'\). We get from Lemma 3.2 that

(3.7)

We continue estimating one of the integrals in the sum above

$$\begin{aligned}&\int _{Q_i} \Bigg | f - \frac{1}{(2^n - 1)|Q'|} \sum _{k=0}^{2^n-2} \int _{Q_k} f \Bigg | \\&\quad = \int _{Q_i} \Bigg | f - f_{Q_i} + \frac{1}{(2^n - 1)|Q'|} \sum _{k=0}^{2^n - 2} \left( \int _{Q_i} f - \int _{Q_k} f \right) \Bigg | \\&\quad \le \int _{Q_i} |f - f_{Q_i}| + \frac{1}{2^n - 1} \sum _{k=0}^{2^n - 2} \left| \int _{Q_i} f - \int _{Q_k} f \right| . \end{aligned}$$

Assume that \(k \ge 1\). Then because \(Q_k \cup Q_0 \subset Q_{j_k}'\) and \(Q_k \cap Q_0 = \varnothing \), we have

$$\begin{aligned} \left| \int _{Q_k} f - \int _{Q_0} f \right| \le \left| \int _{Q_k} \left( f - f_{Q_{j_k}'} \right) \right| + \left| \int _{Q_0} \left( f_{Q_{j_k}'} - f \right) \right| \le \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| . \end{aligned}$$

Thus if \(i = 0\), we get

$$\begin{aligned} \sum _{k=0}^{2^n - 2} \left| \int _{Q_i} f - \int _{Q_k} f \right| \le \sum _{k=1}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| . \end{aligned}$$

On the other hand, if \(i \ge 1\), then

$$\begin{aligned} \sum _{\begin{array}{c} k=0 \\ k \ne i \end{array}}^{2^n - 2} \left| \int _{Q_i} f - \int _{Q_k} f \right|&\le (2^n - 2) \left| \int _{Q_i} f - \int _{Q_0} f \right| + \sum _{\begin{array}{c} k=0 \\ k \ne i \end{array}}^{2^n - 2} \left| \int _{Q_0} f - \int _{Q_k} f \right| \\&\le (2^n - 2) \int _{Q_{j_i}'} \left| f - f_{Q_{j_i}'} \right| + \sum _{\begin{array}{c} k=1 \\ k \ne i \end{array}}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| . \end{aligned}$$

We continue by estimating the sum in (3.7) and we get

$$\begin{aligned}&\sum _{i=0}^{2^n - 2} \int _{Q_i} \left| f - \frac{1}{(2^n - 1)|Q'|} \sum _{k=0}^{2^n-2} \int _{Q_k} f \right| \\&\quad \le \sum _{i=0}^{2^n - 2} \left( \int _{Q_i} |f - f_{Q_i}| + \frac{1}{2^n - 1} \sum _{k=0}^{2^n - 2} \left| \int _{Q_i} f - \int _{Q_k} f \right| \right) \\&\quad \le \sum _{i=0}^{2^n - 2} \int _{Q_i} |f - f_{Q_i}| + \frac{1}{2^n - 1} \sum _{k=1}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| \\&\qquad + \sum _{i=1}^{2^n - 2} \left( \frac{1}{2^n - 1} \left( (2^n - 2) \int _{Q_{j_i}'} \left| f - f_{Q_{j_i}'} \right| + \sum _{\begin{array}{c} k=1 \\ k \ne i \end{array}}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| \right) \right) \\&\quad = \sum _{i=0}^{2^n - 2} \int _{Q_i} |f - f_{Q_i}| + \sum _{k=1}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| + \frac{1}{2^n - 1} \sum _{i=1}^{2^n - 2} \sum _{\begin{array}{c} k=1 \\ k \ne i \end{array}}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| \\&\quad = \sum _{i=0}^{2^n - 2} \int _{Q_i} |f - f_{Q_i}| + \left( 1 + \frac{2^n - 3}{2^n - 1} \right) \sum _{k=1}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| . \end{aligned}$$

Then finally from our assumption, that (3.6) does not hold, we get

$$\begin{aligned}&\sum _{i=0}^{2^n - 2} \int _{Q_i} |f - f_{Q_i}| + \left( 1 + \frac{2^n - 3}{2^n - 1} \right) \sum _{k=1}^{2^n - 2} \int _{Q_{j_k}'} \left| f - f_{Q_{j_k}'} \right| \\&\quad < \sum _{i=0}^{2^n - 2} \left( 2^n - 1 \right) ^{-\frac{1}{p}} \left( 1 + 2^{1 + n - \frac{n}{p}} \left( \frac{2^n - 2}{2^n - 1} \right) ^2 \right) ^{-1} c_1 A |Q_i|^{1 - \frac{1}{p}} \\&\qquad + 2 \cdot \frac{2^n - 2}{2^n - 1} \sum _{k=1}^{2^n - 2} \left( 2^n - 1 \right) ^{-\frac{1}{p}} \left( 1 + 2^{1 + n - \frac{n}{p}} \left( \frac{2^n - 2}{2^n - 1} \right) ^2 \right) ^{-1} c_1 A |Q_{j_k}'|^{1 - \frac{1}{p}} \\&\quad = \left( 2^n - 1 \right) ^{1-\frac{1}{p}} \left( 1 + 2^{1 + n - \frac{n}{p}} \bigl ( \tfrac{2^n - 2}{2^n - 1} \bigr )^2 \right) ^{-1} c_1 A \biggl ( |Q'|^{1 - \frac{1}{p}} + \tfrac{2(2^n - 2)^2}{(2^n - 1)^2} \left( 2^n |Q'| \right) ^{1 - \frac{1}{p}} \biggr ) \\&\quad = (2^n - 1)^{1 - \frac{1}{p}} c_1 A |Q'|^{1 - \frac{1}{p}}. \end{aligned}$$

In conclusion, we have

which is a contradiction. Hence, there is at least one cube \({\bar{Q}} \subset [0, 2\,L]^n {\setminus } Q'\) that satisfies the conditions of the lemma and

where \(c_2 = c_2(n,p)\) is a positive constant. This completes the proof. \(\square \)

Now we are ready to prove Proposition 3.1.

Proof of Proposition 3.1 in the case \(n \ge 2\)

Let \(0 < \epsilon \le \epsilon _0\) from Lemma 3.2 with \(\alpha = \frac{2}{3}\) and \(\beta = \frac{4}{3}\). We apply Lemma 3.4\(2^n\) times to each corner of Q and obtain \(2^n\) sets of cubes \(Q'\), \({\tilde{Q}}\) and \({\bar{Q}}\). Here, every \({\bar{Q}}\) satisfies (3.3) and (3.5). No matter which corner the cubes \(Q'\), Q and \({\tilde{Q}}\) share, we always have \(\frac{1}{3} Q \subset Q'\). Since \({\bar{Q}}\) and \(Q'\) are disjoint, we get that \({\bar{Q}}\) and \(\frac{1}{3} Q\) are also disjoint and thus each \({\bar{Q}}\) is located in at least one direction from \(\frac{1}{3} Q\) in the sense of Definition 3.3.

Because \(Q'\) is in the corner of \({\tilde{Q}}\), there is one direction for each \(k \in \{1, 2,..., n\}\) such that \({\bar{Q}}\) cannot be located in that direction from \(\frac{1}{3} Q\). For example, if \(Q = [0,L]^n\), \(Q' = [0, \frac{2}{3} L]^n\) and \({\tilde{Q}} = [0, \frac{4}{3} L]^n\), then the possible directions where \({\bar{Q}}\) may be located in from \(\frac{1}{3} Q\) are \(\uparrow ^1\), \(\uparrow ^2\),... and \(\uparrow ^n\). The cube \({\bar{Q}}\) cannot be located in any of the directions \(\downarrow ^1\), \(\downarrow ^2\),... and \(\downarrow ^n\) from \(\frac{1}{3} Q\). Thus, for each cube \({\bar{Q}}\), there are n possible directions and for any two cubes \({\bar{Q}}\), the sets of possible directions do not coincide.

If one cube \({\bar{Q}}\) is located in direction \(\uparrow ^k\) from \(\frac{1}{3} Q\) and another is located in direction \(\downarrow ^k\), then the distance between those two cubes is at least \(\frac{1}{3} l(Q)\) – thus the proposition is true. Therefore let us assume by contradiction that no two cubes \({\bar{Q}}\) are located in opposite directions.

Let S be the set of all directions in which all the cubes \({\bar{Q}}\) are located from \(\frac{1}{3} Q\). Then we clearly have \(|S| \le n\), because by our assumption, there is at most one direction in S for each \(k \in \{1, 2,..., n\}\). However, there is always at least one cube \({\bar{Q}}\) for which the possible directions are all exactly opposite to the directions in S. If for example the directions in S are \(\uparrow ^1\), \(\uparrow ^2\),... and \(\uparrow ^m\) for some \(m \le n\), then there is no direction in S for the cube \({\bar{Q}}\) for which the possible directions are only \(\downarrow ^1\), \(\downarrow ^2\),... and \(\downarrow ^n\). This contradicts with the assumption that the directions of all \({\bar{Q}}\) are represented in S. Thus, we conclude that there must be two cubes \({\bar{Q}}\) in opposite directions. This completes the proof. \(\square \)

Now we can show that the Morrey type integral (1.1) vanishes as the measure of the cube tends to infinity.

Theorem 3.5

Let \(1< p < \infty \) and suppose that \(f \in JN_p(\mathbb {R}^n)\). Then there is a constant b such that

(3.8)

where the supremum is taken over all cubes \(Q \subset \mathbb {R}^n\) such that the side length of Q is at least a.

Proof

Assume first that \(f \in JN_p(\mathbb {R}^n) \cap L^{p,\infty }(\mathbb {R}^n)\) and f is nonnegative. Let

where \(A \ge 0\). The limit exists as this sequence is decreasing, the elements are finite – this follows from Remark 2.2 because \(f \in L^{p,\infty }(\mathbb {R}^n)\) – and the sequence is bounded from below by 0.

Let us assume that \(A > 0\). Let \(0 < \epsilon \le \epsilon _0(n, p)\) as in Proposition 3.1. Then there exists a number \(N < \infty \) such that (3.2) holds for every cube Q where \(l(Q) \ge N\). Also for any number \(M < \infty \), there exists a cube Q such that \(l(Q) \ge M\) and (3.1) holds. This means that we can find a sequence of cubes \((Q_i)_{i=1}^{\infty }\) such that \(l(Q_1) \ge \frac{3}{2} N\), \(l(Q_{i+1}) > l(Q_i)\), \(\lim _{i \rightarrow \infty } l(Q_i) = \infty \) and

for every \(i \in \mathbb {N}\).

Let \(Q_i\) be one of these cubes. According to Proposition 3.1, there exist two cubes \(Q_{i,1} \subset 3 Q_i\) and \(Q_{i,2} \subset 3 Q_i\) that satisfy (3.3), (3.4) and (3.5). The cubes \((Q_{i,1})_{i=1}^{\infty }\) may not be pairwise disjoint. However, for every cube \(Q_i\), we have two cubes to choose from.

Let us construct a new sequence of cubes \((Q_{{i_j}}')_{j=1}^{\infty }\) iteratively. We start with \(Q_{i_1}:= Q_1\) and choose \(Q_{i_1}':= Q_{1,1}\). Let \(Q_{i_2}\), \(i_2 > 1\), be the smallest cube in the sequence \((Q_i)_{i=1}^{\infty }\) such that \(\frac{1}{3} l(Q_{i_2}) \ge l(Q_{i_1}')\). Then at least one of the cubes \(Q_{i_2,1}\) and \(Q_{i_2,2}\) is pairwise disjoint with \(Q_{i_1}'\). Let’s say that \(Q_{i_2,1}\) is the disjoint one and set \(Q_{i_2}':= Q_{i_2,1}\).

Let us denote by Q the smallest cube such that \(Q_{i_1}' \cup Q_{i_2}' \subset Q\). Let \(Q_{i_3}\), \(i_3 > i_2\), be the smallest cube in the sequence \((Q_i)_{i=1}^{\infty }\) such that \(\frac{1}{3} l(Q_{i_3}) \ge l(Q)\). Then at least one of the cubes \(Q_{i_3, 1}\) and \(Q_{i_3, 2}\) is pairwise disjoint with both \(Q_{i_1}'\) and \(Q_{i_2}'\).

By repeating this process and taking a subsequence of \((Q_i)_{i=1}^{\infty }\), if necessary, we get infinitely many pairwise disjoint cubes \((Q_{i_j}')_{j=1}^{\infty }\). Then we get

This contradicts with the assumption that \(f \in JN_p(\mathbb {R}^n)\). Thus, we conclude that \(A = 0\).

Now assume only that \(f \in JN_p(\mathbb {R}^n)\). From [18, Theorem 5.2], we get that there is a constant b such that \(f - b \in L^{p,\infty }(\mathbb {R}^n)\). Obviously \(f - b \in JN_p(\mathbb {R}^n)\). Then from (2.1), we get that \(|f-b| \in JN_p(\mathbb {R}^n) \cap L^{p,\infty }(\mathbb {R}^n)\). Finally by the same reasoning as before, we conclude that

This completes the proof. \(\square \)

Remark 3.6

Naturally Theorem 3.5 implies that the result holds also for \(L^p\) functions with \(p>1\), but this can also be seen easily by considering the Hardy-Littlewood maximal function. Indeed assume by contradiction that

Then for any number \(a < \infty \), there exists a cube Q such that \(l(Q) \ge a\) and

Thus for every \(x \in Q\), we have \(M f(x) \ge \frac{A}{2} |Q|^{- \frac{1}{p}}\), where Mf is the non-centered Hardy-Littlewood maximal function. Thus \(Mf(x) \notin L^p\) and consequently \(f \notin L^p\).

Clearly the theorem does not hold for weak \(L^p\) functions. For example let \(n = 1\) and \(f(x) = x^{-1/p}\), when \(x > 0\). Then we have \(f \in L^{p,\infty }(\mathbb {R})\) but (3.8) does not hold for any b. The same function shows us that Theorem 3.8 does not hold for weak \(L^p\) functions.

As a corollary from Theorem 3.5, we get that \(VJN_p\) and \(CJN_p\) coincide. This answers a question that was posed in [18] and it answers [20, Question 5.6] and [21, Question 17].

Corollary 3.7

Let \(1< p< \infty \). Then \(CJN_p(\mathbb {R}^n) = VJN_p(\mathbb {R}^n)\).

Proof

It is clear that \(CJN_p \subseteq VJN_p\). Let \(f \in VJN_p \subset JN_p\). Then we get from Theorem 3.5 that there is a constant b such that

Then by Theorem 2.10, we get that \(f \in CJN_p\). This completes the proof. \(\square \)

From the following result, we can infer that the additional condition in [18, Lemma 5.8] is not necessary, answering the question posed in [18].

Theorem 3.8

Let \(X \subseteq \mathbb {R}^n\) be either a bounded cube or the entire space \(\mathbb {R}^n\) and \(1< p < \infty \). Suppose that \(f \in JN_p(X)\). Then

(3.9)

where the supremum is taken over all cubes \(Q \subseteq X\), such that the side length of Q is at most a.

Remark 3.9

The theorem implies that \(L^p\) functions also satisfy (3.9). However, in that case, the result is well known as it follows simply from Hölder’s inequality and the dominated convergence theorem. Notice that for \(L^p\) functions, (3.9) holds also when \(p = 1\), whereas in Remark 3.6, it is necessary that \(p > 1\).

Remark 3.10

In particular, this result implies that for any \(1< p < \infty \) and bounded cube \(X \subset \mathbb {R}^n\), the John–Nirenberg space \(JN_p(X)\) is a subspace of the vanishing Morrey space \(VL^{1,n-\frac{n}{p}}(X)\) as defined in [15].

Proof of Theorem 3.8

The proof is similar to the proof of Theorem 3.5, but we have to take into account the possibility that we might have \(3 Q \not \subseteq X\), even though \(Q \subseteq X\).

Let \(f \in JN_p(X)\). Let us assume first that f is nonnegative and \(f \in L^{p,\infty }(X)\). Let

(3.10)

The limit exists as the sequence is decreasing and bounded from below by 0.

Assume that \(A > 0\). Let \(0 < \epsilon \le \epsilon _0(n,p)\) as in Proposition 3.1. Then there is a number \(\delta > 0\) such that (3.2) holds for any cube Q where \(l(Q) \le \delta \). Also because of (3.10), we know that for every \(a > 0\), there exists a cube \(Q \subseteq X\) such that \(l(Q) \le a\) and (3.1) holds for Q. Therefore, we can find a sequence of cubes \((Q_i)_{i=1}^{\infty }\) such that \(l(Q_1) \le \frac{3}{4} \delta \), \(l(Q_{i+1}) < l(Q_i)\), \(\lim _{i \rightarrow \infty } l(Q_i) = 0\) and

for every \(i \ge 1\).

Case 1: There are infinitely many cubes \(Q_i\) in the sequence such that \(3 Q_i \subseteq X\).

By taking a subsequence, we may assume that \(3 Q_i \subseteq X\) for every i. Let \(Q_i\) be one of these cubes. Then according to Proposition 3.1, there exist two cubes \(Q_{i,1} \subset 3 Q_i\) and \(Q_{i,2} \subset 3 Q_i\) that satisfy (3.3), (3.4) and (3.5). The cubes \((Q_{i,1})_{i=1}^{\infty }\) may not be pairwise disjoint. However, for every cube \(Q_i\), we have two cubes to choose from.

Let us construct a new sequence of cubes \((Q_{i_j}')_{j=1}^{\infty }\) iteratively. We start with \(Q_{i_1}:= Q_1\). Then there exist infinitely many cubes \(Q_i\) in the sequence such that \(Q_{1,1} \cap 3 Q_i = \varnothing \) for every i or \(Q_{1,2} \cap 3 Q_i = \varnothing \) for every i. This is true because \({\text {dist}}(Q_{1,1}, Q_{1,2}) \ge l(Q_1) / 3\) and \(\lim _{i \rightarrow \infty } l(Q_i) = 0\). Without loss of generality, we may assume that \(Q_{1,1} \cap 3 Q_i = \varnothing \) for infinitely many \(i > 1\). We set \(Q_{i_1}':= Q_{1,1}\). Let \(Q_{i_2}\), \(i_2 > 1\), be the first cube in the sequence \((Q_i)_{i=1}^{\infty }\) such that \(Q_{i_1}' \cap 3 Q_{i_2} = \varnothing \). Then the cubes \(Q_{i_1}'\), \(Q_{i_2, 1}\) and \(Q_{i_2, 2}\) are all pairwise disjoint. Thus, we can continue by choosing one of the cubes \(Q_{i_2, 1}\) and \(Q_{i_2, 2}\) such that there are still infinitely many cubes \(3 Q_i\), \(i > i_2\), that are pairwise disjoint with both the chosen cube and \(Q_{i_1}'\).

By repeating this process and taking a subsequence of \((Q_i)_{i=1}^{\infty }\), if necessary, we get infinitely many pairwise disjoint cubes \((Q_{i_j}')_{j=1}^{\infty }\) in X that all satisfy (3.5).

Case 2: There are only finitely many cubes \(Q_i\) in the sequence such that \(3 Q_i \subseteq X\). This can only happen if X is a bounded cube. In this case, we shall also construct a new sequence of pairwise disjoint cubes \((Q_{i_j}')_{j=1}^{\infty }\) iteratively. By taking a subsequence of \((Q_i)_{i=1}^{\infty }\), we may assume that \(l(Q_1) \le \frac{1}{4} l(X)\) and \(l(Q_{i+1}) \le \frac{2}{9} l(Q_i)\). Assume that \(3 Q_i \not \subset X\). Then we know that for any \(k \in \{1, 2,..., n\}\), the projection \(P_k(3 Q_i)\) can only intersect one of the endpoints of \(P_k(X)\). Let m be the number of base vectors \(v_k\) such that \(P_k(3 Q_i) \subset P_k(X)\). Then \(0 \le m < n\) and there exist \(2^m\) cubes \({\bar{Q}}_i \subset X \cap 3 Q_i {\setminus } \frac{1}{3} Q_i\) as they are defined in Lemma 3.4.

Every such cube \({\bar{Q}}_i\) is located in some direction from the cube \(\frac{1}{3} Q_i\), in a similar way as in the proof of Proposition 3.1. Without loss of generality, we may assume that the possible directions for these cubes are \(\uparrow ^1\), \(\downarrow ^1\), \(\uparrow ^2\), \(\downarrow ^2\),..., \(\uparrow ^m\), \(\downarrow ^m\), \(\downarrow ^{m+1}\), \(\downarrow ^{m+2}\),..., \(\downarrow ^n\), but for each \({\bar{Q}}_i\) there is naturally only one possible direction for each \(k \in \{1, 2,..., n\}\). If one of the cubes is located in direction \(\uparrow ^k\) and another is in direction \(\downarrow ^k\), \(k \le m\), then the distance between these two cubes is at least \(\frac{1}{3} l(Q_i)\). Thus, we can choose one of these cubes into the sequence \((Q_{i_j}')_{j=1}^{\infty }\) the same way as in the first case and there are still infinitely many cubes \(Q_l\), \(l > i\), such that \(3 Q_l \cap {\bar{Q}}_i = \varnothing \).

Let us assume that there are no two cubes \({\bar{Q}}_i\) that are located in opposite directions from \(\frac{1}{3} Q_i\). Then by similar reasoning as in the proof of Proposition 3.1, we know that at least one of the cubes \({\bar{Q}}_i\) must be located in direction \(\downarrow ^k\) for some \(k > m\). Let us denote such a cube by \(Q_{i,1}\). If there are infinitely many cubes \(Q_l\), \(l > i\), such that \(3 Q_l \cap Q_{i,1} = \varnothing \), then we may choose \(Q_{i,1}\) into the sequence \((Q_{i_j}')_{j=1}^{\infty }\).

Assume that there are only finitely many cubes \(Q_l\), \(l > i\), such that \(3 Q_l \cap Q_{i,1} = \varnothing \). Then there are infinitely many cubes \(Q_l\), \(l > i\), such that \(3 Q_l \cap Q_{i,1} \ne \varnothing \). Let \(Q_l\) be one of these cubes. Because \(l(Q_l) \le \frac{2}{9} l(Q_i)\), we know that \(P_k(3 Q_l) \subset P_k(X)\). This is because the distance from \(P_k(Q_{i,1})\) to \(\partial P_k(X)\) is at least \(\frac{2}{3} l(Q_i)\).

In addition for every \(1 \le s \le m\), we have \(P_s(3 Q_l) \subset P_s(X)\). This is because of how the cube \({\bar{Q}}\) was chosen in Lemma 3.4. Because the cube \(Q_{i,1}\) is located in direction \(\downarrow ^k\) from the cube \(\frac{1}{3} Q_i\), we have either \(Q_{i,1} \subset {\tilde{Q}}_i\) (where \({\tilde{Q}}_i\) is as in Lemma 3.4) or the projection of \({\tilde{Q}}_i\) and the projection of \(Q_{i,1}\) coincide for every base vector except \(v_k\). Thus \(P_s(Q_{i,1}) \subset P_s({\tilde{Q}}_i)\). Because \(P_s(3 Q_i) \subset P_s(X)\) for every \(1 \le s \le m\), we get that the distance from \(P_s({\tilde{Q}}_i)\) to \(\partial P_s(X)\) is at least \(\frac{2}{3} l(Q_i)\). See Fig. 2 to get a better understanding of the situation.

Fig. 2
figure 2

An example of how the cubes X, \(Q_i\), \({\tilde{Q}}_i\), \(Q_{i,1}\) and \(Q_l\) may be situated with respect to each other. In the picture, we have the projections of these cubes to the mk-plane. The cube \(Q_{i,1}\) is located in direction \(\downarrow ^k\) from \(\frac{1}{3} Q_i\). Therefore, we have either \(Q_{i,1}\) as shown in the picture or \(Q_{i,1} \subset {\tilde{Q}}_i\)

In conclusion, if \(3 Q_i \not \subset X\) and there are m base vectors \(v_s\) such that \(P_s(3 Q_i) \subset P_s(X)\), then we can find a cube \(Q_{i,1} \subset X \cap 3 Q_i\) such that (3.5) holds and there are infinitely many cubes \(Q_l\), \(l > i\), such that \(Q_{i,1} \cap 3 Q_l = \varnothing \), or, if the first option is not possible, there exist infinitely many cubes \(Q_l\), \(l > i\), such that \(P_s(3 Q_l) \subset P_s(X)\) for at least \(m+1\) base vectors \(v_s\). Because there are only n base vectors in total, this latter option can only happen at most n times. Thus we can always find infinitely many pairwise disjoint cubes \((Q_{i_j}')_{j=1}^{\infty }\) in X that all satisfy (3.5).

In both cases, we get

This contradicts with the fact that \(f \in JN_p(X)\). Therefore, we conclude that \(A = 0\).

Now assume only that \(f \in JN_p(X)\). Then there is a constant b such that \(f - b \in L^{p,\infty }(X)\). Also from (2.1), we get that \(|f - b| \in JN_p(X) \cap L^{p,\infty }(X)\). Then using the same argument as earlier, we get

This completes the proof. \(\square \)