\varpi\wedge \varpi=0$$ for any $\Xi\in\bigwedge^{q-1} TX$.

When $\varpi({\mathfrak{p}})\neq 0$ for some closed point ${\mathfrak{p}}\in X$ then $\varpi$ is *locally decomposable* as a product $\varpi=\varpi_1\wedge\dots\wedge\varpi_q$ of $q$ $1$-forms.

Let ${\mathcal{L}}$ be a line bundle and $\omega:{\mathcal{L}}\to \Omega^q_X$ be a morphism of sheaves, we will say that the morphism is *integrable* if

-   $\Omega^q_X/{\mathcal{L}}$ is torsion free.

-   The map $$i_\Xi \omega\wedge \omega:{\mathcal{L}}\to\Omega^{q+1}_X\otimes{\mathcal{L}}^{-1}$$ is zero for every local section $\Xi$ of $\bigwedge^{q-1} TX$.

-   For every local section $s$ of ${\mathcal{L}}$ and $\Xi$ of $\bigwedge^{q-1} TX$, $\omega(s)$ verifies $$\label{frobenius2}
     d (i_\Xi \omega(s))\wedge \omega(s)=0.$$

We also say that $\omega$ determines a *codimension $q$ foliation*.

By using Equation (\[frobenius2\]) with $q=1$ we recover the definition of codimension one foliation as in Definition \[foliation\].

The fact that $\omega(s)$ is locally decomposable as a product of $q$ $1$-forms $\varpi_1,\dots,\varpi_q$ implies that there exist a rank $q$ vector bundle $\mathcal{E}\hookrightarrow \Omega^1_X$, locally generated by $\omega_1(s),\dots,\omega_q(s)$ and such that ${\mathcal{L}}\simeq \bigwedge^q\mathcal{E}$. Reciprocally, given a locally free sheaf of rank $q$, $\mathcal{E}$ and a map $\mathcal{E}\hookrightarrow \Omega^1_X$, we have that $\bigwedge^q\mathcal{E}$ is a line bundle ${\mathcal{L}}$ and a map ${\mathcal{L}}\to\Omega^q_X$. The condition that $\Omega^q_X/{\mathcal{L}}$ is torsion free is equivalent to $\Omega^1_X/\mathcal{E}$ being torsion free. Example \[exampleCodimension2inA3\] shows that the 