Skip to content

Commit

Permalink
Ensure IsomorphismPermGroup returns an isomorphism
Browse files Browse the repository at this point in the history
... for its argument.
  • Loading branch information
fingolfin committed Jan 24, 2023
1 parent 3b361c1 commit 0c10e64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/grpmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,18 @@ function(G)
local map;
if HasNiceMonomorphism(G) and IsPermGroup(Range(NiceMonomorphism(G))) then
map:=NiceMonomorphism(G);
if IsIdenticalObj(Source(map),G) then
return map;
fi;
return GeneralRestrictedMapping(map,G,NiceObject(G));
else
if not HasIsFinite(G) then
Info(InfoWarning,1,
"IsomorphismPermGroup: The group is not known to be finite");
fi;
map:=NicomorphismOfGeneralMatrixGroup(G,false,false);
SetNiceMonomorphism(G,map);
fi;
if IsIdenticalObj(Source(map),G) then
return map;
fi;
return GeneralRestrictedMapping(map,G,NiceObject(G));
end);

InstallMethod( IsomorphismPermGroup,
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2023-01-24-IsomorphismPermGroup.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# see <https://github.com/gap-system/gap/issues/3601>
gap> G:=SL(2,3);;Order(G);
24
gap> P:=Image(IsomorphismPermGroup(G));;Order(P);
24

0 comments on commit 0c10e64

Please sign in to comment.