We say that a (nonzero) $\ZZ^r$-graded complex F is linear if its first nonzero module is generated in a single multidegree and all of its maps (including the zero maps) have degree at most 1. For instance, if F_i is zero for $i<0$ and F_0 is generated in degree $0\in\ZZ^r$, then F_i should be generated in multidegrees with sum at most $i$ for $i>0$. If F is zero then the function returns true.
i1 : S = ZZ/101[x_1..x_4] o1 = S o1 : PolynomialRing |
i2 : I = ideal(x_1*x_2, x_1*x_3,x_1*x_4, x_2*x_3, x_3*x_4)
o2 = ideal (x x , x x , x x , x x , x x )
1 2 1 3 1 4 2 3 3 4
o2 : Ideal of S
|
i3 : M = S^1/I
o3 = cokernel | x_1x_2 x_1x_3 x_1x_4 x_2x_3 x_3x_4 |
1
o3 : S-module, quotient of S
|
i4 : F = res M
1 5 6 2
o4 = S <-- S <-- S <-- S <-- 0
0 1 2 3 4
o4 : ChainComplex
|
i5 : betti F
0 1 2 3
o5 = total: 1 5 6 2
0: 1 . . .
1: . 5 6 2
o5 : BettiTally
|
i6 : isLinearComplex F o6 = false |
i7 : F' = res truncate(2,M)
5 14 13 4
o7 = S <-- S <-- S <-- S <-- 0
0 1 2 3 4
o7 : ChainComplex
|
i8 : betti F'
0 1 2 3
o8 = total: 5 14 13 4
2: 5 14 13 4
o8 : BettiTally
|
i9 : isLinearComplex F' o9 = true |
It is possible for a complex to have differential matrices containing only linear entries yet be nonlinear by the definition above.
The object isLinearComplex is a method function.