I am stuck in my code. I have a multivariate polynomial and I am trying to define an order on the variables such that I can write my polynomials in a desired normal form. I tried with the Groebner package but that's quite different from what I want.
I want to define the order on the variables as u[i]=v[i] and u[i]<u[i+1].
Lets say my polynomial is f then,
input f= u^2+u+v
output f = v+u+u^2.
If there is a clash between u and v then, either of them can come first, for example,
input f= u^2+u+v+u^2
output f=v+u^2+u+u^2 or f=u^2+v+u+u^2
I hope my question is clear. Thank you for helping me out. Your time is much appreciated :)