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 9.892e-6 seconds
3 6 9
o6 = 1 - 3T + 3T - T
o6 : ZZ[T]
|
i7 : time gens gb I;
-- registering gb 2 at 0x95ae130
-- [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 = 23
-- nsaved = 0
-- -- used 0.020854 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 0x840ea00 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 3 at 0x9204be0
-- [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 0x9204980
-- [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.017004 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 0x840e980 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
5 3 2 1 2 1 3 6 2 1 2 2 5
o12 = ideal (-a + 5a b + -a*b + -b + -a c + 3a*b*c + -b c + a d + -a*b*d +
9 2 2 5 3 8
-----------------------------------------------------------------------
6 2 1 2 1 2 9 4 2 3 2 5 3 9 2
-b d + -a*c + -b*c + -a*c*d + 6b*c*d + -a*d + -b*d + -c + --c d +
5 2 2 7 5 4 3 10
-----------------------------------------------------------------------
2 9 3 10 3 5 2 4 2 5 3 3 2 5 4 2 1 2
3c*d + --d , --a + -a b + -a*b + -b + -a c + -a*b*c + -b c + -a d +
10 9 6 3 2 5 4 5 4
-----------------------------------------------------------------------
7 2 1 2 5 2 7 3 2 9 2 3
-a*b*d + 2b d + -a*c + -b*c + -a*c*d + b*c*d + -a*d + -b*d + c +
8 9 6 3 2 7
-----------------------------------------------------------------------
2 2 3 2 2 3 1 3 2 5 2 8 3 1 2 2
-c d + --c*d + -d , -a + a b + -a*b + -b + -a c + 5a*b*c + 5b c +
5 10 5 4 8 9 7
-----------------------------------------------------------------------
1 2 1 2 4 2 4 2 10 3 4 2
-a d + -a*b*d + 3b d + -a*c + -b*c + --a*c*d + --b*c*d + -a*d +
2 2 5 7 7 10 3
-----------------------------------------------------------------------
2 1 3 2 2 2 9 3
3b*d + -c + 3c d + -c*d + -d )
8 7 4
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 5 at 0x92045f0
-- [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
--removing gb 0 at 0x95ae000
{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.56568 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 264412176073022421979018634273551914813021113892630187414948920077138
-----------------------------------------------------------------------
00107810816000c27+24596781394808868984650612155081958370995279977907478
-----------------------------------------------------------------------
1795717533097064665468012953600c26d-
-----------------------------------------------------------------------
19421897099824739332586798286700976529221384691841898770433795438080911
-----------------------------------------------------------------------
86275934865408c25d2+539222308669192956709904062575726675922745170637660
-----------------------------------------------------------------------
3349046614643372607335981173285888c24d3-
-----------------------------------------------------------------------
67334923109695168263304006952454171476335558336907760464785638757429062
-----------------------------------------------------------------------
32911783649280c23d4+139117500115245078133863080330788583874526964293814
-----------------------------------------------------------------------
53499977302509382744466194434105088c22d5-
-----------------------------------------------------------------------
50875433185683161431481453100015175820646698216260634598493836564482021
-----------------------------------------------------------------------
580587465344512c21d6+13768643282206758929753088628510515629245173795611
-----------------------------------------------------------------------
3815782000871056406089672530640182592c20d7-
-----------------------------------------------------------------------
23537822734334713487782378785367076985955842534122919956906446886793563
-----------------------------------------------------------------------
2277152066959024c19d8+3193056791806501700434896081933873718785024558532
-----------------------------------------------------------------------
66516209266851075584963855283134835392c18d9-
-----------------------------------------------------------------------
45224228563732414918001614265809348081484760820807983385050104928149376
-----------------------------------------------------------------------
2140250545703232c17d10+
-----------------------------------------------------------------------
40321191799439867889127971754657232080595939471760194968766020975057651
-----------------------------------------------------------------------
2475909032538176c16d11-
-----------------------------------------------------------------------
45278489922553823381013188989350383417301779141018005547923113880141401
-----------------------------------------------------------------------
0738705521971728c15d12+
-----------------------------------------------------------------------
45545634007625830781044175700783268890753130529326188274657393561281006
-----------------------------------------------------------------------
4176593024006328c14d13-
-----------------------------------------------------------------------
22275107404842171301035733922986199800699834570869998516178237188318146
-----------------------------------------------------------------------
7700518252570256c13d14+
-----------------------------------------------------------------------
43933071801476466492722397460232698443287292509222536479293670462852319
-----------------------------------------------------------------------
8702115892330208c12d15-
-----------------------------------------------------------------------
34255877961708569660669464978848627073288887375241808991722442745320470
-----------------------------------------------------------------------
312208047738532c11d16+2787934391751104952750356187319235383987316359075
-----------------------------------------------------------------------
02775540659040738616113060403497336896c10d17+
-----------------------------------------------------------------------
22685711301828342967710704629156197885361130258612657490116502528696129
-----------------------------------------------------------------------
7311750079089c9d18+9974016737239954042798601574662556436143585590197799
-----------------------------------------------------------------------
5234398640652009107161910742466840c8d19-
-----------------------------------------------------------------------
11698155697247430491651383136645170876140271460812598736730924155812408
-----------------------------------------------------------------------
532411974212680c7d20+18146598441125799472777338699704984904371343762980
-----------------------------------------------------------------------
697955259147415467417414280108734550c6d21-
-----------------------------------------------------------------------
63010375313057808448927003520808307390261693059670837195593886508092872
-----------------------------------------------------------------------
87145583866800c5d22+213082810715481183531729758651257738495430917870449
-----------------------------------------------------------------------
0407454069154490390355836821512000c4d23-
-----------------------------------------------------------------------
87026404778373079070194824375324661396677012089014996244587815857363097
-----------------------------------------------------------------------
8680696276500c3d24+2493613214229794395130430589476898484885077796350107
-----------------------------------------------------------------------
14133675007450164263789769060000c2d25-
-----------------------------------------------------------------------
18846752508030919986608453891944953388574789925405882545975954639355515
-----------------------------------------------------------------------
790139740000cd26+102132037881237880111969833922015053526301181005551647
-----------------------------------------------------------------------
0439851465239604692787285000d27 |
1 1
o16 : Matrix S <--- S
|