
| Current Path : /usr/share/gap/doc/ref/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //usr/share/gap/doc/ref/chap32.html |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (ref) - Chapter 32: Mappings</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap32" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap31.html">[Previous Chapter]</a> <a href="chap33.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap32_mj.html">[MathJax on]</a></p>
<p><a id="X7C9734B880042C73" name="X7C9734B880042C73"></a></p>
<div class="ChapSects"><a href="chap32.html#X7C9734B880042C73">32 <span class="Heading">Mappings</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X783BAB2683EEA0CC">32.1 <span class="Heading">IsDirectProductElement (Filter)</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X87FD9FE787023FF0">32.1-1 IsDirectProductElement</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7CF6FEFB8290D5CB">32.2 <span class="Heading">Creating Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X79D0D2F07A14D039">32.2-1 GeneralMappingByElements</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D55E1977ED70E01">32.2-2 <span class="Heading">MappingByFunction</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X865FC25A87D36F3D">32.2-3 InverseGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7BD2D5A87CD6B213">32.2-4 RestrictedInverseGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7ED1E4E27CCE2DCA">32.2-5 CompositionMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86486B687B7077AC">32.2-6 CompositionMapping2</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7A926D167C3155F6">32.2-7 IsCompositionMappingRep</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X87775B438008DCA5">32.2-8 ConstituentsCompositionMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X795FF8DC785F110A">32.2-9 ZeroMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7EBAE0368470A603">32.2-10 IdentityMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86452F8587CBAEA0">32.2-11 <span class="Heading">Embedding</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8769E8DA80BC96C1">32.2-12 <span class="Heading">Projection</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X800014D683A81009">32.2-13 RestrictedMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7E5A430D7F838F1C">32.3 <span class="Heading">Properties and Attributes of (General) Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X83C7494E828CC9C8">32.3-1 IsTotal</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86D44C8A78BF1981">32.3-2 IsSingleValued</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7CC95EB282854385">32.3-3 IsMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7F065FD7822C0A12">32.3-4 IsInjective</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X784ECE847E005B8F">32.3-5 IsSurjective</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X878F56AB7B342767">32.3-6 IsBijective</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7B6FD7277CDE9FCB">32.3-7 Range</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7DE8173F80E07AB1">32.3-8 Source</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X784F871383FB599B">32.3-9 UnderlyingRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X786581DE871A47D0">32.3-10 UnderlyingGeneralMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X83B4FF15847F06FC">32.4 <span class="Heading">Images under Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D23C1CE863DACD8">32.4-1 ImagesSource</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X85ADB89B7C8DD7D0">32.4-2 ImagesRepresentative</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D51184B7EE5B2CF">32.4-3 ImagesElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8781348F7F5796A0">32.4-4 ImagesSet</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7CFAB0157BFB1806">32.4-5 ImageElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X87F4D35A826599C6">32.4-6 <span class="Heading">Image</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86114B2E7E77488C">32.4-7 <span class="Heading">Images</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X79BB1EC07C828667">32.5 <span class="Heading">Preimages under Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X78EF1FE77B0973C0">32.5-1 PreImagesRange</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7FBB830C8729E995">32.5-2 PreImagesElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D212F727CAE971A">32.5-3 PreImageElm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7AE24A1586B7DE79">32.5-4 PreImagesRepresentative</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X856BAFC87B2D2811">32.5-5 PreImagesSet</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X836FAEAC78B55BF4">32.5-6 <span class="Heading">PreImage</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X85C8590E832002EF">32.5-7 <span class="Heading">PreImages</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7E2E16277940FA0B">32.6 <span class="Heading">Arithmetic Operations for General Mappings</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X834E02BB7D4B4AE5">32.7 <span class="Heading">Mappings which are Compatible with Algebraic Structures</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X8008FCCC7F4C731F">32.8 <span class="Heading">Magma Homomorphisms</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7DC72CF28539A251">32.8-1 IsMagmaHomomorphism</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8181676787E760A2">32.8-2 MagmaHomomorphismByFunctionNC</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X79D0216E871B7051">32.8-3 NaturalHomomorphismByGenerators</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X806F892C862F29F9">32.9 <span class="Heading">Mappings that Respect Multiplication</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7BEFF95883EAEC78">32.9-1 RespectsMultiplication</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7EE4DA097AE9CBC1">32.9-2 RespectsOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7F27AE9C84A4DF90">32.9-3 RespectsInverses</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X819DD174829BF3AE">32.9-4 IsGroupGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X81A5A5CF846E5FBF">32.9-5 KernelOfMultiplicativeGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7F09B6E28080DCB4">32.9-6 CoKernelOfMultiplicativeGeneralMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X8455A5A67C35178B">32.10 <span class="Heading">Mappings that Respect Addition</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7A3321E878925C3A">32.10-1 RespectsAddition</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8130D8907B92F746">32.10-2 RespectsAdditiveInverses</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D342736781EB280">32.10-3 RespectsZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7B99EF287A8A0BD9">32.10-4 IsAdditiveGroupGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7EC0E9907D6631D6">32.10-5 KernelOfAdditiveGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X813C6D7980213F41">32.10-6 CoKernelOfAdditiveGeneralMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7C24431C81532575">32.11 <span class="Heading">Linear Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X87842ED97FA19973">32.11-1 RespectsScalarMultiplication</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X780BE6307A3271A9">32.11-2 IsLeftModuleGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7F6841107E59107F">32.11-3 IsLinearMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7E88C32A82E942DA">32.12 <span class="Heading">Ring Homomorphisms</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7C8DA031799B79D5">32.12-1 IsRingGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7988102883675606">32.12-2 IsRingWithOneGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86B14F908601DEA9">32.12-3 IsAlgebraGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X842AD44679C5BDC2">32.12-4 IsAlgebraWithOneGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8324DA78879DF4D7">32.12-5 IsFieldHomomorphism</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7E4A55567BED0F88">32.13 <span class="Heading">General Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X8656AB8A7D672CAE">32.13-1 IsGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X791690817E23D90C">32.13-2 IsConstantTimeAccessGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X81CFF5F87BBEA8AD">32.13-3 IsEndoGeneralMapping</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap32.html#X7D6F78587C00CDD0">32.14 <span class="Heading">Technical Matters Concerning General Mappings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7D28581F82481163">32.14-1 IsSPGeneralMapping</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X80D02AD183E01F16">32.14-2 IsGeneralMappingFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X86CFADBA7F2FE446">32.14-3 FamilyRange</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7C3736E281A9E505">32.14-4 FamilySource</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7AE54FB67E2E6374">32.14-5 FamiliesOfGeneralMappingsAndRanges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7E1E26E37C413F6F">32.14-6 GeneralMappingsFamily</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap32.html#X7CF92CC37A6BBDA5">32.14-7 TypeOfDefaultGeneralMapping</a></span>
</div></div>
</div>
<h3>32 <span class="Heading">Mappings</span></h3>
<p>A <em>mapping</em> in <strong class="pkg">GAP</strong> is what is called a "function" in mathematics. <strong class="pkg">GAP</strong> also implements <em>generalized mappings</em> in which one element might have several images, these can be imagined as subsets of the cartesian product and are often called "relations".</p>
<p>Most operations are declared for general mappings and therefore this manual often refers to "(general) mappings", unless you deliberately need the generalization you can ignore the "general" bit and just read it as "mappings".</p>
<p>A <em>general mapping</em> <span class="SimpleMath">F</span> in <strong class="pkg">GAP</strong> is described by its source <span class="SimpleMath">S</span>, its range <span class="SimpleMath">R</span>, and a subset <span class="SimpleMath">Rel</span> of the direct product <span class="SimpleMath">S × R</span>, which is called the underlying relation of <span class="SimpleMath">F</span>. <span class="SimpleMath">S</span>, <span class="SimpleMath">R</span>, and <span class="SimpleMath">Rel</span> are generalized domains (see <a href="chap12.html#X7BAF69417BB925F6"><span class="RefLink">12.4</span></a>). The corresponding attributes for general mappings are <code class="func">Source</code> (<a href="chap32.html#X7DE8173F80E07AB1"><span class="RefLink">32.3-8</span></a>), <code class="func">Range</code> (<a href="chap32.html#X7B6FD7277CDE9FCB"><span class="RefLink">32.3-7</span></a>), and <code class="func">UnderlyingRelation</code> (<a href="chap32.html#X784F871383FB599B"><span class="RefLink">32.3-9</span></a>).</p>
<p>Note that general mappings themselves are <em>not</em> domains. One reason for this is that two general mappings with same underlying relation are regarded as equal only if also the sources are equal and the ranges are equal. Other, more technical, reasons are that general mappings and domains have different basic operations, and that general mappings are arithmetic objects (see <a href="chap32.html#X7E2E16277940FA0B"><span class="RefLink">32.6</span></a>); both should not apply to domains.</p>
<p>Each element of an underlying relation of a general mapping lies in the category of direct product elements (see <code class="func">IsDirectProductElement</code> (<a href="chap32.html#X87FD9FE787023FF0"><span class="RefLink">32.1-1</span></a>)).</p>
<p>For each <span class="SimpleMath">s ∈ S</span>, the set <span class="SimpleMath">{ r ∈ R | (s,r) ∈ Rel }</span> is called the set of <em>images</em> of <span class="SimpleMath">s</span>. Analogously, for <span class="SimpleMath">r ∈ R</span>, the set <span class="SimpleMath">{ s ∈ S | (s,r) ∈ Rel }</span> is called the set of <em>preimages</em> of <span class="SimpleMath">r</span>.</p>
<p>The <em>ordering</em> of general mappings via <code class="code"><</code> is defined by the ordering of source, range, and underlying relation. Specifically, if the source and range domains of <var class="Arg">map1</var> and <var class="Arg">map2</var> are the same, then one considers the union of the preimages of <var class="Arg">map1</var> and <var class="Arg">map2</var> as a strictly ordered set. The smaller of <var class="Arg">map1</var> and <var class="Arg">map2</var> is the one whose image is smaller on the first point of this sequence where they differ.</p>
<p>For mappings which preserve an algebraic structure a <em>kernel</em> is defined. Depending on the structure preserved the operation to compute this kernel is called differently, see Section <a href="chap32.html#X834E02BB7D4B4AE5"><span class="RefLink">32.7</span></a>.</p>
<p>Some technical details of general mappings are described in section <a href="chap32.html#X7E4A55567BED0F88"><span class="RefLink">32.13</span></a>.</p>
<p><a id="X783BAB2683EEA0CC" name="X783BAB2683EEA0CC"></a></p>
<h4>32.1 <span class="Heading">IsDirectProductElement (Filter)</span></h4>
<p><a id="X87FD9FE787023FF0" name="X87FD9FE787023FF0"></a></p>
<h5>32.1-1 IsDirectProductElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDirectProductElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsDirectProductElement</code> is a subcategory of the meet of <code class="func">IsDenseList</code> (<a href="chap21.html#X870AA9D8798C93DD"><span class="RefLink">21.1-2</span></a>), <code class="func">IsMultiplicativeElementWithInverse</code> (<a href="chap31.html#X7FDB14E57814FA3B"><span class="RefLink">31.14-13</span></a>), <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>), and <code class="func">IsCopyable</code> (<a href="chap12.html#X811EFD727EBD1ADC"><span class="RefLink">12.6-1</span></a>), where the arithmetic operations (addition, zero, additive inverse, multiplication, powering, one, inverse) are defined componentwise.</p>
<p>Note that each of these operations will cause an error message if its result for at least one component cannot be formed.</p>
<p>For an object in the filter <code class="func">IsDirectProductElement</code>, <code class="func">ShallowCopy</code> (<a href="chap12.html#X846BC7107C352031"><span class="RefLink">12.7-1</span></a>) returns a mutable plain list with the same entries. The sum and the product of a direct product element and a list in <code class="func">IsListDefault</code> (<a href="chap21.html#X7BAD12E67BFC90DE"><span class="RefLink">21.12-3</span></a>) is the list of sums and products, respectively. The sum and the product of a direct product element and a non-list is the direct product element of componentwise sums and products, respectively.</p>
<p><a id="X7CF6FEFB8290D5CB" name="X7CF6FEFB8290D5CB"></a></p>
<h4>32.2 <span class="Heading">Creating Mappings</span></h4>
<p><a id="X79D0D2F07A14D039" name="X79D0D2F07A14D039"></a></p>
<h5>32.2-1 GeneralMappingByElements</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneralMappingByElements</code>( <var class="Arg">S</var>, <var class="Arg">R</var>, <var class="Arg">elms</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>is the general mapping with source <var class="Arg">S</var> and range <var class="Arg">R</var>, and with underlying relation consisting of the collection <var class="Arg">elms</var> of direct product elements.</p>
<p><a id="X7D55E1977ED70E01" name="X7D55E1977ED70E01"></a></p>
<h5>32.2-2 <span class="Heading">MappingByFunction</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MappingByFunction</code>( <var class="Arg">S</var>, <var class="Arg">R</var>, <var class="Arg">fun</var>[, <var class="Arg">invfun</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MappingByFunction</code>( <var class="Arg">S</var>, <var class="Arg">R</var>, <var class="Arg">fun</var>, <var class="Arg">false</var>, <var class="Arg">prefun</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">MappingByFunction</code> returns a mapping <code class="code">map</code> with source <var class="Arg">S</var> and range <var class="Arg">R</var>, such that each element <span class="SimpleMath">s</span> of <var class="Arg">S</var> is mapped to the element <var class="Arg">fun</var><span class="SimpleMath">( s )</span>, where <var class="Arg">fun</var> is a <strong class="pkg">GAP</strong> function.</p>
<p>If the argument <var class="Arg">invfun</var> is bound then <code class="code">map</code> is a bijection between <var class="Arg">S</var> and <var class="Arg">R</var>, and the preimage of each element <span class="SimpleMath">r</span> of <var class="Arg">R</var> is given by <var class="Arg">invfun</var><span class="SimpleMath">( r )</span>, where <var class="Arg">invfun</var> is a <strong class="pkg">GAP</strong> function.</p>
<p>If five arguments are given and the fourth argument is <code class="keyw">false</code> then the <strong class="pkg">GAP</strong> function <var class="Arg">prefun</var> can be used to compute a single preimage also if <code class="code">map</code> is not bijective.</p>
<p>The mapping returned by <code class="func">MappingByFunction</code> lies in the filter <code class="func">IsNonSPGeneralMapping</code> (<a href="chap32.html#X7D28581F82481163"><span class="RefLink">32.14-1</span></a>), see <a href="chap32.html#X7D6F78587C00CDD0"><span class="RefLink">32.14</span></a>.</p>
<p><a id="X865FC25A87D36F3D" name="X865FC25A87D36F3D"></a></p>
<h5>32.2-3 InverseGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InverseGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The <em>inverse general mapping</em> of a general mapping <var class="Arg">map</var> is the general mapping whose underlying relation (see <code class="func">UnderlyingRelation</code> (<a href="chap32.html#X784F871383FB599B"><span class="RefLink">32.3-9</span></a>)) contains a pair <span class="SimpleMath">(r,s)</span> if and only if the underlying relation of <var class="Arg">map</var> contains the pair <span class="SimpleMath">(s,r)</span>.</p>
<p>See the introduction to Chapter <a href="chap32.html#X7C9734B880042C73"><span class="RefLink">32</span></a> for the subtleties concerning the difference between <code class="func">InverseGeneralMapping</code> and <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>).</p>
<p>Note that the inverse general mapping of a mapping <var class="Arg">map</var> is in general only a general mapping. If <var class="Arg">map</var> knows to be bijective its inverse general mapping will know to be a mapping. In this case also <code class="code">Inverse( <var class="Arg">map</var> )</code> works.</p>
<p><a id="X7BD2D5A87CD6B213" name="X7BD2D5A87CD6B213"></a></p>
<h5>32.2-4 RestrictedInverseGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RestrictedInverseGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The <em>restricted inverse general mapping</em> of a general mapping <var class="Arg">map</var> is the general mapping whose underlying relation (see <code class="func">UnderlyingRelation</code> (<a href="chap32.html#X784F871383FB599B"><span class="RefLink">32.3-9</span></a>)) contains a pair <span class="SimpleMath">(r,s)</span> if and only if the underlying relation of <var class="Arg">map</var> contains the pair <span class="SimpleMath">(s,r)</span>, and whose domain is restricted to the image of <var class="Arg">map</var> and whose range is the domain of <var class="Arg">map</var>.</p>
<p><a id="X7ED1E4E27CCE2DCA" name="X7ED1E4E27CCE2DCA"></a></p>
<h5>32.2-5 CompositionMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CompositionMapping</code>( <var class="Arg">map1</var>, <var class="Arg">map2</var>, <var class="Arg">...</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">CompositionMapping</code> allows one to compose arbitrarily many general mappings, and delegates each step to <code class="func">CompositionMapping2</code> (<a href="chap32.html#X86486B687B7077AC"><span class="RefLink">32.2-6</span></a>).</p>
<p>Additionally, the properties <code class="func">IsInjective</code> (<a href="chap32.html#X7F065FD7822C0A12"><span class="RefLink">32.3-4</span></a>) and <code class="func">IsSingleValued</code> (<a href="chap32.html#X86D44C8A78BF1981"><span class="RefLink">32.3-2</span></a>) are maintained; if the source of the <span class="SimpleMath">i+1</span>-th general mapping is identical to the range of the <span class="SimpleMath">i</span>-th general mapping, also <code class="func">IsTotal</code> (<a href="chap32.html#X83C7494E828CC9C8"><span class="RefLink">32.3-1</span></a>) and <code class="func">IsSurjective</code> (<a href="chap32.html#X784ECE847E005B8F"><span class="RefLink">32.3-5</span></a>) are maintained. (So one should not call <code class="func">CompositionMapping2</code> (<a href="chap32.html#X86486B687B7077AC"><span class="RefLink">32.2-6</span></a>) directly if one wants to maintain these properties.)</p>
<p>Depending on the types of <var class="Arg">map1</var> and <var class="Arg">map2</var>, the returned mapping might be constructed completely new (for example by giving domain generators and their images, this is for example the case if both mappings preserve the same algebraic structures and <strong class="pkg">GAP</strong> can decompose elements of the source of <var class="Arg">map2</var> into generators) or as an (iterated) composition (see <code class="func">IsCompositionMappingRep</code> (<a href="chap32.html#X7A926D167C3155F6"><span class="RefLink">32.2-7</span></a>)).</p>
<p><a id="X86486B687B7077AC" name="X86486B687B7077AC"></a></p>
<h5>32.2-6 CompositionMapping2</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CompositionMapping2</code>( <var class="Arg">map2</var>, <var class="Arg">map1</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CompositionMapping2General</code>( <var class="Arg">map2</var>, <var class="Arg">map1</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">CompositionMapping2</code> returns the composition of <var class="Arg">map2</var> and <var class="Arg">map1</var>, this is the general mapping that maps an element first under <var class="Arg">map1</var>, and then maps the images under <var class="Arg">map2</var>.</p>
<p>(Note the reverse ordering of arguments in the composition via the multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>).</p>
<p><code class="func">CompositionMapping2General</code> is the method that forms a composite mapping with two constituent mappings. (This is used in some algorithms.)</p>
<p><a id="X7A926D167C3155F6" name="X7A926D167C3155F6"></a></p>
<h5>32.2-7 IsCompositionMappingRep</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCompositionMappingRep</code>( <var class="Arg">map</var> )</td><td class="tdright">( representation )</td></tr></table></div>
<p>Mappings in this representation are stored as composition of two mappings, (pre)images of elements are computed in a two-step process. The constituent mappings of the composition can be obtained via <code class="func">ConstituentsCompositionMapping</code> (<a href="chap32.html#X87775B438008DCA5"><span class="RefLink">32.2-8</span></a>).</p>
<p><a id="X87775B438008DCA5" name="X87775B438008DCA5"></a></p>
<h5>32.2-8 ConstituentsCompositionMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConstituentsCompositionMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>If <var class="Arg">map</var> is stored in the representation <code class="func">IsCompositionMappingRep</code> (<a href="chap32.html#X7A926D167C3155F6"><span class="RefLink">32.2-7</span></a>) as composition of two mappings <var class="Arg">map1</var> and <var class="Arg">map2</var>, this function returns the two constituent mappings in a list <code class="code">[ <var class="Arg">map1</var>, <var class="Arg">map2</var> ]</code>.</p>
<p><a id="X795FF8DC785F110A" name="X795FF8DC785F110A"></a></p>
<h5>32.2-9 ZeroMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ZeroMapping</code>( <var class="Arg">S</var>, <var class="Arg">R</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>A zero mapping is a total general mapping that maps each element of its source to the zero element of its range.</p>
<p>(Each mapping with empty source is a zero mapping.)</p>
<p><a id="X7EBAE0368470A603" name="X7EBAE0368470A603"></a></p>
<h5>32.2-10 IdentityMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdentityMapping</code>( <var class="Arg">D</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the bijective mapping with source and range equal to the collection <var class="Arg">D</var>, which maps each element of <var class="Arg">D</var> to itself.</p>
<p><a id="X86452F8587CBAEA0" name="X86452F8587CBAEA0"></a></p>
<h5>32.2-11 <span class="Heading">Embedding</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Embedding</code>( <var class="Arg">S</var>, <var class="Arg">T</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Embedding</code>( <var class="Arg">S</var>, <var class="Arg">i</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns the embedding of the domain <var class="Arg">S</var> in the domain <var class="Arg">T</var>, or in the second form, some domain indexed by the positive integer <var class="Arg">i</var>. The precise natures of the various methods are described elsewhere: for Lie algebras, see <code class="func">LieFamily</code> (<a href="chap64.html#X8725993C7BF386EE"><span class="RefLink">64.1-3</span></a>); for group products, see <a href="chap49.html#X798FDA1386A0EAC6"><span class="RefLink">49.6</span></a> for a general description, or for examples see <a href="chap49.html#X7D39232A84CD8DBD"><span class="RefLink">49.1</span></a> for direct products, <a href="chap49.html#X87FE512E7DB7346C"><span class="RefLink">49.2</span></a> for semidirect products, or <a href="chap49.html#X7DF2AEBC8518FFA4"><span class="RefLink">49.4</span></a> for wreath products; or for magma rings see <a href="chap65.html#X80366F1480ACD8DF"><span class="RefLink">65.3</span></a>.</p>
<p><a id="X8769E8DA80BC96C1" name="X8769E8DA80BC96C1"></a></p>
<h5>32.2-12 <span class="Heading">Projection</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Projection</code>( <var class="Arg">S</var>, <var class="Arg">T</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Projection</code>( <var class="Arg">S</var>, <var class="Arg">i</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Projection</code>( <var class="Arg">S</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns the projection of the domain <var class="Arg">S</var> onto the domain <var class="Arg">T</var>, or in the second form, some domain indexed by the positive integer <var class="Arg">i</var>, or in the third form some natural quotient domain of <var class="Arg">S</var>. Various methods are defined for group products; see <a href="chap49.html#X798FDA1386A0EAC6"><span class="RefLink">49.6</span></a> for a general description, or for examples see <a href="chap49.html#X7D39232A84CD8DBD"><span class="RefLink">49.1</span></a> for direct products, <a href="chap49.html#X87FE512E7DB7346C"><span class="RefLink">49.2</span></a> for semidirect products, <a href="chap49.html#X815AFC537B215D7B"><span class="RefLink">49.3</span></a> for subdirect products, or <a href="chap49.html#X7DF2AEBC8518FFA4"><span class="RefLink">49.4</span></a> for wreath products.</p>
<p><a id="X800014D683A81009" name="X800014D683A81009"></a></p>
<h5>32.2-13 RestrictedMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RestrictedMapping</code>( <var class="Arg">map</var>, <var class="Arg">subdom</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">subdom</var> is a subdomain of the source of the general mapping <var class="Arg">map</var>, this operation returns the restriction of <var class="Arg">map</var> to <var class="Arg">subdom</var>.</p>
<p><a id="X7E5A430D7F838F1C" name="X7E5A430D7F838F1C"></a></p>
<h4>32.3 <span class="Heading">Properties and Attributes of (General) Mappings</span></h4>
<p><a id="X83C7494E828CC9C8" name="X83C7494E828CC9C8"></a></p>
<h5>32.3-1 IsTotal</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTotal</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if each element in the source <span class="SimpleMath">S</span> of the general mapping <var class="Arg">map</var> has images, i.e., <span class="SimpleMath">s^<var class="Arg">map</var> ≠ ∅</span> for all <span class="SimpleMath">s ∈ S</span>, and <code class="keyw">false</code> otherwise.</p>
<p><a id="X86D44C8A78BF1981" name="X86D44C8A78BF1981"></a></p>
<h5>32.3-2 IsSingleValued</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSingleValued</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if each element in the source <span class="SimpleMath">S</span> of the general mapping <var class="Arg">map</var> has at most one image, i.e., <span class="SimpleMath">|s^<var class="Arg">map</var>| ≤ 1</span> for all <span class="SimpleMath">s ∈ S</span>, and <code class="keyw">false</code> otherwise.</p>
<p>Equivalently, <code class="code">IsSingleValued( <var class="Arg">map</var> )</code> is <code class="keyw">true</code> if and only if the preimages of different elements in <span class="SimpleMath">R</span> are disjoint.</p>
<p><a id="X7CC95EB282854385" name="X7CC95EB282854385"></a></p>
<h5>32.3-3 IsMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>A <em>mapping</em> <var class="Arg">map</var> is a general mapping that assigns to each element <code class="code">elm</code> of its source a unique element <code class="code">Image( <var class="Arg">map</var>, elm )</code> of its range.</p>
<p>Equivalently, the general mapping <var class="Arg">map</var> is a mapping if and only if it is total and single-valued (see <code class="func">IsTotal</code> (<a href="chap32.html#X83C7494E828CC9C8"><span class="RefLink">32.3-1</span></a>), <code class="func">IsSingleValued</code> (<a href="chap32.html#X86D44C8A78BF1981"><span class="RefLink">32.3-2</span></a>)).</p>
<p><a id="X7F065FD7822C0A12" name="X7F065FD7822C0A12"></a></p>
<h5>32.3-4 IsInjective</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsInjective</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if the images of different elements in the source <span class="SimpleMath">S</span> of the general mapping <var class="Arg">map</var> are disjoint, i.e., <span class="SimpleMath">x^<var class="Arg">map</var> ∩ y^<var class="Arg">map</var> = ∅</span> for <span class="SimpleMath">x ≠ y ∈ S</span>, and <code class="keyw">false</code> otherwise.</p>
<p>Equivalently, <code class="code">IsInjective( <var class="Arg">map</var> )</code> is <code class="keyw">true</code> if and only if each element in the range of <var class="Arg">map</var> has at most one preimage in <span class="SimpleMath">S</span>.</p>
<p><a id="X784ECE847E005B8F" name="X784ECE847E005B8F"></a></p>
<h5>32.3-5 IsSurjective</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSurjective</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if each element in the range <span class="SimpleMath">R</span> of the general mapping <var class="Arg">map</var> has preimages in the source <span class="SimpleMath">S</span> of <var class="Arg">map</var>, i.e., <span class="SimpleMath">{ s ∈ S ∣ x ∈ s^<var class="Arg">map</var> } ≠ ∅</span> for all <span class="SimpleMath">x ∈ R</span>, and <code class="keyw">false</code> otherwise.</p>
<p><a id="X878F56AB7B342767" name="X878F56AB7B342767"></a></p>
<h5>32.3-6 IsBijective</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsBijective</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>A general mapping <var class="Arg">map</var> is <em>bijective</em> if and only if it is an injective and surjective mapping (see <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>), <code class="func">IsInjective</code> (<a href="chap32.html#X7F065FD7822C0A12"><span class="RefLink">32.3-4</span></a>), <code class="func">IsSurjective</code> (<a href="chap32.html#X784ECE847E005B8F"><span class="RefLink">32.3-5</span></a>)).</p>
<p><a id="X7B6FD7277CDE9FCB" name="X7B6FD7277CDE9FCB"></a></p>
<h5>32.3-7 Range</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Range</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The range of a general mapping.</p>
<p><a id="X7DE8173F80E07AB1" name="X7DE8173F80E07AB1"></a></p>
<h5>32.3-8 Source</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Source</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The source of a general mapping.</p>
<p><a id="X784F871383FB599B" name="X784F871383FB599B"></a></p>
<h5>32.3-9 UnderlyingRelation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnderlyingRelation</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>The <em>underlying relation</em> of a general mapping <var class="Arg">map</var> is the domain of pairs <span class="SimpleMath">(s,r)</span>, with <span class="SimpleMath">s</span> in the source and <span class="SimpleMath">r</span> in the range of <var class="Arg">map</var> (see <code class="func">Source</code> (<a href="chap32.html#X7DE8173F80E07AB1"><span class="RefLink">32.3-8</span></a>), <code class="func">Range</code> (<a href="chap32.html#X7B6FD7277CDE9FCB"><span class="RefLink">32.3-7</span></a>)), and <span class="SimpleMath">r ∈</span> <code class="code">ImagesElm( <var class="Arg">map</var>, </code><span class="SimpleMath">s</span><code class="code"> )</code>.</p>
<p>Each element of the underlying relation is represented by a direct product element (see <code class="func">IsDirectProductElement</code> (<a href="chap32.html#X87FD9FE787023FF0"><span class="RefLink">32.1-1</span></a>)).</p>
<p><a id="X786581DE871A47D0" name="X786581DE871A47D0"></a></p>
<h5>32.3-10 UnderlyingGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnderlyingGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>attribute for underlying relations of general mappings</p>
<p><a id="X83B4FF15847F06FC" name="X83B4FF15847F06FC"></a></p>
<h4>32.4 <span class="Heading">Images under Mappings</span></h4>
<p><a id="X7D23C1CE863DACD8" name="X7D23C1CE863DACD8"></a></p>
<h5>32.4-1 ImagesSource</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImagesSource</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the set of images of the source of the general mapping <var class="Arg">map</var>.</p>
<p><code class="func">ImagesSource</code> delegates to <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>), it is introduced only to store the image of <var class="Arg">map</var> as attribute value.</p>
<p><a id="X85ADB89B7C8DD7D0" name="X85ADB89B7C8DD7D0"></a></p>
<h5>32.4-2 ImagesRepresentative</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImagesRepresentative</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the source of the general mapping <var class="Arg">map</var> then <code class="func">ImagesRepresentative</code> returns either a representative of the set of images of <var class="Arg">elm</var> under <var class="Arg">map</var> or <code class="keyw">fail</code>, the latter if and only if <var class="Arg">elm</var> has no images under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
<p><a id="X7D51184B7EE5B2CF" name="X7D51184B7EE5B2CF"></a></p>
<h5>32.4-3 ImagesElm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImagesElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the source of the general mapping <var class="Arg">map</var> then <code class="func">ImagesElm</code> returns the set of all images of <var class="Arg">elm</var> under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
<p><a id="X8781348F7F5796A0" name="X8781348F7F5796A0"></a></p>
<h5>32.4-4 ImagesSet</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImagesSet</code>( <var class="Arg">map</var>, <var class="Arg">elms</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elms</var> is a subset of the source of the general mapping <var class="Arg">map</var> then <code class="func">ImagesSet</code> returns the set of all images of <var class="Arg">elms</var> under <var class="Arg">map</var>.</p>
<p>The result will be either a proper set or a domain. Anything may happen if <var class="Arg">elms</var> is not a subset of the source of <var class="Arg">map</var>.</p>
<p><a id="X7CFAB0157BFB1806" name="X7CFAB0157BFB1806"></a></p>
<h5>32.4-5 ImageElm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImageElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the source of the total and single-valued mapping <var class="Arg">map</var> then <code class="func">ImageElm</code> returns the unique image of <var class="Arg">elm</var> under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
<p><a id="X87F4D35A826599C6" name="X87F4D35A826599C6"></a></p>
<h5>32.4-6 <span class="Heading">Image</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Image</code>( <var class="Arg">map</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Image</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Image</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">Image( <var class="Arg">map</var> )</code> is the <em>image</em> of the general mapping <var class="Arg">map</var>, i.e., the subset of elements of the range of <var class="Arg">map</var> that are actually values of <var class="Arg">map</var>. <em>Note</em> that in this case the argument may also be multi-valued.</p>
<p><code class="code">Image( <var class="Arg">map</var>, <var class="Arg">elm</var> )</code> is the image of the element <var class="Arg">elm</var> of the source of the mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the unique element of the range to which <var class="Arg">map</var> maps <var class="Arg">elm</var>. This can also be expressed as <var class="Arg">elm</var><code class="code">^</code><var class="Arg">map</var>. Note that <var class="Arg">map</var> must be total and single valued, a multi valued general mapping is not allowed (see <code class="func">Images</code> (<a href="chap32.html#X86114B2E7E77488C"><span class="RefLink">32.4-7</span></a>)).</p>
<p><code class="code">Image( <var class="Arg">map</var>, <var class="Arg">coll</var> )</code> is the image of the subset <var class="Arg">coll</var> of the source of the mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the subset of the range to which <var class="Arg">map</var> maps elements of <var class="Arg">coll</var>. <var class="Arg">coll</var> may be a proper set or a domain. The result will be either a proper set or a domain. Note that in this case <var class="Arg">map</var> may also be multi-valued. (If <var class="Arg">coll</var> and the result are lists then the positions of entries do in general <em>not</em> correspond.)</p>
<p><code class="func">Image</code> delegates to <code class="func">ImagesSource</code> (<a href="chap32.html#X7D23C1CE863DACD8"><span class="RefLink">32.4-1</span></a>) when called with one argument, and to <code class="func">ImageElm</code> (<a href="chap32.html#X7CFAB0157BFB1806"><span class="RefLink">32.4-5</span></a>) resp. <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>) when called with two arguments.</p>
<p>If the second argument is not an element or a subset of the source of the first argument, an error is signalled.</p>
<p><a id="X86114B2E7E77488C" name="X86114B2E7E77488C"></a></p>
<h5>32.4-7 <span class="Heading">Images</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Images</code>( <var class="Arg">map</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Images</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Images</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">Images( <var class="Arg">map</var> )</code> is the <em>image</em> of the general mapping <var class="Arg">map</var>, i.e., the subset of elements of the range of <var class="Arg">map</var> that are actually values of <var class="Arg">map</var>.</p>
<p><code class="code">Images( <var class="Arg">map</var>, <var class="Arg">elm</var> )</code> is the set of images of the element <var class="Arg">elm</var> of the source of the general mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the set of elements of the range to which <var class="Arg">map</var> maps <var class="Arg">elm</var>.</p>
<p><code class="code">Images( <var class="Arg">map</var>, <var class="Arg">coll</var> )</code> is the set of images of the subset <var class="Arg">coll</var> of the source of the general mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the subset of the range to which <var class="Arg">map</var> maps elements of <var class="Arg">coll</var>. <var class="Arg">coll</var> may be a proper set or a domain. The result will be either a proper set or a domain. (If <var class="Arg">coll</var> and the result are lists then the positions of entries do in general <em>not</em> correspond.)</p>
<p><code class="func">Images</code> delegates to <code class="func">ImagesSource</code> (<a href="chap32.html#X7D23C1CE863DACD8"><span class="RefLink">32.4-1</span></a>) when called with one argument, and to <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) resp. <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>) when called with two arguments.</p>
<p>If the second argument is not an element or a subset of the source of the first argument, an error is signalled.</p>
<p><a id="X79BB1EC07C828667" name="X79BB1EC07C828667"></a></p>
<h4>32.5 <span class="Heading">Preimages under Mappings</span></h4>
<p><a id="X78EF1FE77B0973C0" name="X78EF1FE77B0973C0"></a></p>
<h5>32.5-1 PreImagesRange</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesRange</code>( <var class="Arg">map</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the set of preimages of the range of the general mapping <var class="Arg">map</var>.</p>
<p><code class="func">PreImagesRange</code> delegates to <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>), it is introduced only to store the preimage of <var class="Arg">map</var> as attribute value.</p>
<p><a id="X7FBB830C8729E995" name="X7FBB830C8729E995"></a></p>
<h5>32.5-2 PreImagesElm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the range of the general mapping <var class="Arg">map</var> then <code class="func">PreImagesElm</code> returns the set of all preimages of <var class="Arg">elm</var> under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
<p><a id="X7D212F727CAE971A" name="X7D212F727CAE971A"></a></p>
<h5>32.5-3 PreImageElm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImageElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the range of the injective and surjective general mapping <var class="Arg">map</var> then <code class="func">PreImageElm</code> returns the unique preimage of <var class="Arg">elm</var> under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
<p><a id="X7AE24A1586B7DE79" name="X7AE24A1586B7DE79"></a></p>
<h5>32.5-4 PreImagesRepresentative</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesRepresentative</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elm</var> is an element of the range of the general mapping <var class="Arg">map</var> then <code class="func">PreImagesRepresentative</code> returns either a representative of the set of preimages of <var class="Arg">elm</var> under <var class="Arg">map</var> or <code class="keyw">fail</code>, the latter if and only if <var class="Arg">elm</var> has no preimages under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
<p><a id="X856BAFC87B2D2811" name="X856BAFC87B2D2811"></a></p>
<h5>32.5-5 PreImagesSet</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesSet</code>( <var class="Arg">map</var>, <var class="Arg">elms</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>If <var class="Arg">elms</var> is a subset of the range of the general mapping <var class="Arg">map</var> then <code class="func">PreImagesSet</code> returns the set of all preimages of <var class="Arg">elms</var> under <var class="Arg">map</var>.</p>
<p>Anything may happen if <var class="Arg">elms</var> is not a subset of the range of <var class="Arg">map</var>.</p>
<p><a id="X836FAEAC78B55BF4" name="X836FAEAC78B55BF4"></a></p>
<h5>32.5-6 <span class="Heading">PreImage</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImage</code>( <var class="Arg">map</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImage</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImage</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">PreImage( <var class="Arg">map</var> )</code> is the preimage of the general mapping <var class="Arg">map</var>, i.e., the subset of elements of the source of <var class="Arg">map</var> that actually have values under <var class="Arg">map</var>. Note that in this case the argument may also be non-injective or non-surjective.</p>
<p><code class="code">PreImage( <var class="Arg">map</var>, <var class="Arg">elm</var> )</code> is the preimage of the element <var class="Arg">elm</var> of the range of the injective and surjective mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the unique element of the source which is mapped under <var class="Arg">map</var> to <var class="Arg">elm</var>. Note that <var class="Arg">map</var> must be injective and surjective (see <code class="func">PreImages</code> (<a href="chap32.html#X85C8590E832002EF"><span class="RefLink">32.5-7</span></a>)).</p>
<p><code class="code">PreImage( <var class="Arg">map</var>, <var class="Arg">coll</var> )</code> is the preimage of the subset <var class="Arg">coll</var> of the range of the general mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the subset of the source which is mapped under <var class="Arg">map</var> to elements of <var class="Arg">coll</var>. <var class="Arg">coll</var> may be a proper set or a domain. The result will be either a proper set or a domain. Note that in this case <var class="Arg">map</var> may also be non-injective or non-surjective. (If <var class="Arg">coll</var> and the result are lists then the positions of entries do in general <em>not</em> correspond.)</p>
<p><code class="func">PreImage</code> delegates to <code class="func">PreImagesRange</code> (<a href="chap32.html#X78EF1FE77B0973C0"><span class="RefLink">32.5-1</span></a>) when called with one argument, and to <code class="func">PreImageElm</code> (<a href="chap32.html#X7D212F727CAE971A"><span class="RefLink">32.5-3</span></a>) resp. <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>) when called with two arguments.</p>
<p>If the second argument is not an element or a subset of the range of the first argument, an error is signalled.</p>
<p><a id="X85C8590E832002EF" name="X85C8590E832002EF"></a></p>
<h5>32.5-7 <span class="Heading">PreImages</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImages</code>( <var class="Arg">map</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImages</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImages</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="code">PreImages( <var class="Arg">map</var> )</code> is the preimage of the general mapping <var class="Arg">map</var>, i.e., the subset of elements of the source of <var class="Arg">map</var> that have actually values under <var class="Arg">map</var>.</p>
<p><code class="code">PreImages( <var class="Arg">map</var>, <var class="Arg">elm</var> )</code> is the set of preimages of the element <var class="Arg">elm</var> of the range of the general mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the set of elements of the source which <var class="Arg">map</var> maps to <var class="Arg">elm</var>.</p>
<p><code class="code">PreImages( <var class="Arg">map</var>, <var class="Arg">coll</var> )</code> is the set of images of the subset <var class="Arg">coll</var> of the range of the general mapping <var class="Arg">map</var> under <var class="Arg">map</var>, i.e., the subset of the source which <var class="Arg">map</var> maps to elements of <var class="Arg">coll</var>. <var class="Arg">coll</var> may be a proper set or a domain. The result will be either a proper set or a domain. (If <var class="Arg">coll</var> and the result are lists then the positions of entries do in general <em>not</em> correspond.)</p>
<p><code class="func">PreImages</code> delegates to <code class="func">PreImagesRange</code> (<a href="chap32.html#X78EF1FE77B0973C0"><span class="RefLink">32.5-1</span></a>) when called with one argument, and to <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>) resp. <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>) when called with two arguments.</p>
<p>If the second argument is not an element or a subset of the range of the first argument, an error is signalled.</p>
<p><a id="X7E2E16277940FA0B" name="X7E2E16277940FA0B"></a></p>
<h4>32.6 <span class="Heading">Arithmetic Operations for General Mappings</span></h4>
<p>General mappings are arithmetic objects. One can form groups and vector spaces of general mappings provided that they are invertible or can be added and admit scalar multiplication, respectively.</p>
<p>For two general mappings with same source, range, preimage, and image, the <em>sum</em> is defined pointwise, i.e., the images of a point under the sum is the set of all sums with first summand in the images of the first general mapping and second summand in the images of the second general mapping.</p>
<p><em>Scalar multiplication</em> of general mappings is defined likewise.</p>
<p>The <em>product</em> of two general mappings is defined as the composition. This multiplication is always associative. In addition to the composition via <code class="code">*</code>, general mappings can be composed –in reversed order– via <code class="func">CompositionMapping</code> (<a href="chap32.html#X7ED1E4E27CCE2DCA"><span class="RefLink">32.2-5</span></a>).</p>
<p>General mappings are in the category of multiplicative elements with inverses. Similar to matrices, not every general mapping has an inverse or an identity, and we define the behaviour of <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) and <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) for general mappings as follows. <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) returns <code class="keyw">fail</code> when called for a general mapping whose source and range differ, otherwise <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) returns the identity mapping of the source. (Note that the source may differ from the preimage). <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) returns <code class="keyw">fail</code> when called for a non-bijective general mapping or for a general mapping whose source and range differ; otherwise <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) returns the inverse mapping.</p>
<p>Besides the usual inverse of multiplicative elements, which means that <code class="code">Inverse( <var class="Arg">g</var> ) * <var class="Arg">g</var> = <var class="Arg">g</var> * Inverse( <var class="Arg">g</var> ) = One( <var class="Arg">g</var> )</code>, for general mappings we have the attribute <code class="func">InverseGeneralMapping</code> (<a href="chap32.html#X865FC25A87D36F3D"><span class="RefLink">32.2-3</span></a>). If <var class="Arg">F</var> is a general mapping with source <span class="SimpleMath">S</span>, range <span class="SimpleMath">R</span>, and underlying relation <span class="SimpleMath">Rel</span> then <code class="code">InverseGeneralMapping( <var class="Arg">F</var> )</code> has source <span class="SimpleMath">R</span>, range <span class="SimpleMath">S</span>, and underlying relation <span class="SimpleMath">{ (r,s) ∣ (s,r) ∈ Rel }</span>. For a general mapping that has an inverse in the usual sense, i.e., for a bijection of the source, of course both concepts coincide.</p>
<p><code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) may delegate to <code class="func">InverseGeneralMapping</code> (<a href="chap32.html#X865FC25A87D36F3D"><span class="RefLink">32.2-3</span></a>). <code class="func">InverseGeneralMapping</code> (<a href="chap32.html#X865FC25A87D36F3D"><span class="RefLink">32.2-3</span></a>) must not delegate to <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>), but a known value of <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) may be fetched. So methods to compute the inverse of a general mapping should be installed for <code class="func">InverseGeneralMapping</code> (<a href="chap32.html#X865FC25A87D36F3D"><span class="RefLink">32.2-3</span></a>).</p>
<p>(Note that in many respects, general mappings behave similar to matrices, for example one can define left and right identities and inverses, which do not fit into the current concepts of <strong class="pkg">GAP</strong>.)</p>
<p><a id="X834E02BB7D4B4AE5" name="X834E02BB7D4B4AE5"></a></p>
<h4>32.7 <span class="Heading">Mappings which are Compatible with Algebraic Structures</span></h4>
<p>From an algebraical point of view, the most important mappings are those which are compatible with a structure. For Magmas, Groups and Rings, <strong class="pkg">GAP</strong> supports the following four types of such mappings:</p>
<ol>
<li><p>General mappings that respect multiplication</p>
</li>
<li><p>General mappings that respect addition</p>
</li>
<li><p>General mappings that respect scalar mult.</p>
</li>
<li><p>General mappings that respect multiplicative and additive structure</p>
</li>
</ol>
<p>(Very technical note: <strong class="pkg">GAP</strong> defines categories <code class="code">IsSPGeneralMapping</code> and <code class="code">IsNonSPGeneralMapping</code>. The distinction between these is orthogonal to the structure compatibility described here and should not be confused.)</p>
<p><a id="X8008FCCC7F4C731F" name="X8008FCCC7F4C731F"></a></p>
<h4>32.8 <span class="Heading">Magma Homomorphisms</span></h4>
<p><a id="X7DC72CF28539A251" name="X7DC72CF28539A251"></a></p>
<h5>32.8-1 IsMagmaHomomorphism</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagmaHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>A <em>magma homomorphism</em> is a total single valued mapping which respects multiplication.</p>
<p><a id="X8181676787E760A2" name="X8181676787E760A2"></a></p>
<h5>32.8-2 MagmaHomomorphismByFunctionNC</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaHomomorphismByFunctionNC</code>( <var class="Arg">G</var>, <var class="Arg">H</var>, <var class="Arg">fn</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Creates the homomorphism from <var class="Arg">G</var> to <var class="Arg">H</var> without checking that <var class="Arg">fn</var> is a homomorphism.</p>
<p><a id="X79D0216E871B7051" name="X79D0216E871B7051"></a></p>
<h5>32.8-3 NaturalHomomorphismByGenerators</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NaturalHomomorphismByGenerators</code>( <var class="Arg">f</var>, <var class="Arg">s</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns a mapping from the magma <var class="Arg">f</var> with <span class="SimpleMath">n</span> generators to the magma <var class="Arg">s</var> with <span class="SimpleMath">n</span> generators, which maps the <span class="SimpleMath">i</span>-th generator of <var class="Arg">f</var> to the <span class="SimpleMath">i</span>-th generator of <var class="Arg">s</var>.</p>
<p><a id="X806F892C862F29F9" name="X806F892C862F29F9"></a></p>
<h4>32.9 <span class="Heading">Mappings that Respect Multiplication</span></h4>
<p><a id="X7BEFF95883EAEC78" name="X7BEFF95883EAEC78"></a></p>
<h5>32.9-1 RespectsMultiplication</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsMultiplication</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ S × R</span>, where <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsMultiplication</code> returns <code class="keyw">true</code> if <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are magmas such that <span class="SimpleMath">(s_1,r_1), (s_2,r_2) ∈ F</span> implies <span class="SimpleMath">(s_1 * s_2,r_1 * r_2) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsMultiplication</code> returns <code class="keyw">true</code> if and only if the equation <code class="code"><var class="Arg">s1</var>^<var class="Arg">mapp</var> * <var class="Arg">s2</var>^<var class="Arg">mapp</var> = (<var class="Arg">s1</var> * <var class="Arg">s2</var>)^<var class="Arg">mapp</var></code> holds for all <var class="Arg">s1</var>, <var class="Arg">s2</var> in <span class="SimpleMath">S</span>.</p>
<p><a id="X7EE4DA097AE9CBC1" name="X7EE4DA097AE9CBC1"></a></p>
<h5>32.9-2 RespectsOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsOne</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ <var class="Arg">S</var> × <var class="Arg">R</var></span>, where <var class="Arg">S</var> and <var class="Arg">R</var> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsOne</code> returns <code class="keyw">true</code> if <var class="Arg">S</var> and <var class="Arg">R</var> are magmas-with-one such that <span class="SimpleMath">(</span><code class="code">One(<var class="Arg">S</var>)</code><span class="SimpleMath">,</span><code class="code">One(<var class="Arg">R</var>)</code><span class="SimpleMath">) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsOne</code> returns <code class="keyw">true</code> if and only if the equation <code class="code">One( <var class="Arg">S</var> )^<var class="Arg">mapp</var> = One( <var class="Arg">R</var> )</code> holds.</p>
<p><a id="X7F27AE9C84A4DF90" name="X7F27AE9C84A4DF90"></a></p>
<h5>32.9-3 RespectsInverses</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsInverses</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ <var class="Arg">S</var> × <var class="Arg">R</var></span>, where <var class="Arg">S</var> and <var class="Arg">R</var> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsInverses</code> returns <code class="keyw">true</code> if <var class="Arg">S</var> and <var class="Arg">R</var> are magmas-with-inverses such that, for <span class="SimpleMath">s ∈ <var class="Arg">S</var></span> and <span class="SimpleMath">r ∈ <var class="Arg">R</var></span>, <span class="SimpleMath">(s,r) ∈ F</span> implies <span class="SimpleMath">(s^{-1},r^{-1}) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsInverses</code> returns <code class="keyw">true</code> if and only if the equation <code class="code">Inverse( <var class="Arg">s</var> )^<var class="Arg">mapp</var> = Inverse( <var class="Arg">s</var>^<var class="Arg">mapp</var> )</code> holds for all <var class="Arg">s</var> in <span class="SimpleMath">S</span>.</p>
<p><a id="X819DD174829BF3AE" name="X819DD174829BF3AE"></a></p>
<h5>32.9-4 IsGroupGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGroupGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGroupHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p>A <em>group general mapping</em> is a mapping which respects multiplication and inverses. If it is total and single valued it is called a <em>group homomorphism</em>.</p>
<p>Chapter <a href="chap40.html#X83702FC27B3C3098"><span class="RefLink">40</span></a> explains group homomorphisms in more detail.</p>
<p><a id="X81A5A5CF846E5FBF" name="X81A5A5CF846E5FBF"></a></p>
<h5>32.9-5 KernelOfMultiplicativeGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ KernelOfMultiplicativeGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping. Then <code class="func">KernelOfMultiplicativeGeneralMapping</code> returns the set of all elements in the source of <var class="Arg">mapp</var> that have the identity of the range in their set of images.</p>
<p>(This is a monoid if <var class="Arg">mapp</var> respects multiplication and one, and if the source of <var class="Arg">mapp</var> is associative.)</p>
<p><a id="X7F09B6E28080DCB4" name="X7F09B6E28080DCB4"></a></p>
<h5>32.9-6 CoKernelOfMultiplicativeGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CoKernelOfMultiplicativeGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping. Then <code class="func">CoKernelOfMultiplicativeGeneralMapping</code> returns the set of all elements in the range of <var class="Arg">mapp</var> that have the identity of the source in their set of preimages.</p>
<p>(This is a monoid if <var class="Arg">mapp</var> respects multiplication and one, and if the range of <var class="Arg">mapp</var> is associative.)</p>
<p><a id="X8455A5A67C35178B" name="X8455A5A67C35178B"></a></p>
<h4>32.10 <span class="Heading">Mappings that Respect Addition</span></h4>
<p><a id="X7A3321E878925C3A" name="X7A3321E878925C3A"></a></p>
<h5>32.10-1 RespectsAddition</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsAddition</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ S × R</span>, where <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsAddition</code> returns <code class="keyw">true</code> if <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are additive magmas such that <span class="SimpleMath">(s_1,r_1), (s_2,r_2) ∈ F</span> implies <span class="SimpleMath">(s_1 + s_2,r_1 + r_2) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsAddition</code> returns <code class="keyw">true</code> if and only if the equation <code class="code"><var class="Arg">s1</var>^<var class="Arg">mapp</var> + <var class="Arg">s2</var>^<var class="Arg">mapp</var> = (<var class="Arg">s1</var>+<var class="Arg">s2</var>)^<var class="Arg">mapp</var></code> holds for all <var class="Arg">s1</var>, <var class="Arg">s2</var> in <span class="SimpleMath">S</span>.</p>
<p><a id="X8130D8907B92F746" name="X8130D8907B92F746"></a></p>
<h5>32.10-2 RespectsAdditiveInverses</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsAdditiveInverses</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ S × R</span>, where <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsAdditiveInverses</code> returns <code class="keyw">true</code> if <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are additive-magmas-with-inverses such that <span class="SimpleMath">(s,r) ∈ F</span> implies <span class="SimpleMath">(-s,-r) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsAdditiveInverses</code> returns <code class="keyw">true</code> if and only if the equation <code class="code">AdditiveInverse( <var class="Arg">s</var> )^<var class="Arg">mapp</var> = AdditiveInverse( <var class="Arg">s</var>^<var class="Arg">mapp</var> )</code> holds for all <var class="Arg">s</var> in <span class="SimpleMath">S</span>.</p>
<p><a id="X7D342736781EB280" name="X7D342736781EB280"></a></p>
<h5>32.10-3 RespectsZero</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsZero</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping with underlying relation <span class="SimpleMath">F ⊆ <var class="Arg">S</var> × <var class="Arg">R</var></span>, where <var class="Arg">S</var> and <var class="Arg">R</var> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsZero</code> returns <code class="keyw">true</code> if <var class="Arg">S</var> and <var class="Arg">R</var> are additive-magmas-with-zero such that <span class="SimpleMath">(</span><code class="code">Zero(<var class="Arg">S</var>)</code><span class="SimpleMath">,</span><code class="code">Zero(<var class="Arg">R</var>)</code><span class="SimpleMath">) ∈ F</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsZero</code> returns <code class="keyw">true</code> if and only if the equation <code class="code">Zero( <var class="Arg">S</var> )^<var class="Arg">mapp</var> = Zero( <var class="Arg">R</var> )</code> holds.</p>
<p><a id="X7B99EF287A8A0BD9" name="X7B99EF287A8A0BD9"></a></p>
<h5>32.10-4 IsAdditiveGroupGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditiveGroupGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditiveGroupHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><code class="func">IsAdditiveGroupGeneralMapping</code> specifies whether a general mapping <var class="Arg">mapp</var> respects addition (see <code class="func">RespectsAddition</code> (<a href="chap32.html#X7A3321E878925C3A"><span class="RefLink">32.10-1</span></a>)) and respects additive inverses (see <code class="func">RespectsAdditiveInverses</code> (<a href="chap32.html#X8130D8907B92F746"><span class="RefLink">32.10-2</span></a>)).</p>
<p><code class="func">IsAdditiveGroupHomomorphism</code> is a synonym for the meet of <code class="func">IsAdditiveGroupGeneralMapping</code> and <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>).</p>
<p><a id="X7EC0E9907D6631D6" name="X7EC0E9907D6631D6"></a></p>
<h5>32.10-5 KernelOfAdditiveGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ KernelOfAdditiveGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping. Then <code class="func">KernelOfAdditiveGeneralMapping</code> returns the set of all elements in the source of <var class="Arg">mapp</var> that have the zero of the range in their set of images.</p>
<p><a id="X813C6D7980213F41" name="X813C6D7980213F41"></a></p>
<h5>32.10-6 CoKernelOfAdditiveGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CoKernelOfAdditiveGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping. Then <code class="func">CoKernelOfAdditiveGeneralMapping</code> returns the set of all elements in the range of <var class="Arg">mapp</var> that have the zero of the source in their set of preimages.</p>
<p><a id="X7C24431C81532575" name="X7C24431C81532575"></a></p>
<h4>32.11 <span class="Heading">Linear Mappings</span></h4>
<p>Also see Sections <a href="chap32.html#X806F892C862F29F9"><span class="RefLink">32.9</span></a>, <a href="chap32.html#X8455A5A67C35178B"><span class="RefLink">32.10</span></a>, and <code class="func">KernelOfMultiplicativeGeneralMapping</code> (<a href="chap32.html#X81A5A5CF846E5FBF"><span class="RefLink">32.9-5</span></a>), <code class="func">CoKernelOfMultiplicativeGeneralMapping</code> (<a href="chap32.html#X7F09B6E28080DCB4"><span class="RefLink">32.9-6</span></a>).</p>
<p><a id="X87842ED97FA19973" name="X87842ED97FA19973"></a></p>
<h5>32.11-1 RespectsScalarMultiplication</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RespectsScalarMultiplication</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Let <var class="Arg">mapp</var> be a general mapping, with underlying relation <span class="SimpleMath">F ⊆ S × R</span>, where <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are the source and the range of <var class="Arg">mapp</var>, respectively. Then <code class="func">RespectsScalarMultiplication</code> returns <code class="keyw">true</code> if <span class="SimpleMath">S</span> and <span class="SimpleMath">R</span> are left modules with the left acting domain <span class="SimpleMath">D</span> of <span class="SimpleMath">S</span> contained in the left acting domain of <span class="SimpleMath">R</span> and such that <span class="SimpleMath">(s,r) ∈ F</span> implies <span class="SimpleMath">(c * s,c * r) ∈ F</span> for all <span class="SimpleMath">c ∈ D</span>, and <code class="keyw">false</code> otherwise.</p>
<p>If <var class="Arg">mapp</var> is single-valued then <code class="func">RespectsScalarMultiplication</code> returns <code class="keyw">true</code> if and only if the equation <code class="code"><var class="Arg">c</var> * <var class="Arg">s</var>^<var class="Arg">mapp</var> = (<var class="Arg">c</var> * <var class="Arg">s</var>)^<var class="Arg">mapp</var></code> holds for all <var class="Arg">c</var> in <span class="SimpleMath">D</span> and <var class="Arg">s</var> in <span class="SimpleMath">S</span>.</p>
<p><a id="X780BE6307A3271A9" name="X780BE6307A3271A9"></a></p>
<h5>32.11-2 IsLeftModuleGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLeftModuleGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLeftModuleHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><code class="func">IsLeftModuleGeneralMapping</code> specifies whether a general mapping <var class="Arg">mapp</var> satisfies the property <code class="func">IsAdditiveGroupGeneralMapping</code> (<a href="chap32.html#X7B99EF287A8A0BD9"><span class="RefLink">32.10-4</span></a>) and respects scalar multiplication (see <code class="func">RespectsScalarMultiplication</code> (<a href="chap32.html#X87842ED97FA19973"><span class="RefLink">32.11-1</span></a>)).</p>
<p><code class="func">IsLeftModuleHomomorphism</code> is a synonym for the meet of <code class="func">IsLeftModuleGeneralMapping</code> and <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>).</p>
<p><a id="X7F6841107E59107F" name="X7F6841107E59107F"></a></p>
<h5>32.11-3 IsLinearMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsLinearMapping</code>( <var class="Arg">F</var>, <var class="Arg">mapp</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For a field <var class="Arg">F</var> and a general mapping <var class="Arg">mapp</var>, <code class="func">IsLinearMapping</code> returns <code class="keyw">true</code> if <var class="Arg">mapp</var> is an <var class="Arg">F</var>-linear mapping, and <code class="keyw">false</code> otherwise.</p>
<p>A mapping <span class="SimpleMath">f</span> is a linear mapping (or vector space homomorphism) if the source and range are vector spaces over the same division ring <span class="SimpleMath">D</span>, and if <span class="SimpleMath">f( a + b ) = f(a) + f(b)</span> and <span class="SimpleMath">f( s * a ) = s * f(a)</span> hold for all elements <span class="SimpleMath">a</span>, <span class="SimpleMath">b</span> in the source of <span class="SimpleMath">f</span> and <span class="SimpleMath">s ∈ D</span>.</p>
<p><a id="X7E88C32A82E942DA" name="X7E88C32A82E942DA"></a></p>
<h4>32.12 <span class="Heading">Ring Homomorphisms</span></h4>
<p><a id="X7C8DA031799B79D5" name="X7C8DA031799B79D5"></a></p>
<h5>32.12-1 IsRingGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><code class="func">IsRingGeneralMapping</code> specifies whether a general mapping <var class="Arg">mapp</var> satisfies the property <code class="func">IsAdditiveGroupGeneralMapping</code> (<a href="chap32.html#X7B99EF287A8A0BD9"><span class="RefLink">32.10-4</span></a>) and respects multiplication (see <code class="func">RespectsMultiplication</code> (<a href="chap32.html#X7BEFF95883EAEC78"><span class="RefLink">32.9-1</span></a>)).</p>
<p><code class="func">IsRingHomomorphism</code> is a synonym for the meet of <code class="func">IsRingGeneralMapping</code> and <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>).</p>
<p><a id="X7988102883675606" name="X7988102883675606"></a></p>
<h5>32.12-2 IsRingWithOneGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingWithOneGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingWithOneHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><a id="X86B14F908601DEA9" name="X86B14F908601DEA9"></a></p>
<h5>32.12-3 IsAlgebraGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAlgebraGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAlgebraHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><code class="func">IsAlgebraGeneralMapping</code> specifies whether a general mapping <var class="Arg">mapp</var> satisfies both properties <code class="func">IsRingGeneralMapping</code> (<a href="chap32.html#X7C8DA031799B79D5"><span class="RefLink">32.12-1</span></a>) and (see <code class="func">IsLeftModuleGeneralMapping</code> (<a href="chap32.html#X780BE6307A3271A9"><span class="RefLink">32.11-2</span></a>)).</p>
<p><code class="func">IsAlgebraHomomorphism</code> is a synonym for the meet of <code class="func">IsAlgebraGeneralMapping</code> and <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>).</p>
<p><a id="X842AD44679C5BDC2" name="X842AD44679C5BDC2"></a></p>
<h5>32.12-4 IsAlgebraWithOneGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAlgebraWithOneGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAlgebraWithOneHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><code class="func">IsAlgebraWithOneGeneralMapping</code> specifies whether a general mapping <var class="Arg">mapp</var> satisfies both properties <code class="func">IsAlgebraGeneralMapping</code> (<a href="chap32.html#X86B14F908601DEA9"><span class="RefLink">32.12-3</span></a>) and <code class="func">RespectsOne</code> (<a href="chap32.html#X7EE4DA097AE9CBC1"><span class="RefLink">32.9-2</span></a>).</p>
<p><code class="func">IsAlgebraWithOneHomomorphism</code> is a synonym for the meet of <code class="func">IsAlgebraWithOneGeneralMapping</code> and <code class="func">IsMapping</code> (<a href="chap32.html#X7CC95EB282854385"><span class="RefLink">32.3-3</span></a>).</p>
<p><a id="X8324DA78879DF4D7" name="X8324DA78879DF4D7"></a></p>
<h5>32.12-5 IsFieldHomomorphism</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsFieldHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>A general mapping is a field homomorphism if and only if it is a ring homomorphism with source a field.</p>
<p><a id="X7E4A55567BED0F88" name="X7E4A55567BED0F88"></a></p>
<h4>32.13 <span class="Heading">General Mappings</span></h4>
<p><a id="X8656AB8A7D672CAE" name="X8656AB8A7D672CAE"></a></p>
<h5>32.13-1 IsGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Each general mapping lies in the category <code class="func">IsGeneralMapping</code>. It implies the categories <code class="func">IsMultiplicativeElementWithInverse</code> (<a href="chap31.html#X7FDB14E57814FA3B"><span class="RefLink">31.14-13</span></a>) and <code class="func">IsAssociativeElement</code> (<a href="chap31.html#X7979AFAA80FF795A"><span class="RefLink">31.15-1</span></a>); for a discussion of these implications, see <a href="chap32.html#X7E2E16277940FA0B"><span class="RefLink">32.6</span></a>.</p>
<p><a id="X791690817E23D90C" name="X791690817E23D90C"></a></p>
<h5>32.13-2 IsConstantTimeAccessGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsConstantTimeAccessGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if the underlying relation of the general mapping <var class="Arg">map</var> knows its <code class="func">AsList</code> (<a href="chap30.html#X8289FCCC8274C89D"><span class="RefLink">30.3-8</span></a>) value, and <code class="keyw">false</code> otherwise.</p>
<p>In the former case, <var class="Arg">map</var> is allowed to use this list for calls to <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) etc.</p>
<p><a id="X81CFF5F87BBEA8AD" name="X81CFF5F87BBEA8AD"></a></p>
<h5>32.13-3 IsEndoGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsEndoGeneralMapping</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>If a general mapping has this property then its source and range are equal.</p>
<p><a id="X7D6F78587C00CDD0" name="X7D6F78587C00CDD0"></a></p>
<h4>32.14 <span class="Heading">Technical Matters Concerning General Mappings</span></h4>
<p><code class="func">Source</code> (<a href="chap32.html#X7DE8173F80E07AB1"><span class="RefLink">32.3-8</span></a>) and <code class="func">Range</code> (<a href="chap32.html#X7B6FD7277CDE9FCB"><span class="RefLink">32.3-7</span></a>) are basic operations for general mappings. <code class="func">UnderlyingRelation</code> (<a href="chap32.html#X784F871383FB599B"><span class="RefLink">32.3-9</span></a>) is secondary, its default method sets up a domain that delegates tasks to the general mapping. (Note that this allows one to handle also infinite relations by generic methods if source or range of the general mapping is finite.)</p>
<p>The distinction between basic operations and secondary operations for general mappings may be a little bit complicated. Namely, each general mapping must be in one of the two categories <code class="func">IsNonSPGeneralMapping</code> (<a href="chap32.html#X7D28581F82481163"><span class="RefLink">32.14-1</span></a>), <code class="func">IsSPGeneralMapping</code> (<a href="chap32.html#X7D28581F82481163"><span class="RefLink">32.14-1</span></a>). (The category <code class="func">IsGeneralMapping</code> (<a href="chap32.html#X8656AB8A7D672CAE"><span class="RefLink">32.13-1</span></a>) is defined as the disjoint union of these two.)</p>
<p>For general mappings of the first category, <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) and <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>) are basic operations. (Note that in principle it is possible to delegate from <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>) to <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>).) Methods for the secondary operations <code class="func">ImageElm</code> (<a href="chap32.html#X7CFAB0157BFB1806"><span class="RefLink">32.4-5</span></a>), <code class="func">PreImageElm</code> (<a href="chap32.html#X7D212F727CAE971A"><span class="RefLink">32.5-3</span></a>), <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>), <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>), <code class="func">ImagesRepresentative</code> (<a href="chap32.html#X85ADB89B7C8DD7D0"><span class="RefLink">32.4-2</span></a>), and <code class="func">PreImagesRepresentative</code> (<a href="chap32.html#X7AE24A1586B7DE79"><span class="RefLink">32.5-4</span></a>) may use <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) and <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>), respectively, and methods for <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>), <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>) must <em>not</em> call the secondary operations. In particular, there are no generic methods for <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) and <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>).</p>
<p>Methods for <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>) and <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>) must <em>not</em> use <code class="func">PreImagesRange</code> (<a href="chap32.html#X78EF1FE77B0973C0"><span class="RefLink">32.5-1</span></a>) and <code class="func">ImagesSource</code> (<a href="chap32.html#X7D23C1CE863DACD8"><span class="RefLink">32.4-1</span></a>), e.g., compute the intersection of the set in question with the preimage of the range resp. the image of the source.</p>
<p>For general mappings of the second category (which means structure preserving general mappings), the situation is different. The set of preimages under a group homomorphism, for example, is either empty or can be described as a coset of the (multiplicative) kernel. So it is reasonable to have <code class="func">ImagesRepresentative</code> (<a href="chap32.html#X85ADB89B7C8DD7D0"><span class="RefLink">32.4-2</span></a>), <code class="func">PreImagesRepresentative</code> (<a href="chap32.html#X7AE24A1586B7DE79"><span class="RefLink">32.5-4</span></a>), <code class="func">KernelOfMultiplicativeGeneralMapping</code> (<a href="chap32.html#X81A5A5CF846E5FBF"><span class="RefLink">32.9-5</span></a>), and <code class="func">CoKernelOfMultiplicativeGeneralMapping</code> (<a href="chap32.html#X7F09B6E28080DCB4"><span class="RefLink">32.9-6</span></a>) as basic operations here, and to make <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) and <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>) secondary operations that may delegate to these.</p>
<p>In order to avoid infinite recursions, we must distinguish between the two different types of mappings.</p>
<p>(Note that the basic domain operations such as <code class="func">AsList</code> (<a href="chap30.html#X8289FCCC8274C89D"><span class="RefLink">30.3-8</span></a>) for the underlying relation of a general mapping may use either <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) or <code class="func">ImagesRepresentative</code> (<a href="chap32.html#X85ADB89B7C8DD7D0"><span class="RefLink">32.4-2</span></a>) and the appropriate cokernel. Conversely, if <code class="func">AsList</code> (<a href="chap30.html#X8289FCCC8274C89D"><span class="RefLink">30.3-8</span></a>) for the underlying relation is known then <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>) resp. <code class="func">ImagesRepresentative</code> (<a href="chap32.html#X85ADB89B7C8DD7D0"><span class="RefLink">32.4-2</span></a>) may delegate to it, the general mapping gets the property <code class="func">IsConstantTimeAccessGeneralMapping</code> (<a href="chap32.html#X791690817E23D90C"><span class="RefLink">32.13-2</span></a>) for this; note that this is not allowed if only an enumerator of the underlying relation is known.)</p>
<p>Secondary operations are <code class="func">IsInjective</code> (<a href="chap32.html#X7F065FD7822C0A12"><span class="RefLink">32.3-4</span></a>), <code class="func">IsSingleValued</code> (<a href="chap32.html#X86D44C8A78BF1981"><span class="RefLink">32.3-2</span></a>), <code class="func">IsSurjective</code> (<a href="chap32.html#X784ECE847E005B8F"><span class="RefLink">32.3-5</span></a>), <code class="func">IsTotal</code> (<a href="chap32.html#X83C7494E828CC9C8"><span class="RefLink">32.3-1</span></a>); they may use the basic operations, and must not be used by them.</p>
<p>Methods for the operations <code class="func">ImagesElm</code> (<a href="chap32.html#X7D51184B7EE5B2CF"><span class="RefLink">32.4-3</span></a>), <code class="func">ImagesRepresentative</code> (<a href="chap32.html#X85ADB89B7C8DD7D0"><span class="RefLink">32.4-2</span></a>), <code class="func">ImagesSet</code> (<a href="chap32.html#X8781348F7F5796A0"><span class="RefLink">32.4-4</span></a>), <code class="func">ImageElm</code> (<a href="chap32.html#X7CFAB0157BFB1806"><span class="RefLink">32.4-5</span></a>), <code class="func">PreImagesElm</code> (<a href="chap32.html#X7FBB830C8729E995"><span class="RefLink">32.5-2</span></a>), <code class="func">PreImagesRepresentative</code> (<a href="chap32.html#X7AE24A1586B7DE79"><span class="RefLink">32.5-4</span></a>), <code class="func">PreImagesSet</code> (<a href="chap32.html#X856BAFC87B2D2811"><span class="RefLink">32.5-5</span></a>), and <code class="func">PreImageElm</code> (<a href="chap32.html#X7D212F727CAE971A"><span class="RefLink">32.5-3</span></a>) take two arguments, a general mapping <var class="Arg">map</var> and an element or collection of elements <var class="Arg">elm</var>. These methods must <em>not</em> check whether <var class="Arg">elm</var> lies in the source or the range of <var class="Arg">map</var>. In the case that <var class="Arg">elm</var> does not, <code class="keyw">fail</code> may be returned as well as any other <strong class="pkg">GAP</strong> object, and even an error message is allowed. Checks of the arguments are done only by the functions <code class="func">Image</code> (<a href="chap32.html#X87F4D35A826599C6"><span class="RefLink">32.4-6</span></a>), <code class="func">Images</code> (<a href="chap32.html#X86114B2E7E77488C"><span class="RefLink">32.4-7</span></a>), <code class="func">PreImage</code> (<a href="chap32.html#X836FAEAC78B55BF4"><span class="RefLink">32.5-6</span></a>), and <code class="func">PreImages</code> (<a href="chap32.html#X85C8590E832002EF"><span class="RefLink">32.5-7</span></a>), which then delegate to the operations listed above.</p>
<p><a id="X7D28581F82481163" name="X7D28581F82481163"></a></p>
<h5>32.14-1 IsSPGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsSPGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNonSPGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><a id="X80D02AD183E01F16" name="X80D02AD183E01F16"></a></p>
<h5>32.14-2 IsGeneralMappingFamily</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGeneralMappingFamily</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>The family category of the category of general mappings.</p>
<p><a id="X86CFADBA7F2FE446" name="X86CFADBA7F2FE446"></a></p>
<h5>32.14-3 FamilyRange</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FamilyRange</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the elements family of the family of the range of each general mapping in the family <var class="Arg">Fam</var>.</p>
<p><a id="X7C3736E281A9E505" name="X7C3736E281A9E505"></a></p>
<h5>32.14-4 FamilySource</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FamilySource</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the elements family of the family of the source of each general mapping in the family <var class="Arg">Fam</var>.</p>
<p><a id="X7AE54FB67E2E6374" name="X7AE54FB67E2E6374"></a></p>
<h5>32.14-5 FamiliesOfGeneralMappingsAndRanges</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FamiliesOfGeneralMappingsAndRanges</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is a list that stores at the odd positions the families of general mappings with source in the family <var class="Arg">Fam</var>, at the even positions the families of ranges of the general mappings.</p>
<p><a id="X7E1E26E37C413F6F" name="X7E1E26E37C413F6F"></a></p>
<h5>32.14-6 GeneralMappingsFamily</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneralMappingsFamily</code>( <var class="Arg">sourcefam</var>, <var class="Arg">rangefam</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>All general mappings with same source family <var class="Arg">FS</var> and same range family <var class="Arg">FR</var> lie in the family <code class="code">GeneralMappingsFamily( <var class="Arg">FS</var>, <var class="Arg">FR</var> )</code>.</p>
<p><a id="X7CF92CC37A6BBDA5" name="X7CF92CC37A6BBDA5"></a></p>
<h5>32.14-7 TypeOfDefaultGeneralMapping</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TypeOfDefaultGeneralMapping</code>( <var class="Arg">source</var>, <var class="Arg">range</var>, <var class="Arg">filter</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>is the type of mappings with <code class="code">IsDefaultGeneralMappingRep</code> with source <var class="Arg">source</var> and range <var class="Arg">range</var> and additional categories <var class="Arg">filter</var>.</p>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap31.html">[Previous Chapter]</a> <a href="chap33.html">[Next Chapter]</a> </div>
<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>