TITLE: Explicit formulas for Carnot-Carathéodory distances on Carnot groups
QUESTION [13 upvotes]: Let $G$ be a Carnot group (aka stratified group), so that $G$ is a connected and simply connected finite-dimensonal Lie group, whose Lie algebra $\mathfrak{g}$ admits a decomposition $\mathfrak{g} = V_1 \oplus \dots \oplus V_n$ where $[V_1, V_k] = V_{k+1}$.  Let $\mathcal{H} \subset TG$ be the left-invariant "horizontal distribution" which agrees with $V_1$ at the identity.   Then $\mathcal{H}$ is bracket generating.  If we fix an inner product $\langle \cdot, \cdot \rangle$ on $V_1$, we obtain a left-invariant sub-Riemannian metric $g$ on $G$.
Let $d$ be the corresponding Carnot–Carathéodory distance on $G$.  That is, the distance $d(x,y)$ is the length of the shortest horizontal path joining $x$ to $y$.
If $G = \mathbb{H}^{2m+1}$ is a Heisenberg group, i.e. $n=2$ and $\dim V_2 = 1$, then an "explicit" formula for $d$ is known [1], for any inner product on $V_1$.  (As Richard Montgomery points out, it is not explicit in the strongest sense because it is in terms of a solution of a transcendental equation.  But that sort of thing is explicit enough for my purposes.)
There are also "explicit" formulas known in case $(G, \langle \cdot,\cdot \rangle)$ is H-type in the sense of Kaplan [2]; see [3,4,5].

Are there any other (classes of) Carnot groups for which we know how to "explicitly" compute the distance $d$?


[1]. Beals, Richard W.; Gaveau, Bernard; Greiner, Peter C., Hamilton-Jacobi theory and the heat kernel on Heisenberg groups, J. Math. Pures Appl., IX. Sér. 79, No.7, 633-689 (2000). ZBL0959.35035.
[2]. Kaplan, Aroldo, Fundamental solutions for a class of hypoelliptic PDE generated by composition of quadratic forms, Trans. Am. Math. Soc. 258, 147-153 (1980). ZBL0393.35015.
[3]. 
Korányi, Adam, Geometric properties of Heisenberg-type groups, Adv. Math. 56, 28-38 (1985). ZBL0589.53053.
[4] Rigot, Séverine, Counter example to the Besicovitch covering property for some Carnot groups equipped with their Carnot-Carathéodory metric, Math. Z. 248, No. 4, 827-848 (2004). ZBL1082.53030.
[5]. Tan, Kang-Hai; Yang, Xiao-Ping, Characterisation of the sub-Riemannian isometry groups of $H$-type groups, Bull. Aust. Math. Soc. 70, No. 1, 87-100 (2004). ZBL1070.53013.

REPLY [4 votes]: As pointed out by Richard Montgomery, there is no formula expressed in terms of elementary functions for the Carnot-Caratheodory distance between any two points, even in the case of the Heisenberg group. In the answer provided below we will see an explicit formula involving an inverse of an elementary function which is Corollary 3.2 in [2]. It is perhaps easily seen to be equivalent to (1.40) in [1] (see the answer of Richard Montgomery), but I haven't checked it.
The Heisenberg group $\mathbb{H}^n$ is $\mathbb{C}^n\times\mathbb{R}=\mathbb{R}^{2n+1}$ given the structure of a Lie group with multiplication
\begin{split}
&(z,t)*(z',t')=
\Big(z+z',t+t'+2 {\rm Im}\, \sum_{j=1}^nz_j\overline{z_j'}\Big)\\
&=
\Big(x_1+x_1', \dots , x_n + x_n' , y_1+y_1', \dots, y_n+y_n', t+t'+2 \sum_{j=1}^n (x_j' y_j - x_j y_j')\Big).
\end{split}
A basis of a Lie algebra is given by
$$
X_j = \frac{\partial}{\partial x_j} + 2y_j \frac{\partial}{\partial t}, 
\quad 
Y_j= \frac{\partial}{\partial y_j} - 2x_j \frac{\partial}{\partial t}, 
\quad 
T=\frac{\partial}{\partial t},
\quad
j=1,2,\ldots,n.
$$
The Heisenberg group is equipped with the horizontal distribution 
$$
H\mathbb{H}^n = \mathrm{span} \{ X_1,\dots, X_n, Y_1,\dots,Y_n \}.
$$
The horizontal distribution is equipped with a Riemannian metric $g$ so that the basis $\{ X_1,\dots, X_n, Y_1,\dots,Y_n \}$ of $H\mathbb{H}^n$ is orthonormal. 
Horizontal curves are the curves that are tangent to the horizontal distribution and we compute the length of such a curve with respect to the metric $g$ on 
$H\mathbb{H}^n$. The Carnot-Caratheodory distance $d_{cc}(p,q)$ between $p,q\in\mathbb{H}^n$ is the infimum of lengths of horizontal curves connecting $p$ and $q$.
Define $H:(-1,1) \to \mathbb{R}$ as
$$
H(s) = \frac{2 \pi}{1 - \cos(2 \pi s)} \left( s-\frac{\sin(2 \pi s)}{2 \pi} \right)=
\frac{\frac{2\pi s}{3!}-\frac{(2\pi s)^3}{5!}+\frac{(2\pi s)^5}{7!}-\ldots}{\frac{1}{2!}-\frac{(2\pi s)^2}{4!}+\frac{(2\pi s)^4}{6!}-\ldots}\, .
$$
$H$ is a real analytic diffeomorphism of $(-1,1)$ onto $\mathbb{R}$ so the inverse $H^{-1}:\mathbb{R}\to (-1,1)$ is a real analytinc diffeomorphism too.

Theorem. (Corollary 3.2 in [2]). For $z\neq 0$, the Carnot-Caratheodory distance between the origin $(0,0)$ and $(z,t)$, equals 
  $$
 d_{cc}((0,0),(z,t)) = t \sin(\pi H^{-1}(t|z|^{-2}))|z|^{-1} +
 |z|\cos(\pi H^{-1}(t|z|^{-2})). 
$$

Using a fact that left translations on the Heisenberg group are isometries, we can obtain a formula for the distance between any two points. It also follows that the Carnot-Caratheodory distance is a real analytic function away from the center of the group.
[1]. R. W. Beals,B. Gaveau, P. C. Greiner, Peter C., Hamilton-Jacobi theory and the heat kernel on Heisenberg groups, J. Math. Pures Appl., IX. Sér. 79, No.7, 633-689 (2000). ZBL0959.35035.
[2]  P. Hajłasz, S. Zimmerman, Geodesics in the Heisenberg group. Anal. Geom. Metr. Spaces 3 (2015), 325–337.