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.0000126 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x3ded1c0 -- [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 = 4187 -- #reduction steps = 38 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0202741 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 0x4cc9960 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x3ded000 -- [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 0x228be00 -- [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.0078932 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 0x4cc9870 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 5 3 5 2 7 2 1 3 1 2 1 2 1 2 1 o12 = ideal (-a + -a b + -a*b + -b + -a c + -a*b*c + b c + -a d + -a*b*d + 4 9 5 6 5 6 6 3 ----------------------------------------------------------------------- 10 2 2 5 2 9 2 2 3 3 7 2 --b d + a*c + -b*c + 2a*c*d + b*c*d + -a*d + 9b*d + -c + -c d + 9 2 7 4 6 ----------------------------------------------------------------------- 5 2 9 3 4 3 1 2 7 2 3 3 3 2 1 1 2 9 2 -c*d + --d , -a + -a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + 4 10 5 2 3 5 4 2 2 8 ----------------------------------------------------------------------- 3 3 2 9 2 1 2 2 5 2 2 2 3 -a*b*d + -b d + -a*c + -b*c + -a*c*d + 7b*c*d + -a*d + 5b*d + -c + 2 8 5 6 9 8 3 ----------------------------------------------------------------------- 9 2 2 3 1 3 10 2 1 2 1 3 2 3 1 2 -c d + 4c*d + 8d , -a + --a b + -a*b + -b + 5a c + -a*b*c + -b c + 5 8 3 2 9 5 2 ----------------------------------------------------------------------- 5 2 1 2 4 2 1 2 2 2 2 2 -a d + 5a*b*d + -b d + -a*c + -b*c + -a*c*d + b*c*d + -a*d + 5b*d + 4 7 9 2 3 3 ----------------------------------------------------------------------- 3 2 2 7 3 2c + c d + 3c*d + -d ) 6 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x228bc40 -- [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 --removing gb 0 at 0x3ded380 {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 -- #reduction steps = 284 -- #spairs done = 53 -- ncalls = 46 -- nloop = 54 -- nsaved = 0 -- -- used 0.103761 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 968124838389543887143165869352136538033843047751866200972496354160932 ----------------------------------------------------------------------- 538196131840000c27-4815895882682820173942923923748085412925308386220493 ----------------------------------------------------------------------- 371565910483462599976136990720000c26d+ ----------------------------------------------------------------------- 22231355772162289288730629166164274616224541624115489726798999276219445 ----------------------------------------------------------------------- 215948161024000c25d2-68375743219819836305033263271590440577322673482812 ----------------------------------------------------------------------- 487253702364102607646712941861888000c24d3+ ----------------------------------------------------------------------- 13935173457075442745126740118519306466169026554916017852022060680353781 ----------------------------------------------------------------------- 2292219132160000c23d4-2091739120327552743512235758614539148540866013999 ----------------------------------------------------------------------- 50438449415081048531822663136568217600c22d5+ ----------------------------------------------------------------------- 14793705841213251131656067977521390576329453859881497737767233286258575 ----------------------------------------------------------------------- 3246514143584000c21d6+5769237736633704869850443672307552395372933794005 ----------------------------------------------------------------------- 71757995956426157718784576706062096800c20d7- ----------------------------------------------------------------------- 10010637229990318849198861399048511972222455476829323211766023346123225 ----------------------------------------------------------------------- 68607202229067620c19d8+ ----------------------------------------------------------------------- 43862037258300597936075314488535046993694074703887283252973908430125780 ----------------------------------------------------------------------- 12412197121454055c18d9+ ----------------------------------------------------------------------- 85726281619519075312176153224647835497490683596868291205193670985943537 ----------------------------------------------------------------------- 21000579980385620c17d10+ ----------------------------------------------------------------------- 23450666857581245247705900673620349768920057441947425113209441405457163 ----------------------------------------------------------------------- 334886140815153122c16d11+ ----------------------------------------------------------------------- 79839194779830706600125516759312407932490810198026321462915127586194180 ----------------------------------------------------------------------- 240243281076620684c15d12+ ----------------------------------------------------------------------- 98846443334765390704209983302358427159412589184532121538603430006255279 ----------------------------------------------------------------------- 974358100794706465c14d13+ ----------------------------------------------------------------------- 17923640859061496805770404696546439350381045217158561733267783599628476 ----------------------------------------------------------------------- 2716435712693562420c13d14+ ----------------------------------------------------------------------- 51710648644400874577397039026685847868814699612158861256086756724010614 ----------------------------------------------------------------------- 897499484198815984c12d15- ----------------------------------------------------------------------- 57909049278456307482497095736528030391373157512854613556926791227751156 ----------------------------------------------------------------------- 9200872253934273100c11d16- ----------------------------------------------------------------------- 17217148143931173658950114743105628175587138961672611828573507338817358 ----------------------------------------------------------------------- 30200878892525858455c10d17- ----------------------------------------------------------------------- 42977699175266467361980978091414767246350389196394251658022932388745889 ----------------------------------------------------------------------- 24307444528031302884c9d18- ----------------------------------------------------------------------- 68000895066878064396382499610155525091436155606308246413437875900399932 ----------------------------------------------------------------------- 17234606384352837350c8d19- ----------------------------------------------------------------------- 91754015991551326772466645112906869315382251476304633003935414883954348 ----------------------------------------------------------------------- 52091727509092919100c7d20- ----------------------------------------------------------------------- 10008888097860046947279797385563702734039405538503024345671709104661767 ----------------------------------------------------------------------- 416610048891174518625c6d21- ----------------------------------------------------------------------- 81157217380826615217045662846793590124492068404826177623798004409270269 ----------------------------------------------------------------------- 02721984083117462500c5d22- ----------------------------------------------------------------------- 58153486929948862486085741148234128499686805443868297382694629073394802 ----------------------------------------------------------------------- 09396085631006187500c4d23- ----------------------------------------------------------------------- 28880535965121561033695568470589637481065553636813339706418755207784449 ----------------------------------------------------------------------- 71848642684492500000c3d24- ----------------------------------------------------------------------- 10098333025174417469783779725975186201127923939626949825450858817228622 ----------------------------------------------------------------------- 78591921468223750000c2d25- ----------------------------------------------------------------------- 64997982866413028576843970834133780678421201405216825156572580503537417 ----------------------------------------------------------------------- 4939504172225000000cd26- ----------------------------------------------------------------------- 21638494303066179784393190419841568946938933705041938901138178768059847 ----------------------------------------------------------------------- 3931037548125000000d27 | 1 1 o16 : Matrix S <--- S |