diff --git a/gap/attributes/isomorph.gi b/gap/attributes/isomorph.gi index c8f0408f1..23b7aff82 100644 --- a/gap/attributes/isomorph.gi +++ b/gap/attributes/isomorph.gi @@ -342,12 +342,13 @@ function(S, T) return fail; fi; - if CanonicalMultiplicationTable(S) <> CanonicalMultiplicationTable(T) then + DS := SEMIGROUPS.CanonicalDigraph(S); + DT := SEMIGROUPS.CanonicalDigraph(T); + p := IsomorphismDigraphs(DS[1], DT[1], DS[2], DT[2]); + if p = fail then return fail; fi; - p := CanonicalMultiplicationTablePerm(S) - * CanonicalMultiplicationTablePerm(T) ^ -1; - + p := RestrictedPerm(p, [1 .. Size(S)]); map := x -> AsSSortedList(T)[PositionSorted(S, x) ^ p]; inv := x -> AsSSortedList(S)[PositionSorted(T, x) ^ (p ^ -1)]; return SemigroupIsomorphismByFunctionNC(S, T, map, inv);