# Finding the possible betti tables for points in P^3 with given geometry -- Material from Section 3 of [QQ]

The following code finds the ideal and betti table for a point configuration. The point configuration is given by a matrix whose column vectors are the coordinates of the points. The command pointideal does this for a single point, and pointsideal does it for several points

 i1 : K = ZZ/101; i2 : R = K[x_0..x_3];

We check this for some special configurations in P^3, first for a set of six points consisting of two sets of three collinear points, and second for seven points on a twisted cubic

 i3 : TwoSets3Points=transpose matrix{{1,0,0,0},{0,1,0,0},{1,1,0,0},{0,0,1,1},{0,0,1,0},{0,0,0,1}}**R o3 = | 1 0 1 0 0 0 | | 0 1 1 0 0 0 | | 0 0 0 1 1 0 | | 0 0 0 1 0 1 | 4 6 o3 : Matrix R <--- R i4 : I = pointsIdeal TwoSets3Points 2 2 2 2 o4 = ideal (x x , x x , x x , x x , x x - x x , x x - x x ) 1 3 0 3 1 2 0 2 2 3 2 3 0 1 0 1 o4 : Ideal of R i5 : minimalBetti I 0 1 2 3 o5 = total: 1 6 8 3 0: 1 . . . 1: . 4 4 1 2: . 2 4 2 o5 : BettiTally i6 : SevenPointsOnTC=transpose matrix{{1,1,1,1},{1,2,4,8},{1,3,9,27},{1,4,16,64},{1,5,25,125},{1,6,36,216},{1,7,49,343}}**R o6 = | 1 1 1 1 1 1 1 | | 1 2 3 4 5 6 7 | | 1 4 9 16 25 36 49 | | 1 8 27 -37 24 14 40 | 4 7 o6 : Matrix R <--- R i7 : J = pointsIdeal SevenPointsOnTC 2 2 2 2 o7 = ideal (x - x x , x x - x x , x - x x , x x + 14x x + 20x x x - 2 1 3 1 2 0 3 1 0 2 0 2 0 3 0 1 3 ------------------------------------------------------------------------ 2 2 2 3 2 2 20x x x + 6x x + 12x x - 23x x - 10x , x x + 26x x + 3x x x - 0 2 3 0 3 1 3 2 3 3 0 1 0 3 0 1 3 ------------------------------------------------------------------------ 2 2 2 3 3 2 17x x x + 29x x + 11x x + 9x x + 39x , x + 43x x - 32x x x + 0 2 3 0 3 1 3 2 3 3 0 0 3 0 1 3 ------------------------------------------------------------------------ 2 2 3 44x x x - 44x x + 31x x - 43x ) 0 2 3 0 3 2 3 3 o7 : Ideal of R i8 : minimalBetti J 0 1 2 3 o8 = total: 1 6 8 3 0: 1 . . . 1: . 3 2 . 2: . 3 6 3 o8 : BettiTally

Finally we check configurations of 3 to 10 generic points in P^3, note 3 points will have a linear form

 i9 : netList(pack(2,apply({3,4,5,6,7,8,9,10},i->(minimalBetti pointsIdeal random(R^4,R^i))))) +---------------+----------------+ | 0 1 2 3 | 0 1 2 3 | o9 = |total: 1 4 5 2 |total: 1 6 8 3 | | 0: 1 1 . . | 0: 1 . . . | | 1: . 3 5 2 | 1: . 6 8 3 | +---------------+----------------+ | 0 1 2 3 | 0 1 2 3 | |total: 1 5 5 1 |total: 1 4 5 2 | | 0: 1 . . . | 0: 1 . . . | | 1: . 5 5 . | 1: . 4 2 . | | 2: . . . 1 | 2: . . 3 2 | +---------------+----------------+ | 0 1 2 3 | 0 1 2 3 | |total: 1 4 6 3 |total: 1 6 9 4 | | 0: 1 . . . | 0: 1 . . . | | 1: . 3 . . | 1: . 2 . . | | 2: . 1 6 3 | 2: . 4 9 4 | +---------------+----------------+ | 0 1 2 3| 0 1 2 3| |total: 1 8 12 5|total: 1 10 15 6| | 0: 1 . . .| 0: 1 . . .| | 1: . 1 . .| 1: . . . .| | 2: . 7 12 5| 2: . 10 15 6| +---------------+----------------+