next | previous | forward | backward | up | top | index | toc | Macaulay2 website
PruneComplex :: toChainComplex

toChainComplex -- Converts a list of mutable matrices into a ChainComplex.

Synopsis

Description

i1 : R = ZZ/32003[vars(0..17)];
i2 : m1 = genericMatrix(R,a,3,3)

o2 = | a d g |
     | b e h |
     | c f i |

             3       3
o2 : Matrix R  <--- R
i3 : m2 = genericMatrix(R,j,3,3)

o3 = | j m p |
     | k n q |
     | l o r |

             3       3
o3 : Matrix R  <--- R
i4 : I = ideal(m1*m2-m2*m1)

o4 = ideal (d*k + g*l - b*m - c*p, b*j - a*k + e*k + h*l - b*n - c*q, c*j +
     ------------------------------------------------------------------------
     f*k - a*l + i*l - b*o - c*r, - d*j + a*m - e*m + d*n + g*o - f*p, - d*k
     ------------------------------------------------------------------------
     + b*m + h*o - f*q, - d*l + c*m + f*n - e*o + i*o - f*r, - g*j - h*m +
     ------------------------------------------------------------------------
     a*p - i*p + d*q + g*r, - g*k - h*n + b*p + e*q - i*q + h*r, - g*l - h*o
     ------------------------------------------------------------------------
     + c*p + f*q)

o4 : Ideal of R
i5 : C = res I;
i6 : D = C[-10]

      1      8      33      60      61      32      5
o6 = R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R  <-- 0
                                                           
     10     11     12      13      14      15      16     17

o6 : ChainComplex
i7 : MC = toMutableComplex D;
i8 : MC = first pruneComplex MC;
i9 : D' = toChainComplex MC

      1      8      33      60      61      32      5
o9 = R  <-- R  <-- R   <-- R   <-- R   <-- R   <-- R
                                                    
     0      1      2       3       4       5       6

o9 : ChainComplex
i10 : assert(betti D == betti D'[-10])

Caveat

Since the information about source of target of maps is not available, the grading may be incorrect for general complexes.

See also

Ways to use toChainComplex :

For the programmer

The object toChainComplex is a method function.