Macaulay2 » Documentation
Packages » TriangularSets :: mvar
next | previous | forward | backward | up | index | toc

mvar -- main variable of a polynomial

Synopsis

Description

Returns the main variable of a polynomial $f$, i.e., the largest variable that appears in $f$.

i1 : R = QQ[x_0..x_3, MonomialOrder=>Lex];
i2 : f = x_1^2*(x_2*x_3+2*x_3) + x_1*(x_2^2-1) + (x_2-x_3)

      2         2        2
o2 = x x x  + 2x x  + x x  - x  + x  - x
      1 2 3     1 3    1 2    1    2    3

o2 : R
i3 : mvar f

o3 = x
      1

o3 : R

      

See also

Ways to use mvar:

For the programmer

The object mvar is a method function.