Macaulay2 » Documentation
Packages » ChainComplexExtras :: isChainComplex
next | previous | forward | backward | up | index | toc

isChainComplex -- tests whether the differentials compose to zero

Synopsis

Description

tests that the differentials compose to zero.

i1 : S=ZZ/101[x,y]

o1 = S

o1 : PolynomialRing
i2 : C=res ideal vars S, C'=chainComplex(matrix{{x}},matrix{{y}})

       1      2      1         1      1      1
o2 = (S  <-- S  <-- S  <-- 0, S  <-- S  <-- S )
                                             
      0      1      2      3  0      1      2

o2 : Sequence
i3 : isChainComplex C, isChainComplex C'

o3 = (true, false)

o3 : Sequence

The buildin function dual for chainComplexes over the exterior algebra does not return a complex, because the dual of a left module is a right module.

i4 : kk=ZZ/101;n=4;
i6 : E=kk[e_0..e_n,SkewCommutative =>true]

o6 = E

o6 : PolynomialRing, 5 skew commutative variable(s)
i7 : m=map(E^{0,1},,matrix{{ e_0,e_1*e_2},{e_3*e_4,e_0*e_1*e_4}})

o7 = {0}  | e_0    e_1e_2    |
     {-1} | e_3e_4 e_0e_1e_4 |

             2      2
o7 : Matrix E  <-- E
i8 : fm=res coker m

      2      2      8      27      66      135      246
o8 = E  <-- E  <-- E  <-- E   <-- E   <-- E    <-- E
                                                    
     0      1      2      3       4       5        6

o8 : ChainComplex
i9 : isChainComplex fm

o9 = true
i10 : dualfm = dual fm

       246      135      66      27      8      2      2
o10 = E    <-- E    <-- E   <-- E   <-- E  <-- E  <-- E
                                                       
      -6       -5       -4      -3      -2     -1     0

o10 : ChainComplex
i11 : isChainComplex dualfm

o11 = true
i12 : f2=res( coker dualfm.dd_(-5),LengthLimit=> 6)[6]

       246      135      66      27      8      2      2
o12 = E    <-- E    <-- E   <-- E   <-- E  <-- E  <-- E
                                                       
      -6       -5       -4      -3      -2     -1     0

o12 : ChainComplex
i13 : betti f2

              -6  -5 -4 -3 -2 -1 0
o13 = total: 246 135 66 27  8  2 2
         -2: 225 120 56 21  5  . .
         -1:  21  15 10  6  3  1 .
          0:   .   .  .  .  .  1 1
          1:   .   .  .  .  .  . 1

o13 : BettiTally
i14 : betti dual fm

              -6  -5 -4 -3 -2 -1 0
o14 = total: 246 135 66 27  8  2 2
         -2: 225 120 56 21  5  . .
         -1:  21  15 10  6  3  1 .
          0:   .   .  .  .  .  1 1
          1:   .   .  .  .  .  . 1

o14 : BettiTally

Ways to use isChainComplex :

For the programmer

The object isChainComplex is a method function.