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.000010757 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0x24f5a80
-- [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 = 4179
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
--
--removing gb 0 at 0x24f5c40
-- used 0.0479175 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 0x29b7f00 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0x24f58c0
-- [gb]number of (nonminimal) gb elements = 0
-- number of monomials = 0
-- ncalls = 0
-- nloop = 0
-- nsaved = 0
--
o9 : Ideal of R
|
i10 : time hf = poincare I
-- registering gb 4 at 0x24f5700
-- [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
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.0080549 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 0x29b7e10 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
1 3 1 2 9 2 3 1 2 1 2 1 2 5
o12 = ideal (-a + -a b + --a*b + b + -a c + -a*b*c + b c + -a d + -a*b*d +
3 2 10 2 7 8 4
-----------------------------------------------------------------------
2 2 7 2 2 5 4 7 2 4 2 4 3 7 2
-b d + -a*c + b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c + --c d +
3 8 3 7 9 7 5 10
-----------------------------------------------------------------------
2 2 8 3 1 3 2 3 2 5 3 5 2 8 4 2 1 2
-c*d + -d , --a + 3a b + -a*b + -b + -a c + -a*b*c + -b c + -a d +
5 7 10 8 8 4 3 3 3
-----------------------------------------------------------------------
1 2 2 1 2 4 10 1 2 2 10 3
a*b*d + -b d + a*c + -b*c + -a*c*d + --b*c*d + --a*d + b*d + --c +
3 5 3 7 10 7
-----------------------------------------------------------------------
4 2 2 4 3 1 3 4 2 2 3 9 2 9 8 2
-c d + 2c*d + -d , -a + -a b + 2a*b + 10b + -a c + --a*b*c + -b c +
5 5 2 3 4 10 3
-----------------------------------------------------------------------
8 2 7 2 1 2 1 2 6 3 2 1 2
-a d + a*b*d + -b d + --a*c + -b*c + -a*c*d + -b*c*d + 2a*d + -b*d
3 4 10 2 5 5 3
-----------------------------------------------------------------------
1 3 1 2 1 2 1 3
+ -c + --c d + -c*d + -d )
2 10 6 2
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0x24f5540
-- [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)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
-- ncalls = 46
-- nloop = 54
-- nsaved = 0
-- -- used 0.131304 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 414287576029981165469185823351031505651386214944793116045859905465929
-----------------------------------------------------------------------
0712c27+105459986840532852388357090482855322476051303667667075852154116
-----------------------------------------------------------------------
92667732508c26d-4169001831463835256357567953063095928167098238644280893
-----------------------------------------------------------------------
0510283438622750598c25d2-
-----------------------------------------------------------------------
19635455285100534935173450266264731074546033267816600140643956278927272
-----------------------------------------------------------------------
7331c24d3-1652999732602271737969895130385693592577260980520726111678733
-----------------------------------------------------------------------
76347373264764c23d4+105758766384704288073456374700176260689562882538880
-----------------------------------------------------------------------
6845417616064527965035431c22d5+
-----------------------------------------------------------------------
63136087503625735475469229074924521352513639667065829829066400767228351
-----------------------------------------------------------------------
24706c21d6+214621806957252778376080704044941590142201355827328328079034
-----------------------------------------------------------------------
41093484571056916c20d7+
-----------------------------------------------------------------------
53428439963520866130917955001743612838828265231827522135632363058032388
-----------------------------------------------------------------------
150254c19d8+10668736569853458115721890540584004899651322036698969460910
-----------------------------------------------------------------------
1754454477502863202c18d9+
-----------------------------------------------------------------------
18049291835135293692718841080122342961412007367956773363794875060584816
-----------------------------------------------------------------------
6117436c17d10+264643846581228499494692724971374938338612322683445997478
-----------------------------------------------------------------------
011705795975307934399c16d11+
-----------------------------------------------------------------------
34034987344566511279017307933568387402433972604148897376487357884669900
-----------------------------------------------------------------------
0004050c15d12+389123184780999367073407355345975559048730066898320830364
-----------------------------------------------------------------------
293200272147952353473c14d13+
-----------------------------------------------------------------------
39908207023273256114424879778085299703571900581338795201753320348298548
-----------------------------------------------------------------------
4213644c13d14+368591420192687906319158485366608903489736177603251308619
-----------------------------------------------------------------------
300978575066276869188c12d15+
-----------------------------------------------------------------------
30788395287002952873675966350221093774161596111424765464755300702083184
-----------------------------------------------------------------------
1645820c11d16+233187463216909355773362460883718045264000314864267273778
-----------------------------------------------------------------------
998872192733439996642c10d17+
-----------------------------------------------------------------------
15971009577285563938859170289839611162403025075871237666598175245381526
-----------------------------------------------------------------------
4714236c9d18+9858739398189604538553988814072269688400198862612211059247
-----------------------------------------------------------------------
9309082889873002840c8d19+
-----------------------------------------------------------------------
54640965424296866160396564460426411904413810381858260818795734911782644
-----------------------------------------------------------------------
363160c7d20+26738369862008808632312927991268814714470039095970639802040
-----------------------------------------------------------------------
096919411802983400c6d21+
-----------------------------------------------------------------------
11418928976508273927408154376875554476318071243341710526056135778859072
-----------------------------------------------------------------------
883000c5d22+41637237592269707439115954753165859317671586088373247346724
-----------------------------------------------------------------------
06104922466947500c4d23+
-----------------------------------------------------------------------
11913094792993503556338835821198261817392362888186892348332871135776130
-----------------------------------------------------------------------
00000c3d24+262204016663935614828464991312308336895557252212476239368983
-----------------------------------------------------------------------
465087492875000c2d25+23908085950417044000999220215553232781567757520284
-----------------------------------------------------------------------
558123372058409791250000cd26-
-----------------------------------------------------------------------
10002021671218013487568778413335979595060218973608863342861760746234375
-----------------------------------------------------------------------
000d27 |
1 1
o16 : Matrix S <--- S
|