Skip to content

Commit abab06d

Browse files
authored
Fix CompatiblePairs to not ignore the optional automorphism group argument (#6146)
1 parent bc44172 commit abab06d

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

lib/grppcext.gi

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -497,32 +497,29 @@ end);
497497
InstallGlobalFunction( CompatiblePairs, function( arg )
498498
local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1,
499499
K2, f, tmp, Ggens, pcgs, l, idx, u, tup,Dos,elmlist,preimlist,pows,
500-
baspt,newimgs,i,j,basicact,neu,K1nontriv,epi,hf,pool,modulehom,test,
501-
larg;
500+
baspt,newimgs,i,j,basicact,neu,K1nontriv,epi,hf,pool,modulehom,test;
502501

503502
# catch arguments
504-
A:=fail;
505-
larg:=ShallowCopy(arg);
506-
if Length(larg)>2 and IsGroupOfAutomorphismsFiniteGroup(arg[1]) and
503+
if Length(arg)>2 and IsGroupOfAutomorphismsFiniteGroup(arg[1]) and
507504
Source(One(arg[1]))=arg[2] then
508505
#automorphism group given
509-
A:=larg[1];
510-
larg:=larg{[2..Length(larg)]};
506+
A:=Remove(arg, 1);
511507
else
512508
A:=fail;
513509
fi;
514-
G := larg[1];
515-
M := larg[2];
510+
G := arg[1];
511+
M := arg[2];
516512
Mgrp := GroupByGenerators( M.generators );
517513
Ggens:=Pcgs(G);
518514
oper:=fail;
519515
if IsPcgs(Ggens) and Length(Ggens)=Length(M.generators) then
520516
oper := GroupHomomorphismByImagesNC( G, Mgrp, Ggens, M.generators );
521-
elif Length(larg)=2 then
517+
elif Length(arg)=2 then
522518
# search through automorphism group for projection image and reps,
523519
# then add module automorphisms
524520
gens:=GeneratorsOfGroup(G);
525521
if A=fail then
522+
Info( InfoCompPairs, 1, " CompP: compute aut group");
526523
A:=AutomorphismGroup(G);
527524
fi;
528525
triso:=IsomorphismPermGroup(A);
@@ -576,13 +573,15 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1,
576573
fi;
577574

578575
# automorphism groups of G and M
579-
if Length( larg ) = 2 then
580-
Info( InfoCompPairs, 1, " CompP: compute aut group");
581-
A := AutomorphismGroup( G );
576+
if Length( arg ) = 2 then
577+
if A=fail then
578+
Info( InfoCompPairs, 1, " CompP: compute aut group");
579+
A:=AutomorphismGroup(G);
580+
fi;
582581
B := GL( M.dimension, Characteristic( M.field ) );
583582
D := DirectProduct( A, B );
584583
else
585-
D := larg[3];
584+
D := arg[3];
586585
A := DirectProductInfo(D).groups[1];
587586
fi;
588587

@@ -608,7 +607,7 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1,
608607
Dos:=Size(D);
609608

610609
# compute stabilizer of K in A
611-
if Length( larg ) <= 3 or not larg[4] then
610+
if Length( arg ) <= 3 or not arg[4] then
612611

613612
# get kernel of oper
614613
K := KernelOfMultiplicativeGeneralMapping( oper );
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CompatiblePairs used to ignore the first optional argument in certain cases.
2+
# In the example below, the last command used to produce the output
3+
# [ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96 ]
4+
#
5+
# Reported by Heiko Dietrich, together with a helpful analysis of the problem
6+
# that made a fix quite easy.
7+
gap> G:=AbelianGroup([3,3]);;
8+
gap> M:=GModuleByMats([One(GL(1,3)),One(GL(1,3))],GF(3));;
9+
gap> aut:=List(ConjugacyClassesSubgroups(AutomorphismGroup(G)),Representative);;
10+
gap> SortedList(List(aut,A->Size(CompatiblePairs(A,G,M))));
11+
[ 2, 4, 4, 6, 8, 8, 12, 12, 12, 16, 16, 16, 24, 32, 48, 96 ]

0 commit comments

Comments
 (0)