MappedWord( w, gens, imgs )
MappedWord
returns the new group element that is obtained by replacing
each occurrence of a generator gen in the list of generators gens by
the corresponding group element img in the list of group elements
imgs. The lists gens and imgs must of course have the same length.
gap> a := AbstractGenerator("a");; gap> b := AbstractGenerator("b");; gap> w := (a^2*b)^5*b^-1; a^2*b*a^2*b*a^2*b*a^2*b*a^2 gap> MappedWord( w, [a,b], [(1,2,3),(1,2)] ); (1,3,2)
If the images in imgs are all words, and some of them are equal to the corresponding generators in gens, then those may be omitted.
gap> MappedWord( w, [a], [a^2] ); a^4*b*a^4*b*a^4*b*a^4*b*a^4
Note that the special case that the list gens and imgs have only
length 1 is handled more efficiently by EliminatedWord
(see
EliminatedWord).
GAP 3.4.4