Macaulay2 » Documentation
Packages » Macaulay2Doc » rings » polynomial rings » monomial orderings » GRevLex
next | previous | forward | backward | up | index | toc

# GRevLex -- graded reverse lexicographical monomial ordering

## Description

The graded reverse lexicographic order is defined by: $x^A > x^B$ if either $degree(x^A) > degree(x^B)$ or $degree(x^A) = degree(x^B)$ and the LAST non-zero entry of the vector of integers $A-B$ is NEGATIVE.

This is the default order in Macaulay2, in large part because it is often the most efficient order for use with Gröbner bases. By giving GRevLex a list of integers, one may change the definition of the order: $degree(x^A)$ is the dot product of $A$ with the argument of GRevLex.

    i1 : R = QQ[a..d];

    i2 : a^3 + b^2 + b*c

          3    2
    o2 = a  + b  + b*c

    o2 : R

    i3 : S = QQ[a..d, MonomialOrder => GRevLex => {1,2,3,4}];

    i4 : a^3 + b^2 + b*c

                2    3
    o4 = b*c + b  + a

    o4 : S

The largest possible exponent of variables in the GRevLex order is 2^31-1. For efficiency reasons, it is sometimes useful to limit the size of monomials (this often makes computations more efficient).Use MonomialSize => 16, which allows maximal exponent 2^15-1, or MonomialSize => 8, which allows maximal exponent 2^7-1.

    i5 : B1 = QQ[a..d,MonomialSize=>16,MonomialOrder=>GRevLex];

    i6 : B = QQ[a..d,MonomialSize=>16];

    i7 : a^(2^15-1)

          32767
    o7 = a

    o7 : B

    i8 : C = QQ[a..d,MonomialSize=>8,MonomialOrder=>GRevLex];

    i9 : try a^(2^15-1) else "failed"

    o9 = failed

    i10 : a^(2^7-1)

           127
    o10 = a

    o10 : C

## See also

- packing monomials for efficiency

## For the programmer

The object GRevLex is a symbol.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_monomial_orderings.m2:419:0.