Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 4945

Macaulay2-1.3.1-8.fc15.i686.rpm

<?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>promote -- promote to another ring</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_protect.html">next</a> | <a href="___Projective__Variety.html">previous</a> | <a href="_protect.html">forward</a> | <a href="___Projective__Variety.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>promote -- promote to another ring</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>promote(f,R)</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>f</tt>, <span>a <a href="___Ring__Element.html">ring element</a></span>, <span>an <a href="___Ideal.html">ideal</a></span>, or <span>a <a href="___Matrix.html">matrix</a></span> over some base ring of R</span></li>
<li><span><tt>R</tt>, <span>a <a href="___Ring.html">ring</a></span></span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="___Ring__Element.html">ring element</a></span>, or <span>a <a href="___Matrix.html">matrix</a></span>, over R</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>Promote the given ring element or matrix <tt>f</tt> to an element or matrix of <tt>R</tt>, via the natural map to <tt>R</tt>.  This is semantically equivalent to creating the natural ring map from <tt>ring f --> R</tt> and mapping f via this map.</p>
<table class="examples"><tr><td><pre>i1 : R = QQ[a..d]; f = a^2;</pre>
</td></tr>
<tr><td><pre>i3 : S = R/(a^2-b-1);</pre>
</td></tr>
<tr><td><pre>i4 : promote(2/3,S)

     2
o4 = -
     3

o4 : S</pre>
</td></tr>
<tr><td><pre>i5 : F = map(R,QQ);  F(2/3)

o5 : RingMap R &lt;--- QQ

     2
o6 = -
     3

o6 : R</pre>
</td></tr>
<tr><td><pre>i7 : promote(f,S)

o7 = b + 1

o7 : S</pre>
</td></tr>
<tr><td><pre>i8 : G = map(S,R); G(f)

o8 : RingMap S &lt;--- R

o9 = b + 1

o9 : S</pre>
</td></tr>
</table>
<p>Promotion of real numbers to rational numbers is accomplished by using all of the bits of the internal representation.</p>
<table class="examples"><tr><td><pre>i10 : promote(101.,QQ)

o10 = 101

o10 : QQ</pre>
</td></tr>
<tr><td><pre>i11 : promote(.101,QQ)

       3638908498915361
o11 = -----------------
      36028797018963968

o11 : QQ</pre>
</td></tr>
<tr><td><pre>i12 : factor denominator oo

       55
o12 = 2

o12 : Expression of class Product</pre>
</td></tr>
<tr><td><pre>i13 : ooo + 0.

o13 = .101

o13 : RR (of precision 53)</pre>
</td></tr>
<tr><td><pre>i14 : oo === .101

o14 = true</pre>
</td></tr>
</table>
<p>For promotion of ring elements, there is the following shorter notation.</p>
<table class="examples"><tr><td><pre>i15 : 13_R

o15 = 13

o15 : R</pre>
</td></tr>
</table>
<p>If you wish to promote a module to another ring, either promote the corresponding matrices, use the natural ring map, or use tensor product of matrices or modules.</p>
<table class="examples"><tr><td><pre>i16 : use R;</pre>
</td></tr>
<tr><td><pre>i17 : I = ideal(a^2,a^3,a^4)

              2   3   4
o17 = ideal (a , a , a )

o17 : Ideal of R</pre>
</td></tr>
<tr><td><pre>i18 : promote(I,S)

                              2
o18 = ideal (b + 1, a*b + a, b  + 2b + 1)

o18 : Ideal of S</pre>
</td></tr>
<tr><td><pre>i19 : m = image matrix{{a^2,a^3,a^4}}

o19 = image | a2 a3 a4 |

                              1
o19 : R-module, submodule of R</pre>
</td></tr>
<tr><td><pre>i20 : promote(gens m,S)

o20 = | b+1 ab+a b2+2b+1 |

              1       3
o20 : Matrix S  &lt;--- S</pre>
</td></tr>
<tr><td><pre>i21 : G m

o21 = image | b+1 ab+a b2+2b+1 |

                              1
o21 : S-module, submodule of S</pre>
</td></tr>
<tr><td><pre>i22 : m ** S

o22 = cokernel {2} | a  0  |
               {3} | -1 a  |
               {4} | 0  -1 |

                             3
o22 : S-module, quotient of S</pre>
</td></tr>
</table>
A special feature is that if <tt>f</tt> is rational, and <tt>R</tt> is not an algebra over <a href="___Q__Q.html" title="the class of all rational numbers">QQ</a>, then an element of <tt>R</tt> is provided by attempting the evident division.</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_base__Rings.html" title="store the list of base rings of a ring">baseRings</a> -- store the list of base rings of a ring</span></li>
<li><span><a href="_lift.html" title="lift to another ring">lift</a> -- lift to another ring</span></li>
<li><span><a href="_liftable.html" title="whether lifting to another ring is possible">liftable</a> -- whether lifting to another ring is possible</span></li>
<li><span><a href="_substitution_spand_spmaps_spbetween_springs.html" title="">substitution and maps between rings</a></span></li>
<li><span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></li>
<li><span><a href="___Matrix_sp_st_st_sp__Ring.html" title="tensor product">Matrix ** Ring</a> -- tensor product</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>promote</tt> :</h2>
<ul><li>promote(RR,type of QQ)</li>
</ul>
</div>
</div>
</body>
</html>