From 6b26c000c143880bf7a7dce20bc0c45026e1d871 Mon Sep 17 00:00:00 2001 From: Laurent Bartholdi Date: Fri, 14 Sep 2018 15:09:43 +0200 Subject: [PATCH] Added new \\in for FR semigroups, to fix problem with loops --- read.g | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/read.g b/read.g index 787e069..503b43c 100644 --- a/read.g +++ b/read.g @@ -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 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