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 0x12042540
-- [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 = 4168
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.029311 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 0x11ef1800 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x12042380
-- [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 0x120421c0
-- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)oo
-- number of (nonminimal) gb elements = 11
-- number of monomials = 267
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.01833 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 0x11ef1500 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
9 3 4 2 3 2 3 2 1 2 9 2 1
o12 = ideal (-a + -a b + -a*b + 7b + 2a c + 2a*b*c + -b c + -a d + -a*b*d
5 5 2 3 7 2
-----------------------------------------------------------------------
2 7 2 8 2 3 1 1 2 2 3 5 2
+ b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 2b*d + 9c + -c d +
3 7 4 3 3 4
-----------------------------------------------------------------------
3 2 5 3 4 3 2 7 2 1 3 3 2 5 2 2
-c*d + -d , -a + a b + -a*b + -b + -a c + 4a*b*c + -b c + 9a d +
5 2 7 3 3 2 2
-----------------------------------------------------------------------
3 2 2 7 2 5 2 9 5 1 2 2 1 3
--a*b*d + -b d + --a*c + -b*c + -a*c*d + -b*c*d + -a*d + b*d + -c
10 5 10 3 5 6 2 3
-----------------------------------------------------------------------
1 2 5 2 2 3 3 10 2 3 2 3 1 2 7 5 2
+ -c d + -c*d + -d , 5a + --a b + -a*b + b + -a c + -a*b*c + -b c +
2 2 7 3 2 2 5 8
-----------------------------------------------------------------------
9 2 7 3 2 2 2 5 2 10 2
--a d + -a*b*d + -b d + a*c + 5b*c + 2a*c*d + -b*c*d + a*d + --b*d
10 2 2 3 3
-----------------------------------------------------------------------
1 3 2 2 3
+ -c + 6c d + c*d + 2d )
4
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x12042000
-- [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
removing gb 1 at 0x12042700
{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.252158 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 223186257778580636417886722080230522316945760736611053470627700335328
-----------------------------------------------------------------------
0000000c27+327479147409681698971825344543941215704106584355243036335532
-----------------------------------------------------------------------
2601502896000000c26d+88004210990944712965929759340253034752280682485691
-----------------------------------------------------------------------
620950062363615088797400000c25d2+
-----------------------------------------------------------------------
50323736112472505760528980544414878048688930853771691360314792810046946
-----------------------------------------------------------------------
1460000c24d3-7582507799968289672729107655212654182678517764598189973286
-----------------------------------------------------------------------
49170166552916022500c23d4+
-----------------------------------------------------------------------
11046483920134722475523748098822469550860806291224009710883486713053166
-----------------------------------------------------------------------
133625500c22d5-18708177756796635244965089108433914203522306503633219927
-----------------------------------------------------------------------
678924726142865353268875c21d6+
-----------------------------------------------------------------------
33865618567224540101570313199155219213419745646057152648695295057247996
-----------------------------------------------------------------------
324653000c20d7+10779868755270544023184006574106100484733261063520080304
-----------------------------------------------------------------------
143481448616118561836000c19d8+
-----------------------------------------------------------------------
78504214077551805763028365868803861554372237727737903559460836618310879
-----------------------------------------------------------------------
106191820c18d9+88258817876914216200583448642557830057855111777506169807
-----------------------------------------------------------------------
681140321036913096890440c17d10+
-----------------------------------------------------------------------
36863186699360471255486398146933157464380811722156651364300420368966987
-----------------------------------------------------------------------
007753504c16d11-7067344789148611025964032875075953215073130965606778557
-----------------------------------------------------------------------
7150166824674613712039644c15d12-
-----------------------------------------------------------------------
57867618524283138820816336581976134154099780200500872525093018463202599
-----------------------------------------------------------------------
984187584c14d13-2020902000554088513496781557873725008123275614447366904
-----------------------------------------------------------------------
25394524272104176480650304c13d14+
-----------------------------------------------------------------------
32088618404720556390018275412696703037193890451162535126058770062820392
-----------------------------------------------------------------------
4046496c12d15-795239857069075884330079054787102194911122812734974109711
-----------------------------------------------------------------------
55355064683508490956928c11d16+
-----------------------------------------------------------------------
86584847865337472141430536923674788104784374240797786334998570112079969
-----------------------------------------------------------------------
383054080c10d17+3666477045021660772953836539074466863591466884339721691
-----------------------------------------------------------------------
1344761128484349964750080c9d18+
-----------------------------------------------------------------------
74737020971197148919339822367543871617585449760268999691294280305832660
-----------------------------------------------------------------------
469526272c8d19+37486036095385323848947751887703092376655333321640110728
-----------------------------------------------------------------------
176028629008273167474688c7d20+
-----------------------------------------------------------------------
27992159357753575537997876136331132233234246894737558345125534724031126
-----------------------------------------------------------------------
427013120c6d21+11628214724350371732457610051601070238072446043808400950
-----------------------------------------------------------------------
147000944869469080444928c5d22+
-----------------------------------------------------------------------
51225334651341508048984603971189000332445615326708947987853814128570305
-----------------------------------------------------------------------
43699968c4d23+153757526615003820606293491922186621739494300372334970427
-----------------------------------------------------------------------
8716154972556743475200c3d24+
-----------------------------------------------------------------------
40472206245475327820612691945627089474874581555300224442297134553331838
-----------------------------------------------------------------------
1568000c2d25+6148696728605411523283712066013508354172347251127027279995
-----------------------------------------------------------------------
3132974447001600000cd26+
-----------------------------------------------------------------------
59488546270042709525672464724930621527340661665266124167694304294174720
-----------------------------------------------------------------------
00000d27 |
1 1
o16 : Matrix S <--- S
|