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.00002412 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x3bbc4c0 -- [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 = 4172 -- #reduction steps = 49 -- #spairs done = 12 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0769506 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 0x3bd3000 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x3bbc000 -- [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 0x3d71e40 -- [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.0326766 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 0x3d4c2a8 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 5 3 2 3 2 8 3 7 2 7 1 2 2 o12 = ideal (-a + 4a b + -a*b + -b + -a c + -a*b*c + -b c + a d + a*b*d + 3 2 3 2 2 2 ----------------------------------------------------------------------- 6 2 8 2 2 5 2 2 2 3 3 2 -b d + -a*c + 2b*c + 9a*c*d + b*c*d + -a*d + -b*d + -c + 2c d + 7 5 6 5 2 ----------------------------------------------------------------------- 9 2 7 3 7 3 9 2 8 2 3 10 2 2 2 5 2 -c*d + -d , -a + --a b + -a*b + b + --a c + -a*b*c + 8b c + -a d + 5 2 8 10 9 7 5 6 ----------------------------------------------------------------------- 1 7 2 5 2 5 2 4 7 2 2 4 3 -a*b*d + -b d + -a*c + -b*c + 6a*c*d + -b*c*d + -a*d + 6b*d + -c + 3 3 2 7 7 6 3 ----------------------------------------------------------------------- 9 2 4 2 3 3 1 3 2 3 2 5 3 2 1 2 -c d + -c*d + -d , -a + 10a b + -a*b + -b + 4a c + -a*b*c + 3b c + 2 9 2 4 4 3 8 ----------------------------------------------------------------------- 5 2 2 3 2 1 2 5 1 2 2 2 -a d + 7a*b*d + b d + -a*c + -b*c + -a*c*d + -b*c*d + 5a*d + -b*d + 4 2 5 4 2 5 ----------------------------------------------------------------------- 3 3 8 2 5 2 2 3 --c + -c d + -c*d + -d ) 10 9 7 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x3d71ab0 -- [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 0x3bbc390 {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.67596 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 104509438868878080156249008656283946841865366559375386408684717905037 ----------------------------------------------------------------------- 80351957035940080c27+68846272459370930920457461268484159513784556799850 ----------------------------------------------------------------------- 958284787107815295373833797849141360c26d- ----------------------------------------------------------------------- 23139797843967449623639565804029351191522920773900160143562026715122957 ----------------------------------------------------------------------- 9039149628193847c25d2-1953100839301269053098928365295935277239089668411 ----------------------------------------------------------------------- 630986774221321816106572278554457732475c24d3- ----------------------------------------------------------------------- 11378397562718710999149082169898923769605919892071286708973303470023220 ----------------------------------------------------------------------- 78709803697779152c23d4+ ----------------------------------------------------------------------- 13875616883277586800898404602617025624841652311880886810585815575083683 ----------------------------------------------------------------------- 76355643345228815c22d5- ----------------------------------------------------------------------- 58734040016421793230603797289451820553262364772481803752699433462754824 ----------------------------------------------------------------------- 72219150205704684c21d6+ ----------------------------------------------------------------------- 49977827065054726830860515458345147556652281306397135260495133630120664 ----------------------------------------------------------------------- 51024245876658435c20d7+ ----------------------------------------------------------------------- 11669305416962206409637732900714813843317504048270753872476439982654946 ----------------------------------------------------------------------- 785288304709539939c19d8- ----------------------------------------------------------------------- 10733548149454536711937428687869488195452006469206512519867157255423163 ----------------------------------------------------------------------- 137629952217071580c18d9+ ----------------------------------------------------------------------- 56700702891905564334034997388119816330309155071676331367370567572108850 ----------------------------------------------------------------------- 81111941475742847c17d10+ ----------------------------------------------------------------------- 22448402504814890777073065539364102875458799303980992242872877186849053 ----------------------------------------------------------------------- 886923126786909885c16d11- ----------------------------------------------------------------------- 12220206608998809300802635617598930596423795930698694259878115889581992 ----------------------------------------------------------------------- 159417613615200448c15d12- ----------------------------------------------------------------------- 21845561048868380947057921416340868264086763874812278752595683350735887 ----------------------------------------------------------------------- 99452069221698455c14d13+ ----------------------------------------------------------------------- 20047292919312612204330107779791352549858806417510885108667546408696022 ----------------------------------------------------------------------- 314674738440485044c13d14- ----------------------------------------------------------------------- 11179660743442093522737137882290144235281637056061895288625715243117973 ----------------------------------------------------------------------- 896848021799738745c12d15- ----------------------------------------------------------------------- 68538944000744497992951856401422006981494702436965300394129169757722880 ----------------------------------------------------------------------- 04091002049456099c11d16+ ----------------------------------------------------------------------- 76755880600445734256636136105757752254650893136354687660306494969513324 ----------------------------------------------------------------------- 45161991110128260c10d17+ ----------------------------------------------------------------------- 23609179345726796057317690316563377009991820652876737089635377510884462 ----------------------------------------------------------------------- 58105882848105200c9d18- ----------------------------------------------------------------------- 47343695689710477827214931951713556597835775527437805362036003154158076 ----------------------------------------------------------------------- 29383084827854260c8d19- ----------------------------------------------------------------------- 18039446113895830917757124607999950803466536320215247772753042744558045 ----------------------------------------------------------------------- 91178557390983680c7d20+ ----------------------------------------------------------------------- 36887769267934061331181922161517164417695175750475439729299681293428840 ----------------------------------------------------------------------- 39987628622561400c6d21+ ----------------------------------------------------------------------- 91870514297818572259397246305719072950783259875787014311263288032048074 ----------------------------------------------------------------------- 2382253594502240c5d22-1264242106811729543081225112479513582108689465513 ----------------------------------------------------------------------- 817803978789649041022864763807067744800c4d23- ----------------------------------------------------------------------- 40837561491800704465166960203039924360678467410308175854738568134014276 ----------------------------------------------------------------------- 0884698223496000c3d24+1281141604601507016669254358349205259522032711450 ----------------------------------------------------------------------- 84143257249716322172201889985386400000c2d25+ ----------------------------------------------------------------------- 41895853074374545079911031907105268007321328843731983589918282937777207 ----------------------------------------------------------------------- 518999922000000cd26-668848204371953474814267891966277066771815679802677 ----------------------------------------------------------------------- 1933421780142077127913824134000000d27 | 1 1 o16 : Matrix S <--- S |