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

changed an IsGeneratorsOfMagmaWithInverses method ... #4485

Merged

Conversation

ThomasBreuer
Copy link
Contributor

@ThomasBreuer ThomasBreuer commented May 11, 2021

... that deals with collections of IsMagmaByMultiplicationTableObj:
Really check that the given elements are invertible. Up to now, the method was wrong.

I stumbled over the problem in the context of pull request #4373 and issue #4480.
Here is an example.

gap> M:= MagmaByMultiplicationTable( [[1,1],[1,1]] );
<magma with 2 generators>
gap> elms:= Elements( M );;
gap> IsGeneratorsOfMagmaWithInverses( elms );
true
gap> List( elms, IsMultiplicativeElementWithInverse );
[ true, true ]
gap> List( elms, Inverse );
[ fail, fail ]

Note that the filter IsMultiplicativeElementWithInverse does not mean that the element in question necessarily has an inverse, see the documentation.

After the change, the method can still give a wrong answer if it is called in the case of nonassociative multiplication. Currently (see issue #4480) there is a discussion how to deal with this situation.

(We have quite a few correct methods for IsGeneratorsOfMagmaWithInverses; the default method prints a warning if it cannot return false. The interpretation is that one should provide a meaningful method for the concrete situation if one sees this warning. The method which is now to be changed serves the purpose to avoid the warning. Eventually it would be good to turn it into a safe method.)

... that deals with collections of `IsMagmaByMultiplicationTableObj`:
Really check that the given alements are invertible.

Up to now, the method was wrong.
After the change, it can still give a wrong answer
if it is called in the case of nonassociative multiplication.
Currently (see issue gap-system#4480) there is a discussoin how to deal
with this situation.
@ThomasBreuer ThomasBreuer added kind: bug: wrong result Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them topic: library release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels May 11, 2021
Copy link
Member

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a change for the better.

I think it would be nice if you added your (correct) example to a test file.

@ThomasBreuer ThomasBreuer merged commit aa88b61 into gap-system:master May 14, 2021
@ThomasBreuer ThomasBreuer deleted the TB_IsGeneratorsOfMagmaWithInverses branch May 14, 2021 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: wrong result Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants