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.00001718 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0x3fc7000
-- [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 = 4184
-- #reduction steps = 38
-- #spairs done = 11
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.0322393 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 0x4f0e960 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0x200de00
-- [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 0x200dc40
-- [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.014268 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 0x4f0e870 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
4 3 5 2 2 2 5 3 2 2 2 3
o12 = ideal (-a + -a b + -a*b + -b + 9a c + 2a*b*c + 3b c + a d + -a*b*d +
9 6 9 7 4
-----------------------------------------------------------------------
2 9 2 3 2 2 9 2 2 3 2 8 3 1 2
3b d + --a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c + -c d +
10 5 3 8 7 4 7 4
-----------------------------------------------------------------------
7 2 2 3 1 3 5 2 5 2 8 3 1 2 1 2 9 2
-c*d + -d , -a + -a b + -a*b + -b + --a c + -a*b*c + 3b c + --a d +
3 5 5 9 8 3 10 3 10
-----------------------------------------------------------------------
2 10 2 2 2 3 3 2 1 2 3 3
a*b*d + 3b d + --a*c + -b*c + -a*c*d + -b*c*d + 6a*d + -b*d + -c +
3 3 2 5 2 2
-----------------------------------------------------------------------
1 2 1 2 1 3 4 3 3 2 2 3 2 10 8 2
-c d + -c*d + -d , -a + -a b + 6a*b + b + 7a c + --a*b*c + -b c +
2 2 9 3 5 7 5
-----------------------------------------------------------------------
2 1 2 2 5 2 2 2 5 5 2 2 5 2
2a d + -a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d
9 3 3 5 9 2 3 6
-----------------------------------------------------------------------
4 3 2 2 5 3
+ -c + 9c d + 2c*d + -d )
9 3
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0x200da80
-- [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)
--removing gb 0 at 0x3fc71c0
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
-- #reduction steps = 284
-- #spairs done = 53
-- ncalls = 46
-- nloop = 54
-- nsaved = 0
-- -- used 0.1857 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 121104465040086803108721097863108870792683988771548964278539418771772
-----------------------------------------------------------------------
991850086400c27-3674838465595108895167862631543139723635401490767438027
-----------------------------------------------------------------------
120676292289552300550144000c26d+
-----------------------------------------------------------------------
28120209593004408645878086154163126632271503172583168830927990013457456
-----------------------------------------------------------------------
0266568417280c25d2-5839650123583764078458584668685101622613185073770807
-----------------------------------------------------------------------
71513829519292706035096955613440c24d3+
-----------------------------------------------------------------------
49297713052930750797436833283285837021175236066108979750891542064448973
-----------------------------------------------------------------------
120746722121600c23d4+19576540112496027125389757990723941375228675384901
-----------------------------------------------------------------------
4136330292249816755256346687768460260c22d5+
-----------------------------------------------------------------------
60410556266936436420899128343680845294760965522829622827101885707599138
-----------------------------------------------------------------------
3889952081727980c21d6+1236926208892918201847086543016972216357556504114
-----------------------------------------------------------------------
958834324794221828350968278689614142035c20d7+
-----------------------------------------------------------------------
21194389297011101847190739123363143766198667417365386586571894155948044
-----------------------------------------------------------------------
10519265929228367c19d8+
-----------------------------------------------------------------------
29817445532020895870429152562792696436352758583868057607805993616835261
-----------------------------------------------------------------------
25312764882086640c18d9+
-----------------------------------------------------------------------
35895618278948883546466312042461245129087281662149066268714727949564831
-----------------------------------------------------------------------
26412968975622265c17d10+
-----------------------------------------------------------------------
37128626112551948809140213204427978308247279890913481183816397052803478
-----------------------------------------------------------------------
38260606732091162c16d11+
-----------------------------------------------------------------------
33461763032863955989533252907486909290664270457850439161834773645140806
-----------------------------------------------------------------------
68990753928903754c15d12+
-----------------------------------------------------------------------
26641908402491945940827157015663353363636837491919617409584270441873262
-----------------------------------------------------------------------
94714134783733135c14d13+
-----------------------------------------------------------------------
18916719416081365427888278380914378343514114790985385622484772183332467
-----------------------------------------------------------------------
64089548006650936c13d14+
-----------------------------------------------------------------------
12056182152276117943381920880853826641525595129378737047002442468550028
-----------------------------------------------------------------------
52483955714921443c12d15+
-----------------------------------------------------------------------
69813787064512476903410839812770359136193514501046808502025650419992180
-----------------------------------------------------------------------
3536861782871188c11d16+
-----------------------------------------------------------------------
36768186253065869061760372756149885736300833186957896877259921736393158
-----------------------------------------------------------------------
2359880465237216c10d17+
-----------------------------------------------------------------------
17676812172178853125673786646700805838168371983111457171456643945828750
-----------------------------------------------------------------------
6195108116864236c9d18+7750132554533623476146001119530771699348122829438
-----------------------------------------------------------------------
5405397451230923749438746921544834280c8d19+
-----------------------------------------------------------------------
30716784937515487226190924442502891869086978712453985255605590639511277
-----------------------------------------------------------------------
558927204174760c7d20+10972308005134773833643382525979845723302725650487
-----------------------------------------------------------------------
244643743717259305939317407706378640c6d21+
-----------------------------------------------------------------------
34673909701654583355070689410880090586020308057134757094399261862352611
-----------------------------------------------------------------------
06494584618400c5d22+967235323166925145489660053743041448278183528212996
-----------------------------------------------------------------------
029843306729880776009598831027360c4d23+
-----------------------------------------------------------------------
22734788341616907264733403881679931270923088778071616630599589486042054
-----------------------------------------------------------------------
1780976617280c3d24+4605023755453171286540840006331077655060401234026243
-----------------------------------------------------------------------
4188623626550878760720344772480c2d25+
-----------------------------------------------------------------------
65797861500504314940346553952118021162574456361270253032510085287808113
-----------------------------------------------------------------------
26208817920cd26+8088882660207702690504428865193691359249673321712264213
-----------------------------------------------------------------------
64792269049697989474913280d27 |
1 1
o16 : Matrix S <--- S
|