Let $i: X \hookrightarrow Y$ be a closed embedding of smooth algebraic varieties. In the book *D-modules, perverse sheaves and representation theory* the authors say that there exists a locally free resolution of the $i^{-1}\mathcal{O}\_Y$-module $\mathcal{O}\_X$ called the *Koszul resolution*. Namely, they say it is
$$
0 \rightarrow K\_{n-r} \rightarrow \dots \rightarrow K\_1 \rightarrow K\_0 = i^{-1}\mathcal{O}\_Y \rightarrow \mathcal{O}\_X,
$$
and choosing a local coordinate system such that on the open subset $U \subseteq Y$ we have $X \cap U = \{ y\_{r+1} = \dots = y\_n = 0 \}$, we have
$$
K\_{j} = \bigwedge^j \left( \bigoplus\_{s = r+1}^n \; i^{-1}\mathcal{O}\_Y dy\_{r} \right).
$$
I don't understand whether this resolution exists globally or only locally. I guess it exists globally, but I don't understand how to define it. Both answers and references are welcome.



Kozsul resolution of $\mathcal{O}_X$
It exists locally, and more generally when $X$ is the zero locus of a global section $s$ of a rank $r$ vector bundle $E$ on $Y$, where $r$ is the codimension of $X$ in $Y$. Then the resolution is given by the celebrated *Koszul complex*
$$0\rightarrow \bigwedge^rE^\*\xrightarrow{\ i(s)\ }\bigwedge^{r-1}E^\*\rightarrow \cdots \rightarrow E^\* \xrightarrow{\ i(s)\ } \mathcal{O}\_Y\rightarrow \mathcal{O}\_X\rightarrow 0\, ,$$where $i(s)$ denotes the interior product with the section $s$ (googling "Koszul complex" should give you thousands of references). Locally $X$ is given by $r$ equations $f\_1=\cdots =f\_r=0$, and you can just take $E=\mathcal{O}\_Y^r$ and $s=(f\_1,\ldots ,f\_r)$. Globally such a vector bundle may or may not exist, depending on the geometry of $X$.


