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 0x81cad380 -- [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 -- -- used 0.029373 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 0x81eb5800 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x81cad1c0 -- [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 0x81cad000 -- [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.019087 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 0x81eb5500 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 9 2 2 3 1 2 1 2 2 9 o12 = ideal (2a + -a b + a*b + 2b + -a c + 2a*b*c + -b c + a d + -a*b*d + 2 2 3 2 ----------------------------------------------------------------------- 1 2 3 2 3 2 10 8 1 2 2 3 5 2 -b d + -a*c + --b*c + --a*c*d + -b*c*d + -a*d + 5b*d + c + -c d + 6 5 10 7 9 3 4 ----------------------------------------------------------------------- 2 2 3 3 5 3 3 2 2 2 3 3 9 2 2 4 2 2 -c*d + -d , -a + -a b + -a*b + -b + -a c + -a*b*c + -b c + a d + 3 8 3 8 3 2 7 3 9 ----------------------------------------------------------------------- 4 2 6 2 2 1 3 2 9 2 3 3 a*b*d + -b d + -a*c + 4b*c + -a*c*d + 5b*c*d + -a*d + -b*d + -c + 3 5 8 5 4 8 ----------------------------------------------------------------------- 5 2 4 2 1 3 3 2 2 1 2 5 3 3 2 1 2 -c d + -c*d + -d , a + -a b + -a*b + -b + -a c + -a*b*c + 2b c + 2 3 2 5 2 7 5 2 ----------------------------------------------------------------------- 8 2 1 2 2 2 5 2 1 9 2 2 2 -a d + -a*b*d + 3b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 3b*d 7 2 3 3 5 2 9 ----------------------------------------------------------------------- 3 3 2 3 2 3 3 + --c + 4c d + --c*d + -d ) 10 10 5 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x82136e00 -- [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 removing gb 1 at 0x81cad540 -- {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.403043 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 812595474785400386641648810679446562982872592698683219198187601788928 ----------------------------------------------------------------------- c27+1850208566730622173337397133816573775770534889275315724779187887926 ----------------------------------------------------------------------- 47680c26d+1352773504207709249695116158243739613358844964131993391266423 ----------------------------------------------------------------------- 987167213568c25d2-30040986177825437860619054099042047629458623027610253 ----------------------------------------------------------------------- 4193882810406978883584c24d3- ----------------------------------------------------------------------- 85916062097575174761044582172210165951368009609129928834588701887837804 ----------------------------------------------------------------------- 26240c23d4-731112879447992352691929053412231076420768065891615452053830 ----------------------------------------------------------------------- 33073055724360960c22d5- ----------------------------------------------------------------------- 31239117534340074396308416016985983154500004968371693995320606497066756 ----------------------------------------------------------------------- 0056960c21d6-8293687246791126633895903472658342937868420964225114887351 ----------------------------------------------------------------------- 52673382107614798720c20d7- ----------------------------------------------------------------------- 14844638131826467968969209145655825891989671086747856077118963161616800 ----------------------------------------------------------------------- 07039040c19d8-182730933470358661662302566636564459891195237129307940942 ----------------------------------------------------------------------- 5835896182877902506240c18d9- ----------------------------------------------------------------------- 14686321728157603541343421694273388087371572706335370249946895237611313 ----------------------------------------------------------------------- 53078816c17d10-59836725550991023131599990235532728706527273776604922769 ----------------------------------------------------------------------- 1749438307444435019680c16d11+ ----------------------------------------------------------------------- 11559660528253417538795021419181368078859895591812379490232948479264612 ----------------------------------------------------------------------- 7269584c15d12+270735287553825184006893592535366146577361127185683480047 ----------------------------------------------------------------------- 362661451045039333328c14d13+ ----------------------------------------------------------------------- 90432674108967672390646142711793574430715312180081049179727516155267801 ----------------------------------------------------------------------- 582480c13d14-3952977849490063484675557754300286487015689786429858119421 ----------------------------------------------------------------------- 2096212248292556640c12d15- ----------------------------------------------------------------------- 33605784804900512085043648157220663207188097842929438754607082796802824 ----------------------------------------------------------------------- 363720c11d16-1933225184727368890152440399882453003943169660026821350203 ----------------------------------------------------------------------- 017273052214110900c10d17+ ----------------------------------------------------------------------- 31610593512882633653655198149375148401427401052552780959905110037353324 ----------------------------------------------------------------------- 97700c9d18+212272826541403520472098312737295242921102519732280611015916 ----------------------------------------------------------------------- 252875946369800c8d19+66274911607512832502772529158760373953087424518606 ----------------------------------------------------------------------- 206411966108066930570950c7d20- ----------------------------------------------------------------------- 44495320600346242559330935209385167688218535485197819398121574936257669 ----------------------------------------------------------------------- 025c6d21-34188396704735335545276247669229255677366888403116321375202807 ----------------------------------------------------------------------- 098590394000c5d22-61606771515620784135333573856677424753595777610255730 ----------------------------------------------------------------------- 70612823828117994000c4d23- ----------------------------------------------------------------------- 21294909068765014396146791083582106901659934128061725454884818124327025 ----------------------------------------------------------------------- 00c3d24-510580644954777505645627596736226018802984218243730632608910112 ----------------------------------------------------------------------- 023665125c2d25-46981271767042581459112944490411080945502532163831563265 ----------------------------------------------------------------------- 588221449354500cd26-124329657065495161524943924352393071269609575036581 ----------------------------------------------------------------------- 62177837622283005500d27 | 1 1 o16 : Matrix S <--- S |