The Koszul complex on a sequence of elements $f_1,\dots,f_r$ is a complex of R-modules whose underlying graded R-module is the exterior algebra on R^r generated in homological degree one. This algebra structure also respects the boundary map of the complex in the sense that it satisfies the Liebniz rule. That is, $d(ab) = d(a)b + (-1)^{deg a}ad(b)$. When one speaks of 'the' Koszul complex of a ring, one means the Koszul complex on a minimal set of generators of the maximal ideal of R.
i1 : R = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3} o1 = R o1 : QuotientRing |
i2 : KR = koszulComplexDGA R o2 = {Ring => R } Underlying algebra => R[T ..T ] 1 4 Differential => {a, b, c, d} o2 : DGAlgebra |
One can specify the name of the variable to easily handle multiple Koszul complexes at once.
i3 : S = ZZ/101[x,y,z]/ideal{x^3,y^3,z^3,x^2*y^2,y^2*z^2} o3 = S o3 : QuotientRing |
i4 : KS = koszulComplexDGA(S,Variable=>"U") o4 = {Ring => S } Underlying algebra => S[U ..U ] 1 3 Differential => {x, y, z} o4 : DGAlgebra |
To obtain the chain complex associated to the Koszul complex, one may use toComplex. One can also obtain this complex directly without using the DGAlgebras package by using the command koszul.
i5 : cxKR = toComplex KR 1 4 6 4 1 o5 = R <-- R <-- R <-- R <-- R 0 1 2 3 4 o5 : ChainComplex |
i6 : prune HH cxKR o6 = 0 : cokernel | d c b a | 1 : cokernel {3} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 | {3} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 | {3} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 | {3} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a | 2 : cokernel {6} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | {6} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | {6} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 0 0 0 0 | {6} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 | {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 | {6} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d c b a | 3 : cokernel {9} | d c b a 0 0 0 0 0 0 0 0 0 0 0 0 | {9} | 0 0 0 0 d c b a 0 0 0 0 0 0 0 0 | {9} | 0 0 0 0 0 0 0 0 d c b a 0 0 0 0 | {9} | 0 0 0 0 0 0 0 0 0 0 0 0 d c b a | 4 : cokernel {12} | d c b a | o6 : GradedModule |
Since the Koszul complex is a DG algebra, its homology is itself an algebra. One can obtain this algebra using the command homology, homologyAlgebra, or HH (all commands work). This algebra structure can detect whether or not the ring is a complete intersection or Gorenstein.
i7 : HKR = HH KR Finding easy relations : -- used 0.0311865 seconds o7 = HKR o7 : PolynomialRing, 4 skew commutative variables |
i8 : ideal HKR o8 = ideal () o8 : Ideal of HKR |
i9 : R' = ZZ/101[a,b,c,d]/ideal{a^3,b^3,c^3,d^3,a*c,a*d,b*c,b*d,a^2*b^2-c^2*d^2} o9 = R' o9 : QuotientRing |
i10 : HKR' = HH koszulComplexDGA R' Finding easy relations : -- used 0.982887 seconds o10 = HKR' o10 : QuotientRing |
i11 : numgens HKR' o11 = 34 |
i12 : ann ideal gens HKR' o12 = ideal(X X ) 4 34 o12 : Ideal of HKR' |
Note that since the socle of HKR' is one dimensional, HKR' has Poincare duality, and hence R' is Gorenstein.
One can also consider the Koszul complex of an ideal, or a sequence of elements.
i13 : Q = ambient R o13 = Q o13 : PolynomialRing |
i14 : I = ideal {a^3,b^3,c^3,d^3} 3 3 3 3 o14 = ideal (a , b , c , d ) o14 : Ideal of Q |
i15 : KI = koszulComplexDGA I o15 = {Ring => Q } Underlying algebra => Q[T ..T ] 1 4 3 3 3 3 Differential => {a , b , c , d } o15 : DGAlgebra |
i16 : HKI = HH KI o16 = HKI o16 : QuotientRing |
i17 : describe HKI Q o17 = ---------------- 3 3 3 3 (d , c , b , a ) |
i18 : use Q o18 = Q o18 : PolynomialRing |
i19 : I' = I + ideal{a^2*b^2*c^2*d^2} 3 3 3 3 2 2 2 2 o19 = ideal (a , b , c , d , a b c d ) o19 : Ideal of Q |
i20 : KI' = koszulComplexDGA I' o20 = {Ring => Q } Underlying algebra => Q[T ..T ] 1 5 3 3 3 3 2 2 2 2 Differential => {a , b , c , d , a b c d } o20 : DGAlgebra |
i21 : HKI' = HH KI' o21 = HKI' o21 : QuotientRing |
i22 : describe HKI' Q --------------------------[X ..X ] 3 3 3 3 2 2 2 2 1 4 (d , c , b , a , a b c d ) o22 = ------------------------------------------------------------------------------------------------------------------------------------------ 2 2 2 2 (a X , a*X - b*X , b X , b*X - c*X , a*X - c*X , c X , c*X - d*X , b*X - d*X , a*X - d*X , d X , X X , X X , X X , X X , X X , X X ) 4 3 4 3 2 3 2 4 2 1 2 1 3 1 4 1 3 4 2 4 1 4 2 3 1 3 1 2 |
i23 : HKI'.cache.cycles 2 2 2 2 2 2 2 2 2 2 2 2 o23 = {a b c T - d*T , a b d T - c*T , a c d T - b*T , b c d T - a*T } 4 5 3 5 2 5 1 5 o23 : List |
Note that since I is a Q-regular sequence, the Koszul complex is acyclic, and that both homology algebras are algebras over the zeroth homology of the Koszul complex.