Skip to content

Miscellaneous fixes concerning vector and matrix objects#6369

Open
ThomasBreuer wants to merge 6 commits intogap-system:masterfrom
ThomasBreuer:TB_matobj_fixes
Open

Miscellaneous fixes concerning vector and matrix objects#6369
ThomasBreuer wants to merge 6 commits intogap-system:masterfrom
ThomasBreuer:TB_matobj_fixes

Conversation

@ThomasBreuer
Copy link
Copy Markdown
Contributor

This pull request consists of those changes from #6342 that are bugfixes.

  • add checks to NewVector, NewMatrix for the GF(2) and 8 bit representations, in order to catch fail results,
  • add a String method for the rings Integers mod n,
  • fix the default OneMutable method for IsMatrixObj (test that the input is square, as for list-of-lists matrices),
  • check the input list for IsPlistRep in MakeIsPlistVectorRep, and let NewVector turn the input to IsPlistRep if necessary (in fact, it had been possible to cause a segmentation fault by calling AddRowVector with two input vectors created from ranges),
  • forbid assignments into a IsPlistVectorRep vector beyond its length.

Test that the input is square, as for list-of-lists matrices.
- check the input list for `IsPlistRep` in `MakeIsPlistVectorRep`,
  let `NewVector` turn the input to `IsPlistRep` if necessary
- forbid assignments into a `IsPlistVectorRep` vector beyond its length
Conceptually, the solution must be in the same representation
as the given vector.
(Let us see which other bugs will come to the surface now.)
@ThomasBreuer ThomasBreuer added kind: bug Issues describing general bugs, and PRs fixing them 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 labels May 6, 2026
@ThomasBreuer ThomasBreuer requested a review from fingolfin May 6, 2026 13:21
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 kind: bug Issues describing general bugs, and PRs fixing them release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant