[GAP Forum] Error when Generating FreeMonoid of rank infinity

James Mitchell jdm3 at st-and.ac.uk
Fri Jan 9 18:28:40 GMT 2015


Dear Nick,

Thanks for the report. There is a bug in a method that is called
immediately for any monoid that is created using a set of generators.
The bug only occurs for monoids with infinite generating sets, which
is probably why it never showed up before. If you replace the method
in lines 127 to 135 of the file gap/lib/monoid.gi by the code below,
then your example works ok. You can also just paste the code below
into a GAP session or put it in your .gaprc file, and then after this
your example will work.

InstallImmediateMethod( GeneratorsOfSemigroup,
IsMonoid and HasGeneratorsOfMonoid and IsAttributeStoringRep, 0,
function(M)

  if CanEasilyCompareElements(One(M)) and One(M) in GeneratorsOfMonoid(M) then
    return GeneratorsOfMonoid(M);
  fi;
  return Concatenation([One(M)],GeneratorsOfMonoid(M));
end);

Best wishes,

James

On 9 January 2015 at 18:06, Nick Loughlin <n.j.loughlin at ncl.ac.uk> wrote:
> Hi Forum,
>
> I'm working in GAP 4.7.5 in linux, and have tested on a similar set-up
> on 4.7.4 with identical results, and 4.5.5, with a different error message.
>
>
> gap> FreeMonoid( infinity, "m", [  ] );
> Error, no method found! For debugging hints type ?Recovery from
> NoMethodFound
> Error, no 2nd choice method found for `in' on 2 arguments called from
> One( M ) in GeneratorsOfMonoid( M ) called from
> <compiled or corrupted statement>  called from
> <compiled or corrupted statement>  called from
> SetGeneratorsOfMagmaWithOne( M, AsList( gens ) ); called from
> MonoidByGenerators( InfiniteListOfGenerators( F ) ) called from
> ...  at line 957 of *stdin*
> you can 'quit;' to quit to outer loop, or
> you can 'return;' to continue
>
>
> I've replicated the result on GAP 4.7.4 on linux on a different
> computer. I can get a hold of the monoid (locally named M) in the break
> loop, and assign it to a global variable name to use once I exit the
> loop, but would appreciate some insight into the nature of this error –
> is it a bug, or have I done something wrong? If it's a bug, is there an
> easy workaround I can use for now?
>
> Best,
> Nick
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum



-- 
James Mitchell
tinyurl.com/jdmitchell

The University of St Andrews is a charity registered in Scotland : No SC013532



More information about the Forum mailing list