Skip to content

Commit

Permalink
Fix finiteness condition in IsomorphismGroups
Browse files Browse the repository at this point in the history
If one group is finite and the other is infinite, the answer is always `fail`
  • Loading branch information
zickgraf authored and fingolfin committed Mar 8, 2019
1 parent c07bf5e commit 1213dab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2151,9 +2151,12 @@ local m;
IsFinite(G);
IsFinite(H);
fi;
if not IsFinite(G) and IsFinite(H) then
if not IsFinite(G) and not IsFinite(H) then
Error("cannot test isomorphism of infinite groups");
fi;
if IsFinite(G) <> IsFinite(H) then
return fail;
fi;

#AH: Spezielle Methoden ?
if Size(G)=1 then
Expand Down
9 changes: 9 additions & 0 deletions tst/testbugfix/2019-03-08-IsomorphismGroups.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# see https://github.com/gap-system/gap/pull/3331
gap> F := FreeGroup( 1 );;
gap> IsFinite( F );;
gap> S := SymmetricGroup( 3 );;
gap> IsFinite( S );;
gap> IsomorphismGroups( F, S );
fail
gap> IsomorphismGroups( S, F );
fail

0 comments on commit 1213dab

Please sign in to comment.