On conditions for unrectifiability of a metric space

We find necessary and sufficient conditions for a Lipschitz map $f:\mathbb{R}E\to X$, into a metric space to have the image with the $k$-dimensional Hausdorff measure equal zero, $H^k(f(E))=0$. An interesting feature of our approach is that despite the fact that we are dealing with arbitrary metric spaces, we employ a variant of the classical implicit function theorem. Applications include pure unrectifiability of the Heisenberg groups and that of more general Carnot-Carath\'eodory spaces.


Introduction
We say that a metric space (X, d) is countably k-rectifiable if there is a family of Lipschitz mappings f i : A metric space (X, d) is said to be purely k-unrectifiable if for any Lipschitz mapping f : R k ⊃ E → X, where E ⊂ R k is measurable we have H k (f (E)) = 0.
The theory of rectifiable sets plays a significant role in geometric measure theory and calculus of variations. See e.g. [7,18] for results in Euclidean spaces. Recent development of analysis on metric spaces extended this theory to metric spaces. See e.g. [1,2,4,13] and references therein. Considering the importance of this theory, it is reasonable to search for simple geometric conditions which would guarantee that the image of a Lipschitz mapping from a subset of a Euclidean space into a metric spaces would have measure zero. One of the main results of this paper (Theorem 1.1) establishes such conditions. Let f : Z → (X, d) be a mapping between metric spaces and let {y 1 , . . . , y k } ⊂ X be given. The mapping g : Z → R k defined by g(x) = (d(f (x), y 1 ), . . . , d(f (x), y k )) will be called the projection of f associated with the points y 1 , . . . , y k .
A measurable function g : E → R defined in a measurable set E ⊂ R k is said to be approximately differentiable at x ∈ E if there is a measurable set E x ⊂ E and a linear function L : R n → R such that x is a density point of E x and lim Ex∋y→x g(y) − g(x) − L(y − x) |y − x| = 0.
This definition is equivalent with other definitions that one can find in the literature. The approximate derivative L is unique (if it exists) and it is denoted by ap Dg(x). Lipschitz functions g : E → R are approximately differentiable a.e. (by the McShane extension and the Rademacher theorem). In the case of mappings into R k approximate differentiability means approximate differentiability of each component.
Theorem 1.1. Let X be a metric space, let E ⊂ R k be measurable, and let f : E → X be a Lipschitz mapping. Then the following statements are equivalent: (1) H k (f (E)) = 0; (2) For any Lipschitz mapping ϕ : X → R k , we have H k (ϕ(f (E))) = 0; (3) For any collection of distinct points {y 1 , y 2 , . . . , y k } ⊂ X, the associated projection g : E → R k of f satisfies H k (g(E)) = 0; (4) For any collection of distinct points {y 1 , y 2 , . . . , y k } ⊂ X, the associated projection g : E → R k of f satisfies rank (ap Dg(x)) < k for H k -a.e. x ∈ E.
Here H k stands for the k-dimensional Hausdorff measure.
Remark 1.2. It follows from the proof that in conditions (3) and (4) we do not have to consider all families {y 1 , y 2 , . . . , y k } ⊂ X of distinct points, but it suffices to consider such families with points y i taken from a given countable and dense subset of f (E).
The implications from (1) to (2) and from (2) to (3) are obvious. The equivalence between (3) and (4) easily follows from the classical change of variables formula which states that if g : Here J g stands for the Jacobian of g and N g (y, E) is the number of points in the preimage g −1 (y) ∩ E, see e.g. [6,7,10]. Therefore, it remains to prove the implication (4) to (1) which is the most difficult part of the theorem. We will deduce it from another result which deals with Lipschitz mappings into ℓ ∞ , see Theorem 2.2.
Note that in general it may happen for a subset A ⊂ X that H k (A) > 0, but for all Lipschitz mappings ϕ : X → R k , H k (ϕ(A)) = 0. For example the Heisenberg group H n satisfies H 2n+2 (H n ) = ∞, but H 2n+2 (ϕ(H n )) = 0 for all Lipschitz mappings ϕ : H n → R 2n+2 , see [4,Section 11.5]. Hence the implication from (2) to (1) has to use in an essential way the assumption that A = f (E) is a Lipschitz image of a Euclidean set. Since by [4,Section 11.5] the condition (2) is satisfied for H n with k = 2n + 2, we conclude that H n is purely (2n + 2)-unrectifiable. For more general results see Theorem 3.2 in Section 3 and Theorem 5.3 in Section 5. Theorem 1.1 is related to the work of Kirchheim [13] and Ambrosio-Kirchheim [1] on metric differentiability and the general area formula for mappings into arbitrary metric spaces. However, our approach in this paper is elementary and does not involve neither the Kirchheim-Rademacher theorem [13,Theorem 2] nor any kind of the area formula for mappings into arbitrary metric spaces [1, Theorem 5.1].
Although conditions (3) and (4) are necessary and sufficient for the validity of (1), often it is not easy to verify them. The problem is that even if X is smooth, the distance function y → d(y, y i ) is not smooth at y i and we need to consider such distance fucntions for y i from a dense subset of X, thus creating singularities everywhere in X. Actually a collection of such distance functions gives an isometric embedding of X into ℓ ∞ (for a more precise statement see Theorem 2.2 and the proof of Theorem 1.1 which shows how Theorem 1.1 follows from Theorem 2.2). In applications we often deal with spaces X that have some sort of smoothness (like Heisenberg groups or more general Carnot-Carathéodory spaces) and often for such spaces there is a more natural Lipschitz mapping Φ : X → R N , than the embedding into ℓ ∞ , a mapping that takes into account the structure of X. In Section 4 we state a suitable version of Theorem 1.1 (Theorem 4.2) and in Section 5 we show how it applies to Carnot-Carathéodory spaces.
The paper is organized as follows. In Section 2 we prove a version of the Sard theorem for Lipschitz mappings into ℓ ∞ . We also prove Theorem 1.1 as a simple consequence of this result. In Section 3 we provide a new proof of the unrectifiability of the Heisenberg group as a consequence of Theorem 1.1. In the proof we will encounter a problem with the lack of smoothness of the distance of the function y → d(y, y i ). In Section 4 we will generalize Theorem 1.1 in a way that it will easily apply to general Carnot-Carathéodory spaces (including Heisenberg groups). This approach will allow us to avoid singularities of the distance function. Applications will be presented in Section 5.
Our notation is fairly standard. By C we will denote various positive constant whose value may change in a single string of estimates. By writing C = C(k) we mean that the constant C depends on k only. H s will denote the s-dimensional Hausdorff measure. We will also write H k to denote the Lebesgue measure on R k . Sometimes in order to emphasize that the Hausdorff measure is defined with respect to a metric d we will write H s d . If V is a Banach space, then H s V denotes the Hausdorff measure with respect to the norm metric of V . By H s ∞ we will denote the Hausdorff content which is defined as the infimum of ∞ i=1 r s i over all coverings by balls of radii r i . Clearly H s ∞ is an outer measure and H s (A) = 0 if and only if H s ∞ (A) = 0. The barred integral will denote the integral average E f dµ = µ(E) −1 E f dµ. Acknowledgements. We would like to thank J. Pinkman for introducing us to the work of Heisenberg.

Lipschitz mappings into ℓ ∞
A measurable function coincides with a continuous function outside a set of an arbitrarily small measure. This is the Lusin property of measurable functions. The following result due to Federer shows a similar C 1 -Lusin property of a.e. differentiable functions, [22]. (Federer). If f : Ω → R is differentiable a.e. on an open set Ω ⊂ R k , then for any ε > 0 there is a function g ∈ C 1 (R k ) such that The original proof was based on the Whitney extension theorem; for another, more direct, approach, see [16,Theorem 1.69].
In particular if E ⊂ R k is measurable and f : E → R is Lipschitz, then f can be extended to a Lipschitz functionf : R k → R (McShane) to which the above theorem applies. Hence for any ε > 0 there is g ∈ C 1 (R k ) such that Note that at almost all points of the set where f = g we have that ap Df (x) = Dg(x). This holds true at all density points of the set {f = g}.
where the norm in (ℓ ∞ ) k is defined as the supremum over all entries in the k × ∞ matrix. The meaning of the rank of the k × ∞ matrix ap Df (x) is clear; it is the dimension of the linear subspace of R k spanned by the vectors ap Df i (x), i ∈ N. Hence rank (ap Df (x)) ≤ k a.e.
If f : Ω → ℓ ∞ is Lipschitz, where Ω ⊂ R k is open, components of f are differentiable a.e. and we will write Df (x) in place of ap Df (x). The next theorem is the main result of this section. It is a crucial step in the remaining implication (4) to (1) of Theorem 1.1. The proof of Theorem 2.2 is based on ideas similar to those developed in [3, Section 7]. Theorem 2.2. Let E ⊂ R k be measurable and let f : E → ℓ ∞ be a Lipschitz mapping. Then Before we prove this result we will show how to use it to complete the proof of Theorem 1.1.
Proof of Theorem 1.1. As we already pointed out in the Introduction, it remains to prove the implication (4) to (1). Although we do not assume that X is separable, the image f (E) ⊂ X is separable and hence it can be isometrically embedded into ℓ ∞ . More precisely let be a dense subset and let y 0 ∈ f (E). Then it is well-known and easy to prove that the mapping where subscripts indicate metrics with respect to which we define the Hausdorff measures.
, it easily follows from the assumptions that Hence (1) follows from Theorem 2.2.
Thus it remains to prove Theorem 2.2. Before doing this let us make some comments explaining why it is not easy. Theorem 2.2 is related to the Sard theorem for Lipschitz mappings which states that if f : The standard proof of this fact [18,Theorem 7.6] is based on the observation that if rank Df (x) < k, then for any ε > 0 there is r > 0 such that is an affine subspace of R m of dimension less than or equal to k − 1. That means f (B(x, r)) is contained in a thin neighborhood of an ellipsoid of dimension no greater than k − 1 and hence we can cover it by C(L/ε) k−1 balls of radius Cεr, where L is the Lipschitz constant of f . Now we use covering by these balls with the help of Vitali's lemma to estimate the Hausdorff content of the image of the critical set. For more details, see [18,Theorem 7.6].
The proof described above employs the fact that f is Frechet differentiable and hence this argument cannot be applied to the case of mappings into ℓ ∞ , because in general Lipschitz mappings into ℓ ∞ are not Frechet differentiable, i.e. in general the image of f (B(x, r) ∩ E) is not well approximated by the tangent mapping ap Df (x). To overcome this difficulty we need to investigate the structure of the set {ap Df (x) < k} using arguments employed in the proof of the general case of the Sard theorem for C n mappings, [20]. In particular we will need to use a version of the implicit function theorem.
In the proof of Theorem 2.2 we will also need the following result which is of independent interest. Proposition 2.3. Let D ⊂ R k be a bounded and convex set with non-empty interior and let f : D → ℓ ∞ be an L-Lipschitz mapping. Then In particular if D is a cube or a ball, then Proof. We will need two well-known facts.
For the next lemma see for example [6,Lemma 7.16].
Lemma 2.5. If D ⊂ R k is a bounded and convex set with non-empty interior and if u : D → R is Lipschitz continuous, then and the result follows upon taking supremum over all x, y ∈ D.
Proof of Theorem 2.2. The implication from left to right is easy. Suppose that H k (f (E)) = 0. For any positive integers i 1 < i 2 < . . . < i k the projection is Lipschitz continuous and hence the set has H k -measure zero. It follows from the change of variables formula (1.1) that the matrix [∂f i j /∂x ℓ ] k j,ℓ=1 of approximate partial derivatives has rank less than k almost everywhere in E. Since this is true for any choice of i 1 < i 2 < . . . < i k , we conclude that rank (ap Df (x)) < k a.e. in E.
Suppose now that rank (ap Df (x)) < k a.e. in E. We need to prove that H k (f (E)) = 0. This implication is more difficult. Since f i : E → R is Lipschitz continuous, for any ε > 0 there is . It suffices to prove that H k (f (F )) = 0, because we can exhaust E with sets F up to a subset of measure zero and f maps sets of measure zero to sets of measure zero. Let Again, by removing a subset of measure zero we can assume that all points of K j are density points of K j . To prove that H k (f (K j )) = 0 we need to make a change of variables in R k , but only when j ≥ 1.
is not necessarily bounded. Let V be the linear space of all real sequences (y 1 , y 2 , . . .). Clearly g : R k → V . We do not equip V with any metric structure. Note that g| F : F → ℓ ∞ ⊂ V , because g coincides with f on F . Lemma 2.6. Let 1 ≤ j ≤ k − 1 and x 0 ∈ K j . Then there exists a neighborhood x 0 ∈ U ⊂ R k , a diffeomorphism Φ : U ⊂ R k → Φ(U) ⊂ R k , and a composition of a translation (by a vector from ℓ ∞ ) with a permutation of variables Ψ : V → V such that • Φ −1 (0) = x 0 and Ψ(g(x 0 )) = 0; • There is ε > 0 such that for x = (x 1 , x 2 , . . . , x k ) ∈ B(0, ε) ⊂ R k and i = 1, 2, . . . , j, Proof. By precomposing g with a translation of R k by the vector x 0 and postcomposing it with a translation of V by the vector −g(x 0 ) = −f (x 0 ) ∈ ℓ ∞ we may assume that x 0 = 0 and g(x 0 ) = 0. A certain j × j minor of Dg(x 0 ) has rank j. By precomposing g with a permutation of j variables in R k and postcomposing it with a permutation of j variables in V we may assume that Let H : R k → R k be defined by It follows from (2.2) that J H (x 0 ) = 0 and hence H is a diffeomorphism in a neighborhood of x 0 = 0 ∈ R k . It suffices to observe that for all i = 1, 2, . . . , j, In what follows, by cubes, we will mean cubes with edges parallel to the coordinate axes in R k . It suffices to prove that any point x 0 ∈ K j has a cubic neighborhood whose intersection with K j is mapped onto a set of H k -measure zero. Since we can take cubic neighborhoods to be arbitrarily small, the change of variables from Lemma 2.6 allows us to assume that Indeed, according to Lemma 2.6 we can assume that x 0 = 0 and that g fixes the first j variables in a neighborhood of 0. The neighborhood can be very small, but a rescaling argument allows us to assume that it contains a unit cube Q around 0. Translating the cube we can assume that Q = [0, 1] k . If x ∈ K j , since rank Dg(x) = j and g fixes the first j coordinates, the derivative of g in directions orthogonal to the first j coordinates equals zero at x, ∂g ℓ (x)/∂x i = 0 for i = j + 1, . . . , k and any ℓ. The theorem is an easy consequence of this lemma through a standard application of the 5r-covering lemma, [12,Theorem 1.2]. First of all observe that cubes with sides parallel to coordinate axes in R k are balls with respect to the ℓ ∞ k metric Hence the 5r-covering lemma applies to families of cubes in R k . By 5 −1 Q we will denote a cube concentric with Q and with 5 −1 times the diameter. The cubes Since the exponent j − k is negative, and m can be arbitrarily large we conclude that H k ∞ (f (K j )) = 0 and hence H k (f (K j )) = 0. Thus it remains to prove Lemma 2.7.
Proof of Lemma 2.7. Various constants C in the proof below will depend on k only. Fix an integer m ≥ 1. Let x ∈ K j . Since every point in K j is a density point of K j , there is a closed cube Q ⊂ [0, 1] k centered at x of edge length d such that By translating the coordinate system in R k we may assume that Each component of f : Q∩K j → ℓ ∞ is an L-Lipschitz function. Extending each component to an L-Lipschitz function on Q results in an L-Lipschitz extensionf : Q → ℓ ∞ . This is well-known and easy to check.
Divide [0, d] j into m j cubes with pairwise disjoint interiors, each of edge length m −1 d. Denote the resulting cubes by Q ν , ν ∈ {1, 2, . . . , m j }. It remains to prove that This estimate and the Fubini theorem imply that there is ρ ∈ Q ν such that It follows from (2.1) with k replaced by k − j that Indeed, the rank of the derivative of g restricted to the slice {ρ} × [0, d] k−j equals zero at the points of ({ρ} × [0, d] k−j ) ∩ K j and this derivative coincides a.e. with the approximate derivative off restricted to {ρ} × [0, d] k−j ∩ K j which by the property of g must be zero as well.

Since the distance of any point in
is contained in a ball of radius CLdm −1 , perhaps with a constant C bigger than that in (2.5). The proof of the lemma is complete.

Heisenberg groups
As an application we will show one more proof of the well-known result of Ambrisio-Kircheim [1] and Magnani [15] that the Heisenberg group H n is purely k-unrectifiable for k > n. Another proof was given in [3] and our argument is related to the one given in [3] in a sense that the proof of Theorem 2.2 is based on similar ideas. We will not recall the definition of the Heisenberg group as this is not the main subject of the paper. The reader may find a detailed introduction for example in [3]; we will follow notation used in that paper. The following result is well-known, see for example Theorem 1.2 in [3].
Lemma 3.1. Let k > n and let E ⊂ R k be a measurable set. If f : E → H n is locally Lipschitz continuous, then for H k -almost every point x ∈ E, rank (ap Df (x)) ≤ n.
The Heisenberg group H n is homeomorphic to R 2n+1 and the identity mapping id : H n → R 2n+1 is locally Lipschitz continuous. Hence f is locally Lipschitz as a mapping into R 2n+1 . The approximate derivative ap Df (x) is understood as the derivative of the mapping into R 2n+1 . As an application of Theorem 1.1 we will prove unrectifiability of H n .
Theorem 3.2. Let k > n be positive integers. Let E ⊂ R k be a measurable set, and let f : E → H n be a Lipschitz mapping. Then H k (f (E)) = 0.
Here the Hausdorff measure in H n is with respect to the Carnot-Carathéodory metric or with respect to the Korányi metric d K which is bi-Lipschitz equivalent to the Carnot-Carathéodory one.
Proof. Let f : R k ⊃ E → H n , k > n be Lipschitz. We need to prove that H k (f (E)) = 0. Recall that by Lemma 3.1, rank (ap Df (x)) ≤ n. Fix a collection of k distinct points y i , . . . , y k in H n and define the mapping g : R k ⊃ E → R k as the projection of f g(x) = (d K (f (x), y 1 ), . . . , d K (f (x), y k )).
The mapping π : H n → R k defined by π(z) = (d K (z, y 1 ), . . . , d K (z, y k )) is Lipschitz continuous, but it is not Lipschitz as a mapping π : R 2n+1 → R k . Hence it is not obvious that we can apply the chain rule to g = π • f and conclude that rank (ap Dg(x)) ≤ n < k a.e. in E which would imply H k (f (E)) = 0 by Theorem 1.1. To overcome this difficulty we use the fact that the Korányi metric z, y 1 ), . . . , d K (z, y i−1 ), 0, d K (z, y i+1 ), . . . , d K (z, y k )).
The function π i is smooth in a neighborhood of y i = f (x), x ∈ E i and hence the chain rule shows that the approximate derivative of g| E i has rank less than or equal n < k a.e. in E i . It remains to observe that at almost all points of E i the approximate derivative of g equals to that of g| E i .

Generalization of Theorem 1.1
Definition 4.1. We say that a metric space (X, d) is quasiconvex if there is a constant M ≥ 1 such that any two points x, y ∈ X can be connected by a curve γ of length ℓ(γ) ≤ Md(x, y).
The next result is a variant of Theorem 1.1.
Theorem 4.2. Suppose that (X, d) is a complete and quasiconvex metric space and that Φ : X → R N is a Lipschitz map with the property that for some constant C Φ > 0 and all rectifiable curves γ in X we have Then for any k ≥ 1 and any Lipschitz map f : R k ⊃ E → X defined on a measurable set E ⊂ R k the following conditions are equivalent.
Since the set f (E) is separable, H k (f (E)) = 0 if and only if every point in the set f (E) has a neighborhood whose intersection with f (E) has measure zero. This also implies that a local version of Theorem 4.2 is true: We can assume that the space is quasiconvex in a neighborhood of each point, that Φ is locally Lpschitz continuous and that for each x ∈ X there is a neighborhood x ∈ U ⊂ X and a constant C Φ,U such that (4.1) holds for all rectifiable curves γ in U with the constant C Φ,U . The reader will have no problem to state a suitable version of the theorem.
In the proof of Theorem 1.1 we embedded f (E) isometrically into ℓ ∞ and we concluded the result from Theorem 2.2. Here instead of the isometric embedding into ℓ ∞ we have the mapping Φ. The proof of Theorem 4.2 is similar to that of Theorem 2.2 and for that reason our arguments will be sketchy, but an essential difficulty arises in the proof of the counterpart of the estimate (2.5). One of the reasons for this difficulty is that unlike ℓ ∞ , the space X does not necessarily have the Lipschitz extension property and we cannot extend f from Q ∩ K j to a Lipschitz mappingf : Q → X; we will need a slightly different argument and this part of the proof will be furnished with all the necessary details.
Proof of Theorem 4.2. The implication from (1) to (2) is obvious. If N < k, the equivalence between (2) and (3) is also obvious, so we can assume that N ≥ k. In that case the equivalence between (2) and (3) follows from the area formula which generalizes (1.1) to the case when the target space may have larger dimension than the domain: N h (y, E) dH k (y), [6,7], and the observation that |J h (x)| = 0 if and only if rank (ap Dh(x)) < k. It remains to prove that (3) implies (1). Suppose that rank (ap D(Φ • f )) < k a.e. in E. For any ε > 0 there is a set F ⊂ E and a mapping g = (g 1 , . . . , g N ) ∈ C 1 (R k , R N ) such that H k (E \ F ) < ε and it suffices to show that H k (f (K j )) = 0. By removing a subset of measure zero we can assume that all points of K j are the density points of K j . Since the problem is local in the nature using a variant of Lemma 2.6 we can assume that Now the result will follow from the following version of Lemma 2.7. To prove the lemma we choose Q ⊂ [0, 1] k with edge length d, centered at x such that is contained in a ball of radius CLdm −1 . We find ρ ∈ Q ν such that By the volume argument every point in {ρ} × [0, d] k−j is at the distance no more than C(k)m −1 d to the set ({ρ} × [0, d] k−j ) ∩ K j . Hence every point in Q ν × [0, d] k−j , and thus every point in (Q ν × [0, d] k−j ) ∩ K j , is at the distance less than or equal to C(k)m −1 d from This is the estimate that plays the role of (2.5), but the proof has to be different now. The lemma says that if the measure of E is small, then more than 50% of the intervals xy intersect E along a short subset.
Proof. It suffices to show that for some constant C = C(n) Q I x (y) dy ≤ CH n (E) 1/n . Then (4.5) will be true with C replaced by 2C. For z ∈ S n−1 let δ(z) = sup{t > 0 : x + tz ∈ Q}. An integral over Q can be represented in the spherical coordinates centered at x as follows If z ∈ S n−1 , then We have |x − y| n−1 dy ≤ CH n (E) 1/n by Lemma 2.4. Equality (4.7) follows from (4.6). Now under the assumptions of the lemma, if x, y ∈ Q, we can find z ∈ Q such that I x (z) + I y (z) ≤ CH n (E) 1/n , i.e. the curve xz + zy connecting x to y has length no bigger than 2 diam Q and it intersects the set E along a subset of length less than or equal to CH n (E) 1/n . Applying it to n = k − j, Q = {ρ} × [0, d] k−j , and E = ({ρ} × [0, d] k−j ) \ K j , every pair of points x, y ∈ Q ∩ K j we can be connected by a curve γ = xz + zy of length ℓ(γ) ≤ 2d √ k − j (two times the diameter of the cube) whose intersection with the complement of K j has length no more than C(k)m −1 d by (4.3). We can parametrize γ by arc-length γ : [0, ℓ(γ)] → {ρ} × [0, d] k−j as a 1-Lipschitz curve. The mapping f • γ is L-Lipschitz and defined on a subset γ −1 (K j ). It uniquely extends to the closure of γ −1 (K j ) (because it is Lipschitz and X is complete). The complement of this set consists of countably many open intervals of total length bounded by C(k)m −1 d. Since the space X is quasiconvex we can extend f • γ from the closure of γ −1 (K j ) to f • γ : [0, ℓ(γ)] → X as an ML-Lipschitz curve connecting x to y; here M is the quasiconvexity constant of the space X. The curve is Lip (Φ)ML-Lipschitz. Note that on the set γ −1 (K j ) this curve coincides with g • γ and hence for a.e. t ∈ γ −1 (K j ) we have Hence the length of the curve Φ • ( f • γ) is bounded by Since this is true for all x, y ∈ {ρ} × [0, d] k−j ∩ K j , (4.4) follows. The proof is complete.

Mappings of bounded length distortion.
Definition 5.1. A mapping f : X → Y between metric spaces is said to have the weak bounded length distortion property (weak BLD) if there is a constant C ≥ 1 such that for all rectifiable curves γ in X we have The class of mappings with bounded length distortion (BLD) was introduced in [17] under the assumption that f : R n ⊃ Ω → R n is a continuous mapping on an open domain such that it is open, discrete, sense preserving and satisfies (5.1) for all curves γ in Ω. A more general definition without any topological restrictions was given in [14,Definition 2.10]. This definition is almost identical to ours, but it was assumed that (5.1) was satisfied for all curves γ in X. The two notions are different: it may happen that a mapping has the weak BLD property, but some curves of infinite length in X are mapped onto rectifiable curves and hence such a mapping is not BLD in the sense of [14,Definition 2.10]. For example the identity mapping on the Heisenberg group id : H n → R 2n+1 satisfies the weak BLD condition locally. However, any segment on the t-axis has infinite length in the metric of H n (actually its Hausdorff dimension equals 2) and it is mapped by the identity mapping to a segment in the t-axis in R 2n+1 of finite Euclidean length.
As a consequence of Theorem 4.2 we obtain. Proof. For any y ∈ B(x, r) ⊂ Ω, the segment xy is mapped on a curve of length bounded by C|x − y|. Hence |f (x) − f (y)| ≤ C|x − y|. Let X be a closed ball contained in Ω, equip it with the Euclidean metric and let Φ = f | X : X → R m . Let E ⊂ X be the set of points where rank Df < n and let ι : E → X be the identity mapping. According to Theorem 4.2, H n (E) = H n (ι(E)) = 0 if and only if rank (ap D(Φ • ι)) = rank Df < n, a.e. in E. Since the last condition is satisfied by the definition of E, we conclude that H n (E) = 0, and hence rank Df (x) = n a.e. in Ω, because Ω is a countable union of closed balls. This however, implies that m ≥ n.
Gromov proved in [9, 2.4.11] that any Riemannian manifold of dimension n admits a mapping into R n that preserves lengths of curves. It follows from Theorem 5.2 that the Jacobian of such mapping is different than zero a.e. and hence there is no such mapping into R m for m < n (this result is known).
In [17] it was proved that a mapping f : R n ⊃ Ω → R n is BLD (under the topological assumptions: open, discrete, sense preserving) if and only if f is locally Lipschitz and |J f | ≥ c > 0 a.e. We proved without any topological assumptions that |J f | > 0 a.e.

5.2.
Carnot-Carathéodory spaces. Let X 1 , X 2 , . . . , X m be a family of vector fields defined on an open and connected set Ω ⊂ R n with locally Lipschitz continuous coefficients. Assume that the vector fields are linearly independent at every point of Ω and that for every compact set K ⊂ Ω inf p∈K inf i∈{1,...,m} It follows from our assumptions that on compact subsets of Ω, |v| H is comparable to the Euclidean length |v| of the vector v, i.e. for every compact set K ⊂ Ω there is a constant C ≥ 1 such that (5.2) C −1 |v| ≤ |v| H ≤ C|v| for all p ∈ K and all v ∈ span {X 1 (p), . . . , X m (p)}.
We say that an absolutely continuous curve γ : [a, b] → Ω is horizontal if there are measurable functions a i (t), a ≤ t ≤ b, i = 1, 2, . . . , m such that a i (t)X i (γ(t)) for almost all t ∈ [a, b].
Assume that any two points in Ω can be connected by a horizontal curve. This is the case for example if the vector fields satisfy the Hörmander condition [21,Proposition III.4.1].
All the assumptions about the vector fields given above are satisfied by Carnot groups (and in particular by the Heisenberg groups), [11,Section 11.3], but not by the Grushin type spaces [8]. Namely in general in the Grushin type spaces the inequality ℓ H (γ) ≤ Cℓ(γ) need not be satisfied.
The Carnot-Carathéodory distance d cc (x, y) of the points x, y ∈ Ω is defined as the infimum of horizontal lengths of horizontal curves connecting x and y. Since we assume that any two points in Ω can be connected by a horizontal curve, (Ω, d cc ) is a metric space.
Clearly horizontal curves are rectifiable and it is well-known that every rectifiable curve with the arc-length parametrization is horizontal. Moreover ℓ H (γ) equals the length ℓ cc (γ) of γ with respect to the Carnot-Carathéodory metric. A detailed account on this topic can be found in [19]. Hence (5.3) implies that the mapping id : (Ω, d cc ) → Ω from the Carnot-Carathéodory space onto Ω with Euclidean metric is locally weakly BLD.
The next result follows immediately from a local version of Theorem 4.2. It applies to Carnot groups and in particular to the Heisenberg groups. Assume also that any two points in Ω can be connected by a horizontal curve. Then for k ≥ 1 and any Lipschitz mapping f : R k ⊃ E → (Ω, d cc ) the following conditions are equivalent.
Let us briefly describe how this result applies to Carnot groups. For more details, see [15]. If G is a Carnot group and the first layer of the stratification of the Lie algebra g does not contain a k-dimensional Lie subalgebra, then it follows from the Pansu differentiability theorem that the rank of the approximate derivative of any Lipschitz mapping f : R k ⊃ E → G is less than k a.e., so H k dcc (f (E)) = 0 by Theorem 5.3. Hence G is purely kunrectifiable. This slightly simplifies the proof of Theorem 1.1 in [15].