Macaulay2 » Documentation
Packages » Macaulay2Doc > chain complexes > extracting information from chain complexes
next | previous | forward | backward | up | index | toc

extracting information from chain complexes

Let's make a chain complex.
i1 : R = ZZ/101[x,y,z];
i2 : C = res coker matrix {{x,y^2,z^3}};
Some simple functions for discovering the shape of C.
i3 : length C

o3 = 3
i4 : max C

o4 = 4
i5 : min C

o5 = 0
In order to see the matrices of the differential maps in a chain complex, examine C.dd.
i6 : C.dd

          1                   3
o6 = 0 : R  <--------------- R  : 1
               | x y2 z3 |

          3                           3
     1 : R  <----------------------- R  : 2
               {1} | -y2 -z3 0   |
               {2} | x   0   -z3 |
               {3} | 0   x   y2  |

          3                   1
     2 : R  <--------------- R  : 3
               {3} | z3  |
               {4} | -y2 |
               {5} | x   |

          1
     3 : R  <----- 0 : 4
               0

o6 : ChainComplexMap
If C is a chain complex, then C_i will produce the i-th module in the complex, C^i will produce the -i-th module in it, and C.dd_i will produce the differential whose source is C_i.
i7 : C_1

      3
o7 = R

o7 : R-module, free, degrees {1..3}
i8 : C^-1

      3
o8 = R

o8 : R-module, free, degrees {1..3}
i9 : C.dd_2

o9 = {1} | -y2 -z3 0   |
     {2} | x   0   -z3 |
     {3} | 0   x   y2  |

             3      3
o9 : Matrix R  <-- R
The function betti can be used to display the ranks of the free modules in C, together with the distribution of the basis elements by degree, at least for resolutions of homogeneous modules.
i10 : betti C

             0 1 2 3
o10 = total: 1 3 3 1
          0: 1 1 . .
          1: . 1 1 .
          2: . 1 1 .
          3: . . 1 1

o10 : BettiTally
The ranks are displayed in the top row, and below that in row i column j is displayed the number of basis elements of degree i+j in C_j.