Skip to content

Commit

Permalink
Added new \\in for FR semigroups, to fix problem with loops
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentbartholdi committed Sep 14, 2018
1 parent 9546bb5 commit 6b26c00
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ ReadPackage("fr", "gap/examples.gi");
ReadPackage("fr", "gap/cp.gi");
#############################################################################

# added to fix problems with loops
InstallMethod(\in,
"(FR) default method, checking for <g> being among the generators",
ReturnTrue,
[IsFRElement, IsFRSemigroup], 1000,
function ( g, G )
if g = One(G)
or (IsFinite(GeneratorsOfGroup(G)) and g in GeneratorsOfGroup(G))
then return true;
else TryNextMethod(); fi;
end );

#############################################################################
##
#X install shortcuts
Expand Down

0 comments on commit 6b26c00

Please sign in to comment.