<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>installHilbertFunction -- install a Hilbert function without computation</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_install__Method.html">next</a> | <a href="_install__Assignment__Method.html">previous</a> | <a href="_install__Method.html">forward</a> | <a href="_install__Assignment__Method.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>installHilbertFunction -- install a Hilbert function without computation</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>installHilbertFunction(M,hf)</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>M</tt>, <span>an <a href="___Ideal.html">ideal</a></span>, <span>a <a href="___Module.html">module</a></span>, or <span>a <a href="___Matrix.html">matrix</a></span></span></li> <li><span><tt>hf</tt></span></li> </ul> </div> </li> <li><div class="single">Consequences:<ul><li>The poincare polynomial <tt>hf</tt> is used as the poincare polynomial for <tt>M</tt></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>If M is a module, then hf should be the poincare polynomial of M. If M is an ideal, then hf should be the poincare polynomial of comodule M. If M is a matrix, then hf should be the poincare polynomial of cokernel M.<p>An installed Hilbert function will be used by Gröbner basis computations when possible.</p> <p>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.</p> <table class="examples"><tr><td><pre>i1 : R = ZZ/101[a..g];</pre> </td></tr> <tr><td><pre>i2 : I = ideal random(R^1, R^{3:-3}); o2 : Ideal of R</pre> </td></tr> <tr><td><pre>i3 : hf = poincare ideal(a^3,b^3,c^3) 3 6 9 o3 = 1 - 3T + 3T - T o3 : ZZ[T]</pre> </td></tr> <tr><td><pre>i4 : installHilbertFunction(I, hf)</pre> </td></tr> <tr><td><pre>i5 : gbTrace=3 o5 = 3</pre> </td></tr> <tr><td><pre>i6 : time poincare I -- used 0. seconds 3 6 9 o6 = 1 - 3T + 3T - T o6 : ZZ[T]</pre> </td></tr> <tr><td><pre>i7 : time gens gb I; -- registering gb 3 at 0x912f000 -- [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 = 4179 -- ncalls = 10 -- nloop = 29 -- nsaved = 0 -- removing gb 1 at 0x9349e40 -- used 0.046993 seconds 1 11 o7 : Matrix R <--- R</pre> </td></tr> </table> In this case, the savings is minimal, but often it can be dramatic.<p>Another important situation is to compute a Gröbner basis using a different monomial order. In the example below</p> <table class="examples"><tr><td><pre>i8 : R = QQ[a..d]; -- registering polynomial ring 5 at 0x8f69f30</pre> </td></tr> <tr><td><pre>i9 : I = ideal random(R^1, R^{3:-3}); -- registering gb 4 at 0x9490ab0 -- [gb] -- number of (nonminimal) gb elements = 0 -- number of monomials = 0 -- ncalls = 0 -- nloop = 0 -- nsaved = 0 -- o9 : Ideal of R</pre> </td></tr> <tr><td><pre>i10 : time hf = poincare I -- registering gb 5 at 0x9490980 -- [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.008999 seconds 3 6 9 o10 = 1 - 3T + 3T - T o10 : ZZ[T]</pre> </td></tr> <tr><td><pre>i11 : S = QQ[a..d,MonomialOrder=>Eliminate 2] -- registering polynomial ring 6 at 0x8f69ea0 o11 = S o11 : PolynomialRing</pre> </td></tr> <tr><td><pre>i12 : J = substitute(I,S) 1 3 7 2 4 2 1 3 4 2 1 2 2 2 o12 = ideal (-a + -a b + -a*b + -b + -a c + -a*b*c + b c + -a d + 2a*b*d + 3 8 3 7 7 4 9 ----------------------------------------------------------------------- 1 2 9 2 10 2 1 5 2 7 2 3 3 2 -b d + -a*c + --b*c + -a*c*d + -b*c*d + 10a*d + -b*d + -c + 10c d 7 5 7 3 4 8 8 ----------------------------------------------------------------------- 1 2 3 3 2 3 2 3 3 2 9 8 2 7 2 + -c*d + d , a + 2a b + -a*b + -b + a c + -a*b*c + -b c + --a d + 2 2 2 2 7 10 ----------------------------------------------------------------------- 3 5 2 2 2 5 2 9 5 2 2 2 3 -a*b*d + -b d + -a*c + -b*c + -a*c*d + 3b*c*d + -a*d + b*d + -c + 5 3 5 8 5 4 5 ----------------------------------------------------------------------- 9 2 2 3 1 3 2 5 2 3 9 2 1 5 2 -c d + c*d + 3d , --a + 4a b + -a*b + 2b + -a c + -a*b*c + -b c + 8 10 6 4 7 3 ----------------------------------------------------------------------- 10 2 3 2 2 2 2 5 1 2 9 2 --a d + a*b*d + -b d + 4a*c + -b*c + -a*c*d + -b*c*d + a*d + -b*d + 9 2 3 2 4 8 ----------------------------------------------------------------------- 3 7 2 3 2 3 5c + -c d + -c*d + d ) 2 2 o12 : Ideal of S</pre> </td></tr> <tr><td><pre>i13 : installHilbertFunction(J, hf)</pre> </td></tr> <tr><td><pre>i14 : gbTrace=3 o14 = 3</pre> </td></tr> <tr><td><pre>i15 : time gens gb J; -- registering gb 6 at 0x94905f0 -- [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.287957 seconds 1 39 o15 : Matrix S <--- S</pre> </td></tr> <tr><td><pre>i16 : selectInSubring(1,gens gb J) o16 = | 739412929760026489587300972025342941573944541459417029705594323415910 ----------------------------------------------------------------------- 1132800c27-411855407446221557734128747048632866529110478240091846586444 ----------------------------------------------------------------------- 22156518306944000c26d+8774023133267410734751057402152074136774027763791 ----------------------------------------------------------------------- 59260032052060564012984281600c25d2- ----------------------------------------------------------------------- 33251504605433573286890242546005434672753097081943041498586542996229008 ----------------------------------------------------------------------- 39509760c24d3+173339297061843998455902038429842063738816474775692735689 ----------------------------------------------------------------------- 78080470584857188430400c23d4- ----------------------------------------------------------------------- 86733106046835537707079947012151647240671189464973001906836110935364998 ----------------------------------------------------------------------- 152041600c22d5+24490191621809724100947748452140403918778202731520163180 ----------------------------------------------------------------------- 0744938236715766910498848c21d6- ----------------------------------------------------------------------- 36329970498504192792445164134482202337392862391956984783024009043858133 ----------------------------------------------------------------------- 2096293600c20d7+3029572571013681703166050581540361494530007898561746257 ----------------------------------------------------------------------- 88469757577307060636291140c19d8- ----------------------------------------------------------------------- 11434072053964259447211514708716377188869333656092516193167302151812018 ----------------------------------------------------------------------- 9544408560c18d9-8197006746314878454973566342512111569826323502510032528 ----------------------------------------------------------------------- 1953809190902983202987220c17d10+ ----------------------------------------------------------------------- 43246380044428650123442224803033852369309526392596207165235257428343421 ----------------------------------------------------------------------- 4321148320c16d11-333491965675567944341038248730586414098582448251158046 ----------------------------------------------------------------------- 977479229822449628288923300c15d12- ----------------------------------------------------------------------- 18694574464866135749052747829315777517599755951432292386047513140432008 ----------------------------------------------------------------------- 3806496400c14d13+704411051600002301637133770710968465691875754422668979 ----------------------------------------------------------------------- 477538695506714176279533100c13d14- ----------------------------------------------------------------------- 14301103932351205496440879867168012931180919117294888207223569807029941 ----------------------------------------------------------------------- 520924300c12d15-5959289606861327451299615807358116391406223619830355344 ----------------------------------------------------------------------- 11458469299453888522995375c11d16- ----------------------------------------------------------------------- 22550980563460786464498873304780254723425231521149989266259639001327229 ----------------------------------------------------------------------- 6542758500c10d17+346888622353995181486770568814942377652201478709574705 ----------------------------------------------------------------------- 523037585011833228114838375c9d18+ ----------------------------------------------------------------------- 84156733419059162977149439604509145606599041598581356639020759924902856 ----------------------------------------------------------------------- 102323000c8d19+96702302590542716326212036076558734371284446291397468375 ----------------------------------------------------------------------- 74474692267646091269000c7d20- ----------------------------------------------------------------------- 22240738603655626357644951083034610634684799359508153658568570060945436 ----------------------------------------------------------------------- 255744000c6d21-79044370109172847201880141843239409049913534274159059620 ----------------------------------------------------------------------- 03805645715968577017500c5d22- ----------------------------------------------------------------------- 33045688473634278086246398900047398158450856659251555753075592705374398 ----------------------------------------------------------------------- 728605000c4d23+33879926654728481096333597720518088753961518356718943374 ----------------------------------------------------------------------- 88144461118886422075000c3d24+ ----------------------------------------------------------------------- 10136825703529029705393067570283677651317433731648159850913396409289557 ----------------------------------------------------------------------- 510000000c2d25+26012052882612536122907272491336838464238960366976184856 ----------------------------------------------------------------------- 28822229299522432400000cd26- ----------------------------------------------------------------------- 23285136339746181069612076136005800393859844569510052764243876725840985 ----------------------------------------------------------------------- 30800000d27 | 1 1 o16 : Matrix S <--- S</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_select__In__Subring.html" title="select columns in a subring">selectInSubring</a> -- select columns in a subring</span></li> <li><span><a href="../../Elimination/html/index.html" title="eliminating specified variables, and Sylvester resultant">Elimination</a> -- eliminating specified variables, and Sylvester resultant</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>installHilbertFunction</tt> :</h2> <ul><li>installHilbertFunction(Ideal,RingElement)</li> <li>installHilbertFunction(Matrix,RingElement)</li> <li>installHilbertFunction(Module,RingElement)</li> </ul> </div> </div> </body> </html>