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 unexpected errors in recog and genss by improving GroupWithMemory when given compressed matrices over small fields #5907

Merged

Conversation

fingolfin
Copy link
Member

... at least if the wrapped matrixobj had it set (which really should always be the case).

This fixes a nasty long-standing issue in genss / orb / recog where DefaultScalarDomainOfMatrixList returned to small a field when called on a list of matrixobj-with-memory. This then caused GroupWithGenerators to rewrite the generators over a smaller field, which then lead genss to produce (compressed) vectors for use as base points in the orbit algorithm over the smaller field; and a matching hash function. When later generators got added that really needed the larger field, everything exploded in confusing ways.

This issue has been a thorn in my side for years, but today after several hours of debugging I finally tracked it down.

... at least if the wrapped matrixobj had it set (which really should
always be the case).

This fixes a nasty long-standing issue in genss / orb / recog where
`DefaultScalarDomainOfMatrixList` returned to small a field when called on a
list of matrixobj-with-memory. This then caused `GroupWithGenerators` to
rewrite the generators over a smaller field, which then lead `genss` to
produce (compressed) vectors for use as base points in the orbit algorithm
over the smaller field; and a matching hash function. When later generators
got added that really needed the larger field, everything exploded in
confusing ways.
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes backport-to-4.14 labels Jan 17, 2025
@fingolfin fingolfin changed the title Improve GroupWithMemory when the input are compressed matrices over small fields, fixing unexpected errors in recog and genss Fix unexpected errors in recog and genss by improving GroupWithMemory when given compressed matrices over small fields Jan 17, 2025
Copy link
Contributor

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

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

Yes, the wrapped object and the underlying matrix must have the same behaviour.

(In GAP 4.14.0, GroupWithMemory did not work at all in this situation because GroupWithGenerators stripped the memory. This has been fixed just in #5874.)

Co-authored-by: Thomas Breuer <sam@math.rwth-aachen.de>
@fingolfin
Copy link
Member Author

Yes indeed, PR #5874 is a necessary first step in the fix. It took me far too long to understand that, in the past I was looking in the completely wrong places when i tried to understand the issues I was seeing in group recognition :-(

@fingolfin fingolfin enabled auto-merge (squash) January 17, 2025 09:36
@fingolfin fingolfin disabled auto-merge January 17, 2025 09:36
@fingolfin fingolfin enabled auto-merge (squash) January 17, 2025 09:36
@fingolfin fingolfin merged commit 0eda22b into gap-system:master Jan 17, 2025
33 checks passed
@fingolfin fingolfin deleted the mh/HasBaseDomain-for-matrix-with-memory branch January 17, 2025 12:13
@fingolfin
Copy link
Member Author

Backported to stable-4.14 in fad9aad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.14-DONE kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants