-
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 bug in MakeImagesInfoLinearGeneralMappingByImages
that could lead to errors resp. wrong results if multiplication with coefficients from the right is not defined resp. not commutative
#4482
Conversation
This fix for issue #383, or some alternative, is required by the XModAlg package |
Issue #383 is about "Fix version header dependency"... ?! |
Apologies, it is issue #4481 (number 383 of the open issues). |
MakeImagesInfoLinearGeneralMappingByImages
Thanks for spotting this. If you can see a way of reasonably doing this, could you please add a test (to either Ideally it would be a test that would fail/give an error/give the wrong answer in the current |
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.
Thank you, nice.
The test 2021-05-11-LeftModHom.tst has been added to tst/testbugfix, and all checks are still passing. |
Thanks, @cdwensley, for the fix. Yes, the ordering of arguments in the code line in question was wrong. I think that the bug can also lead to wrong results (not only to error messages) if one considers suitable row vector spaces over noncommutative rings. |
I think we need a different text for the release notes; So instead we should list documented functions that were directly (or indirectly?) affected by this |
How about "Fix for AlgebraGeneralMappingByImages when one of the algebras is generated by algebra homomorphisms."? (I've no idea how to change the "Text for release notes".) |
I have edited the text for the release notes, please check if it is sufficient now. |
That looks very thorough. |
MakeImagesInfoLinearGeneralMappingByImages
MakeImagesInfoLinearGeneralMappingByImages
that could lead to error if multiplying with coefficients from the right is not defined, and possibly wrongs result if this multiplication is defined but not commutative
MakeImagesInfoLinearGeneralMappingByImages
that could lead to error if multiplying with coefficients from the right is not defined, and possibly wrongs result if this multiplication is defined but not commutativeMakeImagesInfoLinearGeneralMappingByImages
that could lead to an error if multiplying with coefficients from the right is not defined, and possibly wrong results if this multiplication is defined but not commutative
MakeImagesInfoLinearGeneralMappingByImages
that could lead to an error if multiplying with coefficients from the right is not defined, and possibly wrong results if this multiplication is defined but not commutativeMakeImagesInfoLinearGeneralMappingByImages
that could lead to errors resp. wrong results if multiplication with coefficients from the right is not defined resp. not commutative
Description
This one-line change to
lib/vspchom.gi
attempts to fix issue #4481.The fix is just to change the order of vectors in
LinearCombination( x, maxi[2] );
Text for release notes
Fixed the construction of linear mappings by images in certain situations where it is essential that multiplying elements in the image with coefficients happens from the left, not from the right. (Note that multiplication from the left is assumed, but in many computations it does not make a difference.)
Before the fix, one got an error if multiplying with coefficients from the right is not defined, and one got a perhaps wrong result if this multiplication is defined but not commutative.
Examples of the error case can be constructed with algebras generated by algebra homomorphisms as images of the linear mapping.
(End of text for release notes)
Checklist for pull request reviewers
If your code contains kernel C code, run
clang-format
on it; thesimplest way is to use
git clang-format
, e.g. like this (don'tforget to commit the resulting changes):
usage of relevant labels
release notes: not needed
orrelease notes: to be added
bug
orenhancement
ornew feature
stable-4.X
add thebackport-to-4.X
labelbuild system
,documentation
,kernel
,library
,tests
runnable tests
lines changed in commits are sufficiently covered by the tests
adequate pull request title
well formulated text for release notes
relevant documentation updates
sensible comments in the code