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 0x9601850
-- [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 = 4185
-- ncalls = 10
-- nloop = 29
-- nsaved = 0
-- -- used 0.020996 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 0x928ce10 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x9601390
-- [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 0x9601260
-- [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.011998 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 0x928cd80 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
7 3 1 2 3 2 3 1 2 1 4 2 7 2
o12 = ideal (-a + -a b + -a*b + 3b + -a c + -a*b*c + -b c + -a d + a*b*d +
6 9 5 4 7 3 4
-----------------------------------------------------------------------
2 2 8 2 2 2 1 2 1 2 8 3 7 2
-b d + -a*c + b*c + -a*c*d + -b*c*d + a*d + -b*d + -c + -c d +
7 3 3 4 2 7 3
-----------------------------------------------------------------------
2 2 3 7 3 1 2 1 2 7 3 1 2 1 7 2 2
2c*d + -d , --a + -a b + -a*b + -b + -a c + -a*b*c + -b c + a d +
3 10 3 3 3 3 3 4
-----------------------------------------------------------------------
5 4 2 2 2 2 5 9 2 2 2 4 3
-a*b*d + -b d + a*c + -b*c + -a*c*d + 2b*c*d + -a*d + -b*d + -c +
4 5 3 3 2 7 3
-----------------------------------------------------------------------
2 2 3 2 3 3 2 6 2 1 3 1 2 7 2
3c d + 2c*d + 2d , -a + -a b + -a*b + -b + -a c + -a*b*c + 6b c +
5 2 7 5 9 5
-----------------------------------------------------------------------
6 2 7 5 2 10 2 2 1 7 2 3 2
-a d + -a*b*d + -b d + --a*c + b*c + -a*c*d + -b*c*d + 2a*d + --b*d
7 9 4 9 7 6 10
-----------------------------------------------------------------------
3 1 2 3 2 5 3
+ c + -c d + -c*d + -d )
6 4 6
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x96d9e40
-- [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)
removing gb 1 at 0x9601720
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.344948 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 237954656382937830808287177850261083304345689514750179397092478145483
-----------------------------------------------------------------------
20000c27-56366631925495354390075596380848287639420962462429934078381878
-----------------------------------------------------------------------
150909280000c26d-477411526368078504742161796191981236046784397436803059
-----------------------------------------------------------------------
932239542390506352000c25d2+
-----------------------------------------------------------------------
16454886679981678803277432797556457216605815916572335071673045823330212
-----------------------------------------------------------------------
00000c24d3+748346673336410363981731601964379020439516233222806233565029
-----------------------------------------------------------------------
6361319233966800c23d4-1736908854355859147569864691189162015503789292746
-----------------------------------------------------------------------
8626869519181851381378865200c22d5-
-----------------------------------------------------------------------
74320846023992999106609741013317353561222794192119741203329766592653280
-----------------------------------------------------------------------
956600c21d6+13527884775652976699816941783888421650018943528326735115071
-----------------------------------------------------------------------
8168734506540416400c20d7+
-----------------------------------------------------------------------
70528848327378948591050647426800128541253955968921250944931513985906900
-----------------------------------------------------------------------
6759575c19d8-4760001061297784151205288883003805680317492273150036344485
-----------------------------------------------------------------------
1211574233199971225c18d9-
-----------------------------------------------------------------------
29165725290964122234405727520796197699929421116210828501958530055659869
-----------------------------------------------------------------------
10899325c17d10-19062119039128629027404583960127411626658789608508578632
-----------------------------------------------------------------------
52398208564537577009135c16d11+
-----------------------------------------------------------------------
83308212359403811285594568733550028173985535563051423934961540454501964
-----------------------------------------------------------------------
13602205c15d12+16818887614102995418223373692310685270370817095569059059
-----------------------------------------------------------------------
796178192925170051369480c14d13+
-----------------------------------------------------------------------
52928826253356833540684142107703443659906105380498820184161213610422588
-----------------------------------------------------------------------
44418520c13d14-22894355795795372610429404639069790641739849084903308318
-----------------------------------------------------------------------
629690926652677201337355c12d15-
-----------------------------------------------------------------------
39594566899622374691675723485343177041307402068617584085375534175248279
-----------------------------------------------------------------------
915259370c11d16-2529527212869155569646747399271448849283181781528559075
-----------------------------------------------------------------------
4427651015787520575077515c10d17+
-----------------------------------------------------------------------
71386814672677933321675815239157684998197668226921766796569975191011382
-----------------------------------------------------------------------
16110623c9d18+294092092831207840966410226254686680223966589226392613477
-----------------------------------------------------------------------
29349121194040245890564c8d19+
-----------------------------------------------------------------------
29532530814382093180226093753050811892697907926738688634111895958610252
-----------------------------------------------------------------------
528194496c7d20+17500960418485917933338555681191095295132002307971210758
-----------------------------------------------------------------------
705146475711547153889086c6d21+
-----------------------------------------------------------------------
68495498184216968495686394983002846388457735403934659407892638171102135
-----------------------------------------------------------------------
00134596c5d22+182491749289542824026302411381844180481446834457270818025
-----------------------------------------------------------------------
3467173207746599714464c4d23+
-----------------------------------------------------------------------
33060724998601182585368183667864597247175377937952155002480475529907512
-----------------------------------------------------------------------
6619104c3d24+3894802947971614836399157790326535296708435950476743386623
-----------------------------------------------------------------------
1863367445331391840c2d25+
-----------------------------------------------------------------------
25871795696914852344709664528866988868316593540264513499618431077432168
-----------------------------------------------------------------------
73792cd26+6280514455487368000214964342855720996464621124354445547299884
-----------------------------------------------------------------------
3976199893248d27 |
1 1
o16 : Matrix S <--- S
|