Skip to content

Commit

Permalink
Add another ViewString method for inverse semigroups
Browse files Browse the repository at this point in the history
This commit introduces a method for ViewString for semigroups satisfying
IsInverseSemigroup and HasGeneratorsOfSemigroup.  The rank of the filter
IsSemigroup and HasGeneratorsOfSemigroup is 14, whereas the rank of
IsInverseSemigroup is 21. Previously, if a semigroup learned that it was
inverse but did not have GeneratorsOfInverseSemigroup, then the default
ViewString method for IsInverseSemigroup was used. With this commit the
more elaborate _ViewStringForSemigroups is used instead.
  • Loading branch information
james-d-mitchell committed Jan 8, 2016
1 parent e50f35e commit e96c958
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/semigrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ InstallMethod(ViewString, "for a semigroup with generators",
InstallMethod(ViewString, "for a monoid with generators",
[IsMonoid and HasGeneratorsOfMonoid], _ViewStringForSemigroups);

InstallMethod(ViewString, "for an inverse semigroup with generators",
[IsInverseSemigroup and HasGeneratorsOfSemigroup],
_ViewStringForSemigroups);

InstallMethod(ViewString, "for an inverse semigroup with generators",
[IsInverseSemigroup and HasGeneratorsOfInverseSemigroup],
_ViewStringForSemigroups);
Expand Down
13 changes: 13 additions & 0 deletions tst/testinstall/semigrp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,19 @@ false
gap> IsEmpty(T);
true

# Check for correct ViewString method for IsInverseSemigroup and
# HasGeneratorsOfSemigroup
gap> S := Semigroup(Transformation([4, 3, 5, 5, 5]),
> Transformation([4, 1, 5, 2, 5]),
> Transformation([5, 5, 2, 1, 5]));
<transformation semigroup of degree 5 with 3 generators>
gap> IsInverseSemigroup(S);
true
gap> Size(S);
36
gap> S;
<inverse transformation semigroup of size 36, degree 5 with 3 generators>

#
gap> STOP_TEST( "semigrp.tst", 1060000);

Expand Down

0 comments on commit e96c958

Please sign in to comment.