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.000027177 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0x8953ab0 -- [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 = 4194 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0413498 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 0x83fc500 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0x8453000 -- [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 4 at 0x86aa850 -- [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 -- ncalls = 10 -- nloop = 20 -- nsaved = 0 -- -- used 0.0231589 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 0x9b79f80 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 2 3 2 5 3 1 2 5 4 2 5 2 1 o12 = ideal (3a + 2a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + -a*b*d 5 6 5 3 9 4 7 ----------------------------------------------------------------------- 1 2 2 4 2 9 5 2 5 2 3 1 2 + -b d + 4a*c + -b*c + a*c*d + -b*c*d + -a*d + -b*d + c + -c d + 2 5 7 2 7 2 ----------------------------------------------------------------------- 2 2 1 3 5 3 2 7 2 7 3 3 2 8 7 2 8 2 -c*d + -d , -a + 2a b + -a*b + -b + -a c + -a*b*c + -b c + -a d + 3 4 4 6 6 4 7 2 5 ----------------------------------------------------------------------- 2 7 2 8 2 1 2 10 7 2 3 2 8 3 -a*b*d + -b d + -a*c + -b*c + --a*c*d + b*c*d + -a*d + -b*d + -c + 9 8 9 3 9 6 4 7 ----------------------------------------------------------------------- 3 2 3 2 3 3 1 3 2 4 2 3 6 2 1 2 -c d + -c*d + -d , -a + 5a b + -a*b + 4b + -a c + -a*b*c + 9b c + 2 2 4 4 5 5 5 ----------------------------------------------------------------------- 1 2 1 5 2 1 2 3 2 7 4 2 2 -a d + -a*b*d + -b d + -a*c + --b*c + 3a*c*d + -b*c*d + -a*d + 8b*d 4 3 3 5 10 5 5 ----------------------------------------------------------------------- 3 3 2 2 5 2 1 3 + -c + -c d + -c*d + -d ) 4 5 3 3 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0x9be2e40 -- [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 -- m --removing gb 0 at 0x8953000 m{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.53089 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 596776974659691426919227178758389708051778033025071494817136000352256 ----------------------------------------------------------------------- 00000c27+29003434018590090682366536320418362018088775496089056473617548 ----------------------------------------------------------------------- 7767920640000c26d+43476919189157154977747458222390630149010270222470156 ----------------------------------------------------------------------- 4770757674132234240000c25d2+ ----------------------------------------------------------------------- 19856152770495924825277004287945780818779754085924164396767197549079347 ----------------------------------------------------------------------- 2000c24d3+9445398696190674844398675053914594579248506360068711448670557 ----------------------------------------------------------------------- 65811283640320c23d4+422763790887776346939064967904053068679420129025970 ----------------------------------------------------------------------- 2746145355896816437969920c22d5+ ----------------------------------------------------------------------- 10082390437818211214525652164599346305586195956172272324136831580342561 ----------------------------------------------------------------------- 484800c21d6+19849996745279080837138084185239446288268921556013588411435 ----------------------------------------------------------------------- 445442120765422592c20d7+ ----------------------------------------------------------------------- 33474283652703739766994388527374379207980472665991282992764774594887143 ----------------------------------------------------------------------- 754752c19d8+47930056895387515111186386242298888876802775168536935409986 ----------------------------------------------------------------------- 434755108472837888c18d9+ ----------------------------------------------------------------------- 59823895885029637644225774031588002607912123708967465537252356624236180 ----------------------------------------------------------------------- 722720c17d10+6595571574388456348914605708359356621828604124536358288612 ----------------------------------------------------------------------- 6632383079879320320c16d11+ ----------------------------------------------------------------------- 66508568926754727291094490151636094641948909524524275550466315652684612 ----------------------------------------------------------------------- 219152c15d12+6179558747704674162066849972188240833782651809731050361275 ----------------------------------------------------------------------- 5119780063264373792c14d13+ ----------------------------------------------------------------------- 53234284429118951611489206966854240793082792226272712185905098715082520 ----------------------------------------------------------------------- 072668c13d14+4176332922568166223715616464075624710553270184101584257940 ----------------------------------------------------------------------- 3848913262894246715c12d15+ ----------------------------------------------------------------------- 30670636734048946856719810181658998602068289953861268654707245468493536 ----------------------------------------------------------------------- 845640c11d16+2102310236750845807619661262291945579962221494352276163437 ----------------------------------------------------------------------- 6873170013366645040c10d17+ ----------------------------------------------------------------------- 13617818393292745964173001087063649610866927896012531754672520884301215 ----------------------------------------------------------------------- 455640c9d18+81615681566811998439612553911889232395486622538099279898855 ----------------------------------------------------------------------- 67127996255139500c8d19+ ----------------------------------------------------------------------- 44498090113259616661671351127716298847985780294699261803537862447010730 ----------------------------------------------------------------------- 31600c7d20+228996414760884995362585777998246474907616621605207998109999 ----------------------------------------------------------------------- 9108955376509400c6d21+1103518613719077472105868865466027022096229972645 ----------------------------------------------------------------------- 492771280066188166155696000c5d22+ ----------------------------------------------------------------------- 51281323112779810395502762582168066288005539925882199367613453787195549 ----------------------------------------------------------------------- 9500c4d23+1679396309813015917581183613047550002277418880923878980236715 ----------------------------------------------------------------------- 95859630396000c3d24+468358369350669124640325669494463482016635272350632 ----------------------------------------------------------------------- 23685994638204118300000c2d25+ ----------------------------------------------------------------------- 69152459623145397022347124407085756193030662345400750541261527954472000 ----------------------------------------------------------------------- 00cd26+3808714978341705750783504124648498365599293317575516509358713450 ----------------------------------------------------------------------- 518000000d27 | 1 1 o16 : Matrix S <--- S |