<divclass="chlinkprevnexttop"> <ahref="chap0_mj.html">[Top of Book]</a> <ahref="chap0_mj.html#contents">[Contents]</a> <ahref="chap2_mj.html">[Previous Chapter]</a> <ahref="chap4_mj.html">[Next Chapter]</a> </div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap3_mj.html#X807D76EF81B9D061">3.2 <spanclass="Heading">Conversions between magmas, quasigroups, loops and groups</span></a>
</span>
</div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap3_mj.html#X87E49ED884FA6DC4">3.3 <spanclass="Heading">Calculating with Quasigroups</span></a>
</span>
</div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap3_mj.html#X7D75C7A6787AF72A">3.4 <spanclass="Heading">Naming, Viewing and Printing Quasigroups and their Elements</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap3_mj.html#X7A7EB1B579273D07">3.4-1 <spanclass="Heading">SetQuasigroupElmName and SetLoopElmName</span></a>
</span>
</div></div>
</div>
<h3>3 <spanclass="Heading">How the Package Works</span></h3>
<p>The package consists of three complementary components:</p>
<ul>
<li><p>the core algorithms for quasigroup theoretical notions (see Chapters <ahref="chap4_mj.html#X7AA4B9C0877550ED"><spanclass="RefLink">4</span></a>, <ahref="chap5_mj.html#X7B9F619279641FAA"><spanclass="RefLink">5</span></a>, <ahref="chap6_mj.html#X794A04C5854D352B"><spanclass="RefLink">6</span></a> and <ahref="chap7_mj.html#X7910E575825C713E"><spanclass="RefLink">7</span></a>),</p>
</li>
<li><p>algorithms for specific varieties of loops, mostly for Moufang loops (see Chapter <ahref="chap8_mj.html#X85AFC9C47FD3C03F"><spanclass="RefLink">8</span></a>),</p>
</li>
<li><p>the library of small loops (see Chapter <ahref="chap9_mj.html#X7BF3EE6E7953560D"><spanclass="RefLink">9</span></a>).</p>
</li>
</ul>
<p>Although we do not explain the algorithms in detail here, we describe the general philosophy so that users can anticipate the capabilities and behavior of <strongclass="pkg">LOOPS</strong>.</p>
<p>Since permutation representation in the usual sense is impossible for nonassociative structures, and since the theory of nonassociative presentations is not well understood, we resorted to multiplication tables to represent quasigroups in <strongclass="pkg">GAP</strong>. (In order to save storage space, we sometimes use one multiplication table to represent several quasigroups, for instance when a quasigroup is a subquasigroup of another quasigroup. See Section <ahref="chap4_mj.html#X7DE8405B82BC36A9"><spanclass="RefLink">4.1</span></a> for more details.)</p>
<p>Consequently, the package is intended primarily for quasigroups and loops of small order, say up to 1000.</p>
<p>The <strongclass="pkg">GAP</strong> categories <codeclass="code">IsQuasigroupElement</code>, <codeclass="code">IsLoopElement</code>, <codeclass="code">IsQuasigroup</code> and <codeclass="code">IsLoop</code> are declared in <strongclass="pkg">LOOPS</strong> as follows:</p>
<h4>3.2 <spanclass="Heading">Conversions between magmas, quasigroups, loops and groups</span></h4>
<p>Whether an object is considered a magma, quasigroup, loop or group is a matter of declaration in <strongclass="pkg">LOOPS</strong>. Loops are automatically quasigroups, and both groups and quasigroups are automatically magmas. All standard <strongclass="pkg">GAP</strong> commands for magmas are therefore available for quasigroups and loops.</p>
<p>In <strongclass="pkg">GAP</strong>, functions of the type <codeclass="code">AsSomething(<varclass="Arg">X</var>)</code> convert the domain <varclass="Arg">X</var> into <codeclass="code">Something</code>, if possible, without changing the underlying domain <varclass="Arg">X</var>. For example, if <varclass="Arg">X</var> is declared as magma but is associative and has neutral element and inverses, <codeclass="code">AsGroup(<varclass="Arg">X</var>)</code> returns the corresponding group with the underlying domain <varclass="Arg">X</var>.</p>
<p>We have opted for a more general kind of conversions in <strongclass="pkg">LOOPS</strong> (starting with version 2.1.0), using functions of the type <codeclass="code">IntoSomething(<varclass="Arg">X</var>)</code>. The two main features that distinguish <codeclass="code">IntoSomething</code> from <codeclass="code">AsSomething</code> are:</p>
<ul>
<li><p>The function <codeclass="code">IntoSomething(<varclass="Arg">X</var>)</code> does not necessarily return the same domain as <varclass="Arg">X</var>. The reason is that <varclass="Arg">X</var> can be a group, for instance, defined on one of many possible domains, while <codeclass="code">IntoLoop(<varclass="Arg">X</var>)</code> must result in a loop, and hence be defined on a subset of some interval <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span> (see Section <ahref="chap6_mj.html#X8731D818827C08F3"><spanclass="RefLink">6.1</span></a>).</p>
</li>
<li><p>In some special situations, the function <codeclass="code">IntoSomething(<varclass="Arg">X</var>)</code> allows to convert <varclass="Arg">X</var> into <codeclass="code">Something</code> even though <varclass="Arg">X</var> does not have all the properties of <codeclass="code">Something</code>. For instance, every quasigroup is isotopic to a loop, so it makes sense to allow the conversion <codeclass="code">IntoLoop(<varclass="Arg">Q</var>)</code> even if the quasigroup <varclass="Arg">Q</var> does not posses a neutral element.</p>
</li>
</ul>
<p>Details of all conversions in <strongclass="pkg">LOOPS</strong> can be found in Section <ahref="chap4_mj.html#X7BC2D8877A943D74"><spanclass="RefLink">4.10</span></a>.</p>
<h4>3.3 <spanclass="Heading">Calculating with Quasigroups</span></h4>
<p>Although the quasigroups are ultimately represented by multiplication tables, the algorithms are efficient because nearly all calculations are delegated to groups. The connection between quasigroups and groups is facilitated via translations (see Section <ahref="chap2_mj.html#X7EC01B437CC2B2C9"><spanclass="RefLink">2.2</span></a>), and we illustrate it with a few examples: <br/></p>
<p><strongclass="button">Example:</strong> This example shows how properties of quasigroups can be translated into properties of translations in a straightforward way. Let <spanclass="SimpleMath">\(Q\)</span> be a quasigroup. We ask if <spanclass="SimpleMath">\(Q\)</span> is associative. We can either test if <spanclass="SimpleMath">\((xy)z=x(yz)\)</span> for every <spanclass="SimpleMath">\(x\)</span>, <spanclass="SimpleMath">\(y\)</span>, <spanclass="SimpleMath">\(z\)</span> in <spanclass="SimpleMath">\(Q\)</span>, or we can ask if <spanclass="SimpleMath">\(L_{xy}=L_xL_y\)</span> for every <spanclass="SimpleMath">\(x\)</span>, <spanclass="SimpleMath">\(y\)</span> in <spanclass="SimpleMath">\(Q\)</span>. Note that since <spanclass="SimpleMath">\(L_{xy}\)</span>, <spanclass="SimpleMath">\(L_x\)</span> and <spanclass="SimpleMath">\(L_y\)</span> are elements of a permutation group, we do not have to refer directly to the multiplication table once the left translations of <spanclass="SimpleMath">\(Q\)</span> are known. <br/></p>
<p><strongclass="button">Example:</strong> This example shows how properties of loops can be translated into properties of translations in a way that requires some theory. A <em>left Bol loop</em> is a loop satisfying <spanclass="SimpleMath">\(x(y(xz)) = (x(yx))z\)</span>. We claim (without proof) that a loop <spanclass="SimpleMath">\(Q\)</span> is left Bol if and only if <spanclass="SimpleMath">\(L_xL_yL_x\)</span> is a left translation for every <spanclass="SimpleMath">\(x\)</span>, <spanclass="SimpleMath">\(y\)</span> in <spanclass="SimpleMath">\(Q\)</span>. <br/></p>
<p><strongclass="button">Example:</strong> This example shows that many properties of loops become purely group-theoretical once they are expressed in terms of translations. A loop is <em>simple</em> if it has no nontrivial congruences. It is possible to show that a loop is simple if and only if its multiplication group is a primitive permutation group. <br/></p>
<p>The main idea of the package is therefore to:</p>
<ul>
<li><p>calculate the translations and the associated permutation groups when they are needed,</p>
</li>
<li><p>store them as attributes,</p>
</li>
<li><p>use them in algorithms as often as possible.</p>
<h4>3.4 <spanclass="Heading">Naming, Viewing and Printing Quasigroups and their Elements</span></h4>
<p><strongclass="pkg">GAP</strong> displays information about objects in two modes: the <codeclass="code">View</code> mode (default, short), and the <codeclass="code">Print</code> mode (longer). Moreover, when the name of an object is set, the name is always shown, no matter which display mode is used.</p>
<p>Only loops contained in the libraries of <strongclass="pkg">LOOPS</strong> are named. For instance, the loop obtained via <codeclass="code">MoufangLoop(32,4)</code>, the 4th Moufang loop of order 32, is named "Moufang loop 32/4'' and is shown as <codeclass="code"><Moufang loop 32/4></code>.</p>
<p>A generic quasigroup of order <spanclass="SimpleMath">\(n\)</span> is displayed as <codeclass="code"><quasigroup of order n></code>. Similarly, a loop of order <spanclass="SimpleMath">\(n\)</span> appears as <codeclass="code"><loop of order n></code>.</p>
<p>The displayed information of a generic loop is enhanced if more information about the loop becomes available. For instance, when it is established that a loop of order 12 has the left alternative property, the loop will be shown as <codeclass="code"><left alternative loop of order 12></code> until a stronger property is obtained. Which property is diplayed is governed by the filters built into <strongclass="pkg">LOOPS</strong> (see Appendix <ahref="chapB_mj.html#X84EFA4C07D4277BB"><spanclass="RefLink">B</span></a>).</p>
<h5>3.4-1 <spanclass="Heading">SetQuasigroupElmName and SetLoopElmName</span></h5>
<divclass="func"><tableclass="func"width="100%"><tr><tdclass="tdleft"><codeclass="func">‣ SetQuasigroupElmName</code>( <varclass="Arg">Q</var>, <varclass="Arg">name</var> )</td><tdclass="tdright">( function )</td></tr></table></div>
<divclass="func"><tableclass="func"width="100%"><tr><tdclass="tdleft"><codeclass="func">‣ SetLoopElmName</code>( <varclass="Arg">Q</var>, <varclass="Arg">name</var> )</td><tdclass="tdright">( function )</td></tr></table></div>
<p>The above functions change the names of elements of a quasigroup (resp. loop) <varclass="Arg">Q</var> to <varclass="Arg">name</var>.</p>
<p>By default, elements of a quasigroup appear as <codeclass="code">qi</code> and elements of a loop appear as <codeclass="code">li</code> in both display modes, where <codeclass="code">i</code> is a positive integer. The neutral element of a loop is always indexed by 1.<br/></p>
<p>For quasigroups and loops in the <codeclass="code">Print</code> mode, we display the multiplication table (if it is known), otherwise we display the elements. <br/></p>
<p>In the following example, <codeclass="code">L</code> is a loop with two elements.</p>
<divclass="chlinkprevnextbot"> <ahref="chap0_mj.html">[Top of Book]</a> <ahref="chap0_mj.html#contents">[Contents]</a> <ahref="chap2_mj.html">[Previous Chapter]</a> <ahref="chap4_mj.html">[Next Chapter]</a> </div>