GAP (Loops) - Chapter 5: Basic Methods And Attributes

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 A B Bib Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

5 Basic Methods And Attributes
5.1 Basic Attributes
5.1-1 Elements
5.1-2 CayleyTable
5.1-3 One
5.1-4 Size
5.1-5 Exponent
5.2 Basic Arithmetic Operations
5.2-1 LeftDivision and RightDivision
5.2-2 LeftDivisionCayleyTable and RightDivisionCayleyTable
5.3 Powers and Inverses
5.3-1 LeftInverse, RightInverse and Inverse
5.4 Associators and Commutators
5.4-1 Associator
5.4-2 Commutator
5.5 Generators
5.5-1 GeneratorsOfQuasigroup and GeneratorsOfLoop
5.5-2 GeneratorsSmallest
5.5-3 SmallGeneratingSet

### 5 Basic Methods And Attributes

In this chapter we describe the basic core methods and attributes of the LOOPS package.

#### 5.1 Basic Attributes

We associate many attributes with quasigroups in order to speed up computation. This section lists some basic attributes of quasigroups and loops.

##### 5.1-1 Elements

`‣ Elements`( Q ) | ( attribute )

Returns: The list of elements of a quasigroup Q.

See Section 3.4 for more information about element labels.

##### 5.1-2 CayleyTable

`‣ CayleyTable`( Q ) | ( attribute )

Returns: The Cayley table of a quasigroup Q.

See Section 4.1 for more information about quasigroup Cayley tables.

##### 5.1-3 One

`‣ One`( Q ) | ( attribute )

Returns: 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)`.

##### 5.1-4 Size

`‣ Size`( Q ) | ( attribute )

Returns: The size of a quasigroup Q.

##### 5.1-5 Exponent

`‣ Exponent`( Q ) | ( attribute )

Returns: 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, that is, the powers of elements are well-defined in Q, then the exponent of Q is the smallest positive integer divisible by the orders of all elements of Q.

#### 5.2 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.

##### 5.2-1 LeftDivision and RightDivision

`‣ LeftDivision`( x, y ) | ( operation )

`‣ RightDivision`( x, y ) | ( operation )

Returns: The left division x\(\backslash\)y (resp. the right division x\(/\)y) of two elements x, y of the same quasigroup.

`‣ LeftDivision`( S, x ) | ( operation )

`‣ LeftDivision`( x, S ) | ( operation )

`‣ RightDivision`( S, x ) | ( operation )

`‣ RightDivision`( x, S ) | ( operation )

Returns: 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`.

##### 5.2-2 LeftDivisionCayleyTable and RightDivisionCayleyTable

`‣ LeftDivisionCayleyTable`( Q ) | ( operation )

`‣ RightDivisionCayleyTable`( Q ) | ( operation )

Returns: The Cayley table of the respective arithmetic operation of a quasigroup Q.

#### 5.3 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 \(x^\lambda\) of \(x\) is the unique element of \(Q\) satisfying \(x^\lambda x=1\). Similarly, the right inverse \(x^\rho\) satisfies \(xx^\rho=1\). If \(x^\lambda=x^\rho\), we call \(x^{-1}=x^\lambda=x^\rho\) the inverse of \(x\).

##### 5.3-1 LeftInverse, RightInverse and Inverse

`‣ LeftInverse`( x ) | ( operation )

`‣ RightInverse`( x ) | ( operation )

`‣ Inverse`( x ) | ( operation )

Returns: 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 ]

#### 5.4 Associators and Commutators

See Section 2.5 for definitions of associators and commutators.

##### 5.4-1 Associator

`‣ Associator`( x, y, z ) | ( operation )

Returns: The associator of the elements x, y, z of the same quasigroup.

##### 5.4-2 Commutator

`‣ Commutator`( x, y ) | ( operation )

Returns: The commutator of the elements x, y of the same quasigroup.

#### 5.5 Generators

##### 5.5-1 GeneratorsOfQuasigroup and GeneratorsOfLoop

`‣ GeneratorsOfQuasigroup`( Q ) | ( attribute )

`‣ GeneratorsOfLoop`( Q ) | ( attribute )

Returns: 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.

##### 5.5-2 GeneratorsSmallest

`‣ GeneratorsSmallest`( Q ) | ( attribute )

Returns: 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\).

##### 5.5-3 SmallGeneratingSet

`‣ SmallGeneratingSet`( Q ) | ( attribute )

Returns: 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.

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 A B Bib Ind

generated by GAPDoc2HTML