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 0x2776c40 -- [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 = 4183 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.015998 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 0x24e2a00 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x2776a80 -- [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 0x27768c0 -- [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.008999 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 0x24e2600 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 3 4 2 1 2 3 2 1 2 2 2 o12 = ideal (-a + -a b + -a*b + 3b + a c + 2a*b*c + -b c + a d + -a*b*d + 8 5 7 6 5 ----------------------------------------------------------------------- 3 2 2 2 1 3 2 7 2 5 3 2 -b d + a*c + b*c + -a*c*d + b*c*d + -a*d + -b*d + -c + 6c d + 4 4 2 2 2 ----------------------------------------------------------------------- 8 2 3 1 3 3 2 1 2 1 3 9 2 2 4 2 -c*d + 5d , -a + -a b + -a*b + -b + --a c + 2a*b*c + b c + -a d + 9 3 2 9 6 10 3 ----------------------------------------------------------------------- 1 2 1 2 2 2 10 5 5 2 6 2 3 3 5a*b*d + -b d + -a*c + -b*c + --a*c*d + -b*c*d + -a*d + -b*d + -c 8 5 7 9 3 9 7 2 ----------------------------------------------------------------------- 2 2 2 1 3 2 3 1 2 3 2 3 3 2 3 7 2 + c d + -c*d + -d , -a + -a b + -a*b + 6b + -a c + -a*b*c + -b c + 5 4 7 6 2 4 2 3 ----------------------------------------------------------------------- 3 2 2 2 2 2 4 9 2 2 -a d + 7a*b*d + 5b d + a*c + 9b*c + -a*c*d + -b*c*d + -a*d + 9b*d + 5 7 5 8 ----------------------------------------------------------------------- 2 3 1 2 2 2 6 3 -c + -c d + -c*d + -d ) 3 2 9 5 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x2776700 -- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mmm{6}(3,7)mmm{7}(3,8)mmm{8}(3,9) removing gb 1 at 0x2776e00 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.170974 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 307635109092274144553614321279800664175983845041806227792330168249914 ----------------------------------------------------------------------- 2287360000000c27+174889230240405796360315296875589887376535694511054744 ----------------------------------------------------------------------- 59476802686548436844544000000c26d+ ----------------------------------------------------------------------- 60080367014250984987526554013591485616239367805139399800453725558863959 ----------------------------------------------------------------------- 949312000000c25d2+97788288767184658541660879126144317366849870507698789 ----------------------------------------------------------------------- 99465949406252141059768320000c24d3- ----------------------------------------------------------------------- 55871392002488279056616753755117670992396304508814215117019383279480606 ----------------------------------------------------------------------- 4271278080000c23d4-1432864325295871704727345224432622465286214319245705 ----------------------------------------------------------------------- 511265400278996531426192793600000c22d5- ----------------------------------------------------------------------- 21506714309440390738381421999359587107775829990161314202748092397300122 ----------------------------------------------------------------------- 05904586752000c21d6+586721266093290162189248816421056344463897021408810 ----------------------------------------------------------------------- 0330537951756284911442666548326400c20d7+ ----------------------------------------------------------------------- 18345303346654571883923825265473076228338725052030474600509408461357235 ----------------------------------------------------------------------- 783276013952000c19d8+23651228199034686479077066799899211400245458934517 ----------------------------------------------------------------------- 464224134267721818560686226945141760c18d9- ----------------------------------------------------------------------- 52628154657003949872110256262084689412234103086502865844108706924179225 ----------------------------------------------------------------------- 6061199267840c17d10-812577774085762249919993019161837845723838087734020 ----------------------------------------------------------------------- 42301922680314269266995582839024640c16d11- ----------------------------------------------------------------------- 15006980475210679261063586363125176526311416580289577504221215629236068 ----------------------------------------------------------------------- 5122847521804800c15d12- ----------------------------------------------------------------------- 22229451027717943257089807534953800504150733630607798688688266772745777 ----------------------------------------------------------------------- 9290483626720768c14d13- ----------------------------------------------------------------------- 87108077361274479629675803278559318846280804286377007509903141997956106 ----------------------------------------------------------------------- 858801997361856c13d14+2775627568673476664024601949938673461762530219193 ----------------------------------------------------------------------- 86217273910987287338954956899737554944c12d15+ ----------------------------------------------------------------------- 73840474017726520087498894378856245897891390423459384015331548598256862 ----------------------------------------------------------------------- 8620812316528448c11d16+ ----------------------------------------------------------------------- 14763654740293564617616676483590742948494809731785940725978028186141842 ----------------------------------------------------------------------- 41749244405615680c10d17+ ----------------------------------------------------------------------- 18995048417577677187683309720193152023027363027858700219603396127011044 ----------------------------------------------------------------------- 11029715082001040c9d18+ ----------------------------------------------------------------------- 21989030040095164299286035623189889265854955306374454677057023739648056 ----------------------------------------------------------------------- 55535054921983300c8d19+ ----------------------------------------------------------------------- 21295109668843429159808595786235946040080627737609584958881316299849682 ----------------------------------------------------------------------- 42920838687341015c7d20+ ----------------------------------------------------------------------- 17854034813505381420896113363576924634571347901671583565037780640280066 ----------------------------------------------------------------------- 37975863268605815c6d21+ ----------------------------------------------------------------------- 12642748573075727465474756784756359932530602332251518467715486073199549 ----------------------------------------------------------------------- 76851156098824100c5d22+ ----------------------------------------------------------------------- 87983891886065000415987290325505268538383390149945257029486162968099855 ----------------------------------------------------------------------- 5434908863980850c4d23+3840677304997694484746467534988165575106830079515 ----------------------------------------------------------------------- 12422445487066588750141511896549230650c3d24+ ----------------------------------------------------------------------- 25181534489151516794745492431037277340748449899533308148095730943420311 ----------------------------------------------------------------------- 8183797003328100c2d25+4651379438270966631219087087207916674910211582751 ----------------------------------------------------------------------- 9750502426538015821138013441997431625cd26+ ----------------------------------------------------------------------- 32212335314897475827319337434097741160021193208151523313566037309693000 ----------------------------------------------------------------------- 177507647313125d27 | 1 1 o16 : Matrix S <--- S |