Two words can be multiplied via * only if they are words over the same
alphabet (see Comparison of Words).
MappedWord( w, gens, imgs ) O
MappedWord returns the object that is obtained by replacing each
occurrence in the word w of a generator in the list gens
by the corresponding object in the list imgs.
The lists gens and imgs must of course have the same length.
If the elements in imgs are all associative words
(see Chapter Associative Words)
in the same family as the elements in gens,
and some of them are equal to the corresponding generators in gens,
then those may be omitted from gens and imgs.
In this situation, the special case that the lists gens
and imgs have only length 1 is handled more efficiently by
EliminatedWord (see EliminatedWord).
gap> m:= FreeMagma( "a", "b" );; gens:= GeneratorsOfMagma( m );; gap> a:= gens[1]; b:= gens[2]; a b gap> w:= (a*b)*((b*a)*a)*b; (((a*b)*((b*a)*a))*b) gap> MappedWord( w, gens, [ (1,2), (1,2,3,4) ] ); (2,4,3) gap> a:= (1,2);; b:= (1,2,3,4);; (a*b)*((b*a)*a)*b; (2,4,3)
gap> f:= FreeGroup( "a", "b" );; gap> a:= GeneratorsOfGroup(f)[1];; b:= GeneratorsOfGroup(f)[2];; gap> w:= a^5*b*a^2/b^4*a; a^5*b*a^2*b^-4*a gap> MappedWord( w, [ a, b ], [ (1,2), (1,2,3,4) ] ); (1,3,4,2) gap> (1,2)^5*(1,2,3,4)*(1,2)^2/(1,2,3,4)^4*(1,2); (1,3,4,2) gap> MappedWord( w, [ a ], [ a^2 ] ); a^10*b*a^4*b^-4*a^2
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual