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

Collection of fixes for isomorphisms from semigroup to monoids #1112

Merged
merged 11 commits into from
Feb 1, 2017

Conversation

james-d-mitchell
Copy link
Contributor

Please make sure that this pull request:

  • is submitted to the correct branch (the stable branch is only for bugfixes)
  • contains an accurate description of changes for the release notes below
  • provides new tests or relies on existing ones
  • correctly refers to other issues and related pull requests

Tick all what applies to this pull request

  • Adds new features
  • Improves and extends functionality
  • Fixes bugs that could lead to crashes
  • Fixes bugs that could lead to incorrect results
  • Fixes bugs that could lead to break loops

Write below the description of changes (for the release notes)

This PR contains a number of fixes relating to isomorphisms between semigroups and monoids. In addition, it changes AsMonoid and AsSemigroup to operations, for future compatibility with the Semigroups package. There were numerous bugs in this code, and duplicated code. This PR cleans this up, fixes all these bugs, and adds numerous tests.

james-d-mitchell and others added 11 commits January 27, 2017 13:55
Namely the methods for IsomorphismTransformationMonoid and
IsomorphismPartialPermMonoid so that they always return monoids.
For semigroups/monoids of partial perms. Previously the inverse of the
returned isomorphisms was not an inverse.
The previous methods for IsomorphismTransformationMonoid/Semigroups
didn't work.
These methods were only trivially different, so I combined them into one method.
Remove redundant methods, add missing methods, update test output, and
correct the documentation.
Also add comments to untested bits of the code.
This is to allow more methods to be installed, for example, so that
things like: AsSemigroup(IsPartialPermSemigroup, S) can be used.

Also updated the manual entry for AsMonoid so that it is more
permissive, so that not only objects in the category IsMonoid can be the
argument of AsMonoid.
for a transformation semigroup, so that it checks if the argument is
mathematically a monoid not that it is in the category IsMonoid.
@codecov-io
Copy link

Current coverage is 57.06% (diff: 98.97%)

Merging #1112 into master will increase coverage by 0.17%

@@             master      #1112   diff @@
==========================================
  Files           433        433          
  Lines        224666     224710    +44   
  Methods        3427       3427          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits         127832     128241   +409   
+ Misses        96834      96469   -365   
  Partials          0          0          
Diff Coverage File Path
••••••••• 98% lib/semipperm.gi
••••••••• 99% lib/semitran.gi

Powered by Codecov. Last update 8d2ca93...99ce86c

@markuspf markuspf merged commit 0a946f0 into gap-system:master Feb 1, 2017
dom := Set(set * InversesOfSemigroupElement(S, x)[1]);
return PartialPermNC(List(dom, y -> Position(set, y)),
List(List(dom, y -> y * x),
y -> Position(set, y)));
end;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is annoying to read. As far as I can tell, you haven't actually changed anything in this part of the patch, just renamed variables and moved code around?

function(s)
return MagmaIsomorphismByFunctionsNC(s, s, IdFunc, IdFunc);
function(S)
return MagmaIsomorphismByFunctionsNC(S, S, IdFunc, IdFunc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, why rename?

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