<?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>Singular Book 1.6.13 -- normal form</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Singular_sp__Book_sp1.7.10.html">next</a> | <a href="___Singular_sp__Book_sp1.5.10.html">previous</a> | <a href="___Singular_sp__Book_sp1.7.10.html">forward</a> | <a href="___Singular_sp__Book_sp1.5.10.html">backward</a> | <a href="___M2__Singular__Book.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="_basic_spcommutative_spalgebra.html" title="">basic commutative algebra</a> > <a href="___M2__Singular__Book.html" title="Macaulay2 examples for the Singular book">M2SingularBook</a> > <a href="___Singular_sp__Book_sp1.6.13.html" title="normal form">Singular Book 1.6.13</a></div> <hr/> <div><h1>Singular Book 1.6.13 -- normal form</h1> <div>Normal forms in Macaulay2 are done using the remainder operator <a href="__pc.html" title="a binary operator, usually used for remainder and reduction">%</a>.<table class="examples"><tr><td><pre>i1 : R = QQ[x,y,z];</pre> </td></tr> <tr><td><pre>i2 : f = x^2*y*z+x*y^2*z+y^2*z+z^3+x*y;</pre> </td></tr> <tr><td><pre>i3 : f1 = x*y+y^2-1 2 o3 = x*y + y - 1 o3 : R</pre> </td></tr> <tr><td><pre>i4 : f2 = x*y o4 = x*y o4 : R</pre> </td></tr> <tr><td><pre>i5 : G = ideal(f1,f2) 2 o5 = ideal (x*y + y - 1, x*y) o5 : Ideal of R</pre> </td></tr> </table> Macaulay2 computes a Groebner basis of G, and uses that to find the normal form of f. In Macaulay2, all remainders are reduced normal forms (at least for non-local orders).<table class="examples"><tr><td><pre>i6 : f % G 3 o6 = z + z o6 : R</pre> </td></tr> </table> <p/> In order to reduce using a non Groebner basis, use <a href="_force__G__B.html" title="declare that the columns of a matrix are a Gröbner basis">forceGB</a><table class="examples"><tr><td><pre>i7 : f % (forceGB gens G) 2 3 2 o7 = y z + z - y + x*z + 1 o7 : R</pre> </td></tr> </table> This is a different answer from the SINGULAR book, since the choice of divisor affects the answer.<table class="examples"><tr><td><pre>i8 : f % (forceGB matrix{{f2,f1}}) 2 3 o8 = y z + z o8 : R</pre> </td></tr> </table> </div> </div> </body> </html>