\Chapter{Testing properties of quasigroups and loops}

The reader should be aware that although loops are quasigroups, it is often the
case in the literature that a property named $P$ 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'.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Associativity, commutativity and generalizations}

The following properties test if a quasigroup $Q$ is associative and
commutative:

\>IsAssociative( <Q> ) P
\>IsCommutative( <Q> ) P

A loop $L$ is said to be <power associative>\index{power
associative!loop}\index{loop!power associative} (resp.\
<diassociative>\index{diassociative loop}\index{loop!diassociative}) if every
monogenic subloop of $L$ (resp. every $2$-generated subloop of $L$) is a group.

\>IsPowerAssociative( <L> ) P
\>IsDiassociative( <L> ) P

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Inverse properties}

A loop $L$ has the <left inverse property>\index{inverse property!left} if
$x^\lambda(xy)=y$ for every $x$, $y\in L$, where $x^\lambda$ is the left
inverse of $x$. Dually, $L$ has the <right inverse property>\index{inverse
property!right} if $(yx)x^\rho=y$ for every $x$, $y\in L$, where $x^\rho$ is
the right inverse of $x$. If $L$ has both the left and right inverse
properties, it has the <inverse property>\index{inverse property}. We say that
$L$ has <two-sided inverses>\index{inverse!two-sided} if $x^\lambda=x^\rho$ for
every $x\in L$.

\>HasLeftInverseProperty( <L> ) P
\>HasRightInverseProperty( <L> ) P
\>HasInverseProperty( <L> ) P
\>HasTwosidedInverses( <L> ) P

A loop has the <weak inverse property>\index{inverse property!weak} if
$(xy)^\lambda x = y^\lambda$. Equivalently, a loop has the weak inverse
property if $x(yx)^\rho = y^\rho$.

\>HasWeakInverseProperty( <L> ) P

According to \cite{Ar}, a loop $L$ has the <automorphic inverse
property>\index{inverse property!automorphic} if $(xy)^\lambda = x^\lambda
y^\lambda$, or, equivalently, $(xy)^\rho = x^\rho y^\rho$. (In particular, when
$L$ has two-sided inverses and the automorphic inverse property, it satisfies
$(xy)^{-1}=x^{-1}y^{-1}$.) Similarly, $L$ has the <antiautomorphic inverse
property>\index{inverse property!antiautomorphic} if $(xy)^\lambda=y^\lambda
x^\lambda$, or, equivalently, $(xy)^\rho = y^\rho x^\rho$.

\>HasAutomorphicInverseProperty( <L> ) P
\>HasAntiautomorphicInverseProperty( <L> ) P

The following implications among inverse properties hold and are
implemented in {\LOOPS}:
\beginlist%unordered
\item{$\circ$}
    Inverse property implies left and right inverse properties,
    two-sided inverses, weak inverse property, and antiautomorphic
    inverse property.
\item{$\circ$}
    Antiautomorphic inverse property loops have two-sided inverses.
\item{$\circ$}
    If a loop has any two of the left inverse property, right inverse property,
    weak inverse property or antiautomorphic inverse property, it also has
    the inverse property.
\endlist

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Some properties of quasigroups}

A quasigroup $Q$ is <semisymmetric>\index{semisymmetric
quasigroup}\index{quasigroup!semisymmetric} if $(xy)x=y$ for every $x$, $y\in
Q$. Equivalently, $Q$ is semisymmetric if $x(yx)=y$ for every $x$, $y\in Q$. A
semisymmetric commutative quasigroup is known as <totally
symmetric>\index{totally symmetric quasigroup}\index{quasigroup!totally
symmetric}. Totally symmetric quasigroups are precisely quasigroups satisfying
$xy=x\backslash y = x/y$.

\>IsSemisymmetric( <Q> ) P
\>IsTotallySymmetric( <Q> ) P

A quasigroup $Q$ is <idempotent>\index{idempotent
quasigroup}\index{quasigroup!idempotent} if $x^2=x$ for every $x\in Q$.
Idempotent totally symmetric quasigroups are known as <Steiner
quasigroups>\index{Steiner!quasigroup}\index{quasigroup!Steiner}. A quasigroup
$Q$ is <unipotent>\index{unipotent quasigroup}\index{quasigroup!unipotent} if
$x^2=y^2$ for every $x$, $y\in Q$.

\>IsIdempotent( <Q> ) P
\>IsSteinerQuasigroup( <Q> ) P
\>IsUnipotent( <Q> ) P

A quasigroup is <left distributive>\index{distributive quasigroup!left} if it
satisfies $x(yz)=(xy)(xz)$. Similarly, it is <right
distributive>\index{distributive quasigroup!right} if it satisfies
$(xy)z=(xz)(yz)$. A <distributive quasigroup>\index{distributive
quasigroup}\index{quasigroup!distributive} is a quasigroup that is both left
and right distributive. A quasigroup is called <entropic>\index{entropic
quasigroup}\index{quasigroup!entropic} or <medial>\index{medial
quasigroup}\index{quasigroup!medial} if it satisfies $(xy)(zw)=(xz)(yw)$.

\>IsLeftDistributive( <Q> ) P
\>IsRightDistributive( <Q> ) P
\>IsDistributive( <Q> ) P
\>IsEntropic( <Q> ) P
\>IsMedial( <Q> ) P

In order to be compatible with {\GAP}'s terminology, we also support the synonyms

\>IsLDistributive( <Q> ) P
\>IsRDistributive( <Q> ) P

for `IsLeftDistributive' and `IsRightDistributive' respectively.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Loops of Bol-Moufang type}

Following \cite{Fe} and \cite{PhVo}, a variety of loops is said to be of
<Bol-Moufang type>\index{loop!of Bol-Moufang type} if it is defined by a single
<identity of Bol-Moufang type>\index{identity of Bol-Moufang type}, i.e., by an
identity that:
\beginlist%unordered
\item{$\circ$}
    contains the same $3$ variables on both sides,
\item{$\circ$}
     exactly one of the variables occurs twice on both sides,
\item{$\circ$}
     the variables occur in the same order on both sides.
\endlist
It is proved in \cite{PhVo} that there are $13$ varieties of nonassociative loops
of Bol-Moufang type. These are:
\beginlist%unordered
\item{$\circ$}
    <left alternative loops>\index{alternative loop!left}, defined by $x(xy) = (xx)y$,
\item{$\circ$}
    <right alternative loops>\index{alternative loop!right}, defined by $x(yy) = (xy)y$,
\item{$\circ$}
    <left nuclear square loops>\index{nuclear square loop!left}, defined by $(xx)(yz) = ((xx)y)z$,
\item{$\circ$}
    <middle nuclear square loops>\index{nuclear square loop!middle}, defined by $x((yy)z) = (x(yy))z$,
\item{$\circ$}
    <right nuclear square loops>\index{nuclear square loop!right}, defined by $x(y(zz)) = (xy)(zz)$,
\item{$\circ$}
    <flexible loops>\index{flexible loop}\index{loop!flexible}, defined by $x(yx) = (xy)x$,
\item{$\circ$}
    <left Bol loops>\index{Bol loop!left}\index{loop!Bol}, defined by $x(y(xz)) = (x(yx))z$,
    always left alternative,
\item{$\circ$}
    <right Bol loops>\index{Bol loop!right}, defined by $x((yz)y) = ((xy)z)y$,
    always right alternative,
\item{$\circ$}
    <LC-loops>\index{LC-loop}\index{loop!LC}, defined by $(xx)(yz) = (x(xy))z$,
    always left alternative, left and middle nuclear square,
\item{$\circ$}
    <RC-loops>\index{RC-loop}\index{loop!RC}, defined by $x((yz)z) = (xy)(zz)$,
    always right alternative, right and middle nuclear square,
\item{$\circ$}
    <Moufang loops>\index{Moufang loop}\index{loop!Moufang}, defined by $(xy)(zx) = (x(yz))x$,
    always flexible, left and right Bol,
\item{$\circ$}
    <C-loops>\index{C-loop}\index{loop!C}, defined by $x(y(yz)) = ((xy)y)z$,
    always LC and RC,
\item{$\circ$}
    <extra loops>\index{extra loop}\index{loop!extra}, defined by $x(y(zx)) = ((xy)z)x$,
    always Moufang and C.
\endlist
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 are
defined in several ways, by equivalent identities of Bol-Moufang type.

There are several varieties related to loops of Bol-Moufang type. A loop is
said to be <alternative>\index{alternative loop}\index{loop!alternative} if it
is both left and right alternative, and <nuclear square>\index{nuclear square
loop}\index{loop!nuclear square} if it is left, middle and right nuclear
square.

Here are the corresponding {\LOOPS} commands (argument $L$ indicates that the
property applies only to loops, argument $Q$ indicates that the property
applies also to quasigroups):

\>IsExtraLoop( <L> ) P
\>IsMoufangLoop( <L> ) P
\>IsCLoop( <L> ) P
\>IsLeftBolLoop( <L> ) P
\>IsRightBolLoop( <L> ) P
\>IsLCLoop( <L> ) P
\>IsRCLoop( <L> ) P
\>IsLeftNuclearSquareLoop( <L> ) P
\>IsMiddleNuclearSquareLoop( <L> ) P
\>IsRightNuclearSquareLoop( <L> ) P
\>IsNuclearSquareLoop( <L> ) P
\>IsFlexible( <Q> ) P
\>IsLeftAlternative( <Q> ) P
\>IsRightAlternative( <Q> ) P
\>IsAlternative( <Q> ) P

While listing the varieties of loops of Bol-Moufang type, we have also listed
all inclusions among them. These inclusions are built into {\LOOPS}.

The following trivial example shows some of the implications and the naming
conventions of {\LOOPS} at work:

\beginexample
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> ]
\endexample

The analogous terminology for quasigroups of Bol-Moufang type is not
standard yet, and hence is not supported in {\LOOPS}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Power alternative loops}

A loop is <left power alternative>\index{power alternative loop!left} if it is
power associative and $x^n(x^m y) = x^{n+m}y$ for every $x$, $y$ and all
integers $n$, $m$. Similarly, a loop is <right power alternative>\index{power
alternative loop!right} if it is power associative and $(xy^n)y^m = xy^{n+m}$
for all $x$, $y$ and all integers $n$, $m$. A loop that is both left and right
power alternative is said to be <power alternative>\index{power alternative
loop}\index{loop!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( <L> ) P
\>IsRightPowerAlternative( <L> ) P
\>IsPowerAlternative( <L> ) P

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Conjugacy closed loops and related properties}

\noindent A loop is <left> (resp.\ <right>) <conjugacy closed>\index{conjugacy
closed loop!left}\index{conjugacy closed loop!right} if its left (resp.\ right)
translations are closed under conjugation. A loop that is both left and right
conjugacy closed is called <conjugacy closed>\index{conjugacy closed
loop}\index{loop!conjugacy closed}. It is common to refer to these loops as
LCC-, RCC-, CC-loops, respectively.

\>IsLCCLoop( <L> ) P
\>IsRCCLoop( <L> ) P
\>IsCCLoop( <L> ) P

The equivalence LCC $+$ RCC $=$ CC is built into {\LOOPS}.

A loop is <Osborn>\index{Osborn loop}\index{loop!Osborn} if it satisfies
$x(yz\cdot x)=(x^\lambda\backslash y)(zx)$, where $x^\lambda$ is the left
inverse of $x$. Both Moufang loops and CC-loops are Osborn.

\>IsOsbornLoop( <L> ) P

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Additional varieties of loops}

An <(even) code loop>\index{code loop}\index{loop!code} is a Moufang $2$-loop
with Frattini subloop of order $1$ or $2$. Code loops are extra and conjugacy
closed.

\>IsCodeLoop( <L> ) P

<Steiner loop>\index{Steiner!loop}\index{loop!Steiner} is an inverse property
loop of exponent $2$. Steiner loops are commutative.

\>IsSteinerLoop( <L> ) P

A left (resp. right) Bol loop with the automorphic inverse property is known as
<left> (resp. <right>) <Bruck loop>\index{Bruck loop!left}\index{Bruck
loop!right}\index{Bruck loop}\index{loop!Bruck}. Bruck loops are also known as
<K-loops>\index{K-loop}\index{loop!K}.

\>IsLeftBruckLoop( <L> ) P
\>IsLeftKLoop( <L> ) P
\>IsRightBruckLoop( <L> ) P
\>IsRightKLoop( <L> ) P

A loop whose all left (resp. middle, right) inner mappings are automorphisms is
called a <left> (resp. <middle>, <right>)
<automorphic loop>\index{automorphic loop!left}\index{automorphic loop!middle}\index{automorphic loop!right}. A loop
whose every inner mapping is an automorphism is known as an
<automorphic loop>\index{automorphic loop}\index{loop!automorphic}. Diassociative automorphic loops are Moufang by
\cite{KiKuPh}. See the built-in filters for additional properties of automorphic loops.

\>IsLeftAutomorphicLoop( <L> ) P
\>IsMiddleAutomorphicLoop( <L> ) P
\>IsRightAutomorphicLoop( <L> ) P
\>IsAutomorphicLoop( <L> ) P

Automorphic loops have historically been called <A-loops>\index{A-loop}\index{loop!A}. We therefore support the synonyms

\>IsLeftALoop( <L> ) P
\>IsMiddleALoop( <L> ) P
\>IsRightALoop( <L> ) P
\>IsALoop( <L> ) P

Be careful not to confuse `IsALoop' and `IsLoop'.