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 0x93a2260
-- [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 = 4182
-- 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 0x93d3510 |
i9 : I = ideal random(R^1, R^{3:-3});
-- registering gb 4 at 0x8eabab0
-- [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 0x8eab980
-- [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. 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 0x93d3480 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S)
3 3 2 2 2 3 3 1 2 7 1 2 3 2 4
o12 = ideal (a + -a b + -a*b + -b + -a c + -a*b*c + -b c + --a d + -a*b*d
2 5 4 8 9 5 10 5
-----------------------------------------------------------------------
2 1 2 2 7 9 2 3 2 10 3 2
+ 7b d + -a*c + 5b*c + 3a*c*d + --b*c*d + -a*d + -b*d + --c + c d
2 10 2 4 7
-----------------------------------------------------------------------
8 2 3 3 9 3 3 2 9 2 5 3 2 7 1 2 1 2
+ -c*d + -d , -a + -a b + -a*b + -b + 5a c + -a*b*c + -b c + -a d +
9 8 7 2 5 8 5 9 2
-----------------------------------------------------------------------
9 3 2 2 5 2 8 4 2 2 3 3
-a*b*d + -b d + 8a*c + -b*c + 2a*c*d + -b*c*d + -a*d + 5b*d + -c +
5 4 3 9 5 2
-----------------------------------------------------------------------
2 7 2 3 1 3 4 2 3 2 1 3 7 2 5 5 2
c d + -c*d + d , -a + -a b + -a*b + -b + -a c + -a*b*c + -b c +
8 4 7 2 5 3 8 3
-----------------------------------------------------------------------
2 2 9 8 2 2 2 5 7 2 1 2
-a d + -a*b*d + -b d + 9a*c + 6b*c + 4a*c*d + -b*c*d + --a*d + -b*d
7 2 9 6 10 3
-----------------------------------------------------------------------
3 9 2 8 2 1 3
+ c + -c d + -c*d + -d )
8 5 2
o12 : Ideal of S
|
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J;
-- registering gb 6 at 0x8eab130
-- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mmm{6}(3,7)mmm{7}(3,8)
removing gb 1 at 0x93a2130
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.82 seconds
1 39
o15 : Matrix S <--- S
|
i16 : selectInSubring(1,gens gb J)
o16 = | 468980212538660459821847284479473732469283738198048554020961517544699
-----------------------------------------------------------------------
6308060800000000c27+486545994075471725864855590677318286099796432779663
-----------------------------------------------------------------------
83782797650520686764685825600000000c26d+
-----------------------------------------------------------------------
22720960729801956463179408112397883830706568969169943767422345714567392
-----------------------------------------------------------------------
1372314384000000c25d2+6271726410173581654551678011357787412251889645756
-----------------------------------------------------------------------
10607222571752438223367923192376400000c24d3+
-----------------------------------------------------------------------
19875236893097373453006898256148280007684260327042269087351968047402999
-----------------------------------------------------------------------
07524958059500000c23d4+
-----------------------------------------------------------------------
24401502557445671077292532546752110367169311059935187293781493987305169
-----------------------------------------------------------------------
29479559025760000c22d5-
-----------------------------------------------------------------------
94167194750828694475642151429331746234309172001713522612414087529528674
-----------------------------------------------------------------------
39588772698804375c21d6-
-----------------------------------------------------------------------
34901005194115290185971717973576234610066445123246075169777431015699870
-----------------------------------------------------------------------
238080951070631000c20d7-
-----------------------------------------------------------------------
35192454082341079668358214931291442935950502749908035906542222741265258
-----------------------------------------------------------------------
845642212082774250c19d8+
-----------------------------------------------------------------------
21508078672624917984595616105262807867028517595351376768646399636110499
-----------------------------------------------------------------------
475308891320082600c18d9+
-----------------------------------------------------------------------
89198294016160748858176088802731608612365134763631376484520038296435933
-----------------------------------------------------------------------
833906939923316300c17d10+
-----------------------------------------------------------------------
96193886435707238441608683569969036909978629086846599647089983333635486
-----------------------------------------------------------------------
901440659741302640c16d11+
-----------------------------------------------------------------------
32375808939012230007051298710480506617583615967324441807806820722955782
-----------------------------------------------------------------------
935995984712657610c15d12-
-----------------------------------------------------------------------
62015151178897855972698604964496564971277649125041821256807306825352598
-----------------------------------------------------------------------
886396086449466225c14d13-
-----------------------------------------------------------------------
12885464671715404778033832248526294704170557027332502092132143714777542
-----------------------------------------------------------------------
5553967466526180432c13d14-
-----------------------------------------------------------------------
12642505225139437321059158967537499654797869990027299952369709209089576
-----------------------------------------------------------------------
1381476099534471912c12d15-
-----------------------------------------------------------------------
75168769604614373061727841167426267954694802343093379471949771277182341
-----------------------------------------------------------------------
099189219710215600c11d16-
-----------------------------------------------------------------------
21598951646502372886051569171490875529619939423848982193224270058920283
-----------------------------------------------------------------------
892687510744449696c10d17+
-----------------------------------------------------------------------
14284043424710255841975190831246317775759290642889261364124255085060291
-----------------------------------------------------------------------
140902378396852880c9d18+
-----------------------------------------------------------------------
26976976767979572334252386542199328554997330149073369330071211729273785
-----------------------------------------------------------------------
225721583078313696c8d19+
-----------------------------------------------------------------------
21204600518460887322078439147419499201024805794853214548347572466958034
-----------------------------------------------------------------------
309010152422263584c7d20+
-----------------------------------------------------------------------
11957161105805242856102967191538841229383858794039985856957856336785238
-----------------------------------------------------------------------
433755112666303488c6d21+
-----------------------------------------------------------------------
60847808374957577651036905814934121957812163763784400949176588579813480
-----------------------------------------------------------------------
83972315209104896c5d22+
-----------------------------------------------------------------------
28241685938428907339258508857758569305429279265776192319862990121890934
-----------------------------------------------------------------------
51043277826566848c4d23+
-----------------------------------------------------------------------
16468111878793480066452263800050597436537514341898268480991478319165208
-----------------------------------------------------------------------
18582619590571520c3d24+
-----------------------------------------------------------------------
11533890162545562835113842353065179067446032531767096411131575622409882
-----------------------------------------------------------------------
96956089889865600c2d25+
-----------------------------------------------------------------------
48131905844014750090072417357186544597870179487719572511695794005616208
-----------------------------------------------------------------------
6382953819216000cd26+72206164434669479842272170683151133922642535840284
-----------------------------------------------------------------------
856874208762970113274309794289688000d27 |
1 1
o16 : Matrix S <--- S
|