Skip to content

Commit

Permalink
attr: resolve Issue #868
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Sep 17, 2022
1 parent 733b2d1 commit fd61d2b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gap/attributes/attr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ function(S)
return DClasses(S){DigraphSources(D)};
end);

InstallMethod(MaximalDClasses, "for a finite monoid as semigroup",
[IsFinite and IsMonoidAsSemigroup],
InstallMethod(MaximalDClasses,
"for a finite monoid as semigroup with mult. neutral elt",
[IsFinite and IsMonoidAsSemigroup and HasMultiplicativeNeutralElement],
S -> [DClass(S, MultiplicativeNeutralElement(S))]);

InstallMethod(MaximalLClasses,
Expand Down
11 changes: 11 additions & 0 deletions tst/standard/attributes/attr.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2113,6 +2113,17 @@ gap> MaximalLClasses(S);
gap> MaximalRClasses(S);
[ <Green's R-class: PBR([ [ -1 ] ], [ [ 1 ] ])> ]

# Issue 868 - IsMonoidAsSemigroup assumed HasMultiplicativeNeutralElement
gap> S := SemigroupByMultiplicationTable(
> [[1, 1, 1, 1, 5, 6],
> [1, 1, 1, 2, 5, 6],
> [3, 3, 3, 3, 5, 6],
> [1, 2, 3, 4, 5, 6],
> [5, 5, 5, 5, 5, 5],
> [6, 6, 6, 6, 6, 6]]);;
gap> M := AsMonoid(IsFpMonoid, M);
<fp monoid with 5 generators and 25 relations of length 80>

# SEMIGROUPS_UnbindVariables
gap> Unbind(D);
gap> Unbind(G);
Expand Down

0 comments on commit fd61d2b

Please sign in to comment.