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 argument checking in FreeSemigroup, prevent creation of inconsistent objects #4372

Merged
merged 1 commit into from
Apr 21, 2021

Commits on Apr 11, 2021

  1. Check arguments to FreeSemigroup more thoroughly

    See gap-system#1385
    
    It was previously possible to use `FreeSemigroup` to create a
    seemingly free semigroup with zero generators (rank zero), but
    this object believed itself to be infinite, and to contain elements
    (such a semigroup would be empty). Note that free semigroups of rank
    zero are not documented as being supported.
    
    Some other ways that one might want to create free semigroups of
    rank zero led to unhelpful error messages, and in general, the
    argument checking of `FreeSemigroup` was not very thorough and gave
    sometimes unhelpful error messages.
    
    In this commit, I overhaul the way that `FreeSemigroup` checks its
    arguments, in particular always disallowing a free semigroup of rank
    zero, and overall making the checking more robust, and making the error
    messages more descriptive.
    
    This addresses the _bugs_ reported in issue gap-system#1385, although it does not
    address the _feature request_ in that issue to support free semigroups of
    rank zero.
    
    I also took the opportunity to fix a typo in the documentation
    for `FreeSemigroup`, and to make a clarification. Further improvements
    could be made to this documentation, but I leave that to the future.
    wilfwilson committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    0f122d9 View commit details
    Browse the repository at this point in the history