Skip to content

Commit

Permalink
Merge pull request #880 from james-d-mitchell/fix-view-inv-mono
Browse files Browse the repository at this point in the history
Fix ViewString method for inverse monoids without generators as an inverse semigroup/monoid
  • Loading branch information
markuspf authored Aug 10, 2016
2 parents 042402e + 8db6c8b commit 55d9ff2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/semigrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,27 @@ end);

# ViewString

InstallMethod(ViewString, "for a semigroup with generators",
InstallMethod(ViewString, "for a semigroup with semigroup generators",
[IsSemigroup and HasGeneratorsOfSemigroup], _ViewStringForSemigroups);

InstallMethod(ViewString, "for a monoid with generators",
InstallMethod(ViewString, "for a monoid with monoid generators",
[IsMonoid and HasGeneratorsOfMonoid], _ViewStringForSemigroups);

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

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

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

InstallMethod(ViewString, "for an inverse monoid with generators",
InstallMethod(ViewString,
"for an inverse monoid with inverse monoid generators",
[IsInverseMonoid and HasGeneratorsOfInverseMonoid],
_ViewStringForSemigroups);

Expand Down
12 changes: 12 additions & 0 deletions tst/testinstall/semigrp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,18 @@ gap> Size(S);
gap> S;
<inverse transformation semigroup of size 36, degree 5 with 3 generators>

# Check correct view method is used for inverse monoids without
# GeneratorsOfInverseSemigroup
gap> S := Monoid(Transformation([1, 2, 3, 4, 5, 6, 7, 7, 7]),
> Transformation([4, 6, 3, 6, 6, 6, 7, 7, 7]),
> Transformation([4, 5, 6, 1, 6, 6, 7, 7, 7]),
> Transformation([6, 6, 3, 1, 6, 6, 7, 7, 7]),
> Transformation([4, 6, 6, 1, 2, 6, 7, 7, 7]));;
gap> IsInverseSemigroup(S);
true
gap> S;
<inverse transformation monoid of size 18, degree 9 with 5 generators>

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

Expand Down

0 comments on commit 55d9ff2

Please sign in to comment.