The length of a complex is the difference between the highest index of a non-zero object and the lowest index of a non-zero object.
Typically, it counts the number of non-zero differentials, e.g. in a free resolution.
i8 : M1 = S^1/(a*b, c*d, a*c, b*c)
o8 = cokernel | ab cd ac bc |
1
o8 : S-module, quotient of S
|
i9 : M2 = S^1/(a*b, c*d, a*c)
o9 = cokernel | ab cd ac |
1
o9 : S-module, quotient of S
|
i10 : C4 = freeResolution M1
1 4 4 1
o10 = S <-- S <-- S <-- S
0 1 2 3
o10 : Complex
|
i11 : C5 = freeResolution M2
1 3 2
o11 = S <-- S <-- S
0 1 2
o11 : Complex
|
i12 : f = map(M1, M2, 1)
o12 = | 1 |
o12 : Matrix M1 <-- M2
|
i13 : C6 = coker extend(C4, C5, matrix f)
1
o13 = cokernel | 1 | <-- cokernel {2} | 1 0 0 | <-- cokernel {3} | 1 0 | <-- S
{2} | 0 1 0 | {3} | 0 0 |
0 {2} | 0 0 0 | {3} | 0 1 | 3
{2} | 0 0 1 | {3} | 0 0 |
1 2
o13 : Complex
|
i14 : concentration C6
o14 = (0, 3)
o14 : Sequence
|
i15 : length C6
o15 = 2
|
i16 : prune C6
1 2 1
o16 = S <-- S <-- S
1 2 3
o16 : Complex
|
i17 : concentration prune C6
o17 = (1, 3)
o17 : Sequence
|