loops/doc/chap5_mj.html
2017-10-16 21:43:09 +02:00

241 lines
20 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<title>GAP (Loops) - Chapter 5: Basic Methods And Attributes</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="chap5" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a> <a href="chap1_mj.html">1</a> <a href="chap2_mj.html">2</a> <a href="chap3_mj.html">3</a> <a href="chap4_mj.html">4</a> <a href="chap5_mj.html">5</a> <a href="chap6_mj.html">6</a> <a href="chap7_mj.html">7</a> <a href="chap8_mj.html">8</a> <a href="chap9_mj.html">9</a> <a href="chapA_mj.html">A</a> <a href="chapB_mj.html">B</a> <a href="chapBib_mj.html">Bib</a> <a href="chapInd_mj.html">Ind</a> </div>
<div class="chlinkprevnexttop">&nbsp;<a href="chap0_mj.html">[Top of Book]</a>&nbsp; <a href="chap0_mj.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap4_mj.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap6_mj.html">[Next Chapter]</a>&nbsp; </div>
<p id="mathjaxlink" class="pcenter"><a href="chap5.html">[MathJax off]</a></p>
<p><a id="X7B9F619279641FAA" name="X7B9F619279641FAA"></a></p>
<div class="ChapSects"><a href="chap5_mj.html#X7B9F619279641FAA">5 <span class="Heading">Basic Methods And Attributes</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap5_mj.html#X8373A7348161DB23">5.1 <span class="Heading">Basic Attributes</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X79B130FC7906FB4C">5.1-1 Elements</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X85457FA27DE7114D">5.1-2 CayleyTable</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X8129A6877FFD804B">5.1-3 One</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X858ADA3B7A684421">5.1-4 Size</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X7D44470C7DA59C1C">5.1-5 Exponent</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap5_mj.html#X82F2CA4A848ABD2B">5.2 <span class="Heading">Basic Arithmetic Operations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X7D5956967BCC1834">5.2-1 <span class="Heading">LeftDivision and RightDivision</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X804F67C8796A0EB3">5.2-2 <span class="Heading">LeftDivisionCayleyTable and RightDivisionCayleyTable</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap5_mj.html#X810850247ADB4EE9">5.3 <span class="Heading">Powers and Inverses</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X805781838020CF44">5.3-1 <span class="Heading">LeftInverse, RightInverse and Inverse</span></a>
</span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap5_mj.html#X7E0849977869E53D">5.4 <span class="Heading">Associators and Commutators</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X82B7448879B91F7B">5.4-1 Associator</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X7D624A9587FB1FE5">5.4-2 Commutator</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss">&nbsp;</span><a href="chap5_mj.html#X7BD5B55C802805B4">5.5 <span class="Heading">Generators</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X83944A777D161D10">5.5-1 <span class="Heading">GeneratorsOfQuasigroup and GeneratorsOfLoop</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X82FD78AF7F80A0E2">5.5-2 GeneratorsSmallest</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap5_mj.html#X814DBABC878D5232">5.5-3 SmallGeneratingSet</a></span>
</div></div>
</div>
<h3>5 <span class="Heading">Basic Methods And Attributes</span></h3>
<p>In this chapter we describe the basic core methods and attributes of the <strong class="pkg">LOOPS</strong> package.</p>
<p><a id="X8373A7348161DB23" name="X8373A7348161DB23"></a></p>
<h4>5.1 <span class="Heading">Basic Attributes</span></h4>
<p>We associate many attributes with quasigroups in order to speed up computation. This section lists some basic attributes of quasigroups and loops.</p>
<p><a id="X79B130FC7906FB4C" name="X79B130FC7906FB4C"></a></p>
<h5>5.1-1 Elements</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Elements</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The list of elements of a quasigroup <var class="Arg">Q</var>.</p>
<p>See Section <a href="chap3_mj.html#X7D75C7A6787AF72A"><span class="RefLink">3.4</span></a> for more information about element labels.</p>
<p><a id="X85457FA27DE7114D" name="X85457FA27DE7114D"></a></p>
<h5>5.1-2 CayleyTable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; CayleyTable</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The Cayley table of a quasigroup <var class="Arg">Q</var>.</p>
<p>See Section <a href="chap4_mj.html#X7DE8405B82BC36A9"><span class="RefLink">4.1</span></a> for more information about quasigroup Cayley tables.</p>
<p><a id="X8129A6877FFD804B" name="X8129A6877FFD804B"></a></p>
<h5>5.1-3 One</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; One</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The identity element of a loop <var class="Arg">Q</var>.</p>
<p><strong class="button">Remark:</strong>If you want to know if a quasigroup <var class="Arg">Q</var> has a neutral element, you can find out with the standard function for magmas <code class="code">MultiplicativeNeutralElement(<var class="Arg">Q</var>)</code>.</p>
<p><a id="X858ADA3B7A684421" name="X858ADA3B7A684421"></a></p>
<h5>5.1-4 Size</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Size</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The size of a quasigroup <var class="Arg">Q</var>.</p>
<p><a id="X7D44470C7DA59C1C" name="X7D44470C7DA59C1C"></a></p>
<h5>5.1-5 Exponent</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Exponent</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The exponent of a power associative loop <var class="Arg">Q</var>. (The method does not test if <var class="Arg">Q</var> is power associative.)</p>
<p>When <var class="Arg">Q</var> is a <em>power associative loop</em>, that is, the powers of elements are well-defined in <var class="Arg">Q</var>, then the <em>exponent</em> of <var class="Arg">Q</var> is the smallest positive integer divisible by the orders of all elements of <var class="Arg">Q</var>.</p>
<p><a id="X82F2CA4A848ABD2B" name="X82F2CA4A848ABD2B"></a></p>
<h4>5.2 <span class="Heading">Basic Arithmetic Operations</span></h4>
<p>Each quasigroup element in <strong class="pkg">GAP</strong> knows to which quasigroup it belongs. It is therefore possible to perform arithmetic operations with quasigroup elements without referring to the quasigroup. All elements involved in the calculation must belong to the same quasigroup.</p>
<p>Two elements <span class="SimpleMath">\(x\)</span>, <span class="SimpleMath">\(y\)</span> of the same quasigroup are multiplied by <span class="SimpleMath">\(x*y\)</span> in <strong class="pkg">GAP</strong>. Since multiplication of at least three elements is ambiguous in the nonassociative case, we parenthesize elements by default from left to right, i.e., <span class="SimpleMath">\(x*y*z\)</span> means <span class="SimpleMath">\(((x*y)*z)\)</span>. Of course, one can specify the order of multiplications by providing parentheses.</p>
<p><a id="X7D5956967BCC1834" name="X7D5956967BCC1834"></a></p>
<h5>5.2-1 <span class="Heading">LeftDivision and RightDivision</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; LeftDivision</code>( <var class="Arg">x</var>, <var class="Arg">y</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RightDivision</code>( <var class="Arg">x</var>, <var class="Arg">y</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The left division <var class="Arg">x</var><span class="SimpleMath">\(\backslash\)</span><var class="Arg">y</var> (resp. the right division <var class="Arg">x</var><span class="SimpleMath">\(/\)</span><var class="Arg">y</var>) of two elements <var class="Arg">x</var>, <var class="Arg">y</var> of the same quasigroup.<br /></p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; LeftDivision</code>( <var class="Arg">S</var>, <var class="Arg">x</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; LeftDivision</code>( <var class="Arg">x</var>, <var class="Arg">S</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RightDivision</code>( <var class="Arg">S</var>, <var class="Arg">x</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RightDivision</code>( <var class="Arg">x</var>, <var class="Arg">S</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The list of elements obtained by performing the specified arithmetical operation elementwise using a list <var class="Arg">S</var> of elements and an element <var class="Arg">x</var>.<br /></p>
<p><strong class="button">Remark:</strong> We support <span class="SimpleMath">\(/\)</span> in place of <code class="code">RightDivision</code>. But we do not support <span class="SimpleMath">\(\backslash\)</span> in place of <code class="code">LeftDivision</code>.</p>
<p><a id="X804F67C8796A0EB3" name="X804F67C8796A0EB3"></a></p>
<h5>5.2-2 <span class="Heading">LeftDivisionCayleyTable and RightDivisionCayleyTable</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; LeftDivisionCayleyTable</code>( <var class="Arg">Q</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RightDivisionCayleyTable</code>( <var class="Arg">Q</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The Cayley table of the respective arithmetic operation of a quasigroup <var class="Arg">Q</var>.</p>
<p><a id="X810850247ADB4EE9" name="X810850247ADB4EE9"></a></p>
<h4>5.3 <span class="Heading">Powers and Inverses</span></h4>
<p>Powers of elements are generally not well-defined in quasigroups. For magmas and a positive integral exponent, <strong class="pkg">GAP</strong> calculates powers in the following way: <span class="SimpleMath">\(x^1=x\)</span>, <span class="SimpleMath">\(x^{2k}=(x^k)\cdot(x^k)\)</span> and <span class="SimpleMath">\(x^{2k+1}=(x^{2k})\cdot x\)</span>. One can easily see that this returns <span class="SimpleMath">\(x^k\)</span> in about <span class="SimpleMath">\(\log_2(k)\)</span> steps. For <strong class="pkg">LOOPS</strong>, we have decided to keep this method, but the user should be aware that the method is sound only in power associative quasigroups.</p>
<p>Let <span class="SimpleMath">\(x\)</span> be an element of a loop <span class="SimpleMath">\(Q\)</span> with neutral element <span class="SimpleMath">\(1\)</span>. Then the <em>left inverse</em> <span class="SimpleMath">\(x^\lambda\)</span> of <span class="SimpleMath">\(x\)</span> is the unique element of <span class="SimpleMath">\(Q\)</span> satisfying <span class="SimpleMath">\(x^\lambda x=1\)</span>. Similarly, the <em>right inverse</em> <span class="SimpleMath">\(x^\rho\)</span> satisfies <span class="SimpleMath">\(xx^\rho=1\)</span>. If <span class="SimpleMath">\(x^\lambda=x^\rho\)</span>, we call <span class="SimpleMath">\(x^{-1}=x^\lambda=x^\rho\)</span> the <em>inverse</em> of <span class="SimpleMath">\(x\)</span>.</p>
<p><a id="X805781838020CF44" name="X805781838020CF44"></a></p>
<h5>5.3-1 <span class="Heading">LeftInverse, RightInverse and Inverse</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; LeftInverse</code>( <var class="Arg">x</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; RightInverse</code>( <var class="Arg">x</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Inverse</code>( <var class="Arg">x</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The left inverse, right inverse and inverse, respectively, of the quasigroup element <var class="Arg">x</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">CayleyTable( Q );
</span>
[ [ 1, 2, 3, 4, 5 ],
[ 2, 1, 4, 5, 3 ],
[ 3, 4, 5, 1, 2 ],
[ 4, 5, 2, 3, 1 ],
[ 5, 3, 1, 2, 4 ] ]
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">elms := Elements( Q );
</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">[ l1, l2, l3, l4, l5 ];
</span>
<span class="GAPprompt">gap&gt;</span> <span class="GAPinput">[ LeftInverse( elms[3] ), RightInverse( elms[3] ), Inverse( elms[3] ) ];
</span>
[ l5, l4, fail ]
</pre></div>
<p><a id="X7E0849977869E53D" name="X7E0849977869E53D"></a></p>
<h4>5.4 <span class="Heading">Associators and Commutators</span></h4>
<p>See Section <a href="chap2_mj.html#X7E0849977869E53D"><span class="RefLink">2.5</span></a> for definitions of associators and commutators.</p>
<p><a id="X82B7448879B91F7B" name="X82B7448879B91F7B"></a></p>
<h5>5.4-1 Associator</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Associator</code>( <var class="Arg">x</var>, <var class="Arg">y</var>, <var class="Arg">z</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The associator of the elements <var class="Arg">x</var>, <var class="Arg">y</var>, <var class="Arg">z</var> of the same quasigroup.</p>
<p><a id="X7D624A9587FB1FE5" name="X7D624A9587FB1FE5"></a></p>
<h5>5.4-2 Commutator</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; Commutator</code>( <var class="Arg">x</var>, <var class="Arg">y</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The commutator of the elements <var class="Arg">x</var>, <var class="Arg">y</var> of the same quasigroup.</p>
<p><a id="X7BD5B55C802805B4" name="X7BD5B55C802805B4"></a></p>
<h4>5.5 <span class="Heading">Generators</span></h4>
<p><a id="X83944A777D161D10" name="X83944A777D161D10"></a></p>
<h5>5.5-1 <span class="Heading">GeneratorsOfQuasigroup and GeneratorsOfLoop</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GeneratorsOfQuasigroup</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GeneratorsOfLoop</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A set of generators of a quasigroup (resp. loop) <var class="Arg">Q</var>. (Both methods are synonyms of <code class="code">GeneratorsOfMagma</code>.)</p>
<p>As usual in <strong class="pkg">GAP</strong>, one can refer to the <code class="code">i</code>th generator of a quasigroup <code class="code">Q</code> by <code class="code">Q.i</code>. Note that while it is often the case that <code class="code"> Q.i = Elements(Q)[i]</code>, it is not necessarily so.</p>
<p><a id="X82FD78AF7F80A0E2" name="X82FD78AF7F80A0E2"></a></p>
<h5>5.5-2 GeneratorsSmallest</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; GeneratorsSmallest</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A generating set <span class="SimpleMath">\(\{q_0\)</span>, <span class="SimpleMath">\(\dots\)</span>, <span class="SimpleMath">\(q_m\}\)</span> of <var class="Arg">Q</var> such that <span class="SimpleMath">\(Q_0=\emptyset\)</span>, <span class="SimpleMath">\(Q_m=\)</span><var class="Arg">Q</var>, <span class="SimpleMath">\(Q_i=\langle q_1\)</span>, <span class="SimpleMath">\(\dots\)</span>, <span class="SimpleMath">\(q_i \rangle\)</span>, and <span class="SimpleMath">\(q_{i+1}\)</span> is the least element of <var class="Arg">Q</var><span class="SimpleMath">\(\setminus Q_i\)</span>.</p>
<p><a id="X814DBABC878D5232" name="X814DBABC878D5232"></a></p>
<h5>5.5-3 SmallGeneratingSet</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#8227; SmallGeneratingSet</code>( <var class="Arg">Q</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A small generating set <span class="SimpleMath">\(\{q_0\)</span>, <span class="SimpleMath">\(\dots\)</span>, <span class="SimpleMath">\(q_m\}\)</span> of <var class="Arg">Q</var> obtained as follows: <span class="SimpleMath">\(q_0\)</span> is the least element for which <span class="SimpleMath">\(\langle q_0\rangle\)</span> is largest possible, <span class="SimpleMath">\(q_1\)</span>$ is the least element for which <span class="SimpleMath">\(\langle q_0,q_1\)</span> is largest possible, and so on.</p>
<div class="chlinkprevnextbot">&nbsp;<a href="chap0_mj.html">[Top of Book]</a>&nbsp; <a href="chap0_mj.html#contents">[Contents]</a>&nbsp; &nbsp;<a href="chap4_mj.html">[Previous Chapter]</a>&nbsp; &nbsp;<a href="chap6_mj.html">[Next Chapter]</a>&nbsp; </div>
<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a> <a href="chap1_mj.html">1</a> <a href="chap2_mj.html">2</a> <a href="chap3_mj.html">3</a> <a href="chap4_mj.html">4</a> <a href="chap5_mj.html">5</a> <a href="chap6_mj.html">6</a> <a href="chap7_mj.html">7</a> <a href="chap8_mj.html">8</a> <a href="chap9_mj.html">9</a> <a href="chapA_mj.html">A</a> <a href="chapB_mj.html">B</a> <a href="chapBib_mj.html">Bib</a> <a href="chapInd_mj.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>