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 0x9552850 -- [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 = 4192 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.032002 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 0x950c7e0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x9552390 -- [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 0x9552260 -- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2) removing gb 1 at 0x9552720 oo -- number of (nonminimal) gb elements = 11 -- number of monomials = 267 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.052003 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 0x950cf30 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 1 3 1 2 9 2 3 6 2 3 2 5 2 2 o12 = ideal (-a + -a b + -a*b + 5b + -a c + -a*b*c + b c + -a d + -a*b*d + 5 5 8 7 2 9 5 ----------------------------------------------------------------------- 4 2 2 9 2 9 7 9 2 9 2 1 3 3 2 -b d + 4a*c + -b*c + -a*c*d + -b*c*d + -a*d + --b*d + -c + -c d + 7 2 7 6 2 10 8 2 ----------------------------------------------------------------------- 2 4 3 1 3 2 2 9 3 4 2 2 2 c*d + -d , -a + a b + 2a*b + -b + -a c + 7a*b*c + 2b c + 4a d + 3 4 2 5 ----------------------------------------------------------------------- 2 1 2 2 9 2 5 2 5 3 a*b*d + 5b d + -a*c + b*c + -a*c*d + 3b*c*d + 4a*d + -b*d + -c + 2 4 2 6 ----------------------------------------------------------------------- 1 2 4 2 3 3 3 3 2 2 2 5 3 10 2 5 2 -c d + -c*d + -d , -a + a b + -a*b + -b + --a c + 3a*b*c + -b c + 5 5 4 8 7 3 7 6 ----------------------------------------------------------------------- 7 2 8 2 8 2 4 2 3 2 1 2 -a d + -a*b*d + 2b d + -a*c + -b*c + a*c*d + -b*c*d + 7a*d + -b*d + 9 7 3 7 2 2 ----------------------------------------------------------------------- 9 3 2 2 2 10 3 -c + -c d + 3c*d + --d ) 2 5 7 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x9552000 -- [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.368023 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 396373621237043151876570099604556112973738208674349374290085435447865 ----------------------------------------------------------------------- 48437500c27-37261774881622033177815564629576699036150543718856625582817 ----------------------------------------------------------------------- 6856584113385000000c26d+ ----------------------------------------------------------------------- 13965008085986353198598707882550966559719395973331247622750060049696222 ----------------------------------------------------------------------- 74250000c25d2-334371648305930390690028018165460962978832918980002749069 ----------------------------------------------------------------------- 2807878697081639450000c24d3+ ----------------------------------------------------------------------- 77923321979357282661985864853752627293250417804514110915067472177464966 ----------------------------------------------------------------------- 77230000c23d4-151027471228626379982369153772165677929992999967377700684 ----------------------------------------------------------------------- 67497934759891366238000c22d5+ ----------------------------------------------------------------------- 21134777992009567531276544708408347362798705272937277130850065008858468 ----------------------------------------------------------------------- 399148100c21d6-32021289812854216402024208696632175350384509861593259424 ----------------------------------------------------------------------- 973128933410398481174480c20d7+ ----------------------------------------------------------------------- 39585021435758806566600063670009884191569140109393600285869494122586399 ----------------------------------------------------------------------- 428059264c19d8-39375524707154954125572435752483132180963740763101096481 ----------------------------------------------------------------------- 314077783057699256611700c18d9+ ----------------------------------------------------------------------- 64762806981751287547809719206263914265765844966311158445521148939418781 ----------------------------------------------------------------------- 300728200c17d10-5272178852835956649419434944889481013415267312530979674 ----------------------------------------------------------------------- 6268045194696497493532800c16d11+ ----------------------------------------------------------------------- 86394084156069123658013618125907457145037289683832000550731022366800243 ----------------------------------------------------------------------- 704902680c15d12-8831114342171816641277974404554470415310915366801008495 ----------------------------------------------------------------------- 2707934152281213164743600c14d13+ ----------------------------------------------------------------------- 79673333935105950981761346207786330563296795012439397881735872396883934 ----------------------------------------------------------------------- 126159300c13d14-1044651114815750127226975575311938313272047790037164330 ----------------------------------------------------------------------- 39976847616452308855731800c12d15+ ----------------------------------------------------------------------- 50696429839514529789682388744167466613830627618209609274400665678742346 ----------------------------------------------------------------------- 690533750c11d16-7444274010590507590555985526890160517478748572358463760 ----------------------------------------------------------------------- 6263093274692188056322750c10d17+ ----------------------------------------------------------------------- 25995058129225318745062136098584160154907597430126867385169304082510230 ----------------------------------------------------------------------- 501099500c9d18-34626167899347820907686293946813451057706122854841374484 ----------------------------------------------------------------------- 085489859898795032522500c8d19+ ----------------------------------------------------------------------- 10755701763254039699448098222225331336499874114421919316876209722946659 ----------------------------------------------------------------------- 416223750c7d20-13178583379063172859749997583600785222668720477365191366 ----------------------------------------------------------------------- 195932771936209592456250c6d21+ ----------------------------------------------------------------------- 22043701811400166815714823369695916208412390543084508000919917150162502 ----------------------------------------------------------------------- 70281250c5d22-397723051973320394586829894954227655543215915089842832768 ----------------------------------------------------------------------- 6689228154646849843750c4d23- ----------------------------------------------------------------------- 20631439159591028861551912194793164421724787457659863395678274570534079 ----------------------------------------------------------------------- 0234375c3d24-2549085784904759617549830198125560676404759071770199274697 ----------------------------------------------------------------------- 39101967317394531250c2d25- ----------------------------------------------------------------------- 81208088373512579746426518885685333155742364573517690911974674759371132 ----------------------------------------------------------------------- 812500cd26+144882316634563860965675027763522572356837347515329407287609 ----------------------------------------------------------------------- 931239825097656250d27 | 1 1 o16 : Matrix S <--- S |