# bettiTablesWithHilbertFunction -- list or tally all Betti tables that can be obtained from monomial ideals with a particular (partial or complete) Hilbert function

## Synopsis

• Usage:
bettiTablesWithHilbertFunction(L, R)
bettiTablesWithHilbertFunction(L, R, BoundGenerators => a)
bettiTablesWithHilbertFunction(L, R, FirstBetti => b)
bettiTablesWithHilbertFunction(L, R, SquareFree => x)
bettiTablesWithHilbertFunction(L, R, Count => y)
• Inputs:
• L, a list, $\{h(0), h(1), \ldots, h(d)\}$, the values of a valid Hilbert function for $R$ for degrees $0\ldots d$.
• R, ,
• Optional inputs:
• BoundGenerators => an integer, default value -1, a degree bound on the monomial generators
• FirstBetti => an integer, default value null, a specified first total Betti number
• GradedBettis => a list, default value null, if the form $\{b_0, b_1, \ldots, b_d\}$, where $b_i$ is the first graded Betti numbers with degree $i$.
• SquareFree => , default value false, whether or not to consider squarefree monomial ideals only
• Count => , default value false, whether or not to return the count of unique tables instead of all values
• Outputs:
• a list, all unique Betti tables that can be obtained from monomial ideals of $R$ with Hilbert function beginning with $L$, or
• , the same set of Betti tables, with the number of unique monomial ideals producing each one

## Description

This function calls monomialIdealsWithHilbertFunction with the specified options, determines the Betti table of each feasible monomial ideal, then lists or tallies the Betti tables encountered. The Count option does not fundamentally change how the computation is performed, only how the results are reported.

 i1 : R = QQ[x,y,z]; L = {1, 3, 5, 5, 4}; i3 : bettiTablesWithHilbertFunction(L, R) --outputs unique tables matching the criteria 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 o3 = {total: 1 4 4 1, total: 1 4 4 1, total: 1 4 4 1, total: 1 3 3 1, total: 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: 2: . 2 2 . 2: . 2 2 . 2: . 2 2 . 2: . 2 1 . 2: 3: . 1 2 1 3: . 1 1 . 3: . 1 . . 3: . . 2 1 3: 4: . . 1 1 4: . . 2 . 4: 5: . . . 1 ------------------------------------------------------------------------ 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 1 4 5 2, total: 1 4 5 2, total: 1 3 3 1, total: 1 5 6 2, total: 1 5 6 2, 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 . . . . 1 . . 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: . 1 . . . 2 2 . 2: . 2 2 . 2: . 2 1 . 2: . 2 3 1 2: . 2 3 1 . 1 . . 3: . 1 . . 3: . . 1 . 3: . 2 3 1 3: . 2 2 . . . 3 2 4: . . 1 . 4: . . 1 1 4: . . 1 1 5: . . 2 2 ------------------------------------------------------------------------ 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 total: 1 5 6 2, total: 1 5 7 3, total: 1 5 7 3, total: 1 5 7 3, total: 1 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: . 2: . 2 3 1 2: . 2 3 1 2: . 2 3 1 2: . 2 3 1 2: . 3: . 2 2 . 3: . 2 1 . 3: . 2 1 . 3: . 2 1 . 3: . 4: . . . . 4: . . 2 1 4: . . 3 2 4: . . 2 1 4: . 5: . . 1 1 5: . . 1 1 5: . . . . 5: . 6: . . 1 1 ------------------------------------------------------------------------ 1 2 3 0 1 2 3 0 1 2 3 4 5 2, total: 1 5 6 2, total: 1 4 4 1} . . . 0: 1 . . . 0: 1 . . . 1 . . 1: . 1 . . 1: . 1 . . 2 2 . 2: . 2 3 1 2: . 2 2 . 1 . . 3: . 2 2 . 3: . 1 1 . . 2 1 4: . . . . 4: . . . . . 1 1 5: . . . . 5: . . 1 1 6: . . 1 1 o3 : List i4 : bettiTablesWithHilbertFunction(L, R, Count => true) --tallies distinct ideals giving each table 0 1 2 3 o4 = Tally{total: 1 3 3 1 => 12 } 0: 1 . . . 1: . 1 . . 2: . 2 1 . 3: . . 1 . 4: . . 1 1 0 1 2 3 total: 1 3 3 1 => 27 0: 1 . . . 1: . 1 . . 2: . 2 1 . 3: . . 2 1 0 1 2 3 total: 1 4 4 1 => 6 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 . . 4: . . 2 . 5: . . . 1 0 1 2 3 total: 1 4 4 1 => 12 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 1 . 4: . . . . 5: . . 1 1 0 1 2 3 total: 1 4 4 1 => 78 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 1 . 4: . . 1 1 0 1 2 3 total: 1 4 4 1 => 174 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 2 1 0 1 2 3 total: 1 4 5 2 => 6 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 . . 4: . . 2 1 5: . . 1 1 0 1 2 3 total: 1 4 5 2 => 9 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 . . 4: . . 1 . 5: . . 2 2 0 1 2 3 total: 1 4 5 2 => 15 0: 1 . . . 1: . 1 . . 2: . 2 2 . 3: . 1 . . 4: . . 3 2 0 1 2 3 total: 1 5 6 2 => 6 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 2 . 4: . . . . 5: . . . . 6: . . 1 1 0 1 2 3 total: 1 5 6 2 => 24 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 2 . 4: . . . . 5: . . 1 1 0 1 2 3 total: 1 5 6 2 => 54 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 2 . 4: . . 1 1 0 1 2 3 total: 1 5 6 2 => 150 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 3 1 0 1 2 3 total: 1 5 7 3 => 12 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 1 . 4: . . 2 1 5: . . . . 6: . . 1 1 0 1 2 3 total: 1 5 7 3 => 12 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 1 . 4: . . 2 1 5: . . 1 1 0 1 2 3 total: 1 5 7 3 => 12 0: 1 . . . 1: . 1 . . 2: . 2 3 1 3: . 2 1 . 4: . . 3 2 o4 : Tally i5 : bettiTablesWithHilbertFunction(L, R, FirstBetti => 5) --only returns tables whose first total betti number is 5 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 o5 = {total: 1 5 6 2, total: 1 5 6 2, total: 1 5 6 2, total: 1 5 6 2, total: 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1 . . . 0: 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: . 1 . . 1: 2: . 2 3 1 2: . 2 3 1 2: . 2 3 1 2: . 2 3 1 2: 3: . 2 3 1 3: . 2 2 . 3: . 2 2 . 3: . 2 2 . 3: 4: . . 1 1 4: . . . . 4: . . . . 4: 5: . . 1 1 5: . . . . 6: . . 1 1 ------------------------------------------------------------------------ 0 1 2 3 0 1 2 3 0 1 2 3 1 5 7 3, total: 1 5 7 3, total: 1 5 7 3} 1 . . . 0: 1 . . . 0: 1 . . . . 1 . . 1: . 1 . . 1: . 1 . . . 2 3 1 2: . 2 3 1 2: . 2 3 1 . 2 1 . 3: . 2 1 . 3: . 2 1 . . . 3 2 4: . . 2 1 4: . . 2 1 5: . . . . 5: . . 1 1 6: . . 1 1 o5 : List i6 : bettiTablesWithHilbertFunction(L, R, GradedBettis => {0, 0, 2, 2, 1}) --only returns tables whose first graded betti numbers match a given sequence o6 = {} o6 : List i7 : bettiTablesWithHilbertFunction(L, R, BoundGenerators => 3) 0 1 2 3 0 1 2 3 o7 = {total: 1 3 3 1, total: 1 3 3 1} 0: 1 . . . 0: 1 . . . 1: . 1 . . 1: . 1 . . 2: . 2 1 . 2: . 2 1 . 3: . . 2 1 3: . . 1 . 4: . . 1 1 o7 : List i8 : bettiTablesWithHilbertFunction(L, R, BoundGenerators => 3, Count => true) 0 1 2 3 o8 = Tally{total: 1 3 3 1 => 12} 0: 1 . . . 1: . 1 . . 2: . 2 1 . 3: . . 1 . 4: . . 1 1 0 1 2 3 total: 1 3 3 1 => 27 0: 1 . . . 1: . 1 . . 2: . 2 1 . 3: . . 2 1 o8 : Tally

These methods also work for squarefree ideals

 i9 : S = QQ[a..f] o9 = S o9 : PolynomialRing i10 : bettiTablesWithHilbertFunction({1, 6, 19, 45, 86}, S, SquareFree => true) 0 1 2 3 o10 = {total: 1 6 8 3} 0: 1 . . . 1: . 2 1 . 2: . . . . 3: . 4 7 3 o10 : List

The next examples show that options can be combined in many ways

 i11 : bettiTablesWithHilbertFunction({1, 3, 6, 7, 6, 5, 4, 4, 4}, R, FirstBetti => 6, BoundGenerators => 5, Count => true) 0 1 2 3 o11 = Tally{total: 1 6 7 2 => 48 } 0: 1 . . . 1: . . . . 2: . 3 3 1 3: . 3 3 . 4: . . . . 5: . . 1 1 0 1 2 3 total: 1 6 7 2 => 522 0: 1 . . . 1: . . . . 2: . 3 2 . 3: . 2 3 1 4: . 1 1 . 5: . . 1 1 0 1 2 3 total: 1 6 8 3 => 12 0: 1 . . . 1: . . . . 2: . 3 3 1 3: . 3 3 1 4: . . 1 . 5: . . 1 1 0 1 2 3 total: 1 6 8 3 => 72 0: 1 . . . 1: . . . . 2: . 3 1 . 3: . 1 4 2 4: . 2 2 . 5: . . 1 1 o11 : Tally i12 : bettiTablesWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree => true, FirstBetti => 5) 0 1 2 3 4 o12 = {total: 1 5 9 7 2} 0: 1 2 1 . . 1: . 3 8 7 2 o12 : List i13 : bettiTablesWithHilbertFunction({1, 4, 7, 10, 13}, S, SquareFree => true, GradedBettis => {0, 2, 3, 1, 0}) 0 1 2 3 4 5 o13 = {total: 1 6 13 13 6 1} 0: 1 2 1 . . . 1: . 3 9 10 5 1 2: . 1 3 3 1 . o13 : List

• monomialIdealsWithHilbertFunction -- find all monomial ideals in a polynomial ring with a particular (partial or complete) Hilbert function
• betti(GradedModule) -- display or modify a Betti diagram
• BettiTally -- the class of all Betti tallies
• HashTable -- the class of all hash tables
• tally -- tally the elements of a list or sequence
• hilbertFunct -- return the Hilbert function of a polynomial ring mod a homogeneous ideal as a list
• isHF -- is a finite list a Hilbert function of a polynomial ring mod a homogeneous ideal
• isSquareFree -- whether something is square free monomial ideal
• LexIdeals -- a package for working with lex ideals

## Ways to use bettiTablesWithHilbertFunction :

• "bettiTablesWithHilbertFunction(List,PolynomialRing)"

## For the programmer

The object bettiTablesWithHilbertFunction is .