| 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 35: Magmas</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="chap35" 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"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap34.html">[Previous Chapter]</a> <a href="chap36.html">[Next Chapter]</a> </div> |
| 21 | |
| 22 | <p id="mathjaxlink" class="pcenter"><a href="chap35_mj.html">[MathJax on]</a></p> |
| 23 | <p><a id="X873E502F7D21C39C" name="X873E502F7D21C39C"></a></p> |
| 24 | <div class="ChapSects"><a href="chap35.html#X873E502F7D21C39C">35 <span class="Heading">Magmas</span></a> |
| 25 | <div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap35.html#X7E1248B186E7BB44">35.1 <span class="Heading">Magma Categories</span></a> |
| 26 | </span> |
| 27 | <div class="ContSSBlock"> |
| 28 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X87D3F38B7EAB13FA">35.1-1 IsMagma</a></span> |
| 29 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X86071DE7835F1C7C">35.1-2 IsMagmaWithOne</a></span> |
| 30 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X83E4903D7FBB2E24">35.1-3 IsMagmaWithInversesIfNonzero</a></span> |
| 31 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X82CBFF648574B830">35.1-4 IsMagmaWithInverses</a></span> |
| 32 | </div></div> |
| 33 | <div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap35.html#X808F1A148398733D">35.2 <span class="Heading">Magma Generation</span></a> |
| 34 | </span> |
| 35 | <div class="ContSSBlock"> |
| 36 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X839147CF813312D6">35.2-1 Magma</a></span> |
| 37 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7854B23286B17321">35.2-2 MagmaWithOne</a></span> |
| 38 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7A2B51F67EF4DA28">35.2-3 MagmaWithInverses</a></span> |
| 39 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7F629A498383A0AD">35.2-4 MagmaByGenerators</a></span> |
| 40 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X84DABBEB803107EB">35.2-5 MagmaWithOneByGenerators</a></span> |
| 41 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X82C08CFB854E3F1A">35.2-6 MagmaWithInversesByGenerators</a></span> |
| 42 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X8268EAA47E4A3A64">35.2-7 Submagma</a></span> |
| 43 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7F295EBC7A9CE87E">35.2-8 SubmagmaWithOne</a></span> |
| 44 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X79441F1F7A277E28">35.2-9 SubmagmaWithInverses</a></span> |
| 45 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X84ED076D7E46AB79">35.2-10 AsMagma</a></span> |
| 46 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X87EEEC018129F0F4">35.2-11 AsSubmagma</a></span> |
| 47 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X8553F44D8123B2C6">35.2-12 IsMagmaWithZeroAdjoined</a></span> |
| 48 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X8620878D7FD98823">35.2-13 InjectionZeroMagma</a></span> |
| 49 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7B353674859BF659">35.2-14 UnderlyingInjectionZeroMagma</a></span> |
| 50 | </div></div> |
| 51 | <div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap35.html#X782215B982F2F01C">35.3 <span class="Heading">Magmas Defined by Multiplication Tables</span></a> |
| 52 | </span> |
| 53 | <div class="ContSSBlock"> |
| 54 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X85CD1E7678295CA6">35.3-1 MagmaByMultiplicationTable</a></span> |
| 55 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X865526C881645D65">35.3-2 MagmaWithOneByMultiplicationTable</a></span> |
| 56 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7EDAFB987EE8A770">35.3-3 MagmaWithInversesByMultiplicationTable</a></span> |
| 57 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X828BED4580D28FB8">35.3-4 MagmaElement</a></span> |
| 58 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X849BDCC27C4C3191">35.3-5 <span class="Heading">MultiplicationTable</span></a> |
| 59 | </span> |
| 60 | </div></div> |
| 61 | <div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap35.html#X87036FCE868FFEE9">35.4 <span class="Heading">Attributes and Properties for Magmas</span></a> |
| 62 | </span> |
| 63 | <div class="ContSSBlock"> |
| 64 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X872E05B478EC20CA">35.4-1 GeneratorsOfMagma</a></span> |
| 65 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X87DD93EC8061DD81">35.4-2 GeneratorsOfMagmaWithOne</a></span> |
| 66 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X83A901B1857C8489">35.4-3 GeneratorsOfMagmaWithInverses</a></span> |
| 67 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7A2BF4527E08803C">35.4-4 <span class="Heading">Centralizer</span></a> |
| 68 | </span> |
| 69 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X847ABE6F781C7FE8">35.4-5 Centre</a></span> |
| 70 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7C651C9C78398FFF">35.4-6 Idempotents</a></span> |
| 71 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7C83B5A47FD18FB7">35.4-7 IsAssociative</a></span> |
| 72 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X857B0E507D745ADB">35.4-8 IsCentral</a></span> |
| 73 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X830A4A4C795FBC2D">35.4-9 IsCommutative</a></span> |
| 74 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7EE2EA5F7EB7FEC2">35.4-10 MultiplicativeNeutralElement</a></span> |
| 75 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X7B39F93C8136D642">35.4-11 MultiplicativeZero</a></span> |
| 76 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X867DB05A8218FB1E">35.4-12 SquareRoots</a></span> |
| 77 | <span class="ContSS"><br /><span class="nocss"> </span><a href="chap35.html#X837DA95883CFB985">35.4-13 TrivialSubmagmaWithOne</a></span> |
| 78 | </div></div> |
| 79 | </div> |
| 80 | |
| 81 | <h3>35 <span class="Heading">Magmas</span></h3> |
| 82 | |
| 83 | <p>This chapter deals with domains (see <a href="chap31.html#X7E651AC287AFDCC1"><span class="RefLink">31</span></a>) that are closed under multiplication <code class="code">*</code>. Following <a href="chapBib.html#biBBourbaki70">[Bou70]</a>, we call them <em>magmas</em> in <strong class="pkg">GAP</strong>. Together with the domains closed under addition <code class="code">+</code> (see <a href="chap55.html#X7D0D096B81365B02"><span class="RefLink">55</span></a>), they are the basic algebraic structures; every semigroup, monoid (see <a href="chap51.html#X8665D8737FDD5B10"><span class="RefLink">51</span></a>), group (see <a href="chap39.html#X8716635F7951801B"><span class="RefLink">39</span></a>), ring (see <a href="chap56.html#X81897F6082CACB59"><span class="RefLink">56</span></a>), or field (see <a href="chap58.html#X80A8E676814A19FD"><span class="RefLink">58</span></a>) is a magma. In the cases of a <em>magma-with-one</em> or <em>magma-with-inverses</em>, additional multiplicative structure is present, see <a href="chap35.html#X7E1248B186E7BB44"><span class="RefLink">35.1</span></a>. For functions to create free magmas, see <a href="chap36.html#X7F51B17983019D3E"><span class="RefLink">36.4</span></a>.</p> |
| 84 | |
| 85 | <p><a id="X7E1248B186E7BB44" name="X7E1248B186E7BB44"></a></p> |
| 86 | |
| 87 | <h4>35.1 <span class="Heading">Magma Categories</span></h4> |
| 88 | |
| 89 | <p><a id="X87D3F38B7EAB13FA" name="X87D3F38B7EAB13FA"></a></p> |
| 90 | |
| 91 | <h5>35.1-1 IsMagma</h5> |
| 92 | |
| 93 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagma</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div> |
| 94 | <p>A <em>magma</em> in <strong class="pkg">GAP</strong> is a domain <span class="SimpleMath">M</span> with (not necessarily associative) multiplication <code class="code">*</code><span class="SimpleMath">: M × M → M</span>.</p> |
| 95 | |
| 96 | <p><a id="X86071DE7835F1C7C" name="X86071DE7835F1C7C"></a></p> |
| 97 | |
| 98 | <h5>35.1-2 IsMagmaWithOne</h5> |
| 99 | |
| 100 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagmaWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div> |
| 101 | <p>A <em>magma-with-one</em> in <strong class="pkg">GAP</strong> is a magma <span class="SimpleMath">M</span> with an operation <code class="code">^0</code> (or <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>)) that yields the identity of <span class="SimpleMath">M</span>.</p> |
| 102 | |
| 103 | <p>So a magma-with-one <span class="SimpleMath">M</span> does always contain a unique multiplicatively neutral element <span class="SimpleMath">e</span>, i.e., <span class="SimpleMath">e</span><code class="code"> * </code><span class="SimpleMath">m = m = m</span><code class="code"> * </code><span class="SimpleMath">e</span> holds for all <span class="SimpleMath">m ∈ M</span> (see <code class="func">MultiplicativeNeutralElement</code> (<a href="chap35.html#X7EE2EA5F7EB7FEC2"><span class="RefLink">35.4-10</span></a>)). This element <span class="SimpleMath">e</span> can be computed with the operation <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) as <code class="code">One( </code><span class="SimpleMath">M</span><code class="code"> )</code>, and <span class="SimpleMath">e</span> is also equal to <code class="code">One( </code><span class="SimpleMath">m</span><code class="code"> )</code> and to <span class="SimpleMath">m</span><code class="code">^0</code> for each element <span class="SimpleMath">m ∈ M</span>.</p> |
| 104 | |
| 105 | <p><em>Note</em> that a magma may contain a multiplicatively neutral element but <em>not</em> an identity (see <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>)), and a magma containing an identity may <em>not</em> lie in the category <code class="func">IsMagmaWithOne</code> (see Section <a href="chap31.html#X7D72F11B82F4A036"><span class="RefLink">31.6</span></a>).</p> |
| 106 | |
| 107 | <p><a id="X83E4903D7FBB2E24" name="X83E4903D7FBB2E24"></a></p> |
| 108 | |
| 109 | <h5>35.1-3 IsMagmaWithInversesIfNonzero</h5> |
| 110 | |
| 111 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagmaWithInversesIfNonzero</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div> |
| 112 | <p>An object in this <strong class="pkg">GAP</strong> category is a magma-with-one <span class="SimpleMath">M</span> with an operation <code class="code">^-1</code><span class="SimpleMath">: M ∖ Z → M ∖ Z</span> that maps each element <span class="SimpleMath">m</span> of <span class="SimpleMath">M ∖ Z</span> to its inverse <span class="SimpleMath">m</span><code class="code">^-1</code> (or <code class="code">Inverse( </code><span class="SimpleMath">m</span><code class="code"> )</code>, see <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>)), where <span class="SimpleMath">Z</span> is either empty or consists exactly of one element of <span class="SimpleMath">M</span>.</p> |
| 113 | |
| 114 | <p>This category was introduced mainly to describe division rings, since the nonzero elements in a division ring form a group; So an object <span class="SimpleMath">M</span> in <code class="func">IsMagmaWithInversesIfNonzero</code> will usually have both a multiplicative and an additive structure (see <a href="chap55.html#X7D0D096B81365B02"><span class="RefLink">55</span></a>), and the set <span class="SimpleMath">Z</span>, if it is nonempty, contains exactly the zero element (see <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>)) of <span class="SimpleMath">M</span>.</p> |
| 115 | |
| 116 | <p><a id="X82CBFF648574B830" name="X82CBFF648574B830"></a></p> |
| 117 | |
| 118 | <h5>35.1-4 IsMagmaWithInverses</h5> |
| 119 | |
| 120 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagmaWithInverses</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div> |
| 121 | <p>A <em>magma-with-inverses</em> in <strong class="pkg">GAP</strong> is a magma-with-one <span class="SimpleMath">M</span> with an operation <code class="code">^-1</code><span class="SimpleMath">: M → M</span> that maps each element <span class="SimpleMath">m</span> of <span class="SimpleMath">M</span> to its inverse <span class="SimpleMath">m</span><code class="code">^-1</code> (or <code class="code">Inverse( </code><span class="SimpleMath">m</span><code class="code"> )</code>, see <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>)).</p> |
| 122 | |
| 123 | <p>Note that not every trivial magma is a magma-with-one, but every trivial magma-with-one is a magma-with-inverses. This holds also if the identity of the magma-with-one is a zero element. So a magma-with-inverses-if-nonzero can be a magma-with-inverses if either it contains no zero element or consists of a zero element that has itself as zero-th power.</p> |
| 124 | |
| 125 | <p><a id="X808F1A148398733D" name="X808F1A148398733D"></a></p> |
| 126 | |
| 127 | <h4>35.2 <span class="Heading">Magma Generation</span></h4> |
| 128 | |
| 129 | <p>This section describes functions that create magmas from generators (see <code class="func">Magma</code> (<a href="chap35.html#X839147CF813312D6"><span class="RefLink">35.2-1</span></a>), <code class="func">MagmaWithOne</code> (<a href="chap35.html#X7854B23286B17321"><span class="RefLink">35.2-2</span></a>), <code class="func">MagmaWithInverses</code> (<a href="chap35.html#X7A2B51F67EF4DA28"><span class="RefLink">35.2-3</span></a>)), the underlying operations for which methods can be installed (see <code class="func">MagmaByGenerators</code> (<a href="chap35.html#X7F629A498383A0AD"><span class="RefLink">35.2-4</span></a>), <code class="func">MagmaWithOneByGenerators</code> (<a href="chap35.html#X84DABBEB803107EB"><span class="RefLink">35.2-5</span></a>), <code class="func">MagmaWithInversesByGenerators</code> (<a href="chap35.html#X82C08CFB854E3F1A"><span class="RefLink">35.2-6</span></a>)), functions for forming submagmas (see <code class="func">Submagma</code> (<a href="chap35.html#X8268EAA47E4A3A64"><span class="RefLink">35.2-7</span></a>), <code class="func">SubmagmaWithOne</code> (<a href="chap35.html#X7F295EBC7A9CE87E"><span class="RefLink">35.2-8</span></a>), <code class="func">SubmagmaWithInverses</code> (<a href="chap35.html#X79441F1F7A277E28"><span class="RefLink">35.2-9</span></a>)), and functions that form a magma equal to a given collection (see <code class="func">AsMagma</code> (<a href="chap35.html#X84ED076D7E46AB79"><span class="RefLink">35.2-10</span></a>), <code class="func">AsSubmagma</code> (<a href="chap35.html#X87EEEC018129F0F4"><span class="RefLink">35.2-11</span></a>)).</p> |
| 130 | |
| 131 | <p><code class="func">InjectionZeroMagma</code> (<a href="chap35.html#X8620878D7FD98823"><span class="RefLink">35.2-13</span></a>) creates a new magma which is the original magma with a zero adjoined.</p> |
| 132 | |
| 133 | <p><a id="X839147CF813312D6" name="X839147CF813312D6"></a></p> |
| 134 | |
| 135 | <h5>35.2-1 Magma</h5> |
| 136 | |
| 137 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Magma</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 138 | <p>returns the magma <span class="SimpleMath">M</span> that is generated by the elements in the list <var class="Arg">gens</var>, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>). The family <var class="Arg">Fam</var> of <span class="SimpleMath">M</span> can be entered as the first argument; this is obligatory if <var class="Arg">gens</var> is empty (and hence also <span class="SimpleMath">M</span> is empty).</p> |
| 139 | |
| 140 | <p><a id="X7854B23286B17321" name="X7854B23286B17321"></a></p> |
| 141 | |
| 142 | <h5>35.2-2 MagmaWithOne</h5> |
| 143 | |
| 144 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithOne</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 145 | <p>returns the magma-with-one <span class="SimpleMath">M</span> that is generated by the elements in the list <var class="Arg">gens</var>, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) and <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>). The family <var class="Arg">Fam</var> of <span class="SimpleMath">M</span> can be entered as first argument; this is obligatory if <var class="Arg">gens</var> is empty (and hence <span class="SimpleMath">M</span> is trivial).</p> |
| 146 | |
| 147 | <p><a id="X7A2B51F67EF4DA28" name="X7A2B51F67EF4DA28"></a></p> |
| 148 | |
| 149 | <h5>35.2-3 MagmaWithInverses</h5> |
| 150 | |
| 151 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithInverses</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 152 | <p>returns the magma-with-inverses <span class="SimpleMath">M</span> that is generated by the elements in the list <var class="Arg">gens</var>, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>), <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>). The family <var class="Arg">Fam</var> of <span class="SimpleMath">M</span> can be entered as first argument; this is obligatory if <var class="Arg">gens</var> is empty (and hence <span class="SimpleMath">M</span> is trivial).</p> |
| 153 | |
| 154 | <p><a id="X7F629A498383A0AD" name="X7F629A498383A0AD"></a></p> |
| 155 | |
| 156 | <h5>35.2-4 MagmaByGenerators</h5> |
| 157 | |
| 158 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaByGenerators</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 159 | <p>An underlying operation for <code class="func">Magma</code> (<a href="chap35.html#X839147CF813312D6"><span class="RefLink">35.2-1</span></a>).</p> |
| 160 | |
| 161 | <p><a id="X84DABBEB803107EB" name="X84DABBEB803107EB"></a></p> |
| 162 | |
| 163 | <h5>35.2-5 MagmaWithOneByGenerators</h5> |
| 164 | |
| 165 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithOneByGenerators</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 166 | <p>An underlying operation for <code class="func">MagmaWithOne</code> (<a href="chap35.html#X7854B23286B17321"><span class="RefLink">35.2-2</span></a>).</p> |
| 167 | |
| 168 | <p><a id="X82C08CFB854E3F1A" name="X82C08CFB854E3F1A"></a></p> |
| 169 | |
| 170 | <h5>35.2-6 MagmaWithInversesByGenerators</h5> |
| 171 | |
| 172 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithInversesByGenerators</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">gens</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 173 | <p>An underlying operation for <code class="func">MagmaWithInverses</code> (<a href="chap35.html#X7A2B51F67EF4DA28"><span class="RefLink">35.2-3</span></a>).</p> |
| 174 | |
| 175 | <p><a id="X8268EAA47E4A3A64" name="X8268EAA47E4A3A64"></a></p> |
| 176 | |
| 177 | <h5>35.2-7 Submagma</h5> |
| 178 | |
| 179 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Submagma</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 180 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubmagmaNC</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 181 | <p><code class="func">Submagma</code> returns the magma generated by the elements in the list <var class="Arg">gens</var>, with parent the domain <var class="Arg">D</var>. <code class="func">SubmagmaNC</code> does the same, except that it is not checked whether the elements of <var class="Arg">gens</var> lie in <var class="Arg">D</var>.</p> |
| 182 | |
| 183 | <p><a id="X7F295EBC7A9CE87E" name="X7F295EBC7A9CE87E"></a></p> |
| 184 | |
| 185 | <h5>35.2-8 SubmagmaWithOne</h5> |
| 186 | |
| 187 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubmagmaWithOne</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 188 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubmagmaWithOneNC</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 189 | <p><code class="func">SubmagmaWithOne</code> returns the magma-with-one generated by the elements in the list <var class="Arg">gens</var>, with parent the domain <var class="Arg">D</var>. <code class="func">SubmagmaWithOneNC</code> does the same, except that it is not checked whether the elements of <var class="Arg">gens</var> lie in <var class="Arg">D</var>.</p> |
| 190 | |
| 191 | <p><a id="X79441F1F7A277E28" name="X79441F1F7A277E28"></a></p> |
| 192 | |
| 193 | <h5>35.2-9 SubmagmaWithInverses</h5> |
| 194 | |
| 195 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubmagmaWithInverses</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 196 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SubmagmaWithInversesNC</code>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 197 | <p><code class="func">SubmagmaWithInverses</code> returns the magma-with-inverses generated by the elements in the list <var class="Arg">gens</var>, with parent the domain <var class="Arg">D</var>. <code class="func">SubmagmaWithInversesNC</code> does the same, except that it is not checked whether the elements of <var class="Arg">gens</var> lie in <var class="Arg">D</var>.</p> |
| 198 | |
| 199 | <p><a id="X84ED076D7E46AB79" name="X84ED076D7E46AB79"></a></p> |
| 200 | |
| 201 | <h5>35.2-10 AsMagma</h5> |
| 202 | |
| 203 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AsMagma</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 204 | <p>For a collection <var class="Arg">C</var> whose elements form a magma, <code class="func">AsMagma</code> returns this magma. Otherwise <code class="keyw">fail</code> is returned.</p> |
| 205 | |
| 206 | <p><a id="X87EEEC018129F0F4" name="X87EEEC018129F0F4"></a></p> |
| 207 | |
| 208 | <h5>35.2-11 AsSubmagma</h5> |
| 209 | |
| 210 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AsSubmagma</code>( <var class="Arg">D</var>, <var class="Arg">C</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 211 | <p>Let <var class="Arg">D</var> be a domain and <var class="Arg">C</var> a collection. If <var class="Arg">C</var> is a subset of <var class="Arg">D</var> that forms a magma then <code class="func">AsSubmagma</code> returns this magma, with parent <var class="Arg">D</var>. Otherwise <code class="keyw">fail</code> is returned.</p> |
| 212 | |
| 213 | <p><a id="X8553F44D8123B2C6" name="X8553F44D8123B2C6"></a></p> |
| 214 | |
| 215 | <h5>35.2-12 IsMagmaWithZeroAdjoined</h5> |
| 216 | |
| 217 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMagmaWithZeroAdjoined</code>( <var class="Arg">M</var> )</td><td class="tdright">( category )</td></tr></table></div> |
| 218 | <p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code>.</p> |
| 219 | |
| 220 | <p><code class="code">IsMagmaWithZeroAdjoined</code> returns <code class="keyw">true</code> if the magma <var class="Arg">M</var> was created using <code class="func">InjectionZeroMagma</code> (<a href="chap35.html#X8620878D7FD98823"><span class="RefLink">35.2-13</span></a>) or <code class="func">MagmaWithZeroAdjoined</code> (<a href="chap35.html#X8620878D7FD98823"><span class="RefLink">35.2-13</span></a>) and returns <code class="keyw">false</code> if it was not.</p> |
| 221 | |
| 222 | |
| 223 | <div class="example"><pre> |
| 224 | <span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(Transformation([1,1,1]), Transformation([1,3,2]));;</span> |
| 225 | <span class="GAPprompt">gap></span> <span class="GAPinput">IsMagmaWithZeroAdjoined(S);</span> |
| 226 | false |
| 227 | <span class="GAPprompt">gap></span> <span class="GAPinput">M:=MagmaWithZeroAdjoined(S);</span> |
| 228 | <<transformation semigroup of degree 3 with 2 generators> |
| 229 | with 0 adjoined> |
| 230 | <span class="GAPprompt">gap></span> <span class="GAPinput">IsMagmaWithZeroAdjoined(M);</span> |
| 231 | true |
| 232 | </pre></div> |
| 233 | |
| 234 | <p><a id="X8620878D7FD98823" name="X8620878D7FD98823"></a></p> |
| 235 | |
| 236 | <h5>35.2-13 InjectionZeroMagma</h5> |
| 237 | |
| 238 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InjectionZeroMagma</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 239 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithZeroAdjoined</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 240 | <p><code class="func">InjectionZeroMagma</code> returns an embedding from the magma <var class="Arg">M</var> into a new magma formed from <var class="Arg">M</var> by adjoining a single new element which is the multiplicative zero of the resulting magma. The elements of the new magma form a family of elements in the category <code class="func">IsMultiplicativeElementWithZero</code> (<a href="chap31.html#X8703BFC2841BBD63"><span class="RefLink">31.14-12</span></a>) and the magma itself satisfies <code class="func">IsMagmaWithZeroAdjoined</code> (<a href="chap35.html#X8553F44D8123B2C6"><span class="RefLink">35.2-12</span></a>).</p> |
| 241 | |
| 242 | <p><code class="code">MagmaWithZeroAdjoined</code> is just shorthand for <code class="code">Range(InjectionZeroMagma(<var class="Arg">M</var>)))</code>.</p> |
| 243 | |
| 244 | <p>If <code class="code">N</code> is a magma with zero adjoined, then the embedding used to create <code class="code">N</code> can be recovered using <code class="func">UnderlyingInjectionZeroMagma</code> (<a href="chap35.html#X7B353674859BF659"><span class="RefLink">35.2-14</span></a>).</p> |
| 245 | |
| 246 | |
| 247 | <div class="example"><pre> |
| 248 | <span class="GAPprompt">gap></span> <span class="GAPinput">S:=Monoid(Transformation( [ 7, 7, 5, 3, 1, 3, 7 ] ),</span> |
| 249 | <span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 5, 1, 4, 1, 4, 4, 7 ] ));;</span> |
| 250 | <span class="GAPprompt">gap></span> <span class="GAPinput">MultiplicativeZero(S);</span> |
| 251 | Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) |
| 252 | <span class="GAPprompt">gap></span> <span class="GAPinput">T:=MagmaWithZeroAdjoined(S);</span> |
| 253 | <<transformation monoid of degree 7 with 2 generators> |
| 254 | with 0 adjoined> |
| 255 | <span class="GAPprompt">gap></span> <span class="GAPinput">map:=UnderlyingInjectionZeroMagma(T);;</span> |
| 256 | <span class="GAPprompt">gap></span> <span class="GAPinput">x:=Transformation( [ 7, 7, 7, 3, 7, 3, 7 ] );;</span> |
| 257 | <span class="GAPprompt">gap></span> <span class="GAPinput">x^map;</span> |
| 258 | <monoid with 0 adjoined elt: Transformation( [ 7, 7, 7, 3, 7, 3, 7 ] |
| 259 | )> |
| 260 | <span class="GAPprompt">gap></span> <span class="GAPinput">PreImage(map, x^map)=x;</span> |
| 261 | true |
| 262 | </pre></div> |
| 263 | |
| 264 | <p><a id="X7B353674859BF659" name="X7B353674859BF659"></a></p> |
| 265 | |
| 266 | <h5>35.2-14 UnderlyingInjectionZeroMagma</h5> |
| 267 | |
| 268 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnderlyingInjectionZeroMagma</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 269 | <p><code class="code">UnderlyingInjectionZeroMagma</code> returns the embedding used to create the magma with zero adjoined <var class="Arg">M</var>.</p> |
| 270 | |
| 271 | |
| 272 | <div class="example"><pre> |
| 273 | <span class="GAPprompt">gap></span> <span class="GAPinput">S:=Monoid(Transformation( [ 8, 7, 5, 3, 1, 3, 8, 8 ] ),</span> |
| 274 | <span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 5, 1, 4, 1, 4, 4, 7, 8 ] ));;</span> |
| 275 | <span class="GAPprompt">gap></span> <span class="GAPinput">MultiplicativeZero(S);</span> |
| 276 | Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8 ] ) |
| 277 | <span class="GAPprompt">gap></span> <span class="GAPinput">T:=MagmaWithZeroAdjoined(S);</span> |
| 278 | <<transformation monoid of degree 8 with 2 generators> |
| 279 | with 0 adjoined> |
| 280 | <span class="GAPprompt">gap></span> <span class="GAPinput">UnderlyingInjectionZeroMagma(T);</span> |
| 281 | MappingByFunction( <transformation monoid of degree 8 with 2 |
| 282 | generators>, <<transformation monoid of degree 8 with 2 generators> |
| 283 | with 0 adjoined>, function( elt ) ... end, function( x ) ... end ) |
| 284 | </pre></div> |
| 285 | |
| 286 | <p><a id="X782215B982F2F01C" name="X782215B982F2F01C"></a></p> |
| 287 | |
| 288 | <h4>35.3 <span class="Heading">Magmas Defined by Multiplication Tables</span></h4> |
| 289 | |
| 290 | <p>The most elementary (but of course usually not recommended) way to implement a magma with only few elements is via a multiplication table.</p> |
| 291 | |
| 292 | <p><a id="X85CD1E7678295CA6" name="X85CD1E7678295CA6"></a></p> |
| 293 | |
| 294 | <h5>35.3-1 MagmaByMultiplicationTable</h5> |
| 295 | |
| 296 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaByMultiplicationTable</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 297 | <p>For a square matrix <var class="Arg">A</var> with <span class="SimpleMath">n</span> rows such that all entries of <var class="Arg">A</var> are in the range <span class="SimpleMath">[ 1 .. n ]</span>, <code class="func">MagmaByMultiplicationTable</code> returns a magma <span class="SimpleMath">M</span> with multiplication <code class="code">*</code> defined by <var class="Arg">A</var>. That is, <span class="SimpleMath">M</span> consists of the elements <span class="SimpleMath">m_1, m_2, ..., m_n</span>, and <span class="SimpleMath">m_i * m_j = m_k</span>, with <span class="SimpleMath">k =</span> <var class="Arg">A</var><span class="SimpleMath">[i][j]</span>.</p> |
| 298 | |
| 299 | <p>The ordering of elements is defined by <span class="SimpleMath">m_1 < m_2 < ⋯ < m_n</span>, so <span class="SimpleMath">m_i</span> can be accessed as <code class="code">MagmaElement( <var class="Arg">M</var>, <var class="Arg">i</var> )</code>, see <code class="func">MagmaElement</code> (<a href="chap35.html#X828BED4580D28FB8"><span class="RefLink">35.3-4</span></a>).</p> |
| 300 | |
| 301 | |
| 302 | <div class="example"><pre> |
| 303 | <span class="GAPprompt">gap></span> <span class="GAPinput">MagmaByMultiplicationTable([[1,2,3],[2,3,1],[1,1,1]]);</span> |
| 304 | <magma with 3 generators> |
| 305 | </pre></div> |
| 306 | |
| 307 | <p><a id="X865526C881645D65" name="X865526C881645D65"></a></p> |
| 308 | |
| 309 | <h5>35.3-2 MagmaWithOneByMultiplicationTable</h5> |
| 310 | |
| 311 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithOneByMultiplicationTable</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 312 | <p>The only differences between <code class="func">MagmaByMultiplicationTable</code> (<a href="chap35.html#X85CD1E7678295CA6"><span class="RefLink">35.3-1</span></a>) and <code class="func">MagmaWithOneByMultiplicationTable</code> are that the latter returns a magma-with-one (see <code class="func">MagmaWithOne</code> (<a href="chap35.html#X7854B23286B17321"><span class="RefLink">35.2-2</span></a>)) if the magma described by the matrix <var class="Arg">A</var> has an identity, and returns <code class="keyw">fail</code> if not.</p> |
| 313 | |
| 314 | |
| 315 | <div class="example"><pre> |
| 316 | <span class="GAPprompt">gap></span> <span class="GAPinput">MagmaWithOneByMultiplicationTable([[1,2,3],[2,3,1],[3,1,1]]);</span> |
| 317 | <magma-with-one with 3 generators> |
| 318 | <span class="GAPprompt">gap></span> <span class="GAPinput">MagmaWithOneByMultiplicationTable([[1,2,3],[2,3,1],[1,1,1]]);</span> |
| 319 | fail |
| 320 | </pre></div> |
| 321 | |
| 322 | <p><a id="X7EDAFB987EE8A770" name="X7EDAFB987EE8A770"></a></p> |
| 323 | |
| 324 | <h5>35.3-3 MagmaWithInversesByMultiplicationTable</h5> |
| 325 | |
| 326 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaWithInversesByMultiplicationTable</code>( <var class="Arg">A</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 327 | <p><code class="func">MagmaByMultiplicationTable</code> (<a href="chap35.html#X85CD1E7678295CA6"><span class="RefLink">35.3-1</span></a>) and <code class="func">MagmaWithInversesByMultiplicationTable</code> differ only in that the latter returns magma-with-inverses (see <code class="func">MagmaWithInverses</code> (<a href="chap35.html#X7A2B51F67EF4DA28"><span class="RefLink">35.2-3</span></a>)) if each element in the magma described by the matrix <var class="Arg">A</var> has an inverse, and returns <code class="keyw">fail</code> if not.</p> |
| 328 | |
| 329 | |
| 330 | <div class="example"><pre> |
| 331 | <span class="GAPprompt">gap></span> <span class="GAPinput">MagmaWithInversesByMultiplicationTable([[1,2,3],[2,3,1],[3,1,2]]);</span> |
| 332 | <magma-with-inverses with 3 generators> |
| 333 | <span class="GAPprompt">gap></span> <span class="GAPinput">MagmaWithInversesByMultiplicationTable([[1,2,3],[2,3,1],[3,2,1]]);</span> |
| 334 | fail |
| 335 | </pre></div> |
| 336 | |
| 337 | <p><a id="X828BED4580D28FB8" name="X828BED4580D28FB8"></a></p> |
| 338 | |
| 339 | <h5>35.3-4 MagmaElement</h5> |
| 340 | |
| 341 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MagmaElement</code>( <var class="Arg">M</var>, <var class="Arg">i</var> )</td><td class="tdright">( function )</td></tr></table></div> |
| 342 | <p>For a magma <var class="Arg">M</var> and a positive integer <var class="Arg">i</var>, <code class="func">MagmaElement</code> returns the <var class="Arg">i</var>-th element of <var class="Arg">M</var>, w.r.t. the ordering <code class="code"><</code>. If <var class="Arg">M</var> has less than <var class="Arg">i</var> elements then <code class="keyw">fail</code> is returned.</p> |
| 343 | |
| 344 | <p><a id="X849BDCC27C4C3191" name="X849BDCC27C4C3191"></a></p> |
| 345 | |
| 346 | <h5>35.3-5 <span class="Heading">MultiplicationTable</span></h5> |
| 347 | |
| 348 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MultiplicationTable</code>( <var class="Arg">elms</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 349 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MultiplicationTable</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 350 | <p>For a list <var class="Arg">elms</var> of elements that form a magma <span class="SimpleMath">M</span>, <code class="func">MultiplicationTable</code> returns a square matrix <span class="SimpleMath">A</span> of positive integers such that <span class="SimpleMath">A[i][j] = k</span> holds if and only if <var class="Arg">elms</var><span class="SimpleMath">[i] *</span> <var class="Arg">elms</var><span class="SimpleMath">[j] =</span> <var class="Arg">elms</var><span class="SimpleMath">[k]</span>. This matrix can be used to construct a magma isomorphic to <span class="SimpleMath">M</span>, using <code class="func">MagmaByMultiplicationTable</code> (<a href="chap35.html#X85CD1E7678295CA6"><span class="RefLink">35.3-1</span></a>).</p> |
| 351 | |
| 352 | <p>For a magma <var class="Arg">M</var>, <code class="func">MultiplicationTable</code> returns the multiplication table w.r.t. the sorted list of elements of <var class="Arg">M</var>.</p> |
| 353 | |
| 354 | |
| 355 | <div class="example"><pre> |
| 356 | <span class="GAPprompt">gap></span> <span class="GAPinput">l:= [ (), (1,2)(3,4), (1,3)(2,4), (1,4)(2,3) ];;</span> |
| 357 | <span class="GAPprompt">gap></span> <span class="GAPinput">a:= MultiplicationTable( l );</span> |
| 358 | [ [ 1, 2, 3, 4 ], [ 2, 1, 4, 3 ], [ 3, 4, 1, 2 ], [ 4, 3, 2, 1 ] ] |
| 359 | <span class="GAPprompt">gap></span> <span class="GAPinput">m:= MagmaByMultiplicationTable( a );</span> |
| 360 | <magma with 4 generators> |
| 361 | <span class="GAPprompt">gap></span> <span class="GAPinput">One( m );</span> |
| 362 | m1 |
| 363 | <span class="GAPprompt">gap></span> <span class="GAPinput">elm:= MagmaElement( m, 2 ); One( elm ); elm^2;</span> |
| 364 | m2 |
| 365 | m1 |
| 366 | m1 |
| 367 | <span class="GAPprompt">gap></span> <span class="GAPinput">Inverse( elm );</span> |
| 368 | m2 |
| 369 | <span class="GAPprompt">gap></span> <span class="GAPinput">AsGroup( m );</span> |
| 370 | <group of size 4 with 2 generators> |
| 371 | <span class="GAPprompt">gap></span> <span class="GAPinput">a:= [ [ 1, 2 ], [ 2, 2 ] ];</span> |
| 372 | [ [ 1, 2 ], [ 2, 2 ] ] |
| 373 | <span class="GAPprompt">gap></span> <span class="GAPinput">m:= MagmaByMultiplicationTable( a );</span> |
| 374 | <magma with 2 generators> |
| 375 | <span class="GAPprompt">gap></span> <span class="GAPinput">One( m ); Inverse( MagmaElement( m, 2 ) );</span> |
| 376 | m1 |
| 377 | fail |
| 378 | </pre></div> |
| 379 | |
| 380 | <p><a id="X87036FCE868FFEE9" name="X87036FCE868FFEE9"></a></p> |
| 381 | |
| 382 | <h4>35.4 <span class="Heading">Attributes and Properties for Magmas</span></h4> |
| 383 | |
| 384 | <p><em>Note</em> that <code class="func">IsAssociative</code> (<a href="chap35.html#X7C83B5A47FD18FB7"><span class="RefLink">35.4-7</span></a>) and <code class="func">IsCommutative</code> (<a href="chap35.html#X830A4A4C795FBC2D"><span class="RefLink">35.4-9</span></a>) always refer to the multiplication of a domain. If a magma <var class="Arg">M</var> has also an <em>additive structure</em>, e.g., if <var class="Arg">M</var> is a ring (see <a href="chap56.html#X81897F6082CACB59"><span class="RefLink">56</span></a>), then the addition <code class="code">+</code> is always assumed to be associative and commutative, see <a href="chap31.html#X7A2914307963E370"><span class="RefLink">31.12</span></a>.</p> |
| 385 | |
| 386 | <p><a id="X872E05B478EC20CA" name="X872E05B478EC20CA"></a></p> |
| 387 | |
| 388 | <h5>35.4-1 GeneratorsOfMagma</h5> |
| 389 | |
| 390 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneratorsOfMagma</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 391 | <p>is a list <var class="Arg">gens</var> of elements of the magma <var class="Arg">M</var> that generates <var class="Arg">M</var> as a magma, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) is <var class="Arg">M</var>.</p> |
| 392 | |
| 393 | <p>For a free magma, each generator can also be accessed using the <code class="code">.</code> operator (see <code class="func">GeneratorsOfDomain</code> (<a href="chap31.html#X7E353DD1838AB223"><span class="RefLink">31.9-2</span></a>)).</p> |
| 394 | |
| 395 | <p><a id="X87DD93EC8061DD81" name="X87DD93EC8061DD81"></a></p> |
| 396 | |
| 397 | <h5>35.4-2 GeneratorsOfMagmaWithOne</h5> |
| 398 | |
| 399 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneratorsOfMagmaWithOne</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 400 | <p>is a list <var class="Arg">gens</var> of elements of the magma-with-one <var class="Arg">M</var> that generates <var class="Arg">M</var> as a magma-with-one, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) and <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) is <var class="Arg">M</var>.</p> |
| 401 | |
| 402 | <p>For a free magma with one, each generator can also be accessed using the <code class="code">.</code> operator (see <code class="func">GeneratorsOfDomain</code> (<a href="chap31.html#X7E353DD1838AB223"><span class="RefLink">31.9-2</span></a>)).</p> |
| 403 | |
| 404 | <p><a id="X83A901B1857C8489" name="X83A901B1857C8489"></a></p> |
| 405 | |
| 406 | <h5>35.4-3 GeneratorsOfMagmaWithInverses</h5> |
| 407 | |
| 408 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneratorsOfMagmaWithInverses</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 409 | <p>is a list <var class="Arg">gens</var> of elements of the magma-with-inverses <var class="Arg">M</var> that generates <var class="Arg">M</var> as a magma-with-inverses, that is, the closure of <var class="Arg">gens</var> under multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) and taking inverses (see <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>)) is <var class="Arg">M</var>.</p> |
| 410 | |
| 411 | <p><a id="X7A2BF4527E08803C" name="X7A2BF4527E08803C"></a></p> |
| 412 | |
| 413 | <h5>35.4-4 <span class="Heading">Centralizer</span></h5> |
| 414 | |
| 415 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Centralizer</code>( <var class="Arg">M</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 416 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Centralizer</code>( <var class="Arg">M</var>, <var class="Arg">S</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 417 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Centralizer</code>( <var class="Arg">class</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 418 | <p>For an element <var class="Arg">elm</var> of the magma <var class="Arg">M</var> this operation returns the <em>centralizer</em> of <var class="Arg">elm</var>. This is the domain of those elements <var class="Arg">m</var> <span class="SimpleMath">∈</span> <var class="Arg">M</var> that commute with <var class="Arg">elm</var>.</p> |
| 419 | |
| 420 | <p>For a submagma <var class="Arg">S</var> it returns the domain of those elements that commute with <em>all</em> elements <var class="Arg">s</var> of <var class="Arg">S</var>.</p> |
| 421 | |
| 422 | <p>If <var class="Arg">class</var> is a class of objects of a magma (this magma then is stored as the <code class="code">ActingDomain</code> of <var class="Arg">class</var>) such as given by <code class="func">ConjugacyClass</code> (<a href="chap39.html#X7B2F207F7F85F5B8"><span class="RefLink">39.10-1</span></a>), <code class="func">Centralizer</code> returns the centralizer of <code class="code">Representative(<var class="Arg">class</var>)</code> (which is a slight abuse of the notation).</p> |
| 423 | |
| 424 | |
| 425 | <div class="example"><pre> |
| 426 | <span class="GAPprompt">gap></span> <span class="GAPinput">g:=Group((1,2,3,4),(1,2));;</span> |
| 427 | <span class="GAPprompt">gap></span> <span class="GAPinput">Centralizer(g,(1,2,3));</span> |
| 428 | Group([ (1,2,3) ]) |
| 429 | <span class="GAPprompt">gap></span> <span class="GAPinput">Centralizer(g,Subgroup(g,[(1,2,3)]));</span> |
| 430 | Group([ (1,2,3) ]) |
| 431 | <span class="GAPprompt">gap></span> <span class="GAPinput">Centralizer(g,Subgroup(g,[(1,2,3),(1,2)]));</span> |
| 432 | Group(()) |
| 433 | </pre></div> |
| 434 | |
| 435 | <p><a id="X847ABE6F781C7FE8" name="X847ABE6F781C7FE8"></a></p> |
| 436 | |
| 437 | <h5>35.4-5 Centre</h5> |
| 438 | |
| 439 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Centre</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 440 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Center</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 441 | <p><code class="func">Centre</code> returns the <em>centre</em> of the magma <var class="Arg">M</var>, i.e., the domain of those elements <var class="Arg">m</var> <span class="SimpleMath">∈</span> <var class="Arg">M</var> that commute and associate with all elements of <var class="Arg">M</var>. That is, the set <span class="SimpleMath">{ m ∈ M; ∀ a, b ∈ M: ma = am, (ma)b = m(ab), (am)b = a(mb), (ab)m = a(bm) }</span>.</p> |
| 442 | |
| 443 | <p><code class="func">Center</code> is just a synonym for <code class="func">Centre</code>.</p> |
| 444 | |
| 445 | <p>For associative magmas we have that <code class="code">Centre( <var class="Arg">M</var> ) = Centralizer( <var class="Arg">M</var>, <var class="Arg">M</var> )</code>, see <code class="func">Centralizer</code> (<a href="chap35.html#X7A2BF4527E08803C"><span class="RefLink">35.4-4</span></a>).</p> |
| 446 | |
| 447 | <p>The centre of a magma is always commutative (see <code class="func">IsCommutative</code> (<a href="chap35.html#X830A4A4C795FBC2D"><span class="RefLink">35.4-9</span></a>)). (When one installs a new method for <code class="func">Centre</code>, one should set the <code class="func">IsCommutative</code> (<a href="chap35.html#X830A4A4C795FBC2D"><span class="RefLink">35.4-9</span></a>) value of the result to <code class="keyw">true</code>, in order to make this information available.)</p> |
| 448 | |
| 449 | <p><a id="X7C651C9C78398FFF" name="X7C651C9C78398FFF"></a></p> |
| 450 | |
| 451 | <h5>35.4-6 Idempotents</h5> |
| 452 | |
| 453 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Idempotents</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 454 | <p>The set of elements of <var class="Arg">M</var> which are their own squares.</p> |
| 455 | |
| 456 | <p><a id="X7C83B5A47FD18FB7" name="X7C83B5A47FD18FB7"></a></p> |
| 457 | |
| 458 | <h5>35.4-7 IsAssociative</h5> |
| 459 | |
| 460 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAssociative</code>( <var class="Arg">M</var> )</td><td class="tdright">( property )</td></tr></table></div> |
| 461 | <p>A collection <var class="Arg">M</var> of elements that can be multiplied via <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) is <em>associative</em> if for all elements <span class="SimpleMath">a, b, c ∈</span> <var class="Arg">M</var> the equality <span class="SimpleMath">(a</span><code class="code"> * </code><span class="SimpleMath">b)</span><code class="code"> * </code><span class="SimpleMath">c = a</span><code class="code"> * </code><span class="SimpleMath">(b</span><code class="code"> * </code><span class="SimpleMath">c)</span> holds.</p> |
| 462 | |
| 463 | <p>An associative magma is called a <em>semigroup</em> (see <a href="chap51.html#X8665D8737FDD5B10"><span class="RefLink">51</span></a>), an associative magma-with-one is called a <em>monoid</em> (see <a href="chap51.html#X8665D8737FDD5B10"><span class="RefLink">51</span></a>), and an associative magma-with-inverses is called a <em>group</em> (see <a href="chap39.html#X8716635F7951801B"><span class="RefLink">39</span></a>).</p> |
| 464 | |
| 465 | <p><a id="X857B0E507D745ADB" name="X857B0E507D745ADB"></a></p> |
| 466 | |
| 467 | <h5>35.4-8 IsCentral</h5> |
| 468 | |
| 469 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCentral</code>( <var class="Arg">M</var>, <var class="Arg">obj</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 470 | <p><code class="func">IsCentral</code> returns <code class="keyw">true</code> if the object <var class="Arg">obj</var>, which must either be an element or a magma, commutes with all elements in the magma <var class="Arg">M</var>.</p> |
| 471 | |
| 472 | <p><a id="X830A4A4C795FBC2D" name="X830A4A4C795FBC2D"></a></p> |
| 473 | |
| 474 | <h5>35.4-9 IsCommutative</h5> |
| 475 | |
| 476 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCommutative</code>( <var class="Arg">M</var> )</td><td class="tdright">( property )</td></tr></table></div> |
| 477 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAbelian</code>( <var class="Arg">M</var> )</td><td class="tdright">( property )</td></tr></table></div> |
| 478 | <p>A collection <var class="Arg">M</var> of elements that can be multiplied via <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) is <em>commutative</em> if for all elements <span class="SimpleMath">a, b ∈</span> <var class="Arg">M</var> the equality <span class="SimpleMath">a</span><code class="code"> * </code><span class="SimpleMath">b = b</span><code class="code"> * </code><span class="SimpleMath">a</span> holds. <code class="func">IsAbelian</code> is a synonym of <code class="func">IsCommutative</code>.</p> |
| 479 | |
| 480 | <p>Note that the commutativity of the <em>addition</em> <code class="func">\+</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) in an additive structure can be tested with <code class="func">IsAdditivelyCommutative</code> (<a href="chap55.html#X82D471327A9CA960"><span class="RefLink">55.3-1</span></a>).</p> |
| 481 | |
| 482 | <p><a id="X7EE2EA5F7EB7FEC2" name="X7EE2EA5F7EB7FEC2"></a></p> |
| 483 | |
| 484 | <h5>35.4-10 MultiplicativeNeutralElement</h5> |
| 485 | |
| 486 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MultiplicativeNeutralElement</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 487 | <p>returns the element <span class="SimpleMath">e</span> in the magma <var class="Arg">M</var> with the property that <span class="SimpleMath">e</span><code class="code"> * </code><span class="SimpleMath">m = m = m</span><code class="code"> * </code><span class="SimpleMath">e</span> holds for all <span class="SimpleMath">m ∈</span> <var class="Arg">M</var>, if such an element exists. Otherwise <code class="keyw">fail</code> is returned.</p> |
| 488 | |
| 489 | <p>A magma that is not a magma-with-one can have a multiplicative neutral element <span class="SimpleMath">e</span>; in this case, <span class="SimpleMath">e</span> <em>cannot</em> be obtained as <code class="code">One( <var class="Arg">M</var> )</code>, see <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>).</p> |
| 490 | |
| 491 | <p><a id="X7B39F93C8136D642" name="X7B39F93C8136D642"></a></p> |
| 492 | |
| 493 | <h5>35.4-11 MultiplicativeZero</h5> |
| 494 | |
| 495 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MultiplicativeZero</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 496 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultiplicativeZero</code>( <var class="Arg">M</var>, <var class="Arg">z</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 497 | <p><code class="code">MultiplicativeZero</code> returns the multiplicative zero of the magma <var class="Arg">M</var> which is the element <code class="code">z</code> in <var class="Arg">M</var> such that <code class="code"><var class="Arg">z</var> * <var class="Arg">m</var> = <var class="Arg">m</var> * <var class="Arg">z</var> = <var class="Arg">z</var></code> for all <var class="Arg">m</var> in <var class="Arg">M</var>.</p> |
| 498 | |
| 499 | <p><code class="code">IsMultiplicativeZero</code> returns <code class="keyw">true</code> if the element <var class="Arg">z</var> of the magma <var class="Arg">M</var> equals the multiplicative zero of <var class="Arg">M</var>.</p> |
| 500 | |
| 501 | |
| 502 | <div class="example"><pre> |
| 503 | <span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup( Transformation( [ 1, 1, 1 ] ),</span> |
| 504 | <span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 2, 3, 1 ] ) );</span> |
| 505 | <transformation semigroup of degree 3 with 2 generators> |
| 506 | <span class="GAPprompt">gap></span> <span class="GAPinput">MultiplicativeZero(S);</span> |
| 507 | fail |
| 508 | <span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup( Transformation( [ 1, 1, 1 ] ),</span> |
| 509 | <span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 1, 3, 2 ] ) );</span> |
| 510 | <transformation semigroup of degree 3 with 2 generators> |
| 511 | <span class="GAPprompt">gap></span> <span class="GAPinput">MultiplicativeZero(S);</span> |
| 512 | Transformation( [ 1, 1, 1 ] ) |
| 513 | </pre></div> |
| 514 | |
| 515 | <p><a id="X867DB05A8218FB1E" name="X867DB05A8218FB1E"></a></p> |
| 516 | |
| 517 | <h5>35.4-12 SquareRoots</h5> |
| 518 | |
| 519 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SquareRoots</code>( <var class="Arg">M</var>, <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div> |
| 520 | <p>is the proper set of all elements <span class="SimpleMath">r</span> in the magma <var class="Arg">M</var> such that <span class="SimpleMath">r * r =</span> <var class="Arg">elm</var> holds.</p> |
| 521 | |
| 522 | <p><a id="X837DA95883CFB985" name="X837DA95883CFB985"></a></p> |
| 523 | |
| 524 | <h5>35.4-13 TrivialSubmagmaWithOne</h5> |
| 525 | |
| 526 | <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TrivialSubmagmaWithOne</code>( <var class="Arg">M</var> )</td><td class="tdright">( attribute )</td></tr></table></div> |
| 527 | <p>is the magma-with-one that has the identity of the magma-with-one <var class="Arg">M</var> as only element.</p> |
| 528 | |
| 529 | |
| 530 | <div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap34.html">[Previous Chapter]</a> <a href="chap36.html">[Next Chapter]</a> </div> |
| 531 | |
| 532 | |
| 533 | <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> |
| 534 | |
| 535 | <hr /> |
| 536 | <p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p> |
| 537 | </body> |
| 538 | </html> |