Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 4462

Macaulay2-1.3.1-8.fc15.i686.rpm

<?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>graded and multigraded polynomial rings</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_quotient_springs.html">next</a> | <a href="_obtaining_spthe_spmonomial_sporder_spof_spa_spring.html">previous</a> | <a href="_quotient_springs.html">forward</a> | <a href="_monomial_sporderings.html">backward</a> | <a href="_rings.html">up</a> | <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>
<div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_rings.html" title="">rings</a> > <a href="_graded_spand_spmultigraded_sppolynomial_springs.html" title="">graded and multigraded polynomial rings</a></div>
<hr/>
<div><h1>graded and multigraded polynomial rings</h1>
<div>It is possible to set up a polynomial ring so that the degree of an element is a vector of integers.  For this, the option <a href="___Degrees.html" title="name for an optional argument">Degrees</a> is used, together with a list of degrees for the variables in the ring.  Each degree is itself a list of integers.  The degrees given must all be of the same length, and length zero is allowed, to get an ungraded ring.<table class="examples"><tr><td><pre>i1 : R = ZZ/101[a,b,c,Degrees=>{{1,2},{2,1},{1,0}}]

o1 = R

o1 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i2 : describe R

      ZZ
o2 = ---[a..c, Degrees => {{1}, {2}, {1}}, Heft => {1, 0}, MonomialOrder => {MonomialSize => 32  }, DegreeRank => 2]
     101                   {2}  {1}  {0}                                    {GRevLex => {1..2, 1}}
                                                                            {Position => Up      }</pre>
</td></tr>
</table>
<table class="examples"><tr><td><pre>i3 : degree a

o3 = {1, 2}

o3 : List</pre>
</td></tr>
<tr><td><pre>i4 : degree b^2

o4 = {4, 2}

o4 : List</pre>
</td></tr>
<tr><td><pre>i5 : degree 0_R

o5 = -infinity

o5 : InfiniteNumber</pre>
</td></tr>
<tr><td><pre>i6 : degree 1_R

o6 = {0, 0}

o6 : List</pre>
</td></tr>
</table>
A random element of bi-degree <tt>{m,n}</tt> can be obtained with <a href="_random.html" title="get a random element">random</a>.<table class="examples"><tr><td><pre>i7 : random({15,15},R)

          5 5      6 3 3      7   6
o7 = - 40a b  - 34a b c  + 19a b*c

o7 : R</pre>
</td></tr>
</table>
The function <a href="_degree.html" title="">degree</a> applied to a polynomial will return the least upper bound of the degrees of its monomials.<table class="examples"><tr><td><pre>i8 : degree (a+b)

o8 = {2, 2}

o8 : List</pre>
</td></tr>
</table>
We may recover the number of integers in each degree list for our ring as follows.<table class="examples"><tr><td><pre>i9 : degreeLength R

o9 = 2</pre>
</td></tr>
<tr><td><pre>i10 : degreeLength ZZ

o10 = 0</pre>
</td></tr>
</table>
One restriction on degrees of variables is that the entries be small integer values, possibly zero or negative.  The notion of small depends on the size of exponents one wants: the degree of each monomial occurring should fit in a 32 bit integer (or 64 bit integer, on 64 bit machines).<p>Another restriction on degrees, at least if all the computational facilities of Macaulay2 are needed, is that a heft vector exists for them.  A heft vector is a list of integers whose length is the same as the length of the degrees (see <a href="_degree__Length.html" title="the number of degrees">degreeLength</a>), such that its dot product with the degree of each variable is positive.  Heft vectors are computed automatically for you, as in the following example, or they may be provided by the user (see <a href="___Heft.html" title="name for an optional argument">Heft</a>).</p>
<table class="examples"><tr><td><pre>i11 : R = QQ[a,b,c,Degrees=>{{1,0},{-2,1},{-3,1}}];</pre>
</td></tr>
<tr><td><pre>i12 : random({1,1},R)

      4 3    1 4
o12 = -a b + -a c
      5      7

o12 : R</pre>
</td></tr>
<tr><td><pre>i13 : basis({1,1},R)

o13 = | a4c a3b |

              1       2
o13 : Matrix R  &lt;--- R</pre>
</td></tr>
</table>
<p>The heft vector computed behind the scenes is available to the user.</p>
<table class="examples"><tr><td><pre>i14 : (options R).Heft

o14 = {1, 4}

o14 : List</pre>
</td></tr>
</table>
<p>If the heft vector is not provided, many computations will work (e.g., Gröbner bases and computation of resolutions), but certain other operations (such as <tt>basis</tt> and <tt>random</tt>) will raise errors.</p>
</div>
</div>
</body>
</html>