Sophie

Sophie

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

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>Singular Book 1.1.10 -- methods for creating ring maps</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.2.3.html">next</a> | <a href="___Singular_sp__Book_sp1.1.9.html">previous</a> | <a href="___Singular_sp__Book_sp1.2.3.html">forward</a> | <a href="___Singular_sp__Book_sp1.1.9.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.1.10.html" title="methods for creating ring maps">Singular Book 1.1.10</a></div>
<hr/>
<div><h1>Singular Book 1.1.10 -- methods for creating ring maps</h1>
<div>In Macaulay2, ring maps from a polynomial ring are defined and used as follows.<table class="examples"><tr><td><pre>i1 : A = QQ[a,b,c];</pre>
</td></tr>
<tr><td><pre>i2 : f = a+b+a*b+c^3;</pre>
</td></tr>
<tr><td><pre>i3 : B = QQ[x,y,z];</pre>
</td></tr>
<tr><td><pre>i4 : F = map(B,A,{x+y, x-y, z})

o4 = map(B,A,{x + y, x - y, z})

o4 : RingMap B &lt;--- A</pre>
</td></tr>
</table>
Notice that ring maps are defined by first giving the target ring, then the source ring, and finally the data.<p/>
Parentheses for functions with one parameter are optional.<table class="examples"><tr><td><pre>i5 : g = F f

      3    2    2
o5 = z  + x  - y  + 2x

o5 : B</pre>
</td></tr>
<tr><td><pre>i6 : A1 = QQ[x,y,c,b,a,z];</pre>
</td></tr>
<tr><td><pre>i7 : substitute(f,A1)

      3
o7 = c  + b*a + b + a

o7 : A1</pre>
</td></tr>
</table>
To map the first variable of A to the first variable of A1, the second variable of A to the second variable of A1, and so on, create the list of the first generators of A1<table class="examples"><tr><td><pre>i8 : v = take(gens A1, numgens A)

o8 = {x, y, c}

o8 : List</pre>
</td></tr>
<tr><td><pre>i9 : G = map(A1,A,v)

o9 = map(A1,A,{x, y, c})

o9 : RingMap A1 &lt;--- A</pre>
</td></tr>
<tr><td><pre>i10 : G f

       3
o10 = c  + x*y + x + y

o10 : A1</pre>
</td></tr>
</table>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_substitution_spand_spmaps_spbetween_springs.html" title="">substitution and maps between rings</a></span></li>
<li><span><a href="_map.html" title="make a map">map</a> -- make a map</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="___Ring__Map.html" title="the class of all ring maps">RingMap</a> -- the class of all ring maps</span></li>
<li><span><a href="_generators.html" title="provide matrix or list of generators">generators</a> -- provide matrix or list of generators</span></li>
<li><span><a href="_numgens.html" title="the number of generators">numgens</a> -- the number of generators</span></li>
<li><span><a href="_take.html" title="take some elements from a list">take</a> -- take some elements from a list</span></li>
</ul>
</div>
</div>
</body>
</html>