-
Notifications
You must be signed in to change notification settings - Fork 161
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 HighestWeightModule for Lie algebras in certain cases #2617
Fix HighestWeightModule for Lie algebras in certain cases #2617
Conversation
This is a regression in GAP 4.9 compared to GAP 4.8. As far as I can tell, it is caused by the new sort functions; for some reason I don't quite understand, the new sort ends up comparing an element to itself. But the custom `lexord` sorting function used by `HighestWeightModule` was not prepared to deal with two equal (much less identical) inputs. Fixes gap-system#2491
@ChrisJefferson I really wonder why the sorting function ends up comparing an element to itself (the input is free of duplicates; the comparison function really receives the same (identical) object twice as input. |
Codecov Report
@@ Coverage Diff @@
## master #2617 +/- ##
==========================================
+ Coverage 74.8% 74.81% +<.01%
==========================================
Files 479 479
Lines 242251 242193 -58
==========================================
- Hits 181206 181185 -21
+ Misses 61045 61008 -37
|
Note that PR #2621 also fixes this issue, but I really want this one in, too, as arguably the comparator is wrong otherwise (we could have to equal but non-identical entries in a list being sorted, after all... OK, maybe not in the code being modified here, but...) |
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 fine to me, although I do not understand why it worked before . . .
It worked before because the comparator never was called with two inputs that happened to be equal. But this changed when we changed our sorting algo. |
This is a regression in GAP 4.9 compared to GAP 4.8. As far as I can tell, it
is caused by the new sort functions; for some reason I don't quite
understand, the new sort ends up comparing an element to itself. But the
custom
lexord
sorting function used byHighestWeightModule
was notprepared to deal with two equal (much less identical) inputs.
Fixes #2491
I suggest to backport this to stable-4.9 -- it can wait for GAP 4.9.3, though, if adding it now is inconvenient.