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.000024447 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 = 4186 -- #reduction steps = 38 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0710081 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 0x3d5fe40 -- [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.0342592 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 0x3d3a2a8 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 1 3 10 2 2 1 3 1 2 1 1 2 1 2 6 o12 = ideal (--a + --a b + a*b + -b + -a c + -a*b*c + -b c + -a d + -a*b*d 10 7 5 3 5 5 8 7 ----------------------------------------------------------------------- 2 2 2 2 2 1 2 5 3 1 2 + 2b d + -a*c + 5b*c + 4a*c*d + 9b*c*d + 3a*d + -b*d + -c + -c d + 3 3 4 2 ----------------------------------------------------------------------- 9 2 7 3 1 3 2 3 2 5 3 2 5 1 2 10 2 -c*d + -d , -a + 7a b + --a*b + -b + 10a c + -a*b*c + -b c + --a d 7 3 2 10 9 3 2 7 ----------------------------------------------------------------------- 7 4 2 5 2 2 7 1 1 2 2 3 + -a*b*d + -b d + -a*c + 3b*c + -a*c*d + -b*c*d + -a*d + 5b*d + c 5 5 2 2 2 3 ----------------------------------------------------------------------- 2 2 7 2 9 3 3 7 2 6 2 9 3 9 2 1 + -c d + -c*d + -d , 10a + --a b + -a*b + -b + --a c + -a*b*c + 3 6 5 10 5 5 10 3 ----------------------------------------------------------------------- 10 2 2 2 7 2 1 2 1 2 9 3 2 --b c + -a d + a*b*d + -b d + -a*c + --b*c + -a*c*d + 3b*c*d + -a*d 3 5 8 3 10 8 2 ----------------------------------------------------------------------- 7 2 2 3 1 2 5 2 9 3 + -b*d + -c + -c d + -c*d + -d ) 9 3 5 2 4 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x3d5fab0 -- [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 --removing gb 0 at 0x3baa390 {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.687287 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 584952503380847890214154052694440781973942923754294805105878558081800 ----------------------------------------------------------------------- 36372475936768000c27+66465078446495168101680045589621994728248365542065 ----------------------------------------------------------------------- 8459701059618238025547408688939008000c26d+ ----------------------------------------------------------------------- 37979115320681997479835859558805876533057293741679348784888691412547704 ----------------------------------------------------------------------- 08246900228096000c25d2+ ----------------------------------------------------------------------- 15273673501241946262724972190433900677776839524180910399756793511233306 ----------------------------------------------------------------------- 408573469571891200c24d3+ ----------------------------------------------------------------------- 49186975438436388285486475577679695275970644306384753185460484950601170 ----------------------------------------------------------------------- 799560434179481600c23d4+ ----------------------------------------------------------------------- 13153998116521149756795289252539648847191744868823139480800043307615970 ----------------------------------------------------------------------- 2188297199495280640c22d5+ ----------------------------------------------------------------------- 29317139361834014185442406735007228091975931514672241565617579690746654 ----------------------------------------------------------------------- 0124898808055731200c21d6+ ----------------------------------------------------------------------- 54519396376787317139698363489420258152785841168228993415945899434068590 ----------------------------------------------------------------------- 2366734179372046080c20d7+ ----------------------------------------------------------------------- 84343086516012930548913174714149309506828733720106973962571857228150354 ----------------------------------------------------------------------- 2513170999678800192c19d8+ ----------------------------------------------------------------------- 10555194004791259398647086532477207901776569836749338151902634426929262 ----------------------------------------------------------------------- 59120279614687203328c18d9+ ----------------------------------------------------------------------- 96797059225809807703510823397319650245132562217807294001897230075496862 ----------------------------------------------------------------------- 9976543587750949968c17d10+ ----------------------------------------------------------------------- 43395595637281230131717823245247084315903710745587646357189120276924565 ----------------------------------------------------------------------- 5928307455570180416c16d11- ----------------------------------------------------------------------- 33892993890663480836793865371825499639329148339983221467235210573021911 ----------------------------------------------------------------------- 9704657341937391584c15d12- ----------------------------------------------------------------------- 76878163196350596042121150865706962169800955453758398072196004945105358 ----------------------------------------------------------------------- 1468598190226116368c14d13- ----------------------------------------------------------------------- 50515050767781021045240415574725329413134737885646443674574044674338798 ----------------------------------------------------------------------- 6187816515096794032c13d14+ ----------------------------------------------------------------------- 34826674580427804550884122216337072719684198466544755534402171946566442 ----------------------------------------------------------------------- 802112242887712432c12d15+ ----------------------------------------------------------------------- 20961189677955028365388743850297074361105090836424915600550837432128391 ----------------------------------------------------------------------- 0391005268216705636c11d16+ ----------------------------------------------------------------------- 46853890030530694678582162429590885780681118935202015669839979521509544 ----------------------------------------------------------------------- 165473878974639570c10d17- ----------------------------------------------------------------------- 40608512112367004483912213864385289750141462483237462360461680583974407 ----------------------------------------------------------------------- 655438317852274940c9d18- ----------------------------------------------------------------------- 84198929040226270034708572632654454416759498209780591181978256132287544 ----------------------------------------------------------------------- 36701910263226396c8d19+ ----------------------------------------------------------------------- 59944100062586258499126036887176744874332889069156977569126061085314458 ----------------------------------------------------------------------- 01556040898389600c7d20+ ----------------------------------------------------------------------- 60741967368142905682934308875715040853543736090839129749688403979217424 ----------------------------------------------------------------------- 66817429674973268c6d21+ ----------------------------------------------------------------------- 34055474278841624775209115431135811904074373342595958241209003574514050 ----------------------------------------------------------------------- 65408139037603109c5d22- ----------------------------------------------------------------------- 14683505216812651077782547851439151817660027068228473176701209854348882 ----------------------------------------------------------------------- 0794062252657096c4d23+2283031354032783060832456218256933143156700525946 ----------------------------------------------------------------------- 37597389095128358783140175454613783096c3d24- ----------------------------------------------------------------------- 23920668545436353552775561746244943004223052708334913555922408498345342 ----------------------------------------------------------------------- 0941269347660896c2d25+6665280742370428554118977344832200305021372412802 ----------------------------------------------------------------------- 4772369483068794599079165684636226896cd26- ----------------------------------------------------------------------- 63786495633797805601017951921016953003273965701721969601172922449547820 ----------------------------------------------------------------------- 42391960384512d27 | 1 1 o16 : Matrix S <--- S |