-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from james-d-mitchell/string-methods-inv-semi
Add string methods for inverse semigroups/monoids
- Loading branch information
Showing
2 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
############################################################################# | ||
## | ||
#W invsgp.tst GAP library James D. Mitchell | ||
## | ||
## | ||
#Y Copyright (C) 2016 | ||
## | ||
|
||
gap> START_TEST("invsgp.tst"); | ||
|
||
# Test String method for inverse semigroup with generators as a semigroup | ||
gap> S := Semigroup(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> String(S); | ||
"Semigroup( [ 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> S = EvalString(String(S)); | ||
true | ||
|
||
# Test String method for inverse monoid with generators as a monoid | ||
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> IsInverseMonoid(S); | ||
true | ||
gap> String(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> S = EvalString(String(S)); | ||
true | ||
|
||
# Test string method for inverse monoid with inverse monoid generators | ||
gap> S := InverseMonoid(PartialPerm([1, 2, 3]), PartialPerm([1], [2]));; | ||
gap> String(S); | ||
"InverseMonoid( [ PartialPermNC( [ 1, 2, 3 ], [ 1, 2, 3 ] ), PartialPermNC( [ \ | ||
1 ], [ 2 ] ) ] )" | ||
gap> S = EvalString(String(S)); | ||
true | ||
|
||
# Test string method for inverse semigroup with inverse semigroup generators | ||
gap> S := InverseSemigroup(PartialPerm([1, 2, 3]), PartialPerm([1], [2]));; | ||
gap> String(S); | ||
"InverseMonoid( [ PartialPermNC( [ 1, 2, 3 ], [ 1, 2, 3 ] ), PartialPermNC( [ \ | ||
1 ], [ 2 ] ) ] )" | ||
gap> S = EvalString(String(S)); | ||
true | ||
|
||
# | ||
gap> STOP_TEST( "invsgp.tst", 1090000); |