next | previous | forward | backward | up | top | index | toc | Macaulay2 website
ChainComplexExtras :: removeZeroTrailingTerms

removeZeroTrailingTerms -- remove trailing zero terms of a chain complex

Synopsis

Description

Remove trailing zero terms in a complex

i1 : S=ZZ/101[x,y]/ideal(x*y)

o1 = S

o1 : QuotientRing
i2 : C=prependZeroMap appendZeroMap chainComplex(matrix{{x}},matrix{{y}}**S^{ -1},matrix{{x}}**S^{ -2})[1]

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

o2 : ChainComplex
i3 : removeZeroTrailingTerms C

      1      1      1      1
o3 = S  <-- S  <-- S  <-- S
                           
     -1     0      1      2

o3 : ChainComplex

If C has only one nonzero term, then the functions returns two zero maps.

i4 : S=ZZ

o4 = ZZ

o4 : Ring
i5 : C=prependZeroMap  chainComplex( map(S^0,S^1,0))[3]

                     1
o5 = 0  <-- 0  <-- ZZ
                    
     -4     -3     -2

o5 : ChainComplex
i6 : removeZeroTrailingTerms C

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

o6 : ChainComplex

Ways to use removeZeroTrailingTerms :

For the programmer

The object removeZeroTrailingTerms is a method function.