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

IsomorphismPartialPermSemigroup/Monoid does not work for a perm group with 0 generators #1783

Closed
wilfwilson opened this issue Oct 19, 2017 · 0 comments · Fixed by #1784
Closed
Assignees
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them topic: library

Comments

@wilfwilson
Copy link
Member

wilfwilson commented Oct 19, 2017

Observed behaviour

Given a group with 0 generators, such as the symmetric group of degree 1:

gap> IsomorphismPartialPermSemigroup(SymmetricGroup(1));
Error, Usage: cannot create an inverse semigroup with no generators, at /Users/Wilf/GAP/lib/invsgp.gi:167 called from
InverseSemigroup( List( GeneratorsOfGroup( G ), function ( p )
        return AsPartialPerm( p, dom );
    end ) ) at /Users/Wilf/GAP/lib/semipperm.gi:377 called from
<function "unknown">( <arguments> )
gap> IsomorphismPartialPermMonoid(SymmetricGroup(1));
Error, Usage: cannot create an inverse monoid with no generators, at /Users/Wilf/GAP/lib/invsgp.gi:118 called from
InverseMonoid( List( GeneratorsOfGroup( G ), function ( p )
        return AsPartialPerm( p, dom );
    end ) ) at /Users/Wilf/GAP/lib/semipperm.gi:359 called from
<function "unknown">( <arguments> )

Expected behaviour

This should not trigger an error, and should work like this:

gap> IsomorphismPartialPermSemigroup(Group(()));
MappingByFunction( Group(()), <trivial partial perm group of rank 0 with
  1 generator>, function( p ) ... end, <Attribute "AsPermutation"> )
gap> IsomorphismPartialPermMonoid(Group(()));
MappingByFunction( Group(()), <trivial partial perm group of rank 0 with
  1 generator>, function( p ) ... end, <Attribute "AsPermutation"> )

You can't create an inverse semigroup from an empty list, so I'll fix this by having a special case.

@wilfwilson wilfwilson added kind: bug Issues describing general bugs, and PRs fixing them topic: library kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them labels Oct 19, 2017
@wilfwilson wilfwilson self-assigned this Oct 19, 2017
@wilfwilson wilfwilson changed the title IsomorphismPartialPermSemigroup does not work for a group with 0 generators IsomorphismPartialPermSemigroup/Monoid does not work for a group with 0 generators Oct 19, 2017
@wilfwilson wilfwilson changed the title IsomorphismPartialPermSemigroup/Monoid does not work for a group with 0 generators IsomorphismPartialPermSemigroup/Monoid does not work for a perm group with 0 generators Oct 19, 2017
wilfwilson added a commit to wilfwilson/gap that referenced this issue Oct 19, 2017
Previously, these methods encountered unexpected errors for perm
groups with 0 generators. This adds a special case for such groups.

Resolves gap-system#1783
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them topic: library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant