[GAP Forum] a problem with matrix algebras and homomorphisms

Thomas Breuer thomas.breuer at math.rwth-aachen.de
Wed Nov 10 17:10:21 GMT 2004

Dear GAP Forum,

Laurent Bartholdi wrote

> i'm trying to set up the following:
> A :=3D FreeAssociativeAlgebraWithOne(Integers,"s","f");
> s :=3D A.1; f :=3D A.2; z :=3D Zero(A); o :=3D One(A);
> M :=3D MatrixAlgebra(A,2);
> phi :=3D AlgebraHomomorphismByImages(A,M,[s,f],[[[z,o],[o,z]],[[f,z],=
> [s,z]]]);
> i.e. a free associative algebra A, and a map phi from A to 2x2 matric=
> es
> over itself.
> unfortunately, gap chokes saying
> Error, <S> and <R> must have same left acting domain called from ...
> now on one side it's true that they don't have the same acting domain=
> ; all
> that's needed is that <R> _contain_ the left acting domain of <S>.
> so i tried to double-think gap with "M!.LeftActingDomain :=3D Integer=
> s",
> but then i get in to the error that the matrix entries are not in
> Integers.

I am sorry but the GAP machinery is not developed very far in the
area of algebras and algebra homomorphisms.
What works is the case of finite dimensional algebras over fields,
which are treated mainly via linear algebra.
(As indicated in the question, it is reasonable to extend the
current behaviour such that also F-linear maps from a space V over F
into a space W over K are supported, if K is an F-space;
currently it is necessary to replace W explicitly by the corresponding

If I understand the underlying wish correctly then it is intended to
map an element in a free associative algebra to a matrix.
This can be achieved as follows.

    gap> A:= FreeAssociativeAlgebraWithOne( Integers, "s", "f" );;
    gap> z:= Zero(A);;  o:= One(A);;   
    gap> s:= A.1;;  f:= A.2;;
    gap> mats:= [ [[z,o],[o,z]], [[f,z],[s,z]] ];;
    gap> MappedExpressionForElementOfFreeAssociativeAlgebra( s*f, [s,f], mats );
    [ [ (1)*s, <zero> of ... ], [ (1)*f, <zero> of ... ] ]

One final comment:
Overwriting components in GAP objects with the `!.' operator
cannot be recommended.
In fact, I would not trust any result of a computation with such
an object.
Note that GAP is able to store a lot of information inside its objects,
and exchanging part of this by hand will almost certainly break the
consistency of the object.

All the best,

More information about the Forum mailing list