<?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>homomorphism -- get the homomorphism from element of Hom</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_homomorphisms_sp_lpmaps_rp_spbetween_spmodules.html">next</a> | <a href="_homology_lp__Matrix_cm__Matrix_rp.html">previous</a> | <a href="_homomorphisms_sp_lpmaps_rp_spbetween_spmodules.html">forward</a> | <a href="_homology_lp__Matrix_cm__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>homomorphism -- get the homomorphism from element of Hom</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>homomorphism f</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>f</tt>, of the form Hom(M,N) <-- R^1, where Hom(M,N) has been previously computed, and R is the ring of f, M and N</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span>the <a href="___Matrix.html" title="the class of all matrices">Matrix</a> <tt>M --> N</tt>, corresponding to the element <tt>f</tt></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>When <tt>H := Hom(M,N)</tt> is computed, enough information is stored in <tt>H.cache.Hom</tt> to compute this correspondence.<table class="examples"><tr><td><pre>i1 : R = QQ[x,y,z]/(y^2-x^3) o1 = R o1 : QuotientRing</pre> </td></tr> <tr><td><pre>i2 : H = Hom(ideal(x,y), R^1) o2 = image {-1} | x y | {-1} | y x2 | 2 o2 : R-module, submodule of R</pre> </td></tr> <tr><td><pre>i3 : g = homomorphism H_{1} o3 = | y x2 | o3 : Matrix</pre> </td></tr> </table> The homomorphism g takes x to y and y to x2. The source and target are what they should be.<table class="examples"><tr><td><pre>i4 : source g o4 = image | x y | 1 o4 : R-module, submodule of R</pre> </td></tr> <tr><td><pre>i5 : target g 1 o5 = R o5 : R-module, free</pre> </td></tr> </table> <p/> After <a href="_minimal__Presentation_lp__Module_rp.html">pruning</a> a Hom module, one cannot use homomorphism directly. Instead, first apply the pruning map:<table class="examples"><tr><td><pre>i6 : H1 = prune H o6 = cokernel | x2 -y | | -y x | 2 o6 : R-module, quotient of R</pre> </td></tr> <tr><td><pre>i7 : homomorphism(H1.cache.pruningMap * H1_{1}) o7 = | y x2 | o7 : Matrix</pre> </td></tr> </table> <p/> Sometime, one wants a random homomorphism of a given degree. Here is one method:<table class="examples"><tr><td><pre>i8 : f = basis(3,H) o8 = {0} | xy2 xyz xz2 y3 y2z yz2 z3 0 0 0 | {1} | 0 0 0 0 0 0 0 y2 yz z2 | o8 : Matrix</pre> </td></tr> <tr><td><pre>i9 : rand = random(R^(numgens source f), R^1) o9 = | 3 | | 1 | | 3 | | 3/4 | | 1/5 | | 2/7 | | 6/7 | | 10/3 | | 4 | | 7/3 | 10 1 o9 : Matrix R <--- R</pre> </td></tr> <tr><td><pre>i10 : h = homomorphism(f * rand) o10 = | 3x2y2+3/4xy3+x2yz+1/5xy2z+3x2z2+2/7xyz2+6/7xz3+10/3y3+4y2z+7/3yz2 ----------------------------------------------------------------------- 10/3x2y2+3xy3+3/4y4+4x2yz+xy2z+1/5y3z+7/3x2z2+3xyz2+2/7y2z2+6/7yz3 | o10 : Matrix</pre> </td></tr> <tr><td><pre>i11 : source h o11 = image | x y | 1 o11 : R-module, submodule of R</pre> </td></tr> <tr><td><pre>i12 : target h 1 o12 = R o12 : R-module, free</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="___Hom.html" title="module of homomorphisms">Hom</a> -- module of homomorphisms</span></li> <li><span><a href="_prune.html" title="prune, e.g., compute a minimal presentation">prune</a> -- prune, e.g., compute a minimal presentation</span></li> <li><span><a href="_random.html" title="get a random element">random</a> -- get a random element</span></li> <li><span><a href="_basis.html" title="basis of all or part of a module or ring">basis</a> -- basis of all or part of a module or ring</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>homomorphism</tt> :</h2> <ul><li>homomorphism(Matrix)</li> </ul> </div> </div> </body> </html>