<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>Lex -- lexicographical monomial order.</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___G__Lex.html">next</a> | <a href="___G__Rev__Lex.html">previous</a> | <a href="___G__Lex.html">forward</a> | <a href="___G__Rev__Lex.html">backward</a> | <a href="_monomial_sporderings.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="_rings.html" title="">rings</a> > <a href="_monomial_sporderings.html" title="">monomial orderings</a> > <a href="___Lex.html" title="lexicographical monomial order.">Lex</a></div> <hr/> <div><h1>Lex -- lexicographical monomial order.</h1> <div class="single"><h2>Description</h2> <div>The lexicographic order is defined by: x<sup>A</sup> > x<sup>B</sup> if the FIRST non-zero entry of the vector of integers A-B is POSITIVE.<table class="examples"><tr><td><pre>i1 : R = QQ[a..d, MonomialOrder => Lex];</pre> </td></tr> <tr><td><pre>i2 : a^3 + a^2*b^2 + b*c 3 2 2 o2 = a + a b + b*c o2 : R</pre> </td></tr> </table> The largest possible exponent of variables in <tt>Lex</tt> order is 2^31-1. For efficiency reasons, the size of the exponents of variables may be restricted. Then instead of <tt>Lex</tt>, one can use <tt> MonomialSize=>16</tt>, which allows maximal exponent 2^15-1, or <tt>MonomialSize=>8</tt>, which allows maximal exponent 2^7-1.<table class="examples"><tr><td><pre>i3 : B = QQ[a..d,MonomialOrder=>Lex,MonomialSize=>16];</pre> </td></tr> <tr><td><pre>i4 : a^(2^15-1) 32767 o4 = a o4 : B</pre> </td></tr> <tr><td><pre>i5 : C = QQ[a..d,MonomialOrder=>Lex,MonomialSize=>8];</pre> </td></tr> <tr><td><pre>i6 : try a^(2^15-1) else "failed" o6 = failed</pre> </td></tr> <tr><td><pre>i7 : a^(2^7-1) 127 o7 = a o7 : C</pre> </td></tr> </table> Any of these versions of <tt>Lex</tt> order may be combined, for example, with a weight order given by a weight vector: x^A > x^B if weight(x^A) > weight(x^B) or if weight(x^A) = weight(x^B) and if the FIRST non-zero entry of the vector of integers A-B is POSITIVE.<table class="examples"><tr><td><pre>i8 : B = QQ[a..d,MonomialSize=>16,MonomialOrder=>{Weights => {1,2,3,4}, Lex}];</pre> </td></tr> <tr><td><pre>i9 : a^2 + b+ c + b*d 2 o9 = b*d + c + a + b o9 : B</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="___Weights.html" title="assigning weights to the variables">Weights</a> -- assigning weights to the variables</span></li> </ul> </div> <div class="waystouse"><h2>For the programmer</h2> <p>The object <a href="___Lex.html" title="lexicographical monomial order.">Lex</a> is <span>a <a href="___Symbol.html">symbol</a></span>.</p> </div> </div> </body> </html>