Skip to content

Commit

Permalink
Remove slower code
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Jul 29, 2024
1 parent c51247b commit de0de3c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gap/attributes/isomorph.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit de0de3c

Please sign in to comment.