MappedExpression( expr, gens1, gens2 )
For an arithmetic expression expr in terms of gens1,
MappedExpression returns the corresponding expression in terms of
gens2.
gens1 may be a list of abstract generators (in this case the result is the
same as the object returned by MappedWord MappedWord), or of generators
of a finitely presented algebra.
gap> a:= FreeAlgebra( Rationals, 2 );;
gap> a:= a / [ a.1^2 - a.one, a.2^2 - a.one, (a.1*a.2)^2 - a.one ];;
gap> matgens:= [ [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]],
> [[0,1,0,0],[1,0,0,0],[0,0,0,1],[0,0,1,0]] ];;
gap> permgens:= [ (1,4)(2,3), (1,2)(3,4) ];;
gap> MappedExpression( a.1^2 + a.1, a.generators, matgens );
[ [ 1, 0, 0, 1 ], [ 0, 1, 1, 0 ], [ 0, 1, 1, 0 ], [ 1, 0, 0, 1 ] ]
gap> MappedExpression( a.1 * a.2, a.generators, permgens );
(1,3)(2,4)
Note that this can be done also in terms of (algebra or group) homomorphisms (see Algebra Homomorphisms).
MappedExpression may raise elements in gens2 to the zero-th power.
GAP 3.4.4