# Building certain groups in GAP

Can someone please suggest a method to construct groups of type $G=ECA$, where $E$ is the additive group of the finite field $\mathbb{F} = \mathbb{F}_{p}^{e}$, $C$ is a subgroup of the multiplicative group $\mathbb{F}^{\times}$ of $\mathbb{F}$, and $A$ is a subgroup of the automorphism group of $\mathbb{F}$?

That is, first build $EC$ from $E$ under the natural affine action, and then build $G=ECA$ from $EC$ under the standard Frobenius automorphism action.

If taking specific values for $p$, $e$ and making specific choices for $C$, $A$ helps to produce a concrete example of the construction procedure, then full freedom of choice is extended.

The answer of @ahulpke is canonical, but I'd like to ask something further. I suspect that, perhaps, groups of this type can serve as good candidates to test a counting conjecture related to soluble groups (and their Carter subgroups, but that is irrelevant here). My code (based on the answer provided, as well as earlier code of Max Horn) is this:

#loading the "format" package for handling Carter subgroups

count := function(G, N) return Number(ConjugacyClassSubgroups(G,
CarterSubgroup(G)),x -> IsSubgroup(x, N)); end;;

#the counting modulus
m := G -> Gcd(List(Set(Factors(Index(G,CarterSubgroup(G)))), p -> p-1));;

#a simple routine which checks for the existence of normal complements to a given subgroup
normal_c := function(G,C)
local I,J,N;
for N in NormalSubgroups(G) do
I:=Order(Intersection(N,C));;
J:=Order(ClosureGroup(N,C));;
if Order(G)-I*J = 0 then
return true;
fi;
od;
return false;
end;;

list:=[];;

for p in [2,3,5,7,11] do
for e in [1..6] do
if p^e >2000 then continue; fi;
Print(p," ",e,"\n");
k:=0;;
f:=GF(p^e);;
bas:=Basis(f);;
cgen:=PrimitiveElement(f);;
cmat:=List(BasisVectors(bas),x->Coefficients(bas,x*cgen));;
gal:=GaloisGroup(f);;
galgen:=gal.1;;
galmat:=List(BasisVectors(bas),x->Coefficients(bas,Image(galgen,x)));;
CA:=Group(cmat,galmat);;
G:=SemidirectProduct(CA,GF(p)^e);;
G:=Image(SmallerDegreePermutationRepresentation(Image(IsomorphismPermGroup(G))));;
allsubs:=Filtered(List(ConjugacyClassesSubgroups(G),Representative), g -> not IsNilpotentGroup(g));;

for W in allsubs do
#this bit is only to tell us %completed
k:=k+1;;
if k mod 50 = 0 then Print(k, " of ", Length(allsubs), "\n"); fi;

C:=CarterSubgroup(W);;
# the following filters check if W has some necessary properties that a min. counterexample must have
#the modulus is non-trivial
if m(W) = 1 then continue; fi;
if RemInt(Index(W,C),2) = 0 then continue; fi;
#C is not Hall
if Gcd(Index(W,C),Size(C)) = 1 then continue; fi;
#C is core-free
if Size(Core(W,C))>1 then continue; fi;
#C is not abelian
if IsAbelian(C) then continue; fi;
#every prime dividing the order of the socle divides the order of C
if not IsSubsetSet(Factors(Size(C)),Factors(Size(Socle(W)))) then continue; fi;
#C does not have a normal complement
if normal_c(W,C) then continue; fi;
Append(list,[W]);;
od;
od;
od;


What I want is to speed up the search for such candidates. Presumably the allsubs command requires a huge amount of time and space, so I've tried building subgroups of $G$ (admitting the desired factorisation) concretely, but I seem to be doing something wrong. In the first instance, I'd like to be able to remove the p^e >2000 restriction, and then extend the range of $p, e$ a bit. Advice?

I'm starting a bounty for this extended question and I hope that is good etiquette.

P.S. With the current code I have been able to test a little more than 20 pairs $(p,e)$ and in the process I have found only two candidates.

Instead of specifying formal actions and homomorphisms into the automorphism group, it probably is easiest to represent C and A as matrices in dimension $e$ over the field with $p$ elements, using a basis of the field. Then $G$ simply is the semidirect product of the $e$-dimensional vector space with this group of matrices. for example in GAP:

gap> bas:=Basis(f);
CanonicalBasis( GF(3^3) )


Now take (for example) the multiplicative group, one generator, associated matrix action:

gap> cgen:=PrimitiveElement(f);
Z(3^3)
gap> cmat:=List(BasisVectors(bas),x->Coefficients(bas,x*cgen));
[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ],
[ Z(3), Z(3)^0, 0*Z(3) ] ]


Same for Galois group:

gap> gal:=GaloisGroup(f);
<group with 1 generators>
gap> galgen:=gal.1;
FrobeniusAutomorphism( GF(3^3) )
gap> galmat:=List(BasisVectors(bas),x->Coefficients(bas,Image(galgen,x)));
[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ Z(3), Z(3)^0, 0*Z(3) ],
[ Z(3)^0, Z(3)^0, Z(3)^0 ] ]


Now form the group generated by C and A as matrix group and form the semidirect product for G

gap> CA:=Group(cmat,galmat);
Group([  [ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0 ],
[ Z(3), Z(3)^0, 0*Z(3) ] ],
[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ Z(3), Z(3)^0, 0*Z(3) ],
[ Z(3)^0, Z(3)^0, Z(3)^0 ] ] ])
gap> G:=SemidirectProduct(CA,GF(3)^3);
<matrix group of size 2106 with 3 generators>


Note: $G$ is now represented as affine matrices, the bottom row indicating addition and the top left corner being multiplication and automorphisms.

gap> Display(G.1);
. 1 . .
. . 1 .
2 1 . .
. . . 1

• I take it it's going to be difficult to compute in large matrix groups. How can I turn the outcome into a perm. or pc-group? Not sure which choice is best. Oct 13, 2016 at 16:28
• Strike that. I could use something like: G:=Image(SmallerDegreePermutationRepresentation(Image(IsomorphismPermGroup(G))));  Oct 13, 2016 at 16:53
• Okay, one (hopefully final) question: how can I ask for a full list (up to conjugacy) of subgroups of $G$ which contain the whole of the additive group of the field? So, in your example, the whole of $\mathrm{GF}(3)^3$? Oct 13, 2016 at 20:19
• @the_fox Converting matrix groups into perm groups in GAP is a delicate process. Proceeding like you suggest is the naive way, but it quickly consumes prohibitively large amounts of memory as the group order grows. It will be easier initially to convert the individual pieces to perm groups (or pc groups if they're solvable), and construct the semidirect products from those. Otherwise you will tend to need ad hoc methods and specialized GAP packages to perform the conversions efficiently. Oct 13, 2016 at 21:17