Ask Your Question

Revision history [back]

Implement Weight Orders

I am having trouble implementing weight orders in SageMath. Suppose we are given the polynomial ring $K[x, y, z]$, and weight vectors $w_1 = (1, 2, 3), w_2 = (4, 5, 6)$. For exponent vectors $a, b$, I would like to implement a term order that decides $a > b$ according to:

  • $w_1 a > w_1 b$
  • $w_1 a = w_1 b$ and $w_2 a > w_2 b$
  • $w_1 a = w_1 b$ and $w_2 a = w_2 b$ and $a >_{LEX} b$, i.e. in case of two ties $>$ defaults to the standard lexicographic term order.

How can I implement such a term order in SageMath?