From de0de3cf67ca3ce0ca72b6fc3133acc2b7a13d10 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 29 Jul 2024 15:14:56 +0100 Subject: [PATCH] Remove slower code --- gap/attributes/isomorph.gi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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);