An installed Hilbert function will be used by Gröbner basis computations when possible.
Sometimes you know or are very sure that you know the Hilbert function. For example, in the following example, the Hilbert function of 3 random polynomials should be the same as the Hilbert function for a complete intersection.
i1 : R = ZZ/101[a..g]; |
i2 : I = ideal random(R^1, R^{3:-3});
o2 : Ideal of R
|
i3 : hf = poincare ideal(a^3,b^3,c^3)
3 6 9
o3 = 1 - 3T + 3T - T
o3 : ZZ[T]
|
i4 : installHilbertFunction(I, hf) |
i5 : gbTrace=3 o5 = 3 |
i6 : time poincare I
-- used 0.00002048 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0x3fdb1c0
-- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mmm{6}(2,6)mm{7}(1,4)m{8}(0,2)number of (nonminimal) gb elements = 11
-- number of monomials = 4178
-- #reduction steps = 38
-- #spairs done = 11
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.0328771 seconds
1 11
o7 : Matrix R <--- R
|
Another important situation is to compute a Gröbner basis using a different monomial order. In the example below
i8 : R = QQ[a..d]; -- registering polynomial ring 3 at 0x4f07960 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0x3fdb000
-- [gb]number of (nonminimal) gb elements = 0
-- number of monomials = 0
-- #reduction steps = 0
-- #spairs done = 0
-- ncalls = 0
-- nloop = 0
-- nsaved = 0
--
o9 : Ideal of R
|
i10 : time hf = poincare I
-- registering gb 4 at 0x1d92e00
-- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)oonumber of (nonminimal) gb elements = 11
-- number of monomials = 267
-- #reduction steps = 236
-- #spairs done = 30
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.013999 seconds
3 6 9
o10 = 1 - 3T + 3T - T
o10 : ZZ[T]
|
i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 4 at 0x4f07870 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
1 3 2 2 1 2 3 2 2 1 8 2 2
o12 = ideal (-a + -a b + -a*b + 4b + -a c + -a*b*c + -b c + 7a d + a*b*d +
6 3 5 3 3 7
-----------------------------------------------------------------------
2 3 2 3 2 5 5 2 7 2 3 1 2
b d + -a*c + -b*c + -a*c*d + -b*c*d + a*d + -b*d + c + -c d +
5 8 7 9 8 3
-----------------------------------------------------------------------
2 3 3 1 3 7 2 1 2 5 3 2 5 5 2 5 2
5c*d + -d , -a + -a b + -a*b + -b + 5a c + -a*b*c + -b c + -a d +
2 5 4 2 9 3 6 2
-----------------------------------------------------------------------
3 7 2 4 2 2 5 5 3 2 5 2 7 3
-a*b*d + -b d + -a*c + 8b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c +
7 4 7 2 8 2 4 6
-----------------------------------------------------------------------
8 2 1 2 5 3 3 1 2 5 2 3 5 2 1 2
-c d + -c*d + -d , 4a + -a b + -a*b + 2b + -a c + -a*b*c + b c +
7 2 3 8 6 2 3
-----------------------------------------------------------------------
2 2 3 1 2 5 2 1 2 2 2 1 2
-a d + -a*b*d + -b d + -a*c + -b*c + -a*c*d + 4b*c*d + 10a*d + -b*d
7 8 2 9 2 9 4
-----------------------------------------------------------------------
3 6 2 3 2 2 3
+ 2c + -c d + -c*d + -d )
7 5 5
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0x1d92c40
-- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mmm{6}(3,7)mmm{7}(3,8)mmm{8}(3,9)mmm{9}(3,9)m
-- mm{10}(2,8)mm{11}(1,5)m{12}(1,3)m{13}(1,3)m{14}(1,3)m{15}(1,3)m{16}(1,3)m
-- {17}(1,3)
--removing gb 0 at 0x3fdb380
m{18}(1,3)m{19}(1,3)m{20}(1,3)m{21}(1,3)m{22}(1,3)m{23}(1,3)m{24}(1,3)m
-- {25}(1,3)m{26}(1,3)m{27}(1,3)m{28}(0,2)number of (nonminimal) gb elements = 39
-- number of monomials = 1051
-- #reduction steps = 284
-- #spairs done = 53
-- ncalls = 46
-- nloop = 54
-- nsaved = 0
-- -- used 0.187706 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 490933032220189868756396160868468798478317574787113480972722441085026
-----------------------------------------------------------------------
39302252097265625c27+22123658085742325172127996980906258758679953531596
-----------------------------------------------------------------------
669750834322530552158229854806532421875c26d+
-----------------------------------------------------------------------
16340447534394863446277522738143559090297829826188769974695433353480388
-----------------------------------------------------------------------
605118163668750000c25d2+
-----------------------------------------------------------------------
44270886545875296327739394060613771528040967957457348135613714745652238
-----------------------------------------------------------------------
1654007350527187500c24d3+
-----------------------------------------------------------------------
40699403405366894537954682764627749432222063431180375425884315500039171
-----------------------------------------------------------------------
7794877867710000000c23d4-
-----------------------------------------------------------------------
46590926348678385469474840312189856924366996491440356438333147140103375
-----------------------------------------------------------------------
8515455421008203125c22d5+
-----------------------------------------------------------------------
16097960468464878422363714003255599287490273570894887258975461226802066
-----------------------------------------------------------------------
40097254502763665625c21d6+
-----------------------------------------------------------------------
75784583718795408322072157118130583613882630483839782782679086148957574
-----------------------------------------------------------------------
3604883098711703125c20d7+
-----------------------------------------------------------------------
14345853591750256402350514657267567832918695729021631451491280870560940
-----------------------------------------------------------------------
84044639545035116250c19d8+
-----------------------------------------------------------------------
40798608003771776475028810593528928806305247619898793993109420914989987
-----------------------------------------------------------------------
09742463806412042500c18d9+
-----------------------------------------------------------------------
30593765634972331882842170929273987118969530334223043959024544345683776
-----------------------------------------------------------------------
45193405532581765750c17d10-
-----------------------------------------------------------------------
48905027962301643748699750935548055269516100697648260295950075688718705
-----------------------------------------------------------------------
10848820775761834375c16d11+
-----------------------------------------------------------------------
80580370698881812065649397915314342649953837137616144409248896754777472
-----------------------------------------------------------------------
52798157513547189425c15d12+
-----------------------------------------------------------------------
75478578290151697832068941878059024096318773871351190535264047031277932
-----------------------------------------------------------------------
47788014482305525200c14d13+
-----------------------------------------------------------------------
34820074818574899161078279981392180130544568786375801295412006992113503
-----------------------------------------------------------------------
09594496308158145015c13d14+
-----------------------------------------------------------------------
63514775929282302189283699112613279399038421364840748338196134076367644
-----------------------------------------------------------------------
65043897089206883045c12d15+
-----------------------------------------------------------------------
42632757901838154705697300333329214304922029922935183196075528693662745
-----------------------------------------------------------------------
25900292237176208565c11d16+
-----------------------------------------------------------------------
13662306569546641967002471097190074737561627135913823539008902150868839
-----------------------------------------------------------------------
35520444096883081395c10d17+
-----------------------------------------------------------------------
13458483749949872772031688815238974171347055696399792818927448822552991
-----------------------------------------------------------------------
45006908802572728150c9d18+
-----------------------------------------------------------------------
35145793596261424254039172910064369463351000891126826603410153171219485
-----------------------------------------------------------------------
5719442181326838123c8d19-
-----------------------------------------------------------------------
36315785612263433495744708812273241854538929581106486627677968907943678
-----------------------------------------------------------------------
4516961750022210959c7d20-
-----------------------------------------------------------------------
42879999800499372087652787409820276599688020052671449753533735190694760
-----------------------------------------------------------------------
6575541889082993231c6d21-
-----------------------------------------------------------------------
38423405154419401444811782106721791058284640013076296685474596883505939
-----------------------------------------------------------------------
7304687142273835578c5d22-
-----------------------------------------------------------------------
30251181722582542693926595071000218363016705751467169883845663603505954
-----------------------------------------------------------------------
7957131102963787690c4d23-
-----------------------------------------------------------------------
15814118001818992247135051287494480818494493254956183858429921076061103
-----------------------------------------------------------------------
9500583313820826378c3d24-
-----------------------------------------------------------------------
58113971172221193463109678203202663949208508099904855510093402869960725
-----------------------------------------------------------------------
919281211075895126c2d25-
-----------------------------------------------------------------------
14783250074741167076906652273981799913207088623219820827145226222932812
-----------------------------------------------------------------------
217606379378112274cd26-
-----------------------------------------------------------------------
21328435966216776030851012746439184277002875726888775868442112662287771
-----------------------------------------------------------------------
01155358353818432d27 |
1 1
o16 : Matrix S <--- S
|