up previous next
 2.9.5 Term Orderings
Polynomials are always sorted with respect to the ordering of their base ring; this ordering is specified when the ring is created. All operations involving polynomials utilize and preserve this ordering. There are mnemonic keywords for some predefined term-orderings; otherwise a custom ordering defined by an "ordering matrix" can be specified when using the function NewPolyRing .

The predefined term-orderings are:

* standard-degree reverse lexicographic: DegRevLex (default)

* standard-degree lexicographic: DegLex

* pure lexicographic: Lex (no grading)

* pure xel: Xel (NOT YET IMPLEMENTED)

If the indeterminates are given in the order x_1, ...,x_n , then x_1 > ... > x_n with respect to Lex, and x_1 < ... < x_n with respect to Xel.

 Example
 ```-- Specify the ordering when you create the ring: /**/ P ::= QQ[x,y,z]; --> default is DegRevLex /**/ P ::= QQ[x,y,z], DegRevLex; --> same as above /**/ P ::= QQ[x,y,z], lex; /**/ P ::= QQ[x,y,z], DegLex; ```