Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add string methods for inverse semigroups/monoids #882

Merged

Conversation

james-d-mitchell
Copy link
Contributor

There were no specific methods for String installed for semigroups that happen to be inverse semigroups but which fail to have generators as an inverse semigroup. For example, previously:

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);
"InverseSemigroup( ... )"

After this pull request:

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 ] ) ] )"

These methods apply to semigroups/monoids that do not necessarily
have GeneratorsOfInverseSemigroup/Monoid.
@codecov-io
Copy link

Current coverage is 49.11% (diff: 100%)

Merging #882 into master will increase coverage by 0.04%

@@             master       #882   diff @@
==========================================
  Files           422        422          
  Lines        228711     228715     +4   
  Methods        3447       3447          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits         112222     112327   +105   
+ Misses       116489     116388   -101   
  Partials          0          0          

Powered by Codecov. Last update 55d9ff2...af2ee30

@wilfwilson
Copy link
Member

This looks good to me.

@markuspf
Copy link
Member

Mhm. This looks correct (in that one can copy-and-paste the string to get a GAP object).

For future reference, could you expand why you don't print this as an InverseSemigroup? I assume there is a good reason.

@james-d-mitchell
Copy link
Contributor Author

There is no (unary) inverse operation for transformations, and so they cannot be created using InverseSemigroup or InverseMonoid. You cannot create a group out of arbitrary transformations for the same reason. So, it wouldn't be valid if it was InverseSemigroup instead of Semigroup.

@markuspf
Copy link
Member

I see. Going to merge this then.

@markuspf markuspf merged commit 04a34cc into gap-system:master Aug 17, 2016
@james-d-mitchell james-d-mitchell deleted the string-methods-inv-semi branch November 15, 2016 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants