# GAP routine for computing orbits of cosets.

Let $$G=N{.}Q$$ be an extension with N nonabelian. I act $$N$$ on the coset $$Ng$$, g is a lifting for a class representative $$q \in Q$$, to get say $$l$$ orbits. Now I act the centralizer $$C_Q(q)$$ on the set of $$l$$ orbits to get say $$t$$ orbits. How do I write a GAP routine to find these orbits. The action is by conjugation.

• I'm not sure I understand completely what you want. Are you asking for the orbits of the full pre-image of the centralizer of $Ng$ in $G/N$ on the elements of the coset $Ng$? Or do you care about the values of your $l$ and $t$? – ahulpke Aug 17 '20 at 15:31
• I am mostly interesting in the orbits of the full pre-image of the centralizer of Ng in G/N on the elements of the coset Ng. – Isaac Aug 17 '20 at 17:27

You first need to write down how the action happens. Let $$ng\in Ng$$, and $$c\in G$$ such that $$Nc\in C_{G/N}(g)$$. Then $$(ng)^c=n^cg^c=n^c c^{-1} g c g^{-1} g= \left(n^c [c,g^{-1}]\right) g$$

So that is the action we need to implement. It probably is easiest to represent coset elements by their $$N$$-part. Then, one can implement this action as follows, using the above formula. Assume that g is already defined as representative. Then define

OngCosetElems:=function(n,c)
return n^c*Comm(c,Inverse(g));
end;


and for example (here the centralizer preimage is the whole group):

gap> G:=SymmetricGroup(5);;N:=DerivedSubgroup(G);
Alt( [ 1 .. 5 ] )
gap> g:=(1,2);;
gap> e:=Elements(N);;
gap> o:=OrbitsDomain(G,e,OngCosetElems);
[ [ (), (1,2,3), (1,2)(3,4), (1,3,2), (1,2)(4,5), (1,2,4), (1,5,2),(1,2)(3,5), (1,4,2), (1,2,5) ],
[ (3,4,5), (1,4,5,2,3), (2,5)(3,4), (1,3,2,4,5), (2,3)(4,5), (1,5)(3,4),(1,3,5,2,4), (1,5,2,3,4), (1,3)(4,5), (2,4)(3,5), (1,4,2,3,5),(1,3,4,2,5), (1,5,2,4,3), (1,4)(3,5), (3,5,4), (1,4,3,2,5),(1,4,2,5,3), (1,5,4,2,3), (1,3,2,5,4), (1,5,3,2,4) ],
[ (2,3,4), (1,2,3,4,5), (1,3,4), (1,3,4,5,2), (1,2,4,5,3), (2,4,5),(1,4,3,5,2), (1,4,5,3,2), (2,3,5), (1,4,5), (2,5,4), (1,2,4,3,5), (1,4)(2,5), (1,3,5), (1,3)(2,5), (1,5)(2,3), (1,5,4), (1,3,5,4,2),(2,5,3), (1,5)(2,4), (1,3)(2,4), (2,4,3), (1,5,3), (1,2,3,5,4),(1,4)(2,3), (1,4,3), (1,5,3,4,2), (1,2,5,3,4), (1,2,5,4,3),(1,5,4,3,2) ] ]
gap> List(o,Length);
[ 10, 20, 30 ]


Instead of using a global variable for g you might find it convenient to create the action function by a function. We also cache $$g^{-1}$$:

CosetActFunctionCreator:=function(g)
local gi;
gi:=Inverse(g);
return function(n,c)
return n^c*Comm(c,gi);
end;
end;


and then use:

gap> o:=OrbitsDomain(G,e,CosetActFunctionCreator(g));


Of course in the orbit algorithm, always the same few elements c act, and one could thus cache the commutators. Furthermore, it would be helpful for performance to consider $$N$$-orbits first, but this quickly gets more difficult.

• I tested the algorithm on the maximal subgroup $3^2{:}2S4$ of $M_{12}$ and it seems like it fails if $g$ is a nontrivial element. It works if $g$ is trivial. Perhaps I am overlooking something. – Isaac Aug 19 '20 at 22:36
• What do you mean by "It fails"? – ahulpke Aug 19 '20 at 22:59
• This GAP line " o:=OrbitsDomain(G,e,OngCosetElems);" does not give me an answer. Please can you perhaps verify the algorithm for the group $3^2{:}2S_4$. – Isaac Aug 20 '20 at 5:20
• This is what I did in GAP with the maximal subgroup $3^2{:}2S_4$ gap>G:=Group(output[1],output[2]); <matrix group with 2 generators> gap> N:=Nor[1]; <matrix group of size 9 with 2 generators> gap> con:=ConjugacyClasses(G); gap> g:=Representative(con[2]); gap> OngCosetElems:=function(n,c) > return n^c*Comm(c,Inverse(g)); > end; function( n, c ) ... end gap> e:=Elements(N);; gap> o:=OrbitsDomain(G,e,OngCosetElems); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `[]' on 2 arguments The 2nd argument is 'fail' – Isaac Aug 20 '20 at 6:59
• I think this error is an issue with matrix groups. Try it in a permutation representation and if you want send a fully reproducable example (showing how you created the objects) of the error to the support@gap-system.org email list. – ahulpke Aug 20 '20 at 19:42