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 0x90e9130 -- [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 = 4167 -- ncalls = 10 -- nloop = 23 -- nsaved = 0 -- removing gb 1 at 0x90e9000 -- used 0.072004 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 0x912df30 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x9459ab0 -- [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 0x9459980 -- [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.008001 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 0x912de10 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 3 2 6 2 9 3 7 2 3 9 2 2 o12 = ideal (-a + 7a b + -a*b + -b + -a c + -a*b*c + --b c + a d + 9a*b*d 4 7 5 2 2 10 ----------------------------------------------------------------------- 10 2 3 2 5 2 10 3 2 7 2 4 3 9 2 + --b d + -a*c + -b*c + --a*c*d + -b*c*d + 3a*d + -b*d + -c + -c d 9 4 9 9 5 5 5 5 ----------------------------------------------------------------------- 2 4 3 9 3 2 5 2 3 3 2 5 6 2 7 2 + c*d + -d , -a + 4a b + -a*b + 3b + --a c + -a*b*c + -b c + -a d + 3 4 7 10 3 7 9 ----------------------------------------------------------------------- 1 6 2 8 2 1 2 5 2 2 1 3 -a*b*d + -b d + -a*c + -b*c + a*c*d + 2b*c*d + -a*d + 2b*d + -c + 2 5 3 2 2 2 ----------------------------------------------------------------------- 2 3 2 3 3 5 3 3 2 2 3 9 2 9 2 7 2 c d + -c*d + -d , -a + -a b + a*b + b + -a c + 2a*b*c + -b c + -a d 4 7 3 7 8 4 2 ----------------------------------------------------------------------- 5 8 2 2 2 2 1 3 1 2 3 2 4 3 + -a*b*d + -b d + -a*c + b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c 3 5 7 2 4 2 4 7 ----------------------------------------------------------------------- 7 2 7 2 1 3 + -c d + -c*d + -d ) 8 2 2 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x94595f0 -- [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.416026 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 677300926361601683515407992963518869737044902850674137253679049500555 ----------------------------------------------------------------------- 95937500c27+13602427484242120916391269254996784243482227794615252197768 ----------------------------------------------------------------------- 69477880013622218750c26d+ ----------------------------------------------------------------------- 13228900168817201624879214543843625793790336511994142816064033669226152 ----------------------------------------------------------------------- 783346250c25d2+80581556668460913174941378756213593409033233165339578123 ----------------------------------------------------------------------- 840884271950917092860250c24d3+ ----------------------------------------------------------------------- 34747095778093901281977796561207537183705018739307807158260032147996615 ----------------------------------------------------------------------- 7381013775c23d4+1144140339027026867938628651032576354449191945887016989 ----------------------------------------------------------------------- 819533998260375406172214740c22d5+ ----------------------------------------------------------------------- 30519485954403399333428807159489888594227072393301410005738153611266530 ----------------------------------------------------------------------- 28590821184c21d6+692078941987000269281101962012378977255399902958127701 ----------------------------------------------------------------------- 4563987719479705288474686466c20d7+ ----------------------------------------------------------------------- 13787394931206149266784138458533325659120143276826600920548938198356914 ----------------------------------------------------------------------- 458303738699c19d8+24409343659541407866921745243261880983653721730188830 ----------------------------------------------------------------------- 572106736863317714570446775306c18d9+ ----------------------------------------------------------------------- 38220078302379836669444584979691475125220992939997680059055727750732313 ----------------------------------------------------------------------- 771406396969c17d10+5274877338688045746762624546105115029386544098872804 ----------------------------------------------------------------------- 5422574469492179921768802522580c16d11+ ----------------------------------------------------------------------- 64767019802669076704110928358335776325705777631114445956372728442722921 ----------------------------------------------------------------------- 426328428945c15d12+7055286881743562192385697266604326553826681305414946 ----------------------------------------------------------------------- 7410160399007060410814429333340c14d13+ ----------------------------------------------------------------------- 66818511138140217206986616458029951540121802960082269506325416567076288 ----------------------------------------------------------------------- 792432222910c13d14+5598481351491900287469090756588300245838137774102187 ----------------------------------------------------------------------- 7843640609198098353733940813900c12d15+ ----------------------------------------------------------------------- 43890808549758424598764052289587303065652791319457033496167275509001054 ----------------------------------------------------------------------- 447640397700c11d16+3103794382302769847462282684013699372960875905457247 ----------------------------------------------------------------------- 5136267679597820280874244388800c10d17+ ----------------------------------------------------------------------- 18715617755145054440816215852428029495087929504440671913553367927694067 ----------------------------------------------------------------------- 452029836600c9d18+12124992706189650342809562161181925307144533269042143 ----------------------------------------------------------------------- 123867131792192492060613908000c8d19+ ----------------------------------------------------------------------- 10610986100786465006860875466704161230786482468499208615745923948868713 ----------------------------------------------------------------------- 208242980000c7d20+43211539083983109387000427924453807277117417941923928 ----------------------------------------------------------------------- 29289619400911312830967468000c6d21+ ----------------------------------------------------------------------- 54143984069520507709391873691263628020822956465113557580444100400070853 ----------------------------------------------------------------------- 64058400000c5d22+249372053441911571400449662923559136431805159852355409 ----------------------------------------------------------------------- 3263203258653736190200000000c4d23+ ----------------------------------------------------------------------- 10494423102675916697934835081312985959135289254319932956260834928071026 ----------------------------------------------------------------------- 25136000000c3d24+512483894321020377595876617662369422016343323581181132 ----------------------------------------------------------------------- 232768242933079945152000000c2d25+ ----------------------------------------------------------------------- 12086847159584443316252845827387002403243745561755712184755635035736936 ----------------------------------------------------------------------- 7040000000cd26+95891209698408799732112711577012136894705531449060755048 ----------------------------------------------------------------------- 97876162649164800000000d27 | 1 1 o16 : Matrix S <--- S |