<#Include SYSTEM "title.xml">
Introduction &LOOPS; is a package for GAP4 whose purpose is to: provide researchers in nonassociative algebra with a powerful computational tool concerning finite loops and quasigroups, extend &GAP; toward the realm of nonassociative structures. &LOOPS; has been accepted as an official package of &GAP; in May 2015.
Installation Have GAP 4.8 or newer installed on your computer.

If you do not see the subfolder pkg/loops in the main directory of &GAP; then download the &LOOPS; package from the distribution website https://gap-packages.github.io/loops/ and unpack the downloaded file into the pkg subfolder.

The package &LOOPS; can then be loaded to &GAP; anytime by calling `LoadPackage("loops");`.

If you wish to load &LOOPS; automatically while starting &GAP;, start &GAP;, execute the following commands, gap> pref := UserPreference( "PackagesToLoad " );; gap> Add( pref, "loops" );; gap> SetUserPreference( "PackagesToLoad", pref );; gap> WriteGapIniFile();; quit &GAP; and restart it.
Documentation The documentation has been prepared with the &GAPDoc; package and is therefore available in several formats: &LaTeX;, pdf, ps, html, and as an inline help in &GAP;. All these formats have been obtained directly from the master XML documentation file. Consequently, the different formats of the documentation differ only in their appearance, not in content.

The preferred format of the documentation is html with MathJax turned on.

All formats of the documentation can be found in the doc folder of &LOOPS;. You can also download the documentation from the &LOOPS; distribution website.

The inline &GAP; help is available upon installing &LOOPS; and can be accessed in the usual way, i.e., upon typing `?command`, &GAP; displays the section of the &LOOPS; manual containing information about `command`.
Test Files Test files conforming to &GAP; standards are provided for &LOOPS; and can be found in the folder tst. The command `ReadPackage("loops","tst/testall.g")` runs all tests for &LOOPS;.
Memory Management Some libraries of loops are loaded only upon explicit demand and can occupy a lot of memory. For instance, the library or RCC loops occupies close to 100 MB of memory when fully loaded. The command `LOOPS_FreeMemory();` will attempt to free memory by unbinding on-demand library data loaded by &LOOPS;.
Feedback We welcome all comments and suggestions on &LOOPS;, especially those concerning the future development of the package. You can contact us by e-mail.
Mathematical Background We assume that you are familiar with the theory of quasigroups and loops, for instance with the textbook of Bruck or Pflugfelder . Nevertheless, we did include definitions and results in this manual in order to unify terminology and improve legibility of the text. Some general concepts of quasigroups and loops can be found in this chapter. More special concepts are defined throughout the text as needed.
Quasigroups and Loops A set with one binary operation (denoted \cdot here) is called groupoid groupoid or magma magma, the latter name being used in &GAP;.

An element 1 of a groupoid G is a neutral element neutral element or an identity identity element if 1\cdot x = x\cdot 1 = x for every x in G.

Let G be a groupoid with neutral element 1. Then an element x^{-1} is called a inverse two-sided inverse of x in G if x\cdot x^{-1} = x^{-1}\cdot x = 1.

Recall that groupgroups are associative groupoids with an identity element and two-sided inverses. Groups can be reached in another way from groupoids, namely via quasigroups and loops.

A quasigroup quasigroup Q is a groupoid such that the equation x\cdot y=z has a unique solution in Q whenever two of the three elements x, y, z of Q are specified. Note that multiplication tables of finite quasigroups are precisely latin square latin squares, i.e., square arrays with symbols arranged so that each symbol occurs in each row and in each column exactly once. A loop loop L is a quasigroup with a neutral element.

Groups are clearly loops. Conversely, it is not hard to show that associative quasigroups are groups.
Translations Given an element x of a quasigroup Q, we can associative two permutations of Q with it: the translation left translation L_x:Q\to Q defined by y\mapsto x\cdot y, and the translation right translation R_x:Q\to Q defined by y\mapsto y\cdot x.

The binary operation x\backslash y = L_x^{-1}(y) is called the division left division, and x/y = R_y^{-1}(x) is called the division right division.

Although it is possible to compose two left (right) translations of a quasigroup, the resulting permutation is not necessarily a left (right) translation. The set \{L_x|x\in Q\} is called the section left section of Q, and \{R_x|x\in Q\} is the section right section of Q.

Let S_Q be the symmetric group on Q. Then the subgroup {\rm Mlt}_{\lambda}(Q)=\langle L_x|x\in Q\rangle of S_Q generated by all left translations is the multiplication group left multiplication group of Q. Similarly, {\rm Mlt}_{\rho}(Q)= \langle R_x|x\in Q\rangle is the multiplication group right multiplication group of Q. The smallest group containing both {\rm Mlt}_{\lambda}(Q) and {\rm Mlt}_{\rho}(Q) is called the multiplication group multiplication group of Q and is denoted by {\rm Mlt}(Q).

For a loop Q, the inner mapping group left inner mapping group {\rm Inn}_{\lambda}(Q) is the stabilizer of 1 in {\rm Mlt}_{\lambda}(Q). The inner mapping group right inner mapping group {\rm Inn}_{\rho}(Q) is defined dually. The inner mapping group inner mapping group {\rm Inn}(Q) is the stabilizer of 1 in Q.
Subquasigroups and Subloops A nonempty subset S of a quasigroup Q is a subquasigroup subquasigroup if it is closed under multiplication and the left and right divisions. In the finite case, it suffices for S to be closed under multiplication. subloop Subloops are defined analogously when Q is a loop.

The nucleus left nucleus {\rm Nuc}_{\lambda}(Q) of Q consists of all elements x of Q such that x(yz) = (xy)z for every y, z in Q. The nucleus middle nucleus {\rm Nuc}_{\mu}(Q) and the nucleus right nucleus {\rm Nuc}_{\rho}(Q) are defined analogously. The nucleus nucleus {\rm Nuc}(Q) is the intersection of the left, middle and right nuclei.

The commutant commutant C(Q) of Q consists of all elements x of Q that commute with all elements of Q. The center center Z(Q) of Q is the intersection of {\rm Nuc}(Q) with C(Q).

A subloop S of Q is subloop normal in Q if f(S)=S for every inner mapping f of Q.
Nilpotence and Solvability For a loop Q define Z_0(Q) = 1 and let Z_{i+1}(Q) be the preimage of the center of Q/Z_i(Q) in Q. A loop Q is nilpotence class nilpotent loop loop nilpotent of class n if n is the least nonnegative integer such that Z_n(Q)=Q. In such case Z_0(Q)\le Z_1(Q)\le \dots \le Z_n(Q) is the upper central series central series.

The derived subloop derived subloop Q' of Q is the least normal subloop of Q such that Q/Q' is a commutative group. Define Q^{(0)}=Q and let Q^{(i+1)} be the derived subloop of Q^{(i)}. Then Q is solvability class solvable loop loop solvable of class n if n is the least nonnegative integer such that Q^{(n)} = 1. In such a case Q^{(0)}\ge Q^{(1)}\ge \cdots \ge Q^{(n)} is the derived series derived series of Q.
Associators and Commutators Let Q be a quasigroup and let x, y, z be elements of Q. Then the commutator commutator of x, y is the unique element [x,y] of Q such that xy = [x,y](yx), and the associator associator of x, y, z is the unique element [x,y,z] of Q such that (xy)z = [x,y,z](x(yz)).

The associator subloop associator subloop A(Q) of Q is the least normal subloop of Q such that Q/A(Q) is a group.

It is not hard to see that A(Q) is the least normal subloop of Q containing all commutators, and Q' is the least normal subloop of Q containing all commutators and associators.
Homomorphism and Homotopisms Let K, H be two quasigroups. Then a map f:K\to H is a homomorphism homomorphism if f(x)\cdot f(y)=f(x\cdot y) for every x, y\in K. If f is also a bijection, we speak of an isomorphism isomorphism, and the two quasigroups are called isomorphic.

An ordered triple (\alpha,\beta,\gamma) of maps \alpha, \beta, \gamma:K\to H is a homotopism homotopism if \alpha(x)\cdot\beta(y) = \gamma(x\cdot y) for every x, y in K. If the three maps are bijections, then (\alpha,\beta,\gamma) is an isotopism isotopism, and the two quasigroups are isotopic.

Isotopic groups are necessarily isomorphic, but this is certainly not true for nonassociative quasigroups or loops. In fact, every quasigroup is isotopic to a loop.

Let (K,\cdot), (K,\circ) be two quasigroups defined on the same set K. Then an isotopism (\alpha,\beta,{\rm id}_K) is called a isotopism principal isotopism. An important class of principal isotopisms is obtained as follows: Let (K,\cdot) be a quasigroup, and let f, g be elements of K. Define a new operation \circ on K by x\circ y = R_g^{-1}(x)\cdot L_f^{-1}(y), where R_g, L_f are translations. Then (K,\circ) is a quasigroup isotopic to (K,\cdot), in fact a loop with neutral element f\cdot g. We call (K,\circ) a loop isotope principal loop isotope of (K,\cdot).
How the Package Works The package consists of three complementary components: the core algorithms for quasigroup theoretical notions (see Chapters , , and ), algorithms for specific varieties of loops, mostly for Moufang loops (see Chapter ), the library of small loops (see Chapter ). 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 &LOOPS;.
Representing Quasigroups 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 &GAP;. (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 for more details.)

Consequently, the package is intended primarily for quasigroups and loops of small order, say up to 1000.

The &GAP; categories IsQuasigroupElement `IsQuasigroupElement`, IsLoopElement `IsLoopElement`, IsQuasigroup `IsQuasigroup` and IsLoop `IsLoop` are declared in &LOOPS; as follows: DeclareCategory( "IsQuasigroupElement", IsMultiplicativeElement ); DeclareRepresentation( "IsQuasigroupElmRep", IsPositionalObjectRep and IsMultiplicativeElement, [1] ); DeclareCategory( "IsLoopElement", IsQuasigroupElement and IsMultiplicativeElementWithInverse ); DeclareRepresentation( "IsLoopElmRep", IsPositionalObjectRep and IsMultiplicativeElementWithInverse, [1] ); ## latin (auxiliary category for GAP to tell apart IsMagma and IsQuasigroup) DeclareCategory( "IsLatinMagma", IsObject ); DeclareCategory( "IsQuasigroup", IsMagma and IsLatinMagma ); DeclareCategory( "IsLoop", IsQuasigroup and IsMultiplicativeElementWithInverseCollection);
Conversions between magmas, quasigroups, loops and groups Whether an object is considered a magma, quasigroup, loop or group is a matter of declaration in &LOOPS;. Loops are automatically quasigroups, and both groups and quasigroups are automatically magmas. All standard &GAP; commands for magmas are therefore available for quasigroups and loops.

In &GAP;, functions of the type `AsSomething(X)` convert the domain X into `Something`, if possible, without changing the underlying domain X. For example, if X is declared as magma but is associative and has neutral element and inverses, `AsGroup(X)` returns the corresponding group with the underlying domain X.

We have opted for a more general kind of conversions in &LOOPS; (starting with version 2.1.0), using functions of the type `IntoSomething(X)`. The two main features that distinguish `IntoSomething` from `AsSomething` are: The function `IntoSomething(X)` does not necessarily return the same domain as X. The reason is that X can be a group, for instance, defined on one of many possible domains, while `IntoLoop(X)` must result in a loop, and hence be defined on a subset of some interval 1, \dots, n (see Section ). In some special situations, the function `IntoSomething(X)` allows to convert X into `Something` even though X does not have all the properties of `Something`. For instance, every quasigroup is isotopic to a loop, so it makes sense to allow the conversion `IntoLoop(Q)` even if the quasigroup Q does not posses a neutral element. Details of all conversions in &LOOPS; can be found in Section .
Calculating with Quasigroups 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 ), and we illustrate it with a few examples:

Example: This example shows how properties of quasigroups can be translated into properties of translations in a straightforward way. Let Q be a quasigroup. We ask if Q is associative. We can either test if (xy)z=x(yz) for every x, y, z in Q, or we can ask if L_{xy}=L_xL_y for every x, y in Q. Note that since L_{xy}, L_x and L_y are elements of a permutation group, we do not have to refer directly to the multiplication table once the left translations of Q are known.

Example: This example shows how properties of loops can be translated into properties of translations in a way that requires some theory. A Bol loop loop left Bol loop is a loop satisfying x(y(xz)) = (x(yx))z. We claim (without proof) that a loop Q is left Bol if and only if L_xL_yL_x is a left translation for every x, y in Q.

Example: This example shows that many properties of loops become purely group-theoretical once they are expressed in terms of translations. A loop is simple loop loop simple 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.

The main idea of the package is therefore to: calculate the translations and the associated permutation groups when they are needed, store them as attributes, use them in algorithms as often as possible.
Naming, Viewing and Printing Quasigroups and their Elements &GAP; displays information about objects in two modes: the `View` mode (default, short), and the `Print` mode (longer). Moreover, when the name of an object is set, the name is always shown, no matter which display mode is used.

Only loops contained in the libraries of &LOOPS; are named. For instance, the loop obtained via `MoufangLoop(32,4)`, the 4th Moufang loop of order 32, is named "Moufang loop 32/4'' and is shown as `<Moufang loop 32/4>`.

A generic quasigroup of order n is displayed as `<quasigroup of order n>`. Similarly, a loop of order n appears as `<loop of order n>`.

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 `<left alternative loop of order 12>` until a stronger property is obtained. Which property is displayed is governed by the filters built into &LOOPS; (see Appendix ). SetQuasigroupElmName and SetLoopElmName The above functions change the names of elements of a quasigroup (resp. loop) Q to name. By default, elements of a quasigroup appear as `qi` and elements of a loop appear as `li` in both display modes, where `i` is a positive integer. The neutral element of a loop is always indexed by 1.

For quasigroups and loops in the `Print` mode, we display the multiplication table (if it is known), otherwise we display the elements.

In the following example, `L` is a loop with two elements.
gap> L; <loop of order 2> gap> Print( L ); <loop with multiplication table [ [ 1, 2 ], [ 2, 1 ] ]> gap> Elements( L ); [ l1, l2 ] gap> SetLoopElmName( L, "loop_element" );; Elements( L ); [ loop_element1, loop_element2 ]
Creating Quasigroups and Loops In this chapter we describe several ways in which quasigroups and loops can be created in &LOOPS;.
About Cayley Tables Let X=\{x_1,\dots,x_n\} be a set and \cdot a binary operation on X. Then an n by n array with rows and columns bordered by x_1, \dots, x_n, in this order, is a Cayley table Cayley table, or a multiplication table multiplication table of \cdot, if the entry in the row x_i and column x_j is x_i\cdot x_j.

A Cayley table is a quasigroup table quasigroup table if it is a latin squarelatin square, i.e., if every entry x_i appears in every column and every row exactly once.

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 &LOOPS;, we therefore make the following assumption: All distinct entries in a quasigroup table must be positive integers, say x_1 < x_2 < \cdots < x_n, and if no border is specified, we assume that the table is bordered by x_1, \dots, x_n, in this order. Note that we do not assume that the distinct entries x_1, \dots, x_n form the interval 1, \dots, n. The significance of this observation will become clear in Chapter .

Finally, we say that a quasigroup table is a loop table loop table 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.
Testing Cayley Tables IsQuasigroupTable and IsQuasigroupCayleyTable `true` if T is a quasigroup table as defined above, else `false`. IsLoopTable and IsLoopCayleyTable `true` if T is a loop table as defined above, else `false`.

Remark:The package GUAVA also contains operations dealing with latin squares. In particular, `IsLatinSquare` is declared in GUAVA.
Canonical and Normalized Cayley Tables Canonical Cayley table constructed from Cayley table T by replacing entries x_i with i. A Cayley table is said to be Cayley table canonical if it is based on elements 1, \dots, n. Although we do not assume that every quasigroup table is canonical, it is often desirable to present quasigroup tables in canonical way. A canonical copy of the quasigroup or loop Q. This is a shorthand for `QuasigroupByCayleyTable(CanonicalCayleyTable(Q)` when Q is a declared quasigroup, and `LoopByCayleyTable(CanonicalCayleyTable(Q)` when Q is a loop. A normalized version of the Cayley table T. A given Cayley table T is normalized in three steps as follows: first, `CanonicalCayleyTable` is called to rename entries to 1, \dots, n, then the columns of T are permuted so that the first row reads 1, \dots, n, and finally the rows of T are permuted so that the first column reads 1, \dots, n.
Creating Quasigroups and Loops From Cayley Tables QuasigroupByCayleyTable and LoopByCayleyTable The quasigroup (resp. loop) with quasigroup table (resp. loop table) T. Since `CanonicalCayleyTable` is called within the above operation, the resulting quasigroup will have Cayley table with distinct entries 1, \dots, n.
gap> ct := CanonicalCayleyTable( [[5,3],[3,5]] ); [ [ 2, 1 ], [ 1, 2 ] ] gap> NormalizedQuasigroupTable( ct ); [ [ 1, 2 ], [ 2, 1 ] ] gap> LoopByCayleyTable( last ); <loop of order 2> gap> [ IsQuasigroupTable( ct ), IsLoopTable( ct ) ]; [ true, false ]
Creating Quasigroups and Loops from a File Typing a large multiplication table manually is tedious and error-prone. We have therefore included a general method in &LOOPS; that reads multiplication tables of quasigroups from a file.

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 filename and a string del as input (in essence, the characters of del will be ignored while reading the file): read the entire content of filename into a string s, replace all end-of-line characters in s by spaces, replace by spaces all characters of s that appear in del, split s into maximal substrings without spaces, called chunks here, let n be the number of distinct chunks, if the number of chunks is not n^2, report error, construct the multiplication table by assigning numerical values 1, \dots, n to chunks, depending on their position among distinct chunks.

The following examples clarify the algorithm and document its versatility. All examples are of the form F+D\Longrightarrow T, meaning that an input file containing F together with the deletion string D produce multiplication table T.

Example: Data does not have to be arranged into an array of any kind. \begin{array}{cccc} 0&1&2&1\\ 2&0&2& \\ 0&1& & \end{array}\quad + \quad "" \quad \Longrightarrow\quad \begin{array}{ccc} 1&2&3\\ 2&3&1\\ 3&1&2 \end{array}

Example: Chunks can be any strings. \begin{array}{cc} {\rm red}&{\rm green}\\ {\rm green}&{\rm red}\\ \end{array}\quad + \quad "" \quad \Longrightarrow\quad \begin{array}{cc} 1& 2\\ 2& 1 \end{array}

Example: A typical table produced by &GAP; is easily parsed by deleting brackets and commas. [ [0, 1], [1, 0] ] \quad + \quad "[,]" \quad \Longrightarrow\quad \begin{array}{cc} 1& 2\\ 2& 1 \end{array}

Example: A typical &TeX; table with rows separated by lines is also easily converted. Note that we have to use \backslash\backslash to ensure that every occurrence of \backslash is deleted, since \backslash\backslash represents the character \backslash in &GAP; \begin{array}{lll} x\&& y\&&\ z\backslash\backslash\cr y\&& z\&&\ x\backslash\backslash\cr z\&& x\&&\ y \end{array} \quad + \quad "\backslash\backslash\&" \quad \Longrightarrow\quad \begin{array}{ccc} 1&2&3\cr 2&3&1\cr 3&1&2 \end{array} QuasigroupFromFile and LoopFromFile The quasigroup (resp. loop) whose multiplication table data is in file filename, ignoring the characters contained in the string del.
Creating Quasigroups and Loops From Sections If P is a set of n permutations of an n-element set X, returns Cayley table C such that C[i][j] = X[j]^{P[i]}.

The cardinality of the underlying set is determined by the moved points of the first permutation in P, unless the first permutation is the identity permutation, in which case the second permutation is used.

In particular, if P is the left section of a quasigroup Q, `CayleyTableByPerms(Q)` returns the multiplication table of Q. QuasigroupByLeftSection and LoopByLeftSection If P is a set of permutations corresponding to the left translations of a quasigroup (resp. loop), returns the corresponding quasigroup (resp. loop). The order of permutations in P 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. QuasigroupByRightSection and LoopByRightSection These are the dual operations to `QuasigroupByLeftSection` and `LoopByLeftSection`.
gap> S := Subloop( MoufangLoop( 12, 1 ), [ 3 ] );; gap> ls := LeftSection( S ); [ (), (1,3,5), (1,5,3) ] gap> CayleyTableByPerms( ls ); [ [ 1, 3, 5 ], [ 3, 5, 1 ], [ 5, 1, 3 ] ] gap> CayleyTable( LoopByLeftSection( ls ) ); [ [ 1, 2, 3 ], [ 2, 3, 1 ], [ 3, 1, 2 ] ]
Creating Quasigroups and Loops From Folders Let G be a group, H a subgroup of G, and T a right transversal to H in G. Let \tau:G\to T be defined by x\in H\tau(x). Then the operation \circ defined on the right cosets Q = \{Ht|t\in T\} by Hs\circ Ht = H\tau(st) turns Q into a quasigroup if and only if T is a right transversal to all conjugates g^{-1}Hg of H in G. (In fact, every quasigroup Q can be obtained in this way by letting G={\rm Mlt}_\rho(Q), H={\rm Inn}_\rho(Q) and T=\{R_x|x\in Q\}.)

We call the triple (G,H,T) a folder right quasigroup (or loop) folder. QuasigroupByRightFolder and LoopByRightFolder The quasigroup (resp. loop) from the right folder (G, H, T).

Remark: We do not support the dual operations for left sections since, by default, actions in &GAP; act on the right.

Here is a simple example in which T is actually the right section of the resulting loop.
gap> T := [ (), (1,2)(3,4,5), (1,3,5)(2,4), (1,4,3)(2,5), (1,5,4)(2,3) ];; gap> G := Group( T );; H := Stabilizer( G, 1 );; gap> LoopByRightFolder( G, H, T ); <loop of order 5>
Creating Quasigroups and Loops By Nuclear Extensions Let K, F be loops. Then a loop Q is an extension extension of K by F if K is a normal subloop of Q such that Q/K is isomorphic to F. An extension Q of K by F is extension nuclear if K is an abelian group and K\le N(Q).

A map \theta:F\times F\to K is a cocycle cocycle if \theta(1,x) = \theta(x,1) = 1 for every x\in F.

The following theorem holds for loops Q, F and an abelian group K: Q is a nuclear extension of K by F if and only if there is a cocycle \theta:F\times F\to K and a homomorphism \varphi:F\to{\rm Aut}(Q) such that K\times F with multiplication (a,x)(b,y) = (a\varphi_x(b)\theta(x,y),xy) is isomorphic to Q. The data necessary to construct Q as a nuclear extension of the subloop K by Q/K, namely [K, F, \varphi, \theta] as above. Note that K must be a commutative subloop of the nucleus of Q. If n=|F| and m=|K|, the cocycle \theta is returned as an n\times n array with entries in \{1,\dots,m\}, and the homomorphism \varphi is returned as a list of length n of permutations of \{1,\dots,m\}. The extension of an abelian group K by a loop F, using action f and cocycle t. The arguments must be formatted as the output of `NuclearExtension`.
gap> F := IntoLoop( Group( (1,2) ) ); <loop of order 2> gap> K := DirectProduct( F, F );; gap> phi := [ (), (2,3) ];; gap> theta := [ [ 1, 1 ], [ 1, 3 ] ];; gap> LoopByExtension( K, F, phi, theta ); <loop of order 8> gap> IsAssociative( last ); false
Random Quasigroups and Loops An algorithm is said to select a latin square of order n at random latin square if every latin square of order n is returned by the algorithm with the same probability. Selecting a latin square at random is a nontrivial problem.

In , 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 4(n-1)^3 in the sense that no more than 4(n-1)^3 properly chosen steps are needed to travel from one latin square of order n to another.

The Jacobson-Matthews algorithm can be used to generate random quasigroups as follows: (i) select any latin square of order n, for instance the canonical multiplication table of the cyclic group of order n, (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 n.

By the above result, it suffices to use about n^3 steps to arrive at any latin square of order n from the initial latin square. In fact, a smaller number of steps is probably sufficient. RandomQuasigroup and RandomLoop A random quasigroup (resp. loop) of order n using the Jacobson-Matthews algorithm. If the optional argument iter is omitted, n{}^3 steps are used. Otherwise iter steps are used. If iter 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 n. A random nilpotent looploop as follows (see Section for more information on nilpotency): lst must be a list of positive integers and/or finite abelian groups. If `lst=[a1]` and `a1` is an integer, a random abelian group of order `a1` is returned, else `a1` is an abelian group and `AsLoop(a1)` is returned. If `lst= [a1,...,am]`, a random central extension of `RandomNilpotentLoop([a1])` by `RandomNilpotentLoop([a2,...,am])` is returned. To determine the nilpotency class c of the resulting loop, assume that lst has length at least 2, contains only integers bigger than 1, and let m be the last entry of lst. If m>2 then c is equal to `Length(lst)`, else c is equal to `Length(lst)-1`.
Conversions &LOOPS; contains methods that convert between magmas, quasigroups, loops and groups, provided such conversions are possible. Each of the conversion methods `IntoQuasigroup`, `IntoLoop` and `IntoGroup` returns `fail` if the requested conversion is not possible.

Remark: Up to version 2.0.0 of &LOOPS;, we supported `AsQuasigroup`, `AsLoop` and `AsGroup` in place of `IntoQuasigroup`, `IntoLoop` and `IntoGroup`, respectively. We have changed the terminology starting with version 2.1.0 in order to comply with &GAP; naming rules for `AsSomething`, as explained in Chapter . Finally, the method `AsGroup` is a core method of &GAP; that returns an fp group if its argument is an associative loop. If M is a declared magma that happens to be a quasigroup, the corresponding quasigroup is returned. If M is already declared as a quasigroup, M is returned. An isomorphic copy of the principal isotope (M,\circ) via the transposition (1,f\cdot g). An isomorphic copy is returned rather than (M,\circ) because in &LOOPS; all loops have to have neutral element labeled as 1. Given a quasigroup M and two of its elements f, g, the principal loop isotope x\circ y = R_g^{-1}(x)\cdot L_f^{-1}(y) turns (M,\circ) into a loop with neutral element f\cdot g (see Section ). If M is a declared magma that happens to be a quasigroup (but not necessarily a loop!), a loop is returned as follows: If M is already declared as a loop, M is returned. Else, if M possesses a neutral element e and if f is the first element of M, then an isomorphic copy of M via the transposition (e,f) is returned. If M does not posses a neutral element, `PrincipalLoopIsotope(M, M.1, M.1)` is returned.

Remark: One could obtain a loop from a declared magma M in yet another way, by normalizing the Cayley table of M. The three approaches can result in nonisomorphic loops in general. If M is a declared magma that happens to be a group, the corresponding group is returned as follows: If M is already declared as a group, M is returned, else `RightMultiplicationGroup(IntoLoop(M))` is returned, which is a permutation group isomorphic to M.
Products of Quasigroups and Loops If each Qi is either a declared quasigroup, declared loop or a declared group, the direct product of Q1, \dots, Qn is returned. If every Qi is a declared group, a group is returned; if every Qi is a declared loop, a loop is returned; otherwise a quasigroup is returned.
Opposite Quasigroups and Loops When Q is a quasigroup with multiplication \cdot, the opposite quasigroup quasigroup opposite quasigroup of Q is a quasigroup with the same underlying set as Q and with multiplication * defined by x*y=y\cdot x. Opposite, OppositeQuasigroup and OppositeLoop The opposite of the quasigroup (resp. loop) Q. Note that if `OppositeQuasigroup(Q)` or `OppositeLoop(Q)` are called, then the returned quasigroup or loop is not stored as an attribute of Q.
Basic Methods And Attributes In this chapter we describe the basic core methods and attributes of the &LOOPS; package.
Basic Attributes We associate many attributes with quasigroups in order to speed up computation. This section lists some basic attributes of quasigroups and loops. The list of elements of a quasigroup Q. See Section for more information about element labels. The Cayley table of a quasigroup Q. See Section for more information about quasigroup Cayley tables. The identity element of a loop Q.

Remark:If you want to know if a quasigroup Q has a neutral element, you can find out with the standard function for magmas `MultiplicativeNeutralElement(Q)`. The size of a quasigroup Q. The exponent of a power associative loop Q. (The method does not test if Q is power associative.) When Q is a power associative loop loop power associative loop, that is, the powers of elements are well-defined in Q, then the exponent exponent of Q is the smallest positive integer divisible by the orders of all elements of Q.
Basic Arithmetic Operations Each quasigroup element in &GAP; 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.

Two elements x, y of the same quasigroup are multiplied by x*y in &GAP;. Since multiplication of at least three elements is ambiguous in the nonassociative case, we parenthesize elements by default from left to right, i.e., x*y*z means ((x*y)*z). Of course, one can specify the order of multiplications by providing parentheses. LeftDivision and RightDivision The left division x\backslash y (resp. the right division x/y) of two elements x, y of the same quasigroup.
The list of elements obtained by performing the specified arithmetical operation elementwise using a list S of elements and an element x.

Remark: We support / in place of `RightDivision`. But we do not support \backslash in place of `LeftDivision`. LeftDivisionCayleyTable and RightDivisionCayleyTable The Cayley table of the respective arithmetic operation of a quasigroup Q.
Powers and Inverses Powers of elements are generally not well-defined in quasigroups. For magmas and a positive integral exponent, &GAP; calculates powers in the following way: x^1=x, x^{2k}=(x^k)\cdot(x^k) and x^{2k+1}=(x^{2k})\cdot x. One can easily see that this returns x^k in about \log_2(k) steps. For &LOOPS;, we have decided to keep this method, but the user should be aware that the method is sound only in power associative quasigroups.

Let x be an element of a loop Q with neutral element 1. Then the left inverse inverse x^\lambda of x is the unique element of Q satisfying x^\lambda x=1. Similarly, the right inverse inverse x^\rho satisfies xx^\rho=1. If x^\lambda=x^\rho, we call x^{-1}=x^\lambda=x^\rho the inverse inverse of x. LeftInverse, RightInverse and Inverse The left inverse, right inverse and inverse, respectively, of the quasigroup element x.
gap> CayleyTable( Q ); [ [ 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 ] ] gap> elms := Elements( Q ); gap> [ l1, l2, l3, l4, l5 ]; gap> [ LeftInverse( elms[3] ), RightInverse( elms[3] ), Inverse( elms[3] ) ]; [ l5, l4, fail ]
Associators and Commutators See Section for definitions of associators and commutators. The associator of the elements x, y, z of the same quasigroup. The commutator of the elements x, y of the same quasigroup.
Generators GeneratorsOfQuasigroup and GeneratorsOfLoop A set of generators of a quasigroup (resp. loop) Q. (Both methods are synonyms of `GeneratorsOfMagma`.)

As usual in &GAP;, one can refer to the `i`th generator of a quasigroup `Q` by `Q.i`. Note that while it is often the case that `Q.i = Elements(Q)[i]`, it is not necessarily so. A generating set \{q_0, \dots, q_m\} of Q such that Q_0=\emptyset, Q_m=Q, Q_i=\langle q_1, \dots, q_i \rangle, and q_{i+1} is the least element of Q\setminus Q_i. A small generating set \{q_0, \dots, q_m\} of Q obtained as follows: q_0 is the least element for which \langle q_0\rangle is largest possible, q_1$ is the least element for which \langle q_0,q_1 is largest possible, and so on.
Methods Based on Permutation Groups Most calculations in the &LOOPS; package are delegated to groups, taking advantage of the various permutations and permutation groups associated with quasigroups. This chapter explains in detail how the permutations associated with a quasigroup are calculated, and it also describes some of the core methods of &LOOPS; based on permutations. Additional core methods can be found in Chapter .
Parent of a Quasigroup Let Q be a quasigroup and S a subquasigroup of Q. Since the multiplication in S coincides with the multiplication in Q, it is reasonable not to store the multiplication table of S. However, the quasigroup S then must know that it is a subquasigroup of Q. The parent quasigroup of the quasigroup Q. When Q is not created as a subquasigroup of another quasigroup, the attribute `Parent(Q)` is set to Q. When Q is created as a subquasigroup of a quasigroup H, we set `Parent(Q)` equal to `Parent(H)`. Thus, in effect, `Parent(Q)` is the largest quasigroup from which Q has been created. The position of x among the elements of Q.

Let Q be a quasigroup with parent P, where P is some n-element quasigroup. Let x be an element of Q. Then `x![1]` is the position of x among the elements of P, i.e., `x![1] = Position(Elements(P),x)`.

While referring to elements of Q by their positions, the user should understand whether the positions are meant among the elements of Q, or among the elements of the parent P of Q. Since it requires no calculation to obtain `x![1]`, we always use the position of an element in its parent quasigroup in &LOOPS;. In this way, many attributes of a quasigroup, including its Cayley table, are permanently tied to its parent.

It is now clear why we have not insisted that Cayley tables of quasigroups must have entries covering the entire interval 1, \dots, n for some n. When S is a list of quasigroup elements (not necessarily from the same quasigroup), returns the corresponding list of positions of elements of S in the corresponding parent, i.e., `PosInParent(S)[i] = S[i]![1] = Position(Parent(S[i]),S[i])`.

Quasigroups with the same parent can be compared as follows. Assume that A, B are two quasigroups with common parent Q. Let G_A, G_B be the canonical generating sets of A and B, respectively, obtained by the method `GeneratorsSmallest` (see Section ). Then we define A<B if and only if G_A<G_B lexicographically.
Subquasigroups and Subloops When S is a subset of elements or indices of a quasigroup (resp. loop) Q, returns the smallest subquasigroup (resp. subloop) of Q containing S. We allow S to be a list of elements of Q, or a list of integers representing the positions of the respective elements in the parent quasigroup (resp. loop) of Q.

If S is empty, `Subquasigroup(Q,S)` returns the empty set if Q is a quasigroup, and it returns the one-element subloop of Q if Q is a loop.

Remark: The empty set is sometimes considered to be a subquasigroup of Q (although not in &LOOPS;). The above convention is useful for handling certain situations, for instance when the user calls `Center(Q)` for a quasigroup Q with empty center. This is an analog of `Subquasigroup(Q,S)` that can be used only when Q is a loop. Since there is no difference in the outcome while calling `Subquasigroup(Q,S)` or `Subloop(Q,S)` when Q is a loop, it is safe to always call `Subquasigroup(Q,S)`, whether Q is a loop or not. IsSubquasigroup and IsSubloop `true` if S is a subquasigroup (resp. subloop) of a quasigroup (resp. loop) Q, `false` otherwise. In other words, returns `true` if S and Q are quasigroups (resp. loops) with the same parent and S is a subset of Q. A list of all subquasigroups of a loop Q. A list of all subloops of a loop Q. If S is a subloop of Q, returns a list of all right cosetscoset of S in Q. The coset S is listed first, and the elements of each coset are ordered in the same way as the elements of S, i.e., if S = [s_1,\dots,s_m], then S x=[s_1x,\dots,s_mx]. A right transversal of a subloop S in a loop Q. The transversal consists of the list of first elements from the right cosets obtained by `RightCosets(Q,S)`. When S is a subloop of Q, the right transversaltransversal of S with respect to Q is a subset of Q containing one element from each right coset of S in Q.
Translations and Sections When x is an element of a quasigroup Q, the left translation L_x is a permutation of Q. In &LOOPS;, all permutations associated with quasigroups and their elements are permutations in the sense of &GAP;, i.e., they are bijections of some interval 1, \dots, n. Moreover, following our convention, the numerical entries of the permutations point to the positions among elements of the parent of Q, not among elements of Q. LeftTranslation and RightTranslation If x is an element of a quasigroup Q, returns the left translation (resp. right translation) by x in Q. LeftSection and RightSection The left section (resp. right section) of a quasigroup Q.

Here is an example illustrating the main features of the subquasigroup construction and the relationship between a quasigroup and its parent.

Note how the Cayley table of a subquasigroup is created only upon explicit demand. Also note that changing the names of elements of a subquasigroup (subloop) automatically changes the names of the elements of the parent subquasigroup (subloop). This is because the elements are shared.
gap> M := MoufangLoop( 12, 1 );; S := Subloop( M, [ M.5 ] ); <loop of order 3> gap> [ Parent( S ) = M, Elements( S ), PosInParent( S ) ]; [ true, [ l1, l3, l5], [ 1, 3, 5 ] ] gap> HasCayleyTable( S ); false gap> SetLoopElmName( S, "s" );; Elements( S ); Elements( M ); [ s1, s3, s5 ] [ s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12 ] gap> CayleyTable( S ); [ [ 1, 3, 5 ], [ 3, 5, 1 ], [ 5, 1, 3 ] ] gap> LeftSection( S ); [ (), (1,3,5), (1,5,3) ] gap> [ HasCayleyTable( S ), Parent( S ) = M ]; [ true, true ] gap> L := LoopByCayleyTable( CayleyTable( S ) );; Elements( L ); [ l1, l2, l3 ] gap> [ Parent( L ) = L, IsSubloop( M, S ), IsSubloop( M, L ) ]; [ true, true, false ] gap> LeftSection( L ); [ (), (1,2,3), (1,3,2) ]
Multiplication Groups LeftMutliplicationGroup, RightMultiplicationGroup and MultiplicationGroup The left multiplication group, right multiplication group, resp. multiplication group of a quasigroup Q. RelativeLeftMultiplicationGroup, RelativeRightMultiplicationGroup and RelativeMultiplicationGroup The relative left multiplication group, the relative right multiplication group, resp. the relative multiplication group of a quasigroup Q with respect to a subquasigroup S of Q. Let S be a subquasigroup of a quasigroup Q. Then the multiplication group relative left multiplication group of Q with respect to S is the group \langle L(x)|x\in S\rangle, where L(x) is the left translation by x in Q restricted to S. The multiplication group relative right multiplication group and the multiplication group relative multiplication group are defined analogously.
Inner Mapping Groups By a result of Bruck, the left inner mapping group of a loop is generated by all inner mapping left inner mappings L(x,y) = L_{yx}^{-1}L_yL_x, and the right inner mapping group is generated by all inner mapping right inner mappings R(x,y) = R_{xy}^{-1}R_yR_x.

In analogy with group theory, we define the conjugation conjugations or the inner mapping middle inner mappings as T(x) = L_x^{-1}R_x. The inner mapping group middle inner mapping grroup is then the group generated by all conjugations. LeftInnerMapping, RightInnerMapping, MiddleInnerMapping The left inner mapping L(x,y), the right inner mapping R(x,y), resp. the middle inner mapping T(x) of a loop Q. LeftInnerMappingGroup, RightInnerMappingGroup, MiddleInnerMappingGroup The left inner mapping group, right inner mapping group, resp. middle inner mapping group of a loop Q. The inner mapping group of a loop Q.

Here is an example for multiplication groups and inner mapping groups:
gap> M := MoufangLoop(12,1); <Moufang loop 12/1> gap> LeftSection(M)[2]; (1,2)(3,4)(5,6)(7,8)(9,12)(10,11) gap> Mlt := MultiplicationGroup(M); Inn := InnerMappingGroup(M); <permutation group of size 2592 with 23 generators> Group([ (4,6)(7,11), (7,11)(8,10), (2,6,4)(7,9,11), (3,5)(9,11), (8,12,10) ]) gap> Size(Inn); 216
Nuclei, Commutant, Center, and Associator Subloop See Section for the relevant definitions. LeftNucles, MiddleNucleus, and RightNucleus The left nucleus, middle nucleus, resp. right nucleus of a quasigroup Q. Nuc, NucleusOfQuasigroup and NucleusOfLoop These synonymous attributes return the nucleus of a quasigroup Q. Since all nuclei are subquasigroups of Q, they are returned as subquasigroups (resp. subloops). When Q is a loop then all nuclei are in fact groups, and they are returned as associative loops.

Remark: The name `Nucleus` is a global function of &GAP; with two variables. We have therefore used `Nuc` rather than `Nucleus` for the nucleus. This abbreviation is sometimes used in the literature, too. The commutant of a quasigroup Q. The center of a quasigroup Q. If Q is a loop, the center of Q is a subgroup of Q and it is returned as an associative loop. The associator subloop of a loop Q. We calculate the associator subloop of Q as the smallest normal subloop of Q containing all elements x\backslash\alpha(x), where x is an element of Q and \alpha is a left inner mapping of Q.
Normal Subloops and Simple Loops `true` if S is a normal subloop of a loop Q. A subloop S of a loop Q is normal subloop normal subloop if it is invariant under all inner mappings of Q. The normal closure of a subset S of a loop Q. For a subset S of a loop Q, the normal closure normal closure of S in Q is the smallest normal subloop of Q containing S. `true` if Q is a simple loop. A loop Q is simple simple loop loop if \{1\} and Q are the only normal subloops of Q.
Factor Loops When S is a normal subloop of a loop Q, returns the factor loop Q/S. When S is a normal subloop of a loop Q, returns the natural projection from Q onto Q/S.
gap> M := MoufangLoop( 12, 1 );; S := Subloop( M, [ M.3 ] ); <loop of order 3> gap> IsNormal( M, S ); true gap> F := FactorLoop( M, S ); <loop of order 4> gap> NaturalHomomorphismByNormalSubloop( M, S ); MappingByFunction( <loop of order 12>, <loop of order 4>, function( x ) ... end )
Nilpotency and Central Series See Section for the relevant definitions. `true` if Q is a nilpotent loop. The nilpotency class of a loop Q if Q is nilpotent, `fail` otherwise. `true` if Q is a strongly nilpotent loop. A loop Q is said to be strongly nilpotent strongly nilpotent loop nilpotent loop loop if its multiplication group is nilpotent. When Q is a nilpotent loop, returns the upper central series of Q, else returns `fail`. When Q is a nilpotent loop, returns the lower central series of Q, else returns `fail`. The lower central series central series for loops is defined analogously to groups.
Solvability, Derived Series and Frattini Subloop See Section for definitions of solvability an derived subloop. `true` if Q is a solvable loop. The derived subloop of a loop Q. If Q is solvable, returns the derived length of Q, else returns `fail`. FrattiniSubloop and FrattinifactorSize The Frattini subloop of Q. The method is implemented only for strongly nilpotent loops. Frattini subloop Frattini subloop of a loop Q is the intersection of maximal subloops of Q.
Isomorphisms and Automorphisms An isomorphism from a quasigroup Q to a quasigroup L if the quasigroups are isomorphic, `fail` otherwise. If an isomorphism exists, it is returned as a permutation f of 1,\dots,|Q|, where i^f=j means that the ith element of Q is mapped onto the jth element of L. Note that this convention is used even if the underlying sets of Q, L are not indexed by consecutive integers. An isomorphism from a loop Q to a loop L if the loops are isomorphic, `fail` otherwise, with the same convention as in `IsomorphismQuasigroups`. Given a list ls of quasigroups, returns a sublist of ls consisting of representatives of isomorphism classes of quasigroups from ls. Given a list ls of loops, returns a sublist of ls consisting of representatives of isomorphism classes of loops from ls. The automorphism group of a loop or quasigroups Q, with the same convention on permutations as in `IsomorphismQuasigroups`.

Remark: Since two isomorphisms differ by an automorphism, all isomorphisms from Q to L can be obtained by a combination of `IsomorphismLoops(Q,L)` (or `IsomorphismQuasigroups(Q,L)`) and `AutomorphismGroup(L)`.

While dealing with Cayley tables, it is often useful to rename or reorder the elements of the underlying quasigroup without changing the isomorphism type of the quasigroups. &LOOPS; contains several functions for this purpose. When Q is a quasigroup and f is a permutation of 1,\dots,|Q|, returns the quasigroup defined on the same set as Q with multiplication * defined by x*y = f(f{}^{-1}(x)f{}^{-1}(y)). When Q is a loop and f is a permutation of 1,\dots,|Q| fixing 1, returns the loop defined on the same set as Q with multiplication * defined by x*y = f(f{}^{-1}(x)f{}^{-1}(y)). If f(1)=c\ne 1, the isomorphism (1,c) is applied after f. `LoopIsomorphism(Q,f)` if Q is a loop, and `QuasigroupIsomorphism(Q,f)` if Q is a quasigroup. When S is a normal subloop of a loop Q, returns an isomorphic copy of Q in which the elements are ordered according to the right cosets of S. In particular, the Cayley table of S will appear in the top left corner of the Cayley table of the resulting loop.

In order to speed up the search for isomorphisms and automorphisms, we first calculate some loop invariants preserved under isomorphisms, and then we use these invariants to partition the loop into blocks of elements preserved under isomorphisms. The following two operations are used in the search. A data structure with isomorphism invariants of a loop Q. See or the file iso.gi for more details. The format of the discriminator has been changed from version 3.2.0 up to accommodate isomorphism searches for quasigroups.

If two loops have different discriminators, they are not isomorphic. If they have identical discriminators, they may or may not be isomorphic. `true` if D1, D2 are equal discriminators for the purposes of isomorphism searches.
Isotopisms At the moment, &LOOPS; contains only slow methods for testing if two loops are isotopic. The method works as follows: It is well known that if a loop K is isotopic to a loop L then there exist a principal loop isotope P of K such that P is isomorphic to L. The algorithm first finds all principal isotopes of K, then filters them up to isomorphism, and then checks if any of them is isomorphic to L. This is rather slow already for small orders. `fail` if K, L are not isotopic loops, else it returns an isotopism as a triple of bijections on 1,\dots,|K|. Given a list ls of loops, returns a sublist of ls consisting of representatives of isotopism classes of loops from ls.
Testing Properties of Quasigroups and Loops Although loops are quasigroups, it is often the case in the literature that a property of the same name can differ for quasigroups and loops. For instance, a Steiner loop is not necessarily a Steiner quasigroup.

To avoid such ambivalences, we often include the noun `Loop` or `Quasigroup` as part of the name of the property, e.g., `IsSteinerQuasigroup` versus `IsSteinerLoop`.

On the other hand, some properties coincide for quasigroups and loops and we therefore do not include `Loop`, `Quasigroup` as part of the name of the property, e.g., `IsCommutative`.
Associativity, Commutativity and Generalizations `true` if Q is an associative quasigroup. `true` if Q is a commutative quasigroup. `true` if Q is a power associative quasigroup. A quasigroup Q is said to be power associative quasigroup power associative quasigroup if every element of Q generates an associative quasigroup, that is, a group. `true` if Q is a diassociative quasigroup. A quasigroup Q is said to be diassociative quasigroup diassociative quasigroup if any two elements of Q generate an associative quasigroup, that is, a group. Note that a diassociative quasigroup is necessarily a loop, but it need not be so declared in &LOOPS;.
Inverse Properties For an element x of a loop Q, the left inverse inverse of x is the element x^\lambda of Q such that x^\lambda \cdot x = 1, while the right inverse inverse of x is the element x^\rho of Q such that x\cdot x^\rho = 1. HasLeftInverseProperty, HasRightInverseProperty and HasInverseProperty `true` if a loop Q has the left inverse property, right inverse property, resp. inverse property. A loop Q has the left inverse property inverse property if x^\lambda(xy)=y for every x, y in Q. Dually, Q has the right inverse property inverse property if (yx)x^\rho=y for every x, y in Q. If Q has both the left inverse property and the right inverse property, it has the inverse property inverse property. `true` if a loop Q has two-sided inverses. A loop Q is said to have two-sided inverses inverse if x^\lambda=x^\rho for every x in Q. `true` if a loop Q has the weak inverse property. A loop Q has the weak inverse property inverse property if (xy)^\lambda x = y^\lambda (equivalently, x(yx)^\rho = y^\rho) holds for every x, y in Q. `true` if a loop Q has the automorphic inverse property. According to , a loop Q has the automorphic inverse property automorphic inverse property inverse property if (xy)^\lambda = x^\lambda y^\lambda, or, equivalently, (xy)^\rho = x^\rho y^\rho holds for every x, y in Q. `true` if a loop Q has the antiautomorphic inverse property. A loop Q has the antiautomorphic inverse property antiautomorphic inverse property inverse property if (xy)^\lambda=y^\lambda x^\lambda, or, equivalently, (xy)^\rho = y^\rho x^\rho holds for every x, y in Q.

See Appendix for implications implemented in &LOOPS; among various inverse properties.
Some Properties of Quasigroups `true` if Q is a semisymmetric quasigroup. A quasigroup Q is semisymmetric semisymmetric quasigroup quasigroup if (xy)x=y, or, equivalently x(yx)=y holds for every x, y in Q. `true` if Q is a totally symmetric quasigroup. A commutative semisymmetric quasigroup is called totally symmetric totally symmetric quasigroup quasigroup. Totally symmetric quasigroups are precisely the quasigroups satisfying xy=x\backslash y = x/y. `true` if Q is an idempotent quasigroup. A quasigroup is idempotent idempotent quasigroup quasigroup if it satisfies x^2=x. `true` if Q is a Steiner quasigroup. A totally symmetric idempotent quasigroup is called a Steiner quasigroup Steiner quasigroup quasigroup. A quasigroup Q is unipotent unipotent quasigroup quasigroup if it satisfies x^2=y^2 for every x, y in Q. `true` if Q is a unipotent quasigroup. IsLeftDistributive, IsRightDistributive, IsDistributive `true` if Q is a left distributive quasigroup, resp. a right distributive quasigroup, resp. a distributive quasigroup. A quasigroup is left distributive quasigroup distributive quasigroup if it satisfies x(yz) = (xy)(xz), right distributive quasigroup distributive quasigroup if it satisfies (xy)z = (xz)(yz), and distributive quasigroup distributive quasigroup if it is both left distributive and right distributive.

Remark: In order to be compatible with &GAP;s terminology, we also support the synonyms `IsLDistributive` and `IsRDistributive` of `IsLeftDistributive` and `IsRightDistributive`, respectively. IsEntropic and IsMedial `true` if Q is an entropic (aka medial) quasigroup. A quasigroup is entropic entropic quasigroup quasigroup or medial medial quasigroup quasigroup if it satisfies the identity (xy)(uv) = (xu)(yv).
Loops of Bol Moufang Type Following and , a variety of loops is said to be of Bol-Moufang type loop if it is defined by a single identity of Bol-Moufang type identity, i.e., by an identity that contains the same 3 variables on both sides, exactly one of the variables occurs twice on both sides, and the variables occur in the same order on both sides.

It is proved in that there are 13 varieties of nonassociative loops of Bol-Moufang type. These are: left alternative loops alternative loop loop defined by x(xy) = (xx)y, right alternative loops alternative loop loop defined by x(yy) = (xy)y, left nuclear square loops nuclear square loop loop defined by (xx)(yz) = ((xx)y)z, middle nuclear square loops nuclear square loop loopdefined by x((yy)z) = (x(yy))z, right nuclear square loops nuclear square loop loop defined by x(y(zz)) = (xy)(zz), flexible loops flexible loop loop defined by x(yx) = (xy)x, left Bol loops Bol loop loop defined by x(y(xz)) = (x(yx))z, always left alternative, right Bol loops Bol loop loop defined by x((yz)y) = ((xy)z)y, always right alternative, LC loops LC loop loop defined by (xx)(yz) = (x(xy))z, always left alternative, left nuclear square and middle nuclear square, RC loops RC loop loop defined by x((yz)z) = (xy)(zz), always right alternative, right nuclear square and middle nuclear square, Moufang loops Moufang loop loop defined by (xy)(zx) = (x(yz))x, always flexible, left Bol and right Bol, C loops C loop loop defined by x(y(yz)) = ((xy)y)z, always LC and RC, extra loops extra loop loop defined by x(y(zx)) = ((xy)z)x, always Moufang and C.

Note that although some of the defining identities are not of Bol-Moufang type, they are equivalent to a Bol-Moufang identity. Moreover, many varieties of loops of Bol-Moufang type can be defined by one of several equivalent identities of Bol-Moufang type.

There are also several varieties related to loops of Bol-Moufang type. A loop is said to be alternative alternative loop loop if it is both left alternative and right alternative. A loop is nuclear square nuclear square loop loop if it is left nuclear square, middle nuclear square and right nuclear square. `true` if Q is an extra loop. `true` if Q is a Moufang loop. `true` if Q is a C loop. `true` if Q is a left Bol loop. `true` if Q is a right Bol loop. `true` if Q is an LC loop. `true` if Q is an RC loop. `true` if Q is a left nuclear square loop. `true` if Q is a middle nuclear square loop. `true` if Q is a right nuclear square loop. `true` if Q is a nuclear square loop. `true` if Q is a flexible quasigroup. `true` if Q is a left alternative quasigroup. `true` if Q is a right alternative quasigroup. `true` if Q is an alternative quasigroup.

While listing the varieties of loops of Bol-Moufang type, we have also listed all inclusions among them. These inclusions are built into &LOOPS; as filters.

The following trivial example shows some of the implications and the naming conventions of &LOOPS; at work:
gap> L := LoopByCayleyTable( [ [ 1, 2 ], [ 2, 1 ] ] ); <loop of order 2> gap> [ IsLeftBolLoop( L ), L ] [ true, <left Bol loop of order 2> ] gap> [ HasIsLeftAlternativeLoop( L ), IsLeftAlternativeLoop( L ) ]; [ true, true ] gap> [ HasIsRightBolLoop( L ), IsRightBolLoop( L ) ]; [ false, true ] gap> L; <Moufang loop of order 2> gap> [ IsAssociative( L ), L ]; [ true, <associative loop of order 2> ]

The analogous terminology for quasigroups of Bol-Moufang type is not standard yet, and hence is not supported in &LOOPS; except for the situations explicitly noted above.
Power Alternative Loops A loop is left power alternative power alternative loop loop if it is power associative and satisfies x^n(x^m y) = x^{n+m}y for all elements x, y and all integers m, n. Similarly, a loop is right power alternative power alternative loop loop if it is power associative and satisfies (x y^n)y^m = xy^{n+m} for all elements x, y and all integers m, n. A loop is power alternative power alternative loop loop if it is both left power alternative and right power alternative.

Left power alternative loops are left alternative and have the left inverse property. Left Bol loops and LC loops are left power alternative. IsLeftPowerAlternative, IsRightPowerAlternative and IsPowerAlternative `true` if Q is a left power alternative loop, resp. a right power alternative loop, resp. a power alternative loop.
Conjugacy Closed Loops and Related Properties A loop Q is left conjugacy closed conjugacy closed loop loop if the set of left translations of Q is closed under conjugation (by itself). Similarly, a loop Q is right conjugacy closed conjugacy closed loop loop if the set of right translations of Q is closed under conjugation. A loop is conjugacy closed conjugacy closed loop loop if it is both left conjugacy closed and right conjugacy closed. It is common to refer to these loops as LCC, RCC, and CC loops, respectively.

The equivalence LCC + RCC = CC is built into &LOOPS;. `true` if Q is a left conjugacy closed loop. `true` if Q is a right conjugacy closed loop. `true` if Q is a conjugacy closed loop. `true` if Q is an Osborn loop. A loop is Osborn Osborn loop loop if it satisfies x(yz\cdot x)=(x^\lambda\backslash y)(zx). Both Moufang loops and CC loops are Osborn.
Automorphic Loops A loop Q whose all left (resp. middle, resp. right) inner mappings are automorphisms of Q is known as a left automorphic loop automorphic loop loop (resp. middle automorphic loop automorphic loop loop, resp. right automorphic loop automorphic loop loop).

A loop Q is an automorphic loop automorphic loop loop if all inner mappings of Q are automorphisms of Q.

Automorphic loops are also known as A loops, and similar terminology exists for left, right and middle automorphic loops.

The following results hold for automorphic loops: automorphic loops are power associative in an automorphic loop Q we have {\rm Nuc}(Q) = {\rm Nuc}_{\lambda}(Q) = {\rm Nuc}_{\rho}(Q)\le {\rm Nuc}_{\mu}(Q) and all nuclei are normal a loop that is left automorphic and right automorphic satisfies the anti-automorphic inverse property and is automorphic diassociative automorphic loops are Moufang automorphic loops of odd order are solvable finite commutative automorphic loops are solvable commutative automorphic loops of order p, 2p, 4p, p^2, 2p^2, 4p^2 (p an odd prime) are abelian groups commutative automorphic loops of odd prime power order are centrally nilpotent for any prime p, there are 7 commutative automorphic loops of order p^3 up to isomorphism See the built-in filters and the survey for additional properties of automorphic loops. `true` if Q is a left automorphic loop. `true` if Q is a middle automorphic loop. `true` if Q is a right automorphic loop. `true` if Q is an automorphic loop.

Remark: Be careful not to confuse `IsALoop` and `IsLoop`.
Additional Varieties of Loops `true` if Q is a code loop. A code loop code loop loop is a Moufang 2-loop with a Frattini subloop of order 1 or 2. Code loops are extra and conjugacy closed. `true` if Q is a Steiner loop. A Steiner loop Steiner loop loop is an inverse property loop of exponent 2. Steiner loops are commutative. IsLeftBruckLoop and IsLeftKLoop `true` if Q is a left Bruck loop (aka left K loop). A left Bol loop with the automorphic inverse property is known as a left Bruck loop Bruck loop loop or a left K loop K loop loop. IsRightBruckLoop and IsRightKLoop `true` if Q is a right Bruck loop (aka right K loop). A right Bol loop with the automorphic inverse property is known as a right Bruck loop Bruck loop loop or a right K loop K loop loop.
Specific Methods This chapter describes methods of &LOOPS; that apply to specific classes of loops, mostly Bol and Moufang loops.
Core Methods for Bol Loops AssociatedLeftBruckLoop and AssociatedRightBruckLoop The left (resp. right) Bruck loop associated with a uniquely 2-divisible left (resp. right) Bol loop Q. Let Q be a left Bol looploop Bol loop such that the mapping x\mapsto x^2 is a permutation of Q. Define a new operation * on Q by x*y =(x(y^2x))^{1/2}. Then (Q,*) is a left Bruck loop, called the associated left Bruck loop Bruck loop loop. (In fact, Bruck used the isomorphic operation x*y = x^{1/2}(yx^{1/2}) instead. Our approach is more natural in the sense that the left Bruck loop associated with a left Bruck loop is identical to the original loop.) Associated right Bruck loops are defined dually. `true` if (G, H1, H2) is an exact group factorization. Many right Bol loops can be constructed from exact group factorizations. The triple (G,H_1,H_2) is an exact group factorization exact group factorization if H_1, H_2 are subgroups of G such that H_1H_2=G and H_1\cap H_2=1. If (G,H_1,H_2) is an exact group factorization then (G\times G, H_1\times H_2, T) with T=\{(x,x^{-1})| x\in G\} is a loop folder that gives rise to a right Bol loop. The right Bol loop constructed from an exact group factorization. The argument arg can either be an exact group factorization `[G,H1,H2]`, or the tuple `[G,H]`, where `H` is a regular subgroup of `G`. We also allow arg to be separate entries rather than a list of entries.
Moufang Modifications Drápal described two prominent families of extensions of Moufang loops. It turns out that these extensions suffice to obtain all nonassociative Moufang loops of order at most 64 if one starts with so-called Chein loops. We call the two constructions Moufang modifications modification. The library of Moufang loops included in &LOOPS; is based on Moufang modifications. See for details. The cyclic modification of a Moufang loop Q obtained from S, a=\alpha and h described below. Assume that Q is a Moufang loop with a normal subloop S such that Q/S is a cyclic group of order 2m. Let h\in S\cap Z(L). Let \alpha be a generator of Q/S and write Q = \bigcup_{i\in M} \alpha^i, where M=\{-m+1, \dots, m\}. Let \sigma:\mathbb{Z}\to M be defined by \sigma(i)=0 if i\in M, \sigma(i)=1 if i>m, and \sigma(i)=-1 if i<-m+1. Introduce a new multiplication * on Q by x*y = xyh^{\sigma(i+j)}, where x\in \alpha^i, y\in\alpha^j, i\in M and j\in M. Then (Q,*) is a Moufang loop, a cyclic modification modification of Q. The dihedral modification of a Moufang loop Q obtained from S, e, f and h as described below. Let Q be a Moufang loop with a normal subloop S such that Q/S is a dihedral group of order 4m, with m\ge 1. Let M and \sigma be defined as in the cyclic case. Let \beta, \gamma be two involutions of Q/S such that \alpha=\beta\gamma generates a cyclic subgroup of Q/S of order 2m. Let e\in\beta and f\in\gamma be arbitrary. Then Q can be written as a disjoint union Q=\bigcup_{i\in M}(\alpha^i\cup e\alpha^i), and also Q=\bigcup_{i\in M}(\alpha^i\cup \alpha^if). Let G_0=\bigcup_{i\in M}\alpha^i, and G_1=L\setminus G_0. Let h\in S\cap N(L)\cap Z(G_0). Introduce a new multiplication * on Q by x*y = xyh^{(-1)^r\sigma(i+j)}, where x\in\alpha^i\cup e\alpha^i, y\in\alpha^j\cup \alpha^jf, i\in M, j\in M, y\in G_r and r\in\{0,1\}. Then (Q,*) is a Moufang loop, a dihedral modification modification of Q. The Chein loop constructed from a group G. Let G be a group. Let \overline{G}=\{\overline{g}|g\in G\} be a disjoint copy of elements of G. Define multiplication * on Q=G\cup \overline{G} by g*h = gh, g*\overline{h}=\overline{hg}, \overline{g}*h = \overline{gh^{-1}} and \overline{g}*\overline{h}=h^{-1}g, where g, h\in G. Then (Q,*)=M(G,2) is a so-called Chein loop Chein loop loop, which is always a Moufang loop, and it is associative if and only if G is commutative.
Triality for Moufang Loops Let G be a group and \sigma, \rho be automorphisms of G satisfying \sigma^2 = \rho^3 = (\sigma \rho)^2 = 1. Below we write automorphisms as exponents and [g,\sigma] for g^{-1}g^\sigma. We say that the triple (G,\rho,\sigma) is a group with triality group with triality if [g, \sigma] [g,\sigma]^\rho [g,\sigma]^{\rho^2} =1 holds for all g \in G. It is known that one can associate a group with triality (G,\rho,\sigma) in a canonical way with a Moufang loop Q. See for more details.

For any Moufang loop Q, we can calculate the triality group as a permutation group acting on 3|Q| points. If the multiplication group of Q is polycyclic, then we can also represent the triality group as a pc group. In both cases, the automorphisms \sigma and \rho are in the same family as the elements of G. A record with components `G`, `rho`, `sigma`, where `G` is the canonical group with triality associated with a Moufang loop Q, and `rho`, `sigma` are the corresponding triality automorphisms. This is a variation of `TrialityPermGroup` in which `G` is returned as a pc group.
Realizing Groups as Multiplication Groups of Loops It is difficult to determine which groups can occur as multiplication groups of loops.

The following operations search for loops whose multiplication groups are contained within a specified transitive permutation group G. In all these operations, one can speed up the search by increasing the optional argument depth, the price being a much higher memory consumption. The argument depth is optimally chosen if in the permutation group G there are not many permutations fixing depth elements. It is safe to omit the argument or set it equal to 2.

The optional argument infolevel determines the amount of information displayed during the search. With `infolevel=0`, no information is provided. With `infolevel=1`, you get some information on timing and hits. With `infolevel=2`, the results are printed as well. All Cayley tables of loops whose multiplication group is contained in the transitive permutation group G. All Cayley tables of nonassociative loops whose multiplication group is contained in the transitive permutation group G. A Cayley table of a loop whose multiplication group is contained in the transitive permutation group G. A Cayley table of a nonassociative loop whose multiplication group is contained in the transitive permutation group G. A list of all loops (given as sections) whose multiplication group is equal to the transitive permutation group G. One loop (given as a section) whose multiplication group is equal to the transitive permutation group G.
gap> g:=PGL(3,3); Group([ (6,7)(8,11)(9,13)(10,12), (1,2,5,7,13,3,8,6,10,9,12,4,11) ]) gap> a:=AllLoopTablesInGroup(g,3,0);; Size(a); 56 gap> a:=AllLoopsWithMltGroup(g,3,0);; Size(a); 52
Libraries of Loops Libraries of small loops form an integral part of &LOOPS;. The loops are stored in libraries up to isomorphism and, sometimes, up to isotopism.
A Typical Library A library named my Library is stored in file data/mylibrary.tbl, and the corresponding data structure is named `LOOPS_my_library_data`. For example, when the library is called left Bol, the corresponding data file is called data/leftbol.tbl and the corresponding data structure is named `LOOPS_left_bol_data`.

In most cases, the array `LOOPS_my_library_data` consists of three lists: `LOOPS_my_library_data[1]` is a list of orders for which there is at least one loop in the library, `LOOPS_my_library_data[2][k]` is the number of loops of order `LOOPS_my_library_data[1][k]` in the library, `LOOPS_my_library_data[3][k][s]` contains data necessary to produce the `s`th loop of order `LOOPS_my_library_data[1][k]` in the library. The format of `LOOPS_my_library_data[3]` depends heavily on the particular library and is not standardized in any way. The data is often coded to save space. The mth loop of order n from the library named libname. This is a template function that retrieves the mth loop of order n from the library named my library.

For example, the mth left Bol loop of order n is obtained via `LeftBolLoop(n,m)` or via `LibraryLoop("left Bol",n,m)`. Brief information about the loops contained in the library named libname.

We are now going to describe the individual libraries.
Left Bol Loops and Right Bol Loops The library named left Bol contains all nonassociative left Bol loops of order less than 17, including Moufang loops, as well as all left Bol loops of order pq for primes p>q>2. There are 6 such loops of order 8, 1 of order 12, 2 of order 15, 2038 of order 16, and (p+q-4)/2 of order pq.

The classification of left Bol loops of order 16 was first accomplished by Moorhouse . Our library was generated independently and it agrees with Moorhouse's results. The left Bol loops of order pq were classified in . The mth left Bol loop of order n in the library. The mth right Bol loop of order n in the library.

Remark: Only left Bol loops are stored in the library. Right Bol loops are retrieved by calling `Opposite` on left Bol loops.
Left Bruck Loops and Right Bruck Loops The emmerging library named left Bruck contains all left Bruck loops of orders 3, 9, 27 and 81 (there are 1, 2, 7 and 72 such loops, respectively).

For an odd prime p, left Bruck loops of order p^k are centrally nilpotent and hence central extensions of the cyclic group of order p by a left Bruck loop of order p^{k-1}. It is known that left Bruck loops of order p and p^2 are abelian groups; we have included them in the library because of the iterative nature of the construction of nilpotent loops. The mth left Bruck loop of order n in the library. The mth right Bruck loop of order n in the library.
Moufang Loops The library named Moufang contains all nonassociative Moufang loops of order n\le 64 and n\in\{81,243\}. The mth Moufang loop of order n in the library.

For n\le 63, our catalog numbers coincide with those of Goodaire et al. . The classification of Moufang loops of order 64 and 81 was carried out in . The classification of Moufang loops of order 243 was carried out by Slattery and Zenisek .

The extent of the library is summarized below: \begin{array}{r|rrrrrrrrrrrrrrrrrr} order&12&16&20&24&28&32&36&40&42&44&48&52&54&56&60&64&81&243\cr loops&1 &5 &1 &5 &1 &71&4 &5 &1 &1 &51&1 &2 &4 &5 &4262& 5 &72 \end{array}

The octonion loop octonion loop loop of order 16 (i.e., the multiplication loop of the basis elements in the 8-dimensional standard real octonion algebra) can be obtained as `MoufangLoop(16,3)`.
Code Loops The library named code contains all nonassociative code loops of order less than 65. There are 5 such loops of order 16, 16 of order 32, and 80 of order 64, all Moufang. The library merely points to the corresponding Moufang loops. See for a classification of small code loops. The mth code loop of order n in the library.
Steiner Loops Here is how the library named Steiner is described within &LOOPS;:
gap> DisplayLibraryInfo( "Steiner" ); The library contains all nonassociative Steiner loops of order less or equal to 16. It also contains the associative Steiner loops of order 4 and 8. ------ Extent of the library: 1 loop of order 4 1 loop of order 8 1 loop of order 10 2 loops of order 14 80 loops of order 16 true

Our labeling of Steiner loops of order 16 coincides with the labeling of Steiner triple systems of order 15 in . The mth Steiner loop of order n in the library.
Conjugacy Closed Loops The library named RCC contains all nonassocitive right conjugacy closed loops of order n\le 27 up to isomorphism. The data for the library was generated by Katharina Artic who can also provide additional data for all right conjugacy closed loops of order n\le 31.

Let Q be a right conjugacy closed loop, G its right multiplication group and T its right section. Then \langle T\rangle = G is a transitive group, and T is a union of conjugacy classes of G. Every right conjugacy closed loop of order n can therefore be represented as a union of certain conjugacy classes of a transitive group of degree n. This is how right conjugacy closed loops of order less than 28 are represented in &LOOPS;. The following table summarizes the number of right conjugacy closed loops of a given order up to isomorphism: \begin{array}{r|rrrrrrrrrrrrrrrr} order &6& 8&9&10& 12&14&15& 16& 18& 20&\cr loops &3&19&5&16&155&97& 17&6317&1901&8248&\cr \hline order &21& 22& 24& 25& 26& 27\cr loops &119&10487&471995& 119&151971&152701 \end{array} RCCLoop and RightConjugacyClosedLoop The mth right conjugacy closed loop of order n in the library. LCCLoop and LeftConjugacyClosedLoop The mth left conjugacy closed loop of order n in the library. Remark: Only the right conjugacy closed loops are stored in the library. Left conjugacy closed loops are obtained from right conjugacy closed loops via `Opposite`.

The library named CC contains all CC loops of order 2\le 2^k\le 64, 3\le 3^k\le 81, 5\le 5^k\le 125, 7\le 7^k\le 343, all nonassociative CC loops of order less than 28, and all nonassociative CC loops of order p^2 and 2p for any odd prime p.

By results of Kunen , for every odd prime p there are precisely 3 nonassociative conjugacy closed loops of order p^2. Csörgő and Drápal described these 3 loops by multiplicative formulas on \mathbb{Z}_{p^2} and \mathbb{Z}_p \times \mathbb{Z}_p as follows: Case m = 1:Let k be the smallest positive integer relatively prime to p and such that k is a square modulo p (i.e., k=1). Define multiplication on \mathbb{Z}_{p^2} by x\cdot y = x + y + kpx^2y. Case m = 2: Let k be the smallest positive integer relatively prime to p and such that k is not a square modulo p. Define multiplication on \mathbb{Z}_{p^2} by x\cdot y = x + y + kpx^2y. Case m = 3: Define multiplication on \mathbb{Z}_p \times \mathbb{Z}_p by (x,a)(y,b) = (x+y, a+b+x^2y ).

Moreover, Wilson constructed a nonassociative conjugacy closed loop of order 2p for every odd prime p, and Kunen showed that there are no other nonassociative conjugacy closed oops of this order. Here is the relevant multiplication formula on \mathbb{Z}_2 \times \mathbb{Z}_p: (0,m)(0,n) = ( 0, m + n ), (0,m)(1,n) = ( 1, -m + n ), (1,m)(0,n) = ( 1, m + n), (1,m)(1,n) = ( 0, 1 - m + n ). CCLoop and ConjugacyClosedLoop The mth conjugacy closed loop of order n in the library.
Small Loops The library named small contains all nonassociative loops of order 5 and 6. There are 5 and 107 such loops, respectively. The mth loop of order n in the library.
Paige Loops Paige loops Paige loop loop are nonassociative finite simple Moufang loops. By , there is precisely one Paige loop for every finite field.

The library named Paige contains the smallest nonassociative simple Moufang loop. The Paige loop constructed over the finite field of order q. Only the case `q=2` is implemented.
Nilpotent Loops The library named nilpotent contains all nonassociative nilpotent loops of order less than 12 up to isomorphism. There are 2 nonassociative nilpotent loops of order 6, 134 of order 8, 8 of order 9 and 1043 of order 10.

See for more on enumeration of nilpotent loops. For instance, there are 2623755 nilpotent loops of order 12, and 123794003928541545927226368 nilpotent loops of order 22. The mth nilpotent loop of order n in the library.
Automorphic Loops The library named automorphic contains all nonassociative automorphic loops of order less than 16 up to isomorphism (there is 1 such loop of order 6, 7 of order 8, 3 of order 10, 2 of order 12, 5 of order 14, and 2 of order 15) and all commutative automorphic loops of order 3, 9, 27 and 81 (there are 1, 2, 7 and 72 such loops).

It turns out that commutative automorphic loops of order 3, 9, 27 and 81 (but not 243) are in one-to-on correspondence with left Bruck loops of the respective orders, see , . Only the left Bruck loops are stored in the library. The mth automorphic loop of order n in the library.
Interesting Loops The library named interesting contains some loops that are illustrative in the theory of loops. At this point, the library contains a nonassociative loop of order 5, a nonassociative nilpotent loop of order 6, a non-Moufang left Bol loop of order 16, the loop of sedenionssedenion loop loop of order 32 (sedenions generalize octonions), and the unique nonassociative simple right Bol loop of order 96 and exponent 2. The mth interesting loop of order n in the library.
Libraries of Loops Up To Isotopism For the library named small we also provide the corresponding library of loops up to isotopism. In general, given a library named libname, the corresponding library of loops up to isotopism is named itp lib, and the loops can be retrieved by the template `ItpLibLoop(n,m)`. The mth small loop of order n up to isotopism in the library.
gap> SmallLoop( 6, 14 ); <small loop 6/14> gap> ItpSmallLoop( 6, 14 ); <small loop 6/42> gap> LibraryLoop( "itp small", 6, 14 ); <small loop 6/42>

Note that loops up to isotopism form a subset of the corresponding library of loops up to isomorphism. For instance, the above example shows that the 14th small loop of order 6 up to isotopism is in fact the 42nd small loop of order 6 up to isomorphism.
Files Below is a list of all relevant files forming the &LOOPS; package. Some technical files are not included. A typical user will not need to know any of this information. All paths are relative to the pkg/loops folder.
README (installation and usage instructions)
init.g (declarations)
PackageInfo.g (loading info for GAP 4.4)
read.g (implementations)
data/automorphic.tbl (library of automorphic loops)
data/automorphic/*.* (addition files for the library of automorphic loops)
data/cc.tbl (library of conjugacy closed loops)
data/code.tbl (library of code loops)
data/interesting.tbl (library of interesting loops)
data/itp_small.tbl (library of small loops up to isotopism)
data/leftbol.tbl (library of left Bol loops)
data/moufang.tbl (library of Moufang loops)
data/nilpotent.tbl (library of small nilpotent loops)
data/rcc.tbl (library of right conjugacy closed loops)
data/rcc/*.* (additional files for the library of right conjugacy closed loops)
data/paige.tbl (library of Paige loops)
data/small.tbl (library of small loops)
data/steiner.tbl (library of Steiner loops)
doc/*.* (all documentation files)
doc/loops.xml (the main documentation file for GAPDoc)
doc/loops.bib (the main bibliography file for documentation)
gap/bol_core_methods.gd .gi (core methods for Bol loops)
gap/classes.gd .gi (properties of quasigroups and loops)
gap/convert.gd .gi (methods for data conversion and compression)
gap/core_methods.gd .gi (core methods for quasigroups and loops)
gap/elements.gd .gi (elements and basic arithmetic operations)
gap/examples.gd .gi (methods for libraries of loops)
gap/extensions.gd .gi (methods for extensions of loops)
gap/iso.gd .gi (methods for isomorphisms and isotopisms of loops)
gap/memory.gd .gi (memory management)
gap/mlt_search.gd .gi (realizing groups as multiplication groups of loops)
gap/moufang_modifications.gd .gi (methods for Moufang modifications)
gap/moufang_triality.gd .gi (methods for triality of Moufang loops)
gap/quasigroups.gd .gi (representing, creating and displaying quasigroups)
gap/random.gd .gi (random quasigroups and loops)
tst/bol.tst (test file for Bol loops)
tst/core_methods.tst (test file for core methods)
tst/iso.tst (test file for isomorphisms and automorphisms)
tst/lib.tst (test file for libraries of loops, except Moufang loops)
tst/nilpot.tst (test file for nilpotency and triality)
tst/testall.g (batch for all tets files)
Filters Many implications among properties of loops are built directly into &LOOPS;. A sizeable portion of these properties are of trivial character or are based on definitions (e.g., alternative loops = left alternative loops + right alternative loops). The remaining implications are theorems.

All filters of &LOOPS; are summarized below, using the GAP convention that the property on the left is implied by the property (properties) on the right.
`( IsExtraLoop, IsAssociative and IsLoop )`
`( IsExtraLoop, IsCodeLoop )`
`( IsCCLoop, IsCodeLoop )`
`( HasTwosidedInverses, IsPowerAssociative and IsLoop )`
`( IsPowerAlternative, IsDiassociative )`
`( IsFlexible, IsDiassociative )`
`( HasAntiautomorphicInverseProperty, HasAutomorphicInverseProperty and IsCommutative )`
`( HasAutomorphicInverseProperty, HasAntiautomorphicInverseProperty and IsCommutative )`
`( HasLeftInverseProperty, HasInverseProperty )`
`( HasRightInverseProperty, HasInverseProperty )`
`( HasWeakInverseProperty, HasInverseProperty )`
`( HasAntiautomorphicInverseProperty, HasInverseProperty )`
`( HasTwosidedInverses, HasAntiautomorphicInverseProperty )`
`( HasInverseProperty, HasLeftInverseProperty and IsCommutative )`
`( HasInverseProperty, HasRightInverseProperty and IsCommutative )`
`( HasInverseProperty, HasLeftInverseProperty and HasRightInverseProperty )`
`( HasInverseProperty, HasLeftInverseProperty and HasWeakInverseProperty )`
`( HasInverseProperty, HasRightInverseProperty and HasWeakInverseProperty )`
`( HasInverseProperty, HasLeftInverseProperty and HasAntiautomorphicInverseProperty )`
`( HasInverseProperty, HasRightInverseProperty and HasAntiautomorphicInverseProperty )`
`( HasInverseProperty, HasWeakInverseProperty and HasAntiautomorphicInverseProperty )`
`( HasTwosidedInverses, HasLeftInverseProperty )`
`( HasTwosidedInverses, HasRightInverseProperty )`
`( HasTwosidedInverses, IsFlexible and IsLoop )`
`( IsMoufangLoop, IsExtraLoop )`
`( IsCLoop, IsExtraLoop )`
`( IsExtraLoop, IsMoufangLoop and IsLeftNuclearSquareLoop )`
`( IsExtraLoop, IsMoufangLoop and IsMiddleNuclearSquareLoop )`
`( IsExtraLoop, IsMoufangLoop and IsRightNuclearSquareLoop )`
`( IsLeftBolLoop, IsMoufangLoop )`
`( IsRightBolLoop, IsMoufangLoop )`
`( IsDiassociative, IsMoufangLoop )`
`( IsMoufangLoop, IsLeftBolLoop and IsRightBolLoop )`
`( IsLCLoop, IsCLoop )`
`( IsRCLoop, IsCLoop )`
`( IsDiassociative, IsCLoop and IsFlexible)`
`( IsCLoop, IsLCLoop and IsRCLoop )`
`( IsRightBolLoop, IsLeftBolLoop and IsCommutative )`
`( IsLeftPowerAlternative, IsLeftBolLoop )`
`( IsLeftBolLoop, IsRightBolLoop and IsCommutative )`
`( IsRightPowerAlternative, IsRightBolLoop )`
`( IsLeftPowerAlternative, IsLCLoop )`
`( IsLeftNuclearSquareLoop, IsLCLoop )`
`( IsMiddleNuclearSquareLoop, IsLCLoop )`
`( IsRCLoop, IsLCLoop and IsCommutative )`
`( IsRightPowerAlternative, IsRCLoop )`
`( IsRightNuclearSquareLoop, IsRCLoop )`
`( IsMiddleNuclearSquareLoop, IsRCLoop )`
`( IsLCLoop, IsRCLoop and IsCommutative )`
`( IsRightNuclearSquareLoop, IsLeftNuclearSquareLoop and IsCommutative )`
`( IsLeftNuclearSquareLoop, IsRightNuclearSquareLoop and IsCommutative )`
`( IsLeftNuclearSquareLoop, IsNuclearSquareLoop )`
`( IsRightNuclearSquareLoop, IsNuclearSquareLoop )`
`( IsMiddleNuclearSquareLoop, IsNuclearSquareLoop )`
`( IsNuclearSquareLoop, IsLeftNuclearSquareLoop and IsRightNuclearSquareLoop`
`and IsMiddleNuclearSquareLoop )`
`( IsFlexible, IsCommutative )`
`( IsRightAlternative, IsLeftAlternative and IsCommutative )`
`( IsLeftAlternative, IsRightAlternative and IsCommutative )`
`( IsLeftAlternative, IsAlternative )`
`( IsRightAlternative, IsAlternative )`
`( IsAlternative, IsLeftAlternative and IsRightAlternative )`
`( IsLeftAlternative, IsLeftPowerAlternative )`
`( HasLeftInverseProperty, IsLeftPowerAlternative )`
`( IsPowerAssociative, IsLeftPowerAlternative )`
`( IsRightAlternative, IsRightPowerAlternative )`
`( HasRightInverseProperty, IsRightPowerAlternative )`
`( IsPowerAssociative, IsRightPowerAlternative )`
`( IsLeftPowerAlternative, IsPowerAlternative )`
`( IsRightPowerAlternative, IsPowerAlternative )`
`( IsAssociative, IsLCCLoop and IsCommutative )`
`( IsExtraLoop, IsLCCLoop and IsMoufangLoop )`
`( IsAssociative, IsRCCLoop and IsCommutative )`
`( IsExtraLoop, IsRCCLoop and IsMoufangLoop )`
`( IsLCCLoop, IsCCLoop )`
`( IsRCCLoop, IsCCLoop )`
`( IsCCLoop, IsLCCLoop and IsRCCLoop )`
`( IsOsbornLoop, IsMoufangLoop )`
`( IsOsbornLoop, IsCCLoop )`
`( HasAutomorphicInverseProperty, IsLeftBruckLoop )`
`( IsLeftBolLoop, IsLeftBruckLoop )`
`( IsRightBruckLoop, IsLeftBruckLoop and IsCommutative )`
`( IsLeftBruckLoop, IsLeftBolLoop and HasAutomorphicInverseProperty )`
`( HasAutomorphicInverseProperty, IsRightBruckLoop )`
`( IsRightBolLoop, IsRightBruckLoop )`
`( IsLeftBruckLoop, IsRightBruckLoop and IsCommutative )`
`( IsRightBruckLoop, IsRightBolLoop and HasAutomorphicInverseProperty )`
`( IsCommutative, IsSteinerLoop )`
`( IsCLoop, IsSteinerLoop )`
`( IsLeftAutomorphicLoop, IsAutomorphicLoop )`
`( IsRightAutomorphicLoop, IsAutomorphicLoop )`
`( IsMiddleAutomorphicLoop, IsAutomorphicLoop )`
`( IsLeftAutomorphicLoop, IsRightAutomorphicLoop and HasAntiautomorphicInverseProperty )`
`( IsRightAutomorphicLoop, IsLeftAutomorphicLoop and HasAntiautomorphicInverseProperty )`
`( IsFlexible, IsMiddleAutomorphicLoop )`
`( HasAntiautomorphicInverseProperty, IsFlexible and IsLeftAutomorphicLoop )`
`( HasAntiautomorphicInverseProperty, IsFlexible and IsRightAutomorphicLoop )`
`( IsMoufangLoop, IsAutomorphicLoop and IsLeftAlternative )`
`( IsMoufangLoop, IsAutomorphicLoop and IsRightAlternative )`
`( IsMoufangLoop, IsAutomorphicLoop and HasLeftInverseProperty )`
`( IsMoufangLoop, IsAutomorphicLoop and HasRightInverseProperty )`
`( IsMoufangLoop, IsAutomorphicLoop and HasWeakInverseProperty )`
`( IsMiddleAutomorphicLoop, IsCommutative )`
`( IsLeftAutomorphicLoop, IsLeftBruckLoop )`
`( IsLeftAutomorphicLoop, IsLCCLoop )`
`( IsRightAutomorphicLoop, IsRightBruckLoop )`
`( IsRightAutomorphicLoop, IsRCCLoop )`
`( IsAutomorphicLoop, IsCommutative and IsMoufangLoop )`
`( IsAutomorphicLoop, IsLeftAutomorphicLoop and IsMiddleAutomorphicLoop )`
`( IsAutomorphicLoop, IsRightAutomorphicLoop and IsMiddleAutomorphicLoop )`
`( IsAutomorphicLoop, IsAssociative )`