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 7.413e-6 seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T] |
i7 : time gens gb I; -- registering gb 2 at 0xbd194c0 -- [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 = 4180 -- #reduction steps = 37 -- #spairs done = 11 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- -- used 0.0228066 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 0xbd31aa0 |
i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 3 at 0xbd19000 -- [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 0xbed2e40 -- [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.00951767 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 0xbeac198 o11 = S o11 : PolynomialRing |
i12 : J = substitute(I,S) 3 2 8 2 3 3 5 2 6 2 1 2 1 o12 = ideal (a + 6a b + -a*b + -b + -a c + a*b*c + -b c + -a d + -a*b*d + 5 5 9 5 5 3 ----------------------------------------------------------------------- 2 1 2 2 2 2 3 9 2 2 5 3 4 2 b d + -a*c + -b*c + -a*c*d + -b*c*d + -a*d + 3b*d + -c + -c d + 2 3 7 2 4 4 7 ----------------------------------------------------------------------- 2 9 3 3 1 2 7 2 5 3 2 8 2 2 2 c*d + --d , 2a + -a b + -a*b + -b + a c + 5a*b*c + -b c + -a d + 10 3 8 4 3 9 ----------------------------------------------------------------------- 4 2 2 4 2 3 1 1 2 3 2 3 3a*b*d + -b d + a*c + -b*c + -a*c*d + -b*c*d + -a*d + -b*d + 8c + 5 3 2 5 2 8 ----------------------------------------------------------------------- 8 2 10 2 2 3 3 2 2 5 2 6 3 2 1 1 2 -c d + --c*d + -d , a + -a b + -a*b + -b + a c + -a*b*c + -b c + 5 9 3 7 9 5 2 4 ----------------------------------------------------------------------- 5 2 2 7 2 2 7 2 2 2 -a d + a*b*d + 7b d + -a*c + b*c + 5a*c*d + 2b*c*d + -a*d + -b*d + 8 3 6 7 ----------------------------------------------------------------------- 3 3 5 2 1 2 1 3 -c + -c d + -c*d + -d ) 2 3 2 2 o12 : Ideal of S |
i13 : installHilbertFunction(J, hf) |
i14 : gbTrace=3 o14 = 3 |
i15 : time gens gb J; -- registering gb 5 at 0xbed2ab0 -- [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) --removing gb 0 at 0xbd19390 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.210981 seconds 1 39 o15 : Matrix S <--- S |
i16 : selectInSubring(1,gens gb J) o16 = | 114643229530884005141236778226753836639345702964910120244760676225649 ----------------------------------------------------------------------- 543268000000000000c27+6991255724400971343671188581065690175572912485939 ----------------------------------------------------------------------- 77959078630973001231281603600000000000c26d+ ----------------------------------------------------------------------- 94221938154077998822267438003361725922187952294998085875617166752254240 ----------------------------------------------------------------------- 10315610000000000c25d2+ ----------------------------------------------------------------------- 12395839271088535534794502579796634965962532589758299676597948813572203 ----------------------------------------------------------------------- 97522081500000000c24d3+ ----------------------------------------------------------------------- 51903184596498263505904188877839195934638554416460741554308486696816823 ----------------------------------------------------------------------- 941396727275000000c23d4- ----------------------------------------------------------------------- 12309408872457664558946799620569328309340206803624498077704516277442744 ----------------------------------------------------------------------- 6892875796730000000c22d5- ----------------------------------------------------------------------- 50111985664797270340478583303702168715401493338879791094183877320500101 ----------------------------------------------------------------------- 9948087349693859375c21d6- ----------------------------------------------------------------------- 68247654497368143249284830019117579162094947099852030095699278360555284 ----------------------------------------------------------------------- 1798924201639093750c20d7+ ----------------------------------------------------------------------- 10465672537672270462241907255233341003830271544611788983070684711394751 ----------------------------------------------------------------------- 12575065166846162500c19d8+ ----------------------------------------------------------------------- 38326203673549603902869724639241566479745754078425631928311867000535778 ----------------------------------------------------------------------- 00568901669975110500c18d9+ ----------------------------------------------------------------------- 48309822645452194543766399163820339573279178188417290864324964555059434 ----------------------------------------------------------------------- 34922668591331581000c17d10+ ----------------------------------------------------------------------- 34093307772144540715039353123533134884263619999989139798511290303489443 ----------------------------------------------------------------------- 90814686320182227900c16d11+ ----------------------------------------------------------------------- 16395505605003030659189568394235984464465696146906261374834544440895273 ----------------------------------------------------------------------- 94032020157089436200c15d12+ ----------------------------------------------------------------------- 16625629106641609287427955281450104707516877889670451709333183839430005 ----------------------------------------------------------------------- 2498494957402506440c14d13- ----------------------------------------------------------------------- 65584668425023547312259730556625398011430658142540853406640420291174491 ----------------------------------------------------------------------- 5067177950973800280c13d14- ----------------------------------------------------------------------- 68276303156008386840510231022114538526225331503622532499543146665254805 ----------------------------------------------------------------------- 2122354103117102432c12d15- ----------------------------------------------------------------------- 39144735910326464249367136995668779996508205809460316830347033960549118 ----------------------------------------------------------------------- 8490657788896993560c11d16- ----------------------------------------------------------------------- 91324067083417961271683817523927677800716420468926714874147555567796769 ----------------------------------------------------------------------- 882396910132841550c10d17+ ----------------------------------------------------------------------- 90409621391277811003673527432691533292419082292831150807697935260352430 ----------------------------------------------------------------------- 811680921245891000c9d18+ ----------------------------------------------------------------------- 12188093835849251715379263643827013648256201054875181114263001306223771 ----------------------------------------------------------------------- 1082716499673024600c8d19+ ----------------------------------------------------------------------- 94822327004530497706383462041932547149258490028233529401612275538719772 ----------------------------------------------------------------------- 617120479849951000c7d20+ ----------------------------------------------------------------------- 53797690718669892465812248162528706438734320996668640528686809373272097 ----------------------------------------------------------------------- 398734558808093200c6d21+ ----------------------------------------------------------------------- 23651419468878134816339258586566920393731565802884099132719664932416001 ----------------------------------------------------------------------- 259216960306497000c5d22+ ----------------------------------------------------------------------- 87255157568327849099038369394365074393038941528737499146364917744821997 ----------------------------------------------------------------------- 36531164519760000c4d23+ ----------------------------------------------------------------------- 24561747839412303229889090660533563002127623583915843231524192206364303 ----------------------------------------------------------------------- 89016483025900000c3d24+ ----------------------------------------------------------------------- 54078893562280135432206796044130141119035244153821527826615077911245452 ----------------------------------------------------------------------- 0624871139840000c2d25+8524286133939166773347373208315244539416983289138 ----------------------------------------------------------------------- 6603355211138149888468784729317200000cd26+ ----------------------------------------------------------------------- 24447364592976509004055590816468825636681216701503094378565734990516402 ----------------------------------------------------------------------- 75596317120000d27 | 1 1 o16 : Matrix S <--- S |