text:
\chapter{Strongly local Dirichlet metric spaces with sub-Gaussian heat kernel estimates}
\label{LDsGHKU}

We now turn to the study  strongly local Dirichlet spaces
which \emph{do not have Gaussian heat kernel bounds}~\eqref{eq:heat-Gauss}.
 The main class of examples we are interested in are fractal spaces.
We refer to \cite{Ba98,Gri,KigB,Kig:RFQS}  for further details on the following framework/assumptions. We note that some of the most basic facts of
Chapter~\ref{Sec:Metric-Curvature}, such as Lemma~\ref{lem:diff-of-Lip}, do not hold true in this chapter because energy measures $\Gamma(\cdot,\cdot)$ are not
$\mu$-absolutely continuous. Therefore we can not use locally Lipschitz functions for our analysis, and need to develop a different set of tools.

Let $(X,d,\mu)$ be a metric measure space. We assume that $B(x,r):=\{y\in X\mid d(x,y)<r\}$ has compact closure for any $x\in X$ and any $r\in(0,\infty)$, and that $\mu$ is Ahlfors $H$-regular, i.e.\ there exist $c_{1},c_{2},d_{H}\in(0,\infty)$ such that $c_{1}r^{d_{H}}\leq\mu\bigl(B(x,r)\bigr)\leq c_{2}r^{d_{H}}$ for any $r\in\bigl(0,+\infty\bigr)$. Furthermore, we assume that on $(X,\mu)$ there is a measurable  heat kernel $p_t(x,y)$ satisfying, for some $c_{3},c_{4}, c_5, c_6 \in(0,\infty)$ and $d_{W}\in [2,+\infty)$,
\begin{equation}\label{eq:subGauss-upper}
c_{5}t^{-d_{H}/d_{W}}\exp\biggl(-c_{6}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)
\le p_{t}(x,y)\leq c_{3}t^{-d_{H}/d_{W}}\exp\biggl(-c_{4}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)
\end{equation}
for $\mu\!\times\!\mu$-a.e.\ $(x,y)\in X\times X$ and each $t\in\bigl(0,+\infty\bigr)$. We refer to \cite{P-P10}, assumptions (A1) to (A5), page 201, for the definition of  heat kernels on metric measure spaces.
The corresponding Dirichlet space will be denoted by $(X,\mu,\mathcal{E},\mathcal{F})$ and the corresponding semigroup by $\{P_t, t\ge 0 \}$.  We assume that $(X,\mu,\mathcal{E},\mathcal{F})$ is a strongly local regular symmetric Dirichlet space. The parameter $d_H$ is the Hausdorff dimension and the parameter $d_W$ the so-called walk dimension. It is possible to prove that if the metric space $(X,d)$ satisfies a chain condition, then $ 2 \le d_W \le d_H+1$. When $d_W=2$, one speaks of Gaussian estimates and when $d_W > 2$, one speaks then of sub-Gaussian estimates.

 In this framework, it is known that $(X,\mu,\mathcal{E},\mathcal{F})$ is conservative. Let $p \ge 1$ and $\alpha \ge 0$. As before, we define the Besov seminorm
\[
\| f \|_{p,\alpha}= \sup_{t >0} t^{-\alpha} \left( \int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y) \right)^{1/p}
\]
and define
\[
\mathbf{B}^{p,\alpha}(X)=\{ f \in L^p(X,\mu)\, :\,  \| f \|_{p,\alpha} <+\infty \}.
\]

\section{Metric characterization of Besov spaces}

Our goal in this section is to compare the space $\mathbf{B}^{p,\alpha}(X)$ to Besov type spaces previously
considered in a similar framework (see \cite{Gri}). In the following, for $r>0$ we set
\[
\Delta_r:=\{(x,y)\in X\times X\, :\, d(x,y)<r\}.
\]

For $\alpha\in[0,\infty)$ and $p\in[1,\infty)$, we introduce the following
Besov seminorm: for $f\in L^{p}(X,\mu)$,
\begin{equation}\label{eq:Besov-seminorm-r}
N^{\alpha}_{p}(f,r):=\frac{1}{r^{\alpha+d_{H}/p}}\biggl(\iint_{\Delta_r}|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\biggr)^{1/p}
\end{equation}
for $r\in(0,\infty)$, and
\begin{equation}\label{eq:Besov-seminorm}
N^{\alpha}_{p}(f):=\sup_{r\in(0,1]}N^{\alpha}_{p}(f,r).
\end{equation}
We then define the Besov space $\mathfrak{B}^{\alpha}_{p}(X)$ by
\begin{equation}\label{eq:Besov}
\mathfrak{B}^{\alpha}_{p}(X):=\bigl\{f\in L^{p}(X,\mu)\, :\, N^{\alpha}_{p}(f)<\infty\bigr\}.
\end{equation}
With the notation of the previous section, note that $\Vert f\Vert_{B^\alpha_{p,\infty}(X)}\simeq \sup_{r>0} N_p^\alpha(f,r)$.
It is clear that $\mathfrak{B}^{\alpha_{2}}_{p}(X)\subset\mathfrak{B}^{\alpha_{1}}_{p}(X)$
for $\alpha_{1},\alpha_{2}\in[0,\infty)$ with $\alpha_{1}\leq\alpha_{2}$. Note also that
\begin{equation}\label{eq:Besov-limsup}
\mathfrak{B}^{\alpha}_{p}(X)=\biggl\{f\in L^{p}(X,\mu)\, :\, \limsup_{r\downarrow 0}N^{\alpha}_{p}(f,r)<\infty\biggr\}.
\end{equation}
Indeed, if $f\in\mathfrak{B}^{\alpha}_{p}(X)$ then $f\in L^{p}(X,\mu)$ and
$\limsup_{r\downarrow 0}N^{\alpha}_{p}(f,r)\leq N^{\alpha}_{p}(f)<\infty$.
Conversely, for any $f\in L^{p}(X)$ with
$\limsup_{r\downarrow 0}N^{\alpha}_{p}(f,r)<\infty$,
we have $\sup_{r\in(0,\varepsilon]}N^{\alpha}_{p}(f,r)<\infty$ for some
$\varepsilon\in(0,\infty)$, and for any $r\in(\varepsilon,\infty)$
we see from $|f(x)-f(y)|^{p}\leq 2^{p}(|f(x)|^{p}+|f(y)|^{p})$ and
$\mu\bigl(B(x,r)\bigr)\leq c_{2}r^{d_{H}}$ that
\begin{align*}
N^{\alpha}_{p}(f,r)^{p}&=\frac{1}{r^{p\alpha+d_{H}}}\iint_{\{(x,y)\in X\times X\, :\, d(x,y)<r\}}|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\\
&\leq\frac{1}{r^{p\alpha+d_{H}}}\iint_{\{(x,y)\in X\times X\, :\,  d(x,y)<r\}}2^{p}(|f(x)|^{p}+|f(y)|^{p})\,d\mu(x)\,d\mu(y)\\
&=\frac{2^{p+1}}{r^{p\alpha+d_{H}}}\int_X|f(y)|^{p}\mu\bigl(B(y,r)\bigr)\,d\mu(y)\\
&\leq\frac{2^{p+1}}{r^{p\alpha+d_{H}}}\int_X|f(y)|^{p}\cdot c_{2}r^{d_{H}}\,d\mu(y)
 =\frac{2^{p+1}c_{2}}{r^{p\alpha}}\|f\|_{L^{p}(X,\mu)}^{p}\leq\frac{2^{p+1}c_{2}}{\varepsilon^{p\alpha}}\|f\|_{L^{p}(X,\mu)}^{p},
\end{align*}
so that
\[
\sup_{r\in(0,\infty)}N^{\alpha}_{p}(f,r)
 \leq\max\bigl\{2(2c_{2})^{1/p}\varepsilon^{-\alpha}\|f\|_{L^{p}(\mu)},\sup_{r\in(0,\varepsilon]}N^{\alpha}_{p}(f,r)\bigr\}<\infty.
 \]
Hence $f\in\mathfrak{B}^{\alpha}_{p}(X)$, proving \eqref{eq:Besov-limsup}.
The above argument also shows that with the notation of the previous section $B^\alpha_{p,\infty}(X)=\mathfrak{B}^\alpha_p(X)$.
The purpose of this section is to prove the following theorem.

\begin{theorem}\cite[Theorem~3.2]{P-P10}\label{Besov characterization}
Let $p \ge 1$ and $\alpha \ge 0$. We have $\mathfrak{B}^{\alpha}_{p}(X) = \mathbf{B}^{p,\frac{\alpha}{d_W}}(X)$ and
there exist constants $c_{p,\alpha},C_{p,\alpha}>0$ such that for every $f \in \mathfrak{B}^{\alpha}_{p}(X)$ and $r >0$,
\[
c_{p,\alpha} \sup_{s\in(0,r]}N^{\alpha}_{p}(f,s) \le \| f \|_{p,\alpha/d_W}
\le C_{p,\alpha} \left( \sup_{s\in(0,r]}N^{\alpha}_{p}(f,s)+\frac{1}{r^{\alpha}} \|f\|_{L^{p}(X,\mu)} \right).
\]
In particular, $ \| f \|_{p,\alpha/d_W} \simeq \sup_{s\in(0,+\infty) }N^{\alpha}_{p}(f,s)$.
\end{theorem}

\begin{remark}
The above theorem is essentially a rephrasing of~\cite[Theorem~3.2]{P-P10}. However,
the notion of Besov spaces given in~\cite{P-P10} considers dyadic
jumps in the parameter $t$; hence the proof given there is slightly more complicated than ours. We also include the relatively short proof because it shall  repeatedly be used in the next sections.
\end{remark}
\begin{proof}
We first prove the lower bound. For $s,t>0$ and $\alpha>0$,
\begin{align*}
   \int_X \int_X & |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y)  \\
   \ge & \int_X \int_{B(y,s)} |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y) \\
  \ge & c_{5}t^{-d_{H}/d_{W}} \int_X \int_{B(y,s)} |f(x)-f(y) |^p \exp\biggl(-c_{6}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr) d\mu(x) d\mu(y) \\
 \ge &  c_{5}t^{-d_{H}/d_{W}} \exp\biggl(-c_{6}\Bigl(\frac{s^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)  s^{\alpha p+d_{H}} N^{\alpha}_{p}(f,s)^p.
\end{align*}
Therefore we have
\[
t^{-\frac{\alpha p}{d_W}} \int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y)
 \ge c_5 t^{-\frac{\alpha p}{d_W}-\tfrac{d_H}{d_W}} \exp\biggl(-c_{6}\Bigl(\frac{s^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)  s^{\alpha p+d_{H}} N^{\alpha}_{p}(f,s)^p.
\]

We now choose $s=t^{1/d_W}$. This yields
\[
t^{-\frac{\alpha p}{d_W}}  \int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y)
 \ge c_5  \exp{(-c_6)}   N^{\alpha}_{p}(f,t^{1/d_W})^p.
\]
From the definition of the $\| \cdot \|_{p,\alpha/d_W} $ seminorm, one concludes
\[
c_5  \exp{(-c_6)}   N^{\alpha}_{p}(f,t^{1/d_W})^p \le \| f \|^p_{p,\alpha/d_W} .
\]
Since, it is true for every $t>0$, the conclusion follows.
\

We now turn to the upper bound. Fixing $r>0$, we set
\begin{align}
A(t)&:=\int_X\int_{X\setminus B(y,r)}p_{t}(x,y)|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y),\label{E:A(t)}\\
B(t)&:=\int_X\int_{B(y,r)}p_{t}(x,y)|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y),\label{E:B(t)}
\end{align}
so that $ \int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y) =A(t)+B(t)$.
By \eqref{eq:subGauss-upper} and the inequality
$|f(x)-f(y)|^{p}\leq 2^{p-1}(|f(x)|^{p}+|f(y)|^{p})$,

\begin{align}
A(t)&\leq\frac{c_{3}}{t^{d_{H}/d_{W}}}\int_X\int_{X\setminus B(y,r)}\exp\biggl(-c_{4}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)\cdot 2^{p}|f(y)|^{p}\,d\mu(x)\,d\mu(y)
\notag\\
&=
\frac{2^{p}c_{3}}{t^{d_{H}/d_{W}}}\sum_{k=1}^{\infty}\int_X\int_{B(y,2^{k}r)\setminus B(y,2^{k-1}r)}\exp\biggl(-c_{4}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)|f(y)|^{p}\,d\mu(x)\,d\mu(y)
\notag\\
&\leq
\frac{2^{p}c_{3}}{t^{d_{H}/d_{W}}}\sum_{k=1}^{\infty}\int_X\mu\bigl(B(y,2^{k}r)\bigr)\exp\biggl(-c_{4}\Bigl(\frac{2^{(k-1)d_{W}}r^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)|f(y)|^{p}\,d\mu(y)
\notag\\
&\leq
\frac{2^{p}c_{3}}{t^{d_{H}/d_{W}}}\sum_{k=1}^{\infty}c_{2}r^{d_{H}}2^{kd_{H}}\|f\|_{L^{p}}^{p}\exp\biggl(-c_{4}\Bigl(\frac{r^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\Bigl(2^{\frac{d_{W}}{d_{W}-1}}\Bigr)^{k-1}\biggr)
\notag\\
&=
\|f\|_{L^{p}}^{p}2^{p}c_{2}c_{3}\sum_{k=1}^{\infty}2^{d_{H}}\Bigl(\frac{r^{d_{W}}}{t}2^{d_{W}(k-1)}\Bigr)^{d_{H}/d_{W}}\exp\biggl(-2^{-\frac{d_{W}}{d_{W}-1}}c_{4}\Bigl(\frac{r^{d_{W}}}{t}2^{d_{W}k}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)
\notag\\
&\leq
\|f\|_{L^{p}}^{p}2^{p+d_{H}}c_{2}c_{3}\sum_{k=1}^{\infty}\int_{(r^{d_{W}}/t)(2^{d_{W}})^{k-1}}^{(r^{d_{W}}/t)(2^{d_{W}})^{k}}s^{d_{H}/d_{W}}\exp\Bigl(-2^{-\frac{d_{W}}{d_{W}-1}}c_{4}s^{\frac{1}{d_{W}-1}}\Bigr)\frac{1}{(d_{W}\log 2)s}\,ds
\notag\\
&=
\frac{2^{p+d_{H}}c_{2}c_{3}}{d_{W}\log 2}\|f\|_{L^{p}}^{p}\int_{r^{d_{W}}/t}^{\infty}s^{d_{H}/d_{W}-1}\exp\Bigl(-2^{-\frac{d_{W}}{d_{W}-1}}c_{4}s^{\frac{1}{d_{W}-1}}\Bigr)\,ds\notag\\
&\leq c_{8}\exp\biggl(-c_{9}\Bigl(\frac{r^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)\|f\|_{L^{p}(X,\mu)}^{p},
\label{eq:HKBesov-norms-upper-proof1}
\end{align}
where $c_{9}:=2^{-1-\frac{d_{W}}{d_{W}-1}}c_{4}$ and
$c_{8}:=2^{p+d_{H}}c_{2}c_{3}(d_{W}\log 2)^{-1}\int_{0}^{\infty}s^{d_{H}/d_{W}-1}\exp\bigl(-c_{9}s^{\frac{1}{d_{W}-1}}\bigr)\,ds$.

On the other hand, for $B(t)$, by \eqref{eq:subGauss-upper} we have
\begin{align}
B(t)&\leq\frac{c_{3}}{t^{d_{H}/d_{W}}}\int_X\int_{B(y,r)}\exp\biggl(-c_{4}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\notag\\
&\leq\frac{c_{3}}{t^{d_{H}/d_{W}}}\sum_{k=1}^{\infty}\int_X\int_{B(y,2^{1-k}r)\setminus B(y,2^{-k}r)}\exp\biggl(-c_{4}\Bigl(\frac{d(x,y)^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\notag\\
&\leq\frac{c_{3}}{t^{d_{H}/d_{W}}}\sum_{k=1}^{\infty}\int_X\int_{B(y,2^{1-k}r)}\exp\biggl(-c_{4}\Bigl(\frac{2^{-kd_{W}}r^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\notag\\
&\leq c_{3} \sum_{k=1}^{\infty}\frac{(2^{1-k}r)^{p\alpha+d_{H}}}{t^{d_{H}/d_{W}}}\exp\biggl(-2c_{9}\Bigl(\frac{r^{d_{W}}}{t}2^{d_{W}(1-k)}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)\frac{1}{(2^{1-k}r)^{p\alpha+d_{H}}}\int_X\int_{B(y,2^{1-k}r)}|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\notag\\
&\leq c_{3}2^{p\alpha+d_{H}} t^{\frac{p\alpha}{d_W} }\sup_{s\in(0,r]}N^{\alpha}_{p}(f,s)^{p}\sum_{k=1}^{\infty}\Bigl(\frac{r^{d_{W}}}{t}2^{-d_{W}k}\Bigr)^{\frac{d_H+p\alpha}{d_W}}\exp\biggl(-2c_{9}\Bigl(\frac{r^{d_{W}}}{t}2^{-d_{W}(k-1)}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)\notag\\
&\leq c_{7}t^{\frac{p\alpha}{d_W} }\sup_{s\in(0,r]}N^{\alpha}_{p}(f,s)^{p}.
\label{eq:HKBesov-norms-upper-proof2}
\end{align}

As a conclusion, one has

\[
 \int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y)
 \le c_{8}\exp\biggl(-c_{9}\Bigl(\frac{r^{d_{W}}}{t}\Bigr)^{\frac{1}{d_{W}-1}}\biggr)\|f\|_{L^{p}}^{p}
    +c_{7}t^{\frac{p\alpha}{d_W} }\sup_{s\in(0,r]}N^{\alpha}_{p}(f,s)^{p}.
\]
This yields
\[
\sup_{t>0}t^{-\frac{p\alpha}{d_W}}\int_X \int_X |f(x)-f(y) |^p p_t (x,y) d\mu(x) d\mu(y)
\le c_{7} \sup_{s\in(0,r]}N^{\alpha}_{p}(f,s)^{p}+\frac{c_{10}}{r^{p\alpha}} \|f\|_{L^{p}(X,\mu)}^{p}.
\]
The proof is thus complete.
\end{proof}

\section{Co-area type estimates}
In the sequel, for any $E \subset X$ we will denote by $E_r$ the $r$-neighborhood of $E$ and define the distance from $x\in X$ to $E$ by $d(x,E):=\inf_{y\in E}d(x,y)$. We will also refer to the standing assumptions for this section, outlined at the beginning of the chapter.

\begin{theorem}\label{ahlfors-coarea}
Let $X$ be Ahlfors $d_H$-regular with a heat kernel that satisfies the upper sub-Gaussian estimate~\eqref{eq:subGauss-upper}. For $u\in L^1(X,\mu)$ and $s\in\mathbb{R}$, let $E_s(u):=\{ x \in X, u(x)>s\}$. Assume that there is $0<\alpha\leq \frac{d_H}{d_W}$ and $R>0$ such that
\begin{equation}\label{extended-inner-boundary-estimate}
h(u,s) = \sup_{r \in(0,R]} \frac1{r^{\alpha d_W}} \mu \bigl\{ x\in E_s(u): d(x, X\setminus E_s(u)) < r  \bigr\}
\end{equation}
is in $L^1 (\mathbb{R},ds)$. Then, $u \in \mathbf{B}^{1,\alpha}(X)$ and there exist constants $C_1,C_2>0$ independent of $u$ such that
\begin{equation}\label{E:JKLM}
\| u \|_{1, \alpha} \le C_1 R^{-\alpha}\|u\|_{L^1(X,\mu)}+  C_2 \int_{\mathbb{R}} h(u,s) ds.
\end{equation}
\end{theorem}

\begin{proof}
As in the proof of Theorem \ref{thm:W=BV} we have
\begin{align*}
\lefteqn{\int_{X\times X} p_t(x,y) \ |u(x)-u(y)|\, d\mu(x) d\mu(y)}\quad&\\
&=2\int_{\mathbb{R}}\int_X \int_X \mathbf{1}_{E_s(u)^c} (x)  \mathbf{1}_{E_s(u)}(y)p_t(x,y)\, d\mu(x)d\mu(y)\, ds\\
&=2\int_\mathbb{R} \int_{E_s(u)} \int_{X\setminus E_s(u)} p_t(x,y)\, d\mu(y)\, d\mu(x)\, ds
\end{align*}
Fix $s$ and $t$ and decompose the integral over $E_s(u)$ as follows: For $j\geq 1$, let
\begin{equation*}
	F_j := \bigl\{ x\in E_s(u):  2^{j-1} t^{1/d_W} \leq d(x, X\setminus E_s(u)) < 2^j t^{1/d_W}  \bigr\}
	\end{equation*}
and $F_0:= \bigl\{ x\in E_s(u):  d(x, X\setminus E_s(u)) < t^{1/d_W}  \bigr\}$. Evidently $E_s(u)=\cup_0^\infty F_j$. In the following computation we use the bound $\int_{X\setminus E_s(u)} p_t(x,y)\, d\mu(y)\leq1$ for $x\in F_0$. For the remaining range of $j$ and $x\in F_j$ we instead note that $d(x,y)\geq 2^{j-1} t^{1/d_W}$ for any $y\in X\setminus E_s(u)$ and integrate the sub-Gaussian estimate~\ref{eq:subGauss-upper} over this range of radii.
\begin{align}
	\lefteqn{\int_{X\times X} p_t(x,y) \ |u(x)-u(y)|\, d\mu(x) d\mu(y)}\quad&\notag\\
	&\leq 2\int_{\mathbb{R}} \sum_{j=0}^\infty \int_{F_j} \int_{X\setminus E_s(u)} p_t(x,y)\, d\mu(y)\, d\mu(x)\, ds\notag\\
	&\leq 2 \int_{\mathbb{R}} \biggl(  \mu(F_0) + c_3t^{-d_H/d_W}  \sum_{j=1}^\infty \int_{F_j} \int_{X\setminus E_s(u)} \exp \biggl( -c_4\Bigl(\frac{d(x,y)^{d_W}}{t}\Bigr)^{1/(d_W-1)}\biggr)\, d\mu(y)\, d\mu(x)\biggr)\, ds\notag\\
	&\leq 2 \int_{\mathbb{R}} \biggl( \mu(F_0) + c_3t^{-d_H/d_W}  \sum_{j=1}^\infty \mu(F_j) \int_{ 2^{j-1} t^{1/d_W}}^\infty \exp\biggl( -c_4\Bigl(\frac{r^{d_W}}t \Bigr)^{1/(d_W-1)}\biggr)\, \mu(B(x,r))\,\frac{dr}r\biggr)\, ds\notag\\
	&\leq 2 \int_{\mathbb{R}} \biggl( \mu(F_0) + c_3  \sum_{j=1}^\infty \mu(F_j) \int_{2^{(j-1)d_W/(d_W-1)}}^\infty e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u \biggr) \,ds \label{eqn:suffconditforuinBesov}
	\end{align}

Our hypotheses ensure that $\mu(F_j)\leq (2^{j} t^{1/d_W})^{\alpha d_W}h(u,s)$ provided $2^j t^{1/d_w}<R$; for notational convenience we let the largest $j$ satisfy this be $j=J$ and thus obtain
\begin{align*}
	\lefteqn{\sum_{j=1}^J \mu(F_j) \int_{2^{(j-1)d_W/(d_W-1)}}^\infty e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u }\quad&\\
	&\leq t^{\alpha}  h(u,s) \sum_{j=1}^J 2^{j\alpha d_W} \int_{ 2^{(j-1)d_W/(d_W-1)}}^\infty e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u \\
	&\leq  t^{\alpha} h(u,s)  \int_1^\infty  \Bigl( \sum_{j=1}^\infty 2^{j\alpha d_W}\mathds{1}_{\{u\geq 2^{(j-1)d_W/(d_W-1)}\}}\Bigr) e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u \\
	&\leq \tilde{C}_1 t^{\alpha} h(u,s) \int_1^\infty e^{-c_4u} u^{(d_W-1)(d_H+\alpha d_W)/d_W} \frac{du}u \\
	&\leq \tilde{C}_2 t^{\alpha} h(u,s),
	\end{align*}
where we note that $\tilde{C}_2=\tilde{C}_2(c_4,\delta,d_W,d_H)$ is independent of $R$. For $j\geq J+1$ we instead use that $2^{(J-1)d_W/(d_W-1)}\geq \tilde{C}_3 R^{d_W/(d_W-1)}t^{-1/(d_W-1)}$. Moreover, there is $\tilde{C}_4=\tilde{C}_4(c_4,d_W,d_H)$ such that $R^{d_W/(d_W-1)}t^{-1/(d_W-1)}\geq \tilde{C}_4$ implies the bound
\begin{equation*}
	\int_{ 2^{(j-1)d_W/(d_W-1)}}^\infty e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u
	\leq \tilde{C}_5  R^{d_H} t^{-d_H/d_W} \exp \Bigl( -c_4 \tilde{C}_4 R^{d_W/(d_W-1)}t^{-1/(d_W-1)} \Bigr).
	\end{equation*}
Using $\sum_{j\geq J} \mu(F_j)\leq \mu(E_s(u))$ we conclude
\begin{align*}
	\lefteqn{\sum_{j=J}^\infty \mu(F_j) \int_{2^{(j-1)d_W/(d_W-1)}}^\infty e^{-c_4u} u^{(d_W-1)d_H/d_W} \frac{du}u} \quad&\\
	&\leq  \tilde{C}_5 R^{d_H} t^{-d_H/d_W} \exp \Bigl( -c_4 \tilde{C}_4 R^{d_W/(d_W-1)}t^{-1/(d_W-1)} \Bigr)\mu(E_s(u)).
	\end{align*}
Combining these with the estimate $\mu(F_0)\leq t^{\alpha} h(u,s)$ we obtain from~\eqref{eqn:suffconditforuinBesov} that if $R^{\frac{d_W}{d_W-1}}t^{-\frac{1}{d_W-1}}\geq \tilde{C}_4$,
\begin{align*}
\lefteqn{\int_{X\times X} p_t(x,y) \ |u(x)-u(y)|\, d\mu(x) d\mu(y)}\quad&\\
	&\leq \int_\mathbb{R} \tilde{C}_2 t^{\alpha}  h(u,s) +  \tilde{C}_5 R^{d_H} t^{-d_H/d_W} \exp \Bigl( -c_4 C R^{d_W/(d_W-1)}t^{-1/(d_W-1)} \Bigr) \mu(E_s(u)) \, ds\\
	&\leq t^{\alpha}\int_\mathbb{R}  \tilde{C}_2 h(u,s)\, ds +  \tilde{C}_5 R^{d_H} t^{-d_H/d_W} \exp \Bigl( -c_4 C R^{d_W/(d_W-1)}t^{-1/(d_W-1)} \Bigr) \|u\|_{L^1(X,\mu)}
	\end{align*}
Finally, recall from the proof of Theorem~\ref{Besov characterization} that
\begin{equation*}
\|u\|_{1,\alpha}	\leq 2 T^{-\alpha} \|u\|_{L^1(X,\mu)} +
\sup_{t\in(0,T]}  t^{-\alpha}\int_{X\times X} p_t(x,y) \ |u(x)-u(y)|\, d\mu(x) d\mu(y).
\end{equation*}
Our estimate for the integral is valid for $t \leq T= \tilde{C}_4^{-(d_W-1)} R^{d_W}$, hence there is $\tilde{C}_6$ so that
\begin{align*}
\|u\|_{1,\alpha} &\leq \tilde{C}_6 R^{-\alpha d_W} \|u\|_1+ \tilde{C}_2\int_\mathbb{R} h(u,s)\, ds \\
&\quad + \sup_{t\leq T}\tilde{C}_5 R^{d_H} t^{-(\alpha d_W+d_H)/d_W} \exp \Bigl( -c_4 \tilde{C}_4 R^{d_W/(d_W-1)}t^{-1/(d_W-1)} \Bigr) \|u\|_{L^1(X,\mu)}\\
&\leq C_1 R^{-\alpha d_W} \|u\|_{L^1(X,\mu)} +  C_2\int_\mathbb{R} h(u,s)\, ds \qedhere
\end{align*}
\end{proof}

The latter result has several useful applications. Recall that a space is uniformly locally connected if there is $C_{LC}>0$ such that any $x$ and $y$ cannot be disconnected in $B(x,C_{LC}d(x,y))$. Note, for example, that a geodesic space is uniformly locally connected.

\begin{corollary}
Let $X$ be a uniformly locally connected space with a heat kernel that satisfies the upper sub-Gaussian estimate~\eqref{eq:subGauss-upper} and let $u\in L^1(X,\mu)$. Let $E_s(u)$ be as in Theorem~\ref{ahlfors-coarea} and $\partial E_s(u)$ be its topological boundary. Suppose there is $0<\alpha\leq \frac{d_H}{d_W}$ and $R>0$ such that
\begin{equation*}
H(u,s) = \sup_{r\in(0,R]} \frac1{r^{\alpha d_W}} \mu\bigl\{ x\in E_s(u): d(x,\partial E_s(u)) <r\bigr\}
\end{equation*}
is in $L^1(\mathbb{R},ds)$. Then, $u \in \mathbf{B}^{1,\alpha}(X)$ and there exist constants $C_1,C_2>0$ independent of $u$ such that
\begin{equation}
 \| u \|_{1, \alpha} \le C_1 R^{-\alpha d_W}\|u\|_{L^1(X,\mu)}+  C_2 \int_{\mathbb{R}} H(u,s) ds.
\end{equation}
\end{corollary}
\begin{proof}
It suffices to show that $H(u,s)$ and $h(u,s)$ are comparable. This follows from the inclusions
\begin{align*}
\bigl\{ x\in E_s(u): d(x,\partial E_s(u)) <r\bigr\}
&\subset \bigl\{ x\in E_s(u): d(x, X\setminus E_s(u)) <2r\bigr\}\\
&\subset \bigl\{ x\in E_s(u): d(x,\partial E_s(u)) < 2C_{LC}r\bigr\},
\end{align*}
where $C_{LC}$ is the local connectivity constant. The first inclusion is trivial. Let us now assume that the second inclusion  fails, so that there are $x\in E_s(u)$ and $z\in X\setminus E_s(u)$ with $d(x,z)<2r$ and yet $d(x,y)>2C_{LC}r$ for all $y\in\partial E_s(u)$. Clearly neither $x$ nor $z$ is in $\partial E_s(u)$, so they are in the interior of $E_s(u)$ and the interior of $X\setminus E_s(u)$ respectively. These sets are disjoint and open, and they cover $B(x,2C_{LC}d(x,z))$ because $d(x,y)>2C_{LC}r$ for all $y\in\partial E_s(u)$ implies $B(x,2C_{LC}d(x,z))\cap\partial E_s(u)=\emptyset$. Thus, $x$ and $z$ are disconnected in $B(x,2C_{LC}d(x,y))$ in contradiction to uniform local connectedness.
\end{proof}

From the observation that $\partial E_s(\mathbf{1}_E)=\partial E$ if $s\in[0,1]$ and is empty otherwise we obtain a bound that related to the inner Minkowski content of $E$, see Section~\ref{Sec:Examples_1E}.
\begin{corollary}\label{C:ahlfors-coarea-1E-ulc}
Let $X$ be a uniformly locally connected space with a heat kernel that satisfies the upper sub-Gaussian estimate~\eqref{eq:subGauss-upper}. If $E \subset X$ has finite measure and for some $0<\alpha\leq \frac{d_H}{d_W}$
\begin{equation*}
\sup_{r\in(0,R]} \frac1{r^{\alpha d_W}} \mu\bigl\{ x\in E: d(x,\partial E) <r\bigr\}<\infty,
\end{equation*}
then $\mathbf{1}_E \in \mathbf{B}^{1,\alpha}(X) $ and
\begin{equation*}
\| \mathbf{1}_E \|_{1, \alpha} \le C_1 R^{-\alpha d_W} \mu(E) + C_2  \sup_{r\in(0,R]} \frac1{r^{\alpha d_W}} \mu\bigl\{ x\in E: d(x,\partial E) <r\bigr\}.
\end{equation*}
\end{corollary}

\begin{remark}
One can drop the assumption on $X$ of being uniformly locally connected by considering \emph{an extended metric notion of the $r$-boundary of a set}:
\begin{equation}\label{e-b-ext}
\tilde\partial_r  E=(E\cap E^c_r)\cup (E^c\cap E_r)
\end{equation}
This is done in Theorems~\ref{ahlfors-coarea} and~\ref{T:non-local_coarea} when $h_R(u,s)$ is defined in~\eqref{extended-inner-boundary-estimate} and~\eqref{extended-inner-boundary-estimate-non-loc}. This is especially natural in the context of nonlocal Dirichlet forms in Chapter~\ref{Ch-non-loc}, where spaces considered can be totally disconnected.
\end{remark}

The next corollary considers a situation that often applies to fractals.

\begin{corollary}\label{JKLM}

Let $X$ be a uniformly locally connected space with a heat kernel that satisfies the upper sub-Gaussian estimate~\eqref{eq:subGauss-upper} and let $u\in L^1(X,\mu)$. Let $E_s(u)$ be as in Theorem~\ref{ahlfors-coarea} and $\partial E_s(u)$ be its topological boundary. Assume that $\partial E_s(u)$ is finite and $s\mapsto  | \partial E_s(u) |$ is in $L^1(\mathbb{R})$, where $| \partial E_s(u) |$ denotes the cardinality of $\partial E_s(u)$. Then, $u \in \mathbf{B}^{1,\frac{d_H}{d_W}}(X)$ and there exists a constant $C>0$ independent of $u$ such that
\begin{equation}\label{E:JKLM}
 \| u \|_{1, d_H/d_W} \le C \int_{\mathbb{R}} | \partial E_s(u) | ds.
\end{equation}
In particular, if $E \subset X$ is a set of finite measure whose boundary is finite, then $\mathbf{1}_E \in \mathbf{B}^{1,\frac{d_H}{d_W}}(X)$ and
\[
\| \mathbf{1}_E \|_{1, d_H/d_W} \le C  | \partial E |.
\]
\end{corollary}
\begin{proof}
Writing $\partial E_s(u)=\{z_1,\ldots ,z_{|\partial E_s(u)|}\}$, the Ahlfors regularity condition implies that, for any $r>0$,
\begin{equation*}
\mu((\partial E_s(u))_r)\leq \sum_{i=1}^{|\partial E_s(u)|} \mu(B(z_i,r))\leq |\partial E_s(u)|c_2 r^{d_H}.
\end{equation*}
\end{proof}

\begin{remark}
For the lower bound in this corollary one needs extra assumptions. One nice assumption is to assume that $u$ is a finite linear combination of indicator functions of open sets with finite boundary. This is natural for the Sierpinski gasket and similar spaces. For the Sierpinski gasket type fractals,  the geometry of the fractal will force $u$ to be totally discontinuous piecewise-constant function, and so the lower bound follows from Theorem~\ref{thm-HKE-E-Ec2}, Corollary~\ref{C:0P_characterization} or Proposition~\ref{prop-reg-b} under the mild extra assumption. This will be the subject of further work.
\end{remark}

\begin{remark}
If Corollary~\ref{JKLM} is applied to the Sierpinski gasket or a similar fractal, then the function $u$ has to be discontinuous. This is because only countably many triangles have finite boundary, and any set which is not a finite union of triangles will have infinite boundary.
However, on the Vicsek   set or a similar fractal, there are infinitely continuous functions for which level sets are finite. This is because the Vicsek   set is a topological tree. For instance, it is easy to see that the level sets of $n$-harmonic on the Vicsek  functions are finite.
For some related general theory see \cite{KigamiDendrites}.
\end{remark}

\begin{proposition}\label{P:BesovLB}
Let $X$ be Ahlfors $d_H$-regular with a heat kernel that satisfies the sub-Gaussian lower estimate~\eqref{eq:subGauss-upper}. For $u\in L^1(X,\mu)$ let us assume that the level sets $E_s(u)$ are uniformly porous at uniformly small scale, i.e.\ there exists $c_u>0$ and $R>0$ small such that for any $0<r<R$, $s\in\mathbb{R}$ and $y\in E_s(u)$ with $d(y, X\setminus E_s(u))<r$, there exists $z_y\in\partial E_s(u)$ such that
\begin{equation}\label{E:unif_porosity_levelset}
B(z_y,c_u r)\subset B(y,r)\cap (X\setminus E_s(u)).
\end{equation}
Furthermore, define
\begin{equation}
\tilde{h}(u,s):=\liminf_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\}).
\end{equation}
If $h\in L^1(\mathbb{R})$, then there exists $C_u>0$ depending on the porosity constant $c_u$ such that
\begin{equation}\label{E:BesovLB}
\|\mathbf{1}_E\|_{1,\alpha}\geq C_u\int_{\mathbb{R}}\tilde{h}(u,s)\,ds.
\end{equation}
\end{proposition}

\begin{proof}

Applying in the proof of Theorem~\ref{Besov characterization} the porosity condition~\eqref{E:unif_porosity_levelset}, for any $t>0$ and $0<r<R$ we have
\begin{align*}
&t^{-\alpha}\int_{\mathbb{R}}\int_X\int_Xp_t(x,y)|\mathbf{1}_{E_s(u)}(x)-\mathbf{1}_{E_s(u)}(y)|\,\mu(dx)\,\mu(dy)\,ds\\
&=2t^{-\alpha}\int_{\mathbb{R}}\int_X\int_X p_t(x,y)\mathbf{1}_{E_s(u)^c}(x)\mathbf{1}_{E_s(u)}(y)\,\mu(dx)\,\mu(dy)\,ds\\
& \ge 2c_5t^{-\alpha-\frac{d_H}{d_W}}\exp\Big(\!\!-c_6\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)\int_{\mathbb{R}}\int_{\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\} }\mu(B(y,r)\cap (X\setminus E_s(u)))\,\mu(dy)\,ds\\
&\geq 2c_5t^{-\alpha-\frac{d_H}{d_W}}\exp\Big(\!\!-c_6\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)\int_{\mathbb{R}}\int_{\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\}}\mu(B(z_y,c_ur))\,\mu(dy)\,ds\\
&\geq 2c_5t^{-\alpha-\frac{d_H}{d_W}}\exp\Big(\!\!-c_6\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)c_2c_u^{d_H}r^{d_H+\alpha d_W}\int_{\mathbb{R}}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\})\,ds.
\end{align*}
Thus, (with $t=r^{d_W}$) for any $0<r<\diam_d E$ it holds that
\begin{align*}
\|\mathbf{1}_E\|_{1,\alpha}&=\sup_{t>0}t^{-\alpha}\int_X\int_Xp_t(x,y)|\mathbf{1}_E(x)-\mathbf{1}_E(y)|\,\mu(dx)\,\mu(dy)\\
&\geq 2c_5 e^{-c_6}c_2 c_u^{d_H}\int_{\mathbb{R}}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\})\,ds\\
&\geq C_u\liminf_{r\to 0^+}\int_{\mathbb{R}}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\})\,ds\\
&\geq C_u\int_{\mathbb{R}}\liminf_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)\colon d(y,X\setminus E_s(u))<r\})\,ds,
\end{align*}
where last inequality is from Fatou's lemma.
\end{proof}
The same argument as Corollary~\ref{C:ahlfors-coarea-1E-ulc} gives Proposition~\ref{P:BesovLB} when $X$ is uniformly locally constant with
\begin{equation}
\tilde{h}(u,s)=\liminf_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E_s(u)~\colon~d(y,\partial E_s(u))<r\})
\end{equation}
that we can call the $(d_H-\alpha d_W)$-dimensional inner lower Minkowski content of $\partial E_s(u)$.
\

\section{Sets $E$ with $\mathbf{1}_E \in \mathbf{B}^{1,\alpha}(X)$ and fractional content of boundaries}\label{Hsefcb}
\renewcommand{\pat}[1]{\textcolor{magenta!50!red}{#1}}
\renewcommand{\rS}[1]{{{\color{OliveGreen}{#1}}}}
We continue working under the standing assumptions of this section which are outlined at the beginning of the chapter. As before and in the sequel, for $E \subset X$, we will denote its $r$-neighborhood by $E_r$. In addition, for any $r>0$ and $E\subset X$ we will denote $(\partial E)^-_r:=(\partial E)_r\cap E$ and $(\partial E)^+_r:=(\partial E)_r\cap E^c$, where $\partial E$ is the topological boundary of $E$.

\subsection{Several characterizations of the sets $E$ with $\mathbf{1}_E \in \mathbf{B}^{1,\alpha}(X)$}
With the arguments used in the proofs of the previous section in hand we can now provide different characterizations of sets of finite $\alpha$-perimeter.

\begin{theorem}\label{T:FP_char}
Under the assumptions of Theorem~\ref{Besov characterization}, for a bounded measurable set $E \subset X$  and $\alpha >0$ we consider the following properties:
\begin{enumerate}
\item\label{FP_char1} $\mathbf{1}_E \in \mathbf{B}^{1,\alpha}(X)$;
\item\label{FP_char2} $\displaystyle \sup_{r>0} \frac{1}{r^{\alpha d_W+d_{H}}} (\mu \otimes \mu) \big(\{ (x,y) \in E \times E^c\, :\, d(x,y) < r\}\big) <+\infty$;
\item\label{FP_char3} $\displaystyle \limsup_{r \to 0^+} \frac{1}{r^{\alpha d_W+d_{H}}} (\mu \otimes \mu) \big(\{ (x,y) \in E \times E^c\, :\, d(x,y) < r\}\big) <+\infty$;

\item\label{FP_char4} $\displaystyle \limsup_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu\big(\{x\in E~\colon~d(x,E^c)<r\}\big)<+\infty$;

\item\label{FP_char5} $\displaystyle \limsup_{r\to 0^+}\int_{\{x\in E\colon d(x,E^c)<r\}}\int_{B(x,r)\cap E^c}\frac{1}{d(x,y)^{d_H+\alpha d_W}}d\mu(y)d\mu(x)<+\infty$;

\item\label{FP_char6} $\displaystyle \int_E \int_{E^c} \frac{1}{d(x,y)^{d_H+\alpha d_W}}d\mu(y)d\mu(x) <+\infty$.
\end{enumerate}
Then, the following relations hold:
\begin{enumerate}[label=(\roman*)]
\item \eqref{FP_char1}~$\Leftrightarrow$~\eqref{FP_char2}~$\Leftrightarrow$~\eqref{FP_char3};
moreover there exist constants $c,C >0$ independent of $E$ such that
\begin{multline*}
c\, \sup_{r>0} \frac{1}{r^{\alpha d_W+d_{H}}} (\mu \otimes \mu) \big(\{ (x,y) \in E \times E^c\, :\, d(x,y) < r\} \big) \\
 \le  \| \mathbf{1}_E \|_{1,\alpha} \le C \sup_{r>0} \frac{1}{r^{\alpha d_W+d_{H}}} (\mu \otimes \mu) \big(\{ (x,y) \in E \times E^c\, :\, d(x,y) < r\}\big);
\end{multline*}
\item \eqref{FP_char4}~$\Rightarrow$~\eqref{FP_char5}~$\Rightarrow$~\eqref{FP_char1};
\item \eqref{FP_char6}~$\Rightarrow$~\eqref{FP_char1};
\item If in addition $E$ is porous, i.e.\ there exists $c_E>0$ such that for any $0<r<\diam_d E$ and  $y\in E$ with $d(y, X\setminus E)<r$, there exists $z_y\in\partial E$ such that
\begin{equation}\label{D:porous}
B(z_y,c_Er)\subset B(y,r)\cap (X\setminus E),
\end{equation}
then \eqref{FP_char1}~$\Rightarrow$~\eqref{FP_char4};
\end{enumerate}
\end{theorem}
The relations stated in this theorem follow from the proof of Theorem~\ref{Besov characterization}, Theorem~\ref{ahlfors-coarea} and Proposition~\ref{P:BesovLB} applied to $\mathbf{1}_E$ along with some modifications of those arguments which are presented in the next paragraph. Assuming uniformly locally connectedness on the space, which includes the case of $X$ being geodesic, we obtain as in Corollary~\ref{C:ahlfors-coarea-1E-ulc} a characterization of sets with finite $\alpha$-perimeter that involves their inner Minkowski content.
\begin{corollary}
Let $X$ be uniformly locally connected and satisfy the assumptions of Theorem~\ref{Besov characterization}. Then, Theorem~\ref{T:FP_char} holds with the inner neighborhood $(\partial E)_r^-$ in place of $\{x\in E~\colon~d(x,E^c)<r\}$. In particular, if $E$ is closed, the quantity
\begin{equation}
\limsup_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu\big(\{x\in E~\colon~d(x,E^c)<r\}\big)
\end{equation}
becomes the inner Minkowski content of $E$.
\end{corollary}

In the case when a set $E\subset X$ is porous and has a finite boundary, as for instance triangular cells in the infinite Sierpinski gasket, see Figure~\ref{F:porositySG}, we obtain a simpler characterization.
\begin{corollary}\label{C:0P_characterization}
If $(X,d)$ is uniformly locally connected, for any bounded measurable porous set $E\subset X$ whose topological boundary $\partial E$ is finite there exist $c,c_E>0$ such that
\begin{equation}
 c_E|\partial E|\leq \|\mathbf{1}_E\|_{1,d_H/d_W}\leq c |\partial E|,
\end{equation}
where $c_E$ is the porosity constant of $E$.
\end{corollary}
\begin{proof}
The upper bound is Corollary~\ref{JKLM}. Assuming $\partial E=\{z_1,\ldots,z_{|\partial E|}\}$ and using the fact that there exists $0<r_E<\diam_d E$ such that for any $0<r<r_E$, $B(z_i,r)$ are pairwise disjoint with
\begin{equation*}\label{E:finite_bdry}
(\partial E)_r\supseteq \bigcup_{i=1}^{|\partial E|}B(z_i,r),
\end{equation*}
the lower bound follows analogously to Proposition~\ref{P:1E_BesovLB}.
\end{proof}
\begin{figure}[H]
\begin{tikzpicture}[scale=1/9]

\foreach \c in {0,1,2} {
\foreach \b in {0,1,2} {
\foreach \a in {0,1,2} {
\foreach \e in {0,1,2} {
\foreach \f in {0,1,2} {
\draw[] ($(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(90:1)$) -- ($(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(210:1)$) -- ($(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(330: 1)$)--cycle;
}
}
}
}
}

\foreach \c in {0,1,2} {
\foreach \b in {0,1,2} {
\foreach \a in {0,1,2} {
\foreach \e in {0,1,2} {
\foreach \f in {0,1,2} {
\draw[] ($(180:55)+(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(90:1)$) -- ($(180:55)+(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(210:1)$) -- ($(180:55)+(90+120*\f:16)+(90+120*\e:8) + (90+120*\c:4)+(90+120*\b:2)+(90+120*\a:1)+(330: 1)$)--cycle;
}
}
}
}
}

\filldraw[fill=green!75!black, fill opacity=0.2, text opacity =1] ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$) -- ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$)  node [midway, right] {\color{green!75!black}\small{$\; r/2$}};

\filldraw[fill=green!75!black, fill opacity=0.2, text opacity =1] ($(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$)  node [midway, below] {\color{green!75!black}\small{$\; r/2$}} -- ($(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$);

\filldraw[fill=green!75!black, fill opacity=0.2, text opacity =1] ($(90+120*1:16)+(90+120*2:8) + (90+120*2:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*1:16)+(90+120*2:8) + (90+120*2:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*1:16)+(90+120*2:8) + (90+120*2:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$)  node [midway, below] {\color{green!75!black}\small{$\; r/2$}} -- ($(90+120*1:16)+(90+120*2:8) + (90+120*2:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$);

\filldraw[fill=blue, fill opacity=0.2, text opacity =1] ($(90+120*0:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*0:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*0:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*2:1)+(330:1)$) -- ($(90+120*0:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$);

\filldraw[fill=blue, fill opacity=0.2, text opacity =1] ($(180:3)+(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$) -- ($(180:3)+(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(180:3)+(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*2:1)+(330: 1)$) -- ($(180:3)+(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$);

\filldraw[fill=blue, fill opacity=0.2, text opacity =1] ($(90+120*2:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*2:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*2:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*2:1)+(330: 1)$) -- ($(90+120*2:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*0:1)+(90:1)$);

\draw[draw=red, thick] ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) circle (10pt) -- ($(90+120*1:16)+(90+120*0:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$)  node [midway, left] {\color{red}{$ r$}} -- ($(90+120*1:16)+(90+120*0:8) + (90+120*2:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$) -- ($(90+120*1:16)+(90+120*0:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$)  circle (10pt);
\draw[draw=red, thick] ($(90+120*1:16)+(90+120*1:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*1:16)+(90+120*1:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) circle (10pt) -- ($(90+120*1:16)+(90+120*1:8) + (90+120*2:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$) -- ($(90+120*1:16)+(90+120*1:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$);
\draw[draw=red, thick] ($(90+120*1:16)+(90+120*2:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$) -- ($(90+120*1:16)+(90+120*2:8) + (90+120*1:4)+(90+120*1:2)+(90+120*1:1)+(210:1)$) -- ($(90+120*1:16)+(90+120*2:8) + (90+120*2:4)+(90+120*2:2)+(90+120*2:1)+(330: 1)$) circle (10pt) -- ($(90+120*1:16)+(90+120*2:8) + (90+120*0:4)+(90+120*0:2)+(90+120*0:1)+(90:1)$);
\end{tikzpicture}
\caption{Marked red cells correspond to $(\partial E)_{r}^-$, the green colored ones to $(\partial E)_{r/2}^-$.
In this case, any ball $B(y,r/2)$ with $y\in (\partial E)_{r/2}^-$ contains at least a triangular cell (colored blue) of side length $r/4$.}
\label{F:porositySG}
\end{figure}
\subsection*{Detailed statements and proofs for Theorem~\ref{T:FP_char}}
For the sake of clarity, in the statements in this paragraph the assumptions on the underlying space $X$ are explicitly written.
\begin{proposition}\label{P:1E_BesovLB}
Let $X$ be Ahlfors $d_H$-regular with a heat kernel that satisfies the sub-Gaussian lower estimate~\eqref{eq:subGauss-upper} and let $0<\alpha\leq \frac{d_H}{d_W}$. For any porous set $E\subset X$ there exists $C_E>0$ such that
\begin{equation}\label{E:1E_BesovLB}
\|\mathbf{1}_E\|_{1,\alpha}\geq C_E\, \limsup_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu(\{x\in E\colon d(x,E^c)<r\}).
\end{equation}
\end{proposition}

\begin{proof}

Applying Proposition~\ref{P:BesovLB} with $u=\mathbf{1}_E$, for any $t>0$ and $0<r<\diam_d E$ we have

\begin{multline*}
\|\mathbf{1}_E\|_{1,\alpha}=\sup_{t>0}t^{-\alpha}\int_X\int_Xp_t(x,y)|\mathbf{1}_E(x)-\mathbf{1}_E(y)|\,\mu(dx)\,\mu(dy)\\
\geq 2c_5 e^{-c_6}c_2 c_E^{d_H}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E\colon d(y,E^c)<r\}).
\end{multline*}
Taking $\limsup_{r\to 0^+}$ yields~\eqref{E:1E_BesovLB}.

\end{proof}

\begin{proposition}\label{P:1Ein_Besov}
Let $X$ be Ahlfors $d_H$-regular with a heat kernel that satisfies the sub-Gaussian upper estimate~\eqref{eq:subGauss-upper} and let $E\subset X$ be a bounded measurable for which
\begin{equation}\label{E:local_geom_cond}
\limsup_{r\to 0^+}\int_{\{y\in E\colon d(y,E^c)<r\}}\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{d_H+\alpha d_W}}\mu(dx)\mu(dy)<\infty
\end{equation}
for some $\alpha >0$. Then, $\mathbf{1}_E\in \bm{B}^{1,\alpha}(X)$.
\end{proposition}
\begin{proof}
In order to bound $\|\mathbf{1}_E\|_{1,\alpha}$ we follow the proof of Theorem~\ref{Besov characterization} with some small modifications.

Using the same notation, for any fixed $t,r>0$ we have, on the one hand
\begin{align*}
A(t,r)\leq c_8\exp\Big(\!\!-c_9\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)\|\mathbf{1}_E\|_{L^1(X,\mu)}=c_8\exp\Big(\!\!-c_9\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)\mu(E),
\end{align*}
with the corresponding constants in the mentioned proof.
On the other hand, following the estimate for $B(t)$ we get
\begin{align*}
&B(t,r)=2\int_X\int_{B(y,r)}\mathbf{1}_{E^c}(x)\mathbf{1}_{E}(y)\,p_t(x,y)\,\mu(dx)\,\mu(dy)\nonumber\\

&\leq \frac{2c_3}{t^{d_H/d_W}}\sum_{k=1}^\infty\int_X\int_{B(y,2^{1-k}r)}\!\!\!\!\exp\bigg(\!\!\!-c_4\Big(\frac{(2^{-k}r)^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\bigg)\mathbf{1}_{E^c}(x)\mathbf{1}_{E}(y)\,\mu(dx)\,\mu(dy)\nonumber\\
&\leq 2c_3\sum_{k=1}^\infty \frac{(2^{1-k}r)^{\alpha d_W+d_H}}{t^{d_H/d_W}}\exp\bigg(\!\!-c_42^{-\frac{d_W}{d_W-1}}\Big(\frac{(2^{1-k}r)^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\bigg)\nonumber\\
&\quad\times \frac{1}{(2^{1-k}r)^{\alpha d_W+d_H}}\int_X\int_{B(y,2^{1-k}r)}\mathbf{1}_{E^c}(x)\mathbf{1}_{E}(y)\,\mu(dx)\,\mu(dy)\nonumber\\

&\leq 2c_3t^{\alpha}\int_E\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{\alpha d_W+d_H}}\mu(dx)\mu(dy) \sum_{k=1}^\infty\Big(\frac{2^{1-k}r}{t^{1/d_W}}\Big)^{\alpha d_W+d_H}\!\!\!\exp\bigg(\!\!-2c_9\Big(\frac{(2^{1-k}r)^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\bigg)\nonumber\\
&\leq c_{10} t^{\alpha}\int_E\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{\alpha d_W+d_H}}\mu(dx)
\mu(dy)\\
&= c_{10} t^{\alpha}\int_{\{y\in E\colon d(y,E^c)<r\}}\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{\alpha d_W+d_H}}\mu(dx)
\mu(dy),
\end{align*}
where $c_{10}:=c_32^{\alpha d_W+d_H+1}(2d_W\log 2)^{-1}\int_0^\infty s^{\alpha+\frac{d_H}{d_W}}\exp\big(\!\!-2c_9 s^{\frac{1}{d_W-1}}\big)\,ds$. For any $t>0$ it thus holds that
\begin{multline*}\label{E:1Ein_Besov_help03}
t^{-\alpha}\int_X\int_X p_t(x,y)|\mathbf{1}_E(x)-\mathbf{1}_E(y)|\,\mu(dx)\,\mu(dy)\\
\leq t^{-\alpha}c_8\exp\Big(\!\!-c_9\Big(\frac{r^{d_W}}{t}\Big)^{\frac{1}{d_W-1}}\Big)\mu(E)+ c_{10} \int_{\{y\in E\colon d(y,E^c)<r\}}\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{\alpha d_W+d_H}}\mu(dx)\mu(dy).
\end{multline*}
By assumption, we can now choose $r_\varepsilon>0$ small enough so that

\begin{equation*}
\sup_{t>0}t^{-\alpha}\int_X\int_X p_t(x,y)|\mathbf{1}_E(x)-\mathbf{1}_E(y)|\,\mu(dx)\,\mu(dy)\leq \frac{c_{11}}{r_\varepsilon^{\alpha d_W}}\mu(E)+c_{10}c_\varepsilon<\infty
\end{equation*}
for some $c_\varepsilon>0$.
\end{proof}
\begin{proposition}\label{P:local_geom_cond}
Let $X$ be Ahlfors $d_H$-regular with a heat kernel that satisfies the sub-Gaussian upper estimate~\eqref{eq:subGauss-upper} and let $E\subset X$ be a bounded measurable for which
\begin{equation}\label{E:inner_coarea}
\limsup_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu(\{y\in E\colon d(y,E^c)<r\})<\infty
\end{equation}
for some $0\leq\alpha\leq \frac{d_H}{d_W}$. Then,~\eqref{E:local_geom_cond} holds for that set $E$.
\end{proposition}

\begin{proof}
Let $E\subset X$ be a bounded measurable set. For any $r>0$, write
\begin{multline*}
\int_{\{y\in E\colon d(y,E^c)<r\}}\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{d_H +\alpha d_W}}\mu(dx)\mu(dy)\\
=\int_0^\infty(\mu\otimes\mu)\big(\big\{(x,y)\in E\times E^c~\colon~d(x,y)<r,d(x,y)<s^{-(d_H+\alpha d_W)^{-1}}\big\}\big)\,ds.
\end{multline*}
Since $r<s^{-(d_H+\alpha d_W)^{-1}}$ if and only if $s<r^{-(d_H+\alpha d_W)}$, the latter integral equals
\begin{align*}
&\int_0^{r^{-(d_H+\alpha d_W)}}\!\!(\mu\otimes\mu)\big(\big\{(x,y)\in E\times E^c~\colon~d(x,y)<r\big\}\big)\,ds\\
&+\int_{r^{-(d_H+\alpha d_W)}}^\infty(\mu\otimes\mu)\big(\big\{(x,y)\in E\times E^c~\colon~d(x,y)<s^{-(d_H+\alpha d_W)^{-1}}\big\}\big)\,ds\\
&=\int_0^{r^{-(d_H+\alpha d_W)}}\int_{\{y\in E\colon d(y,E^c)<r\}}\mu(B(x,r)\cap E^c)\,\mu(dx)\,ds\\
&+\int_{r^{-(d_H+\alpha d_W)}}^\infty\int_{\{y\in E\colon d(y,E^c)<s^{-(d_H+\alpha d_W)^{-1}}\}}\mu(B(y,s^{-(d_H+\alpha d_W)^{-1}})\cap E^c)\,\mu(dy)\,ds.
\end{align*}

The Ahlfors regularity now yields
\begin{align*}
\int_{\{y\in E\colon d(y,E^c)<r\}}&\int_{B(y,r)\cap E^c}\frac{1}{d(x,y)^{d_H+\alpha d_W}}\mu(dx)\mu(dy) \\%\leq\frac{1}{r^{d_H+\alpha d_W}}\int_{(\partial E)_r^-}\mu(B(x,r))\,\mu(dx)\\

&\leq \frac{c_2}{r^{\alpha d_W}}\mu(\{y\in E\colon d(y,E^c)<r\})\\
&+c_2\int_{r^{-(d_H+\alpha d_W)}}^{\infty} \mu\big(\{y\in E\colon d(y,E^c)<s^{-(d_H+\alpha d_W)^{-1}}\}\big)s^{-\frac{d_H}{d_H+\alpha d_W}}\, ds.

\end{align*}

Letting $r\to 0^+$, $r^{-(d_H+\alpha d_W)}\to\infty$
and~\eqref{E:local_geom_cond} follows from~\eqref{E:inner_coarea}.
\end{proof}
\subsection{Further results}

For the following result the examples include the finite and infinite Sierpinski gasket (Figure~\ref{fig-sig} and
\cite{BP}) and, more generally, finite and infinite nested fractals,
\cite{Lind,Ba98,Ba03,BaASC}. Other examples can be constructed in the class of p.c.f. self-similar sets,
\cite{KigB,Kig:RFQS}, fractafolds
\cite{Str,ST} and, more generally, finitely ramified cell structures
\cite{T08}. To obtain similar results for fractals that are not finitely ramified,
one can use the methods of
\cite{BB89,BB99,BBKT,KZ,Kajino}.

\begin{theorem}\label{thm-HKE-E-Ec1}
Let $E\subseteq X$ be a measurable set and let $p_t(x,y)$ satisfy the upper heat kernel estimate in~\eqref{eq:subGauss-upper}. If there exists $0<\delta\leqslant d_H$ such that for all $\varepsilon>0$
\begin{equation}\label{E:nbd_estimateU}
(\mu\times\mu)\big(\{(x,y)\in E^c\times E\, :\, d(x,y)<\varepsilon\}\big)
 \leqslant c_7\left(\varepsilon^{d_H+\delta}+\varepsilon^{2d_H }\right),
\end{equation}
then for all $t>0$ it holds that
\begin{equation}\label{eq:PtE-upper}
\left(t^{-\delta/d_{W}}+t^{-{{d_H}}/d_{W}}\right)\| P_t \mathbf{1}_E -\mathbf{1}_E\|_{L^1(X,\mu)} \leqslant c_{11}<\infty,
\end{equation}
where $c_{11}$ is a constant given by~\eqref{eq:PtE-upperc11} that depends on $\delta,d_H$ and $d_W$.
\end{theorem}

\begin{theorem}\label{thm-HKE-E-Ec2}
Let $E\subseteq X$ be a measurable set and let $p_t(x,y)$ satisfy the lower heat kernel estimate in~\eqref{eq:subGauss-upper}. If there exist $\delta>0$ and $\varepsilon>0$ such that
\begin{equation}\label{E:nbd_estimateL}
(\mu\times\mu)\big(\{(x,y)\in E^c\times E\, :\, d(x,y)<\varepsilon\}\big)\geq c_8\varepsilon^{d_H+\delta},
\end{equation}
then, for $t=\varepsilon^{d_W}$, it holds that
\begin{equation}\label{eq:PtE-lower}
t^{-\delta/d_{W}}\| P_t \mathbf{1}_E -\mathbf{1}_E \|_{L^1(X,\mu)} \geqslant 2 c_{5}c_8e^{-c_{6}} >0.
\end{equation}
\end{theorem}
\begin{corollary}
If there exists $\delta>0$ and $\varepsilon_0>0$ such that~\eqref{E:nbd_estimateL} holds for any $0<\varepsilon<\varepsilon_0$, then~\eqref{eq:PtE-lower} holds for any $0<t<\varepsilon^{d_W}$.
\end{corollary}
Localized version of Theorem~\ref{thm-HKE-E-Ec1}.
\begin{theorem}\label{thm-HKE-E-Ec1-ball}
Let $p_t(x,y)$ satisfy the upper heat kernel estimate~\eqref{eq:HKE-non-loc} and let $E\subset B\subset X$ be bounded measurable set. If there exists $0<\delta\leqslant d_H$ such that for all $\varepsilon>0$\begin{equation}\label{E:nbd_estimateU-ball}
(\mu\times\mu)\big(\{(x,y)\in (B\cap E^c)\times E\, :\, d(x,y)<\varepsilon\}\big)\leqslant c_7\varepsilon^{d_H+\delta},
\end{equation}
then for all $t>0$ it holds that
\begin{equation}\label{eq:PtE-upper-ball}
t^{-\delta/d_{W}}\| P_t \mathbf{1}_E -\mathbf{1}_E\|_{L^1(B,\mu)} \leqslant c_{11}<\infty,
\end{equation}
where $c_{11}$ is a constant given by~\eqref{eq:PtE-upperc11-ball} that depends on $\delta,d_H$ and $d_W$.
\end{theorem}
\begin{remark}\mbox{ }
\begin{enumerate}
\item In Theorem~\ref{thm-HKE-E-Ec1}, ${{d_H}} $ controls the behavior of the left hand side in \eqref{E:nbd_estimateU} when $\varepsilon$ is large. For small $t$ the leading term is $t^{-\delta/d_{W}}$.

\item The constant $\delta$ plays the role of the (upper) co-dimension of the boundary and the constant $c_7$ plays the role of the (possibly fractal) upper Minkowski content corresponding to that dimension (see Proposition~\ref{prop-reg-bu}, \cite{Fal03,Mattila}). 	There is an extensive literature on the subject for fractal subsets $E$ of a Euclidean space, such as \cite[and references therein]{ambrosio2017perimeter,WZ13,W15,PW14,RZ12,FK12,LPW11}. 	We note that, although~\cite{BobkovHoudre} does not explicitly refer to the Minkowski content, it appears in the proof of the main theorem as $\mu^+(A)$.
\item In Theorem~\ref{thm-HKE-E-Ec2}	the constant $\delta$ also plays the role of a (lower) co-dimension of the boundary and the constant $c_8$ plays the role of an weaker version of the (possibly fractal)
lower Minkowski content corresponding to that dimension. A useful sufficient condition for \eqref{E:nbd_estimateL} is given in Proposition~\ref{prop-reg-b}.
\item The values of the constant $\delta$ can be different in Theorem~\ref{thm-HKE-E-Ec1} and in Theorem~\ref{thm-HKE-E-Ec2}, so one can speak about an upper-co-dimension $\overline{\delta}$ and about a lower-co-dimension $\underline{\delta}$. In general we have $\overline{\delta}\geqslant\underline{\delta}$, but in most examples we have $\overline{\delta}=\underline{\delta}$.
\end{enumerate}
\end{remark}

\begin{proof}[Proof of Theorem~\ref{thm-HKE-E-Ec1}]
Using the fact thate the semigroup $P_t$ is conservative, we can rewrite
\begin{equation*}\label{eq:PtE-i}
\| P_t \mathbf{1}_E -\mathbf{1}_E \|_{L^1(X,\mu)}= \| \mathbf{1}_{E^c}P_t \mathbf{1}_E \|_{L^1(X,\mu)}+\| \mathbf{1}_E P_t\mathbf{1}_{E^c} \|_{L^1(X,\mu)} =2\| \mathbf{1}_{E^c}P_t \mathbf{1}_E \|_{L^1(X,\mu)}.
\end{equation*}
For any fixed $t>0$, since $p_t(x,y)\geq 0$, we have that
\begin{equation*}\label{E:moti}
\|\mathbf{1}_{E^c} P_t\mathbf{1}_{E}\|_{L^1(X,\mu)}=\int_{E^c}\int_{E}p_t(x,y)\,\mu(dy)\,\mu(dx)=\int_0^\infty\!\!\mu\otimes\mu(\{(x,y)\in E^c\times E\, :\, p_t(x,y)>s\})\,ds.

\end{equation*}
Moreover, in view of~\eqref{eq:subGauss-upper}, $p_t(x,y)>s$ implies
\begin{equation*}
d(x,y)\leq t^{\frac{1}{d_W}}\Big(-c_4^{-1}\log(c_3^{-1}st^{\frac{d_H}{d_W}})\Big)^{\frac{d_W-1}{d_W}}=:F(t,s)
\end{equation*}
and $F(t,s)>0$ if and only if $s<c_5t^{-\frac{d_H}{d_W}}$. Therefore,	we obtain
\begin{equation}\label{e-u-dd'}
\|\mathbf{1}_{E^c} P_t\mathbf{1}_{E}\|_{L^1(X,\mu)} \leq c_7\int_0^{c_3t^{-d_H/d_W}} (F(t,s))^{d_H+\delta}ds+c_7\int_0^{c_3t^{-d_H/d_W}} (F(t,s))^{2d_H }ds.
	\end{equation}
The first integral can be estimated by
\begin{multline*}
c_7\int_0^{c_3t^{-d_H/d_W}} t^{\frac{d_H+\delta}{d_W}}\Big(-c_4^{-1}\log(c_5^{-1}st^{\frac{d_H}{d_W}})\Big)^{\frac{(d_W-1)(d_H+\delta)}{d_W}}ds\\
\leq c_7c_3t^{\frac{\delta}{d_W}}\int_0^1\big(-c_4^{-1}\log u\big)^{\frac{(d_W-1)(d_H+\delta)}{d_W}}du\\
=\ c_7c_3 c_4^{-(d_W-1)(d_H+\delta)/d_W}\Gamma\Big(\frac{(d_W-1)(d_H+\delta)}{d_W}\Big)t^{\frac{\delta}{d_W}},
\end{multline*}
where we have used the substitution $u=c_3^{-1}st^{\frac{d_H}{d_W}}$. A similar estimate is obtained for the second integral in~\eqref{e-u-dd'} by substituting $\delta$ by ${{d_H}}$.	Thus,~\eqref{eq:PtE-upper} holds with
\begin{equation}\label{eq:PtE-upperc11}
c_{11}=2c_3c_7\left\{ \Gamma\left(\tfrac{(d_W-1)(d_H+\delta)}{d_W}\right) c_4^{-\tfrac{(d_W-1)(d_H+\delta)}{d_W}}+
\Gamma\left(\tfrac{(d_W-1)(d_H+{{d_H}})}{d_W}\right) c_4^{-\frac{2(d_W-1)d_H }{d_W}} \right\}.
\end{equation}
\end{proof}

\begin{proof}[Proof of Theorem~\ref{thm-HKE-E-Ec2}]
For each fixed $t>0$, define
\begin{equation}
A_{E,t^{1/d_W}}:=\{(x,y)\in E^c\times E~|~d(x,y)\leq t^{1/d_W}\}.
\end{equation}
Due to the lower estimate~\eqref{eq:subGauss-upper}, $p_t(x,y)\geq c_5 \exp\left(-c_{6}\right)t^{-d_H/d_W}$	for any $(x,y)\in A_{E,t^{1/d_W}}$. Assumption~\eqref{E:nbd_estimateL} now yields
\begin{multline*}
\|\mathbf{1}_{E^c} P_t\mathbf{1}_{E}\|_{L^1(X,\mu)} =\int_{E}\int_{E^c}p_t(x,y)\,\mu(dx)\,\mu(dy)\ge \int_{A_{E,t^{1/d_W}}}p_t(x,y)\,\mu(dx)\,\mu(dy)\\
\geq c_5 e^{-c_{6}} t^{-\frac{d_H}{d_W}}\mu\times\mu (A_{E,t^{1/d_W}})\geq c_5e^{-c_{6}} t^{-\frac{d_H}{d_W}}c_8t^{\frac{(d_H+\delta)}{d_W}}=c_5c_8e^{-c_{6}}t^{\frac{\delta}{d_W}}
\end{multline*}
as we wanted to prove.
\end{proof}

\begin{proof}[Proof of Theorem \ref{thm-HKE-E-Ec1-ball}]
As in Theorem~\ref{thm-HKE-E-Ec1}, it suffices to show $t^{-\delta/d_{W}}\|  \mathbf{1}_{E^c} P_t \mathbf{1}_E \|_{L^1(B,\mu)} \leqslant c_{11}$. Moreover, we have that $p_t(x,y)>s$ implies $d(x,y)<F(t,s)$ as in~\eqref{E:def_F(t,s)} and $F(s,t)>0$ if and only if $s<c_3t^{-d_H/d_W}$. Thus,
\begin{align*}
\|  \mathbf{1}_{E^c} P_t \mathbf{1}_E \|_{L^1(B,\mu)}&=\int_{B\cap E^c}\int_Ep_t(x,y)\,\mu(dy)\,\mu(dx)\\
&=\int_0^\infty\mu\times\mu\big(\{(x,y)\in(B\cap E^c)\times E~|~p_t(x,y)>s\}\big)\,ds\\
&\leq \int_0^\infty\mu\times\mu\big(\{(x,y)\in(B\cap E^c)\times E~|~d(x,y)<F(t,s)\}\big)\,ds\\
&= \int_0^\infty\mu\times\mu\big(\{(x,y)\in E^c\times E~|~d(x,y)\leq\int_0^{c_3t^{-d_H/d_W}}\!\!\min\{F(t,s),d(E,B)\}\}\big)\,ds,
\end{align*}
where $d(E,B):=\sup_{x\in E}\inf_{y\in B}d(x,y)$. Applying~\eqref{E:nbd_estimateU-ball} and estimating the integral as in the proof of Theorem~\ref{thm-HKE-E-Ec1} yields
\begin{align*}
\| \mathbf{1}_{E^c} P_t \mathbf{1}_E \|_{L^1(B,\mu)}

& \leq c_7c_3 t^{\frac{\delta}{d_W}}c_4^{-\frac{(d_W-1)(d_H+\delta)}{d_W}}\Gamma\Big(\frac{(d_W-1)(d_H+\delta)}{d_W}\Big)t^{\frac{\delta}{d_W}}
\end{align*}
and~\eqref{eq:PtE-upper-ball} holds with
\begin{equation}\label{eq:PtE-upperc11-ball}
c_{11}=c_7c_3 c_4^{-\frac{(d_W-1)(d_H+\delta)}{d_W}}\Gamma\Big(\frac{(d_W-1)(d_H+\delta)}{d_W}\Big)t^{\frac{\delta}{d_W}}.
\end{equation}
\end{proof}

We give next a sufficient condition for~\eqref{E:nbd_estimateU} when $X$ is an Ahlfors $d_H$-regular geodesic space.
\begin{proposition}\label{prop-reg-bu}
Let $X$ be Ahlfors $d_H$-regular and geodesic. If $E\subseteq X$ has a compact boundary $\partial E$ and	for any $\varepsilon>0$ the measure of the $\varepsilon$-neighborhood $(\partial E)_\varepsilon$ of $\partial E$ satisfies
\begin{equation}\label{E:nbhd_estimateU-}
\mu((\partial E)_\varepsilon)=O\left(\varepsilon^\delta\right)_{\varepsilon\to0^+}
\end{equation}
then~\eqref{E:nbd_estimateU} holds.
\end{proposition}

\begin{proof}
Since the space $X$ is geodesic, for any $x\in E$ and $y\in E^c$ there exists $z=z(x,y)\in\partial E$ such that $d(x,y)=d(x,z)+d(z,y)$. Therefore $x,y\in\left(\partial E\right)_\varepsilon$ if	$x\in E$, $y\in E^c$ and 	$d(x,y)<\varepsilon$, so that
\begin{align*}
(\mu\otimes\mu)\big(\{(x,y)\in E^c\!\times\! E\, :\, d(x,y)<\varepsilon\}\big)
&= \int_{E^c}\int_{E} \mathbf{1}_{B(x,\varepsilon)}(y) \,\mu(dx)\mu(dy)\\
&\leq\int_{\left(\partial E\right)_\varepsilon}\int_{E} \mathbf{1}_{B(x,\varepsilon)}(y) \, \,\mu(dx)\mu(dy)
\leq \mu\left({\left(\partial E\right)_\varepsilon}\right)c_{2}\varepsilon^{d_H}.
\end{align*}
Due to~\eqref{E:nbhd_estimateU-} and the fact that
\begin{equation*}
\mu((\partial E)_\varepsilon)=O\left(\varepsilon^{d_H}\right)_{\varepsilon\to\infty}
\end{equation*}
because $\partial E$ is compact, the proof is complete.
\end{proof}

Without assuming the underlying space $X$ to be geodesic we can give a sufficient condition ensuring~\eqref{E:nbd_estimateL} which by Theorem~\ref{T:FP_char} provides a lower bound of the $\alpha$-perimeter of the set $E\subseteq X$.
\begin{proposition}\label{prop-reg-b}
Let $X$ be an Ahlfors $d_H$-regular space. Suppose that $E\subseteq X$ has a compact boundary $\partial E$ and
for all $n\geq 1$ there exist $r_n>0$ and $x_1,\ldots, x_n\in\partial E$ such that $B_{n,k}:=B\big(x_k,\frac{r_n}{2}\big)\subseteq X$, $k=1,\ldots, n$, are disjoint and satisfy
\begin{equation}\label{E:Cond_ball}
\mu(B_{n,k}\cap E)\geq c_9r_n^{d_H}\qquad\text{and}\qquad\mu(B_{n,k}\cap E^c)\geq c_{10}r_n^{d_H}
\end{equation}
for all $k=1,\ldots, n$. Furthermore, assume that for some $c_{12}>0$ and $d_H>\dim (\partial E)\geqslant0$ we have
\begin{equation}	\label{E:Cond_n-r_n}
n\geqslant c_{12}\cdot r_n^{-\dim (\partial E)}.
\end{equation}
Then,~\eqref{E:nbd_estimateL} holds with $c_8=c_9c_{10}c_{12}$, $\varepsilon=r_n$ and $\delta=d_H-\dim (\partial E)$.
\end{proposition}

\begin{proof}
Notice that
\begin{equation*}
\bigcup_{X=1}^n \big(B_{n,k}\cap E^c\big)\times \big(B_{n,k}\cap E\big)\subseteq\{(x,y)\in E^c\times E\, :\, d(x,y)<\varepsilon\}.
\end{equation*}
In view of~\eqref{E:Cond_ball} we thus have that
\begin{equation*}
\mu\otimes\mu (\{(x,y)\in E^c\!\times\! E\, :\, d(x,y)<r_n\})
\geq \sum_{k=1}^n \mu\big(B_{n,k}\cap E\big)\mu\big(B_{k,n}\cap E^c\big)\geq n\,c_9 c_{10}\, r_n^{2d_H}.
\end{equation*}
\end{proof}

\begin{remark}
Note that \eqref{E:Cond_ball} means that both $E$ and $E\times E$ are Ahlfors $d_H$-regular.
We do not specifically use what notion of dimension $\dim_H(\partial E)$ of $ \partial E $ is the most appropriate in this proposition, but usually it is the Hausdorff dimension, which in most of examples coincides with the box counting, Minkowski, and fractal self-similarity dimensions (see e.g.\cite[Section 3.1]{Fal03}).

If $\{B_{n,k}\}_{X=1}^n$ is a disjoint cover of $\partial E$ by sets of diameter $r_n$, it follows that $n\sim r_n^{-\dim_B\partial E}$~see e.g.\cite[Section 3.1]{Fal03}, where $\dim_B$ stands for box dimension. Due to the fact that $\dim_H\partial E\leq \dim_B\partial E$, see~\cite[p.46]{Fal03} and $r_n$ is small, we can assume $r_n<1$, hence $n\geq c_{12}r_n^{-\dim_H\partial E}$ and
\begin{equation*}
(\mu\otimes\mu)\big(\{(x,y)\in E^c\!\times\! E\, :\, d(x,y)<r_n\}\big)\geq c_{11} r_n^{2d_H-\dim_H\partial E}=c_{12}r_n^{d_H+\delta}.
\end{equation*}
\end{remark}

\section{Density of $\mathbf{B}^{1,\alpha}(X)$ in $L^1(X,\mu)$ }

A noteworthy application of the results yielding Theorem~\ref{T:FP_char} is that it actually provides sufficient conditions to ensure that $\mathbf{B}^{1,\alpha}(X)$ is dense in $L^1(X,\mu)$.

\begin{theorem}\label{T:L1embedding}
Let $X$ be Ahlfors $d_H$-regular geodesic space with sub-Gaussian upper heat kernel estimate and $\alpha>0$. Assume that there is a family of bounded open sets $E\subset X$ which generates the topology of $X$ and such that
\begin{equation}
\limsup_{r\to 0^+}\frac{1}{r^{\alpha d_W}}\mu\big(\{x\in E~\colon~d(x,E^c)<r\}\big)<\infty
\end{equation}
for some $0<\alpha\leq\frac{d_H}{d_W}$. Then, $\bm{B}^{1,\alpha}(X)$ is dense in $L^1(X,\mu)$.
\end{theorem}
\begin{proof}
By Theorem~\ref{T:FP_char} and Corollary~\ref{C:0P_characterization} respectively, $\mathbf{1}_E\in\bm{B}^{1,\alpha}(X)$ holds for bounded open sets and thus for simple functions. Since these are dense in $L^1(X,\mu)$ the assertion follows.
\end{proof}
\begin{example}\label{Example density gasket}
\begin{enumerate}[itemsep=.5em,label=(\roman*),wide=0em]
\item If $X$ is the infinite Sierpinski gasket as in \cite{BP} (see also Section \ref{examples BE}), a suitable family of open sets consists of (open) triangular cells of any side length. For each such set $E\subset X$, the boundary $\partial E$ consists of three points and $(\partial E)_r^-$ is the union of three triangular cells of side length $r$. Hence, $\mu(\partial E)_r^-=c r^{d_H}$ and Theorem~\ref{T:L1embedding} holds with $\alpha=\frac{d_H}{d_W}$.
\item A similar result as for the Sierpinski gasket can be expected for any nested fractal~\cite{Lind,Ba98}.
\end{enumerate}
\end{example}

\begin{remark}\label{R:density_SC}
When $X$ is the Sierpinski carpet or a similar fractal the situation is more delicate. We mention some points here; a complete answer remains open.
\begin{enumerate}[itemsep=.5em,label=(\roman*),wide=0em]
\item We believe that in this case Theorem~\ref{T:L1embedding} will not be applicable because there may not be such family of open sets. Intuitively and in view of Example~\ref{Ex:1E_SC}, one expects open sets $E\subset X$ to asymptotically fulfill $\mu(\partial E)_r^-\sim r^{d_H-\dim_H\partial E}$. Therefore, only sets of finite (or countable) boundary would produce the critical exponent but these may not generate the topology of $X$. In fact, in the Sierpinski carpet or the Menger sponge, there are no non-empty open sets with non-empty finite boundary \cite{BB99}.
This is true for any generalized Sierpinski carpet in the sense of Barlow and Bass.
\item It may still be true that $\bm{B}^{1,\frac{d_H}{d_W}}(X)$ is dense in $L^1(X,\mu)$, only dense functions will not be generated by indicator functions of a base of open sets.
\end{enumerate}
\end{remark}

\subsection{Examples}\label{Sec:Examples_1E}

Let us now discuss several examples of different nature where the previous results apply. In particular, we can identify sets of finite $\alpha$-perimeter for the corresponding ranges of the parameter $\alpha$.
\begin{example}
[Smooth domains in the $d$-dimensional Euclidean space]
Consider $X=\mathbb{R}^d$, $d_H=d$, $d_W=2$, $\mu=\lambda^d$ the $d$-dimensional Lebesgue measure. A smooth domain $E$ with $\partial E$ closed and $(d-1)$-rectifiable satisfies
\begin{equation}
\limsup_{r\to 0+}\frac{1}{r} \lambda^d((\partial E)_r)= \frac{2\lambda^{d-1}(\partial E)\Gamma\big(\frac{1}{2}\big)^{d-1}}{(d-1)\Gamma\big(\frac{d-1}{2}\big)}
\end{equation}
because the $(d-1)$Minkowski content of $\partial E$ coincides with $\lambda^{d-1}(\partial E)$, see e.g.~\cite[Theorem 3.2.39]{Fed69}. Since $\mathbb{R}^d$ is geodesic, Theorem~\ref{T:FP_char}~\eqref{FP_char4} is satisfied with $\alpha d_W=1$ and hence $\mathbf{1}_E \in \mathbf{B}^{1,1/2}(\mathbb{R}^d)$.
\end{example}

\begin{example}[Rectifiable domains in the $d$-dimensional Euclidean space]
More generally, if $\partial E\subset \mathbb{R}^d$ is closed and $m$-rectifiable, again by~\cite[Theorem 3.2.39]{Fed69} we have
\begin{equation}
\limsup_{r\to 0+}\frac{1}{r^{d-m}} \lambda^d((\partial E)_r)= \frac{2\lambda^{m}(\partial E)\Gamma\big(\frac{1}{2}\big)^m}{m\Gamma\big(\frac{m}{2}\big)}.
\end{equation}
Thus, Theorem~\ref{T:FP_char}~\eqref{FP_char4} is satisfied with $\alpha d_W=d-m$, which is the codimension of $\partial E$ and $\mathbf{1}_E \in \mathbf{B}^{1,\frac{d-m}{2}}(\mathbb{R}^d)$.

For instance, if $E$ is the so-called Koch snowflake domain in $\mathbb R^2$ whose boundary is displayed in Figure~\ref{F:snow}, then $d_H=2$, $d_W=2$ and $m=\frac{\log4}{\log3}$. More precisely, from~\cite[Theorem 1]{LP06} we have the tube formula
\begin{equation}
\lambda^2((\partial E)_r^-)=G_1(r)r^{2-\frac{\log4}{\log3}}+G_2(r)r^2,
\end{equation}
where $G_1,G_2$ are periodic functions.
Thus, in this case

Theorem~\ref{T:FP_char} yields $\mathbf{1}_E\in\bm{B}^{1,\alpha}(X)$ with $\alpha=1-\frac{\log 4}{2\log 3}$.

\begin{figure}[htb]\centering
\includegraphics
{snowflake-c.pdf}
\caption{von Koch snowflake domain.}
\label{F:snow}
\end{figure}
\end{example}

\begin{example}[Subsets of the Sierpinski carpet]\label{Ex:1E_SC}
Consider $X$ to be the Sierpinski carpet built in the standard way on the unit square $[0,1]^2$, so that $d_H=\frac{\log8}{\log3}$ and $d_W=\text{unknown but unique}>2$.
\begin{enumerate}[leftmargin=*]
\item Let $E=X\cap[0,\frac13]^2$ be a sub-square cell in the standard self-similar construction of $X$. Setting $r=3^{-k}$, an inner neighborhood of the boundary consists of $2\cdot 3^k$ copies of a carpet $X_r$ with side length $r$. Thus,
\[
\mu((\partial E)_r^-)=2\cdot 3^{k}\mu(X_r)=2\cdot 3^{k} r^{\frac{\log 8}{\log 3}}=2r^{\frac{\log 8}{\log 3}-1}.
\]
Theorem~\ref{T:FP_char}~\eqref{FP_char4} is satisfied with $\alpha d_W=\frac{\log 8}{\log 3}-1$ and hence $\mathbf{1}_E \in \mathbf{B}^{1,\frac{\delta}{d_W}}(X) $ with $\delta=\frac{\log8}{\log3}-1$.
\item If $E=X\cap\big([0,\frac12]\times[0,1]\big)$ is the left half of the carpet $X$, a similar computation as the previous case yields $\mathbf{1}_E \in \mathbf{B}^{1,\frac{\delta}{d_W}}(X) $ with $\delta=\frac{\log8}{\log3}-\frac{\log2}{\log3}=\frac{2\log2}{\log3} $.
\end{enumerate}
Notice that in each case, the dimension of the boundary of $E$ was $1$ or  $\frac{\log 2}{\log 3}$
respectively, supporting the conjecture from Remark~\ref{R:density_SC}.
\end{example}

\begin{figure}[htb]\centering
\includegraphics[width=.30\textwidth] {sc1.pdf}
\caption{Sierpinski carpet}
\label{fig-SC}
\end{figure}

\begin{example}[Subsets of the Menger sponge]
Let $X$ be the standard Menger sponge on the unit cube $[0,1]^3$. Here, $d_H=\frac{\log20}{\log3}$ and $d_W=\text{unknown but unique}>2$.
\begin{enumerate}[leftmargin=*]
\item For $E=X\cap[0,\frac13]^3$ is a sub-cube cell in the standard self-similar construction of $X$, then $\mathbf{1}_E \in \mathbf{B}^{1,\frac{\delta}{d_W}}(X) $ with $\delta=\frac{\log20}{\log3}-2 $.
\item For the left half of the cubical sponge, $E=X\cap\big([0,\frac12]\times[0,1]^2\big)$, we have $\mathbf{1}_E \in \mathbf{B}^{1,\frac{\delta}{d_W}}(X) $ with $\delta=\frac{\log20}{\log3}-\frac{\log4}{\log3}=\frac{ \log5}{\log3} $.
\end{enumerate}
\end{example}

\section{Weak Bakry-\'Emery curvature condition $BE(\kappa)$}

\begin{definition}
We will say that $(X,\mu,\mathcal{E},\mathcal{F})$ satisfies the weak Bakry-\'Emery non-negative curvature condition $BE(\kappa)$ if there exist a constant $C>0$ and a parameter $0 < \kappa < d_W$ such that for every $t >0$, $g \in L^\infty(X,\mu)$ and $x,y \in X$,
\begin{align}\label{WBECD}
| P_t g (x)-P_tg(y)| \le C \frac{d(x,y)^\kappa}{t^{\kappa/d_W}} \| g \|_{ L^\infty(X,\mu)}.
\end{align}
\end{definition}

Several examples of spaces satisfying the condition $BE(\kappa)$ will be given later. We first observe that the weak Bakry-\'Emery is related to the H\"older regularity of the heat kernel.

\begin{lemma}
Assume that $(X,\mu,\mathcal{E},\mathcal{F})$ satisfies the weak Bakry-\'Emery  condition $BE(\kappa)$. Then, there exist a constant $C>0$ such that for every $t>0$, $x,y,z \in X$,
\[
| p_t(x,z)-p_t(y,z)| \le C \frac{d(x,y)^\kappa}{t^{(\kappa+d_H)/d_W}}
\]
\end{lemma}

\begin{proof}
Indeed, it is easily seen that the weak Bakry-\'Emery estimate is equivalent to:
\[
\int_X | p_t(x,z)-p_t(y,z)| d\mu(z)\le C \frac{d(x,y)^\kappa}{t^{\kappa/d_W}}.
\]
One has then
\begin{align*}
| p_t(x,z)-p_t(y,z)| &=\left| \int_X (p_{t/2}(x,u)-p_{t/2}(y,u)) p_{t/2}(u,z) d\mu(u)\right| \\
 &\le \frac{C}{t^{d_H/d_W}}  \int_X | p_t(x,z)-p_t(y,z)| d\mu(z)
\end{align*}
\end{proof}

Under the weak Bakry-\'Emery curvature condition, the main result is the following. It can be thought as an analogue of Lemma \ref{lem:L1-norm-control} in a situation where we do not necessarily have a carr\'e du champ operator.

\begin{theorem}\label{JKLN}
Assume that the weak Bakry-\'Emery curvature condition \eqref{WBECD} is satisfied. Then, for every $f \in \mathbf{B}^{1,1-\frac{\kappa}{d_W}} (X)$, and $t \ge 0$,
\[
\| P_t f -f \|_{L^1(X,\mu)} \le  C t^{1-\frac{\kappa}{d_W}}  \limsup_{r \to 0} \frac{1}{r^{d_H+d_W-\kappa}}
 \iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y)
\]
\end{theorem}

\begin{proof}
In the proof $C$ will denote a constant (depending only on $\kappa,d_W,d_H$) that may change from line to line.
Let $g \in \mathcal{F}$, $\| g \|_{L^\infty} \le 1$ and $f \in \mathbf{B}^{1,1-\frac{\kappa}{d_W}} (X)$.  We have
\begin{align*}
\left| \int_X  g(f-P_tf) d\mu \right| & =  \left| \int_0^t \int_X  g \frac{\partial P_sf}{\partial s}
d\mu ds \right| = \left| \int_0^t \mathcal{E}(g ,P_s f)  ds \right|.
\end{align*}
The idea is now to bound $\mathcal{E}(g ,P_s f) $ by using an approximation of $\mathcal{E}$.
For  $\tau \in(0,\infty)$ and $u\in L^{2}(X,\mu)$, we set
\begin{equation}\label{eq:energy-pt-Lp}
\mathcal{E}_{\tau}(u.u):=\frac{1}{2\tau}\int_X\int_Xp_{\tau}(x,y)|u(x)-u(y)|^{2}\,d\mu(x)\,d\mu(y).
\end{equation}
Note that  by the symmetry and the conservativeness of $P_{t}$,
\begin{align*}
\mathcal{E}_{\tau}(u,u)&=\frac{1}{2\tau}\int_X\int_Xp_{\tau}(x,y)\bigl(u(x)^{2}-2u(x)u(y)+u(y)^{2}\bigr)\,d\mu(x)\,d\mu(y)\\
&=\frac{1}{2\tau}\Bigl(\langle u,u\rangle-2\langle u,P_{\tau}u\rangle+\langle u,u\rangle\Bigr)\\
&=\frac{1}{\tau}\langle u-P_{\tau}u,u\rangle\xrightarrow{t\downarrow 0}
  \begin{cases}\mathcal{E}(u,u) &\textrm{if $u\in\mathcal{F}$,}\\
    \infty &\textrm{if $u\in L^{2}(X,\mu)\setminus\mathcal{F}$,}\end{cases}
\end{align*}
and in particular that $(0,\infty)\ni \tau \mapsto\mathcal{E}_{\tau}(u,u)$ is non-increasing. We now have
\begin{align*}
|\mathcal{E}_\tau (g ,P_s f) | &=| \mathcal{E}_\tau (P_s g , f)| \\
 &\le \frac{1}{2\tau}\int_X\int_Xp_{\tau}(x,y)|P_s g(x)-P_s g(y)| |f(x)-f(y)| \,d\mu(x)\,d\mu(y) \\
 &\le \frac{C}{2s^{\kappa/d_W} \tau}\int_X\int_Xp_{\tau}(x,y) d(x,y)^\kappa |f(x)-f(y)| \,d\mu(x)\,d\mu(y).
\end{align*}
We can now prove, using the same arguments as in the proof of theorem \ref{Besov characterization} that since $f \in \mathbf{B}^{1,1-\frac{\kappa}{d_W}} (X)$, one has
\begin{align}\label{estimate BE rs}
 & \limsup_{\tau \to 0} \frac{1}{ \tau}\int_X\int_Xp_{\tau}(x,y) d(x,y)^\kappa |f(x)-f(y)| \,d\mu(x)\,d\mu(y)  \\
 \le & C  \limsup_{r \to 0} \frac{1}{r^{d_H+d_W-\kappa}}  \iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y). \notag
\end{align}
As a conclusion we deduce
\begin{align*}
|\mathcal{E}(g ,P_s f)| =\lim_{\tau \to 0 }  |\mathcal{E}_\tau (g ,P_s f)| \le \frac{C}{s^{\kappa/d_W} }  \limsup_{r \to 0} \frac{1}{r^{d_H+d_W-\kappa}}  \iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y).
\end{align*}
Therefore, one has
\begin{align*}
\left| \int_X  g(f-P_tf) d\mu \right| \le C t^{ 1-\frac{\kappa}{d_W} } \limsup_{r \to 0} \frac{1}{r^{d_H+d_W-\kappa}}
\iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y),
\end{align*}
and we conclude by $L^1-L^\infty$ duality.
\end{proof}

We now briefly comment on the significance of the parameter $\kappa$  with two corollaries.  In particular, the following lemma shows that $\kappa$ is a critical parameter in the $L^1$ theory of $X$.

\begin{corollary}
Assume that $BE(\kappa)$ is satisfied. If $f \in \mathbf{B}^{1,\alpha}(X)$ with $\alpha >1-\frac{\kappa}{d_W}$, then $f=0$.
\end{corollary}

\begin{proof}
Let $f \in \mathbf{B}^{1,\alpha}(X)$ with $\alpha >1-\frac{\kappa}{d_W}$. One has then
\[
 \limsup_{r \to 0} \frac{1}{r^{d_H+d_W-\kappa}}  \iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y)=0.
 \]
 Therefore, from the previous theorem, one has for every $t>0$, $\| P_t f -f \|_{L^1(X,\mu)}=0$, which immediately implies $f \in \mathcal{F}$ and $P_t f=f$, $t \ge 0$. The sub-Gaussian heat kernel upper bound implies then $f=0$.

 \end{proof}

\begin{corollary}\label{estimate 45}
One has $\kappa \le \frac{d_W}{2}$ and thus $1-\frac{\kappa}{d_W}\ge \frac{1}{2}$.
\end{corollary}

\begin{proof}
For $f \ge 0$, we have by Cauchy-Schwartz inequality
\begin{align*}
	&\lefteqn{\iint p_t(x,y)\bigl| |f(x)|^2-|f(y)|^2\bigr|\,d\mu(x)\,d\mu(y) } \quad&\\
\le	& \iint p_t(x,y) \bigl( |f(x)|+|f(y)| \bigr)\bigl| |f(x)|-|f(y)|\bigr|\,d\mu(x)\,d\mu(y) \\
\le	& 2 \int |f(x)| P_t(|f-f(x)|)(x)\, d\mu(x)\\
\le	& 2 \|f\|_2 \Bigl( \int  P_t(|f-f(x)|^2) (x) d\mu(x)\Bigr)^{1/2}\\
\le	&\ 2 \|f\|_2 t^\alpha \| f\|_{2,\alpha}
	\end{align*}
so that $\| |f|^2\|_{1,\alpha} \leq 2\|f\|_2 \|f\|_{2,\alpha}$. Hence, if $\alpha=\frac{1}{2}$, one deduces that if $f \in \mathbf{B}^{2,1/2}(X)=\mathcal{F}$, then $f^2 \in \mathbf{B}^{1,1/2}(X)$.  One concludes that $\mathbf{B}^{1,1/2}(X)$ is always non-trivial, so that one must have $1-\frac{\kappa}{d_W}\ge \frac{1}{2}$.
\end{proof}

We will see  that the weak Bakry-\'Emery estimate can be used to improve Sobolev and isoperimetric inequalities.  We show here that it also yields an improvement in Theorem \ref{ahlfors-coarea}.

\begin{theorem}\label{T:BE-ahlfors-coarea}
Let $X$ be Ahlfors $d_H$-regular with sub-Gaussian heat kernel estimates and the $BE(\kappa)$ estimate. Let $u\in L^1(X,\mu)$. For $s \in \mathbb{R}$, denote $E_s(u)=\{ x \in X, u(x)>s\}$. Let $ \alpha =1-\frac{\kappa}{d_W}$ and assume that $s\mapsto \limsup_{r  \to 0^+} \frac{1}{r^{\alpha d_W}} \mu (\{x\in E_s(u)~\colon~d(x,X\setminus E_s(u))<r\})$ is in $L^1 (\R)$. Then, $u \in \mathbf{B}^{1,\alpha}(X) $ and there exists a constant $C>0$ independent from $u$ such that:
\[
\| u \|_{1, \alpha} \le C \int_\R \limsup_{r \to  0^+} \frac{1}{r^{\alpha d_W}} \mu (\{x\in E_s(u)~\colon~d(x,X\setminus E_s(u))<r\}) ds.
\]
In particular, if  for a set $E \subset X$ with finite measure, $\limsup_{r \to  0^+} \frac{1}{r^{\alpha d_W}} \mu (\{x\in E~\colon~d(x,E^c)<r\})<+\infty$, then $\mathbf{1}_E \in \mathbf{B}^{1,\alpha}(X) $ and:
\[
\| \mathbf{1}_E \|_{1, \alpha} \le C \limsup_{r \to  0^+} \frac{1}{r^{\alpha d_W}} \mu (\{x\in E~\colon~d(x,E^c)<r\}) .
\]
\end{theorem}
\begin{proof}
This follows from the proof of Theorem~\ref{ahlfors-coarea} and the statement of Theorem \ref{JKLN}.
\end{proof}

\begin{corollary}
If in addition $X$ is uniformly locally connected, then Theorem~\ref{T:BE-ahlfors-coarea} holds with $\mu((\partial E_s(u))_r^-)$ instead of $\mu(\{x\in E_s(u)~\colon~d(x,X\setminus E_s(u))<r\})$.
\end{corollary}

\section{Examples of spaces satisfying the weak Bakry-\'Emery condition}

\subsection{Unbounded Sierpinski gasket and unbounded Sierpinski carpet}\label{examples BE}

We show here first  that the unbounded Sierpinski gasket $(X, \mathcal E, \mathcal F, \mu)$ considered in \cite{BP} satisfies the weak Bakry-\'Emery estimate.

\begin{theorem}
The unbounded Sierpinski gasket satisfies $BE(\kappa)$ with $\kappa=d_W-d_H$.
\end{theorem}

\begin{proof}
Let $f \in L^\infty(X,\mu)$. From Theorem 5.22 in \cite{BP}, one has for $t >0$ and $\lambda >0$,
\[
| P_t f(x) -P_t f(y) | \le \frac{C}{\lambda^{d_H/d_W}} d(x,y)^{d_W-d_H} \| (L-\lambda)P_t f \|_{L^\infty(X,\mu)},
\]
where $L$ is the generator of $\mathcal{E}$. We now observe that
\[
 | (L-\lambda)P_t f (x)| \le \int_X |\partial_t p(t,x,y)-\lambda p(t,x,y) | d\mu(y) \|f \|_{L^\infty(X,\mu)}.
\]
From the sub-Gaussian upper bound for the heat kernel and its time derivative (see \cite{BP}), one deduces
\[
 \int_X |\partial_t p(t,x,y)-\lambda p(t,x,y) | d\mu(y) \le C \left(\frac{1}{t}+\lambda\right).
\]
Therefore, by choosing $\lambda=1/t$ one concludes:
\[
| P_t f(x) -P_t f(y) | \le C t^{d_H/d_W-1} d(x,y)^{d_W-d_H} \|  f \|_{L^\infty(X,\mu)}.
\]
\end{proof}

In that case, one has therefore $1-\frac{\kappa}{d_W}=\frac{d_H}{d_W}$, so from Theorem \ref{JKLN} the space of interest is $\mathbf{B}^{1,\frac{d_H}{d_W}}(X)$. We note that from Theorem \ref{T:L1embedding}, $\mathbf{B}^{1,\frac{d_H}{d_W}}(X)$ is dense in $L^1(X,\mu)$.

\begin{figure}[htb]\centering
	\includegraphics{SG}
	\caption{A part of an infinite Sierpinski gasket.}\label{fig-sig}
\end{figure}

We now  show   that the unbounded Sierpinski carpet $(X, \mathcal E, \mathcal F, \mu)$ considered in \cite{BB92} satisfies the weak Bakry-\'Emery estimate.

\begin{theorem}
The unbounded Sierpinski carpet satisfies $BE(\kappa)$ with $\kappa=d_W-d_H$.
\end{theorem}

\begin{proof}
The proof is the same as the case of Sierpinski gasket, thanks to \cite[Theorem 4.9 (b)]{BB92} and \cite[Theorem 4 or Corollary 5]{Da97}.
\end{proof}

\subsection{Fractional metric spaces with fractional diffusion}
In~\cite[Section 3]{Ba98} a class of processes called \textit{fractional diffusions} were introduced in the context of fractional metric spaces, which are complete Ahlfors regular metric spaces with the midpoint property, c.f.~\cite[Definition 3.2, Definition 3.5]{Ba98}. In this setting, applying~\cite[Theorem 3.40]{Ba98} and~\cite[Theorem 4 or Corollary 5]{Da97} as in the previous example yields the corresponding weak Bakry-\'Emery estimate.

\begin{theorem}
A fractional metric space of dimension $d_H\geq 1$ and associated fractional diffusion with parameters $2\leq d_W\leq d_H+1$ satisfies $BE(\kappa)$ with $\kappa=d_W-d_H$.
\end{theorem}

\begin{remark}
Notice that nested fractals (\cite{Lind,Ba98}), and in particular the Vicsek set, fall into this category. In the view of the discussion of Sections~\ref{S:critical_exp_local}, we can view the case of the Vicsek set as critical since $\kappa=1$.
Note that the Vicsek set is a dendrite, see \cite{KigamiDendrites}.
\end{remark}

\subsection{Stability of $BE(\kappa)$ by tensorization}

The condition $BE(\kappa)$ is stable by tensorization. This yields a lot of examples.

Consider $(X^n, d_{X^n},\mu^{\otimes n})$, where the metric $ d_{X^n}$ is defined as follows: for any $\mathbf x=(x_1, x_2,\cdots, x_n) \in X^n$ and $\mathbf x'=(x_1', x_2',\cdots, x_n')\in X^n$,
\[
d_{X^n}(\mathbf x, \mathbf x')^{\frac{d_W}{d_W-1}}=\sum_{i=1}^n d_X(x_i,x_i')^{\frac{d_W}{d_W-1}}.
\]
Let $p_t^X(x, y)$ be the heat kernel on $X$. Then the heat kernel on $X^n$ is given by
\[
p_t^{X^n}(\mathbf x, \mathbf y)=p_t^X(x_1, y_1)\cdots p_t^X(x_n, y_n).
\]

\begin{proposition}
 if $X$ satisfies $BE(\kappa)$, then $X^n$ also satisfies $BE(\kappa)$.
\end{proposition}

\begin{proof}
Let $f\in L^{\infty}(X^n, \mu^{\otimes n})$. Then for any $\mathbf x, \mathbf x'\in X^n$, we have
\begin{align*}
\abs{P_t^{X^n} f(\mathbf x)-P_t^{X^n} f(\mathbf x')}
\le &
\abs{P_t^{X^n} f(x_1, x_2,\cdots, x_n)-P_t^{X^n} f(x_1', x_2,\cdots, x_n)}
\\ &+\abs{P_t^{X^n} f(x_1', x_2,\cdots, x_n)-P_t^{X^n} f(x_1', x_2',x_3,\cdots, x_n)}
\\ &+\cdots + \abs{P_t^{X^n} f(x_1', \cdots,x_{n-1}', x_n)-P_t^{X^n} f(x_1', x_2',\cdots, x_n')}.
\end{align*}
Notice that for any $1\le i\le n$, since $X$ satisfies $BE(\kappa)$, then
\begin{align*}
&\abs{P_t^{X^n} f(x_1', \cdots,x_{i-1}',x_{i},\cdots, x_n)-P_t^{X^n} f(x_1', \cdots,x_i',x_{i+1},\cdots, x_n)}
\\ &\le
\abs{P_t^{X}(P_t^{X^{n-1}} f(x_1', \cdots,x_{i-1}',\cdot,x_{i+1},\cdots, x_n))(x_i)-P_t^X(P_t^{X^{n-1}} f(x_1', \cdots,x_{i-1}',\cdot,x_{i+1},\cdots, x_n))(x_i')}
\\ &\le
C \frac{d_X(x_i,x_i')^{\kappa}}{t^{\kappa/d_W}} \left\|P_t^{X^{n-1}} f(x_1', \cdots,x_{i-1}',\cdot,x_{i+1},\cdots, x_n)\right\|_{L^{\infty}(X)}
\\ &\le
C \frac{d_X(x_i,x_i')^{\kappa}}{t^{\kappa/d_W}} \|f\|_{L^{\infty}(X^n)}.

\end{align*}
Hence
\[
\abs{P_t^{X^n} f(\mathbf x)-P_t^{X^n} f(\mathbf x')}
\le C\frac{1}{t^{\kappa/d_W}}  \brak{\sum_{i=1}^n d_X(x_i,x_i')^{\kappa}} \|f\|_{L^{\infty}(X^n)}
\le
C \frac{d_{X^n}(\mathbf x,\mathbf x')^{\kappa}}{t^{\kappa/d_W}} \|f\|_{L^{\infty}(X^n)}.
\]
(The constant $C$ may or may not depend on $n$.)
\end{proof}

\section{Continuity of the heat semigroup in the Besov spaces: the case $p \ge 2$}

In this section, we study the continuity of the heat semigroup in the Besov spaces in the range $p \ge 2$. This complements the results of Chapter 1, under the additional weak Bakry-\'Emery estimate assumption. For the sake of clarity, in the statements in this paragraph the assumptions on the underlying space $X$ are explicitly written. Throughout this section, let $X$ be an Ahlfors $d_H$-regular space that satisfies sub-Gaussian heat kernel estimates and $BE(\kappa)$ with $0<\kappa\leq \frac{d_W}{2}$.

\begin{theorem}\label{P:PtinBesovp}
 For any $p\geq 2$, there exists a constant $C>0$ such that for every $t>0$ and $f\in L^2(X,\mu)\cap L^\infty(X,\mu)$
\begin{equation*}
\|P_tf\|^p_{p,\kappa/d_W}\leq \frac{C}{t^{\frac{\kappa p}{d_W}}}\| f\|_{L^2(X,\mu)}^2  \| f \|^{p-2}_{L^\infty(X,\mu)}.
\end{equation*}
 In particular, for $t>0$, $P_tf\in\bm{B}^{p,\frac{\kappa}{d_W}}(X)$.
\end{theorem}

\begin{proof}
First, note that $P_tf\in L^p(X,\mu)\cap \mathcal{F}$ for any $p\geq 2$. In order to prove that $\|P_t f\|_{p,\kappa/d_W}$ is finite, we proceed as in the proof of Theorem~\ref{Besov characterization} and consider, for any $s,r>0$,
\begin{align*}
&A(s,r):=\int_X\int_{X\setminus B(y,r)}p_s(x,y)|P_tf(x)-P_tf(y)|^p\mu(dx)\mu(dy),\\
&B(s,r):=\int_X\int_{X(y,r)}p_s(x,y)|P_tf(x)-P_tf(y)|^p\mu(dx)\mu(dy).
\end{align*}
In what follows, $C$ will denote a positive constant that may change from line to line.
On the one hand, from the proof of Theorem \ref{Besov characterization} we know that the upper bound on the heat kernel implies
\begin{equation*}
A(s,r)\leq c_8\exp\Big(\!\!-c_9\Big(\frac{r^{d_W}}{s}\Big)^{\frac{1}{d_W-1}}\Big)\|P_tf\|_{L^p(X,\mu)}^p.
\end{equation*}
On the other hand, the aforementioned proof also yields
\begin{multline*}
B(s,r)\leq c_3\sum_{n=1}^\infty\frac{(2^{1-n}r)^{p\kappa+d_H}}{s^{d_H/d_W}} \exp\Big(\!\!-c_9\Big(\frac{(2^{1-n}r)^{d_W}}{s}\Big)^{\frac{1}{d_W-1}}\Big)\\
\times\frac{1}{(2^{1-n}r)^{p\kappa+d_H}}\int_X\int_{B(y,2^{1-n}r)}|P_tf(x)-P_tf(y)|^p\mu(dy)\mu(dx).
\end{multline*}
Writing $|P_tf(x)-P_tf(y)|^p=|P_tf(x)-P_tf(y)|^{p-2}|P_tf(x)-P_tf(y)|^2$ and applying $BE(\kappa)$ to the first factor we obtain
\begin{align*}
B(s,r)\leq &\frac{C\| f \|_\infty^{p-2}}{t^{\kappa(p-2)/d_W}}\sum_{n=1}^\infty\frac{(2^{1-n}r)^{p\kappa+d_H}}{s^{d_H/d_W}} \exp\Big(\!\!-c_9\Big(\frac{(2^{1-n}r)^{d_W}}{s}\Big)^{\frac{1}{d_W-1}}\Big)\\
&\times\frac{1}{(2^{1-n}r)^{2\kappa+d_H}}\int_{\{(x,y)\in X\times X\,\colon\,d(x,y)<2^{1-n}r\}}|P_tf(x)-P_tf(y)|^2\mu(dy)\mu(dx)\\
\leq &\frac{C\| f \|_\infty^{p-2} s^{p\kappa/d_W}}{t^{\kappa(p-2)/d_W}}\sup_{\tilde{s}\in (0,r]}\!\!\big(N_2^\kappa(P_tf,\tilde{s})\big)^2\sum_{n=1}^\infty\Big(\frac{(2^{1-n}r)^{d_W}}{s}\Big)^{\frac{p\kappa+d_H}{d_W}} \!\!\exp\Big(\!\!-c_9\Big(\frac{(2^{1-n}r)^{d_W}}{s}\Big)^{\frac{1}{d_W-1}}\Big)\\
\leq &\frac{C\| f \|_\infty^{p-2}}{t^{\kappa(p-2)/d_W}}s^{p\kappa/d_W}\|P_t f\|_{2,\kappa/d_W}^2,
\end{align*}
where the last inequality follows from the proof of the lower bound in Theorem \ref{Besov characterization}. We have thus proved that for any $r>0$
\begin{multline*}
s^{-p\kappa/d_W}\int_X\int_X p_s(x,y)|P_tf(x)-P_tf(y)|^p\mu(dx)\mu(dy)\\
\leq c_8s^{-p\kappa/d_W}\exp\Big(\!\!-c_9\Big(\frac{r^{d_W}}{s}\Big)^{\frac{1}{d_W-1}}\Big)\|P_tf\|_{L^p(X,\mu)}^p+\frac{C\| f \|_\infty^{p-2}}{t^{\kappa(p-2)/d_W}}\|P_t f\|_{2,\kappa/d_W}^2.
\end{multline*}
This yields
\begin{align*}
 & \sup_{s>0}s^{-p\kappa/d_W}\int_X\int_X p_s(x,y)|P_tf(x)-P_tf(y)|^p\mu(dx)\mu(dy)\\
&\qquad\qquad\qquad\qquad \le \frac{C}{r^{p\kappa}}\|P_tf\|_{L^p(X,\mu)}^p+\frac{C\| f \|_\infty^{p-2}}{t^{\kappa(p-2)/d_W}}\|P_t f\|_{2,\kappa/d_W}^2
\end{align*}
and letting $r\to\infty$ we obtain
\begin{equation*}
\|P_tf\|^p_{p,\kappa/d_W}\leq\frac{C\| f \|_\infty^{p-2}}{t^{\kappa(p-2)/d_W}}\|P_t f\|_{2,\kappa/d_W}^2.
\end{equation*}
We now find an upper bound for $\|P_t f\|_{2,\kappa/d_W}$. From Lemma \ref{Lemma limsup debut}, one has for $t>0$
\begin{align*}
\| P_t f \|_{2,\kappa/d_W} &\le \frac{2}{t^{\kappa/d_W}} \| P_t f \|_{L^2(X,\mu)} +\sup_{s\in (0,t]} s^{-\kappa/d_W} \left( \int_X P_s (|P_tf-P_tf(y)|^2)(y) d\mu(y) \right)^{1/2} \\
 &\le \frac{2}{t^{\kappa/d_W}} \| f \|_{L^2(X,\mu)} +t^{\frac{1}{2} -\frac{\kappa}{d_W}} \sup_{s\in (0,t]} s^{-1/2} \left( \int_X P_s (|P_tf-P_tf(y)|^2)(y) d\mu(y) \right)^{1/2}.
\end{align*}
We now note that from spectral theory,
\[
\sup_{s\in (0,t]} s^{-1/2} \left( \int_X P_s (|P_tf-P_tf(y)|^2)(y) d\mu(y) \right)^{1/2}\le C \sqrt{ \mathcal{E}(P_t f,P_t f)}\le \frac{C}{t^{1/2}} \| f \|_{L^2(X,\mu)}
\]
and the proof is complete.
\end{proof}

We first point out two corollaries.

\begin{corollary}\label{P:PtinBesovp2}
For any $p\geq 2$, there exists a constant $C>0$ such that for every $t>0$ and $f\in L^2(X,\mu)$
\begin{equation*}
\|P_tf\|^p_{p,\kappa/d_W}\leq \frac{C}{t^{\frac{\kappa p}{d_W} + \frac{(p-2)d_H}{2d_W}}}\| f\|_{L^2(X,\mu)}^p .
\end{equation*}
 In particular, for $t>0$, $P_t: L^2(X,\mu) \to \bm{B}^{p,\frac{\kappa}{d_W}}(X)$ is bounded for every $p \ge 2$.
\end{corollary}

\begin{proof}
From the heat kernel upper bound, we have that $P_t :L^2(X,\mu) \to L^\infty(X,\mu) $ is continuous with
\[
\|P_t f \|_{L^\infty(X,\mu) } \le \frac{C}{t^ \frac{d_H}{2d_W}} \|f \|_{L^2(X,\mu) }.
\]
The result then easily follows from the theorem \ref{P:PtinBesovp} applied to $P_t f$ instead of $f$.
\end{proof}

Since $P_t$ is also bounded from $ L^2(X,\mu) \to \bm{B}^{1,\frac{1}{2}}(X)=\mathcal{F}$,   by using the interpolation inequalities in proposition \ref{interpolation inequality}, one obtains:

\begin{corollary}\label{P:PtinBesovp3}
For any $p\geq 2, t>0$,  $P_t: L^2(X,\mu) \to \bm{B}^{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}(X)$ is bounded. More precisely,
\[
\| P_t f \|_{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}  \le  \frac{C}{t^{ \left(1-\frac{2}{p}\right) \left(\frac{\kappa }{d_W} +\frac{d_H}{2d_W} \right)+\frac{1}{p}}}\| f\|_{L^2(X,\mu)}.
\]
\end{corollary}

\begin{proof}
Let $p \ge 2$ and $q \ge p$. By applying  proposition \ref{interpolation inequality} with
\[
\theta=\frac{\frac{1}{2} -\frac{1}{p}}{\frac{1}{2} -\frac{1}{q}}
\]
and
\[
\alpha=\theta \frac{\kappa}{d_W} +\frac{1}{2} \left( 1- \theta \right),
\]
we get
\[
\| P_t f \|_{p,\alpha} \le \| P_t f \|^\theta_{q, \kappa /d_W}  \|P_t f \|^{1-\theta}_{2,1/2}.
\]
Now, from corollary \ref{P:PtinBesovp2},
\[
\| P_t f \|_{q, \kappa /d_W} \le  \frac{C}{t^{\frac{\kappa }{d_W} + \frac{(q-2)d_H}{2qd_W}}}\| f\|_{L^2(X,\mu)},
\]
and from spectral theory
\[
\| P_t f \|_{2,1/2} \le \frac{C}{\sqrt{t}} \| f\|_{L^2(X,\mu)}.
\]
One deduces
\[
\| P_t f \|_{p,\alpha}  \le  \frac{C}{t^{\theta \left(\frac{\kappa }{d_W} + \frac{(q-2)d_H}{2qd_W}\right)+\frac{1-\theta}{2}}}\| f\|_{L^2(X,\mu)}.
\]
By letting $q \to +\infty$, one has , $\theta \to 1-\frac{2}{p}$ and $\alpha \to \left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}$. It follows therefore
\[
\| P_t f \|_{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}  \le  \frac{C}{t^{ \left(1-\frac{2}{p}\right) \left(\frac{\kappa }{d_W} + \frac{d_H}{2d_W}\right)+\frac{1}{p}}}\| f\|_{L^2(X,\mu)}.
\]
\end{proof}

Finally, for $p \ge 2$ we now prove the boundedness of $P_t:
L^p(X,\mu)\to \bm{B}^{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}(X)$.

\begin{theorem}\label{P:PtinBesovp4}
For any $p\geq 2$, there exists a constant $C>0$ such that for every $t>0$ and $f\in L^p(X,\mu)$
\[
\| P_t f \|_{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}  \le  \frac{C}{t^{ \left(1-\frac{2}{p}\right)  \frac{\kappa }{d_W} +\frac{1}{p}}}\| f\|_{L^p(X,\mu)}.
\]
 In particular, for $t>0$, $P_t: L^p(X,\mu) \to \bm{B}^{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}(X)$ is bounded.
\end{theorem}

\begin{proof}
As usual, in the sequel, $C$ is a constant that may change from line to line.
 From theorem \ref{P:PtinBesovp}, for any $q\geq 2$, there exists a constant $C>0$ such that for every $t>0$ and $f\in L^2(X,\mu)\cap L^\infty(X,\mu)$
\begin{equation*}
\|P_tf\|^q_{q,\kappa/d_W}\leq \frac{C}{t^{\frac{\kappa q}{d_W}}}\| f\|_{L^2(X,\mu)}^2  \| f \|^{q-2}_{L^\infty(X,\mu)}.
\end{equation*}
From the heat kernel upper bound, we have that $P_t :L^q(X,\mu) \to L^\infty(X,\mu) $ is continuous with
\[
\|P_t f \|_{L^\infty(X,\mu) } \le \frac{C}{t^ \frac{d_H}{qd_W}} \|f \|_{L^q(X,\mu) }.
\]
Therefore, one deduces that exists a constant $C>0$ such that for every $t>0$ and $f\in L^2(X,\mu)\cap L^q(X,\mu)$
\begin{equation*}
\|P_tf\|^q_{q,\kappa/d_W}\leq \frac{C}{t^{\frac{\kappa q}{d_W}+\frac{(q-2)d_H}{qd_W}}}  \| f\|_{L^2(X,\mu)}^2 \| f \|^{q-2}_{L^q(X,\mu)}.
\end{equation*}
If $A \subset X$ is a set of finite measure, one deduces that
\begin{equation*}
\|P_t(f\mathbf{1}_A) \|^q_{q,\kappa/d_W}\leq \frac{C\mu(A)^{ 1-\frac{1}{2q}}}{t^{\frac{\kappa q}{d_W}+\frac{(q-2)d_H}{qd_W}}}   \| f \|^{q}_{L^q(A,\mu)}.
\end{equation*}
Thus, for every $f \in L^q(A,\mu)$,
\[
\|P_t(f\mathbf{1}_A) \|_{q,\kappa/d_W}\leq \frac{C \mu(A)^{ \frac{1}{q}-\frac{1}{2q^2}}}{t^{\frac{\kappa }{d_W}+\frac{(q-2)d_H}{q^2d_W}}}   \| f \|_{L^q(A,\mu)}.
\]
On the other hand,  for every $f \in L^2(A,\mu)$
\[
\| P_t (f\mathbf{1}_A) \|_{2,1/2} \le \frac{C}{\sqrt{t}} \| f\|_{L^2(A,\mu)}.
\]
Let now $2 \le p \le q$ and
\[
\theta=\frac{\frac{1}{2} -\frac{1}{p}}{\frac{1}{2} -\frac{1}{q}}
\]
and
\[
\alpha=\theta \frac{\kappa}{d_W} +\frac{1}{2} \left( 1- \theta \right).
\]

From the Riesz-Thorin interpolation theorem one deduces that  for every $f \in L^p(A,\mu)$
\[
\| P_t (f\mathbf{1}_A) \|_{p,\alpha} \le \frac{C \mu(A)^{ \frac{\theta}{q}-\frac{\theta}{2q^2}}}{t^{\theta \left(\frac{\kappa }{d_W} + \frac{(q-2)d_H}{q^2d_W}\right)+\frac{1-\theta}{2}}}\| f\|_{L^p(A,\mu)}.
\]
As before, by letting $q \to +\infty$, one has , $\theta \to 1-\frac{2}{p}$ and $\alpha \to \left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}$. One deduces that there exists a constant $C>0$ (independent from $A$) such that for every $t>0$ and $f\in L^p(X,\mu)$
\[
\| P_t (f\mathbf{1}_A) \|_{p,\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}}  \le  \frac{C}{t^{ \left(1-\frac{2}{p}\right)  \frac{\kappa }{d_W} +\frac{1}{p}}}\| f\|_{L^p(A,\mu)}\le  \frac{C}{t^{ \left(1-\frac{2}{p}\right)  \frac{\kappa }{d_W} +\frac{1}{p}}}\| f\|_{L^p(X,\mu)}.
\]
The conclusion easily follows since $A$ is arbitrary.
\end{proof}

We finish the section with two interesting consequence of the Besov continuity of the semigroup.

\begin{proposition}
Let $L$ be the generator of $\mathcal{E}$, $p \ge 2$. Denote
\[
\alpha^*_p =\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}.
\]
and $\mathcal{L}_p$ be the domain of $L$ in $L^p(X,\mu)$. Then
\[
\mathcal{L}_p \subset \B^{p,\alpha_p^*}(X)
\]
and for every $f \in \mathcal{L}_p$,
\begin{equation}\label{eq:multi2}
\|f\|_{p,\alpha_p^*} \le C \norm{ Lf}^{\alpha_p^*}_{L^p(X,\mu)} \| f\|^{1-\alpha_p^*}_{L^p(X,\mu)}.
\end{equation}
\end{proposition}

\begin{proof}
For $\lambda >0$, write
\[
R_{\lambda}f=(L-\lambda)^{-1} f=\int_0^{\infty} e^{-\lambda t} P_tf dt.
\]
We have then
\[
\|R_{\lambda}f\|_{p,\alpha_p^*} \le \int_0^{\infty} e^{-\lambda t} \|P_tf\|_{p,\alpha_p^*}  dt
\le \int_0^{\infty} e^{-\lambda t}  \frac{C}{t^{\,\alpha_p^*}} \|f\|_{p}  dt\le C \lambda^{\alpha^*-1} \|f\|_p.
\]
It follows that
\[
\|f\|_{p,\alpha_p^*} \le C  \lambda^{\,\alpha^*-1} \norm{(L-\lambda)f}_p  \le C ( \lambda^{\,\alpha^*-1} \|Lf\|_p+ \lambda^{\,\alpha^*} \|f\|_p).
\]
Taking $\lambda=\|Lf\|_p \|f\|_p^{\,-1}$, we then get the conclusion.

\end{proof}

For $p \ge 1$, we denote:

\[
\alpha^*_p =\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}.
\]
We have then the following theorem that complements Theorem \ref{Critical bound Chapter 1} of Chapter 1.
\begin{theorem}\label{JKLNM}
Let $1 \le p \le 2$. For every $f \in \mathbf{B}^{p,\alpha_p^*} (X)$, and $t \ge 0$,
\[
\| P_t f -f \|_{L^p(X,\mu)} \le  C t^{\alpha^*_p}  \limsup_{r \to 0} \frac{1}{r^{d_H+d_W\alpha_p^* }}
\left( \iint_{\Delta_r}|f(x)-f(y)|^p\,d\mu(x)\,d\mu(y)\right)^{1/p}
\]
\end{theorem}

\begin{proof}
With Theorem \ref{P:PtinBesovp4}  in hands, the proof is similar to that of Theorem \ref{Critical bound Chapter 1} .
\end{proof}

\section{Critical exponents and generalized Riesz transforms}\label{S:critical_exp_local}

Let $X$ be an Ahlfors $d_H$-regular space that satisfies sub-Gaussian  heat kernel estimates and $BE(\kappa)$ with $0<\kappa\leq \frac{d_W}{2}$.
For $p \ge 1$, we denote in this section:

\[
\alpha^*_p(X) =\inf \left\{ \alpha >0\, :\, \B^{p,\alpha}(X) \text{ is trivial} \right\}.
\]

\begin{theorem}
The following inequalities hold:
\begin{itemize}
\item For $1 \le p \le 2$, $$ \frac{1}{2} \le  \alpha^*_p(X) \le \left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}.$$
\item For $ p \ge 2$, $$ \left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p} \le  \alpha^*_p(X)  \le \frac{1}{2} .$$
\end{itemize}

\end{theorem}

\begin{proof}
Let $p \ge 2$. Let $\beta_p=\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}$. Thanks, to Theorem \ref{P:PtinBesovp4}, $ \B^{p,\beta_p}(X)$ is dense in $L^p(X,\mu)$, because for $f \in L^p(X,\mu)$, $P_tf \in  \B^{p,\beta_p}(X)$ and $P_t f \to f$ when $t \to 0$. Next, we prove that for $\alpha > \beta_p$, and $1 \le p \le 2 $,   $\B^{p,\alpha}(X)$  is trivial, which is a consequence of Theorem \ref{JKLNM} since for $f \in \B^{p,\alpha}(X)$  one has then
\[
\limsup_{r \to 0} \frac{1}{r^{d_H+d_W\beta_p }}
\left( \iint_{\Delta_r}|f(x)-f(y)|^p\,d\mu(x)\,d\mu(y)\right)^{1/p}=0
\]
and thus $P_t f =f$, $t \ge 0$.

\end{proof}

\begin{remark}\label{crticical gasket}
Note that for the unbounded Sierpinski gasket, from previous results (see Example  \ref{Example density gasket}), one has
\[
\alpha_1^*(X)=\frac{d_H}{d_W}.
\]
\end{remark}

It is natural to conjecture that if $X$ is an Ahlfors $d_H$-regular space that satisfies sub-Gaussian  heat kernel estimates and $BE(\kappa)$ with $0<\kappa\leq \frac{d_W}{2}$, under possible additional conditions, we may actually always have
\[
\alpha^*_p(X) =\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}, \quad p \ge 1.
\]
This is will be the object of a further study. We however briefly comment on this problem and its connection to a natural notion of Riesz transform.

For $p>1$, $\alpha \in (0,1]$ let us say that $X$ satisfies $(R_{p,\alpha})$ if there exists a constant $C=C_{p,\alpha}$ such that
\[
\| f \|_{p,\alpha} \le C \| (-L)^{\alpha} f \|_{L^p(X,\mu)},
\]
where $f$ is in the proper domain. For instance, in the strictly local framework of Chapter 4, under the strong Bakry-\'Emery curvature condition, $\| f \|^p_{p,1/2} \sim \int_X \Gamma(f)^{p/2} d\mu$ and $(R_{p,1/2})$ is therefore equivalent to boundedness of the Riesz transform in $L^p(X,\mu)$.

One has then the following:

\begin{lemma}
 Assume that for every $1<p \le 2$, $(R_{p,\beta_b})$ is satisfied with $\beta_p=\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}$.  Then for every $p \ge 1$,
\[
\alpha^*_p(X) =\left(1-\frac{2}{p}\right)\frac{\kappa}{d_W}+\frac{1}{p}.
\]
\end{lemma}

\begin{proof}
By analyticity of the semigroup, one has then for every $f \in L^p(X,\mu)$, $1 < p\le 2$,
\[
\| P_t f \|_{p,\beta_p} \le C \| (-L)^{\beta_p} P_tf \|_{L^p(X,\mu)} \le \frac{C}{t^{\beta_p}} \| f \|_{L^p(X,\mu)}.
\]
Therefore,  for $t>0$, $P_t: L^p(X,\mu) \to \bm{B}^{p,\beta_p}(X)$ is bounded. In particular, $\bm{B}^{p,\beta_p}(X)$ is dense in $L^p(X,\mu)$ and we can argue as before. Details are omitted.
\end{proof}

\section{Sets of finite perimeter}

\begin{definition}
Let $X$ be an Ahlfors $d_H$-regular space that satisfies sub-Gaussian  heat kernel estimates and $BE(\kappa)$ with $0<\kappa\leq \frac{d_W}{2}$. A set $E \subset X$ is said to be of finite perimeter if $\mathbf{1}_E \in \mathbf{B}^{1-\frac{\kappa}{d_W}}(X)$.
\end{definition}

An important property of sets of finite perimeter is the following:
\begin{theorem}
There exist constants $c,C>0$ such that for every set $E \subset X$ of finite perimeter,
\begin{align*}
 & c \sup_{r>0} \frac{1}{r^{d_W-\kappa+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\, d(x,y) < r\right\}  \\
 \le &  \| \mathbf{1}_E \|_{1,\alpha} \le C \limsup_{r \to 0^+} \frac{1}{r^{ d_W-\kappa+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\,
 d(x,y) < r\right\};
 \end{align*}
\end{theorem}

\begin{proof}
This is a consequence of Theorem \ref{Besov characterization} and Theorem \ref{JKLN} applied to $\mathbf{1}_E$.
\end{proof}
\begin{remark}
In the previous theorem, note that
\[
\limsup_{r \to 0} \frac{1}{r^{ d_W-\kappa+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\, d(x,y) \le r\right\} \le C \limsup_{r \to 0} \frac{1}{r^{d_W-\kappa}} \mu ((\partial E)_r),
\]
where, as everywhere in the section, $(\partial E)_r$ denotes the $r$-neighborhood of $\partial E$.
\end{remark}

\section{Sobolev and isoperimetric inequalities}

Combining the results of Part I, Chapter 2,  with the results of this chapter, one immediately obtains the following corollaries. The proofs are similar to the ones in Section  \ref{section Sobolev local}, so will be omitted for concision.

\begin{corollary}
Let $(X,\mu,\mathcal{E},\mathcal{F})$ be a symmetric Dirichlet space with sub-Gaussian heat kernel estimates. Then, one has the following weak type Besov space embedding. Let $0<\delta < d_H $. Let $1 \le p < \frac{d_H}{\delta} $.   There exists a constant $C_{p,\delta} >0$ such that for every $f \in \mathbf{B}^{p,\delta/d_W}(X) $,
\[
\sup_{s \ge 0} s \mu \left( \{ x \in X\, :\, | f(x) | \ge s \} \right)^{\frac{1}{q}}
\le C_{p,\delta} \sup_{r>0} \frac{1}{r^{\delta+d_{H}/p}}
\biggl(\iint_{\Delta_r}|f(x)-f(y)|^{p}\,d\mu(x)\,d\mu(y)\biggr)^{1/p}
\]
where $q=\frac{p d_H}{ d_H -p \delta}$. Furthermore, for every $0<\delta <d_H $, there exists a constant $C_{\emph{iso},\delta}$ such that for every measurable $E \subset X$, $\mu(E) <+\infty$,
\begin{align}\label{isoperimetric intro2}
\mu(E)^{\frac{d_H-\delta}{d_H}}
 \le C_{\emph{iso},\delta} \sup_{r>0} \frac{1}{r^{\delta+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\, d(x,y) \le r\right\}
\end{align}
\end{corollary}

In the previous corollary, when $p=1$ (the most interesting for isoperimetry), one may replace the $\sup$ by the $\limsup$ provided that the weak Bakry-\'Emery curvature condition is satisfied.

\begin{corollary}
Let $(X,\mu,\mathcal{E},\mathcal{F})$ be a symmetric Dirichlet space with sub-Gaussian heat kernel estimates that satisfies the weak Bakry-\'Emery curvature condition  \eqref{WBECD} with a parameter $\kappa$ such that $d_W-d_H<\kappa <d_W $ . Let $\delta=d_W-\kappa $. There exists a constant $C_{1,\delta} >0$ such that for every $f \in \mathbf{B}^{1,\delta/d_W}(X) $,
\[
\sup_{s \ge 0} s \mu \left( \{ x \in X, | f(x) | \ge s \} \right)^{\frac{1}{q}} \le C_{p,\delta} \limsup_{r>0} \frac{1}{r^{\delta+d_{H}}}
\iint_{\Delta_r}|f(x)-f(y)|\,d\mu(x)\,d\mu(y)
\]
where $q=\frac{p d_H}{ d_H - \delta}$.
Furthermore, there exists a constant $C_{\emph{iso},\delta}$ such that for every measurable $E \subset X$, $\mu(E) <+\infty$,
\begin{align}\label{isoperimetric intro2}
\mu(E)^{\frac{d_H-\delta}{d_H}} \le C_{\emph{iso},\delta} \limsup_{r \to 0} \frac{1}{r^{\delta+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\, d(x,y) \le r\right\}.
\end{align}
\end{corollary}

\begin{remark}
In the limiting case $\kappa=d_W-d_H$ (like the unbounded Sierpinski gasket), one has the following result. There exists a constant $C_{\emph{iso}}>0$ such that for every measurable $E \subset X$, $0<\mu(E) <+\infty$,
\begin{align}\label{isoperimetric intro3}
 \limsup_{r \to 0} \frac{1}{r^{2d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\, d(x,y) \le r\right\} \ge C_{\emph{iso}} ,
\end{align}

\end{remark}

\begin{remark}
In the previous theorem, if $E\subseteq X$ has a compact topological boundary $\partial E$
\[
\limsup_{r \to 0} \frac{1}{r^{\delta+d_{H}}} (\mu \otimes \mu) \left\{ (x,y) \in E \times E^c\, :\,
d(x,y) \le r\right\} \le C \limsup_{r \to 0} \frac{1}{r^{\delta}} \mu ((\partial E)_r),
\]
where $(\partial E)_r$ denotes the $r$-neighborhood of $\partial E$.
\end{remark}


TITLE: Biconditional Statement
QUESTION [0 upvotes]: Upon reading my textbook it gives a definition for a biconditional statement as the following:

Given statement variables $p$ and $q$, the biconditional of $p$ and $q$ is "$p$ if, and only if, $q$ and is denoted $p \leftrightarrow q$.

It then mentions that:

It is true if both $p$ and $q$ have the same truth values and is false if $p$ and $q$ have opposite truth values. The words...

My question is, from the second part of the definition, is it talking about if $p$ is equal to true and $q$ is equal to true then the outcome will be true? Likewise if both are false, the outcome will be true? Also, if that is the case, is it saying that the rest, i.e. $p$ being true or false and $q$ being its opposite, the outcome will always be false?

REPLY [2 votes]: Yes, your interpretation is correct.  Here is the truth table for the biconditional:
$$\begin{array}{c|c|c}
p & q & p\iff q \\\hline
T & T & T\\\hline
T & F & F \\\hline
F & T & F \\\hline
F & F & T
\end{array}$$

REPLY [1 votes]: You are right. See the following truth table:

REPLY [0 votes]: The biconditional "p if and only if q" can be read as "p implies q AND q implies p". In this way analyzing a biconditional reduces to analyzing two implications.


TITLE: Linear regression property
QUESTION [1 upvotes]: Suppose that I have the following model:

$y_i = \beta_0 + \beta_1 x_{1i} + \beta_2 x_{2i} + u_i$

where $\hat{\beta_k}$, k=0,1,2 ,  are estimated by the method of least squares, using a sample of size n.

How can I show that if $z_i =a_0 + a_1 x_{1i} + a_2 x_{2i} $, where $a_k$ are constants, then:
$\sum_{i=1}^n z_i(y_i-\hat{\beta_0} - \hat{\beta_1} x_{1i} - \hat{\beta_2} x_{2i})=0$
  ?

My attempt was to try to expand and compare to the first order condition: $\sum_{i=1}^n (y_i-\hat{\beta_0} - \hat{\beta_1} x_{1i} - \hat{\beta_2} x_{2i})=0$, but things got messy and lead to nowhere.

REPLY [1 votes]: You are minimizing the following function
$$
\arg \min S(\beta)=\arg\min\sum ( y_i - \beta_0 - \beta_1x_{1i} - \beta_2x_{2i} ) ^2
$$
From the F.O.C you have the following equation
$$
\sum(y_i - \hat{\beta}- \hat{\beta}_1x_{1i}-\hat{\beta}_2x_{2i})=0
$$
$$
\sum x_{1i}(y_i - \hat{\beta}- \hat{\beta}_1 x_{1i}-\hat{\beta}_2x_{2i})=0
$$
$$
\sum x_{2i}(y_i - \hat{\beta}- \hat{\beta}_1x_{1i}-\hat{\beta}_2 x_{2i})=0
$$,
now, multiple eq. (1) by $\alpha_0$, eq. (2) by $\alpha_1$ and eq. (3) by $\alpha_3$ and add them up
$$
\sum(\alpha_0 + \alpha_{1}x_{1i} + \alpha_2 x_{2i})(y_i - \hat{\beta}- \hat{\beta}_1 x_{1i}-\hat{\beta}_2 x_{2i})=0 .
$$