Sophie

Sophie

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

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>part(ZZ,ZZ,VisibleList,RingElement) -- select terms of a polynomial by degree or weight</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="___Partition.html">next</a> | <a href="_part_lp__List_cm__Ring__Element_rp.html">previous</a> | <a href="___Partition.html">forward</a> | <a href="_part_lp__List_cm__Ring__Element_rp.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>part(ZZ,ZZ,VisibleList,RingElement) -- select terms of a polynomial by degree or weight</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>part(lo,hi,wt,f)</tt></div>
</dd></dl>
</div>
</li>
<li><span>Function: <a href="_part.html" title="select terms of a polynomial by degree or weight">part</a></span></li>
<li><div class="single">Inputs:<ul><li><span><tt>lo</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li>
<li><span><tt>hi</tt>, <span>an <a href="___Z__Z.html">integer</a></span></span></li>
<li><span><tt>wt</tt>, <span>a <a href="___Visible__List.html">visible list</a></span>, whose elements are integers (after splicing)</span></li>
<li><span><tt>f</tt>, <span>a <a href="___Ring__Element.html">ring element</a></span></span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Ring__Element.html">ring element</a></span>, the sum of those terms of <tt>f</tt> whose weights, with respect to <tt>wt</tt>, are in the range <tt>lo..hi</tt></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><table class="examples"><tr><td><pre>i1 : R = QQ[x,y,z,Degrees=>{3,2,1}];</pre>
</td></tr>
<tr><td><pre>i2 : f = (1+x+y+z)^3

      3     2        2     2      2    3                     2        2     2
o2 = x  + 3x y + 3x*y  + 3x z + 3x  + y  + 6x*y*z + 6x*y + 3y z + 3x*z  + 3y 
     ------------------------------------------------------------------------
                  2                3          2
     + 6x*z + 3y*z  + 3x + 6y*z + z  + 3y + 3z  + 3z + 1

o2 : R</pre>
</td></tr>
<tr><td><pre>i3 : part(0,1,3:1,f)

o3 = 3x + 3y + 3z + 1

o3 : R</pre>
</td></tr>
<tr><td><pre>i4 : part(0,1,1..3,f)

o4 = 3x + 1

o4 : R</pre>
</td></tr>
<tr><td><pre>i5 : part(7,9,1..3,f)

       2        2       2    3
o5 = 3y z + 3x*z  + 3y*z  + z

o5 : R</pre>
</td></tr>
</table>
<p>If <tt>wt</tt> is omitted, and the ring is singly graded, then the degrees of the variables are used as the weights.</p>
<table class="examples"><tr><td><pre>i6 : gens R

o6 = {x, y, z}

o6 : List</pre>
</td></tr>
<tr><td><pre>i7 : degree \ oo

o7 = {{3}, {2}, {1}}

o7 : List</pre>
</td></tr>
<tr><td><pre>i8 : part(7,9,f)

      3     2        2     2
o8 = x  + 3x y + 3x*y  + 3x z

o8 : R</pre>
</td></tr>
</table>
<p>If <tt>lo</tt> or <tt>hi</tt> is omitted, but not the corresponding comma, then there is no corresponding bound on the weights of the terms provided.</p>
<table class="examples"><tr><td><pre>i9 : part(7,,f)

      3     2        2     2
o9 = x  + 3x y + 3x*y  + 3x z

o9 : R</pre>
</td></tr>
<tr><td><pre>i10 : part(,3,f)

                   3          2
o10 = 3x + 6y*z + z  + 3y + 3z  + 3z + 1

o10 : R</pre>
</td></tr>
<tr><td><pre>i11 : part(,3,1..3,f)

       3     2
o11 = x  + 3x  + 6x*y + 3x + 3y + 3z + 1

o11 : R</pre>
</td></tr>
</table>
<p>The bounds may be infinite.</p>
<table class="examples"><tr><td><pre>i12 : part(7,infinity,f)

       3     2        2     2
o12 = x  + 3x y + 3x*y  + 3x z

o12 : R</pre>
</td></tr>
<tr><td><pre>i13 : part(-infinity,3,f)

                   3          2
o13 = 3x + 6y*z + z  + 3y + 3z  + 3z + 1

o13 : R</pre>
</td></tr>
<tr><td><pre>i14 : part(-infinity,infinity,1..3,f)

       3     2        2     2      2    3                     2        2  
o14 = x  + 3x y + 3x*y  + 3x z + 3x  + y  + 6x*y*z + 6x*y + 3y z + 3x*z  +
      -----------------------------------------------------------------------
        2              2                3          2
      3y  + 6x*z + 3y*z  + 3x + 6y*z + z  + 3y + 3z  + 3z + 1

o14 : R</pre>
</td></tr>
</table>
<p>If just one limit is provided, terms whose weight are equal to it are provided.</p>
<table class="examples"><tr><td><pre>i15 : part(7,f)

          2     2
o15 = 3x*y  + 3x z

o15 : R</pre>
</td></tr>
<tr><td><pre>i16 : part(7,1..3,f)

        2        2
o16 = 3y z + 3x*z

o16 : R</pre>
</td></tr>
</table>
<p>For polynomial rings over polynomial rings, all of the variables participate.</p>
<table class="examples"><tr><td><pre>i17 : S = QQ[a][x];</pre>
</td></tr>
<tr><td><pre>i18 : g = (1+a+x)^3

       3            2      2               3     2
o18 = x  + (3a + 3)x  + (3a  + 6a + 3)x + a  + 3a  + 3a + 1

o18 : S</pre>
</td></tr>
<tr><td><pre>i19 : part(2,{1,1},g)

        2            2
o19 = 3x  + 6a*x + 3a

o19 : S</pre>
</td></tr>
<tr><td><pre>i20 : part(2,{1,0},g)

               2
o20 = (3a + 3)x

o20 : S</pre>
</td></tr>
<tr><td><pre>i21 : part(2,,{0,1},g)

        2     3     2
o21 = 3a x + a  + 3a

o21 : S</pre>
</td></tr>
</table>
</div>
</div>
</div>
</body>
</html>