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. seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 3 at 0x9403e40 -- [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 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.022997 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 5 at 0x932d3f0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x9403980 -- [gb] -- number of (nonminimal) gb elements = 0 -- number of monomials = 0 -- ncalls = 0 -- nloop = 0 -- nsaved = 0 -- o9 : Ideal of R |
i10 : time hf = poincare I -- registering gb 5 at 0x9403850 -- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mo removing gb 1 at 0x9403d10 oo{8}(2)oo -- number of (nonminimal) gb elements = 11 -- number of monomials = 267 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.043994 seconds 3 6 9 o10 = 1 - 3T + 3T - T o10 : ZZ[T] |
i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 6 at 0x932df30 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 5 3 2 2 3 3 3 2 7 3 2 1 2 2 o12 = ideal (-a + a b + 2a*b + -b + -a c + -a*b*c + --b c + -a d + -a*b*d 3 8 2 8 10 3 3 ----------------------------------------------------------------------- 5 2 3 2 2 2 1 2 1 2 2 3 5 2 + -b d + -a*c + 5b*c + 2a*c*d + -b*c*d + -a*d + -b*d + -c + -c d + 6 2 7 4 5 7 4 ----------------------------------------------------------------------- 1 2 5 3 4 3 1 2 2 3 3 1 2 1 3 2 7 2 -c*d + -d , -a + -a b + 2a*b + --b + -a c + -a*b*c + --b c + -a d + 5 9 3 2 10 5 9 10 3 ----------------------------------------------------------------------- 9 2 1 2 9 2 2 9 5 2 7 2 2 3 9a*b*d + --b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c 10 2 2 5 8 9 2 9 ----------------------------------------------------------------------- 2 2 3 3 2 2 5 2 8 3 2 3 2 + c d + 4c*d + d , 3a + -a b + -a*b + -b + 4a c + -a*b*c + 9b c + 3 2 5 2 ----------------------------------------------------------------------- 5 2 4 2 2 2 1 5 2 1 2 -a d + a*b*d + -b d + 3a*c + 2b*c + -a*c*d + 3b*c*d + -a*d + -b*d + 3 5 6 4 2 ----------------------------------------------------------------------- 6 3 5 2 2 2 3 -c + -c d + -c*d + 7d ) 5 8 9 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x94034c0 -- [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)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 -- ncalls = 46 -- nloop = 54 -- nsaved = 0 -- -- used 0.277957 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 172464759078237488273955483218465751666376829425521959980957630464c27 ----------------------------------------------------------------------- -932531985466987838825382395929767614439174159151217545647481528320c26d ----------------------------------------------------------------------- +18849616661515430683651717449368368488939694884911604776140635006720c2 ----------------------------------------------------------------------- 5d2-7081858842580332420767214075480476007398687994944260735635759031833 ----------------------------------------------------------------------- 6c24d3-2689532851091539393254186102282115887010481376884817621461519055 ----------------------------------------------------------------------- 76848c23d4+347631167898547631487291864172290459620390289122807528076278 ----------------------------------------------------------------------- 5797725172c22d5-2652350220458372545814767182908139032539275839371620953 ----------------------------------------------------------------------- 4635121648489684c21d6+1017462630963761902795908310245717041997746686423 ----------------------------------------------------------------------- 26123702183655462976292c20d7- ----------------------------------------------------------------------- 12677928917045549994440497274037044250732490615213227356447829263731935 ----------------------------------------------------------------------- c19d8-17820142337558667461046874939463256157740114361402604231110419244 ----------------------------------------------------------------------- 21404072c18d9+971766650591397691272995726092594885012773884366532009247 ----------------------------------------------------------------------- 1577855651692172c17d10- ----------------------------------------------------------------------- 29207388336219240643550465905699485034323559064862522815422824431152150 ----------------------------------------------------------------------- 296c16d11+5962112420696020962143084803522779909479374410445286083283064 ----------------------------------------------------------------------- 7211897847234c15d12-775411907235289366971545808987793702915833668955129 ----------------------------------------------------------------------- 18175410667532264943605c14d13+ ----------------------------------------------------------------------- 65032339793784197893645669425901672636341927409713567637571206154602351 ----------------------------------------------------------------------- 836c13d14-4756001448443803734437502155043147543719037869042060319269576 ----------------------------------------------------------------------- 7586756375680c12d15+791384471689208027302826433143062456605257640686598 ----------------------------------------------------------------------- 2154259862784430873515c11d16+ ----------------------------------------------------------------------- 69407151451656176958326295045001512317902358556531774329535714066687141 ----------------------------------------------------------------------- 75c10d17+83575052127088698306997829359685741250080918676211267874178214 ----------------------------------------------------------------------- 9706385600c9d18-1177189448552240582727850136649877610206770876165274186 ----------------------------------------------------------------------- 4369777882945846250c8d19+ ----------------------------------------------------------------------- 37372345782651682715428604152473817558300953237288811601862181196992484 ----------------------------------------------------------------------- 250c7d20-39868737802001680257721452019464587563541520157014334270038995 ----------------------------------------------------------------------- 248319175000c6d21+12391914496797145425008333663203614953885484694383209 ----------------------------------------------------------------------- 400666790710083730000c5d22- ----------------------------------------------------------------------- 19588550616085955141599067240074355591668363675436259854846889361812000 ----------------------------------------------------------------------- 00c4d23+136022307850031090234103341328823071357163013739730160976037116 ----------------------------------------------------------------------- 4372800000c3d24-2448403291052904340702887281860566410435647964457966821 ----------------------------------------------------------------------- 47856101512000000c2d25- ----------------------------------------------------------------------- 3651615566080109946445080272432157600853445734520191932971029440000000c ----------------------------------------------------------------------- d26-1544740409164898840008444334924410678545270108923973699725153280000 ----------------------------------------------------------------------- 0000d27 | 1 1 o16 : Matrix S <--- S |