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 0x9115130 -- [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 = 4186 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.022996 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 0x8cd8e10 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x9319850 -- [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 removing gb 1 at 0x9115000 -- registering gb 5 at 0x9319720 -- [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.047993 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 0x95e5f30 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 6 3 6 2 3 2 2 3 8 2 3 1 2 9 2 3 o12 = ideal (-a + -a b + -a*b + -b + -a c + -a*b*c + -b c + --a d + -a*b*d 7 7 5 5 9 2 2 10 4 ----------------------------------------------------------------------- 2 2 7 2 7 2 9 4 9 2 2 1 3 2 + -b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 9b*d + -c + c d + 3 2 4 7 5 4 7 ----------------------------------------------------------------------- 1 2 4 3 1 3 2 2 1 3 2 8 1 2 7 2 --c*d + -d , -a + 4a b + 8a*b + -b + a c + -a*b*c + -b c + -a d + 10 3 2 2 3 6 3 ----------------------------------------------------------------------- 2 2 1 2 9 3 3 2 2 5 3 a*b*d + b d + 3a*c + -b*c + -a*c*d + --b*c*d + -a*d + b*d + -c + 9 8 10 2 9 ----------------------------------------------------------------------- 2 9 2 1 3 5 3 1 2 5 2 9 3 5 2 10 2 7c d + --c*d + -d , -a + -a b + -a*b + --b + -a c + --a*b*c + 5b c 10 4 7 3 8 10 7 9 ----------------------------------------------------------------------- 3 2 7 2 1 2 2 2 5 5 2 2 + --a d + 8a*b*d + -b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 10 2 4 5 2 9 3 ----------------------------------------------------------------------- 3 2 5 3 3 2 5 2 3 -b*d + -c + -c d + -c*d + 4d ) 8 3 4 4 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 6 at 0x9458ab0 -- [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.385941 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 270634183805042982881320283711205529415593261535640211568479977470424 ----------------------------------------------------------------------- 1425000000000c27+351142774422772444205028579562758556943476583635521937 ----------------------------------------------------------------------- 63369645195130080165500000000c26d+ ----------------------------------------------------------------------- 11483744227602768227405963485223461327464318039939634875131418120645497 ----------------------------------------------------------------------- 3876575000000c25d2-1214991434662769086829476963024875921220769278037283 ----------------------------------------------------------------------- 55408527884647295455097605000000c24d3- ----------------------------------------------------------------------- 49914921306286900062629691096945366631981847033763244873172222024531989 ----------------------------------------------------------------------- 541470750000c23d4-83082610481374744621802406933065114932439508814230054 ----------------------------------------------------------------------- 9404509070783514902658783750000c22d5+ ----------------------------------------------------------------------- 55219878357764779932326256300517132112301790238596124755155086991640810 ----------------------------------------------------------------------- 99648477200000c21d6+301758310946410786515484334348006614320694577453580 ----------------------------------------------------------------------- 1874123523627236935260298038825000c20d7+ ----------------------------------------------------------------------- 20868864906102667389418792381505403113990583773790896118055536324798870 ----------------------------------------------------------------------- 319475475397500c19d8-18216472583353790087331043346836170397816896763820 ----------------------------------------------------------------------- 786790704254084686428821728336256500c18d9+ ----------------------------------------------------------------------- 28277651981993595196977904182732382088749563612259078547617307383661287 ----------------------------------------------------------------------- 672452900476625c17d10-8712135052934441271186513814318399065548636314799 ----------------------------------------------------------------------- 4340133194319050059253541529734997375c16d11+ ----------------------------------------------------------------------- 69166346577755324103767101296629993398201549886527548751416481691256312 ----------------------------------------------------------------------- 940645655687025c15d12-2029807058118377230755051361188330907768490283988 ----------------------------------------------------------------------- 92628307677416204557576230686806771250c14d13+ ----------------------------------------------------------------------- 14858389534436641693100996297951072696994888578022610773767151553178163 ----------------------------------------------------------------------- 1691262865699410c13d14- ----------------------------------------------------------------------- 31123452930721090178104452482845320725564099407184500706579144979090696 ----------------------------------------------------------------------- 9681295077453990c12d15+ ----------------------------------------------------------------------- 43289793135860850961749510240026236628803964801399278970977915930593518 ----------------------------------------------------------------------- 1849339422114178c11d16- ----------------------------------------------------------------------- 19821114554132705432757276718402434701914048462779240452779173026529120 ----------------------------------------------------------------------- 4526886170752413c10d17+ ----------------------------------------------------------------------- 67399030479497174699508057619864938132991187719930196588312172537104074 ----------------------------------------------------------------------- 6264426579041336c9d18-2827601857650693129591822921616244204387723905620 ----------------------------------------------------------------------- 65676834714382707920524276438487318688c8d19+ ----------------------------------------------------------------------- 36150614758654813935035440491105478237677235075774361290072483542517007 ----------------------------------------------------------------------- 2393089684300210c7d20-5730294603290523111459586118813925097587976925541 ----------------------------------------------------------------------- 30733618757714206054169366379950997240c6d21- ----------------------------------------------------------------------- 80671566982884444048056494060190025863204213325284756922455060186770490 ----------------------------------------------------------------------- 738678604377400c5d22-56878964542704215037098198749737173428334447509139 ----------------------------------------------------------------------- 1790352401015669187650079798369235000c4d23- ----------------------------------------------------------------------- 17223041769148919326886123983178738406431044116374931292949527973453524 ----------------------------------------------------------------------- 9493676909600000c3d24-2998646321915118186861776536706593458110326513869 ----------------------------------------------------------------------- 07451402001881862848544034840728750000c2d25- ----------------------------------------------------------------------- 78465836547137944138672296434013455606995141136174272611346051369598275 ----------------------------------------------------------------------- 922158854937500cd26-692729952848335419279127574821934198561202233287566 ----------------------------------------------------------------------- 95394645936257260405617966211875000d27 | 1 1 o16 : Matrix S <--- S |