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 0x1132a5f0 -- [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 = 4178 -- ncalls = 10 -- nloop = 28 -- nsaved = 0 -- -- used 0.028087 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 0x10f91990 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x1132a130 -- [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 0x1132a000 -- [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.013655 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 0x10f91900 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 4 3 2 6 2 1 3 4 2 2 9 2 o12 = ideal (-a + 2a b + -a*b + --b + -a c + a*b*c + 10b c + -a d + 7 7 10 5 5 ----------------------------------------------------------------------- 1 2 1 2 2 2 7 2 2 1 3 --a*b*d + 4b d + -a*c + 3b*c + -a*c*d + -b*c*d + 4a*d + 4b*d + -c 10 2 7 4 3 ----------------------------------------------------------------------- 1 2 2 10 3 3 2 2 9 2 9 3 3 2 2 + -c d + 10c*d + --d , 5a + -a b + -a*b + -b + -a c + 5a*b*c + b c 5 9 3 5 4 2 ----------------------------------------------------------------------- 3 2 7 3 2 5 2 10 2 7 3 2 + -a d + -a*b*d + -b d + -a*c + --b*c + 6a*c*d + -b*c*d + -a*d + 4 9 4 3 9 9 2 ----------------------------------------------------------------------- 2 2 3 5 2 1 2 9 3 1 3 4 2 4 2 5 3 9 2 -b*d + 5c + -c d + -c*d + -d , -a + -a b + -a*b + -b + -a c + 5 9 4 8 6 3 3 8 8 ----------------------------------------------------------------------- 2 10 2 6 5 2 9 2 2 8 9 2a*b*c + b c + --a d + -a*b*d + -b d + -a*c + 3b*c + -a*c*d + -b*c*d 3 5 3 2 7 4 ----------------------------------------------------------------------- 1 2 1 2 3 1 2 1 2 8 3 + -a*d + -b*d + c + -c d + -c*d + -d ) 3 2 2 2 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x116d3be0 -- [gb]{3}(3,3)mmm{4}(2,2)m removing gb 1 at 0x1132a4c0 m{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.410254 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 523758848852111225564281588865909827957903158610154367783649664207310 ----------------------------------------------------------------------- 7129958400000c27+188037062735370063237388547644641868835953828276382819 ----------------------------------------------------------------------- 96484707333939582042112000000c26d+ ----------------------------------------------------------------------- 37354236556344717380070742507408406546205652759522690237067123417726176 ----------------------------------------------------------------------- 359628800000c25d2+50649481036453336350707987179658584514314876733157717 ----------------------------------------------------------------------- 170619259870314656758387200000c24d3+ ----------------------------------------------------------------------- 47316852402332552092881223098470656465366139735194148719629232468516528 ----------------------------------------------------------------------- 078538880000c23d4+32692153395816369085131051803905648244212132195676665 ----------------------------------------------------------------------- 678021925168116434825512160000c22d5+ ----------------------------------------------------------------------- 22132609240104746844037925429943474042985469566201731927509919973434636 ----------------------------------------------------------------------- 446051160000c21d6+14177036198669386749440512901821562240066300638178644 ----------------------------------------------------------------------- 833897663415961474599284168000c20d7+ ----------------------------------------------------------------------- 24133568951049423956672158131847434296016800797717604769856145325434722 ----------------------------------------------------------------------- 87919028000c19d8-901728621986417621954786399043942032977405246115559760 ----------------------------------------------------------------------- 749011298466983557456460000c18d9+ ----------------------------------------------------------------------- 13699620881491177254959309636716417853270351324195858598921369630402536 ----------------------------------------------------------------------- 796904484700c17d10+3335888055265043668299262089879913028436045549445481 ----------------------------------------------------------------------- 7978426374893520934619253231700c16d11+ ----------------------------------------------------------------------- 40932845008709427790613791027146794444697575754513466809287217377779088 ----------------------------------------------------------------------- 901098492475c15d12+3709581908880581913241090782758201587464901302091048 ----------------------------------------------------------------------- 0111104845251408198955094112725c14d13+ ----------------------------------------------------------------------- 30494214570379651423315876026526662053124127265550673989977626478352918 ----------------------------------------------------------------------- 081751455375c13d14+2080084122774476354539314319004495944569307429384077 ----------------------------------------------------------------------- 6865314111503144539679147941971c12d15+ ----------------------------------------------------------------------- 94604521972933295934779240581450287113199231392614020981233273171613846 ----------------------------------------------------------------------- 79789596417c11d16+31938476979823119986913190244076338057422978387541297 ----------------------------------------------------------------------- 55386209502391851351499462657c10d17+ ----------------------------------------------------------------------- 11546833026501167355704775954237203919519272301411273561672583772145288 ----------------------------------------------------------------------- 22911827637c9d18-229842702649838331331413037346752302429659889807366020 ----------------------------------------------------------------------- 847285273128136774576712431c8d19- ----------------------------------------------------------------------- 46896633421605639613406321866419783278277436471970380662630321811990420 ----------------------------------------------------------------------- 1723511168c7d20+7317314479707372345997427805035738425966300094825223106 ----------------------------------------------------------------------- 574209479166246181542990c6d21+ ----------------------------------------------------------------------- 88841406430655895380013991846547107931049862811997857213327018842765056 ----------------------------------------------------------------------- 228503028c5d22+52315777803859164479748439445009208051118343712419605083 ----------------------------------------------------------------------- 6697441055217165708636c4d23- ----------------------------------------------------------------------- 45347121771512819874714506206561893374253037830406594954418923400487729 ----------------------------------------------------------------------- 87664784c3d24-270020974312721582899663979683940843532879354426596796596 ----------------------------------------------------------------------- 9763081670398000823992c2d25- ----------------------------------------------------------------------- 25474662077506474875803857620209305785034254545149087453505704737969439 ----------------------------------------------------------------------- 627008cd26+207897250687771673083072692812291861097272196971016936692525 ----------------------------------------------------------------------- 319319191640244416d27 | 1 1 o16 : Matrix S <--- S |