# How to create a group action on some group with GAP

Given group $G$ is generated by some elements $g_1,g_2,\cdots$ with some relations. Group $A$ is generated by some elements $a_1,a_2,\cdots$ with some relations. I want to define a group action $\rho: G \times A\rightarrow A$ and I only need to define how generators of $G$ acts on generators of $A$. How to use GAP to create such group action?

For specific example, $G=\mathbb{Z}_4\times \mathbb{Z}_4 = \langle g_1,g_2: g_1 g_2 g_1^{-1}g_2^{-1},g_1^4,g_2^4\rangle$, $A= \mathbb{Z}_2\times \mathbb{Z}_2= \langle a_1,a_2: a_1 a_2 a_1^{-1}a_2^{-1},a_1^2,a_2^2\rangle$ and group action is $\rho(g_1,a_1)=a_2$, $\rho(g_1,a_2)=a_1$, $\rho(g_2,a_1)=a_2$, $\rho(g_2,a_2)=a_1$. I've read this page and don't find some useful example .Thanks very much.

For each $a_i$ you create an automorphism $A\to A$ that describes the action.

Then create the group generated by these automorphisms, and make a homomorphism $G\to$this group.

gap> F:=FreeGroup("g","h");
gap> G:=F/ParseRelators(F,"g4=h4=ghGH=1");
<fp group on the generators [ g, h ]>
gap> F:=FreeGroup("a","b");
gap> A:=F/ParseRelators(F,"a2=b2=abAB=1");
<fp group on the generators [ a, b ]>


read off the action as you describe:

gap> hom1:=GroupHomomorphismByImages(A,A,[A.1,A.2],[A.2,A.1]);
[ a, b ] -> [ b, a ]
gap> hom2:=GroupHomomorphismByImages(A,A,[A.1,A.2],[A.2,A.1]);
[ a, b ] -> [ b, a ]
gap> augrp:=Group(hom1,hom2);
<group with 2 generators>
gap> act:=GroupHomomorphismByImages(G,augrp,[G.1,G.2],[hom1,hom2]);
[ g, h ] -> [ [ a, b ] -> [ b, a ], [ a, b ] -> [ b, a ] ]
gap> Size(Kernel(act));
8


Caveats:

1. Finitely presented is the worst way to to describe the groups you have. It is possible that the calculation (I did in the development version) will fail or slow down badly in the released versions. Rather describe G and H as permutation group or pc groups.
2. Your notation acts on the left. GAP acts (in what clearly is the natural way :-) ) on the right. Be careful that you don't twist yourself up in this.
• Thank you very much for this clear answer. – maplemaple Jan 18 '18 at 3:33
• You say that the finitely presented is the worst way. So in general how to efficiently construct the group action? Do you mind to give me an explicit example? For instance, $Z_6 \times Z_6$ acting on $Z_2\times Z_2$ like the way of problem? Thanks! – maplemaple Jan 18 '18 at 18:57
• @maplemapleI would use G:=Group((1,2,3,4,5,6),(7,8,9,10,11,12)) and A:=Group((1,2),(3,4). Then the generators are as corresponding to the free generators, but you would nee to look at the images of 1 and 7 to express an arbitrary element of $G$ as product of generators – ahulpke Jan 18 '18 at 20:00