next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > rings > monomial orderings > GRevLex

GRevLex -- graded reverse lexicographical monomial order.

Description

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

This is the default order in Macaulay 2, in large part because it is often the most efficient order for use with Groebner bases. By giving GRevLex a list of integers, one may change the definition of the order: degree(xA) 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"

      255
o9 = a

o9 : C
i10 : a^(2^7-1)

       127
o10 = a

o10 : C

See also

For the programmer

The object GRevLex is a symbol.