39.10 ElementAlgebra

`ElementAlgebra( A, nr )`

returns the nr-th element in terms of the generators of the free algebra A over the finite field F, with respect to the following ordering.

We form the elements as linear combinations with coefficients in the base field of A, with respect to the basis defined by the ordering of words according to length and lexicographic order; this sequence starts as follows.

a_1^0, a_1, a_2, ldots, a_n, a_1^2, a_1 a_2, a_1 a_3, ldots, a_1 a_n, a_2 a_1, ldots, a_2 a_n, ldots, a_n^2, a_1^3, a_1^2 a_2, ldots, a_1^2 a_n, a_1 a_2 a_1, ldots

Let n be the number of generators of A, q the size of F, and <nr> = sum_{i=0}^k a_i q^i the q-adic expression of nr. Then the a_i-th element of `A.field` is the coefficient of the i-th base element in the required algebra element. The ordering of field elements is the same as that defined in the MeatAxe package, that is, `FFList( F )[ m+1 ]` (see FFList) is the m-th element of the field F.

```    gap> a:= FreeAlgebra( GF(2), 2 );;
gap> List( [ 10 .. 20 ], x -> ElementAlgebra( a, x ) );
[ a.1+a.1^2, a.one+a.1+a.1^2, a.2+a.1^2, a.one+a.2+a.1^2,
a.1+a.2+a.1^2, a.one+a.1+a.2+a.1^2, a.1*a.2, a.one+a.1*a.2,
a.1+a.1*a.2, a.one+a.1+a.1*a.2, a.2+a.1*a.2 ]
gap> ElementAlgebra( a, 0 );
a.zero ```

The function can be applied also if A is an arbitrary finitely presented algebra or a matrix algebra. In these cases the result is the element of the algebra obtained on replacing the generators of the corresponding free algebra by the generators of A.

Note that the zero-th power of elements may be needed, which is not necessarily an element of a matrix algebra.

```    gap> a:= UnitalAlgebra( GF(2), GL(2,2).generators );
UnitalAlgebra( GF(2), [ [ [ Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0 ] ],
[ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ] ] )
gap> ElementAlgebra( a, 17 );
[ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, Z(2)^0 ] ] ```

The number of an element a can be computed using NumberAlgebraElement.

GAP 3.4.4
April 1997