Let ${\cal D}$ be a $\ell$-distribuition in a smooth manifold $M^m$. I have the following claim: "${\cal D}$ is involutive if and only if there are $\omega_{\ell+1},\ldots,\omega_m$ $1$-forms that annihilate ${\cal D}$ such that ${\rm d}\omega_r = \sum_{k=\ell+1}^m \theta_r^k \wedge \omega_k$, for some convenient $1$-forms $\theta_r^k$".
I've seen a proof that ${\cal D}$ being involutive implies the condition, but not a proof for the other direction.
I think we also need to assume that the forms are linearly independent. Let $\{X_1,\ldots,X_m \}$ be a (local) frame field on $M$ such that the $\ell$ first fields span ${\cal D}$. For $i,j \in \{1,\ldots,\ell\}$, write $$[X_i,X_j] = \sum_{k=1}^m c_{ij}^kX_k.$$I understand that my goal is to prove that $c_{ij}^k=0$ for $k \in \{\ell+1,\ldots,m\}$. Given $r\in \{\ell+1,\ldots,m\}$, we have $$\omega_r([X_i,X_j]) = \sum_{k=\ell+1}^mc_{ij}^k\omega_r(X_k),$$and on the other hand $${\rm d}\omega_r(X_i,X_j) = X_i(\omega_r(X_j))-X_j(\omega_r(X_i))-\omega_r([X_i,X_j]) = -\omega_r([X_i,X_j]).$$Finally $${\rm d}\omega_r(X_i,X_j) = \sum_{k=\ell+1}^m \theta_r^k\wedge \omega_k(X_i,X_j) = \sum_{k=\ell+1}^r (\theta_r^k(X_i)\omega_r(X_j)-\theta_r^k(X_j)\omega_r(X_i))=0.$$
Now, as far as I see we need that the $\omega_r$ are linearly independent to say $$\sum_{k=\ell+1}^mc_{ij}^k\omega_r(X_k)=0 \implies c_{ij}^k=0.$$
Can someone check my work and tell if my suspicion is correct? Thanks.