# Koszul Complexes#

class sage.homology.koszul_complex.KoszulComplex(R, elements)#

A Koszul complex.

Let $$R$$ be a ring and consider $$x_1, x_2, \ldots, x_n \in R$$. The Koszul complex $$K_*(x_1, \ldots, x_n)$$ is given by defining a chain complex structure on the exterior algebra $$\bigwedge^n R$$ with the basis $$e_{i_1} \wedge \cdots \wedge e_{i_a}$$. The differential is given by

$\partial(e_{i_1} \wedge \cdots \wedge e_{i_a}) = \sum_{r=1}^a (-1)^{r-1} x_{i_r} e_{i_1} \wedge \cdots \wedge \hat{e}_{i_r} \wedge \cdots \wedge e_{i_a},$

where $$\hat{e}_{i_r}$$ denotes the omitted factor.

Alternatively we can describe the Koszul complex by considering the basic complex $$K_{x_i}$$

$0 \rightarrow R \xrightarrow{x_i} R \rightarrow 0.$

Then the Koszul complex is given by $$K_*(x_1, \ldots, x_n) = \bigotimes_i K_{x_i}$$.

INPUT:

• R – the base ring

• elements – a tuple of elements of R

EXAMPLES:

sage: R.<x,y,z> = QQ[]
sage: K = KoszulComplex(R, [x,y])
sage: ascii_art(K)
[-y]
[x y]       [ x]
0 <-- C_0 <------ C_1 <----- C_2 <-- 0
sage: K = KoszulComplex(R, [x,y,z])
sage: ascii_art(K)
[-y -z  0]       [ z]
[ x  0 -z]       [-y]
[x y z]       [ 0  x  y]       [ x]
0 <-- C_0 <-------- C_1 <----------- C_2 <----- C_3 <-- 0
sage: K = KoszulComplex(R, [x+y*z,x+y-z])
sage: ascii_art(K)
[-x - y + z]
[  y*z + x x + y - z]       [   y*z + x]
0 <-- C_0 <---------------------- C_1 <------------- C_2 <-- 0


REFERENCES: