next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: terms

terms -- provide a list of terms of a polynomial

Description

Synopsis

  • Usage:
    terms f
  • Inputs:
    • f, a ring element, in a polynomial ring R with coefficient ring A
  • Outputs:
    • the list of terms of f
Each term is an element of the coefficient ring A, multiplied with a monomial in the variables of R.
i1 : R = QQ[a..d];
i2 : terms(a+d^2-1+a*b*c)

              2
o2 = {a*b*c, d , a, -1}

o2 : List
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.
i3 : S = R[x,y];
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

Synopsis

  • Usage:
    terms(k,f)
  • Inputs:
  • Outputs:
    • the list of terms of f with k regarded as the coefficient ring

Each term is an element of the coefficient ring k, multiplied with a monomial in the variables of R. This is useful in the situation where the polynomial R is built from k by a sequence of extensions.

i5 : R = QQ[a][d];
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
i7 : terms f

       3           2     2              3     2
o7 = {d , (3a + 3)d , (3a  + 6a + 3)d, a  + 3a  + 3a + 1}

o7 : List
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

See also

Ways to use terms :