%% ---- preamble.tex ---- \documentclass[11pt,letterpaper]{article} \usepackage{iftex} \ifPDFTeX \usepackage[T1]{fontenc} \usepackage{lmodern} \else \usepackage{fontspec} \fi \usepackage{amsmath,amsthm,amssymb,mathtools} \usepackage[margin=1.05in]{geometry} \usepackage{microtype} \setlength{\emergencystretch}{1em} \usepackage{xcolor} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{arrows.meta,positioning} \definecolor{paperlink}{RGB}{0,0,114} \usepackage{booktabs,array,float} \usepackage{enumitem} \usepackage{needspace} \setlist[itemize]{leftmargin=2em,itemsep=0.25em,topsep=0.35em} \setlist[enumerate]{leftmargin=2.6em,itemsep=0.25em,topsep=0.35em} \setlength{\parindent}{1.25em} \setlength{\parskip}{0pt} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \newcommand{\chapter}[1]{\clearpage\section{#1}} \renewcommand{\sectionmark}[1]{\markboth{\thesection.\ #1}{}} \fancyhead[L]{\small\nouppercase{\leftmark}} \fancyhead[R]{\small\thepage} \setlength{\headheight}{14pt} \fancypagestyle{plain}{\fancyhf{}\renewcommand{\headrulewidth}{0pt}\fancyfoot[C]{\small\thepage}} \usepackage{hyperref} \hypersetup{colorlinks=true,linktoc=all,linkcolor=paperlink,citecolor=paperlink,urlcolor=paperlink, pdftitle={Gradient structures on metric measure spaces}, pdfauthor={Fabrice Baudoin}} \numberwithin{equation}{section} \setcounter{tocdepth}{2} \setcounter{secnumdepth}{2} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{maintheorem}{Theorem} \renewcommand{\themaintheorem}{\Alph{maintheorem}} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem*{definition*}{Definition} \newtheorem{problem}[theorem]{Problem} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} % averaged integral \def\Xint#1{\mathchoice{\XXint\displaystyle\textstyle{#1}}{\XXint\textstyle\scriptstyle{#1}}{\XXint\scriptstyle\scriptscriptstyle{#1}}{\XXint\scriptscriptstyle\scriptscriptstyle{#1}}\!\int} \def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}\vcenter{\hbox{$#2#3$}}\kern-.5\wd0}} \def\fint{\Xint-} \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} \newcommand{\cS}{\mathcal{S}} \newcommand{\cH}{\mathsf{H}} \newcommand{\cC}{\mathcal{C}} \newcommand{\cE}{\mathcal{E}} \newcommand{\cF}{\mathcal{F}} \newcommand{\cD}{\mathcal{D}} \newcommand{\Lip}{\operatorname{Lip}} \newcommand{\supp}{\operatorname{supp}} \newcommand{\Dom}{\operatorname{Dom}} \newcommand{\diver}{\operatorname{div}} \newcommand{\spn}{\operatorname{span}} \newcommand{\ind}{\mathbf{1}} % hypotheses \newcommand{\hV}{\ensuremath{\mathrm V(\Phi)}} \newcommand{\hB}{\ensuremath{\mathrm B(\Psi_{C,2})}} \newcommand{\hBplus}{\ensuremath{\mathrm B^+(\Psi_{C,2})}} \newcommand{\hVD}{\ensuremath{\mathrm{VD}}} \newcommand{\hP}[1]{\ensuremath{\mathrm{PI}_{#1}(\Psi_{P,#1})}} \newcommand{\hH}{\textup{(H)}} \newcommand{\hN}[1]{\textup{(N$_{#1}$)}} \newcommand{\HKE}{\textup{HKE}(\Psi_{C,2})} % additional operators \newcommand{\osc}{\operatorname{osc}} \newcommand{\esssup}{\operatorname*{ess\,sup}} \newcommand{\diam}{\operatorname{diam}} \newcommand{\dist}{\operatorname{dist}} \newcommand{\Capa}{\operatorname{Cap}} \newcommand{\Leb}{\mathcal{L}} \newcommand{\Haus}{\mathcal{H}} \newcommand{\rest}{\!\restriction} \newcommand{\rank}{\operatorname{rank}} \newcommand{\length}{\operatorname{length}} \makeatletter \renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{3.0em}} \makeatother % ---- macros used in the chapters on Harnack inequalities, heat kernels and exponents ---- \newcommand{\E}{\mathcal E} \newcommand{\F}{\mathcal F} \newcommand{\dd}{\,d} \renewcommand{\Cap}{\operatorname{Cap}} \newcommand{\PI}{\operatorname{PI}} \newcommand{\CSA}{\operatorname{CSA}} \newcommand{\T}{\mathbb T} \newcommand{\essinf}{\operatorname*{ess\,inf}} \newcommand{\Var}{\operatorname{Var}} \newcommand{\RCD}{\mathrm{RCD}} \newcommand{\hCap}{\textup{(Cap)}} \newcommand{\hCS}{\textup{(CS)}} \makeatletter\def\toclevel@part{0}\makeatother \hypersetup{bookmarksnumbered=true} % ---- additions for the present version ---- \theoremstyle{definition} \newtheorem{assumption}[theorem]{Assumption} \newtheorem{question}[theorem]{Question} \theoremstyle{plain} \newcommand{\hSL}{\textup{(SL)}} \newcommand{\Liploc}{\operatorname{Lip}_{\mathrm{loc}}} \begin{document} \hypersetup{pageanchor=false} \begin{titlepage} \centering \vspace*{1.8in} {\LARGE\bfseries Gradient structures on metric measure spaces\par} \vspace{0.45in} {\large Sobolev spaces, Heat kernels and Examples\par} \vspace{0.8in} {\Large Fabrice Baudoin\par} \vspace{0.15in} {Department of Mathematics, Aarhus University\par} {\href{mailto:fbaudoin@math.au.dk}{\nolinkurl{fbaudoin@math.au.dk}}\par} \vfill {Version 1, November 2026\par} \end{titlepage} \pagenumbering{roman} \hypersetup{pageanchor=true} \tableofcontents \clearpage \section*{Preface} \addcontentsline{toc}{section}{Preface} \markboth{Preface }{} \subsection*{Motivation} The starting point of this book is my work with Li Chen on the Vicsek set~\cite{BCVicsek23} and with Li Chen and Meng Yang on local trees~\cite{BCY}. In a \emph{real tree}, any two distinct points $x,y$ are joined by a unique arc $[x,y]$, and this arc is isometric to $[0,d(x,y)]$. A \emph{local tree} is a metric space in which every point has a ball that is a real tree with the restricted metric. The \emph{skeleton}~$\cS$ is the union of the interiors of the geodesic arcs in such balls, and its length measure is $\nu=\Haus^1\rest_{\cS}$. Fix a root $o$ in a separable real tree and orient the arcs $[o,y]$ away from $o$. For Lipschitz $u$, we can differentiate $u$ along each arc parametrized by arclength. The oriented parametrizations agree on common initial segments, so the derivatives define a single function $\partial u$ $\nu$-almost everywhere. The fundamental theorem of calculus gives \[ u(y)-u(o)=\int_{(o,y)}\partial u\,d\nu . \] For a continuous $u$, the same identity characterizes the weak derivative whenever there is a density integrable along each rooted arc. On a local tree the construction applies on tree balls. Trees can still have a complicated geometry and genuinely be fractal sets; For instance, the Vicsek set with its intrinsic metric is a real tree. Its skeleton is, up to endpoints, the union of the increasing cable approximations (Figure~\ref{fig:preface-vicsek}). The natural reference measure $m$ on $X$ is the Hausdorff measure of dimension $\log 5/\log 3$ and gives zero mass to $\cS$. \begin{figure}[htbp] \centering \newcommand{\drawVicsekCables}[1]{% \ifnum#1=0\relax \draw (-1,-1) -- (1,1) (-1,1) -- (1,-1); \else \foreach \a/\b in {0/0,-2/-2,-2/2,2/-2,2/2}{% \begin{scope}[scale={1/3},shift={(\a,\b)}] \drawVicsekCables{\the\numexpr#1-1\relax}% \end{scope}% }% \fi } \begin{tikzpicture}[x=2cm,y=2cm,draw=black!70,line width=.32pt,line cap=round] \drawVicsekCables{4} % The plotted sample uses the first 20 digits of a uniform self-similar % address, 03043413344201300102. Digits 0 to 4 correspond to the copies % in the loop above. The sample was selected away from the outer square % and the displayed vertices. The path reduces the walk through the % successive cell centres, with subpixel turns suppressed. \coordinate (vicsek-y) at (0.25742058,-0.20429041); \draw[paperlink,line width=.85pt,line join=round] (-1,-1) -- (0,0) -- (0.22222222,-0.22222222) -- (0.24691358,-0.19753086) -- (0.25514403,-0.20576132) -- (0.25697302,-0.20393233) -- (0.25737946,-0.20433877) -- (vicsek-y); \fill[paperlink] (-1,-1) circle[radius=1.2pt] (vicsek-y) circle[radius=.8pt]; \node[below left,inner sep=2pt] at (-1,-1) {$o$}; \node[above right,inner sep=2pt] at (vicsek-y) {$y$}; \end{tikzpicture} \caption{The level-four Vicsek cable approximation and the arc $[o,y]$ to a point $y$.} \label{fig:preface-vicsek} \end{figure} For local trees with uniform volume growth, the Sobolev theory uses $u\in L^p(X,m)$ and $\partial u\in L^p(\cS,\nu)$. The $BV$ energy is obtained by $L^1(X,m)$-relaxation of $\int_\cS|\partial u|\,d\nu$ on $W^{1,1}(X,m)$~\cite[Section~2.3]{BCY}. Intuitively, a local tree has \emph{rank one} because its derivative is scalar. \vspace{0.5cm} The motivation for this work was to develop a theory of \emph{higher rank} spaces. Obviously, an $n$-dimensional Riemannian manifold should have \emph{rank n} since the gradient takes values in an $n$-dimensional space. The notion of a gradient structure on metric spaces we are interested accommodates both cases and allows for fractal examples. \Needspace{9\baselineskip} \begin{definition*}[Definition~\ref{def:gradient}] A \emph{gradient structure} on a metric space $(X,d)$ is a triple $(\cS,\nu,\nabla)$, where $\cS\subset X$ is Borel, $\nu$ is a $\sigma$-finite Borel measure carried by~$\cS$, and \begin{equation*} \nabla:\Lip_b(X)\longrightarrow L^\infty(\cS,\cH,\nu) \end{equation*} is a linear map into the measurable sections of a field $\cH=(H_x)_{x\in\cS}$ of nonzero subspaces of a fixed~$\R^N$. It satisfies the Leibniz rule, the bound $|\nabla u|\le\Lip(u)$ and a weak-$*$ continuity condition. Its pointwise rank is $n(x)=\dim H_x$, and its global rank is $n_*=\operatorname*{ess\,sup}_{\nu}n(x)\le N$. \end{definition*} There will be reference measure on $(X,d)$, often the Hausdorff measure, so that from the beginning we will consider metric measures spaces $(X,d,m)$. The definition of gradient structure, and this the fundamental feature allowing genuinely fractal examples, allows $\nu$ to be singular with respect to the \emph{reference measure} $m$ and infinite on every ball. The Sobolev space $W^{1,p}(X,m)$ is the domain of the closure~$\nabla_p$ of \begin{equation*} \nabla:\cC_p\subset L^p(X,m)\longrightarrow L^p(\cS,\cH,\nu)\,,\qquad\cC_p=\{u\in\Lip_c(X):\nabla u\in L^p(\cS,\cH,\nu)\}\,, \end{equation*} when the structure is $p$-admissible, meaning that the core is uniformly dense in $C_c(X)$ and the operator is closable. The $p$-energy is then $\cE_p(f)=\int_\cS|\nabla_pf|^p\,d\nu$. For $p=2$ one obtains a strongly local regular Dirichlet form on $L^2(X,m)$ with energy measures $|\nabla_2f|^2\nu$ and pointwise index~$n(x)$ in the sense of Hino~\cite{Hi10,Hi13}. Its index and the martingale dimension of the associated diffusion are both~$n_*$ (Proposition~\ref{prop:dirichlet}). The book develops the theory of these Sobolev spaces and their associated heat kernels. \subsection*{Use of generative AI} This book was generated almost entirely with generative AI. I used approximately 200 prompts and spent about 40 hours working with Astra 6 (standard speed, max or ultra settings), 20 hours with Sol 6.1 (standard speed, various settings), and 20 hours with Fable 5 and Fable 5.2 (Extra effort). I used Astra 6 to develop proofs, Sol 6.1 for editing, proofreading and bibliographical work, and Fable 5 and Fable 5.2 for writing.\footnote{I used the \texttt{math-paper} skill, available at \url{https://github.com/amelieloher/math-paper-skills}.} The methodology was the following: \begin{enumerate} \item I had an informal notion of a gradient structure in mind and looked for examples before formalizing it. Trees give examples of rank one. I was particularly interested in examples of rank $n\ge2$ with $m\perp\nu$. For trees whose length measures are singular with respect to their reference measures, the natural product still has rank one, since the measures carrying the partial derivatives are mutually singular. In my first prompt to Astra 6, I supplied earlier work, including~\cite{BCY}, and asked, in substance, whether limits of cubes glued along their interfaces could carry a weak gradient obtained from the ordinary gradients on the cubes, just as the derivative on the Vicsek set is obtained from the derivatives on the cable approximations. Astra returned an initial example of the construction in Section~\ref{subsec:window-construction}. Figure~\ref{fig:preface-tree-of-cubes} shows three stages of this construction in dimension two. \begin{figure}[!htbp] \centering \includegraphics[width=\textwidth]{tree_of_squares_limit.png} \caption{Stages $X_2$, $X_4$ and $X_6$ of the tree of cubes with $n=2$, Hausdorff dimension $Q=\log_2 5$. Each mesh square has four ordinary dyadic children and one new square attached along a segment. The embedding in $\R^3$ compresses the transverse lengths of the new squares.} \label{fig:preface-tree-of-cubes} \end{figure} \item I next studied the Sobolev spaces and heat kernel of this example, focusing on the critical $L^p$ Korevaar-Schoen exponents, a longstanding interest of mine~\cite{Bau24}, and on weak monotonicity. I was surprised that, at the critical exponent, weak monotonicity holds precisely for $p>n$, where $n$ is the rank. Its failure at $p=2$ suggested an obstruction to two-sided sub-Gaussian heat kernel estimates. This led me to examine rates for Poincar\'e inequalities and capacity estimates. Both hold, but with different sharp scales. \item I then looked for a family of examples in which the scales could be varied. Astra obtained the family of trees of cubes described in Section~\ref{subsec:window-construction}. The difficulty of finding examples of rank at least two with genuinely sub-Gaussian heat kernel estimates suggested a structural obstruction. This question led to the rank theorem in Chapter~\ref{sec:rank-chapter}: If a gradient structure has sub-Gaussian heat kernel estimates, then the rank has to be one. \item Since gradient structures must have have different Poincar\'e and capacity scales, I then investigated how the theory changes when the scales differ. The theory of heat kernels and Sobolev spaces at matching scales is well established~\cite{BBK,AB,ABCRST3}. In the two-scale Harnack inequality, the Poincar\'e scale $\Psi_P$ and the cutoff Sobolev scale $\Psi_S$ enter the Harnack constant through $\Psi_P(r)/T+T/\Psi_S(r)$, where $r$ is the radius and $T$ the time parameter (Theorem~\ref{hk:thm:h-local-harnack}). Under uniform volume growth, $\Psi_P$ governs the prefactor in the heat kernel upper bound and $\Psi_S$ governs the off-diagonal decay (Theorems~\ref{hk:thm:mixed-upper} and~\ref{hk:thm:global-mixed-upper}). \item With these results in hand, I returned to the foundations and developed with Astra and Fable the framework of Chapters~\ref{sec:def} and~\ref{sec:sobolev-chapter}. \item To test the theory, I chose to study the problem self-improvement of Poincar\'e inequalities, a classical phenomenon in metric measure spaces~\cite{KeZh08}. It is a natural question here because the same gradient is used across different $L^p$ spaces. This leads to Chapter \ref{sec:exponents-chapter}. \item I proposed most of the examples and used the models to check if the axioms were satisfied and the relevant properties. The cubical inverse limit of Laakso type in Chapter~\ref{sec:cubical-inverse-limits} came from Astra, which I had asked for a higher-rank version of Laakso's construction. \item Successive rounds of writing, polishing and editing with Sol and Fable reduced a 350-page draft to the present version. I am entirely responsible for the architecture of the document section by section. \end{enumerate} \subsection*{Comments on Version 1} This is a first draft. Some of the results may admit sharper forms (like for the heat kernel estimates). There likely will be revisions. My main aim was to develop a framework in which new questions about first-order analysis on metric spaces could be formulated. % % % %Three questions organize the book. %\begin{itemize} %\item Which hypotheses on $(m,\nu,\nabla)$ give a function theory comparable to the one of~\cite{BCY}: closability, Korevaar--Schoen and heat kernel characterizations of $W^{1,p}$ and~$BV$? The answer involves, at each exponent~$p$, three scale functions: the volume function, and the Poincar\'e and cutoff scales. The last two coincide on manifolds and on trees, but when $n_*\ge2$ they differ at $p=2$ as soon as $\nu\not\ll m$ and the volume function and the cutoff gauge are powers of the radius (Theorem~\ref{main:rank}). %\item What remains of the theory of the heat equation, namely Harnack inequalities and heat kernel estimates, when the scales differ? At $p=2$ the relevant scales are the Poincar\'e scale~$\Psi_P$ and the scale~$\Psi_S$ of the cutoff Sobolev inequality. The Harnack inequality holds with a constant which is explicit in the ratio $\Psi_P/\Psi_S$, and the heat kernel has an upper bound in which $\Psi_P$ governs the on-diagonal factor and $\Psi_S$ the off-diagonal decay (Theorems~\ref{main:harnack} and~\ref{main:hk}). %\item Which scales are possible? For power functions the answer is complete: Theorems~\ref{main:classification} and~\ref{main:optimal} give the exact set of exponents, for forms without further structure and for gradient structures of each constant rank, and every admissible choice is realized. The basic example of rank $n\ge2$ with $\nu\perp m$ is the cube construction $X(n,Q,\sigma)$ (Theorem~\ref{main:B}), in which the gradient is closable exactly above a threshold exponent and the three quadratic scales are pairwise different. %\end{itemize} \subsection*{Acknowledgments} This work was supported in part by the Independent Research Fund Denmark (grant 10.46540/4283-00175B), by the Villum Investigator grant \emph{Stochastic Analysis in Aarhus}, and by the European Research Council (ERC) through the European Union's Horizon Europe research and innovation programme (RanGe project, Grant Agreement No. 101199772). \clearpage \section*{Introduction} \addcontentsline{toc}{section}{Introduction} \markboth{Introduction}{} \subsection*{Two measures} Let $(X,d,m)$ be a metric measure space. First-order analysis on~$X$ starts from an energy of the form \begin{equation*} \cE_p(u)=\int_\cS|\nabla u|^p\,d\nu\,, \end{equation*} where $\nabla u$ is a gradient of the function~$u$ and $\nu$ is a measure. In the classical situations $\nu=m$, and the gradient is defined at $m$-almost every point. This book studies the situation where $\nu$ differs from~$m$. Four examples, all treated in Part~\ref{part:examples}, indicate the range of the phenomena. \begin{itemize} \item \emph{Manifolds.} On a Riemannian manifold, or on an $\RCD$ space, $\nu=m$ is the volume, and the theory reduces to the classical one. \item \emph{Trees.} On a local tree, $\nabla u$ is the derivative along the arcs and $\nu$ is the length measure, carried by the union~$\cS$ of the open arcs. The reference measure~$m$ is arbitrary within a class of measures with controlled volume growth; it may give no mass to~$\cS$, and $\nu$ may be infinite on every ball. \item \emph{The tree of cubes.} Replacing the arcs by cubes of dimension $n\ge2$, attached to each other through small windows, gives a space where $\nu$ is locally the Lebesgue measure of dimension~$n$, while $m$ has dimension $Q>n$ and is singular with respect to~$\nu$. \item \emph{Liouville Brownian motion.} Here $X$ is the plane, $\nabla$ is the Euclidean gradient, $\nu$ is the Lebesgue measure, and $m$ is a Gaussian multiplicative chaos. \end{itemize} In all these examples the gradient at a point takes its values in a Euclidean space of finite dimension, which may depend on the point. \subsection*{Gradient structures and Sobolev spaces} A \emph{gradient structure} on $(X,d,m)$ (Definition~\ref{def:gradient}) consists of a Borel set~$\cS$, the \emph{skeleton}, a $\sigma$-finite measure~$\nu$ carried by~$\cS$, and a linear map~$\nabla$ from the bounded Lipschitz functions to the bounded measurable sections of a measurable field $(H_x)_{x\in\cS}$ of Euclidean spaces, which satisfies the Leibniz rule, the bound $|\nabla u|\le\Lip(u)$, and a condition of weak-$*$ continuity. This is a derivation in the sense of Weaver~\cite{We}, with values in a field of finite-dimensional spaces. The dimension $n(x)$ of~$H_x$ is the \emph{pointwise rank}. The reference measure does not appear in the definition; the measures $m$ and~$\nu$ may be mutually singular, and $\nu$ need not be finite on balls. The bound $|\nabla u|\le\Lip(u)$ says that the gradient is controlled by the metric. The converse, that the metric is recovered from the gradient, is an additional property, the local Sobolev-to-Lipschitz property of Definition~\ref{def:SL}, which holds in all the examples. The reference measure enters with the Sobolev spaces (Chapter~\ref{sec:sobolev-chapter}). The structure is \emph{$p$-admissible} if the gradient, defined on a core~$\cC_p$ of Lipschitz functions with compact support, is closable from $L^p(X,m)$ to $L^p(\cS,\nu)$; its closure~$\nabla_p$ then defines the Sobolev space $W^{1,p}(X,m)$. Closability is a compatibility between the two measures, and it may fail: for Liouville Brownian motion it holds exactly for $p>\gamma^2/2$, and for the tree of cubes exactly for $p\ge p_*$, with an explicit threshold (Proposition~\ref{prop:liouville-p-admissibility} and Theorem~\ref{thm:cube-closed-family-domain}). At an admissible exponent, Chapter~\ref{sec:sobolev-chapter} establishes the following. \begin{itemize} \item \emph{Trace.} A function of $W^{1,p}(X,m)$ is a class modulo $m$-null sets, and $\nu$ may be singular with respect to~$m$. Nevertheless such a function has a trace on the part of the skeleton which carries the gradients, defined $\nu$-almost everywhere, and this trace gives the chain rule for compositions with Lipschitz functions (Proposition~\ref{prop:trace}). \item \emph{Functional analysis.} $W^{1,p}(X,m)$ is a Banach space, reflexive for $1
0\}$ is a sufficient condition for the integrated estimate. The cutoff estimate and the Lipschitz bound give $\int|\nabla\psi_x^r|^p\,d\nu\le C\,m(B(x,r))/\Psi_{C,p}(r)$, with \begin{equation*} \Psi_{C,p}(r)=r^{p-2}\,\Psi_{C,2}(r)\,. \end{equation*} The functions $\Psi_{P,p}$ and $\Psi_{C,p}$ are the \emph{Poincar\'e scale} and the \emph{cutoff scale}. Under the three hypotheses, on a connected space, $\Psi_{C,p}\le C\,\Psi_{P,p}$ at small radii (Proposition~\ref{prop:scaleorder}). The scales \emph{match} at the exponent~$p$ if they are comparable. The distinction between $m$ and~$\nu$ is essential in the arguments of approximation which follow: a set on which a function is modified may have an infinite measure for~$\nu$, even when its measure for~$m$ is small, and the cutoff condition supplies the control of the gradients on such sets. An additional hypothesis $\mathrm V(\Phi)$ of uniform volume growth gives explicit formulas, and is used only where it is stated. \subsection*{The results of Part~\ref{part:general}} \paragraph{Korevaar--Schoen characterizations and closability (Chapter~\ref{sec:KS}).} Let $D_p(f,r)$ be the integral of $|f(x)-f(y)|^p$ over the pairs of points at distance less than~$r$, normalized by the volume of the balls, as in~\eqref{eq:Dp}. Under the three hypotheses, the relaxed energy~$\overline{\cE}_p$ satisfies, for every $f\in L^p(X,m)$, \begin{equation*} \sup_{r}\frac{D_p(f,r)}{\Psi_{P,p}(r)} \le C\,\overline{\cE}_p(f)\,,\qquad \overline{\cE}_p(f)\le C\liminf_{r\to0}\frac{D_p(f,r)}{\Psi_{C,p}(r)} \end{equation*} (Theorem~\ref{thm:KS}). Each inequality involves its own scale. If the ratio $\Psi_{P,p}/\Psi_{C,p}$ is bounded along one sequence of radii tending to zero, the structure is $p$-admissible (Theorem~\ref{thm:closability}), and the two inequalities characterize $W^{1,p}(X,m)$ for $p>1$, and $BV(X,m)$ for $p=1$, by the boundedness of the difference quotients $D_p(f,r)/\Psi_{C,p}(r)$ along this sequence (Theorems~\ref{thm:KS} and~\ref{thm:BV}). At matching power scales this determines the critical exponents of the Korevaar--Schoen spaces (Theorem~\ref{thm:KS-critical-matching}), and a lower bound for the volume of balls gives Gagliardo--Nirenberg inequalities, by the method of Bakry, Coulhon, Ledoux and Saloff-Coste~\cite{BCLS95,Bau24} (Theorem~\ref{thm:KS-GN}). \paragraph{The rank theorem (Chapter~\ref{sec:rank-chapter}).} The scales restrict the number of independent gradients. If the scales match at an exponent $p>1$ and the common scale has a lower scaling exponent greater than~$p$, then \begin{equation*} n(x)
n$. \paragraph{Self-improvement (Chapter~\ref{sec:exponents-chapter}).} A Poincar\'e inequality at the cutoff scale improves itself, as in the theorem of Keith and Zhong~\cite{KeZh08}: a $(1,p)$-Poincar\'e inequality, together with a cutoff condition of order $b
1$ is a matching exponent, so is every exponent of an interval $[p-\varepsilon,p]$. These arguments connect the calculus of derivations~\cite{We,Sc} with the theory of Korevaar and Schoen~\cite{KoSc93,Bau24,BCY} and with the self-improvement of Poincar\'e inequalities~\cite{KeZh08,KKLV19,KLVZ}. \subsection*{Heat kernels: the results of Part~\ref{part:heat}} Part~\ref{part:heat} starts independently, with a strongly local regular Dirichlet space $(X,d,m,\cE,\cF)$ which satisfies volume doubling, a Poincar\'e inequality $\PI(\Psi_P)$, and a cutoff Sobolev inequality in annuli $\CSA(\Psi_S)$ in the sense of Andres and Barlow~\cite{AB}. The classical theory assumes $\Psi_P\asymp\Psi_S$. Here the two scales may differ; on a geodesic space, necessarily $\Psi_S\le C\,\Psi_P$ (Proposition~\ref{prop:quadratic-scale-order}). \paragraph{Harnack inequality (Chapter~\ref{sec:harnack-chapter}).} A nonnegative solution~$u$ of the heat equation in a cylinder of radius~$r$ and time length~$2T$ satisfies \begin{equation*} \esssup_{Q_-}u \le\exp\Bigl[C\Bigl(1+\frac{\Psi_P(r)}{T}+\frac{T}{\Psi_S(r)}\Bigr)\Bigr] \essinf_{Q_+}u \end{equation*} (Theorem~\ref{hk:thm:h-local-harnack}). The radius and the time are independent parameters, and each scale enters through one term. When the scales are comparable and $T$ is the common scale at the radius~$r$, the constant is uniform and one recovers the parabolic Harnack inequality. \paragraph{Heat kernel bounds (Chapter~\ref{sec:hk-chapter}).} The Harnack inequality, the method of Davies, Nash inequalities and chaining arguments give upper and lower bounds for the heat kernel, at small times under local hypotheses and at all times under global ones. In the upper bounds, the exponential factor is governed by the cutoff Sobolev scale, through the rate function $\mathcal A_{\Psi_S}$ of~\eqref{eq:rate-function}, and, under uniform volume growth, the prefactor is governed by the Poincar\'e scale. The lower bounds involve both scales. Table~\ref{tab:heat-kernel} lists the statements. At matching scales $\Psi_P\asymp\Psi_S\asymp\Psi$, Corollary~\ref{hk:cor:vd-matching} gives the two-sided sub-Gaussian estimate \begin{equation*} \frac{c\,e^{-C\mathcal A_\Psi(d(x,y),t)}}{m(B(x,\Psi^{-1}(t)))} \le p_t(x,y)\le \frac{C\,e^{-c\mathcal A_\Psi(d(x,y),t)}}{m(B(x,\Psi^{-1}(t)))}\,. \end{equation*} The hypothesis $\mathrm V(\Phi)$ is invoked separately where uniform prefactors are stated. \paragraph{Gradient structures (Chapter~\ref{sec:gradient-heat}).} For the Dirichlet form of a $2$-admissible gradient structure, the cutoff condition gives an upper bound for capacities, but not a cutoff Sobolev inequality. At matching scales, the capacity bound and the Poincar\'e inequality imply the cutoff Sobolev inequality, by a theorem of Eriksson-Bique~\cite{EBRes}; hence volume doubling, $\mathrm{PI}_2(\Psi)$ and $\mathrm B(\Psi)$ imply the two-sided sub-Gaussian estimates (Theorem~\ref{thm:HKE}), and Sobolev and $BV$ functions are characterized by the heat kernel (Theorem~\ref{thm:HKchar}). For distinct scales, a cutoff Sobolev inequality is derived from a condition on the energy of the cutoffs in small balls, the condition~\ref{eq:quadratic-cutoff-growth}, which follows from the cutoff condition and doubling when the cutoff scale is~$r^2$ (Proposition~\ref{prop:localized-cutoff-CSA}). \subsection*{The examples of Part~\ref{part:examples}} Table~\ref{tab:scales} in Section~\ref{sec:examples} lists the examples with their ranks and scales. Chapters~\ref{sec:riemannian-examples} and~\ref{sec:metric-examples} treat the spaces with $\nu=m$ and Gaussian scales: Riemannian manifolds, measurable Riemannian metrics, sub-Riemannian manifolds and $\RCD(K,N)$ spaces. The remaining chapters contain the following results. \begin{itemize} \item \emph{Cubical inverse limits} (Chapter~\ref{sec:cubical-inverse-limits}). For every integer $n\ge1$ and every real $Q>n$ there is an Ahlfors $Q$-regular space with $m=\nu$ and a gradient structure of rank~$n$, admissible for every $p\ge1$, with Gaussian scales (Theorem~\ref{thm:cubical-limit}). \item \emph{The harmonic Sierpi\'nski gasket} (Chapter~\ref{sec:harmonic-gasket-chapter}). The gradient has rank one and is closable for every $p\ge1$; the kernel of the closed gradient consists of the constants, and the critical Korevaar--Schoen exponents are equal to one for every~$p$ (Proposition~\ref{prop:harmonic-gasket}). There is no uniform volume function. Whether the Poincar\'e inequality $\mathrm{PI}_p(r^p)$ holds for all $p\ge1$ is not known. \item \emph{Liouville Brownian motion} (Chapter~\ref{sec:liouville-chapter}). For the parameter $0<\gamma<2$, almost surely, the Euclidean gradient is closable exactly for $p>\gamma^2/2$, and at and below this threshold the relaxed energy vanishes identically (Proposition~\ref{prop:liouville-p-admissibility}). Locally, the Poincar\'e inequality and the cutoff Sobolev inequality hold at different power scales. \item \emph{The tree of cubes} (Chapter~\ref{sec:riemannian-gluings}). The structure has constant rank~$n$, the measures $m$ and~$\nu$ are mutually singular, and the scales match exactly for $p>n$. The critical Korevaar--Schoen exponents are equal to $1+(Q-n)/p$ and are attained for every $p\ge1$; for $p>n$ the critical space is $W^{1,p}(X,m)$, and for admissible $1
0$ we write $\lambda B=B(x,\lambda r)$ and $r_B=r$. A ball is always given together with its centre and its radius.
\item $\Lip(u)=\sup_{x\ne y}|u(x)-u(y)|/d(x,y)$ is the Lipschitz constant of $u:X\to\R$. The spaces $\Lip_b(X)$ and $\Lip_c(X)$ consist of the bounded Lipschitz functions and of the Lipschitz functions with compact support.
\item For a Borel set~$A$ with $0 0$ depends only on~$q$. Since $q\le r$, Minkowski's inequality with exponent $r/q\ge1$ gives
\begin{align*}
c_q\left\|\left(\left|\sum_iA_{ji}v_i\right|\right)_j\right\|_{\ell^r}
&\le\left(\mathbb E\left\|A(\langle v_i,Z\rangle)_i\right\|_{\ell^r}^{q}\right)^{1/q}\\
&\le\left(\mathbb E\sum_i|\langle v_i,Z\rangle|^q\right)^{1/q}
=c_q\|(|v_i|)_i\|_{\ell^q}\,.
\end{align*}
For $r=\infty$, the first inequality holds because the maximum of the individual $L^q$ quasi-norms is at most the $L^q$ quasi-norm of the maximum.
\emph{Step 2: smooth $T$ and functions of the core.} Suppose that $T$ is smooth and $u_1,\dots,u_k\in\cC_p$. Differentiating the hypothesis on~$T$ shows that $\|DT(a)h\|_{\ell^r}\le\|h\|_{\ell^q}$ for all $a,h\in\R^k$. The chain rule~\eqref{eq:chain-several} and~\eqref{eq:p-energy-Hilbert-contraction} therefore give
\begin{equation}\label{eq:p-energy-pointwise-contraction}
\|(|\nabla T_j(u)|)_j\|_{\ell^r}
\le\|(|\nabla u_i|)_i\|_{\ell^q}
\qquad\nu\text{-almost everywhere}\,.
\end{equation}
The functions $T_j(u)$ are Lipschitz, they have compact support because $T(0)=0$, and~\eqref{eq:p-energy-pointwise-contraction} shows that their gradients are $p$-integrable. Thus $T_j(u)\in\cC_p$.
\emph{Step 3: general $T$ and functions of the core.} Let $(\rho_\varepsilon)$ be a smooth approximation of the identity on~$\R^k$ and $T^\varepsilon=T*\rho_\varepsilon-(T*\rho_\varepsilon)(0)$. Since $\|\cdot\|_{\ell^r}$ is a norm, $T^\varepsilon$ satisfies the hypothesis on~$T$, and $T^\varepsilon\to T$ locally uniformly. For $u_1,\dots,u_k\in\cC_p$, the functions $T^\varepsilon_j(u)$ vanish outside $\bigcup_i\supp u_i$ and converge uniformly, hence in $L^p(X,m)$, to $T_j(u)$. By Step~2 their gradients are bounded in $L^p(\nu)$. Since $L^p(\cS,\cH,\nu)$ is reflexive and the graph of~$\nabla_p$ is weakly closed, $T_j(u)\in W^{1,p}(X,m)$, and along a sequence $\varepsilon\to0$ the gradients $\nabla T^\varepsilon_j(u)$ converge weakly to $\nabla_pT_j(u)$ for every~$j$. The set of $l$-tuples of fields $(W_j)$ with $\|(|W_j|)_j\|_{\ell^r}\le\|(|\nabla u_i|)_i\|_{\ell^q}$ almost everywhere is convex and closed in $L^p(\nu)^l$, hence weakly closed. Therefore~\eqref{eq:p-energy-pointwise-contraction} holds with $\nabla_pT_j(u)$ on the left-hand side.
\emph{Step 4: general functions.} Let $f_i\in W^{1,p}(X,m)$ and choose $u_{i,n}\in\cC_p$ converging to~$f_i$ in the graph norm. The hypothesis on~$T$ gives $|T_j(a)-T_j(b)|\le C\sum_i|a_i-b_i|$, so $T_j(u_n)\to T_j(f)$ in $L^p(X,m)$. Set
\begin{equation*}
h_n=\|(|\nabla u_{i,n}|)_i\|_{\ell^q}\,,\qquad h=\|(|\nabla_pf_i|)_i\|_{\ell^q}\,.
\end{equation*}
After passing to a subsequence, the gradients $\nabla u_{i,n}$ converge $\nu$-almost everywhere and have a common majorant in $L^p(\nu)$; dominated convergence gives $h_n\to h$ in $L^p(\nu)$. By Step~3 the gradients $\nabla_pT_j(u_n)$ are bounded in $L^p(\nu)$ by~$h_n$. Pass to a subsequence along which they converge weakly for every~$j$; since $\nabla_p$ is closed, the limits are $\nabla_pT_j(f)$, and in particular $T_j(f)\in W^{1,p}(X,m)$. By Mazur's lemma, applied simultaneously to these gradients and to~$h_n$, suitable convex combinations converge strongly in $L^p(\nu)$ and, along a further subsequence, almost everywhere. Since $\|\cdot\|_{\ell^r}$ is convex, the bound of Step~3 passes to the limit:
\begin{equation}\label{eq:p-energy-pointwise-closed}
\|(|\nabla_pT_j(f)|)_j\|_{\ell^r}
\le\|(|\nabla_pf_i|)_i\|_{\ell^q}
\qquad\nu\text{-almost everywhere}\,.
\end{equation}
\emph{Step 5: integration.} Let $A\subset X$ be a Borel set. Minkowski's inequality with exponent $r/p\ge1$, then~\eqref{eq:p-energy-pointwise-closed}, then Minkowski's inequality with exponent $p/q\ge1$, give
\begin{align*}
\bigl\| \bigl(\|\nabla_pT_j(f)\|_{L^p(A,\nu)}\bigr)_j\bigr\|_{\ell^r}
&\le\bigl\|\,\|(|\nabla_pT_j(f)|)_j\|_{\ell^r}\bigr\|_{L^p(A,\nu)}\\
&\le\bigl\|\,\|(|\nabla_pf_i|)_i\|_{\ell^q}\bigr\|_{L^p(A,\nu)}
\le\bigl\| \bigl(\|\nabla_pf_i\|_{L^p(A,\nu)}\bigr)_i\bigr\|_{\ell^q}\,.
\end{align*}
This is~\eqref{eq:p-energy-GC}.
\end{proof}
\paragraph{Related constructions.} Proposition~\ref{prop:p-energy} starts from a prescribed gradient and obtains the energy measures as $|\nabla_pf|^p\nu$. In the literature on fractals the order is usually reversed. Limits of Korevaar--Schoen energies give $p$-energy forms and energy measures in~\cite{ARB25,KajinoShimizuKS}; self-similar constructions are developed in~\cite{MS25}. Sasaya~\cite{Sasaya26} constructs canonical energy measures for strongly local $p$-energy forms under his axioms, and~\cite{Sasaya26NL} extends the construction beyond homogeneous energies. Identifying the measures $\Gamma_p(f)$ with the canonical measures of those theories requires checking the corresponding locality and calculus assumptions, and is not claimed here.
\paragraph{One measure for all exponents.} In a gradient structure, the single measure~$\nu$ dominates the energy measures $\Gamma_p(f)$ at every admissible exponent. This is additional structure, which a family of $p$-energy forms need not have: in the self-similar examples of~\cite{AES25}, the domains of the energy forms at two different exponents can intersect only in the constants. Such examples are compatible with Proposition~\ref{prop:compatibility}, which assumes one gradient structure and Poincar\'e inequalities at both exponents.
\subsection{The Dirichlet form}\label{sec:dirichlet-form}
At the exponent $p=2$ the closed gradient defines a quadratic form, and the theory of Dirichlet forms~\cite{FOT} applies. We recall the notions needed to state the result. Let $(\cE,\cF)$ be a strongly local regular Dirichlet form on $L^2(X,m)$. The \emph{energy measure} $\Gamma(f)$ of $f\in\cF$ is normalized by $\Gamma(f)(X)=\cE(f,f)$; for bounded~$f$ it is characterized by
\begin{equation}\label{eq:energy-measure-def}
\int_X\varphi\,d\Gamma(f)=\cE(\varphi f,f)-\tfrac12\,\cE(f^2,\varphi)\qquad\bigl(\varphi\in\cF\cap C_c(X)\bigr)\,,
\end{equation}
and $\Gamma(f,g)$ is defined by polarization; see~\cite[Section~3.2]{FOT}, where the measure $\mu_{\langle f\rangle}=2\Gamma(f)$ is used. The following two notions are due to Hino~\cite{Hi10,Hi13}.
\begin{itemize}
\item A $\sigma$-finite Borel measure~$\mu$ is \emph{minimal energy-dominant} if $\Gamma(f)\ll\mu$ for every $f\in\cF$, and if $\mu(A)=0$ for every Borel set~$A$ such that $\Gamma(f)(A)=0$ for all $f\in\cF$.
\item The \emph{pointwise index} is the smallest measurable function, up to $\mu$-null sets, which bounds the rank of the matrix $\bigl(d\Gamma(f_i,f_j)/d\mu\bigr)_{i,j\le k}$ $\mu$-almost everywhere, for every finite family $f_1,\dots,f_k\in\cF$. Its $\mu$-essential supremum is the \emph{index} of the form.
\end{itemize}
The index is equal to the martingale dimension of the associated diffusion process~\cite[Theorem~3.4]{Hi10}.
\begin{proposition}\label{prop:dirichlet}
Let $(\cS,\nu,\nabla)$ be a $2$-admissible gradient structure, and let
\begin{equation*}
\cF=W^{1,2}(X,m)\,,\qquad\cE(f,g)=\int_\cS\langle\nabla_2f,\nabla_2g\rangle\,d\nu\,.
\end{equation*}
\begin{enumerate}[label=\textup{(\roman*)},ref=\textup{(\roman*)}]
\item\label{dir:form} $(\cE,\cF)$ is a regular, strongly local Dirichlet form on~$L^2(X,m)$ with core~$\cC_2$.
\item\label{dir:energy} The energy measure of $f\in\cF$ is $d\Gamma(f)=|\nabla_2f|^2\,d\nu$. In particular, if $f\in\cF$ is $m$-almost everywhere constant on an open set~$U$, then $\nabla_2f=0$ $\nu$-almost everywhere on~$U$.
\item\label{dir:index} The measure $\nu\rest_{\cS_2}$ is minimal energy-dominant. On~$\cS_2$, the pointwise index is the dimension of the field generated by the gradients of~$\cC_2$. If $\cC_2$ spans the fibres, then $\nu$ is minimal energy-dominant, the pointwise index is $n(x)$, and the index and the martingale dimension of the associated diffusion are equal to the rank~$n_*$.
\end{enumerate}
\end{proposition}
\begin{proof}
\ref{dir:form} The form is closed by the definition of~$\nabla_2$, and it is Markovian by Proposition~\ref{prop:sobolev}\ref{sob:contr} applied to $\varphi(t)=(t\vee0)\wedge1$. By construction $\cC_2$ is dense in~$\cF$, and by~\ref{A1} it is dense in~$C_c(X)$; hence the form is regular with core~$\cC_2$. For the strong locality we use the Beurling--Deny decomposition~\cite[Theorem~3.2.1]{FOT}: for $u,v\in\cF\cap C_c(X)$,
\begin{equation*}
\cE(u,v)=\cE^{(c)}(u,v)+\int_{X\times X\setminus\mathrm{diag}}(u(x)-u(y))(v(x)-v(y))\,J(dx\,dy)+\int_Xuv\,dk\,,
\end{equation*}
where $\cE^{(c)}$ is strongly local, $J$ is a symmetric positive Radon measure off the diagonal and $k$ is a positive Radon measure. We show that $J=0$ and $k=0$.
\emph{The jump measure vanishes.} Let $K_1,K_2\subset X$ be disjoint compact sets. By Lemma~\ref{lem:core-cutoff}\ref{core:cutoff}, applied in disjoint open neighbourhoods of $K_1$ and~$K_2$, there are nonnegative $u,v\in\cC_2$ with disjoint supports, $u=1$ on~$K_1$ and $v=1$ on~$K_2$. By Lemma~\ref{lem:calculus}\ref{calc:local}, $\nabla u=0$ $\nu$-almost everywhere outside~$\supp u$ and $\nabla v=0$ $\nu$-almost everywhere outside~$\supp v$, so $\cE(u,v)=0$. Moreover $\cE^{(c)}(u,v)=0$ and $uv=0$, and $(u(x)-u(y))(v(x)-v(y))=-u(x)v(y)-u(y)v(x)$. The decomposition and the symmetry of~$J$ give
\begin{equation*}
2J(K_1\times K_2)\le2\int u(x)v(y)\,J(dx\,dy)=-\cE(u,v)=0\,.
\end{equation*}
The complement of the diagonal is a countable union of such products, hence $J=0$.
\emph{The killing measure vanishes.} Let $K\subset X$ be compact. By Lemma~\ref{lem:core-cutoff}\ref{core:cutoff} there are $v\in\cC_2$ with $0\le v\le1$ and $v=1$ on~$K$, and then $u\in\cC_2$ with $u=1$ on a neighbourhood~$W$ of~$\supp v$. By Lemma~\ref{lem:calculus}\ref{calc:const},\ref{calc:local}, $\nabla u=0$ $\nu$-almost everywhere on~$W$ and $\nabla v=0$ $\nu$-almost everywhere outside~$W$; hence $\cE(u,v)=0$. Also $\cE^{(c)}(u,v)=0$, because $u$ is constant on a neighbourhood of~$\supp v$. Since $J=0$, the decomposition gives $k(K)\le\int_Xv\,dk=\int_Xuv\,dk=0$. Hence $k=0$ and $\cE=\cE^{(c)}$.
\ref{dir:energy} For $f,\varphi\in\cC_2$, the Leibniz rule gives $\nabla(\varphi f)=\varphi\,\nabla f+f\,\nabla\varphi$ and $\nabla(f^2)=2f\,\nabla f$, hence
\begin{equation*}
\cE(\varphi f,f)-\tfrac12\,\cE(f^2,\varphi)=\int_\cS\bigl(\varphi\,|\nabla f|^2+f\langle\nabla\varphi,\nabla f\rangle-f\langle\nabla f,\nabla\varphi\rangle\bigr)\,d\nu=\int_\cS\varphi\,|\nabla f|^2\,d\nu\,.
\end{equation*}
By~\eqref{eq:energy-measure-def}, the two finite measures $\Gamma(f)$ and $|\nabla f|^2\nu$ have the same integral against every $\varphi\in\cC_2$. Since $\cC_2$ is uniformly dense in~$C_c(X)$, they are equal. For a general $f\in\cF$, let $u_k\in\cC_2$ with $u_k\to f$ in~$\cF$. For every Borel set~$A$,
\begin{equation*}
\bigl|\Gamma(f)(A)^{1/2}-\Gamma(u_k)(A)^{1/2}\bigr|\le\cE(f-u_k,f-u_k)^{1/2}\,,
\end{equation*}
by~\cite[Section~3.2]{FOT}, and the same inequality holds for the measures $|\nabla_2f|^2\nu$ and $|\nabla u_k|^2\nu$, by the triangle inequality in $L^2(A,\nu)$. Letting $k\to\infty$ gives $\Gamma(f)(A)=\int_A|\nabla_2f|^2\,d\nu$. The last assertion holds because the energy measure of a function of the domain of a strongly local regular Dirichlet form does not charge an open set on which the function is constant~\cite[Section~3.2]{FOT}.
By polarization, the identity in~\ref{dir:energy} gives
\begin{equation}\label{eq:energy-density}
\frac{d\Gamma(f,g)}{d\nu}(x)=\langle\nabla_2f(x),\nabla_2g(x)\rangle\qquad(f,g\in\cF)\,,
\end{equation}
and all these measures are carried by~$\cS_2$, by~\eqref{eq:gradient-carried}.
\ref{dir:index} Every energy measure is absolutely continuous with respect to $\nu\rest_{\cS_2}$, by~\ref{dir:energy} and~\eqref{eq:gradient-carried}. If a Borel set~$A$ has $\Gamma(f)(A)=0$ for all $f\in\cF$, then the functions $v_k$ of~\eqref{eq:carrier} have zero gradient almost everywhere on~$A$, so $\nu(A\cap\cS_2)=0$. Thus $\nu\rest_{\cS_2}$ is minimal energy-dominant. Every closed gradient takes its values in the measurable field generated by the gradients of~$\cC_2$, by approximation in the graph norm. By~\eqref{eq:energy-density}, the matrices $(d\Gamma(f_i,f_j)/d\nu)$ are Gram matrices of vectors of this field. Their ranks are bounded by its dimension, and the family $(v_k)$ attains that dimension, by~\eqref{eq:rank-Gram} applied to its span; compare~\cite[Lemma~2.3 and Proposition~2.10]{Hi10}. When $\cC_2$ spans the fibres, $\cS_2=\cS$ up to a null set, the dimension is $n(x)$ and the index is~$n_*$. The index is equal to the martingale dimension by~\cite[Theorem~3.4]{Hi10}; compare~\cite[Definition~2.2 and Theorem~3.4]{Hi13}.
\end{proof}
\begin{remark}[The trace at $p=2$]\label{rem:trace-quasi-continuous}
For a $2$-admissible structure, the trace $T_2f$ of Proposition~\ref{prop:trace} is the restriction to~$\cS_2$ of a quasi-continuous representative~$\tilde f$ of~$f$. Indeed, let $u_j\in\cC_2$ converge to~$f$ in~$\cF$. A subsequence converges to~$\tilde f$ quasi-everywhere~\cite[Theorem~2.1.4]{FOT}. Energy measures do not charge sets of zero capacity~\cite[Lemma~3.2.4]{FOT}, and by the proof of Proposition~\ref{prop:trace} the measure $\nu\rest_{\cS_2}$ has the same null sets as a countable combination of energy measures. Hence the subsequence converges to~$\tilde f$ $\nu$-almost everywhere on~$\cS_2$, and its limit in $L^0(\cS_2,\nu)$ is~$T_2f$.
\end{remark}
\paragraph{From Dirichlet forms to gradients.} Conversely, every strongly local regular Dirichlet form admits a first-order calculus with values in a measurable field of Hilbert spaces whose fibre dimensions are given by the pointwise index~\cite{Hi13}; see also~\cite{CS,IRT12,HRT13}. A gradient structure contains more information: it is defined on all bounded Lipschitz functions of a specified metric, and it is bounded by the Lipschitz constant. Under the additional condition~\hSL{}, Proposition~\ref{calc:metric} recovers that metric locally.
\paragraph{Generator and semigroup.} The operator $L=\diver\nabla_2$, with domain $\{f\in\cF:\nabla_2f\in\cD_2\}$, is the generator of $(\cE,\cF)$, by~\eqref{eq:div-sobolev}. We denote by $P_t=e^{tL}$, $t\ge0$, the associated \emph{heat semigroup} on $L^2(X,m)$. Part~\ref{part:heat} studies~$P_t$ and its kernel.
\paragraph{Singular energy measures.} When $\nu\perp m$, Proposition~\ref{prop:dirichlet}\ref{dir:energy} shows that every energy measure is singular with respect to~$m$. On self-similar fractals this singularity is a theorem~\cite{Ku89,BST99,Hi05}. Kajino and Murugan~\cite{KM} proved it for symmetric diffusions with full off-diagonal sub-Gaussian heat kernel estimates, under a condition on the space-time scale function which is satisfied by $\Psi(r)=r^\beta$ with $\beta>2$. Gradient structures with $\nu\perp m$ are a framework in which this singularity is built into the data.
\subsection{Relaxation and bounded variation}\label{subsec:BV}
Closure requires closability and produces a closed operator. Relaxation requires nothing and produces a lower semicontinuous functional. For $1\le p<\infty$, the \emph{relaxed energy} of $f\in L^p(X,m)$ is
\begin{equation}\label{eq:relaxed-core-energy}
\overline{\cE}_p(f)=
\inf\Bigl\{\liminf_{k\to\infty}\int_\cS|\nabla u_k|^p\,d\nu:\ u_k\in\cC_p\,,\ u_k\to f\text{ in }L^p(X,m)\Bigr\}\,,
\end{equation}
with the convention $\inf\varnothing=+\infty$. It is the largest lower semicontinuous functional on $L^p(X,m)$ which is bounded by $\int_\cS|\nabla u|^p\,d\nu$ on~$\cC_p$. For a $p$-admissible structure with $p>1$, the lower semicontinuity of~$\cE_p$ (Proposition~\ref{prop:sobolev}\ref{sob:lsc}) and the density of~$\cC_p$ in the graph norm give $\overline{\cE}_p=\cE_p$. The relaxed energy is defined without any closability assumption, and Chapter~\ref{sec:KS} compares it with averaged difference quotients.
At $p=1$ the relaxed energy is the total variation. This is the definition of~$BV$ by relaxation of~\cite{Miranda03,ADM14} for metric measure spaces, and of~\cite[Definition~2.17]{BCY} for local trees.
\begin{definition}\label{def:BV}
For $f\in L^1(X,m)$, the \emph{total variation} of~$f$ is
\begin{equation*}
\|Df\|(X)=\overline{\cE}_1(f)=\inf\Bigl\{\liminf_{k\to\infty}\int_\cS|\nabla u_k|\,d\nu:\ u_k\in\cC_1\,,\ u_k\to f\text{ in }L^1(X,m)\Bigr\}\,,
\end{equation*}
and $BV(X,m)=\{f\in L^1(X,m):\|Df\|(X)<\infty\}$ is the space of \emph{functions of bounded variation}. The \emph{perimeter} of a Borel set~$E$ with $m(E)<\infty$ is $P(E)=\|D\ind_E\|(X)$.
\end{definition}
The functional $f\mapsto\|Df\|(X)$ is convex, even, positively homogeneous of degree one, and lower semicontinuous on~$L^1(X,m)$. Consequently it is a seminorm on~$BV(X,m)$, and $BV(X,m)$ is a Banach space for the norm $\|f\|_{L^1}+\|Df\|(X)$. The definition requires neither closability at $p=1$ nor any quantitative hypothesis. In this book $\|Df\|(X)$ is a number; we do not show that it is the total mass of a measure~$\|Df\|$ on~$X$, and the notation is chosen only for its familiarity.
\subsection{Divergence duality and coarea}\label{subsec:coarea}
We prove two structural properties of the total variation: it is the support function of the divergences of the bounded vector fields, and it satisfies the coarea formula. The divergence representation is analogous to~\cite[Theorem~3.4]{DiMarino14}; relaxation and coarea follow the approach to~$BV$ on metric measure spaces of~\cite{Miranda03,ADM14}. Both statements follow from the calculus of Lemma~\ref{lem:calculus} and from the definition by relaxation. Throughout this section we write
\begin{equation*}
J(f)=\|Df\|(X)\,,\qquad f\in L^1(X,m)\,.
\end{equation*}
\paragraph{Duality.} A bounded field $V\in L^\infty(\cS,\cH,\nu)$ has a \emph{bounded divergence} if there is $h\in L^\infty(X,m)$ such that
\begin{equation}\label{eq:div-bounded}
\int_\cS\langle\nabla u,V\rangle\,d\nu
=-\int_Xu\,h\,dm\qquad\text{for all }u\in\cC_1\,;
\end{equation}
we then write $h=\diver V$. When $\cC_1$ is dense in $L^1(X,m)$ the function~$h$ is determined by~$V$. In general, the supremum in the next statement is taken over the pairs $(V,h)$ satisfying~\eqref{eq:div-bounded}.
\begin{proposition}\label{prop:BV-duality}
Let $(\cS,\nu,\nabla)$ be a gradient structure. For every $f\in L^1(X,m)$,
\begin{equation}\label{eq:BV-duality}
\|Df\|(X)=\sup\Bigl\{\Bigl|\int_X f\,\diver V\,dm\Bigr|:\
V\in L^\infty(\cS,\cH,\nu)\,,\ \|V\|_\infty\le1\,,
\ \diver V\in L^\infty(X,m)\Bigr\}\,.
\end{equation}
\end{proposition}
On~$\R^n$, with $m=\nu=\Leb^n$ and the Euclidean gradient, this is the classical definition of the total variation by duality with vector fields; see~\cite[Chapter~3]{AFP00}. In the present setting the fields are sections over the skeleton, bounded with respect to~$\nu$, and their divergences are functions on~$X$, bounded with respect to~$m$.
\begin{proof}
\emph{Step 1: the polar set.} The functional~$J$ is the lower semicontinuous envelope on $L^1(X,m)$ of the functional which is equal to $\|\nabla u\|_{L^1(\nu)}$ on~$\cC_1$ and to~$+\infty$ elsewhere, and the latter is convex and positively homogeneous. Hence $J$ is convex, lower semicontinuous and positively homogeneous. By the Hahn--Banach theorem, applied to its closed convex epigraph, it is the support function of a subset of the dual space $L^\infty(X,m)$:
\begin{equation}\label{eq:BV-polar}
J(f)=\sup_{h\in\mathcal K}\int_Xf\,h\,dm\,,\qquad\mathcal K=\Bigl\{h\in L^\infty(X,m):\ \int_Xv\,h\,dm\le J(v)\text{ for all }v\in L^1(X,m)\Bigr\}\,.
\end{equation}
Moreover $h\in\mathcal K$ if and only if
\begin{equation}\label{eq:BV-polar-core}
\Bigl|\int_Xu\,h\,dm\Bigr|\le\|\nabla u\|_{L^1(\nu)}\qquad\text{for every }u\in\cC_1\,.
\end{equation}
Indeed, $J(u)\le\|\nabla u\|_{L^1(\nu)}$ on~$\cC_1$, and $\cC_1$ is stable under $u\mapsto-u$. Conversely, if~\eqref{eq:BV-polar-core} holds and $u_k\in\cC_1$ converges to~$v$ in $L^1(X,m)$, then $\int_Xv\,h\,dm=\lim_k\int_Xu_k\,h\,dm\le\liminf_k\|\nabla u_k\|_{L^1(\nu)}$.
\emph{Step 2: representation by a field.} Let $h\in\mathcal K$. By~\eqref{eq:BV-polar-core}, the map $\nabla u\mapsto\int_Xu\,h\,dm$ is well defined on the linear subspace $\{\nabla u:u\in\cC_1\}$ of $L^1(\cS,\cH,\nu)$, and it has norm at most one. By the Hahn--Banach theorem it extends to a linear form of norm at most one on $L^1(\cS,\cH,\nu)$, which by the duality of Section~\ref{subsec:setting} is represented by a field $W\in L^\infty(\cS,\cH,\nu)$ with $\|W\|_\infty\le1$. Thus $V=-W$ satisfies~\eqref{eq:div-bounded}, that is, $h=\diver V$.
\emph{Step 3: conclusion.} Conversely, if $\|V\|_\infty\le1$ and $(V,h)$ satisfies~\eqref{eq:div-bounded}, then $h$ satisfies~\eqref{eq:BV-polar-core}, so $h\in\mathcal K$ and $-h\in\mathcal K$. Formula~\eqref{eq:BV-duality} is therefore~\eqref{eq:BV-polar}.
\end{proof}
\paragraph{The coarea formula.} The classical coarea formula for functions of bounded variation~\cite[Theorem~3.40]{AFP00} expresses the total variation as the integral of the perimeters of the superlevel sets.
\begin{theorem}\label{thm:global-coarea}
For every $f\in L^1(X,m)$,
\begin{equation}\label{eq:global-coarea}
\|Df\|(X)=\int_0^\infty
\bigl(P(\{f>t\})+P(\{f<-t\})\bigr)\,dt\,,
\end{equation}
where the equality holds in $[0,\infty]$. In particular, for a function of $BV(X,m)$ and almost every $t>0$, the sets $\{f>t\}$ and $\{f<-t\}$ have finite perimeter. For Borel sets $E,F$ of finite $m$-measure,
\begin{equation}\label{eq:perimeter-submodular}
P(E\cup F)+P(E\cap F)\le P(E)+P(F)\,.
\end{equation}
\end{theorem}
The proof adapts the truncation and relaxation argument of~\cite[Proposition~4.2]{Miranda03}. The inequality ``$\ge$'' is proved by truncating a recovery sequence; the inequality ``$\le$'' follows from the duality formula~\eqref{eq:BV-polar}. Only the global functional~$J$ is used.
\begin{proof}
For $f\in L^1(X,m)$, both maps $t\mapsto\ind_{\{f>t\}}$ and $t\mapsto\ind_{\{f<-t\}}$ are right-continuous from $(0,\infty)$ to $L^1(X,m)$. Their compositions with the lower semicontinuous functional~$J$ are therefore Borel measurable, and the integral in~\eqref{eq:global-coarea} is defined.
\emph{Step 1: the core.} For $u\in\cC_1$, $t\ge0$ and $\varepsilon>0$, the functions
\begin{equation*}
u_{t,\varepsilon}^{\pm}=\min\Bigl\{1,\frac{(\pm u-t)_+}{\varepsilon}\Bigr\}
\end{equation*}
belong to~$\cC_1$ and converge in $L^1(X,m)$ to $\ind_{\{\pm u>t\}}$ as $\varepsilon\downarrow0$. The chain rule of Lemma~\ref{lem:calculus}\ref{calc:chain} gives
\begin{equation*}
|\nabla u_{t,\varepsilon}^{\pm}|
=\varepsilon^{-1}\,\ind_{\{t<\pm u 1$ at an admissible exponent, $\overline{\cE}_p=\cE_p$ by Theorem~\ref{thm:KS}.
\begin{theorem}\label{thm:KS-GN}
Let $1\le p<\infty$, $\alpha,Q>0$ and $0 1$. It uses the bound of the gradient by the Lipschitz constant, and not only a representation of energy measures; the references above supply the methods which we adapt, under different hypotheses.
The chapter is organized as follows. Section~\ref{subsec:rank-p} states the results and explains the idea of the proof. Section~\ref{subsec:rank-metric} contains the metric input: a Lipschitz function oscillates linearly near almost every point where its gradient does not vanish, and $k$~independent gradients push the gradient measure forward to a measure on~$\R^k$ which is absolutely continuous. Section~\ref{subsec:rank-volume} deduces elementary bounds of the rank by the volume growth and the Poincar\'e scale. Section~\ref{subsec:rank-tools} proves two auxiliary lemmas, and Section~\ref{subsec:rank-proof} proves the rank theorem.
\subsection{Statements}\label{subsec:rank-p}\label{subsec:rank-one}
All assertions concern a rank which may vary from point to point. Recall that a positive function~$\Psi$ has the lower scaling exponent~$a$ if $\Psi(R)/\Psi(r)\ge c(R/r)^a$ for $0 p$. Assume that there are $C<\infty$ and $\Lambda\ge2$ such that, for every sufficiently small ball $B=B(x,r)$,
\begin{equation}\label{eq:rank-p-PI}
\int_B|u-u_B|^p\,dm\le C\,\Psi(r)\int_{\Lambda B\cap\cS}|\nabla u|^p\,d\nu\qquad(u\in\cC_p)\,,
\end{equation}
and that $B$ admits $\chi\in\cC_p$ with
\begin{equation}\label{eq:rank-p-cutoff}
\ind_B\le\chi\le\ind_{\Lambda B}\,,\qquad
\int_\cS|\nabla\chi|^p\,d\nu\le C\,\frac{m(B)}{\Psi(r)}\,.
\end{equation}
Then $n_* 1$.
\end{corollary}
The corollary is proved at the end of Section~\ref{subsec:rank-volume}. It exhibits a dichotomy at matching scales. Either the scale is the Euclidean one, $\Psi_{C,p}(r)=r^p$, and the gradient measure is absolutely continuous; or the scale is of higher order, and the rank is smaller than the exponent. For the tree of cubes of Chapter~\ref{sec:riemannian-gluings}, which has rank~$n$ and $s=n 2$, so that
\begin{equation}\label{eq:rank-one-scale}
\frac{\Psi(R)}{\Psi(r)}\ge c\Bigl(\frac Rr\Bigr)^{a_2}\,,\qquad 0 p$, set
\begin{equation*}
V(w)=\frac{w}{|w|^p}\,,\qquad\text{so that}\qquad
\diver V(w)=\frac{N-p}{|w|^p}\,,\qquad
|V(w)|^{p'}=\frac{1}{|w|^p}\,.
\end{equation*}
If $N=p$, set instead
\begin{equation*}
V(w)=\frac{w}{|w|^p\,\ell(w)^{p-1}}\,,\qquad\text{so that}\qquad
\diver V(w)=\frac{p-1}{|w|^p\,\ell(w)^p}\,,\qquad
|V(w)|^{p'}=\frac{1}{|w|^p\,\ell(w)^p}\,.
\end{equation*}
In both cases $\diver V=c\,|V|^{p'}$ on $\{0<|w|<1\}$, where $c=N-p>0$ in the first case and $c=p-1>0$ in the second, and $\langle\nabla\ell,V\rangle<0$.
\emph{Step 2: a Hardy inequality for~$\kappa$.} Choose $\chi\in C_c^\infty(B(0,3/4))$ with $0\le\chi\le1$ and $\chi=1$ on~$B(0,1/2)$, and a nonincreasing function $\theta\in C^\infty(\R)$ with $0\le\theta\le1$, $\theta=1$ on $(-\infty,1]$ and $\theta=0$ on $[2,\infty)$. For $\varepsilon>0$, the field
\begin{equation*}
\varphi_\varepsilon(w)=\chi(w)\,\theta(\varepsilon\ell(w))\,V(w)
\end{equation*}
vanishes for $|w|\le e^{-2/\varepsilon}$, and it extends by zero to a smooth compactly supported field on~$\R^N$. Its divergence is
\begin{equation*}
\diver\varphi_\varepsilon=\chi\,\theta(\varepsilon\ell)\,\diver V+\theta(\varepsilon\ell)\,\langle\nabla\chi,V\rangle+\varepsilon\,\chi\,\theta'(\varepsilon\ell)\,\langle\nabla\ell,V\rangle\,.
\end{equation*}
The last term is nonnegative, and the second is bounded by a constant~$C$ independent of~$\varepsilon$, because $\nabla\chi$ is supported in $\{1/2\le|w|\le3/4\}$. With
\begin{equation*}
I_\varepsilon=\int\chi\,\theta(\varepsilon\ell)\,|V|^{p'}\,d\kappa<\infty\,,
\end{equation*}
the hypothesis~\eqref{eq:rank-p-ibp} and the inequality $|\varphi_\varepsilon|^{p'}\le\chi\,\theta(\varepsilon\ell)\,|V|^{p'}$ give
\begin{equation*}
c\,I_\varepsilon-C\,\kappa(\R^N)
\le\int\diver\varphi_\varepsilon\,d\kappa
\le C_0\,I_\varepsilon^{1/p'}\,.
\end{equation*}
By Young's inequality, $I_\varepsilon$ is bounded independently of~$\varepsilon$. As $\varepsilon\downarrow0$, $\theta(\varepsilon\ell)$ increases to~$1$ on $\{0<|w|<1\}$, and the monotone convergence theorem gives
\begin{equation}\label{eq:rank-p-Hardy}
\int_{\{0<|w|<1/2\}}\frac{d\kappa(w)}{|w|^p}<\infty\quad(N>p)\,,\qquad
\int_{\{0<|w|<1/2\}}\frac{d\kappa(w)}{|w|^p\log^p(1/|w|)}<\infty\quad(N=p)\,.
\end{equation}
\emph{Step 3: the case $N>p$.} Let $\phi_k$ be a smooth radial function which is equal to one on $B(0,2^{-k-1})$, vanishes outside $B(0,2^{-k})$, and satisfies $0\le\phi_k\le1$ and $|\nabla\phi_k|\le C2^k$. Then $\phi_k\to\ind_{\{0\}}$ pointwise, and by~\eqref{eq:rank-p-Hardy}
\begin{equation*}
\int|\nabla\phi_k|^p\,d\kappa\le C\int_{\{2^{-k-1}\le|w|\le2^{-k}\}}\frac{d\kappa(w)}{|w|^{p}}\longrightarrow0\,.
\end{equation*}
\emph{Step 4: the case $N=p$.} Choose a nondecreasing function $\tau\in C^\infty(\R)$ with $0\le\tau\le1$, $\tau=0$ on $(-\infty,1]$ and $\tau=1$ on $[2,\infty)$, and put $\phi_k(w)=\tau(\ell(w)/k)$ for $0<|w|<1$, $\phi_k(0)=1$, and $\phi_k=0$ outside the unit ball. Then $\phi_k\in C_c^\infty(\R^N)$, $\phi_k\to\ind_{\{0\}}$ pointwise, and $\nabla\phi_k$ is supported in $\{e^{-2k}\le|w|\le e^{-k}\}$, where $k\le\ell\le2k$ and
\begin{equation*}
|\nabla\phi_k(w)|^p\le\frac{C}{k^p\,|w|^p}\le\frac{C}{|w|^p\,\ell(w)^p}\,.
\end{equation*}
By the second part of~\eqref{eq:rank-p-Hardy} and dominated convergence, $\int|\nabla\phi_k|^p\,d\kappa$ tends to zero.
\end{proof}
\subsection{Proof of the rank theorem}\label{subsec:rank-proof}
We prove Theorem~\ref{thm:rank-p} by contradiction. Throughout this section the hypotheses of the theorem are in force, and we suppose that $n_*\ge p$. Let $N=\lceil p\rceil$, so that $N\ge p$ and $\nu(\{n\ge N\})>0$.
The argument adapts the approach by Euclidean images of~\cite[Section~3]{Hi13b} and~\cite[Proposition~4.3]{Hi25Rank}; compare also~\cite[Proposition~2.6 and Lemmas~3.4--3.5]{CM26Rank}. Two points differ from these references. In place of harmonic coordinates, whose energy flux is divergence-free, we use arbitrary functions of the core and approximate their flux by fields which have a divergence; such fields are dense because the gradient is closable. Second, the atom which produces the final contradiction comes from the bound of the gradient by the Lipschitz constant, through Lemma~\ref{lem:lower-oscillation}.
\paragraph{Plan.} The proof has eight steps.
\begin{itemize}
\item Steps~1 to~3 choose $N$ coordinate functions, a base point~$x$ and radii $r_j\to0$, and normalize the coordinates, the reference measure and the energy measure at the scale~$r_j$.
\item Steps~4 and~5 use the dual form of closability to show that the normalized coordinates have oscillation of order one on the ball $B(x,r_j)$.
\item Step~6, the only one which uses $a>p$, produces a ball of radius comparable to~$r_j$ on which the normalized coordinates become constant.
\item Steps~7 and~8 pass to the image measures on~$\R^N$ and conclude.
\end{itemize}
Constants denoted by $C$ and~$c$ do not depend on the index~$j$, and the estimates hold for $j$ large enough.
\begin{proof}[Proof of Theorem~\ref{thm:rank-p}]
\emph{Step 1: coordinates, and a lower bound for their energy measure.} By Lemma~\ref{lem:rank-Gram}, applied to a spanning sequence in~$\cC_p$, there are $f_1,\ldots,f_N\in\cC_p$ whose gradients are linearly independent on a Borel subset of $\{n\ge N\}$ of positive $\nu$-measure. Let
\begin{equation*}
F=(f_1,\ldots,f_N)\,,\qquad
w=\sum_{i=1}^N|\nabla f_i|^2\,,\qquad
\mu=w^{p/2}\,\nu\,,\qquad
M_{il}=\frac{\langle\nabla f_i,\nabla f_l\rangle}{w}\,\ind_{\{w>0\}}\,.
\end{equation*}
The measure~$\mu$ is finite because $\nabla f_i\in L^p(\nu)$; it plays the role of the $p$-energy measure of the map~$F$. The matrix~$M$ is symmetric and nonnegative, with trace one on $\{w>0\}$, so $|M|\le1$, and it is positive definite on the set where the gradients are independent. As in Step~1 of the proof of Proposition~\ref{prop:rank-Poincare}, \eqref{eq:uniform-lower-oscillation} and inner regularity give a compact subset~$K$ of this set, with $\mu(K)>0$, and constants $c_0,\rho_0>0$ such that
\begin{equation*}
\osc_{B(y,r)}f_1\ge c_0\,r
\qquad(y\in K,\ 0 1$ implies a $(1,q)$-Poincar\'e inequality for some $q p$, $0<\varepsilon_0 t\}$ is covered by stopping balls, and its size is measured by the number $\Theta_u(t)$, the largest sum of the gauges of disjoint stopping balls. The Poincar\'e inequality gives the weak-type bound
\begin{equation*}
t^p\,\Theta_u(t)\le C\int_\cS g^p\,d\nu\,.
\end{equation*}
The goal is to improve the exponent~$p$ in this bound to some $q t\}\quad(t>0)\,.
\end{equation}
The supremum is over the balls of radius at most~$D$ which contain~$x$. Whenever a ball of radius larger than~$D$ occurs in an argument, it is replaced by~$X$, with $r_X=D$. The function~$u^\sharp$ is lower semicontinuous, because the balls are open, so the sets~$U_t$ are open, and
\begin{equation*}
\lambda_0\le u^\sharp\le2\Lip(u)\,.
\end{equation*}
If $\lambda_0=0$, then $u$ is constant, because it is continuous and $m$ has full support, and~\eqref{me:eq:compact} holds. We assume $\lambda_0>0$. We shall use repeatedly that, by~\ref{me:C1}, if $B\subset B'$ and $r_{B'}\le Cr_B$, where $B'$ may be~$X$, then
\begin{equation}\label{me:eq:omega-comparison}
\omega(B)\le C\,\omega(B')\,.
\end{equation}
The first lemma says that $u$ is Lipschitz on the set where $u^\sharp$ is bounded. It is the Lipschitz case of the telescoping argument in~\cite[Lemma~4.12]{KLVZ}.
\begin{lemma}\label{me:lem:good-lip}
For every $t\ge\lambda_0$,
\begin{equation}\label{me:eq:good-lip}
|u(x)-u(y)|\le C\,t\,d(x,y)\qquad(x,y\in X\setminus U_t)\,,
\end{equation}
and there is $v_t\in\Lip(X)$ with $\Lip(v_t)\le Ct$, $\inf u\le v_t\le\sup u$ and $v_t=u$ on $X\setminus U_t$. Moreover
\begin{equation}\label{me:eq:grad-sharp}
g\le C\,u^\sharp\qquad\nu\text{-almost everywhere.}
\end{equation}
\end{lemma}
\begin{proof}
Let $x,y\in X\setminus U_t$ and $\rho=d(x,y)$. The balls $B(x,2^{-j}\rho)$, $j\ge0$, contain~$x$, so $\omega\le t$ on them, and
\begin{equation*}
|u_{B(x,2^{-j-1}\rho)}-u_{B(x,2^{-j}\rho)}|\le C\fint_{B(x,2^{-j}\rho)}|u-u_{B(x,2^{-j}\rho)}|\,dm\le C\,t\,2^{-j}\rho\,.
\end{equation*}
Summing over~$j$ gives $|u(x)-u_{B(x,\rho)}|\le Ct\rho$, and similarly at~$y$. The balls $B(x,\rho)$ and $B(y,\rho)$ are contained in $B(x,2\rho)$, on which $\omega\le t$. Hence $|u_{B(x,\rho)}-u_{B(y,\rho)}|\le Ct\rho$. This proves~\eqref{me:eq:good-lip}. If $X\setminus U_t\ne\varnothing$, let~$v_t$ be the McShane extension~\cite[pp.~43--44]{Hei01} of $u|_{X\setminus U_t}$ with the constant~$Ct$, truncated at $\inf u$ and $\sup u$. When $X\setminus U_t$ is empty, take~$v_t$ constant. By Lemma~\ref{lem:calculus}\ref{calc:local} and~\ref{cond:gradient}, $g=|\nabla v_t|\le Ct$ $\nu$-almost everywhere on $\{u^\sharp\le t\}$. Applying this to the rational numbers $t\ge\lambda_0$ gives~\eqref{me:eq:grad-sharp}.
\end{proof}
\subsubsection{Stopping balls}
The set~$U_t$ is covered by balls on which the oscillation exceeds~$t$ and which are maximal for this property. The stopping rule follows~\cite[Section~4.4]{KLVZ}. The difference with the classical argument is the way in which the size of~$U_t$ is measured: by the gauges of the stopping balls, and not by the measure of~$U_t$.
\begin{definition}\label{me:def:stopping}
Let $t\ge\lambda_0$. A ball~$B$ is a \emph{stopping ball at the level~$t$} if $\omega(B)>t$ and if there is a point $x\in B$ such that $\omega(B')\le t$ for every ball $B'\ni x$ with $r_{B'}\ge2r_B$. We put
\begin{equation}\label{me:eq:Thetau}
\Theta_u(t)=\sup\Bigl\{\sum_{B\in\mathcal B}\Theta(B):\ \mathcal B\text{ is a finite family of disjoint stopping balls at the level }t\Bigr\}\quad(t\ge\lambda_0)\,,
\end{equation}
and $\Theta_u(t)=\Theta(X)$ for $0 \lambda_0/2$ and an integer $k\ge1$ with $2^k\ge H_0$, where $H_0$ is the constant of Lemma~\ref{me:lem:overlap}, we put
\begin{equation}\label{me:eq:average}
t_i=A_1\,2^i\,\lambda\quad(k\le i\le2k-1)\,,\qquad\bar w=\frac1k\sum_{i=k}^{2k-1}w_{t_i}\,.
\end{equation}
Since $U_{ct_i}\subset U_{2^k\lambda}$ and $t_i\le A_14^k\lambda$, Lemma~\ref{me:lem:level} gives
\begin{equation}\label{me:eq:wbar}
\bar w=u\quad\text{on }X\setminus U_{2^k\lambda}\,,\qquad|\nabla\bar w|\le g\,\ind_{\{u^\sharp\le A_14^k\lambda\}}+\frac1k\sum_{i=k}^{2k-1}F_{t_i}\,.
\end{equation}
The gain comes from the fact that the functions $F_{t_i}$ have geometrically increasing sizes: the $p$-th power of their sum is comparable to the sum of their $p$-th powers, so that the factor $k^{-1}$ in the average becomes a factor $k^{-p}$ in front of a sum of only $k$ terms.
\begin{lemma}\label{me:lem:averaged-energy}
With the notation~\eqref{me:eq:average} and the functions~$F_t$ of Lemma~\ref{me:lem:level},
\begin{equation*}
\int_\cS\Bigl(\frac1k\sum_{i=k}^{2k-1}F_{t_i}\Bigr)^p\,d\nu\le\frac C{k^p}\sum_{i=k}^{2k-1}t_i^p\,\Theta_u(t_i)\,.
\end{equation*}
\end{lemma}
\begin{proof}
We first prove a numerical inequality. Let $\beta_i$ be numbers with $0\le\beta_i\le C't_i$, and put $S=\sum_i\beta_i$. We claim that
\begin{equation}\label{me:eq:geometric-sum}
S^p\le C\sum_it_i^{p-b}\beta_i^b\,.
\end{equation}
Let $S>0$. Since the numbers $t_i$ are geometrically spaced, the indices with $t_i 0$, with constants independent of $\varepsilon$.
\end{lemma}
The cylinders $U_\delta^-$ lie in the past, $U_\delta^+$ in the future, and $U^\pm_{1/2}$ are the cylinders $Q_\pm$ of Theorem~\ref{hk:thm:h-local-harnack} in the normalized units, with $t_0=0$.
\begin{proof}
We first work with a solution which is bounded above and bounded away from zero on the interior cylinders.
\emph{Step 1: energy estimates for positive powers.} For $0 0$. Then
\begin{equation}\label{hk:eq:h-bombieri-output}
\log\bigl(\max\{1,\esssup_{U_{1/2}}f\}\bigr)\le C\,L\,M^2\,,
\end{equation}
where $C$ depends only on $p_0$ and $\gamma$.
\end{lemma}
\begin{proof}
This is a quantitative form of~\cite[Lemma~5.2]{LierlPHI}. Write $S(\delta)=\log\max\{e,\esssup_{U_\delta}f\}$. Splitting the integral at $\log f=S(\delta)/2$ and using the second hypothesis gives
\begin{equation*}
\int_{U_\delta}f^p\le\frac{2L}{S(\delta)}\,e^{pS(\delta)}
+e^{pS(\delta)/2}\,.
\end{equation*}
If $S=S(\delta)>2L$, choose $p=2S^{-1}\log(S/(2L))$, for which the two terms are equal. For $S$ above a constant depending only on $p_0$, this number lies in $(0,p_0)$, and the first hypothesis in~\eqref{hk:eq:h-bombieri-input} implies
\begin{equation*}
\log\esssup_{U_{\delta'}}f
\le\frac S2\left[1+
\frac{\log(2M(\delta-\delta')^{-\gamma})}{\log(S/(2L))}\right]\,.
\end{equation*}
If $S\ge2L[2M(\delta-\delta')^{-\gamma}]^2$, the right-hand side is at most $3S/4$. If this condition or the preceding threshold fails, then $S\le CLM^2(\delta-\delta')^{-2\gamma}$. In all cases,
\begin{equation*}
S(\delta')\le\frac34\,S(\delta)
+C\,L\,M^2(\delta-\delta')^{-2\gamma}\,.
\end{equation*}
Iterate with $\delta_j=1-[2(j+1)]^{-1}$. The resulting series converges, because $\delta_{j+1}-\delta_j\asymp(j+1)^{-2}$ and $\sum_j(3/4)^j(j+1)^{4\gamma}<\infty$, and the terminal term tends to zero since $f$ is bounded on $U_1$.
\end{proof}
\begin{proof}[Proof of Theorem~\ref{hk:thm:h-local-harnack}]
Normalize as in~\eqref{hk:eq:h-normalization}, with $t_0=0$, and put~$u_\varepsilon=u+\varepsilon$ and~$K=1+A+B$.
\emph{Step 1: the logarithmic estimate.} Let $\psi$ be the cutoff function of Lemma~\ref{hk:lem:h-weighted-cutoff} for $B(x,3/4)\subset B(x,1)$, with a fixed value of its parameter. It satisfies~$\int\psi^2\,dm\asymp1$, the weighted Poincar\'e inequality with the coefficient~$CA$, and~$\cE(\psi,\psi)\le CB$, by~\eqref{hk:eq:h-weighted-cs} applied to a function equal to one on the annulus. Lemma~\ref{hk:h:cutoff-logarithm} applies, with $T=1$. Let~$c_\varepsilon=Y_\varepsilon(0)$, and choose~$C_0$ so that~$2\,\cE(\psi,\psi)/\int\psi^2\,dm\le C_0B$.
\emph{Step 2: the two functions.} On the families $U^-_\delta$ and $U^+_\delta$ of~\eqref{hk:eq:h-nested-cylinders}, respectively, set
\begin{equation*}
f_-=(e^{-c_\varepsilon-C_0B}\,u_\varepsilon)^{1/K}\,,\qquad
f_+=(e^{c_\varepsilon-C_0B}\,u_\varepsilon^{-1})^{1/K}\,.
\end{equation*}
Since~$\psi=1$ on the spatial projections of these cylinders, \eqref{hk:h:cutoff-log-tails} with $\ell=K\lambda$ gives
\begin{equation*}
|\{\log f_\pm>\lambda\}\cap U_1^\pm|
\le \frac{CA}{K\lambda}\le\frac C\lambda\,.
\end{equation*}
For~$0 0}\left(\frac Rs-\frac t{\Psi(s)}\right)\,.
\end{equation}
For a power~$\Psi(s)=s^\beta$, this is a constant multiple of $(R^\beta/t)^{1/(\beta-1)}$, so that $\exp[-c\,\mathcal A_\Psi(d(x,y),t)]$ is the sub-Gaussian factor $\exp[-c\,(d(x,y)^\beta/t)^{1/(\beta-1)}]$, and the Gaussian factor for $\beta=2$.
\paragraph{Conventions.} The assertions on kernels hold for $m\otimes m$-almost every pair of points at each fixed time. On the diagonal we use the value given by the semigroup property,
\begin{equation}\label{hk:eq:diagonal-version}
p_t(x,x)=\int_Xp_{t/2}(x,z)^2\,dm(z)\,.
\end{equation}
\paragraph{Results.} Table~\ref{tab:heat-kernel} summarizes the main estimates. Each is of the form
\begin{equation*}
p_t(x,y)\ \lessgtr\ (\text{prefactor})\times\exp\bigl[\mp(\text{decay})\bigr]\,.
\end{equation*}
The estimates with the volumes of balls in the prefactor require only volume doubling. Those with a function of the time alone require the uniform volume growth~\hV. When the two scales coincide, the upper and lower bounds match and are the classical two-sided sub-Gaussian estimates (Corollaries~\ref{hk:cor:vd-matching} and~\ref{hk:cor:global-matching}). When they differ, the upper and lower bounds are of different orders, and no claim of optimality is made.
\begin{table}[htbp]
\centering\small
\setlength{\tabcolsep}{4pt}\renewcommand{\arraystretch}{1.35}
\begin{tabular}{@{}p{.21\textwidth}p{.24\textwidth}p{.25\textwidth}p{.22\textwidth}@{}}
\toprule
Statement & Hypotheses & Prefactor & Decay\\
\midrule
Theorem~\ref{hk:thm:vd-mixed-upper} (upper) & global \hVD, $\PI(\Psi_P)$, $\CSA(\Psi_S)$ & volumes of balls of an arbitrary radius~$r$, polynomial in $\Psi_P(r)/t$, $t/\Psi_S(r)$ & $\mathcal A_{\Psi_S}$\\
Corollary~\ref{hk:cor:vd-matching} (two-sided) & the same, $\Psi_P\asymp\Psi_S=\Psi$ & $m(B(x,\Psi^{-1}(t)))^{-1}$ & $\mathcal A_\Psi$\\
Theorem~\ref{hk:thm:mixed-upper} (upper, small~$t$) & local $\mathrm V(r^Q)$, $\PI(r^a)$, $\CSA(r^\beta)$ & $t^{-Q/a}$ & $(d^\beta/t)^{1/(\beta-1)}$\\
Theorem~\ref{hk:thm:lower-global} (lower, small~$t$) & the same & $t^{-2Q/(a+\beta)}\exp(-Ct^{-q})$ & $(d^{b_-}/t)^{1/(b_--1)}$\\
Theorem~\ref{hk:thm:global-mixed-upper} (upper) & global \hV, $\PI(\Psi_P)$, $\CSA(\Psi_S)$ & $\Phi(\Psi_P^{-1}(t))^{-1}$ & $\mathcal A_{\Psi_S}$\\
Theorem~\ref{hk:thm:global-lower} (lower) & the same & $\Phi(R_t)^{-1}$ & variational, \eqref{hk:eq:global-variational-lower}\\
Corollary~\ref{hk:cor:global-matching} (two-sided) & the same, $\Psi_P\asymp\Psi_S=\Psi$ & $\Phi(\Psi^{-1}(t))^{-1}$ & $\mathcal A_\Psi$\\
\bottomrule
\end{tabular}
\caption{Heat kernel estimates of Chapter~\ref{sec:hk-chapter}. Here $d=d(x,y)$, and $q$, $b_-$ and $R_t$ are defined in~\eqref{hk:eq:lower-alpha-q}, \eqref{hk:eq:lower-effective-exponent} and~\eqref{hk:eq:global-confinement-radius}.}\label{tab:heat-kernel}
\end{table}
\paragraph{Methods.} The upper bounds are obtained by Davies' method~\cite{Davies87}: the semigroup is conjugated by the exponential of a multiple of a cutoff function, and the cost of the conjugation is controlled by the cutoff Sobolev inequality. The lower bounds are obtained by chaining the parabolic Harnack inequality of Theorem~\ref{hk:thm:h-local-harnack} along geodesics, starting from a lower bound on the diagonal which comes either from a cutoff function, by the spectral theorem, or from the confinement of the heat in a ball. These methods are classical; what is specific here is that the two scales are kept separate throughout.
\subsection{The heat kernel under volume doubling}\label{hk:sec:vd-kernels}
\paragraph{Existence.} The $L^2$ mean value inequality gives a heat kernel without any uniform lower bound for the volumes of balls.
\begin{proposition}\label{hk:prop:vd-kernel-existence}
Under the local hypotheses of Chapter~\ref{sec:harnack-chapter}, the semigroup has a symmetric measurable heat kernel. For every $t>0$ and every compact set $K\subset X$, the map $P_t:L^2(X,m)\to L^\infty(K,m)$ is bounded. The kernel of the semigroup killed outside an open set has the same properties locally in that set.
\end{proposition}
\begin{proof}
Fix a relatively compact ball $B=B(x,r)$ on which the hypotheses and their required dilations hold, and fix $t>0$. Apply Lemma~\ref{hk:lem:h-forward-bound} to $s\mapsto P_sf$ on a cylinder with the spatial ball~$B$ and a time interval contained in $(t/2,3t/2)$, whose smaller cylinder contains the time~$t$. Since $P_s$ is a contraction of~$L^2$,
\begin{equation*}
\|P_tf\|_{L^\infty(B(x,r/2))}^2
\le \frac{C_{r,t}}{m(B(x,r))}\|f\|_2^2\,.
\end{equation*}
For signed $f$, use $|P_sf|\le P_s|f|$. The constant is finite for each fixed $r$ and~$t$, and the continuity of $s\mapsto P_sf$ in~$L^2$ makes the estimate valid at the time~$t$. A finite cover gives the assertion on $K$.
The construction of the kernel is the argument of~\cite[Section~6, proof of Proposition~6.3]{LierlPHI}. Since $L^2(X,m)$ is separable, the local boundedness from $L^2$ to~$L^\infty$ and the Riesz representation theorem give a measurable kernel for $P_{t/2}$ whose rows belong to~$L^2$. Composing $P_{t/2}$ with itself gives a nonnegative symmetric measurable kernel for $P_t$, with the semigroup property and~\eqref{hk:eq:diagonal-version}. The same argument applies to the semigroup killed outside an open set: its orbits are caloric in the interior, and it is a contraction of~$L^2$.
\end{proof}
In particular the rows $p_t(x,\cdot)$ of the kernel belong to $L^2(X,m)$ at positive times, and for $\varepsilon>0$ the function $(t,y)\mapsto p_t(x,y)$ is, for almost every~$x$, a weak solution of the heat equation on $(\varepsilon,\infty)\times X$. The arguments below which apply the Harnack inequality to the kernel use only this fact; no global ultracontractivity is needed.
\paragraph{Davies' perturbations.} Let $\psi$ be a bounded function. The kernel of the conjugated operator $e^{\psi}P_te^{-\psi}$ is $e^{\psi(x)-\psi(y)}p_t(x,y)$. A bound on the norm of this operator therefore gives a bound on~$p_t(x,y)$ with the factor $e^{\psi(y)-\psi(x)}$, which is small when $\psi$ is a large multiple of a cutoff function equal to one near~$x$ and vanishing near~$y$. The norm of the conjugated semigroup grows at a rate determined by $\int f^2\,d\Gamma(\psi)$, and this is the quantity which the cutoff Sobolev inequality controls. On a Riemannian manifold one takes $\psi$ Lipschitz, with $d\Gamma(\psi)\le|\nabla\psi|^2\,dm$; when the energy measures are singular this is not possible, and the functions~$\psi$ must be constructed from the cutoff functions of the hypothesis. This construction is due to Andres and Barlow~\cite[Lemma~5.1]{AB} and to Murugan and Saloff-Coste~\cite[Lemmas~2.1--2.2 and Proposition~2.3]{MSC}.
We state the construction for a scale function~$S$ satisfying~\eqref{hk:eq:global-weak-scaling}, with an upper exponent $\beta_+\ge2$, and for a range of widths bounded by $r_0\in(0,\infty]$. For every annulus
\begin{equation*}
A=B(z,R+s)\setminus\overline{B(z,R)}\,,
\qquad z\in X\,,\quad R>0\,,\quad 0 0$ and $m$-almost all $x,y$,
\begin{equation}\label{eq:HKchar-upper}
p_t(x,y)\le\frac{C}{m(B(x,r_t))}\,e^{-c\,\mathcal H(d(x,y),t)}\,,
\end{equation}
then
\begin{equation}\label{eq:HKchar-P}
\sup_{t>0}\frac{I_p(f,t)}{\Psi_{P,p}(r_t)}
\le C\,\cE_p(f)\,,\qquad f\in L^p(X,m)\,.
\end{equation}
\item\label{HKc:lower} If there are $c>0$ and $0<\varepsilon\le1$ such that, for all $t>0$ and $m$-almost all $x,y$,
\begin{equation}\label{eq:HKchar-near-diagonal}
p_t(x,y)\ge\frac{c}{m(B(x,r_t))}
\qquad\text{when }d(x,y)<\varepsilon\,r_t\,,
\end{equation}
then
\begin{equation}\label{eq:HKchar-C}
\cE_p(f)\le C\liminf_{t\to0}N_p(f,t)\,,
\qquad f\in L^p(X,m)\,.
\end{equation}
\end{enumerate}
At $p=1$, the same implications hold with $\|Df\|(X)$ in place of $\cE_p(f)$, without any assumption of admissibility at the exponent one. Neither implication requires the semigroup to be conservative.
\end{theorem}
As in Theorem~\ref{thm:KS}, the upper bound involves the Poincar\'e scale and the lower bound the cutoff scale; the upper bound uses only an upper estimate of the heat kernel, and the lower bound only a near-diagonal lower estimate.
\begin{proof}
\ref{HKc:upper} We use the decomposition into annuli of~\cite[proof of Proposition~4.2]{ABCRST2} and~\cite[proof of Theorem~2.4]{ABCRST3}, with scale functions in place of powers. Put $r=r_t$. On the annulus $2^{k-1}r\le d(x,y)<2^kr$, $k\ge1$, Lemma~\ref{lem:heatcost}\ref{hc:far} and~\eqref{eq:HKchar-upper} bound the kernel by $C\,m(B(x,r))^{-1}e^{-c2^{k\gamma}}$, where $\gamma=\beta_+/(\beta_+-1)>1$. The same bound with $k=0$ holds in $B(x,r)$. Doubling gives $m(B(x,2^kr))/m(B(x,r))\le C\,2^{kD}$ for a fixed exponent~$D$. Consequently, if $b$ is an upper scaling exponent of~$\Psi_{P,p}$,
\begin{align*}
I_p(f,t)&\le C\sum_{k\ge0}2^{kD}e^{-c2^{k\gamma}}D_p(f,2^kr)\\
&\le C\,\Psi_{P,p}(r)\,\sup_{\rho>0}\frac{D_p(f,\rho)}{\Psi_{P,p}(\rho)}\,
\sum_{k\ge0}2^{k(D+b)}e^{-c2^{k\gamma}}\,,
\end{align*}
and the series converges. The first inequality in~\eqref{eq:KS}, with $\overline{\cE}_p=\cE_p$ for $p>1$ by Theorem~\ref{thm:KS}\ref{KS:closed} and $\overline{\cE}_1(f)=\|Df\|(X)$ for $p=1$, proves~\eqref{eq:HKchar-P}.
\ref{HKc:lower} Restricting the integral to the pairs with $d(x,y)<\varepsilon r_t$, as in~\cite[proof of Theorem~3.2]{PP10}, the bound~\eqref{eq:HKchar-near-diagonal} and doubling give
\begin{align*}
I_p(f,t)&\ge c\int_X\frac{1}{m(B(x,r_t))}
\int_{B(x,\varepsilon r_t)}|f(x)-f(y)|^p\,dm(y)\,dm(x)
\ge c'\,D_p(f,\varepsilon r_t)\,,\\
N_p(f,t)&\ge c''\,\frac{D_p(f,\varepsilon r_t)}{\Psi_{C,p}(\varepsilon r_t)}\,.
\end{align*}
The second line also uses~\eqref{eq:fixed-dilation-scale} for~$\Psi_{C,p}$. Since $t\mapsto\varepsilon r_t$ is an increasing bijection of $(0,\infty)$ onto itself, the second inequality in~\eqref{eq:KS} proves~\eqref{eq:HKchar-C}. That inequality uses neither~$\PI(\Psi_{P,p})$ nor~\eqref{eq:matching}, and at $p=1$ it gives the statement for $\|Df\|(X)$.
\end{proof}
\begin{corollary}\label{cor:HKchar-matching}
Let $1 0}N_p(f,t)\le C\,\cE_p(f)\,,
\qquad
\cE_p(f)\le C\liminf_{t\to0}N_p(f,t)\,,
\qquad f\in L^p(X,m)\,.
\end{equation}
In particular, $f\in L^p(X,m)$ belongs to $W^{1,p}(X,m)$ if and only if $\sup_{t>0}N_p(f,t)<\infty$. If $\PI(\Psi_{P,1})$ and~\eqref{eq:matching} at $p=1$ hold at all scales, the same inequalities hold with $p=1$ and $\|Df\|(X)$ in place of~$\cE_p(f)$, and $f\in L^1(X,m)$ belongs to $BV(X,m)$ if and only if $\sup_{t>0}N_1(f,t)<\infty$.
\end{corollary}
\begin{proof}
For $p>1$, the structure is $p$-admissible by Theorem~\ref{thm:closability}. The upper bound in~\eqref{eq:HKE} is~\eqref{eq:HKchar-upper}. By Lemma~\ref{lem:heatcost}\ref{hc:near}, $\mathcal H(R,t)$ is bounded when $R\le r_t$, so the lower bound in~\eqref{eq:HKE} gives~\eqref{eq:HKchar-near-diagonal} with $\varepsilon=1$. Apply Theorem~\ref{thm:HKchar} and~\eqref{eq:matching}. The same argument applies at $p=1$. The characterizations of $W^{1,p}(X,m)$ and $BV(X,m)$ follow, because $\cE_p(f)<\infty$ exactly when $f\in W^{1,p}(X,m)$, and $\|Df\|(X)<\infty$ exactly when $f\in BV(X,m)$.
\end{proof}
\clearpage\part{Examples of gradient structures}\label{part:examples}
\chapter{Riemannian and sub-Riemannian structures}\label{sec:riemannian-examples}
This part of the book describes the gradient structures summarized in Table~\ref{tab:scales}. For each example, the following points are verified, in this order.
\begin{enumerate}[label=\textup{(\alph*)}]
\item \emph{The structure.} The Leibniz rule, the bound $|\nabla u|\le\Lip(u)$ and the weak-$*$ continuity of condition~\ref{cond:gradient}; the fibres and the rank.
\item \emph{Recovery of the metric.} The local Sobolev-to-Lipschitz property~\eqref{eq:metric-recovery}, and its uniformity.
\item \emph{Admissibility.} Conditions~\ref{A1} and~\ref{A2} of Definition~\ref{def:admissible}, and the identification of $W^{1,p}(X,m)$ with a known Sobolev space.
\item \emph{Quantitative hypotheses.} Volume doubling, the cutoff condition, the Poincar\'e inequalities, and their scales.
\end{enumerate}
In the present chapter the gradient is the classical differential, or its horizontal part, the gradient measure is the reference measure, and all the scales are Gaussian: $\Psi_{C,p}(r)=\Psi_{P,p}(r)=r^p$. The geometric assumptions needed for the uniform quantitative estimates are stated separately from those needed for the structure itself.
\subsection{Riemannian manifolds}
On a complete Riemannian manifold the gradient measure is the Riemannian volume, and the Sobolev spaces are the classical ones; see~\cite[Chapter~3]{He}. We begin with the fact which gives the Sobolev-to-Lipschitz property: an almost everywhere bound on the gradient of a Lipschitz function controls its increments along geodesics. Its proof uses absolute continuity on almost every member of a family of curves, as in~\cite[Proposition~10.1]{HK}, and then continuity to recover the prescribed geodesic.
\begin{lemma}\label{lem:Lip-from-gradient}
Let $(M,g)$ be a Riemannian manifold with volume measure~$m$, let $\gamma:[0,\ell]\to M$ be an injective unit-speed geodesic, and let $u$ be a locally Lipschitz function on a neighbourhood~$U$ of $\gamma([0,\ell])$, with $|\operatorname{grad}u|\le L$ $m$-almost everywhere on~$U$. Then
\begin{equation*}
|u(\gamma(\ell))-u(\gamma(0))|\le L\,\ell\,.
\end{equation*}
\end{lemma}
\begin{proof}
Let $E_1,\dots,E_{n-1}$ be a parallel orthonormal frame of the normal bundle of~$\gamma$, and let
\begin{equation*}
F(t,s)=\exp_{\gamma(t)}\Bigl(\sum_{i=1}^{n-1}s_iE_i(t)\Bigr)\,,\qquad t\in[0,\ell]\,,\ s\in\R^{n-1}\,,\ |s|<\varepsilon\,.
\end{equation*}
Since $\gamma$ is injective and $[0,\ell]$ is compact, for $\varepsilon$ small enough $F$ is a diffeomorphism onto its image, which is contained in~$U$; these are Fermi coordinates along~$\gamma$. Let $Z\subset U$ be the set of points at which $u$ is not differentiable or $|\operatorname{grad}u|>L$. It is $m$-null, by Rademacher's theorem and by the hypothesis. Then $F^{-1}(Z)$ is a Lebesgue null set and, by Fubini's theorem, for almost every~$s$ the set $\{t:F(t,s)\in Z\}$ has zero length. For such~$s$, the function $t\mapsto u(F(t,s))$ is Lipschitz on~$[0,\ell]$ and has the derivative $\langle\operatorname{grad}u,\partial_tF\rangle$ at almost every~$t$, hence
\begin{equation*}
\bigl|u(F(\ell,s))-u(F(0,s))\bigr|\le L\int_0^\ell|\partial_tF(t,s)|\,dt\,.
\end{equation*}
Letting $s\to0$ along such values, the left-hand side converges to $|u(\gamma(\ell))-u(\gamma(0))|$ and the integral converges to~$\ell$.
\end{proof}
\begin{proposition}\label{prop:manifold}
Let $(M,g)$ be a complete Riemannian manifold of dimension~$n$, with distance~$d$ and volume measure~$m$. Let $(e_1,\dots,e_n)$ be a measurable orthonormal frame of~$TM$, and for $u\in\Lip_b(M)$ let
\begin{equation*}
\nabla u=(\langle\operatorname{grad}u,e_i\rangle)_{1\le i\le n}\,.
\end{equation*}
Then $(M,m,\nabla)$ is a uniform gradient structure of constant rank~$n$ on $(M,d,m)$. It is $p$-admissible for every $p\in[1,\infty)$, $\cC_p=\Lip_c(M)$, and $W^{1,p}(M,m)$ is the classical Sobolev space.
\end{proposition}
\begin{proof}
By Rademacher's theorem, $\operatorname{grad}u$ exists $m$-almost everywhere and $|\nabla u|=|\operatorname{grad}u|\le\Lip(u)$.
\emph{Step 1: the derivation and its fibres.} The Riemannian gradient satisfies the Leibniz rule. To verify the weak-$*$ continuity, let $(u_k)$ be as in~\ref{cond:gradient} and let $V$ be a smooth compactly supported vector field. Integration by parts and dominated convergence give
\begin{equation*}
\int_M\langle\operatorname{grad}u_k,V\rangle\,dm=-\int_Mu_k\,\diver V\,dm\longrightarrow-\int_Mu\,\diver V\,dm=\int_M\langle\operatorname{grad}u,V\rangle\,dm\,.
\end{equation*}
Smooth compactly supported fields are dense in the integrable vector fields, and the uniform bound on $\operatorname{grad}u_k$ extends the convergence to every integrable field. For the fibres, cover~$M$ by countably many relatively compact coordinate balls~$B_i$, with coordinates $(x_i^1,\dots,x_i^n)$ defined on a neighbourhood of~$\overline{B_i}$, and let $u_{i,j}$ be a smooth compactly supported function equal to~$x_i^j$ on~$B_i$. The gradients $\operatorname{grad}u_{i,1},\dots,\operatorname{grad}u_{i,n}$ are bounded with compact support, and they span~$T_xM$ at every $x\in B_i$. Hence $H_x=\R^n$ for almost every~$x$.
\emph{Step 2: recovery of the metric.} We take $\iota\equiv1$. Let $y,z\in B(x,1)$. By completeness there is a minimizing geodesic~$\gamma$ from~$y$ to~$z$. It is injective, its length is $d(y,z)<2$, and it lies in~$B(x,3)$. Lemma~\ref{lem:Lip-from-gradient}, applied with $U=B(x,3)$ and $L=\|\nabla u\|_{L^\infty(B(x,3),m)}$, gives~\eqref{eq:metric-recovery}.
\emph{Step 3: admissibility.} The gradient of a compactly supported Lipschitz function is bounded with compact support, so $\cC_p=\Lip_c(M)$, which is uniformly dense in~$C_c(M)$; this is~\ref{A1}. Let $u_k\in\Lip_c(M)$ with $u_k\to0$ in $L^p(M,m)$ and $\operatorname{grad}u_k\to G$ in~$L^p$. For every smooth compactly supported vector field~$V$,
\begin{equation*}
\int_M\langle G,V\rangle\,dm=\lim_{k\to\infty}\int_M\langle\operatorname{grad}u_k,V\rangle\,dm=-\lim_{k\to\infty}\int_Mu_k\,\diver V\,dm=0\,,
\end{equation*}
hence $G=0$. This proves~\ref{A2} for every $1\le p<\infty$.
\emph{Step 4: identification.} The classical space $W^{1,p}(M)$ of the functions of~$L^p$ with weak gradient in~$L^p$ is a Banach space which contains~$\Lip_c(M)$, and on which the weak gradient is a closed operator extending~$\nabla$. On a complete manifold, smooth compactly supported functions are dense in $W^{1,p}(M)$~\cite[Theorem~3.1]{He}. Therefore the closure of~$\nabla$ on~$\cC_p$ is the weak gradient on~$W^{1,p}(M)$.
\end{proof}
\paragraph{Quantitative estimates.}\label{subsec:ex-manifolds} A lower bound on the Ricci curvature gives the three hypotheses of Chapter~\ref{sec:hyp} at small radii.
\begin{proposition}\label{prop:manifoldhyp}
Let $M$ be a complete $n$-dimensional Riemannian manifold with $\operatorname{Ric}\ge -(n-1)K$, $K\ge0$, and let $m$ be the Riemannian volume. At small radii, the structure of Proposition~\ref{prop:manifold} satisfies
\begin{equation*}
\hVD\,,\qquad \mathrm B(r^2)\,,\qquad \mathrm{PI}_p(r^p)\quad(1\le p<\infty)\,.
\end{equation*}
If $\inf_x m(B(x,1))>0$, then $\mathrm V(r^n)$ also holds. For $K=0$, the doubling property, the cutoff condition and the Poincar\'e inequalities hold at every radius.
\end{proposition}
\begin{proof}
The Bishop--Gromov comparison theorem gives doubling uniformly on bounded ranges of radii, and at every radius when $K=0$; see~\cite[Section~10.1]{HK}. Since $\nu=m$, Lemma~\ref{lem:distance-cutoff} gives $\mathrm B(r^2)$; no lower bound on the volume of unit balls is needed. The $1$-Poincar\'e inequality of Buser under a lower Ricci bound~\cite{Bu}, and its consequence in~$L^p$ on doubling balls~\cite[Section~5.6]{SC}, give $\mathrm{PI}_p(r^p)$. For $K=0$ the constants are independent of the radius. Finally the Bishop--Gromov theorem also gives
\begin{equation*}
c(n,K)\,r^n\,m(B(x,1))\le m(B(x,r))\le C(n,K)\,r^n
\qquad(0 1$~\cite[Section~3]{vRen08}. The cutoff condition is given by the distance cutoffs.
\end{proof}
Two classes of examples satisfy the hypotheses of Proposition~\ref{prop:sr-MCP-PI}.
\begin{itemize}
\item \emph{Sasakian manifolds.} On a complete Sasakian manifold of horizontal rank $2j$ with its pseudo-Hermitian volume, assume that, for each unit horizontal vector~$X$, the Tanaka--Webster sectional curvature of $\operatorname{span}\{X,JX\}$ and the Ricci trace over its horizontal orthogonal complement are nonnegative. Then $\mathrm{MCP}(0,2j+3)$ holds, and the Riemannian approximations satisfy $\mathrm{MCP}(0,2j+4)$~\cite[Theorem~3.1 and Corollary~3.15]{BGKT19SR}.
\item \emph{H-type foliations.} On a complete H-type foliation of horizontal and vertical ranks $k$ and~$\ell$, completely parallel Bott torsion and nonnegative horizontal Bott sectional curvature give $\mathrm{MCP}(0,k+3\ell)$ for the Riemannian volume, by the same argument on the Jacobian and the comparison of~\cite[Proposition~2.10 and Theorem~3.20]{BGRV25SR}.
\end{itemize}
\paragraph{Consequences.} In the two classes above, the theory at matching scales gives the critical exponent $\alpha_p=1$ for all finite $p\ge1$, and the characterization of $BV$ at $p=1$ (Theorems~\ref{thm:KS-critical-matching} and~\ref{thm:BV}). Under Proposition~\ref{prop:sr-global-CD}, $\alpha_p=1$ for $p>2-\varepsilon$.
At nonnegative curvature, Baudoin and Kim obtain the pseudo-Poincar\'e inequality $\|f-P_tf\|_p\le C_p\sqrt t\,\|\nabla_Hf\|_p$ for $f\in C_c^\infty(M)$ and $1\le p<\infty$, and relate a global lower bound $m(B(x,r))\ge c\,r^D$, $D>1$, to Sobolev and isoperimetric inequalities~\cite[Proposition~2.3 and Theorem~2.6]{BK14SR}. The same lower bound for the volume gives the global Gagliardo--Nirenberg inequalities of Theorem~\ref{thm:KS-GN} with $\alpha=1$ at each matching exponent. On a Carnot group one takes $D=Q$ and any finite $p\ge1$.
\paragraph{Compact manifolds and negative lower bounds.} Connected compact equiregular manifolds have global doubling and $\mathrm{PI}_p(r^p)$ for every finite $p\ge1$, by patching the local estimates over a finite connected cover. The volume of their balls is comparable to $\min\{r^Q,1\}$, and the Gagliardo--Nirenberg inequalities at bounded radii retain the term of lower order. A positive curvature parameter~$\rho_1$ gives compactness, by the sub-Riemannian Bonnet--Myers theorem~\cite[Theorem~10.1]{BG17SR}. A lower bound $\rho_1=-K<0$ gives doubling and $\mathrm{PI}_2(r^2)$ uniformly for $0 n$, and all the scales remain Gaussian.
Laakso constructed Ahlfors $Q$-regular spaces which support a $(1,1)$-Poincar\'e inequality, for every $Q>1$, and proposed to replace the interval of his construction by an $n$-cube~\cite[Theorem~2.6 and Remark~3.2]{Laakso}. Cheeger and Kleiner proved the Poincar\'e inequality for admissible inverse systems of graphs, and formulated its extension to cubical complexes~\cite[Theorem~1.1 and Section~11]{CKInv}. The spaces below are inverse limits of this kind. They are made of Euclidean $n$-cubes, the \emph{sheets}, glued along hyperplanes; the dimension of the sheets is the rank, and the number of sheets at each scale determines the volume exponent.
\begin{theorem}\label{thm:cubical-limit}\label{prop:laakso-gradient}
For each integer $n\ge1$ and each real $Q>n$, there is a compact geodesic inverse limit $(X,d,m)$ of cubical complexes, in the sense of Cheeger and Kleiner, with the following properties.
\begin{enumerate}[label=\textup{(\roman*)},ref=\textup{(\roman*)}]
\item\label{cl:structure} The measure $m$ is an Ahlfors $Q$-regular probability measure. With $\cS=X$ and $\nu=m$, the Euclidean gradient on the sheets defines a gradient structure of constant rank $n$, which is $p$-admissible for every $1\le p<\infty$.
\item\label{cl:PI} The space supports a $(1,1)$-Poincar\'e inequality. For the gradient on the sheets, $\mathrm{PI}_p(r^p)$ holds for every $1\le p<\infty$, and the cutoff conditions $\mathrm B(r^2)$ and $\mathrm B^+(r^2)$ hold.
\item\label{cl:metric} For $u\in\Lip(X)$, $x\in X$, $r>0$ and $y,z\in B(x,r)$,
\begin{equation}\label{eq:cubical-local-metric}
|u(y)-u(z)|\le d(y,z)\,\|\nabla u\|_{L^\infty(B(x,3r),m)}\,.
\end{equation}
In particular the structure is uniform, and
\begin{equation*}
d(y,z)=\max\{u(y)-u(z):u\in\Lip(X),\ \|\nabla u\|_{L^\infty(m)}\le1\}\,.
\end{equation*}
\end{enumerate}
\end{theorem}
Thus $\Phi(r)=\Theta(r)=r^Q$ and $\Psi_{C,p}(r)=\Psi_{P,p}(r)=r^p$ for every $1\le p<\infty$, while $n_*=n0$, and $\Psi_{C,2}(r)\le Cr^2$ at small radii. This proves~\ref{cr:quadratic} and~\ref{cr:ac}, and~\ref{cr:gauge} follows from~\eqref{eq:Theta}: $\Theta/\Phi=r^2/\Psi_{C,2}$ is bounded below, and it tends to infinity if $\nu\not\ll m$.
\end{proof}
Second, on a connected space a cutoff tested in the Poincar\'e inequality shows that the cutoff scale is dominated by the Poincar\'e scale. Together with Definition~\ref{def:matching}, this shows that matching scales are comparable.
\begin{proposition}\label{prop:scaleorder}
Assume~\hVD, \hB{} and~\hP{p}, and suppose that $X$ is connected with positive diameter. Then $\Psi_{C,p}(r)\le C\Psi_{P,p}(r)$ at sufficiently small radii. Under global hypotheses on an unbounded connected space this holds at every radius.
\end{proposition}
\begin{proof}
Let $M>2$ be the constant of Lemma~\ref{lem:reverse-doubling}, let $B=B(x,r)$, and let $\psi=\psi_x^r$. Since $\psi\le\ind_{B(x,2r)}$, the mean of~$\psi$ on $MB$ is at most $m(B(x,2r))/m(MB)\le1/2$, while $\psi=1$ on~$B$. The Poincar\'e inequality on the ball~$MB$ and~\eqref{eq:bumpenergy} give
\begin{equation*}
2^{-p}\,m(B)\le\int_{MB}|\psi-\psi_{MB}|^p\,dm
\le C_P\,\Psi_{P,p}(Mr)\int_\cS|\nabla\psi|^p\,d\nu
\le C\,\frac{\Psi_{P,p}(Mr)}{\Psi_{C,p}(r)}\,m(B)\,.
\end{equation*}
We cancel $m(B)$ and compare $\Psi_{P,p}(Mr)$ with $\Psi_{P,p}(r)$ by~\eqref{eq:scale}.
\end{proof}
\subsection{The distance cutoff}\label{subsec:ex-distance-cutoff}
When the gradient measure is dominated by the reference measure, the cutoff condition holds at the quadratic scale, with the simplest cutoffs. For $x\in X$ and $r>0$, the \emph{distance cutoff} is
\begin{equation}\label{eq:examples-distance-cutoff}
\psi_x^r(y)=\bigl(3-2d(x,y)/r\bigr)_+\wedge1\,.
\end{equation}
It is equal to one on $B(x,r)$, its support lies in $\overline B(x,3r/2)\subset B(x,2r)$, and $\Lip(\psi_x^r)\le2/r$.
\begin{lemma}\label{lem:distance-cutoff}
Let $(\cS,\nu,\nabla)$ be a gradient structure on $(X,d,m)$, and suppose that the closed balls of radius less than~$r_0$ are compact. Then, for $0
1$ and~$BV$ for $p=1$, as in~\cite[Theorems~3.7--3.8]{BCY}.
\item For the tree of $n$-dimensional cubes of Chapter~\ref{sec:riemannian-gluings}, Theorem~\ref{thm:cube-KS} gives
\begin{equation*}
\alpha_p^{\mathrm{dens}}=\alpha_p=1+\frac{Q-n}{p}
\qquad(1\le p<\infty)\,,
\end{equation*}
with both thresholds attained, although the scales match only for $p>n$. Weak monotonicity at the critical exponent holds precisely for $p>n$, and the critical space is then $W^{1,p}$. For admissible $1
n$ (Proposition~\ref{prop:cube-two-scales}), in accordance with the corollary; this shows that the bound $n_*
n$, and Kleiner and Schioppa construct spaces with a Poincar\'e inequality, of arbitrary topological dimension, whose measurable tangent bundle is one-dimensional~\cite[Theorem~1.1]{KleinerSchioppa}.
\end{remark}
\begin{proof}[Proof of Corollary~\ref{cor:rank-p-power}]
Hypothesis~\hV{} excludes isolated points, since $\Phi(r)\to0$ as $r\downarrow0$. We first show that $\nu\ne0$. If $\nu=0$, the Poincar\'e inequality and the full support of~$m$ make every function of~$\cC_p=\Lip_c(X)$ constant on each sufficiently small ball. Applied to $u=(1-d(x,\cdot)/\varepsilon)_+$, for small $\varepsilon$, this shows that every point~$x$ is isolated, a contradiction.
Proposition~\ref{prop:rank-Poincare} gives $n_*\le s$. Proposition~\ref{prop:cutoffrestriction} gives $s\le Q$, and $\nu\ll m$ when $s=Q$; in that case $\Psi_{C,p}(r)=r^{p+Q-s}=r^p$. For $s
0$ such that $m(B(y,5Rr))\le D\,m(B(y,r))$ for $y\in X$ and $0<5Rr
1$, H\"older's inequality gives
\begin{equation*}
\frac S2\le
\Bigl(\sum_i t_i^{p-b}\beta_i^b\Bigr)^{1/b}
\Bigl(\sum_{t_i\ge S/(4C')}t_i^{-(p-b)/(b-1)}\Bigr)^{1-1/b}
\le C\Bigl(\sum_i t_i^{p-b}\beta_i^b\Bigr)^{1/b}S^{-(p-b)/b}\,,
\end{equation*}
which is~\eqref{me:eq:geometric-sum}. For $b=1$, use $t_i^{p-1}\ge(S/(4C'))^{p-1}$ on the remaining indices. Apply~\eqref{me:eq:geometric-sum} to $\beta_i=F_{t_i}$ at each point, integrate using~\eqref{me:eq:level-estimates}, and divide by~$k^p$.
\end{proof}
The following recurrence corresponds to~\cite[equation~(4.24)]{KLVZ}, with the gauge of the stopping balls in place of the measure of the level sets.
\begin{lemma}\label{me:lem:recurrence}
Let $\lambda>\lambda_0/2$ and let $k\ge1$ be an integer with $2^k\ge H_0$. Then, with the constant~$\alpha$ of Lemma~\ref{me:lem:retained} for a suitable~$C_0$,
\begin{equation}\label{me:eq:recurrence}
\lambda^p\,\Theta_u(\lambda)\le C\,2^{-k\alpha}\,(2^k\lambda)^p\,\Theta_u(2^k\lambda)+\frac C{k^p}\sum_{i=k}^{2k-1}t_i^p\,\Theta_u(t_i)+C\int_{\{\lambda\lambda$,
\begin{equation*}
\lambda^p\,r_B^p\,m(B)<\int_B|u-u_B|^p\,dm\le2^p\int_B|u-u_G|^p\,dm=2^p\int_E|u-u_G|^p\,dm+2^p\int_G|u-u_G|^p\,dm\,.
\end{equation*}
By~\eqref{me:eq:wbar}, $\bar w=u$ on~$G$. Applying~\ref{me:C4} to~$\bar w$ gives
\begin{equation*}
\int_G|u-u_G|^p\,dm=\int_G|\bar w-\bar w_G|^p\,dm\le2^p\int_B|\bar w-\bar w_B|^p\,dm\le C\,\frac{r_B^p\,m(B)}{\Theta(B)}\int_{B\cap\cS}|\nabla\bar w|^p\,d\nu\,.
\end{equation*}
With Lemma~\ref{me:lem:retained} this gives
\begin{equation*}
\lambda^p\,\Theta(B)\le C\,2^{-k\alpha}\,t^p\,\frac{\Theta(B)}{m(B)}\,m(B\cap U_t)+C\int_{B\cap\cS}|\nabla\bar w|^p\,d\nu\,.
\end{equation*}
\emph{Summation.} We sum over $B\in\mathcal B$. The first terms are bounded by Lemma~\ref{me:lem:overlap}. The balls are disjoint and contained in~$U_\lambda$, so by~\eqref{me:eq:wbar} and Lemma~\ref{me:lem:averaged-energy},
\begin{equation*}
\sum_{B\in\mathcal B}\int_{B\cap\cS}|\nabla\bar w|^p\,d\nu\le C\int_{\{\lambda0$. Put
\begin{equation*}
J=\sup_{\lambda>\lambda_0/2}\lambda^q\,\Theta_u(\lambda)\,.
\end{equation*}
For $\lambda\ge\lambda_0$, Lemma~\ref{me:lem:stopping}\ref{me:st:weak} gives
\begin{equation*}
\lambda^q\,\Theta_u(\lambda)\le C\lambda_0^{q-p}\int_\cS g^p\,d\nu\,.
\end{equation*}
Since $\Theta_u(\lambda)=\Theta(X)$ when $\lambda_0/2<\lambda<\lambda_0$, it follows that
\begin{equation}\label{me:eq:I-lower}
\Theta(X)\,\lambda_0^q\le J<\infty\,.
\end{equation}
Multiply~\eqref{me:eq:recurrence} by $\lambda^{q-p}$. Each of the levels $2^k\lambda$ and~$t_i$ belongs to the range of the supremum defining~$J$, so the first two terms are bounded by
\begin{equation*}
\Bigl(C\,2^{k(p-q-\alpha)}+C\,k^{1-p}A_1^{p-q}4^{k(p-q)}\Bigr)J\,.
\end{equation*}
On the set of integration in the last term, \eqref{me:eq:grad-sharp} gives $g\le Cu^\sharp\le CA_14^k\lambda$, and hence
\begin{equation*}
\lambda^{q-p}g^p\le (CA_14^k)^{p-q}g^q\,.
\end{equation*}
Taking the supremum over $\lambda>\lambda_0/2$, we obtain
\begin{equation}\label{me:eq:absorption}
J\le\Bigl(C\,2^{k(p-q-\alpha)}+C\,k^{1-p}A_1^{p-q}4^{k(p-q)}\Bigr)J+C_k\int_\cS g^q\,d\nu\,.
\end{equation}
Since $p>1$ and $\alpha>0$, first choose $k$ so that $2^k\ge H_0$ and $C2^{-k\alpha}+Ck^{1-p}\le1/4$. Then choose $\varepsilon_0\in(0,p-b)$ so small that the coefficient of~$J$ in~\eqref{me:eq:absorption} is at most~$1/2$ whenever $0b'$, with derivative bounded by $C/k$, where $k=b-b'$. Integrating the derivative of the product of this cutoff and of~$F$ from $t$ to~$b$ gives, for $s
0$, and~$\lambda\ge\max\{1,r/r_0\}$, with~$r/r_0=0$ if~$r_0=\infty$. Let
\begin{equation*}
\rho(y)=\left(2-\frac{d(z,y)}r\right)_+\wedge1\,.
\end{equation*}
For every~$p\ge1$ there is a cutoff function~$\varphi_p\in\cF$ for~$B(z,r)\subset B(z,2r)$ such that~$\psi_p=\lambda\varphi_p$ satisfies
\begin{align}
\|\psi_p-\lambda\rho\|_\infty&\le \frac Cp\,,\label{hk:eq:upper-ramp-approx}\\
\cE(e^{\pm\psi_p}f^{2p-1},e^{\mp\psi_p}f)
&\ge\frac1{2p}\,\cE(f^p,f^p)
-\frac{Cp^{\beta_+-1}}{S(r/\lambda)}\,\|f\|_{2p}^{2p}
\label{hk:eq:upper-perturbation}
\end{align}
for every bounded nonnegative~$f\in\cF$. The constant depends only on~$C_0$ and on the upper scaling constants of~$S$.
\end{lemma}
The function~$\lambda\rho$ is the Lipschitz profile which one would use on a manifold. The functions~$\psi_p$ approximate it uniformly, with an error which improves as the exponent~$p$ increases. The inequality~\eqref{hk:eq:upper-perturbation} is the lower bound for the perturbed form which drives the differential inequalities for the $L^{2p}$ norms of the conjugated semigroup.
\begin{proof}
We use the averaging construction of~\cite[Lemma~2.1]{MSC}. Choose an integer~$N\asymp p\lambda$, with a sufficiently large fixed constant of comparison from below. Subdivide the annulus between the radii~$r$ and~$2r$ into~$N$ annuli of width~$r/N\le r_0$, let~$\theta_i$ be the cutoff functions given by~\eqref{hk:eq:upper-csa-fixed}, and set~$\varphi_p=N^{-1}\sum_{i=1}^N\theta_i$. By strong locality, $\Gamma(\varphi_p)=N^{-2}\sum_i\Gamma(\theta_i)$: the energy measures are carried by disjoint annuli. Summing the inequalities~\eqref{hk:eq:upper-csa-fixed} gives
\begin{equation}\label{hk:eq:upper-subdivision}
\int_X g^2\,d\Gamma(\varphi_p)
\le \frac{C_0}{N^{2}}\,\cE(g,g)
+\frac{C_0}{N^2S(r/N)}\,\|g\|_2^2\,,
\qquad g\in\cF\,.
\end{equation}
On each of the $N$ annuli, all but one of the cutoff functions are equal to zero or to one. Thus~$\|\varphi_p-\rho\|_\infty\le N^{-1}$, which proves~\eqref{hk:eq:upper-ramp-approx}.
Let $\psi=\psi_p$ and~$u=f^p$. The calculation of~\cite[Lemma~2.2]{MSC}, which uses the chain and Leibniz rules, gives
\begin{align*}
\cE(e^\psi f^{2p-1},e^{-\psi}f)
&=\frac{2p-1}{p^2}\,\cE(u,u)
-\frac{2(p-1)}p\int_Xu\,d\Gamma(u,\psi)
-\int_Xu^2\,d\Gamma(\psi)\\
&\ge\frac1p\,\cE(u,u)-p\int_Xu^2\,d\Gamma(\psi)\,.
\end{align*}
Apply~\eqref{hk:eq:upper-subdivision} with~$g=u$ and~$\psi=\lambda\varphi_p$. The choice of~$N$ makes the coefficient $p\lambda^2C_0N^{-2}$ of the energy at most $1/(2p)$. Since~$r/N\le r/\lambda\le r_0$, the upper scaling of~$S$ gives
\begin{equation*}
\frac{p\lambda^2}{N^2S(r/N)}
\le\frac{C}{pS(r/N)}
\le\frac{Cp^{\beta_+-1}}{S(r/\lambda)}\,.
\end{equation*}
This proves~\eqref{hk:eq:upper-perturbation}, for either sign of~$\psi$. The products belong to~$\cF$ because $f$ is bounded and by~\eqref{hk:eq:upper-subdivision}.
\end{proof}
For $p=1$, \eqref{hk:eq:upper-perturbation} gives $\frac{d}{ds}\|e^{\psi}P_se^{-\psi}f\|_2^2\le\frac{C}{S(r/\lambda)}\|e^{\psi}P_se^{-\psi}f\|_2^2$, with $\psi=\psi_1$, and therefore
\begin{equation}\label{hk:eq:upper-L2-twisted}
\|e^{\psi_1}P_s\,e^{-\psi_1}\|_{2\to2}\le\exp\Bigl[\frac{Cs}{S(r/\lambda)}\Bigr]\qquad(s>0)\,.
\end{equation}
This is the quadratic perturbation estimate of~\cite[Proposition~2.3]{AB}.
\paragraph{The upper bound.} Applying the mean value inequality in each of the two variables of the kernel bounds its value by an average in space and time, with a polynomial dependence on the two scale coefficients. The estimate~\eqref{hk:eq:upper-L2-twisted} for this average gives the decay away from the diagonal. The prefactor involves the volumes of the averaging balls, whose radius~$r$ can be chosen independently of the time.
\begin{theorem}\label{hk:thm:vd-mixed-upper}
Suppose that $X$ is unbounded and geodesic, that $\hVD$, $\PI(\Psi_P)$ and the cutoff Sobolev inequality~\eqref{hk:eq:global-csa} hold globally, and that $\Psi_S$ has a lower scaling exponent greater than one. There are structural constants $c,C,\kappa>0$ such that, for every $r,t>0$ and almost every $x,y\in X$,
\begin{multline}\label{hk:eq:vd-mixed-upper}
p_t(x,y)\le\frac{C}{\sqrt{m(B(x,r))\,m(B(y,r))}}
\left(1+\frac{\Psi_P(r)}t\right)^{\kappa}
\left(1+\frac{t}{\Psi_S(r)}\right)^{\kappa}\\
\times\exp\left[-c\,\mathcal A_{\Psi_S}\bigl((d(x,y)-8r)_+,t\bigr)\right]\,.
\end{multline}
\end{theorem}
\begin{proof}
\emph{Step 1: the kernel is bounded by an average.} By Lemma~\ref{hk:lem:h-forward-bound} with $q=1$, after rescaling, a nonnegative caloric function~$u$ on $(a-T,a)\times B(z,2r)$ satisfies
\begin{equation*}
\esssup_{B(z,r)}u(a,\cdot)
\le\frac{C\,(1+\Psi_P(r)/T)^{\theta-1}(1+T/\Psi_S(r))^\theta}
{T\,m(B(z,r))}\int_{a-T}^a\int_{B(z,2r)}u(s,v)\,dm(v)\,ds\,,
\end{equation*}
where $\theta$ is as in~\eqref{hk:eq:h-nu-theta}; the value at the terminal time is obtained from times tending to~$a$ and from the continuity in~$L^2$. Apply this estimate successively in the two variables of the symmetric kernel: first at the time~$t$ with $T=t/2$, and then at each time $s\in(t/2,t)$ with $T=t/4$. The times which occur lie in $(t/4,t)$, where the rows of the kernel are orbits of the semigroup with initial data in~$L^2$, by Proposition~\ref{hk:prop:vd-kernel-existence}. Doubling and the scaling of $\Psi_P$ and~$\Psi_S$ yield
\begin{equation}\label{hk:eq:vd-kernel-average}
p_t(x,y)\le \frac{C\,(1+\Psi_P(r)/t)^{2(\theta-1)}(1+t/\Psi_S(r))^{2\theta}}
{m(B(x,r))\,m(B(y,r))}\,
\sup_{t/4\le s\le t}
\langle\ind_{B(x,2r)},P_s\ind_{B(y,2r)}\rangle\,.
\end{equation}
To obtain this outside one null set for each fixed time, first take the two outer balls in a countable family with dense centres and rational radii, and evaluate at almost every pair of points of the corresponding inner balls. For given $x$, $y$ and~$r$ one can choose such inner balls containing $x$ and~$y$ whose outer balls are contained in $B(x,2r)$ and $B(y,2r)$, with radii comparable to~$r$; the volumes and the scale coefficients change by structural factors.
\emph{Step 2: the average.} Write $d=d(x,y)$. For $d\le8r$, the contraction property in~$L^2$ bounds the inner product in~\eqref{hk:eq:vd-kernel-average} by $C\sqrt{m(B(x,r))\,m(B(y,r))}$. For $d>8r$ set $R=d/3$ and apply Lemma~\ref{hk:lem:upper-perturbations} with $p=1$, the centre~$x$, the radius~$R$, the scale $S=\Psi_S$ and $\lambda\ge1$. The function $\psi=\psi_1$ is equal to~$\lambda$ on $B(x,2r)\subset B(x,R)$ and to zero on $B(y,2r)$, which lies outside $B(x,2R)$. By~\eqref{hk:eq:upper-L2-twisted}, for all $s\le t$,
\begin{align*}
\langle\ind_{B(x,2r)},P_s\ind_{B(y,2r)}\rangle&=e^{-\lambda}\langle\ind_{B(x,2r)},e^{\psi}P_se^{-\psi}\ind_{B(y,2r)}\rangle\\
&\le C\sqrt{m(B(x,r))\,m(B(y,r))}\,
\exp\left[-\lambda+\frac{Ct}{\Psi_S(R/\lambda)}\right]\,.
\end{align*}
\emph{Step 3: optimization.} Taking the infimum over $\lambda\ge1$, with $s=R/\lambda$, gives the factor $\exp[-\sup_{s\le R}(R/s-Ct/\Psi_S(s))]$. The scales $s>R$ contribute at most one to the supremum in~\eqref{eq:rate-function}, so this factor is at most $C\exp[-\mathcal A_{\Psi_S}(R,Ct)]$. By the lower scaling of~$\Psi_S$, $\mathcal A_{\Psi_S}(R,Ct)\ge c\,\mathcal A_{\Psi_S}(d,t)$; this comparison is proved at the end of the proof of Theorem~\ref{hk:thm:global-mixed-upper}. Inserting the result in~\eqref{hk:eq:vd-kernel-average} gives~\eqref{hk:eq:vd-mixed-upper}, with $\kappa=2\theta$.
\end{proof}
\paragraph{Matching scales.} Suppose that $\Psi_P\asymp\Psi_S=\Psi$, and choose $r=\Psi^{-1}(t)$ in~\eqref{hk:eq:vd-mixed-upper}. The polynomial factor is bounded. If $d(x,y)\le16r$, the rate $\mathcal A_\Psi(d(x,y),t)$ is bounded by a structural constant; if $d(x,y)>16r$, then $d(x,y)-8r\ge d(x,y)/2$ and the scaling of~$\Psi$ compares the two rates. Hence
\begin{equation}\label{hk:eq:vd-matching-upper}
p_t(x,y)\le
\frac{C\exp[-c\,\mathcal A_\Psi(d(x,y),t)]}
{\sqrt{m(B(x,\Psi^{-1}(t)))\,m(B(y,\Psi^{-1}(t)))}}\,.
\end{equation}
This is the upper estimate of the theory with one scale; compare~\cite[Theorem~1.12]{AB} and~\cite[Proposition~5.8]{LierlPHI}. The matching lower estimate is proved in Corollary~\ref{hk:cor:vd-matching}.
\subsection{Uniform volume growth and Nash inequalities}\label{hk:sec:functional}
This section assumes the uniform volume growth~\hV. Summing the Poincar\'e inequality over a covering by balls of radius~$r$ gives an inequality of Nash type, and hence a bound for the norm of the semigroup from~$L^1$ to~$L^\infty$. This is the method of~\cite[Lemmas~2.3--2.4 and proof of Theorem~2.1]{SC92}, with $r^2$ replaced by~$\Psi_P(r)$. The Poincar\'e inequality may have a dilation $\Lambda\ge1$ here, and neither conservativeness nor irreducibility is needed.
\begin{proposition}[Nash inequality]\label{hk:prop:functional-averaging}
Suppose that, uniformly in~$x$ and for~$00$, $R_{ct}\asymp R_t$ uniformly in~$t$, because the inverses of the scale functions change by bounded factors and the logarithm changes by a bounded additive quantity.
\begin{proposition}\label{hk:prop:global-confinement}
One may choose~$K$ in~\eqref{hk:eq:global-confinement-radius} so that, for every~$t>0$ and almost every~$x$,
\begin{equation}\label{hk:eq:global-confinement}
\int_{B(x,R_t)}p_t(x,y)\,dm(y)\ge\frac12\,,
\qquad p_t(x,x)\ge\frac{c}{\Phi(R_t)}\,.
\end{equation}
Moreover, for~$R\ge\rho_t$,
\begin{equation}\label{hk:eq:global-tail}
\int_{X\setminus B(x,R)}p_t(x,y)\,dm(y)
\le\min\left\{1,\
C\,\frac{\Phi(\rho_t)}{\Phi(\Psi_P^{-1}(t))}\,
\exp\left[-c\Bigl(\frac R{\rho_t}\Bigr)^{\beta_+/(\beta_+-1)}\right]\right\}\,.
\end{equation}
The diagonal value is~\eqref{hk:eq:diagonal-version}.
\end{proposition}
\begin{proof}
Put~$\gamma=\beta_+/(\beta_+-1)$.
\emph{Step 1: a lower bound for the rate.} We show that
\begin{equation*}
\mathcal A_{\Psi_S}(R,t)\ge c\Bigl(\frac R{\rho_t}\Bigr)^\gamma\,,
\qquad R\ge\rho_t\,.
\end{equation*}
Let $k=R/\rho_t$. For~$k$ sufficiently large, insert~$s=M\rho_t\,k^{-1/(\beta_+-1)}$ in~\eqref{hk:eq:global-upper-action}, with a fixed large~$M$. Then $R/s=M^{-1}k^\gamma$, and the upper scaling of~$\Psi_S$, while~$s\le\rho_t$, gives~$t/\Psi_S(s)\le CM^{-\beta_+}k^\gamma$, which is at most half of~$R/s$. For bounded~$k\ge1$, insert~$s=M'\rho_t$ and use the lower scaling with an exponent greater than one; a sufficiently large fixed~$M'$ gives a positive lower bound.
\emph{Step 2: the tail.} For~$w=R/\rho_t\ge1$, the decomposition into dyadic annuli, Theorem~\ref{hk:thm:global-mixed-upper} and Step~1 give
\begin{align*}
\int_{X\setminus B(x,R)}p_t(x,y)\,dm(y)
&\le C\,\frac{\Phi(\rho_t)}{\Phi(\Psi_P^{-1}(t))}
\sum_{j\ge0}(2^jw)^{Q_+}e^{-c(2^jw)^\gamma}\\
&\le C\,\frac{\Phi(\rho_t)}{\Phi(\Psi_P^{-1}(t))}\,e^{-c'w^\gamma}\,.
\end{align*}
The bound by one holds because the semigroup is sub-Markovian.
\emph{Step 3: confinement.} At~$R=R_t$, a sufficiently large structural~$K$ makes the last expression at most~$1/2$, by the definition of~$L_t$. Conservativeness gives the first assertion of~\eqref{hk:eq:global-confinement}. Apply the Cauchy--Schwarz estimate~\eqref{hk:eq:confinement-diagonal} at the radius~$R_t$, with~$m(B(x,R_t))\le C\Phi(R_t)$. Replacing~$2t$ by~$t$ and using~$R_{t/2}\asymp R_t$ proves the diagonal bound.
\end{proof}
\paragraph{Lower bounds.}
\begin{theorem}\label{hk:thm:global-lower}
Assume the global hypotheses and~\hV.
\begin{enumerate}[label=\textup{(\roman*)},ref=\textup{(\roman*)}]
\item\label{gl:variational} For every~$t>0$ and almost every~$(x,y)$,
\begin{equation}\label{hk:eq:global-variational-lower}
p_t(x,y)\ge\frac{c}{\Phi(R_t)}\,
\exp\left[-C\inf_{r>0}\left\{
\frac{\Psi_P(r)}t\left(1+\frac{d(x,y)}r\right)^2+
\frac{t}{\Psi_S(r)}\right\}\right]\,.
\end{equation}
\item\label{gl:seed} For every~$R,r>0$,
\begin{equation}\label{hk:eq:global-capacity-seed-lower}
p_t(x,y)\ge\frac{c}{\Phi(R)}\exp\left[-C\left\{
\frac{\Psi_P(R)}t+\frac{t}{\Psi_S(R)}
+\frac{\Psi_P(r)}t\left(1+\frac{d(x,y)}r\right)^2
+\frac{t}{\Psi_S(r)}\right\}\right]\,.
\end{equation}
The proof of this bound uses neither conservativeness nor the upper estimate~\eqref{hk:eq:global-mixed-upper}.
\item\label{gl:local} For points in a common ball,
\begin{equation}\label{hk:eq:global-local-lower}
p_t(y,z)\ge\frac{c}{\Phi(R)}\,
\exp\!\left[-C\left(\frac{\Psi_P(R)}t+
\frac{t}{\Psi_S(R)}\right)\right]\,,
\qquad y,z\in B(x,R)\,.
\end{equation}
This estimate holds also for the kernel killed outside~$B(x,KR)$, with a fixed structural~$K$.
\end{enumerate}
\end{theorem}
The bound~\ref{gl:variational} starts from the diagonal bound given by confinement, and~\ref{gl:seed} from the diagonal bound given by a cutoff function at an arbitrary radius~$R$. Neither implies the other in general.
\begin{proof}
\ref{gl:variational} By Lemma~\ref{hk:lem:lower-chain-transfer}, $p_t(x,y)$ is at least~$p_{2t/3}(y,y)$ times the exponential in~\eqref{hk:eq:lower-chain-transfer}, and Proposition~\ref{hk:prop:global-confinement} gives~$p_{2t/3}(y,y)\ge c/\Phi(R_t)$. Optimizing the radius proves~\eqref{hk:eq:global-variational-lower}.
\ref{gl:local} Lemma~\ref{hk:lem:general-cutoff-lower} applies at every radius and gives~\eqref{hk:eq:global-local-lower}, for the full kernel and for the kernel killed outside $B(x,KR)$. The constant term in the exponential is absorbed because $\Psi_S\le C\Psi_P$.
\ref{gl:seed} The diagonal conclusion of Lemma~\ref{hk:lem:general-cutoff-lower}, at the time $2t/3$, gives
\begin{equation*}
p_{2t/3}(y,y)\ge\frac{c}{\Phi(R)}\,
\exp\!\left[-C\left(\frac{\Psi_P(R)}t+
\frac{t}{\Psi_S(R)}\right)\right]
\end{equation*}
for almost every~$y\in B(x,R)$. A countable covering gives this bound almost everywhere on~$X$; taking dyadic values of~$R$ first makes the exceptional set independent of~$R$. Insert it in~\eqref{hk:eq:lower-chain-transfer} to obtain~\eqref{hk:eq:global-capacity-seed-lower}. For a killed semigroup the same propagation applies when the ball of radius~$R$ and all the enlarged balls of the chain lie in the domain.
\end{proof}
\paragraph{The balanced radius.} Let~$\Xi(r)=\sqrt{\Psi_P(r)\Psi_S(r)}$. At the radius $R=\Xi^{-1}(t)$ the two terms in the exponent of~\eqref{hk:eq:global-local-lower} are equal, and
\begin{equation}\label{hk:eq:global-balanced-near}
p_t(x,y)\ge\frac{c}{\Phi(\Xi^{-1}(t))}\,
\exp\left[-C
\sqrt{\frac{\Psi_P(\Xi^{-1}(t))}{\Psi_S(\Xi^{-1}(t))}}\,\right]
\qquad\text{when }d(x,y)\le c\,\Xi^{-1}(t)\,.
\end{equation}
\paragraph{Different powers at small and large radii.}\label{hk:subsec:global-powers}
To make the general estimates explicit, assume that the three functions are
\begin{equation}\label{hk:eq:global-broken-powers}
\begin{aligned}
\Phi(r)&=\begin{cases}r^{Q_0}\,,&00$, choose $t=c_\eta h$ with $c_\eta>0$ so small that the coefficient $C\,H(t)/r^2$ of the energy is at most~$\eta$. Since $t^2/\Psi_{C,2}(t)=H(t)/\Psi_P(t)$, the coefficient of the zeroth-order term is then at most $C_\eta/\Psi_P(h)$. Thus the cutoff function~$\chi$ of Step~1 satisfies, for every $\eta>0$,
\begin{equation}\label{eq:CSA-eta}
\int_Af^2\,d\Gamma(\chi)\le\eta\,\Gamma(f)(A)+\frac{C_\eta}{\Psi_S(r)}\int_Af^2\,dm\,,\qquad\Psi_S(r)=\Psi_P\bigl(H^{-1}(r^2)\bigr)\,.
\end{equation}
\emph{Step 4: the weighted inequality.} We pass from~\eqref{eq:CSA-eta} to~\eqref{eq:CSA-def} by the summation over annuli of~\cite[Lemma~5.1]{AB}, as in Lemma~\ref{hk:lem:h-weighted-cutoff}, with weights chosen so that the sum remains Lipschitz. The function~$\Psi_S$ has a positive lower and a finite upper scaling exponent; let $\beta$ be an upper exponent. Inside the given annulus choose successive concentric annuli~$A_j$, $j\ge1$, of widths $r_j=2^{-j-1}r$, starting at the radius~$R$, and let $\chi_j$ be the cutoff function of Step~1 for~$A_j$. Fix $0j$, so that $\widetilde\chi\ge\sum_{i>j}w_i=q^j$ there. Consequently
\begin{equation*}
\eta\,w_j^2\le\tfrac18\,\widetilde\chi^{\,2}\ \text{ on }A_j
\quad\text{if }\ \eta\le\frac{q^2}{8(1-q)^2}\,,
\qquad\text{and}\qquad
\frac{w_j^2}{\Psi_S(r_j)}\le \frac{C}{\Psi_S(r)}\,,
\end{equation*}
the second bound because $\Psi_S(r)/\Psi_S(r_j)\le C2^{j\beta}$ and $q<2^{-\beta}$. Applying~\eqref{eq:CSA-eta} with this~$\eta$ on each~$A_j$, multiplying by~$w_j^2$ and summing gives~\eqref{eq:CSA-def} for~$\widetilde\chi$. The series also converges in the norm of the form: testing~\eqref{eq:CSA-eta} for~$\chi_j$ against a cutoff function equal to one on a neighbourhood of~$\overline A$ gives $\cE(\chi_j,\chi_j)\le C\,m(A)/\Psi_S(r_j)$, and $\sum_jw_j\,2^{j\beta/2}<\infty$. Hence $\widetilde\chi\in\cF$. This proves~\ref{lcc:csa}. At matching scales $H(s)\asymp s^2$, which gives~\ref{lcc:matching}.
\end{proof}
\begin{corollary}[Power scales]\label{cor:localized-cutoff-power}
In the setting of Proposition~\ref{prop:localized-cutoff-CSA}, suppose that $\Psi_P(r)\asymp r^a$ and $\Psi_{C,2}(r)\asymp r^b$ at small radii. If $b-a<2$, then
\begin{equation*}
\CSA(r^{\beta})\quad\text{holds at small widths, with}\qquad
\beta=\frac{2a}{2+a-b}\,.
\end{equation*}
Moreover, for each annulus as in Proposition~\ref{prop:localized-cutoff-CSA}, the cutoff function of Step~1 of its proof satisfies, for all $0<\eta\le1$,
\begin{equation*}
\int_A f^2\,d\Gamma(\chi)\le \eta\,\Gamma(f)(A)
+C\,\eta^{1-\beta/2}\,r^{-\beta}\int_A f^2\,dm\,.
\end{equation*}
One has $a\le b$, $b\ge2$ and $\beta\ge b$, with $\beta=a$ when $a=b$. If, in addition, $\mathrm V(\Phi)$ holds with $\Phi(r)\asymp r^Q$ and $\Theta(r)\asymp r^s$, then $b=2+Q-s$.
\end{corollary}
\begin{proof}
Here $H(s)\asymp s^{2+a-b}$, and~\eqref{eq:derived-CSA-scale} gives the exponent~$\beta$. Propositions~\ref{prop:scaleorder} and~\ref{prop:cutoffrestriction} give $a\le b$ and $b\ge2$, and $\beta\ge b$ is equivalent to $(b-a)(b-2)\ge0$. In~\eqref{eq:annular-localized-trace} take $t=c\,(\eta r^2)^{1/(2+a-b)}$; since $a\le b$, this satisfies $t\le cr$ after reducing the range of widths. The coefficient of the energy is then at most~$\eta$, and the coefficient of the zeroth-order term is $C\,r^{-2}t^{2-b}=C\,\eta^{1-\beta/2}r^{-\beta}$. The last assertion is~\eqref{eq:Theta}.
\end{proof}
Thus a Poincar\'e scale~$r^a$ and a cutoff scale~$r^b$ with $a\le b0$ and every sufficiently small $0
j$ gives
\begin{equation}\label{eq:cubical-distance}
d_j(\pi_j y,\pi_j z)\ \le\ d(y,z):=\lim_{k\to\infty}d_k(\pi_k y,\pi_k z)
\ \le\ d_j(\pi_j y,\pi_j z)+2h_j\,.
\end{equation}
The compact geodesic complexes $X_j$ thus converge to $X$ in the Gromov--Hausdorff distance, so $X$ is compact and geodesic.
\paragraph{The measure and the sheets.} Give $\Omega=\prod_{j\ge1}\{1,\ldots,b_j\}$ the uniform product probability $\mathbb P$. The surjection
\begin{equation*}
q:I^n\times\Omega\to X
\end{equation*}
assigns to $(t,\omega)$ the point with the coordinate $t$ and the labels $\omega$. It is injective away from the gluing hyperplanes. For fixed $\omega$, the image $q(I^n\times\{\omega\})$ is an isometric copy of the Euclidean cube, called a \emph{sheet}: straight segments lift with their lengths, and the projection to $I^n$ is $1$-Lipschitz. The measure on~$X$ is
\begin{equation*}
m=q_*(dt\otimes\mathbb P)\,;
\end{equation*}
it satisfies $(\pi_j)_*m=m_j$ for every $j$, as in the construction of Barlow and Evans~\cite[Proposition~4.1]{STProj}.
\paragraph{Ahlfors regularity.} Let $C$ be a closed $n$-cell of $X_j$ containing $\pi_j x$, and let $y$ be a lift of its centre. By~\eqref{eq:cubical-distance},
\begin{equation*}
B(y,h_j/3)\subset\pi_j^{-1}C
\subset B(x,(\sqrt n+3)h_j)\,,\qquad
m(\pi_j^{-1}C)=N_j^{-1}h_j^n\asymp h_j^Q\,.
\end{equation*}
The first inclusion holds because the centre is at the distance $h_j/2$ from the boundary of $C$. Doubling compares the two balls with $B(x,h_j)$, since $d(x,y)\le(\sqrt n+2)h_j$. It follows that $m(B(x,h_j))\asymp h_j^Q$, uniformly in $x$ and~$j$. By monotonicity, $m(B(x,r))\asymp r^Q$ for every $0
0$ is fixed by the normalization of the form; see~\cite[Sections~2 and~4]{Ki08}.
\paragraph{The harmonic metric and the Kusuoka measure.} Let $h_1,h_2$ be a basis of the harmonic functions modulo constants which is orthonormal for the energy, and put $H=(h_1,h_2):K\to\R^2$. The map~$H$ is a homeomorphism onto its image, the \emph{harmonic gasket}. Equip~$K$ with the \emph{harmonic metric}~$d$, the shortest-path metric of~$H(K)$; it is geodesic. Let $\Gamma(u,v)$ denote the energy measures, normalized by $\Gamma(u)(K)=\cE(u,u)$. The \emph{Kusuoka measure} and its matrix of densities are
\begin{equation*}
\nu=\Gamma(h_1)+\Gamma(h_2)\,,\qquad
Z_{ij}=\frac{d\Gamma(h_i,h_j)}{d\nu}\,.
\end{equation*}
By a theorem of Kusuoka~\cite{Ku89}, the matrix~$Z$ is an orthogonal projection of rank one, $\nu$-almost everywhere. There is a measurable differential~$\widetilde\nabla$, defined on~$\cF$ with values in the field of lines $\operatorname{Im}Z$, such that
\begin{equation}\label{eq:gasket-differential}
\cE(u,v)=\int_K\langle\widetilde\nabla u,\widetilde\nabla v\rangle\,d\nu\,,
\qquad
\widetilde\nabla(F\circ H)= Z\bigl((D F)\circ H\bigr)\quad(F\in C^1(\R^2))\,,
\end{equation}
and the energy measures have the same representation on Borel subsets: $d\Gamma(u,v)=\langle\widetilde\nabla u,\widetilde\nabla v\rangle\,d\nu$. Moreover~$d$ is the intrinsic distance of the Dirichlet form $(\cE,\cF)$ on $L^2(K,\nu)$. For this differential and for the identification of~$d$, see~\cite{Ku89}, \cite[Sections~2, 4 and~5]{Ki08} and~\cite[Theorem~4.2]{Ka12}. We take $m=\nu$.
Thus the harmonic gasket is, in a measurable sense, a Riemannian manifold of dimension one: at $\nu$-almost every point there is one tangent direction $\operatorname{Im}Z\subset\R^2$, and the energy is the integral of the square of the derivative in this direction.
\subsection{The gradient structure}
\begin{proposition}\label{prop:harmonic-gasket}
Choose a measurable unit vector~$e$ in $\operatorname{Im}Z$ and set $\nabla u=\langle e,\widetilde\nabla u\rangle$ for $u\in\Lip(K,d)$. This defines a gradient structure $(K,\nu,\nabla)$ of rank one on $(K,d,\nu)$, which is $p$-admissible for every $1\le p<\infty$. Its Dirichlet form is $(\cE,\cF)$, and $\ker\nabla_p$ consists of the constants for every $1\le p<\infty$. For $u\in\Lip(K,d)$,
\begin{equation}\label{eq:gasket-slope}
|\nabla u|(x)=\limsup_{y\to x,\ y\ne x}\frac{|u(y)-u(x)|}{d(x,y)}
\qquad \text{for }\nu\text{-almost every }x\,.
\end{equation}
\end{proposition}
The proof of the closability for $p\ne2$ and the identification of the kernel rest on a Gauss--Green formula on cells.
\begin{lemma}\label{lem:gasket-cell-green}
Let $h=a\cdot H$, $a\in\R^2$, and let $K_w$ be a cell. For every $v\in\Lip(K,d)$,
\begin{equation}\label{eq:gasket-cell-green}
\int_{K_w}\nabla v\,\nabla h\,d\nu
=\sum_{q\in V_w}v(q)\,\partial_n^w h(q)\,,
\qquad
\partial_n^w h(q)=c_0\Bigl(\frac53\Bigr)^{|w|}
\sum_{q'\in V_w}\bigl(h(q)-h(q')\bigr)\,.
\end{equation}
\end{lemma}
\begin{proof}
The integral is the energy $\Gamma(v,h)(K_w)$ of the cell, which by self-similarity is equal to $(5/3)^{|w|}\,\cE(v\circ F_w,h\circ F_w)$. Since $h\circ F_w$ is harmonic,~\eqref{eq:gasket-graph-energy} applies.
\end{proof}
\begin{proof}[Proof of Proposition~\ref{prop:harmonic-gasket}]
\emph{Step 1: the Lipschitz bound.} The Rademacher theorem for the intrinsic distance and the identity~\eqref{eq:gasket-slope} are~\cite[Theorems~2.1 and~4.1]{KoZh12}: a function $u\in\Lip(K,d)$ belongs to~$\cF$, and $|\nabla u|=|\widetilde\nabla u|$ is $\nu$-almost everywhere equal to the pointwise Lipschitz constant of~$u$. In particular $|\nabla u|\le\Lip(u)$.
\emph{Step 2: the Leibniz rule and the weak-$*$ continuity.} The $C^1$ functions of~$H$ are dense in~$\cF$, for the energy and for the uniform norm~\cite[Theorem~4.8]{Ki08}. For these functions the Leibniz rule follows from~\eqref{eq:gasket-differential}, and it extends by this density and the closedness of~$\widetilde\nabla$. Let $(u_k)$ be as in~\ref{cond:gradient}. A pointwise convergent sequence with bounded Lipschitz constants converges uniformly on the compact space~$K$, and it is bounded in~$\cF$ by Step~1. The closedness of the form identifies the weak limit in~$L^2(\nu)$ of the differentials, and their uniform bound gives the weak-$*$ convergence in $L^\infty(\nu)$.
\emph{Step 3: the fibres, the core and the Dirichlet form.} Since $Ze=e$, \eqref{eq:gasket-differential} gives $\nabla h_i=\langle e,Ze_i\rangle=e_i$, the $i$th component of~$e$, so that $|\nabla h_1|^2+|\nabla h_2|^2=1$. The functions $h_i$ are $1$-Lipschitz for~$d$. Hence the gradients of $h_1,h_2$ span the fibres, which are equal to~$\R$, and the rank is one. Since $K$ is compact and $\nu$ is finite, $\cC_p=\Lip(K,d)$ for every finite~$p$; it is uniformly dense in~$C(K)$, which is~\ref{A1}. The core contains the $C^1$ functions of~$H$, which are dense in~$\cF$, and $\int_K|\nabla u|^2\,d\nu=\cE(u,u)$ on the core. Therefore the closure of~$\nabla$ in $L^2(\nu)$ has the domain~$\cF$, and the Dirichlet form of the structure is $(\cE,\cF)$.
\emph{Step 4: closability.} Let $1\le p<\infty$, and suppose that $u_j\to0$ and $\nabla u_j\to G$ in $L^p(\nu)$. Both convergences hold in~$L^1(\nu)$. Apply~\eqref{eq:gasket-cell-green} with $K_w=K$ to $v=u_j\phi$, where $\phi$ is Lipschitz and vanishes near~$V_0$. The right-hand side vanishes, so
\begin{equation*}
\int_K \phi\,\nabla u_j\,\nabla h_i\,d\nu
=-\int_K u_j\,\nabla\phi\,\nabla h_i\,d\nu\longrightarrow0\,.
\end{equation*}
Thus $\int_K\phi\,G\,\nabla h_i\,d\nu=0$ for all such~$\phi$, and $G\,\nabla h_i=0$ almost everywhere outside~$V_0$. The measure~$\nu$ has no atoms~\cite[Proposition~2.10]{Ki08}, so Step~3 gives $G=0$. This proves~\ref{A2}.
\emph{Step 5: convergence at the vertices.} It remains to identify the kernel. Let $u_j\in\Lip(K,d)$ with $u_j\to u$ and $\nabla u_j\to0$ in $L^p(\nu)$, hence in $L^1(\nu)$. Fix a cell~$K_w$ and $q\in V_w$. The restrictions of $1,h_1,h_2$ to~$K_w$ span the harmonic functions on~$K_w$, since the three points of $H(V_w)$ are affinely independent~\cite[Proposition~4.4]{Ki08}. Choose $h=a\cdot H$ with $\partial_n^w h(q)\ne0$, and a Lipschitz function~$\phi$ whose restriction to~$V_w$ is~$\ind_{\{q\}}$. Applying~\eqref{eq:gasket-cell-green} to $u_j\phi$ shows that $u_j(q)$ converges, and that
\begin{equation}\label{eq:gasket-vertex-limit}
\partial_n^w h(q)\,\lim_{j\to\infty} u_j(q)=\int_{K_w}u\,\nabla\phi\,\nabla h\,d\nu\,.
\end{equation}
Taking $v=u_j$ in~\eqref{eq:gasket-cell-green}, for every~$h$, shows that the limits at the three vertices of each cell are equal, because the kernel of the graph energy on the three vertices consists of the constants. The graph formed by the vertices of each level is connected and contains~$V_0$. It follows that the limit is the same number~$c$ at every vertex of every level.
\emph{Step 6: from the vertices to~$u$.} Let $A_w$ be the linear part of the affine map induced by~$F_w$ in the harmonic coordinates, so that $H\circ F_w=A_wH+b_w$. The self-similarity of the energy gives
\begin{equation*}
\nu(K_w)=\Bigl(\frac53\Bigr)^{|w|}\|A_w\|_{\mathrm{HS}}^2\,;
\end{equation*}
see~\cite[Propositions~2.10 and~4.4]{Ki08}. Choose $h=a\cdot H$ with $|a|=1$ such that $R=\max_{V_w}h-\min_{V_w}h$ satisfies $R\asymp\|A_w\|_{\mathrm{HS}}$; this is possible because the differences of the three points of~$H(V_0)$ span~$\R^2$. One of the vertices at which $h$ is extreme on~$V_w$, say~$q$, has the property that $h(q)$ differs from the values of~$h$ at the two other vertices by at least~$R/2$. Take $\phi=(1-2|h-h(q)|/R)_+$. Then
\begin{equation*}
\phi|_{V_w}=\ind_{\{q\}}\,,\qquad|\nabla\phi|\le\frac2R\,,\qquad|\partial_n^w h(q)|\ge c_0\Bigl(\frac53\Bigr)^{|w|}R\,.
\end{equation*}
Subtract from~\eqref{eq:gasket-vertex-limit} the same identity for the constant sequence $u_j=b$, $b\in\R$. This gives
\begin{equation*}
|c-b|\le\frac{2}{c_0\,(5/3)^{|w|}R^2}\int_{K_w}|u-b|\,d\nu\le C\fint_{K_w}|u-b|\,d\nu \qquad (b\in\R)\,.
\end{equation*}
The partitions of~$K$ into the cells of a given level, outside the null set of the vertices, are nested, and they generate the Borel $\sigma$-field because the diameters of the cells tend uniformly to zero. The convergence theorem for martingales, applied to $|u-b|$ for rational~$b$, gives $|c-b|\le C|u(x)-b|$ for every rational~$b$, at almost every~$x$. Letting $b\to u(x)$ proves that $u=c$ almost everywhere.
\end{proof}
\paragraph{Recovery of the metric.} The structure is uniform: \eqref{eq:metric-recovery} holds with any constant~$\iota$. Indeed, suppose that $u\in\Lip(K,d)$ satisfies $|\nabla u|\le L$ almost everywhere on an open set~$U$. Choose $a\in U$ and an open neighbourhood~$V\ne K$ of~$a$ with $\overline V\subset U$, and put $\rho=d(\cdot,K\setminus V)$. The function $v=((u-u(a))\wedge L\rho)\vee(-L\rho)$ agrees with $u-u(a)$ near~$a$, and its gradient is bounded by~$L$ on~$K$, by locality. Since $d$ is the intrinsic distance and $\Gamma(v)=|\nabla v|^2\nu\le L^2\nu$, the function $v$ is $L$-Lipschitz on~$K$. Apply this local estimate along a geodesic from $y$ to~$z$, which lies in $B(x,3r)$ when $y,z\in B(x,r)$, and let $L$ decrease to the essential supremum of $|\nabla u|$ on~$B(x,3r)$.
\subsection{Scales and critical exponents}
\paragraph{The hypotheses.} The quantitative properties of the harmonic gasket are the following.
\begin{itemize}
\item \emph{Doubling.} The Kusuoka measure is doubling for~$d$, and the heat kernel satisfies Gaussian bounds with the volume $\nu(B(x,\sqrt t))$~\cite[Theorems~6.2--6.3]{Ki08}.
\item \emph{Poincar\'e inequalities.} The quadratic Poincar\'e inequality holds at the scale~$r^2$~\cite[Proposition~4.1]{KoZh12}. By~\eqref{eq:gasket-slope}, this is a Poincar\'e inequality for the pointwise Lipschitz constant, so the self-improvement theorem of Keith and Zhong and the Sobolev--Poincar\'e inequality give $\mathrm{PI}_p(r^p)$ for all $p>2-\varepsilon$, for some $\varepsilon>0$~\cite{KeZh08,HK}. Whether $\mathrm{PI}_p(r^p)$ holds for all $p\ge1$ is not known.
\item \emph{Cutoffs.} For all $p\ge1$, the distance cutoffs of Lemma~\ref{lem:distance-cutoff} satisfy
\begin{equation}\label{eq:gasket-cutoffs}
\int_K|\nabla\psi_x^r|^p\,d\nu
\le \Bigl(\frac2r\Bigr)^p \nu(B(x,2r))
\le C_p\,\frac{\nu(B(x,r))}{r^p}\,.
\end{equation}
This gives $\mathrm B(r^2)$, and~\eqref{eq:energy-cutoff-assumption} with $\Psi_{C,p}(r)=r^p$.
\end{itemize}
Thus the scales match for $p>2-\varepsilon$, and the results of Part~\ref{part:general} at matching scales apply in this range. At $p=2$, Proposition~\ref{prop:compact-HKE} gives the Gaussian bounds for the heat kernel at small times, in agreement with~\cite{Ki08}.
\paragraph{The critical exponents.} The Korevaar--Schoen critical exponents of Definition~\ref{def:KS-critical} can be computed for every $p\ge1$, although the Poincar\'e inequality is only known for $p>2-\varepsilon$. Let $\alpha>1$ and $f\in KS^{\alpha,p}(K)$. Lemma~\ref{lem:energy-cutoff-approximation} gives Lipschitz approximations $f_\delta\to f$ in $L^p(\nu)$ with
\begin{equation*}
\|\nabla f_\delta\|_{L^p(\nu)}^p\le C\,\delta^{p(\alpha-1)}\,[f]_{KS^{\alpha,p}}^p\longrightarrow0\,.
\end{equation*}
Hence $f\in W^{1,p}(K,\nu)$ and $\nabla_pf=0$, and Proposition~\ref{prop:harmonic-gasket} shows that~$f$ is constant. Since the Lipschitz functions are dense in~$L^p(\nu)$ and belong to $KS^{1,p}(K)$, both thresholds are attained, and
\begin{equation*}
\alpha_p^{\mathrm{dens}}=\alpha_p=1 \qquad (1\le p<\infty)\,.
\end{equation*}
The Poincar\'e inequality is replaced in this argument by the triviality of the kernel of the closed gradient.
\paragraph{A Morrey estimate.} A quantitative estimate is available in the range of the Poincar\'e inequalities, after decreasing~$\varepsilon$. By~\cite[Theorem~3.19]{Ka12},
\begin{equation*}
\frac{\nu(B(x,R))}{\nu(B(x,r))}
\le C\,\Bigl(\frac Rr\Bigr)^q\quad(0