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 9.8e-6 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0xbc75980
-- [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 = 4184
-- #reduction steps = 37
-- #spairs done = 11
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.0238779 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 0xbc77aa0 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0xbc754c0
-- [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 0xbc75390
-- [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.0116675 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 0xbdf2198 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
3 2 1 2 3 3 3 2 4 1 2 5 2 9
o12 = ideal (a + 3a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + -a*b*d +
8 5 5 7 4 2 7
-----------------------------------------------------------------------
8 2 1 2 2 2 7 3 2 3 2 3 10 2
-b d + -a*c + b*c + -a*c*d + -b*c*d + -a*d + -b*d + 2c + --c d +
5 2 3 9 7 7 9
-----------------------------------------------------------------------
2 3 8 3 2 2 2 3 3 1 2 2 2 2
c*d + 2d , -a + -a b + a*b + -b + -a c + 2a*b*c + -b c + a d +
3 7 2 2 3
-----------------------------------------------------------------------
2 5 2 2 4 7 2 2 7 3
2a*b*d + 10b d + -a*c + b*c + -a*c*d + -b*c*d + 2a*d + 4b*d + -c +
4 3 2 2
-----------------------------------------------------------------------
1 2 5 2 3 5 3 5 2 1 2 3 3 5 2 2
-c d + -c*d + d , -a + -a b + -a*b + -b + -a c + 6a*b*c + 7b c +
3 8 4 6 9 2 2
-----------------------------------------------------------------------
1 2 1 2 9 2 1 2 3 1 2 2
-a d + -a*b*d + 2b d + -a*c + -b*c + a*c*d + -b*c*d + -a*d + 5b*d +
3 7 2 2 7 3
-----------------------------------------------------------------------
2 3 8 2 4 2 1 3
-c + -c d + -c*d + -d )
5 5 7 2
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0xbc75000
-- [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)
--removing gb 0 at 0xbc75850
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.258225 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 586137455017408945359306893765965724710172829134471535835743787268640
-----------------------------------------------------------------------
81638010712817664c27-59020753142490934519928549139406646639128657243353
-----------------------------------------------------------------------
9398212828656620477026822198436560896c26d+
-----------------------------------------------------------------------
69405209814004736283032525023953323793623006519985209570841474284156991
-----------------------------------------------------------------------
5526311404437504c25d2+1077306124078428710792294322005270791680065941433
-----------------------------------------------------------------------
313510130902241920945338230717877551104c24d3-
-----------------------------------------------------------------------
11557391063089894831225118169232436589850941300342731170419124973864463
-----------------------------------------------------------------------
79787826808344576c23d4-
-----------------------------------------------------------------------
13738430919716724426425433626875217855322094387454735397425743842017915
-----------------------------------------------------------------------
14804553419137024c22d5-
-----------------------------------------------------------------------
70735093146218988217592379999444665912389718427605138285498763423244443
-----------------------------------------------------------------------
95702584058379264c21d6+
-----------------------------------------------------------------------
23371919454236866832903020641957829990103741344258371280433624518150369
-----------------------------------------------------------------------
266159414895773696c20d7-
-----------------------------------------------------------------------
81525571679352835756887857054115079453379879260596609568599830228973553
-----------------------------------------------------------------------
30225366464584704c19d8-
-----------------------------------------------------------------------
49428905784954662033377023759013159568155025999695036905877302817070901
-----------------------------------------------------------------------
677088263762829824c18d9+
-----------------------------------------------------------------------
80925356796015866082266394527621135033086641841137062587257771128371144
-----------------------------------------------------------------------
095308097336768960c17d10-
-----------------------------------------------------------------------
17272188972191800293551824789838219156373420538064041006355103747750609
-----------------------------------------------------------------------
649846653378685440c16d11-
-----------------------------------------------------------------------
86007806321874383996143337916664293734196772468417625165723193132083702
-----------------------------------------------------------------------
763356737504737600c15d12+
-----------------------------------------------------------------------
93177767281770097120700556708911951203625237562081775253459095218557024
-----------------------------------------------------------------------
509471528815638400c14d13-
-----------------------------------------------------------------------
26366274352535436249041807683204234840136781844511498712028933723250189
-----------------------------------------------------------------------
79855629168244000c13d14-
-----------------------------------------------------------------------
58878329181129559369853979589104746032359314658388398634360484789459397
-----------------------------------------------------------------------
171929937425424000c12d15+
-----------------------------------------------------------------------
40163628939984962158000725242199061265760694627761709764259121585986138
-----------------------------------------------------------------------
828731495120825000c11d16+
-----------------------------------------------------------------------
96596278585860981493081534510649026634813666304180329221478198133707102
-----------------------------------------------------------------------
47928562330090000c10d17-
-----------------------------------------------------------------------
27943126300572954412127044541278854401271854339267116549964255477523129
-----------------------------------------------------------------------
846298246852715625c9d18+
-----------------------------------------------------------------------
31691720202391483354975769081144411739219012535734307425752673859870639
-----------------------------------------------------------------------
74019623526912500c8d19+
-----------------------------------------------------------------------
12407293105717074100764488459627816141103239866103294922504470522779812
-----------------------------------------------------------------------
971027211695250000c7d20-
-----------------------------------------------------------------------
30191579343172919960387212817799875960083074498227617823316711680733003
-----------------------------------------------------------------------
66255637749000000c6d21-
-----------------------------------------------------------------------
28457158453459749875859033739153322536899620303479880745559763296445434
-----------------------------------------------------------------------
90408666560000000c5d22+
-----------------------------------------------------------------------
75557408308700324070491284355150166741549815480655476203765648828105734
-----------------------------------------------------------------------
6373922880000000c4d23+2636295051671511058783174735939585756474709081608
-----------------------------------------------------------------------
55778129973767802071921068774400000000c3d24+
-----------------------------------------------------------------------
16801956600900462791997833661951782222175032456813660443107815317887021
-----------------------------------------------------------------------
598003200000000c2d25-65477555747159452850806266315643003311425808263965
-----------------------------------------------------------------------
115727946831037155082452992000000000cd26+
-----------------------------------------------------------------------
12133868306519075259248808091213126036257366539249589863991375795407143
-----------------------------------------------------------------------
796736000000000d27 |
1 1
o16 : Matrix S <--- S
|