\begin{document}

\begin{abstract}
Using the curvature-dimension inequality proved in Part~I, we look
  at consequences of this inequality in terms of the interaction
  between the sub-Riemannian geometry and the heat semigroup $P_t$
  corresponding to the sub-Laplacian. We give bounds for the gradient,
  entropy, a Poincar\'e inequality and a Li-Yau type inequality. These
  results require that the gradient of $P_t f$ remains uniformly
  bounded whenever the gradient of $f$ is bounded and we give several
  sufficient conditions for this to hold.
\end{abstract}

\maketitle

\section{Introduction} \label{sec:Introduction} One of the most
important relations connecting the geometric properties of a
Riemannian manifold $(M, \tensorg)$ with the properties of its Laplace
operator $\Delta$ is the curvature-dimension inequality given by
$$\frac{1}{2} \Delta \|\grad f\|^2_{\tensorg} 
- \langle\grad f, \grad \Delta f\rangle_{\tensorg} \geq \frac{1}{n} (\Delta f)^2 + \rho \|\grad f \|^2_{\tensorg}.$$
In the above formula, $n = \dim M$, $\rho$ is a lower bound for the
Ricci curvature of~$M$ and~$f$ is any smooth function. In the notation
of Bakry and \'Emery~\cite{BaEm85}, this inequality is written as
$$\mathsf \Gamma_2(f) \geq \frac{1}{n} (L f)^2 + \rho \mathsf \Gamma(f), \qquad L = \Delta,$$
where\begin{align} \label{Sec1Gamma} \mathsf \Gamma(f,g) & = \frac{1}{2}
  \left(L (fg) - f L g - g L f \right) , \qquad & \mathsf \Gamma(f) =
  \mathsf \Gamma(f,f), \\ \label{Sec1Gamma2} \mathsf \Gamma_2(f, g) & = \frac{1}{2}
  \left(L \mathsf \Gamma(f,g) - \mathsf \Gamma(f ,L g) - \mathsf \Gamma(L f, g)\right) ,
  \qquad & \mathsf \Gamma_2(f) = \mathsf \Gamma_2(f,f).
\end{align}
For a good overview of results that follow from this inequality, see
\cite{Wan04} and references therein.

This approach has been generalized by F.~Baudoin and N.~Garofalo in
\cite{BaGa12} to sub-Riemannian manifolds with transverse
symmetries. A sub-Riemannian manifold is a connected manifold $M$ with
a positive definite metric tensor~$\mathbf h$ defined only on a
subbundle~$\mathcal H$ of the tangent bundle $TM$. As is typical, we will
assume that sections of~$\mathcal H$ and their iterated Lie brackets span
the entire tangent bundle. This is a sufficient condition for the
sub-Riemannian structure $(\mathcal H, \mathbf h)$ to give us a metric
$\mathsf d_{cc}$ on $M$, where the distance between two points with
respect to $\mathsf d_{cc}$ is defined by taking the infimum of the
lengths of all curves tangent to~$\mathcal H$ that connect the mentioned
points. For the definition of sub-Riemannian manifolds with transverse
symmetries, see \cite[Section 2.3]{BaGa12} or Part~I, Section 4.3. We
extended this formalism in Part~I to sub-Riemannian manifold with an
integrable metric-preserving complement,
consisting of all sub-Riemannian manifolds that can be obtained from
Riemannian foliations.

Given such a metric-preserving complement $\mathcal V$ to $\mathcal H$, there
exist a canonical corresponding choice of second order operator
$\Delta_{\mathbf{h}}^\prime$ which locally satisfies
$$\Delta_{\mathbf{h}}^\prime = \sum_{i=1}^n A_i^2 + \text{lower order terms}.$$
with $A_1, \dots, A_n$ being a local orthonormal basis of $\mathcal H$. We
proved in Part~I that under mild conditions, there exist constants $n,
\rho_1, \rho_{2,0}$ and $\rho_{2,1}$ such that the operator satisfies
a generalized version of the curvature-dimension inequality
$$\mathsf \Gamma_2(f) + \ell \mathsf \Gamma^{\mathbf v^*}_2(f) \geq \frac{1}{n} (Lf) 
+ (\rho_1 - \ell^{-1}) \mathsf \Gamma(f) + (\rho_{2,0} + \ell \rho_{2,1}) \mathsf \Gamma^{\mathbf v^*}(f),$$
for any $f \in C^\infty(M)$ and $\ell >0$. Here, $\mathsf \Gamma(f)$ and
$\mathsf \Gamma_2(f)$ is defined as in \eqref{Sec1Gamma} and
\eqref{Sec1Gamma2} with $L = \Delta_{\mathbf{h}}^\prime$, while $\mathsf \Gamma^{\mathbf v^*}(f)
= \mathbf v^*(df,df)$ for some $\mathbf v^* \in \Gamma(\Sym^2 TM)$ and
$\mathsf \Gamma^{\mathbf v^*}_2(f)$ is defined analogously to $\mathsf \Gamma_2(f)$.
We also gave a geometrical interpretation of these constants. A short
summary of the results of Part~I is given in
Section~\ref{sec:Summary}.

In this paper, we want to explore how this inequality can be used to
obtain results for the heat semigroup of $\Delta_{\mathbf{h}}^\prime$. In
Section~\ref{sec:GradientBound}, we will address the question of
whether a smooth bounded function with bounded gradient under the action of the heat
semigroup will continue to have a uniformly bounded gradient. This
will be an important condition for the results to follow. For a
complete Riemannian manifold, a sufficient condition for this to hold
is that the Ricci curvature is bounded from below, see
e.g. \cite{Yau78} and \cite[Eq 1.4]{Tha98}. We are not able to give
such a simple formulation for the sub-Laplacian, however, we are able
to prove that it holds in many cases, including fiber bundles with
compact fibers and totally geodesic fibers. This was only previously
only known to hold for sub-Riemannian manifolds with transverse
symmetries of Yang-Mills type \cite[Theorem~4.3]{BaGa12}, along with some isolated
examples in \cite[Section 4]{Wan13} and \cite[Appendix]{BaWa14}. We give several
results using the curvature-dimension inequality of Part~I that only
rely on the boundedness of the gradient under the heat flow. Our results generalize theorems found in \cite{BaGa12,BaBo12,BBG14}. In
particular, if $\Delta_{\mathbf{h}}^\prime$ is a sub-Laplacian on $(M, \mathcal H, \mathbf h)$
satisfying our generalized curvature-dimension inequality, then under
certain conditions (analogous to positive Ricci curvature in Riemannian
geometry) we have the following version of the Poincar\'e inequality
$$\| f - f_M \|_{L^2(M,\vol)} \leq \frac{1}{\sqrt{\alpha}}\, \| df\|_{L^2(\mathbf h^*)}.$$
Here, $\alpha$ is a positive constant, $\mathbf h^*$ is the co-metric of $(\mathcal H, \mathbf h)$, $f_M$ is the mean value of
a compactly supported function $f$ and for any $\eta \in \Gamma(T^*M)$ we use
$$\|\eta\|_{L^2(\mathbf h^*)} := \int_M \mathbf h^*(\eta, \eta) \dvol.$$

In Section~\ref{sec:GeodesicFibers} we look at results which require
the additional assumption that $\mathsf \Gamma^{\mathbf v^*}(f,
\mathsf \Gamma(f)) = \mathsf \Gamma(f,
\mathsf \Gamma^{\mathbf v^*}(f))$. This is important for inequalities
involving logarithms. We give a description of what this condition
means geometrically and discuss results that follow from it, such as a
Li-Yau type inequality and parabolic Harnack inequality.

In Section~\ref{sec:Comments} we give some concrete examples, mostly
focused on case of sub-Riemannian structures appearing from totally
geodesic foliations with a complete metric. Here, all previously
mentioned assumptions are satisfied. In this case, we also give a
comment on how the invariants in our sub-Riemannian
curvature-dimension inequality compare to the Riemannian curvature of
an extended metric.

In parallel with the development of our paper, part of the results of Theorem~\ref{th:CondARiemann} and Lemma~\ref{lemma:iff} was given in \cite{BKW14} for the case of sub-Riemannian obtained from Riemannian foliations with totally geodesic leaves that are of Yang-Mills type.

\subsection{Notations and conventions}
Unless otherwise stated, all manifolds are connected. If $\mathcal E \to M$
is any vector bundle over a manifold $M$, its space of smooth sections
is written $\Gamma(\mathcal E)$. If $s \in \Gamma(\mathcal E)$, we generally
prefer to write $s|_x$ rather than $s(x)$ for its value in $x \in
M$. By a metric tensor~$\mathbf s$ on~$\mathcal E$, we mean smooth section
of $\Sym^2 \mathcal E^*$ which is positive definite or at least positive
semi-definite. For every such metric tensor, we write
$\|e\|_{\mathbf s} = \sqrt{\mathbf s(e,e)}$ for any $e \in \mathcal E$ even
if $\mathbf s$ is only positive semi-definite. All metric tensors are
denoted by bold, lower case Latin letters (e.g. $\mathbf h,
\tensorg,\dots$). We will only use the term Riemannian metric for a
positive definite metric tensor on the tangent bundle. If $\tensorg$
is a Riemannian metric, we will use $\tensorg^*$, $\wedge^k
\tensorg^*, \dots$ for the metric tensors induced on $T^*M,
\bigwedge^k T^*M, \dots$.

If $\alpha$ is a form on a manifold $M$, its contraction or interior
product by a vector field~$A$ will be denoted by either
$\iota_A\alpha$ or $\alpha(A, \newbullet).$ We use $\mathcal L_A$ for the
Lie derivative with respect to $A$. If $M$ is furnished with a Riemannian metric $\tensorg$, any bilinear tensor $\mathbf s: TM \otimes TM \to \mathbb{R}$ can be identified with an endomorphism of $TM$ using $\tensorg$. We use the notation $\tr \, \mathbf s(\times, \times)$ for the trace of this corresponding endomorphism, with the metric being implicit. If $\mathcal H$ is a subbundle of $TM$, we will also use the notation $\tr_{\mathcal H} \mathbf s(\times, \times ) := \tr \mathbf s(\pr_{\mathcal H} \times, \pr_{\mathcal H} \times)$, where $\pr_{\mathcal H}$ is the orthogonal projection to $\mathcal H$.

\section{Summary of Part~I} \label{sec:Summary} In this section, we
briefly recall the most important definitions and results from Part~I.

\subsection{Sub-Riemannian manifolds}
A sub-Riemannian manifold is a triple $(M, \mathcal H, \mathbf h)$ where
$M$ is a connected manifold and $\mathbf h$ is a positive definite
metric tensor defined only on the subbundle $\mathcal H$ of
$TM$. Equivalently, it can be considered as a manifold with a positive
semi-definite co-metric $\mathbf h^*$ that is degenerate along a
subbundle of $T^*M$. This latter mentioned subbundle will be
$\Ann(\mathcal H)$, the annihilator of $\mathcal H$, that consist of all covectors 
vanishing on $\mathcal H$. Define $\sharp^{{\mathbf h}^*}\colon p \mapsto
\mathbf h^*(p,\newbullet) \in \mathcal H \subseteq TM$. We will assume that
the subbundle $\mathcal H$ is bracket-generating, i.e. its sections and
their iterated brackets span the entire tangent bundle. Then we have a
well defined metric $\mathsf d_{cc}$ on $M$ by taking the infimum over the
length of curves that are tangent to $\mathcal H$.

\subsection{Two notions of sub-Laplacian}
Let $\vol$ be any smooth volume form on $M$. We then define the
sub-Laplacian relative to the volume form $\vol$ as $\Delta_{\mathbf{h}} f = \dv \sharp^{{\mathbf h}^*}
df,$ where the divergence is defined relative to $\vol.$ From the
definition, it is clear that $\Delta_{\mathbf{h}}$ is symmetric relative the measure
$\vol$, i.e. $\int_M f \Delta_{\mathbf{h}} g \dvol = \int_M g \Delta_{\mathbf{h}} f \dvol$ for any
$f,g \in C^\infty_c(M)$ of compact support.

We also introduced the concept of a sub-Laplacian defined relative to
a complement $\mathcal V$ of $\mathcal H$. Let $\tensorg$ be any Riemannian
metric satisfying $\tensorg|_{\mathcal H} = \mathbf h$ and let $\mathcal V$ be
the orthogonal complement of $\mathcal H$. Consider the following
connection,
\begin{align} \label{rnabla} \mathring{\nabla}_{A} Z = & \pr_{\mathcal H}
  \nabla_{\pr_{\mathcal H} A} \pr_{\mathcal H} Z + \pr_{\mathcal V}
  \nabla_{\pr_{\mathcal V} A} \pr_{\mathcal V} Z \\ \nonumber & + \pr_{\mathcal H}
  [\pr_{\mathcal V} A, \pr_{\mathcal H} Z] + \pr_{\mathcal V} [\pr_{\mathcal H} A,
  \pr_{\mathcal V} Z], \end{align} where $\nabla$ is the Levi-Civita
connection of $\tensorg$. We define the sub-Laplacian of $\mathcal V$
as
$$\Delta_{\mathbf{h}}^\prime = \tr_{\mathcal H} \mathring{\nabla}^2_{ \times, \times}f.$$
It is simple to verify that this definition is independent of
$\tensorg|_{\mathcal V}$, it only depends on $\mathbf h$ and the splitting
$TM = \mathcal H \oplus \mathcal V.$

\begin{remark} \label{re:LiftedL}
  If $\mathcal V$ is the vertical bundle of a submersion $\pi: M \to B$
  into a Riemannian manifold $(B, \widecheck{\tensorg})$ and if
  $\mathbf h$ is a sub-Riemannian metric defined by pulling back
  $\widecheck{\tensorg}$ to an Ehresmann connection $\mathcal H$ on $\pi$,
  then the sub-Laplacian $\Delta_{\mathbf{h}}^\prime$ of $\mathcal V$ satisfies $$\Delta_{\mathbf{h}}^\prime (f
  \circ \pi) = (\widecheck{\Delta} f) \circ \pi,$$ where
  $\widecheck{\Delta}$ is the Laplacian of $\widecheck{\tensorg}$ and
  $f \in C^\infty(B).$
\end{remark}

\subsection{Metric-preserving complement}
A subbundle $\mathcal V$ is integrable if $[\Gamma(\mathcal V), \Gamma(\mathcal V)]
\subseteq \Gamma(\mathcal V)$. By the Frobenius Theorem, such a subbundle
gives us a foliation on $M$. We say that an integrable complement
$\mathcal V$ of $\mathcal H$ is metric-preserving if
$$\mathcal L_{V} \pr_{\mathcal H}^* \mathbf h =0, \quad \text{ for any } V \in \Gamma(\mathcal V),$$
where $\pr_{\mathcal H}$ is the projection
corresponding to the choice of complement $\mathcal V$. Let $\tensorg$ be any Riemannian
metric such that $\tensorg|_{\mathcal H} = \mathbf h$ and $\mathcal H^\perp = \mathcal V$.
If we define $\mathring{\nabla}$ as in \eqref{rnabla},
then $\mathcal V$ is metric preserving if and only if $\mathring{\nabla} \mathbf h^* =
0$. The foliation of $\mathcal V$ is then called a Riemannian foliation.

\subsection{Generalized curvature-dimension inequality}
For a given smooth second order differential operator $L$ without
constant term and for any section $\mathbf s^*$ of $\Sym^2 TM,$ define
\begin{align*}
  \mathsf \Gamma^{\mathbf s^*}(f,g) &= \mathbf s^*(df,dg), \quad & \mathsf \Gamma^{\mathbf s^*}(f,f) = \mathsf \Gamma^{\mathbf s^*}(f), \\
  \mathsf \Gamma^{\mathbf s^*}_2(f,g) &= \frac{1}{2} \left(L
    \mathsf \Gamma^{\mathbf s^*}(f,g) - \mathsf \Gamma(Lf, g) -
    \mathsf \Gamma^{\mathbf s^*}(f,Lg) \right), \quad &
  \mathsf \Gamma^{\mathbf s^*}_2(f,f) = \mathsf \Gamma^{\mathbf s^*}_2(f).
\end{align*}
Assume that
$$\frac{1}{2}  \left(L(fg) - f Lg - g Lf\right) = \mathbf h^*(df, dg).$$
for some positive semi-definite section $\mathbf h^*$ of $\Sym^2
TM$. We say that $L$ satisfies the generalized curvature-dimension
inequality \eqref{CDstar} if there is another positive semi-definite
section $\mathbf v^*$ of $\Sym^2 TM$, a positive number $0 < n \leq
\infty$ and real numbers $\rho_1, \rho_{2,0}$ and $\rho_{2,1}$ such
that for any $\ell >0$ and $f \in C^\infty(M)$,
\begin{equation}
  \tag{\sf CD*} \label{CDstar}
  \mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}_2(f) \geq \frac{1}{n} (Lf)^2 + (\rho_1 - \ell^{-1}) \mathsf \Gamma^{\mathbf h^*}(f) + (\rho_{2,0} + \ell \rho_{2,1}) \mathsf \Gamma^{\mathbf v^*}(f).
\end{equation}

Let $(M, \mathcal H, \mathbf h)$ be a sub-Riemannian manifold with $\mathcal H$
being a bracket-generating subbundle of $TM$. Assume that we have an
integrable metric-preserving complement $\mathcal V$ and let $\tensorg$ be
a Riemannian metric such that $\mathcal H$ and $\mathcal V$ are orthogonal, with
$\mathbf h = \tensorg|_{\mathcal H}$ and $\mathbf v :=
\tensorg|_{\mathcal V}$. Let $\mathbf h^*$ and $\mathbf v^*$ be their
respective co-metrics. Relative to these structures, we make the
following assumptions.
\begin{enumerate}[(i)]
\item We define the curvature of $\mathcal H$ relative to the complement
  $\mathcal V$ as the vector valued 2-form
$$\mathcal R(A,Z) = \pr_{\mathcal V} [\pr_{\mathcal H} A, \pr_{\mathcal H} Z], \qquad A, Z \in \Gamma(TM).$$
We assume that there is a finite, minimal positive constant $\mathscr{M}_{\mathcal{R}}^{\mathstrut} < \infty$ such that $\|\mathcal R(v, \newbullet)\|_{\tensorg^* \otimes \tensorg} \leq \mathscr{M}_{\mathcal{R}}^{\mathstrut}\|\pr_{\mathcal H} v\|_{\tensorg}$ for any $v \in TM$. Since $\mathscr{M}_{\mathcal{R}}^{\mathstrut}$ is never
zero when $\mathcal V \neq 0$, we can normalize $\mathbf v$ by requiring
$\mathscr{M}_{\mathcal{R}}^{\mathstrut} =1.$ Let $m_{\mathcal{R}}^{\mathstrut}$ be the maximal constant satisfying $\|
\alpha(\mathcal R(\newbullet, \newbullet))\|_{\wedge^2 \mathbf h^*} \geq
m_{\mathcal{R}}^{\mathstrut} \|\alpha \|_{\mathbf v^*}$ pointwise for any $\alpha \in \Gamma(T^*M)$.
Note that $m_{\mathcal{R}}^{\mathstrut}$ can only be non-zero if $\mathcal H$ is bracket-generating
of step~2, i.e. if $\mathcal H$ and its first order brackets span the entire
tangent bundle.
\item Define $\Ric_{\mathcal H}(Z_1,Z_2) = \tr \big(A \mapsto
    R^{\mathring{\nabla}}(\pr_{\mathcal H} A,Z_1)Z_2 \big)$. This is a symmetric
  2-tensor, which vanishes for vectors in $\mathcal V$. We assume that
  there is a lower bound $\rho_{\mathcal{H}}^{\mathstrut}$ for $\Ric_{\mathcal{H}}^{\mathstrut}$, i.e. for every $v \in
  TM$, we have $$\Ric_{\mathcal{H}}^{\mathstrut}(v,v) \geq \rho_{\mathcal{H}}^{\mathstrut} \|\pr_{\mathcal H}
  v\|_{\mathbf h}^2.$$
\item Write $\mathscr{M}_{\rnabla \tensorv^*} = \sup_{M} \big\| \mathring{\nabla}_{\newbulletsub}^{\mathstrut}
  \mathbf v^* (\newbullet,\newbullet) \big\|_{\tensorg^* \otimes \Sym^2
    \tensorg^*}$ and assume that it is finite. Define
$$(\Delta_{\mathbf{h}}^\prime \mathbf v^*)(\alpha,\alpha) = \tr_{\mathcal H} (\mathring{\nabla}_{\times,\times }^2 \mathbf v^*)(\alpha,\alpha)$$
and assume that $(\Delta_{\mathbf{h}}^\prime \mathbf v^*)(\alpha,\alpha) \geq \rho_{\roughL \! \tensorv^*}
\|\alpha\|_{\mathbf v^*}^2$ pointwise for any $\alpha \in \Gamma(T^*M)$.
\item Finally, introduce $\Ric_{\mathcal{H}}^{\mathstrut}V$ as
$$\Ric_{\mathcal{H}}^{\mathstrut}V (A,Z) = \frac{1}{2} \tr\left( \tensorg(A, (\mathring{\nabla}_{\times}^{\mathstrut} \mathcal R)(\times,Z)) 
+ \tensorg(Z, (\mathring{\nabla}^{\mathstrut}_{\times} \mathcal R)(\times,A)) \right).$$
Assume then that $\Ric_{\mathcal{H}}^{\mathstrut}V(Z,Z) \geq - 2\mathscr{M}_{\mathcal{HV}} \|\pr_{\mathcal V} Z\|_{\mathbf v} \|\pr_{\mathcal H} Z\|_{\mathbf h}$ pointwise.
\end{enumerate}

These assumptions guarantee that the sub-Laplacian $\Delta_{\mathbf{h}}^\prime$ of
$\mathcal V$ satisfies \eqref{CDstar}.
\begin{theorem} \label{th:CD} Define $\mathsf \Gamma^{\mathbf s^*}_2$ with
  respect to $L = \Delta_{\mathbf{h}}^\prime$. Then $\Delta_{\mathbf{h}}^\prime$ satisfies \eqref{CDstar}
  with
  \begin{equation} \label{rhoSR}
    \left\{ \begin{aligned} 
    n & = \rank \mathcal H, \\
    \rho_1 & = \rho_{\mathcal{H}}^{\mathstrut} - c^{-1}, \\
    \rho_{2,0} & =   \frac{1}{2} m_{\mathcal{R}}^{\mathstrut}var^2 - c(\mathscr{M}_{\mathcal{HV}} + \mathscr{M}_{\rnabla \tensorv^*})^2, \\
        \rho_{2,1} & = \frac{1}{2} \rho_{\roughL \! \tensorv^*} - \mathscr{M}_{\rnabla \tensorv^*}^2, \end{aligned} \right.
  \end{equation}
  for any positive $c > 0$.
\end{theorem}
See Part~I, Section~3.2 for a geometric interpretation of these constants.

\subsection{The case when $\mathring{\nabla}$ preserves the metric} Assume that we can
find a metric tensor $\mathbf v$ on $\mathcal V$ satisfying $\mathring{\nabla}
\mathbf v^* = 0$. Then $\Delta_{\mathbf{h}}^\prime = \Delta_{\mathbf{h}}$, where $\Delta_{\mathbf{h}}$ is defined
relative to the volume form of the Riemannian metric $\tensorg$
defined by $\tensorg^* = \mathbf h^* + \mathbf v^*.$ Hence, $L = \Delta_{\mathbf{h}} $
is symmetric with respect to this volume form and satisfies the
inequality
\begin{equation} \tag{\sf CD} \label{CD} \mathsf \Gamma^{\mathbf h^* + \ell
    \mathbf v^*}_2(f) \geq \frac{1}{n} (L f)^2 + \left(\rho_1 -
    \ell^{-1} \right) \mathsf \Gamma^{\mathbf h^*}(f) + \rho_{2}
  \mathsf \Gamma^{\mathbf v^*}(f) 
\end{equation}
with
\begin{equation} \label{rhoSR2} \left\{ \begin{aligned} \rho_1 & =
      {\rho_{\mathcal{H}}^{\mathstrut}} - c^{-1}, \\ \rho_{2} & = \frac{1}{2}
      m_{\mathcal{R}}^{\mathstrut}var^2 - c\mathscr{M}_{\mathcal{HV}}^2, \end{aligned} \right.
\end{equation}
for any positive $c > 0$. We shall also need the following result.
\begin{proposition} \label{prop:DoubleGamma} For any $f \in
  C^\infty(M)$, and any $c >0$ and $\ell >0$,
  \begin{align*}
    \frac{1}{4} \mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf h^*}(f)) &\leq  \mathsf \Gamma^{\mathbf h^*}(f) \left(\mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}_2(f) - (\varrho_1 -\ell^{-1}) \mathsf \Gamma^{\mathbf h^*}(f) - \varrho_2 \mathsf \Gamma^{\mathbf v^*}(f) \right), \\
    \frac{1}{4} \mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf v^*}(f)) &\leq
    \mathsf \Gamma^{\mathbf v^*}(f) \mathsf \Gamma^{\mathbf v^*}_2(f),
  \end{align*}
  where $\varrho_1 = \rho_{\mathcal{H}}^{\mathstrut} - c^{-1}$ and $\varrho_2 = - c \mathscr{M}_{\mathcal{HV}}^2.$
\end{proposition}

\subsection{Spectral Gap}
Let $(M, \mathcal H, \mathbf h)$ be a compact sub-Riemannian manifold where
$\mathcal H$ is bracket-gen\-er\-at\-ing. Let $L$ be a smooth second order
operator without constant term satisfying $\mathbf q_L = \mathbf h^*$
and assume also that $L$ is symmetric with respect to some volume form
$\vol$ on $M$.  Assume that $L$ satisfies \eqref{CDstar} with
$\rho_{2,0} > 0$. Let $\lambda$ be any nonzero eigenvalue of $L$. Then
$$\frac{n \rho_{2,0}}{n + \rho_{2,0}(n-1)} \left(\rho_1 - \frac{ k_2}{\rho_{2,0}} \right) \leq - \lambda, \qquad k_2 = \max \{0, -\rho_{2,1} \}.$$

\section{Results under conditions of a uniformly bounded
  gradient} \label{sec:GradientBound}
\subsection{Diffusions of second order
  operators} \label{sec:GeneralOperator} Let $T^2M$ denote the bundle
of second order tangent vectors. Let $L$ be a section of $T^2M$,
i.e. a smooth second order differential operator on $L$ without
constant term. Consider the short exact sequence
$$0 \to TM \stackrel{\inc}{\longrightarrow} T^2M \stackrel{\mathbf q}{\longrightarrow} \Sym^2 T M \to 0$$
where $\mathbf q_L = \mathbf q(L)$ is defined by
\begin{equation} \label{qform} \mathbf q_L(df,dg) = \frac{1}{2}
  \left(L(fg) - f Lg - g Lf \right), \quad f,g \in
  C^\infty(M).\end{equation} Assume that $\mathbf q_L$ is
positive semi-definite. Then for any point $x \in M$ and relative to some
filtered probability space $(\Omega, \mathscr F_{\!\newbulletsub}^{\mathstrut}, \mathbb P)$, we have a
$\frac{1}{2} L$-diffusion $X = X(x)$ defined up to some
explosion time $\tau = \tau(x)$, see \cite[Theorems 1.3.4 and
1.3.6]{Hsu02}. In other words, there exist an $\mathscr F_{\!\newbulletsub}^{\mathstrut}$-adapted
$M$-valued semimartingale $X(x)$ satisfying $X_0(x) = x$ and
such that for any $f \in C^\infty(M)$, 
$$d(f(X_t) ) -\frac{1}{2} L f(X_t) \, dt$$ is 
the differential of a local martingale up to $\tau(x)$. The diffusion $X(x)$ is defined on the
stochastic interval 
$[0,\tau(x))$, with $\tau(x)$ being an explosion time in the sense that the event
$\{\tau(x) < \infty\}$ is almost surely contained in $\{\lim_{t \uparrow \tau} X_t(x)
= \infty\}$. 
For a construction of $X_t(x)$ in the case of $L = \Delta_{\mathbf{h}}^\prime$, see Part~I, Section~2.5.

Let $P_t $ be the corresponding semigroup $P_t f(x) =
\mathbb E[ 1_{t \leq \tau} f( X_t(x))]$ for bounded measurable
functions $f$. Note that in general $P_t 1\leq1$ with equality if and
only if $\tau(x) = \infty$ a.s. Also note that for any compactly
supported $f \in C_c^\infty(M)$, we have $\partial_t P_t f =
\frac{1}{2} L P_t f$. If $\tau = \infty$ a.s., then $u_t = P_t f$
is the unique solution to $\partial_t u_t =\frac{1}{2} L u_t$ with
initial condition $u_0 = f$, where $(t,x) \mapsto u_t(x)$ is a smooth
function on ${\real_+} \times M$.

Since $\mathbf q_L$ is positive semi-definite, we can write $L$
(non-uniquely) as
$$L = \sum_{i=1}^k Z_i^2 + Z_0,$$
where $k$ is an integer and $Z_0, Z_1, \dots, Z_k$ are vector fields,
not necessarily linearly independent at every point. If we assume that
these vector fields and their brackets span the entire tangent bundle,
then $L$ is a hypoelliptic operator \cite{Hor67}. Hence, it has a
smooth heat kernel with respect to any volume form on $M$. By \cite{StVa72}, we also
have $P_t f > 0$ for any nonnegative function $f \in C^\infty(M)$, not identically zero,
see also \cite[Introduction]{Kun78}. We will \textit{only} consider such second order operators
in this paper.

Write $\mathbf h^* = \mathbf q_L$. Assume that $L$ satisfies \eqref{CDstar} for some $\mathbf v^*$. We
want to use this inequality to obtain statements of $P_t$. However, we
are going to need the following condition to hold to make such
statements.

\subsection{Boundedness of the gradient under the action of the heat semigroup}
The most important property which we are going to need for all of our
results, is the following condition. 
Let $C_b^\infty(M)$ be the collection of all bounded smooth functions.
\begin{equation}
  \tag{\sf A} \label{CondA} \begin{array}{c} 
   \text{We have $P_t 1 = 1$ and for any $f \in C^\infty_b(M)$ with $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C_b^\infty(M)$} \\
   \text{and any $T > 0$, it holds that} 
    \sup_{t \in [0,T]} \|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(P_tf)\|_{L^\infty} < \infty. \end{array}
\end{equation}
To understand condition \eqref{CondA} better, let us first discuss the
special case when $\mathbf h = \tensorg$ is a Riemannian metric,
$\mathbf v^* = 0$ and $L = \Delta$ is the Laplacian of $\tensorg$. Then
\eqref{CDstar} holds if and only if the Ricci curvature is bounded
from below, see e.g. \cite{Wan04}. If we in addition know that
$\tensorg$ is complete, then \eqref{CondA} is satisfied. However, even if we know that
$P_t 1 =1$ and that the manifold is flat, condition \eqref{CondA} still may not hold if
$\tensorg$ is an incomplete metric. See~\cite{Tha98}
for a counter-example.

We list some cases where we are ensured that \eqref{CondA} is
satisfied. We expect there to be more cases where this condition holds.

\subsubsection{Fiber bundles with compact fibers} \label{sec:FiberCompact} 
Let $L$ be a second order operator
on a manifold $M$ with $\mathbf q_L = \mathbf h^*$. Let $\mathbf v^*$ be
any other co-metric such that $\mathbf h^* + \mathbf v^*$ is positive
definite. The following observation was given in \cite[Lemma~2.1,
Proof (i)]{Wan13}.
\begin{lemma} \label{WangF} Assume that there exists a function $F \in
  C^\infty(M)$ and a constant $C >0$ satisfying
  \begin{enumerate}[$\ \bullet$]
  \item $\{x :F(x) \leq s\} $ is compact for any $s > 0$,
  \item $LF \leq C F$,
  \item $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(F) \leq C F^2.$
  \end{enumerate}
  Then \eqref{CondA} holds for the semigroup $P_t$ of the diffusion of $ L$.
\end{lemma}
Let $(B, \widecheck{\tensorg})$ be a complete $n$-dimensional
Riemannian manifold with distance $\mathsf d_{\widecheck{\tensorg}}$
and Ricci bound from below by $\rho \leq 0$. For a given point $b_0
\in B$, define $r = \mathsf d_{\widecheck{\tensorg}}(b_0,
\newbullet)$. Then the function $F= \sqrt{1+ r^2}$ (or rather an
appropriately smooth approximation) satisfies the above conditions
relative to $\widecheck{\Delta}$. This follows from the fact that
(outside the cut-locus) $\mathsf \Gamma^{\widecheck{\tensorg}}(r) = 1$ and from the Laplacian
comparison theorem
$$\widecheck{\Delta} r \leq (n-1) \left(\frac{1}{r} + \sqrt{- \rho} \right).$$
Now let $\pi: M \to B$ be a fiber bundle with a compact fiber over
this Riemannian manifold $B$. Choosing an Ehresmann connection $\mathcal H$
on $\pi$, we define a sub-Riemannian manifold $(M, \mathcal H, \mathbf h)$
by $\mathbf h = \pi^* \widecheck{\tensorg}|_{\mathcal H}$. Then $F \circ \pi$ clearly
satisfies Lemma~\ref{WangF} with respect to $L = \Delta_{\mathbf{h}}^\prime + Z$ where
$\Delta_{\mathbf{h}}^\prime$ is the sub-Laplacian of $\mathcal V = \ker \pi_*$ and $Z$ is any
vector field with values in $\mathcal V$. It follows that \eqref{CondA}
holds in this case.

\begin{remark} Let $\pi\colon M \to B$ be a surjective submersion into a Riemannian manifolds $(B, \widecheck{\tensorg})$. Let $\mathcal H$ be an Ehresmann connection on $\pi$ and define a sub-Riemannian
structure~$(\mathcal H, \mathbf h)$ by $\mathbf h = \pi^* \widecheck{\tensorg}|_{\mathcal H}$.
In this case, $\pi$ is a distance-decreasing map from the metric space $(M, \mathsf d_{cc})$
to $(M, \mathsf d_{\widecheck{\tensorg}})$, where the metrics $\mathsf d_{cc}$ and
$\mathsf d_{\widecheck{\tensorg}}$ are defined relative to $(\mathcal H, \mathbf h)$ and
$\widecheck{\tensorg}$, respectively. This follows from the observation that for any horizontal curve $\gamma$
in~$M$ from the point $x$ to the point $y$, the curve $\pi \circ \gamma$ will be
a curve of equal length in $B$ connecting $\pi(x)$ with $\pi(y)$, hence $\mathsf d_{cc}(x, y) \geq \mathsf d_{\widecheck{\tensorg}}(\pi(x), \pi(y))$. In particular, if $\mathsf d_{cc}$ is complete, so is $\mathsf d_{\widecheck{\tensorg}}$, and the converse also hold if $\pi$ is a fiber bundle with compact fibers.

Furthermore, if $\Delta_{\mathbf{h}}$ is the sub-Laplacian of $\mathcal V = \ker \pi_*$ satisfying \eqref{CDstar}, then the Ricci curvature
of $B$ is bounded from below, since, by Remark~\ref{re:LiftedL}, if we insert a function $f\circ \pi$, $f \in C^\infty(B)$ into \eqref{CDstar}, we obtain the usual curvature-dimension inequality on $B$,
$$\mathsf \Gamma^{\widecheck{\tensorg}}_2(f) \geq \frac{1}{n} (\widecheck{\Delta})^2 + \rho_1 \mathsf \Gamma^{\widecheck{\tensorg}}(f).$$
A result in \cite[Prop~6.2]{Bak94} tells us that $\rho_1$ must be a lower Ricci bound for $B$.
\end{remark}

We summarize all the above comments in the following proposition.
\begin{proposition}
Let $(M, \mathcal H, \mathbf h)$ be a complete sub-Riemannian manifold with an integrable
metric preserving complement $\mathcal V$. Let $\mathcal F$ be the foliation induced by $\mathcal V$ and
let $\Delta_{\mathbf{h}}^\prime$ be the sub-Laplacian of $\mathcal V$. Assume that the leafs of $\mathcal F$ are compact
and that $M/\mathcal F$ gives us a well defined smooth manifold. 
Finally assume that $L =\Delta_{\mathbf{h}}^\prime + Z$ satisfies \eqref{CDstar}
with respect to some $\mathbf v^*$ on $\mathcal V$.
Then \eqref{CondA} also hold for the corresponding semigroup $P_t$ of $L$.
\end{proposition}
Notice that in this case, unlike what we will discuss next, there is no requirement on the number of brackets needed of vector fields in $\mathcal H$ in order to span the entire tangent bundle.

\subsubsection{A sub-Laplacian on a totally geodesic Riemannian
  foliation} \label{sec:sLCompleteR} Assume that $(M, \tensorg)$ is a
complete Riemannian manifold with a foliation $\mathcal F$ given by an
integrable subbundle $\mathcal V$. Let $\mathcal H$ be the orthogonal complement
of $\mathcal V$ and assume that $\mathcal H$ is bracket-generating. Write $\mathbf h = \tensorg|_{\mathcal H}$. Define
$\mathring{\nabla}$ relative to the splitting $TM= \mathcal H \oplus \mathcal V$ as
in~\eqref{rnabla}. Assume that $\mathring{\nabla} \tensorg = 0$, which is equivalent to stating
that $\mathcal V$ is a metric preserving complement of $(M, \mathcal H, \mathbf h)$
and that $\mathcal F$ is a totally geodesic foliation. Note that since~$\tensorg$
is complete, so is $(M, \mathsf d_{cc})$, where
$\mathsf d_{cc}$ is defined relative to the sub-Riemannian metric~$\mathbf h$.
For such sub-Riemannian manifolds, the we can deduce the following.

\begin{theorem} \label{th:CondARiemann}
Let $\Delta_{\mathbf{h}}$ be the sub-Laplacian of the volume form of~$\tensorg$ or equivalently~$\mathcal V.$
Assume that $\Delta_{\mathbf{h}}$ satisfies
  the assumptions of Theorem~\textup{\ref{th:CD}} with $m_{\mathcal{R}}^{\mathstrut}
  >0$. Let $k = \max\{ - \rho_{\mathcal{H}}^{\mathstrut}, \mathscr{M}_{\mathcal{HV}}^2\} \geq 0$. Then, for any compactly supported $f
  \in C_c^\infty(M)$, $\ell > 0$ and $t \geq 0$,
  \begin{align*}\sqrt{\mathsf \Gamma^{\mathbf v^*}(P_tf)} &\leq P_t \sqrt{\mathsf \Gamma^{\mathbf v^*}(f)}\,,\\
    \sqrt{\mathsf \Gamma^{\mathbf h^*}(P_tf)} + \mathsf \Gamma^{\mathbf v^*}(P_t f)
    &\leq e^{k t/2} P_t\left( \sqrt{\mathsf \Gamma^{\mathbf h^*}(f)} +
      \mathsf \Gamma^{\mathbf v^*}(f) \right) + \frac{2}{k} ( e^{k t/2} - 1),
  \end{align*}
  where we interpret $\frac{2}{k} ( e^{k t/2} - 1)$ as $t$ when $k
  =0$. As a consequence \eqref{CondA} holds.
  
  In particular, any $\frac{1}{2} \Delta_{\mathbf{h}}$-diffusion $ X(x)$ with $X_0(x) =x \in M$ has infinite lifetime.
\end{theorem}

We remind the reader that $m_{\mathcal{R}}^{\mathstrut} >0$ can only happen if $TM$ is spanned by
$\mathcal H$ and first order brackets of its sections.
The proof is similar to the proof given for the special case of sub-Riemannian manifolds
with transverse symmetries of Yang-Mills type given in \cite[Section~3
\& Theorem~4.3]{BaGa12}. In our terminology, these are sub-Riemannian manifolds
with a trivial, integrable, metric-preserving complement $\mathcal V$ satisfying $\mathscr{M}_{\mathcal{HV}} = 0$.
The key factors that allow us to use a similar
approach are Proposition~\ref{prop:DoubleGamma} and the relation
$[\Delta_{\mathbf{h}}, \Delta] f = 0$, where $\Delta$ is the Laplace operator of $\tensorg$ and $f
\in C^\infty(M)$. The latter results follow from
Lemma~\ref{lemma:srLDeltaCommute}~(c) in the Appendix. Since the proof
uses spectral theory and calculus on graded forms, it is left to
Appendix~\ref{sec:ProofCondARiemann}. Theorem~\ref{th:CondARiemann} also holds in some cases
when $\mathcal V$ is not an integrable subbundle. See Appendix~\ref{sec:NotIntegrable} for details.

\subsection{General formulation}
Let $L$ be an operator as in Section~\ref{sec:GeneralOperator} with
corresponding $\frac{1}{2} L$-diffusion $X(x)$ satisfying $X_0(x) = x$ and semigroup $P_t$.
We will assume that $L$ satisfies
\eqref{CDstar} with $\mathbf v^*$ and the constants $n, \rho_1,
\rho_{2,0}$ and $\rho_{2,1}$ being implicit. Note that if $L$ satisfies
\eqref{CDstar} for some value of the previously mentioned constants,
then $L$ also satisfies the same inequality for any larger $n$ or
smaller values of $\rho_1, \rho_{2,0}$ or $ \rho_{2,1}$. For the
remainder of the section, no result will depend on $n$, however, we
will need condition \eqref{CondA} to hold.

Our proofs rely on the fact that, for any smooth function $$(t,x)
\mapsto u_t(x) \in C^\infty([0,\infty) \times M, \real),$$ we have 
a stochastic process $Y_t = u_t \circ X_t$ such that
$dY_t$ equals $\left((\partial_t + L) u_t\right) \circ X_t\, dt$ modulo differentials of local martingales. Hence, if $(\partial_t + L)
u_t \geq 0$ and if $u_t(\newbullet)$ is bounded for
every fixed $t$, then $Y_t$ is a (true) submartingale and $\mathbb E[
Y_t]$ is an increasing function with respect to $t$.

In our presentation, we will usually state the result for a smooth,
bounded function $f \in C_b^\infty(M) $ with bounded gradient 
$\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C^\infty_b(M)$.
Our results generalize theorems found in \cite{BaGa12,BaBo12,BBG14}.

We will first construct a general type of inequality, from which many
results can be obtained. See \cite[Theorem 1.1 (1)]{Wan13} for a similar
result, with somewhat different assumptions.

\begin{lemma} \label{lemma:ALambdaC} Assume that $L$ satisfies the conditions
  \eqref{CDstar} and \eqref{CondA}. For any $T >0$, let $a, \ell \in
  C([0,T], \real)$ be two continuous functions which are smooth and
  positive on~$(0,T)$. Assume that there exist a constant $C$, such
  that
  \begin{equation} \label{ALambdaC} \dot a(t) + \left( \rho_1 -
      \frac{1}{\ell(t)} \right) a(t) + C \geq 0, \quad \dot \ell(t) +
    \rho_{2,0} + \left(\rho_{2,1} + \frac{\dot a(t)}{a(t)} \right)
    \ell(t) \geq 0,
  \end{equation}
  holds for every $t \in (0,T)$. Then
  \begin{align*}
    a(0) \mathsf \Gamma^{\mathbf h^* + \ell(0) \mathbf v^*}(P_T f) \leq a(T)
    P_T \mathsf \Gamma^{\mathbf h^* + \ell(T) \mathbf v^*}(f) + C \left( P_T
      f^2 - (P_T f)^2 \right)
  \end{align*}
  for any $f \in C^\infty_b(M)$ with $\mathsf \Gamma^{\mathbf h^*+\mathbf v^*}(f) \in C_b^\infty(M)$.
\end{lemma}

\begin{proof}
  Define $u_t$ by $u_t(x) = P_{T-t} f(x)$ for any $0 \leq t \leq T$, $x\in M$. 
For any $x \in M$, consider the stochastic process
$$Y_t(x) := a(t) \mathsf \Gamma^{\mathbf h^* + \ell(t) \mathbf v^*}(u_t) \circ X_t(x) + C u_t^2 \circ X_t(x).$$
Write $\equivM$ for equivalence modulo differentials of local
martingales. Then, if \eqref{ALambdaC} holds
\begin{align*}
  dY_t \equivM & \left(\dot a(t) \mathsf \Gamma^{\mathbf h^* + \ell(t) \mathbf v^*}(u_t) + a(t) \dot \ell(t) \mathsf \Gamma^{\mathbf v^*}(u_t) + C \mathsf \Gamma^{\mathbf h^*}(u_t) \right)\circ X_t dt \\
  & + a(t) \mathsf \Gamma^{\mathbf h^* + \ell(t) \mathbf v^*}_2(u_t) \circ X_t dt \\
  \geq & \left( \dot a(t) + ( \rho_1 - \ell(t)^{-1} ) a(t) + C\right) \mathsf \Gamma^{\mathbf h^*}(u_t) \circ  X_t dt \\
  & + a(t) \left( \dot \ell(t) + \frac{\dot a(t)}{a(t)} + \rho_{2,0} +
    \rho_{2,1} \ell(t) \right) \mathsf \Gamma^{\mathbf v^*}(u_t) \circ X_t dt \geq 0.
\end{align*}
Since $Y_t$ is bounded by \eqref{CondA}, it is a true
submartingale.  Hence
\begin{align*}
  \mathbb E[ Y_T] & = a(T) P_T \mathsf \Gamma^{\mathbf h^* + \ell(T) \mathbf v^*}(f) + C P_T f^2 \\
  & \geq \mathbb E[Y_0] = a(0) \mathsf \Gamma^{\mathbf h^* + \ell(0)
    \mathbf v^*}(P_T f) + C (P_T f)^2.
\end{align*}\qed
\end{proof}

\subsection{Gradient bounds}
We give here the first results that follow from
Lemma~\ref{lemma:ALambdaC}.

\begin{proposition} \label{prop:GradBound} Assume that $L$ satisfies conditions
  \eqref{CDstar} and \eqref{CondA}. Let $f \in C^\infty_b(M) $ be any smooth bounded function satisfying $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C_b^\infty(M)$.
  \begin{enumerate}[\rm(a)]
  \item For any constant $\ell > 0$, if $\alpha(\ell) =
    \min\left\{\rho_1 - \frac{1}{\ell}, \rho_{2,1} +
    \frac{\rho_{2,0}}{\ell} \right\},$ then
$$\mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}(P_t f) \leq e^{-\alpha(\ell) t} P_t \mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}(f).$$
\item Assume that $\rho_{2,0} >0$ and let $k_1 = \max\{ 0,
  -\rho_1\}$ and $k_2 = \max \{ 0, - \rho_{2,1}\}$.  Then
  \begin{align*} t \mathsf \Gamma^{ \mathbf h^*}(P_t f) \leq \left(1 +
      \frac{2}{\rho_{2,0}} + \left(k_1 + \frac{k_2}{\rho_2} \right)
      t \right) (P_t f^2 - (P_t f)^2) .  \end{align*}
\item Assume that $\rho_1 \geq 0$, $\rho_{2,1} \geq 0$ and $\rho_{2,0} >0$. Then
$$\frac{1 - e^{-\rho_1 t}}{\rho_1} \mathsf \Gamma^{\mathbf h^*}(P_tf) \leq \left(1 + \frac{2}{\rho_{2,0}}  \right) \left( P_t f^2 - (P_t f)^2 \right),$$
where we interpret $(1- e^{-\rho_1 t})/{\rho_1}$ as $t$ when $\rho_1=0$.
\item Assume that $\rho_1$, $\rho_{2,0}$ and $\rho_{2,1}$ are
  nonnegative. Then for any $\ell >0$
$$ \frac{\ell}{\ell +t } \left(P_t f^2 - (P_t f)^2 \right) \leq t P_t \mathsf \Gamma^{\mathbf h^* + (\ell+t) \mathbf v^*}(f).$$
\end{enumerate}
\end{proposition}

\begin{proof}
  For all of our results (a)--(c), we will use
  Lemma~\ref{lemma:ALambdaC}.
  \begin{enumerate}[(a)]
  \item Let $\ell(t) = \ell$ be a constant, choose $C =0$ and put
    $a(t) = e^{-\alpha(\ell) t}$. Then \eqref{ALambdaC} is satisfied
    and we obtain
$$\mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}(P_Tf) \leq e^{-\alpha(\ell) T} P_T\mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}(P_T f).$$

\item For any $T \geq0 $, consider $a(t) = T-t$ and $\ell(t) =
  \frac{\rho_{2,0}}{T k_2 +2} (T-t)$. Then
  \begin{align*} & \dot \ell(t) + \rho_{2,0} + \left(\rho_{2,1} +
      \frac{\dot a(t)}{a(t)} \right) \ell(t) \geq 0, \end{align*} and
$$\dot a(t) + (\rho_1  - \ell(t)^{-1})a(t) \geq -1 -k_1 - \frac{Tk_2 +2}{\rho_{2,0}},$$
so \eqref{ALambdaC} is satisfied if we define $C= 1 + k_1 T + \frac{T
  k_2 +2}{\rho_{2,0}}$. Using Lemma~\ref{lemma:ALambdaC}, we obtain
\begin{align*} T \mathsf \Gamma^{\mathbf h^* + \frac{\rho_{2,0}}{T k_2 +2} T
    \mathbf v^*}(P_T f) \leq C (P_T f^2) - C (P_T f)^2 .  \end{align*}
\item Since the case $\rho_1 =0$ is covered in (b), we can assume $\rho_1 > 0$. Define
$$a(t) = \frac{1 - e^{-\rho_1 (T-t)}}{\rho_1}$$
and let
$$\ell(t) = \rho_{2,0} \frac{\int_t^T a(s) \, ds }{a(t)} = \rho_{2,0} \frac{e^{-\rho_1(T-t)} -1 + \rho_1 (T-t)}{\rho_1 (1- e^{-\rho_1 (T-t)})} .$$
Note that $\lim_{t \uparrow T} \ell(t) = 0$, while $\lim_{t\uparrow T} {a(t)}/{\ell(t)} ={2}/{\rho_{2,0}}$.
The latter number is also an upper bound for ${a(t)}/{\ell(t)}$ since
$$\frac{d}{dt} \frac{a(t)}{\ell(t)} = \frac{a(t) \left(2  \dot a(t) \int_t^T a(s) \, ds + a(t)^2 \right)}{\rho_{2,0} (\int_t^T a(s) ds)^2} > 0$$
from the fact that
\begin{align*} \qquad& 2  \dot a(t) \int_t^T a(s) ds + a(t)^2 \\  
&= \frac{1}{\rho^2_1} \left( - 2 e^{-\rho_1(T-t)} \left(e^{-\rho_1(T-T)} - 1 + \rho_1(T-t)  \right) + (1-e^{-\rho_1(T-t)})^2 \right) \\
& = \frac{1}{\rho_1^2} \left( - 2\rho_1 (T-t) e^{-\rho_1(T-t)} + 1-e^{-2\rho_1(T-t)} \right) .\end{align*}
and that $s \mapsto 1 -e^{-2s} -2x e^{-2s}$ is an increasing function, vanishing at $s = 0$.
We can then define $C = 1 + \frac{2}{\rho_{2,0}} $ such that $a(t), \ell(t)$ and $C$ satisfies \eqref{ALambdaC}.

\item Define $a(t) = t$, $\ell(t) = \frac{(\ell+T) t}{T}$ and $C =
  - \frac{\ell}{\ell +T}$, then \eqref{ALambdaC} is satisfied.\qed
\end{enumerate}
\end{proof}
We see here that the results of (a) and (d) cannot be stated
independently of a choice of co-metric $\mathbf v^*$. However, in the case of (a),
this does help us to get global statements that are independent of $\mathbf v^*$.

\subsection{Bounds for the $L^2$-norm of the gradient and the Poincar\'e inequality}
We want to use an approach similar to what is used in \cite[Corollary
2.4]{BaBo12} to obtain a global inequality from the pointwise
estimate in Proposition~\ref{prop:GradBound}~(a) which is independent
of~$\mathbf v^*$.
\begin{lemma} \label{lemma:RemoveV} Let $L \in \Gamma(T^2M)$ be a
  second order operator without constant term and with $\mathbf q_L =
  \mathbf h^*$ positive semi-definite. Assume also that there exists a volume form
  $\vol$, such that
$$\int_M f L g \dvol = \int_M g Lf \dvol, \quad f,g \in C_c^\infty(M),$$
and that $L$ is essentially self-adjoint on compactly supported functions $C_c^\infty(M)$.

Let $P_tf$ be the semigroup defined as in Section~\textup{\ref{sec:GeneralOperator}} 
and let $b:C^\infty_c(M) \times [0,\infty) \to \real$ be any function such that 
\begin{equation} \label{L1gradientFull} \| \mathsf \Gamma^{\mathbf h^*}(P_t
  f) \|_{L^1} \leq b(f,t), \quad \text{for any } f \in C_c^\infty(M),\ 
  t >0.
\end{equation}
Assume that $\beta(f,t) := \lim_{T \to \infty} b(f,T)^{t/T}$
exist for every $t > 0$. Then
$$\| \mathsf \Gamma^{\mathbf h^*} (P_t f) \|_{L^1} \leq \beta(f,t) \|\mathsf \Gamma^{\mathbf h^*}(f)\|  \quad \text{for any } f \in C_c^\infty(M). $$
\end{lemma}

\begin{proof}
  Denote the unique self-adjoint extension of $L$ an operator on
  $L^2(M, \vol)$ by the same letter, and let $\Dom(L)$ be its
  domain. Then $e^{t/2 L} f$ is the unique solution in $L^2(M,\vol)$ of
  equation $\partial_t u_t = \frac{1}{2} L u_t$ with initial
  condition $u_0 = f \in C_c^\infty(M)$. Since $P_t f$ is in $L^2(M,\vol)$ whenever
  $f$ is in $L^2(M,\vol)$, we have $P_t f = e^{t/2L}f$ (see Appendix~\ref{sec:Spectral}
  for more details).

  Notice that since $\mathbf q_L = \mathbf h^*$ is positive
  semi-definite, the self-adjoint operator $L$ is nonpositive. Let
  $\langle \newbullet, \newbullet \rangle$ denote the inner product on
  $L^2(M,\vol)$. Consider the spectral decomposition $L = -
  \int_0^\infty \lambda dE_{\lambda}$. Then since
  $\|\mathsf \Gamma^{\mathbf h^*}(f)\|_{L^1} = - \langle f, L f \rangle$,
  while $$\|\mathsf \Gamma^{\mathbf h^*}(P_tf)\|_{L^1} = -\langle f , L P_{2t}
  f \rangle,$$ the H\"older inequality tells us that for any $0 < t < T$,
  \begin{align*}
    \| \mathsf \Gamma^{\mathbf h^*}(P_tf) \|_{L^1} &= \int_0^\infty \lambda e^{-t\lambda} d\langle E_\lambda f, f\rangle \\
    &\leq \left(\int_0^\infty \lambda e^{-\lambda T} \, d\langle E_\lambda f, f\rangle\right)^{t/T}  \left( \int_0^\infty \lambda \, d\langle E_\lambda f, f \rangle \right)^{(T-t)/T} \\
    &\leq b(f,T)^{t/T} \|\mathsf \Gamma^{\mathbf h^*}(f)\|_{L^1}^{T/(T-t)} .
  \end{align*}
  Let $T \to \infty$ for the result.\qed
\end{proof}

We combine this result with the curvature-dimension inequality.
\begin{proposition} \label{prop:Poincare} Let $L$ be any second order
  operator such that the Carnot-Cara\-th\'eo\-dory metric $\mathsf d_{cc}$
  defined by the sub-Riemannian co-metric $\mathbf h^* := \mathbf q_L$
  is complete. Assume that $L$ satisfies \eqref{CDstar} and that
  \eqref{CondA} holds. Assume also that $L$ is symmetric with respect
  to any volume form $\vol$, i.e.~$\int_M fLg \dvol = \int_M gLf \dvol$ for
  any $f,g \in C_c^\infty(M)$.
  \begin{enumerate}[\rm(a)]
  \item For any $f \in C_c^\infty(M)$,
$$\| \mathsf \Gamma^{\mathbf h^*}( P_t f) \|_{L^1} \leq e^{-kt} \| \mathsf \Gamma^{\mathbf h^*}(f)\|_{L^1},$$
where $k = \min\{\rho_1, \rho_{2,1} \}$.
\item Assume that $\rho_1 \geq \rho_{2,1}$ and $\rho_{2,0} >-1$. Then for any $f \in C_c^\infty(M)$,
$$\| \mathsf \Gamma^{\mathbf h^*}( P_t f) \|_{L^1} \leq e^{- \alpha t} \| \mathsf \Gamma^{\mathbf h^*}(f)\|_{L^1}, \quad \alpha := \frac{\rho_{2,0} \rho_1 + \rho_{2,1}}{\rho_{2,0} +1}.$$
Furthermore, if $\alpha > 0$ and $\mathbf h^* + \mathbf v^*$ is a complete Riemannian co-metric, then $\vol(M) < \infty$.
\item Assume that the conditions in \emph{(b)} hold with $\alpha
  >0$ and $\vol(M) < \infty$. Then for any $f \in C_c^\infty(M)$,
$$\| f- f_M \|_{L^2}^2 \leq \frac{1}{\alpha} \int_M \mathsf \Gamma^{\mathbf h^*}(f) \dvol,$$
where $f_M = {\vol(M)}^{-1} \int_M f \dvol$.
As a consequence, if $\lambda$ is any non-zero eigenvalue of the
Friedrichs extension of~$L$, then $\alpha \leq - \lambda$.
\end{enumerate}
\end{proposition}

\begin{proof}
  \begin{enumerate}[(a)]
  \item By Proposition~\ref{prop:GradBound}~(a), we have $$\|
    \mathsf \Gamma^{\mathbf h^*}(P_t f)\|_{L^1} \leq e^{- \alpha(\ell) t} \|
    \mathsf \Gamma^{\mathbf h^* + \ell \mathbf v^*}(f) \|_{L^1} $$ with
    $\alpha(\ell) = \min \{ \rho_1 - 1/\ell, \rho_{2,1} + \rho_{2,0}
    /\ell \}$ holds for any $f \in C_c^\infty(M)$. It follows that $\|
    \mathsf \Gamma^{\mathbf h^*}(P_t f)\|_{L^1} \leq e^{- \alpha(\ell) t} \|
    \mathsf \Gamma^{\mathbf h^* }(f) \|_{L^1}$ from
    Lemma~\ref{lemma:RemoveV}. For every~$t$, we then take the infimum
    over~$\ell$ to get
$$ \inf_\ell e^{- \alpha t} \leq e^{-kt}  \quad\text{with } k = \min\{ \rho_1, \rho_{2,1} \}.$$
\item With $\alpha(\ell)$ defined as in the proof of (a), note that if
  $\rho_1 \geq \rho_{2,1}$ and if $\rho_2 > -1$, then
$$\inf_\ell e^{- \alpha(\ell) t} 
= \exp\left(- \frac{\rho_{2,0} \rho_1 + \rho_{2,1}}{\rho_{2,0} +1} t\right) = e^{-\alpha t}$$
which gives us the first part of the result.

For the second part, we assume that $\rho_1 > \rho_{2,1}$, since if
$\alpha >0$ with $\rho_1 = \rho_{2,1}$, then we can always decrease
$\rho_{2,1}$ while keeping $\alpha$ positive. For two compactly supported
functions $f,g \in C_c^\infty(M)$, note that
\begin{align*}  \int_M &(P_t f-f)g \dvol = \int_M \int_0^t  \left(\frac{d}{ds}  P_sf \right) g \, ds \dvol \\
  &=  \frac{1}{2} \int_0^t \int_M   (\Delta_{\mathbf{h}} P_sf)  g \dvol ds
   = \frac{1}{2} \int_0^t \int_M \mathsf \Gamma^{\mathbf h^*}(P_sf , g)
  \dvol ds.
\end{align*}
Hence, by the Cauchy-Schwartz inequality
\begin{align*} \left|\int_M (P_t f-f)g \dvol \right| \leq \frac{1}{2}
  \int_0^t \int_M \|\mathsf \Gamma^{\mathbf h^*}(P_sf)\|_{L^\infty}^{1/2}
  \mathsf \Gamma^{\mathbf h^*}(g)^{1/2} \, d\vol,
\end{align*}
which has upper bound
$$ \frac{1}{2} \left\|\mathsf \Gamma^{\mathbf h^*}(f)+ \frac{\rho_{2,0} +1}{\rho_1 - \rho_{2,1}}\mathsf \Gamma^{\mathbf v^*}(f) \right\|_{L^\infty}^{1/2} \int_M \mathsf \Gamma^{\mathbf h^*}(g)^{1/2} \dvol \int_0^t e^{-\alpha s} ds,$$
by Proposition~\ref{prop:GradBound}~(a). From the spectral theorem, we
know that $P_tf$ reaches an equilibrium $P_\infty f$ which is in
$\Dom(L)$ and satisfies $L P_\infty f = 0$. Since this implies
$\mathsf \Gamma^{\mathbf h^*}(P_\infty f) = 0$, we must have that $P_\infty f$ is a
constant.

Assume that $\vol(M) = \infty$. Then $P_\infty f = 0$ and hence, for
any $f,g \in C_c^\infty(M)$, we have
$$\left| \int_M fg \dvol \right| \leq \frac{1}{2 \alpha} \left\|\mathsf \Gamma^{\mathbf h^*}(f) + \frac{\rho_{2,0} +1}{\rho_1 - \rho_{2,1}}\mathsf \Gamma^{\mathbf v^*}(f) \right\|_{L^\infty}^{1/2} \int_M \mathsf \Gamma^{\mathbf h^*}(g)^{1/2} \dvol .$$
However, since $\tensorg$ is complete, we can find a sequence of
functions $f_n \in C^\infty_c(M)$ such that $f_n \uparrow 1$ while
$\| \mathsf \Gamma^{\tensorg^*}(f_n)\|_{L^\infty} \to 0$. Inserting such a sequence for $f$
in the above formula and letting $n \to \infty$, we obtain the
contradiction that $\int_M g \dvol = 0$ for any $g \in C_c^\infty(M)$.
\item Follows from the identity
  \begin{align*} \|f- f_M\|_{L^2}^2
    &= \int_M f^2 \dvol - \frac{1}{\vol(M)} \left(\int_M f \dvol \right)^2\\
    &= - \int_0^\infty \frac{\partial}{\partial t} \int_M (P_t f)^2 \dvol dt\\
    &=  \int_0^\infty \int_M \mathsf \Gamma^{\mathbf h^*}(P_tf) \dvol dt \leq
    \frac{1}{\alpha}
    \|\mathsf \Gamma^{\mathbf h^*}(f)\|_{L^1}.\end{align*}\qed
\end{enumerate}
\end{proof}

\section{Entropy and bounds on the heat
  kernel} \label{sec:GeodesicFibers}
\subsection{Commutating condition on $\mathsf \Gamma^{\mathbf h^*}$ and
  $\mathsf \Gamma^{\mathbf v^*}$} \label{sec:CommConditions} For some of our
inequalities involving logarithms, we will need the following
condition. Let $L \in \Gamma(T^2M)$ be a second order operator without
constant term with positive semi-definite $\mathbf q_L = \mathbf h^*$
defined as in \eqref{qform}. Assume that $L$ satisfies either
\eqref{CDstar} or \eqref{CD} with respect to positive
semi-definite~$\mathbf v^*$. We say that condition \eqref{CondB} holds if
\begin{equation}
  \label{CondB} \tag{\sf B} \mathsf \Gamma^{\mathbf h^*}(f, \mathsf \Gamma^{\mathbf v^*}(f)) = \mathsf \Gamma^{\mathbf v^*}(f, \mathsf \Gamma^{\mathbf h^*}(f)) \qquad \text{ for every } f \in C^\infty(M).
\end{equation}
We make the following observation.
\begin{lemma} \label{lemma:iff}
  Let $\tensorg$ be a Riemannian metric on a manifold $M$, with an orthogonal splitting $TM =
  \mathcal H \oplus_{\perp} \mathcal V$ and use this decomposition to define the
  connection $\mathring{\nabla}$ as in~\eqref{rnabla}. Write $\tensorg |_{\mathcal H} = \mathbf h$ and
  $\tensorg|_{\mathcal V} = \mathbf v$ and let $\mathbf h^*$ and $\mathbf v^*$
  be their respective corresponding co-metrics. Then
$$\mathsf \Gamma^{\mathbf h^*}(f, \mathsf \Gamma^{\mathbf v^*}(f)) = \mathsf \Gamma^{\mathbf v^*}(f, \mathsf \Gamma^{\mathbf h^*}(f))$$
holds for every $f \in C^\infty(M)$ if and only if $\mathring{\nabla} \mathbf v^*
= \mathring{\nabla} \mathbf h^* = 0$. 

\end{lemma}
\begin{proof} It is simple to verify that for any $A \in \Gamma(\mathcal H)$ and $V \in \Gamma(\mathcal V)$, we have
$$\mathring{\nabla}_A \mathbf h^* = 0, \qquad \mathring{\nabla}_V \mathbf v^* = 0, \qquad T^{\mathring{\nabla}}(A,V) = 0,$$
where $T^{\mathring{\nabla}}$ is the torsion of $\mathring{\nabla}$. Define $\sharp^{{\mathbf h}^*}$ as in Section~\ref{sec:Summary} and let $\sharp^{{\mathbf v}^*}$ be defined analogously. Using the properties of $\mathring{\nabla}$, we get
  \begin{align*}
    \mathsf \Gamma^{\mathbf h^{*}}(f, \mathsf \Gamma^{\mathbf v^*}(f)) &-
    \mathsf \Gamma^{\mathbf v^*}(f, \mathsf \Gamma^{\mathbf h^*}(f))
    = (\sharp^{{\mathbf h}^*} df) \|df \|_{\mathbf v^*}^2 - (\sharp^{{\mathbf v}^*} df) \| df \|_{\mathbf h^*}^2 \\
    &=  2 \mathring{\nabla}_{\sharp^{{\mathbf h}^*} df} df(\sharp^{{\mathbf v}^*} df) - 2 \mathring{\nabla}_{\sharp^{{\mathbf v}^*} df} df (\sharp^{{\mathbf h}^*} df) \\
    &\quad + (\mathring{\nabla}_{\sharp^{{\mathbf h}^*} df} \mathbf v^*)(df,df) -  (\mathring{\nabla}_{\sharp^{{\mathbf v}^*} df} \mathbf h^*)(df,df) \\
    &= (\mathring{\nabla}_{\sharp^{{\mathbf h}^*} df} \mathbf v^*)(df,df) - (\mathring{\nabla}_{\sharp^{{\mathbf v}^*} df}
    \mathbf h^*)(df,df).
  \end{align*}
  Since $T^*M = \ker \mathbf h^{*} \oplus \ker \mathbf v^*$ and since
  $\mathring{\nabla}$ preserves these kernels, the above expression can only
  vanish for all $f \in C^\infty(M)$ if $\mathring{\nabla} \mathbf h^* = 0$ and
  $\mathring{\nabla} \mathbf v^*=0$.\qed
\end{proof}

Let $L$, $P_t$ and $X(x)$ be as in
Section~\ref{sec:GeneralOperator}. In this section, we explore the
results we obtain when both conditions \eqref{CondA} and \eqref{CondB} hold.
We will also assume that $L$ satisfies
\eqref{CD} rather than \eqref{CDstar}. The reason for this is that in
the concrete case when $L$ is the sub-Laplacian of a sub-Riemannian
manifold with an integrable metric-preserving complement, the
condition \eqref{CondB} along with the assumptions of
Theorem~\ref{th:CD} imply \eqref{CD}, see
Section~\ref{sec:Summary}. For most of the results, we also need the
requirement that $\rho_2 >0$. This means that we can use the results
of \cite{BaGa12,BaBo12,BBG14}.

Let us first establish some necessary identities. Let $P_t$ be the
minimal semigroup of $\frac{1}{2}L$ where $\mathbf q_L =
\mathbf h^*$. For a given $T >0$, let $u_t := P_{T-t}f$ with $f \in C^\infty(M) \cap L^\infty(M)$.
It is
clear that $(\frac{1}{2}L+ \frac{\partial}{\partial
  t})\mathsf \Gamma^{\mathbf s^*}(u_t) = \mathsf \Gamma^{\mathbf s^*}_2(u_t)$ for
any $\mathbf s^* \in \Gamma(\Sym^2 TM)$. Also note that if $F\colon U
\subseteq \real \to \real$ be a smooth function, then for any $f \in
C^\infty(M)$ with values in $U$, we obtain
\begin{align*} L F(f) =  F'(f) Lf + F''(f)
  \mathsf \Gamma^{\mathbf h^*}(f).\end{align*}

Straight-forward calculations lead to the following identities.
\begin{lemma} \label{lemma:partialtL}\quad
  \begin{enumerate}[\rm(a)]
  \item If $u_t = P_{T-t} f$ has values in the domain of $F$, then $$\left(
      \frac{1}{2} L + \frac{\partial}{\partial t} \right) F(u_t) =
    \frac{1}{2} F''(u_t) \mathsf \Gamma^{\mathbf h^*}(u_t).$$ In particular, if
    $u_t$ is positive then
    \begin{align*}
      &\left(\frac{1}{2} L + \frac{\partial}{\partial t} \right) \log u_t =  - \frac{\mathsf \Gamma^{\mathbf h^*}(u_t)}{2u^2_t},  \\
      &\left(\frac{1}{2} L + \frac{\partial}{\partial t} \right) u_t\log
      u_t = \frac{\mathsf \Gamma^{\mathbf h^*}(u_t)}{2u_t} = \frac{1}{2} u_t
      \mathsf \Gamma^{\mathbf h^*}(\log u_t).
    \end{align*}
  \item For any $\mathbf s^* \in \Gamma(\Sym^2 TM)$, we have
    \begin{align*}
    &\left(\frac{1}{2} L + \frac{\partial}{\partial t}\right) u_t\mathsf \Gamma^{\mathbf s^*}(\log u_t) \\
    &\quad= u_t\, \mathsf \Gamma^{\mathbf s^*}_2(\log u_t)+ u_t \left(
        \mathsf \Gamma^{\mathbf h^*}(\log u_t,\mathsf \Gamma^{\mathbf s^*}(\log u_t)) -
        \mathsf \Gamma^{\mathbf s^*}(\log u_t,\mathsf \Gamma^{\mathbf h^*}(\log u_t))
      \right).
    \end{align*}
  \end{enumerate}
\end{lemma}
In particular, $\left(\frac{1}{2}L + \frac{\partial}{\partial t}
\right) u_t \mathsf \Gamma^{\mathbf h^*}(\log u_t) = u_t
\mathsf \Gamma_2^{\mathbf h^*}(\log u_t).$ If $\mathbf v^*$ is any co-metric
such that $\mathsf \Gamma^{\mathbf h^*}(f, \mathsf \Gamma^{\mathbf v^*}(f)) = \mathsf \Gamma^{\mathbf v^*}(f, \mathsf \Gamma^{\mathbf h^*}(f)),$
then $\left(\frac{1}{2}L + \frac{\partial}{\partial t} \right) u_t
\mathsf \Gamma^{\mathbf v^*}(\log u_t) = u_t \mathsf \Gamma_2^{\mathbf v^*}(\log u_t)$ as
well.

\subsection{Entropy bounds and Li-Yau type inequality} \label{sec:ELY}
We follow the approach of \cite{ArTh10}, \cite[Theorem~5.2]{BaGa12} and \cite[Theorem~1.1]{Wan13}.

\begin{lemma} \label{lemma:ABLambda}  Assume that $L$ satisfies
  \eqref{CD}. Also assume that \eqref{CondA} and \eqref{CondB}
  hold. Consider three continuous functions $a, b, \ell: [0,T] \to
  \real$ with $a(t)$ and $\ell(t)$ being non-negative. Let $C$ be a
  constant. Assume that $a(t), b(t)$ and $\ell(t)$ are smooth for $t
  \in (0,T)$ and on the same domain satisfy
  \begin{equation} \label{ABLambda} \left\{ \begin{array}{l}
        0 \leq \dot a(t) + \left(\rho_1 - \frac{1}{\ell(t)}  - 2 b(t) \right) a(t) + C \\
        0 \leq \dot \ell(t) + \rho_2 + \frac{\dot a(t)}{a(t)}
        \ell(t).  \end{array} \right.
 \end{equation}
Consider a positive function $f \in C^\infty_b(M)$, $f > 0$ with bounded gradient 
$\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C_b^\infty(M)$. Then we have
  \begin{align*}  a(0)\, P_T f\, & \mathsf \Gamma^{\mathbf h^* + \ell(0) \mathbf v^*}(\log P_T f ) - a(T) P_T\left( f \mathsf \Gamma^{\mathbf h^* + \ell(T) \mathbf v^*}(\log f)\right)  \\
    &\leq  2C \left(P_T(f \log f ) - (P_T f) \log P_T f \right)  \\
    & + n \left(\int_0^T a(t) b(t)^2 dt \right) P_T f -  2 \left(\int_0^T a(t) b(t) dt\right) P_T L f. \end{align*}
\end{lemma}

\begin{proof}
We have $P_t f > 0$ from our assumptions on $L$ and $f$. 

  For any $T > 0$, define $u_t = P_{T-t} f$ for $0 \leq t \leq T$ and
  \begin{align*} Y_t &=  a(t) \left( u_{t}\, \mathsf \Gamma^{\mathbf h^*}( \log u_{t}) + \ell(t) u_t \,\mathsf \Gamma^{\mathbf v^*}(\log u_{t}) \right) \circ X_t \\
    &\quad + 2 C \left(u_{t} \log u_{t} \right) \circ X_t +
    \int_0^t a(s) \left(n b(s)^2 u_{s} - 2 b(s) L u_{s} \right) \circ
    X_s \, ds. \end{align*}
Let us write $\equivM$ for equivalence modulo differentials of local
  martingales.  We use that $$L u_{t} = u_t L \log u_{t} +
  \frac{\mathsf \Gamma^{\mathbf h^*}(u_{t})}{u_{t}} = u_t L \log u_{t} +
  u_t\mathsf \Gamma^{\mathbf h^*}(\log u_{t})$$ and \eqref{CD} to obtain
  \begin{align*}
    dY_t \equivM & \left(\dot a(t)- 2 a(t) b(t)  + C\right) u_t \mathsf \Gamma^{\mathbf h^*}(\log u_t) \circ X_t \, dt \\
    & + \left(\dot a(t) \ell(t) + a(t) \dot \ell(t) \right) \mathsf \Gamma^{\mathbf v^*}(\log u_t) \circ X_t \, dt \\
    & + a(t) u_t \mathsf \Gamma^{\mathbf h^*+ \ell(t) \mathbf v^*}_2(\log u_t) \circ X_t \, dt \\
    & + a(t) u_{t} \left(n b(t)^2 - 2 b(t) L \log u_{t} \right) \circ X_t \, dt \\
    \geq &   \left(\dot a(t) + \left(\rho_1  - \frac{1}{\ell(t)} - 2 b(t) \right) a(t)  +C \right) u_t \mathsf \Gamma^{\mathbf h^*}(\log u_t) \circ X_t \, dt \\
    & + a(t) \left(\dot \ell(t) + \rho_2 + \frac{\dot a(t)}{a(t)} \ell(t) \right) \mathsf \Gamma^{\mathbf v^*}(\log u_t) \circ X_t \, dt \\
    & + n a(t) u_{t} \left(b(t) - L \log u_{t} \right)^2 \circ X_t \, dt.
  \end{align*}
$Y$ is then a submartingale from \eqref{ABLambda}. The result
  follows from $\mathbb E[Y_T] \geq \mathbb E[Y_0]$.\qed
\end{proof}

We look at some of the consequences of Lemma~\ref{lemma:ABLambda}.
\begin{corollary} \label{cor:EntropyLY} Assume that $L$ satisfies
  \eqref{CD} with $\rho_2 >0$, and that \eqref{CondA} and
  \eqref{CondB} also hold. Let $f \in C^\infty_b(M) $ be any
  bounded smooth function with $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C_b^\infty(M)$.
  \begin{enumerate}[\rm(a)]
  \item \emph{(Entropy bound)} Assume that $\rho_1 \geq 0$ and that $f > 0$. Then for any $x \in M$,
    \begin{align*} \frac{1- e^{-\rho_1 t}}{2 \rho_1} \mathsf \Gamma^{\mathbf h^* }(\log P_t f)(x) \leq &
      \left(1 + \frac{2}{\rho_2}  \right) P_t \left(
        \frac{f}{P_t f(x)} \log \frac{f}{P_t f (x)}
      \right)(x). \end{align*} 
  \item \emph{(Li-Yau inequality)} Assume that $n < \infty$ in
    \eqref{CD} and that $f \geq 0$, not identically zero. Then for any $1 < \beta < 2$ and for any $t \geq 0$,
    \begin{align} \label{LY} \frac{ \mathsf \Gamma^{\mathbf h^* }(P_t
        f)}{(P_t f)^2} - \left(a_\beta - b_\beta \rho_1 t
      \right) \frac{P_t L f}{P_t f} \leq \frac{n}{4 t} \left(
        \frac{a_\beta^2}{(2-\beta)(\beta-1)} - \rho_1 t (2
        a_\beta - b_\beta \rho_1 t) \right) \end{align} where
    $\displaystyle a_\beta = \frac{\rho_2 + \beta}{\rho_2}$ and
    $\displaystyle b_\beta = \frac{\beta-1}{\beta}$.
  \end{enumerate}
\end{corollary}

The special case of $\beta = {2}/{3}$ in \eqref{LY} is described with
consequences in \cite[Theorem~6.1]{BaGa12}. If $\rho_1 \geq 0$, then for
many application $\beta = \sqrt{(2 + \rho_2)(1+ \rho_2)} - \rho_2$ is
a better choice, as this minimizes the ratio of ${a_\beta^2}/{(2
  -\beta)(\beta-1)}$ over $a_\beta$. With this choice, we obtain
relation
\begin{align} \label{LY2} \frac{1}{D} \frac{ \mathsf \Gamma^{\mathbf h^* }(P_t f)}{(P_t f)^2} - \frac{P_t
    L f}{P_t f} \leq \frac{N}{t} , \end{align} where
\begin{equation} \label{Ndim} 
N := \frac{n}{4} \frac{(\sqrt{2+\rho_2}
    + \sqrt{1+\rho_2})^2}{\rho_2}, \quad D = \frac{ \sqrt{(2+ \rho_2)(1+\rho_2)}}{\rho_2} .
\end{equation}

\begin{proof} Recall that if $f \in C^\infty_b(M)$ is non-negative and non-zero, then $P_tf$ is strictly positive.

  \begin{enumerate}[(a)]
  \item We will use Lemma~\ref{lemma:ABLambda}. As in
    Proposition~\ref{prop:GradBound}~(c), for any $T \geq 0$, define $$a(t)
    = \frac{1 -e^{-\rho_1(T-t)}}{\rho_1},\quad \ell(t) = \rho_{2,0} \frac{\int_t^T a(s) \, ds }{a(t)} = \rho_{2,0} \frac{e^{-\rho_1(T-t)} -1 + \rho_1 (T-t)}{\rho_1 (1- e^{-\rho_1 (T-t)})} $$ and $C = 1 + {2}/{\rho_2}$. If we define $b(t) \equiv
    0$, condition \eqref{ABLambda} is satisfied. Hence, 
    \begin{align*} \frac{1 - e^{-\rho_1T}}{\rho_1} \frac{ \mathsf \Gamma^{\mathbf h^* + \frac{\rho_{2} T}{2}
          \mathbf v^*}(P_T f)}{P_T f} \leq \left( 1 +
        \frac{2}{\rho_2} \right) \big(P_T(f \log f) - (P_T f)
        \log P_T f \big).  \end{align*} Divide by $P_Tf$ and
    evaluate at $x$ for the result.
  \item For any $\varepsilon > 0$, define $f_{\varepsilon} = f + \varepsilon > 0$. For any $\alpha >0$ and $T >0$, define $\ell(t) =
    \frac{\rho_2}{\alpha +2} (T - t)$, $a(t) = (T-t)^{\alpha+1}$ and
$$b(t) = \frac{1}{2} \left(\rho_1 +\frac{\dot a}{a} - \frac{1}{\ell} \right) = \frac{1}{2} \left(\rho_1 -\left( \alpha+1 + \frac{\alpha+2}{\rho_2} \right) \frac{1}{T-t} \right) .$$
Note that
\begin{align*} \int_0^T a(t) b(t) \, dt &= \frac{1}{2} \left( \frac{\rho_1}{\alpha+2} T^{\alpha+2} - \left(1 + \frac{\alpha+2}{\rho_2(\alpha +1)} \right) T^{\alpha+1} \right),\\
  \int_0^T a(t) b(t)^2 \, dt &=  \frac{1}{4} \left( \frac{\rho_1^2}{\alpha+2} T^{\alpha+2} \right.  \left. - 2 \rho_1 \left(1 + \frac{\alpha+2}{\rho_2(\alpha +1)} \right) T^{\alpha+1} \right. \\
  & \qquad+\left.  \frac{(\alpha+1)^2}{\alpha} \left(1 +
      \frac{\alpha+2}{\rho_2(\alpha +1)} \right)^2 T^{\alpha} \right).
\end{align*}
If we put $C = 0$, then \eqref{ABLambda} is satisfied and so if we use
$f_{\varepsilon}$ in Lemma~\ref{lemma:ABLambda} and let $\varepsilon \downarrow 0$, we get
\begin{align*} & \frac{ \mathsf \Gamma^{\mathbf h^* + \frac{\rho_2T
      }{\alpha+2} \mathbf v^*}(P_T f)}{P_T f} +
  \left(\frac{\rho_1}{\alpha+2} T- \left(1 +
      \frac{\alpha+2}{\rho_2(\alpha +1)} \right) \right) P_T L f\\
  \nonumber &\leq \frac{n}{4} \left(\frac{\rho_1^2}{\alpha+2} T - 2
    \rho_1 \left(1 + \frac{\alpha+2}{\rho_2(\alpha +1)} \right) +
    \frac{(\alpha+1)^2}{\alpha} \left(1 +
      \frac{\alpha+2}{\rho_2(\alpha +1)} \right)^2 \frac{1}{T} \right)
  P_T f. \end{align*} Define $\beta := (\alpha +2)/(\alpha +1)$ to
obtain \eqref{LY}.\qed
\end{enumerate}
\end{proof}

Using \eqref{LY2} and the approach found in \cite[Remark 6.2 and Section
7]{BaGa12} and \cite{BBG14}, we obtain the following results.
\begin{corollary} Assume that $L$ satisfies \eqref{CD} relative to
  $\mathbf v^*$ with $\rho_1 \geq 0, \rho_2 > 0$ and $n <
  \infty$. Write $\tensorg^* = \mathbf h^* + \mathbf v^*$. Also assume
  that \eqref{CondA} and \eqref{CondB} hold and that $L$ is symmetric
  with respect to the volume form $\vol$. Let $p_t(x, y)$ be the
  heat kernel of $\frac{1}{2} L$ with respect to $\vol$. Finally, let
  $N$ and $D$ be as in \eqref{Ndim}. Then the following holds.
  \begin{enumerate}[\rm(a)]
  \item $p_t(x,x) \leq t^{-N/2} p_1(x,x)$ for any $x \in M$.
  \item For any $0 < t_0 < t_1$ and any $f \in C^\infty_b(M) $
    non-negative, not identically zero,
    \begin{equation} \label{ParabolHarnack} P_{t_0} f(x) \leq
      (P_{t_1}f)(y) \left(\frac{t_1}{t_0}\right)^{N/2} \exp\left(D\,
        \frac{\mathsf d_{cc}(x,y)^2}{2  (t_1-t_0)}
         \right)\end{equation} where
    $\mathsf d_{cc}$ is the Carnot-Carath\'eodory distance. If
    $\tensorg^*$ is the co-metric of a complete Riemannian metric,
    then
$$p_{t_0} (x,y) \leq p_{t_1}(x, z) \left(\frac{t_1}{t_0}\right)^{N/2} \exp\left(D \,\frac{\mathsf d_{cc}(y,z)^2}{2 (t_1-t_0)}  \right).$$
\end{enumerate}
\end{corollary}

There are several more results which we can obtain when \eqref{CondA}
and \eqref{CondB} hold, along with the fact that $L$ satisfies
\eqref{CD} with $\rho_2 > 0$, which can be found in
\cite{BaGa12,BaBo12,BBG14}. We list some of the most important results
here, found in \cite[Theorem~10.1]{BaGa12} and \cite[Theorem~1.5]{BBG14}.

\begin{theorem} \label{th:others} Let $L$ be a second order operator satisfying \eqref{CD}
  with respect to $\mathbf v^*$ and with $\rho_2 >0$. Assume that it is
  symmetric with respect to some volume form $\vol$. Define
  $\tensorg^* = \mathbf h^* + \mathbf v^*$ and assume that this is a
  complete Riemannian metric. Finally, assume that conditions
  \eqref{CondA} and \eqref{CondB} hold.
Let $B_r(x)$ be the ball of radius $r$ centered at $x \in M$ with
  respect to the metric~$\mathsf d_{cc}$.
  \begin{enumerate}[\rm(a)]
  \item \emph{(Sub-Riemannian Bonnet-Myers Theorem)} If $\rho_1 > 0$,
    then $M$ is compact.
  \item \emph{(Volume doubling property)} If $\rho_1 \geq 0$, there
    exist a constant $C$ such that
$$\vol(B_{2r}(x)) \leq C \vol(B_r(x)), \quad \text{for any } r \geq 0.$$
\item \emph{(Poincar\'e inequality on metric-balls)} If $\rho_1 \geq
  0$, there exist a constant $C$ such that
$$\int_{B_r(x)} \|f - f_{B_r}\|^2 \dvol \leq C r^2 \int_{B_r(x)} \mathsf \Gamma^{\mathbf h^*} (f) d\vol,$$
for any $r\geq 0$ and $f \in C^1\left( \bar B_r(x)\right)$ 
where $\displaystyle f_{B_r} = \vol(B_r(x))^{-1} \int_{B_r(x)} f \dvol$.
\end{enumerate}
\end{theorem}

\section{Examples and comments} \label{sec:Comments}
\subsection{Results in the case of totally geodesic Riemannian foliations} \label{sec:sRSpecial}
Let us consider the following case. Let $(M, \tensorg)$ be a
Riemannian manifold, and let $\mathcal H$ be a subbundle that is bracket
generating of step 2, i.e. the tangent bundle is spanned by the
sections of $\mathcal H$ and their first order brackets. Let $\mathcal V$
be the orthogonal complement of $\mathcal H$ with respect to $\tensorg$.
Define $\mathring{\nabla}$ with respect to the decomposition $TM = \mathcal H \oplus
\mathcal V$ and let $\mathbf h$ and $\mathbf v$ be the respective restrictions
of $\tensorg$ to $\mathcal H$ and $\mathcal V$. Let us make the following
assumptions:
\begin{enumerate}[\ -]
\item $\mathcal V$ is integrable, $\tensorg_{\mathstrut}$ is complete, $\mathring{\nabla} \tensorg = 0$
and the assumptions (i)--(iv) of Section~\ref{sec:Summary} hold with $m_{\mathcal{R}}^{\mathstrut} > 0$.
\end{enumerate}
From our investigations so far, we then know that
\begin{enumerate}[\ -]
\item $\mathcal V$ is a metric-preserving complement of $(M, \mathcal H,
  \mathbf h)$; the foliation of $\mathcal V$ is a totally geodesic Riemannian foliation.
\item the sub-Laplacian $\Delta_{\mathbf{h}}$ of $\mathcal V$ is symmetric with respect to
  the volume form $\vol$~of~$\tensorg$;
\item $\Delta_{\mathbf{h}}$ is essentially self-adjoint on $C_c^\infty(M)$;
\item $\Delta_{\mathbf{h}}$ satisfies \eqref{CD} with respect to $\mathbf v^*$;
\item both \eqref{CondA} and \eqref{CondB} hold.
\end{enumerate}
We list the results that can be deduced on such manifolds using
the approach of the generalized curvature-dimension inequality. We
will split the results up into two propositions.

\begin{proposition} \label{prop:pzcknn} Define $\kappa = \frac{1}{2}
  m_{\mathcal{R}}^{\mathstrut}var^2 \rho_{\mathcal{H}}^{\mathstrut} - \mathscr{M}_{\mathcal{HV}}^2$ and assume that $\kappa
  \geq 0$. Let $f \in C_b^\infty(M)$ be non-negative, not identically zero. Define
  $$N = \frac{n}{4}
\frac{ \left(\sqrt{2 \rho_{\mathcal{H}}^{\mathstrut} + \kappa} + \sqrt{\rho_{\mathcal{H}}^{\mathstrut}+ \kappa   }\right)^2}{\kappa} , \qquad D = \frac{\sqrt{(\kappa+ \rho_{\mathcal{H}}^{\mathstrut})(\kappa  + 2\rho_{\mathcal{H}}^{\mathstrut})}}{ \kappa}.$$
  \begin{enumerate}[\rm(a)]
  \item Assume that $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f) \in C^\infty_b(M)$. Then for any $1< \beta < 2$, we have
    \begin{align*} \frac{ \mathsf \Gamma^{\mathbf h^* }(P_t f)}{(P_t f)^2} -
      \left(1 + \frac{\rho_{\mathcal{H}}^{\mathstrut}}{2\kappa} \beta \right) \frac{P_t L f}{P_t
        f} \leq \frac{n}{4 t} \left( \frac{\big(1 + \frac{\rho_{\mathcal{H}}^{\mathstrut}}{2
              \kappa} \beta \big)^2}{(2 -\beta)(\beta-1)}
      \right). \end{align*}
  \item Let $p_t(x, y)$ be the heat kernel of $\frac{1}{2} \Delta_{\mathbf{h}}$
    with respect to $\vol$. Then
$$p_t(x,x) \leq \frac{1}{t^{N/2}} p_1(x,x)$$
for any $x \in M$ and $0 \leq t \leq 1$. Furthermore, for any $0 < t_0 < t_1$,
$$P_{t_0} f(x) \leq (P_{t_1}f)(y) \left(\frac{t_1}{t_0}\right)^{N/2} \exp\left(D\,\frac{\mathsf d_{\mathrm{cc}}(x,y)^2}{2 (t_1-t_0)} \right).$$
\end{enumerate}
In both results, if $\kappa =0$, we interpret the quotient
${\kappa}/{\rho_{\mathcal{H}}^{\mathstrut}}$ as $\frac{1}{2} m_{\mathcal{R}}^{\mathstrut}var^2$.
\end{proposition}
Note that if~$\mathscr{M}_{\mathcal{HV}} = 0$, the constant in the above result
is independent of~$\rho_{\mathcal{H}}^{\mathstrut}$.

\begin{proof}
  From the formulas \eqref{rhoSR2}, we know that $\Delta_{\mathbf{h}}$ satisfies
  \eqref{CD} with $\rho_2 > 0$ and $\rho_1 \geq 0$. In particular, we
  can choose $c ={1}/{\rho_{\mathcal{H}}^{\mathstrut}}$ if $\rho_{\mathcal{H}}^{\mathstrut} > 0$ and $\infty$ if
  $\rho_{\mathcal{H}}^{\mathstrut} =0$. This choice gives us $\rho_1 = 0$, while maximizing
  $\rho_2$. Note that if $\rho_{\mathcal{H}}^{\mathstrut} =0$, then $\mathscr{M}_{\mathcal{HV}}$ must be $0$ as well, since
  we have required $\kappa \geq 0$.\qed
\end{proof}

\begin{example}[Free nilpotent Lie algebra of step 2]
Let $\mathfrak h$ be a vector space of dimension $n$ with an inner product $\langle \newbullet, \newbullet \rangle$ and let $\mathfrak k$ denote the vector space $\bigwedge^2 \mathfrak h$. Define a Lie algebra $\mathfrak g$ as the vector space $\mathfrak h \oplus \mathfrak k$ with Lie brackets determined by $\mathfrak k$ being the center and for any $A,B \in \mathfrak h$, we have
$$[A, B] = A \wedge B \in \mathfrak k,.$$
This is clearly a nilpotent Lie algebra of step 2 and dimension~${n(n+1)}/{2}$.

Let $G$ be a simply connected nilpotent Lie group with Lie algebra $\mathfrak g$. Define a sub-Riemannian structure $(\mathcal H, \mathbf h)$ by left translation of $\mathfrak h$ and its inner product. Let $A_1, \dots, A_n$ be a left
  invariant orthonormal basis of $\mathcal H$ and define $L = \sum_{i=1}^n
  A_i^2$. From Part~I, Example~4.4, we know that $L$ satisfies
  \eqref{CD} with respect to some $\mathbf v^*$, $n = \rank \mathfrak h$, $\rho_1 = 0$ and
  $\rho_2 = \frac{1}{2(n-1)}$. This choice of $\mathbf v^*$ also gives us a complete Riemannian metric~$\tensorg$ satisfying $\mathring{\nabla} \tensorg =0$ and with $L$ being the sub-Laplacian of the volume form of $\tensorg$. 
We then obtain that for any $0 < t_0 < t_1$ and $f \in C_b^\infty(M)$
$$P_{t_0} f(x) \leq (P_{t_1}f)(y) \left(\frac{t_1}{t_0}\right)^{N/2} \exp\left(D\,\frac{\mathsf d_{\mathrm{cc}}(x,y)^2 }{2 (t_1-t_0)}  \right)$$
where $N = \frac{n}{4} \left(\sqrt{4 n - 3 } + \sqrt{2 n- 1
  }\right)^2$ and $D = \sqrt{(2n-1)(4n-3)}$.
\end{example}\goodbreak

\begin{proposition} \label{prop:pzckp} Define $\kappa = \frac{1}{2}
  m_{\mathcal{R}}^{\mathstrut}var^2 \rho_{\mathcal{H}}^{\mathstrut} - \mathscr{M}_{\mathcal{HV}}^2$ and assume that $\kappa >
  0$. Then the following statements hold.
  \begin{enumerate}[\rm(a)]
  \item $M$ is compact.
  \item If $f \in C^\infty(M)$ is an arbitrary function and $$\displaystyle\alpha := \left( \frac{2 \kappa}{2
        \mathscr{M}_{\mathcal{HV}}+m_{\mathcal{R}}^{\mathstrut} \sqrt{2 \rho_{\mathcal{H}}^{\mathstrut} + 2\kappa }} \right)^2,$$ we have
    \begin{align*}
      \|\mathsf \Gamma^{\mathbf h^*}(P_t f)\|_{L^1}  \leq  e^{-\alpha t} \|\mathsf \Gamma^{\mathbf h^*}(f) \|_{L^1}, \quad
 \text{and}   \quad  \| f- f_M \|_{L^2}^2 \leq \frac{1}{\alpha} \int_M
      \mathsf \Gamma^{\mathbf h^*}(f) \dvol
    \end{align*}
    where $f_M = {\vol(M)}^{-1} \int_M f \dvol$.
  \item Let $f \in C^\infty(M)$ be an arbitrary function. Then
    \begin{align*} t \mathsf \Gamma^{ \mathbf h^*}(P_t f) \leq
      \left(1 + \frac{2 \rho_{\mathcal{H}}^{\mathstrut}}{\kappa} \right) (P_t f^2 - (P_t
      f)^2).\end{align*}
  \item Let $f$ be a strictly positive smooth function. Then for any $x \in M$,
    \begin{align*} t \mathsf \Gamma^{ \mathbf h^*}(\log P_t f)(x) \leq
      2\left(1 + \frac{2\rho_{\mathcal{H}}^{\mathstrut}}{\kappa} \right) P_t \left( \frac{f}{f(x)}
        \log \frac{f}{f (x)} \right)(x).
    \end{align*}
  \end{enumerate}
\end{proposition}

\begin{proof}
  From the formulas \eqref{rhoSR2}, we know that $\Delta_{\mathbf{h}}$ satisfies
  \eqref{CD} with $\rho_2 > 0$ and $\rho_1 > 0$.
  \begin{enumerate}[(a)]
  \item Follows directly from Theorem~\eqref{th:others}~(a).
  \item We use Propositions~\ref{prop:GradBound}~(a) and
    \ref{prop:Poincare}~(b). With our assumption of
    $\mathring{\nabla} \mathbf v =0$, the formulas \eqref{rhoSR} show that we
    can choose $\rho_{2,1} =0$ and both $\rho_1$ and $\rho_2$ strictly
    positive, since $\kappa >0$. The result follows by maximizing
    $\frac{\rho_{2} \rho_1}{\rho_2 + 1}$ with respect to $c$.
  \item We use Proposition~\ref{prop:GradBound}~(c) and using \eqref{rhoSR2} with $c = {1}/{\rho_{\mathcal{H}}^{\mathstrut}}$.
\item Similar to the proof of (c), only using
  Corollary~\ref{cor:EntropyLY}~(a) instead.\qed
\end{enumerate}
\end{proof}

\begin{example}
Let $\mathfrak g$ be a compact semisimple Lie algebra with bi-invariant metric
$$\langle A,B \rangle = - \frac{1}{4\rho} \tr\, \ad(A)\ad(B), \quad \rho >0.$$
Let $G$ be a (compact) Lie group with Lie algebra $G$ and with metric $\widecheck{\tensorg}$ given by left (or right) translation of the above inner product. Then $\rho >0$ is the lower Ricci bound of $G$.

Let $\mathfrak h$ be the subspace of the Lie algebra $\mathfrak g \oplus \mathfrak g$ consisting of elements on the form $(A, 2A)$, $A \in \mathfrak g$. Define the subbundle $\mathcal H$ on $G \times G$ by left translation of $\mathfrak h$. If we use the same symbol for an element in the Lie algebra and the corresponding left invariant vector field, we define a metric $\mathbf h$ on $\mathcal H$ by
$$\mathbf h((A,2A), (A,2A) ) = \langle A, A \rangle.$$
Define $\pi: G \times G \to G$ as projection on the second coordinate with vertical bundle $\mathcal V = \ker \pi_*$ and give this bundle a metric $\mathbf v$ determined by
$$\|(A,0)\|_{\mathbf v}^2 = \frac{1}{4\rho} \langle A, A \rangle.$$
If we then define $\mathring{\nabla}$ relative to $\mathcal H \oplus \mathcal V$ and $\tensorg =\pr_{\mathcal H}^* \mathbf h + \pr_{\mathcal V}^* \mathbf v$, then $\mathring{\nabla} \tensorg = 0$. Let $\Delta_{\mathbf{h}}$ be the sub-Laplacian with respect to
  $\mathcal V$, which coincides with the sub-Laplacian of the volume form
  $\vol$ of $\tensorg$. We showed in
  Part~I, Example~4.6 that this satisfies \eqref{CD} with respect to
  $\mathbf v^*$, $n = \dim G$, $\rho_1 = \rho_{\mathcal{H}}^{\mathstrut} = 4\rho$ and $\rho_2 = \frac{1}{2} m_{\mathcal{R}}^{\mathstrut}var^2 = {1}/{4}$.

 We then have that for any $f \in C^\infty(G \times G)$,
$$\|f - f_{G \times G}\|^2_{L^2} = \frac{5}{4 \rho} \int_M \mathsf \Gamma^{\mathbf h^*}(f) \dvol$$
where $f_{G \times G} = {\vol(G \times G)}^{-1} \int_{G \times G} f \dvol.$
\end{example}

\subsection{Comparison to Riemannian Ricci curvature} 
Let us consider a sub-Riemannian manifold such as in
Section~\ref{sec:sRSpecial}. Given the results of
Proposition~\ref{prop:pzcknn} and Proposition~\ref{prop:pzckp}, it
seems reasonable to consider sub-Riemannian manifolds with $\kappa \geq
0$ or $\kappa > 0$ as the analogue of Riemannian manifolds with
respectively non-negative and positive Ricci curvature. However, given
the extra structure in the choice of $\mathbf v$ on $\mathcal V$, it is
natural to ask how these sub-Riemannian results compare to the Ricci
curvature of the metric $\tensorg = \pr_{\mathcal H}^* \mathbf h +
\pr_{\mathcal V}^* \mathbf v$. We give the comparison here.

Introduce the following symmetric $2$-tensor
\begin{align*}
  \Ric_{\mathcal{V}}^{\mathstrut}(Y,Z) &= \tr \left(V \mapsto \pr_{\mathcal V} R^{\mathring{\nabla}}(V, Y) Z
  \right). \end{align*} Then the Ricci curvature of $\tensorg$ can be
written in the following way.
\begin{proposition} \label{prop:RiemannRicci} The Ricci curvature
  $\Ric_{\tensorg}$ of $\tensorg$ satisfies
  \begin{align} \label{RiemannRicci} \Ric_{\tensorg}(Y,Y) & =
    \Ric_{\mathcal{H}}^{\mathstrut}(Y,Y) + \Ric_{\mathcal{H}}^{\mathstrut}V(Y,Y) + \frac{1}{2} \|\tensorg(Y,
    \mathcal R(\newbullet, \newbullet) )\|^2_{\wedge^2 \tensorg^*} \\
    \nonumber &\quad + \Ric_{\mathcal{V}}^{\mathstrut}(Y, Y) - \frac{3}{4} \|\mathcal R(Y,\newbullet)\|^2_{\tensorg^* \otimes
      \tensorg}.
  \end{align}
\end{proposition}

Before we get to the proof, let us note the consequences of this
result. If $\kappa = \frac{1}{2} \rho_{\mathcal{H}}^{\mathstrut} m_{\mathcal{R}}^{\mathstrut}var^2 - \mathscr{M}_{\mathcal{HV}}^2 $
is respectively non-negative or positive, this ensures that the first
line of \eqref{RiemannRicci} has respectively a non-negative or
positive lower bound. Furthermore, note that this part is independent of any covariant derivative of vertical vector fields.

\begin{proof}[of Proposition~\upshape\ref{prop:RiemannRicci}]
  Let $\nabla$ be the Levi-Civita connection of $\tensorg$. Define a
  two tensor $\mathcal B(A,Z) = \nabla_A Z - \mathring{\nabla}_A Z$.  Then it is clear
  that
  \begin{align*} R^{\nabla}(A,Y)Z &=  R^{\mathring{\nabla}}(A,Y) Z + (\mathring{\nabla}_A \mathcal B)(Y,Z) - (\mathring{\nabla}_Y \mathcal B)(A,Z)  \\
    &\quad + \mathcal B(\mathcal B(Y,A), Z) + \mathcal B(A, \mathcal B(Y,Z)) - \mathcal B(\mathcal B(A,Y),Z) - \mathcal B(Y,
    \mathcal B(A,Z)).\end{align*} 
Furthermore, it is simple to verify that
  \begin{align*} \mathcal B(A,Z) =& \frac{1}{2} \mathcal R(A,Z) - \frac{1}{2} \sharp \tensorg(A, \mathcal R(Z,\newbullet)) - \frac{1}{2} \sharp \tensorg(Z, \mathcal R(A,\newbullet)) .
  \end{align*}
 Let $A_1, \dots, A_n$ and $V_1, \dots, V_\nu$ be local orthonormal
  bases of respectively $\mathcal H$ and~$\mathcal V$. Then
  \begin{align*} & \sum_{i=1}^n \tensorg(A_i, R^{\nabla}(A_i,Z)Z - R^{\mathring{\nabla}}(A_i,Z) Z) \\
    &\quad = \sum_{i=1}^n \tensorg(Z, (\mathring{\nabla}_{A_i}
    \mathcal R)(A_i,Z)) - \frac{3}{4} \|\mathcal R(Z, \newbullet) \|^2_{\tensorg^*
      \otimes \tensorg} + \frac{1}{2} \|\tensorg(Z,
    \mathcal R(\newbullet, \newbullet))\|^2_{\wedge^2 \tensorg^*}.
  \end{align*}
  Similarly, $\sum_{s=1}^\nu
  \tensorg(R^{\nabla}(V_s,Z)Z - R^{\mathring{\nabla}}(V_s,Z) Z, V_s) = 0$.\qed
\end{proof}

\subsection{Generalizations to equiregular submanifolds of steps greater than two}
Many of the results in Section~\ref{sec:GradientBound} and Section
\ref{sec:GeodesicFibers} depend on the condition $\rho_2 >0$. A
necessary condition for this to hold is that our sub-Riemannian
manifold is bracket-generating of step 2. Let us note some of the
difficulties in generalizing the approach of this paper to
sub-Riemannian manifolds $(M, \mathcal H, \mathbf h)$ of higher steps.

As usual, we require $\mathcal H$ bracket-generating. Assume also, for the
sake of simplicity, that $\mathcal H$ is equiregular, i.e.  there exists a flag
of subbundles $\mathcal H= \mathcal H^1 \subseteq \mathcal H^2 \subseteq \mathcal H^3
\subseteq \cdots \subseteq \mathcal H^r$ such that
$$\mathcal H^{k+1}_x = \spn \left\{ Z|_x, [A,Z] |_x \, \colon \, Z \in \Gamma(\mathcal H^{k}),\ A \in \Gamma(\mathcal H) \right\}, \quad x \in M.$$
Choose a metric tensor $\mathbf v$ on $\mathcal V$ and let $\tensorg =
\pr_{\mathcal H}^* \mathbf h + \pr_{\mathcal V}^* \mathbf v$ be the corresponding
Riemannian metric. Let $\mathcal V_k$ be the orthogonal complement of
$\mathcal H^k$ in $\mathcal H^{k+1}$. Let $\pr_{\mathcal V_k}$ be the projection to
$\mathcal V_k$ relative to the splitting $\mathcal H \oplus \mathcal V_1 \oplus
\cdots \oplus \mathcal V_{r-1}$. Define $\mathbf v_k = \mathbf v|_{\mathcal V_k}$
and let $\mathbf v^*_k$ be the corresponding co-metric. We could
attempt to construct a curvature-dimension inequality with
$\mathsf \Gamma^{\mathbf h^*}(f),\, \mathsf \Gamma^{\mathbf v_1^*}(f), \dots,
\mathsf \Gamma^{\mathbf v_{r-1}^*}(f)$. However, a condition similar to
\eqref{CondB} could never hold in this case,
i.e. $\mathsf \Gamma^{\mathbf h^*}(f, \mathsf \Gamma^{\mathbf v_k^*}(f)) =
\mathsf \Gamma^{\mathbf v^*_k}(f, \mathsf \Gamma^{\mathbf h^*}(f))$ cannot hold for
any $k \leq r-2.$

To see this let $\alpha$ and $\beta$ be forms that only are
non-vanishing on respectively $\mathcal V_{k}$ and $\mathcal V_{k+1}$ for $k
\leq r-2$. Then $\mathsf \Gamma^{\mathbf h^*}(f, \mathsf \Gamma^{\mathbf v_k^*}(f))
= \mathsf \Gamma^{\mathbf v^*_k}(f, \mathsf \Gamma^{\mathbf h^*}(f))$ holds if and
only if $\mathring{\nabla} \mathbf h^* = 0$ and $\mathring{\nabla}_A \mathbf v_k^* =0$ for
any $A \in \Gamma(\mathcal H)$. Hence we obtain
$$0 = (\mathring{\nabla}_{A} \mathbf v_k^*)(\alpha, \beta) = \beta([A, \sharp^{{\mathbf v}^*}k \alpha]).$$
However, this is a contradiction, since by our construction,
$\mathcal V_{k+1}$ must be spanned by orthogonal projections of brackets on
the form $[A, Z ]$, $A \in \Gamma(\mathcal H)$, $Z \in \Gamma(\mathcal V_{k})$.

\appendix
\section{Graded analysis on forms}  \label{sec:Appendic}
\subsection{Graded analysis on forms} \label{sec:GradedForms} Let $(M,
\mathcal H, \mathbf h)$ be a sub-Riemannian manifold with an integrable
complement $\mathcal V$, and let $\mathbf v$ be a chosen positive definite
metric tensor on $\mathcal V$. Let $\tensorg = \pr_{\mathcal H}^*
\mathbf h + \pr_{\mathcal V}^* \mathbf v$ be the corresponding Riemannian
metric. The subbundle $\mathcal V$ gives us a foliation of $M$, and
corresponding to this foliation we have a grading on forms, see
e.g. \cite{AlTo91,Alv92}. Let $\Omega(M)$ be the algebra of
differential forms on $M$. Let $\Ann(\mathcal H)$ and $\Ann(\mathcal V)$ be the
subbundles of $T^*M$ of elements vanishing on respectively $\mathcal H$ and
$\mathcal V$. If either $a$ or $b$ is a negative integer, then $\eta \in
\Omega(M)$ is a homogeneous element of degree $(a,b)$ if and only if
$\eta = 0$. Otherwise, for nonnegative integers $a$ and $b$, 
$\eta$ is a homogeneous element of degree $(a,b)$, if it is a sum of
elements which can be written as
$$\alpha \wedge \beta , \quad \textstyle \alpha \in \Gamma(\bigwedge^a \Ann(\mathcal V)),\ \beta \in \Gamma(\bigwedge^b \Ann(\mathcal H)).$$

Relative to this grading, we can split the exterior differential $d$
into graded com\-po\-nents
$$d = d^{1,0} + d^{0,1} + d^{2,-1} .$$
The same is true for its formal dual
$$\delta = \delta^{-1,0} + \delta^{0,-1} + \delta^{-2,1} ,$$
i.e. the dual with respect to the inner product on forms of compact
support $\alpha, \beta$, defined by
\begin{equation} \label{HodgeProduct} \langle \alpha, \beta \rangle =
  \int_M \alpha \wedge \star \beta , \qquad \alpha,\beta \text{ of compact support}, \end{equation} where $\star$ is
the Hodge star operator defined relative to $\tensorg$.  Note that
$\delta^{-a,-b}$ is the formal dual of $d^{a,b}$ from our assumptions
that $\mathcal H$ and $\mathcal V$ are orthogonal. We will give formulas for
each graded component.

\subsection{Metric-preserving complement and local representation}
We will use $\flat:TM \to T^*M$ for the map $v \mapsto \tensorg(v, \newbullet)$ with inverse $\sharp$. Let
$\mathring{\nabla}$ be defined as in \eqref{rnabla} relative to $\tensorg$ and
the splitting $TM = \mathcal H \oplus \mathcal V$.  If $\alpha$ is a one-form
and $A_1, \dots, A_n$ and $V_1, \dots, V_\nu$ are respective local
orthonormal bases of $\mathcal H$ and $\mathcal V$, then locally
\begin{align*} d\alpha = & \sum_{i=1}^n \flat A_i \wedge \mathring{\nabla}_{A_i}
  \alpha + \sum_{s=1}^\nu \flat V_s \wedge \mathring{\nabla}_{V_s} \alpha -
  \alpha \circ \mathcal R ,
\end{align*}
and hence each of the three terms are local representations of
respectively $d^{1,0} \alpha,$ $d^{0,1} \alpha$ and $d^{2,-1}
\alpha$. Local representations on forms of all orders follow.

Assume now that $\mathring{\nabla} \tensorg = 0$, i.e. $\mathcal V$ is a
metric-preserving compliment of $(\mathcal H, \mathbf h)$ with a metric
tensor $\mathbf v$ satisfying $\mathring{\nabla} \mathbf v^* = 0$. From the
formula of $d^{1,0} \eta = \sum_{i=1}^n \flat A_i \wedge \mathring{\nabla}_{A_i}
\eta$, we obtain $\delta^{-1,0}\eta = - \sum_{i=1}^n \iota_{A_i}
\mathring{\nabla}_{A_i} \eta$ for any form $\eta$. Let $\Delta_{\mathbf{h}}$ be the
sub-Laplacian of $\mathcal V$ or equivalently $\vol$. Let $\Delta$ be the
Laplacian of $\tensorg$.  Then it is clear that for any $f \in
C^\infty(M)$, we have
$$\Delta f = -\delta df, \qquad \Delta_{\mathbf{h}} f = -\delta^{-1,0} d^{1,0} f.$$
\begin{lemma} \label{lemma:srLDeltaCommute} For any form $\eta \in
  \Omega(M)$, we have
  \begin{equation} \label{DDeltaCommute} \delta^{-1,0} d^{0,1} \alpha
    = - d^{0,1} \delta^{-1,0} \alpha, \quad \delta^{0,-1} d^{1,0}
    \alpha = - d^{1,0} \delta^{0,-1} \alpha.\end{equation} As a
  consequence, for any $f \in C^\infty(M)$ we have $\Delta_{\mathbf{h}} \Delta f =
  \Delta \Delta_{\mathbf{h}} f.$
\end{lemma}

The following result is helpful for our computation in Part~I,
Lemma~3.3~(b) and Corollary~3.11.
\begin{lemma} \label{lemma:fromPartI}
  \begin{enumerate}[\rm(a)]
  \item For any horizontal $A \in \Gamma(\mathcal H)$, a vertical $V
    \in \Gamma(\mathcal V)$ and arbitrary vector filed $Z \in \Gamma(TM)$, we have
$$\tensorg(R^{\mathring{\nabla}}(A,V) Z, A) = 0.$$
\item If $\mathring{\nabla} \tensorg = 0$, then for every point $x_0$, there
  exist local orthonormal bases $A_1, \dots, A_n$ and $V_1, \dots
  V_\nu$, defined in a neighborhood of $x_0$, such that for any $Y \in
  \Gamma(TM)$,
$$\mathring{\nabla}_Z A_i |_{x_0} = \frac{1}{2} \sharp \tensorg(Z, \mathcal R(A_i, \newbullet))|_{x_0}, \qquad \mathring{\nabla}_Z V_s |_{x_0} = 0.$$
\end{enumerate}
\end{lemma}

\begin{proof}[of Lemma~\textup{\ref{lemma:srLDeltaCommute}}]
  It is sufficient to show one of the identities in
  \eqref{DDeltaCommute}, since $\delta^{-1,0}d^{0,1}$ is the formal
  dual of $\delta^{0,-1} d^{1,0}$. From
  Lemma~\ref{lemma:fromPartI}~(a), any $A \in
  \Gamma(\mathcal H)$ and $V \in \Gamma(\mathcal V)$ satisfy
$$\iota_A \mathring{\nabla}_V \mathring{\nabla}_A \alpha = \iota_A \mathring{\nabla}_A \mathring{\nabla}_V \alpha  + \iota_A \mathring{\nabla}_{[V,A]} \alpha.$$
From the definition of $\mathring{\nabla}$, it follows that
$T^{\mathring{\nabla}}(A,V) = 0$, where $T^{\mathring{\nabla}}$ is the torsion of
$\mathring{\nabla}$. For a given point $x_0 \in M$, let $A_1, \dots, A_n$ and
$V_1, \dots, V_\nu$ be as in Lemma~\ref{lemma:fromPartI}~(b). All terms
below are evaluated at the point~$x_0$, giving us
\begin{align*}
  d^{0,1} \delta^{-1,0} \alpha &= -\sum_{s=1}^\nu \sum_{i=1}^n \flat V_s \wedge \mathring{\nabla}_{V_s} \iota_{A_i} \mathring{\nabla}_{A_i} \alpha \\
  &=  -\sum_{s=1}^\nu \sum_{i=1}^n  \flat V_s \wedge \iota_{\mathring{\nabla}_{V_s} A_i} \mathring{\nabla}_{A_i} \alpha -\sum_{s=1}^\nu \sum_{i=1}^n \flat V_s \wedge \iota_{A_i} \mathring{\nabla}_{V_s} \mathring{\nabla}_{A_i} \alpha \\
  &= -\frac{1}{2} \sum_{s=1}^\nu \sum_{i,j=1}^n \tensorg(V_s, \mathcal R(A_i, A_j))  \flat V_s \wedge \iota_{A_j} \mathring{\nabla}_{A_i} \alpha \\
  &\quad -\sum_{s=1}^\nu \sum_{i=1}^n \flat V_s \wedge \iota_{A_i} \mathring{\nabla}_{A_i} \mathring{\nabla}_{V_s} \alpha -\sum_{s=1}^\nu \sum_{i=1}^n \flat V_s \wedge \iota_{A_i} \mathring{\nabla}_{\mathring{\nabla}_{V_s} A_i - \mathring{\nabla}_{A_i} V_s} \alpha \\
  &=   \sum_{s=1}^\nu \sum_{i,j=1}^n \iota_{A_i} \left(\flat V_s \wedge  \mathring{\nabla}_{A_i} \mathring{\nabla}_{V_s} \right) \alpha \\
  &= \sum_{s=1}^\nu \sum_{i,j=1}^n \iota_{A_i} \mathring{\nabla}_{A_i}
  \left(\flat V_s \wedge \mathring{\nabla}_{V_s} \right) \alpha = -\delta^{-1,0}
  d^{1,0} \alpha. \end{align*}

Next, we prove the identity $[\Delta_{\mathbf{h}}, \Delta] f = 0$. If we consider the degree $(1,1)$-part of $d^2 = 0$, we get
$$d^{0,1} d^{1,0} + d^{1,0} d^{0,1}  = 0.$$
The same relation will then hold for their formal duals.  Since
$\Delta f = \Delta_{\mathbf{h}} f - \delta^{0,1} d^{0,1} f,$ it is sufficient to show
that $\Delta_{\mathbf{h}} \delta^{0,-1} d^{0,1} f = \delta^{0,-1} d^{0,1} \Delta_{\mathbf{h}} f.$
This gives us the result
\begin{align*} & \Delta_{\mathbf{h}} \delta^{0,-1} d^{0,1} f = -\delta^{-1,0} d^{1,0}
  \delta^{0,-1} d^{0,1} f = - \delta^{0,-1} d^{0,1} \delta^{-1,0}
  d^{1,0} f = \delta^{0,-1} d^{0,1} \Delta_{\mathbf{h}} f,
\end{align*}
since we have to do an even number of permutations.\qed
\end{proof}

\subsection{Spectral theory of the sub-Laplacian} \label{sec:Spectral}
Let $L$ be a self-adjoint operator on $L^2(M,\vol)$ with domain
$\Dom(L)$. Define $\|f\|_{\Dom(L)}^2 = \|f\|^2_{L^2}
+\|Lf\|_{L^2}^2$. Write the spectral decomposition of $L$ as $L =
\int_{-\infty}^\infty \lambda dE_\lambda$ with respect to the
corresponding projector valued spectral measure $E_\lambda$. For any Borel
measurable function $\varphi\colon \real \to \real$, we write
$\varphi(L)$ for the operator $\varphi(L) := \int_{-\infty}^\infty
\varphi(\lambda) dE_{\lambda}$ which is self adjoint on its domain
$$\Dom(\varphi(L)) = \left\{ f \in L^2(M, \vol) \, \colon \, \int_{-\infty}^\infty \varphi(\lambda)^2 d\langle E_\lambda f, f \rangle \right\}.$$
In particular, if $\varphi$ is bounded, $\varphi(L)$ is defined on the
entire of $L^2(M,\vol)$. See \cite[Ch VIII.3]{ReSi80} for details.

Let $(M, \mathcal H, \mathbf h)$ be a sub-Riemannian manifold with
sub-Laplacian $\Delta_{\mathbf{h}}$ defined relative to a volume form $\vol$. Assume
that $\mathcal H$ is bracket-generating and that $(M, \mathsf d_{cc})$ is
complete metric space, where~$\mathsf d_{cc}$ is the
Carnot-Carath\'eodory metric of~$(\mathcal H, \mathbf h)$. Then
$$\int_M f \Delta_{\mathbf{h}} g \, \dvol = \int_M g \Delta_{\mathbf{h}} f \, \dvol\quad\text{and}\quad\int f \Delta_{\mathbf{h}}
f \dvol \leq 0.$$ From \cite[Section 12]{Str86}, we have that $\Delta_{\mathbf{h}}$ is
a an essentially self adjoint operator on $C_c^\infty(M)$. We denote
its unique self-adjoint extension by $\Delta_{\mathbf{h}}$ as well with domain
$\Dom(\Delta_{\mathbf{h}}) \subseteq L^2(M, \vol).$

Since $\Delta_{\mathbf{h}}$ is non-positive and the maps
$\lambda \mapsto e^{t\lambda/2}$ and $\lambda \mapsto \lambda^j
e^{t\lambda/2}$ are bounded on 
$(- \infty, 0]$ for $t > 0$, $j > 0$, we have that $f \mapsto e^{t/2 \Delta_{\mathbf{h}}} f$ is
a map from $L^2(M, \vol)$ into $\cap_{j=1}^\infty \Dom(\Delta_{\mathbf{h}}^j)$.
Define $P_tf$ as in Section~\ref{sec:GeneralOperator} with respect to $\frac{1}{2}\Delta_{\mathbf{h}}$-diffusions
for bounded measurable functions $f$. Then clearly $\| P_t f\|_{L^\infty} \leq \| f\|_{L^\infty}$. Since $\Delta_{\mathbf{h}}$ is symmetric with respect to $\vol$ and $P_t 1 \leq 1$, we obtain $\|P_t f\|_{L^1} \leq \| f\|_{L^1}$ as well.
The Riesz-Thorin theorem then ensures that $\|P_t f\|_{L^p} \leq \|f\|_{L^p}$ for any $1 \leq p \leq
\infty.$ In particular, $P_t f$ is in $L^2(M, \vol)$ whenever $f$ is in $L^2(M, \vol)$. This implies that $P_t f = e^{t/2\Delta_{\mathbf{h}}} f$ for any bounded $f \in L^2(M, \vol)$ by the following result.  
\begin{lemma}[\rm{\cite[Prop]{Li84}}, {\cite[Prop 4.1]{BaGa12}}]  \label{lemma:Lpunique} 
Let $L$ be equal to the Laplacian $\Delta$ or sub-Laplacian $\Delta_{\mathbf{h}}$ defined relative to a complete Riemannian or sub-Riemannian metric, respectively. Let $u_t(x)$ be a solution in $L^2(M,\vol)$ of the heat equation
$$(\partial_t - L) u_t = 0, \quad u_0 = f,$$
for a function $f \in L^2(M,\vol)$. Then $u_t(x)$ is the unique solution of this equation in $L^2(M,\vol)$.
\end{lemma}

Hence, we will from now on just write $P_t = e^{t/2 \Delta_{\mathbf{h}}}$ without much abuse of notation.
 

\subsubsection{Global bounds using spectral theory}
We now introduce some additional assumptions. Assume that $\tensorg$
is a complete Riemannian metric with volume form $\vol$, such that
$\tensorg|_{\mathcal H} = \mathbf h, \mathcal H^\perp = \mathcal V$ and
$\tensorg|_{\mathcal V} = \mathbf v.$ Let $\Delta$ be the Laplace-Beltrami
operator of $\tensorg$ and write $\Delta f = \Delta_{\mathbf{h}} f + \Delta_{\mathbf{v}} f$
where $\Delta_{\mathbf{v}} f = \dv \sharp^{{\mathbf v}^*} df$. Since $\tensorg$ is complete,
$\Delta$ is also essentially self-adjoint on $C_c^\infty(M)$ by
\cite{Str83} and we will also denote its unique self-adjoint extension
by the same symbol.

Assume that $\mathring{\nabla} \tensorg = 0$ where $\mathring{\nabla}$ is defined as in
\eqref{rnabla}. Recall that $\Delta_{\mathbf{h}}$ and $\Delta$ commute on
$C_c^\infty(M)$ by Lemma~\ref{lemma:srLDeltaCommute}.

\begin{lemma} \label{lemma:SpecC}\quad
  \begin{enumerate}[\rm(a)]
  \item The operators $\Delta_{\mathbf{h}}$ and $\Delta$ spectrally commute, i.e. for
    any bounded Borel function $\varphi: \real \to \real$ and $f \in
    L^2(M,\vol)$,
$$\varphi(\Delta_{\mathbf{h}}) \varphi(\Delta)f = \varphi(\Delta) \varphi(\Delta_{\mathbf{h}})f.$$
Also $\Dom(\Delta) \subseteq \Dom(\Delta_{\mathbf{h}}).$
\item Assume that $\Delta_{\mathbf{h}}$ satisfies the assumptions of
  Theorem~\textup{\ref{th:CD}} with $m_{\mathcal{R}}^{\mathstrut} >0$. Then there exist a
  constant $C = C(\rho_1, \rho_2)$ such that for any $f \in
  C^\infty(M) \cap \Dom(\Delta_{\mathbf{h}}^2)$,
$$C\|f\|_{\Dom(\Delta_{\mathbf{h}}^2)}^2 = C\left(\|f\|^2_{L^2} + \|\Delta_{\mathbf{h}}^2 f\|_{L^2}^2 \right),$$
is an upper bound for
$$\int_M \mathsf \Gamma^{\mathbf h^*}(f) \dvol, \quad \int_M \mathsf \Gamma^{\mathbf h^*}_2(f) \dvol, \quad \int_M \mathsf \Gamma^{\mathbf v^*}(f) \dvol \quad \text{and} \quad \int_M \mathsf \Gamma^{\mathbf v^*}_2(f) \dvol.$$
\end{enumerate}
\end{lemma}

\begin{proof}
  \begin{enumerate}[\rm(a)]
  \item Note first that for any $f \in C_c^\infty(M)$, using
    Lemma~\ref{lemma:srLDeltaCommute} and the inner product
    \eqref{HodgeProduct}
    \begin{align*}
      \int_M \Delta_{\mathbf{v}} f \Delta_{\mathbf{h}} f \dvol  
     &=  \langle \delta^{0,-1} d^{0,1} f, \delta^{-1,0} d^{1,0} f\rangle 
    = \langle d^{0,1} f, d^{0,1} \delta^{-1,0} d^{1,0}f \rangle \\
      &= - \langle d^{0,1} f, \delta^{-1,0} d^{0,1} d^{1,0}f \rangle =
      \langle d^{1,0} d^{0,1} f, d^{1,0} d^{0,1} f \rangle \geq 0.
    \end{align*}
    Hence
$$\int_M (\Delta_{\mathbf{h}} f)^2 \dvol \leq \int_M ((\Delta_{\mathbf{h}} + \Delta_{\mathbf{v}}) f)^2 \dvol = \int_M (\Delta f)^2 \dvol,$$
and hence $\| \Delta_{\mathbf{h}} f\|_{L^2} \leq \|\Delta f\|_{L^2}$ is true for any
$f \in \Dom(\Delta)$. We conclude that $\Dom(\Delta) \subseteq
\Dom(\Delta_{\mathbf{h}})$. Define $Q_t = e^{t/2 \Delta}$. It follows that, for any
$f \in \Dom(\Delta_{\mathbf{h}})$, $u_t = \Delta_{\mathbf{h}} Q_t f$ is an $L^2(M,\vol)$ solution of
$$\left(\frac{\partial}{\partial t} - \frac{1}{2} \Delta\right) u_t = 0, \quad u_0 =
\Delta_{\mathbf{h}} f.$$ In conclusion, by Lemma~\ref{lemma:Lpunique} we obtain $\Delta_{\mathbf{h}}
Q_t f = Q_t \Delta_{\mathbf{h}} f$.

For any $s >0$ and $f \in L^2(M, \vol)$, we know that $Q_sf \in
\Dom(\Delta) \subseteq \Dom(\Delta_{\mathbf{h}})$, and since $$(\partial_t -
\frac{1}{2} \Delta_{\mathbf{h}}) Q_s P_t f = 0,$$ it again follows from
Lemma~\ref{lemma:Lpunique} that $P_t Q_s f = Q_s P_t f$ for any $s,t
\geq 0$ and $f \in L^2(M, \vol)$. It follows that the operators
spectrally commute, see \cite[Chapter VIII.5]{ReSi80}.

\item From Theorem~\ref{th:CD}, we know that $\Delta_{\mathbf{h}}$ satisfies \eqref{CD}
  with $\rho_2 >0$ and an appropriately chosen value of~$c$. The proof
  is otherwise identical to \cite[Lemma~3.4 \& Prop~3.6]{BaGa12} and
  is therefore omitted.\qed
\end{enumerate}
\end{proof}

\subsubsection{Proof of Theorem~\textup{\ref{th:CondARiemann}}} \label{sec:ProofCondARiemann}
We are going to prove that \eqref{CondA} holds without using
stochastic analysis. We therefore need the following lemma.
\begin{lemma}[\rm{\cite[Prop 4.2]{BaGa12}}] \label{lemma:preSubM}  
Assume
  that $(M, \tensorg)$ is a complete Riemannian manifold. For any $T> 0$, let $u,
  v\in C^\infty(M \times [0,T])$, $(x,t) \mapsto u_t(x)$, $(x,t)
  \mapsto v_t(x)$ be smooth functions satisfying the following
  conditions:
  \begin{enumerate}[\rm(i)]
  \item For any $t \in [0,T]$, $u_t \in L^2(M,\vol)$ and $\int_0^T
    \|u_t\|_{L^2} dt < \infty.$
  \item For some $1\leq p \leq \infty,$ $\int_0^T
    \|\mathsf \Gamma^{\mathbf h^*}(u_t)^{1/2} \|_{L^p} \dvol < \infty.$
  \item For any $t \in [0,T]$, $v_t \in L^q(M,\vol)$ and $\int_0^T
    \|v_t\|_{L^q} dt < \infty$ for some $1 \leq q \leq \infty$.
  \end{enumerate}
  Then, if $(L + \frac{\partial}{\partial t} ) u \geq v$ holds on $M
  \times [0,T]$, we have
$$P_T u_T \geq u_0 + \int_0^t P_t v_t dt.$$
\end{lemma}

  Let $P_t = e^{t/2 \Delta_{\mathbf{h}}}$.  For given compactly supported $f \in C_c^\infty(M)$ and $T
  >0$, define function
  \begin{equation} \label{zte} z_{t,\varepsilon} =
    \left(\mathsf \Gamma^{\mathbf v^*}(P_{T-t} f) + \varepsilon^2 \right)^{1/2} -
    \varepsilon,\end{equation} with $\varepsilon > 0, t\in [0,T]$. Since $P_t f \in
  \Dom(\Delta_{\mathbf{h}}^2)$, Lemma~\ref{lemma:SpecC}~(b) tells us that,
$$\|z_{t,\varepsilon}\|_{L^2} \leq \int_M \mathsf \Gamma^{\mathbf v^*}(P_{T-t}) \vol \leq C \| P_{T-t} f\|_{\Dom(\Delta_{\mathbf{h}}^2)} < \infty,$$
so that $z_{t,\varepsilon} \in L^2(M, \vol)$. By
Proposition~\ref{prop:DoubleGamma},
\begin{equation} \label{vdoubleGamma} \mathsf \Gamma^{\mathbf h^*}(z_{t,\varepsilon})
  \leq \frac{\mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf v^*}(P_{T-t}
    f))}{4 z_{t,\varepsilon} + \varepsilon} \leq \mathsf \Gamma_2^{\mathbf v^*}(P_{T-t} f)
  .\end{equation} From Lemma~\ref{lemma:SpecC}~(b) it follows that
both (i) and (ii) of Lemma~\ref{lemma:preSubM} is satisfied. Hence, using that from Proposition~\ref{prop:DoubleGamma}
\begin{align} \label{ztesubmartingale} & \left(\partial_t -
    \frac{1}{2} \Delta_{\mathbf{h}} \right) z_{t,\varepsilon} \\ \nonumber &\quad =
  \frac{1}{2 (z_{t,\varepsilon} + \varepsilon)^3} \left( \mathsf \Gamma^{\mathbf v^*}(P_{T-t}
    f) \mathsf \Gamma^{\mathbf v^*}_2(P_{T-t} f) - \frac{1}{4}
    \mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf v^*}(P_{T-t} f)) \right)
  \geq 0,
\end{align}
we get $P_T z_{T,\varepsilon} = P_T (\mathsf \Gamma^{\mathbf v^*}(f) + \varepsilon^2 )^{1/2}
- P_T \varepsilon \geq z_{0,\varepsilon} = (\mathsf \Gamma^{\mathbf v^*}(P_Tf) + \varepsilon
^2)^{1/2} - \varepsilon$. By letting $\varepsilon $ tend to $0$, we obtain
\begin{equation} \label{vgradientb} \sqrt{\mathsf \Gamma^{\mathbf v^*}(P_Tf)}
  \leq P_T \sqrt{\mathsf \Gamma^{\mathbf v^*}(f)}.\end{equation} Next, let
$y_{t,\varepsilon} = \left(\mathsf \Gamma^{\mathbf h^*}(P_{T-t} f) + \varepsilon^2
\right)^{1/2} - \varepsilon$, choose any $\alpha > \max\{ -\rho_{\mathcal{H}}^{\mathstrut}, \mathscr{M}_{\mathcal{HV}}^2
\} \geq 0$ and define
$$u_{t,\varepsilon} = e^{-\alpha/2(T-t)} \big(y_{t,\varepsilon} + \ell \mathsf \Gamma^{\mathbf v^*}(P_{T-t}(f)) \big) .$$
Note first that
\begin{align*}
  &\left(\frac{\partial}{\partial t} + \frac{1}{2} \Delta_{\mathbf{h}} \right) u_{t,\varepsilon}\\&\quad = \frac{e^{-\alpha/2(T-t)}}{2 y_{t,\varepsilon} + 2 \varepsilon} \left( \mathsf \Gamma^{\mathbf h^*}_2(P_{T-t} f) + \ell y_{t,\varepsilon} \mathsf \Gamma^{\mathbf v^*}_2(P_{T-t} f) - \frac{1}{4y_{t,\varepsilon}^2} \mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf h^*}(P_{T-t}f)) \right) \\
  &\qquad + \frac{\alpha e^{-\alpha/2(T-t)}}{2 y_{t,\varepsilon} + 2 \varepsilon}
  \left( \mathsf \Gamma^{\mathbf h^*}(P_{T-t} f) + \varepsilon+ \ell y_{t,s}
    \mathsf \Gamma^{\mathbf v^*}(P_{T-t}f) \right) .
\end{align*}
We use Proposition~\ref{prop:DoubleGamma} with $\ell$ replaced by
$\ell y_{t,\varepsilon}$ to get
\begin{align*}
\frac{1}{4 y_{t,\varepsilon}^2} \mathsf \Gamma^{\mathbf h^*}(\mathsf \Gamma^{\mathbf h^*}(P_{T-t}f)) 
\leq \mathsf \Gamma^{\mathbf h^*}_2(f) &- (\rho_{\mathcal{H}}^{\mathstrut} - c^{-1} - \ell^{-1} y_{t,\varepsilon}^{-1}) \mathsf \Gamma^{\mathbf h^*}(f) \\
&+ \ell y_{t,\varepsilon} \mathsf \Gamma^{\mathbf v^*}_2(f) - c \mathscr{M}_{\mathcal{HV}}^2 \mathsf \Gamma^{\mathbf v^*}(f).
\end{align*}
As a result, for any $c > 0$, $\left(\frac{\partial}{\partial t} + \frac{1}{2} \Delta_{\mathbf{h}} \right) u_{t,\varepsilon}$ has lower bound
\begin{align*}
  &\frac{e^{-\alpha/2(T-t)}}{2 y_{t,\varepsilon} + 2\varepsilon} \left( (\rho_{\mathcal{H}}^{\mathstrut} - c^{-1} - \ell^{-1} y_{t,\varepsilon}^{-1} ) \mathsf \Gamma^{\mathbf h^*}(P_{T-t} f) - c \mathscr{M}_{\mathcal{HV}}^2 \mathsf \Gamma^{\mathbf v^*}(P_{T-t} f) \right) \\
  &\qquad + \frac{\alpha e^{-\alpha/2(T-t)}}{2 y_{t,\varepsilon} + 2\varepsilon} \left( \mathsf \Gamma^{\mathbf h^*}(P_{T-t} f) + \ell y_{t,\varepsilon} \mathsf \Gamma^{\mathbf v^*}(P_{T-t}f) \right). 
\end{align*}
Since it is true for any value of $c >0$, it remains true for $c =
\ell y_{t,\varepsilon}$, and hence
\begin{align*}
  \left(\frac{\partial}{\partial t} + \frac{1}{2} \Delta_{\mathbf{h}} \right)
  u_{t,\varepsilon} \geq & - \frac{e^{-\alpha/2(T-t)}}{\ell} .
\end{align*}
In a similar way as before, we can verify that the conditions of
Lemma~\ref{lemma:preSubM} hold by using Lemma~\ref{lemma:SpecC}. We
can hence conclude that
\begin{align*}
u_{0,\varepsilon} &=  e^{-\alpha T/2} (y_{0,\varepsilon} + \ell \mathsf \Gamma^{\mathbf v^*}(P_Tf)) \\
  & \leq P_T u_{T,\varepsilon} + \int_0^T P_t \frac{e^{-\alpha(T-t)/2}}{\ell} \, dt \\
  & \leq P_T \left( y_{T,\varepsilon} + \ell \mathsf \Gamma^{\mathbf v^*}(f) \right)
  + \frac{2}{\alpha \ell} \left(1- e^{- \alpha T/2} \right).
\end{align*}
Multiplying with $e^{\alpha T/2}$ on both sides, letting $\varepsilon \to 0$
and $\alpha \to k := \max\{ - \rho_{\mathcal{H}}^{\mathstrut}, \mathscr{M}_{\mathcal{R}}^{\mathstrut}\}$, we finally get that for any $\ell > 0$,
\begin{align} \label{hgradientb} & \sqrt{\mathsf \Gamma^{\mathbf h^*}(P_Tf)}
  + \ell \mathsf \Gamma^{\mathbf v^*}(P_T f) \leq e^{k T/2} P_T\left(
    \sqrt{\mathsf \Gamma^{\mathbf h^*}(f)} + \ell \mathsf \Gamma^{\mathbf v^*}(f)
  \right) + \ell^{-1} F_k(T),\end{align}
where 
\begin{equation*}F_k(t) = \begin{cases} \frac{2}{k} ( e^{k t/2} - 1) & \text{if } k >0, \\
    t & \text{if } k =0. \end{cases}  
\end{equation*}
Since this estimate holds pointwise, it holds for 
$\ell = \big(P_T\mathsf \Gamma^{\mathbf v^*}(f)- \mathsf \Gamma^{\mathbf v^*}(P_Tf)\big)^{-1/2}$ 

or $\ell = \infty$ at points where $P_T \mathsf \Gamma^{\mathbf v^*}(f)- \mathsf \Gamma^{\mathbf v^*}(P_Tf) = 0$. The resulting inequality is
\begin{align} \label{chgradientb} &  \sqrt{\mathsf \Gamma^{\mathbf h^*}(P_Tf)} \leq  e^{k T/2} P_T \sqrt{\mathsf \Gamma^{\mathbf h^*}(f)} + (e^{k T/2} +F_k(T)) \sqrt{P_T\mathsf \Gamma^{\mathbf v^*}(f)- \mathsf \Gamma^{\mathbf v^*}(P_tf)} .\end{align}

We will now show how this inequality implies \eqref{CondA}. Since $\tensorg$ is complete, there exist a sequence of compactly
supported functions $g_n \in C^\infty(M)$ satisfying $g_n \uparrow 1$ pointwise and $\|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(g_n)\|_{L^\infty} \to 0.$ It follows from equation \eqref{vgradientb} and \eqref{chgradientb} that
$$\lim_{n \to \infty} \|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(P_t g_n)\|_{L^\infty} \to 0$$
as well. Hence, since $P_t g_n \to P_t 1$ and $\| dP_t g_n\|_{\tensorg^*}$ approach $0$
uniformly, we have that $\mathsf \Gamma^{\tensorg^*}(P_t1) = 0$. It
follows that $P_t1 = 1$.

To finish the proof, consider a smooth function $f \in C^\infty(M)$ with $\|f\|_{L^\infty} < \infty$ and $\|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f)\|_{L^\infty} < \infty.$ Define $f_n = g_n f \in C^\infty(M)$. Then $P_Tf_n \to P_T f$ pointwise. It follows that
\begin{equation} \label{DCT} \int_a^b dP_T f(\dot \gamma(t)) \, dt 
= \lim_{n\to \infty} \int_a^b dP_T f_n \left(\dot \gamma(t)\right) \, dt \end{equation}
for any smooth curve $\gamma:[a,b] \to M$. We want to use the dominated convergence theorem to show that the integral sign and limit on the right side of \eqref{DCT} can be interchanged.

Without loss of generality, we may assume that $\|\mathsf \Gamma^{\mathbf h^*}(g_n)\|_{L^\infty} < 1$ for any $n$. We then note that
$$\left\|\sqrt{\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(f_n)} \right\|_{L^\infty} \leq \|f\|_{L^\infty} + \left\| \sqrt{\mathsf \Gamma^{\mathbf h^*}(f)} \right\|_{L^\infty}=:K < \infty.$$
This relation, combined with \eqref{vgradientb} and \eqref{chgradientb}, gives us
$$\|\sqrt{ \mathsf \Gamma^{\mathbf h^*+ \mathbf v^*} (P_Tf_n) }\|_{L^\infty} \leq \left( 2e^{kT/2} + F_k(T) +1 \right)K.$$
Furthermore, the dominated convergence theorem tells us that both $P_T \mathsf \Gamma^{\mathbf v^*}(f_m-f_n)$ and 
$\lim_{n \to \infty} P_T \mathsf \Gamma^{\mathbf h^*}(f_n - f_m) $ approach $0$ pointwise as $n,m \to \infty$. By inserting $f_n-f_m$ into \eqref{vgradientb} and \eqref{chgradientb}, we see that $\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(P_T f_n)$ at any fixed point is a Cauchy sequence and hence convergent. We conclude that
$$\int_a^b dP_T f (\dot \gamma(t)) dt = \int_a^b \left(\lim_{n \to \infty} dP_T f_n\right)(\dot \gamma(t)) dt.$$
It follows that $dP_t f - \lim_{n \to \infty} dP_t f$ vanishes outside a set of measure zero along any curve, so $$\|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(P_T f) \|_{L^\infty} = \lim_{n \to \infty} \|\mathsf \Gamma^{\mathbf h^* + \mathbf v^*}(P_T f_n ) \|_{L^\infty} < \infty.$$
In conclusion, we have proven that condition \eqref{CondA} holds. Without any loss of
generality we can put $\ell = 1$, since we can obtain all the other
inequalities by replacing $f$ with $\ell f$.
\qed

\begin{remark}
  If we know that any $\frac{1}{2} \Delta_{\mathbf{h}}$-diffusion starting at a point
  has infinite lifetime then using Lemma \ref{lemma:SpecC}, we can
  actually make a probabilistic proof. We outline the proof
  here. We will only prove the inequality \eqref{vgradientb} as the
  proof of \eqref{hgradientb} is similar.

  We will again use $z_{t,\varepsilon}$ as in \eqref{zte}. Let $ X = 
    X(x)$ be an $\frac{1}{2} \Delta_{\mathbf{h}}$-diffusion with $X_0(x) = x
  \in M$. We define $Z^{\varepsilon}$ by $Z^{\varepsilon}_t = z_{t,\varepsilon}
  \circ X_t$.  Then $Z^{\varepsilon}$ is a local submartingale by
  \eqref{ztesubmartingale}.  By using the Burkholder-Davis-Gundy
  inequality, there exist a constant $B$ such that
  \begin{align*} \mathbb E\left[\sup_{0 \leq s \leq t} Z_s^{\varepsilon}
    \right] \leq B \mathbb E\left[\sqrt{ \langle Z^{\varepsilon}
        \rangle_{t } } \right] + z_{0,\varepsilon}(x) + \mathbb E\left[
      \int_0^{t} (\partial_s - \frac{1}{2} \Delta_{\mathbf{h}}) z_{s,\varepsilon} \circ X_s \,ds \right] \end{align*}
  where $\langle Z^{\varepsilon}
  \rangle_t = \int_0^t \mathsf \Gamma^{\mathbf h^*}(z_{s,\varepsilon}) \circ X_s\, ds$ is the quadratic variation of $Z^{\varepsilon}$. By
  the Cauchy-Schwartz inequality and the bound \eqref{vdoubleGamma},
  we get the conclusion
  \begin{align*}
    \mathbb E\left[\sqrt{ \langle Z^{\varepsilon} \rangle_t } \right] \leq
    p_{2t}(x,x)\, \sqrt{ \int_0^t \|\mathsf \Gamma^{\mathbf v^*}_2(P_{T-s}
      f) \|_{L^1} \,dt} < \infty
  \end{align*}
  which means that $ \mathbb E\left[\sup_{0 \leq s \leq t \wedge
      \tau} Z_s^{\varepsilon} \right] <\infty$. Hence, $Z^{\varepsilon}$ is a true submartingale, giving us \eqref{vgradientb}.
\end{remark}

\subsection{Interpretation of $\Ric_{\mathcal{H}}^{\mathstrut}V$} \label{sec:RicHV} Let $\mathcal V$
be any integrable subbundle. Choose a subbundle $\mathcal H$ such that $TM
= \mathcal H \oplus \mathcal V$.  Any such choice of $\mathcal H$ correspond uniquely
to a constant rank endomorphism $\pr = \pr_{\mathcal V}: TM \to \mathcal V
\subseteq TM$. This can be considered as a splitting of the short
exact sequence $\mathcal V \to TM \stackrel{F}{\to} TM/\mathcal V.$

Let $\Omega(M)$ be the the exterior algebra of $M$ with $\integer
\times \integer$-grading of Section~\ref{sec:GradedForms}. Choose
nondegenerate metric tensors
$$\mathbf v \in \Gamma(\Sym^2 \mathcal V^*) \text{ and } \widecheck{\tensorg} \in \Gamma(\Sym^2 (TM/\mathcal V)^*)$$ on $\mathcal V$ and $TM/\mathcal V$. Since $\bigwedge^\nu \mathcal V^* \oplus \bigwedge^n (TM/\mathcal V)^*$ is canonically isomorphic to  $\bigwedge^{n+\nu} T^*M$, the choices of $\mathbf v$ and $\widecheck{\tensorg}$ gives us a volume form $\vol$ on $M$.

We also have an energy functional defined on projections to
$\mathcal V$. Relative to $\pr$, define a Riemannian metric $\tensorg_{\pr}
= F^* \widecheck{\tensorg} + \pr^* \mathbf v$. We introduce a
functional $E$ on the space of projections $\pr$ by
$$E(\pr) = \int_M \| \mathcal R_{\pr}\|^2_{\wedge^2 \tensorg_{\pr}^* \otimes \tensorg_{\pr}} \dvol$$
where $\mathcal R_{\pr}$ is the curvature of $\mathcal H = \ker \pr$. We can
only be sure that the integral is finite if $M$ is compact, so we will
assume this, and consider our calculations as purely formal when this
is not the case.

Let $\nabla= \nabla^{\pr}$ be the restriction of the Levi-Civita
connection of $\tensorg_{\pr}$ to $\mathcal V$.  Introduce a exterior
covariant derivative of $d_{\nabla}$ on $\mathcal V$-valued forms in the
usual way, i.e. for any section $V \in \Gamma(\mathcal V)$, we have
$d_{\nabla} V = \nabla_{\!\newbulletsub}^{\mathstrut}\! V$ and if $\alpha$ is a
$\mathcal V$-valued $k$-form, while $\mu$ is a form in the usual sense,
then
$$d_\nabla (\alpha \wedge \mu) = (d_\nabla \alpha) \wedge \mu + (-1)^k \alpha \wedge d\mu.$$
We can split this operator into graded components $d_{\nabla} =
d^{1,0}_{\nabla} + d^{0,1}_{\nabla} + d^{2,-1}_{\nabla} $ and do the
same with its formal dual $\delta_{\nabla} = \delta^{-1,0}_\nabla +
\delta^{0,-1}_{\nabla} + \delta_{\nabla}^{2,-1}$.

\begin{proposition}
  The endomorphism $\pr$ is a critical value of $E$ if and only if
  $\delta^{-1,0}_{\nabla} \mathcal R = 0$. In particular, if~$\tensorg$
  satisfies
  \begin{equation} \label{IIis0} \tr_{\mathcal V} (\mathcal L_{A} \tensorg)(\times, \times) = 0,
    \quad \text{for any } A \in \Gamma(\mathcal H),\end{equation} then $\pr$ is a critical value if and
  only if $\Ric_{\mathcal{H}}^{\mathstrut}V = 0.$
\end{proposition}

Recall from Part I, Section~2.4 that condition \eqref{IIis0} is equivalent to the leafs of the foliation of $\mathcal F$ being minimal submanifolds. If $\mathcal V$ is the vertical bundle of a submersion $\pi\colon M \to B$,
then we can identify $TM/\mathcal V$ with $\pi^* TB$. In this case, a critical value of $E$ can be considered as an optimal way
of choosing an Ehresmann connection on~$\pi$.

\begin{proof}
  We write $\id:= \id_{TM}$ for the identity on $TM$. Let $\pr$ be a
  projection to $\mathcal V$ and $\alpha: TM \to \mathcal V$ be any $\mathcal V$-values one-from
  with $\mathcal V \subseteq \ker \alpha$. Define a curve in the space
  projections $\pr_t = \pr + t\alpha$. Then
$$\tensorg_t(v,v) := \tensorg_{\pr_t}(v,v) = \tensorg_{\pr}(v,v) +2t \mathbf v(\alpha v, \pr v) + t^2 \mathbf v(\alpha v, \alpha v).$$
Let $\mathcal R_t$ be the curvature of $\pr_t$. Then
\begin{align*} \mathcal R_t(A,Z) &=   \mathcal R(A,Z) + t \alpha [(\id -\pr) A, (\id - \pr)Z]  \\
  & \quad- t \left(\pr [\alpha A, (\id -\pr) Z ] + \pr [ (\id -\pr) A, \alpha Z
    ]\right) + O(t^2).\end{align*} If $\nabla^t = \nabla^{\pr_t}$, then
\begin{align*}\nabla^t_A V &= \nabla_A V + \frac{1}{2} t d_\nabla
  \alpha(A,V) - \frac{1}{2} t \sharp^{{\mathbf v}^*} \tensorg(d_\nabla \alpha(A,\newbullet), V),
  \quad\text{and}\\
  d_{\nabla^t} \pr_t &=d_{\nabla} \pr + \frac{1}{2} t (d_{\nabla}
  \alpha)_{1,1} - \frac{1}{2} t (d_{\nabla} \alpha )^\top_{1,1} + t d_{\nabla} \alpha +
  O(t^2),
\end{align*}
where $(d_\nabla \alpha)_{1,1}$ is the (1,1)-graded component of $d_\nabla
\alpha$ and $$\mathbf v((d_{\nabla}\alpha)^\top_{1,1}(A,V_1),V_2) = \mathbf v((d_\nabla
\alpha)_{1,1}(A,V_1),V_2).$$ Since $\mathcal R_t = -d_{\nabla}^{2,-1} \pr_t$, we get
\begin{align*}
  \left. \frac{d}{dt} E(\pr_t) \right|_{t=0} &= \int_M (\wedge^2 \tensorg_{\pr}^* \otimes \tensorg_{\pr})( d_{\nabla}^{2,-1} \pr , d_\nabla^{1,0} \alpha) \dvol \\
  &= - \int_M (\mathbf h^* \otimes \mathbf v)(\delta_{\nabla}^{-1,0}
  \mathcal R, \alpha) \dvol.
\end{align*}
Hence, $\pr$ is a critical value if and only if $\delta^{-1,0}_\nabla
\mathcal R =0$.

We give a local expression for this identity. Let $A_1, \dots, A_n$ be
a local orthonormal basis of $\mathcal H$. Then
\begin{align*}
  & \delta^{-1,0}_{\nabla} \mathcal R = - \sum_{k=1}^n (\,\mathring{\phantom{\nabla}\!\!\!\!\!\!}\mathring{\!\!\nabla}_{A_k}
  \mathcal R)(A_k, \newbullet) + \mathcal R(N, \newbullet)
\end{align*}
where $N$ is defined by $\tensorg_{\pr}(A,N) = - \frac{1}{2} \tr_{\mathcal V}
(\mathcal L_{\pr_{\mathcal H} A} \tensorg)(\times, \times)$ and $\,\mathring{\phantom{\nabla}\!\!\!\!\!\!}\mathring{\!\!\nabla}$ is the (0,0)-degree component of the
Levi-Civita connection, i.e.
$$\,\mathring{\phantom{\nabla}\!\!\!\!\!\!}\mathring{\!\!\nabla}_A Z = \pr_{\mathcal H} \nabla_A \pr_{\mathcal H} Z + \pr_{\mathcal V} \nabla_A \pr_{\mathcal V} Z.$$
This coincides with $\Ric_{\mathcal{H}}^{\mathstrut}V$ when \eqref{IIis0} holds.\qed
\end{proof}

\subsection{If $\mathcal V$ is not integrable} \label{sec:NotIntegrable}
Let $(M, \tensorg)$ be a complete Riemannian manifold and let $\mathcal H$ be a bracket-generating subbundle of $TM$
with orthogonal complement $\mathcal V$. Define $\mathring{\nabla}$ as in \eqref{rnabla} with respect to $\tensorg$ and the splitting $TM = \mathcal H \oplus \mathcal V$ and assume that $\mathring{\nabla} \tensorg = 0$. Let $\Delta_{\mathbf{h}}$ be the sub-Laplacian defined relative to $\mathcal V$ or equivalently to the volume form of $\tensorg$. Then it may happen that \eqref{CD} holds for $\Delta_{\mathbf{h}}$ even without assuming that $\mathcal V$ is integrable. More precisely, we will need the condition
\begin{equation} \label{traceZero} \tr \overline{\mathcal R}(v,\mathcal R(v, \newbullet)) =0, \qquad v \in TM, \end{equation}
$$\mathcal R(A,Z) = \pr_{\mathcal V} [ \pr_{\mathcal H} A, \pr_{\mathcal H} Z], \quad \overline{\mathcal R}(A,Z) = \pr_{\mathcal H} [ \pr_{\mathcal V} A, \pr_{\mathcal V} Z], \quad A,Z \in \Gamma(TM).$$
We refer to $\mathcal R$ and $\overline{\mathcal R}$ as respectively the curvature and the co-curvature of $\mathcal H$.

In Part~I, Section~3.8, we showed that Theorem~\ref{th:CD} and Proposition~\ref{prop:DoubleGamma} hold with the same definitions and with $\mathcal V$ not integrable, as long as \eqref{traceZero} also holds. The same is true for Theorem~\ref{th:CondARiemann}. We give some brief details regarding this.

First of all, in Section~\ref{sec:GradedForms}, the exterior derivative $d$ now also has a part of degree $(-1,2)$, determined by
$$d^{-1,2} f =0, \quad d^{-1,2} \alpha = - \alpha \circ \overline{\mathcal R}, \qquad f \in C^\infty(M),\ \alpha \in \Gamma(T^*M),$$
and hence, the co-differential has a degree $(1,-2)$-part. However, these do not have any significance for our calculations. More troubling is the fact that both Lemma~\ref{lemma:fromPartI}~(a) and the formula for $\mathring{\nabla}_Z V_s|_{x_0}$ in Lemma~\ref{lemma:fromPartI}~(b) are false when $\mathcal V$ is not integrable. However, \eqref{traceZero} ensures that $$\sum_{i=1}^n \tensorg(R^{\mathring{\nabla}}(A_i, V) Z, A_i) = 0$$ for any orthonormal basis $A_1, \dots, A_n$ of $\mathcal H$ and vertical vector field $V$, which is all we need for the proof of Lemma~\ref{lemma:srLDeltaCommute}. Furthermore the same proof is still holds even if now $\mathring{\nabla}_Z V_s|_{x_0} = \frac{1}{2} \sharp \overline{\mathcal R}(Z, \newbullet)|_{x_0}$ in Lemma~\ref{lemma:fromPartI}~(b), as the extra terms cancel out.

Once Lemma~\ref{lemma:srLDeltaCommute} holds, there is no problem with the rest of the proof of Theorem~\ref{th:CondARiemann}. See Part I, Section 4.6 for an example where this theorem holds.

  

   

\end{document}