Say I have two integrable codistributions
$$ U = \langle du^1, \ldots, du^m \rangle, \qquad Z = \langle dz^1, \ldots, dz^N \rangle $$
on a manifold $M$, with $N >> m$. Suppose that the intersection $U \cap Z$ is nontrivial of rank $m'$ (with $0 < m' < m$) and completely nonintegrable, (i.e., $(U\cap Z)^{(\infty)} = \langle 0 \rangle$), and that it has a basis of the form
$$ U \cap Z = \langle B^\beta\_a(z)\, du^a \mid 1 \leq \beta \leq m' \rangle, $$
where the notation $B^\beta\_a(z)$ means that $dB^\beta\_a \in Z$, and $a$ is summed from $1$ to $m$.


Dually, we can write $(U \cap Z)^\perp$ as
$$ (U \cap Z)^\perp = U^\perp \oplus \langle D\_{m'+1}, \ldots, D\_m \rangle, $$
where
$$ D\_\alpha = A^a\_\alpha(z) \frac{\partial}{\partial u^a}, $$
with
$$ \sum\_{a=1}^m B^\beta\_a A^a\_{\alpha} = 0, \qquad 1 \leq \beta \leq m', \ m'+1 \leq \alpha \leq m. $$


Here's the question: Suppose I have a function $f(u)$ (i.e., $df \in U$) with the property that for all $m' + 1 \leq \alpha\_1, \alpha\_2 \leq m$, we have
$$ D\_{\alpha\_1} D\_{\alpha\_2} f = 0. $$
Does the complete non-integrability of $U \cap Z$ allow me to conclude somehow that
$$ \frac{\partial^2 f}{\partial u^a \partial u^b} = 0 $$
for all $1 \leq a,b \leq m$? If so, how? I feel like this should be true, but I've been beating my head on this for several days and can't quite make it work. And if not, is there an easy counterexample?



Question about differential operators in a completely non-integrable distribution
Consider the following example: On $\mathbb{R}^4$ with coordinates $u^1,u^2,u^3, z^1$, define $z^2 = u^2 - z^1 u^1$ and $z^3 = u^3 - z^1u^2$.


We have that $U\cap Z$ is spanned by $\mathrm{d}u^2-z^1\,\mathrm{d}u^1$ and $\mathrm{d}u^3-z^1\,\mathrm{d}u^2$, and its last derived system is zero. Following the OP's description, we find that
$$
D\_3 = \frac{\partial}{\partial u\_1} + z^1\,\frac{\partial}{\partial u\_2} + (z^1)^2\,\frac{\partial}{\partial u\_3}\,.
$$
Now we are asking whether $D\_3^2f=0$ where $\mathrm{d}f\in U$ implies that $f$ is linear in $u$. The answer is 'no' because, for example, $f = (u^2)^2 - u^1u^3$ satisfies $D\_3^2f=0$.


Note, while this example doesn't have $N >> m=3$, you can fix that by adding as many new independent $z$-variables as you want, i.e., start with $M=\mathbb{R}^{N+1}$ with independent coordinates $u^1,u^2,u^3,z^1, z^4,\ldots,z^{N}$ and define $z^2$ and $z^3$ as above.


