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 0x2689380 -- [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.014998 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 0x2514700 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x26891c0 -- [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 0x2689000 -- [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.006999 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 0x2514400 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 9 3 2 2 4 2 1 3 2 8 8 2 7 2 4 o12 = ideal (--a + -a b + -a*b + -b + 4a c + -a*b*c + -b c + -a d + -a*b*d 10 3 5 7 3 3 4 9 ----------------------------------------------------------------------- 1 2 9 2 2 4 1 2 8 2 3 2 + --b d + -a*c + b*c + -a*c*d + -b*c*d + a*d + -b*d + c + 4c d + 10 7 5 2 7 ----------------------------------------------------------------------- 2 2 1 3 3 2 2 8 2 4 3 8 2 5 2 2 8 2 -c*d + -d , a + -a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + 3 3 3 5 5 5 3 3 3 ----------------------------------------------------------------------- 5 9 2 9 2 10 2 1 5 5 2 8 2 9 3 -a*b*d + -b d + -a*c + --b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c 7 8 5 9 7 4 8 5 7 ----------------------------------------------------------------------- 7 2 7 2 8 3 7 3 1 2 2 3 3 2 1 1 2 + -c d + -c*d + -d , -a + -a b + a*b + 6b + -a c + -a*b*c + -b c + 2 2 7 6 4 2 9 3 ----------------------------------------------------------------------- 3 2 1 2 10 2 1 2 9 2 4 2 -a d + -a*b*d + 10b d + --a*c + --b*c + -a*c*d + -b*c*d + -a*d + 2 2 3 10 5 3 3 ----------------------------------------------------------------------- 2 8 3 1 2 2 3 3 2b*d + -c + -c d + c*d + -d ) 5 6 2 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x2af3e00 -- [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 -- m removing gb 1 at 0x2689540 m{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.165975 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 261760853242000314574245104493861881449095147038945817106474136802899 ----------------------------------------------------------------------- 5780608c27-602121606906280372629434595309184189142545325162831932532865 ----------------------------------------------------------------------- 5672552416346112c26d-22237099157015096725233095141321882459907149936054 ----------------------------------------------------------------------- 0378991433416904971720327168c25d2- ----------------------------------------------------------------------- 29236379913919823969666459616543119001298330898735809164889982408887844 ----------------------------------------------------------------------- 1037824c24d3+6298983240349202654027934924475143275194987982358306082246 ----------------------------------------------------------------------- 698459873469931716608c23d4+ ----------------------------------------------------------------------- 31135265720078197392088935349237631284495739071236046958570693147040459 ----------------------------------------------------------------------- 253874688c22d5+78212145702373178136411141578153771218887988624770595615 ----------------------------------------------------------------------- 170849643429894704218112c21d6+ ----------------------------------------------------------------------- 17090966927913315857860828661368895046445887607127965301604582593723081 ----------------------------------------------------------------------- 5233884160c20d7+2750982968264194467693716412603146812471127167270245416 ----------------------------------------------------------------------- 19160029547090807481217024c19d8+ ----------------------------------------------------------------------- 35862516546469881855104369259163998499585773485076066227451925773601686 ----------------------------------------------------------------------- 4844936192c18d9+3954570672023213726783420964449478694395319278222327247 ----------------------------------------------------------------------- 15919545713838469321336832c17d10+ ----------------------------------------------------------------------- 31087053538372074506200112373575669533967168460361870452415566168908574 ----------------------------------------------------------------------- 2197834752c16d11+242646819856004804054826068577776470091352888733072516 ----------------------------------------------------------------------- 207660583280258193310697792c15d12+ ----------------------------------------------------------------------- 14033909551190903223952285614653423345817551956915757553438546182592994 ----------------------------------------------------------------------- 8611901760c14d13+118894262372765113140447735119960106355855852504344600 ----------------------------------------------------------------------- 534981033641437757349782208c13d14+ ----------------------------------------------------------------------- 96500686444722810172467359545688741393022229255769236928106715116009196 ----------------------------------------------------------------------- 679328848c12d15+6243809168794937090883189242262233077632855310075542522 ----------------------------------------------------------------------- 0206286491026238894149860c11d16+ ----------------------------------------------------------------------- 31162943685415431707284745222053328833619231662801429098806778742695141 ----------------------------------------------------------------------- 623071520c10d17+1130688786149460341061811045161750405837276824629002587 ----------------------------------------------------------------------- 812467030538158947115510c9d18- ----------------------------------------------------------------------- 25434162697185548090041194586154275115588667030926190058182335142936700 ----------------------------------------------------------------------- 02630075c8d19-861753782748446804033756337801780245566347443709618604157 ----------------------------------------------------------------------- 007356718754967958750c7d20- ----------------------------------------------------------------------- 67788958286430679270844084394702014464356615804346460493317643912055886 ----------------------------------------------------------------------- 1628500c6d21-4487475878702422554191643160903265692948785326144615763415 ----------------------------------------------------------------------- 7846611544594692500c5d22+ ----------------------------------------------------------------------- 32478211314578812314891405155217309728553277298948789365795499823956140 ----------------------------------------------------------------------- 931250c4d23+88266414691300604913609307748703577699757852840608044503863 ----------------------------------------------------------------------- 09489742135437500c3d24+ ----------------------------------------------------------------------- 37051766963661623508067084382225244554488671283102300649321104785455437 ----------------------------------------------------------------------- 5000c2d25-1153574501083531249179943799999432382715459608222734489655132 ----------------------------------------------------------------------- 94136535937500cd26-1518343041976878732684891078800426586208104035579929 ----------------------------------------------------------------------- 9601941972878029296875d27 | 1 1 o16 : Matrix S <--- S |