Warning! This function is very rough currently. It works if one uses it in the intended manner, as in the example below. But it should be much more general, handling other rings with grace, and also it should handle arbitrary (graded) chain complexes.
i1 : R = QQ[a..d]
o1 = R
o1 : PolynomialRing
|
i2 : I = ideal(a^3, b^3, c^3, d^3, (a+3*b+7*c-4*d)^3)
3 3 3 3 3 2 2 3 2
o2 = ideal (a , b , c , d , a + 9a b + 27a*b + 27b + 21a c + 126a*b*c +
------------------------------------------------------------------------
2 2 2 3 2 2
189b c + 147a*c + 441b*c + 343c - 12a d - 72a*b*d - 108b d - 168a*c*d
------------------------------------------------------------------------
2 2 2 2 3
- 504b*c*d - 588c d + 48a*d + 144b*d + 336c*d - 64d )
o2 : Ideal of R
|
i3 : C = res(ideal gens gb I, Strategy=>4.1)
1 9 25 31 18 4
o3 = R <-- R <-- R <-- R <-- R <-- R
0 1 2 3 4 5
o3 : ChainComplex
|
i4 : betti C
0 1 2 3 4 5
o4 = total: 1 9 25 31 18 4
0: 1 . . . . .
1: . . . . . .
2: . 5 1 . . .
3: . 1 3 1 . .
4: . 3 17 13 4 .
5: . . 4 13 10 3
6: . . . 4 3 1
7: . . . . 1 .
o4 : BettiTally
|
i5 : Cs = constantStrands(C, RR_53)
1
o5 = HashTable{0 => RR <-- 0 <-- 0 <-- 0 <-- 0 <-- 0 }
53
1 2 3 4 5
0
5
3 => 0 <-- RR <-- 0 <-- 0 <-- 0 <-- 0
53
0 2 3 4 5
1
1 1
4 => 0 <-- RR <-- RR <-- 0 <-- 0 <-- 0
53 53
0 3 4 5
1 2
3 3
5 => 0 <-- RR <-- RR <-- 0 <-- 0 <-- 0
53 53
0 3 4 5
1 2
17 1
6 => 0 <-- 0 <-- RR <-- RR <-- 0 <-- 0
53 53
0 1 4 5
2 3
4 13
7 => 0 <-- 0 <-- RR <-- RR <-- 0 <-- 0
53 53
0 1 4 5
2 3
13 4
8 => 0 <-- 0 <-- 0 <-- RR <-- RR <-- 0
53 53
0 1 2 5
3 4
4 10
9 => 0 <-- 0 <-- 0 <-- RR <-- RR <-- 0
53 53
0 1 2 5
3 4
3 3
10 => 0 <-- 0 <-- 0 <-- 0 <-- RR <-- RR
53 53
0 1 2 3
4 5
1 1
11 => 0 <-- 0 <-- 0 <-- 0 <-- RR <-- RR
53 53
0 1 2 3
4 5
o5 : HashTable
|
i6 : CR=Cs#8
13 4
o6 = 0 <-- 0 <-- 0 <-- RR <-- RR <-- 0
53 53
0 1 2 5
3 4
o6 : ChainComplex
|
i7 : SVDBetti C, betti C
0 1 2 3 4 5 0 1 2 3 4 5
o7 = (total: 1 5 17 20 7 ., total: 1 9 25 31 18 4)
0: 1 . . . . . 0: 1 . . . . .
1: . . . . . . 1: . . . . . .
2: . 5 . . . . 2: . 5 1 . . .
3: . . . . . . 3: . 1 3 1 . .
4: . . 16 10 1 . 4: . 3 17 13 4 .
5: . . 1 10 6 . 5: . . 4 13 10 3
6: . . . . . . 6: . . . 4 3 1
7: . . . . . . 7: . . . . 1 .
o7 : Sequence
|