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

Fix bug in IrredundantGeneratingSubset #999

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

reiniscirpons
Copy link
Collaborator

Running IrredundantGeneratingSubset with a set of 2 generators of a cyclic semigroup currently causes issues, e.g.

gap> IrredundantGeneratingSubset([Transformation([2, 1]), IdentityTransformation]);
Error, Usage: cannot create a semigroup with no generators ...
gap> IrredundantGeneratingSubset([Transformation([ 1, 1, 3, 1 ]), Transformation([3, 3, 1, 3 ])]);
Error, Usage: cannot create a semigroup with no generators ...

What seems to happen is that the generating set gets reduced to only have 1 generator, but for some reason the check for irredundancy still gets carried out, meaning that we attempt to generate a semigroup with empty generating set, hence the error.

My fix adds a condition in the if statement that causes the error. Not sure this addresses the underlying issue with the stopping logic of the function, but it does fix the error for the two examples above, happy for any further suggestions for fixes.

@james-d-mitchell james-d-mitchell merged commit 4c6ab89 into semigroups:main Feb 13, 2024
14 checks passed
@james-d-mitchell
Copy link
Collaborator

Nice one thanks @reiniscirpons

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.

2 participants