---
abstract: 'In this paper, we investigate the relation between Sobolev-type embeddings of Hajłasz-Besov spaces (and also Hajłasz-Triebel-Lizorkin spaces) defined on a metric measure space $(X,d,\mu)$ and lower bound for the measure $\mu.$ We prove that if the measure $\mu$ satisfies $\mu(B(x,r))\geq cr^Q$ for some $Q>0$ and for any ball $B(x,r)\subset X,$ then the Sobolev-type embeddings hold on balls for both these spaces. On the other hand, if the Sobolev-type embeddings hold in a domain $\Omega\subset X,$ then we prove that the domain $\Omega$ satisfies the so-called measure density condition, i.e., $\mu(B(x,r)\cap\Omega)\geq cr^Q$ holds for any ball $B(x,r)\subset X,$ where $X=(X,d,\mu)$ is an Ahlfors $Q$-regular and geodesic metric measure space.'
address: 'Discipline of Mathematics, Indian Institute of Technology Indore, Simrol, Indore-453552, India'
author:
- Nijjwal Karak
bibliography:
- 'embedding.bib'
title: 'Measure density and Embeddings of Hajłasz-Besov and Hajłasz-Triebel-Lizorkin spaces'
---

[^1]

Keywords: Metric measure space, Hajłasz-Besov space, Hajłasz-Triebel-Lizorkin space, measure density.\
2010 Mathematics Subject Classification: 46E35, 42B35 .

Introduction
============

The most important result of the classical theory of Sobolev spaces is the Sobolev embedding theorem. Embeddings of fractional Sobolev spaces $W^{s,p}(\Omega),$ where $\Omega$ is a domain in $\mathbb{R}^n$ and $0<s<1,$ have been established in [@EGE12] when $p\geq 1$ and in [@Zho15] when $p<1.$ In the metric space setting, especially for Hajłasz-Sobolev space $M^{1,p}(X),$ Hajłasz has been able to find similar embeddings on balls provided that the measure of the balls has a lower bound, see Theorem 8.7 of [@Haj03]. We assume here and throughout the paper that $X=(X,d,\mu)$ is a *metric measure space* equipped with a metric $d$ and a Borel regular measure $\mu$ on $X$ such that all balls defined by $d$ have finite and positive measures. In this paper we have proved similar embeddings on balls for homogeneous Hajłasz-Besov spaces $\dot{N}^s_{p,q}(X)$ and also for homogeneous Hajłasz-Triebel-Lizorkin spaces $\dot{M}^s_{p,q}(X),$ see section 3 and 4. For the definitions of $M^{s,p}(X),$ $\dot{M^{s,p}(X)},$ $M^s_{p,q}(X),$ $\dot{M}^s_{p,q}(X),$ $N^s_{p,q}(X)$ and $\dot{N}^s_{p,q}(X)$ see Section 2. Among several possible definitions of Besov and Triebel-Lizorkin spaces in the metric setting, the pointwise definition introduced in [@KYZ11] appears to be very useful. This approach is based on the definition of Hajłasz-Sobolev space; it leads to the classical Besov and Triebel-Lizorkin spaces in the setting of Euclidean space, [@KYZ11 Theorem 1.2] and it gives a simple way to define these spaces on a measurable subset of $\mathbb{R}^n.$

Let $(X,d)$ be a metric space equipped with a measure $\mu.$ A measurable set $S\subset X$ is said to satisfy a *measure density condition*, if there exists a constant $c_m>0$ such that $$\label{measuredensity}
\mu(B(x,r)\cap S)\geq c_m\mu(B(x,r))$$ for all balls $B(x,r)$ with $x\in S$ and $0<r\leq 1.$

Note that sets satisfying such a condition are sometimes called in the literature regular sets. If the measure $\mu$ is doubling, then the upper bound 1 for the radius $r$ can be omitted. If a set $S$ satisfies the measure density condition, then we have $\mu(\overline{S}\setminus S)=0,$ [@Shv07 Lemma 2.1]. Some examples of sets satisfying the measure density condition are cantor-like sets such as Sierpiński carpets of positive measure.\
In [@HKT08b Theorem 1], the authors have proved that if the Sobolev embedding holds in a domain $\Omega\subset\mathbb{R}^n,$ in any of all the possible cases, then $\Omega$ satisfies the measure density condition. Same result for fractional Sobolev spaces was obtained by Zhou, [@Zho15]. In this paper, we have obtained similar results for Hajłasz-Besov spaces $N^s_{p,q}$ and Hajłasz-Triebel-Lizorkin spaces $M^s_{p,q},$ see section 5. The idea of the proof is borrowed from [@HIT16 Theorem 6.1] where the authors showed that an $M^s_{p,q}$-extension domain (or an $N^s_{p,q}$-extension domain) satisfies measure density condition.\
See [@HHL] for geometric characterizations of embedding theorems for these spaces.\
Notation used in this paper is standard. The symbol $c$ or $C$ will be used to designate a general constant which is independent of the main parameters and whose value may change even within a single string of estimate. The symbol $A\lesssim B$ or $B \gtrsim A$ means that $A\leq CB$ for some constant $C.$ If $A\lesssim B$ and $B\lesssim A,$ then we write $A\approx B.$ For any locally integrable function $u$ and $\mu$-measurable set $A,$ we denote by $\dashint_{A}u$ the integral average of $u$ on A, namely, $\dashint_{A}u:=\frac{1}{\mu(A)}\int_Au.$

Definitions and Preliminaries
=============================

Besov and Triebel-Lizorkin spaces are certain generalizations of fractional Sobolev spaces. There are several ways to define these spaces in the Euclidean setting and also in the metric setting. For various definitions of in the metric setting, see [@GKS10], [@GKZ13], [@KYZ11] and the references therein. In this paper, we use the approach based on pointwise inequalities, introduced in [@KYZ11].

Let $S\subset X$ be a measurable set and let $0<s<\infty.$ A sequence of nonnegative measurbale functions $(g_k)_{k\in\mathbb{Z}}$ is a fractional $s$-gradient of a measurable function $u:S\rightarrow [-\infty,\infty]$ in $S,$ if there exists a set $E\subset S$ with $\mu(E)=0$ such that $$\label{Hajlasz}
\vert u(x)-u(y)\vert\leq d(x,y)^s\left(g_k(x)+g_k(y)\right)$$ for all $k\in\mathbb{Z}$ and for all $x,y\in S\setminus E$ satisfying $2^{k-1}\leq d(x,y)<2^{k}.$ The collection of all fractional $s$-gradient of $u$ is denoted by $\mathbb{D}^s(u).$

Let $S\subset X$ be a measurable set. For $0<p,q\leq \infty$ and a sequence $\vec{f}=(f_k)_{k\in\mathbb{Z}}$ of measurable functions, we define $$\Vert (f_k)_{k\in\mathbb{Z}}\Vert_{L^p(S,l^q)}=\big\Vert \Vert (f_k)_{k\in\mathbb{Z}}\Vert_{l^q} \big\Vert_{L^p(S)}$$ and $$\Vert (f_k)_{k\in\mathbb{Z}}\Vert_{l^q(L^p(S))}=\big\Vert (\Vert (f_k)\Vert_{L^p(S)})_{k\in\mathbb{Z}} \big\Vert_{l^q},$$ where $$\Vert (f_k)_{k\in\mathbb{Z}}\Vert_{l^q}=
\begin{cases}
(\sum_{k\in\mathbb{Z}}\vert f_k\vert^q)^{1/q},& ~\text{when}~0<q<\infty,\\
\sup_{k\in\mathbb{Z}}\vert f_k\vert,& ~\text{when}~q=\infty.
\end{cases}$$

Let $S\subset X$ be a measurable set. Let $0<s<\infty$ and $0<p,q\leq\infty.$ The *homogeneous Hajłasz-Triebel-Lizorkin space* $\dot{M}^s_{p,q}(S)$ consists of measurable functions $u:S\rightarrow [-\infty,\infty],$ for which the (semi)norm $$\Vert u\Vert_{\dot{M}^s_{p,q}(S)}=\inf_{\vec{g}\in\mathbb{D}^s(u)}\Vert\vec{g}\Vert_{L^p(S,l^q)}$$ is finite. The (non-homogeneous) *Hajłasz-Triebel-Lizorkin space* $M^s_{p,q}(S)$ is $\dot{M}^s_{p,q}(S)\cap L^p(S)$ equipped with the norm $$\Vert u\Vert_{M^s_{p,q}(S)}=\Vert u\Vert_{L^p(S)}+\Vert u\Vert_{\dot{M}^s_{p,q}(S)}.$$ Similarly, the *homogeneous Hajłasz-Besov space* $\dot{N}^s_{p,q}(S)$ consists of measurable functions $u:S\rightarrow [-\infty,\infty],$ for which the (semi)norm $$\Vert u\Vert_{\dot{N}^s_{p,q}(S)}=\inf_{\vec{g}\in\mathbb{D}^s(u)}\Vert\vec{g}\Vert_{l^q(L^p(S))}$$ is finite and the (non-homogeneous) *Hajłasz-Besov space* $N^s_{p,q}(S)$ is $\dot{N}^s_{p,q}(S)\cap L^p(S)$ equipped with the norm $$\Vert u\Vert_{N^s_{p,q}(S)}=\Vert u\Vert_{L^p(S)}+\Vert u\Vert_{\dot{N}^s_{p,q}(S)}.$$

The space $M^s_{p,q}(\mathbb{R}^n)$ given by the metric definition coincides with the Triebel-Lizorkin space $F^s_{p,q}(\mathbb{R}^n),$ defined via the Fourier analytic approach, when $0<s<1,$ $n/(n+s)<p<\infty$ and $0<q\leq \infty,$ see [@KYZ11]. Similarly, $N^s_{p,q}(\mathbb{R}^n)$ coincides with Besov space $B^s_{p,q}(\mathbb{R}^n)$ for $0<s<1,$ $n/(n+s)<p<\infty$ and $0<q\leq \infty,$ see [@KYZ11]. For the definitions of $F^s_{p,q}(\mathbb{R}^n)$ and $B^s_{p,q}(\mathbb{R}^n),$ we refer to [@Tri83] and [@Tri92].

Let $S\subset X$ be a measurable set. Let $0<s<\infty$ and $0<p\leq\infty.$ A nonnegative measurable function $g$ is an $s$-gradient of a measurable function $u$ in $S$ if there exists a set $E\subset S$ with $\mu(E)=0$ such that for all $x,y\in S\setminus E,$ $$\vert u(x)-u(y)\vert\leq d(x,y)^s(g(x)+g(y)).$$ The collection of all $s$-gradients of $u$ is denoted by $\mathcal{D}^s(u).$ The *homogeneous Hajłasz-Sobolev space* $\dot{M}^{s,p}(S)$ consists of measurable functions $u$ for which $$\Vert u\Vert_{\dot{M}^{s,p}(S)}=\inf_{g\in\mathcal{D}^s(u)}\Vert g\Vert_{L^p(S)}$$ is finite. The *Hajłasz-Sobolev space* $M^{s,p}(S)$ is $\dot{M}^{s,p}(S)\cap L^p(S)$ equipped with the norm $$\Vert u\Vert_{M^{s,p}(S)}=\Vert u\Vert_{L^p(S)}+\Vert u\Vert_{\dot{M}^{s,p}(S)}.$$

Note that if $0<s<\infty$ and $0<p\leq\infty,$ then $\dot{M}^s_{p,\infty}(X)=\dot{M}^{s,p}(X),$ [@KYZ11 Proposition 2.1].\
Let $(X,d,\mu)$ be a metric measure space. The measure $\mu$ is called *doubling* if there exist a constant $C_{\mu}\geq 1$ such that $$\mu(B(x,2r))\leq C_{\mu}\,\mu(B(x,r))$$ for each $x\in X$ and $r>0.$ We call a triple $(X,d,\mu)$ a *doubling metric measure space* if $\mu$ is a doubling measure on $X.$\
As a special case of doubling spaces we consider $Q$-regular spaces. The space $X$ is said to be $Q$-regular, $Q>1,$ if there is a constant $c_Q\geq 1$ such that $$c_Q^{-1}r^Q\leq \mu(B(x,r))\leq c_Qr^Q$$ for each $x\in X$ and for all $0<r\leq\operatorname{diam}X.$\
A metric space $X$ is said to be *geodesic* if every pair of points in the space can be joined by a curve whose length is equal to the distance between the points.\
We will often use the following elementary inequality, which holds whenever $a_i\geq 0$ for all $i$ and $0<\beta\leq 1,$ $$\label{inequality}
\sum_{i\in\mathbb{Z}}a_i\leq\Big(\sum_{i\in\mathbb{Z}}a_i^{\beta}\Big)^{1/\beta}.$$

Hajłasz-Triebel-Lizorkin spaces
===============================

We use the idea of Hajłasz from [@Haj03] to prove the following theorem. We will skip the case $q=\infty$ as it is proved in [@Haj03 Thorem 8.7] when $s=1$ and other cases can be derived by modifying the proof of it.

\[embedding\] Let $(X,d,\mu)$ be a metric measure space and $B_0$ be a fixed ball of radius $r_0.$ Let us assume that the measure $\mu$ has a lower bound, that is there exist constants $b, Q>0$ such that $\mu(B(x,r))\geq br^Q$ whenever $B(x,r)\subset 2B_0.$ Let $u\in \dot{M}^s_{p,q}(2B_0)$ and $\vec{g}=(g_j)\in \mathbb{D}^s(u)$ where $0<p,q,s<\infty.$ Then there exist constants $C,\,C_1,\,C_2$ and $C_3$ such that\
$1.$ If $0<sp<Q,$ then $u\in L^{p^*}(B_0),$ $p^*=\frac{Qp}{Q-sp}$ and $$\label{embed}
\inf_{c\in\mathbb{R}}\left(\dashint_{B_0}\vert u-c\vert^{p^*}\,d\mu\right)^{\frac{1}{p^*}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ $2.$ If $sp=Q,$ then $$\label{embedb}
\dashint_{B_0}\exp\left(C_1b^{1/Q}\frac{\vert u-u_{B_0}\vert}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\,d\mu\leq C_2.$$ $3.$ If $sp>Q,$ then $$\label{embedc}
\Vert u-u_{B_0}\Vert_{L^{\infty}(B_0)}\leq C_3\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ In particular, for $x,y\in B_0,$ we have $$\label{embedc'}
\vert u(x)-u(y)\vert\leq cb^{-1/p}d(x,y)^{1-s/p}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$

We may assume by selecting an appropriate constant that $\operatorname*{ess\,inf}_E u=0,$ where $E\subset 2B_0$ is any subset of positive measure, since subtracting a constant from $u$ will not affect the inequality . The set $E$ will be chosen later. With a correct choice of $E$ we will prove with $(\dashint_{B_0}\vert u\vert ^{p^*}\,d\mu)^{1/p^*}$ on the left hand side.\
If $\sum_{j=-\infty}^{\infty}g_j^q=0$ a.e., then $g_j=0$ a.e. for all $j,$ which implies that $u$ is constant and hence the theorem follows. Thus we may assume that $\int_{2B_0}(\sum_j g_j^q)^{\frac{p}{q}}\,d\mu>0$. We may also assume that $$\label{lowerbound}
\bigg(\sum_{j=-\infty}^{\infty}g_j(x)^q\bigg)^{\frac{1}{q}}\geq 2^{-(1+\frac{1}{p})}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j(x)^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}>0$$ for all $x\in 2B_0$ as otherwise we can replace $\left(\sum g_j(x)^q\right)^{1/q}$ by $$\left(\sum \widetilde{g}_j(x)^q\right)^{1/q}=\left(\sum g_j(x)^q\right)^{1/q}+\left(\dashint_{2B_0}\bigg(\sum g_j(x)^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ Let us define auxiliary sets $$E_k=\bigg\{x\in 2B_0:\Big(\sum_{j=-\infty}^{\infty}g_j(x)^q\Big)^{\frac{1}{q}}\leq 2^k\bigg\},\quad k\in\mathbb{Z}.$$ Clearly $E_k\subset E_{k+1}$ for all $k.$ Observe that $$\label{rhs}
\int_{2B_0}\Big(\sum_j g_j^q\Big)^{\frac{p}{q}}\,d\mu\approx\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1}).$$ Let $a_k=\sup_{B_0\cap E_k}\vert u\vert.$ Obviously, $a_k\leq a_{k+1}$ and $$\label{lhs}
\int_{B_0}\vert u\vert^{p^*}\,d\mu\leq\sum_{k=-\infty}^{\infty}a_k^{p^*}\mu(B_0\cap (E_k\setminus E_{k-1})).$$ By Chebyschev’s inequality, we get an upper bound of the complement of $E_k$ $$\begin{aligned}
\label{Chebyschev}
\mu(2B_0\setminus E_k) &=& \mu\bigg(\Big\{x\in 2B_0:\Big(\sum_{j=-\infty}^{\infty}g_j(x)^q\Big)^{\frac{1}{q}}>2^k\Big\}\bigg) \nonumber \\
&\leq & 2^{-kp}\int_{2B_0}\Big(\sum_j g_j^q\Big)^{\frac{p}{q}}\,d\mu .\end{aligned}$$ Lower bound implies that $E_k=\emptyset$ for sufficiently small $k.$ On the other hand $\mu(E_k)\rightarrow \mu(2B_0)$ as $k\rightarrow\infty.$ Hence there is $\widetilde{k}_0\in\mathbb{Z}$ such that $$\label{conv}
\mu(E_{\widetilde{k}_0-1})<\frac{\mu(2B_0)}{2}\leq\mu(E_{\widetilde{k}_0}).$$ The inequality on the right hand side gives $E_{\widetilde{k}_0}=\neq\emptyset$ and hence according to $$\label{first}
2^{-(1+\frac{1}{p})}\left(\dashint_{2B_0}\Big(\sum_{j=-\infty}^{\infty}g_j(x)^q\Big)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}\leq \Big(\sum_{j=-\infty}^{\infty}g_j(x)^q\Big)^{\frac{1}{q}}\leq 2^{\widetilde{k}_0}$$ for $x\in E_{\widetilde{k}_0}.$ At the same time the inequality on the left hand side of together with imply that $$\label{second}
\frac{\mu(2B_0)}{2}<\mu(2B_0\setminus E_{\widetilde{k}_0-1})\leq 2^{-(\widetilde{k}_0-1)p}\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu.$$ Combining the inequalities and we obtain $$\label{combine}
2^{-(1+\frac{1}{p})}\left(\dashint_{2B_0}\Big(\sum_{j=-\infty}^{\infty}g_j(x)^q\Big)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}\leq 2^{\widetilde{k}_0}\leq 2^{(1+\frac{1}{p})}\left(\dashint_{2B_0}\left(\sum_{j=-\infty}^{\infty}g_j(x)^q\right)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}$$ Choose the least integer $\ell\in\mathbb{Z}$ such that $$\label{ell}
2^{\ell}>\max\bigg\{2^{1+1/p}\Big(\frac{2}{1-2^{-p/Q}}\Big)^{Q/p}, 1\bigg\}\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}$$ and set $k_0=\widetilde{k}_0+\ell.$ The reason behind such a choice of $\ell$ and $k_0$ will be understood later. Note that $\ell>0,$ by the lower bound of the measure $\mu,$ and hence yields $\mu(E_{k_0})>0.$ The inequalities in becomes $$\label{final}
2^{k_0}\approx (br_0^Q)^{-1/p}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/p}.$$ Suppose that $\mu(B_0\setminus E_{k_0})>0$ (we will handle the other case at end of the proof). For $k\geq k_0+1,$ set $$\label{radii}
t_k:=2b^{-1/Q}\mu(2B_0\setminus E_{k-1})^{1/Q}.$$ Suppose now that $k\geq k_0+1$ is such that $\mu((E_k\setminus E_{k-1})\cap B_0)>0$ (if such a $k$ does not exist, then $\mu(B_0\setminus E_{k_0})=0,$ contradicting our assumption). Then in particular $t_k>0.$ Pick a point $x_k\in (E_k\setminus E_{k-1})\cap B_0$ and assume that $B(x_k,t_k)\subset 2B_0.$ Then $$\mu(B(x_k,t_k))\geq bt_k^Q>\mu(2B_0\setminus E_{k-1})$$ and hence $B(x_k,t_k)\cap E_{k-1}\neq\emptyset.$ Thus there is $x_{k-1}\in E_{k-1}$ such that $$d(x_k,x_{k-1})<t_k\leq 2b^{-1/Q}2^{-(k-1)p/Q}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/Q},$$ by and . Repeating this construction in a similar fashion we obtain for $k\geq k_0+1,$ a sequence of points $$\begin{gathered}
x_k \in (E_k\setminus E_{k-1})\cap B_0,\\
x_{k-1} \in E_{k-1}\cap B(x_k,t_k),\\
\vdots  \\
x_{k_0}\in  E_{k_0}\cap B(x_{k_0+1},t_{k_0+1}), \end{gathered}$$ such that $$\label{distance}
d(x_{k-i},x_{k-(i+1)})<t_{k-i}\leq 2b^{-1/Q}2^{-(k-(i+1))p/Q}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/Q},$$ for every $i=0,1\ldots,k-k_0-1.$ Hence $$\begin{aligned}
\label{totaldistance}
d(x_k,x_{k_0})&<&t_k+t_{k-1}+\cdots +t_{k_0+1}\\ \nonumber
&\leq & 2b^{-1/Q} \bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/Q}\sum_{n=k_0}^{k-1}2^{-np/Q}\\ \nonumber
&=& 2^{-k_0p/Q}\frac{2b^{-1/Q}}{1-2^{-p/Q}}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/Q}.\end{aligned}$$ This is all true provided $B(x_{k-i},t_{k-i})\subset 2B_0$ for $i=0,1,2,\ldots,k-k_0-1.$ That means we require that the right hand side of is $\leq r_0\leq{{\operatorname{dist}}}(B_0,X\setminus 2B_0).$ Our choice of $k_0,$ and guarantee us this requirement. Indeed, $$\begin{aligned}
2^{k_0}=2^{\widetilde{k}_0+\ell}&\geq & 2^{\ell}2^{-(1+1/p)}\bigg(\dashint_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/p}\\
&\geq & \left(\frac{2}{1-2^{-p/Q}}\right)^{Q/p}(br_0^Q)^{-1/p}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/p}.\\\end{aligned}$$ Then $t_k+t_{k-1}+\cdots +t_{k_0+1}\leq r_0\leq{{\operatorname{dist}}}(B_0,X\setminus 2B_0),$ which implies that $B(x_{k-i},t_{k-i})\subset 2B_0$ for all $i=0,1,2,\ldots,k-k_0-1.$\
Now we would like to get some upper bound for $\vert u(x_k)\vert$ for $k\geq k_0+1.$ Towards this end, we write $$\label{difference}
\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\bigg)+\vert u(x_{k_0})\vert$$ Let us first consider the difference $\vert u(x_{k_0+1})-u(x_{k_0})\vert.$ The inequality with $i=k-k_0-1$ gives $$\label{k_0_m_0}
d(x_{k_0+1},x_{k_0})< 2^{m_0-k_0p/Q},$$ where $m_0\in\mathbb{Z}$ is such that $$\label{m_0}
2^{m_0-1}\leq 2b^{-1/Q}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/Q}<2^{m_0}.$$ Now using and , we get the following bound for the difference $$\vert u(x_{k_0+1})-u(x_{k_0})\vert\leq \sum_{j=-\infty}^{m_0-k_0p/Q}2^{js}\Big[g_j(x_{k_0+1})+g_j(x_{k_0})\Big].$$ Similarly, we use the fact that $d(x_{k-i},x_{k-(i+1)})<2^{m_0-(k-(i+1))p/Q},$ and obtain $$\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\leq \sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-(i+1)})\Big],$$ for all $i=0,1,2,\ldots,k-k_0-1.$ So, the inequality becomes $$\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]\bigg)+\vert u(x_{k_0})\vert.$$ Use Hölder inequality when $q>1$ and the inequality when $q\leq 1$ and also use the facts that $x_{k-i-1}\in E_{k-i-1}\subset E_{k-i},$ $x_{k-i}\in E_{k-i}$ to obtain $$\begin{aligned}
\vert u(x_k)\vert &\leq &\sum_{i=0}^{k-k_0-1}2^{m_0s-\frac{(k-i-1)ps}{Q}}\bigg(\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]^q\bigg)^{1/q}+\vert u(x_{k_0})\vert\\
&\leq &C2^{m_0s}\sum_{i=0}^{k-k_0-1}2^{-\frac{(k-i-1)ps}{Q}}2^{k-i}+\vert u(x_{k_0})\vert.\end{aligned}$$ Hence with , upon taking supremum over $x_k\in E_k\cap B_0,$ yields $$a_k\leq Cb^{-\frac{s}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{k-1}2^{n(1-\frac{sp}{Q})}+\sup_{E_{k_0}\cap 2B_0}\vert u\vert.$$ To estimate the last term $\sup_{E_{k_0}\cap 2B_0}\vert u\vert,$ we can assume that $\operatorname*{ess\,inf}_{E_{k_0}\cap 2B_0}\vert u\vert=0,$ by the discussion in the beginning of the proof and the fact that $\mu(E_{k_0})>0.$ That means there is a sequence $y_i\in E_{k_0}$ such that $u(y_i)\rightarrow 0$ as $i\rightarrow\infty.$ Therefore, for $x\in E_{k_0}\cap 2B_0$ we have $$\label{lastterm}
\vert u(x)\vert=\lim_{i\rightarrow\infty}\vert u(x)-u(y_i)\vert\leq C'r_0^{s}2^{k_0}.$$ So, for $k>k_0$ we conclude that $$\label{conclusion}
a_k\leq Cb^{-\frac{s}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{k-1}2^{n(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}.$$ For $k\leq k_0,$ we will use the estimate $a_k\leq a_{k_0}\leq C'r_0^s2^{k_0}.$\
**Case I:** $0<sp<Q.$ For every $k\in\mathbb{Z},$ we have $$\begin{aligned}
a_k &\leq & Cb^{-\frac{s}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=-\infty}^k2^{n(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}\\
&=& Cb^{-\frac{s}{Q}}2^{k(1-\frac{sp}{Q})}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{\frac{s}{Q}}+C'r_0^{s}2^{k_0}.\end{aligned}$$ Applying , and we get $$\begin{aligned}
\int_{B_0}\vert u\vert^{p^*}\,d\mu &\leq \sum_{k=-\infty}^{\infty}a_k^{p^*}\mu(B_0\cap (E_k\setminus E_{k-1}))\\
&\leq Cb^{-\frac{sp^*}{Q}}\left(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\right)^{\frac{sp^*}{Q}}\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1})\\
&\qquad+C'r_0^{sp^*}2^{k_0p^*}\mu(B_0)\\
&\leq C\left(1+\frac{\mu(B_0)}{br_0^Q}\right)b^{-\frac{sp^*}{Q}}\left(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\right)^{p^*/p}.\end{aligned}$$ Using the fact that $1+\mu(B_0)/br_0^Q\leq 2\mu(B_0)/br_0^Q,$ we get inequality .\
Suppose now that $\mu(B_0\setminus E_{k_0})=0.$ In this case, we use the fact that $\int_{B_0}\vert u\vert^{p^*}\,d\mu=\int_{E_{k_0}}\vert u\vert^{p^*}\,d\mu$ and use inequality to obtain inequality .\
**Case II:** $sp=Q.$ It follows from Jensen’s inequality that $$\label{simplification}
\left(\dashint_{B_0}\exp\left(C_1b^{1/Q}\frac{\vert u-u_{B_0}\vert}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\,d\mu\right)^{\frac{1}{2}}\leq \dashint_{B_0}\exp\left(C_1b^{1/Q}\frac{\vert u\vert}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\,d\mu$$ and hence it is enough to estimate the integral on the right hand side of . It follows from and that $$\label{zero}
a_{k_0}\leq C'r_0^s2^{k_0}\leq C''b^{-1/p}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/p}.$$ Hence from we obtain, for $k>k_0,$ $$\label{greaterzero}
a_k\leq \tilde{C}b^{-1/p}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{1/p}(k-k_0).$$ We split the integral on the right hand side of into two parts: we estimate the integrals over $B_0\cap E_{k_0}$ and $B_0\setminus E_{k_0}$ separately. For the first part, we have $$\begin{aligned}
\frac{1}{\mu(B_0)}\int_{B_0\cap E_{k_0}}\exp\left(C_1b^{1/Q}\frac{\vert u\vert}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\,d\mu &\leq & \frac{\mu(B_0\cap E_{k_0})}{\mu(B_0)}\exp\left(C_1b^{1/Q}\frac{a_{k_0}}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\\
&\leq &\exp(C_1C''),\end{aligned}$$ where the last inequality follows from . The second part is estimated using inequality as follows $$\begin{aligned}
& &\frac{1}{\mu(B_0)}\int_{B_0\setminus E_{k_0}}\exp\left(C_1b^{1/Q}\frac{\vert u\vert}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\,d\mu \\
&\leq & \frac{1}{\mu(B_0)}\sum_{k=k_0+1}^{\infty}\exp\left(C_1b^{1/Q}\frac{a_{k_0}}{\Vert \vec{g}\Vert_{L^p(2B_0,l^q)}}\right)\mu(B_0\cap(E_k\setminus E_{k-1}))\\
&\leq & \frac{1}{\mu(B_0)}\sum_{k=k_0+1}^{\infty}\exp\left(C_1\tilde{C}(k-k_0)\right)\mu(E_k\setminus E_{k-1})\\
&\leq & \frac{2^{-k_0Q}}{\mu(B_0)}\sum_{k=-\infty}^{\infty}2^{kQ}\mu(E_k\setminus E_{k-1})\leq C_3,\end{aligned}$$ where we have chosen $C_1$ so that $\exp(C_1\tilde{C})=2^Q$ and also we have made use of the inequalities , and the measure density condition .\
**Case III:** $sp>Q.$ It follows from and , for $k>k_0,$ that $$\begin{aligned}
a_k &\leq & Cb^{-\frac{s}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j}g_j^q\Big)^{\frac{p}{q}}\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{\infty}2^{n(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}\\
&\leq & C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.\end{aligned}$$ For $k\leq k_0,$ we have $$a_k\leq a_{k_0}\leq C'r_0^s2^{k_0}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ Therefore $$\Vert u-u_{B_0}\Vert_{L^{\infty}(B_0)}\leq 2\Vert u\Vert_{L^{\infty}(B_0)}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ To prove , let $x,y\in B_0$ such that $d(x,y)\leq r_0/4.$ Let us take another ball $B_1=B(x,2d(x,y)).$ Then $2B_1\subset 2B_0$ and hence yields $$\vert u(x)-u(y)\vert\leq 2\Vert u-u_{B_1}\Vert_{L^{\infty}(B_1)}\leq Cb^{-1/p}d(x,y)^{1-s/p}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{\infty}g_j^q\bigg)^{\frac{p}{q}}\,d\mu\right)^{\frac{1}{p}}.$$ If $d(x,y)>r_0/4,$ then upper bound for $\vert u(x)-u(y)\vert$ follows directly from applied on $B_0.$ The proof is complete.

Hajłasz-Besov spaces
====================

From [@Tri06 Theorem 1.73], we know that, if $p>n/(n+s)$ and $q\leq p^*,$ then $\Vert u\Vert_{L^*(\mathbb{R}^n)}\leq C\Vert u\Vert_{B^s_{p,q}(\mathbb{R}^n)}.$ In the following theorem we have proved embeddings for $N^s_{p,q}(B_0)$ when $0<p<\infty,$ $q\leq p$ and $B_0$ is a fixed ball in a metric space $X.$

Let $(X,d,\mu)$ be a metric measure space and $B_0$ be a fixed ball of radius $r_0.$ Let us assume that the measure $\mu$ has a lower bound, that is there exist constants $b, Q>0$ such that $\mu(B(x,r))\geq br^Q$ whenever $B(x,r)\subset 2B_0.$ Let $u\in \dot{N}^s_{p,q}(2B_0)$ and $(g_j)\in \mathbb{D}^s(u)$ where $0<p,q,s<\infty,$ $q\leq p.$ Then there exist constants $C, C_2, C_3$ such that\
$1.$ If $0<sp<Q,$ then $u\in L^{p^*}(B_0),$ $p^*=\frac{Qp}{Q-sp}$ and $$\label{embed2}
\inf_{c\in\mathbb{R}}\left(\dashint_{B_0}\vert u-c\vert^{p^*}\,d\mu\right)^{\frac{1}{p^*}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{\infty}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{q}}.$$ $2.$ If $sp=Q,$ then $$\label{embedb2}
\dashint_{B_0}\exp\left(C_1b^{1/Q}\frac{\vert u-u_{B_0}\vert}{\Vert \vec{g}\Vert_{l^q(2B_0,L^p)}}\right)\,d\mu\leq C_2.$$ $3.$ If $sp>Q,$ then $$\label{embedc2}
\Vert u-u_{B_0}\Vert_{L^{\infty}(B_0)}\leq C_3\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{\infty}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{q}}.$$

We would first like to prove the inequality $$\label{embed2'}
\inf_{c\in\mathbb{R}}\left(\dashint_{B_0}\vert u-c\vert^{p^*}\,d\mu\right)^{\frac{1}{p^*}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{\infty}\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}.$$ Once this is proved, the inequality will immediately follow from the inequality , since $q\leq p.$\
We may assume by selecting an appropriate constant that $\operatorname*{ess\,inf}_E u=0,$ where $E\subset 2B_0$ is any subset of positive measure, since subtracting a constant from $u$ will not affect the inequality . The set $E$ will be chosen later. With a correct choice of $E$ we will prove with $(\dashint_{B_0}\vert u\vert ^{p^*}\,d\mu)^{1/p^*}$ on the left hand side.\
If $g_j=0$ a.e. for all $j,$ then $u$ is constant and hence the theorem follows. Thus we may assume that $\int_{2B_0}g_j^p\,d\mu>0$ for all $j.$ We may also assume that $$\label{lowerbound2}
g_j(x)\geq 2^{-(1+\frac{1}{p})}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}>0$$ for all $x\in 2B_0$ and all $j\in\mathbb{Z},$ as otherwise we can replace $g_j$ by $$\widetilde{g}_j(x)=g_j(x)+\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}.$$ Let us define auxiliary sets $$E_k=\bigg\{x\in 2B_0:\Big(\sum_{j=-\infty}^{\infty}g_j(x)^p\Big)^{\frac{1}{p}}\leq 2^k\bigg\},\quad k\in\mathbb{Z}.$$ Clearly $E_k\subset E_{k+1}$ for all $k.$ Observe that $$\label{rhs2}
\int_{2B_0}\Big(\sum_j g_j^p\Big)\,d\mu\approx\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1}).$$ Let $a_k=\sup_{B_0\cap E_k}\vert u\vert.$ Obviously, $a_k\leq a_{k+1}$ and $$\label{lhs2}
\int_{B_0}\vert u\vert^{p^*}\,d\mu\leq\sum_{k=-\infty}^{\infty}a_k^{p^*}\mu(B_0\cap (E_k\setminus E_{k-1})).$$ Using Chebyschev’s inequality, we get an upper bound for the measure of the complement of $E_{k}$ $$\begin{aligned}
\label{Chebyschev2}
\mu(2B_0\setminus E_k) &=& \mu\bigg(\Big\{x\in 2B_0:\Big(\sum_{j=-\infty}^{\infty}g_j(x)^p\Big)^{\frac{1}{p}}>2^k\Big\}\bigg) \nonumber \\
&\leq & 2^{-kp}\int_{2B_0}\Big(\sum_j g_j^p\Big)\,d\mu \nonumber\\
&=& 2^{-kp}\sum_j\Big(\int_{2B_0}g_j^p\,d\mu\Big) \nonumber .
$$ Lower bound implies that $E_k=\emptyset$ for sufficiently small $k,$ since $$\label{lowerbound2'}
\Big(\sum_{j=-\infty}^{\infty}g_j(x)^p\Big)^{\frac{1}{p}}\geq 2^{-(1+\frac{1}{p})}\bigg(\sum_j\dashint_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{p}}>0$$ On the other hand $\mu(E_k)\rightarrow \mu(2B_0)$ as $k\rightarrow\infty.$ Hence there is $\widetilde{k}_0\in\mathbb{Z}$ such that $$\label{conv2}
\mu(E_{\widetilde{k}_0-1})<\frac{\mu(2B_0)}{2}\leq\mu(E_{\widetilde{k}_0}).$$ The inequality on the right hand side gives $E_{\widetilde{k}_0}\neq\emptyset$ and hence according to $$\label{first2}
2^{-(1+\frac{1}{p})}\bigg(\sum_j\dashint_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{p}}\leq \Big(\sum_{j=-\infty}^{\infty}g_j(x)^p\Big)^{\frac{1}{p}}\leq 2^{\widetilde{k}_0}$$ for $x\in E_{\widetilde{k}_0}.$ At the same time the inequality on the left hand side of together with imply that $$\label{second2}
\frac{\mu(2B_0)}{2}<\mu(2B_0\setminus E_{\widetilde{k}_0-1})\leq 2^{-(\widetilde{k}_0-1)p}\sum_j\int_{2B_0}g_j^p\,d\mu.$$ Combining the inequalities and , we obtain $$\label{combine2}
2^{-(1+\frac{1}{p})}\bigg(\sum_j\dashint_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{p}}\leq 2^{\widetilde{k}_0}\leq 2^{(1+\frac{1}{p})}\bigg(\sum_j\dashint_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{p}}.$$ Choose the least integer $\ell\in\mathbb{Z}$ such that $$\label{ell2}
2^{\ell}>\max\bigg\{2^{1+1/p}\Big(\frac{2}{1-2^{-p/Q}}\Big)^{Q/p}, 1\bigg\}\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}$$ and set $k_0=\widetilde{k}_0+\ell.$ The reason behind such a choice of $\ell$ and $k_0$ will be understood later. Note that $\ell>0,$ by the lower bound of the measure $\mu,$ and hence yields $\mu(E_{k_0})>0.$ The inequalities in becomes $$\label{final2}
2^{k_0}\approx (br_0^Q)^{-1/p}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{p}}.$$ Suppose that $\mu(B_0\setminus E_{k_0})>0$ (we will handle the other case at end of the proof). For $k\geq k_0+1,$ set $$\label{radii2}
t_k:=2b^{-1/Q}\mu(2B_0\setminus E_{k-1})^{1/Q}.$$ Suppose now that $k\geq k_0+1$ is such that $\mu((E_k\setminus E_{k-1})\cap B_0)>0$ (if such a $k$ does not exist, then $\mu(B_0\setminus E_{k_0})=0,$ contradicting our assumption). Then in particular $t_k>0.$ Pick a point $x_k\in (E_k\setminus E_{k-1})\cap B_0$ and assume that $B(x_k,t_k)\subset 2B_0.$ Then $$\mu(B(x_k,t_k))\geq bt_k^Q>\mu(2B_0\setminus E_{k-1})$$ and hence $B(x_k,t_k)\cap E_{k-1}\neq\emptyset.$ Thus there is $x_{k-1}\in E_{k-1}$ such that $$d(x_k,x_{k-1})<t_k\leq 2b^{-1/Q}2^{-(k-1)\frac{p}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{Q}},$$ by and . Repeating this construction in a similar fashion we obtain for $k\geq k_0+1,$ a sequence of points $$\begin{gathered}
x_k \in (E_k\setminus E_{k-1})\cap B_0,\\
x_{k-1} \in E_{k-1}\cap B(x_k,t_k),\\
\vdots  \\
x_{k_0}\in  E_{k_0}\cap B(x_{k_0+1},t_{k_0+1}), \end{gathered}$$ such that $$\label{distance2}
d(x_{k-i},x_{k-(i+1)})<t_{k-i}\leq 2b^{-1/Q}2^{-(k-(i+1))\frac{1}{Q}}\bigg(\sum_j\Big(\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{Q}},$$ for every $i=0,1\ldots,k-k_0-1.$ Hence $$\begin{aligned}
\label{totaldistance2}
d(x_k,x_{k_0})&<&t_k+t_{k-1}+\cdots +t_{k_0+1}\\ \nonumber
&\leq & 2b^{-1/Q} \bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{Q}}\\ \nonumber
&=& 2^{-k_0p/Q}\frac{2b^{-1/Q}}{1-2^{-p/Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{Q}}.\end{aligned}$$ This is all true provided $B(x_{k-i},t_{k-i})\subset 2B_0$ for $i=0,1,2,\ldots,k-k_0-1.$ That means we require that the right hand side of is $\leq r_0\leq{{\operatorname{dist}}}(B_0,X\setminus 2B_0).$ Our choice of $k_0,$ and guarantee us this requirement.\
Now we would like to get some upper bound for $\vert u(x_k)\vert$ for $k\geq k_0+1.$ Towards this end, we write $$\label{difference2}
\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\bigg)+\vert u(x_{k_0})\vert$$ Let us first consider the difference $\vert u(x_{k_0+1})-u(x_{k_0})\vert.$ The inequality with $i=k-k_0-1$ gives $$\label{k_0_m_02}
d(x_{k_0+1},x_{k_0})< 2^{m_0-k_0p/Q},$$ where $m_0\in\mathbb{Z}$ is such that $$\label{m_02}
2^{m_0-1}\leq 2b^{-1/Q}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{1}{Q}}<2^{m_0}.$$ Now using and , we get the following bound for the difference $$\vert u(x_{k_0+1})-u(x_{k_0})\vert\leq \sum_{j=-\infty}^{m_0-k_0p/Q}2^{js}\Big[g_j(x_{k_0+1})+g_j(x_{k_0})\Big].$$ Similarly, we use the fact that $d(x_{k-i},x_{k-(i+1)})<2^{m_0-(k-(i+1))p/Q},$ and obtain $$\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\leq \sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-(i+1)})\Big],$$ for all $i=0,1,2,\ldots,k-k_0-1.$ So, the inequality becomes $$\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]\bigg)+\vert u(x_{k_0})\vert.$$ Use Hölder inequality when $p>1$ and the inequality when $p\leq 1$and also use the facts that $x_{k-i-1}\in E_{k-i-1}\subset E_{k-i},$ $x_{k-i}\in E_{k-i}$ to obtain $$\begin{aligned}
\vert u(x_k)\vert &\leq &\sum_{i=0}^{k-k_0-1}2^{m_0s-\frac{(k-i-1)ps}{Q}}\bigg(\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]^p\bigg)^{1/p}+\vert u(x_{k_0})\vert\\
&\leq &C2^{m_0s}\sum_{i=0}^{k-k_0-1}2^{-\frac{(k-i-1)ps}{Q}}2^{k-i}+\vert u(x_{k_0})\vert.\end{aligned}$$ Hence with , upon taking supremum over $x_k\in E_k\cap B_0,$ yields $$a_k\leq Cb^{-\frac{s}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{k-1}2^{n(1-\frac{sp}{Q})}+\sup_{E_{k_0}\cap 2B_0}\vert u\vert.$$ To estimate the last term $\sup_{E_{k_0}\cap 2B_0}\vert u\vert,$ we can assume that $\operatorname*{ess\,inf}_{E_{k_0}\cap 2B_0}\vert u\vert=0,$ by the discussion in the beginning of the proof and the fact that $\mu(E_{k_0})>0.$ That means there is a sequence $y_i\in E_{k_0}$ such that $u(y_i)\rightarrow 0$ as $i\rightarrow\infty.$ Therefore, for $x\in E_{k_0}\cap 2B_0$ we have $$\label{lastterm2}
\vert u(x)\vert=\lim_{i\rightarrow\infty}\vert u(x)-u(y_i)\vert\leq C'r_0^{s}2^{k_0}.$$ So, for $k>k_0$ we conclude that $$\label{conclusion2}
a_k\leq Cb^{-\frac{s}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{k-1}2^{n(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}.$$ For $k\leq k_0,$ we will use the estimate $a_k\leq a_{k_0}\leq C'r_0^s2^{k_0}.$\
**Case I:**. For every $k\in\mathbb{Z},$ we have $$a_k \leq Cb^{-\frac{s}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{s}{Q}}2^{k(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}$$ Applying , and and the measure density condition we get $$\begin{aligned}
\int_{B_0}\vert u\vert^{p^*}\,d\mu &\leq \sum_{k=-\infty}^{\infty}a_k^{p^*}\mu(B_0\cap (E_k\setminus E_{k-1}))\\
&\leq Cb^{-\frac{sp^*}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{sp^*}{Q}}\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1})\\
&\qquad+C'r_0^{sp^*}2^{k_0p^*}\mu(B_0)\\
&\leq C\left(1+\frac{\mu(B_0)}{br_0^Q}\right)b^{-\frac{sp^*}{Q}}\bigg(\sum_j\int_{2B_0}g_j^p\,d\mu\bigg)^{\frac{p^*}{p}}.\\\end{aligned}$$ Using the fact that $1+\mu(B_0)/br_0^Q\leq 2\mu(B_0)/br_0^Q,$ we get $$\left(\dashint_{B_0}\vert u\vert^{p^*}\,d\mu\right)^{\frac{1}{p^*}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{\infty}\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}.$$ Suppose now that $\mu(B_0\setminus E_{k_0})=0.$ In this case, we use the fact that $\int_{B_0}\vert u\vert^{p^*}\,d\mu=\int_{E_{k_0}}\vert u\vert^{p^*}\,d\mu$ and use inequality to obtain inequality . This finishes the proof in this case.\
**Case II:**: $sp=Q.$ The proof in this case follows exactly in the same way as the proof of Theorem \[embedding\] with replacing by $$\label{zero2}
a_{k_0}\leq C'r_0^s2^{k_0}\leq C''b^{-1/p}\left(\sum_{j=-\infty}^{\infty}\int_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}$$ and replacing by $$\label{greaterzero2}
a_k\leq \tilde{C}b^{-1/p}\left(\sum_{j=-\infty}^{\infty}\int_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}(k-k_0)$$ and also using inequality as we have $q\leq p.$\
The case when $sp>Q$ also follows in a similar fashion. This completes the proof.

We do not know if one can get the same result as above for $q\leq p^*,$ at least for the non-homogeneous space and when $p>Q/(Q+s).$ In the next theorem, we have relaxed the assumption on $q$ and still have been able to find the same result but with an exponent $p'$ slightly smaller than $p^*$ and this result seems to be new even in $\mathbb{R}^n.$

Let $(X,d,\mu)$ be a metric measure space and $B_0$ be a fixed ball of radius $r_0$ with $2^{l-1}\leq r_0<2^l$ for some integer $l.$ Let us assume that the measure $\mu$ has a lower bound, that is there exist constants $b, Q>0$ such that $\mu(B(x,r))\geq br^Q$ whenever $B(x,r)\subset 2B_0.$ Let $u\in \dot{N}^s_{p,q}(2B_0)$ and $(g_j)\in \mathbb{D}^s(u)$ where $0<p,q,s<\infty.$ Then there exist constants $C,\,C_1,\,C_2$ and $C_3$ such that\
If $0<sp<Q,$ then $u\in L^{p'}(B_0),$ $p'=\frac{Qp}{Q-(s-s')p}$ for any $0<s'<s.$ Moreover, we have the following inequality: $$\label{embed3}
\inf_{c\in\mathbb{R}}\left(\dashint_{B_0}\vert u-c\vert^{p'}\,d\mu\right)^{\frac{1}{p'}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s-s'}M,$$ where $M:=\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}.$\
If $sp=Q,$ then $$\label{embed3b}
\dashint_{B_0}\exp\bigg(C_1b^{1/Q}\frac{\vert u-u_{B_0}\vert}{M}\bigg)\,d\mu\leq C_2.$$ If $sp>Q,$ then $$\label{embed3c}
\Vert u-u_{B_0}\Vert_{L^{\infty}(B_0)}\leq C_3\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s-s'}M.$$

First, we would like to establish the following inequality: $$\label{embed3'}
\inf_{c\in\mathbb{R}}\left(\dashint_{B_0}\vert u-c\vert^{p'}\,d\mu\right)^{\frac{1}{p'}}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/q}r_0^{s-s'}\left(\dashint_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{p}}.$$ Once this is proved, one can interchange the summation and integration and use the Hölder inequality or inequality to prove .\
Note that it is enough to prove with $(\dashint_{B_0}\vert u\vert ^{p'}\,d\mu)^{1/p'}$ on the left hand side. If we have $\sum_{j=-\infty}^{l-2}2^{s'jp}g_j^p=0$ a.e., then $g_j^p=2^{-s'jp}$ a.e. for all $j\leq l-2,$ and hence the theorem follows trivially. Thus we may assume that $\int_{2B_0}\sum_{j\leq l-2}2^{s'jp}g_j^p\,d\mu>0$. We may also assume that $$\label{lowerbound3}
\sum_{j=-\infty}^{l-2}2^{s'jp}g_j(x)^p\geq \frac{1}{2}\left(\dashint_{2B_0}\bigg(\sum_{j=-\infty}^{l-2}2^{s'jp}g_j(x)^p\bigg)\,d\mu\right)>0$$ for all $x\in 2B_0.$ Let us define auxiliary sets $$E_k=\bigg\{x\in 2B_0:\Big(\sum_{j=-\infty}^{l-2}2^{s'jp}g_j(x)^p\Big)^{\frac{1}{p}}\leq 2^k\bigg\},\quad k\in\mathbb{Z}.$$ Clearly $E_k\subset E_{k+1}$ for all $k.$ Observe that $$\label{rhs3}
\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\approx\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1}).$$ Let $a_k=\sup_{B_0\cap E_k}\vert u\vert.$ Obviously, $a_k\leq a_{k+1}$ and $$\label{lhs3}
\int_{B_0}\vert u\vert^{p'}\,d\mu\leq\sum_{k=-\infty}^{\infty}a_k^{p'}\mu(B_0\cap (E_k\setminus E_{k-1})).$$ By Chebyschev’s inequality, we get an upper bound of the complement of $E_k$ $$\begin{aligned}
\label{Chebyschev3}
\mu(2B_0\setminus E_k) 
\leq 2^{-kp}\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu.\end{aligned}$$ Lower bound implies that $E_k=\emptyset$ for sufficiently small $k.$ On the other hand $\mu(E_k)\rightarrow \mu(2B_0)$ as $k\rightarrow\infty.$ Hence there is $\widetilde{k}_0\in\mathbb{Z}$ such that $$\label{conv3}
\mu(E_{\widetilde{k}_0-1})<\frac{\mu(2B_0)}{2}\leq\mu(E_{\widetilde{k}_0}).$$ The inequality on the right hand side gives $E_{\widetilde{k}_0}\neq\emptyset$ and hence according to $$\label{first3}
2^{-\frac{1}{p}}\left(\dashint_{2B_0}\sum_{j=-\infty}^{l-2}2^{s'jp}g_j(x)^p\,d\mu\right)^{\frac{1}{p}}\leq \Big(\sum_{j=-\infty}^{l-2}2^{s'jp}g_j(x)^p\Big)^{\frac{1}{p}}\leq 2^{\widetilde{k}_0}$$ for $x\in E_{\widetilde{k}_0}.$ At the same time the inequality on the left hand side of together with imply that $$\label{second3}
\frac{\mu(2B_0)}{2}<\mu(2B_0\setminus E_{\widetilde{k}_0-1})\leq 2^{-(\widetilde{k}_0-1)p}\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu.$$ Combining the inequalities and we obtain $$\label{combine3}
2^{-(1+\frac{1}{p})}\left(\dashint_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{p}}\leq 2^{\widetilde{k}_0}\leq 2^{(1+\frac{1}{p})}\left(\dashint_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{p}}.$$ Choose the least integer $\ell\in\mathbb{Z}$ such that $$\label{ell3}
2^{\ell}>\max\bigg\{2^{1+1/p}\Big(\frac{2}{1-2^{-p/Q}}\Big)^{Q/p}, 1\bigg\}\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}$$ and set $k_0=\widetilde{k}_0+\ell.$ The reason behind such a choice of $\ell$ and $k_0$ will be understood later. Note that $\ell>0,$ by the lower bound of the measure $\mu,$ and hence yields $\mu(E_{k_0})>0.$ The inequalities in becomes $$\begin{aligned}
\label{final3}
2^{k_0} &\approx & (br_0^Q)^{-1/p}\left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{p}}\\
&=& (br_0^Q)^{-1/p}\left(\sum_{j\leq l-2} 2^{s'jp}\int_{2B_0}g_j^p\,d\mu\right)^{\frac{1}{p}}.\label{final32}\end{aligned}$$ Suppose that $\mu(B_0\setminus E_{k_0})>0$ (we will handle the other case at end of the proof). For $k\geq k_0+1,$ set $$\label{radii3}
t_k:=2b^{-1/Q}\mu(2B_0\setminus E_{k-1})^{1/Q}.$$ Suppose now that $k\geq k_0+1$ is such that $\mu((E_k\setminus E_{k-1})\cap B_0)>0$ (if such a $k$ does not exist, then $\mu(B_0\setminus E_{k_0})=0,$ contradicting our assumption). Then in particular $t_k>0.$ Pick a point $x_k\in (E_k\setminus E_{k-1})\cap B_0$ and assume that $B(x_k,t_k)\subset 2B_0.$ Then $$\mu(B(x_k,t_k))\geq bt_k^Q>\mu(2B_0\setminus E_{k-1})$$ and hence $B(x_k,t_k)\cap E_{k-1}\neq\emptyset.$ Thus there is $x_{k-1}\in E_{k-1}$ such that $$d(x_k,x_{k-1})<t_k\leq 2b^{-1/Q}2^{-(k-1)p/Q}\left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{Q}},$$ by and . Repeating this construction in a similar fashion we obtain for $k\geq k_0+1,$ a sequence of points $$\begin{gathered}
x_k \in (E_k\setminus E_{k-1})\cap B_0,\\
x_{k-1} \in E_{k-1}\cap B(x_k,t_k),\\
\vdots  \\
x_{k_0}\in  E_{k_0}\cap B(x_{k_0+1},t_{k_0+1}), \end{gathered}$$ such that $$\label{distance3}
d(x_{k-i},x_{k-(i+1)})<t_{k-i}\leq 2b^{-1/Q}2^{-(k-(i+1))p/Q}\left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{Q}},$$ for every $i=0,1\ldots,k-k_0-1.$ Hence $$\begin{aligned}
\label{totaldistance3}
d(x_k,x_{k_0})&<&t_k+t_{k-1}+\cdots +t_{k_0+1}\\ \nonumber
&\leq & 2b^{-1/Q} \left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{Q}}\sum_{n=k_0}^{k-1}2^{-np/Q}\\ \nonumber
&=& 2^{-k_0p/Q}\frac{2b^{-1/Q}}{1-2^{-p/Q}}\left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{Q}}.\end{aligned}$$ This is all true provided $B(x_{k-i},t_{k-i})\subset 2B_0$ for $i=0,1,2,\ldots,k-k_0-1.$ That means we require that the right hand side of is $\leq r_0\leq{{\operatorname{dist}}}(B_0,X\setminus 2B_0).$ Our choice of $k_0,$ and guarantee us this requirement. Indeed, $$\begin{aligned}
2^{k_0}=2^{\widetilde{k}_0+\ell}&\geq & 2^{\ell}2^{-(1+1/p)}\bigg(\dashint_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{1/p}\\
&\geq & \left(\frac{2}{1-2^{-p/Q}}\right)^{Q/p}(br_0^Q)^{-1/p}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{1/p}.\\\end{aligned}$$ Then $t_k+t_{k-1}+\cdots +t_{k_0+1}\leq r_0\leq{{\operatorname{dist}}}(B_0,X\setminus 2B_0),$ which implies that $B(x_{k-i},t_{k-i})\subset 2B_0$ for all $i=0,1,2,\ldots,k-k_0-1.$\
Now we would like to get some upper bound for $\vert u(x_k)\vert$ for $k\geq k_0+1.$ Towards this end, we write $$\label{difference3}
\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\bigg)+\vert u(x_{k_0})\vert$$ Let us first consider the difference $\vert u(x_{k_0+1})-u(x_{k_0})\vert.$ The inequality with $i=k-k_0-1$ gives $$\label{k_0_m_03}
d(x_{k_0+1},x_{k_0})< 2^{m_0-k_0p/Q},$$ where $m_0\in\mathbb{Z}$ is such that $$\label{m_03}
2^{m_0-1}\leq 2b^{-1/Q}\left(\int_{2B_0}\Big(\sum_{j\leq l-2} 2^{s'jp}g_j^p\Big)\,d\mu\right)^{\frac{1}{Q}}<2^{m_0}.$$ Now using and , we get the following bound for the difference $$\vert u(x_{k_0+1})-u(x_{k_0})\vert\leq \sum_{j=-\infty}^{m_0-k_0p/Q}2^{js}\Big[g_j(x_{k_0+1})+g_j(x_{k_0})\Big].$$ Similarly, we use the fact that $d(x_{k-i},x_{k-(i+1)})<2^{m_0-(k-(i+1))p/Q},$ and obtain $$\vert u(x_{k-i})-u(x_{k-(i+1)})\vert\leq \sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-(i+1)})\Big],$$ for all $i=0,1,2,\ldots,k-k_0-1.$ So, the inequality becomes $$\vert u(x_k)\vert \leq\bigg(\sum_{i=0}^{k-k_0-1}\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]\bigg)+\vert u(x_{k_0})\vert.$$ Use Hölder inequality when $p>1$ and the inequality when $p\leq 1$ and also use the facts that $x_{k-i-1}\in E_{k-i-1}\subset E_{k-i},$ $x_{k-i}\in E_{k-i}$ to obtain $$\begin{aligned}
\begin{split}
\vert u(x_k)\vert &\leq \sum_{i=0}^{k-k_0-1} 2^{m_0(s-s')-\frac{(k-i-1)p(s-s')}{Q}}\bigg(\sum_{j=-\infty}^{m_0-(k-i-1)p/Q}2^{js'p}\Big[g_j(x_{k-i})+g_j(x_{k-i-1})\Big]^p\bigg)^{1/p}\\
&\qquad+\vert u(x_{k_0})\vert\\
&\leq C2^{m_0(s-s')}\sum_{i=0}^{k-k_0-1}2^{-\frac{(k-i-1)p(s-s')}{Q}}2^{k-i}+\vert u(x_{k_0})\vert.
\end{split}\end{aligned}$$ Hence with , upon taking supremum over $x_k\in E_k\cap B_0,$ yields $$a_k\leq Cb^{-\frac{s-s'}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{\frac{s-s'}{Q}}\sum_{n=k_0}^{k-1}2^{n\left(1-(s-s')\frac{p}{Q}\right)}+\sup_{E_{k_0}\cap 2B_0}\vert u\vert.$$ To estimate the last term $\sup_{E_{k_0}\cap 2B_0}\vert u\vert,$ we can assume that $\operatorname*{ess\,inf}_{E_{k_0}\cap 2B_0}\vert u\vert=0,$ by the discussion in the beginning of the proof and the fact that $\mu(E_{k_0})>0.$ That means there is a sequence $y_i\in E_{k_0}$ such that $u(y_i)\rightarrow 0$ as $i\rightarrow\infty.$ Therefore, for $x\in E_{k_0}\cap 2B_0$ we have $$\label{lastterm3}
\vert u(x)\vert=\lim_{i\rightarrow\infty}\vert u(x)-u(y_i)\vert\leq C'r_0^{s-s'}2^{k_0}.$$ So, for $k>k_0$ we conclude that $$\label{conclusion3}
a_k\leq Cb^{-\frac{s-s'}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{\frac{s-s'}{Q}}\sum_{n=k_0}^{k-1}2^{n\left(1-(s-s')\frac{p}{Q}\right)}+C'r_0^{s-s'}2^{k_0}.$$ For $k\leq k_0,$ we will use the estimate $a_k\leq a_{k_0}\leq C'r_0^{s-s'}2^{k_0}.$\
**Case I:** $0<sp<Q.$ Therefore, for every $k\in\mathbb{Z},$ we have $$a_k\leq Cb^{-\frac{s-s'}{Q}}2^{k\left(1-(s-s')\frac{p}{Q}\right)}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{\frac{s-s'}{Q}}+C'r_0^{s-s'}2^{k_0}.$$ Applying , and we get $$\begin{aligned}
\int_{B_0}\vert u\vert^{p'}\,d\mu &\leq \sum_{k=-\infty}^{\infty}a_k^{p'}\mu(B_0\cap (E_k\setminus E_{k-1}))\\
&\leq Cb^{-\frac{(s-s')p'}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{\frac{(s-s')p'}{Q}}\sum_{k=-\infty}^{\infty}2^{kp}\mu(E_k\setminus E_{k-1})\\
&\qquad+C'r_0^{(s-s')p'}2^{k_0p'}\mu(B_0)\\
&\leq C\left(1+\frac{\mu(B_0)}{br_0^Q}\right)b^{-\frac{(s-s')p'}{Q}}\bigg(\int_{2B_0}\Big(\sum_{j\leq l-2}2^{s'jp}g_j^p\Big)\,d\mu\bigg)^{\frac{p'}{p}}.\end{aligned}$$ Using the fact that $1+\mu(B_0)/br_0^Q\leq 2\mu(B_0)/br_0^Q,$ we get inequality .\
Suppose now that $\mu(B_0\setminus E_{k_0})=0.$ In this case, we use the fact that $\int_{B_0}\vert u\vert^{p'}\,d\mu=\int_{E_{k_0}}\vert u\vert^{p'}\,d\mu$ and use inequality to obtain inequality .\
**Case II:** $sp=Q.$ Similar to the proof of Theorem \[embedding\], it is enough to prove, after using Jensen’s inequality, the inequality with $\vert u-u_{B_0}\vert$ replaced by $\vert u\vert$ in the left hand side of it. It follows from , and Hölder inequality (or the inequality ) that $$\label{zero3}
a_{k_0}\leq C'r_0^s2^{k_0}\leq C''b^{-1/p}\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\int_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}.$$ Hence from and Hölder inequality (or the inequality ) we obtain, for $k>k_0,$ $$\label{greaterzero3}
a_k\leq \tilde{C}b^{-1/p}\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\int_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}(k-k_0).$$ Again we split the integral into two parts: we estimate the integral over $B_0\cap E_{k_0}$ and $B_0\setminus E_{k_0}$ separately. For the first part, we have $$\begin{aligned}
\frac{1}{\mu(B_0)}\int_{B_0\cap E_{k_0}}\exp\left(\frac{C_1b^{1/Q}\vert u\vert}{M}\right)\,d\mu &\leq & \frac{\mu(B_0\cap E_{k_0})}{\mu(B_0)}\exp\left(\frac{C_1b^{1/Q}a_{k_0}}{M}\right)\\
&\leq &\exp(C_1C''),\end{aligned}$$ where the last inequality follows from . The second part is estimated using inequality as follows $$\begin{aligned}
& & \frac{1}{\mu(B_0)}\int_{B_0\setminus E_{k_0}}\exp\left(\frac{C_1b^{1/Q}\vert u\vert}{M}\right)\,d\mu \\
&\leq & \frac{1}{\mu(B_0)}\sum_{k=k_0+1}^{\infty}\exp\left(\frac{C_1b^{1/Q}a_{k_0}}{M}\right)\mu(B_0\cap(E_k\setminus E_{k-1}))\\
&\leq & \frac{1}{\mu(B_0)}\sum_{k=k_0+1}^{\infty}\exp\left(C_1\tilde{C}(k-k_0)\right)\mu(E_k\setminus E_{k-1})\\
&\leq & \frac{2^{-k_0Q}}{\mu(B_0)}\sum_{k=-\infty}^{\infty}2^{kQ}\mu(E_k\setminus E_{k-1})\leq C_3,\end{aligned}$$ where we have chosen $C_1$ so that $\exp(C_1\tilde{C})=2^Q$ and also we have made use of the inequalities , and the measure density condition .\
**Case III:** $sp>Q.$ It follows from and , for $k>k_0,$ that $$\begin{aligned}
a_k &\leq & Cb^{-\frac{s}{Q}}\bigg(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\int_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\bigg)^{\frac{s}{Q}}\sum_{n=k_0}^{\infty}2^{n(1-\frac{sp}{Q})}+C'r_0^{s}2^{k_0}\\
&\leq & C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}.\end{aligned}$$ For $k\leq k_0,$ we have $$a_k\leq a_{k_0}\leq C'r_0^s2^{k_0}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}.$$ Therefore $$\Vert u-u_{B_0}\Vert_{L^{\infty}(B_0)}\leq 2\Vert u\Vert_{L^{\infty}(B_0)}\leq C\left(\frac{\mu(2B_0)}{br_0^Q}\right)^{1/p}r_0^{s}\left(\sum_{j=-\infty}^{l-2}2^{s'jp}\left(\dashint_{2B_0}g_j^p\,d\mu\right)^{\frac{q}{p}}\right)^{\frac{1}{p}}.$$

Measure density from embedding
==============================

The next theorem shows that, if the space $X$ is $Q$-regular and geodesic, then the measure density condition of a domain $\Omega$ is a necessary condition for the embeddings of both $M^s_{p,q}(\Omega)$ and $N^s_{p,q}(\Omega).$ The proof is inspired by the proof of Theorem 6.1 of [@HIT16], where the measure density condition was derived from extension domains for these spaces.

Let $X$ be a $Q$-regular, geodesic metric measure space and let $\Omega\subset X$ be a domain. Let $0<s<1,$ $0<p<\infty$ and $0<q\leq\infty.$\
$(i)$ When $sp<Q,$ if there exists a constant $C$ such that for all $f\in M^s_{p,q}(\Omega),$ we have $\Vert f\Vert_{L^{p^*}(\Omega)}\leq C\Vert f\Vert_{M^s_{p,q}(\Omega)},$ where $p^*=\frac{Qp}{Q-sp},$ then $\Omega$ satisfies .\
$(ii)$ When $sp=Q,$ if there exist constants $C_1, C_2$ such that for all $f\in M^s_{p,q}(\Omega)$ and for all balls $B,$ we have $$\int_{B\cap\Omega}\exp\left(C_1\frac{\vert u-u_{B(x,r)}\vert}{\Vert f\Vert_{M^s{p,q}(\Omega)}}\right)\,d\mu\leq C_2\mu(B),$$ then $\Omega$ satisfies .\
$(iii)$ When $sp>Q,$ if there exists a constant $C_3$ such that for all $f\in M^s_{p,q}(\Omega),$ and for every $x,y\in\Omega,$ we have $\vert f(x)-f(y)\vert\leq C_3\Vert f\Vert_{M^s_{p,q}(\Omega)}d(x,y)^{s-Q/p},$ then $\Omega$ satisfies . The claims also hold with $M^s_{p,q}(\Omega)$ replaced by $N^s_{p,q}(\Omega).$

To show that the measure density condition holds, let $x\in \Omega$ and $0<r\leq 1$ and let $B=B(x,r).$ We may assume that $\Omega\setminus B(x,r)\neq\emptyset,$ otherwise the measure density condition is obviously satisfied. We split the proof into three different cases depending on the size of $sp.$\
**Case 1:** $0<sp<Q.$ By the proof of [@HKT08 Proposition 13], the geodesity of $X$ implies that $\mu(\partial B(x,R))=0$ for every $R>0.$ Hence there exist a unique $0<\tilde{r}<r$ such that $$\mu(B(x,\tilde{r})\cap\Omega)=\frac{1}{2}\mu(B(x,r)\cap\Omega).$$ Define $u:\Omega\rightarrow [0,1]$ by $$\label{bump}
u(y)=
 \begin{cases}
  1& \text{if $y\in B(x,\tilde{r})\cap\Omega$},\\
  \frac{r-d(x,y)}{r-\tilde{r}} & \text{if $y\in B(x,r)\setminus B(x,\tilde{r})\cap\Omega$},\\
  0& \text{if $y\in \Omega\setminus B(x,r)$}.
 \end{cases}$$ Note that $$\Vert u\Vert_{L^{p^*}(\Omega)}\geq\mu(B(x,\tilde{r})\cap\Omega)^{1/p^*}.$$ Since the function $u$ is $1/(r-\tilde{r})$-Lipschitz and $\Vert u\Vert_{\infty}\leq 1,$ by [@HIT16 Corollary 3.12] and the fact that $0<r-\tilde{r}<1,$ we have $$\label{corolarry3.12}
\Vert u\Vert_{M^s_{p,q}(\Omega)}\leq C\mu(B(x,r)\cap\Omega)^{1/p}(r-\tilde{r})^{-s}.$$ Since $\Vert u\Vert_{L^{p^*}(\Omega)}\leq \Vert u\Vert_{M^s_{p,q}(\Omega)}$ by our assumption, we further have $$\mu(B(x,\tilde{r})\cap\Omega)^{1/p^*}\lesssim \mu(B(x,r)\cap\Omega)^{1/p}(r-\tilde{r})^{-s},$$ which yields $r-\tilde{r}\lesssim\mu(B(x,r)\cap\Omega)^{1/Q}.$ Now let us define a sequence $r_0>r_1>r_2>\cdots>0$ by induction: $$r_0=r, \qquad\text{and}\qquad r_{j+1}=\tilde{r_j}.$$ Clearly $$\label{decreasing}
\mu(B(x,r_j)\cap\Omega)=2^{-j}\mu(B(x,r)\cap\Omega).$$ Therefore $r_j\rightarrow 0$ as $j\rightarrow\infty,$ and hence $$\begin{aligned}
r &=&\sum_{j=0}^{\infty}(r_j-r_{j+1})\\
&\lesssim & \sum_{j=0}^{\infty}2^{-j/Q}\mu(B(x,r)\cap\Omega)^{1/Q}\\
&\leq & \mu(B(x,r)\cap\Omega)^{1/Q}\end{aligned}$$ as desired.\
**Case 2:** $sp=Q.$ Again for $x\in\Omega$ and $0<r\leq 1,$ we will have $0<\tilde{\tilde{r}}<\tilde{r}<r$ such that $$\label{rtilde}
\mu(B(x,\tilde{\tilde{r}})\cap\Omega)=\frac{1}{2}\mu(B(x,\tilde{r})\cap\Omega)=\frac{1}{4}\mu(B(x,r)\cap\Omega).$$ Considering the function $u$ associated to $x,\tilde{r},\tilde{\tilde{r}}$ as in and using (the proof of) [@HIT16 Corollary 3.12] we have $$\int_{B(x,r)\cap\Omega}\exp\left(C_1\frac{\vert u-u_{B(x,r)}\vert(\tilde{r}-\tilde{\tilde{r}})^s}{\mu(B(x,\tilde{r})\cap\Omega)}\right)\,d\mu\leq C_2r^Q.$$ Since $u=v=1$ on $B(x,\tilde{\tilde{r}})\cap\Omega$ and $u=v=0$ on $(B(x,r)\setminus B(x,\tilde{r}))\cap\Omega,$ we have that $\vert u-u_{B(x,r)}\vert\geq 1/2$ on at least one of the sets $B(x,\tilde{\tilde{r}})\Omega$ and $(B(x,r)\setminus B(x,\tilde{r}))\cap\Omega.$ Since the measure of these two sets are comparable to the measure of $B(x,\tilde{r})\cap\Omega,$ we have $$\mu(B(x,\tilde{r})\cap\Omega)\exp\big(C_1(\tilde{r}-\tilde{\tilde{r}})^s\mu(B(x,\tilde{r})\cap\Omega)\big)\leq C_2r^Q,$$ which can be written in the form $$\label{maininequality}
\tilde{r}-\tilde{\tilde{r}}\leq C_1\mu(B(x,\tilde{r})\cap\Omega)^{1/Q}\left[\log\left(\frac{C_2r^Q}{\mu(B(x,\tilde{r})\cap\Omega)}\right)\right]^{1/s}.$$ Now let us state a lemma from [@HKT08b], which will help us to relax the range of $0<r\leq 1$ to $0<r\leq 10\tilde{r}.$

If the measure density condition holds for all $x\in\Omega$ and all $r\leq 1$ such that $r\leq 10\tilde{r},$ where $\tilde{r}$ is defined by , then holds fro all $x\in\Omega$ and all $r\leq 1.$

Now let us define a sequence by setting $$r_0=r, \qquad \text{and}\qquad r_{j+1}=\tilde{r_j}.$$ Inequality together with the fact that $$\mu(B(x,r_{j+1})\cap\Omega)=2^{-j}\mu(B(x,\tilde{r})\cap\Omega)$$ gives $$\begin{aligned}
\tilde{r}=\sum_{j=0}^{\infty}(r_j-r_{j+1}) &\leq & \sum_{j=0}^{\infty}C_1\mu(B(x,r_j)\cap\Omega)^{1/Q}\left[\log\left(\frac{C_2r^Q}{\mu(B(x,r_j)\cap\Omega)}\right)\right]^{1/s}\\
&\leq & C_1\mu(B(x,\tilde{r})\cap\Omega)^{1/Q}\sum_{j\in\mathbb{N}}2^{-j/Q}\left[\log\left(\frac{C_22^jr^Q}{\mu(B(x,\tilde{r})\cap\Omega)}\right)\right]^{1/s}.\end{aligned}$$ The sum on the right-hand side is bounded from above (up to a constant) by $$\sum_{j=0}^{\infty}2^{-j/Q}j^{1/s}(\log 2)^{1/s}+\left(\sum_{j=0}^{\infty}2^{-j/Q}\right)\left[\log\left(\frac{C_2r^Q}{\mu(B(x,\tilde{r})\cap\Omega)}\right)\right]^{1/s}.$$ The two sums in the above expression converge to some constants depending on $Q$ and $s$ only and hence we obtain $$\label{sumoftwo}
\tilde{r}\leq C\mu(B(x,\tilde{r})\cap\Omega)^{1/Q}\left[1+\left[\log\left(\frac{C_2r^Q}{\mu(B(x,\tilde{r})\cap\Omega)}\right)\right]^{1/s}\right].$$ Let us write $\mu(B(x,\tilde{r})\cap\Omega)=\epsilon\tilde{r}^Q.$ Since $$\mu(B(x,r)\cap\Omega)=2\mu(B(x,\tilde{r})\cap\Omega)=2\epsilon\tilde{r}^Q\geq 2\cdot 10^{-Q}\epsilon r^Q,$$ it suffices to prove that $\epsilon$ is bounded from below by some positive constant. Now, from inequality , we have $$C\epsilon^{1/Q}(1+\log(C_210^Q\epsilon^{-1}))^{1/s}\geq 1.$$ The expression on the left-hand side converges to $0$ if $\epsilon\rightarrow 0,$ and hence $\epsilon$ must be bounded from below by a positive constant.\
**Case 3:** $sp>Q.$ For $x\in\Omega$ and $r\in (0,1],$ take $\tilde{r}\in (0,r/4$ and for such $x,r,\tilde{r}$ set $u$ as in . Then for all $y,z\in \Omega,$ by our assumption together with , we have $$\vert u(y)-u(z)\vert\leq C\Vert u\Vert_{M^s_{p,q}(\Omega)}d(y,z)^{s-Q/p}\lesssim \frac{\mu(B(x,r)\cap\Omega)^{1/p}}{r^s}d(x,y)^{s-Q/p}.$$ In particular, let $y\in B(x,r)\cap\Omega$ and $z\in (B(x,r+r/2)\cap\Omega)\setminus B(x,r).$ Then $d(y,x)\leq r/4,$ $r\leq d(z,x)\leq 3r/2$ and hence $r/2\leq d(y,z)\leq 2r.$ Therefore, $\mu(B(x,r)\cap\Omega)\gtrsim r^Q.$ This ends the proof of the theorem.

Note that in the previous theorem, we have restricted $s$ to be strictly less than one. For $s=1,$ we refer to a recent result of Górka for Hajłasz-Sobolev space, [@Gor17].

[^1]: I would like to thank Professor Pekka Koskela for introducing me with the problem and for his fruitful suggestions. This work was supported by DST-SERB (Grant no. PDF/2016/000328).
