I thought I knew how to construct semidirect products in GAP, and have done so before. But this rather simple idea below is giving an error I don't understand. I've read the other posts on semidirect products as well as the manual, but I just don't get it.
I want to take a group G, go through each of its normal subgroups, and then test whether we can make the original group as a semidirect product of the normal subgroup and its quotient, and if so, explore in how many ways.
Comments are in the code, so hopefully it's clear what I'm trying.
#here's a group I've taken an interest in
G:=SmallGroup(81,10);
#let's consider each of it's proper normal subgroups in
#turn
for N in NormalSubgroups(G) do
if Size(N) > 1 and Size(N) < 81 then
#we need the automorphism group of N
AutN:=AutomorphismGroup(N);
#and the quotient group
quot:=G/N;
#in order to construct semidirect products, we require this
#quotient to act on N via automorphisms, so we can consider
#each possible homomorphism from the quotient group into the
#automorphism group of the normal subgroup
for hom in AllHomomorphisms(quot,AutN) do
#now we ask GAP to form this semidirect product, and immediately hit an error - why?
semi:=SemidirectProduct(quot, hom, AutN );
Print("\n", IdGroup(semi));
od;
fi;
od;
This gives me this error:
Error, the families of the element or collection <elm> and Source(<map>) don't match,
maybe <elm> is not contained in Source(<map>) or is not a homogeneous list or
collection at /proc/cygdrive/D/GAP-4.11.1/lib/mapping.gi:207 called from
Image( aut, PreImagesRepresentative( epi, i ) ) at /proc/cygdrive/D/GAP-
4.11.1/lib/grppclat.gi:89 called from
func( C[i] ) at /proc/cygdrive/D/GAP-4.11.1/lib/coll.gi:665 called from
List( GeneratorsOfGroup( f ), function ( i )
return Image( epi, Image( aut, PreImagesRepresentative( epi, i ) ) );
end ) at /proc/cygdrive/D/GAP-4.11.1/lib/grppclat.gi:89 called from
InducedAutomorphism( niso, i ) at /proc/cygdrive/D/GAP-4.11.1/lib/gprd.gi:1115 called from
SemidirectProduct( quot, hom, AutN ) at *stdin*:206 called from
... at *stdin*:213
type 'quit;' to quit to outer loop
What am I not seeing?
Thanks for any help
To turn my comment into an answer: the mistake is that
should be
(see also the GAP Manual's section on
SemidirectProduct)