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 9.201e-6 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x3dcc1c0 -- [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 = 4183 -- #reduction steps = 38 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0191003 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 3 at 0x4cc6960 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x3dcc000 -- [gb]number of (nonminimal) gb elements = 0 -- number of monomials = 0 -- #reduction steps = 0 -- #spairs done = 0 -- ncalls = 0 -- nloop = 0 -- nsaved = 0 -- o9 : Ideal of R |
i10 : time hf = poincare I -- registering gb 4 at 0x2222e00 -- [gb]{3}(3)mmm{4}(2)mm{5}(3)mmm{6}(6)mmoooo{7}(4)mooo{8}(2)oonumber of (nonminimal) gb elements = 11 -- number of monomials = 267 -- #reduction steps = 236 -- #spairs done = 30 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.00717416 seconds 3 6 9 o10 = 1 - 3T + 3T - T o10 : ZZ[T] |
i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 4 at 0x4cc6870 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 1 3 5 2 2 3 7 2 6 1 2 2 3 o12 = ideal (-a + -a b + 5a*b + b + -a c + -a*b*c + -b c + 2a d + -a*b*d + 8 3 6 5 2 2 ----------------------------------------------------------------------- 8 2 3 2 2 4 2 2 3 3 2 -b d + -a*c + b*c + a*c*d + -b*c*d + 6a*d + 7b*d + -c + 3c d + 3 2 7 5 ----------------------------------------------------------------------- 10 2 4 3 3 4 2 1 2 1 3 9 2 5 7 2 7 2 --c*d + -d , 3a + -a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + 3 9 7 3 5 4 9 4 8 ----------------------------------------------------------------------- 7 7 2 7 2 2 4 9 3 2 3 2 1 3 -a*b*d + -b d + -a*c + 2b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c + 3 5 8 5 8 4 7 2 ----------------------------------------------------------------------- 10 2 2 8 3 7 3 4 2 2 2 3 2 7 1 2 --c d + 4c*d + -d , -a + -a b + -a*b + 6b + a c + -a*b*c + -b c + 7 7 8 9 3 3 6 ----------------------------------------------------------------------- 5 2 6 7 2 2 1 2 2 7 2 6 2 -a d + -a*b*d + -b d + 3a*c + -b*c + 10a*c*d + -b*c*d + -a*d + -b*d 3 7 9 2 3 6 7 ----------------------------------------------------------------------- 10 3 2 2 3 2 5 3 + --c + -c d + -c*d + -d ) 3 3 4 7 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x2222c40 -- [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 --removing gb 0 at 0x3dcc380 -- {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 -- #reduction steps = 284 -- #spairs done = 53 -- ncalls = 46 -- nloop = 54 -- nsaved = 0 -- -- used 0.0933478 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 123734831501320203058841467178252277687621472390405575047609084098206 ----------------------------------------------------------------------- 64052322816c27-63074067877887996608933412236944615710852655793007803542 ----------------------------------------------------------------------- 6836914176823417022491136c26d+ ----------------------------------------------------------------------- 51600516634380654291480856468417753399926703202534179352698790364092850 ----------------------------------------------------------------------- 45733143552c25d2-279316292109074237792278778981061026095585713400622663 ----------------------------------------------------------------------- 995385279177092375213020858240c24d3+ ----------------------------------------------------------------------- 25236208973097346665956507541128945206546979359926600787290536175280121 ----------------------------------------------------------------------- 9793761452224c23d4-1047092615892185515072464586402478658928087865357009 ----------------------------------------------------------------------- 3644386812479618998950539463040c22d5+ ----------------------------------------------------------------------- 56815826018003184618767631147113345210806373616864897578932185636584929 ----------------------------------------------------------------------- 18486348511904c21d6+256831474353755095187842172810420309017366900618884 ----------------------------------------------------------------------- 27006563926142978154945704180572608c20d7+ ----------------------------------------------------------------------- 70589552063556971298244631124113399117426896028875918294113628861863593 ----------------------------------------------------------------------- 523469299477456c19d8+50781036877164528954386132049236820817829229431540 ----------------------------------------------------------------------- 522088745023374558928483600812080392c18d9- ----------------------------------------------------------------------- 98392430887855534764860552435426235194373912626431595192091583199814116 ----------------------------------------------------------------------- 399352415471872c17d10-5443066608213577274143009848622760022037145338493 ----------------------------------------------------------------------- 30025749642749425651259962496149578292c16d11- ----------------------------------------------------------------------- 12190619309986058505040809815799662935736232108961076948990247579827628 ----------------------------------------------------------------------- 51837180016062768c15d12- ----------------------------------------------------------------------- 16905591753042186236559975012765942555181990439999508681648209918466038 ----------------------------------------------------------------------- 17816610996342070c14d13- ----------------------------------------------------------------------- 21983213296866509581680426625649946097324734203994806938752432215274272 ----------------------------------------------------------------------- 3428349186171010c13d14+ ----------------------------------------------------------------------- 37651991366677557039809275573654147226265255955441899102757083691270868 ----------------------------------------------------------------------- 19505882464300705c12d15+ ----------------------------------------------------------------------- 74796470428706380985190092038076235997849948728065778967379418266763671 ----------------------------------------------------------------------- 81728889884179600c11d16+ ----------------------------------------------------------------------- 47048025083219042456530012908030514139652043465454933067986560336072465 ----------------------------------------------------------------------- 63730995057199600c10d17- ----------------------------------------------------------------------- 46185531749519985295692171436952652057424911314248622888835197072218856 ----------------------------------------------------------------------- 33347047424401600c9d18- ----------------------------------------------------------------------- 11896062569927178535022282864821348064587478728445332504868113003030158 ----------------------------------------------------------------------- 283389911567616000c8d19- ----------------------------------------------------------------------- 10813245336309128956130417160920386646471178332801649683268265602787487 ----------------------------------------------------------------------- 040053775237120000c7d20- ----------------------------------------------------------------------- 73988904217764005038794156373622619054649754781008812626046661026140153 ----------------------------------------------------------------------- 79097495040000000c6d21- ----------------------------------------------------------------------- 63747040787204036670673947094608974433798862770910132044622791756750136 ----------------------------------------------------------------------- 72694314752000000c5d22- ----------------------------------------------------------------------- 42486507785618668343143244050733645584078166927943488406089994848066983 ----------------------------------------------------------------------- 31784238080000000c4d23- ----------------------------------------------------------------------- 13607448298640115113574839989539522089407826858494749905254848907550847 ----------------------------------------------------------------------- 44412057600000000c3d24- ----------------------------------------------------------------------- 11378346519117613062422173466597291047472991385124835423920219235526039 ----------------------------------------------------------------------- 9693824000000000c2d25+2789417179056683290873683139274179868190802691678 ----------------------------------------------------------------------- 1408018965353996212251688960000000000cd26+ ----------------------------------------------------------------------- 45057035327967253838494383710142320620889023302566766466523449465266831 ----------------------------------------------------------------------- 36000000000000d27 | 1 1 o16 : Matrix S <--- S |