<divclass="chlinkprevnexttop"> <ahref="chap0_mj.html">[Top of Book]</a> <ahref="chap0_mj.html#contents">[Contents]</a> <ahref="chap3_mj.html">[Previous Chapter]</a> <ahref="chap5_mj.html">[Next Chapter]</a> </div>
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X81179355869B9DFE">4.2-1 <spanclass="Heading">IsQuasigroupTable and IsQuasigroupCayleyTable</span></a>
</span>
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X7AAE48507A471069">4.2-2 <spanclass="Heading">IsLoopTable and IsLoopCayleyTable</span></a>
</span>
</div></div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X7BA749CA7DB4EA87">4.3 <spanclass="Heading">Canonical and Normalized Cayley Tables</span></a>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X7C2372BB8739C5A2">4.4 <spanclass="Heading">Creating Quasigroups and Loops From Cayley Tables</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X860135BB85F2DB19">4.4-1 <spanclass="Heading">QuasigroupByCayleyTable and LoopByCayleyTable</span></a>
</span>
</div></div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X849944F17E2B37F8">4.5 <spanclass="Heading">Creating Quasigroups and Loops from a File</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X81A1DB918057933E">4.5-1 <spanclass="Heading">QuasigroupFromFile and LoopFromFile</span></a>
</span>
</div></div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X820E67F88319C38B">4.6 <spanclass="Heading">Creating Quasigroups and Loops From Sections</span></a>
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X7EC1EB0D7B8382A1">4.6-2 <spanclass="Heading">QuasigroupByLeftSection and LoopByLeftSection</span></a>
</span>
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X80B436ED7CC0749E">4.6-3 <spanclass="Heading">QuasigroupByRightSection and LoopByRightSection</span></a>
</span>
</div></div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X85ABE99E84E5B0E8">4.7 <spanclass="Heading">Creating Quasigroups and Loops From Folders</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X83168E62861F70AB">4.7-1 <spanclass="Heading">QuasigroupByRightFolder and LoopByRightFolder</span></a>
</span>
</div></div>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X8759431780AC81A9">4.8 <spanclass="Heading">Creating Quasigroups and Loops By Nuclear Extensions</span></a>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X7AE29A1A7AA5C25A">4.9 <spanclass="Heading">Random Quasigroups and Loops</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X8271C0F5786B6FA9">4.9-1 <spanclass="Heading">RandomQuasigroup and RandomLoop</span></a>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X79B7327C79029086">4.11 <spanclass="Heading">Products of Quasigroups and Loops</span></a>
<divclass="ContSect"><spanclass="tocline"><spanclass="nocss"> </span><ahref="chap4_mj.html#X7865FC8D7854C2E3">4.12 <spanclass="Heading">Opposite Quasigroups and Loops</span></a>
</span>
<divclass="ContSSBlock">
<spanclass="ContSS"><br/><spanclass="nocss"> </span><ahref="chap4_mj.html#X87B6AED47EE2BCD3">4.12-1 <spanclass="Heading">Opposite, OppositeQuasigroup and OppositeLoop</span></a>
</span>
</div></div>
</div>
<h3>4 <spanclass="Heading">Creating Quasigroups and Loops</span></h3>
<p>In this chapter we describe several ways in which quasigroups and loops can be created in <strongclass="pkg">LOOPS</strong>.</p>
<p>Let <spanclass="SimpleMath">\(X=\{x_1,\dots,x_n\}\)</span> be a set and <spanclass="SimpleMath">\(\cdot\)</span> a binary operation on <spanclass="SimpleMath">\(X\)</span>. Then an <spanclass="SimpleMath">\(n\)</span> by <spanclass="SimpleMath">\(n\)</span> array with rows and columns bordered by <spanclass="SimpleMath">\(x_1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(x_n\)</span>, in this order, is a <em>Cayley table</em>, or a <em>multiplication table</em> of <spanclass="SimpleMath">\(\cdot\)</span>, if the entry in the row <spanclass="SimpleMath">\(x_i\)</span> and column <spanclass="SimpleMath">\(x_j\)</span> is <spanclass="SimpleMath">\(x_i\cdot x_j\)</span>.</p>
<p>A Cayley table is a <em>quasigroup table</em> if it is a latin square, i.e., if every entry <spanclass="SimpleMath">\(x_i\)</span> appears in every column and every row exactly once.</p>
<p>An unfortunate feature of multiplication tables in practice is that they are often not bordered, that is, it is up to the reader to figure out what is meant. Throughout this manual and in <strongclass="pkg">LOOPS</strong>, we therefore make the following assumption: <em>All distinct entries in a quasigroup table must be positive integers, say <spanclass="SimpleMath">\(x_1 < x_2 < \cdots < x_n\)</span>, and if no border is specified, we assume that the table is bordered by <spanclass="SimpleMath">\(x_1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(x_n\)</span>, in this order.</em> Note that we do not assume that the distinct entries <spanclass="SimpleMath">\(x_1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(x_n\)</span> form the interval <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>. The significance of this observation will become clear in Chapter <ahref="chap6_mj.html#X794A04C5854D352B"><spanclass="RefLink">6</span></a>.</p>
<p>Finally, we say that a quasigroup table is a <em>loop table</em> if the first row and the first column are the same, and if the entries in the first row are ordered in an ascending fashion.</p>
<p>Returns: <codeclass="code">true</code> if <varclass="Arg">T</var> is a loop table as defined above, else <codeclass="code">false</code>.<br/></p>
<p><strongclass="button">Remark:</strong>The package <strongclass="pkg">GUAVA</strong> also contains operations dealing with latin squares. In particular, <codeclass="code">IsLatinSquare</code> is declared in <strongclass="pkg">GUAVA</strong>.</p>
<p>Returns: Canonical Cayley table constructed from Cayley table <varclass="Arg">T</var> by replacing entries <spanclass="SimpleMath">\(x_i\)</span> with <spanclass="SimpleMath">\(i\)</span>.</p>
<p>A Cayley table is said to be <em>canonical</em> if it is based on elements <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>. Although we do not assume that every quasigroup table is canonical, it is often desirable to present quasigroup tables in canonical way.</p>
<p>Returns: A canonical copy of the quasigroup or loop <varclass="Arg">Q</var>.</p>
<p>This is a shorthand for <codeclass="code">QuasigroupByCayleyTable(CanonicalCayleyTable(<varclass="Arg">Q</var>)</code> when <varclass="Arg">Q</var> is a declared quasigroup, and <codeclass="code">LoopByCayleyTable(CanonicalCayleyTable(<varclass="Arg">Q</var>)</code> when <varclass="Arg">Q</var> is a loop.</p>
<p>Returns: A normalized version of the Cayley table <varclass="Arg">T</var>.</p>
<p>A given Cayley table <varclass="Arg">T</var> is normalized in three steps as follows: first, <codeclass="code">CanonicalCayleyTable</code> is called to rename entries to <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>, then the columns of <varclass="Arg">T</var> are permuted so that the first row reads <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>, and finally the rows of <varclass="Arg">T</var> are permuted so that the first column reads <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>.</p>
<p>Returns: The quasigroup (resp. loop) with quasigroup table (resp. loop table) <varclass="Arg">T</var>.</p>
<p>Since <codeclass="code">CanonicalCayleyTable</code> is called within the above operation, the resulting quasigroup will have Cayley table with distinct entries <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span>.</p>
<h4>4.5 <spanclass="Heading">Creating Quasigroups and Loops from a File</span></h4>
<p>Typing a large multiplication table manually is tedious and error-prone. We have therefore included a general method in <strongclass="pkg">LOOPS</strong> that reads multiplication tables of quasigroups from a file.</p>
<p>Instead of writing a separate algorithm for each common format, our algorithm relies on the user to provide a bit of information about the input file. Here is an outline of the algorithm, with file named <varclass="Arg">filename</var> and a string <varclass="Arg">del</var> as input (in essence, the characters of <varclass="Arg">del</var> will be ignored while reading the file):</p>
<ul>
<li><p>read the entire content of <varclass="Arg">filename</var> into a string <varclass="Arg">s</var>,</p>
</li>
<li><p>replace all end-of-line characters in <varclass="Arg">s</var> by spaces,</p>
</li>
<li><p>replace by spaces all characters of <varclass="Arg">s</var> that appear in <varclass="Arg">del</var>,</p>
</li>
<li><p>split <varclass="Arg">s</var> into maximal substrings without spaces, called <em>chunks</em> here,</p>
</li>
<li><p>let <spanclass="SimpleMath">\(n\)</span> be the number of distinct chunks,</p>
</li>
<li><p>if the number of chunks is not <spanclass="SimpleMath">\(n^2\)</span>, report error,</p>
</li>
<li><p>construct the multiplication table by assigning numerical values <spanclass="SimpleMath">\(1\)</span>, <spanclass="SimpleMath">\(\dots\)</span>, <spanclass="SimpleMath">\(n\)</span> to chunks, depending on their position among distinct chunks.</p>
</li>
</ul>
<p>The following examples clarify the algorithm and document its versatility. All examples are of the form <spanclass="SimpleMath">\(F+D\Longrightarrow T\)</span>, meaning that an input file containing <spanclass="SimpleMath">\(F\)</span> together with the deletion string <spanclass="SimpleMath">\(D\)</span> produce multiplication table <spanclass="SimpleMath">\(T\)</span>. <br/></p>
<p><strongclass="button">Example:</strong> Data does not have to be arranged into an array of any kind.</p>
<p><strongclass="button">Example:</strong> A typical table produced by <strongclass="pkg">GAP</strong> is easily parsed by deleting brackets and commas.</p>
<p><strongclass="button">Example:</strong> A typical TeX table with rows separated by lines is also easily converted. Note that we have to use <spanclass="SimpleMath">\(\backslash\backslash\)</span> to ensure that every occurrence of <spanclass="SimpleMath">\(\backslash\)</span> is deleted, since <spanclass="SimpleMath">\(\backslash\backslash\)</span> represents the character <spanclass="SimpleMath">\(\backslash\)</span> in <strongclass="pkg">GAP</strong></p>
<p>Returns: The quasigroup (resp. loop) whose multiplication table data is in file <varclass="Arg">filename</var>, ignoring the characters contained in the string <varclass="Arg">del</var>.</p>
<p>Returns: If <varclass="Arg">P</var> is a set of <spanclass="SimpleMath">\(n\)</span> permutations of an <spanclass="SimpleMath">\(n\)</span>-element set <spanclass="SimpleMath">\(X\)</span>, returns Cayley table <spanclass="SimpleMath">\(C\)</span> such that <spanclass="SimpleMath">\(C[i][j] = X[j]^{P[i]}\)</span>.</p>
<p>The cardinality of the underlying set is determined by the moved points of the first permutation in <varclass="Arg">P</var>, unless the first permutation is the identity permutation, in which case the second permutation is used.</p>
<p>In particular, if <varclass="Arg">P</var> is the left section of a quasigroup <varclass="Arg">Q</var>, <codeclass="code">CayleyTableByPerms(<varclass="Arg">Q</var>)</code> returns the multiplication table of <varclass="Arg">Q</var>.</p>
<p>Returns: If <varclass="Arg">P</var> is a set of permutations corresponding to the left translations of a quasigroup (resp. loop), returns the corresponding quasigroup (resp. loop).</p>
<p>The order of permutations in <varclass="Arg">P</var> is important in the quasigroup case, but it is disregarded in the loop case, since then the order of rows in the corresponding multiplication table is determined by the presence of the neutral element.</p>
<h4>4.7 <spanclass="Heading">Creating Quasigroups and Loops From Folders</span></h4>
<p>Let <spanclass="SimpleMath">\(G\)</span> be a group, <spanclass="SimpleMath">\(H\)</span> a subgroup of <spanclass="SimpleMath">\(G\)</span>, and <spanclass="SimpleMath">\(T\)</span> a right transversal to <spanclass="SimpleMath">\(H\)</span> in <spanclass="SimpleMath">\(G\)</span>. Let <spanclass="SimpleMath">\(\tau:G\to T\)</span> be defined by <spanclass="SimpleMath">\(x\in H\tau(x)\)</span>. Then the operation <spanclass="SimpleMath">\(\circ\)</span> defined on the right cosets <spanclass="SimpleMath">\(Q = \{Ht|t\in T\}\)</span> by <spanclass="SimpleMath">\(Hs\circ Ht = H\tau(st)\)</span> turns <spanclass="SimpleMath">\(Q\)</span> into a quasigroup if and only if <spanclass="SimpleMath">\(T\)</span> is a right transversal to all conjugates <spanclass="SimpleMath">\(g^{-1}Hg\)</span> of <spanclass="SimpleMath">\(H\)</span> in <spanclass="SimpleMath">\(G\)</span>. (In fact, every quasigroup <spanclass="SimpleMath">\(Q\)</span> can be obtained in this way by letting <spanclass="SimpleMath">\(G={\rm Mlt}_\rho(Q)\)</span>, <spanclass="SimpleMath">\(H={\rm Inn}_\rho(Q)\)</span> and <spanclass="SimpleMath">\(T=\{R_x|x\in Q\}\)</span>.)</p>
<p>We call the triple <spanclass="SimpleMath">\((G,H,T)\)</span> a <em>right quasigroup (or loop) folder</em>.</p>
<p>Returns: The quasigroup (resp. loop) from the right folder (<varclass="Arg">G</var>, <varclass="Arg">H</var>, <varclass="Arg">T</var>).</p>
<p><strongclass="button">Remark:</strong> We do not support the dual operations for left sections since, by default, actions in <strongclass="pkg">GAP</strong> act on the right. <br/></p>
<p>Here is a simple example in which <spanclass="SimpleMath">\(T\)</span> is actually the right section of the resulting loop.</p>
<h4>4.8 <spanclass="Heading">Creating Quasigroups and Loops By Nuclear Extensions</span></h4>
<p>Let <spanclass="SimpleMath">\(K\)</span>, <spanclass="SimpleMath">\(F\)</span> be loops. Then a loop <spanclass="SimpleMath">\(Q\)</span> is an <em>extension</em> of <spanclass="SimpleMath">\(K\)</span> by <spanclass="SimpleMath">\(F\)</span> if <spanclass="SimpleMath">\(K\)</span> is a normal subloop of <spanclass="SimpleMath">\(Q\)</span> such that <spanclass="SimpleMath">\(Q/K\)</span> is isomorphic to <spanclass="SimpleMath">\(F\)</span>. An extension <spanclass="SimpleMath">\(Q\)</span> of <spanclass="SimpleMath">\(K\)</span> by <spanclass="SimpleMath">\(F\)</span> is <em>nuclear</em> if <spanclass="SimpleMath">\(K\)</span> is an abelian group and <spanclass="SimpleMath">\(K\le N(Q)\)</span>.</p>
<p>A map <spanclass="SimpleMath">\(\theta:F\times F\to K\)</span> is a <em>cocycle</em> if <spanclass="SimpleMath">\(\theta(1,x) = \theta(x,1) = 1\)</span> for every <spanclass="SimpleMath">\(x\in F\)</span>.</p>
<p>The following theorem holds for loops <spanclass="SimpleMath">\(Q\)</span>, <spanclass="SimpleMath">\(F\)</span> and an abelian group <spanclass="SimpleMath">\(K\)</span>: <spanclass="SimpleMath">\(Q\)</span> is a nuclear extension of <spanclass="SimpleMath">\(K\)</span> by <spanclass="SimpleMath">\(F\)</span> if and only if there is a cocycle <spanclass="SimpleMath">\(\theta:F\times F\to K\)</span> and a homomorphism <spanclass="SimpleMath">\(\varphi:F\to{\rm Aut}(Q)\)</span> such that <spanclass="SimpleMath">\(K\times F\)</span> with multiplication <spanclass="SimpleMath">\((a,x)(b,y) = (a\varphi_x(b)\theta(x,y),xy)\)</span> is isomorphic to <spanclass="SimpleMath">\(Q\)</span>.</p>
<p>Returns: The data necessary to construct <varclass="Arg">Q</var> as a nuclear extension of the subloop <varclass="Arg">K</var> by <varclass="Arg">Q</var><spanclass="SimpleMath">\(/\)</span><varclass="Arg">K</var>, namely <spanclass="SimpleMath">\([K, F, \varphi, \theta]\)</span> as above. Note that <varclass="Arg">K</var> must be a commutative subloop of the nucleus of <varclass="Arg">Q</var>.</p>
<p>If <spanclass="SimpleMath">\(n=|F|\)</span> and <spanclass="SimpleMath">\(m=|\)</span><varclass="Arg">K</var><spanclass="SimpleMath">\(|\)</span>, the cocycle <spanclass="SimpleMath">\(\theta\)</span> is returned as an <spanclass="SimpleMath">\(n\times n\)</span> array with entries in <spanclass="SimpleMath">\(\{1,\dots,m\}\)</span>, and the homomorphism <spanclass="SimpleMath">\(\varphi\)</span> is returned as a list of length <spanclass="SimpleMath">\(n\)</span> of permutations of <spanclass="SimpleMath">\(\{1,\dots,m\}\)</span>.</p>
<p>Returns: The extension of an abelian group <varclass="Arg">K</var> by a loop <varclass="Arg">F</var>, using action <varclass="Arg">f</var> and cocycle <varclass="Arg">t</var>. The arguments must be formatted as the output of <codeclass="code">NuclearExtension</code>.</p>
<h4>4.9 <spanclass="Heading">Random Quasigroups and Loops</span></h4>
<p>An algorithm is said to select a latin square of order <spanclass="SimpleMath">\(n\)</span><em>at random</em> if every latin square of order <spanclass="SimpleMath">\(n\)</span> is returned by the algorithm with the same probability. Selecting a latin square at random is a nontrivial problem.</p>
<p>In <ahref="chapBib_mj.html#biBJaMa">[JM96]</a>, Jacobson and Matthews defined a random walk on the space of latin squares and so-called improper latin squares that visits every latin square with the same probability. The diameter of the space is no more than <spanclass="SimpleMath">\(4(n-1)^3\)</span> in the sense that no more than <spanclass="SimpleMath">\(4(n-1)^3\)</span> properly chosen steps are needed to travel from one latin square of order <spanclass="SimpleMath">\(n\)</span> to another.</p>
<p>The Jacobson-Matthews algorithm can be used to generate random quasigroups as follows: (i) select any latin square of order <spanclass="SimpleMath">\(n\)</span>, for instance the canonical multiplication table of the cyclic group of order <spanclass="SimpleMath">\(n\)</span>, (ii) perform sufficiently many steps of the random walk, stopping at a proper or improper latin square, (iii) if necessary, perform a few more steps to end up with a proper latin square. Upon normalizing the resulting latin square, we obtain a random loop of order <spanclass="SimpleMath">\(n\)</span>.</p>
<p>By the above result, it suffices to use about <spanclass="SimpleMath">\(n^3\)</span> steps to arrive at any latin square of order <spanclass="SimpleMath">\(n\)</span> from the initial latin square. In fact, a smaller number of steps is probably sufficient.</p>
<p>Returns: A random quasigroup (resp. loop) of order <varclass="Arg">n</var> using the Jacobson-Matthews algorithm. If the optional argument <varclass="Arg">iter</var> is omitted, <varclass="Arg">n</var><spanclass="SimpleMath">\({}^3\)</span> steps are used. Otherwise <varclass="Arg">iter</var> steps are used.</p>
<p>If <varclass="Arg">iter</var> is small, the Cayley table of the returned quasigroup (resp. loop) will be close to the canonical Cayley table of the cyclic group of order <varclass="Arg">n</var>.</p>
<p>Returns: A random nilpotent loop as follows (see Section <ahref="chap6_mj.html#X821F40748401D698"><spanclass="RefLink">6.9</span></a> for more information on nilpotency): <varclass="Arg">lst</var> must be a list of positive integers and/or finite abelian groups. If <codeclass="code"><varclass="Arg">lst</var>=[a1]</code> and <codeclass="code">a1</code> is an integer, a random abelian group of order <codeclass="code">a1</code> is returned, else <codeclass="code">a1</code> is an abelian group and <codeclass="code">AsLoop(a1)</code> is returned. If <codeclass="code"><varclass="Arg">lst</var>= [a1,...,am]</code>, a random central extension of <codeclass="code">RandomNilpotentLoop([a1])</code> by <codeclass="code">RandomNilpotentLoop([a2,...,am])</code> is returned.</p>
<p>To determine the nilpotency class <spanclass="SimpleMath">\(c\)</span> of the resulting loop, assume that <varclass="Arg">lst</var> has length at least 2, contains only integers bigger than 1, and let <spanclass="SimpleMath">\(m\)</span> be the last entry of <varclass="Arg">lst</var>. If <spanclass="SimpleMath">\(m>2\)</span> then <spanclass="SimpleMath">\(c\)</span> is equal to <codeclass="code">Length(<varclass="Arg">lst</var>)</code>, else <spanclass="SimpleMath">\(c\)</span> is equal to <codeclass="code">Length(<varclass="Arg">lst</var>)-1</code>.</p>
<p><strongclass="pkg">LOOPS</strong> contains methods that convert between magmas, quasigroups, loops and groups, provided such conversions are possible. Each of the conversion methods <codeclass="code">IntoQuasigroup</code>, <codeclass="code">IntoLoop</code> and <codeclass="code">IntoGroup</code> returns <codeclass="code">fail</code> if the requested conversion is not possible. <br/></p>
<p><strongclass="button">Remark:</strong> Up to version 2.0.0 of <strongclass="pkg">LOOPS</strong>, we supported <codeclass="code">AsQuasigroup</code>, <codeclass="code">AsLoop</code> and <codeclass="code">AsGroup</code> in place of <codeclass="code">IntoQuasigroup</code>, <codeclass="code">IntoLoop</code> and <codeclass="code">IntoGroup</code>, respectively. We have changed the terminology starting with version 2.1.0 in order to comply with <strongclass="pkg">GAP</strong> naming rules for <codeclass="code">AsSomething</code>, as explained in Chapter <ahref="chap3_mj.html#X7A6DF65E826B8CFF"><spanclass="RefLink">3</span></a>. Finally, the method <codeclass="code">AsGroup</code> is a core method of <strongclass="pkg">GAP</strong> that returns an fp group if its argument is an associative loop.</p>
<p>Returns: If <varclass="Arg">M</var> is a declared magma that happens to be a quasigroup, the corresponding quasigroup is returned. If <varclass="Arg">M</var> is already declared as a quasigroup, <varclass="Arg">M</var> is returned.</p>
<p>Returns: An isomorphic copy of the principal isotope <spanclass="SimpleMath">\((\)</span><varclass="Arg">M</var>,<spanclass="SimpleMath">\(\circ)\)</span> via the transposition <spanclass="SimpleMath">\((1\)</span>,<varclass="Arg">f</var><spanclass="SimpleMath">\(\cdot\)</span><varclass="Arg">g</var><spanclass="SimpleMath">\()\)</span>. An isomorphic copy is returned rather than <spanclass="SimpleMath">\((\)</span><varclass="Arg">M</var>,<spanclass="SimpleMath">\(\circ)\)</span> because in <strongclass="pkg">LOOPS</strong> all loops have to have neutral element labeled as <spanclass="SimpleMath">\(1\)</span>.</p>
<p>Given a quasigroup <spanclass="SimpleMath">\(M\)</span> and two of its elements <spanclass="SimpleMath">\(f\)</span>, <spanclass="SimpleMath">\(g\)</span>, the principal loop isotope <spanclass="SimpleMath">\(x\circ y = R_g^{-1}(x)\cdot L_f^{-1}(y)\)</span> turns <spanclass="SimpleMath">\((M,\circ)\)</span> into a loop with neutral element <spanclass="SimpleMath">\(f\cdot g\)</span> (see Section <ahref="chap2_mj.html#X791066ED7DD9F254"><spanclass="RefLink">2.6</span></a>).</p>
<p>Returns: If <varclass="Arg">M</var> is a declared magma that happens to be a quasigroup (but not necessarily a loop!), a loop is returned as follows: If <varclass="Arg">M</var> is already declared as a loop, <varclass="Arg">M</var> is returned. Else, if <varclass="Arg">M</var> possesses a neutral element <spanclass="SimpleMath">\(e\)</span> and if <spanclass="SimpleMath">\(f\)</span> is the first element of <varclass="Arg">M</var>, then an isomorphic copy of <varclass="Arg">M</var> via the transposition <spanclass="SimpleMath">\((e,f)\)</span> is returned. If <varclass="Arg">M</var> does not posses a neutral element, <codeclass="code">PrincipalLoopIsotope(<varclass="Arg">M</var>, <varclass="Arg">M.1</var>, <varclass="Arg">M.1</var>)</code> is returned.<br/></p>
<p><strongclass="button">Remark:</strong> One could obtain a loop from a declared magma <varclass="Arg">M</var> in yet another way, by normalizing the Cayley table of <varclass="Arg">M</var>. The three approaches can result in nonisomorphic loops in general.</p>
<p>Returns: If <varclass="Arg">M</var> is a declared magma that happens to be a group, the corresponding group is returned as follows: If <varclass="Arg">M</var> is already declared as a group, <varclass="Arg">M</var> is returned, else <codeclass="code">RightMultiplicationGroup(IntoLoop(<varclass="Arg">M</var>))</code> is returned, which is a permutation group isomorphic to <varclass="Arg">M</var>.</p>
<p>Returns: If each <varclass="Arg">Qi</var> is either a declared quasigroup, declared loop or a declared group, the direct product of <varclass="Arg">Q1</var>, <spanclass="SimpleMath">\(\dots\)</span>, <varclass="Arg">Qn</var> is returned. If every <varclass="Arg">Qi</var> is a declared group, a group is returned; if every <varclass="Arg">Qi</var> is a declared loop, a loop is returned; otherwise a quasigroup is returned.</p>
<h4>4.12 <spanclass="Heading">Opposite Quasigroups and Loops</span></h4>
<p>When <spanclass="SimpleMath">\(Q\)</span> is a quasigroup with multiplication <spanclass="SimpleMath">\(\cdot\)</span>, the <em>opposite quasigroup</em> of <spanclass="SimpleMath">\(Q\)</span> is a quasigroup with the same underlying set as <spanclass="SimpleMath">\(Q\)</span> and with multiplication <spanclass="SimpleMath">\(*\)</span> defined by <spanclass="SimpleMath">\(x*y=y\cdot x\)</span>.</p>
<p>Returns: The opposite of the quasigroup (resp. loop) <varclass="Arg">Q</var>. Note that if <codeclass="code">OppositeQuasigroup(<varclass="Arg">Q</var>)</code> or <codeclass="code">OppositeLoop(<varclass="Arg">Q</var>)</code> are called, then the returned quasigroup or loop is not stored as an attribute of <varclass="Arg">Q</var>.</p>
<divclass="chlinkprevnextbot"> <ahref="chap0_mj.html">[Top of Book]</a> <ahref="chap0_mj.html#contents">[Contents]</a> <ahref="chap3_mj.html">[Previous Chapter]</a> <ahref="chap5_mj.html">[Next Chapter]</a> </div>