<?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>terms -- provide a list of terms of a polynomial</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_tex.html">next</a> | <a href="_tensor__Associativity.html">previous</a> | <a href="_tex.html">forward</a> | <a href="_tensor__Associativity.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>terms -- provide a list of terms of a polynomial</h1> <div class="single"><h2>Description</h2> <div><div><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>terms f</tt></div> </dd></dl> </div> </li> <li>Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Ring__Element.html">ring element</a></span>, in a polynomial ring <tt>R</tt> with coefficient ring <tt>A</tt></span></li> </ul> </li> <li>Outputs:<ul><li><span>the list of terms of <tt>f</tt></span></li> </ul> </li> </ul> Each term is an element of the coefficient ring <tt>A</tt>, multiplied with a monomial in the variables of <tt>R</tt>.<table class="examples"><tr><td><pre>i1 : R = QQ[a..d];</pre> </td></tr> <tr><td><pre>i2 : terms(a+d^2-1+a*b*c) 2 o2 = {a*b*c, d , a, -1} o2 : List</pre> </td></tr> </table> In the situtation where the ring is a polynomial ring over another polynomial ring, the polynomial is split using the monomials of the outer ring.<table class="examples"><tr><td><pre>i3 : S = R[x,y];</pre> </td></tr> <tr><td><pre>i4 : terms(a*x+b*x+c*x*y+c*x^3+1+a) 3 o4 = {c*x , c*x*y, (a + b)x, a + 1} o4 : List</pre> </td></tr> </table> </div> <div><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>terms(k,f)</tt></div> </dd></dl> </div> </li> <li>Inputs:<ul><li><span><tt>k</tt>, <span>a <a href="___Ring.html">ring</a></span></span></li> <li><span><tt>f</tt>, <span>a <a href="___Ring__Element.html">ring element</a></span>, in a polynomial ring <tt>R</tt></span></li> </ul> </li> <li>Outputs:<ul><li><span>the list of terms of <tt>f</tt> with <tt>k</tt> regarded as the coefficient ring</span></li> </ul> </li> </ul> <p>Each term is an element of the coefficient ring <tt>k</tt>, multiplied with a monomial in the variables of <tt>R</tt>. This is useful in the situation where the polynomial <tt>R</tt> is built from <tt>k</tt> by a sequence of extensions.</p> <table class="examples"><tr><td><pre>i5 : R = QQ[a][d];</pre> </td></tr> <tr><td><pre>i6 : f = (1+a+d)^3 3 2 2 3 2 o6 = d + (3a + 3)d + (3a + 6a + 3)d + a + 3a + 3a + 1 o6 : R</pre> </td></tr> <tr><td><pre>i7 : terms f 3 2 2 3 2 o7 = {d , (3a + 3)d , (3a + 6a + 3)d, a + 3a + 3a + 1} o7 : List</pre> </td></tr> <tr><td><pre>i8 : terms(QQ,f) 3 2 2 2 3 2 o8 = {d , 3a*d , 3d , 3a d, 6a*d, 3d, a , 3a , 3a, 1} o8 : List</pre> </td></tr> </table> </div> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_coefficients.html" title="monomials and their coefficients">coefficients</a> -- monomials and their coefficients</span></li> <li><span><a href="_monomials.html" title="matrix of monomials in a ring element or matrix">monomials</a> -- matrix of monomials in a ring element or matrix</span></li> <li><span><a href="_some__Terms.html" title="select some terms of a polynomial">someTerms</a> -- select some terms of a polynomial</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>terms</tt> :</h2> <ul><li>terms(Ring,RingElement)</li> <li>terms(RingElement)</li> </ul> </div> </div> </body> </html>