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 0x87faab0 -- [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 = 4177 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.072004 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 0x93cc630 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x963be40 -- [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 0x963bd10 -- [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.032002 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 0x93cc5a0 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 7 3 3 2 6 2 3 2 4 5 2 4 2 7 o12 = ideal (-a + -a b + -a*b + b + 3a c + -a*b*c + -b c + -a d + -a*b*d + 2 4 5 5 9 3 4 ----------------------------------------------------------------------- 1 2 5 2 2 2 1 2 5 2 2 3 2 -b d + -a*c + -b*c + 3a*c*d + --b*c*d + a*d + -b*d + -c + c d + 3 6 3 10 3 5 ----------------------------------------------------------------------- 2 3 1 3 1 2 2 6 3 3 2 3 2 1 2 c*d + 10d , -a + -a b + 6a*b + -b + -a c + 5a*b*c + -b c + -a d + 2 9 7 2 2 3 ----------------------------------------------------------------------- 2 2 9 2 1 2 4 10 2 6 2 1 3 7a*b*d + -b d + -a*c + -b*c + a*c*d + -b*c*d + --a*d + -b*d + -c + 3 4 3 3 3 7 9 ----------------------------------------------------------------------- 7 2 6 2 3 3 1 2 2 3 2 2 2 2 6 2 -c d + -c*d + d , a + -a b + a*b + 3b + -a c + -a*b*c + 2b c + -a d 2 5 6 5 5 7 ----------------------------------------------------------------------- 7 1 2 5 2 8 2 4 1 5 2 4 2 1 3 + -a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d + -c 2 3 3 5 5 7 9 5 5 ----------------------------------------------------------------------- 2 6 2 9 3 + 2c d + -c*d + -d ) 7 5 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x963b980 -- [gb]{3}(3,3)mmm{4}(2,2)mm{5}(3,3)mm removing gb 1 at 0x87fa850 m{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.932059 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 168655513183525658110932590027138269613229001159643484994215593643000 ----------------------------------------------------------------------- 00c27-73468741684324463388730505061023856031942843144493626071656427687 ----------------------------------------------------------------------- 375000c26d+236351031671496223428930839753216328401513750407408272966508 ----------------------------------------------------------------------- 8539710860000c25d2+6181674994811829455143457516319087402214216647226144 ----------------------------------------------------------------------- 31201104752846892500c24d3+ ----------------------------------------------------------------------- 58477988118611119745037038969503416873776215435918302149855715628372350 ----------------------------------------------------------------------- 375c23d4-38784535502023368106264172376106213936449055003912044735150987 ----------------------------------------------------------------------- 03009120750c22d5+157671417746833470511352426246965631174035938655181791 ----------------------------------------------------------------------- 884483426653511135075c21d6+ ----------------------------------------------------------------------- 29916984154010020387374300360795044990877727637709606901361720068271413 ----------------------------------------------------------------------- 06500c20d7-297246079871927819641315848881964433909315634536985138931270 ----------------------------------------------------------------------- 7475176626195945c19d8+1071722816025543256636108072571799216309623016158 ----------------------------------------------------------------------- 080097347896087760323155340c18d9+ ----------------------------------------------------------------------- 59363267714407672673463783713468384278519671421879966499746807038142659 ----------------------------------------------------------------------- 204054c17d10-5049694937270002353584933279329029890800894066202008875391 ----------------------------------------------------------------------- 2471015607852494840c16d11- ----------------------------------------------------------------------- 66300178493607475056089173928385368632560592519079696861105346043422091 ----------------------------------------------------------------------- 205639c15d12+5324265101944109416871492833888626235082600269858189064293 ----------------------------------------------------------------------- 40668986786887257470c14d13- ----------------------------------------------------------------------- 24113768774015687911980857782156368078414970626878446967343535013880784 ----------------------------------------------------------------------- 8782477c13d14-929974782762703431783144729320011375199232697856120741311 ----------------------------------------------------------------------- 092954860157504007440c12d15+ ----------------------------------------------------------------------- 18594196982781436405122067383213849173339439590928943077371334533186139 ----------------------------------------------------------------------- 74857033c11d16+88980377642280037893803735247053329404960317969870537241 ----------------------------------------------------------------------- 584466707509625700780c10d17- ----------------------------------------------------------------------- 32921379118278981598701667056563330581546041401358376941226730197351132 ----------------------------------------------------------------------- 85230260c9d18+963676311487202812647662675339029958275764644448477695736 ----------------------------------------------------------------------- 155276072843555473200c8d19+ ----------------------------------------------------------------------- 17672324876390954296280752803356495588567303866816551497590622488027308 ----------------------------------------------------------------------- 64647000c7d20+420029168504642740332728873605977041888649027606225540324 ----------------------------------------------------------------------- 52002227119500754800c6d21- ----------------------------------------------------------------------- 20299434529283017451158218924696045553352829529318959539271194890460424 ----------------------------------------------------------------------- 86754000c5d22+198961358407731411692302171481545724566709997740355426583 ----------------------------------------------------------------------- 4331465045739681572000c4d23+ ----------------------------------------------------------------------- 37207032858937860630976748284028892621205124829513783902773751388768156 ----------------------------------------------------------------------- 6570000c3d24-8010548476038180750622920229268132397704061438270794029750 ----------------------------------------------------------------------- 20982363436258640000c2d25- ----------------------------------------------------------------------- 30521827758961373927089825513758979060959525653111752377799838959043686 ----------------------------------------------------------------------- 0680000cd26+22986326009800494019136664258182582662081927732946552112811 ----------------------------------------------------------------------- 7341959719036400000d27 | 1 1 o16 : Matrix S <--- S |