fix a problem with a new feature for matrix groups#6232
fix a problem with a new feature for matrix groups#6232ThomasBreuer wants to merge 11 commits intogap-system:masterfrom
Conversation
|
repeated failures due to problems like |
- add a description of the cache `FULLGLNICOCACHE` in the code; it is used only by `NicomorphismFFMatGroupOnFullSpace` - change the keys of `FULLGLNICOCACHE`: take the field of the matrix entries into account (not only its size), take the `ConstructingFilter` of the matrices into account - in `NicomorphismFFMatGroupOnFullSpace`, deal with special cases of matrices in `IsBlockMatrixRep` (which have no `ConstructingFilter`) and in `Is8BitMatrixRep` in the situation that the group itself lives over `GF(2)` - in order to admit the action of `IsMatrixObj` matrices on vectors supported by GAP's `Enumerator`s of vector spaces, add a `\^` method that `Unpack`s the matrix object (Eventually we want to avoid this overhead, but then we need `Enumerator`s consisting of vector objects corresponding to the matrix objects.) - add `Matrix` calls in the function that computes preimages under an action homomorphism with `Source` a matrix group, in order to support matrix group elements of prescribed kinds of `IsMatrixObj`. - add tests for the new supported situations (most of the changes were actually forced by already available tests)
- introduce `NormedRowVectors_internal( F, base )`, and `AsListOfFreeLeftModule_internal( F, base, zero )`, in order to admit `IsVectorObj`s in `base` without supporting the whole vector space machinery for these objects - introduce `ExternalSet( G )` for matrix groups `G`, meaning the natural `G`-set (an undocumented method for permutation groups `G` was already available) - change `NicomorphismFFMatGroupOnFullSpace` such that we can act with the `IsMatrixObj` matrices on their `IsVectorObj` vectors, without unpacking the matrices - support `IsMatrixObj` matrices in the `Random` methods for GL and SL
4328b09 to
021e71e
Compare
fingolfin
left a comment
There was a problem hiding this comment.
Unfortunately I also missed this one :-(
| and ( IsSubset( F, BaseDomain( mat ) ) or | ||
| ForAll( Unpack( mat ), row -> IsSubset( F, row ) ) ); |
There was a problem hiding this comment.
Maybe add a comment that explains why the "or" case is needed? I.e., because the basedomain may be larger than necessary to represent elements, and we consider explicit conversion an option...
Though... thinking about it... how would one then "coerce" mat into an actual element of G (which can e.g. be multiplied with One(G) ) ? We don't have any tooling for that in GAP so far, do we? Because we don't need to, because all matrices (over a given common base field) are expected to be always "compatible" by some magic...
There was a problem hiding this comment.
The real question is what \in for a matrix (object) and a matrix group shall mean:
Can the elements of the group be represented over different base domains?
If yes then arithmetic operations in the group are more expensive, if not then we are free to define a base domain for the group, and we can define \in such that the base domain of the matrix and the group must fit.
Concerning the coercion, I thought that Matrix( filt, R, M ) is intended for that purpose:
M is the given matrix which shall be turned into "a valid group element", R is the base domain of G or of One( G ), and filt is ConstructingFilter( One( G ) ).
lib/grpffmat.gi
Outdated
| m:= ZeroMatrix( d, d, m ); | ||
| repeat | ||
| Randomize( rs, m ); | ||
| det:= DeterminantMat( m ); | ||
| until not IsZero( det ); |
There was a problem hiding this comment.
Should we perhaps also have a method for RandomInvertibleMat which takes filt as well?
RandomInvertibleMat( rs, filt, d, F )
There was a problem hiding this comment.
Currently RandomMat and RandomInvertibleMat aren't operations but plain functions.
So the default procedure will be to introduce tag based operations RandomMatrix and RandomInvertibleMatrix for which the new methods (with an optional filter or example matrix as argument) can get installed. (This is analogous to e.g. DiagonalMatrix.)
This way, we avoid the creation of intermediate objects.
and fix the `RankMat` method for `IsPlistMatrixRep`
| InstallTagBasedMethod( RandomInvertibleMatrix, | ||
| function( filt, rs, R, m ) | ||
| local mat, det; | ||
|
|
||
| mat:= ZeroMatrix( filt, R, m, m ); | ||
| repeat | ||
| Randomize( rs, mat ); | ||
| det:= DeterminantMat( mat ); | ||
| until not IsZero( det ); |
There was a problem hiding this comment.
Why not using random upper-triangular matrix and random lower-triangular matrices such that both
Then, random
There was a problem hiding this comment.
Does this yield a uniform distribution?
Due to new examples in the chapter about matrices, the number of `Random` calls has increased, thus it is not surprising that some outputs involving such calls have changed.
|
Two kinds of test failures:
Update on the second kind of failures: |
|
Another point: Currently the determinant of a matrix computed with The |
These function conflict with forthcoming changes in GAP, and since they are undocumented, I'm just removing them in this commit. See: gap-system/gap#6232 semigroups#1158
These function conflict with forthcoming changes in GAP, and since they are undocumented, I'm just removing them in this commit. See: gap-system/gap#6232 #1158
These function conflict with forthcoming changes in GAP, and since they are undocumented, I'm just removing them in this commit. See: gap-system/gap#6232 semigroups#1158
These function conflict with forthcoming changes in GAP, and since they are undocumented, I'm just removing them in this commit. See: gap-system/gap#6232 #1158
(resolves #6222)
FULLGLNICOCACHEin the code; it is used only byNicomorphismFFMatGroupOnFullSpaceFULLGLNICOCACHE: take the field of the matrix entries into account (not only its size), take theConstructingFilterof the matrices into accountNicomorphismFFMatGroupOnFullSpace, deal with special cases of matrices inIsBlockMatrixRep(which have noConstructingFilter) and inIs8BitMatrixRepin the situation that the group itself lives overGF(2)Matrixcalls in the function that computes preimages under an action homomorphism withSourcea matrix group, in order to support matrix group elements of prescribed kinds ofIsMatrixObj.\inmethods forGLandSLgroups where the first argument is inIsMatrixObj(such that no nice monomorphism is used in this situation)NormedRowVectors_internal( F, base )andAsListOfFreeLeftModule_internal( F, base, zero ),in order to admit
IsVectorObjs inbasewithout supporting the whole vector space machinery for these objectsExternalSet( G )for matrix groupsG, meaning the naturalG-set (an undocumented method for permutation groupsGwas already available)NicomorphismFFMatGroupOnFullSpacesuch that we can act with theIsMatrixObjmatrices on theirIsVectorObjvectors, without unpacking the matricesIsMatrixObjmatrices in theRandommethods for GL and SL(Some of the changes were forced by the fact that functionality for the intended new tests was missing.
In fact the list of known missing functionality is rather growing this way. Issue #6241 was also found just by trying to add tests. Until this problem is fixed, the current pull request deals only partially with the ideas from #6234.)