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

toMutableComplex -- Converts a chain complex into a list of mutable matrices.

Synopsis

Description

i1 : needsPackage "LocalRings"

o1 = LocalRings

o1 : Package
i2 : R = ZZ/32003[vars(0..3)]

o2 = R

o2 : PolynomialRing
i3 : I = monomialCurveIdeal(R, {1, 3, 4})

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

o3 : Ideal of R
i4 : C = res I

      1      4      4      1
o4 = R  <-- R  <-- R  <-- R  <-- 0
                                  
     0      1      2      3      4

o4 : ChainComplex
i5 : RP = localRing(R, ideal"a,b,c");
i6 : D = (C ++ C[-5]) ** RP

       1       4       4       1             1       4       4       1
o6 = RP  <-- RP  <-- RP  <-- RP  <-- 0 <-- RP  <-- RP  <-- RP  <-- RP  <-- 0
                                                                            
     0       1       2       3       4     5       6       7       8       9

o6 : ChainComplex
i7 : MD = toMutableComplex D

o7 = {| bc-ad b3-a2c ac2-b2d c3-bd2 |, | -b2 -ac -bd -c2 |, | d  |, 0, 0, |
                                       | c   d   0   0   |  | -c |         
                                       | a   b   -c  -d  |  | -b |         
                                       | 0   0   a   b   |  | a  |         
     ------------------------------------------------------------------------
     -bc+ad -b3+a2c -ac2+b2d -c3+bd2 |, | b2 ac bd c2 |, | -d |, 0, 0}
                                        | -c -d 0  0  |  | c  |
                                        | -a -b c  d  |  | b  |
                                        | 0  0  -a -b |  | -a |

o7 : List
i8 : pruneComplex MD

o8 = ({| bc-ad c3-bd2 |, | (c3-bd2)/d |, 0, 0, 0, | -bc+ad -c3+bd2 |, |
                         | (-bc+ad)/d |                               |
                                                                       
                                                                       
     ------------------------------------------------------------------------
     (-c3+bd2)/d |, 0, 0, 0}, {| 1 |, | 1 0 |, | 0      |, 0, 0, | 1 |, | 1 0
     (bc-ad)/d   |                    | 0 0 |  | 0      |               | 0 0
                                      | 0 0 |  | 1      |               | 0 0
                                      | 0 1 |  | (-c)/d |               | 0 1
     ------------------------------------------------------------------------
     |, | 0      |, 0, 0, 0})
     |  | 0      |
     |  | 1      |
     |  | (-c)/d |

o8 : Sequence

Caveat

The nonzero terms in the chain complex must be in a series, otherwise may not work correctly.

See also

Ways to use toMutableComplex :

For the programmer

The object toMutableComplex is a method function.