The Riemann curvature tensor is defined $$R(X,Y)Z = \nabla_X\nabla_YZ - \nabla_Y \nabla_XZ - \nabla_{[X,Y]}Z.$$
Is it possible to simplify above expression under assumption that $X,Y\in D$, where $D$ is an involutive (regular) distribution, namely $$[X,Y]\in D$$
I did the obvious step but then I struggle $$[X,Y]=\alpha X + \beta Y,$$ where $\alpha,\beta \in C^\infty(Q)$. Hence
$$R(X,Y)Z = \nabla_X\nabla_YZ - \nabla_Y \nabla_XZ - \alpha \nabla_XZ - \beta \nabla_YZ$$
Especially I'd like to simplify the condition for the manifold to be flat, i.e. the case $R=0$. Any ideas?
What is the geometric interpretation of the relation between involutivity and flatness? Any interesting reference on that matter?
Cheers,