A multigraded Betti tally is a special type of
BettiTally that is printed as a display of the multigraded Betti numbers. The class was created so that the function
multigraded (missing documentation) could return something that both prints nicely and from which information could be extracted. The keys are triples
(i,d,h) where
i is the homological degree,
d is a list of integers giving a multidegree, and
h is the result of applying a weight covector to
d.
By default the data is presented as a table of polynomials where each column corresponds to a given homological degree appearing as the top entry and each monomial in the other entries represents the multidegree of a given generator.
When
compactMatrixForm is set to true, the entries in a column correspond to a fixed multidegree, ordered by the
h. The number of summand correspond to a given multidegree appears to the left of the multidegree.
i1 : B = new MultigradedBettiTally from {(0, {0, 0}, 0) => 1, (1, {0, 2}, 2) => 1, (1, {1, 1}, 2) => 2, (1, {2, 0}, 2) => 1, (2, {1, 2}, 3) => 2, (2, {2, 1}, 3) => 2, (3, {2, 2}, 4) => 1}
0 1 2 3
o1 = 0: 1 . . .
2: . a2+2ab+b2 . .
3: . . 2a2b+2ab2 .
4: . . . a2b2
o1 : MultigradedBettiTally
|
i2 : peek oo
o2 = MultigradedBettiTally{(0, {0, 0}, 0) => 1}
(1, {0, 2}, 2) => 1
(1, {1, 1}, 2) => 2
(1, {2, 0}, 2) => 1
(2, {1, 2}, 3) => 2
(2, {2, 1}, 3) => 2
(3, {2, 2}, 4) => 1
|
For convenience, most operations on
BettiTally such as direct sum (
++), tensor product (
**),
pdim and degree shifting (numbers in brackets or lists in parentheses) are automatically extended to work with multigraded Betti tables. These operations mimic the corresponding operations on chain complexes.
i3 : B({-1,-1})
0 1 2 3
o3 = 0: ab . . .
2: . a3b+2a2b2+ab3 . .
3: . . 2a3b2+2a2b3 .
4: . . . a3b3
o3 : MultigradedBettiTally
|
i4 : B[1]
-1 0 1 2
o4 = 0: 1 . . .
2: . a2+2ab+b2 . .
3: . . 2a2b+2ab2 .
4: . . . a2b2
o4 : MultigradedBettiTally
|
i5 : B[1] ++ B
-1 0 1 2 3
o5 = 0: 1 1 . . .
2: . a2+2ab+b2 a2+2ab+b2 . .
3: . . 2a2b+2ab2 2a2b+2ab2 .
4: . . . a2b2 a2b2
o5 : MultigradedBettiTally
|
i6 : B ** B
0 1 2 3 4 5 6
o6 = 0: 1 . . . . . .
2: . 2a2+4ab+2b2 . . . . .
3: . . 4a2b+4ab2 . . . .
4: . . a4+4a3b+6a2b2+4ab3+b4 2a2b2 . . .
5: . . . 4a4b+12a3b2+12a2b3+4ab4 . . .
6: . . . . 6a4b2+12a3b3+6a2b4 . .
7: . . . . . 4a4b3+4a3b4 .
8: . . . . . . a4b4
o6 : MultigradedBettiTally
|
i7 : pdim B
o7 = 3
|
i8 : compactMatrixForm = false
o8 = false
|
i9 : dual B
-3 -2 -1 0
o9 = 1:{-2, -2} 2:{-1, -2} 2:{-1, -1} 1:{0, 0}
2:{-2, -1} 1:{0, -2}
1:{-2, 0}
o9 : MultigradedBettiTally
|
A multigraded Betti tally also can multiplied by an integer or by a rational number.
i10 : (1/2) * B
0 1 2 3
o10 = 1/2:{0, 0} 1/2:{2, 0} 1:{1, 2} 1/2:{2, 2}
1/2:{0, 2} 1:{2, 1}
1:{1, 1}
o10 : MultigradedBettiTally
|
i11 : 2 * oo
0 1 2 3
o11 = 1:{0, 0} 1:{0, 2} 2:{1, 2} 1:{2, 2}
1:{2, 0} 2:{2, 1}
2:{1, 1}
o11 : MultigradedBettiTally
|
i12 : lift(oo,ZZ)
0 1 2 3
o12 = 1:{0, 0} 1:{2, 0} 2:{1, 2} 1:{2, 2}
1:{0, 2} 2:{2, 1}
2:{1, 1}
o12 : MultigradedBettiTally
|
This feature was implemented by Mahrud Sayrafi based on earlier work by Gregory G. Smith.