Skip to content

Commit 7889216

Browse files
authored
Guard some IdGroup calls by ID_AVAILABLE (#6353)
... instead of hardcoding assumptions about the availability of IdGroup.
1 parent 32fcf3e commit 7889216

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

lib/grplatt.gi

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,15 +2759,14 @@ local fgi,inducedfactorautos,projs,psubs,info,n,l,nl,emb,u,pos,
27592759
fi;
27602760

27612761
fgi:=function(gp,nor)
2762-
local idx,hom,l,f;
2763-
idx:=Index(gp,nor);
2762+
local hom,l,f;
27642763
hom:=NaturalHomomorphismByNormalSubgroup(gp,nor);
2765-
if idx>1000 or idx=512 or not uselib then
2766-
l:=[idx,fail];
2764+
f:=Image(hom);
2765+
if uselib and Size(f) < 1000 and ID_AVAILABLE(Size(f)) <> fail then
2766+
l:=ShallowCopy(IdGroup(f));
27672767
else
2768-
l:=ShallowCopy(IdGroup(gp/nor));
2768+
l:=[Size(f),fail];
27692769
fi;
2770-
f:=Image(hom,gp);
27712770
Add(l,hom);
27722771
Add(l,f);
27732772
Add(l,AutomorphismGroup(f));
@@ -2835,7 +2834,7 @@ local fgi,inducedfactorautos,projs,psubs,info,n,l,nl,emb,u,pos,
28352834
for k in no do
28362835
hom:=NaturalHomomorphismByNormalSubgroup(j[1],k.representative);
28372836
f:=Image(hom);
2838-
if Size(f)<1000 and Size(f)<>512 and uselib then
2837+
if uselib and Size(f) < 1000 and ID_AVAILABLE(Size(f)) <> fail then
28392838
myid:=ShallowCopy(IdGroup(f));
28402839
else
28412840
myid:=[Size(f),fail];

lib/grpnames.gi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ BindGlobal( "StructureDescriptionForFiniteGroups", # for finite groups
18611861

18621862
# fetch name from precomputed list, if available
18631863
if ValueOption("recompute") <> true and Size(G) <= 2000 then
1864-
if IsBound(NAMES_OF_SMALL_GROUPS[Size(G)]) then
1864+
if IsBound(NAMES_OF_SMALL_GROUPS[Size(G)]) and ID_AVAILABLE(Size(G)) <> fail then
18651865
i := IdGroup(G)[2];
18661866
if IsBound(NAMES_OF_SMALL_GROUPS[Size(G)][i]) then
18671867
name := ShallowCopy(NAMES_OF_SMALL_GROUPS[Size(G)][i]);

0 commit comments

Comments
 (0)