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.000011468 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x297b700 -- [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 = 4182 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0292353 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 0xa13870 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x297b540 -- [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 0x297b380 -- [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 -- --removing gb 0 at 0x297b8c0 -- used 0.0145967 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 0xa13690 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 2 3 1 2 2 7 3 2 2 8 1 2 5 2 7 o12 = ideal (-a + -a b + a*b + -b + -a c + -a*b*c + -b c + -a d + -a*b*d + 3 3 6 5 3 2 7 6 ----------------------------------------------------------------------- 1 2 7 2 5 2 7 1 2 7 2 1 3 1 2 -b d + -a*c + -b*c + -a*c*d + b*c*d + -a*d + -b*d + -c + -c d + 3 2 3 5 6 5 3 3 ----------------------------------------------------------------------- 1 2 3 3 4 3 3 2 10 2 7 3 1 2 1 6 2 1 2 -c*d + -d , -a + -a b + --a*b + -b + -a c + -a*b*c + -b c + -a d + 7 2 3 4 3 2 6 4 5 6 ----------------------------------------------------------------------- 4 1 2 6 2 8 2 6 9 8 2 2 7 3 -a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + b*d + -c + 3 3 7 3 7 5 3 6 ----------------------------------------------------------------------- 1 2 5 2 8 3 3 3 2 2 8 2 2 3 2 2 5 2 --c d + -c*d + -d , -a + -a b + -a*b + -b + -a c + -a*b*c + b c + 10 3 3 4 5 3 9 7 2 ----------------------------------------------------------------------- 1 2 3 2 5 2 2 1 1 1 2 2 -a d + 2a*b*d + -b d + -a*c + 10b*c + -a*c*d + -b*c*d + -a*d + 9b*d 2 2 4 2 3 2 ----------------------------------------------------------------------- 3 4 2 1 2 5 3 + c + -c d + -c*d + -d ) 3 3 4 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x297be00 -- [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.0961181 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 405563173378766330202510891518899226897387161322014983510182645256632 ----------------------------------------------------------------------- 0000c27-371750232561601494744074573127967167459506975200828377446425671 ----------------------------------------------------------------------- 565200000c26d+294682768430777682433932431752227705477787192157859849290 ----------------------------------------------------------------------- 36667687709680000c25d2+ ----------------------------------------------------------------------- 26417462953970601364528896131209477133746960954663592984336470727969812 ----------------------------------------------------------------------- 000c24d3+85971852357067074850068903165673945667129585898943611632237933 ----------------------------------------------------------------------- 872174308000c23d4+15925000969711587532313204574587448896632996238200023 ----------------------------------------------------------------------- 4336100267517779049600c22d5+ ----------------------------------------------------------------------- 19401290748668033834803532898742891149481873526005302770266942669478537 ----------------------------------------------------------------------- 1200c21d6+3450107499379638670556750825800647721719026322632017954224297 ----------------------------------------------------------------------- 67490742518400c20d7+383664418384572994995543950765897765695024524978590 ----------------------------------------------------------------------- 762821500283996209404400c19d8+ ----------------------------------------------------------------------- 37651139846113092136342233250621348220779376762310877929367309395244312 ----------------------------------------------------------------------- 5480c18d9+4306240779323120964001725295137035656447049559751743238052160 ----------------------------------------------------------------------- 98275633039560c17d10+25448910337542506394179632978851381886342859821428 ----------------------------------------------------------------------- 4675794982771764567527040c16d11+ ----------------------------------------------------------------------- 15296132620308988420893750158962939588430188071507520713254908492380546 ----------------------------------------------------------------------- 0652c15d12+933495366398878368338500768027417661285323157735003491810326 ----------------------------------------------------------------------- 42565412122920c14d13-66845260961898243667470386266796605348340585204260 ----------------------------------------------------------------------- 912148370640528027539060c13d14- ----------------------------------------------------------------------- 41402882532241936851922181873861248334553199332362737697325145882377418 ----------------------------------------------------------------------- 100c12d15-2490570493075121863741915868244496644641631431408936246903168 ----------------------------------------------------------------------- 6572893461100c11d16-489627232774169345131372335648561507109930592947896 ----------------------------------------------------------------------- 53782923404470174126500c10d17+ ----------------------------------------------------------------------- 12184076286056711169776337666743452853613673467989411556982220594669110 ----------------------------------------------------------------------- 750c9d18+44199164121610290028357534153752913477489841066631162278712978 ----------------------------------------------------------------------- 36645975000c8d19-743415443744310116929369065438118772186327788925198531 ----------------------------------------------------------------------- 9218905872530755000c7d20+ ----------------------------------------------------------------------- 77531796419044302906056988320313946513062804040166915089009815068040000 ----------------------------------------------------------------------- 00c6d21-263912435256821588934733840314133454159563557463463738105005209 ----------------------------------------------------------------------- 7006556250c5d22-1752907307064195485744290746109254963714045405716204932 ----------------------------------------------------------------------- 996593303292640625c4d23+ ----------------------------------------------------------------------- 18545132440071719466425322728043275723292852340543274940832696534475937 ----------------------------------------------------------------------- 50c3d24-318478318566534257567389666799123076138797746679059723731018317 ----------------------------------------------------------------------- 613281250c2d25-14514003859049288693686027411815457259224802348926693312 ----------------------------------------------------------------------- 4911993900781250cd26+43220926422082627317519735705533721019856479792398 ----------------------------------------------------------------------- 035899733700113281250d27 | 1 1 o16 : Matrix S <--- S |