# ABNORMAL SUBANALYTIC DISTRIBUTIONS IN SUB-RIEMANNIAN GEOMETRY

Ludovic Rifford, Adam Parusinski, André Belotto da Silva

► To cite this version:

Ludovic Rifford, Adam Parusinski, André Belotto da Silva. ABNORMAL SUBANALYTIC DISTRIBUTIONS IN SUB-RIEMANNIAN GEOMETRY. 2025. hal-04881557

HAL Id: hal-04881557

https://hal.science/hal-04881557v1

Preprint submitted on 13 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
ABNORMAL SUBANALYTIC DISTRIBUTIONS IN SUB-RIEMANNIAN
GEOMETRY

A. BELOTTO DA SILVA, A. PARUSIŃSKI, AND L. RIFFORD

ABSTRACT. We present a description of singular horizontal curves of a bracket generating analytic distribution in terms of the projections of the orbits of some isotropic subanalytic singular distribution defined on the nonzero annihilator of the initial distribution in the cotangent bundle. We expect this presentation to be useful in the context of the Sard Conjecture in sub-Riemannian geometry. We provide an evidence by showing that the Sard Conjecture holds true for trajectories that remains in a single stratum, and by showing the minimal rank Sard Conjecture for Carnot groups.

In a follow-up paper, we use our description to obtain, under an additional assumption on the constructed subanalytic singular distribution, a proof of the minimal rank Sard conjecture in the analytic category.

# 1. INTRODUCTION

## 1.1. Preliminaries in sub-Riemannian geometry.
Let $M$ be a smooth connected manifold of dimension $n \ge 3$ equipped with a distribution $\Delta \subset TM$ of rank $m < n$ which is bracket generating, that is, for every $x \in M$ there are an open neighborhood $V$ of $x$ and $m$ linearly independent smooth vector fields $X_x^1, \dots, X_x^m$ such that

$$ \Delta(y) = \operatorname{Span}\{X_x^1(y), \dots, X_x^m(y)\}, \quad \forall y \in V, $$

and satisfy the Hörmander condition

$$ \operatorname{Lie}\{X_x^1, \dots, X_x^m\}(y) = T_y M, \quad \forall y \in V. $$

By Chow-Rashevsky's theorem, any pair of points of $M$ can be connected by a horizontal path, that is, by a curve $\gamma : [0, 1] \to M$ which is absolutely continuous with derivative in $L^2$ and satisfies

$$ \dot{\gamma}(t) \in \Delta(\gamma(t)) \quad \text{for a.e. } t \in [0, 1]. $$

Consider now the cotangent bundle $T^*M$ equipped with the canonical symplectic form denoted by $\omega$. Define the nonzero annihilator of $\Delta$ as the subset of $T^*M$ given by

$$ (1.1) \qquad \Delta^{\perp} := \{ \mathfrak{a} = (x, p) \in T^*M \mid p \neq 0 \text{ and } p \cdot v = 0, \forall v \in \Delta(x) \}. $$

By construction, as a smooth vector subbundle with the zero section removed, $\Delta^{\perp}$ is a smooth submanifold of dimension $2n - m$ of $T^*M$ which is invariant by dilations in the fibers. More precisely, for every $\lambda \in \mathbb{R}^*$ we consider the associated dilation:

$$ (1.2) \qquad \sigma_{\lambda} : T^*M \to T^*M, \quad \text{given by} \quad \sigma_{\lambda}(x, p) = (x, \lambda p). $$

Then $\sigma_{\lambda}(\Delta^{\perp}) = \Delta^{\perp}$ for all $\lambda$. Moreover, $\Delta^{\perp}$ is equipped with the 2-form given by the restriction of the canonical symplectic form $\omega$ over $T^*M$, denoted by

$$ (1.3) \qquad \omega^{\perp} := \omega|_{\Delta^{\perp}}. $$

Following Hsu's characterization [20], a singular horizontal path $\gamma : [0, 1] \to M$ is a horizontal path which admits a lift $\psi : [0, 1] \to \Delta^{\perp}$, called an abnormal lift, satisfying

$$ (1.4) \qquad \dot{\psi}(t) \in \ker(\omega_{\psi(t)}^{\perp}) \quad \text{for a.e. } t \in [0, 1]. $$
The corank of a horizontal path is equal to the dimension of the space of abnormal lifts. It can be proved that the corank must be a number between {1, ..., n-m}, essentially because Δ⊥ is invariant by dilation and its fibers with respect to the projection to M have dimension n-m. We say that γ: [0, 1] → M is a minimal rank singular horizontal path if its corank is equal to n-m. In particular, if Δ has corank 1, then every singular horizontal path is a minimal rank singular horizontal path.

The aforementioned results concerning singular curves are stated and proved in Section 3.2. For a more general introduction to the notions above, we refer the reader to Bellaïche's monograph [7], or to the books by Montgomery [30], by Agrachev, Barilari and Boscain [1], or by the third author [33].

**1.2. The Sard Conjecture.** Our overarching ambition is to address in a systematic way the Sard Conjecture in sub-Riemannian geometry, which we now recall. For every $x \in M$ and integer $r \in [m, n-1]$, we denote by $S_{\Delta}^{x,r}$ the set of singular horizontal paths (with respect to $\Delta$) starting at $x$ of rank $r$. Set

$$ \mathrm{Abn}_{\Delta}^{r}(x) := \{ \gamma(1) | \gamma \in S_{\Delta}^{x,r} \} \subset M. $$

By construction, each set $\mathrm{Abn}_{\Delta}^{r}(x)$ coincides with the set of critical values of rank $r$ of the so-called End-Point mapping (see Section 3.1) which is, roughly speaking, a smooth mapping defined on a Hilbert space, see e.g. [30, 33]. Although Sard's Theorem does not hold in infinite dimension [6], it is currently believed that the following holds:

**Sard Conjecture.** For every $x \in M$ and every integer $r \in [m, n-1]$, the set $\mathrm{Abn}_{\Delta}^{r}(x)$ has zero Lebesgue measure in $M$.

The Sard Conjecture is known to be true in very few cases whenever $\dim M > 3$. All results so far focus on Carnot groups, either of small rank and/or step, see e.g. [2, 13, 24, 30, 32, 34], or under extra quantitative conditions on the regularity of the controls – therefore, possibly, restricting one-selves to a subset of $S_{\Delta}^{x,r}$ – [26]. Note that Carnot groups are analytic.

In a joint work with Figalli [8], we have proved the strong version of the Conjecture in the analytic three dimensional case by following a geometrical approach. Our proof is strongly based on the understanding of the characteristic foliation, as introduced by Zelenko and Zhimtomirskii [38] and previously studied by Belotto and Rifford [11]. This foliation is, essentially, a projection of the distribution $\ker(\omega^{\perp}) \subset T\Delta^{\perp}$ to $TM$; in three dimensions, this turns out to be a line foliation which can be studied in details via singularity theory.

The first goal of this paper is to extend the notion of “characteristic foliations” to arbitrary dimensions in the analytic case, thus providing the framework to generalize our methods from [11, 8].

**1.3. Abnormal subanalytic distributions.** From now on, we restrict ourselves to the real-analytic category, that is, when both $M$ and $\Delta$ are real-analytic, which gives us access to techniques of subanalytic geometry and real-analytic geometry. Our goal is to find a refinement of the geometrical description of characterization of singular paths given by Hsu, see equation (1.4), which would be fit for applications to the Sard Conjecture in sub-Riemannian geometry – see Section 1.2. To this end, we define two special distributions $\bar{K}$ and $\bar{J}$ over $\Delta^{\perp}$ satisfying several additional properties, which describe the lifts of singular paths. The first distribution, $\bar{K}$, is called abnormal distribution, while the second, $\bar{J}$, is called the abnormal foliation.

We start by recalling a few preliminary notions related to distributions. We introduce the notions directly over $\Delta^{\perp} \subset T^*M$ for simplicity, and we postpone a more general discussion to Section 3.

**Subanalytic distribution:** A distribution on $\Delta^{\perp}$ is any mapping $\bar{\mathcal{L}}$ which assigns to a point $a$ in $\Delta^{\perp} \subset T^*M$ a vector subspace $\bar{\mathcal{L}}(a)$ of $T_a\Delta^{\perp}$ of dimension $\dim \bar{\mathcal{L}}(a)$, also called rank, that may depend upon $a$. We say that $\bar{\mathcal{L}}$ is a subanalytic distribution if its graph in $T\Delta^{\perp}$ is subanalytic.
Whitney stratification $\mathcal{S}$ and invariance by dilation: Consider a subanalytic Whitney stratification of $\Delta^{\perp}$, that is a partition $\mathcal{S} = (\mathcal{S}_{\alpha})$ of $\Delta^{\perp}$,

$$ \Delta^{\perp} = \bigcup_{\mathcal{S}_{\alpha} \in \mathcal{S}} \mathcal{S}_{\alpha}, $$

into a locally finite union of subanalytic strata satisfying Whitney's conditions (see details in Section 3.3.2). We say that $\mathcal{S}$ is invariant by dilation if $\sigma_{\lambda}(\mathcal{S}_{\alpha}) = \mathcal{S}_{\alpha}$ for every $\alpha$ and every $\lambda \in \mathbb{R}^{*}$.

Horizontal curves with respect to $\mathcal{L}$: A curve $\psi: [0, 1] \to \Delta^{\perp}$ is said to be horizontal with respect to $\mathcal{L}$ if it is absolutely continuous with derivative in $L^2$ and satisfies

$$ \dot{\psi}(t) \in \mathcal{L}(\psi(t)) \subset T_{\psi(t)}\Delta^{\perp} \quad \text{for a.e. } t \in [0, 1]. $$

Distributions compatible with a Whitney stratification $\mathcal{S}$: A distribution $\mathcal{L} \subset T\Delta^{\perp}$ is compatible with respect to a Whitney stratification $\mathcal{S}$ of $\Delta^{\perp}$ if $\mathcal{L}$ has constant rank on every stratum $\mathcal{S}_{\alpha}$ and $\mathcal{L} \cap T\mathcal{S}_{\alpha}$ yields an analytic subbundle of $T\mathcal{S}_{\alpha}$, for all $\alpha$. Furthermore, we say that $\mathcal{L}$ is invariant by dilation if $d\sigma_{\lambda}(\mathcal{L}(\mathfrak{a})) = \mathcal{L}(\sigma_{\lambda}(\mathfrak{a}))$ for all $\mathfrak{a}$ and $\lambda$; note that the distribution $\ker(\omega^{\perp})$ is invariant by dilation.

For the next three paragraphs, we consider a subanalytic distribution $\mathcal{L} \subset T\Delta^{\perp}$ compatible with a subanalytic Whitney stratification $\mathcal{S}$ of $\Delta^{\perp}$:

Essential domain: The essential domain of the distribution $\mathcal{L} \subset T\Delta^{\perp}$ is the union of all strata from $\mathcal{S}$ of maximal dimension. We denote it by $\mathcal{S}_0$.

Integrable distributions: The distribution $\mathcal{L} \subset T\Delta^{\perp}$ is said to be integrable if for every stratum $\mathcal{S}_{\alpha}$, the restriction of $\mathcal{L}$ to $\mathcal{S}_{\alpha}$ is closed by the Lie-bracket operation. In particular, integrable subanalytic distributions give rise to subanalytic foliations.

Isotropic distribution: The distribution $\mathcal{L} \subset T\Delta^{\perp}$ is said to be isotropic if for every $\mathfrak{a} \in \Delta^{\perp}$, the vector-space $\mathcal{L}(\mathfrak{a}) \subset T_{\mathfrak{a}}(T^{*}\mathcal{M})$ is an isotropic space in $T_{\mathfrak{a}}(T^{*}\mathcal{M})$ with respect to the canonical symplectic form $\omega$.

We can now state our characterization, which is reminiscent of previous works by Sussmann [36] and del Pino and Shin [3] in sub-Riemannian geometry, and of Bove and Treves [14] in microlocal analysis:

**Theorem 1.1** (Characterization of abnormal lifts). Assume that both $M$ and $\Delta$ are real-analytic. There exist an open and dense set $\mathcal{S}_0 \subset \Delta^{\perp}$ whose complement is an analytic set, a subanalytic Whitney stratification $\mathcal{S} = (\mathcal{S}_{\alpha})$ of $\Delta^{\perp}$ invariant by dilation, where $\mathcal{S}_0$ is a stratum, and two subanalytic distributions

$$ \vec{\mathcal{K}} \subset \vec{\mathcal{J}} \subset T\Delta^{\perp} $$

compatible with $\mathcal{S}$ and invariant by dilation satisfying the following properties:

(i) **Specification on strata.** For every stratum $\mathcal{S}_{\alpha}$ of $\mathcal{S}$, the distributions $\vec{\mathcal{K}} \subset \vec{\mathcal{J}} \subset T\Delta^{\perp}$ at a point $\mathfrak{a} \in \mathcal{S}_{\alpha}$ are given by

$$ \vec{\mathcal{K}}(\mathfrak{a}) := \ker(\omega_{\mathfrak{a}}^{\perp}) \cap T_{\mathfrak{a}}\mathcal{S}_{\alpha}, \quad \vec{\mathcal{J}}(\mathfrak{a}) := \mathrm{Lie}(\vec{\mathcal{K}}|_{\mathcal{S}_{\alpha}})(\mathfrak{a}). $$

In particular, on each $\mathcal{S}_{\alpha}$, the distributions $\vec{\mathcal{K}}$, $\vec{\mathcal{J}}$ have constant rank, $\vec{\mathcal{K}}$ is isotropic and $\vec{\mathcal{J}}$ is integrable.

(ii) **Equality on the essential domain.** The set $\mathcal{S}_0$ is the essential domain of the two distributions and $\vec{\mathcal{K}}|_{\mathcal{S}_0} = \vec{\mathcal{J}}|_{\mathcal{S}_0}$.

(iii) **Abnormal lifts are horizontal paths of $\vec{\mathcal{K}}$.** A curve $\gamma: [0, 1] \to M$ is a singular horizontal path with respect to $\Delta$ if and only if it admits a lift $\psi: [0, 1] \to \Delta^{\perp}$ which is horizontal with respect to $\vec{\mathcal{K}}$.
(iv) **Ranks of $\bar{K}$**. The rank of $\ker (\omega_{|S_0|}^{\perp}) = \bar{K}_{|S_0|}$ satisfies

$$ \dim \bar{K}_{|S_0|} \equiv m \pmod{2} \quad \text{and} \quad \dim \bar{K}_{|S_0|} \le m-2. $$

In addition, for every stratum $S_\alpha \ne S_0$, the rank of $\ker (\omega_{|S_\alpha|}^{\perp})$ is constant and

$$ \dim \bar{K}_{|S_\alpha|} \le m-1 \quad \text{and} \quad \dim \ker (\omega_a^{\perp}) \ge \dim \bar{K}_{|S_\alpha|} + 2 \quad \forall a \in S_\alpha. $$

The proof of Theorem 1.1 is given in Section 4 and follows from techniques of subanalytic and symplectic geometry. Assertion (i) provides two distributions which in general do not coincide outside of the essential domain, we illustrate this point via an example in Section 2.3. The property given in (ii) implies that $\bar{K}$ is indeed isotropic and integrable on the essential domain, this fact will play a crucial role in our follow-up paper, concerning the analytic minimal rank Sard Conjecture [9]. Finally, assertion (iii) is the core of Theorem 1.1, it justifies the construction of $\bar{K}$ whose horizontal paths provide all abnormal lifts of $\Delta$.

**Remark 1.2** (The integrable-isotropic closure of $\bar{K}$). Given that $\bar{K}$ is isotropic, it is natural to ask whether $\bar{J}$ is isotropic as well. This turns out to be false, in general. We may, nevertheless, refine the stratification $S$ from Theorem 1.1 (the proof is given in §4) in such a way that there exists a third subanalytic distribution $\bar{I} \subset T\Delta^{\perp}$ compatible with $S$ and invariant by dilation given by

$$ \bar{I}(a) := \ker ((\omega_{|S_\alpha|})_a), \quad \forall a \in \Delta^{\perp}. $$

Note that $\bar{I}$ is both isotropic and integrable (by Proposition 3.3 below). Therefore $\bar{K} \subset \bar{J} \subset \bar{I}$ and $\bar{K}_{|S_0|} = \bar{J}_{|S_0|} = \bar{I}_{|S_0|}$. Nevertheless, in general $\bar{J} \ne \bar{I}$ over a non-essential strata, as we illustrate in Section 2.3.

In the $\mathcal{C}^\infty$ category we do not know how to provide such a complete description yet, but we provide a version of Theorem 1.1 focusing only in the essential domain in [10].

1.4. **A geometrical approach to the Sard Conjecture.** Following the geometrical framework described in Theorem 1.1, our attempt to generalize the methods from [11, 8] requires addressing two key problems:

(I) Analyzing the asymptotic properties of the abnormal distribution $\bar{K} \subset T\Delta^{\perp}$ near the boundaries of strata, in order to describe the set of points reachable via horizontal paths of $\bar{K}$ from the fiber of a given point in $M$.

(II) Investigating how the attainable set from (I) projects onto $M$, particularly in cases where the dimension of this set is at least $n$.

These two problems are not addressed separately in the aforementioned papers on Carnot groups where the Sard Conjecture has been proven see [13, 24, 32]. This is largely due to the additional algebraic structure of Carnot groups and the low rank/or step hypothesis made by the authors.

We approach the problem from a slightly different perspective, aiming to decouple the two key problems. In fact, problem (II) can be addressed more straightforwardly when considering singular horizontal paths of minimal rank, which corresponds to any singular horizontal path in the case of co-rank 1 distributions (see Section 2.1). It is therefore natural to first consider the following weak form of the Sard Conjecture, which requires addressing only (I):

**Minimal rank Sard Conjecture.** For every $x \in M$, the set $\text{Abn}_{\Delta}^m(x)$ has zero Lebesgue measure in $M$.

In this paper, we provide a version of Theorem 1.1 valid for minimal rank singular horizontal paths directly over $M$, see Theorem 2.1. Moreover, we prove the minimal rank Sard Conjecture for bracket generating polarized groups in Proposition 2.3, following a refinement of Theorem 1.1 to this setting, given in Theorem 2.2.
More generally, in our follow-up paper [10], we reduce the minimal rank Sard Conjecture over an analytic distribution to the study of a topological-metrical property of the abnormal foliation $\vec{K}$ on its essential domain, which we call “splitability”. We note that we do not know of any example of an analytic foliation which does not satisfy this property. This result demands the development of several new techniques, which can be seen as the generalization of the heart arguments from [11, 8].

In this paper, we focus instead in providing evidence that Step (II) can also be addressed in general, as we now explain:

1.5. **Application: Sard over strata.** By combining Theorem 1.1 with techniques of geometric control theory, we can prove that the Sard Conjecture holds true when restricted to horizontal paths whose abnormal lifts are confined to a single stratum of the stratification.

**Theorem 1.3 (Sard Property over strata).** Assume that both $M$ and $\Delta$ are real-analytic, and consider the notation introduced in Theorem 1.1. Given a stratum $S_\alpha$ and a point $x \in \pi(S_\alpha) \in M$, denote by $(S_\alpha)_x := S_\alpha \cap \pi^{-1}(x)$ the fiber of $\pi|_{S_\alpha}$ at $x$. Moreover, for every $\mathfrak{a} \in S_\alpha$ denote by $\mathcal{L}_\mathfrak{a} \subset S_\alpha$ the leaf of the foliation generated by $\vec{J}|_{S_\alpha}$ containing $\mathfrak{a}$. Then, for every $x \in \pi(S_\alpha)$, the set

$$ \mathrm{Abn}_{\alpha}(x) := \bigcup_{\mathfrak{a} \in (S_{\alpha})_x} \pi(\mathcal{L}_{\mathfrak{a}}) $$

has Lebesgue measure zero in $M$. More precisely, $\mathrm{Abn}_{\alpha}(x)$ is a countable nested union of subanalytic sets of codimension at least 1.

The proof of Theorem 1.3 is given in Section 5, where we actually prove a refinement of its statement, see Theorem 5.1. It establishes that the set of abnormal lifts, starting from the fiber in $\Delta^\perp$ above a given point of $M$, which remain in a given stratum $S_\alpha$, projects in $M$ onto a countable union of subanalytic sets of dimension strictly smaller than dim $M$, therefore implying that its Lebesgue measure is zero. As a consequence, the study of the Sard Conjecture needs to consider abnormal lifts having bifurcations points from one stratum to another.

1.6. **Application: Sussmann's regularity Theorem.** As a second application of Theorem 1.1, we recover the following result of Sussmann, proved in Section 6:

**Theorem 1.4 (Sussmann's regularity Theorem [36]).** Assume that $M$ and $\Delta$ are analytic and that $g$ is smooth (resp. analytic) (who is $g$?). Then any minimizing geodesic is smooth (resp. analytic) on an open dense subset of its interval of definition.

1.7. **Paper structure.** The paper is organized as follows: Several examples illustrating our results are presented in Section 2, including a discussion on Carnot groups; Section 3 gathers several results of importance for the rest of the paper; Sections 4 and 5 are devoted to the proofs of Theorems 1.1 and 1.3 respectively. The proof of the Sussmann regularity Theorem (Theorem 1.4) is given in Section 6. Finally, the first appendix completes the proofs of Section 2, Appendix B provides the proofs of all the results given in Section 3 and Appendix C provides the proof of Theorem 2.1 below.

**Acknowledgment:** The first author is supported by the project “Plan d'investissements France 2030”, IDEX UP ANR-18-IDEX-0001, and partially supported by the Agence Nationale de la Recherche (ANR), project ANR-22-CE40-0014.

## 2. EXAMPLES

We gather in this section several examples. Section 2.2 is concerned with rank 2 distributions, Section 2.3 provides an example of distribution in $\mathbb{R}^7$ whose distributions $\vec{K}, \vec{J}, \vec{I}$ given by Theorem 1.1 and Remark 1.2 do not coincide on non-essential strata, and Section 2.4 deals with the case of bracket generating polarized groups.
2.1. **Horizontal paths of minimal rank.** Note that in the case of distributions of corank 1, $\Delta^{\perp}$ can be seen as a graph (up to multiplication by a scalar) over $M$ and this allows one to “project” all objects from Theorem 1.1 to $M$. This observation captures the heuristic of why we can expect to visualize the singular horizontal paths with minimal ranks directly in $M$. Indeed, we have the following result which is valid for arbitrary distributions:

**Theorem 2.1 (Horizontal paths of minimal rank).** Assume that both $M$ and $\Delta$ are real-analytic. There exists a subanalytic open dense set $\mathcal{R}_0$ of $M$, a subanalytic Whitney stratification $\mathcal{R} = (\mathcal{R}_\alpha)$ of $M$ such that $\mathcal{R}_0$ is a union of strata, and a subanalytic distribution $\mathcal{H} \subset \Delta \subset TM$ compatible with $\mathcal{R}$ satisfying the following properties:

(0) **Compatibility with $S$.*** The projection of $S_0$ from Theorem 1.1 onto $M$ is a union of strata of $\mathcal{R}$; in particular, it contains $\mathcal{R}_0$.

(i) **Specification on strata.** For every stratum $\mathcal{R}_\alpha$ of $\mathcal{R}$ the distribution $\mathcal{H} \subset TM$ at a point $x \in M$ is given by

$$ \mathcal{H}(x) = \bigcap_{a=(x,p) \in \Delta^{\perp}} \pi_*(\ker(\omega_a^{\perp})) \cap T_x \mathcal{R}_\alpha. $$

(ii) **Integrability on the essential domain.** The distribution $\mathcal{H}$ is integrable when restricted to its essential domain $\mathcal{R}_0$.

(iii) **Minimal rank singular horizontal paths are horizontal paths of $\mathcal{H}$.** A curve $\gamma: [0, 1] \to M$ is a minimal rank singular horizontal path with respect to $\Delta$ if and only if it is horizontal with respect to $\mathcal{H}$.

(iv) **Ranks of $\mathcal{H}$.** For every stratum $\mathcal{R}_\alpha$ of $\mathcal{R}$, the distribution $\mathcal{H}|_{\mathcal{R}_\alpha}$ has rank $\le m-1$, and in addition, for every $x \in \mathcal{R}_0$, we have $\dim \mathcal{H}(x) \le m-2$.

We postpone the proof of this result to Appendix C. The Theorem is particularly useful when considering explicit examples, where it is often more convenient to work directly over $M$. This observation is at the root of our follow-up work [10] concerning the Sard Conjecture for generic co-rank 1 smooth distributions. In particular, a version of the above Theorem for smooth co-rank 1 distributions is given in [10, Theorem 2.1].

2.2. **Rank 2 distributions.** Given an analytic bracket generating distribution $\Delta$ of rank 2 on a real-analytic connected manifold $M$ of dimension $n \ge 3$, Theorem 1.1 gives a distribution $\vec{\mathcal{K}}$, adapted to a subanalytic stratification $\mathcal{S} = (\mathcal{S}_\alpha)$ of $\Delta^{\perp}$, which satisfies in particular properties (ii)-(iv). This shows that $\vec{\mathcal{K}}$ has rank 0 on its essential domain $\mathcal{S}_0$ and that its rank is 0 or 1 in all strata. Thus, each stratum $\mathcal{S}_\alpha$ is equipped with $\vec{\mathcal{K}}$, a line field or a field of rank 0 (as $\mathcal{S}_0$), and any abnormal lift is made of concatenations of one-dimensional orbits of $\vec{\mathcal{K}}|_{\mathcal{S}_\alpha}$. This result is well-known (see [27] and [34, Section 2.2]), it has been used recently for example in [5] to investigate the regularity properties of minimizing geodesics of rank 2 sub-Riemannian structures. Any rank 2 distribution $\Delta$ satisfies the Minimal Rank Sard Conjecture. In fact, Theorem 2.1 provides a subanalytic stratification $\mathcal{R}_\alpha$ along with a compatible subanalytic distribution $\mathcal{H}$ whose rank, by (iv), is 0 on the essential $\mathcal{R}_0$. Thus, all singular horizontal paths of minimal rank (w.r.t. $\Delta$) are contained in the union of all strata $\mathcal{R}_\alpha \ne \mathcal{R}_0$ which can be shown to coincide with the analytic set

$$ \Sigma = \{x \in M \mid [\Delta, \Delta](x) \subset \Delta(x)\}, $$

where $[\Delta, \Delta]$ is the (possibly singular) distribution given by

$$ [\Delta, \Delta](x) := \{[X, Y](x) \mid X, Y \text{ smooth local sections of } \Delta\} \quad \forall x \in M. $$

Note that in the special case when $\dim(M) = 3$, the stratification of $\Sigma$ by strata $\mathcal{R}_\alpha \ne \mathcal{R}_0$ is the one given in [8, Lemma 2.4] and all singular horizontal paths have minimal rank so that the Sard Conjecture holds true. The method presented in the present paper does not allow to prove the Sard Conjecture in higher dimension. For example, in the case $\dim(M) = 4$, abnormal lifts
of singular horizontal paths of rank 3 are contained in the union $\Gamma$ of strata $S_\alpha \neq S_0$. The set $\Gamma$ is an analytic set of dimension at most 5 which is invariant by dilation. The Sard Conjecture can be shown to hold true in the case where $\Gamma$ is a smooth manifold, following the methods developed in [11] and [10], see also [4], but remains open in the general case of a singular analytic set $\Gamma$.

2.3. **A counterexample to integrability on non-essential strata.** The aim of the following example is to show that in general the distributions $\vec{K}, \vec{J}, \vec{I}$ given by Theorem 1.1 and Remark 1.2 do not coincide and $\vec{K}$ is not integrable on non-essential strata. Consider in $\mathbb{R}^7$ with coordinates $(x_1, \dots, x_7)$ the rank 3 distribution $\Delta$ spanned by the vector fields

$$X^1 = \partial_1, \quad X^2 = \partial_2 + x_4 \partial_3, \quad X^3 = \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7.$$

We check easily that

$$X^{12} := [X^1, X^2] = 0, \quad X^{13} := [X^1, X^3] = -2x_1 \partial_5 - 3x_1^2 \partial_6 - 4x_1^3 \partial_7,$$

$$X^{23} := [X^2, X^3] = \partial_3, \quad X^{131} := [X^{13}, X^1] = -2 \partial_5 - 6x_1 \partial_6 - 12x_1^2 \partial_7,$$

$$X^{1311} := [X^{131}, X^1] = -6 \partial_6 - 24x_1 \partial_7 \quad \text{and} \quad X^{13111} := [X^{1311}, X^1] = -24 \partial_7,$$

which shows that $\Delta$ is bracket generating distribution on $\mathbb{R}^7$. The Hamiltonians $h^1, h^2, h^3$ associated with $X^1, X^2, X^3$ on $T^*\mathbb{R}^7$ with coordinates $(x, p = (p_1, \dots, p_7))$ are given by

$$h^1(x, p) = p_1, \quad h^2(x, p) = p_2 + x_4 p_3, \quad h^3(x, p) = p_4 + x_1^2 p_5 + x_1^3 p_6 + x_1^4 p_7.$$

Thus, the nonzero annihilator of $\Delta$ is given by

$$\Delta^{\perp} = \{p_1 = p_2 + x_4 p_3 = p_4 + x_1^2 p_5 + x_1^3 p_6 + x_1^4 p_7 = 0\} \setminus \{p=0\}$$

and the hamiltonian vector fields generating $\vec{\Delta} = \text{Span}\{\vec{h}^1, \vec{h}^2, \vec{h}^3\}$ verify

$$\vec{h}^1 = \partial_1, \quad \vec{h}^2 = \partial_2 + x_4 \partial_3 - p_3 \partial_4^p,$$

$$\vec{h}^3 = \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7 - (2x_1 p_5 + 3x_1^2 p_6 + 4x_1^3 p_7) \partial_1^p.$$

Note that the Hamiltonians $h^{12} := p \cdot X^{12}$, $h^{13} := p \cdot X^{13}$, $h^{23} := p \cdot X^{23}$ on $T^*\mathbb{R}^7$ are given by

$$h^{12}(x, p) = 0, \quad h^{13}(x, p) = -2x_1 p_5 - 3x_1^2 p_6 - 4x_1^3 p_7, \quad h^{23}(x, p) = p_3$$

and the set of points $(x, p) \in T^*\mathbb{R}^7$ where matrix $\mathcal{L}_{(x,p)}^2$ (see Proposition 3.5) has rank zero is equal to the set

$$\Sigma = \Delta^{\perp} \cap \{p_3 = x_1 (2p_5 + 3x_1 p_6 + 4x_1^2 p_7) = 0\}.$$

The essential domain is therefore given by $S_0 = \Delta^{\perp} \setminus \Sigma$, over which the kernel of $\mathcal{L}^2$ has dimension one. It induces a distribution $\vec{K}_0$ over $S_0$ which is generated by the vector field

$$\mathcal{Z} = h^{12} \vec{h}^3 + h^{31} \vec{h}^2 + h^{23} \vec{h}^1.$$

In order to fully illustrate Theorem 1.1, we consider a subdivision of $\Sigma$ in at least three strata given by

$$S_1 = \{x_1 = p_1 = p_2 = p_3 = p_4 = p_5 = 0, p \neq 0\},$$

$$S_2 = \{x_1 = p_1 = p_2 = p_3 = p_4 = 0, p_5 \neq 0\},$$

$$S_3 = \{x_1 \neq 0, p_1 = p_2 = p_3 = 0, p_4 = x_1^3 p_6 / 2 + x_1^4 p_7, p_5 = -3x_1 p_6 / 2 - 2x_1^2 p_7, p \neq 0\}.$$

Note indeed that a stratification with only two strata ($S_1 \cup S_2$) and $S_3$ does not satisfy Whitney's condition (a) and, therefore, would not illustrate Theorem 1.1. Furthermore, in order to get a stratification compatible with the symplectic form $\omega$ and the distribution $\vec{I}$ from Remark 1.2, it is necessary to consider a refinement of $S_3$ into two strata

$$S_3' = S_3 \cap \{p_6 \neq -8p_7x_1/3\} \quad \text{and} \quad S_4 = S_3 \cap \{p_6 = -8p_7x_1/3\}.$$
We can now compute the restrictions of $\vec{K}$, $\vec{J}$, $\vec{I}$ to $S_1, S_2, S'_3, S_4$ and check that they do not coincide in general. We have

$$
\begin{align*}
\vec{K}_{|S_1} &= \vec{\Delta} \cap TS_1 = \operatorname{Span}\{\partial_2 + x_4 \partial_3, \partial_4\} & \vec{K}_{|S_2} &= \vec{\Delta} \cap TS_2 = \operatorname{Span}\{\partial_2 + x_4 \partial_3, \partial_4\} \\
\vec{J}_{|S_1} &= \operatorname{Lie}(\vec{K}_{|S_1}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4\} & \vec{J}_{|S_2} &= \operatorname{Lie}(\vec{K}_{|S_2}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4\} \\
\vec{I}_{|S_1} &= \ker(\omega_{|S_1}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4, \partial_5\}, & \vec{I}_{|S_2} &= \ker(\omega_{|S_2}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4\},
\end{align*}
$$

$$
\vec{K}_{|S'_3} = \vec{\Delta} \cap TS'_3 = \operatorname{Span}\{\partial_2 + x_4 \partial_3, \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7\}
$$

$$
\vec{J}_{|S'_3} = \operatorname{Lie}(\vec{K}_{|S'_3}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7\}
$$

$$
\vec{I}_{|S'_3} = \ker(\omega_{|S'_3}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7\}
$$

$$
\vec{K}_{|S_4} = \vec{\Delta} \cap TS_4 = \operatorname{Span}\{\partial_2 + x_4 \partial_3, \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7\}
$$

$$
\text{and} \quad \vec{J}_{|S_4} = \operatorname{Lie}(\vec{K}_{|S_4}) = \operatorname{Span}\{\partial_2, \partial_3, \partial_4 + x_1^2 \partial_5 + x_1^3 \partial_6 + x_1^4 \partial_7\}
$$

$$
\dim(\vec{I}_{|S_4}) = \dim(\ker(\omega_{|S_4})) = 4,
$$

which yields

$$
\vec{K}_{|S_1} \subsetneq \vec{J}_{|S_1} \subsetneq \vec{I}_{|S_1}, \quad \vec{K}_{|S_2} \subsetneq \vec{J}_{|S_2} = \vec{I}_{|S_2}, \quad \vec{K}_{|S_3} \subsetneq \vec{J}_{|S_3} = \vec{I}_{|S_3}, \quad \vec{K}_{|S_4} \subsetneq \vec{J}_{|S_4} \subsetneq \vec{I}_{|S_4}.
$$

2.4. **Bracket generating polarized groups.** We focus in this section on bracket generating left-invariant distributions on real Lie groups which are important general examples for the present paper since any real Lie group admits a real-analytic structure (see e.g. [16, Section 1.6] or [37, Section 2.11]). Following [18, 24], we consider a *polarized group* $(\mathfrak{G}, V)$, which consists of a connected (real) Lie group $(\mathfrak{G}, \star)$ with Lie algebra $\mathfrak{g} = T_e\mathfrak{G}$ of dimension $n \ge 3$ and a linear subspace $V \subset \mathfrak{g}$ of dimension $m < n$, and we assume that $V$ is *bracket-generating* of step $s \ge 2$, which means that the sequence of linear subspaces $\{V^s\}_{s \in \mathbb{N}^*}$, defined by

$$
V^1 := V \quad \text{and} \quad V^{s+1} := [V, V^s] = \operatorname{Span}\{[v, w] \mid v \in V, w \in V^s\} \quad \forall s \in \mathbb{N}^*,
$$

satisfies

$$
(2.1) \qquad V^1 + \dots + V^{s-1} \subsetneq V^1 + \dots + V^s = \mathfrak{g}.
$$

We call such a polarized group a *bracket-generating polarized group of step s*. Then, denoting by $L_g : \mathfrak{G} \to \mathfrak{G}$ the left-translation by the element $g \in \mathfrak{G}$ (i.e. $L_g(g') = g \star g'$ for all $g' \in \mathfrak{G}$), we define the left-invariant distribution $\Delta$ on $\mathfrak{G}$ by

$$
\Delta(g) := d_e L_g(V) \quad \forall g \in \mathbb{G},
$$

which is bracket generating thanks to (2.1) and we use left-trivialization to identify $T^*\mathfrak{G}$ with $\mathfrak{G} \times \mathfrak{g}^*$ and push-forward various objects we can define on $T^*\mathfrak{G}$ to $\mathfrak{G} \times \mathfrak{g}^*$. We define the function $\Phi : T^*\mathfrak{G} \to \mathfrak{G} \times \mathfrak{g}^*$ by (it does not depend on the set of coordinates $(g, p)$)

$$
(2.2) \qquad \Phi(g, p) := (g, p \cdot d_e L_g) \quad \forall (g, p) \in T^*\mathbb{G}
$$

which is an analytic diffeomorphism sending the nonzero annihilator $\Delta^{\perp} \subset T^*\mathbb{G}$ to

$$
\Phi(\Delta^{\perp}) = \mathbb{G} \times V^{\perp}
$$

with

$$
V^{\perp} := \left\{ \mathfrak{p} \in \mathfrak{g}^* \setminus \{0\} \mid \mathfrak{p} \cdot v = 0, \forall v \in V \right\} \subset \mathfrak{g}^*,
$$

and we note that Theorem 1.1 in bracket generating polarized groups can indeed be written as
follows (our convention for the formula of Lie brackets is given at the beginning of Section 3.1):

**Theorem 2.2.** Let $(\mathfrak{G}, V)$ be a bracket generating polarized group of step $s \ge 2$, $m = \dim(V)$ and $\Delta$ be the bracket generating left-invariant distribution of rank $m$ generated by $V$ on $\mathfrak{G}$. There exist a subanalytic Whitney stratification $\mathcal{S} = (\mathcal{S}_\alpha)$ of $V^\perp$ and two subanalytic distributions

$$
\vec{\mathfrak{K}} \subset \vec{\mathfrak{J}} \subset T(\mathfrak{G} \times V^{\perp}) \simeq T\mathfrak{G} \times V^{\perp}
$$

adapted to the subanalytic Whitney stratification $\mathbb{G} \times \mathcal{S} = (\mathbb{G} \times \mathcal{S}_\alpha)$ of $\mathbb{G} \times V^\perp$ satisfying the
following properties:
(0) Compatibility with Theorem 1.1: The stratification $(S_\alpha)$ and distributions $\bar{\mathcal{K}} \subset \bar{\mathcal{J}}$ from Theorem 1.1 may be taken as $S_\alpha = \mathbb{G} \times \mathfrak{S}_\alpha$, $\bar{\mathcal{K}} = \bar{\mathcal{R}}$ and $\bar{\mathcal{J}} = \bar{\mathcal{J}}$. In particular, $\mathbb{G} \times \mathfrak{S}_\alpha$ is the essential domain of both distributions and conditions (i), (ii), (iii) and (iv) from Theorem 1.1 hold true.

(i) Specification on strata of $\bar{\mathcal{R}}$: For every stratum $\mathfrak{S}_\alpha$ of $\mathfrak{S}$, the distribution $\bar{\mathcal{R}} \subset T(\mathbb{G} \times V^\perp)$ at a point $(g, \mathfrak{p}) \in \mathbb{G} \times \mathfrak{S}_\alpha$ is given by

$$ \bar{\mathcal{R}}(g, \mathfrak{p}) := \left\{ \begin{pmatrix} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \right\} \cap T_{(g, \mathfrak{p})} (\mathbb{G} \times \mathfrak{S}_\alpha). $$

In particular, on each $\mathbb{G} \times \mathfrak{S}_\alpha$, $\bar{\mathcal{R}}, \bar{\mathcal{J}}$ have constant rank and $\bar{\mathcal{J}}$ is an integrable distribution.

Note that Theorem 1.3 is also valid in this context, so the Sard property is verified in each stratum $\mathbb{G} \times \mathfrak{S}_\alpha$. The proof of Theorem 2.2 is given in Section A.

Let $\gamma : [0, 1] \to \mathbb{G}$ be a singular horizontal path (with respect to $\Delta$) with minimal rank. Then, by Proposition 3.4, for every $\mathfrak{p} \in V^\perp$, there is a lift $\tilde{\mathfrak{p}} = (\gamma, \mathfrak{p}) : [0, 1] \to \mathbb{G} \times V^\perp$ such that $\tilde{\mathfrak{p}}(1) = (\gamma(1), \mathfrak{p}(1))$ and which is horizontal with respect to $\bar{\mathcal{R}}$, that is, such that we have

$$ (\dot{\gamma}(t), \dot{\mathfrak{p}}(t)) \in \bar{\mathcal{R}}(\gamma(t), \mathfrak{p}(t)) := \left\{ \begin{pmatrix} d_e L_{\gamma(t)}(v) \\ -\mathfrak{p}(t) \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \right\} \cap T_{(\gamma(t), \mathfrak{p}(t))} (\mathbb{G} \times \mathfrak{S}_\alpha) $$

for almost every $t \in [0, 1]$. By considering $n-m$ linearly independent forms $\mathfrak{p}^1, \dots, \mathfrak{p}^{n-m}$ in $V^\perp$ and the corresponding lifts $\tilde{\mathfrak{p}}^1 = (\gamma, \mathfrak{p}^1), \dots, \tilde{\mathfrak{p}}^{n-m} = (\gamma, \mathfrak{p}^{n-m}) : [0, 1] \to \mathbb{G} \times V^\perp$, we infer that, for almost every $t \in [0, 1]$, all $\tilde{\mathfrak{p}}^1, \dots, \tilde{\mathfrak{p}}^{n-m}$ admit a derivative at $t$ and the vector $v(t) \in V$ such that $\dot{\gamma}(t) = d_e L_{\gamma(t)}(v(t))$ satisfies

$$ \mathfrak{p}^j(t) \cdot [v(t), w] = 0 \quad \forall w \in V, \forall j = 1, \dots, n-m, $$

where $\mathfrak{p}^1(t), \dots, \mathfrak{p}^{n-m}(t)$ are linearly independent. Therefore, for almost every $t \in [0, 1]$, by considering all possible linear combinations of $\mathfrak{p}^1(t), \dots, \mathfrak{p}^{n-m}(t)$, we have

$$ v(t) \in \mathfrak{V} := \{ v \in V \mid \mathfrak{p}([v, w]) = 0, \forall w \in V, \forall \mathfrak{p} \in V^\perp \}, $$

where $\mathfrak{V}$ indeed coincides with the set of $v \in V$ such that $[v, w] \in V$ for all $w \in V$. We check easily that $\mathfrak{V}$ is linear and, thanks to the Jacobi identity, that it is a proper subalgebra of $\mathfrak{g}$. Thus, by considering the exponential map $\exp_{\mathfrak{g}} : \mathfrak{g} \to \mathbb{G}$, the set $\text{Abn}_{\Delta}^m(e)$ coincides with $\exp_{\mathfrak{g}}(\mathfrak{V})$ which is a proper subgroup of $\mathbb{G}$ and for every $g \in \mathbb{G}$ the set $\text{Abn}_{\Delta}^m(g)$ is the left-translation by $g$ of that set. In consequence, we have:

**Proposition 2.3.** Let $(\mathbb{G}, V)$ be a polarized group with $V$ nilpotent bracket-generating of step $s \ge 2$. Then the minimal rank Sard conjecture holds true.

Let us now consider the case of nilpotent bracket generating polarized groups of step 2, that is such that $V$ satisfies

$$ (2.3) \qquad V^1 \subsetneq V^1 + V^2 = \mathfrak{g} \quad \text{and} \quad V^3 = \{0\}. $$

Then, for every $(x, \mathfrak{p}) \in \mathbb{G} \times \mathfrak{g}^*$, we have

$$ (2.4) \qquad \bar{\mathcal{R}}(\mathfrak{a}) = \left\{ \begin{pmatrix} d_e L_x(v) \\ 0 \end{pmatrix} \middle| v \in V \right\} \cap T_{\mathfrak{a}} (\mathbb{G} \times \mathfrak{S}_\alpha), $$

because if for some $v \in V$, the linear form $q_v := \mathfrak{p} \cdot [v, \cdot]$ belongs to $V^\perp$, then we have $q_v(w) = 0$ for all $w \in V = V^1$ and we also have, by (2.3), for every $w \in V^2$, $q_v(w) = \mathfrak{p}([v, w]) = 0$ because $[v, w] \in V^3 = \{0\}$. Then, (2.4) shows that all abnormal lifts are constant in $\mathfrak{p}$, so they remain inside the same leaf (of the same stratum $\mathfrak{S}_\alpha$). Therefore, we can apply Theorem 1.3 to obtain:

**Proposition 2.4.** Let $(\mathbb{G}, V)$ be a polarized group with $V$ nilpotent bracket-generating of step 2. Then the Sard conjecture holds true.
This result corresponds to a weak version of [24, Theorem 1.2 (1)] which is stated in the case of Carnot groups. The result follows directly from Theorem 1.3 because all abnormal lifts are confined in a given stratum of the stratification of $\mathbb{G} \times V^{\perp}$, but this is not the case in general. A study of the bifurcation points allowing abnormal lifts moving from one stratum to another can certainly lead to other results. This strategy, which is at the core of the works on the strong Sard conjecture [11, 8], has been used successfully by Boarotto and Vittone [13] in Carnot groups. They showed that the Sard conjecture holds true for Carnot groups of rank 2 and step 4 and Carnot groups of rank 3 and step 3.

Another Sard type result has been obtained by Le Donne, Leonardi, Monti and Vittone [22, 23] (see also [24]). In the setting of Carnot groups, they have shown, by integrating the abnormal equation, that singular horizontal paths are indeed contained in a collection of algebraic varieties. Recently, moreover, Lerario, Rizzi and Tiberio have proved a quantitative version of the classical Sard theorem for polynomial mappings from a Hilbert space, and have applied their result to obtain quantitative version of the Sard Conjecture for Carnot groups [26].

These results and Theorem 2.2 are certainly very good tools to understand the nature of singular horizontal paths in polarized groups, but we do not know yet how they could be combined to settle the Sard Conjecture in Carnot groups.

### 3. PRELIMINARY RESULTS

We gather in this section preliminary results in differential geometry (Section 3.1), geometric control theory (Section 3.2), subanalytic geometry (Section 3.3) and on integrable families of 1-forms (Section 3.4). All proofs are postponed to Appendix B.

3.1. **Reminders of differential geometry.** Throughout this section, $M$ is a smooth connected manifold of dimension $n \ge 1$. We refer the reader to [15, 25, 29] for further details on the notions and results presented below and we point out that we follow the sign conventions used in [29].

3.1.1. Lie brackets. Given a smooth vector field $X$ on $M$ we write $X \cdot f$ or $X(f)$ for the Lie derivative of a smooth function $f: M \to \mathbb{R}$ with respect to $X$. Then, given two smooth vector fields $X, Y$ on $M$ we define their Lie bracket as the vector field uniquely associated with the derivation $Y \circ X - X \circ Y$, which means that, if in a local set of coordinates $(x_1, \dots, x_n)$ in $M$, the vectors fields $X, Y$ are given by

$$X = \sum_{i=1}^{n} a_i \partial_{x_i}, \quad Y = \sum_{i=1}^{n} b_i \partial_{x_i},$$

where $a_1, \dots, a_n, b_1, \dots, b_n$ are smooth scalar functions, then the Lie bracket $[X, Y]$ is the smooth vector field defined as

$$[X, Y] = \sum_{i=1}^{n} c_i \partial_{x_i},$$

where $c_1, \dots, c_n$ are the smooth scalar functions given by

$$c_i = \sum_{j=1}^{n} (\partial_{x_j} a_i) b_j - (\partial_{x_j} b_i) a_j \quad \forall i = 1, \dots, n.$$

3.1.2. Symplectic structure of the cotangent bundle. We equip the cotangent bundle $T^*M$ of $M$ with the canonical symplectic form $\omega$ defined as $\omega = -d\lambda$ where $\lambda$ is the canonical Liouville form. This means that if we have a local chart $(x, p)$ of $T^*M$ valued in $\mathbb{R}^n \times (\mathbb{R}^n)^*$ with coordinates $(x_1, \dots, x_n, p_1, \dots, p_n)$, then $\lambda, \omega$ read

$$\lambda = \sum_{i=1}^{n} p_i \, dx_i \quad \text{and} \quad \omega = \sum_{i=1}^{n} dx_i \wedge dp_i,$$
where the latter amounts to say that we have in local coordinates at $\mathfrak{a} \in T^*M$,

$$ \omega_{\mathfrak{a}}(\zeta, \zeta') = \sum_{i=1}^{n} (\xi_j \eta'_j - \xi'_j \eta_j) \quad \forall \zeta = (\xi, \eta), \zeta' = (\xi', \eta') \in T_{\mathfrak{a}}(T^*M). $$

In the paper, we generally denote by $\mathfrak{a}$ an element of $T^*M$ and we may write $\mathfrak{a} = (x, p)$ and $\zeta = (\xi, \eta)$ any element respectively of $T^*M$ and $T_{\mathfrak{a}}(T^*M)$ in local coordinates.

### 3.1.3. Hamiltonian vector fields and Poisson brackets.
Given a smooth function, called Hamiltonian, $h: T^*M \to \mathbb{R}$ the Hamiltonian vector field associated with it with respect to $\omega$ is the unique smooth vector field $\vec{h}$ on $T^*M$ satisfying

$$ \iota_{\vec{h}} \omega = dh, $$

which in a set of local coordinates $(x, p)$ in $T^*M$ where $\omega = \sum_{i=1}^{n} dx_i \wedge dp_i$ reads

$$ \vec{h}(x, p) = \left( \frac{\partial h}{\partial p}(x, p), -\frac{\partial h}{\partial x}(x, p) \right). $$

By construction, $\vec{h} \cdot h = dh(\vec{h}) = \omega(\vec{h}, \vec{h}) = 0$, so $h$ is a first integral of $\vec{h}$ or in other words $h$ is constant along the orbits of $\vec{h}$. Given two smooth Hamiltonians $h, h' : T^*M \to \mathbb{R}$, their Poisson bracket is the smooth Hamiltonian $\{h, h'\}$ defined by

$$ \{h, h'\} := \omega(\vec{h}, \vec{h}'), $$

it satisfies by construction

$$ (3.1) \qquad \vec{h}' \cdot h = dh(\vec{h}') = \omega(\vec{h}, \vec{h}') = \{h, h'\}. $$

If $X$ is a given smooth vector field on $M$, then the smooth Hamiltonian $h^X : T^*M \to \mathbb{R}$ associated with $X$ on $T^*M$ is defined by

$$ h^X(x, p) := p \cdot X(x) $$

in a set of local coordinates $(x, p)$ in $T^*M$ and the associated Hamiltonian vector field is given by

$$ \vec{h}^X(x, p) = \left( \frac{\partial h^X}{\partial p}(x, p), -\frac{\partial h^X}{\partial x}(x, p) \right) = (X(x), -p \cdot d_x X). $$

Thus, if $X$ and $Y$ smooth vector field on $M$, then we have

$$ h^{[X,Y]} = \vec{h}^Y \cdot h^X, $$

which by (3.1) allows to relate the Poisson and Lie brackets as follows:

**Proposition 3.1.** If $X$ and $Y$ are two smooth vector field on $M$, then we have

$$ \{h^X, h^Y\} = h^{[X,Y]}. $$

### 3.1.4. Isotropic spaces and submanifolds.
For every $\mathfrak{a} \in T^*M$ and every vector space $W \subset T_{\mathfrak{a}}(T^*M)$, we denote by $W^\omega$ the symplectic complement of $W$,

$$ W^\omega := \{ \zeta \in T_{\mathfrak{a}}(T^*M) \mid \omega_{\mathfrak{a}}(\zeta, \zeta') = 0, \forall \zeta' \in W \}, $$

and we call $W$ isotropic if $W \subset W^\omega$. If $S$ is a smooth submanifold of $T^*M$, we denote by $\omega|_S$ the 2-form given by the restriction of $\omega$ to $S$, its kernel at $\mathfrak{a} \in S$ given by

$$ \ker (\omega|_S)_{\mathfrak{a}} = \{ \zeta \in T_{\mathfrak{a}}S \mid \omega_{\mathfrak{a}}(\zeta, \zeta') = 0, \forall \zeta' \in T_{\mathfrak{a}}S \} = (T_{\mathfrak{a}}S)^\omega \cap T_{\mathfrak{a}}S, $$

is an isotropic space.

Even though the following result is not used in the present paper, it is important in our proof of [10, Theorem 1.1]. Its proof is given in Appendix B.1:
**Proposition 3.2.** Let $S$ be a smooth submanifold of $T^*M$ of dimension $s$, $a \in S$, $E \subset T_aS$ a vector space such that

$$ (3.2) \qquad T_aS = E \oplus \ker (\omega|_S)_a, $$

and let $r := \dim \ker(\omega|_S)_a$, then the following properties hold:

(i) $r \le \min\{2n-s, s\}$ and $s-r = 2l$ for some integer $l$.

(ii) The form $(\omega^l|_S)_a$ is a volume form over $E$, which means that there is a basis $\{\zeta_1, \zeta'_1, \dots, \zeta_l, \zeta'_l\}$ of $E$ such that $\omega^l_a(\zeta_1, \zeta'_1, \dots, \zeta_l, \zeta'_l) \ne 0$.

(iii) $(\omega^l|_S)_a = 0$.

Finally, we say that a smooth submanifold $S$ of $T^*M$ is isotropic if all its tangent spaces are isotropic.

**3.1.5. Foliations.** Let $N$ be a smooth manifold of dimension $n \ge 1$, a smooth foliation $\mathcal{F}$ on $N$ of dimension $d \ge 1$ is a smooth atlas $\{(U_\beta, \varphi_\beta)\}_\beta$ satisfying the following properties:

(i) For every $\beta$, there are open disks $V_\beta^d \subset \mathbb{R}^d$ and $V_\beta^{n-d} \subset \mathbb{R}^{n-d}$ such that the map $\varphi_\beta: U_\beta \to V_\beta^d \times V_\beta^{n-d}$ is a smooth diffeomorphism.

(ii) For every $\beta, \beta'$ with $U_\beta \cap U_{\beta'} \ne \emptyset$, the change of coordinates

$$ \varphi_{\beta'} \circ \varphi_{\beta}^{-1} : \varphi_{\beta}(U_{\beta} \cap U_{\beta'}) \to \varphi_{\beta'}(U_{\beta} \cap U_{\beta'}) $$

preserves the leaves, which means that it has the form

$$ (\varphi_{\beta'} \circ \varphi_{\beta}^{-1})(x, y) = (h_1(x, y), h_2(y)) \quad \forall (x, y) \in \varphi_{\beta}(U_{\beta} \cap U_{\beta'}), $$

for some smooth functions $h_1, h_2$.

A chart $(U_\beta, \varphi_\beta)$ is called a *foliation chart* and any set of the form $\varphi_\beta^{-1}(V_\beta^d \times \{y\})$ with $y \in V_\beta^{n-d}$ is called a *plaque* of the foliation. Then, we can define an equivalence relation on $N$ by saying that two points $z, z'$ are equivalent if they can be connected by a path of plaques $P_1, \dots, P_k$ such that $P_j \cap P_{j+1} \ne \emptyset$ for all $j \in \{1, \dots, k-1\}$. Therefore, $N$ can be partitioned into equivalent classes, called *leaves*, each of which having the structure of an injectively immersed smooth submanifold of $N$ of dimension $d$. Smooth foliations are indeed in one-to-one correspondence with involutive smooth distributions. Recall that a smooth regular distribution $D$ on $N$, that is, a distribution of constant rank parametrized locally by smooth vector fields, is called *involutive* if given two smooth vector fields $X, Y$ such that $X(z), Y(z) \in D(z)$ for all $z \in N$, then $[X, Y](z) \in D(z)$ for all $z \in N$. On the one hand, the field of vector spaces corresponding to the tangent spaces to the leaves of a smooth foliation $\mathcal{F}$ forms an involutive distribution, and on the other hand, the Frobenius Theorem asserts that any involutive smooth distribution is *integrable*, which means that it can be viewed as the tangent plane field of a smooth foliation. If a foliation chart $(U_\beta, \varphi_\beta)$ as above is given then the local distribution associated with the foliation is given by the pull-back of the horizontal constant distribution $\mathbb{R}^d \times \{0\}$ in $V_\beta^d \times V_\beta^{n-d}$.

As the next result shows, the kernel of the restriction of a symplectic form to a submanifold gives rise to isotropic foliations.

**Proposition 3.3.** Let $S$ be a smooth submanifold of $T^*M$ such that the dimension of $\ker(\omega|_S) \subset TS$ is constant. Then the smooth distribution

$$ \vec{\mathcal{I}}(a) := \ker (\omega|_S)_a \quad \forall a \in S, $$

is integrable with isotropic leaves.

The proof of Proposition 3.3 is postponed to Appendix B.2.
3.2. Singular horizontal paths and abnormal lifts. Throughout this section, $M$ is a smooth connected manifold of dimension $n \ge 3$ equipped with a bracket generating distribution $\Delta$ of constant rank $m \le n$. Let us consider a family of smooth vector fields $X^1, \dots, X^k$ with $m \le k \le m(n+1)$ (see [33, 35]) providing a global parametrization of $\Delta$ over $M$, that is, satisfying

$$ \Delta(x) = \operatorname{Span}\{X^1(x), \dots, X^k(x)\} \quad \forall x \in M. $$

Then, define the distribution $\vec{\Delta}$ on $T^*M$ by

$$ \vec{\Delta}(\mathfrak{a}) := \{\vec{h}^1(\mathfrak{a}), \dots, \vec{h}^k(\mathfrak{a})\} \quad \forall \mathfrak{a} \in T^*M, $$

where for every $i = 1, \dots, k$, $h^i$ stands for the Hamiltonian $h^{X^i} : T^*M \to \mathbb{R}$ associated with $X^i$. By construction, $\vec{\Delta}$ is a smooth distribution of rank $m$ which projects onto $\Delta$, that is, such that $\pi_*(\vec{\Delta}) = \Delta$ where $\pi : T^*M \to M$ is the canonical projection. In order to give several characterizations of the notion of singular horizontal path, it is useful to identify the horizontal paths with the trajectories of a control system and to define the so-called end-point mapping. It is important to note that all results presented below are classical, we refer the reader to [1, 30, 33] for further details.

3.2.1. The End-Point mapping. For every $x \in M$, there is a non-empty maximal open set $\mathcal{U}^x \subset L^2([0, 1], \mathbb{R}^k)$ such that for every control $u = (u_1, \dots, u_k) \in \mathcal{U}^x$, the solution $x(\cdot; x, u) : [0, 1] \to M$ to the Cauchy problem

$$ (3.3) \qquad \dot{x}(t) = \sum_{i=1}^{k} u_i(t) X^i(x(t)) \quad \text{for a.e. } t \in [0, 1] \quad \text{and} \quad x(0) = x $$

is well-defined. By construction, for every $x \in M$ and every control $u \in \mathcal{U}^x$ the trajectory $x(\cdot; x, u)$ is an horizontal path in $\Omega_{\Delta}^x$, the set of horizontal paths $\gamma : [0, 1] \to M$ in $W^{1,2}([0, 1], M)$ with $\gamma(0) = x$. Moreover, the converse is true, any $\gamma \in \Omega_{\Delta}^x$ can be written as the solution of (3.3) for some $u \in \mathcal{U}^x$. Of course, since in general the vector fields $X^1, \dots, X^k$ are not linearly independent globally on $M$, the control $u$ such that $\gamma = x(\cdot; x, u)$ is not necessarily unique. For every point $x \in M$, the *End-Point Mapping* from $x$ (associated with $X^1, \dots, X^k$ in time 1) is defined as

$$ \begin{aligned} E^x : \mathcal{U}^x &\longrightarrow M \\ u &\longmapsto x(1; x, u). \end{aligned} $$

It shares the same regularity as the vector fields $X^1, \dots, X^k$, it is of class $C^\infty$. Given $x \in M$ and $u \in \mathcal{U}^x \subset L^2([0, 1], \mathbb{R}^k)$, we define the *rank* of $u$ with respect to $E^x$ by

$$ \operatorname{rank}(u) := \dim (\operatorname{Im}(d_u E^x)), $$

where $\operatorname{Im}(d_u E^x)$ denotes the image of the differential of $E^x$ at $u$

$$ d_u E^x : L^2([0, 1], \mathbb{R}^k) \to T_{E^x(u)} M. $$

It can be shown that for every $u \in \mathcal{U}^x$, one has (see [33, Proposition 1.10 p. 19])

$$ (3.4) \qquad \Delta(E^x(u)) \subset \operatorname{Im}(d_u E^x), $$

in such a way that $\operatorname{rank}(u) \ge m$ for all $u \in \mathcal{U}^x$. Then, we define the *rank* of a horizontal path $\gamma \in \Omega_{\Delta}^x$, denoted by $\operatorname{rank}^{\Delta}(\gamma)$, as the rank of any control $u \in \mathcal{U}^x$ such that $\gamma = x(\cdot; x, u)$, and the *corank* of $\gamma$ (with respect to $\Delta$) by $\operatorname{corank}^{\Delta}(\gamma) := n - \operatorname{rank}^{\Delta}(\gamma)$. As we shall see with two characterizations given in Proposition 3.4, the rank defined in this way does not depend neither on the control $u$ satisfying $\gamma = x(\cdot; x, u)$ nor on the family $X^1, \dots, X^k$ used to parametrize $\Delta$. A horizontal path $\gamma : [0, 1] \to M$ is said to be *singular* if its rank is strictly less than $n$ and it is said to be *minimal rank* if $\operatorname{rank}^{\Delta}(\gamma) = m$.
3.2.2. Characterizations of singular horizontal paths. Recall that $\Delta^{\perp}$ denotes the smooth sub-manifold of $T^*M$ of codimension $m$ given by the set of non-zero annihilators of $\Delta$ in $T^*M$. The following result provides several characterizations of singular curves such as Hsu's characterization used in the introduction of the paper, its proof is recalled in Appendix B.3:

**Proposition 3.4.** Let $\gamma : [0, 1] \to M$ be an absolutely continuous curve which is horizontal with respect to $\Delta$, let $u \in U^x$, with $x := \gamma(0)$, be such that $\gamma = x(\cdot; x, u)$, and let $p \in T_y^*M \setminus \{0\}$, with $y := \gamma(1)$, be fixed. Then the following properties are equivalent:

(i) $p \in (\mathrm{Im}(d_u E^x))^{\perp}$.

(ii) There is an absolutely continuous curve $\psi : [0, 1] \to \Delta^{\perp}$ which is horizontal with respect to $\bar{\Delta}$ such that $\pi(\psi) = \gamma$ and $\psi(1) = (y, p)$.

(iii) There is an abnormal lift $\psi : [0, 1] \to \Delta^{\perp}$ of $\gamma$ with $\psi(1) = (y, p)$, that is, an absolutely continuous curve $\psi : [0, 1] \to \Delta^{\perp}$ with $\psi(1) = (y, p)$ such that $\pi(\psi) = \gamma$ and $\dot{\psi}(t) \in \ker(\omega_{\psi(t)}^{\perp})$ for almost every $t \in [0, 1]$.

In particular, $\mathrm{rank}^{\Delta}(\gamma) \in [m, n]$ and $\gamma$ is singular ($\mathrm{rank}^{\Delta}(\gamma) < n$) if and only if it admits an abnormal lift. Moreover, any absolutely continuous curve $\psi : [0, 1] \to \Delta^{\perp}$ satisfying the property of (iii) is an abnormal lift and if $\gamma$ has minimal rank ($\mathrm{rank}^{\Delta}(\gamma) = m$) then for each $p \in (\Delta^{\perp})_x := \Delta^{\perp} \cap \pi^{-1}(x)$ there is an abnormal lift $\psi : [0, 1] \to \Delta^{\perp}$ of $\gamma$ such that $\psi(1) = (y, p)$.

The part of Proposition 3.4 establishing that abnormal lifts of a given horizontal path do coincide with lifts which are tangent to $\bar{\Delta}$ in $\Delta^{\perp}$ is a consequence of the following equality

$$ (3.5) \qquad \ker(\omega_{\mathfrak{a}}^{\perp}) = (T_{\mathfrak{a}}\Delta^{\perp})^{\omega} \cap T_{\mathfrak{a}}\Delta^{\perp} = \bar{\Delta}(\mathfrak{a}) \cap T_{\mathfrak{a}}\Delta^{\perp} \quad \forall \mathfrak{a} \in \Delta^{\perp}. $$

This approach allows also to relate the kernel of $\omega^{\perp}$ to the kernel of some linear operator defined from Poisson brackets of length two. Assume now that, in an open neighborhood $\mathcal{V}$ of some $x \in M$, $\Delta$ is generated by $m$ smooth vector fields $X^1, \dots, X^m$. Then, set $h^i := h^{X^i}$ for all $i = 1, \dots, m$ and define the Hamiltonians $h^{ij}$ with $i, j \in \{1, \dots, m\}$ by

$$ h^{ij} := \{h^i, h^j\}, $$

which by (3.1) and Proposition 3.1 satisfy

$$ (3.6) \qquad h^{ij} = \bar{h}^j \cdot h^i = h^{[X^i, X^j]}. $$

We have the following result whose proof is given in Appendix B.4:

**Proposition 3.5.** For every $\mathfrak{a} \in T^*\mathcal{V} \cap \Delta^{\perp}$, define $\mathcal{L}_{\mathfrak{a}}^2 : \bar{\Delta}(\mathfrak{a}) \to \mathbb{R}^m$ by

$$ (\mathcal{L}_{\mathfrak{a}}^2(\zeta))_i := \sum_{j=1}^{m} u_j h^{ij}(\mathfrak{a}) \quad \forall \zeta = \sum_{i=1}^{m} u_i \bar{h}^i(\mathfrak{a}) \in \bar{\Delta}(\mathfrak{a}), \forall i = 1, \dots, m. $$

Then, for every $\mathfrak{a} \in T^*\mathcal{V} \cap \Delta^{\perp}$, we have $\ker(\mathcal{L}_{\mathfrak{a}}^2) = \ker(\omega_{\mathfrak{a}}^{\perp})$.

Finally, Propositions 3.4 and 3.5 allow us to show that singular horizontal paths with minimal rank are constrained to be tangent to a (singular) distribution on $M$. Recalling that $\pi : T^*M \to M$ stands for the canonical projection and that $\Delta_x^{\perp} := T_x^*M \cap \Delta^{\perp}$ denotes the fiber in $\Delta^{\perp}$ over some $x \in M$, we have:

**Proposition 3.6.** Let $\gamma : [0, 1] \to M$ be a singular horizontal path with respect to $\Delta$. Then $\gamma$ has minimal rank if and only if

$$ (3.7) \qquad \dot{\gamma}(t) \in \bigcap_{\mathfrak{a} \in \Delta_{\gamma(t)}^{\perp}} \pi_* (\ker(\omega_{\mathfrak{a}}^{\perp})) \quad \text{for a.e. } t \in [0, 1]. $$

The proof of the above result is given in Appendix B.5.
**Remark 3.7.** In this section we have restricted our attention to horizontal paths defined on $[0, 1]$ but this definition can be extended to paths defined on any interval (with positive length). A curve $\gamma: [a, b] \to M$, with $a < b$, which is absolutely continuous with derivative in $L^2$, is said to be horizontal if it has a parametrization on $[0, 1]$ which is an horizontal path. Then, we can define its rank as the rank of this parametrization. We can show that both definitions do not depend of the parametrization, see e.g. [33].

**3.3. Reminders of subanalytic geometry.** We recall the main notions of subanalytic geometry used in this paper. We refer the reader to [12, 19, 28] for further details. Throughout this section, $N$ stands for a real-analytic connected manifold of dimension $n$. Later on, $N$ will stand for one of the following three manifolds: $M$, $T^*M$ or $\Delta^\perp$.

**3.3.1. Subanalytic sets.** Let $d$ be a nonnegative integer. An analytic submanifold $S$ of dimension $d$ of $N$ is an embedded submanifold such that for every point $p \in S$ there are a neighborhood $U \subset N$ and $n-d$ analytic functions $f_1, \dots, f_{n-d}: U \to \mathbb{R}$ with the property that $df_1, \dots, df_{n-d}$ are linearly independent over $U$ and $S \cap U$ is the set of points where all the $f_i$ vanish. A set $X \subset N$ is said to be analytic if for every $x \in N$ there is an open neighborhood $U$ of $x$ in $N$, and a real-analytic function $f: U \to \mathbb{R}$ such that $X \cap U = \{f=0\}$. Note that every closed analytic submanifold is an analytic set locally given by $\{f_1^2 + \dots + f_{n-d}^2 = 0\}$. Similarly, a set $X \subset N$ is said to be semianalytic if for every $x \in N$, there is an open neighborhood $U$ of $x$ in $N$ and a finite number of real-analytic functions $f_i: U \to \mathbb{R}$ and $g_{ij}: U \to \mathbb{R}$ with $j=1, \dots, b_i$ and $i=1, \dots, a$ such that

$$X \cap U = \bigcup_{i=1}^{a} \{y \in U; f_i(y) = 0; g_{i1}(y) > 0, \dots, g_{ib_i}(y) > 0\}.$$

It is worth noting that an analytic submanifold $S$ is not necessarily a semianalytic set, unless $S$ is closed. By definition, the class of semianalytic sets is closed by the operations of locally finite unions, locally finite intersections, and taking the complement. Moreover, it can be shown that it is also stable by closure (the closure of a semianalytic set is semianalytic) and connected component (each connected component of a semianalytic set is semianalytic). However the image of a semianalytic set by an analytic map, even a proper one, is not necessarily semianalytic.

A set $X \subset N$ is called subanalytic if for every $x \in N$, there is an open neighborhood $U$ of $x$ in $N$ and a relatively compact semianalytic set $Y \subset N \times \mathbb{R}^k$ (where $k$ may depend on $x$) such that $X \cap U$ is the image of $Y$ by the canonical projection $N \times \mathbb{R}^k \to N$. The class of subanalytic sets is closed by the operations of locally finite unions, locally finite intersections and taking the complement (by a theorem of Gabrielov), and stable by closure and connected component. Moreover, the image of a relatively compact subanalytic set by an analytic map is subanalytic.

**3.3.2. Whitney's stratification and uniformization.** We recall here two important techniques of subanalytic geometry which are used in the paper: Whitney subanalytic stratification and the uniformization Theorem. We refer the reader to [17, 12] for a complete introduction on these two techniques.

Let $N$ be a smooth manifold and $Z$ be a closed subset of $N$. We call Whitney stratification of $Z$ any partition $S = (S_\alpha)$ of $Z$ into locally closed smooth submanifolds $S_\alpha$, called strata of $S$, that is,

$$Z = \bigcup_{S_\alpha \in S} S_\alpha,$$

such that the following properties are satisfied:

(1) The family $S$ is locally finite.

(2) If $S \in S$ then the closure $\bar{S}$ of $S$ is the union of those strata that intersect $\bar{S}$.

(3) If $S, T$ are strata with $T \neq S$ and $T \subset \bar{S}$, then $\dim(T) < \dim(S)$.

(4) Let $S, T$ be two strata with $T \neq S$ and $T \subset \bar{S}$, let $\{x_k\}_k \in S$ and $\{y_k\}_k \in T$ be sequences of points converging to a point $y \in T$:
(Whitney condition a) If the tangent spaces $T_{x_k}S$ converge to a vector subspace $\tau \subset T_yN$, then $T_yT \subset \tau$.

(Whitney condition b) If, moreover, the secant lines $\ell_k = (x_k y_k)$, with respect to some local coordinate system on $N$, converge to a line $\ell \subset T_yN$, then $\ell \subset \tau$.

A stratification $S$ is said to be compatible with a family $\mathcal{A}$ of subsets of $N$ if every $A \in \mathcal{A}$ is a union of strata of $S$. A stratification $S'$ is a refinement of $S$ if it is compatible with all strata of $S$. A Whitney analytic stratification, or simply analytic stratification, is a stratification whose strata are connected real-analytic submanifolds. A Whitney subanalytic stratification of $N$ is an analytic stratification $S$ such that all the strata of $S$ are subanalytic. We start by noting that all subanalytic sets admit a subanalytic Whitney stratification:

**Theorem 3.8 (Whitney subanalytic stratification).** Let $N$ be a real-analytic manifold and $\mathcal{A}$ be a locally finite collection of subanalytic sets of $N$. Then there exists a Whitney subanalytic stratification of $N$ compatible with $\mathcal{A}$.

Now, given a subanalytic set $X \subset N$ and a subanalytic stratification $S = (S_\alpha)$ of $X$, the dimension of $X$ is defined as the highest dimension of strata $S \in S$. Now that we have defined the notion of dimension, we can present the uniformization Theorem:

**Theorem 3.9 (Uniformization).** Let $N$ be an analytic manifold and $X$ be a closed subanalytic subset of $N$. Then there exists an analytic manifold $W$ of the same dimension as $X$ and a proper analytic map $\Phi: W \to N$ such that $\Phi(W) = X$.

3.3.3. Subanalytic distributions and foliations. A distribution $\Delta$ of $N$ is said to be subanalytic if its graph in $TN$ is a subanalytic set. As stated in the introduction, the dimension of the vector space $\Delta(x) = \Delta \cap T_x N$ is called the rank of $\Delta$ at $x$.

Given a subanalytic stratification $S = (S_\alpha)_\alpha$ of $N$, we say that $\Delta$ is compatible with $S$, or that $S$ is compatible with $\Delta$, if for every stratum $S_\alpha$, the rank of $\Delta$ is constant along $S_\alpha$ and $\Delta \cap TS_\alpha$ is an analytic vector-bundle over $S_\alpha$. The following result, whose proof is postponed to Appendix §B.6, shows that for every subanalytic distribution $\Delta$, there exists a subanalytic stratification $S$ which is compatible with $\Delta$.

**Proposition 3.10.** Let $\Delta \subset TN$ be a closed subanalytic distribution. There exists a subanalytic Whitney stratification $S = (S_\alpha)$ of $N$ such that:

(i) the rank of $\Delta$ is constant along $S_\alpha$;

(ii) $\Delta \cap TS_\alpha$ is an analytic vector-bundle over $S_\alpha$ for each $\alpha$.

Furthermore, if $S'$ is a subanalytic stratification of $N$, then $S$ can be chosen as a refinement of $S'$.

Suppose that $\Delta$ is compatible with a Whitney stratification $S$. We say that $\Delta$ is integrable at $x \in N$ if the Lie-bracket closure of $\Delta \cap TS_\alpha$ at $x$, where $x \in S_\alpha$, is equal to $\Delta \cap TS_\alpha$. Then, we say that $\Delta$ is integrable if it is integrable at every point. Now, recall that a smooth integrable distribution $\Delta$ of constant rank generates a smooth foliation $\mathcal{F}$, see §§3.1. If $\Delta$ is integrable and subanalytic, then we say that the induced foliation $\mathcal{F} = (\mathcal{F}_\alpha)$ is a subanalytic foliation.

3.4. **Integrable families of 1-forms.** We recall here the main notions of analytic geometry, in particular of Pfaffian systems, used in this work. We start with the case of families of 1-forms on an open and connected set $U \subset \mathbb{R}^n$. Let $\Omega = \{\omega_1, \dots, \omega_t\}$ be a family of analytic 1-forms on $U$, that is, such that each $\omega_k$ ($k = 1, \dots, t$) has the form

$$ \omega_k = a_{k,1}(x)dx_1 + \dots + a_{k,n}(x)dx_n \quad \forall k = 1, \dots, t, $$

for some analytic functions $a_{k,1}, \dots, a_{k,n}$ on $U$. Consider the analytic distribution $\mathcal{K}_\Omega$ given by

$$ \mathcal{K}_\Omega(x) := \bigcap_{k=1}^{t} \ker ((\omega_k)_x) \quad \forall x \in U $$
and denote by $r$ its generic corank and by $\Sigma \subset U$ the analytic set, called singular set of $\Omega$, of points where the corank of $K_\Omega$ is strictly smaller than $r$. Then, we say that $\Omega$ is integrable if there holds

$$d\omega_k \in \Omega \wedge \Omega_U^1 \quad k = 1, \dots, t,$$

where $\Omega_U^1$ stands for the module of analytic 1-forms defined on $U$. It follows from Frobenius Theorem, see e.g. [31, Th.2.9.11], that if $\Omega$ is integrable, then $K_\Omega$ is integrable distribution over $U \setminus \Sigma$ and generates an analytic foliation $\mathcal{F}_{U\setminus\Sigma}$ (as we will see in Remark 3.11 below, $\Omega$ actually generates a subanalytic foliation). Then, we consider the dual of $\Omega$, that is, the set of analytic vector fields $X$ on $U$ satisfying

$$\iota_X \omega_k \equiv 0 \quad \forall k = 1, \dots, t.$$

By construction, this collection of vector fields $\Omega^*$ generates a module of analytic vector fields and moreover, outside of $\Sigma$, the analytic distribution generated by $\Omega^*$ is equal to $K_\Omega$ (although this might not be true over $\Sigma$).

The above definitions can be made global over an analytic manifold $N$ via sheaves. Denoting by $O_N$ the sheaf of analytic functions over $N$ and by $\Omega_N^1$ the sheaf of analytic 1-forms over $N$, we can consider sub-sheaves $\Omega \subset \Omega_N^1$ of finite type, that is, locally generated by a finite family of analytic 1-forms as above, and extend all above notions to this setting.

Given an analytic map $f: Z \to N$, where $Z$ is an analytic manifold, the differential of $f$ induces a natural map between forms

$$f^* : \begin{array}{ccc} \Omega_N^1 & \to & \Omega_Z^1 \\ \alpha & \mapsto & f^*\alpha, \end{array}$$

where $f^*\alpha_x(X) = \alpha_{f(x)}(df \cdot X)$ for all point $x \in Z$ and all vector field germ $X \in \text{Der}_{Z,x}$. The pull-back $f^*\Omega$ of $\Omega$ is the sub-sheaf of $\Omega_Z^1$ generated by the image of $f^*(\Omega)$.

**Remark 3.11.** Of particular importance is the case that $Z$ is a submanifold of $N$ and $f$ is the embedding. If $\Omega$ is integrable, then so is $f^*(\Omega)$ since

$$df^*(\omega) = f^*(d\omega) \in f^*(\Omega \wedge \Omega_N^1) \subset f^*(\Omega) \wedge \Omega_Z^1.$$

The generic corank of $f^*(\Omega)$ is always smaller than or equal to the generic corank of $\Omega$. Therefore, given an integrable sheaf of 1-forms $\Omega$ and a Whitney stratification $S$ compatible with the distribution $K_{|\Omega}$, then $K_{|\Omega}$ yields a subanalytic foliation $(\mathcal{F}_\alpha)$.

**Example 3.12.** Let $M = U \subset \mathbb{R}^n$ be an open ball and $\Delta$ be an analytic bracket generating distribution of constant rank $m$. Apart from shrinking $U$, we may suppose that $\bar{\Delta} \subset T(T^*M)$ is locally generated by analytic Hamiltonian vector fields $\{\vec{h}^1, \dots, \vec{h}^m\}$, cf. §§3.2. We may assume that there exists coordinate system $(a_1, \dots, a_{2n})$ of $T^*M$ such that $\vec{h}^k(a_k) = 1$ and $\vec{h}^k(a_j) = 0$, for all $j, k = 1, \dots, m$. Let

$$\omega_l = \sum_{k=1}^{m} \vec{h}^k(a_l) da_k - da_l, \quad l = m+1, \dots, n,$$

and consider the sheaf of 1-forms $\Omega_{\bar{\Delta}}$ generated by these forms. It follows from a direct computation that $K_{\Omega_{\bar{\Delta}}} = \bar{\Delta}$. Moreover, if we denote by $i: \Delta^\perp \to T^*M$ the inclusion, then $i^*\Omega_{\bar{\Delta}}$ gives rise to a family of Pfaffian equations over $\Delta^\perp$, whose associated distribution is equal to $\ker(\omega^\perp)$ by equation (3.5).

## 4. PROOF OF THEOREM 1.1

In this section we also prove the assertion of Remark 1.2.
4.1. **Proof of (i).** Since $M$ and $\Delta$ are real-analytic, $\Delta^\perp$ (given by (1.1)) is an analytic submanifold of $T^*M$ of dimension $2n-m$. As in the introduction, we denote by $\omega$ the canonical symplectic form over $T^*M$ and by $\omega^\perp$ its restriction to $\Delta^\perp$. We recall that, since $T^*M$ is a vector bundle, the dilation in the fibers $\sigma_\lambda: T^*M \to T^*M$ given by $\sigma_\lambda(x,p) = (x, \lambda p)$ for $\lambda \in \mathbb{R}^*$ are well-defined everywhere in $T^*M$, which gives rise to a natural structure of projective bundle. More generally, let $G$ denote a group of analytic automorphisms of $\Delta^\perp$ such that:

(G1) $G$ contains the dilations $\sigma_\lambda$ for $\lambda \in \mathbb{R}^*$.

(G2) $G$ fixes $\ker(\omega^\perp)$, that is, $d_\alpha\sigma(\ker(\omega_\alpha^\perp)) = \ker(\omega_{\sigma(\alpha)}^\perp)$, $\forall \sigma \in G, \forall \alpha \in \Delta^\perp$.

(G3) The quotient space $\Delta_G^\perp$ is an analytic manifold and the geometric quotient map $\Pi: \Delta^\perp \to \Delta_G^\perp$ is an analytic (and, therefore, subanalytic) submersion.

In general, $G$ will stand for the group of dilations (in this case, the above conditions are immediate), but it might stand for a more general group, such as in the case of Carnot groups, cf. §§2.4. The map $\Pi$ is not proper but it induces a proper map after dividing by the dilation group first, i.e. from the projectivisation of $\Delta^\perp$. We say that a set $X \subset \Delta^\perp$ is $G$-invariant if $\sigma(X) = X$ for every $\sigma \in G$. In this case, we denote by $X_G$ its image by the quotient map, that is $X_G = \Pi(X) \subset \Delta_G^\perp$. Note that if $X$ is a subanalytic $G$-invariant set, then $X_G$ is a subanalytic set (since the projectivization of $X$ is subanalytic and the image of a subanalytic set by a proper analytic map is subanalytic). Reciprocally, if $Y \subset \Delta_G^\perp$ is subanalytic, then $\Pi^{-1}(Y) \subset \Delta^\perp$ is subanalytic and $G$-invariant. A stratification $S$ is $G$-invariant if all of its strata are $G$-invariant. We say that a distribution $\vec{K}$ of $\Delta^\perp$ is $G$-invariant if $d_\alpha\sigma(\vec{K}(\alpha)) = \vec{K}(\sigma(\alpha))$ for every $\alpha \in \Delta^\perp$ and $\sigma \in G$; in this case we denote by $\vec{K}_G$ the associated distribution in $\Delta_G^\perp$, that is, $\vec{K}_G(\Pi(\alpha)) = d_\alpha\Pi(\vec{K}(\alpha))$ which is well-defined since $\Pi \circ \sigma(\alpha) = \Pi(\alpha)$, so that $d_{\sigma(\alpha)}\Pi d_\alpha\sigma = d_\alpha\Pi$. Moreover, if $\vec{K}$ is subanalytic, then so it $\vec{K}_G$. Both $\Delta^\perp$ and $\ker(\omega^\perp)$ are $G$-invariant.

Now, we claim that $\ker(\omega^\perp)$ is a closed subanalytic subset of $T\Delta^\perp$. Indeed, this property is local, so we may suppose that $\Delta$ is generated by analytic vector fields $X^1, \dots, X^m$. This implies that $\vec{\Delta}$ is an analytic distribution, so its intersection with $T\Delta^\perp$ is an analytic subset $T\Delta^\perp$, and we conclude by equation (3.5). Next, since $\Delta^\perp$ is connected and $\omega$ is analytic, there exists $l \in \mathbb{N}$ such that $(\omega^\perp)^{l+1} \equiv 0$ over $\Delta^\perp$ and $(\omega^\perp)^l$ is non-zero over an open dense set $S_0$ of $\Delta^\perp$ whose complement is an analytic set; in particular, the rank of $\ker(\omega^\perp)$ is constant along $S_0$. Note that $S_0$ is $G$-invariant. Finally, the existence of the stratification $S$ and the distributions $\vec{K}, \vec{J}$ and $\vec{I}$ follows from the Lemma below applied to $X = \Delta^\perp \setminus S_0$:

**Lemma 4.1.** Let $M$ and $\Delta$ be real-analytic, and let $X \subset \Delta^\perp$ be a $G$-invariant subanalytic set. There exists a $G$-invariant subanalytic Whitney stratification $S = (S_\alpha)$ of $X$ which satisfies the following property: fix a stratum $S_\alpha \subset X$ and consider the distributions $\vec{K} \subset \vec{J} \subset \vec{I} \subset TS_\alpha$ at a point $\alpha \in S_\alpha$ given by:

$$ \vec{K}(\alpha) := \ker(\omega^\perp)(\alpha) \cap T_\alpha S_\alpha, \quad \vec{J}(\alpha) := \mathrm{Lie}(\vec{K}|_{S_\alpha}(\alpha)), \quad \vec{I}(\alpha) := \mathrm{Ker}(\omega_\alpha|_{S_\alpha}) $$

(in particular, $\vec{K}$ is an isotropic distribution; $\vec{J}$ is an integrable distribution and $\vec{I}$ is an isotropic integrable distribution), then the distributions $\ker(\omega^\perp)$, $\vec{K}$, $\vec{J}$, $\vec{I} \subset T\Delta^\perp$ are subanalytic, $G$-invariant and of constant rank along $S_\alpha$.

**Proof of Lemma 4.1.** We prove the result by induction on the dimension of the set $X$, we note that the 0-dimensional case is obvious. Fix a $G$-invariant subanalytic set $X$ of dimensions $d$. Recall that the projection $\Pi(X) = X_G$ is a subanalytic subset of $\Delta_G^\perp$, and consider a subanalytic Whitney stratification $\mathcal{R}$ of $X_G$, see Theorem 3.8. We denote by $S$ the pre-image of $\mathcal{R}$ by $\Pi$, which is a $G$-invariant subanalytic Whitney stratification of $X$. Denote by $X'$ the union of strata of dimension at most $d-1$ and note that it is $G$-invariant. In what follows we show that the Lemma holds over the strata of pure dimension $d$, apart from refining the stratification three times, each time increasing the size, but not the dimension, of $X'$. The result will then follow by induction applied to $X'$.
Let $r$ denote the rank of $d\Pi$, which is constant since $\Pi$ is a submersion and $\Delta^{\perp}$ is connected. Note that the dimension of $X_G$ is equal to $e = d - 2n + m + r$. By the uniformization Theorem 3.9, there exists a proper real-analytic mapping $\psi: Z \to X_G$, where $Z$ is a smooth manifold of dimension $e$ such that $\psi(Z) = X_G$. Since $\Pi$ is an analytic submersion $\psi$ induces a uniformization of $X$ by taking the fiber product

$$W = \Delta^{\perp} \times_{\Delta_{\perp}} Z,$$

and the projection $\varphi: W \to X$ to the first factor. In particular, $W$ is a smooth manifold of dimension $d$, and $\varphi$ and the projection $\Pi': W \to Z$ are analytic morphisms. The action of $G$ on $X$ lifts to $W$ by the restriction of the automorphisms $\sigma \times \mathrm{Id}$ of $\Delta^{\perp} \times Z$ to $W$.

Now, fix a connected stratum $S_{\beta}$ of dimension $d$ and consider $\mathcal{R}_{\beta} = \Pi(S_{\beta})$. By Proposition 3.10, apart from refining the stratification $\mathcal{R}$, we can assume that the rank of $\ker(\omega^{\perp})_G$ is constant along $\mathcal{R}_{\beta}$ and that $\ker(\omega^{\perp})_G \cap \mathcal{T}\mathcal{R}_{\beta}$ is an analytic subbundle of $\mathcal{R}_{\beta}$. We conclude that $\ker(\omega^{\perp})$ has constant rank along $S_{\beta}$ and $\vec{K}_{|S_{\beta}} = \ker(\omega^{\perp}) \cap \mathcal{T}S_{\beta}$ is an analytic subbundle of $S_{\beta}$.

Next, denote by $W_{\beta} = \varphi^{-1}(S_{\beta})$, which is a subanalytic open set of $W$ invariant by $H$. We now may argue locally in $M$; let $\Omega_{\vec{\Delta}}$ be the module of 1-forms defined in Example 3.12 and note that it is invariant by $G$. Consider its pull-back $\varphi^*(\Omega_{\vec{\Delta}})$; by construction, $\ker(\varphi^*(\Omega_{\vec{\Delta}}))$ is a distribution over $W$ which coincides with $d\varphi^{-1}(\vec{K})$ over $W_{\beta}$. Since the dual $(\varphi^*(\Omega_{\vec{\Delta}}))^*$ is analytic and $G$-invariant, its closure by the Lie bracket is also analytic and $G$-invariant. Indeed, the distribution $(\varphi^*(\Omega_{\vec{\Delta}}))^*$ is given locally by analytic vector fields, and the Lie bracket of analytic vector fields is analytic. Adding successively the Lie brackets of analytic vector fields defines a flag of distributions that has to stabilize, at least locally, because of the descending chain condition (noetherianity) of germs of analytic sets. Moreover, apart from refining once again the stratification, we may further assume that it is of constant rank over $W_{\beta}$. Finally, note that $\vec{J}|_{S_{\beta}}$ is equal to the projection of the distribution generated by Lie(($(\varphi^*(\Omega_{\vec{\Delta}}))^*$) restricted to $W_{\beta}$, and it is therefore an integrable $G$-invariant subanalytic distribution.

Finally, denote by $\eta$ the pull-back $\varphi^*\omega$ of the symplectic form; note that it is $H$-invariant. Since $S_{\beta}$ is connected and $\eta$ is analytic, there exists $l \in \mathbb{N}$ such that $\eta^{l+1} \equiv 0$ over $W_{\beta}$, and $\eta^l$ is zero only over a $H$-invariant proper analytic set $Z_{\beta} \subset W_{\beta}$. Note that $\varphi(Z_{\beta})$ is a subanalytic $G$-invariant subset of $S_{\beta}$ of dimension smaller or equal to $d-1$ so, apart from refining the stratification $S$, we may suppose that $Z_{\beta} = \emptyset$. By Proposition 3.3, we conclude that $\ker(\eta)$ is an involutive analytic distribution over $W$, which has constant rank over $W_{\beta}$. Note now that the pull-back of $\vec{\mathcal{I}}_{S_{\beta}} := \ker(\omega|_{S_{\beta}})$ coincides with $\ker(\eta)|_{W_{\beta}}$, so that $\vec{\mathcal{I}}_{S_{\beta}}$ is an isotropic involutive $G$-invariant subanalytic distribution of constant rank along $S_{\beta}$. This completes the proof. $\square$

4.2. **Proof of (ii).** Recall that $S_0$ is the only strata of maximal dimension, which is the open and dense set of $\Delta^{\perp}$ where $\ker(\omega^{\perp})$ is of constant rank. We conclude from (3.5).

4.3. **Proof of (iii).** By Proposition 3.4, if $\gamma: [0, 1] \to M$ is a singular horizontal curve with respect to $\Delta$, then there is an absolutely continuous curve $\psi: [0, 1] \to \Delta^{\perp}$ such that $\pi(\psi) = \gamma$ and $\dot{\psi}(t) \in \ker(\omega_{\psi(t)}^{\perp})$ for almost every $t \in [0, 1]$. Let $\mathcal{D} \subset [0, 1]$ be the set of differentiability points of $\psi$, for every $\alpha$, let

$$\mathcal{T}_{\alpha} := \{t \in \mathcal{D} | \psi(t) \in S_{\alpha}\}.$$

Each set $\mathcal{T}_{\alpha}$ is measurable, for each $\alpha$ denote by $\bar{\mathcal{T}}_{\alpha}$ the set of density points of $\mathcal{T}_{\alpha}$ and the empty set if $\mathcal{L}^1(\bar{\mathcal{T}}_{\alpha}) = 0$. By construction, the union $\cup_{\alpha} \bar{\mathcal{T}}_{\alpha}$ has full measure in $[0, 1]$. If $t$ belongs to $\bar{\mathcal{T}}_{\alpha}$ then $\dot{\psi}(t)$ belongs to $\ker(\omega_{\psi(t)}^{\perp})$ and since $t$ is a point of density of $\mathcal{T}_{\alpha}$ there is a sequence of times $\{t_k\}_k$ converging to $t$ such that $\psi(t_k) \in S_{\alpha}$ for all $k$. So $\dot{\psi}(t)$ belongs to $T_{\psi(t)}S_{\alpha}$, finishing the proof.

4.4. **Proof of (iv).** Start by noting that, as a 2 differential form over a space of dimension $2n - m$, the kernel of $\omega^{\perp}$ has a dimension with the same parity as $m$. We conclude that $\dim \vec{K}(a) \equiv m(2)$ over $S_0$. Next, fix a point $a \in \Delta^{\perp}$ and consider local symplectic coordinates
$(x, p)$, where $\mathfrak{a} = (0, p_{\mathfrak{a}})$, which are defined in some open set $T^*\mathcal{V}$ of $T^*M$; note that each coordinate $p_i$ may be seen as an analytic function over $T^*\mathcal{V}$. Next, consider the locally defined ideal $\mathcal{I} = (h^1, \dots, h^k)$ of functions in $T^*\mathcal{V}$ whose zero locus is equal to the union of $\Delta^{\perp} \cap T^*\mathcal{V}$ with the trivial section $\mathcal{V} \times \{0\}$. We thus consider the chain of ideals:

$$ \mathcal{I} = \mathcal{I}_1 \subset \mathcal{I}_2 \subset \dots \subset \mathcal{I}_k \subset \dots $$

where $\mathcal{I}_{k+1} = \mathcal{I}_k + \bar{\Delta}(\mathcal{I}_k)$. It follows from direct computation via Poisson brackets that $\mathcal{I}_k$ is generated by all functions $h^z$, where $z$ is a vector-field obtained via $k$ Lie-bracket compositions in terms of the local generators $\{X^1, \dots, X^m\}$ of $\Delta$ over $\mathcal{V}$. It follows from the bracket generating property that there exists $\nu \in \mathbb{N}$ such that the ideal $\mathcal{I}_{\nu}$ is generated by the functions $(p_1, \dots, p_n)$, which implies that the zero locus of $\mathcal{I}_{\nu}$ is equal to the set $\{p_1 = \dots = p_n = 0\} = \mathcal{V} \times \{0\}$; $\nu$ is equal to the step of $\Delta$ at $\mathfrak{a}$. Now, given an analytic submanifold $S \subset \Delta^{\perp} \cap T^*\mathcal{V}$, denote by $\mathcal{I}_S$ the ideal of functions whose zero locus is equal to $S$ and note that $\mathcal{I}_S \supset \mathcal{I}$ since $S \subset \Delta^{\perp}$. Note that, in order for $\bar{\Delta}_{\mathfrak{b}} \subset T_{\mathfrak{b}}S$ for all $\mathfrak{b} \in S$, it is necessary that $\bar{\Delta}(\mathcal{I}_S) \subset \mathcal{I}_S$; in particular, since $S \subset \Delta^{\perp}$ we conclude that $S$ must be contained in the zero locus of $\mathcal{I}_{\nu} = (p_1, \dots, p_n)$, that is, the zero section, implying that $S$ is empty. This observation shows that $\bar{\mathcal{K}}|_{S_{\alpha}}$ has rank at most $m-1$ for every stratum $S_{\alpha} \in S$. We conclude easily.

### 5. PROOF OF THEOREM 1.3

We are going to prove the following refinement of Theorem 1.3:

**Theorem 5.1.** Assume that both $M$ and $\Delta$ are real-analytic, and consider the notation introduced in Theorem 1.3. Let $S_{\alpha}$ be a stratum equipped<fnref n="1" /> with a complete analytic Riemannian metric $g^{\alpha}$. Given $\ell \ge 0$ denote by $\mathcal{L}_{\mathfrak{a}}^{\ell}$ the set of points $\mathfrak{a}'$ in the leaf $\mathcal{L}_{\mathfrak{a}}$ that can be joined to $\mathfrak{a}$ by a Lipschitz curve in $\mathcal{L}_{\mathfrak{a}}$ of length $\le \ell$ (with respect to $g^{\alpha}$). Given $x \in \pi(S_{\alpha}) \in M$, a relatively compact subanalytic set $C \subset (S_{\alpha})_x$ and $\ell \ge 0$, consider:

$$ \mathrm{Abn}_{\alpha}^{C, \ell}(x) := \bigcup_{\mathfrak{a} \in C} \pi(\mathcal{L}_{\mathfrak{a}}^{\ell}) \subset M. $$

Then, the following properties hold:

(i) $\mathrm{Abn}_{\alpha}^{C, \ell}(x)$ is a relatively compact subanalytic set of codimension at least 1.

(ii) Given a subanalytic stratification $\mathcal{T}^{\alpha} = (\mathcal{T}_{\beta}^{\alpha})$ of $(S_{\alpha})_x$ which is invariant by dilation and compatible with $\bar{\mathcal{J}}|_{S_{\alpha}}$, for every stratum $\mathcal{T}_{\beta}^{\alpha}$ consider

$$ \mathrm{Abn}_{\alpha, \beta}^{C, \ell}(x) := \bigcup_{\mathfrak{a} \in \mathcal{T}_{\beta}^{\alpha} \cap C} \pi(\mathcal{L}_{\mathfrak{a}}^{\ell}). $$

Then $\mathrm{Abn}_{\alpha, \beta}^{C, \ell}(x)$ is a subanalytic set of dimension bounded from above by

$$ \dim \mathcal{T}_{\beta}^{\alpha} - \dim \bar{\mathcal{J}}|_{\mathcal{T}_{\beta}^{\alpha}} + \dim \bar{\mathcal{J}}|_{S_{\alpha}} - 1. $$

(iii) if $S_{\alpha} = S_0$, moreover, then the codimension of $\mathrm{Abn}_{0, \beta}^{C, \ell}(x)$ is at least 3.

The above result implies Theorem 1.3 because the set $\mathrm{Abn}_{\alpha}(x)$ associated with a given stratum $S_{\alpha}$ can be written as

$$ \mathrm{Abn}_{\alpha}(x) = \bigcup_{\mathfrak{a} \in (S_{\alpha})_x} \pi(\mathcal{L}_{\mathfrak{a}}) = \bigcup_{(k, \ell) \in \mathbb{N}^2} \bigcup_{\mathfrak{a} \in (S_{\alpha})_x \cap C_k} \pi(\mathcal{L}_{\mathfrak{a}}), $$

where $g^{\alpha}$ is a complete analytic Riemannian on $S_{\alpha}$ (it does exist, see [21]) and $\{C_k\}_{k \in \mathbb{N}}$ is an increasing sequence of compact subanalytic subsets of $(S_{\alpha})_x$ whose union is equal to $(S_{\alpha})_x$.

It remains to prove Theorem 5.1. So, we fix a stratum $S_{\alpha}$ of $S$ of dimension $d$ equipped with a complete analytic Riemannian metric $g^{\alpha}$ whose norm is denoted by $|\cdot|^{\alpha}$, we consider

<footnote n="1">¹Note that every real-analytic manifold can be equipped with a complete analytic Riemannian metric, see [21].</footnote>
$\bar{x} \in \pi(S_\alpha)$, and we denote by $k$ and $j \ge 0$ the dimensions of the constant rank distributions $\bar{\mathcal{K}}$ and $\bar{\mathcal{J}}$ over $S_\alpha$. By taking a chart and a symplectic set of coordinates in a neighborhood $\mathcal{V}$ of $\bar{x}$, we can assume that we have symplectic coordinates $(x, p)$ in $T^*\mathcal{V} = \mathcal{V} \times (\mathbb{R}^n)^*$ in such a way that the restriction of $\pi$ to $T^*\mathcal{V}$ is given by $\pi(x, p) = x$ for all $(x, p) \in T^*\mathcal{V}$. Then, we fix a relatively compact subanalytic set $C \subset (S_\alpha)_{\bar{x}}$, a real number $\ell \ge 0$ and we recall that

$$ \mathrm{Abn}_{\alpha}^{C, \ell}(\bar{x}) = \bigcup_{\mathfrak{a} \in C} \pi(\mathcal{L}_{\mathfrak{a}}^{\ell}), $$

where we recall that $\mathcal{L}_\alpha$ denotes the leaf of the foliation $\bar{\mathcal{J}}$ containing $\mathfrak{a}$ and $\mathcal{L}_\alpha^\ell$ denotes the set of points $\mathfrak{a}' \in \mathcal{L}_\alpha$ than can be joined to $\mathfrak{a}$ with a Lipschitz curve in $\mathcal{L}_\alpha$ of length $\le \ell$ (w.r.t. $g^\alpha$). The proof of assertion (i) consists in three steps. In Step 1, we show that $\mathrm{Abn}_\alpha^{C, \ell}(\bar{x})$ can be written as the image of a relatively compact subanalytic set by an analytic mapping, thus proving that it is subanalytic. Then, we argue by contradiction by supposing that $\mathrm{Abn}_\alpha^{C, \ell}(\bar{x})$ has dimension $n$. In Step 2, we infer from Sard's Theorem the existence of some point where some mappings are submersions, and in Step 3 we reach a contradiction by showing that some point has to be the end-point of an horizontal curve which has to be both singular and regular.

Before starting Step 1, we need to introduce some notations. For every $\mathfrak{a} = (x, p) \in S_\alpha \cap T^*\mathcal{V}$, we denote by

$$ \exp_{\mathfrak{a}}^{\alpha} : \bar{\mathcal{J}}(\mathfrak{a}) \to \mathcal{L}_{\mathfrak{a}} $$

the exponential mapping from $\mathfrak{a}$ in $\mathcal{L}_\alpha$ with respect to the restriction of $g^\alpha$ to $\mathcal{L}_\alpha$. Since the Riemannian metric $g^\alpha$ on $S_\alpha$ is assumed to be complete and all leaves $\mathcal{L}_\alpha$ with $\mathfrak{a} \in \mathcal{L}_\alpha$ are injectively immersed smooth submanifolds of $S_\alpha$, all Riemannian manifolds $(\mathcal{L}_\alpha, g^\alpha)$ are complete and the function

$$ \mathrm{Exp}^{\alpha} : (\mathfrak{a}, \xi) \in \Gamma^{\alpha}(\bar{\mathcal{J}}) \mapsto \exp_{\mathfrak{a}}^{\alpha}(\xi) \in S_{\alpha} $$

is analytic on the analytic manifold of dimension $d + d_2$

$$ \Gamma^{\alpha}(\bar{\mathcal{J}}) := \{ (\mathfrak{a}, \xi) \mid \mathfrak{a} \in S_{\alpha} \cap T^{*}\mathcal{V}, \xi \in \bar{\mathcal{J}}(\mathfrak{a}) \}, $$

which is nothing but the graph of $\bar{\mathcal{J}}$ over $S_\alpha$. Then, we consider the projection of $\mathrm{Exp}^\alpha$ to $M$, $\Pi^\alpha : \Gamma^\alpha(\bar{\mathcal{J}}) \to M$, which is the analytic function defined by

$$ \Pi^{\alpha}(\mathfrak{a}, \xi) := \pi(\mathrm{Exp}^{\alpha}(\mathfrak{a}, \xi)) = \pi(\exp_{\mathfrak{a}}^{\alpha}(\xi)) \quad \forall (\mathfrak{a}, \xi) \in \Gamma^{\alpha}(\bar{\mathcal{J}}). $$

We are ready to prove Step 1.

**Step 1:** $\mathrm{Abn}_\alpha^{C, \ell}(x)$ is a relatively compact subanalytic set
By the above definitions, we have

$$ \mathrm{Abn}_{\alpha}^{C, \ell}(\bar{x}) = \Pi^{\alpha}(\Gamma^{\alpha}_{\bar{x}, C, \ell}), $$

with

$$ \Gamma^{\alpha}_{\bar{x}, C, \ell} := \{ ((\bar{x}, p), \xi) \mid ((\bar{x}, p), \xi) \in \Gamma^{\alpha}(\bar{\mathcal{J}}), (\bar{x}, p) \in C, |\xi|^{\alpha} \le \ell \}. $$

Therefore, since all data $S_\alpha$, $g^\alpha$, $\bar{\mathcal{J}}$ are analytic and $C$ is relatively compact, the set $\Gamma^{\alpha}_{\bar{x}, C, \ell}$ is relatively compact and subanalytic and as a consequence its image by $\Pi^\alpha$, $\mathrm{Abn}_\alpha^{C, \ell}(\bar{x})$, is a relatively compact subanalytic set in $M$.

To complete the proof of assertion (i), it remains to show that $\mathrm{Abn}_\alpha^{C, \ell}(\bar{x})$ has codimension at least one. We argue by contradiction by supposing from now on that $\mathrm{Abn}_\alpha^{C, \ell}(\bar{x})$ has dimension $n$. The next step consists in applying Sard's Theorem to get a point where several mappings are submersions.
**Step 2: Application of Sard's Theorem**

We consider a Whitney subanalytic stratification $\mathcal{C} = (\mathcal{C}_\beta)$ (Theorem 3.8) of the subanalytic set $C$ which allows us to write

$$ \mathrm{Abn}_{\alpha}^{C, \ell}(\bar{x}) = \bigcup_{\beta} \Pi^{\alpha} (\Gamma_{\bar{x}, C, \ell, \beta}^{\alpha}), $$

where for every $\beta$,

$$ \Gamma_{\bar{x}, C, \ell, \beta}^{\alpha} := \left\{ ((\bar{x}, p), \xi) \mid ((\bar{x}, p), \xi) \in \Gamma^{\alpha}(\mathcal{J}), (\bar{x}, p) \in \mathcal{C}_{\beta}, |\xi|^{\alpha} \le \ell \right\}. $$

By assumption $\mathrm{Abn}_{\alpha}^{C, \ell}(\bar{x})$ has dimension $n$ and by construction each set $\Pi^{\alpha}(\Gamma_{\bar{x}, C, \ell, \beta}^{\alpha})$ is subanalytic, hence there is $\beta$ such that $\Pi^{\alpha}(\Gamma_{\bar{x}, C, \ell, \beta}^{\alpha})$ has dimension $n$. Then, we define the function $J^{\beta}: \mathcal{C}_{\beta} \to \mathbb{N}$ by

$$ J^{\beta}(\mathfrak{a}) := \dim (\mathcal{J}(\mathfrak{a}) \cap T_{\mathfrak{a}}\mathcal{C}_{\beta}) \quad \forall \mathfrak{a} = (\bar{x}, p) \in \mathcal{C}_{\beta} $$

and set

$$ \bar{J}^{\beta} := \min_{\mathfrak{a} \in \mathcal{C}_{\beta}} \{J^{\beta}(\mathfrak{a})\} \quad \text{and} \quad \Omega^{\beta} := (J^{\beta})^{-1}(\bar{J}^{\beta}). $$

Since all data are subanalytic, the set $\Omega^{\beta}$ is a subanalytic subset of $\mathcal{C}_{\beta}$ which is open and dense in $\mathcal{C}_{\beta}$ and whose complement is a closed subanalytic set in $\mathcal{C}_{\beta}$ of codimension at least 1. Morever, given $(\bar{x}, p) \in \mathcal{C}_{\beta}$ the set $\{|\xi|^{\alpha} < \ell\}$ is dense in $\{|\xi|^{\alpha} \le \ell\}$. Thus, we infer that the image $\Pi^{\alpha}(\hat{\mathcal{D}}^{\beta, \ell})$ of the open analytic manifold

$$ \hat{\mathcal{D}}^{\beta, \ell} := \left\{ ((\bar{x}, p), \xi) \mid ((\bar{x}, p), \xi) \in \Gamma^{\alpha}(\mathcal{J}), (\bar{x}, p) \in \Omega^{\beta}, |\xi|^{\alpha} < \ell \right\} $$

is a subanalytic set of dimension $n$. In the following lemma the mapping

$$ \mathrm{Proj}_{\mathcal{J}(\bar{x}, p)} : \mathbb{R}^n \times (\mathbb{R}^n)^* \to \mathbb{R}^n \times (\mathbb{R}^n)^* $$

stands for the orthogonal projection to $\mathcal{J}(\bar{x}, p)$ with respect to the Euclidean metric.

**Lemma 5.2.** There are $\bar{a} = (\bar{x}, \bar{p}) \in \Omega^{\beta}$, an open smooth submanifold $\bar{W}$ of $\Omega^{\beta}$ of codimension $\bar{J}^{\beta}$ containing $\bar{a}$ and $\bar{\xi} \in \mathcal{J}(\bar{a})$ such that the following properties are satisfied:

$$ (i) \quad (\mathcal{J}(\bar{a}) \cap T_{\bar{a}}\Omega^{\beta}) \oplus T_{\bar{a}}\bar{W} = T_{\bar{a}}\Omega^{\beta}. $$

$$ (ii) \quad \text{The analytic function } \mathcal{G}: \bar{W} \times \mathcal{J}(\bar{a}) \to M \text{ defined by} $$

$$ \mathcal{G}((\bar{x}, p), \xi) := \Pi^{\alpha} \left( (\bar{x}, p), \mathrm{Proj}_{\mathcal{J}(\bar{x}, p)}(\xi) \right) \quad \forall ((\bar{x}, p), \xi) \in \bar{W} \times \mathcal{J}(\bar{a}) $$

is a submersion at $(\bar{a}, \bar{\xi})$.

*Proof of Lemma 5.2.* Let us treat the cases $\bar{D}^{\beta} = 0$ and $\bar{D}^{\beta} > 0$ separately.

**Case 1:** $\bar{J}^{\beta} = 0$.

The set $\Pi^{\alpha}(\hat{\mathcal{D}}^{\beta, \ell})$ is a subanalytic subset of dimension $n$ of $M$ and $\Pi^{\alpha}$ is analytic on the open analytic manifold $\hat{\mathcal{D}}^{\beta, \ell}$. Hence by Sard's theorem there is $(\bar{a}, \bar{\xi}) \in \hat{\mathcal{D}}^{\beta, \ell}$ with $\bar{a} = (\bar{x}, p)$ such that the restriction of $\Pi^{\alpha}$ to $\hat{\mathcal{D}}^{\beta, \ell}$ is a submersion at $(\bar{a}, \bar{\xi})$. Therefore, by considering an open subset $\bar{W}$ of $\Omega^{\beta}$, we check that (i) is satisfied because $\bar{J}^{\beta} = 0$ and (ii) holds because the restriction of $\Pi^{\alpha}$ to $\hat{\mathcal{D}}^{\beta, \ell}$ is a submersion at $(\bar{a}, \bar{\xi})$ and the function

$$ ((\bar{x}, p), \xi) \in \Omega^{\beta} \times \mathcal{J}(\bar{a}) \mapsto ((\bar{x}, p), \mathrm{Proj}_{\mathcal{J}(\bar{x}, p)}(\xi)) \in \hat{\mathcal{D}}^{\beta, \ell}, $$

which is well-defined and analytic in a neighborhood of $(\bar{a}, \bar{\xi})$, sends $(\bar{a}, \bar{\xi})$ to itself and is a submersion at $(\bar{a}, \bar{\xi})$.

**Case 2:** $\bar{J}^{\beta} > 0$.

For every $\mathfrak{a} = (\bar{x}, p) \in \Omega^{\beta}$, pick an open smooth submanifold $W_{\mathfrak{a}}$ of $\Omega^{\beta}$ of codimension $\bar{J}^{\beta}$ containing $\mathfrak{a}$ such that

$$ (5.1) \qquad (\mathcal{J}(\mathfrak{a}') \cap T_{\mathfrak{a}'}\Omega^{\beta}) \oplus T_{\mathfrak{a}'}W_{\mathfrak{a}} = T_{\mathfrak{a}'}\Omega^{\beta} \quad \forall \mathfrak{a}' \in W_{\mathfrak{a}} $$
and such that for every $\mathbf{a}' \in W_{\mathbf{a}}$ the function

$$ \mathcal{P}_{\mathbf{a},\mathbf{a}'} : ((\bar{x}, \tilde{p}), \xi) \in W_{\mathbf{a}'} \times \mathcal{J}(\mathbf{a}) \mapsto ((\bar{x}, \tilde{p}), \mathrm{Proj}_{\mathcal{J}(\bar{x}, \tilde{p})}(\xi)) \in \hat{\mathcal{D}}^{\beta, \ell} $$

is a smooth diffeomorphism from $W_{\mathbf{a}'} \times \mathcal{J}(\mathbf{a}')$ to its image. Note that $W_{\mathbf{a}}$ exists because the trace of the distribution $\mathcal{J}$ over $\Omega^{\beta}$ has constant rank $\bar{J}^{\beta} > 0$. As $W_{\mathbf{a}}$ is transverse to $\mathcal{J}$ which is integrable, there is for every $\mathbf{a} \in \Omega^{\beta}$ an open set $O_{\mathbf{a}} \subset \Omega^{\beta}$ containing $\mathbf{a}$ such that for every $\mathbf{a}' \in O_{\mathbf{a}}$, there is a smooth curve $\psi_{\mathbf{a},\mathbf{a}'} : [0,1] \to \mathcal{L}_{\mathbf{a}' \cap O_{\mathbf{a}}}$ of length < 1 (with respect to $g^{\alpha}$) such that $\psi(0) \in W_{\mathbf{a}}$ and $\psi(1) = \mathbf{a}'$. Then, by local compactness of $\Omega^{\beta}$, there is a countable family $\{\mathbf{a}_i\}_{i \in \mathbb{N}}$ such that

$$ \Omega^{\beta} = \bigcup_{i \in \mathbb{N}} \mathcal{O}_{\mathbf{a}_i}. $$

Therefore, by construction, the $n$-dimensional subanalytic set $\Pi^{\alpha}(\hat{\mathcal{D}}^{\beta, \ell})$, with non-empty interior, satisfies

$$ \Pi^{\alpha}(\hat{\mathcal{D}}^{\beta, \ell}) \subset \bigcup_{i \in \mathbb{N}} \{\Pi^{\alpha}(\mathbf{a}, \xi) | \mathbf{a} \in W_{\mathbf{a}_i}, \xi \in \mathcal{J}(\mathbf{a}), |\xi|^{\alpha} < \ell + 1\}, $$

and, as a consequence, by Baire's Theorem, there is $i \in \mathbb{N}$ such that the set

$$ \{\Pi^{\alpha}(\mathbf{a}, \xi) | \mathbf{a} \in W_{\mathbf{a}_i}, \xi \in \mathcal{J}(\mathbf{a}), |\xi|^{\alpha} < \ell + 1\} $$

has non-empty interior. As in the first case, by Sard's Theorem, we infer that there are $\bar{\mathbf{a}} \in W_{\mathbf{a}_i}$ and $\bar{\xi} \in \mathcal{J}(\bar{\mathbf{a}})$ such that the analytic function

$$ (\mathbf{a}, \xi) \in \{ (\bar{x}, p, \xi) | (\bar{x}, p) \in W_{\mathbf{a}_i}, \xi \in \mathcal{J}(\bar{x}, p) \} \mapsto \Pi^{\alpha}(\mathbf{a}, \xi) $$

is a submersion at $(\bar{\mathbf{a}}, \bar{\xi})$. Setting $\bar{W} := W_{\mathbf{a}_i}$, the assertion (i) follows from (5.1) and (ii) is a consequence of the fact that the above analytic function is a submersion at $(\bar{\mathbf{a}}, \bar{\xi})$ and $\mathcal{P}_{\mathbf{a}_i, \bar{\mathbf{a}}}$ is a diffeomorphism from $W_{\bar{\mathbf{a}}} \times \mathcal{J}(\bar{\mathbf{a}})$ to its image. $\square$

Our contradiction will be reached in the next step. For this, we consider $\bar{\mathbf{a}} = (\bar{x}, \bar{p}) \in \Omega^{\beta}$, the open smooth submanifold $\bar{W}$ of $\Omega^{\beta}$ of codimension $\bar{J}^{\beta}$ containing $\bar{\mathbf{a}}$, and the vector $\bar{\xi} \in \mathcal{J}(\bar{\mathbf{a}})$ as given by Lemma 5.2, we consider the geodesic $\bar{\psi} : [0,1] \to \mathcal{L}_{\bar{\mathbf{a}}}$ joining $\bar{\mathbf{a}}$ to $\exp_{\bar{\mathbf{a}}}^{\alpha}(\bar{\xi}) = \hat{\mathbf{a}} = (\hat{y}, \hat{q})$ with initial velocity $\bar{\xi}$ (given by $\psi(t) := \exp_{\bar{\mathbf{a}}}(t\bar{\xi})$ for $t \in [0,1]$), and we set $\bar{\gamma} := \pi(\bar{\psi})$. Then, by an argument of partition of unity along the compact set $\bar{\gamma}([0,1])$ (note that $\bar{\gamma} : [0,1] \to M$ may have self-intersections), we construct an open neighborhood $\mathcal{M}$ of $\bar{\gamma}([0,1])$ along with $k$ smooth vector fields $X^1, \dots, X^k$ on $\mathcal{M}$ such that

$$ \Delta(y) = \mathrm{Span} \{X^1(y), \dots, X^k(y)\} \quad \forall y \in \mathcal{M}, $$

and we consider the End-Point mapping from $\bar{x}$ associated with the family of vector fields $\mathcal{F} = \{X^1, \dots, X^k\}$ in time 1. As in Section 3.2, there is a non-empty maximal open set $\mathcal{U}^{\bar{x}} \subset L^2([0,1], \mathbb{R}^k)$ such that the mapping $E^{\bar{x}} : \mathcal{U}^{\bar{x}} \to \mathcal{M} \subset M$ defined by

$$ E^{\bar{x}}(u) := x(1; \bar{x}, u) \quad \forall u \in \mathcal{U}^{\bar{x}}, $$

where $x(\cdot; \bar{x}, u) : [0,1] \to \mathcal{M}$ is the unique solution to the Cauchy problem

$$ (5.2) \qquad \dot{x}(t; \bar{x}, u) = \sum_{i=1}^{k} u_i(t) X^i(x(t; \bar{x}, u)) \quad \text{for a.e. } t \in [0,1], \quad x(0; \bar{x}, u) = \bar{x}, $$

is well-defined in $\mathcal{U}^{\bar{x}}$ and allows to write any horizontal path (with respect to $\Delta$) starting at $\bar{x}$ contained in $\mathcal{M}$ as a solution of (5.2). We are ready to proceed with the next step, which consists in constructing a certain control $U \in \mathcal{U}^{\bar{x}}$ which is a critical point of $E^{\bar{x}}$ and for which the singular horizontal path $x(\cdot; \bar{x}, U)$ can be lifted into an horizontal path, with respect to $\mathcal{J}$, joining $\bar{\mathbf{a}}$ to $\bar{\psi}(1) = \hat{\mathbf{a}}$ and regular.
**Step 3: The Contradiction**

We start with the following lemma (we set $\tilde{\mathcal{M}} := T^*\mathcal{M}$):

**Lemma 5.3.** There are a family of smooth vector fields $\vec{Z}^1, \dots, \vec{Z}^{k_1}$ on $S_\alpha \cap \tilde{\mathcal{M}}$, an open subset $\mathcal{O}$ of $(S_\alpha \cap \tilde{\mathcal{M}})_{\bar{x}} \times L^2([0, 1], \mathbb{R}^{k_1})$, and a smooth function $\Lambda : (S_\alpha \cap \tilde{\mathcal{M}}) \times \mathbb{R}^{k_1} \to \mathbb{R}^k$ such that the following properties are satisfied:

(i) The End-Point mapping $\mathcal{E} : \mathcal{O} \to S_\alpha \cap \tilde{\mathcal{M}}$ defined by (by abuse of notation we denote the elements of $\mathcal{O}$ as $(p, v)$ instead of $((\bar{x}, p), v)$)

$$ \mathcal{E}(p, v) := \psi_v^p(1) \quad \forall (p, v) \in \mathcal{O}, $$

where $\psi_v^p : [0, 1] \to S_\alpha \cap \tilde{\mathcal{M}}$ is the unique solution to the Cauchy problem

$$ (5.3) \qquad \dot{\psi}_v^p(t) = \sum_{j=1}^{k_1} v(t) \vec{Z}^j (\psi_v^p(t)) \quad \text{for a.e. } t \in [0, 1], \quad \psi_v^p(0) = (\bar{x}, p) $$

is well-defined and it satisfies for any $(p, v) \in \mathcal{O}$,

$$ (5.4) \qquad \pi(\psi_v^p(1)) = E^{\bar{x}}(U(\cdot; p, v)), $$

where the control $U(\cdot; p, v) \in \mathcal{U}^{\bar{x}}$ is defined by

$$ (5.5) \qquad U(t; p, v) := \Lambda(\psi_v^p(t), v(t)) \quad \text{for a.e. } t \in [0, 1]. $$

(ii) For every open neighborhood $\tilde{\mathcal{N}}$ of $\bar{\psi}([0, 1])$ in $S_\alpha$, there is a control

$$ \bar{v} \in \mathcal{O}^{\bar{p}} := \mathcal{O} \cap (\{\bar{a}\} \times L^2([0, 1], \mathbb{R}^{k_1})), $$

such that

$$ (5.6) \qquad \mathcal{E}^{\bar{p}}(\bar{v}) := \psi_{\bar{v}}^{\bar{p}}(1) = \hat{a}, \quad \psi_{\bar{v}}^{\bar{p}}([0, 1]) \subset \tilde{\mathcal{N}}, $$

and for which the End-Point mapping $\mathcal{E}^{\bar{p}} := \mathcal{E}(\bar{p}, \cdot) : \mathcal{O}^{\bar{p}} \to \mathcal{L}_{\bar{a}}$ is a submersion.

**Proof of Lemma 5.3.** Since the family of vector fields $\mathcal{F} = \{X^1, \dots, X^k\}$ span $\Delta$, denoting by $\vec{h}^1, \dots, \vec{h}^k$ the Hamiltonian vector fields in $\tilde{\mathcal{M}} := T^*\mathcal{M}$ associated with $X^1, \dots, X^k$, we have

$$ \vec{\Delta}(y, q) = \text{Span} \{\vec{h}^1(y, q), \dots, \vec{h}^k(y, q)\} \quad \forall (y, q) \in \tilde{\mathcal{M}}. $$

As a consequence, since $\vec{\mathcal{K}} \subset \vec{\Delta}$ has constant rank $d_1$ on $S_\alpha$ and $\text{Lie}(\vec{\mathcal{K}}) = \vec{\mathcal{J}}$, up to restricting $\tilde{\mathcal{M}}$ to a smaller open neighborhood of $\bar{\psi}([0, 1])$ in $T^*\mathcal{M}$ if necessary, there are $k_1 \in \mathbb{N}$ ($k_1 \ge d_1$) and smooth functions $\varphi_i^j : S_\alpha \cap \tilde{\mathcal{M}} \to \mathbb{R}$, with $i = 1, \dots, k$ and $j = 1, \dots, k_1$, such that the vector fields $\vec{Z}^1, \dots, \vec{Z}^{k_1}$ on $S_\alpha \cap \tilde{\mathcal{M}}$ defined by

$$ \vec{Z}^j(y, q) = \sum_{i=1}^{k} \varphi_i^j(y, q) \vec{h}^i(y, q) \quad \forall (y, q) \in S_\alpha \cap \tilde{\mathcal{M}}, \forall j = 1, \dots, k_1, $$

satisfy

$$ \text{Span} \{\vec{Z}^1(y, q), \dots, \vec{Z}^{k_1}(y, q)\} = \vec{\mathcal{K}}(y, q) \quad \forall (y, q) \in S_\alpha \cap \tilde{\mathcal{M}} $$

and

$$ \text{Lie} \{\vec{Z}^1, \dots, \vec{Z}^{k_1}\} (y, q) = \vec{\mathcal{J}}(y, q) \quad \forall (y, q) \in S_\alpha \cap \tilde{\mathcal{M}}. $$

In addition, the smooth function $\Lambda = (\Lambda_1, \dots, \Lambda_{k_1}) : (S_\alpha \cap \tilde{\mathcal{M}}) \times \mathbb{R}^{k_1} \to \mathbb{R}^k$ defined by

$$ \Lambda_i((y, q), v) = \sum_{j=1}^{k_1} v_j \varphi_i^j(y, q) \quad \forall (y, q) \in (S_\alpha \cap \tilde{\mathcal{M}}), \forall v = (v_1, \dots, v_{k_1}) \in \mathbb{R}^{k_1}, $$
for $i = 1, \dots, k$, satisfies for every $(y, q) \in S_\alpha \cap \tilde{M}$,

$$ (5.7) \quad d_{(y,q)}\pi\left(\sum_{j=1}^{k_1} v_j \vec{Z}^j(y, q)\right) = \sum_{i=1}^{k} \Lambda((y, q), v)_i X^i(y) \quad \forall v = (v_1, \dots, v_{k_1}) \in \mathbb{R}^{k_1}. $$

By classical results of control theory (see for example [33]), the End-Point mapping $\mathcal{E}$ is well-defined and smooth on its domain which is an open subset $\mathcal{O}$ of $(S_\alpha \cap \tilde{M})_{\bar{x}} \times L^2([0, 1], \mathbb{R}^{k_1})$. By construction, for every $(p, v) \in \mathcal{O}$, the curve $\psi_v^p: [0, 1] \to S_\alpha \cap \tilde{M}$ is horizontal with respect to $\tilde{K}$ and projects onto the curve $\gamma_v^p: [0, 1] \to \mathcal{M} \subset \mathcal{M}$ defined by

$$ \gamma_v^p := \pi(\psi_v^p), $$

which is horizontal with respect to $\Delta$. As a matter fact, by (5.7), this curve is solution to the Cauchy problem

$$ \dot{\gamma}_v^p(t) = \sum_{i=1}^{k} \Lambda(\psi_v^p(t), v(t))_i X^i(\gamma_v(t)) \quad \text{for a.e. } t \in [0, 1], \quad \gamma_v^p(0) = \bar{x}, $$

so that we have (5.4)-(5.5), which completes the proof of (i). Assertion (ii) follows from Lie($\tilde{K}$) = $\tilde{J}$ on $S_\alpha$, Chow-Rashevsky's Theorem, and the fact that any control in $\mathcal{O}^{\bar{p}}$ is the limit in $L^2$ of non-singular controls (with respect to the End-Point mapping $\mathcal{E}^{\bar{p}}$) with the same end-point (see [7]). $\square$

The following result follows from the fact that $\tilde{J}$ is integrable on $S_\alpha$, Lemma 5.2, and Lemma 5.3 (ii).

**Lemma 5.4.** There is a control $\bar{v} \in \mathcal{O}$ which is regular which respect to $\mathcal{E}^{\bar{p}}$ such that $\mathcal{E}^{\bar{p}}(\bar{v}) = \hat{\mathfrak{a}}$ and

$$ (5.8) \quad d_{\hat{\mathfrak{a}}} \pi \left( \tilde{J}(\hat{\mathfrak{a}}) \right) + d_{\hat{\mathfrak{a}}} \pi \left( \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v}) \right) (T_{\bar{a}} \bar{W}) = T_{\bar{y}} M. $$

*Proof of Lemma 5.4.* Since $\bar{\psi}$ may have self-intersection (it is a geodesic but not necessarily a minimizing geodesic), it is convenient to see it as the image of the segment $I := c([0, 1]) \subset \mathbb{R}^d$, with $c(t) := (t, 0, \dots, 0)$ for $t \in [0, 1]$, by a smooth immersion $\Phi$ from an open neighborhood $I$ of $I$ in $\mathbb{R}^d$ into an open neighborhood $\tilde{N}$ of $\bar{\psi}([0, 1])$ in $S_\alpha$. Moreover, since $\tilde{J}$ of rank $d_2$ is integrable in $S_\alpha$, we can also assume that

$$ (5.9) \quad d_z \Phi(J) = \tilde{J}(\Phi(z)) \quad \forall z \in \mathcal{I}, $$

with

$$ J = \operatorname{Span}\{e_1, \dots, e_{d_2}\}, $$

where $(e_1, \dots, e_d)$ stands for the canonical basis of $\mathbb{R}^d$. The mapping $\Phi$ allows us to pull-back smoothly the objects that we have along $\bar{\psi}([0, 1])$ into objects along $I = c([0, 1])$. First, by considering a restriction of $\Phi$ being a local diffeomorphism sending the origin in $\mathbb{R}^d$ to $\bar{\psi}(0)$, we can define uniquely an open smooth submanifold $K \subset \mathbb{R}^d$ containing the origin $c(0) = 0$ verifying

$$ \Phi(K) = \bar{W} \quad \text{and} \quad T_0 K \cap J = \{0\}. $$

Then, we notice that if we have a control system

$$ (5.10) \quad \dot{z}(t) = \sum_{i=1}^{a} w_i(t) A^i(z(t)) \quad \text{for a.e. } t \in [0, 1], \quad z(0) = z, $$

where $A^1, \dots, A^a$ are smooth vector fields on $\mathcal{I}$ satisfying

$$ (5.11) \quad A^i(z) \in J \quad \forall z \in \mathcal{I}, $$

then the corresponding End-Point mapping $\mathcal{A}: K \times L^2([0, 1], \mathbb{R}^a) \to \mathcal{I}$ defined by

$$ \mathcal{A}(z, w) := z(1; z, w) \quad \forall z \in K, \forall w \in L^2([0, 1], \mathbb{R}^a), $$
where $z(1; z, w)$ is the solution to the Cauchy problem (5.10) is smooth on its domain, of the form $K \times \mathcal{D}$, and it has the form

$$ \mathcal{A}(z, w) = (\mathcal{B}(z, w), \hat{z}) \quad \forall z = (\bar{z}, \hat{z}) \in (\mathbb{R}^{d_2} \times \mathbb{R}^{d-d_2}) \cap K, \forall w \in \mathcal{D}, $$

where $\mathcal{B}: K \times \mathcal{D} \to \mathbb{R}^{d_2}$ is smooth. Thus, we have for every control $w \in \mathcal{D}$,

$$ d_{(0,w)} \mathcal{A}(\eta, 0) = (d_{(0,w)} \mathcal{B}(\eta, 0), \hat{\eta}) \quad \forall \eta = (\bar{\eta}, \hat{\eta}) \in T_0 K. $$

By Lemma 5.4 (ii), there exists a control $\bar{v} \in \mathcal{O}^{\bar{p}}$ satisfying (5.6) which is regular with respect to $\mathcal{E}^{\bar{p}}$. Hence, by applying the above discussion to the pull-back along $\bar{\psi}([0, 1])$ of the control system associated with the pull-backs of the vector fields $\bar{Z}^1, \dots, \bar{Z}^{k_1}$, that we denote by $A^1, \dots, A^{d_1}$, and whose End-Point mapping $\mathcal{A}: K \times L^2([0, 1], \mathbb{R}^{k_1}) \to \mathcal{I}$ satisfies for every $z \in K$ close to $c(0) = 0$ and $w$ close to $\bar{v}$

$$ \Phi(\mathcal{A}(z, w)) = \mathcal{E}(\Phi(z), w), $$

we obtain

$$ \begin{aligned} \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v}) (d_0 \Phi(\eta)) = d_{(\bar{p}, \bar{v})} \mathcal{E} (d_0 \Phi(\eta), 0) &= (d_{c(1)} \Phi \circ d_{(0, \bar{v})} \mathcal{A}) (\eta, 0) \\ &= d_{c(1)} \Phi (d_{(0, \bar{v})} \mathcal{B}(\eta, 0), \hat{\eta}) \quad \forall \eta = (\bar{\eta}, \hat{\eta}) \in T_0 K. \end{aligned} $$

Furthermore, by viewing the mapping

$$ H: p \in \bar{W} \mapsto \exp_{(\bar{x}, p)}^{\alpha} \left( \mathrm{Proj}_{\bar{\mathcal{J}}(\bar{x}, p)}(\bar{\xi}) \right) \in \mathcal{S}_{\alpha} \cap \tilde{\mathcal{M}} $$

as the End-Point mapping of a smooth control system parametrizing the trajectories

$$ t \in [0, 1] \mapsto \exp_{(\bar{x}, p)}^{\alpha} \left( \mathrm{Proj}_{\bar{\mathcal{J}}(\bar{x}, p)}(t\bar{\xi}) \right) $$

for $p \in \bar{W}$ close to $\bar{p}$, the above discussion yields

$$ d_{\bar{p}} H(d_0 \Phi(\eta)) = d_{c(1)} \Phi(*, \hat{\eta}) \quad \forall \eta = (\bar{\eta}, \hat{\eta}) \in T_0 K, $$

where $*$ denotes an element of $J$ that depends on $\eta \in T_0 K$. In conclusion, since $\Phi$ is a diffeomorphism, we have demonstrated that

$$ d_{\bar{p}} H(\zeta) - \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v}) (\zeta, 0) \in \mathcal{J}(\hat{a}) \quad \forall \zeta \in T_{\bar{a}} \bar{W}. $$

Thus, recalling that

$$ \mathcal{G}((\bar{x}, p), \bar{\xi}) = \Pi^{\alpha} \left( (\bar{x}, p), \mathrm{Proj}_{\bar{\mathcal{J}}(\bar{x}, p)}(\bar{\xi}) \right) = \pi(H(p)) \quad \forall p \in \bar{W}, $$

we infer that

$$ (5.12) \qquad d_{\hat{a}} \pi \left( \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v})(\zeta) \right) - \frac{\partial \mathcal{G}}{\partial p}(\bar{a}, \bar{\xi})(\zeta) \in d_{\hat{a}} \pi \left( \mathcal{J}(\hat{a}) \right) \quad \forall \zeta \in T_{\hat{a}} \bar{W}. $$

To conclude, we pick $\mu \in T_{\bar{y}} M$ and note that, by Lemma 5.2 (ii), there are $\zeta \in T_{\bar{a}} \bar{W}$ and $\xi \in \mathcal{J}(\hat{a})$ such that

$$ \mu = \frac{\partial \mathcal{G}}{\partial p}((\bar{x}, \bar{p}), \bar{\xi})(\zeta) + \frac{\partial \mathcal{G}}{\partial \xi}((\bar{x}, \bar{p}), \bar{\xi})(\xi). $$

Noting that

$$ \frac{\partial \mathcal{G}}{\partial \xi}((\bar{x}, \bar{p}), \bar{\xi})(\xi) \in d_{\hat{a}} \pi \left( \mathcal{J}(\hat{a}) \right), $$

the equality (5.12) implies

$$ \begin{aligned} \mu - d_{\hat{a}} \pi \left( \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v})(\zeta) \right) = \frac{\partial \mathcal{G}}{\partial p}((\bar{x}, \bar{p}), \bar{\xi})(\zeta) - d_{\hat{a}} \pi \left( \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v})(\zeta) \right) \\ + \frac{\partial \mathcal{G}}{\partial \xi}((\bar{x}, \bar{p}), \bar{\xi})(\xi) \in d_{\hat{a}} \pi \left( \mathcal{J}(\hat{a}) \right), \end{aligned} $$

which completes the proof. $\square$
We conclude the proof of Theorem 5.1 (i) by noting that (5.4) yields (note that the function $U$ is differentiable by construction)

$$d_{\hat{a}}\pi \circ \frac{\partial \mathcal{E}}{\partial \bar{v}}(\bar{p}, \bar{v}) = d_{\bar{U}}E^{\bar{x}} \circ \frac{\partial U}{\partial \bar{v}}(\cdot; \bar{p}, \bar{v}) \quad \text{and} \quad d_{\hat{a}}\pi \circ \frac{\partial \mathcal{E}}{\partial p}(\bar{p}, \bar{v}) = d_{\bar{U}}E^{\bar{x}} \circ \frac{\partial U}{\partial p}(\cdot; \bar{p}, \bar{v}),$$

where $\bar{U} := U(\cdot; \bar{p}, \bar{v}) \in \mathcal{U}^{\bar{x}} \subset L^2([0, 1], \mathbb{R}^k)$. Since $\mathcal{E}^{\bar{p}}$ is a submersion at $\bar{v}$, the first equality gives

$$d_{\hat{a}}\pi(\vec{\mathcal{J}}(\hat{a})) \subset \mathrm{Im}(d_{\bar{U}}E^{\bar{x}})$$

and moreover the second inequality implies

$$\mathrm{Im}\left(d_{\hat{a}}\pi \circ \frac{\partial \mathcal{E}^1}{\partial p}(\bar{p}, \bar{v})\right) \subset \mathrm{Im}(d_{\bar{U}}E^{\bar{x}}).$$

By (5.8), we infer that $E^{\bar{x}}$ is a submersion at $\bar{U}$ which means that the horizontal path

$$\gamma_{\bar{v}}^{\bar{p}} := \pi(\psi_{\bar{v}}^{\bar{p}})$$

associated with $\bar{U}$ is non-singular. But since $\gamma_{\bar{v}}^{\bar{p}}$ is the projection of the curve $\psi_{\bar{v}}^{\bar{p}}: [0, 1] \to \mathcal{L}_{\bar{a}}$ which is horizontal with respect to $\vec{\mathcal{K}}$, Theorem 1.1 (iii) shows that the path is singular. We get a contradiction and the proof of Theorem 5.1 (i) is complete.

To prove assertion (ii) of Theorem 5.1, we consider a subanalytic stratification $\mathcal{T}^{\alpha} = (\mathcal{T}_{\beta}^{\alpha})$ of $(S_{\alpha})_{\bar{x}}$ which is invariant by dilation and compatible with $\vec{\mathcal{J}}|_{S_{\alpha}}$. The subanalyticity of the set $\mathrm{Abn}_{\alpha, \beta}^{C, \ell}(\bar{x})$ follows from (i). Set

$$\Gamma^{\beta}(\vec{\mathcal{J}}) := \{(\mathbf{a}, \xi) | \mathbf{a} \in \mathcal{T}_{\beta}^{\alpha}, \xi \in \vec{\mathcal{J}}(\mathbf{a})\}.$$

Since $\mathcal{T}_{\beta}^{\alpha}$ and $\vec{\mathcal{J}}$ are invariant by dilation, the set $F(\Gamma^{\beta}(\vec{\mathcal{J}}))$ is an injectively immersed analytic submanifold of $S_{\alpha}$ of dimension

$$D_{\beta}^{\alpha} := \dim \mathcal{T}_{\beta}^{\alpha} - \dim \vec{\mathcal{J}}|_{\mathcal{T}_{\beta}^{\alpha}} + \dim \vec{\mathcal{J}}|_{S_{\alpha}} - 1$$

and moreover there holds

$$\mathrm{Abn}_{\alpha, \beta}^{\ell}(\bar{x}) \subset \pi(F(\Gamma^{\beta}(\vec{\mathcal{J}}))).$$

This implies that $\mathrm{Abn}_{\alpha, \beta}^{\ell}(\bar{x})$ has dimension at most $D_{\beta}^{\alpha}$. If $\alpha = 0$, then by Theorem 1.1 (iv), we have $\dim \vec{\mathcal{J}}|_{S_0} = \dim \vec{\mathcal{K}}|_{S_0} \le m - 2$ which gives for any $\beta$

$$\begin{aligned} D_{\beta}^{0} &= \dim \mathcal{T}_{\beta}^{0} - \dim \vec{\mathcal{J}}|_{\mathcal{T}_{\beta}^{0}} + \dim \vec{\mathcal{J}}|_{S_{0}} - 1 \\ &\le \dim \mathcal{T}_{\beta}^{0} + \dim \vec{\mathcal{J}}|_{S_{0}} - 1 \le (n - m) + (m - 2) - 1 = n - 3 \end{aligned}$$

and thus concludes the proof of assertion (iii).

## 6. THE SUSSMANN REGULARITY THEOREM: PROOF OF THEOREM 1.4

As in [36], we prove the result by induction on the rank of the distribution $\Delta$. So, we are going to show the following property, called $(P_m)$, for every integer $m \ge 1$:

$(P_m)$: If $\Delta$ is an analytic bracket generating distribution of rank $m \ge 1$ equipped with a smooth (resp. analytic) metric $g$ on a real-analytic manifold $N$ of dimension $n \ge m$ and $\gamma: [a, b] \to N$ is a minimizing geodesic, then $\gamma$ is smooth (resp. analytic) on an open dense subset of $[a, b]$.

Firstly, the property $(P_1)$ holds true because if $m = 1$ then $n = 1$ and any geodesic is smooth (resp. analytic) on its interval of definition. Let us now assume that for some integer $m \ge 1$, $(P_k)$ holds true for any integer $k \in [1, m]$, and show that $(P_{m+1})$ is satisfied. Let $\Delta$ be an analytic bracket generating distribution of rank $m + 1$ equipped with a smooth (resp. analytic) metric $g$ on a real-analytic manifold $M$ of dimension $n \ge m + 1$ and let $\gamma: [a, b] \to M$ be a minimizing geodesic. If $\gamma$ is nonsingular, then it is the projection of a trajectory of the
Hamiltonian vector field in $T^*M$ associated with $(\Delta, g)$, so it is smooth (resp. analytic) (see [33]). So, we assume from now that $\gamma$ is singular. By Theorem 1.1, there is a subanalytic distribution $\bar{\mathcal{K}} \subset \bar{\Delta}$ of rank $\le m$ on $\Delta^{\perp} \subset T^*M$ associated with a subanalytic stratification $S = (S_\alpha)$ of $\Delta^{\perp}$ and $\gamma$ is the projection of an absolutely continuous curve $\psi: [a, b] \to \Delta^{\perp}$ such that

$$ (6.1) \qquad \dot{\psi}(t) \in \bar{\mathcal{K}}(\psi(t)) \subset T_{\psi(t)}(T^*M) \quad \text{for a.e. } t \in [a, b]. $$

Moreover, the metric $g$ on $M$ can be lifted to a metric $\tilde{g}$ over $\bar{\Delta}$ by setting for every $\mathfrak{a} \in \Delta^{\perp}$,

$$ \tilde{g}_{\mathfrak{a}}(\xi_1, \xi_2) := g_{\pi(\mathfrak{a})}(d_{\mathfrak{a}}\pi(\xi_1), d_{\mathfrak{a}}\pi(\xi_2)) \quad \forall \xi_1, \xi_2 \in \bar{\Delta}(\mathfrak{a}). $$

By construction, $\tilde{g}$ is smooth (resp. analytic) if $g$ is smooth (resp. analytic) and the curve $\psi$ minimizes the length with respect to $\tilde{g}$ among all horizontal paths of $\bar{\mathcal{K}}$ joining $\psi(a)$ to $\psi(b)$. Let $D \in \{1, \dots, m\}$ be the maximum of $d \ge 1$ such that there are $t \in [a, b]$ and $\alpha$ with $\psi(t) \in S_\alpha$ and $\dim(S_\alpha) = d$, then let $S^D$ be the real-analytic manifold defined as the union of all strata $S_\alpha$ of dimension $D$. By construction, the set

$$ I_D := \{t \in (a, b) \mid \psi(t) \in S^D\} $$

is an open set. Moreover since $\bar{\mathcal{K}}$ has constant rank and is bracket generating on each analytic leaf generated by $\bar{\mathcal{J}}$, we infer by the induction hypothesis that $\psi$ is smooth (resp. analytic) on an open dense subset of $I_D$. Now we can repeat this construction with the restriction of $\psi$ to the open set given by the interior of $(0, 1) \setminus I_D$ and observe that the set $((0, 1) \setminus I_D) \setminus \text{Int}((0, 1) \setminus I_D)$ has empty interior. In conclusion, we obtain that $\psi$ is smooth (resp. analytic) on an open dense subset of $[a, b]$ and as a consequence that $\gamma = \pi(\psi)$ satisfies the same property.

## APPENDIX A. PROOF OF RESULTS OF SECTION 2.4

Let $v_1, \dots, v_m$ be a basis of $V$ and $X^1, \dots, X^m$ the left-invariant vector fields defined by

$$ X^i(g) = d_e L_x(v_i) \quad \forall g \in \mathbb{G}, \forall i = 1, \dots, m. $$

Then the bracket generating left-invariant distribution $\Delta$ associated to $V$ satisfies

$$ \Delta(g) = \text{Span}\{X^1(g), \dots, X^m(g)\} = d_e L_g(V) \quad \forall g \in \mathbb{G} $$

and we have (see (3.5))

$$ (A.1) \qquad \ker(\omega_{\mathfrak{a}}^{\perp}) = \bar{\Delta}(\mathfrak{a}) \cap T_{\mathfrak{a}}\Delta^{\perp} \quad \forall \mathfrak{a} \in \Delta^{\perp}, $$

where $\bar{\Delta}$ is the distribution on $T^*M$ defined by

$$ \bar{\Delta}(\mathfrak{a}) := \{\vec{h}^1(\mathfrak{a}), \dots, \vec{h}^m(\mathfrak{a})\} \quad \forall \mathfrak{a} \in T^*\mathbb{G} $$

and where for every $i = 1, \dots, m$, $h^i$ stands for the Hamiltonian $h^{X^i}: T^*\mathbb{G} \to \mathbb{R}$ associated with $X^i$. Let us now see how $\Phi = (\Phi_1, \Phi_2): T^*\mathbb{G} \to \mathbb{G} \times \mathbb{g}^*$ (defined by (2.2)) pushes forward the vector fields $\vec{h}^1, \dots, \vec{h}^m$. We need the following lemma.

**Lemma A.1.** For every left-invariant vector field $X$ on $\mathbb{G}$ with $v := X(e) \in \mathfrak{g}$, we have

$$ d_{\mathfrak{a}}\Phi_1(\vec{h}^X(g, p)) = X(g) \quad \text{and} \quad d_{\mathfrak{a}}\Phi_2(\vec{h}^X(g, p)) = -p \cdot d_e L_g([v, \cdot]), $$

for every $\mathfrak{a} = (g, p) \in T^*\mathbb{G}$.

**Proof of Lemma A.1.** Let $X$ an invariant vector field be fixed and $v := X(e) \in \mathfrak{g}$. The first part follows directly from the fact that $\Phi_1$ coincides with the canonical projection from $T^*\mathbb{G}$ to $\mathbb{G}$ and the definition of the Hamiltonian vector field $\vec{h}^X$, see Section 3.1. For the second part, we need to show that

$$ d_{(g,p)}\Phi_2(\vec{h}^X(g,p))(w) = -p \cdot d_e L_g([v,w]) \quad \forall w \in \mathfrak{g}, \forall \mathfrak{a} = (g,p) \in T^*\mathbb{G}. $$
So, fix $\mathfrak{a} = (g, p) \in T^*\mathbb{G}$, $w \in \mathfrak{g}$, and moreover denote by $Y$ the left-invariant vector field verifying $Y(e) = w$ and by $\varphi_t(\mathfrak{a}) = (g(t), p(t))$ the trajectory of the flow of $\tilde{h}^X$ passing through $\mathfrak{a}$ at time $t = 0$. We have

$$
\begin{align*}
d_{\mathfrak{a}} \Phi_2 (\vec{h}^X(\mathfrak{a})) (w) &= \frac{d}{dt} \{ \Phi_2 (\varphi_t(\mathfrak{a})) (w) \}_{|t=0} &&= \frac{d}{dt} \{ \Phi_2 (g(t), p(t)) (w) \}_{|t=0} \\
&= \frac{d}{dt} \{ (p(t) \cdot d_e L_{g(t)}) (w) \}_{|t=0} &&= \frac{d}{dt} \{ p(t) \cdot (d_e L_{g(t)}(w)) \}_{|t=0} \\
&= \frac{d}{dt} \{ p(t) \cdot Y(g(t)) \}_{|t=0} &&= \frac{d}{dt} \{ h^Y (g(t), p(t)) \}_{|t=0} \\
&= \vec{h}^X \cdot h^Y(g, p),
\end{align*}
$$

which by Proposition 3.1 gives

$$
d_{\mathfrak{a}} \Phi_2 (\vec{h}^X(\mathfrak{a})) (w) = -h^{[X,Y]}(g,p) = -p \cdot ([X,Y](g)) = -(p \cdot d_e L_g) ([v,w]),
$$

which proves the result.

<figure><img src="image_2.png" /></figure>

Therefore, by Lemma A.1, for every $\mathfrak{a} = (g, p) \in T^*\mathbb{G}$, the linear space $\vec{\Delta}(\mathfrak{a})$ is sent to

$$
\vec{\mathfrak{D}}(g, \mathfrak{p}) := d_{\mathfrak{a}} \Phi(\vec{\Delta}(\mathfrak{a})) = \left\{ \begin{pmatrix} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \right\} \quad \text{with} \quad \mathfrak{p} = \Phi_2(\mathfrak{a}).
$$

Moreover, we have $\Phi(\Delta^{\perp}) = \mathbb{G} \times V^{\perp}$ and for every $(g, \mathfrak{p}) \in \mathbb{G} \times V^{\perp}$,

$$
\begin{align*}
\vec{\mathfrak{D}}(g, \mathfrak{p}) \cap T_{(g,\mathfrak{p})} (\mathbb{G} \times V^{\perp})
  &= \left\{ \begin{pmatrix} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \text{ s.t. } \mathfrak{p} \cdot [v, \cdot] \in V^{\perp} \right\} \\
  &= \left\{ \begin{pmatrix} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \text{ s.t. } \mathfrak{p}([v, w]) = 0 \quad \forall w \in V \right\}.
\end{align*}
$$

We observe that the dimension of the above linear space depends only upon $\mathfrak{p}$.

Now consider the group $H$ defined on $\mathbb{G} \times V^{\perp}$ generated by all elements $\sigma_g = L_g \times \text{Id}$ where $\sigma_g(h, p) = (L_g(h), p)$, together with dilations in respect to $V^{\perp}$. Note that the orbits of this are given by $\mathbb{G} \times \{\lambda p_0\}_{\lambda \in \mathbb{R}^*}$, for every $p_0 \in V^{\perp}$. This implies that the quotient space is the analytic manifold $\mathbb{P}(V^{\perp})$ and the quotient map $\Pi: \mathbb{G} \times V^{\perp} \to \mathbb{P}(V^{\perp})$ is an analytic submersion. In other words, $H$ satisfies conditions (G1) and (G3) given in §4. So, if we consider the group $G$ of automorphisms of $T^*\mathbb{G}$ which is conjugate (by $\Phi$) to $H$, the same properties hold true for $G$. Next, by equation (3.5) and the definition of $\vec{\mathfrak{D}}$, in order to show that property (G2) holds true for $G$, it is enough to show that $[\vec{\mathfrak{D}}(g, \mathfrak{p}) \cap T_{(g,\mathfrak{p})} (\mathbb{G} \times V^{\perp})]$ is invariant by $H$. Indeed, this is clear for dilation, and for every $g' \in \mathbb{G}$:

$$
\begin{align*}
& d\sigma_{g'} \left[ \vec{\mathfrak{D}}(g, \mathfrak{p}) \cap T_{(g, \mathfrak{p})} (\mathbb{G} \times V^{\perp}) \right] \\
&= d\sigma_g \left\{ \begin{pmatrix} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \text{ s.t. } \mathfrak{p}([v, w]) = 0 \quad \forall w \in V \right\} \\
&= \left\{ \begin{pmatrix} d_g L_{g'} d_e L_g(v) \\ -\mathfrak{p} \cdot [v, \cdot] \end{pmatrix} \middle| v \in V \text{ s.t. } \mathfrak{p}([v, w]) = 0 \quad \forall w \in V \right\} \\
&= \vec{\mathfrak{D}}(g'g, \mathfrak{p}) \cap T_{(g'g, \mathfrak{p})} (\mathbb{G} \times V^{\perp}).
\end{align*}
$$

We conclude that $G$ satisfies conditions (G1), (G2) and (G3) given in §4. This implies that the stratification constructed in Theorem 1.1 has the form given in the statement of Theorem 2.2.
APPENDIX B. PROOFS OF PRELIMINARY RESULTS OF SECTION 3

B.1. **Proof of Proposition 3.2.** Let $\mathfrak{a} \in \mathcal{S}$ be fixed and $E \subset T_{\mathfrak{a}}\mathcal{S}$ a vector space satisfying (3.2), since the result is local we can work in some sufficiently small neighborhood $\mathcal{U}$ of $\mathfrak{a}$ where there exists a metric $g^*$ over $\mathcal{U} \subset T^*M$ such that $E_{\mathfrak{a}}$ is orthogonal to $\ker(\omega_{|\mathcal{S}})_{\mathfrak{a}}$. We denote by $J$ the canonical almost complex structure compatible with the symplectic form $\omega$ and the metric $g^*$. We recall that $J$ induces a linear map from $T_{\mathfrak{a}}(T^*M)$ to itself such that

$$ \omega_{\mathfrak{a}}(\zeta, J(\zeta')) = g_{\mathfrak{a}}^*(\zeta, \zeta') \quad \text{and} \quad J(J(\zeta)) = -\zeta \quad \forall \zeta, \zeta' \in T_{\mathfrak{a}}(T^*M). $$

The form $\omega_{|\mathcal{S}}$ at $\mathfrak{a}$ is a skew-symmetric bilinear form over $T_{\mathfrak{a}}\mathcal{S}$ of dimension $s$ so its kernel has even codimension, that is, it is of the form $2l$ with $l \in \mathbb{N}$, which gives $s - r = 2l$. If $l = 0$ then $\omega_{|\mathcal{S}}$ vanishes identically on $T_{\mathfrak{a}}\mathcal{S}$ and the properties (i)-(iii) are trivial. So suppose that $l > 0$. We consider the orthogonal projection $\pi : T_{\mathfrak{a}}(T^*M) \to T_{\mathfrak{a}}\mathcal{S}$ and define the application $J_{\mathcal{S}} : T_{\mathfrak{a}}(T^*M) \to T_{\mathfrak{a}}\mathcal{S}$ by

$$ J_{\mathcal{S}}(\zeta) := \pi(J(\zeta)) \quad \forall \zeta \in T_{\mathfrak{a}}(T^*M), $$

we note that $J_{\mathcal{S}}$ is a linear map (a composition of linear maps) satisfying

$$ (B.1) \qquad \omega_{\mathfrak{a}}(\zeta, \zeta') = g_{\mathfrak{a}}^*(\zeta', J(\zeta)) = g_{\mathfrak{a}}^*(\zeta', J_{\mathcal{S}}(\zeta)) \quad \forall \zeta, \zeta' \in T_{\mathfrak{a}}\mathcal{S}. $$

In particular, this computation implies that:

(P1) $J_{\mathcal{S}}(\zeta) \in E_{\mathfrak{a}}$ for all $\zeta \in T_{\mathfrak{a}}\mathcal{S}$;

(P2) $J_{\mathcal{S}}(\zeta) \neq 0$ for all $\zeta \in E_{\mathfrak{a}} \setminus \{0\}$;

(P3) $\zeta$ and $J_{\mathcal{S}}(\zeta)$ are orthogonal for all $\zeta \in E_{\mathfrak{a}}$.

Note that (B.1) implies that $\zeta \in \ker(\omega_{|\mathcal{S}})_{\mathfrak{a}}$ if, and only if, $J(\zeta)$ belongs to the normal space $N_{\mathfrak{a}}\mathcal{S}$ which has dimension $2n - s$; since $J$ induces an isomorphism over $T_{\mathfrak{a}}(T^*M)$, we conclude that $r \le \min\{2n-s, s\}$, which completes the proof of (i). Moreover, by (P1)-(P3), $J_{\mathcal{S}} : E_{\mathfrak{a}} \to E_{\mathfrak{a}}$ is a linear map with trivial kernel and whose eigenvalues are all complex. Moreover, by the real Jordan decomposition Theorem, there exists a basis $(\bar{\zeta}_1, \bar{\zeta}'_1, \dots, \bar{\zeta}_l, \bar{\zeta}'_l)$ of $E_{\mathfrak{a}}$ such that:

$$ J_{\mathcal{S}}(\bar{\zeta}_i), J_{\mathcal{S}}(\bar{\zeta}'_i) \in \operatorname{Span}\{\bar{\zeta}_1, \bar{\zeta}'_1, \dots, \bar{\zeta}_i, \bar{\zeta}'_i\} \quad \forall i = 1, \dots, l. $$

We now set $\zeta_1 = \bar{\zeta}_1$ and define inductively the vectors $\zeta'_1, \dots, \zeta_l, \zeta'_l$ by ($| \cdot |$ stands for the norm associated with $g^*$ in $T_{\mathfrak{a}}(T^*M)$)

$$ \zeta'_i := \bar{\zeta}'_i - \sum_{j=1}^{i} \frac{g_{\mathfrak{a}}^*(\bar{\zeta}'_i, \zeta_j)}{|\zeta_j|^2} \zeta_j - \sum_{j=1}^{i-1} \frac{g_{\mathfrak{a}}^*(\bar{\zeta}'_i, \zeta'_j)}{|\zeta'_j|^2} \zeta'_j $$

$$ \zeta_i := \bar{\zeta}_i - \sum_{j=1}^{i-1} \frac{g_{\mathfrak{a}}^*(\bar{\zeta}_i, \zeta_j)}{|\zeta_j|^2} \zeta_j - \sum_{j=1}^{i-1} \frac{g_{\mathfrak{a}}^*(\bar{\zeta}_i, \zeta'_j)}{|\zeta'_j|^2} \zeta'_j $$

By construction, $(\zeta_1, \zeta'_1, \dots, \zeta_l, \zeta'_l)$ is an orthogonal basis (in respect to $g_{\mathfrak{a}}^*$) and we have

$$ J_{\mathcal{S}}(\zeta_i), J_{\mathcal{S}}(\zeta'_i) \in \operatorname{Span}\{\bar{\zeta}_1, \bar{\zeta}'_1, \dots, \bar{\zeta}_i, \bar{\zeta}'_i\} = \operatorname{Span}\{\bar{\zeta}_1, \bar{\zeta}'_1, \dots, \bar{\zeta}_i, \bar{\zeta}'_i\} \quad \forall i = 1, \dots, l. $$

Then, for every $i < j$, we may apply (B.1) in order to get

$$ (B.2) \qquad \omega_{\mathfrak{a}}(\zeta_i, \zeta_j) = \omega_{\mathfrak{a}}(\zeta_i, \zeta'_j) = \omega_{\mathfrak{a}}(\zeta'_i, \zeta_j) = \omega_{\mathfrak{a}}(\zeta'_i, \zeta'_j) = 0 $$

and, therefore

$$ \omega_{\mathfrak{a}}^l(\zeta_1, \zeta'_1, \dots, \zeta_l, \zeta'_l) = 2^l l! \omega_{\mathfrak{a}}(\zeta_1, \zeta'_1) \cdots \omega_{\mathfrak{a}}(\zeta_l, \zeta'_l). $$

For each $i = 1, \dots, l$, $\zeta_i$ belongs to $E_{\mathfrak{a}}$ so there is a vector $\xi$ such that $\omega_{\mathfrak{a}}(\zeta_i, \xi) \neq 0$, which by (B.2) implies that $\omega_{\mathfrak{a}}(\zeta_i, \zeta'_i) \neq 0$. Then we infer that $\omega_{\mathfrak{a}}^l(\zeta_1, \zeta'_1, \dots, \zeta_l, \zeta'_l) \neq 0$ which proves that $\omega^l$ is a volume form over $E_{\mathfrak{a}}$. Since $T_{\mathfrak{a}}\mathcal{S} = E_{\mathfrak{a}} \oplus \ker(\omega_{|\mathcal{S}})_{\mathfrak{a}}$, we conclude that $\omega^{l+1}$ is zero over $T_{\mathfrak{a}}\mathcal{S}$, which concludes the proof of the lemma.
B.2. **Proof of Proposition 3.3.** The spaces $\tilde{\mathcal{I}}(\mathbf{a})$ with $\mathbf{a} \in \mathcal{S}$ are isotropic by definition. Let $\tilde{Z}^1, \tilde{Z}^2$ be two smooth vector fields in $\tilde{\mathcal{I}}$, and $\tilde{Z}$ a smooth vector field on $\mathcal{S}$. The invariant formula for exterior derivatives (see [25, Proposition 12.19 p. 311]) yields

$$0 = d\omega|_{\mathcal{S}}(\tilde{Z}^1, \tilde{Z}^2, \tilde{Z}) = \tilde{Z}^1 \cdot \omega|_{\mathcal{S}}(\tilde{Z}^2, \tilde{Z}) - \tilde{Z}^2 \cdot \omega|_{\mathcal{S}}(\tilde{Z}^1, \tilde{Z}) + \tilde{Z} \cdot \omega|_{\mathcal{S}}(\tilde{Z}^1, \tilde{Z}^2) \\ - \omega|_{\mathcal{S}}([\tilde{Z}^1, \tilde{Z}^2], \tilde{Z}) + \omega|_{\mathcal{S}}([\tilde{Z}^1, \tilde{Z}], \tilde{Z}^2) - \omega|_{\mathcal{S}}([\tilde{Z}^2, \tilde{Z}], \tilde{Z}^1).$$

By assumption, we have

$$(\omega|_{\mathcal{S}})_{\mathbf{a}}(\tilde{Z}^1(\mathbf{a}), \zeta) = (\omega|_{\mathcal{S}})_{\mathbf{a}}(\tilde{Z}^2(\mathbf{a}), \zeta) = 0 \quad \forall \mathbf{a} \in \mathcal{S}, \forall \zeta \in T_{\mathbf{a}}\mathcal{S}.$$

We infer that $\omega|_{\mathcal{S}}([\tilde{Z}^1, \tilde{Z}^2], \tilde{Z}) = 0$ which shows that $[\tilde{Z}^1, \tilde{Z}^2](\mathbf{a})$ belongs to the kernel of $\omega|_{\mathcal{S}}$ for all $\mathbf{a} \in \mathcal{S}$, so that $\tilde{\mathcal{I}}$ is integrable with isotropic leaves.

B.3. **Proof of Proposition 3.4.** Let $\gamma: [0, 1] \to M$ be an absolutely continuous curve which is horizontal with respect to $\Delta$, let $u \in \mathcal{U}^x$ with $x := \gamma(0)$, be such that $\gamma = x(\cdot; x, u)$, and $y := \gamma(1)$ be fixed. By the proof of [33, Proposition 1.11 p.21]), for each $p \neq 0$ in $T_y^*M$ such that

$$p \cdot d_u E^x(v) = 0 \quad \forall v \in L^2([0, 1], \mathbb{R}^k),$$

the absolutely continuous arc $\psi: [0, 1] \to T^*M$ defined as the unique solution of the Cauchy problem

$$\dot{\psi}(t) = \sum_{i=1}^{k} u_i(t) \tilde{h}^i(\psi(t)) \quad \text{for a.e. } t \in [0, 1], \quad \psi(1) = (y, p)$$

never intersects the zero section of $T^*M$ and satisfies $\pi(\psi) = \gamma$ and

$$h^i(\psi(t)) = 0 \quad \forall t \in [0, 1], \forall i = 1, \dots, k.$$

On the other hand, any absolutely continuous solution $\psi: [0, 1] \to \Delta^\perp$ of

$$\dot{\psi}(t) = \sum_{i=1}^{k} u_i(t) \tilde{h}^i(\psi(t)) \quad \text{for a.e. } t \in [0, 1]$$

such that $\pi(\psi) = \gamma$ satisfies $\psi(t) \in (\mathrm{Im}(D_u E^x))^{\perp}$ for all $t \in [0, 1]$ and moreover it vanishes for some $t \in [0, 1]$ if and only if it is equal to zero for all $t \in [0, 1]$. This shows that for every $p \in T_y^*M \setminus \{0\}$, (i) is equivalent to (ii).

To prove that (ii) and (iii) are equivalent, we note that

$$T_a \Delta^{\perp} = (\tilde{\Delta}(\mathbf{a}))^{\omega} \quad \forall \mathbf{a} \in \Delta^{\perp}.$$

As a matter of fact, if $\Delta$ is locally generated by $m$ vector fields $X^1, \dots, X^m$, then any vector $\zeta \in T_a(T^*M)$ satisfying $\zeta \cdot h^i(\mathbf{a}) = 0$ for some $i = 1, \dots, m$, verifies $\omega_a(\zeta, \tilde{h}^i) = 0$. This shows that $T_a\Delta^\perp$ is contained in the symplectic complement of $\tilde{\Delta}(\mathbf{a})$ and both spaces have the same dimension $2n - m$. Therefore, we have

$$(B.3) \qquad \ker (\omega_{\mathbf{a}}^{\perp}) = (T_{\mathbf{a}}\Delta^{\perp})^{\omega} \cap T_{\mathbf{a}}\Delta^{\perp} = \tilde{\Delta}(\mathbf{a}) \cap T_{\mathbf{a}}\Delta^{\perp} \quad \forall \mathbf{a} \in \Delta^{\perp}.$$

We infer that an absolutely continuous curve $\psi: [0, 1] \to \Delta^\perp$ is horizontal with respect to $\tilde{\Delta}$ if and only if it satisfies $\dot{\psi}(t) \in \ker(\omega_{\psi(t)}^\perp)$ for almost every $t \in [0, 1]$. This shows that (ii) $\Leftrightarrow$ (iii).
B.4. **Proof of Proposition 3.5.** Let $\mathfrak{a} = (x, p)$ in local coordinates in $\Delta^\perp$ and $X^1, \dots, X^m$ a generating family of $\Delta$ in a neighborhood of $x$ be fixed, then for any vector $\zeta = \sum_{i=1}^m u_i \tilde{h}^i(\mathfrak{a}) \in \bar{\Delta}(\mathfrak{a})$, the vector field

$$ \zeta := \sum_{i=1}^{m} u_i \tilde{h}^i $$

is a local section of $\bar{\Delta}$. Then $\zeta$ is tangent to $\Delta^\perp$ at $\mathfrak{a}$ if and only if there holds for every $i = 1, \dots, m$,

$$ 0 = (\zeta \cdot h^i)(\mathfrak{a}) = \left( \sum_{j=1}^{m} u_j \tilde{h}^j(\mathfrak{a}) \cdot h^i \right) (\mathfrak{a}) = \sum_{j=1}^{m} u_j h^{ij}(\mathfrak{a}) = (\mathcal{L}_{\mathfrak{a}}^2(\zeta))_i, $$

where we used (3.6). We conclude by (3.5).

B.5. **Proof of Proposition 3.6.** Let $\gamma : [0, 1] \to M$ be a singular horizontal path with respect to $\Delta$ be fixed. By compactness of $\gamma([0, 1])$ there are finitely many times $\tau^0, \dots, \tau^N \in [0, 1]$, with

$$ \tau^0 = 0 < \tau^1 < \dots < \tau^N = 1 \quad \text{and} \quad [0, 1] = \bigcup_{j=1}^{N} [\tau^{j-1}, \tau^j], $$

such that for every $j = 1, \dots, N$, there is a local set of coordinates in an open neighborhood $\mathcal{V}^j \subset M$ of $\gamma([\tau^{j-1}, \tau^j])$ such that we have coordinates $(z, q)$ in $T^*\mathcal{V}^j = \mathcal{V}^j \times (\mathbb{R}^n)^*$ and such that $\Delta$ is generated by $m$ vector fields $X^{j,1}, \dots, X^{j,m}$ in $\mathcal{V}^j$, and let $u^j \in L^2([\tau^{j-1}, \tau^j], \mathbb{R}^m)$ be such that

$$ \dot{\gamma}(t) = \sum_{i=1}^{k} u_i^j(t) X^{j,i}(\gamma(t)) \quad \text{for a.e. } t \in [\tau^{j-1}, \tau^j]. $$

Assume that $\gamma$ has minimal rank. The path $\gamma$ can be expressed as a concatenation of the paths $\gamma_{[\tau^0, \tau^1]}, \dots, \gamma_{[\tau^0, \tau^1]}$, so each of them also has minimal rank (see Remark 3.7 and [33, Proposition 1.9]) or, in other words, the horizontal paths $\gamma^1, \dots, \gamma^N : [0, 1] \to M$ defined by

$$ \gamma^j(t) := \gamma \left( \tau^{j-1} + \frac{t - \tau^{j-1}}{\tau^j - \tau^{j-1}} \right) \quad \forall t \in [0, 1], \forall j = 1, \dots, N, $$

have minimal rank. Hence, we need to show that each path $\gamma^j$ satisfies (3.7). So, we fix $j \in \{1, \dots, N\}$, we set $\bar{\gamma} := \gamma^j$, $\bar{x} := \bar{\gamma}(0)$, $\bar{y} := \bar{\gamma}(1)$ and we denote by $\bar{u} \in L^2([0, 1], \mathbb{R}^m)$ the (unique) control associated with $\bar{\gamma}$ and the family $X^{j,1}, \dots, X^{j,m}$, so that $\bar{y} = E^{\bar{x}}(\bar{u})$ ($E^{\bar{x}}$ is the End-Point Mapping from $\bar{x}$ associated with $X^{j,1}, \dots, X^{j,m}$, see Section 3.2). By (3.4), we have $\mathrm{Im}(d_{\bar{u}}E^{\bar{x}}) = \Delta(\bar{y})$, so there are $n-m$ linearly independent covectors $\bar{p}^1, \dots, \bar{p}^{n-m}$ in $\Delta_{\bar{y}}^\perp$ such that

$$ (B.4) \qquad \Delta_{\bar{y}}^{\perp} \cup \{0\} = \mathrm{Span} \{\bar{p}^1, \dots, \bar{p}^{n-m}\} $$

and

$$ \bar{p}^i \in (\mathrm{Im}(d_{\bar{u}}E^{\bar{x}}))^{\perp} \quad \forall i = 1, \dots, n-m. $$

By Proposition 3.4, for every $i = 1, \dots, n-m$, there is an abnormal lift $\bar{\psi}^i : [0, 1] \to \Delta^\perp$ of $\bar{\gamma}$ such that $\bar{\psi}^i(1) = (\bar{y}, \bar{p}^i)$. Let $\mathcal{T} \subset [0, 1]$ be the set of times of full measure such that $\bar{\psi}^1, \dots, \bar{\psi}^{n-m}$ are all differentiable. Then, for every $t \in \mathcal{T}$, we have $\dot{\bar{\psi}}^i(t) \in \bar{\Delta}(\bar{\psi}^i(t))$ for all $i = 1, \dots, n-m$, which implies, by linearity of $\bar{\Delta}$ in the fibers over $\bar{\gamma}$, that for every $\lambda = (\lambda_1, \dots, \lambda_{n-m}) \in \mathbb{R}^{n-m} \setminus \{0\}$, the absolutely continuous curve $\bar{\psi}^\lambda : [0, 1] \to \Delta^\perp$ defined by

$$ \bar{\psi}^{\lambda}(t) := \left( \bar{\gamma}(t), \sum_{i=1}^{n-m} \lambda_i \bar{p}^i(t) \right) \quad \forall t \in [0, 1] $$
is an abnormal lift of $\tilde{\gamma}$ satisfying (cf. (3.5))

$$ \dot{\bar{\psi}}^{\lambda}(t) \in \bar{\Delta}(\bar{\psi}^{\lambda}(t)) \cap T_{\bar{\psi}^{\lambda}(t)}\Delta^{\perp} = \ker(\omega_{\bar{\psi}^{\lambda}(t)}^{\perp}) \quad \text{for a.e. } t \in [0, 1]. $$

The property (B.4) shows that for every $t \in [0, 1]$, the covectors $\bar{\psi}^1(t), \dots, \bar{\psi}^{n-m}(t)$ are linearly independent and span $\Delta_{\tilde{\gamma}(t)}^{\perp} \cup \{0\}$. Thus, we infer that

$$ \dot{\tilde{\gamma}}(t) = \bigcap_{\lambda \in \mathbb{R}^{n-m} \setminus \{0\}} \pi_* \left( \dot{\bar{\psi}}^{\lambda}(t) \right) \subset \bigcap_{a \in \Delta_{\tilde{\gamma}(t)}^{\perp}} \pi_* (\ker(\omega_a^{\perp})) \quad \text{for a.e. } t \in [0, 1]. $$

Assume now that (3.7) holds, set $\tau := \tau^{N-1}$, $y := \gamma(1)$, and let us show that for every $p \in \Delta_y^{\perp}$ there is an absolutely continuous curve $\psi : [\tau, 1] \to \Delta^{\perp}$ with $\psi(1) = (y, p)$ such that $\pi(\psi) = \gamma$ and $\dot{\psi}(t) \in \ker(\omega_{\psi(t)}^{\perp})$ for almost every $t \in [\tau, 1]$. Before proceeding, we set for almost every $t \in [\tau, 1]$,

$$ \zeta(t, q) := \sum_{i=1}^{m} u_i(t) \bar{h}^i(\gamma(t), q) \in \bar{\Delta}(\gamma(t), q) \quad \forall q \in T_{\gamma(t)}^* M $$

and we observe that if $q$ belongs to $\Delta_{\gamma(t)}^{\perp}$, then by (3.7) and Proposition 3.5 it is the only vector of $\ker(\mathcal{L}_{(\gamma(t),q)}^2) = \ker(\omega_{(\gamma(t),q)}^{\perp})$ which projects onto $\dot{\gamma}(t)$, so by (3.5), we have

$$ \zeta(t, q) \in T_{(\gamma(t),q)} \Delta^{\perp} \quad \forall q \in \Delta_{\gamma(t)}^{\perp}, \text{ for a.e. } t \in [\tau, 1]. $$

As a consequence, if we consider the smooth function $f : T^*\mathcal{V} \to [0, \infty)$ given by

$$ f(a) := d((z, q), \Delta^{\perp})^2 \quad \forall (z, q) \in T^*\mathcal{V} = \mathcal{V} \times (\mathbb{R}^n)^*, $$

where $d(\cdot, \Delta^{\perp})$ stand for the distance to $\Delta^{\perp}$ in $T^*\mathcal{V}$ equipped with the Euclidean metric, then we may assume without loss of generality that there is a constant $K > 0$ such that

$$ (B.5) \quad |\langle \nabla_{(\gamma(t),q)} f, \zeta(t,q) \rangle| \le K f(\gamma(t),q) |u(t)| |q| \quad \forall q \in T_{\gamma(t)}^* M, \text{ for a.e. } t \in [\tau, 1]. $$

Then given $p \in \Delta_y^{\perp}$, we consider the solution $\psi = (\gamma(\cdot), p(\cdot)) : [\tau, 1] \to T^*\mathcal{V}$ to the Cauchy problem

$$ \dot{\psi}(t) = \sum_{i=1}^{m} u_i(t) \bar{h}^i(\psi(t)) = \zeta(t, p(t)) \quad \text{for a.e. } t \in [0, 1], \quad \psi(1) = (y, p), $$

and note that by (B.5) we have for almost every $t \in [\tau, 1]$,

$$ \left| \frac{d}{dt} \{ f(\psi(t)) \} \right| = \left| \langle \nabla_{(\gamma(t),p(t))} f, \zeta(t,p(t)) \rangle \right| \le K f(\psi(t)) |u(t)| |p(t)|. $$

Thus, since $f(\psi(1)) = 0$, $u \in L^2([\tau, 1])$ and $p$ is bounded on $[\tau, 1]$, Grönwall's Lemma implies that $f(\psi(t)) = 0$ for all $t \in [\tau, 1]$ which means that $\psi$ is indeed valued in $\Delta^{\perp}$. In conclusion, we have shown (see Proposition 3.4) that the horizontal path $\gamma$ has minimal rank over $[\tau, 1]$. We can conclude by repeating the above proof on the interval $[\tau^{N-2}, \tau^{N-1}]$ (in the case $N \ge 2$) and so on (note that we can always reparametrize the curve $\gamma|_{[0, \tau^j]}$ as a curve on $[0, 1]$ and by doing this we do not loose (3.7)).

**B.6. Proof of Proposition 3.10.** The result follows from standard methods in subanalytic geometry, and we provide the main ideas. We start by recalling a useful stratification result for maps. Recall that, given two subanalytic sets $A$ and $B$, we say that a map $f : A \to B$ is subanalytic if its graph is subanalytic.

**Theorem B.1** (Stratification of Maps, see e.g. [17, Page 43]). Suppose that $A$ and $B$ are subanalytic subsets of real-analytic manifolds $M$ and $N$, and consider a proper subanalytic map $f : A \to B$. Then there exist Whitney subanalytic stratifications $\mathcal{R}$ of $A$ and $\mathcal{S}$ of $B$ such that $f$ is a stratified map, that is, the pre-image $f^{-1}(S_{\alpha})$ of each stratum $S_{\alpha}$ is a union of strata $\mathcal{R}_{\beta}$ and $f|_{\mathcal{R}_{\beta}} : \mathcal{R}_{\beta} \to S_{\alpha}$ is an analytic submersion. Furthermore, if $\mathcal{R}'$ and $\mathcal{S}'$ are Whitney
subanalytic stratification of A and B, then $\mathcal{R}$ and $\mathcal{S}$ can be chosen as refinements of $\mathcal{R}'$ and $\mathcal{S}'$ respectively.

**Remark B.2.** By Thom's First Isotopy Lemma, see e.g. [17, Page 41], over each stratum $S_\alpha$ the restriction of $f$, $f^{-1}(S_\alpha) \to S_\alpha$, is locally topologically trivial. This implies that the dimension of the fibers of $f$ is constant over $S_\alpha$ (recall that the strata are connected by definition).

*Proof of Proposition 3.10.* To establish (i) it suffices to show that the subset of points of $M$ of given rank $r$ (i.e. the dimension of $\Delta(x)$) is subanalytic. Moreover, it suffices to do it for $r > 0$. Therefore, in what follows we consider $TN$ with the zero section removed, that we denote by $TN \setminus N$. Let $\Delta^*$ denote the trace of $\Delta$ on $TN \setminus N$.

Let $\pi: TN \setminus N \to N$ be the canonical projection. Consider the projective tangent bundle $\mathbb{P}TN$ and note that $\pi$ factors $\pi = \pi_2 \circ \pi_1$, where $\pi_1: TN \setminus N \to \mathbb{P}TN$ and $\pi_2: \mathbb{P}TN \to N$ denote the projections. Clearly $\pi_2$ is proper. Since $\Delta(x)$ is a vector subspace of $T_xN$, we conclude that $\pi_1(\Delta^*)$ is a closed subanalytic subset of $\mathbb{P}TN$. Indeed, to see it, one may use the sphere bundle $\mathbb{S}TN$ and a sequence of projections $TN \setminus N \to \mathbb{S}TN \to \mathbb{P}TN$. The projection of $\Delta^*$ to $\mathbb{S}TN$ equals the intersection $\Delta^* \cap \mathbb{S}TN$ and therefore is subanalytic and the projection $\mathbb{S}TN \to \mathbb{P}TN$ is proper and preserves the subanalytic sets.

By Theorem B.1 applied to $A = \pi_1(\Delta^*)$, $B = N$ and $f = (\pi_2)|_A$, we obtain subanalytic stratifications $(\mathcal{R}_\beta)$ and $(S_\alpha)$ of $A$ and $B$ respectively, such that $(\pi_2)|_{\pi^{-1}(S_\alpha \cap A)}$ is a stratified submersion; we may suppose that the strata of $\mathcal{S}$ are all connected. We conclude by Remark B.2 that the dimension of $\Delta$ is constant along $S_\alpha$, thus completing the proof of (i). Note that any refinement of thus obtained $\mathcal{S}$ also satisfies property (i).

Now, let $B_0$ be a stratum of maximal dimension. We first show that, apart from refining the stratification $\mathcal{S}$, we may suppose that property (ii) holds over $B_0$. Let $d$ be the dimension of $\Delta$ over $B_0$ and we suppose $d > 0$. Consider the map

$$ \varphi: \mathbb{P}[(TN)^d] \to \mathbb{P}(\wedge^d TN) $$

that associates to $d$ nonzero vectors of $T_xN$ its exterior product. This map is proper and analytic and therefore the image $\varphi([\mathbb{P}(\Delta)]^d)$, denoted by $G(\Delta)$, by this map is subanalytic. In what follows we identify the Grassmannian Grass$(d, TN)$ with an analytic submanifold of $\mathbb{P}(\wedge^d TN)$ via the Plücker embedding. Thus the image of $\varphi([\mathbb{P}(\Delta_x)]^d)$, for $x \in B_0$, denoted $G(\Delta_x)$, is a point of Grass$(d, TN)$. Let $G_{B_0}(\Delta) := \bigcup_{x \in B_0} G(\Delta_x)$. It now follows that the restriction of the projection $\pi': \text{Grass}(d, TB_0) \to B_0$ to $G_{B_0}(\Delta)$ is a continuous proper subanalytic bijection. The claim now follows from Theorem B.1 applied to $A = \overline{G_{B_0}(\Delta)}$, $B = \overline{B_0}$ and $f = \pi'|_A$.

Now, let $S_k$ be the union of all strata of $\mathcal{S}$ of codimension $k$ in $N$. Note that property ii) is satisfied over $S_0$ by the previous paragraph. Suppose by induction that property ii) is satisfied over $S_k$ for every $k < k_0$, and let us show the existence of a refinement of $\mathcal{S}$ so that property ii) is satisfied over $S_k$ for every $k \le k_0$. We show this by repeating the arguments of the previous two paragraphs. Indeed, the intersection $\Sigma_{k_0} = \pi_1(\Delta) \cap \pi_1(\overline{TS_{k_0}})$ is a closed subanalytic subset of $\mathbb{P}TN$ and therefore there is a refinement of $\mathcal{S}$ such that over its strata the dimension $\pi_1(\Delta) \cap \pi_1(\overline{TS_{k_0}})$ is constant. Then we repeat the argument of the second paragraph to obtain condition (ii) for $\pi_1(\Delta) \cap \pi_1(\overline{TS_{k_0}})$ over $S_{k_0}$. $\square$

## APPENDIX C. PROOF OF THEOREM 2.1

### C.0.1. Proof of (i).

$$ \Delta_{min} = \{ (x, \xi) \in TM \mid \forall \mathfrak{a} = (x, p) \in \Delta^{\perp}, \exists (\xi, \eta) \in \ker(\omega_{\mathfrak{a}}^{\perp}) \}. $$

We start by proving that $\Delta_{min}$ is subanalytic with closed graph. Since these properties are local, we may identify $M$ with an open ball of $\mathbb{R}^n$, and $TM$ with a locally trivial product $M \times V = M \times \mathbb{R}^n$. We can now identify $\Delta^{\perp}$ with a product $M \times U = M \times (\mathbb{R}^{n-k} \setminus \{0\})$, where $k$ is the rank of $\Delta$, so that

$$ T\Delta^{\perp} \cong M \times U \times V \times W = M \times (\mathbb{R}^{n-k} \setminus \{0\}) \times \mathbb{R}^n \times \mathbb{R}^{n-k}, $$
and $\ker(\omega^{\perp})$ is a closed subanalytic subset of $T\Delta^{\perp}$. Moreover, this subanalytic subset is linear subspace of $V \times W$ and is invariant by dilation in $U$, so that it gives rise to a subanalytic set $\mathbb{P}(\ker(\omega^{\perp}))$ of

$$M \times \mathbb{P}(U) \times \mathbb{P}(V \times W) = M \times \mathbb{P}_{\mathbb{R}}^{n-k-1} \times \mathbb{P}_{\mathbb{R}}^{2n-k-1}$$

and we consider the associated distribution

$$\mathbb{P}(\Delta_{min}) := \{(x, \vec{v}) \in M \times \mathbb{P}(V); \forall p \in \mathbb{P}(U) \exists \vec{w} \in \mathbb{P}(W) \text{ s.t. } (x, p, [\vec{v}: \vec{w}]) \in \mathbb{P}(\ker(\omega^{\perp}))\}.$$

Firstly note that $\Delta_{min}$ is subanalytic with closed graph if and only if $\mathbb{P}(\Delta_{min})$ is subanalytic with closed graph. Secondly we know that $\mathbb{P}(\Delta_{min})$ has closed graph because $\mathbb{P}(V)$ is compact and $\ker(\omega^{\perp})$ is never tangent to the fibers of the canonical projection $\pi: \Delta^{\perp} \to M$, c.f. §§3.2, that is, $(x, p, [0: \vec{w}])$ never belongs to $\mathbb{P}(\ker(\omega^{\perp}))$. Finally, $\mathbb{P}(\Delta_{min})$ is subanalytic since it is definable in the language of global subanalytic sets.

Now, by Proposition 3.10, there exists a subanalytic Whitney stratification $\mathcal{R} = (\mathcal{R}_{\beta})$ of $M$ such that $\Delta_{min}$ and the distribution $\mathcal{H}$ defined in Theorem 2.1 (i) have constant rank over each stratum. Apart from refining this stratification, we may suppose that it is compatible with the subanalytic set $\pi(S_0)$, where $S_0$ is given by Theorem 1.1 and $\pi: T^*M \to M$ is the canonical projection (recall that the projection is subanalytic because $S_0$ is invariant by dilation), completing the proof.

### C.0.2. Proof of (ii).
Fix a point $x \in \mathcal{R}_0$ and consider two vector-fields $Z^1$ and $Z^2$ defined in some open neighborhood $\mathcal{V}$ of $x$ in $\mathcal{R}_0$ which are everywhere tangent to $\mathcal{H}$. It is enough to show that $[Z^1, Z^2](x)$ is a vector which belongs to $\mathcal{H}(x)$. Indeed, since $Z^k \in \Delta$, there exists locally defined real-analytic functions $A_i(x)$ such that:

$$Z^k = \sum_{i=1}^{m} A_i^k(x) X^i, \quad \text{and let} \quad Y^k := \sum_{i=1}^{m} A_i^k(x) \vec{h}^i.$$

where $\Delta$ is locally generated by the span of the $X^i$ and $\vec{h}^i = \vec{h}^{X^i}$, cf. §§3.1. Since $Z^1$ and $Z^2 \in \Delta_{min}$, we conclude that the restriction of $Y^1$ and $Y^2$ to $\Delta^{\perp} \cap T^*\mathcal{V}$, which we denote by $\mathcal{Y}^1$ and $\mathcal{Y}^2$, are everywhere tangent to $\ker(\omega^{\perp})$. Next, since $\mathcal{R}$ is compatible with $\mathcal{S}$, we conclude that $\pi^{-1}(\mathcal{R}_0) \cap \mathcal{S}_0$ is open and dense in $\pi^{-1}(\mathcal{R}_0) \cap \Delta^{\perp}$. Now, note that at every point $(x, p) \in \mathcal{S}_0 \cap T^*\mathcal{V}$, we know that $[\mathcal{Y}^1, \mathcal{Y}^2]$ belongs to $\ker(\omega^{\perp})$, since $\ker(\omega^{\perp})|_{\mathcal{S}_0} = \vec{K}|_{\mathcal{S}_0}$ is integrable. Moreover, recall that $\ker(\omega^{\perp})$ is a distribution with closed graph and that the Lie-bracket $[\mathcal{Y}^1, \mathcal{Y}^2]$ is an analytic vector-field. We infer that the Lie bracket of $\mathcal{Y}^1$ and $\mathcal{Y}^2$ is contained in $\ker(\omega^{\perp})$ on $\pi^{-1}(x) \cap \Delta^{\perp}$ which concludes the proof of (ii).

### C.0.3. Proof of (iii).
By Proposition 3.6, if $\gamma: [0, 1] \to M$ is a minimal rank singular horizontal path with respect to $\Delta$, then

$$(C.1) \qquad \dot{\gamma}(t) \in \bigcap_{a \in T_{\gamma(t)}^* M \cap \Delta^{\perp}} \pi_* (\ker(\omega^{\perp}(a))) = \Delta_{min}(\gamma(t)) \supset \mathcal{H}(\gamma(t))$$

for a.e. $t \in [0, 1]$, where the previous inclusions are equality when $\gamma(t) \in \mathcal{R}_0$ by construction. Let $\mathcal{D} \subset [0, 1]$ be the set of differentiability points of $\gamma$, for every $\beta$, let

$$\mathcal{T}_{\beta} := \{t \in \mathcal{D} | \gamma(t) \in \mathcal{R}_{\beta}\}.$$

Each set $\mathcal{T}_{\beta}$ is measurable, for each $\beta$ denote by $\bar{\mathcal{T}}_{\beta}$ the set of density points of $\mathcal{T}_{\beta}$ and the empty set if $\mathcal{L}^1(\bar{\mathcal{T}}_{\beta}) = 0$. By construction, the union $\cup_{\beta} \bar{\mathcal{T}}_{\beta}$ has full measure in $[0, 1]$. If $t$ belongs to $\bar{\mathcal{T}}_{\beta}$ then $\dot{\gamma}(t)$ belongs to $\Delta_{min}(\gamma(t))$ and since $t$ is a point of density of $\mathcal{T}_{\beta}$ there is a sequence of
times {$t_k$}$_k$ converging to $t$ such that $\gamma(t_k) \in \mathcal{R}_\beta$ for all $k$. So, taking a local chart if necessary and by regularity of $\mathcal{R}_\beta$, we obtain (because $\gamma(t)$ and all $\gamma(t_k)$ belong to $\mathcal{R}_\beta$)

$$ \dot{\gamma}(t) = \lim_{k \to \infty} \frac{\gamma(t_k) - \gamma(t)}{t_k - t} \in T_{\gamma(t)} \mathcal{R}_{\beta}, $$

which, by (C.1), concludes the proof of (iii).

C.0.4. *Proof of (iv).* By construction, for every $x \in M$,

$$ \dim \mathcal{H}(x) \leq \min \{\dim (\ker(\omega_a^\perp)); a = (x, p) \in \Delta^\perp\}. $$

The result over $\mathcal{R}_0$ follows directly from Theorem 1.1(iv). If we have $\dim \mathcal{H}|_{\mathcal{R}_\alpha} = m$ for another stratum $\mathcal{R}_\alpha$, then $\Delta \cap T\mathcal{R}_\alpha$ has constant dimension $m$. Since the dimension of $\mathcal{R}_\alpha$ is smaller than $n$, this contradicts the fact that $\Delta$ is bracket generating.

## REFERENCES

[1] Andrei Agrachev, Davide Barilari, and Ugo Boscain. *A comprehensive introduction to sub-Riemannian geometry*, volume 181 of *Cambridge Studies in Advanced Mathematics*. Cambridge University Press, Cambridge, 2020. From the Hamiltonian viewpoint, With an appendix by Igor Zelenko.

[2] Andrei A. Agrachev. Some open problems. In *Geometric control theory and sub-Riemannian geometry*, volume 5 of Springer INdAM Ser., pages 1–13. Springer, Cham, 2014.

[3] Álvaro del Pino and Tobias Shin. Microflexibility and local integrability of horizontal curves, 2020.

[4] Z. Badreddine. Mass transportation on sub-Riemannian structures of rank two in dimension four. *Ann. Inst. H. Poincaré C Anal. Non Linéaire*, 36(3):837–860, 2019.

[5] D. Barilari, Y. Chitour, F. Jean, D. Prandi, and M. Sigalotti. On the regularity of abnormal minimizers for rank 2 sub-Riemannian structures. *J. Math. Pures Appl. (9)*, 133:118–138, 2020.

[6] Sean M. Bates and Carlos G. Moreira. De nouvelles perspectives sur le théorème de Morse-Sard. *C. R. Acad. Sci. Paris Sér. I Math.*, 332(1):13–17, 2001.

[7] André Bellaïche. The tangent space in sub-Riemannian geometry. In *Sub-Riemannian geometry*, volume 144 of *Progr. Math.*, pages 1–78. Birkhäuser, Basel, 1996.

[8] A. Belotto da Silva, A. Figalli, A. Parusiński, and L. Rifford. Strong Sard conjecture and regularity of singular minimizing geodesics for analytic sub-Riemannian structures in dimension 3. *Invent. Math.*, 229(1):395–448, 2022.

[9] A. Belotto da Silva, A. Parusiński, and L. Rifford. Analytic minimal rank sard conjecture.

[10] A. Belotto da Silva, A. Parusiński, and L. Rifford. Abnormal singular foliations and the sard conjecture for generic co-rank one distributions, 2023.

[11] André Belotto da Silva and Ludovic Rifford. The Sard conjecture on Martinet surfaces. *Duke Math. J.*, 167(8):1433–1471, 2018.

[12] Edward Bierstone and Pierre D. Milman. Semianalytic and subanalytic sets. *Inst. Hautes Études Sci. Publ. Math.*, (67):5–42, 1988.

[13] Francesco Boarotto and Davide Vittone. A dynamical approach to the Sard problem in Carnot groups. *J. Differential Equations*, 269(6):4998–5033, 2020.

[14] Antonio Bove and François Treves. On the Gevrey hypo-ellipticity of sums of squares of vector fields. *Ann. Inst. Fourier (Grenoble)*, 54(5):1443–1475, xv, xxi, 2004.

[15] César Camacho and Alcides Lins Neto. *Geometric theory of foliations*. Birkhäuser Boston, Inc., Boston, MA, 1985. Translated from the Portuguese by Sue E. Goodman.

[16] J. J. Duistermaat and J. A. C. Kolk. *Lie groups*. Universitext. Springer-Verlag, Berlin, 2000.

[17] Mark Goresky and Robert MacPherson. *Stratified Morse theory*, volume 14 of *Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)]*. Springer-Verlag, Berlin, 1988.

[18] Mikhael Gromov. Carnot-Carathédory spaces seen from within. In *Sub-Riemannian geometry*, volume 144 of *Progr. Math.*, pages 79–323. Birkhäuser, Basel, 1996.

[19] Heisuke Hironaka. Subanalytic sets. In *Number theory, algebraic geometry and commutative algebra, in honor of Yasuo Akizuki*, pages 453–493. Kinokuniya Book Store, Tokyo, 1973.

[20] Lucas Hsu. Calculus of variations via the Griffiths formalism. *J. Differential Geom.*, 36(3):551–589, 1992.

[21] Marja Kankaanrinta. On real analytic orbifolds and Riemannian metrics. *Algebr. Geom. Topol.*, 13(4):2369–2381, 2013.

[22] Enrico Le Donne, Gian Paolo Leonardi, Roberto Monti, and Davide Vittone. Extremal curves in nilpotent Lie groups. *Geom. Funct. Anal.*, 23(4):1371–1401, 2013.

[23] Enrico Le Donne, Gian Paolo Leonardi, Roberto Monti, and Davide Vittone. Extremal polynomials in stratified groups. *Comm. Anal. Geom.*, 26(4):723–757, 2018.
[24] Enrico Le Donne, Richard Montgomery, Alessandro Ottazzi, Pierre Pansu, and Davide Vittone. Sard property for the endpoint map on some Carnot groups. *Ann. Inst. H. Poincaré C Anal. Non Linéaire*, 33(6):1639–1666, 2016.

[25] John M. Lee. *Introduction to smooth manifolds*, volume 218 of *Graduate Texts in Mathematics*. Springer-Verlag, New York, 2003.

[26] Antonio Lerario, Luca Rizzi, and Daniele Tiberio. Quantitative approximate definable choices, 2024.

[27] Wensheng Liu and Héctor J. Sussman. Shortest paths for sub-Riemannian metrics on rank-two distributions. *Mem. Amer. Math. Soc.*, 118(564):x+104, 1995.

[28] S. Lojasiewicz. *Ensembles semi-analytiques*. Institut des Hautes Etudes Scientifiques, 1965.

[29] Dusa McDuff and Dietmar Salamon. *Introduction to symplectic topology*. Oxford Mathematical Monographs. The Clarendon Press, Oxford University Press, New York, second edition, 1998.

[30] Richard Montgomery. *A tour of subriemannian geometries, their geodesics and applications*, volume 91 of *Mathematical Surveys and Monographs*. American Mathematical Society, Providence, RI, 2002.

[31] Raghavan Narasimhan. *Analysis on real and complex manifolds*, volume Vol. 1 of *Advanced Studies in Pure Mathematics*. Masson & Cie, Éditeurs, Paris; North-Holland Publishing Co., Amsterdam-London; American Elsevier Publishing Co., Inc., New York, second edition, 1973.

[32] Alessandro Ottazzi and Davide Vittone. On the codimension of the abnormal set in step two Carnot groups. *ESAIM Control Optim. Calc. Var.*, 25:Paper No. 18, 17, 2019.

[33] Ludovic Rifford. *Sub-Riemannian geometry and optimal transport*. SpringerBriefs in Mathematics. Springer, Cham, 2014.

[34] Ludovic Rifford. Singulières minimisantes en géométrie sous-Riemannienne. Number 390, pages Exp. No. 1113, 277–301. 2017. Séminaire Bourbaki. Vol. 2015/2016. Exposés 1104–1119.

[35] Hector J. Sussmann. Smooth distributions are globally finitely spanned. In *Analysis and design of nonlinear control systems*, pages 3–8. Springer, Berlin, 2008.

[36] Héctor J. Sussmann. A regularity theorem for minimizers of real-analytic subriemannian metrics. In *53rd IEEE Conference on Decision and Control*, pages 4801–4806, 2014.

[37] V. S. Varadarajan. *Lie groups, Lie algebras, and their representations*, volume 102 of *Graduate Texts in Mathematics*. Springer-Verlag, New York, 1984. Reprint of the 1974 edition.

[38] I. Zelenko and M. Zhitomirskiǐ. Rigid paths of generic 2-distributions on 3-manifolds. *Duke Math. J.*, 79(2):281–307, 1995.

UNIVERSITÉ PARIS CITÉ AND SORBONNE UNIVERSITÉ, UFR DE MATHÉMATIQUES, INSTITUT DE MATHÉMATIQUES DE JUSSIEU-PARIS RIVE GAUCHE, UMR7586, F-75013 PARIS, FRANCE. INSTITUT UNIVERSITAIRE DE FRANCE (IUF).

Email address: andre.belotto@imj-prg.fr

UNIVERSITÉ CÔTE D'AZUR, CNRS, LABO. J.-A. DIEUDONNÉ, UMR CNRS 7351, PARC VALROSE, 06108 NICE
CEDEX 02, FRANCE

Email address: adam.parusinski@unice.fr

UNIVERSITÉ CÔTE D'AZUR, CNRS, LABO. J.-A. DIEUDONNÉ, UMR CNRS 7351, PARC VALROSE, 06108 NICE
CEDEX 02, FRANCE

Email address: ludovic.rifford@math.cnrs.fr