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 7.402e-6 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x4439700 -- [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 = 4193 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0216798 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 3 at 0x4af8c30 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x4439540 -- [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 4 at 0x4439380 -- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)oonumber of (nonminimal) gb elements = 11 -- number of monomials = 267 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.00636229 seconds 3 6 9 o10 = 1 - 3T + 3T - T o10 : ZZ[T] |
i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 4 at 0x46bef00 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 2 3 2 9 2 6 3 2 1 2 7 2 1 o12 = ideal (-a + 2a b + -a*b + -b + 5a c + 3a*b*c + -b c + -a d + -a*b*d 5 5 5 9 5 2 ----------------------------------------------------------------------- 1 2 2 2 2 1 3 10 2 8 2 3 1 2 + -b d + 7a*c + -b*c + -a*c*d + -b*c*d + --a*d + -b*d + c + -c d + 4 5 9 5 7 9 5 ----------------------------------------------------------------------- 2 1 3 5 3 1 2 5 2 7 3 5 2 5 4 2 1 2 8c*d + -d , -a + -a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + 2 4 6 3 3 4 8 3 8 ----------------------------------------------------------------------- 1 2 1 2 10 2 4 9 2 5 2 1 3 a*b*d + -b d + -a*c + --b*c + -a*c*d + 5b*c*d + -a*d + -b*d + -c + 2 4 3 5 4 3 2 ----------------------------------------------------------------------- 3 2 2 2 1 3 4 3 2 2 2 3 3 5 2 7 3 2 -c d + -c*d + -d , -a + 10a b + -a*b + -b + -a c + -a*b*c + -b c + 2 3 9 5 9 8 8 8 2 ----------------------------------------------------------------------- 2 1 5 2 3 2 2 1 2 5 2 5a d + -a*b*d + -b d + -a*c + b*c + -a*c*d + 3b*c*d + 3a*d + -b*d + 2 6 5 7 2 ----------------------------------------------------------------------- 3 2 2 2 3 9c + c d + c*d + -d ) 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x44391c0 -- [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) --removing gb 0 at 0x44398c0 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.176818 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 630977984022230641043594630788237466852168989982730480674785907113529 ----------------------------------------------------------------------- 12087184000000c27+98303213897122836051845776392697595091887895223397860 ----------------------------------------------------------------------- 213583910127449230915803200000c26d+ ----------------------------------------------------------------------- 76366960565035690762696708590770834423771263634449981085938842662368387 ----------------------------------------------------------------------- 93702560000c25d2+213021689534177098221592291655633088823804480027829864 ----------------------------------------------------------------------- 168071831680029330009977152000c24d3- ----------------------------------------------------------------------- 56631473119663315466601462014797797886739731432892896392108772767089280 ----------------------------------------------------------------------- 921977196000c23d4-34140152021522646115604640489972701681338589341995758 ----------------------------------------------------------------------- 1086454841245594824167542888480c22d5+ ----------------------------------------------------------------------- 59587357798876605812204081518131522163340283037095629939768150259044391 ----------------------------------------------------------------------- 4083661764288c21d6+8485103807771592380333814019769485249979042841369974 ----------------------------------------------------------------------- 15322266637364230066618356933880c20d7+ ----------------------------------------------------------------------- 30563856672211454871274608535550404124034510530367307460427043563095822 ----------------------------------------------------------------------- 53497053306328c19d8+570236847316664248955151990002779129149572354237706 ----------------------------------------------------------------------- 2863303470185645491748447967671208c18d9+ ----------------------------------------------------------------------- 61221168684324204890610626528012356935501494689222843889145746305406297 ----------------------------------------------------------------------- 66563744831320c17d10+35926639701912537108726522600726962624062701659620 ----------------------------------------------------------------------- 40220658781930750874077553914181036c16d11- ----------------------------------------------------------------------- 17182765041670038848760986383435196438565504421828471912678048161813350 ----------------------------------------------------------------------- 75755216319832c15d12-62746923178115102595674416835583909986483761587082 ----------------------------------------------------------------------- 83738523884684096125818409810815998c14d13- ----------------------------------------------------------------------- 52372774191799208176875796034592790346425296231523428615720730862855303 ----------------------------------------------------------------------- 25335766718896c13d14-26848676751570926034167440565424950886452409563382 ----------------------------------------------------------------------- 68686698461094284891931294881341620c12d15+ ----------------------------------------------------------------------- 82902433909056073159671378048685036942535895626438860261422468725588876 ----------------------------------------------------------------------- 3277229370994c11d16+147982158554035370086118491002740367645506123656116 ----------------------------------------------------------------------- 1633017750881358811218560160625716c10d17+ ----------------------------------------------------------------------- 10528374907498656132904097163639788139863570043946602343493925766506807 ----------------------------------------------------------------------- 58269409526386c9d18+242081379965447893873647880905431041267937720940237 ----------------------------------------------------------------------- 350528445942541878782331491659575c8d19+ ----------------------------------------------------------------------- 24677631542482382464620147507683610475781255924343434349034035954975141 ----------------------------------------------------------------------- 063405181050c7d20+34440765951582561297025045969432966008703461129946571 ----------------------------------------------------------------------- 98200783678237499266944747175c6d21+ ----------------------------------------------------------------------- 90929790116014206273756907846881949465983204548705948748323213049262065 ----------------------------------------------------------------------- 2356507500c5d22+1381006547990206872721831317983193556553598348751216320 ----------------------------------------------------------------------- 99414072453282855139398750c4d23+ ----------------------------------------------------------------------- 10969785306112095963979770486868179376544276160055394962566984088224987 ----------------------------------------------------------------------- 569280000c3d24+47253362448739401739450913441853971784424382474144792692 ----------------------------------------------------------------------- 3964165499399460968750c2d25+ ----------------------------------------------------------------------- 10533895303058349720141381776905125953632912096323627469891834564067771 ----------------------------------------------------------------------- 625000cd26+955606401740408223955146069045892178701525284322621484398470 ----------------------------------------------------------------------- 34419411000000d27 | 1 1 o16 : Matrix S <--- S |