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 0x2513540
-- [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
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.03 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 0x2043f00 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x2513380
-- [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 0x25131c0
-- [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.01 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 0x2043b00 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
9 3 2 4 2 9 3 5 2 1 1 2 2 9
o12 = ideal (-a + a b + -a*b + -b + -a c + -a*b*c + -b c + 5a d + -a*b*d +
5 3 4 3 4 3 5
-----------------------------------------------------------------------
2 7 2 2 2 2 2 2 2 3 2
2b d + -a*c + -b*c + a*c*d + 9b*c*d + -a*d + 3b*d + -c + 3c d +
4 3 7 5
-----------------------------------------------------------------------
2 10 3 3 7 2 2 7 3 7 2 2 2 2
3c*d + --d , 2a + -a b + a*b + -b + -a c + 8a*b*c + 2b c + -a d +
7 8 3 9 7
-----------------------------------------------------------------------
1 7 2 2 2 2 5 2 2 3 2 3
-a*b*d + -b d + 2a*c + -b*c + 2a*c*d + -b*c*d + -a*d + -b*d + 2c +
2 6 5 2 9 8
-----------------------------------------------------------------------
2 2 5 2 3 10 3 5 2 2 3 10 2 9 1 2
-c d + -c*d + d , --a + -a b + a*b + 2b + --a c + -a*b*c + -b c +
9 6 9 4 3 5 7
-----------------------------------------------------------------------
8 2 1 8 2 5 2 2 2 6 7 2 3 2
-a d + -a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + 5a*d + --b*d
9 3 9 4 3 7 5 10
-----------------------------------------------------------------------
2 3 4 2 2 3 3
+ -c + -c d + c*d + -d )
3 9 2
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x2513000
-- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mmm{6}(3,7)mmm{7}(3,8)mmm{8}(3,9)mm
removing gb 1 at 0x2513700
m{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
-- {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.22 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 265527394232862042300173147657999909870145339168477030013655253015305
-----------------------------------------------------------------------
69533440c27+48217463866416851341429136531419138826136921985197197441096
-----------------------------------------------------------------------
8901829295614732288c26d+
-----------------------------------------------------------------------
16103791549752475106857567706176516525551860673547369441490523358387208
-----------------------------------------------------------------------
29582848c25d2+702880296686632350657349955667676786552635852761365666749
-----------------------------------------------------------------------
53378365036419550150656c24d3+
-----------------------------------------------------------------------
12195233033237271147154251338991459894435559427303886007543906928753545
-----------------------------------------------------------------------
65338910528c23d4-123427021106068174133873967589587486549169662747353576
-----------------------------------------------------------------------
66362179800502764384801426688c22d5-
-----------------------------------------------------------------------
14741387792127015421366732665352164857208555981423215127905721219534241
-----------------------------------------------------------------------
052383333944c21d6+20244602217651855445270101798491119398835093587284475
-----------------------------------------------------------------------
644941738715569734788551812198c20d7+
-----------------------------------------------------------------------
55531200938454547475949947107287336431436763253716069470478340631498881
-----------------------------------------------------------------------
191407859704c19d8+10472406969570480027736282656691231798604646927155024
-----------------------------------------------------------------------
407388270109539677631770124739c18d9-
-----------------------------------------------------------------------
45781351251985629903147031001244414707505906937646082230044006070361083
-----------------------------------------------------------------------
414887609536c17d10-1000272101073336246266816327233456107397470224256121
-----------------------------------------------------------------------
59252163492254140733462461596036c16d11+
-----------------------------------------------------------------------
14804848243808544768617016074773508184074061588118301548887907710783477
-----------------------------------------------------------------------
0937355513188c15d12+138914596920905899597233940774678997853775654740843
-----------------------------------------------------------------------
161291625857839065975241493514136c14d13-
-----------------------------------------------------------------------
44431501995532315722508782657125742820443171477083844288617377488502123
-----------------------------------------------------------------------
297284498904c13d14+9767276643688653734935725966196021529016656827515956
-----------------------------------------------------------------------
8702593428592593196115408421525c12d15+
-----------------------------------------------------------------------
13598712504064688530713926762020067449618559678571756622672631814733668
-----------------------------------------------------------------------
2015873654256c11d16+287511047590001903159713993276429528497807549787499
-----------------------------------------------------------------------
48717646053356012332328472881687c10d17+
-----------------------------------------------------------------------
26938840417437792140564823920947065920031706019786411870827453110618239
-----------------------------------------------------------------------
526417418616c9d18+42571817092363842259096377157532098773380708746913783
-----------------------------------------------------------------------
728496609995120538339514501460c8d19+
-----------------------------------------------------------------------
24350573998639706831435675494398581718246307892062528068452631328408390
-----------------------------------------------------------------------
518329675000c7d20+16042627594930313583873354180645018203102651795627871
-----------------------------------------------------------------------
070029550265580082164194577816c6d21+
-----------------------------------------------------------------------
12649867251777747455304890422936229784418441759113346250056041908822494
-----------------------------------------------------------------------
442542322880c5d22+62256297052372816307132250547482219955045238318334768
-----------------------------------------------------------------------
70165635546072274405004560080c4d23+
-----------------------------------------------------------------------
25975435643742306342366111398389629348020665255376515996345782729460234
-----------------------------------------------------------------------
33920242880c3d24+113343426523509751260009046044426386764282851171450109
-----------------------------------------------------------------------
5662194592763091179175801920c2d25+
-----------------------------------------------------------------------
29517352205537103813541971556474987564354424253842655286414316136899484
-----------------------------------------------------------------------
6534447360cd26+26413867869825313300343586364826250590288897970455649508
-----------------------------------------------------------------------
439889811926183776156160d27 |
1 1
o16 : Matrix S <--- S
|