Problems when multiplying a matrix object with a matrix#6240
Open
ThomasBreuer wants to merge 5 commits intogap-system:masterfrom
Open
Problems when multiplying a matrix object with a matrix#6240ThomasBreuer wants to merge 5 commits intogap-system:masterfrom
ThomasBreuer wants to merge 5 commits intogap-system:masterfrom
Conversation
`IsGF2MatrixRep` and `Is8BitMatrixRep` describe matrices that are in `IsMatrix and IsMatrixObj`. Thus these matrices must obey the rules of list arithmetics, in particular the multiplication of these matrices with other matrices in `IsMatrix` is defined. Up to now, the methods that are chosen for such matrix multiplications are the generic methods. Now we install `PROD_LIST_SCL_DEFAULT` explicitly as a method. First of all, this removes some overhead. (Note that such multiplications really occur in practice, as one can see in the testfiles: For example, construct a matrix group with `CyclicGroup` or `GL`; the generators are in `IsGF2MatrixRep` or `Is8BitMatrixRep` if possible, due to `ImmutableMatrix`. Then construct a right coset of this group by prescribing a representative that is in `IsPlistRep`, and do some computations with it; multiplications "of mixed type" will happen.) Second, this yields high ranked methods such that it will be possible to install `\*` methods of lower rank that signal an error if one tries to multiply a *non-list* `IsMatrixObj` with an `IsMatrix`.
The multiplication of an `IsMatrixObj` that is *not* in `IsMatrix` with an `IsMatrix` shall not be allowed, the result is not defined (and the results without the new methods can be surprising).
Up to now, `ViewString` and `DisplayString` returned something that makes sense only for objects in `MatrixObj`, not for `IsMatrix`. (I had introduced this bug in 2021, apparently the two functions are not used, otherwise the problem would have been observed earlier.)
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
addresses #6221
The idea is to catch the multiplication of a non-list
IsMatrixObjwith anIsMatrixby dedicated methods for\*.For that, new
\*methods for the multiplication ofIsGF2MatrixRepwith anIsMatrixand ofIs8BitMatrixRepwithIsMatrixget installed; this is anyhow a good idea because these multiplications were up to now executed by the default list arithmetic.Besides that, the
DisplayStringandViewStringmethods forIsMatrixObjwere fixed; up to now, they were applicable also forIsMatrix.