Define the image of a representation of a finitely presented group in GAP Please note that the example below is just a baby case in which my problem occurs. Of course there is a simple workaround for my problem in this particular example, but I would like to apply this to more complicated finitely presented groups and also to reducible representations.
Assume I have the symmetric group $G$ on three letters, given by the presentation $$G = \langle x,y | x^2, y^3, xyx^{-1}y\rangle.$$ The group $G$ has the following irreducible complex representation $\rho$ of degree $2$:
$$x \mapsto \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \;\; y \mapsto \begin{pmatrix} \exp(4\pi i/3) & 0 \\ 0 & \exp(2\pi i /3) \end{pmatrix}.$$
What I want to do in GAP is to define the image of $\rho$ inside $GL(2, \mathbb C)$. For this, I load the repsn package. The corresponding irreducible representation of $G$ in GAP is one indexed by the number 3. Here is, what I have to define the representation $\rho$:
LoadPackage("repsn");
f := FreeGroup("x","y");
 G := f / [f.1^2, f.2^3, f.1*f.2*f.1^-1*f.2];
rho := IrreducibleAffordingRepresentation(Irr(G)[3]);

Now, I want to define the image of $\rho$ explicitly by defining the group generated by $\rho(x), \rho(y)$. But already
 Image(rho,x);

gives
Error, Variable: 'x' must have a value not in any function at *stdin*:19

Similary, 
 Image(rho,f.1);

gives
Error, usage: Image(<map>), Image(<map>,<elm>), Image(<map>,<coll>) at /proc/cygdrive/C/gap-4.9.2/lib/mapping.gi:198 called from
<function "Image">( <arguments> )
 called from read-eval loop at *stdin*:21
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue

Therefore, defining the image $H$ of $\rho$ in the four following ways gives errors:
H := Group(Image(rho,x),Image(rho,y));
 H := Group(Image(rho,f.1),Image(rho,f.2));
 H := Group([Image(rho,x),Image(rho,y)]);
 H := Group([Image(rho,f.1),Image(rho,f.2)]);
So what can I do to define the image of $\rho$ as the group generated by the images of the generators of $G$? (The bold part is crucial for my applications.)
I appreciate any help, thank you very much!
 A: The first problem occurs because there is no GAP global variable called x at the point when you refer to it. As GAP manual says here, "Note that you cannot call the generators by their names. These names are not variables, but just display figures. So, if you want to access the generators by their names, you first have to introduce the respective variables and to assign the generators to them."
The idea to use f.1 instead was good, but f.1 refers to the generator of the free group f and not to the generator of G. It would work if you would have used G.1 instead.
This is how to make it work. First, the setup:
gap> LoadPackage("repsn");
-------------------------------------------------------
Repsn for Constructing Representations of Finite Groups
                  Version 3.0.2                        

                    Written by                         
                 Vahid Dabbaghian                      
-------------------------------------------------------
true
gap> f := FreeGroup("x","y");
<free group on the generators [ x, y ]>
gap>  G := f / [f.1^2, f.2^3, f.1*f.2*f.1^-1*f.2];
<fp group on the generators [ x, y ]>
gap> rho := IrreducibleAffordingRepresentation(Irr(G)[3]);
[ x, y ] -> [ [ [ 0, 1 ], [ 1, 0 ] ], [ [ E(3)^2, 0 ], [ 0, E(3) ] ] ]

Now, if you want to define variables x and y for the generators of G, then you can do this as follows:
gap> gens:=GeneratorsOfGroup(G);
[ x, y ]
gap> x:=gens[1];y:=gens[2];
x
y
gap> Image(rho,x);
[ [ 0, 1 ], [ 1, 0 ] ]
gap> Image(rho,y);
[ [ E(3)^2, 0 ], [ 0, E(3) ] ]

Another notation for the same uses the ^ symbol:
gap> x^rho;
[ [ 0, 1 ], [ 1, 0 ] ]
gap> y^rho;
[ [ E(3)^2, 0 ], [ 0, E(3) ] ]
gap> (x^2*y^-1*x*y)^rho;
[ [ 0, E(3)^2 ], [ E(3), 0 ] ]

Finally, you can calculate the Image(rho) immediately:
gap> Image(rho);
Group([ [ [ 0, 1 ], [ 1, 0 ] ], [ [ E(3)^2, 0 ], [ 0, E(3) ] ] ])
gap> 

Hope this helps!
