Macaulay2 » Documentation
Packages » Macaulay2Doc :: length(GradedModule)
next | previous | forward | backward | up | index | toc

length(GradedModule) -- length of a graded module

Synopsis

Description

The length of a graded module is the difference between the largest and smallest indices of occupied spots. Chain complexes are graded modules, so this function applies to them, too.
i1 : R = QQ[x..z];
i2 : C = res coker vars R

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

o2 : ChainComplex
i3 : length C

o3 = 3

Ways to use this method: