diff --git a/lib/morpheus.gi b/lib/morpheus.gi index d0a8e7c7344..4b0d8f5a152 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -535,6 +535,12 @@ local hom, gens, c, ran, r, cen, img, u, orbs, while Size(u)1 then SortBy(c,Size);fi; # once an outside class is known, sort of:=First(c,x->not Representative(x) in u); + + if of=fail then + # rarely reps are in u + of:=First(c, + x->ForAny(GeneratorsOfGroup(g),y->not Representative(x)^y in u)); + fi; if MemoryUsage(Representative(of))*Size(of) # if a single class only requires <10000 diff --git a/tst/testbugfix/2024-05-06-Isom.tst b/tst/testbugfix/2024-05-06-Isom.tst new file mode 100644 index 00000000000..80ebd3151fb --- /dev/null +++ b/tst/testbugfix/2024-05-06-Isom.tst @@ -0,0 +1,7 @@ +# Fix #5708 +gap> G:=Group([ (2,11,20)(3,10,19)(4,9,12)(5,8,13)(6,15,17)(7,14,18), +> (2,20)(3,4)(5,7)(8,18)(9,19)(10,12)(13,14)(15,17), +> (1,2)(3,20)(6,18)(7,19)(8,12)(9,11)(13,15)(16,17) ]);; +gap> H:=Group([ (1,2,3,4,5), (3,4,5), (6,7) ]);; +gap> IsomorphismGroups(G,H)<>fail; +true