A multigraded Betti tally is a special type of BettiTally that is printed as a diagram of the multigraded Betti numbers. The class was created so that the method multigraded(BettiTally) could return something that both prints nicely and from which information could be extracted. The content of a multigraded Betti tally is identical to the Betti tally from which it was constructed.
i1 : B = new BettiTally 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 = total: 1 4 4 1 0: 1 . . . 1: . 4 4 1 o1 : BettiTally |
i2 : B = multigraded B 0 1 2 3 o2 = 0: 1 . . . 2: . a2+2ab+b2 . . 3: . . 2a2b+2ab2 . 4: . . . a2b2 o2 : MultigradedBettiTally |
i3 : peek B o3 = 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 |
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 summand.
When compactMatrixForm is set to false, the entries represent the multidegree of summands ordered by the total weight. The number of summands corresponding to a given multidegree appears to the left of the multidegree.
i4 : compactMatrixForm = false o4 = false |
i5 : B 0 1 2 3 o5 = 1:{0, 0} 1:{0, 2} 2:{1, 2} 1:{2, 2} 1:{2, 0} 2:{2, 1} 2:{1, 1} o5 : MultigradedBettiTally |
For convenience, various operations on BettiTally such as direct sum (++), tensor product (**), pdim and degree shifting (numbers in brackets or parentheses) are extended to work with multigraded Betti tables. These operations mimic the corresponding operations on chain complexes.
i6 : compactMatrixForm = true o6 = true |
i7 : B(-1,-1) 0 1 2 3 o7 = 0: ab . . . 2: . a3b+2a2b2+ab3 . . 3: . . 2a3b2+2a2b3 . 4: . . . a3b3 o7 : MultigradedBettiTally |
i8 : B[1] -1 0 1 2 o8 = 0: 1 . . . 2: . a2+2ab+b2 . . 3: . . 2a2b+2ab2 . 4: . . . a2b2 o8 : MultigradedBettiTally |
i9 : B[1] ++ B -1 0 1 2 3 o9 = 0: 1 1 . . . 2: . a2+2ab+b2 a2+2ab+b2 . . 3: . . 2a2b+2ab2 2a2b+2ab2 . 4: . . . a2b2 a2b2 o9 : MultigradedBettiTally |
i10 : B ** B 0 1 2 3 4 5 6 o10 = 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 o10 : MultigradedBettiTally |
i11 : compactMatrixForm = false o11 = false |
i12 : B ** B 0 1 2 3 4 5 6 o12 = 1:{0, 0} 2:{2, 0} 4:{3, 1} 12:{3, 2} 6:{4, 2} 4:{4, 3} 1:{4, 4} 4:{1, 1} 4:{2, 1} 2:{2, 2} 12:{3, 3} 4:{3, 4} 2:{0, 2} 6:{2, 2} 12:{2, 3} 6:{2, 4} 4:{1, 2} 4:{1, 4} 4:{1, 3} 4:{4, 1} 1:{4, 0} 1:{0, 4} o12 : MultigradedBettiTally |
This feature was implemented by Mahrud Sayrafi based on earlier work by Gregory G. Smith.
The object MultigradedBettiTally is a type, with ancestor classes BettiTally < VirtualTally < HashTable < Thing.