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 5.282e-6 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0x44c7700
-- [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 = 4183
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.0109068 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 0x4a73c30 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0x44c7540
-- [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 4 at 0x44c7380
-- [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
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.005664 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 0x4638f00 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
3 3 4 2 2 3 3 10 2 1 1 2 7 2
o12 = ideal (-a + -a b + 2a*b + -b + --a c + -a*b*c + -b c + --a d +
8 9 4 9 2 9 10
-----------------------------------------------------------------------
5 1 2 5 2 2 4 10 10 2 7 2
-a*b*d + -b d + -a*c + 5b*c + -a*c*d + --b*c*d + --a*d + -b*d +
3 3 3 5 3 9 4
-----------------------------------------------------------------------
3 3 1 2 3 2 7 3 3 1 2 3 2 7 3 9 2 1
--c + -c d + -c*d + -d , a + -a b + -a*b + -b + -a c + -a*b*c +
10 6 4 4 3 7 2 7 5
-----------------------------------------------------------------------
8 2 2 1 1 2 4 2 2 4 1 9 2
-b c + a d + -a*b*d + -b d + -a*c + 8b*c + -a*c*d + -b*c*d + --a*d +
3 9 4 7 9 8 10
-----------------------------------------------------------------------
2 2 3 1 2 3 2 2 3 8 3 2 4 2 3 3 5 2
b*d + -c + -c d + -c*d + -d , -a + a b + -a*b + -b + -a c +
3 2 8 5 3 5 5 2
-----------------------------------------------------------------------
9 2 1 2 1 2 2 2 1 2 7 1
6a*b*c + -b c + -a d + -a*b*d + 2b d + -a*c + -b*c + --a*c*d + -b*c*d
5 5 7 7 3 10 9
-----------------------------------------------------------------------
2 2 3 1 2 5 2 3
+ a*d + 3b*d + 2c + -c d + -c*d + 2d )
5 7
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0x44c71c0
-- [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
--removing gb 0 at 0x44c78c0
-- {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.117442 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 177245913601111347880094022698723777431133014825406072306894839334446
-----------------------------------------------------------------------
06365007872000c27+72411286982173778781592528353754559143814419791858402
-----------------------------------------------------------------------
721066866242294559785091072000c26d+
-----------------------------------------------------------------------
16439304899386640216458572071092390008060072913518009824121098795028593
-----------------------------------------------------------------------
4330327859200c25d2+1932167631410376426416373639816637686364885463943858
-----------------------------------------------------------------------
71032216861443314465841480499200c24d3+
-----------------------------------------------------------------------
12103085001634882898661295104596015408506245286769769187149265967910987
-----------------------------------------------------------------------
0384082083840c23d4+2973120972356467216254020921346313920308385747860001
-----------------------------------------------------------------------
9312529650844640978073475178496c22d5+
-----------------------------------------------------------------------
12847438520910108543728223801665809256330811588423784253808324254377254
-----------------------------------------------------------------------
3749098053504c21d6+2992527053969806956659760812933454820017369014881653
-----------------------------------------------------------------------
41266851637931682351242355938688c20d7+
-----------------------------------------------------------------------
26534242783224743750608892035590295963923630135274929088447371961582928
-----------------------------------------------------------------------
2141256631552c19d8-1141974737848236096396241105822753905588611178158662
-----------------------------------------------------------------------
55264169003268001182559815476456c18d9-
-----------------------------------------------------------------------
46635445001363146320221354219088764088964149458629849586274695076320460
-----------------------------------------------------------------------
1387711573320c17d10-435049804114009607607366426889087440765189729026804
-----------------------------------------------------------------------
480953060037324088532067061571704c16d11-
-----------------------------------------------------------------------
56332403580172280110042739487361215492043154614287659982144797806422042
-----------------------------------------------------------------------
166732561986c15d12+2591594642727219789027796325550336279297500432725351
-----------------------------------------------------------------------
80508711203994917890687439904884c14d13+
-----------------------------------------------------------------------
23482607575741821815165769173898080543691533542109902383106232735418773
-----------------------------------------------------------------------
4980104912749c13d14+506508524829509745734143846815617512494369124775898
-----------------------------------------------------------------------
43276921603731591816030150181571c12d15-
-----------------------------------------------------------------------
13081165008038348548483252090426813985952198763327168156749730185631950
-----------------------------------------------------------------------
220937711258c11d16-4095602932259716984702914653847719875864851784869268
-----------------------------------------------------------------------
9871387009718581097613262562864c10d17-
-----------------------------------------------------------------------
71085345865426273816148069356719562158547295439343264681583042555722635
-----------------------------------------------------------------------
391720336488c9d18-49393810696081976681758915736861180690949472502650494
-----------------------------------------------------------------------
573748750419551708627346020128c8d19-
-----------------------------------------------------------------------
12210183967020483652851954531059636067143828141768719537033101734737890
-----------------------------------------------------------------------
572950072480c7d20-43687830929402193766015413874956284832939608487372927
-----------------------------------------------------------------------
83001086644036559800024692800c6d21-
-----------------------------------------------------------------------
33601975616731552612974192077490054224630230558271420991181971151884464
-----------------------------------------------------------------------
19532646400c5d22-506756537559314586419784525286729118903436159350073266
-----------------------------------------------------------------------
572191463922375033713002240c4d23+
-----------------------------------------------------------------------
22070368192259553004475209181571727221207668113038788652315751239101528
-----------------------------------------------------------------------
6935180032c3d24+2900276152812688573875047537546621928411111338727157559
-----------------------------------------------------------------------
13229268209901868579840c2d25-
-----------------------------------------------------------------------
30979626159850238343413004432218759097853639295328833503817217842524720
-----------------------------------------------------------------------
786157568cd26-523188258539336242798680203672939116183921910269785122111
-----------------------------------------------------------------------
4959326165939949543424d27 |
1 1
o16 : Matrix S <--- S
|