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.000011313 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0xbbba130 -- [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 = 4178 -- #reduction steps = 43 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0255334 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 0xbdf9aa0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0xbf70be0 -- [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 0xbf70ab0 -- [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.0118907 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 0xbf72198 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 1 2 9 2 5 3 2 2 1 2 5 o12 = ideal (a + -a b + --a*b + -b + 3a c + a*b*c + b c + -a d + -a*b*d + 2 10 4 8 8 ----------------------------------------------------------------------- 1 2 2 10 2 9 3 2 2 3 8 2 -b d + 2a*c + --b*c + -a*c*d + -b*c*d + 9a*d + 4b*d + 3c + -c d + 2 9 4 7 3 ----------------------------------------------------------------------- 1 2 3 3 5 2 2 3 1 2 3 5 2 5 2 -c*d + 6d , 5a + -a b + a*b + 8b + -a c + -a*b*c + -b c + -a d + 3 4 9 4 3 7 ----------------------------------------------------------------------- 3 1 2 2 9 2 5 1 9 2 10 2 -a*b*d + -b d + 2a*c + --b*c + -a*c*d + -b*c*d + --a*d + --b*d + 4 9 10 4 3 10 9 ----------------------------------------------------------------------- 5 3 2 2 5 2 4 3 4 3 1 2 2 3 1 2 3 -c + -c d + -c*d + -d , -a + -a b + 2a*b + 9b + -a c + -a*b*c + 2 3 9 5 3 2 2 2 ----------------------------------------------------------------------- 1 2 2 3 2 3 2 7 2 7 1 3 2 -b c + 2a d + -a*b*d + 2b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 2 7 7 6 8 5 8 ----------------------------------------------------------------------- 9 2 7 3 5 2 1 2 1 3 -b*d + -c + -c d + -c*d + -d ) 5 4 3 3 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0xbf70720 -- [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) --removing gb 0 at 0xbbba000 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.377576 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 506738282085377356786680837227932891237323478727966669061337976342167 ----------------------------------------------------------------------- 1668982400000c27+390424906864502249268312392976186052302930530052812245 ----------------------------------------------------------------------- 43362766898683919887078400000c26d+ ----------------------------------------------------------------------- 19441313755474991979855262087772680709928665553043641882223459036748038 ----------------------------------------------------------------------- 2312583500000c25d2+7804242371315279173168485941611703919445994817551427 ----------------------------------------------------------------------- 09188074498004861322899459340000c24d3+ ----------------------------------------------------------------------- 25676002415381925960755356976080190699755999696212532614813350360446356 ----------------------------------------------------------------------- 74438209260000c23d4+744764624569398433484093158310584545083087387866999 ----------------------------------------------------------------------- 0103689438777866131593544664045000c22d5+ ----------------------------------------------------------------------- 19116623844871182516741238675515489751327428225970770187185233179643718 ----------------------------------------------------------------------- 521808858293250c21d6+43977970366763641850137349517971018875916187078921 ----------------------------------------------------------------------- 240568994167139912436067553035843500c20d7+ ----------------------------------------------------------------------- 92605356383725054138792920486407743698827788549601578590694060544629898 ----------------------------------------------------------------------- 311048600226750c19d8+17717978238502361460713891802697936970169251687163 ----------------------------------------------------------------------- 9001466101459546478444485453792895975c18d9+ ----------------------------------------------------------------------- 31391596778814630947767678040925204430763034162749005634061870175927303 ----------------------------------------------------------------------- 0224879606254350c17d10+ ----------------------------------------------------------------------- 51526472345298577030831710743065534006930030405397818628248522049223550 ----------------------------------------------------------------------- 6031599683592300c16d11+ ----------------------------------------------------------------------- 78189650342555664330538436540077523202663699500555770825862951623120489 ----------------------------------------------------------------------- 4549943433751100c15d12+ ----------------------------------------------------------------------- 11178693005887275345552345766647534125334916010579302984381359589875884 ----------------------------------------------------------------------- 44598865335020305c14d13+ ----------------------------------------------------------------------- 14750988386175817018034058805694302902174492621954088133588483866631965 ----------------------------------------------------------------------- 71856313837877345c13d14+ ----------------------------------------------------------------------- 18308301240940657907939379795578035934763145370910777612589349714316233 ----------------------------------------------------------------------- 49191355675771990c12d15+ ----------------------------------------------------------------------- 21314764751676899032694583738087348264462584306896829507499719191661513 ----------------------------------------------------------------------- 67665835661544190c11d16+ ----------------------------------------------------------------------- 22585268795419905504481807054311059512253121662500198081601120284866496 ----------------------------------------------------------------------- 22794802462379066c10d17+ ----------------------------------------------------------------------- 23140749760501986345460911361971569374482458998054424571070863687534333 ----------------------------------------------------------------------- 82488819093494169c9d18+ ----------------------------------------------------------------------- 20828606470195011756124749235566349302734835183863512316970974825693776 ----------------------------------------------------------------------- 11741444193215876c8d19+ ----------------------------------------------------------------------- 17579213502643071435243425646400779068977505764214847267784178659173266 ----------------------------------------------------------------------- 83888501881097386c7d20+ ----------------------------------------------------------------------- 14139570182184849794702796270593842356635848977984277502329819529128526 ----------------------------------------------------------------------- 14269622564135284c6d21+ ----------------------------------------------------------------------- 81821526431773446330666281508346824927570254281249189701080357476156246 ----------------------------------------------------------------------- 4038271316755940c5d22+6671412258074356025664141233762437215420552788032 ----------------------------------------------------------------------- 86542745615069013984366730903284000776c4d23+ ----------------------------------------------------------------------- 19386645935240422160002863952970531055418275184867436376259669069982751 ----------------------------------------------------------------------- 1501774016156424c3d24+1890147000305059095359232158064243880598344699255 ----------------------------------------------------------------------- 59561356974001288382080670115617882144c2d25+ ----------------------------------------------------------------------- 19413459643607842901078235980047179953536898605093145141122878227370795 ----------------------------------------------------------------------- 664027535174016cd26+242412188885961459189747408969354090255907005055636 ----------------------------------------------------------------------- 38498738728478616383356769798372864d27 | 1 1 o16 : Matrix S <--- S |