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. seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 3 at 0x9617390
-- [gb]{3}(3,3)mmm{4}(2,2)mm
removing gb 1 at 0x9617260
{5}(3,3)mmm{6}(2,6)mm{7}(1,4)m{8}(0,2)
-- number of (nonminimal) gb elements = 11
-- number of monomials = 4186
-- ncalls = 10
-- nloop = 23
-- nsaved = 0
-- -- used 0.046992 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 5 at 0x960cf30 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x94d9be0
-- [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 5 at 0x94d9ab0
-- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)oo
-- number of (nonminimal) gb elements = 11
-- number of monomials = 267
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.008999 seconds
3 6 9
o10 = 1 - 3T + 3T - T
o10 : ZZ[T]
|
i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 6 at 0x960cd80 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
3 2 3 2 3 2 2 2 5 2 5
o12 = ideal (6a + 2a b + -a*b + 2b + -a c + a*b*c + b c + -a d + -a*b*d +
4 5 6 6
-----------------------------------------------------------------------
7 2 2 2 5 2 7 1 2 1 2 5 3 2
-b d + -a*c + -b*c + -a*c*d + -b*c*d + a*d + -b*d + -c + 5c d +
5 5 9 9 5 2 2
-----------------------------------------------------------------------
9 2 10 3 3 3 9 2 1 2 5 3 3 2 5 2 7 2
-c*d + --d , -a + -a b + -a*b + -b + -a c + -a*b*c + b c + -a d +
4 9 4 7 2 4 4 2 6
-----------------------------------------------------------------------
8 5 2 1 2 7 2 3 4 2 2 9 3
-a*b*d + -b d + -a*c + -b*c + --a*c*d + 2b*c*d + -a*d + 8b*d + -c
3 3 2 3 10 9 7
-----------------------------------------------------------------------
9 2 7 2 2 3 9 3 2 2 3 3 1 2 2 3 2
+ -c d + -c*d + -d , -a + a b + 2a*b + -b + -a c + -a*b*c + -b c +
7 8 9 5 7 3 3 5
-----------------------------------------------------------------------
2 1 5 2 7 2 2 2 9 5 2 1 2
a d + --a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + 2a*d + --b*d
10 4 5 7 4 6 10
-----------------------------------------------------------------------
3 2 1 2 1 3
+ 8c + c d + -c*d + -d )
5 8
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x94d9720
-- [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.274959 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 432210773816524875599126234714219729296856644355697779505528370593005
-----------------------------------------------------------------------
568000000c27+1455285826740236126067751487388367211603219029250346546791
-----------------------------------------------------------------------
186955855986688000000c26d+
-----------------------------------------------------------------------
40224664315901081083269843581417965437882989905209735120072696257174726
-----------------------------------------------------------------------
24640000c25d2+526291402817787023563241514041977534047597631211757998938
-----------------------------------------------------------------------
3433625861221253120000c24d3+
-----------------------------------------------------------------------
64463169535519438898279457150746465054724944838025741136517837475915235
-----------------------------------------------------------------------
32800000c23d4+470529452355314781608236351514306264972075948135050507252
-----------------------------------------------------------------------
0534040775120912384000c22d5+
-----------------------------------------------------------------------
13752014636918515485984897000607456624746839589715390406299202314142051
-----------------------------------------------------------------------
401728000c21d6+22222143404066506518489949853917531980863182635920310614
-----------------------------------------------------------------------
943634744872404762624000c20d7+
-----------------------------------------------------------------------
43161211595042841676275258610144856779936982905454324679795164768079293
-----------------------------------------------------------------------
905715200c19d8+32034406540442558157230775104905908097641304270657027605
-----------------------------------------------------------------------
667593631469638544076800c18d9+
-----------------------------------------------------------------------
29072022511194705752017953906194090806327778907349069976741999050157752
-----------------------------------------------------------------------
179507200c17d10+3166074528386032142460128869899269308783049677204238780
-----------------------------------------------------------------------
681059426961283544934400c16d11+
-----------------------------------------------------------------------
41590857342225801177165552890454406628316835803970449748795411044846159
-----------------------------------------------------------------------
244451840c15d12+3603173423294981971991166943114400974817933131846385011
-----------------------------------------------------------------------
5352280348753292671247360c14d13+
-----------------------------------------------------------------------
60653745393125594834647219740112124867284059990653178600472333391934158
-----------------------------------------------------------------------
380597760c13d14-4313572533615764269883364979927416927191661667230433275
-----------------------------------------------------------------------
828542655049051668414080c12d15-
-----------------------------------------------------------------------
22501976326074733511161590578728598859169224804846008646818434637334912
-----------------------------------------------------------------------
25263488c11d16-32221640476846612846358444597526668318723080635363642662
-----------------------------------------------------------------------
317051757852960405000096c10d17-
-----------------------------------------------------------------------
20976929322879924412525603044431053800003277618441820693286986341865739
-----------------------------------------------------------------------
74093568c9d18-296795240443264088927630541707319221100982401919134942683
-----------------------------------------------------------------------
20259204045377929962256c8d19-
-----------------------------------------------------------------------
24177186730313554109174291520673439827664494346575770848519311261395453
-----------------------------------------------------------------------
360713760c7d20-17986051138887279426807638000787042288274165054080397031
-----------------------------------------------------------------------
691353598258601060547400c6d21-
-----------------------------------------------------------------------
10161535173353829068555806063465336466813910891220123926546079995929612
-----------------------------------------------------------------------
741090400c5d22-71682883867157177151304066220552218980313828823854654184
-----------------------------------------------------------------------
33571709519253629729500c4d23-
-----------------------------------------------------------------------
40285151404497353739806300333835415437475703164598725101224070309102266
-----------------------------------------------------------------------
09325000c3d24-183447814202910047233572447862839781917303326599454388652
-----------------------------------------------------------------------
1769229152804516393750c2d25-
-----------------------------------------------------------------------
49369161025826330838668704426509070305395161957616181213398347673230050
-----------------------------------------------------------------------
4125000cd26-82300009065945959614632576457313015765841725577116722613524
-----------------------------------------------------------------------
855348522621828125d27 |
1 1
o16 : Matrix S <--- S
|