next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: indices(RingElement)

indices(RingElement) -- indices of variables occurring in a polynomial

Synopsis

Description

The first variable in a polynomial ring has index 0, the second has index 1, etc. This function returns a list (in ascending order) of the indices of all of the variables that occur in f.
i1 : R = QQ[a..g]

o1 = R

o1 : PolynomialRing
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
i3 : indices F

o3 = {0, 1, 2, 3, 5}

o3 : List
i4 : index a

o4 = 0
i5 : support F

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

o5 : List
The same works for matrices.
i6 : M = matrix"a+b,c+e;2a-e,3b-c4"

o6 = | a+b  c+e    |
     | 2a-e -c4+3b |

             2       2
o6 : Matrix R  <--- R
i7 : indices M

o7 = {0, 1, 2, 4}

o7 : List
i8 : support M

o8 = {a, b, c, e}

o8 : List
This use of indices has no relationship with the use for specifying parts of a direct sum

See also