Sophie

Sophie

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

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>support -- list of variables occurring in a polynomial or matrix</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_support_lp__Ideal_rp.html">next</a> | <a href="_superscript.html">previous</a> | <a href="_support_lp__Ideal_rp.html">forward</a> | <a href="_superscript.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>support -- list of variables occurring in a polynomial or matrix</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>support f</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Ring__Element.html">ring element</a></span>, or <span>a <a href="___Matrix.html">matrix</a></span>over a polynomial ring</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___List.html">list</a></span>, of <a href="___Ring__Element.html">ring elements</a>, the variables occurring in <tt>f</tt></span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><table class="examples"><tr><td><pre>i1 : R = QQ[a..g]

o1 = R

o1 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i2 : f = a^3+b^2*c+3*f^10*d-1+e-e

         10    3    2
o2 = 3d*f   + a  + b c - 1

o2 : R</pre>
</td></tr>
<tr><td><pre>i3 : support f

o3 = {a, b, c, d, f}

o3 : List</pre>
</td></tr>
</table>
<table class="examples"><tr><td><pre>i4 : M = matrix"a+b2,c+g2;c,a-1"

o4 = | b2+a g2+c |
     | c    a-1  |

             2       2
o4 : Matrix R  &lt;--- R</pre>
</td></tr>
<tr><td><pre>i5 : support M

o5 = {a, b, c, g}

o5 : List</pre>
</td></tr>
</table>
If the ring is a polynomial ring over another polynomial ring, then the support contains all of the variables, even the ones in the coefficient ring.  The  ring of each of these is the ring of f.<table class="examples"><tr><td><pre>i6 : A = ZZ[a,b]; B = A[r,s,t]; C = B[x,y,z,w];</pre>
</td></tr>
<tr><td><pre>i9 : f = (a+r+z+1)^2+y

      2                         2                2
o9 = z  + y + (2r + 2a + 2)z + r  + (2a + 2)r + a  + 2a + 1

o9 : C</pre>
</td></tr>
<tr><td><pre>i10 : S = support f

o10 = {y, z, r, a}

o10 : List</pre>
</td></tr>
<tr><td><pre>i11 : ring S_2 === ring f

o11 = true</pre>
</td></tr>
</table>
Here is one way to select only the top level variables.<table class="examples"><tr><td><pre>i12 : select(S, x -> index x &lt; numgens C)

o12 = {y, z}

o12 : List</pre>
</td></tr>
</table>
To obtain a list of the integer indices of the variables one can use either <a href="_indices_lp__Ring__Element_rp.html" title="indices of variables occurring in a polynomial">indices(RingElement)</a> or apply <a href="_index.html" title="numeric index of a ring variable">index</a> to each variable.<table class="examples"><tr><td><pre>i13 : indices f

o13 = {1, 2, 4, 7}

o13 : List</pre>
</td></tr>
<tr><td><pre>i14 : apply(support f, index)

o14 = {1, 2, 4, 7}

o14 : List</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_index.html" title="numeric index of a ring variable">index</a> -- numeric index of a ring variable</span></li>
<li><span><a href="_indices_lp__Ring__Element_rp.html" title="indices of variables occurring in a polynomial">indices(RingElement)</a> -- indices of variables occurring in a polynomial</span></li>
<li><span><a href="_indices_lp__Ring__Element_rp.html" title="indices of variables occurring in a polynomial">indices(Matrix)</a> -- indices of variables occurring in a polynomial</span></li>
<li><span><a href="___Ring_sp_us_sp__Z__Z.html" title="get a ring variable by index">Ring _ ZZ</a> -- get a ring variable by index</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>support</tt> :</h2>
<ul><li>support(Matrix)</li>
<li>support(RingElement)</li>
<li><span><a href="_support_lp__Ideal_rp.html" title="list of variables occurring in the generators of an ideal">support(Ideal)</a> -- list of variables occurring in the generators of an ideal</span></li>
</ul>
</div>
</div>
</body>
</html>