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 0x29815f0 -- [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 = 4177 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.063 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 0x19955a0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x2981130 -- [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 0x2981000 -- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)moo removing gb 1 at 0x29814c0 o{8}(2)oo -- number of (nonminimal) gb elements = 11 -- number of monomials = 267 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.062 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 0x26d4f30 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 8 2 4 2 3 3 2 5 2 2 9 o12 = ideal (a + -a b + -a*b + -b + 3a c + a*b*c + -b c + a d + -a*b*d + 7 5 2 4 4 ----------------------------------------------------------------------- 2 2 10 2 2 5 3 1 2 3 2 9 3 2 -b d + --a*c + 8b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c + 8c d + 7 9 7 4 3 7 2 ----------------------------------------------------------------------- 1 2 3 3 3 2 2 4 2 4 3 7 2 7 2 1 2 -c*d + -d , 10a + -a b + -a*b + -b + --a c + 3a*b*c + -b c + -a d + 2 8 5 3 3 10 3 2 ----------------------------------------------------------------------- 2 5 2 6 2 2 6 1 1 2 5 2 8 3 -a*b*d + -b d + -a*c + 3b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c + 3 3 7 5 2 2 2 5 ----------------------------------------------------------------------- 5 2 9 2 1 3 2 3 1 2 2 3 3 2 1 2 -c d + -c*d + -d , -a + -a b + 2a*b + 3b + --a c + -a*b*c + b c + 4 2 3 3 2 10 2 ----------------------------------------------------------------------- 4 2 1 2 2 2 2 9 8 2 5 2 -a d + -a*b*d + 5b d + -a*c + b*c + -a*c*d + 2b*c*d + -a*d + -b*d + 9 4 9 7 3 9 ----------------------------------------------------------------------- 7 3 3 2 2 1 3 -c + -c d + 2c*d + -d ) 4 4 2 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x28ed980 -- [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.562 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 573717244003630104324680987711828165893213333271864296254347700263545 ----------------------------------------------------------------------- 86486766848c27-28295671721628176084350157709059098053576231238561938042 ----------------------------------------------------------------------- 7188900104897958502776960c26d+ ----------------------------------------------------------------------- 60958619206917581321298587790167762220596218143521822322923440464389462 ----------------------------------------------------------------------- 5063748880c25d2-1795529476364839058604525072156860003174092837680987172 ----------------------------------------------------------------------- 985955230320616857011658320c24d3- ----------------------------------------------------------------------- 78973872745982861826416627615810601162138700071014355102502171497370818 ----------------------------------------------------------------------- 8549251440c23d4-6628081861360847466863055610767428101749551169234201891 ----------------------------------------------------------------------- 977612545989556631474260560c22d5- ----------------------------------------------------------------------- 15868269172516864644778902870246394125983915626270976292472092909502693 ----------------------------------------------------------------------- 540537860000c21d6-31921778902765472264225131892918918087396155799610277 ----------------------------------------------------------------------- 993387969500317297363772934800c20d7- ----------------------------------------------------------------------- 46205266048759663258398026470601049175058776244502745685639642494610607 ----------------------------------------------------------------------- 818652776100c19d8-62658094162195242363472000958352949049520936326291909 ----------------------------------------------------------------------- 534415728255808267783121800100c18d9- ----------------------------------------------------------------------- 60306239555785531637746513115440657746459910846508751179639975474329043 ----------------------------------------------------------------------- 377811524200c17d10-4050533470548127588655815496725650024748170047155705 ----------------------------------------------------------------------- 4307882602309981988114554526000c16d11- ----------------------------------------------------------------------- 22759480721232585928666889975811886039400368254066365848293708285574951 ----------------------------------------------------------------------- 541134780500c15d12-7718776407900026053478700439029840057351065751911132 ----------------------------------------------------------------------- 942012138576112114943064529000c14d13+ ----------------------------------------------------------------------- 44157555192017148748255639153247104675823617309642655353709427693865965 ----------------------------------------------------------------------- 74184905625c13d14+82596191853884136988487926629575193920025724655110785 ----------------------------------------------------------------------- 48674798677439056611014080625c12d15+ ----------------------------------------------------------------------- 11768052266437500317360017079561444233995126335530453764145760555322312 ----------------------------------------------------------------------- 27015502500c11d16+21439404293983770762042058846990366562592630432941530 ----------------------------------------------------------------------- 38933523051115383686629371875c10d17- ----------------------------------------------------------------------- 15757967051922853618304147552766669564497541491578181354530077265887346 ----------------------------------------------------------------------- 6282312500c9d18+1302395724897675095154566233903408436218493098642245856 ----------------------------------------------------------------------- 41276446316724643311996875c8d19- ----------------------------------------------------------------------- 52549783807387892228081210995510608996215457928131871089420562344219327 ----------------------------------------------------------------------- 108468750c7d20+30153766780858154456225479028868258038014883333604155135 ----------------------------------------------------------------------- 47703996671483584140625c6d21- ----------------------------------------------------------------------- 30571868901948594370082312850189572283087595274292732708324521490842851 ----------------------------------------------------------------------- 66640625c5d22+318034789693937115223629328282817089362468792019953761060 ----------------------------------------------------------------------- 768951674235158593750c4d23- ----------------------------------------------------------------------- 42194150970005150881236656201373580084216971807681509264856072761013180 ----------------------------------------------------------------------- 468750c3d24+16317180414607527880911128093003473102339434002577580323742 ----------------------------------------------------------------------- 240020387960937500c2d25+ ----------------------------------------------------------------------- 21542691135951822590824481240789262312648098209368910412147875394847656 ----------------------------------------------------------------------- 2500cd26+20990173940199517615212498917075452489245555525566286238837845 ----------------------------------------------------------------------- 8780566406250d27 | 1 1 o16 : Matrix S <--- S |