I cannot help with the general issue other than to suggest that you use a weight matrix rather than an explicit Lexicographic
order.
Here are some computations to show where the values I claimed arise.
In[412]:= wmat = {{1, 1}, {1, 0}};
evectors =
GroebnerBasis`DistributedTermsList[x^2 y^2 + x^3, {x, y}][[1, All, 1]]
(* Out[413]= {{3, 0}, {2, 2}} *)
Obviously I do not expect people to know about that DistributedTermsList
function, I'm just using it to show that the exponent vectors I claimed can be made to appear.
Now to get the weighted exponents, we dot the weight matrix with the exponent vectors.
In[414]:= Map[wmat . # &, evectors]
(* Out[414]= {{3, 3}, {4, 2}} *)
Okay, so how does this get used? The ordering function is lexicographically based, not on the exponent vectors, but on these new (weighted) vectors. Proceed left to right to compare any pair of vectors. In this case 3<4, so the comparison ends and the vector {4,2}
is declared lexicographically the larger. Hence the corresponding exponent vector, {2,2}
, is the larger with respect to this particular term order.
By the way, one controls the ordering between variables simply by specifying it. If you use {x,y}
as your variable list, then x>y
. If you use {y,x}
then y>x
.
I hope this helps a bit.