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 0x113fc390
-- [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 = 4179
-- ncalls = 10
-- nloop = 28
-- nsaved = 0
-- -- used 0.040022 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 0x113b4870 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x11536e40
-- [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 0x11536d10
-- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)
removing gb 1 at 0x113fc260
oo
-- number of (nonminimal) gb elements = 11
-- number of monomials = 267
-- ncalls = 10
-- nloop = 20
-- nsaved = 0
-- -- used 0.06517 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 0x111dbf30 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
6 3 3 2 2 2 2 3 2 2 7 2 7 2 10
o12 = ideal (-a + -a b + -a*b + -b + -a c + -a*b*c + b c + -a d + --a*b*d
7 5 3 5 9 9 9 7
-----------------------------------------------------------------------
3 2 5 2 1 2 3 1 5 2 3 2 2 3 2
+ -b d + -a*c + -b*c + -a*c*d + --b*c*d + -a*d + -b*d + -c + c d +
8 9 2 2 10 6 7 5
-----------------------------------------------------------------------
10 2 7 3 3 3 2 2 4 3 9 2 2 9 2 1 2
--c*d + -d , 7a + -a b + a*b + -b + -a c + -a*b*c + -b c + -a d +
9 9 2 3 7 5 4 6
-----------------------------------------------------------------------
7 2 1 2 5 2 8 9 2 2 7 3
-a*b*d + 4b d + -a*c + -b*c + -a*c*d + -b*c*d + 2a*d + 3b*d + -c +
4 6 3 9 4 9
-----------------------------------------------------------------------
5 2 2 1 3 3 5 2 2 6 3 2 9 2 3 2
-c d + c*d + -d , a + -a b + a*b + -b + a c + -a*b*c + b c + -a d +
2 2 2 5 2 5
-----------------------------------------------------------------------
4 1 2 7 2 2 9 9 1 2 3 2 3
-a*b*d + -b d + --a*c + 10b*c + -a*c*d + -b*c*d + -a*d + -b*d + c
7 2 10 2 5 3 4
-----------------------------------------------------------------------
10 2 5 2 2 3
+ --c d + -c*d + -d )
9 2 3
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x11536980
-- [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)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.449445 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 347387410769936785343266528432829320795183320516147095434783778802102
-----------------------------------------------------------------------
435840c27+2548706092766007368779456246368218875762688952270054757916928
-----------------------------------------------------------------------
092289439334400c26d+136941674925896709060309483211181181880916038518411
-----------------------------------------------------------------------
22650120502353581002629120c25d2+
-----------------------------------------------------------------------
58532289198435882362754077559676682187284780347828577762216038155577785
-----------------------------------------------------------------------
753600c24d3+19733658106282984335414745997182203732002344908423771919475
-----------------------------------------------------------------------
7043089713954162688c23d4+
-----------------------------------------------------------------------
54472525299070270796766682841046781626074876281041205229233357258236116
-----------------------------------------------------------------------
9326080c22d5+1289883676539370578335660090265839610910530069242433875058
-----------------------------------------------------------------------
205929949872244695040c21d6+
-----------------------------------------------------------------------
26486184981683045556123756559577878727391020110399633912687416525557949
-----------------------------------------------------------------------
95637120c20d7+456024750160449538234047752230424162808740953601499594769
-----------------------------------------------------------------------
9861503067553201926560c19d8+
-----------------------------------------------------------------------
63355171663842863747284598817917211995213082015875882773290952865297816
-----------------------------------------------------------------------
66378400c18d9+692988540798935653705243207178964169761162521479496658883
-----------------------------------------------------------------------
7292305012292429733200c17d10+
-----------------------------------------------------------------------
59020252226645592798938177584928468237330526507354093604406073550856513
-----------------------------------------------------------------------
48547300c16d11+38953002849798607872554181835160154439642667959506718503
-----------------------------------------------------------------------
95265054578378724899850c15d12+
-----------------------------------------------------------------------
19750416350914586824814067420314429839696017337371450941055347751776904
-----------------------------------------------------------------------
60049275c14d13+73859441751013826528597781757096298592310638882326928827
-----------------------------------------------------------------------
1446927788888124753250c13d14+
-----------------------------------------------------------------------
17390945346795867506119109306645990867812940908169672185916582802674627
-----------------------------------------------------------------------
2136000c12d15+168895221394676354874950583934389544127133758688010874640
-----------------------------------------------------------------------
9873777144398925000c11d16-
-----------------------------------------------------------------------
18548263371128847672876681602249650040368361269046481757895936731346513
-----------------------------------------------------------------------
643750c10d17-6322738012595855207911803663322449151597896949266041260100
-----------------------------------------------------------------------
605921896538340625c9d18+
-----------------------------------------------------------------------
24095462175735746692047943043237399574369364047994418807557750852656843
-----------------------------------------------------------------------
3750c8d19+7536047765683447940060542376094238124287969913993692510579387
-----------------------------------------------------------------------
02814779206250c7d20+247831207096583746707776527730557257754631434307978
-----------------------------------------------------------------------
583594370359814658615625c6d21+
-----------------------------------------------------------------------
16798225076187172842423007231090290913296419355686835550362408655036875
-----------------------------------------------------------------------
00c5d22-599282937105487017995168098006396415622396528963092467908125108
-----------------------------------------------------------------------
1605625000c4d23-3753551435733414331138649320588887921219191496533287949
-----------------------------------------------------------------------
003520868902000000c3d24+
-----------------------------------------------------------------------
26352850335768626291559482232199658542777532341623600395587914169092187
-----------------------------------------------------------------------
5c2d25+1471657859567766577458270236011541977893951682807366867601307944
-----------------------------------------------------------------------
1796875cd26+28797964104003782872018221028613079413394079452407400763613
-----------------------------------------------------------------------
755283203125d27 |
1 1
o16 : Matrix S <--- S
|