Sophie

Sophie

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

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>basic construction, source and target of a ring map</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_evaluation_spand_spcomposition_spof_spring_spmaps.html">next</a> | <a href="_working_spwith_spmultiple_springs.html">previous</a> | <a href="_evaluation_spand_spcomposition_spof_spring_spmaps.html">forward</a> | <a href="_working_spwith_spmultiple_springs.html">backward</a> | <a href="_substitution_spand_spmaps_spbetween_springs.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="_substitution_spand_spmaps_spbetween_springs.html" title="">substitution and maps between rings</a> > <a href="_basic_spconstruction_cm_spsource_spand_sptarget_spof_spa_spring_spmap.html" title="">basic construction, source and target of a ring map</a></div>
<hr/>
<div><h1>basic construction, source and target of a ring map</h1>
<div><h2>constructing a ring map</h2>
Use the function <a href="_map.html" title="make a map">map</a> construct a map between two rings.  The input, in order, is the target, the source, and the images of the variables of the source ring.  The images can be given as a matrix or a list.<table class="examples"><tr><td><pre>i1 : S = QQ[x,y,z]/ideal(x^3+y^3+z^3);</pre>
</td></tr>
<tr><td><pre>i2 : T = QQ[u,v,w]/ideal(u^3+v^3+w^3);</pre>
</td></tr>
<tr><td><pre>i3 : G = map(T,S,matrix{{u,v,w^2}})

                     2
o3 = map(T,S,{u, v, w })

o3 : RingMap T &lt;--- S</pre>
</td></tr>
<tr><td><pre>i4 : G(x^3+y^3+z)

        6    2
o4 = - w  + w

o4 : T</pre>
</td></tr>
</table>
If the third argument is not given there are two possibilities.  If a variable in the source ring also appears in the target ring then that variable is mapped to itself and if a variable does not appear in the target ring then it is mapped to zero.<table class="examples"><tr><td><pre>i5 : R = QQ[x,y,w];</pre>
</td></tr>
<tr><td><pre>i6 : F = map(S,R)

o6 = map(S,R,{x, y, 0})

o6 : RingMap S &lt;--- R</pre>
</td></tr>
<tr><td><pre>i7 : F(x^3)

        3    3
o7 = - y  - z

o7 : S</pre>
</td></tr>
</table>
<h2>source and target</h2>
Once a ring map is defined the functions <a href="_source.html" title="source of a map">source</a> and <a href="_target.html" title="target of a map">target</a> can be used to find out what the source and target of a map are.  These functions are particularly useful when working with matrices (see the next example). <table class="examples"><tr><td><pre>i8 : U = QQ[s,t,u, Degrees => {{1,2},{1,1},{1,3}}];</pre>
</td></tr>
<tr><td><pre>i9 : H = map(U,R,matrix{{s^2,t^3,u^4}})

               2   3   4
o9 = map(U,R,{s , t , u })

o9 : RingMap U &lt;--- R</pre>
</td></tr>
<tr><td><pre>i10 : use R; H(x^2+y^2+w^2)

       8    6    4
o11 = u  + t  + s

o11 : U</pre>
</td></tr>
<tr><td><pre>i12 : source H

o12 = R

o12 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i13 : target H

o13 = U

o13 : PolynomialRing</pre>
</td></tr>
</table>
<h2>obtaining the matrix defining a map</h2>
Use <tt>F.matrix</tt> to obtain the matrix defining the map F.<table class="examples"><tr><td><pre>i14 : H.matrix

o14 = | s2 t3 u4 |

              1       3
o14 : Matrix U  &lt;--- U</pre>
</td></tr>
<tr><td><pre>i15 : source H.matrix

       3
o15 = U

o15 : U-module, free</pre>
</td></tr>
<tr><td><pre>i16 : target H.matrix

       1
o16 = U

o16 : U-module, free</pre>
</td></tr>
</table>
For more on matrices from maps see <a href="_inputting_spa_spmatrix.html" title="">inputting a matrix</a>.</div>
</div>
</body>
</html>