[Up] [Previous] [Next] [Index]

5 Basic methods and attributes

Sections

  1. Basic attributes
  2. Basic arithmetic operations
  3. Powers and inverses
  4. Associators and commutators
  5. Generators

We describe the basic core methods and attributes of the LOOPS package in this chapter.

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.

The list of elements of a quasigroup Q is obtained by the usual command

  • Elements( Q ) A

    The Cayley table of a quasigroup Q is returned with

  • CayleyTable( Q ) A

    One can use Display( CayleyTable( Q ) ) for pretty matrix-style output of small Cayley tables.

    The neutral element of a loop L is obtained via

  • One( L ) A

    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 ) A

    The size of a quasigroup Q is calculated by

  • Size( Q ) A

    When L is a power-associative loopindexpower-associative loop, i.e., the powers of elements are well-defined in L, the exponentindexexponent of L is the smallest positive integer divisible by orders of all elements of L. The following attribute calculates the exponent without testing for power-associativity:

  • Exponent( L ) A

    5.2 Basic arithmetic operations

    Each quasigroup element in GAP knows which quasigroup it belongs to. 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 by default parenthesize elements 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.

    Universal algebraists introduce two additional operations for quasigroups. Namely the left divisionindexleft division x\y defined by x·(x\y)=y, and the right divisionindexright division x/y defined by (x/yy=x. These two operations can be found in LOOPS as:

  • LeftDivision( x, y ) O
  • RightDivision( x, y ) O

    When Q is a quasigroup, x is an element of Q, and S is a list of elements of Q, then

  • LeftDivision( S, x ) O
  • LeftDivision( x, S ) O
  • RightDivision( S, x ) O
  • RightDivision( x, S ) O

    returns the list of elements obtained by performing the respective division of S by x, or of x by S, using one element of S at a time.

    We also support / in place of RightDivision. But we do not support \ in place of LeftDivision.

    To obtain the Cayley tables for the operation left division or right division, use

  • LeftDivisionCayleyTable( Q ) O
  • RightDivisionCayleyTable( Q ) O

    5.3 Powers and inverses

    Powers of elements are generally not well-defined in quasigroups. We say that the quasigroup Q is power-associativeindexpower-associativity, if for any x Î Q, the submagma generated by x is associative.

    For magmas and positive integer exponents, GAP defines the powers in the following way: x1=x, x2k=(xk)·(xk) and x2k+1=(x2kx. One can easily see that this returns xk in log2(k) steps. For LOOPS, we have decided to keep this method, hoping that everybody will use it with care for non power-associative quasigroups.

    Let x be an element of a loop L with neutral element 1. Then the left inverseindexleft inverse xl of x is the unique element of L satisfying xl x=1. Similarly, the right inverseindexright inverse xr satisfies xxr=1. If xl=xr, we call x-1=xl=xr the inverseindexinverse of x.

  • LeftInverse( x ) O
  • RightInverse( x ) O
  • Inverse( x ) O

    The following examples illustrates the concept of inverses for a given loop M in which M.i coincides with the ith element:

    gap> CayleyTable( M );
    [ [ 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> [ LeftInverse( M.3 ), RightInverse( M.3 ), Inverse( M.3 ) ];
    [ l5, l4, fail ]
    

    5.4 Associators and commutators

    Let Q be a quasigroup and x, y, z Î Q. Then the associatorindexassociator of x, y, z is the unique element u such that (xy)z=(x(yz))u. The commutatorindexcommutator of x, y is the unique element v such that xy=(yx)v.

  • Associator( x, y, z ) O
  • Commutator( x, y ) O

    5.5 Generators

    The following two attributes are synonyms of GeneratorsOfMagma:

  • GeneratorsOfQuasigroup( Q ) A
  • GeneratorsOfLoop( L ) A

    As usual in GAP, one can refer to the ith generator of a quasigroup Q by Q.i. Note that it is not necessarily the case that Q.i = Elements( Q )[ i ], since the set of generators can be a proper subset of the elements.

    It is easy to prove that a quasigroup of order n can be generated by a subset containing at most log2n elements. When Q is a quasigroup

  • GeneratorsSmallest( Q ) A

    returns a generating set {q0, ..., qm} of Q such that Q0=Æ, Qm=Q, Qi=áq1, ..., qi ñ, qi+1 is the least element of Q\Qi.

    [Up] [Previous] [Next] [Index]

    loops manual
    March 2008