<?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>flattenRing -- write a ring as a (quotient) of a polynomial ring over ZZ or a prime field</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_flip_lp__Module_cm__Module_rp.html">next</a> | <a href="_flatten_lp__Matrix_rp.html">previous</a> | <a href="_flip_lp__Module_cm__Module_rp.html">forward</a> | <a href="_flatten_lp__Matrix_rp.html">backward</a> | up | <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> <hr/> <div><h1>flattenRing -- write a ring as a (quotient) of a polynomial ring over ZZ or a prime field</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>(S,F) = flattenRing R</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>R</tt>, <span>a <a href="___Ring.html">ring</a></span> or <span>an <a href="___Ideal.html">ideal</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>S</tt>, <span>a <a href="___Ring.html">ring</a></span> or <span>an <a href="___Ideal.html">ideal</a></span>a ring isomorphic to the original ring, flattened in the sense that it is a quotient ring of a polyonial ring over the bottom-most coefficient ring; or in case an ideal was provided, the corresponding ideal</span></li> <li><span><tt>F</tt>, <span>a <a href="___Ring__Map.html">ring map</a></span>, the isomorphism from <tt>R</tt> to <tt>S</tt></span></li> </ul> </div> </li> <li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><tt>CoefficientRing => </tt><span><span>a <a href="___Ring.html">ring</a></span>, <span>default value null</span>, the desired coefficient ring for the result</span></span></li> <li><span><tt>Result => </tt><span><span>default value (Thing,RingMap)</span>, the number or type(s) of result(s) desired. Three possible results are available: an ideal (<a href="___Ideal.html" title="the class of all ideals">Ideal</a>) or the corresponding quotient ring (<a href="___Ring.html" title="the class of all rings">Ring</a>), the isomorphism from <tt>R</tt> to the flattened ring (<a href="___Ring__Map.html" title="the class of all ring maps">RingMap</a>), and the inverse isomorphism (<a href="___Ring__Map.html" title="the class of all ring maps">RingMap</a>). Asking for a result of type <a href="___Nothing.html" title="the empty class">Nothing</a> will yield <a href="_null.html" title="the unique member of the empty class">null</a> in the corresponding position. Omitting the result type but leaving its comma will yield the default.</span></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><p>If the optional argument is not given, then the coefficient ring of the result is either <a href="___Z__Z.html" title="the class of all integers">ZZ</a> or the base field.</p> <p>The inverse of the isomorphism <tt>F</tt> is obtainable with <tt>F^-1</tt>.</p> <table class="examples"><tr><td><pre>i1 : A = ZZ[a]/(a^2-3) o1 = A o1 : QuotientRing</pre> </td></tr> <tr><td><pre>i2 : B = A[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o2 = B o2 : QuotientRing</pre> </td></tr> <tr><td><pre>i3 : (D,F) = flattenRing B;</pre> </td></tr> <tr><td><pre>i4 : F o4 = map(D,B,{x, y, z, a}) o4 : RingMap D <--- B</pre> </td></tr> <tr><td><pre>i5 : F^-1 o5 = map(B,D,{x, y, z, a}) o5 : RingMap B <--- D</pre> </td></tr> <tr><td><pre>i6 : D o6 = D o6 : QuotientRing</pre> </td></tr> <tr><td><pre>i7 : describe D ZZ[x, y, z, a] o7 = ------------------------------- 2 2 2 2 3 3 (a - 3, x a - y - z , y , z )</pre> </td></tr> <tr><td><pre>i8 : flattenRing(B,Result => Ideal) 2 2 2 2 3 3 o8 = ideal (a - 3, x a - y - z , y , z ) o8 : Ideal of ZZ[x, y, z, a]</pre> </td></tr> <tr><td><pre>i9 : flattenRing(B,Result => (Ideal,,)) 2 2 2 2 3 3 o9 = (ideal (a - 3, x a - y - z , y , z ), map(ZZ[x, y, z, a],B,{x, y, z, ------------------------------------------------------------------------ a}), map(B,ZZ[x, y, z, a],{x, y, z, a})) o9 : Sequence</pre> </td></tr> <tr><td><pre>i10 : flattenRing(B,Result => (,,)) ZZ[x, y, z, a] o10 = (-------------------------------, 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) ----------------------------------------------------------------------- ZZ[x, y, z, a] map(-------------------------------,B,{x, y, z, a}), 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) ----------------------------------------------------------------------- ZZ[x, y, z, a] map(B,-------------------------------,{x, y, z, a})) 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) o10 : Sequence</pre> </td></tr> <tr><td><pre>i11 : flattenRing(B,Result => 3) ZZ[x, y, z, a] o11 = (-------------------------------, 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) ----------------------------------------------------------------------- ZZ[x, y, z, a] map(-------------------------------,B,{x, y, z, a}), 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) ----------------------------------------------------------------------- ZZ[x, y, z, a] map(B,-------------------------------,{x, y, z, a})) 2 2 2 2 3 3 (a - 3, x a - y - z , y , z ) o11 : Sequence</pre> </td></tr> <tr><td><pre>i12 : flattenRing(B,Result => (Nothing,Nothing,)) o12 = (, , map(B,ZZ[x, y, z, a],{x, y, z, a})) o12 : Sequence</pre> </td></tr> </table> <p>Warning: flattening the same ring with different options may yield a separately constructed rings, unequal to each other.</p> <p>Flattening an ideal instead of a quotient ring can save a lot of time spent computing the Gröbner basis of the resulting ideal, if the flattened quotient is not needed.</p> <table class="examples"><tr><td><pre>i13 : A = ZZ[a]/(a^2-3) o13 = A o13 : QuotientRing</pre> </td></tr> <tr><td><pre>i14 : B = A[x,y,z] o14 = B o14 : PolynomialRing</pre> </td></tr> <tr><td><pre>i15 : J = ideal (a*x^2-y^2-z^2, y^3, z^3) 2 2 2 3 3 o15 = ideal (a*x - y - z , y , z ) o15 : Ideal of B</pre> </td></tr> <tr><td><pre>i16 : (J',F) = flattenRing J;</pre> </td></tr> <tr><td><pre>i17 : J' 2 2 2 2 3 3 o17 = ideal (a - 3, x a - y - z , y , z ) o17 : Ideal of ZZ[x, y, z, a]</pre> </td></tr> </table> <p>In the following example, the coefficient ring of the result is the fraction field <tt>K</tt>.</p> <table class="examples"><tr><td><pre>i18 : K = frac(ZZ[a]) o18 = K o18 : FractionField</pre> </td></tr> <tr><td><pre>i19 : B = K[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o19 = B o19 : QuotientRing</pre> </td></tr> <tr><td><pre>i20 : (D,F) = flattenRing B o20 = (B, map(B,B,{x, y, z, a})) o20 : Sequence</pre> </td></tr> <tr><td><pre>i21 : describe D K[x, y, z] o21 = ------------------------ 2 2 2 3 3 (a*x - y - z , y , z )</pre> </td></tr> </table> <p>Once a ring has been declared to be a field with <a href="_to__Field_lp__Ring_rp.html" title="declare that a ring is a field">toField</a>, then it will be used as the coefficient ring.</p> <table class="examples"><tr><td><pre>i22 : A = QQ[a]/(a^2-3);</pre> </td></tr> <tr><td><pre>i23 : L = toField A o23 = L o23 : PolynomialRing</pre> </td></tr> <tr><td><pre>i24 : B = L[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o24 = B o24 : QuotientRing</pre> </td></tr> <tr><td><pre>i25 : (D,F) = flattenRing(B[s,t]) o25 = (D, map(D,B[s, t],{s, t, x, y, z, a})) o25 : Sequence</pre> </td></tr> <tr><td><pre>i26 : describe D L[s, t, x, y, z] o26 = ------------------------ 2 2 2 3 3 (a*x - y - z , y , z )</pre> </td></tr> </table> <p>If a larger coefficient ring is desired, use the optional CoefficientRing parameter.</p> <table class="examples"><tr><td><pre>i27 : use L o27 = L o27 : PolynomialRing</pre> </td></tr> <tr><td><pre>i28 : C1 = L[s,t];</pre> </td></tr> <tr><td><pre>i29 : C2 = C1/(a*s-t^2);</pre> </td></tr> <tr><td><pre>i30 : C3 = C2[p_0..p_4]/(a*s*p_0)[q]/(q^2-a*p_1);</pre> </td></tr> <tr><td><pre>i31 : (D,F) = flattenRing(C3, CoefficientRing=>C2) o31 = (D, map(D,C3,{q, p , p , p , p , p , s, t, a})) 0 1 2 3 4 o31 : Sequence</pre> </td></tr> <tr><td><pre>i32 : describe D C2[q, p , p , p , p , p ] 0 1 2 3 4 o32 = ------------------------- 2 (a*s*p , q - a*p ) 0 1</pre> </td></tr> <tr><td><pre>i33 : (D,F) = flattenRing(C3, CoefficientRing=>QQ) o33 = (D, map(D,C3,{q, p , p , p , p , p , s, t, a})) 0 1 2 3 4 o33 : Sequence</pre> </td></tr> <tr><td><pre>i34 : describe D QQ[q, p , p , p , p , p , s, t, a] 0 1 2 3 4 o34 = ------------------------------------- 2 2 2 (a - 3, - t + s*a, p s*a, q - p a) 0 1</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_presentation.html" title="presentation of a module or ring">presentation</a> -- presentation of a module or ring</span></li> <li><span><a href="_coefficient__Ring.html" title="get the coefficient ring">coefficientRing</a> -- get the coefficient ring</span></li> <li><span><a href="_describe.html" title="real description">describe</a> -- real description</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>flattenRing</tt> :</h2> <ul><li>flattenRing(Ideal)</li> <li>flattenRing(Ring)</li> </ul> </div> </div> </body> </html>