<?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>monomial orders for free modules</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Schreyer_sporders.html">next</a> | <a href="_examples_spof_spspecifying_spalternate_spmonomial_sporders.html">previous</a> | <a href="_packing_spmonomials_spfor_spefficiency.html">forward</a> | <a href="_examples_spof_spspecifying_spalternate_spmonomial_sporders.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="_monomial_sporders_spfor_spfree_spmodules.html" title="">monomial orders for free modules</a></div> <hr/> <div><h1>monomial orders for free modules</h1> <div>In Macaulay2, each free module <i>F = R<sup>s</sup></i> over a ring <i>R</i> has a basis of unit column vectors <i>F<sub>0</sub>, F<sub>1</sub>, ..., F<sub>(</sub>s-1)</i>. The monomials of <i>F</i> are the elements <i>m F<sub>i</sub></i>, where <i>m</i> is a monomial of the ring <i>R</i>. In Macaulay2, orders on the monomials of <i>F</i> are used for computing Gröbner bases and syzygies, and also to determine the initial, or lead term of elements of <i>F</i>.<p/> The ring <i>R</i> comes equipped with a total order on the monomials of <i>R</i>. A total order on the monomials of <i>F</i> is called <b>compatible</b> (with the order on <i>R</i>), if <i>m F<sub>i</sub> > n F<sub>i</sub></i> (in <i>F</i>) whenever <i>m > n</i> (in <i>R</i>). There are many types of compatible orders, but several stand out: term over position up (the default in Macaulay2), term over position down, position up over term, position down over term, and Schreyer orders.<p/> term over position up: <i>m F<sub>i</sub> > n F<sub>j</sub></i> iff <i>m>n</i> or <i>m==n</i> and <i>i>j</i><p/> term over position down: <i>m F<sub>i</sub> > n F<sub>j</sub></i> iff <i>m>n</i> or <i>m==n</i> and <i>i<j</i><p/> position up over term: <i>m F<sub>i</sub> > n F<sub>j</sub></i> iff <i>i>j</i> or <i>i==j</i> and <i>m>n</i><p/> position down over term: <i>m F<sub>i</sub> > n F<sub>j</sub></i> iff <i>i<j</i> or <i>i==j</i> and <i>m>n</i><p/> Induced monomial orders are another class of important orders on <tt>F</tt>, see <a href="___Schreyer_sporders.html" title="induced monomial order on a free module">Schreyer orders</a> for their definition and use in Macaulay2.<p/> In Macaulay2, free modules come equipped with a compatible order. The default order is: term over position up. This is called Position=>Up. In the following example, the lead term is <i>a F<sub>1</sub></i>, since <i>a > b</i>.<table class="examples"><tr><td><pre>i1 : R = ZZ[a..d];</pre> </td></tr> <tr><td><pre>i2 : F = R^3 3 o2 = R o2 : R-module, free</pre> </td></tr> <tr><td><pre>i3 : f = b*F_0 + a*F_1 o3 = | b | | a | | 0 | 3 o3 : R</pre> </td></tr> <tr><td><pre>i4 : leadTerm f o4 = | 0 | | a | | 0 | 3 o4 : R</pre> </td></tr> </table> This is the same as giving the monomial order as:<table class="examples"><tr><td><pre>i5 : R = ZZ[a..d, MonomialOrder => {GRevLex => 4, Position => Up}];</pre> </td></tr> <tr><td><pre>i6 : F = R^3 3 o6 = R o6 : R-module, free</pre> </td></tr> <tr><td><pre>i7 : leadTerm(a*F_0 + a*F_1) o7 = | 0 | | a | | 0 | 3 o7 : R</pre> </td></tr> </table> Giving Position=>Down instead switches the test above to i < j. In this case the monomial order on F is: m*F_i > n*F_j if m>n or m==n and i<j.<table class="examples"><tr><td><pre>i8 : R = ZZ[a..d, MonomialOrder => {GRevLex => 4, Position => Down}];</pre> </td></tr> <tr><td><pre>i9 : F = R^3 3 o9 = R o9 : R-module, free</pre> </td></tr> <tr><td><pre>i10 : leadTerm(a*F_0 + a*F_1) o10 = | a | | 0 | | 0 | 3 o10 : R</pre> </td></tr> </table> If one gives Position=>Up or Position=>Down earlier, then the position will be taken into account earlier. For example<table class="examples"><tr><td><pre>i11 : R = ZZ[a..d, MonomialOrder => {GRevLex => 2, Position => Down, GRevLex => 2}];</pre> </td></tr> <tr><td><pre>i12 : F = R^3 3 o12 = R o12 : R-module, free</pre> </td></tr> <tr><td><pre>i13 : leadTerm(a*F_0 + a*F_1) o13 = | a | | 0 | | 0 | 3 o13 : R</pre> </td></tr> <tr><td><pre>i14 : leadTerm(b*F_0 + c^4*F_1) o14 = | b | | 0 | | 0 | 3 o14 : R</pre> </td></tr> <tr><td><pre>i15 : leadTerm(c*F_0 + d^2*F_1) o15 = | c | | 0 | | 0 | 3 o15 : R</pre> </td></tr> </table> If one wants Position over Term (POT), place the Position element first<table class="examples"><tr><td><pre>i16 : R = ZZ[a..d, MonomialOrder => {Position => Down}];</pre> </td></tr> <tr><td><pre>i17 : F = R^3 3 o17 = R o17 : R-module, free</pre> </td></tr> <tr><td><pre>i18 : leadTerm(a*F_0 + a*F_1) o18 = | a | | 0 | | 0 | 3 o18 : R</pre> </td></tr> <tr><td><pre>i19 : leadTerm(b*F_0 + c^4*F_1) o19 = | b | | 0 | | 0 | 3 o19 : R</pre> </td></tr> <tr><td><pre>i20 : leadTerm(c*F_0 + d^2*F_1) o20 = | c | | 0 | | 0 | 3 o20 : R</pre> </td></tr> </table> </div> <div><h3>Menu</h3> <ul><li><span><a href="___Schreyer_sporders.html" title="induced monomial order on a free module">Schreyer orders</a> -- induced monomial order on a free module</span></li> </ul> </div> </div> </body> </html>