{\mathcal{L}}^{-1}\right)$ we will consider the Koszul complex associated with $\omega$, $$\label{koszulcomplex}
\xymatrix{K(\omega): & {\mathcal{O}}_X\ar[r]^-{\wedge\omega}& \Omega^1_X\otimes{\mathcal{L}}^{-1} \ar[r]^-{\wedge\omega} & \dots\ar[r] & \Omega^i\otimes{\mathcal{L}}^{-i}\ar[r]& \dots}$$ where we are following [@GKZ Chapter 2, B, p. 51] and using the identification $\bigwedge^k\left(\Omega^1_X\otimes {\mathcal{L}}^{-1}\right)\simeq \left(\bigwedge^k \Omega^1_X \right)\otimes \left({\mathcal{L}}^{-k}\right)$. We will denote the cohomology sheaves of this complex by $H^\bullet(\omega)$, the *Koszul cohomology sheaves* of $\omega$.

We can use $K(\omega)$ to compute the codimension of ${\mathrm{Sing}(\omega)}$ by the well known result, see [@eisenbud Theorem 17.4, p. 424]:

\[koszul\] Let $\omega\in H^0\left(X,\Omega^1_X\otimes {\mathcal{L}}^{-1}\right)$. The following statements are equivalent:

-   $codim({\mathrm{Sing}(\omega)})\geq k$

-   $H^\ell(\omega)=0$ for all $\ell <k$

\[notation\] Suppose now the morphism $\omega:{\mathcal{L}}\to \Omega^1_X$ defines a foliation on $X$. Given a trivializing open set $U$ and a choice of a trivialization ${\mathcal{O}}_X|_U\cong {\mathcal{L}}|_U$, we take a local generator $\varpi$ of ${\mathcal{L}}(U)$ (we think about it as a $1$-form through the morphism ${\mathcal{L}}\to \Omega^1_X$) and take the differential $d \varpi$. This defines a ${\mathbb{C}}$-linear morphism ${\mathcal{L}}(U)\to \Omega^2_X(U)$, which in turn we can compose with the projection $\Omega^2_X\to H^2(\omega)\otimes {\mathcal{L}}^{\otimes 2}$. Note that the submodule ${\mathcal{O}}_X(U)\cdot (d\varpi)$ of $\left(H^2(\omega)\otimes{\mathcal{L}}^{\otimes 2}\right)(U)$ is independent of the choice of the trivialization. In this way one gets a morphism of coherent sheaves, $${\mathcal{L}}\to H^2(\omega)\otimes{\mathcal{L}}^{\otimes 2}.$$ 