This file is indexed.

/usr/share/gap/doc/ref/chap65.html is in gap-doc 4r6p5-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (ref) - Chapter 65: Magma Rings</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap65"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chap11.html">11</a>  <a href="chap12.html">12</a>  <a href="chap13.html">13</a>  <a href="chap14.html">14</a>  <a href="chap15.html">15</a>  <a href="chap16.html">16</a>  <a href="chap17.html">17</a>  <a href="chap18.html">18</a>  <a href="chap19.html">19</a>  <a href="chap20.html">20</a>  <a href="chap21.html">21</a>  <a href="chap22.html">22</a>  <a href="chap23.html">23</a>  <a href="chap24.html">24</a>  <a href="chap25.html">25</a>  <a href="chap26.html">26</a>  <a href="chap27.html">27</a>  <a href="chap28.html">28</a>  <a href="chap29.html">29</a>  <a href="chap30.html">30</a>  <a href="chap31.html">31</a>  <a href="chap32.html">32</a>  <a href="chap33.html">33</a>  <a href="chap34.html">34</a>  <a href="chap35.html">35</a>  <a href="chap36.html">36</a>  <a href="chap37.html">37</a>  <a href="chap38.html">38</a>  <a href="chap39.html">39</a>  <a href="chap40.html">40</a>  <a href="chap41.html">41</a>  <a href="chap42.html">42</a>  <a href="chap43.html">43</a>  <a href="chap44.html">44</a>  <a href="chap45.html">45</a>  <a href="chap46.html">46</a>  <a href="chap47.html">47</a>  <a href="chap48.html">48</a>  <a href="chap49.html">49</a>  <a href="chap50.html">50</a>  <a href="chap51.html">51</a>  <a href="chap52.html">52</a>  <a href="chap53.html">53</a>  <a href="chap54.html">54</a>  <a href="chap55.html">55</a>  <a href="chap56.html">56</a>  <a href="chap57.html">57</a>  <a href="chap58.html">58</a>  <a href="chap59.html">59</a>  <a href="chap60.html">60</a>  <a href="chap61.html">61</a>  <a href="chap62.html">62</a>  <a href="chap63.html">63</a>  <a href="chap64.html">64</a>  <a href="chap65.html">65</a>  <a href="chap66.html">66</a>  <a href="chap67.html">67</a>  <a href="chap68.html">68</a>  <a href="chap69.html">69</a>  <a href="chap70.html">70</a>  <a href="chap71.html">71</a>  <a href="chap72.html">72</a>  <a href="chap73.html">73</a>  <a href="chap74.html">74</a>  <a href="chap75.html">75</a>  <a href="chap76.html">76</a>  <a href="chap77.html">77</a>  <a href="chap78.html">78</a>  <a href="chap79.html">79</a>  <a href="chap80.html">80</a>  <a href="chap81.html">81</a>  <a href="chap82.html">82</a>  <a href="chap83.html">83</a>  <a href="chap84.html">84</a>  <a href="chap85.html">85</a>  <a href="chap86.html">86</a>  <a href="chap87.html">87</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp;  <a href="chap0.html#contents">[Contents]</a>&nbsp;  &nbsp;<a href="chap64.html">[Previous Chapter]</a>&nbsp;  &nbsp;<a href="chap66.html">[Next Chapter]</a>&nbsp;  </div>

<p id="mathjaxlink" class="pcenter"><a href="chap65_mj.html">[MathJax on]</a></p>
<p><a id="X825897DC7A16E07D" name="X825897DC7A16E07D"></a></p>
<div class="ChapSects"><a href="chap65.html#X825897DC7A16E07D">65 <span class="Heading">Magma Rings</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X8398F87F8231A163">65.1 <span class="Heading">Free Magma Rings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7B9AF0A47F44E4B4">65.1-1 FreeMagmaRing</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X86D2CA90847C091B">65.1-2 GroupRing</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7A24B95C8210BD09">65.1-3 IsFreeMagmaRing</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X8382ED697A28CE67">65.1-4 IsFreeMagmaRingWithOne</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X82C63644805EB1EE">65.1-5 IsGroupRing</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X848D60417DFF7947">65.1-6 UnderlyingMagma</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7B21DB3E7CD80983">65.1-7 AugmentationIdeal</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X8402D3897F2C5955">65.2 <span class="Heading">Elements of Free Magma Rings</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X827B2D7D7E41780C">65.2-1 IsMagmaRingObjDefaultRep</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7D9C684A81E66310">65.2-2 IsElementOfFreeMagmaRing</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X869768AF7B444BF8">65.2-3 IsElementOfFreeMagmaRingFamily</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X843D1D8578C33513">65.2-4 CoefficientsAndMagmaElements</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X78C3DB417E353390">65.2-5 ZeroCoefficient</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X8671DE0A81BEEFB0">65.2-6 ElementOfMagmaRing</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X80366F1480ACD8DF">65.3 <span class="Heading">Natural Embeddings related to Magma Rings</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X81B002EE799B5E77">65.4 <span class="Heading">Magma Rings modulo Relations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X869D54847E881848">65.4-1 IsElementOfMagmaRingModuloRelations</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X875BEB1A840FFAA4">65.4-2 IsElementOfMagmaRingModuloRelationsFamily</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X85956ED27FA6AC68">65.4-3 NormalizedElementOfMagmaRingModuloRelations</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X804B5AAB813E184D">65.4-4 IsMagmaRingModuloRelations</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X7D859DBF81DFA751">65.5 <span class="Heading">Magma Rings modulo the Span of a Zero Element</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7B3D45A6802B695C">65.5-1 IsElementOfMagmaRingModuloSpanOfZeroFamily</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X872713EE84DA9B72">65.5-2 IsMagmaRingModuloSpanOfZero</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap65.html#X7A7F880D7D7D3722">65.5-3 MagmaRingModuloSpanOfZero</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap65.html#X79889F017F2EB7ED">65.6 <span class="Heading">Technical Details about the Implementation of Magma Rings</span></a>
</span>
</div>
</div>

<h3>65 <span class="Heading">Magma Rings</span></h3>

<p>Given a magma <span class="SimpleMath">M</span> then the <em>free magma ring</em> (or <em>magma ring</em> for short) <span class="SimpleMath">RM</span> of <span class="SimpleMath">M</span> over a ring-with-one <span class="SimpleMath">R</span> is the set of finite sums <span class="SimpleMath">∑_{i ∈ I} r_i m_i</span> with <span class="SimpleMath">r_i ∈ R</span>, and <span class="SimpleMath">m_i ∈ M</span>. With the obvious addition and <span class="SimpleMath">R</span>-action from the left, <span class="SimpleMath">RM</span> is a free <span class="SimpleMath">R</span>-module with <span class="SimpleMath">R</span>-basis <span class="SimpleMath">M</span>, and with the usual convolution product, <span class="SimpleMath">RM</span> is a ring.</p>

<p>Typical examples of free magma rings are</p>


<ul>
<li><p>(multivariate) polynomial rings (see <a href="chap66.html#X7C59471783C3FEDC"><span class="RefLink">66.15</span></a>), where the magma is a free abelian monoid generated by the indeterminates,</p>

</li>
<li><p>group rings (see <code class="func">IsGroupRing</code> (<a href="chap65.html#X82C63644805EB1EE"><span class="RefLink">65.1-5</span></a>)), where the magma is a group,</p>

</li>
<li><p>Laurent polynomial rings, which are group rings of the free abelian groups generated by the indeterminates,</p>

</li>
<li><p>free algebras and free associative algebras, with or without one, where the magma is a free magma or a free semigroup, or a free magma-with-one or a free monoid, respectively.</p>

</li>
</ul>
<p>Note that formally, polynomial rings in <strong class="pkg">GAP</strong> are not constructed as free magma rings.</p>

<p>Furthermore, a free Lie algebra is <em>not</em> a magma ring, because of the additional relations given by the Jacobi identity; see <a href="chap65.html#X81B002EE799B5E77"><span class="RefLink">65.4</span></a> for a generalization of magma rings that covers such structures.</p>

<p>The coefficient ring <span class="SimpleMath">R</span> and the magma <span class="SimpleMath">M</span> cannot be regarded as subsets of <span class="SimpleMath">RM</span>, hence the natural <em>embeddings</em> of <span class="SimpleMath">R</span> and <span class="SimpleMath">M</span> into <span class="SimpleMath">RM</span> must be handled via explicit embedding maps (see <a href="chap65.html#X80366F1480ACD8DF"><span class="RefLink">65.3</span></a>). Note that in a magma ring, the addition of elements is in general different from an addition that may be defined already for the elements of the magma; for example, the addition in the group ring of a matrix group does in general <em>not</em> coincide with the addition of matrices.</p>


<div class="example"><pre>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">a:= Algebra( GF(2), [ [ [ Z(2) ] ] ] );;  Size( a );</span>
2
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">rm:= FreeMagmaRing( GF(2), a );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">emb:= Embedding( a, rm );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">z:= Zero( a );;  o:= One( a );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">imz:= z ^ emb;  IsZero( imz );</span>
(Z(2)^0)*[ [ 0*Z(2) ] ]
false
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">im1:= ( z + o ) ^ emb;</span>
(Z(2)^0)*[ [ Z(2)^0 ] ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">im2:= z ^ emb + o ^ emb;</span>
(Z(2)^0)*[ [ 0*Z(2) ] ]+(Z(2)^0)*[ [ Z(2)^0 ] ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">im1 = im2;</span>
false
</pre></div>

<p><a id="X8398F87F8231A163" name="X8398F87F8231A163"></a></p>

<h4>65.1 <span class="Heading">Free Magma Rings</span></h4>

<p><a id="X7B9AF0A47F44E4B4" name="X7B9AF0A47F44E4B4"></a></p>

<h5>65.1-1 FreeMagmaRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; FreeMagmaRing</code>( <var class="Arg">R</var>, <var class="Arg">M</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>is a free magma ring over the ring <var class="Arg">R</var>, free on the magma <var class="Arg">M</var>.</p>

<p><a id="X86D2CA90847C091B" name="X86D2CA90847C091B"></a></p>

<h5>65.1-2 GroupRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GroupRing</code>( <var class="Arg">R</var>, <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>is the group ring of the group <var class="Arg">G</var>, over the ring <var class="Arg">R</var>.</p>

<p><a id="X7A24B95C8210BD09" name="X7A24B95C8210BD09"></a></p>

<h5>65.1-3 IsFreeMagmaRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsFreeMagmaRing</code>( <var class="Arg">D</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A domain lies in the category <code class="func">IsFreeMagmaRing</code> if it has been constructed as a free magma ring. In particular, if <var class="Arg">D</var> lies in this category then the operations <code class="func">LeftActingDomain</code> (<a href="chap57.html#X86F070E0807DC34E"><span class="RefLink">57.1-11</span></a>) and <code class="func">UnderlyingMagma</code> (<a href="chap65.html#X848D60417DFF7947"><span class="RefLink">65.1-6</span></a>) are applicable to <var class="Arg">D</var>, and yield the ring <span class="SimpleMath">R</span> and the magma <span class="SimpleMath">M</span> such that <var class="Arg">D</var> is the magma ring <span class="SimpleMath">RM</span>.</p>

<p>So being a magma ring in <strong class="pkg">GAP</strong> includes the knowledge of the ring and the magma. Note that a magma ring <span class="SimpleMath">RM</span> may abstractly be generated as a magma ring by a magma different from the underlying magma <span class="SimpleMath">M</span>. For example, the group ring of the dihedral group of order <span class="SimpleMath">8</span> over the field with <span class="SimpleMath">3</span> elements is also spanned by a quaternion group of order <span class="SimpleMath">8</span> over the same field.</p>


<div class="example"><pre>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">d8:= DihedralGroup( 8 );</span>
&lt;pc group of size 8 with 3 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">rm:= FreeMagmaRing( GF(3), d8 );</span>
&lt;algebra-with-one over GF(3), with 3 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">emb:= Embedding( d8, rm );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">gens:= List( GeneratorsOfGroup( d8 ), x -&gt; x^emb );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">x1:= gens[1] + gens[2];;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">x2:= ( gens[1] - gens[2] ) * gens[3];;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">x3:= gens[1] * gens[2] * ( One( rm ) - gens[3] );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">g1:= x1 - x2 + x3;;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">g2:= x1 + x2;;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">q8:= Group( g1, g2 );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Size( q8 );</span>
8
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">ForAny( [ d8, q8 ], IsAbelian );</span>
false
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">List( [ d8, q8 ], g -&gt; Number( AsList( g ), x -&gt; Order( x ) = 2 ) );</span>
[ 5, 1 ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Dimension( Subspace( rm, q8 ) );</span>
8
</pre></div>

<p><a id="X8382ED697A28CE67" name="X8382ED697A28CE67"></a></p>

<h5>65.1-4 IsFreeMagmaRingWithOne</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsFreeMagmaRingWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsFreeMagmaRingWithOne</code> is just a synonym for the meet of <code class="func">IsFreeMagmaRing</code> (<a href="chap65.html#X7A24B95C8210BD09"><span class="RefLink">65.1-3</span></a>) and <code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>).</p>

<p><a id="X82C63644805EB1EE" name="X82C63644805EB1EE"></a></p>

<h5>65.1-5 IsGroupRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsGroupRing</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>A <em>group ring</em> is a magma ring where the underlying magma is a group.</p>

<p><a id="X848D60417DFF7947" name="X848D60417DFF7947"></a></p>

<h5>65.1-6 UnderlyingMagma</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; UnderlyingMagma</code>( <var class="Arg">RM</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>stores the underlying magma of a free magma ring.</p>

<p><a id="X7B21DB3E7CD80983" name="X7B21DB3E7CD80983"></a></p>

<h5>65.1-7 AugmentationIdeal</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; AugmentationIdeal</code>( <var class="Arg">RG</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the augmentation ideal of the group ring <var class="Arg">RG</var>, i.e., the kernel of the trivial representation of <var class="Arg">RG</var>.</p>

<p><a id="X8402D3897F2C5955" name="X8402D3897F2C5955"></a></p>

<h4>65.2 <span class="Heading">Elements of Free Magma Rings</span></h4>

<p>In order to treat elements of free magma rings uniformly, also without an external representation, the attributes <code class="func">CoefficientsAndMagmaElements</code> (<a href="chap65.html#X843D1D8578C33513"><span class="RefLink">65.2-4</span></a>) and <code class="func">ZeroCoefficient</code> (<a href="chap65.html#X78C3DB417E353390"><span class="RefLink">65.2-5</span></a>) were introduced that allow one to "take an element of an arbitrary magma ring into pieces".</p>

<p>Conversely, for constructing magma ring elements from coefficients and magma elements, <code class="func">ElementOfMagmaRing</code> (<a href="chap65.html#X8671DE0A81BEEFB0"><span class="RefLink">65.2-6</span></a>) can be used. (Of course one can also embed each magma element into the magma ring, see <a href="chap65.html#X80366F1480ACD8DF"><span class="RefLink">65.3</span></a>, and then form the linear combination, but many unnecessary intermediate elements are created this way.)</p>

<p><a id="X827B2D7D7E41780C" name="X827B2D7D7E41780C"></a></p>

<h5>65.2-1 IsMagmaRingObjDefaultRep</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsMagmaRingObjDefaultRep</code>( <var class="Arg">obj</var> )</td><td class="tdright">( representation )</td></tr></table></div>
<p>The default representation of a magma ring element is a list of length 2, at first position the zero coefficient, at second position a list with the coefficients at the even positions, and the magma elements at the odd positions, with the ordering as defined for the magma elements.</p>

<p>It is assumed that arithmetic operations on magma rings produce only normalized elements.</p>

<p><a id="X7D9C684A81E66310" name="X7D9C684A81E66310"></a></p>

<h5>65.2-2 IsElementOfFreeMagmaRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfFreeMagmaRing</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfFreeMagmaRingCollection</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>The category of elements of a free magma ring (See <code class="func">IsFreeMagmaRing</code> (<a href="chap65.html#X7A24B95C8210BD09"><span class="RefLink">65.1-3</span></a>)).</p>

<p><a id="X869768AF7B444BF8" name="X869768AF7B444BF8"></a></p>

<h5>65.2-3 IsElementOfFreeMagmaRingFamily</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfFreeMagmaRingFamily</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Elements of families in this category have trivial normalisation, i.e., efficient methods for <code class="code">\=</code> and <code class="code">\&lt;</code>.</p>

<p><a id="X843D1D8578C33513" name="X843D1D8578C33513"></a></p>

<h5>65.2-4 CoefficientsAndMagmaElements</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CoefficientsAndMagmaElements</code>( <var class="Arg">elm</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is a list that contains at the odd positions the magma elements, and at the even positions their coefficients in the element <var class="Arg">elm</var>.</p>

<p><a id="X78C3DB417E353390" name="X78C3DB417E353390"></a></p>

<h5>65.2-5 ZeroCoefficient</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ZeroCoefficient</code>( <var class="Arg">elm</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For an element <var class="Arg">elm</var> of a magma ring (modulo relations) <span class="SimpleMath">RM</span>, <code class="func">ZeroCoefficient</code> returns the zero element of the coefficient ring <span class="SimpleMath">R</span>.</p>

<p><a id="X8671DE0A81BEEFB0" name="X8671DE0A81BEEFB0"></a></p>

<h5>65.2-6 ElementOfMagmaRing</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; ElementOfMagmaRing</code>( <var class="Arg">Fam</var>, <var class="Arg">zerocoeff</var>, <var class="Arg">coeffs</var>, <var class="Arg">mgmelms</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">ElementOfMagmaRing</code> returns the element <span class="SimpleMath">∑_{i = 1}^n c_i m_i'</span>, where <span class="SimpleMath"><var class="Arg">coeffs</var> = [ c_1, c_2, ..., c_n ]</span> is a list of coefficients, <span class="SimpleMath"><var class="Arg">mgmelms</var> = [ m_1, m_2, ..., m_n ]</span> is a list of magma elements, and <span class="SimpleMath">m_i'</span> is the image of <span class="SimpleMath">m_i</span> under an embedding of a magma containing <span class="SimpleMath">m_i</span> into a magma ring whose elements lie in the family <var class="Arg">Fam</var>. <var class="Arg">zerocoeff</var> must be the zero of the coefficient ring containing the <span class="SimpleMath">c_i</span>.</p>

<p><a id="X80366F1480ACD8DF" name="X80366F1480ACD8DF"></a></p>

<h4>65.3 <span class="Heading">Natural Embeddings related to Magma Rings</span></h4>

<p>Neither the coefficient ring <span class="SimpleMath">R</span> nor the magma <span class="SimpleMath">M</span> are regarded as subsets of the magma ring <span class="SimpleMath">RM</span>, so one has to use <em>embeddings</em> (see <code class="func">Embedding</code> (<a href="chap32.html#X86452F8587CBAEA0"><span class="RefLink">32.2-10</span></a>)) explicitly whenever one needs for example the magma ring element corresponding to a given magma element.</p>


<div class="example"><pre>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">f:= Rationals;;  g:= SymmetricGroup( 3 );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fg:= FreeMagmaRing( f, g );</span>
&lt;algebra-with-one over Rationals, with 2 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">Dimension( fg );</span>
6
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">gens:= GeneratorsOfAlgebraWithOne( fg );</span>
[ (1)*(1,2,3), (1)*(1,2) ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">( 3*gens[1] - 2*gens[2] ) * ( gens[1] + gens[2] );</span>
(-2)*()+(3)*(2,3)+(3)*(1,3,2)+(-2)*(1,3)
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">One( fg );</span>
(1)*()
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">emb:= Embedding( g, fg );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm:= (1,2,3)^emb;  elm in fg;</span>
(1)*(1,2,3)
true
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">new:= elm + One( fg );</span>
(1)*()+(1)*(1,2,3)
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">new^2;</span>
(1)*()+(2)*(1,2,3)+(1)*(1,3,2)
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">emb2:= Embedding( f, fg );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elm:= One( f )^emb2;  elm in fg;</span>
(1)*()
true
</pre></div>

<p><a id="X81B002EE799B5E77" name="X81B002EE799B5E77"></a></p>

<h4>65.4 <span class="Heading">Magma Rings modulo Relations</span></h4>

<p>A more general construction than that of free magma rings allows one to create rings that are not free <span class="SimpleMath">R</span>-modules on a given magma <span class="SimpleMath">M</span> but arise from the magma ring <span class="SimpleMath">RM</span> by factoring out certain identities. Examples for such structures are finitely presented (associative) algebras and free Lie algebras (see <code class="func">FreeLieAlgebra</code> (<a href="chap64.html#X7F7B34BD80F0F1C8"><span class="RefLink">64.2-4</span></a>)).</p>

<p>In <strong class="pkg">GAP</strong>, the use of magma rings modulo relations is limited to situations where a normal form of the elements is known and where one wants to guarantee that all elements actually constructed are in normal form. (In particular, the computation of the normal form must be cheap.) This is because the methods for comparing elements in magma rings modulo relations via <code class="code">\=</code> and <code class="code">\&lt;</code> just compare the involved coefficients and magma elements, and also the vector space functions regard those monomials as linearly independent over the coefficients ring that actually occur in the representation of an element of a magma ring modulo relations.</p>

<p>Thus only very special finitely presented algebras will be represented as magma rings modulo relations, in general finitely presented algebras are dealt with via the mechanism described in Chapter <a href="chap63.html#X85A22A8286596D02"><span class="RefLink">63</span></a>.</p>

<p><a id="X869D54847E881848" name="X869D54847E881848"></a></p>

<h5>65.4-1 IsElementOfMagmaRingModuloRelations</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfMagmaRingModuloRelations</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfMagmaRingModuloRelationsCollection</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>This category is used, e. g., for elements of free Lie algebras.</p>

<p><a id="X875BEB1A840FFAA4" name="X875BEB1A840FFAA4"></a></p>

<h5>65.4-2 IsElementOfMagmaRingModuloRelationsFamily</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfMagmaRingModuloRelationsFamily</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>The family category for the category <code class="func">IsElementOfMagmaRingModuloRelations</code> (<a href="chap65.html#X869D54847E881848"><span class="RefLink">65.4-1</span></a>).</p>

<p><a id="X85956ED27FA6AC68" name="X85956ED27FA6AC68"></a></p>

<h5>65.4-3 NormalizedElementOfMagmaRingModuloRelations</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; NormalizedElementOfMagmaRingModuloRelations</code>( <var class="Arg">F</var>, <var class="Arg">descr</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Let <var class="Arg">F</var> be a family of magma ring elements modulo relations, and <var class="Arg">descr</var> the description of an element in a magma ring modulo relations. <code class="func">NormalizedElementOfMagmaRingModuloRelations</code> returns a description of the same element, but normalized w.r.t. the relations. So two elements are equal if and only if the result of <code class="func">NormalizedElementOfMagmaRingModuloRelations</code> is equal for their internal data, that is, <code class="func">CoefficientsAndMagmaElements</code> (<a href="chap65.html#X843D1D8578C33513"><span class="RefLink">65.2-4</span></a>) will return the same for the corresponding two elements.</p>

<p><code class="func">NormalizedElementOfMagmaRingModuloRelations</code> is allowed to return <var class="Arg">descr</var> itself, it need not make a copy. This is the case for example in the case of free magma rings.</p>

<p><a id="X804B5AAB813E184D" name="X804B5AAB813E184D"></a></p>

<h5>65.4-4 IsMagmaRingModuloRelations</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsMagmaRingModuloRelations</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <strong class="pkg">GAP</strong> object lies in the category <code class="func">IsMagmaRingModuloRelations</code> if it has been constructed as a magma ring modulo relations. Each element of such a ring has a unique normal form, so <code class="func">CoefficientsAndMagmaElements</code> (<a href="chap65.html#X843D1D8578C33513"><span class="RefLink">65.2-4</span></a>) is well-defined for it.</p>

<p>This category is not inherited to factor structures, which are in general best described as finitely presented algebras, see Chapter <a href="chap63.html#X85A22A8286596D02"><span class="RefLink">63</span></a>.</p>

<p><a id="X7D859DBF81DFA751" name="X7D859DBF81DFA751"></a></p>

<h4>65.5 <span class="Heading">Magma Rings modulo the Span of a Zero Element</span></h4>

<p><a id="X7B3D45A6802B695C" name="X7B3D45A6802B695C"></a></p>

<h5>65.5-1 IsElementOfMagmaRingModuloSpanOfZeroFamily</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsElementOfMagmaRingModuloSpanOfZeroFamily</code>( <var class="Arg">Fam</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>We need this for the normalization method, which takes a family as first argument.</p>

<p><a id="X872713EE84DA9B72" name="X872713EE84DA9B72"></a></p>

<h5>65.5-2 IsMagmaRingModuloSpanOfZero</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; IsMagmaRingModuloSpanOfZero</code>( <var class="Arg">RM</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>The category of magma rings modulo the span of a zero element.</p>

<p><a id="X7A7F880D7D7D3722" name="X7A7F880D7D7D3722"></a></p>

<h5>65.5-3 MagmaRingModuloSpanOfZero</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; MagmaRingModuloSpanOfZero</code>( <var class="Arg">R</var>, <var class="Arg">M</var>, <var class="Arg">z</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">R</var> be a ring, <var class="Arg">M</var> a magma, and <var class="Arg">z</var> an element of <var class="Arg">M</var> with the property that <span class="SimpleMath"><var class="Arg">z</var> * m = <var class="Arg">z</var></span> holds for all <span class="SimpleMath">m ∈ M</span>. The element <var class="Arg">z</var> could be called a "zero element" of <var class="Arg">M</var>, but note that in general <var class="Arg">z</var> cannot be obtained as <code class="code">Zero( </code><span class="SimpleMath">m</span><code class="code"> )</code> for each <span class="SimpleMath">m ∈ M</span>, so this situation does not match the definition of <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>).</p>

<p><code class="func">MagmaRingModuloSpanOfZero</code> returns the magma ring <span class="SimpleMath"><var class="Arg">R</var><var class="Arg">M</var></span> modulo the relation given by the identification of <var class="Arg">z</var> with zero. This is an example of a magma ring modulo relations, see <a href="chap65.html#X81B002EE799B5E77"><span class="RefLink">65.4</span></a>.</p>

<p><a id="X79889F017F2EB7ED" name="X79889F017F2EB7ED"></a></p>

<h4>65.6 <span class="Heading">Technical Details about the Implementation of Magma Rings</span></h4>

<p>The <em>family</em> containing elements in the magma ring <span class="SimpleMath">RM</span> in fact contains all elements with coefficients in the family of elements of <span class="SimpleMath">R</span> and magma elements in the family of elements of <span class="SimpleMath">M</span>. So arithmetic operations with coefficients outside <span class="SimpleMath">R</span> or with magma elements outside <span class="SimpleMath">M</span> might create elements outside <span class="SimpleMath">RM</span>.</p>

<p>It should be mentioned that each call of <code class="func">FreeMagmaRing</code> (<a href="chap65.html#X7B9AF0A47F44E4B4"><span class="RefLink">65.1-1</span></a>) creates a new family of elements, so for example the elements of two group rings of permutation groups over the same ring lie in different families and therefore are regarded as different.</p>


<div class="example"><pre>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">g:= SymmetricGroup( 3 );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">h:= AlternatingGroup( 3 );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IsSubset( g, h );</span>
true
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">f:= GF(2);;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fg:= GroupRing( f, g );</span>
&lt;algebra-with-one over GF(2), with 2 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">fh:= GroupRing( f, h );</span>
&lt;algebra-with-one over GF(2), with 1 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IsSubset( fg, fh );</span>
false
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">o1:= One( fh );  o2:= One( fg );  o1 = o2;</span>
(Z(2)^0)*()
(Z(2)^0)*()
false
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">emb:= Embedding( g, fg );;</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">im:= Image( emb, h );</span>
&lt;group of size 3 with 1 generators&gt;
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">IsSubset( fg, im );</span>
true
</pre></div>

<p>There is <em>no</em> generic <em>external representation</em> for elements in an arbitrary free magma ring. For example, polynomials are elements of a free magma ring, and they have an external representation relying on the special form of the underlying monomials. On the other hand, elements in a group ring of a permutation group do not admit such an external representation.</p>

<p>For convenience, magma rings constructed with <code class="func">FreeAlgebra</code> (<a href="chap62.html#X83484C917D8F7A1A"><span class="RefLink">62.3-1</span></a>), <code class="func">FreeAssociativeAlgebra</code> (<a href="chap62.html#X87835FFE79D2E068"><span class="RefLink">62.3-3</span></a>), <code class="func">FreeAlgebraWithOne</code> (<a href="chap62.html#X7FBD04B07B85623D"><span class="RefLink">62.3-2</span></a>), and <code class="func">FreeAssociativeAlgebraWithOne</code> (<a href="chap62.html#X845A777584A7D711"><span class="RefLink">62.3-4</span></a>) support an external representation of their elements, which is defined as a list of length 2, the first entry being the zero coefficient, the second being a list with the external representations of the magma elements at the odd positions and the corresponding coefficients at the even positions.</p>

<p>As the above examples show, there are several possible representations of magma ring elements, the representations used for polynomials (see Chapter  <a href="chap66.html#X7A14A6588268810A"><span class="RefLink">66</span></a>) as well as the default representation <code class="func">IsMagmaRingObjDefaultRep</code> (<a href="chap65.html#X827B2D7D7E41780C"><span class="RefLink">65.2-1</span></a>) of magma ring elements. The latter simply stores the zero coefficient and a list containing the coefficients of the element at the even positions and the corresponding magma elements at the odd positions, where the succession is compatible with the ordering of magma elements via <code class="code">\&lt;</code>.</p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">[Top of Book]</a>&nbsp;  <a href="chap0.html#contents">[Contents]</a>&nbsp;  &nbsp;<a href="chap64.html">[Previous Chapter]</a>&nbsp;  &nbsp;<a href="chap66.html">[Next Chapter]</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chap10.html">10</a>  <a href="chap11.html">11</a>  <a href="chap12.html">12</a>  <a href="chap13.html">13</a>  <a href="chap14.html">14</a>  <a href="chap15.html">15</a>  <a href="chap16.html">16</a>  <a href="chap17.html">17</a>  <a href="chap18.html">18</a>  <a href="chap19.html">19</a>  <a href="chap20.html">20</a>  <a href="chap21.html">21</a>  <a href="chap22.html">22</a>  <a href="chap23.html">23</a>  <a href="chap24.html">24</a>  <a href="chap25.html">25</a>  <a href="chap26.html">26</a>  <a href="chap27.html">27</a>  <a href="chap28.html">28</a>  <a href="chap29.html">29</a>  <a href="chap30.html">30</a>  <a href="chap31.html">31</a>  <a href="chap32.html">32</a>  <a href="chap33.html">33</a>  <a href="chap34.html">34</a>  <a href="chap35.html">35</a>  <a href="chap36.html">36</a>  <a href="chap37.html">37</a>  <a href="chap38.html">38</a>  <a href="chap39.html">39</a>  <a href="chap40.html">40</a>  <a href="chap41.html">41</a>  <a href="chap42.html">42</a>  <a href="chap43.html">43</a>  <a href="chap44.html">44</a>  <a href="chap45.html">45</a>  <a href="chap46.html">46</a>  <a href="chap47.html">47</a>  <a href="chap48.html">48</a>  <a href="chap49.html">49</a>  <a href="chap50.html">50</a>  <a href="chap51.html">51</a>  <a href="chap52.html">52</a>  <a href="chap53.html">53</a>  <a href="chap54.html">54</a>  <a href="chap55.html">55</a>  <a href="chap56.html">56</a>  <a href="chap57.html">57</a>  <a href="chap58.html">58</a>  <a href="chap59.html">59</a>  <a href="chap60.html">60</a>  <a href="chap61.html">61</a>  <a href="chap62.html">62</a>  <a href="chap63.html">63</a>  <a href="chap64.html">64</a>  <a href="chap65.html">65</a>  <a href="chap66.html">66</a>  <a href="chap67.html">67</a>  <a href="chap68.html">68</a>  <a href="chap69.html">69</a>  <a href="chap70.html">70</a>  <a href="chap71.html">71</a>  <a href="chap72.html">72</a>  <a href="chap73.html">73</a>  <a href="chap74.html">74</a>  <a href="chap75.html">75</a>  <a href="chap76.html">76</a>  <a href="chap77.html">77</a>  <a href="chap78.html">78</a>  <a href="chap79.html">79</a>  <a href="chap80.html">80</a>  <a href="chap81.html">81</a>  <a href="chap82.html">82</a>  <a href="chap83.html">83</a>  <a href="chap84.html">84</a>  <a href="chap85.html">85</a>  <a href="chap86.html">86</a>  <a href="chap87.html">87</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>