-
Notifications
You must be signed in to change notification settings - Fork 160
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 MagmaWith[One|Inverses] "no method found" errors #1798
Fix MagmaWith[One|Inverses] "no method found" errors #1798
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1798 +/- ##
==========================================
+ Coverage 62.8% 62.92% +0.12%
==========================================
Files 968 968
Lines 294774 294058 -716
Branches 13026 12963 -63
==========================================
- Hits 185130 185043 -87
+ Misses 106845 106216 -629
Partials 2799 2799
|
@gwhitney Hi there, thanks for your report, even including a fix! Very much appreciated. I took the liberty of slightly editing your report, and in particular, of inlining the two transcripts. Ideally, if you feel up to it, you could use your "corrected" transcript as basis for a proper test which ensures that the bug will not resurface later on, by adding a new That would help us safe some effort (if you cannot or do not want to do it, one of us will have to do it, which means it will take longer to process this pull request). |
OK, hopefully that does it; let me know if there's any other way I can facilitate this patch. Best, Glen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks clearly correct to me.
The current master version of GAP has the following bug: (otherwise unreported, please let me know if I should have opened an issue before submitting this pull request)
The 2-argument forms of
MagmaWithOne
andMagmaWithInverses
typically do not (perhaps never) succeed as documented, but rather report "no method found" errors. See the following gap transcript for a simple example of this behavior:Checking the code in
lib/magma.gi
, the difficulty is clear: in the portions of the code for the "#family plus list of generators" alternative for the arguments to both of these functions, the first argument is correctly checked to be a family, but then the first argument, rather than the second, is checked to be a list. Since no family is a list, that branch of the code is never taken, and it falls through to the "# generators" option for the arguments, eventually failing because a family is not a sensible generator for a magma.The submitted two-character change corrects the code to check the second argument in these situations for being a list. The following log shows the transcript of the same commands executed on the corrected code; they succeed as expected: