Skip to content

Commit 51c459e

Browse files
authored
Fix an unexpected error in IsomorphismGroups (#5935)
* FIX: bug in IsomorphismGroups The matching of characteristic subgroups matched some subgroups without testing that they indeed can match. This could lead to an error when no partner is found. This issue can only come up if the groups are nonisomorphic, so it should not be able to lead to wrong results. This fixes #5931 * FIX: FittingFreeSubgroupSetup Always force ker component, as some code asks for it.
1 parent 02e029b commit 51c459e

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

lib/autsr.gi

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,7 @@ end);
15611561
# find corresponding characteristic subgroups
15621562
BindGlobal("AGSRMatchedCharacteristics",function(g,h)
15631563
local a,props,cg,ch,clg,clh,ng,nh,coug,couh,pg,ph,i,j,stop,coinc;
1564+
15641565
props:=function(a)
15651566
local p,b;
15661567

@@ -1583,8 +1584,11 @@ local a,props,cg,ch,clg,clh,ng,nh,coug,couh,pg,ph,i,j,stop,coinc;
15831584
return p;
15841585
end;
15851586

1587+
# Process that G-subgroup i matches H-subgroup j. Return true if there is
1588+
# a problem.
15861589
coinc:=function(i,j)
15871590
local a,b,sa,sb,sel,p,q;
1591+
if pg[i]<>ph[j] then Error("matching bug");fi;
15881592
a:=cg[i];
15891593
b:=ch[j];
15901594
Add(ng,a);
@@ -1595,6 +1599,7 @@ local a,props,cg,ch,clg,clh,ng,nh,coug,couh,pg,ph,i,j,stop,coinc;
15951599
sel:=Difference([1..Length(ch)],[j]);
15961600
ch:=ch{sel};
15971601
ph:=ph{sel};
1602+
# find associated modules and further match
15981603
sa:=AGSRModuleLayerSeries(a);
15991604
sb:=AGSRModuleLayerSeries(b);
16001605
if List(sa,Size)<>List(sb,Size) then return true;fi;
@@ -1605,7 +1610,8 @@ local a,props,cg,ch,clg,clh,ng,nh,coug,couh,pg,ph,i,j,stop,coinc;
16051610
if q<>fail then return true;fi;
16061611
elif q=fail then return true;
16071612
else
1608-
if coinc(p,q) then return true;fi;
1613+
if pg[p]<>ph[q] # but not same properties
1614+
or coinc(p,q) then return true;fi;
16091615
fi;
16101616
od;
16111617
return false;
@@ -1614,20 +1620,24 @@ local a,props,cg,ch,clg,clh,ng,nh,coug,couh,pg,ph,i,j,stop,coinc;
16141620
ng:=[];
16151621
nh:=[];
16161622

1623+
# get the characteristic subgroups
16171624
cg:=ShallowCopy(CharacteristicSubgroups(g));
16181625
ch:=ShallowCopy(CharacteristicSubgroups(h));
16191626
SortBy(cg,x->-Size(x));
16201627
SortBy(ch,x->-Size(x));
16211628

1629+
# find list of properties, tryign to match them up
16221630
pg:=List(cg,props);
16231631
ph:=List(ch,props);
1624-
if Collected(pg)<>Collected(ph) then return fail;fi;
16251632

16261633
stop:=false;
16271634
while Length(cg)>0 and not stop do
1635+
# test in loop as list changes
1636+
if Collected(pg)<>Collected(ph) then return fail;fi;
16281637
i:=First([1..Length(pg)],x->Number(pg,y->y=pg[x])=1);
16291638
if i<>fail then
16301639
# found a unique one -- process
1640+
# because properties agree this must match
16311641
j:=Position(ph,pg[i]);
16321642
if coinc(i,j) then return fail;fi;
16331643
else

lib/fitfree.gi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ local ffs,pcisom,rest,kpc,k,x,ker,r,pool,i,xx,pregens,iso;
153153
r:=rec(parentffs:=ffs,
154154
rest:=rest,
155155
radical:=ker,
156+
ker:=ker,
156157
pcgs:=k,
157158
serdepths:=List(ffs.depths,y->First([1..Length(r)],x->r[x]>=y))
158159
);
@@ -185,6 +186,7 @@ local ffs,cache,rest,ker,k,r;
185186
r:=rec(parentffs:=ffs,
186187
rest:=rest,
187188
radical:=ker,
189+
ker:=ker,
188190
pcgs:=k,
189191
serdepths:=List(ffs.depths,y->First([1..Length(r)],x->r[x]>=y))
190192
);
@@ -298,6 +300,7 @@ local ffs,hom,U,rest,ker,r,p,l,i,depths,pcisom,subsz,pcimgs;
298300
r:=rec(parentffs:=ffs,
299301
rest:=rest,
300302
radical:=ker,
303+
ker:=ker,
301304
pcgs:=ipcgs,
302305
serdepths:=List(ffs.depths,y->First([1..Length(r)],x->r[x]>=y))
303306
);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Fix #5931 Isomorphism test / Characteristic matching
2+
gap> G:= PcGroupCode( 7081272684613405169270145749707713769178346454326033042960705194376896383, 512 );;
3+
gap> H:= PcGroupCode( 13830610712135556969734175751921406466451196220671918889959595223883643, 512 );;
4+
gap> IsomorphismGroups(G,H);
5+
fail
6+
gap> IsomorphismGroups(H,G);
7+
fail
8+
gap> GG:=PcGroupWithPcgs(SpecialPcgs(G));; # different isomorphic
9+
gap> IsGeneralMapping(IsomorphismGroups(G,GG)); # so isomorphism works
10+
true
11+
gap> HH:=PcGroupWithPcgs(SpecialPcgs(H));;
12+
gap> IsGeneralMapping(IsomorphismGroups(H,HH));
13+
true
14+
gap> IsGeneralMapping(IsomorphismGroups(HH,H));
15+
true

0 commit comments

Comments
 (0)