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 8.26e-6 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0xbc79980 -- [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 = 4189 -- #reduction steps = 37 -- #spairs done = 11 -- ncalls = 10 -- nloop = 35 -- nsaved = 1 -- -- used 0.0237865 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 0xbc7baa0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0xbc794c0 -- [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 0xbc79390 -- [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.0107751 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 0xbdf8198 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 8 3 2 7 2 2 3 3 2 3 2 2 5 2 o12 = ideal (-a + a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + a*b*d + 3 6 3 5 5 3 3 ----------------------------------------------------------------------- 9 2 4 2 5 2 1 7 2 4 2 2 3 2 2 --b d + -a*c + -b*c + -a*c*d + -b*c*d + 4a*d + -b*d + -c + -c d + 10 5 7 7 4 5 3 9 ----------------------------------------------------------------------- 5 2 3 1 3 2 2 1 2 8 3 5 2 10 2 2 -c*d + 4d , -a + -a b + -a*b + -b + -a c + --a*b*c + b c + a d + 6 2 9 5 3 2 3 ----------------------------------------------------------------------- 1 2 2 3 2 9 7 4 2 3 2 3 -a*b*d + 3b d + a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d + 3c + 2 8 4 8 5 4 ----------------------------------------------------------------------- 9 2 2 10 3 3 7 2 1 2 3 3 5 2 1 2 -c d + 3c*d + --d , 6a + -a b + -a*b + -b + -a c + -a*b*c + b c + 8 7 2 7 5 8 8 ----------------------------------------------------------------------- 3 2 1 1 2 2 2 3 2 2 2 -a d + -a*b*d + -b d + a*c + 9b*c + 2a*c*d + -b*c*d + -a*d + b*d + 4 3 3 2 3 ----------------------------------------------------------------------- 3 5 2 2 1 3 2c + -c d + 6c*d + -d ) 2 6 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0xbc79000 -- [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 0xbc79850 {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.254077 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 600383904335433637495307678123107950739244458434726552405520289496945 ----------------------------------------------------------------------- 06134947851720000c27-77252034661545947478740125354358059441932871181876 ----------------------------------------------------------------------- 906601649349783542213108518003600000c26d- ----------------------------------------------------------------------- 74682010118316627924244026621324301868095135306542230991439020402059880 ----------------------------------------------------------------------- 891334672020000c25d2-17319158446217878461773053680711604631182161016346 ----------------------------------------------------------------------- 403993741995225433504053844848295000c24d3+ ----------------------------------------------------------------------- 12946580971224140875251846975069256572013647587462933867057875014018571 ----------------------------------------------------------------------- 5329801792420625c23d4-4422273193311918648698994853238666834692233408342 ----------------------------------------------------------------------- 6092560121417117207119024027493703375c22d5+ ----------------------------------------------------------------------- 31914060616503734715952844969307244006730164096587404571417980395590758 ----------------------------------------------------------------------- 1688983192181200c21d6+3141342416487677852626325109904112364443083437517 ----------------------------------------------------------------------- 17658047590456340808719744535734167100c20d7+ ----------------------------------------------------------------------- 31846731412613573171342106088811359764778321081122362447126954274088773 ----------------------------------------------------------------------- 914285247186075c19d8-27560569883192231525187938939438363543363255139413 ----------------------------------------------------------------------- 85504904065857130657056155885882240425c18d9+ ----------------------------------------------------------------------- 32042608332050868749246033882111513092332782015452900103345583065111082 ----------------------------------------------------------------------- 24528234757931700c17d10- ----------------------------------------------------------------------- 32414191049503818662178066449735127191127645978398395733847877481045205 ----------------------------------------------------------------------- 59513777727276300c16d11+ ----------------------------------------------------------------------- 15589967409452215143132925682517107921847155049079781599362464737062828 ----------------------------------------------------------------------- 63508068658575600c15d12+ ----------------------------------------------------------------------- 26848988548096785775156557980908564090614466895041601693996517947394286 ----------------------------------------------------------------------- 44402769937763360c14d13- ----------------------------------------------------------------------- 33329056329917293218475599596358296746306083516145327975863812958254779 ----------------------------------------------------------------------- 12295263468856640c13d14+ ----------------------------------------------------------------------- 43727019554664684819495240923800765938358703593756022961645445700369851 ----------------------------------------------------------------------- 45372698563338560c12d15+ ----------------------------------------------------------------------- 80887397803073994333683341997106162714039527683178072384982173589098993 ----------------------------------------------------------------------- 0627054564371200c11d16- ----------------------------------------------------------------------- 97891224014201850780223649401199100360390593280150245393433585785386006 ----------------------------------------------------------------------- 40054384794419200c10d17+ ----------------------------------------------------------------------- 11283921946555789173363438978341722751385795927498694545564612569206831 ----------------------------------------------------------------------- 529672424169104384c9d18- ----------------------------------------------------------------------- 10684893015742216716681202961062173213988636641189660641270752191505769 ----------------------------------------------------------------------- 563264093399188480c8d19+ ----------------------------------------------------------------------- 54401448997334040793143988032134446817514181273557642148553726276534558 ----------------------------------------------------------------------- 34031930254200832c7d20+ ----------------------------------------------------------------------- 54403764735940844709922451518622480967006232217123857358948966604861233 ----------------------------------------------------------------------- 0306755844677632c6d21-3461998353035079763657331553936092406803510928889 ----------------------------------------------------------------------- 940863976958127940113144774821166694400c5d22+ ----------------------------------------------------------------------- 60940172989438003753982486953228243110461895217690322667769739779975407 ----------------------------------------------------------------------- 67035544457625600c4d23- ----------------------------------------------------------------------- 67481024494290774607042597633032356398157331409708563997320338377823672 ----------------------------------------------------------------------- 04853552771891200c3d24+ ----------------------------------------------------------------------- 53240239292825207077621874284468969858976886790715031588776305260495249 ----------------------------------------------------------------------- 58099590881280000c2d25- ----------------------------------------------------------------------- 24317550933811199923588240956650976058950021931764099643898929116557731 ----------------------------------------------------------------------- 05090357166080000cd26+5714684583815679275835484997060564168211846924385 ----------------------------------------------------------------------- 93838426798584668597463571550044160000d27 | 1 1 o16 : Matrix S <--- S |