32.3 Magmas Defined by Multiplication Tables

The most elementary (but of course usually not recommended) way to implement a magma with only few elements is via a multiplication table.

  • MagmaByMultiplicationTable( A ) F

    For a square matrix A with n rows such that all entries of A are in the range [ 1 \.\. n ], MagmaByMultiplicationTable returns a magma M with multiplication * defined by A. That is, M consists of the elements m1, m2, ¼, mn, and mi \* mj = mA[i][j].

    The ordering of elements is defined by m1 < m2 < ¼ < mn, so mi can be accessed as MagmaElement( M, i ), see MagmaElement.

  • MagmaWithOneByMultiplicationTable( A ) F

    The only differences between MagmaByMultiplicationTable and MagmaWithOneByMultiplicationTable are that the latter returns a magma-with-one (see MagmaWithOne) if the magma described by the matrix A has an identity, and returns fail if not.

  • MagmaWithInversesByMultiplicationTable( A ) F

    The only differences between MagmaByMultiplicationTable and MagmaWithInversesByMultiplicationTable are that the latter returns a magma-with-inverses (see MagmaWithInverses) if each element in the magma described by the matrix A has an inverse, and returns fail if not.

  • MagmaElement( M, i ) F

    For a magma M and a positive integer i, MagmaElement returns the i-th element of M, w.r.t. the ordering <. If M has less than i elements then fail is returned.

  • MultiplicationTable( elms ) F

    For a list elms of elements that form a magma M, MultiplicationTable returns a square matrix A of positive integers such that A[i][j] = k holds if and only if elms[i] * elms[j] = elms[k]. This matrix can be used to construct a magma isomorphic to M, using MagmaByMultiplicationTable.

    gap> l:= [ (), (1,2)(3,4), (1,3)(2,4), (1,4)(2,3) ];;
    gap> a:= MultiplicationTable( l );
    [ [ 1, 2, 3, 4 ], [ 2, 1, 4, 3 ], [ 3, 4, 1, 2 ], [ 4, 3, 2, 1 ] ]
    gap> m:= MagmaByMultiplicationTable( a );
    <magma with 4 generators>
    gap> One( m );
    m1
    gap> elm:= MagmaElement( m, 2 );  One( elm );  elm^2;
    m2
    m1
    m1
    gap> Inverse( elm );
    m2
    gap> AsGroup( m );
    <group of size 4 with 2 generators>
    gap> a:= [ [ 1, 2 ], [ 2, 2 ] ];
    [ [ 1, 2 ], [ 2, 2 ] ]
    gap> m:= MagmaByMultiplicationTable( a );
    <magma with 2 generators>
    gap> One( m );  Inverse( MagmaElement( m, 2 ) );     
    m1
    fail
    

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

    GAP 4 manual
    February 2000