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 nonzero entry of the vector of integers
AB 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^311. 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^151, or
MonomialSize => 8, which allows maximal exponent 2^71.
i5 : B1 = QQ[a..d,MonomialSize=>16,MonomialOrder=>GRevLex];

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

i7 : a^(2^151)
32767
o7 = a
o7 : B

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

i9 : try a^(2^151) else "failed"
o9 = failed

i10 : a^(2^71)
127
o10 = a
o10 : C
