MultiplicativeZero for an acting semigroup has bugs

Issue #121 resolved
created an issue

I've been trying to increase code coverage of MultiplicativeZero and I've found problems. I will try to address these in the morning when I am fresh but I'll put them here for now as a record of this problem.

gap> gens := [ Transformation( [ 1, 2, 1 ] ), Transformation( [ 1, 2, 2 ] ) ];;
gap> S := Semigroup(gens);;
gap> Elements(S);
[ Transformation( [ 1, 2, 1 ] ), Transformation( [ 1, 2, 2 ] ) ]
gap> IsRectangularBand(S) and not IsTrivial(S);
gap> MultiplicativeZero(S);
Transformation( [ 1, 2, 1 ] )
gap> IsMultiplicativeZero(S, last);

These last two lines are nonsense; this rectangular band has no zero.

Additionally I have already removed an infinite loop which occurred in this case:

gap> S := Semigroup(Transformation( [ 1 ] ));;
gap> MultiplicativeZero(S);

Also perhaps this function could probably benefit from the newer MinimalIdeal code for transformations which is in progress.

Comments (12)

  1. James Mitchell repo owner

    I think the best solution to this is to change the method to the following:

    InstallMethod(MultiplicativeZero, "for an acting semigroup",
      if Size(MinimalDClass(S)) = 1 then 
        return Representative(MinimalDClass(S));
        return fail;

    and to make sure that the minimal D-class code is good as possible (i.e. uses the stuff you've been working on recently.

    What do you think? Is there some reason you didn't go down this route?

  2. wilfwilson reporter

    Yes, this is just what I was thinking of doing. I intend to do this.

    In my opinion fixing the bug was a separate issue from improving and re-writing it the function. This is why I closed the function after writing a quick fix.

  3. wilfwilson reporter

    I have decided on something slightly different.

    MinimalDClass now returns GreensDClassOfElementNC(S, RepresentativeOfMinimalIdeal(S)); as it should.

    However, calculating the size of a D-class can still take some time. So unless we already know that the size of the MinimalDClass, I take this approach in MultiplicativeZero:

    rep := RepresentativeOfMinimalIdeal(s);
    if ForAll(gens, x -> x * rep = rep and rep * x = rep) then
      return rep;
      return fail;
  4. Log in to comment