This question is connected with my previous: [Heisenberg group: function without vertical derivative](https://mathoverflow.net/q/204537/15946). 
Here I am trying to look from another side: what is a difference between Sobolev space and horizontal Sobolev space on Carnot group?


Outline some notations.


A **Carnot group** $\mathbb G$ is a connected simply-connected nilpotent Lie group hose Lie algebra $\mathfrak g$ is graded: $\mathfrak{g} = V\_1\oplus\cdots\oplus V\_m$, и
$[V\_1,V\_j]=V\_{j+1}$ provided $j=1,\ldots, m-1$, and $[V\_1,V\_m] = \{0\}$.


$V\_1$ is horizontal subbundle, $X\_1, \dots X\_n$ - basis of $V\_1$ and 
$X\_1, \dots X\_n, X\_{21}, \dots X\_{2n\_2},\cdots X\_{m1}, \dots X\_{mn\_m}$ - basis of $\mathfrak g$. 


**Derivatives.** A locally summable function $v$ is called the generalized
derivative of $f$ along the vector field X, whenever
$$
\int v\psi\, dx = -\int f X\psi\, dx,
$$
for every $\psi\in C^{\infty}\_0$. We denote $v = Xf$.


**Sobolev spaces.** 


* The horizontal Sobolev space $HW^1\_p$ consists of all locally summable functions of finite norm
$$
\|f \mid HW^1\_p\| = \left(\int |f|^p\, dx \right)^{\frac1p} +
\left(\int |\nabla\_{\mathcal L}f|^p\, dx \right)^{\frac1p}, 
$$
where $\nabla\_{\mathcal L}f = (X\_1f, \dots X\_nf)$ is the generalized subgradient of $f$ at x ∈ D which uses only the derivatives along the horizontal fields.
* The Sobolev space $W^1\_p$ consists of all locally summable functions of finite norm
$$
\|f \mid W^1\_p\| = \left(\int |f|^p\, dx \right)^{\frac1p} +
\left(\int |\nabla f|^p\, dx \right)^{\frac1p}, 
$$
where $\nabla\_{\mathcal L}f = (X\_1f, \dots X\_nf, X\_{21}f, \dots X\_{2n\_2}f,\cdots X\_{m1}f, \dots X\_{mn\_m}f)$.


It is clear that if $f\in W^1\_p$ then $f\in HW^1\_p$. 
The question is following: if there is a function $f\in HW^1\_p$ such that $f\not\in W^1\_p$?



Horizontal Sobolev space on Carnot group
If $V\_1 \ne \mathfrak{g}$, then $H W^{1, p} \ne W^{1, p}$.


The construction is based on the notion of dilation on the Carnot group $\mathbb{G}$. The dilation $\delta\_r$ is defined by for $X \in V\_i$ by
$$
\delta\_r \exp (t X) = \exp (i \log r X).
$$
This dilation is an automorphism on $\mathbb{G}$.


If $\mu$ is the Haar measure on the group $\mathbb{G}$, then 
$$
\mu (\delta\_r (A)) = r^Q\mu (A),
$$
where
$$
 Q = \sum\_{i = 1}^m i \dim V\_i.
$$


We now choose a function $\varphi \in C^\infty (\mathbb{G})$ such that $\varphi = 1$ on some compact set $K$ and $\varphi = 0$ in $\mathbb{G} \setminus \delta\_2 K$.


One has then, if $X \in V\_i$,
$$
 \int\_{G} \vert X (\varphi \circ \delta\_r^{-1})\vert^p \,\mathrm{d}\mu
= r^{Q - pi} \int\_{G} \vert X \varphi \vert^p \,\mathrm{d}\mu.
$$


Therefore, if we let $f = \sum\_{j = 0}^\infty a\_j \varphi \circ \delta\_{2^{-j}}^{-1}$, we have
$$
 \int\_{G} \vert X f \vert^p 
= \sum\_{j = 0}^\infty \vert a\_j\vert^p 2^{j (pi - Q)} \int\_{G} \vert X \varphi \vert^p \,\mathrm{d}\mu.
$$
The required counterexample is obtained by choosing the sequence $(a\_j)\_{j \ge 0}$ in such a way that 
$$
 \sum\_{j = 0}^\infty \vert a\_j\vert^p 2^{j (p - Q)} 
< \sum\_{j = 0}^\infty \vert a\_j\vert^p 2^{j (2p - Q)} = \infty,
$$
for example
$$
 a\_j = 2^{-j (2 - Q / p)}.
$$


