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 0x1d0a000 -- [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 = 4196 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- removing gb 1 at 0x1ebae70 -- used 0.09 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 0x2191f30 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x206ea80 -- [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 0x206e930 -- [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.02 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 0x2191ea0 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 8 3 9 2 9 2 3 8 2 6 2 2 9 o12 = ideal (-a + --a b + -a*b + b + -a c + a*b*c + -b c + a d + -a*b*d + 5 10 5 9 7 8 ----------------------------------------------------------------------- 5 2 2 2 2 6 2 2 1 3 2 2 -b d + a*c + b*c + a*c*d + -b*c*d + -a*d + 3b*d + -c + c d + c*d 7 3 5 3 ----------------------------------------------------------------------- 3 3 1 3 5 2 9 2 1 3 1 2 1 5 2 5 2 + --d , -a + -a b + -a*b + -b + -a c + --a*b*c + -b c + -a d + 10 2 9 4 6 9 10 2 7 ----------------------------------------------------------------------- 1 2 3 2 9 2 7 2 8 2 7 3 -a*b*d + 2b d + --a*c + -b*c + 2a*c*d + -b*c*d + 5a*d + -b*d + --c 2 10 8 4 3 10 ----------------------------------------------------------------------- 9 2 2 7 3 1 3 9 2 2 10 3 1 2 3 5 2 + -c d + 2c*d + -d , -a + -a b + 3a*b + --b + -a c + --a*b*c + -b c 8 6 2 4 3 4 10 6 ----------------------------------------------------------------------- 2 3 2 2 4 2 5 6 2 + 2a d + -a*b*d + 4b d + 5a*c + -b*c + -a*c*d + -b*c*d + 9a*d + 5 3 4 7 ----------------------------------------------------------------------- 10 2 1 3 3 2 5 2 9 3 --b*d + -c + -c d + -c*d + --d ) 3 4 4 8 10 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x206e000 -- [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.491 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 471969063704026335084620258205209581273436560636298478965490252191959 ----------------------------------------------------------------------- 613440c27+5698145746510243081252250565112969497760007760150776799381276 ----------------------------------------------------------------------- 035294136729600c26d+447994979043793229308100755715696035053574538000856 ----------------------------------------------------------------------- 59928835798175500220497920c25d2+ ----------------------------------------------------------------------- 24458001240942393246916337634231435090728447943846828582452395762609811 ----------------------------------------------------------------------- 7570560c24d3+1039722558621220699412608463931936077640823868395341005723 ----------------------------------------------------------------------- 800906798671772464640c23d4+ ----------------------------------------------------------------------- 36212550038199002653174346570710313242977683627474219940481399660843110 ----------------------------------------------------------------------- 45297920c22d5+106722478248118843452798043237272050752057209256753897355 ----------------------------------------------------------------------- 06945836040768670235520c21d6+ ----------------------------------------------------------------------- 27212727525426183286494919662742545971459620203031488128564773379771849 ----------------------------------------------------------------------- 959882080c20d7+60965283694819999162489629315059830304492736432490651564 ----------------------------------------------------------------------- 750050205833540021022960c19d8+ ----------------------------------------------------------------------- 12183863043948864008522672133289568327885420522432515832610931841688441 ----------------------------------------------------------------------- 7084390296c18d9+2187821688116778549186827308916235356524748725487354388 ----------------------------------------------------------------------- 11930291912043893340969356c17d10+ ----------------------------------------------------------------------- 35621409563067250229137010257444931162920062817565093314148240958770931 ----------------------------------------------------------------------- 9470684262c16d11+525575342076788371041107103612856719111843035898090865 ----------------------------------------------------------------------- 813119504613572406647810192c15d12+ ----------------------------------------------------------------------- 70626524430973821037861417603280861700619037628143156404908753370506031 ----------------------------------------------------------------------- 5430169911c14d13+857775328195293180438219335664581872795557588076341878 ----------------------------------------------------------------------- 493210721068212117673786100c13d14+ ----------------------------------------------------------------------- 94533875407498641940612506125211154149193888897431231353153298720618866 ----------------------------------------------------------------------- 8156897212c12d15+926868107709601939791060857283888806285686998603388746 ----------------------------------------------------------------------- 453148854215665455441331178c11d16+ ----------------------------------------------------------------------- 81039229413788141958912760091259551795280043122382727070233214677691379 ----------------------------------------------------------------------- 3864321001c10d17+595741159694905806862443627177518713918717837854068916 ----------------------------------------------------------------------- 482516460467391489910707772c9d18+ ----------------------------------------------------------------------- 35896690867554462758646839740696712555529609073839005211692085392587268 ----------------------------------------------------------------------- 4141046836c8d19+1213591627755222066905489422847250700064307931556117178 ----------------------------------------------------------------------- 04877828289216472973207034c7d20- ----------------------------------------------------------------------- 32197283494866126759583944531033886325214202207540827533904515909849447 ----------------------------------------------------------------------- 751898050c6d21-12070501726432617075288018848883801976031394498236595070 ----------------------------------------------------------------------- 9224891955239867268556952c5d22- ----------------------------------------------------------------------- 12008597634605651833173186739596601988829375674773777568609238226691841 ----------------------------------------------------------------------- 0178693728c4d23-8948280701572892231523676179600597968756799402151748905 ----------------------------------------------------------------------- 7063735941645591867574400c3d24- ----------------------------------------------------------------------- 45294564610345986311722895639109566258040585589697347800867490090506059 ----------------------------------------------------------------------- 815833600c2d25-16515365488285985863635075069687471784894461953118986688 ----------------------------------------------------------------------- 384239039262409288704000cd26- ----------------------------------------------------------------------- 41913215036768471115174484688900145259500276561095136539023288126106441 ----------------------------------------------------------------------- 31840000d27 | 1 1 o16 : Matrix S <--- S |