Debian Codegraph @

doc/ref/chap32.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
7 <head>
8 <title>GAP (ref) - Chapter 32: Mappings</title>
9 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
10 <meta name="generator" content="GAPDoc2HTML" />
11 <link rel="stylesheet" type="text/css" href="manual.css" />
12 <script src="manual.js" type="text/javascript"></script>
13 <script type="text/javascript">overwriteStyle();</script>
14 </head>
15 <body class="chap32" onload="jscontent()">
16
17
18 <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>
19
20 <div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp; <a href="chap0.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap31.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap33.html">[Next Chapter]</a>&nbsp; </div>
21
22 <p id="mathjaxlink" class="pcenter"><a href="chap32_mj.html">[MathJax on]</a></p>
23 <p><a id="X7C9734B880042C73" name="X7C9734B880042C73"></a></p>
24 <div class="ChapSects"><a href="chap32.html#X7C9734B880042C73">32 <span class="Heading">Mappings</span></a>
25 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X859A13548515A5D7">32.1 <span class="Heading">Direct Products and their Elements</span></a>
26 </span>
27 <div class="ContSSBlock">
28 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X87FD9FE787023FF0">32.1-1 IsDirectProductElement</a></span>
29 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8226334A862C5219">32.1-2 DirectProductElement</a></span>
30 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X78F8A1168280E06D">32.1-3 DirectProductFamily</a></span>
31 </div></div>
32 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7CF6FEFB8290D5CB">32.2 <span class="Heading">Creating Mappings</span></a>
33 </span>
34 <div class="ContSSBlock">
35 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X79D0D2F07A14D039">32.2-1 GeneralMappingByElements</a></span>
36 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D55E1977ED70E01">32.2-2 <span class="Heading">MappingByFunction</span></a>
37 </span>
38 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X865FC25A87D36F3D">32.2-3 InverseGeneralMapping</a></span>
39 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7BD2D5A87CD6B213">32.2-4 RestrictedInverseGeneralMapping</a></span>
40 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7ED1E4E27CCE2DCA">32.2-5 CompositionMapping</a></span>
41 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86486B687B7077AC">32.2-6 CompositionMapping2</a></span>
42 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7A926D167C3155F6">32.2-7 IsCompositionMappingRep</a></span>
43 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X87775B438008DCA5">32.2-8 ConstituentsCompositionMapping</a></span>
44 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X795FF8DC785F110A">32.2-9 ZeroMapping</a></span>
45 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7EBAE0368470A603">32.2-10 IdentityMapping</a></span>
46 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86452F8587CBAEA0">32.2-11 <span class="Heading">Embedding</span></a>
47 </span>
48 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8769E8DA80BC96C1">32.2-12 <span class="Heading">Projection</span></a>
49 </span>
50 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X800014D683A81009">32.2-13 RestrictedMapping</a></span>
51 </div></div>
52 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7E5A430D7F838F1C">32.3 <span class="Heading">Properties and Attributes of (General) Mappings</span></a>
53 </span>
54 <div class="ContSSBlock">
55 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X83C7494E828CC9C8">32.3-1 IsTotal</a></span>
56 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86D44C8A78BF1981">32.3-2 IsSingleValued</a></span>
57 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7CC95EB282854385">32.3-3 IsMapping</a></span>
58 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7F065FD7822C0A12">32.3-4 IsInjective</a></span>
59 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X784ECE847E005B8F">32.3-5 IsSurjective</a></span>
60 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X878F56AB7B342767">32.3-6 IsBijective</a></span>
61 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7B6FD7277CDE9FCB">32.3-7 Range</a></span>
62 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7DE8173F80E07AB1">32.3-8 Source</a></span>
63 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X784F871383FB599B">32.3-9 UnderlyingRelation</a></span>
64 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X786581DE871A47D0">32.3-10 UnderlyingGeneralMapping</a></span>
65 </div></div>
66 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X83B4FF15847F06FC">32.4 <span class="Heading">Images under Mappings</span></a>
67 </span>
68 <div class="ContSSBlock">
69 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D23C1CE863DACD8">32.4-1 ImagesSource</a></span>
70 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X85ADB89B7C8DD7D0">32.4-2 ImagesRepresentative</a></span>
71 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D51184B7EE5B2CF">32.4-3 ImagesElm</a></span>
72 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8781348F7F5796A0">32.4-4 ImagesSet</a></span>
73 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7CFAB0157BFB1806">32.4-5 ImageElm</a></span>
74 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X87F4D35A826599C6">32.4-6 <span class="Heading">Image</span></a>
75 </span>
76 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86114B2E7E77488C">32.4-7 <span class="Heading">Images</span></a>
77 </span>
78 </div></div>
79 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X79BB1EC07C828667">32.5 <span class="Heading">Preimages under Mappings</span></a>
80 </span>
81 <div class="ContSSBlock">
82 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X78EF1FE77B0973C0">32.5-1 PreImagesRange</a></span>
83 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7FBB830C8729E995">32.5-2 PreImagesElm</a></span>
84 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D212F727CAE971A">32.5-3 PreImageElm</a></span>
85 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7AE24A1586B7DE79">32.5-4 PreImagesRepresentative</a></span>
86 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X856BAFC87B2D2811">32.5-5 PreImagesSet</a></span>
87 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X836FAEAC78B55BF4">32.5-6 <span class="Heading">PreImage</span></a>
88 </span>
89 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X85C8590E832002EF">32.5-7 <span class="Heading">PreImages</span></a>
90 </span>
91 </div></div>
92 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7E2E16277940FA0B">32.6 <span class="Heading">Arithmetic Operations for General Mappings</span></a>
93 </span>
94 </div>
95 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X834E02BB7D4B4AE5">32.7 <span class="Heading">Mappings which are Compatible with Algebraic Structures</span></a>
96 </span>
97 </div>
98 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X8008FCCC7F4C731F">32.8 <span class="Heading">Magma Homomorphisms</span></a>
99 </span>
100 <div class="ContSSBlock">
101 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7DC72CF28539A251">32.8-1 IsMagmaHomomorphism</a></span>
102 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8181676787E760A2">32.8-2 MagmaHomomorphismByFunctionNC</a></span>
103 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X79D0216E871B7051">32.8-3 NaturalHomomorphismByGenerators</a></span>
104 </div></div>
105 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X806F892C862F29F9">32.9 <span class="Heading">Mappings that Respect Multiplication</span></a>
106 </span>
107 <div class="ContSSBlock">
108 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7BEFF95883EAEC78">32.9-1 RespectsMultiplication</a></span>
109 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7EE4DA097AE9CBC1">32.9-2 RespectsOne</a></span>
110 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7F27AE9C84A4DF90">32.9-3 RespectsInverses</a></span>
111 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X819DD174829BF3AE">32.9-4 IsGroupGeneralMapping</a></span>
112 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X81A5A5CF846E5FBF">32.9-5 KernelOfMultiplicativeGeneralMapping</a></span>
113 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7F09B6E28080DCB4">32.9-6 CoKernelOfMultiplicativeGeneralMapping</a></span>
114 </div></div>
115 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X8455A5A67C35178B">32.10 <span class="Heading">Mappings that Respect Addition</span></a>
116 </span>
117 <div class="ContSSBlock">
118 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7A3321E878925C3A">32.10-1 RespectsAddition</a></span>
119 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8130D8907B92F746">32.10-2 RespectsAdditiveInverses</a></span>
120 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D342736781EB280">32.10-3 RespectsZero</a></span>
121 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7B99EF287A8A0BD9">32.10-4 IsAdditiveGroupGeneralMapping</a></span>
122 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7EC0E9907D6631D6">32.10-5 KernelOfAdditiveGeneralMapping</a></span>
123 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X813C6D7980213F41">32.10-6 CoKernelOfAdditiveGeneralMapping</a></span>
124 </div></div>
125 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7C24431C81532575">32.11 <span class="Heading">Linear Mappings</span></a>
126 </span>
127 <div class="ContSSBlock">
128 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X87842ED97FA19973">32.11-1 RespectsScalarMultiplication</a></span>
129 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X780BE6307A3271A9">32.11-2 IsLeftModuleGeneralMapping</a></span>
130 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7F6841107E59107F">32.11-3 IsLinearMapping</a></span>
131 </div></div>
132 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7E88C32A82E942DA">32.12 <span class="Heading">Ring Homomorphisms</span></a>
133 </span>
134 <div class="ContSSBlock">
135 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7C8DA031799B79D5">32.12-1 IsRingGeneralMapping</a></span>
136 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7988102883675606">32.12-2 IsRingWithOneGeneralMapping</a></span>
137 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86B14F908601DEA9">32.12-3 IsAlgebraGeneralMapping</a></span>
138 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X842AD44679C5BDC2">32.12-4 IsAlgebraWithOneGeneralMapping</a></span>
139 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8324DA78879DF4D7">32.12-5 IsFieldHomomorphism</a></span>
140 </div></div>
141 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7E4A55567BED0F88">32.13 <span class="Heading">General Mappings</span></a>
142 </span>
143 <div class="ContSSBlock">
144 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X8656AB8A7D672CAE">32.13-1 IsGeneralMapping</a></span>
145 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X791690817E23D90C">32.13-2 IsConstantTimeAccessGeneralMapping</a></span>
146 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X81CFF5F87BBEA8AD">32.13-3 IsEndoGeneralMapping</a></span>
147 </div></div>
148 <div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap32.html#X7D6F78587C00CDD0">32.14 <span class="Heading">Technical Matters Concerning General Mappings</span></a>
149 </span>
150 <div class="ContSSBlock">
151 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7D28581F82481163">32.14-1 IsSPGeneralMapping</a></span>
152 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X80D02AD183E01F16">32.14-2 IsGeneralMappingFamily</a></span>
153 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X86CFADBA7F2FE446">32.14-3 FamilyRange</a></span>
154 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7C3736E281A9E505">32.14-4 FamilySource</a></span>
155 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7AE54FB67E2E6374">32.14-5 FamiliesOfGeneralMappingsAndRanges</a></span>
156 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7E1E26E37C413F6F">32.14-6 GeneralMappingsFamily</a></span>
157 <span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap32.html#X7CF92CC37A6BBDA5">32.14-7 TypeOfDefaultGeneralMapping</a></span>
158 </div></div>
159 </div>
160
161 <h3>32 <span class="Heading">Mappings</span></h3>
162
163 <p>A <em>mapping</em> in <strong class="pkg">GAP</strong> is what is called a <q>function</q> 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 <q>relations</q>.</p>
164
165 <p>Most operations are declared for general mappings and therefore this manual often refers to <q>(general) mappings</q>, unless you deliberately need the generalization you can ignore the <q>general</q> bit and just read it as <q>mappings</q>.</p>
166
167 <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>
168
169 <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>
170
171 <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>
172
173 <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>
174
175 <p>The <em>ordering</em> of general mappings via <code class="code">&lt;</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>
176
177 <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>
178
179 <p>Some technical details of general mappings are described in section <a href="chap32.html#X7D6F78587C00CDD0"><span class="RefLink">32.14</span></a>.</p>
180
181 <p><a id="X859A13548515A5D7" name="X859A13548515A5D7"></a></p>
182
183 <h4>32.1 <span class="Heading">Direct Products and their Elements</span></h4>
184
185 <p><a id="X87FD9FE787023FF0" name="X87FD9FE787023FF0"></a></p>
186
187 <h5>32.1-1 IsDirectProductElement</h5>
188
189 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsDirectProductElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">(&nbsp;category&nbsp;)</td></tr></table></div>
190 <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>
191
192 <p>Note that each of these operations will cause an error message if its result for at least one component cannot be formed.</p>
193
194 <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 an object that is neither a list nor a collection is the direct product element of componentwise sums and products, respectively.</p>
195
196 <p><a id="X8226334A862C5219" name="X8226334A862C5219"></a></p>
197
198 <h5>32.1-2 DirectProductElement</h5>
199
200 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; DirectProductElement</code>( [<var class="Arg">fam</var>, ]<var class="Arg">objlist</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
201 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; DirectProductElementNC</code>( <var class="Arg">fam</var>, <var class="Arg">objlist</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
202 <p><code class="func">DirectProductElement</code> returns a direct product element whose components are the entries of the list <var class="Arg">objlist</var>. If the optional argument <var class="Arg">fam</var> is given, it must be the family of direct product elements with the appropriate component families; otherwise the family is determined from <var class="Arg">objlist</var>.</p>
203
204 <p><code class="func">DirectProductElementNC</code> does the same but omits the checks that <var class="Arg">fam</var> is consistent with <var class="Arg">objlist</var>.</p>
205
206 <p>Direct product elements behave like lists: they can be indexed with <code class="code"><var class="Arg">elm</var>[i]</code> to access the <span class="SimpleMath">i</span>-th component, and <code class="func">Length</code> (<a href="chap21.html#X780769238600AFD1"><span class="RefLink">21.17-5</span></a>) returns the number of components. Arithmetic operations (multiplication, powering, one, inverse, addition, zero, additive inverse) are performed componentwise.</p>
207
208
209 <div class="example"><pre>
210 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">a := (1,2,3);; b := (1,2);;</span>
211 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm := DirectProductElement([a, b]);</span>
212 DirectProductElement( [ (1,2,3), (1,2) ] )
213 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm[1];</span>
214 (1,2,3)
215 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm[2];</span>
216 (1,2)
217 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Length(elm);</span>
218 2
219 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm2 := DirectProductElement([b, a]);;</span>
220 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm * elm2;</span>
221 DirectProductElement( [ (2,3), (1,3) ] )
222 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">One(elm);</span>
223 DirectProductElement( [ (), () ] )
224 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Inverse(elm);</span>
225 DirectProductElement( [ (1,3,2), (1,2) ] )
226 </pre></div>
227
228 <p>The following example shows <code class="func">DirectProductElement</code> in the context of a direct product <span class="SimpleMath">K = G × H</span> built with <code class="func">DirectProduct</code> (<a href="chap49.html#X861BA02C7902A4F4"><span class="RefLink">49.1-1</span></a>), where <span class="SimpleMath">G</span> is a permutation group and <span class="SimpleMath">H</span> is a pc group. The projections of <span class="SimpleMath">K</span> are used to move between the direct product and its component groups.</p>
229
230
231 <div class="example"><pre>
232 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">G := DihedralGroup(IsPermGroup, 8);;</span>
233 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">H := CyclicGroup(IsPcGroup, 4);;</span>
234 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">K := DirectProduct(G, H);;</span>
235 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">proj1 := Projection(K, 1);; proj2 := Projection(K, 2);;</span>
236 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">g := (1,2,3,4);; h := GeneratorsOfGroup(H)[1];;</span>
237 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm := DirectProductElement([g, h]);</span>
238 DirectProductElement( [ (1,2,3,4), f1 ] )
239 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Image(proj1, elm) = g;</span>
240 true
241 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Image(proj2, elm) = h;</span>
242 true
243 </pre></div>
244
245 <p><a id="X78F8A1168280E06D" name="X78F8A1168280E06D"></a></p>
246
247 <h5>32.1-3 DirectProductFamily</h5>
248
249 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; DirectProductFamily</code>( <var class="Arg">args</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
250 <p><var class="Arg">args</var> must be a dense list of <code class="func">CollectionsFamily</code> (<a href="chap30.html#X84E5A67E87D8DD66"><span class="RefLink">30.2-1</span></a>) families, otherwise the function raises an error.</p>
251
252 <p><code class="func">DirectProductFamily</code> returns <code class="code">fam</code>, a collections family of <code class="func">IsDirectProductElement</code> (<a href="chap32.html#X87FD9FE787023FF0"><span class="RefLink">32.1-1</span></a>) objects.</p>
253
254 <p><code class="code">fam</code> is the <code class="func">CollectionsFamily</code> (<a href="chap30.html#X84E5A67E87D8DD66"><span class="RefLink">30.2-1</span></a>) of <code class="func">IsDirectProductElement</code> (<a href="chap32.html#X87FD9FE787023FF0"><span class="RefLink">32.1-1</span></a>) objects whose <code class="code">i</code>-th component is in <code class="code">ElementsFamily(args[i])</code>.</p>
255
256 <p>Note that a collection in <code class="code">fam</code> may not itself be a direct product; it just is a subcollection of a direct product.</p>
257
258
259 <div class="example"><pre>
260 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">D8 := DihedralGroup(IsPermGroup, 8);;</span>
261 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">FamilyObj(D8) = CollectionsFamily(PermutationsFamily);</span>
262 true
263 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fam := DirectProductFamily([FamilyObj(D8), FamilyObj(D8)]);;</span>
264 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ComponentsOfDirectProductElementsFamily(ElementsFamily(fam));</span>
265 [ &lt;Family: "PermutationsFamily"&gt;, &lt;Family: "PermutationsFamily"&gt; ]
266 </pre></div>
267
268 <p>Also note that not all direct products in <strong class="pkg">GAP</strong> are created via these families. For example if the arguments to <code class="func">DirectProduct</code> (<a href="chap49.html#X861BA02C7902A4F4"><span class="RefLink">49.1-1</span></a>) are permutation groups, then it returns a permutation group as well, whose elements are not <code class="func">IsDirectProductElement</code> (<a href="chap32.html#X87FD9FE787023FF0"><span class="RefLink">32.1-1</span></a>) objects.</p>
269
270
271 <div class="example"><pre>
272 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fam = FamilyObj(DirectProduct(D8, D8));</span>
273 false
274 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">D4 := DihedralGroup(IsPcGroup, 4);;</span>
275 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fam2 := DirectProductFamily([FamilyObj(D8), FamilyObj(D4)]);;</span>
276 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fam2 = FamilyObj(DirectProduct(D8, D4));</span>
277 true
278 </pre></div>
279
280 <p><a id="X7CF6FEFB8290D5CB" name="X7CF6FEFB8290D5CB"></a></p>
281
282 <h4>32.2 <span class="Heading">Creating Mappings</span></h4>
283
284 <p><a id="X79D0D2F07A14D039" name="X79D0D2F07A14D039"></a></p>
285
286 <h5>32.2-1 GeneralMappingByElements</h5>
287
288 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GeneralMappingByElements</code>( <var class="Arg">S</var>, <var class="Arg">R</var>, <var class="Arg">elms</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
289 <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>
290
291 <p><a id="X7D55E1977ED70E01" name="X7D55E1977ED70E01"></a></p>
292
293 <h5>32.2-2 <span class="Heading">MappingByFunction</span></h5>
294
295 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; 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">(&nbsp;function&nbsp;)</td></tr></table></div>
296 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; 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">(&nbsp;function&nbsp;)</td></tr></table></div>
297 <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>
298
299 <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>
300
301 <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>
302
303 <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>
304
305 <p><a id="X865FC25A87D36F3D" name="X865FC25A87D36F3D"></a></p>
306
307 <h5>32.2-3 InverseGeneralMapping</h5>
308
309 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; InverseGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
310 <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>
311
312 <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, then its inverse general mapping will know to be a mapping. However, <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) works for a bijective general mapping <var class="Arg">map</var> only if the source and range of <var class="Arg">map</var> coincide. This behaviour agrees with the definition of <var class="Arg">Inverse</var>.</p>
313
314 <p><a id="X7BD2D5A87CD6B213" name="X7BD2D5A87CD6B213"></a></p>
315
316 <h5>32.2-4 RestrictedInverseGeneralMapping</h5>
317
318 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RestrictedInverseGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
319 <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>
320
321 <p><a id="X7ED1E4E27CCE2DCA" name="X7ED1E4E27CCE2DCA"></a></p>
322
323 <h5>32.2-5 CompositionMapping</h5>
324
325 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CompositionMapping</code>( <var class="Arg">map1</var>, <var class="Arg">map2</var>, <var class="Arg">...</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
326 <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>). The result is a map that maps an element first under the last argument, then under the penultimate argument and so forth.</p>
327
328 <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 range of the <span class="SimpleMath">i+1</span>-th argument is identical to the range of the <span class="SimpleMath">i</span>-th argument, 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>
329
330 <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>
331
332
333 <div class="example"><pre>
334 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">f := GroupHomomorphismByImages(CyclicGroup(IsPermGroup, 2),</span>
335 <span class="GAPprompt">&gt;</span> <span class="GAPinput"> CyclicGroup(IsPermGroup, 1));</span>
336 [ (1,2) ] -&gt; [ () ]
337 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">g := GroupHomomorphismByImages(CyclicGroup(IsPermGroup, 6),</span>
338 <span class="GAPprompt">&gt;</span> <span class="GAPinput"> CyclicGroup(IsPermGroup, 2));</span>
339 [ (1,2,3,4,5,6) ] -&gt; [ (1,2) ]
340 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">CompositionMapping(f, g);</span>
341 [ (1,2,3,4,5,6) ] -&gt; [ () ]
342 <span class="GAPprompt">gap&gt;</span> <span class="GAPinput">CompositionMapping(g, f);</span>
343 [ (1,2) ] -&gt; [ () ]
344 </pre></div>
345
346 <p><a id="X86486B687B7077AC" name="X86486B687B7077AC"></a></p>
347
348 <h5>32.2-6 CompositionMapping2</h5>
349
350 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CompositionMapping2</code>( <var class="Arg">map2</var>, <var class="Arg">map1</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
351 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CompositionMapping2General</code>( <var class="Arg">map2</var>, <var class="Arg">map1</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
352 <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>
353
354 <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>
355
356 <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>
357
358 <p><a id="X7A926D167C3155F6" name="X7A926D167C3155F6"></a></p>
359
360 <h5>32.2-7 IsCompositionMappingRep</h5>
361
362 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsCompositionMappingRep</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;representation&nbsp;)</td></tr></table></div>
363 <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>
364
365 <p><a id="X87775B438008DCA5" name="X87775B438008DCA5"></a></p>
366
367 <h5>32.2-8 ConstituentsCompositionMapping</h5>
368
369 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ConstituentsCompositionMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
370 <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>
371
372 <p><a id="X795FF8DC785F110A" name="X795FF8DC785F110A"></a></p>
373
374 <h5>32.2-9 ZeroMapping</h5>
375
376 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ZeroMapping</code>( <var class="Arg">S</var>, <var class="Arg">R</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
377 <p>A zero mapping is a total general mapping that maps each element of its source to the zero element of its range.</p>
378
379 <p>(Each mapping with empty source is a zero mapping.)</p>
380
381 <p><a id="X7EBAE0368470A603" name="X7EBAE0368470A603"></a></p>
382
383 <h5>32.2-10 IdentityMapping</h5>
384
385 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IdentityMapping</code>( <var class="Arg">D</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
386 <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>
387
388 <p><a id="X86452F8587CBAEA0" name="X86452F8587CBAEA0"></a></p>
389
390 <h5>32.2-11 <span class="Heading">Embedding</span></h5>
391
392 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Embedding</code>( <var class="Arg">S</var>, <var class="Arg">T</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
393 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Embedding</code>( <var class="Arg">S</var>, <var class="Arg">i</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
394 <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>
395
396 <p><a id="X8769E8DA80BC96C1" name="X8769E8DA80BC96C1"></a></p>
397
398 <h5>32.2-12 <span class="Heading">Projection</span></h5>
399
400 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Projection</code>( <var class="Arg">S</var>, <var class="Arg">T</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
401 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Projection</code>( <var class="Arg">S</var>, <var class="Arg">i</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
402 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Projection</code>( <var class="Arg">S</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
403 <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>
404
405 <p><a id="X800014D683A81009" name="X800014D683A81009"></a></p>
406
407 <h5>32.2-13 RestrictedMapping</h5>
408
409 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RestrictedMapping</code>( <var class="Arg">map</var>, <var class="Arg">subdom</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
410 <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>
411
412 <p><a id="X7E5A430D7F838F1C" name="X7E5A430D7F838F1C"></a></p>
413
414 <h4>32.3 <span class="Heading">Properties and Attributes of (General) Mappings</span></h4>
415
416 <p><a id="X83C7494E828CC9C8" name="X83C7494E828CC9C8"></a></p>
417
418 <h5>32.3-1 IsTotal</h5>
419
420 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsTotal</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
421 <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>
422
423 <p><a id="X86D44C8A78BF1981" name="X86D44C8A78BF1981"></a></p>
424
425 <h5>32.3-2 IsSingleValued</h5>
426
427 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsSingleValued</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
428 <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>
429
430 <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>
431
432 <p><a id="X7CC95EB282854385" name="X7CC95EB282854385"></a></p>
433
434 <h5>32.3-3 IsMapping</h5>
435
436 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
437 <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>
438
439 <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>
440
441 <p><a id="X7F065FD7822C0A12" name="X7F065FD7822C0A12"></a></p>
442
443 <h5>32.3-4 IsInjective</h5>
444
445 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsInjective</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
446 <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>
447
448 <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>
449
450 <p><a id="X784ECE847E005B8F" name="X784ECE847E005B8F"></a></p>
451
452 <h5>32.3-5 IsSurjective</h5>
453
454 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsSurjective</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
455 <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>
456
457 <p><a id="X878F56AB7B342767" name="X878F56AB7B342767"></a></p>
458
459 <h5>32.3-6 IsBijective</h5>
460
461 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsBijective</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
462 <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>
463
464 <p><a id="X7B6FD7277CDE9FCB" name="X7B6FD7277CDE9FCB"></a></p>
465
466 <h5>32.3-7 Range</h5>
467
468 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Range</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
469 <p>The range of a general mapping.</p>
470
471 <p><a id="X7DE8173F80E07AB1" name="X7DE8173F80E07AB1"></a></p>
472
473 <h5>32.3-8 Source</h5>
474
475 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Source</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
476 <p>The source of a general mapping.</p>
477
478 <p><a id="X784F871383FB599B" name="X784F871383FB599B"></a></p>
479
480 <h5>32.3-9 UnderlyingRelation</h5>
481
482 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; UnderlyingRelation</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
483 <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>
484
485 <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>
486
487 <p><a id="X786581DE871A47D0" name="X786581DE871A47D0"></a></p>
488
489 <h5>32.3-10 UnderlyingGeneralMapping</h5>
490
491 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; UnderlyingGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
492 <p>attribute for underlying relations of general mappings</p>
493
494 <p><a id="X83B4FF15847F06FC" name="X83B4FF15847F06FC"></a></p>
495
496 <h4>32.4 <span class="Heading">Images under Mappings</span></h4>
497
498 <p><a id="X7D23C1CE863DACD8" name="X7D23C1CE863DACD8"></a></p>
499
500 <h5>32.4-1 ImagesSource</h5>
501
502 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ImagesSource</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
503 <p>is the set of images of the source of the general mapping <var class="Arg">map</var>.</p>
504
505 <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>
506
507 <p><a id="X85ADB89B7C8DD7D0" name="X85ADB89B7C8DD7D0"></a></p>
508
509 <h5>32.4-2 ImagesRepresentative</h5>
510
511 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ImagesRepresentative</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
512 <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>
513
514 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
515
516 <p><a id="X7D51184B7EE5B2CF" name="X7D51184B7EE5B2CF"></a></p>
517
518 <h5>32.4-3 ImagesElm</h5>
519
520 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ImagesElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
521 <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>
522
523 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
524
525 <p><a id="X8781348F7F5796A0" name="X8781348F7F5796A0"></a></p>
526
527 <h5>32.4-4 ImagesSet</h5>
528
529 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ImagesSet</code>( <var class="Arg">map</var>, <var class="Arg">elms</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
530 <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>
531
532 <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>
533
534 <p><a id="X7CFAB0157BFB1806" name="X7CFAB0157BFB1806"></a></p>
535
536 <h5>32.4-5 ImageElm</h5>
537
538 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ImageElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
539 <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>
540
541 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the source of <var class="Arg">map</var>.</p>
542
543 <p><a id="X87F4D35A826599C6" name="X87F4D35A826599C6"></a></p>
544
545 <h5>32.4-6 <span class="Heading">Image</span></h5>
546
547 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Image</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
548 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Image</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
549 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Image</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
550 <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>
551
552 <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> or as <var class="Arg">map</var><code class="code">( </code><var class="Arg">elm</var><code class="code"> )</code>.</p>
553
554 <p>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>
555
556 <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>.</p>
557
558 <p><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>
559
560 <p><code class="code">Image( <var class="Arg">map</var>, <var class="Arg">coll</var> )</code> can also be expressed as <code class="code"><var class="Arg">map</var>(<var class="Arg">coll</var>)</code> and <code class="code">Image( <var class="Arg">map</var>, <var class="Arg">elm</var> )</code> as <code class="code"><var class="Arg">map</var>(<var class="Arg">elm</var>)</code>. Those using this notation should remember that composition of mappings in <strong class="pkg">GAP</strong> still follows the conventions appropriate for mapping acting from the right, so that <code class="code">(<var class="Arg">map1</var>*<var class="Arg">map2</var>)(<var class="Arg">x</var>)</code> is equivalent to <code class="code"><var class="Arg">map2</var>(<var class="Arg">map1</var>(<var class="Arg">x</var>))</code></p>
561
562 <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>
563
564 <p>If the second argument is not an element or a subset of the source of the first argument, an error is signalled.</p>
565
566 <p><a id="X86114B2E7E77488C" name="X86114B2E7E77488C"></a></p>
567
568 <h5>32.4-7 <span class="Heading">Images</span></h5>
569
570 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Images</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
571 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Images</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
572 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Images</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
573 <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>
574
575 <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>
576
577 <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>
578
579 <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>
580
581 <p>If the second argument is not an element or a subset of the source of the first argument, an error is signalled.</p>
582
583 <p><a id="X79BB1EC07C828667" name="X79BB1EC07C828667"></a></p>
584
585 <h4>32.5 <span class="Heading">Preimages under Mappings</span></h4>
586
587 <p><a id="X78EF1FE77B0973C0" name="X78EF1FE77B0973C0"></a></p>
588
589 <h5>32.5-1 PreImagesRange</h5>
590
591 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImagesRange</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
592 <p>is the set of preimages of the range of the general mapping <var class="Arg">map</var>.</p>
593
594 <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>
595
596 <p><a id="X7FBB830C8729E995" name="X7FBB830C8729E995"></a></p>
597
598 <h5>32.5-2 PreImagesElm</h5>
599
600 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImagesElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
601 <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>
602
603 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
604
605 <p><a id="X7D212F727CAE971A" name="X7D212F727CAE971A"></a></p>
606
607 <h5>32.5-3 PreImageElm</h5>
608
609 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImageElm</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
610 <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>
611
612 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
613
614 <p><a id="X7AE24A1586B7DE79" name="X7AE24A1586B7DE79"></a></p>
615
616 <h5>32.5-4 PreImagesRepresentative</h5>
617
618 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImagesRepresentative</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
619 <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>
620
621 <p>Anything may happen if <var class="Arg">elm</var> is not an element of the range of <var class="Arg">map</var>.</p>
622
623 <p><a id="X856BAFC87B2D2811" name="X856BAFC87B2D2811"></a></p>
624
625 <h5>32.5-5 PreImagesSet</h5>
626
627 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImagesSet</code>( <var class="Arg">map</var>, <var class="Arg">elms</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
628 <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>
629
630 <p>Anything may happen if <var class="Arg">elms</var> is not a subset of the range of <var class="Arg">map</var>.</p>
631
632 <p><a id="X836FAEAC78B55BF4" name="X836FAEAC78B55BF4"></a></p>
633
634 <h5>32.5-6 <span class="Heading">PreImage</span></h5>
635
636 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImage</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
637 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImage</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
638 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImage</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
639 <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>
640
641 <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>
642
643 <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>
644
645 <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>
646
647 <p>If the second argument is not an element or a subset of the range of the first argument, an error is signalled.</p>
648
649 <p><a id="X85C8590E832002EF" name="X85C8590E832002EF"></a></p>
650
651 <h5>32.5-7 <span class="Heading">PreImages</span></h5>
652
653 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImages</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
654 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImages</code>( <var class="Arg">map</var>, <var class="Arg">elm</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
655 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; PreImages</code>( <var class="Arg">map</var>, <var class="Arg">coll</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
656 <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>
657
658 <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>
659
660 <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>
661
662 <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>
663
664 <p>If the second argument is not an element or a subset of the range of the first argument, an error is signalled.</p>
665
666 <p><a id="X7E2E16277940FA0B" name="X7E2E16277940FA0B"></a></p>
667
668 <h4>32.6 <span class="Heading">Arithmetic Operations for General Mappings</span></h4>
669
670 <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>
671
672 <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>
673
674 <p><em>Scalar multiplication</em> of general mappings is defined likewise.</p>
675
676 <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>
677
678 <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>
679
680 <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>
681
682 <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>
683
684 <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>
685
686 <p><a id="X834E02BB7D4B4AE5" name="X834E02BB7D4B4AE5"></a></p>
687
688 <h4>32.7 <span class="Heading">Mappings which are Compatible with Algebraic Structures</span></h4>
689
690 <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>
691
692 <ol>
693 <li><p>General mappings that respect multiplication</p>
694
695 </li>
696 <li><p>General mappings that respect addition</p>
697
698 </li>
699 <li><p>General mappings that respect scalar mult.</p>
700
701 </li>
702 <li><p>General mappings that respect multiplicative and additive structure</p>
703
704 </li>
705 </ol>
706 <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>
707
708 <p><a id="X8008FCCC7F4C731F" name="X8008FCCC7F4C731F"></a></p>
709
710 <h4>32.8 <span class="Heading">Magma Homomorphisms</span></h4>
711
712 <p><a id="X7DC72CF28539A251" name="X7DC72CF28539A251"></a></p>
713
714 <h5>32.8-1 IsMagmaHomomorphism</h5>
715
716 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsMagmaHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
717 <p>A <em>magma homomorphism</em> is a total single valued mapping which respects multiplication.</p>
718
719 <p><a id="X8181676787E760A2" name="X8181676787E760A2"></a></p>
720
721 <h5>32.8-2 MagmaHomomorphismByFunctionNC</h5>
722
723 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; MagmaHomomorphismByFunctionNC</code>( <var class="Arg">G</var>, <var class="Arg">H</var>, <var class="Arg">fn</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
724 <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>
725
726 <p><a id="X79D0216E871B7051" name="X79D0216E871B7051"></a></p>
727
728 <h5>32.8-3 NaturalHomomorphismByGenerators</h5>
729
730 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; NaturalHomomorphismByGenerators</code>( <var class="Arg">f</var>, <var class="Arg">s</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
731 <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>
732
733 <p><a id="X806F892C862F29F9" name="X806F892C862F29F9"></a></p>
734
735 <h4>32.9 <span class="Heading">Mappings that Respect Multiplication</span></h4>
736
737 <p><a id="X7BEFF95883EAEC78" name="X7BEFF95883EAEC78"></a></p>
738
739 <h5>32.9-1 RespectsMultiplication</h5>
740
741 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsMultiplication</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
742 <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>
743
744 <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>
745
746 <p><a id="X7EE4DA097AE9CBC1" name="X7EE4DA097AE9CBC1"></a></p>
747
748 <h5>32.9-2 RespectsOne</h5>
749
750 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsOne</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
751 <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>
752
753 <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>
754
755 <p><a id="X7F27AE9C84A4DF90" name="X7F27AE9C84A4DF90"></a></p>
756
757 <h5>32.9-3 RespectsInverses</h5>
758
759 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsInverses</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
760 <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>
761
762 <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>
763
764 <p><a id="X819DD174829BF3AE" name="X819DD174829BF3AE"></a></p>
765
766 <h5>32.9-4 IsGroupGeneralMapping</h5>
767
768 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsGroupGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
769 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsGroupHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
770 <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>
771
772 <p>Chapter <a href="chap40.html#X83702FC27B3C3098"><span class="RefLink">40</span></a> explains group homomorphisms in more detail.</p>
773
774 <p><a id="X81A5A5CF846E5FBF" name="X81A5A5CF846E5FBF"></a></p>
775
776 <h5>32.9-5 KernelOfMultiplicativeGeneralMapping</h5>
777
778 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; KernelOfMultiplicativeGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
779 <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>
780
781 <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>
782
783 <p><a id="X7F09B6E28080DCB4" name="X7F09B6E28080DCB4"></a></p>
784
785 <h5>32.9-6 CoKernelOfMultiplicativeGeneralMapping</h5>
786
787 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CoKernelOfMultiplicativeGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
788 <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>
789
790 <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>
791
792 <p><a id="X8455A5A67C35178B" name="X8455A5A67C35178B"></a></p>
793
794 <h4>32.10 <span class="Heading">Mappings that Respect Addition</span></h4>
795
796 <p><a id="X7A3321E878925C3A" name="X7A3321E878925C3A"></a></p>
797
798 <h5>32.10-1 RespectsAddition</h5>
799
800 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsAddition</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
801 <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>
802
803 <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>
804
805 <p><a id="X8130D8907B92F746" name="X8130D8907B92F746"></a></p>
806
807 <h5>32.10-2 RespectsAdditiveInverses</h5>
808
809 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsAdditiveInverses</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
810 <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>
811
812 <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>
813
814 <p><a id="X7D342736781EB280" name="X7D342736781EB280"></a></p>
815
816 <h5>32.10-3 RespectsZero</h5>
817
818 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsZero</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
819 <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>
820
821 <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>
822
823 <p><a id="X7B99EF287A8A0BD9" name="X7B99EF287A8A0BD9"></a></p>
824
825 <h5>32.10-4 IsAdditiveGroupGeneralMapping</h5>
826
827 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAdditiveGroupGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
828 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAdditiveGroupHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
829 <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>
830
831 <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>
832
833 <p><a id="X7EC0E9907D6631D6" name="X7EC0E9907D6631D6"></a></p>
834
835 <h5>32.10-5 KernelOfAdditiveGeneralMapping</h5>
836
837 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; KernelOfAdditiveGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
838 <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>
839
840 <p><a id="X813C6D7980213F41" name="X813C6D7980213F41"></a></p>
841
842 <h5>32.10-6 CoKernelOfAdditiveGeneralMapping</h5>
843
844 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CoKernelOfAdditiveGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
845 <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>
846
847 <p><a id="X7C24431C81532575" name="X7C24431C81532575"></a></p>
848
849 <h4>32.11 <span class="Heading">Linear Mappings</span></h4>
850
851 <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>
852
853 <p><a id="X87842ED97FA19973" name="X87842ED97FA19973"></a></p>
854
855 <h5>32.11-1 RespectsScalarMultiplication</h5>
856
857 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RespectsScalarMultiplication</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
858 <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>
859
860 <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>
861
862 <p><a id="X780BE6307A3271A9" name="X780BE6307A3271A9"></a></p>
863
864 <h5>32.11-2 IsLeftModuleGeneralMapping</h5>
865
866 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsLeftModuleGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
867 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsLeftModuleHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
868 <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>
869
870 <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>
871
872 <p><a id="X7F6841107E59107F" name="X7F6841107E59107F"></a></p>
873
874 <h5>32.11-3 IsLinearMapping</h5>
875
876 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsLinearMapping</code>( <var class="Arg">F</var>, <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;operation&nbsp;)</td></tr></table></div>
877 <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>
878
879 <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>
880
881 <p><a id="X7E88C32A82E942DA" name="X7E88C32A82E942DA"></a></p>
882
883 <h4>32.12 <span class="Heading">Ring Homomorphisms</span></h4>
884
885 <p><a id="X7C8DA031799B79D5" name="X7C8DA031799B79D5"></a></p>
886
887 <h5>32.12-1 IsRingGeneralMapping</h5>
888
889 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsRingGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
890 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsRingHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
891 <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>
892
893 <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>
894
895 <p><a id="X7988102883675606" name="X7988102883675606"></a></p>
896
897 <h5>32.12-2 IsRingWithOneGeneralMapping</h5>
898
899 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsRingWithOneGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
900 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsRingWithOneHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
901 <p><a id="X86B14F908601DEA9" name="X86B14F908601DEA9"></a></p>
902
903 <h5>32.12-3 IsAlgebraGeneralMapping</h5>
904
905 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAlgebraGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
906 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAlgebraHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
907 <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>
908
909 <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>
910
911 <p><a id="X842AD44679C5BDC2" name="X842AD44679C5BDC2"></a></p>
912
913 <h5>32.12-4 IsAlgebraWithOneGeneralMapping</h5>
914
915 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAlgebraWithOneGeneralMapping</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
916 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsAlgebraWithOneHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;filter&nbsp;)</td></tr></table></div>
917 <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>
918
919 <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>
920
921 <p><a id="X8324DA78879DF4D7" name="X8324DA78879DF4D7"></a></p>
922
923 <h5>32.12-5 IsFieldHomomorphism</h5>
924
925 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsFieldHomomorphism</code>( <var class="Arg">mapp</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
926 <p>A general mapping is a field homomorphism if and only if it is a ring homomorphism with source a field.</p>
927
928 <p><a id="X7E4A55567BED0F88" name="X7E4A55567BED0F88"></a></p>
929
930 <h4>32.13 <span class="Heading">General Mappings</span></h4>
931
932 <p><a id="X8656AB8A7D672CAE" name="X8656AB8A7D672CAE"></a></p>
933
934 <h5>32.13-1 IsGeneralMapping</h5>
935
936 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;category&nbsp;)</td></tr></table></div>
937 <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>
938
939 <p><a id="X791690817E23D90C" name="X791690817E23D90C"></a></p>
940
941 <h5>32.13-2 IsConstantTimeAccessGeneralMapping</h5>
942
943 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsConstantTimeAccessGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
944 <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>
945
946 <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>
947
948 <p><a id="X81CFF5F87BBEA8AD" name="X81CFF5F87BBEA8AD"></a></p>
949
950 <h5>32.13-3 IsEndoGeneralMapping</h5>
951
952 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsEndoGeneralMapping</code>( <var class="Arg">obj</var> )</td><td class="tdright">(&nbsp;property&nbsp;)</td></tr></table></div>
953 <p>If a general mapping has this property then its source and range are equal.</p>
954
955 <p><a id="X7D6F78587C00CDD0" name="X7D6F78587C00CDD0"></a></p>
956
957 <h4>32.14 <span class="Heading">Technical Matters Concerning General Mappings</span></h4>
958
959 <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>
960
961 <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>
962
963 <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>
964
965 <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>
966
967 <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>
968
969 <p>In order to avoid infinite recursions, we must distinguish between the two different types of mappings.</p>
970
971 <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>
972
973 <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>
974
975 <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>
976
977 <p><a id="X7D28581F82481163" name="X7D28581F82481163"></a></p>
978
979 <h5>32.14-1 IsSPGeneralMapping</h5>
980
981 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsSPGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;category&nbsp;)</td></tr></table></div>
982 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsNonSPGeneralMapping</code>( <var class="Arg">map</var> )</td><td class="tdright">(&nbsp;category&nbsp;)</td></tr></table></div>
983 <p><a id="X80D02AD183E01F16" name="X80D02AD183E01F16"></a></p>
984
985 <h5>32.14-2 IsGeneralMappingFamily</h5>
986
987 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsGeneralMappingFamily</code>( <var class="Arg">obj</var> )</td><td class="tdright">(&nbsp;category&nbsp;)</td></tr></table></div>
988 <p>The family category of the category of general mappings.</p>
989
990 <p><a id="X86CFADBA7F2FE446" name="X86CFADBA7F2FE446"></a></p>
991
992 <h5>32.14-3 FamilyRange</h5>
993
994 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; FamilyRange</code>( <var class="Arg">Fam</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
995 <p>is the elements family of the family of the range of each general mapping in the family <var class="Arg">Fam</var>.</p>
996
997 <p><a id="X7C3736E281A9E505" name="X7C3736E281A9E505"></a></p>
998
999 <h5>32.14-4 FamilySource</h5>
1000
1001 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; FamilySource</code>( <var class="Arg">Fam</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
1002 <p>is the elements family of the family of the source of each general mapping in the family <var class="Arg">Fam</var>.</p>
1003
1004 <p><a id="X7AE54FB67E2E6374" name="X7AE54FB67E2E6374"></a></p>
1005
1006 <h5>32.14-5 FamiliesOfGeneralMappingsAndRanges</h5>
1007
1008 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; FamiliesOfGeneralMappingsAndRanges</code>( <var class="Arg">Fam</var> )</td><td class="tdright">(&nbsp;attribute&nbsp;)</td></tr></table></div>
1009 <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>
1010
1011 <p><a id="X7E1E26E37C413F6F" name="X7E1E26E37C413F6F"></a></p>
1012
1013 <h5>32.14-6 GeneralMappingsFamily</h5>
1014
1015 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GeneralMappingsFamily</code>( <var class="Arg">sourcefam</var>, <var class="Arg">rangefam</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
1016 <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>
1017
1018 <p><a id="X7CF92CC37A6BBDA5" name="X7CF92CC37A6BBDA5"></a></p>
1019
1020 <h5>32.14-7 TypeOfDefaultGeneralMapping</h5>
1021
1022 <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; TypeOfDefaultGeneralMapping</code>( <var class="Arg">source</var>, <var class="Arg">range</var>, <var class="Arg">filter</var> )</td><td class="tdright">(&nbsp;function&nbsp;)</td></tr></table></div>
1023 <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>
1024
1025
1026 <div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp; <a href="chap0.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap31.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap33.html">[Next Chapter]</a>&nbsp; </div>
1027
1028
1029 <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>
1030
1031 <hr />
1032 <p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
1033 </body>
1034 </html>