Macaulay2 » Documentation
Packages » Complexes :: complex
next | previous | forward | backward | up | index | toc

complex -- make a chain complex

Synopsis

Description

A complex is a sequence of objects (e.g. modules), connected by maps called differentials. The composition of any two consecutive maps is zero.

The same data type is used for both chain and cochain complexes. If C is a complex, then we have C^i = C_{-i}.

Often, a complex is most easily described by giving a list of consecutive maps which form the differential.

We construct the Koszul complex on the generators for the ideal of the twisted cubic curve.

i1 : S = ZZ/101[a..d]

o1 = S

o1 : PolynomialRing
i2 : I = ideal(b^2-a*c, b*c-a*d, c^2-b*d)

             2                    2
o2 = ideal (b  - a*c, b*c - a*d, c  - b*d)

o2 : Ideal of S
i3 : F1 = map(S^1,,matrix{{I_0, I_1, I_2}})

o3 = | b2-ac bc-ad c2-bd |

             1      3
o3 : Matrix S  <-- S
i4 : F2 = map(source F1,,matrix{
             {0, I_2, -I_1},
             {-I_2, 0, I_0},
             {I_1, -I_0, 0}
             })

o4 = {2} | 0      c2-bd  -bc+ad |
     {2} | -c2+bd 0      b2-ac  |
     {2} | bc-ad  -b2+ac 0      |

             3      3
o4 : Matrix S  <-- S
i5 : F3 = map(source F2,,matrix{{I_0}, {I_1}, {I_2}})

o5 = {4} | b2-ac |
     {4} | bc-ad |
     {4} | c2-bd |

             3      1
o5 : Matrix S  <-- S
i6 : C = complex {F1, F2, F3}

      1      3      3      1
o6 = S  <-- S  <-- S  <-- S
                           
     0      1      2      3

o6 : Complex
i7 : isWellDefined C

o7 = true

To start a complex at a base different from zero, use the optional argument Base.

i8 : C1 = complex({F1, F2, F3}, Base => 1)

      1      3      3      1
o8 = S  <-- S  <-- S  <-- S
                           
     1      2      3      4

o8 : Complex
i9 : isWellDefined C1

o9 = true

Notice that this changes the homological degrees of the maps, but is not the same as the shift of the complex (which for odd shifts negates the maps).

i10 : dd^C1

           1                             3
o10 = 1 : S  <------------------------- S  : 2
                | b2-ac bc-ad c2-bd |

           3                                    3
      2 : S  <-------------------------------- S  : 3
                {2} | 0      c2-bd  -bc+ad |
                {2} | -c2+bd 0      b2-ac  |
                {2} | bc-ad  -b2+ac 0      |

           3                     1
      3 : S  <----------------- S  : 4
                {4} | b2-ac |
                {4} | bc-ad |
                {4} | c2-bd |

o10 : ComplexMap
i11 : dd^(C[-1])

           1                                3
o11 = 1 : S  <---------------------------- S  : 2
                | -b2+ac -bc+ad -c2+bd |

           3                                    3
      2 : S  <-------------------------------- S  : 3
                {2} | 0      -c2+bd bc-ad  |
                {2} | c2-bd  0      -b2+ac |
                {2} | -bc+ad b2-ac  0      |

           3                      1
      3 : S  <------------------ S  : 4
                {4} | -b2+ac |
                {4} | -bc+ad |
                {4} | -c2+bd |

o11 : ComplexMap

Having constructed this complex, we can access individual terms and maps.

i12 : C_2

       3
o12 = S

o12 : S-module, free, degrees {3:4}
i13 : C^(-1)

       3
o13 = S

o13 : S-module, free, degrees {3:2}
i14 : C^(-1) == C_1

o14 = true
i15 : C_7

o15 = 0

o15 : S-module
i16 : dd^C

           1                             3
o16 = 0 : S  <------------------------- S  : 1
                | b2-ac bc-ad c2-bd |

           3                                    3
      1 : S  <-------------------------------- S  : 2
                {2} | 0      c2-bd  -bc+ad |
                {2} | -c2+bd 0      b2-ac  |
                {2} | bc-ad  -b2+ac 0      |

           3                     1
      2 : S  <----------------- S  : 3
                {4} | b2-ac |
                {4} | bc-ad |
                {4} | c2-bd |

o16 : ComplexMap
i17 : dd^C_2

o17 = {2} | 0      c2-bd  -bc+ad |
      {2} | -c2+bd 0      b2-ac  |
      {2} | bc-ad  -b2+ac 0      |

              3      3
o17 : Matrix S  <-- S
i18 : length C

o18 = 3

By computing the homology of this complex, we see that these generators do not form a regular sequence, because $H_1(C)$ is non-zero.

i19 : HH C

o19 = cokernel | b2-ac bc-ad c2-bd | <-- subquotient ({2} | d  c  |, {2} | 0      c2-bd  -bc+ad |) <-- subquotient ({4} | b2-ac |, {4} | b2-ac |) <-- image 0
                                                      {2} | -c -b |  {2} | -c2+bd 0      b2-ac  |                   {4} | bc-ad |  {4} | bc-ad |       
      0                                               {2} | b  a  |  {2} | bc-ad  -b2+ac 0      |                   {4} | c2-bd |  {4} | c2-bd |      3
                                                                                                        
                                         1                                                             2

o19 : Complex
i20 : prune HH C

o20 = cokernel | c2-bd bc-ad b2-ac | <-- cokernel {3} | c  b  a  |
                                                  {3} | -d -c -b |
      0                                   
                                         1

o20 : Complex
i21 : prune HH_1 C

o21 = cokernel {3} | c  b  a  |
               {3} | -d -c -b |

                             2
o21 : S-module, quotient of S

Caveat

This constructor minimizes computation and does very little error checking. To verify that a complex is well constructed, use isWellDefined(Complex).

See also

Ways to use complex :

For the programmer

The object complex is a method function with options.