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.000023753 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x3baa4c0 -- [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 -- #reduction steps = 37 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0713919 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 0x3bc1000 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x3baa000 -- [gb]number of (nonminimal) gb elements = 0 -- number of monomials = 0 -- #reduction steps = 0 -- #spairs done = 0 -- ncalls = 0 -- nloop = 0 -- nsaved = 0 -- o9 : Ideal of R |
i10 : time hf = poincare I -- registering gb 4 at 0x3d63e40 -- [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 -- #reduction steps = 236 -- #spairs done = 30 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.0334954 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 0x3d3d2a8 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 1 3 3 2 9 2 10 3 2 3 5 2 3 2 5 o12 = ideal (-a + -a b + -a*b + --b + 8a c + -a*b*c + -b c + -a d + -a*b*d 9 4 7 7 2 3 4 9 ----------------------------------------------------------------------- 2 5 2 1 2 9 1 7 2 2 1 3 1 2 + b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 5b*d + -c + -c d + 3 2 4 3 5 2 2 ----------------------------------------------------------------------- 4 2 7 3 1 3 2 2 3 3 2 7 2 2 -c*d + -d , -a + 5a b + 8a*b + -b + a c + a*b*c + --b c + 3a d + 5 5 4 5 10 ----------------------------------------------------------------------- 8 2 3 2 5 2 2 1 2 2 3 a*b*d + -b d + -a*c + -b*c + 2a*c*d + 4b*c*d + 6a*d + --b*d + -c + 9 5 3 10 3 ----------------------------------------------------------------------- 7 2 4 2 3 3 10 3 1 2 3 2 6 3 1 2 7 2 -c d + -c*d + -d , --a + -a b + -a*b + -b + -a c + 10a*b*c + --b c 8 3 5 7 3 5 7 3 10 ----------------------------------------------------------------------- 3 2 2 2 4 2 1 2 5 8 1 2 + -a d + -a*b*d + 5b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 2 3 7 4 4 9 9 ----------------------------------------------------------------------- 3 2 8 3 3 2 5 2 3 -b*d + -c + --c d + -c*d + 6d ) 4 9 10 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x3d63ab0 -- [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) --removing gb 0 at 0x3baa390 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 -- #reduction steps = 284 -- #spairs done = 53 -- ncalls = 46 -- nloop = 54 -- nsaved = 0 -- -- used 0.6917 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 206493486618797797297129407762977304397679093731941384419245090193409 ----------------------------------------------------------------------- 121931179200000c27+3679626216657237959201728001947086338201883952514999 ----------------------------------------------------------------------- 383256189468381610895471900800000c26d+ ----------------------------------------------------------------------- 26076610051042389476947805977678837450617206858477127604208097627746317 ----------------------------------------------------------------------- 207552378440000c25d2+47424720070006557719912303465874943691360285170502 ----------------------------------------------------------------------- 790284364184711908259248160633560000c24d3- ----------------------------------------------------------------------- 18383418167732884045706239687594655060822929199977588541304150359718968 ----------------------------------------------------------------------- 6850258383058000c23d4-8135337355393619357416194889300813376531886081237 ----------------------------------------------------------------------- 53114115695324417101059915641665557000c22d5- ----------------------------------------------------------------------- 15648375186697484241714743328387957907832555777722136621943509998430766 ----------------------------------------------------------------------- 29255070087465000c21d6- ----------------------------------------------------------------------- 41766151665687975723073176951755126363705874773360420979670280465075394 ----------------------------------------------------------------------- 85307342813110800c20d7- ----------------------------------------------------------------------- 11100298244952564163154060879147263528402236740753069092530219335792076 ----------------------------------------------------------------------- 115907062880630175c19d8- ----------------------------------------------------------------------- 14064303787640600416321765300938138640917083706282259937251834368399998 ----------------------------------------------------------------------- 989628584880893400c18d9- ----------------------------------------------------------------------- 90558661560993018945113893267856419243903889707134425187160272412679818 ----------------------------------------------------------------------- 79090814289176165c17d10- ----------------------------------------------------------------------- 19350034559832141466589086098502506561036445839652379914058885271386173 ----------------------------------------------------------------------- 563377701644151410c16d11- ----------------------------------------------------------------------- 25841244385873201332270679525028993273232361571740795967514274288349067 ----------------------------------------------------------------------- 921654224315775810c15d12+ ----------------------------------------------------------------------- 13394147966273172246924276223814442607271717395335259509137907411613942 ----------------------------------------------------------------------- 649462605905070488c14d13+ ----------------------------------------------------------------------- 31344090973118842094292687676370955124408517577880872197022442115512330 ----------------------------------------------------------------------- 90178284107663294c13d14- ----------------------------------------------------------------------- 33818155783187162087731732695943645030052495791728673381869858272058241 ----------------------------------------------------------------------- 225336259346176982c12d15+ ----------------------------------------------------------------------- 36559872604958886366211320382933833395480441919652369928290158124512358 ----------------------------------------------------------------------- 64402097271417872c11d16+ ----------------------------------------------------------------------- 30598976553532888236051251300661849992447849982393749181107088608598337 ----------------------------------------------------------------------- 167756074185910052c10d17+ ----------------------------------------------------------------------- 41093842852998315502157294804501014821952648773776791834630235020113879 ----------------------------------------------------------------------- 796413910157867373c9d18- ----------------------------------------------------------------------- 75728568588646418117146322869494518618561600820737745972607395581447894 ----------------------------------------------------------------------- 9959788399202890c8d19+3333536651749599009665767826771653606949725719427 ----------------------------------------------------------------------- 710566524670088176237526272306144778222c7d20- ----------------------------------------------------------------------- 28042342007800132645490986897930842131547902487993605540592413973512604 ----------------------------------------------------------------------- 522639075867332100c6d21- ----------------------------------------------------------------------- 59966123011167341635639669371206820545610915380766909713887740058833295 ----------------------------------------------------------------------- 30442685972854352c5d22+ ----------------------------------------------------------------------- 49532928258939501228393570288530482296223880141469726024359882137515406 ----------------------------------------------------------------------- 20434250921256638c4d23+ ----------------------------------------------------------------------- 10223831897380261258286623620828682614433151053989196328535368826943111 ----------------------------------------------------------------------- 18409434849074576c3d24- ----------------------------------------------------------------------- 20841672902993168490178274569656498043057033387093076828791234113839335 ----------------------------------------------------------------------- 8175818136979232c2d25-5331231165066152447930048525458114421878000436631 ----------------------------------------------------------------------- 4645156972922758410987039941650247040cd26- ----------------------------------------------------------------------- 18184036868151631824806986254044677640758167688122032359308823899608623 ----------------------------------------------------------------------- 55696157253248d27 | 1 1 o16 : Matrix S <--- S |