# BettiTally -- the class of all Betti tallies

## Description

A Betti tally is a special type of Tally that is printed as a display of graded Betti numbers. The class was created so the function betti could return something that both prints nicely and from which information can be extracted. The keys are triples (i,d,h) encoding:

### h, the row labels, representing the dot product of a weight covector and d.

Only i and h are used in printing, and the weight covector can be modified by specifying the betti(...,Weights=>...) option to betti(BettiTally).

 i1 : t = new BettiTally from { (0,{0},0) => 1, (1,{1},1) => 2, (2,{3},3) => 3, (2,{4},4) => 4 } 0 1 2 o1 = total: 1 2 7 0: 1 2 . 1: . . 3 2: . . 4 o1 : BettiTally i2 : betti(t, Weights => {2}) 0 1 2 o2 = total: 1 2 7 0: 1 . . 1: . 2 . 2: . . . 3: . . . 4: . . 3 5: . . . 6: . . 4 o2 : BettiTally i3 : peek oo o3 = BettiTally{(0, {0}, 0) => 1} (1, {1}, 2) => 2 (2, {3}, 6) => 3 (2, {4}, 8) => 4

For convenience, the operations of direct sum (++), tensor product (**), codim, degree, dual, pdim, poincare, regularity, and degree shifting (numbers in brackets or parentheses), have been implemented for Betti tallies. These operations mimic the corresponding operations on chain complexes.

 i4 : t(5) 0 1 2 o4 = total: 1 2 7 -5: 1 2 . -4: . . 3 -3: . . 4 o4 : BettiTally i5 : t[-5] 5 6 7 o5 = total: 1 2 7 -5: 1 2 . -4: . . 3 -3: . . 4 o5 : BettiTally i6 : dual oo -7 -6 -5 o6 = total: 7 2 1 3: 4 . . 4: 3 . . 5: . 2 1 o6 : BettiTally i7 : t ++ oo -7 -6 -5 -4 -3 -2 -1 0 1 2 o7 = total: 7 2 1 . . . . 1 2 7 0: . . . . . . . 1 2 . 1: . . . . . . . . . 3 2: . . . . . . . . . 4 3: 4 . . . . . . . . . 4: 3 . . . . . . . . . 5: . 2 1 . . . . . . . o7 : BettiTally i8 : t ** t 0 1 2 3 4 o8 = total: 1 4 18 28 49 0: 1 4 4 . . 1: . . 6 12 . 2: . . 8 16 9 3: . . . . 24 4: . . . . 16 o8 : BettiTally i9 : pdim t o9 = 2 i10 : codim t o10 = 0 i11 : degree t o11 = 6 i12 : poincare t 3 4 o12 = 1 - 2T + 3T + 4T o12 : ZZ[T] i13 : regularity t o13 = 2

If the Betti tally represents the Betti numbers of a resolution of a module $M$ on a polynomial ring $R = K[x_0,...,x_n]$, then while the data does not uniquely determine $M$, it suffices to compute the Hilbert polynomial and Hilbert series of $M$.

 i14 : n = 3 o14 = 3 i15 : hilbertSeries(n, t) 3 4 1 - 2T + 3T + 4T o15 = ------------------ 3 (1 - T) o15 : Expression of class Divide i16 : hilbertPolynomial(n, t) o16 = 33*P - 23*P + 6*P 0 1 2 o16 : ProjectiveHilbertPolynomial

A Betti tally can be multiplied by an integer or by a rational number, and the values can be lifted to integers, when possible.

 i17 : (1/2) * t 0 1 2 o17 = total: 1/2 1 7/2 0: 1/2 1 . 1: . . 3/2 2: . . 2 o17 : BettiTally i18 : 2 * oo 0 1 2 o18 = total: 1 2 7 0: 1 2 . 1: . . 3 2: . . 4 o18 : BettiTally i19 : lift(oo,ZZ) 0 1 2 o19 = total: 1 2 7 0: 1 2 . 1: . . 3 2: . . 4 o19 : BettiTally

Given a ring $R$, a chain complex with zero maps over $R$ that has a prescribed Betti table can be constructed. Negative entries are ignored and rational entries produce an error. Multigraded rings work only if the Betti tally contains degrees of the correct degree length.

 i20 : R = QQ[x,y] o20 = R o20 : PolynomialRing i21 : C = R^t 1 2 7 o21 = R <-- R <-- R 0 1 2 o21 : ChainComplex i22 : betti C 0 1 2 o22 = total: 1 2 7 0: 1 2 . 1: . . 3 2: . . 4 o22 : BettiTally i23 : C.dd 1 2 o23 = 0 : R <----- R : 1 0 2 7 1 : R <----- R : 2 0 o23 : ChainComplexMap

## Contributors

Hans-Christian von Bothmer donated the last feature.

## Functions and methods returning a Betti tally :

• betti -- display or modify a Betti diagram
• "BettiTally ** BettiTally"
• "BettiTally ++ BettiTally"
• "BettiTally Array"
• "BettiTally ZZ"
• "dual(BettiTally)"
• "lift(BettiTally,type of ZZ)"
• "QQ * BettiTally"
• "ZZ * BettiTally"
• minimalBetti -- minimal betti numbers of (the mininimal free resolution of) a homogeneous ideal or module

## Methods that use a Betti tally :

• "BettiTally == BettiTally" -- see == -- equality
• betti(BettiTally) -- view and set the weight vector of a Betti diagram
• "codim(BettiTally)"
• "degree(BettiTally)"
• "hilbertPolynomial(ZZ,BettiTally)"
• "hilbertSeries(ZZ,BettiTally)"
• "pdim(BettiTally)"
• "poincare(BettiTally)"
• "regularity(BettiTally)"
• "Ring ^ BettiTally"