[GAP Forum] unpredictable SemidirectProduct
Alexander Hulpke
hulpke at me.com
Tue Jun 1 12:15:16 BST 2010
Dear Forum, Dear Barry Monson,
> I am puzzled by the behaviour of SemidirectProduct.
> Two similar calculations, only one successful, follow.
> Can someone explain what, if anything, I am doing wrong?
The existing (convenience) code for constructing semidirect products with vector spaces assumes that the group acts faithfully -- otherwise one cannot construct the product as a group of affine matrices. I append a modified function that in such a case constructs the vector space as a group (and forms the corresponding automorphisms), allowing to use the generic mechanism for semidirect products. I hope this resolves the issue. In this case, however, the product will not be represented any longer as a matrix group.
Best,
Alexander Hulpke
##############################################################################
##
#M SemidirectProduct: with vector space
##
InstallOtherMethod( SemidirectProduct, "group with vector space: affine", true,
[ IsGroup, IsGroupHomomorphism, IsFullRowModule and IsVectorSpace ], 0,
function( G, map, V )
local pm,F,d,b,s,t,pos,i,j,img,m,P,info,Go,bnt,N,pcgs,auts,mapi,ag,phi,imgs;
# construction assumes faithful action. AH
if Size(KernelOfMultiplicativeGeneralMapping(map))<>1 then
# not faithful -- cannot simply build as matrices
N:=ElementaryAbelianGroup(Size(V));
pcgs:=Pcgs(N);
auts:=[];
mapi:=MappingGeneratorsImages(map);
for i in mapi[2] do
imgs:=List(i,x->PcElementByExponents(pcgs,x));
Add(auts,GroupHomomorphismByImagesNC(N,N,pcgs,imgs));
od;
ag:=Group(auts,IdentityMapping(N));
SetIsGroupOfAutomorphismsFiniteGroup(ag,true);
phi:=GroupHomomorphismByImages(G,ag,mapi[1],auts);
s:=SemidirectProduct(G,phi,N);
return s;
fi;
G:=Image(map,G);
F:=LeftActingDomain(V);
d:=DimensionOfVectors(V);
# if G is a permgroup, take permutation matrices
Go:=G;
if IsPermGroup(G) then
m:=List(GeneratorsOfGroup(G),i->PermutationMat(i,d,F));
s:=Group(m);
pm:=GroupHomomorphismByImagesNC(G,s,GeneratorsOfGroup(G),m);
map:=map*pm;
G:=s;
fi;
if not IsMatrixGroup(G) or d<>DimensionOfMatrixGroup(G) or not
IsSubset(F,FieldOfMatrixGroup(G)) then
Error("the matrices do not fit with the field");
fi;
b:=BasisVectors(Basis(V));
# spin up a basis
s:=[];
pos:=1;
t:=[];
while Length(s)<Length(b) do
# skip basis vectors that give nothing new
while Length(s)>0 and RankMat(s)=RankMat(Concatenation(s,[b[pos]])) do
pos:=pos+1;
od;
Add(s,b[pos]);
Add(t,b[pos]); # those vectors need own affine matrices
# spin the new vector
i:=Length(s);
while i<=Length(s) and Length(s)<Length(b) do
for j in GeneratorsOfGroup(G) do
img:=s[i]*j;
if RankMat(s)<RankMat(Concatenation(s,[img])) then
# new dimension
Add(s,img);
fi;
od;
i:=i+1;
od;
od;
# do we need to take extra vectors to extend the field?
if FieldOfMatrixGroup(G)<>F then
b:=BasisVectors(Basis(Field(FieldOfMatrixGroup(G),GeneratorsOfField(F))));
s:=[];
for i in t do
for j in b do
Add(s,i*j);
od;
od;
t:=s;
fi;
m:=[];
# build affine matrices from group generators
for i in GeneratorsOfGroup(G) do
b:=MutableIdentityMat(d+1,F);
b{[1..d]}{[1..d]}:=i;
Add(m,ImmutableMatrix(F,b));
od;
# and from basis vectors
bnt:=[];
for i in t do
b:=MutableIdentityMat(d+1,F);
b[d+1]{[1..d]}:=i;
b:=ImmutableMatrix(F,b);
Add(m,b);
Add(bnt,b);
od;
P:=Group(m,One(m[1]));
SetSize(P,Size(G)*Size(V));
info:=rec(group:=Go,
vectorspace:=V,
normalsub:=bnt,
lenlist:=[0,Length(GeneratorsOfGroup(G))],
embeddings:=[],
field:=F,
dimension:=d,
projections:=true);
SetSemidirectProductInfo( P, info );
return P;
end);
-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke
More information about the Forum
mailing list