Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/grpffmat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonym( "IsFFEMatrixGroup", IsFFECollCollColl and IsMatrixGroup );
DeclareCategory( "IsFFEMatrixGroup", IsMatrixGroup );
InstallTrueMethod( IsFFEMatrixGroup, IsFFECollCollColl and IsMatrixGroup );


#############################################################################
Expand Down
3 changes: 2 additions & 1 deletion lib/grpmat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
## </ManSection>
## <#/GAPDoc>
##
DeclareSynonym( "IsMatrixGroup", IsRingElementCollCollColl and IsGroup );
DeclareCategory( "IsMatrixGroup", IsGroup );
InstallTrueMethod( IsMatrixGroup, IsRingElementCollCollColl and IsGroup ); # TODO

#############################################################################
##
Expand Down
36 changes: 36 additions & 0 deletions lib/matobj1.gd
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,42 @@ DeclareCategory( "IsMatrixObj", IsMatrixOrMatrixObj );
DeclareCategory( "IsRowListMatrix", IsMatrixObj );



#############################################################################
##
# Two filters to speed up some methods:
DeclareFilter( "IsIntVector" ); # TODO: replace this legacy filter from matobjplist.gi with something better
DeclareFilter( "IsFFEVector" );

DeclareCategory( "IsFFEVectorObj", IsVectorObj );
DeclareCategory( "IsCyclotomicVectorObj", IsVectorObj );

DeclareCategory( "IsFFEMatrixOrMatrixObj", IsMatrixOrMatrixObj );
DeclareSynonym( "IsFFEMatrix", IsFFEMatrixOrMatrixObj and IsMatrix );
DeclareSynonym( "IsFFEMatrixObj", IsFFEMatrixOrMatrixObj and IsMatrixObj );
# or maybe
# DeclareProperty( "IsFFEMatrix", IsMatrix );
# DeclareProperty( "IsFFEMatrixObj", IsMatrixObj );

DeclareCategory( "IsCyclotomicMatrixOrMatrixObj", IsMatrixOrMatrixObj );
DeclareSynonym( "IsCyclotomicMatrix", IsCyclotomicMatrixOrMatrixObj and IsMatrix );
DeclareSynonym( "IsCyclotomicMatrixObj", IsCyclotomicMatrixOrMatrixObj and IsMatrixObj );
# or maybe have them be properties with methods so users are not confused ?!?
# DeclareProperty( "IsCyclotomicMatrix", IsMatrix );
# DeclareProperty( "IsCyclotomicMatrixObj", IsMatrixObj );


InstallTrueMethod( IsFFEMatrixOrMatrixObj, IsFFECollColl and IsMatrix );
InstallTrueMethod( IsCyclotomicMatrixOrMatrixObj, IsCyclotomicCollColl and IsMatrix );


DeclareCategoryCollections( "IsFFEMatrixObj" );
DeclareCategoryCollections( "IsCyclotomicMatrixObj" );

#DeclareCategoryCollections( "IsFFE" );
#DeclareCategoryCollections( "IsFFECollection" );


#############################################################################
##
#A BaseDomain( <vector> )
Expand Down
4 changes: 0 additions & 4 deletions lib/matobjplist.gd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,3 @@ BindGlobal( "ROWSPOS", 4 );
#BindGlobal( "BDPOS", 1 ); # see above
BindGlobal( "ELSPOS", 2 );

# Two filters to speed up some methods:
DeclareFilter( "IsIntVector" );
DeclareFilter( "IsFFEVector" );

68 changes: 34 additions & 34 deletions lib/matrix.gd
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ DeclareSynonym( "DiagonalOfMat", DiagonalOfMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "BaseMat", IsMatrix );
DeclareAttribute( "BaseMat", IsMatrixOrMatrixObj );

#############################################################################
##
Expand All @@ -255,7 +255,7 @@ DeclareAttribute( "BaseMat", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "BaseMatDestructive", [ IsMatrix ] );
DeclareOperation( "BaseMatDestructive", [ IsMatrixOrMatrixObj ] );

#############################################################################
##
Expand All @@ -277,7 +277,7 @@ DeclareOperation( "BaseMatDestructive", [ IsMatrix ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrix );
DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrixOrMatrixObj );


#############################################################################
Expand All @@ -304,7 +304,7 @@ DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "DefaultFieldOfMatrix", IsMatrix );
DeclareAttribute( "DefaultFieldOfMatrix", IsMatrixOrMatrixObj );


#############################################################################
Expand All @@ -328,7 +328,7 @@ DeclareAttribute( "DefaultFieldOfMatrix", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "DepthOfUpperTriangularMatrix", IsMatrix );
DeclareAttribute( "DepthOfUpperTriangularMatrix", IsMatrixOrMatrixObj );


#############################################################################
Expand Down Expand Up @@ -435,7 +435,7 @@ DeclareSynonym( "DeterminantMatDivFree", DeterminantMatrixDivFree );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "DimensionsMat", IsMatrix );
DeclareAttribute( "DimensionsMat", IsMatrixOrMatrixObj );


#############################################################################
Expand Down Expand Up @@ -482,7 +482,7 @@ DeclareAttribute( "DimensionsMat", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "ElementaryDivisorsMat", [IsRing,IsMatrix] );
DeclareOperation( "ElementaryDivisorsMat", [IsRing, IsMatrixOrMatrixObj] );
DeclareGlobalFunction( "ElementaryDivisorsMatDestructive" );

#############################################################################
Expand Down Expand Up @@ -555,7 +555,7 @@ DeclareGlobalFunction( "ElementaryDivisorsMatDestructive" );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "ElementaryDivisorsTransformationsMat", [IsRing,IsMatrix] );
DeclareOperation( "ElementaryDivisorsTransformationsMat", [IsRing, IsMatrixOrMatrixObj] );
DeclareGlobalFunction( "ElementaryDivisorsTransformationsMatDestructive" );

#############################################################################
Expand All @@ -572,7 +572,7 @@ DeclareGlobalFunction( "ElementaryDivisorsTransformationsMatDestructive" );
## </Description>
## </ManSection>
##
DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrix ] );
DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrixOrMatrixObj ] );


#############################################################################
Expand All @@ -598,8 +598,8 @@ DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrix ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "NullspaceMat", IsMatrix );
DeclareAttribute( "TriangulizedNullspaceMat", IsMatrix );
DeclareAttribute( "NullspaceMat", IsMatrixOrMatrixObj );
DeclareAttribute( "TriangulizedNullspaceMat", IsMatrixOrMatrixObj );


#############################################################################
Expand Down Expand Up @@ -638,8 +638,8 @@ DeclareAttribute( "TriangulizedNullspaceMat", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "NullspaceMatDestructive", [ IsMatrix and IsMutable] );
DeclareOperation( "TriangulizedNullspaceMatDestructive", [ IsMatrix and IsMutable] );
DeclareOperation( "NullspaceMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );
DeclareOperation( "TriangulizedNullspaceMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );


#############################################################################
Expand Down Expand Up @@ -711,7 +711,7 @@ DeclareOperation( "Eigenvalues", [ IsRing, IsMatrixOrMatrixObj ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "Eigenspaces", [ IsRing, IsMatrix ] );
DeclareOperation( "Eigenspaces", [ IsRing, IsMatrixOrMatrixObj ] );

#############################################################################
##
Expand All @@ -727,7 +727,7 @@ DeclareOperation( "Eigenspaces", [ IsRing, IsMatrix ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "Eigenvectors", [ IsRing, IsMatrix ] );
DeclareOperation( "Eigenvectors", [ IsRing, IsMatrixOrMatrixObj ] );


#############################################################################
Expand Down Expand Up @@ -858,7 +858,7 @@ DeclareSynonymAttr( "RankMatDestructive", RankMatrixDestructive );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "SemiEchelonMat", IsMatrix );
DeclareAttribute( "SemiEchelonMat", IsMatrixOrMatrixObj );

#############################################################################
##
Expand All @@ -882,7 +882,7 @@ DeclareAttribute( "SemiEchelonMat", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrix and IsMutable] );
DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );


#############################################################################
Expand Down Expand Up @@ -919,7 +919,7 @@ DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrix and IsMutable] );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "SemiEchelonMatTransformation", IsMatrix );
DeclareAttribute( "SemiEchelonMatTransformation", IsMatrixOrMatrixObj );

#############################################################################
##
Expand All @@ -935,7 +935,7 @@ DeclareAttribute( "SemiEchelonMatTransformation", IsMatrix );
## </ManSection>
##
DeclareOperation( "SemiEchelonMatTransformationDestructive", [
IsMatrix and IsMutable ] );
IsMatrixOrMatrixObj and IsMutable ] );


#############################################################################
Expand Down Expand Up @@ -1067,7 +1067,7 @@ DeclareSynonym( "MutableTransposedMat", TransposedMatMutable ); # needed?
## </Description>
## </ManSection>
##
DeclareOperation( "MutableTransposedMatDestructive", [IsMatrix and IsMutable] );
DeclareOperation( "MutableTransposedMatDestructive", [IsMatrixOrMatrixObj and IsMutable] );


#############################################################################
Expand Down Expand Up @@ -1095,7 +1095,7 @@ DeclareOperation( "MutableTransposedMatDestructive", [IsMatrix and IsMutable] );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "TransposedMatDestructive", [ IsMatrix ] );
DeclareOperation( "TransposedMatDestructive", [ IsMatrixOrMatrixObj ] );



Expand All @@ -1118,7 +1118,7 @@ DeclareOperation( "TransposedMatDestructive", [ IsMatrix ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareProperty( "IsMonomialMatrix", IsMatrix );
DeclareProperty( "IsMonomialMatrix", IsMatrixOrMatrixObj );


#############################################################################
Expand All @@ -1143,7 +1143,7 @@ DeclareProperty( "IsMonomialMatrix", IsMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "InverseMatMod", [ IsMatrix, IsObject ] );
DeclareOperation( "InverseMatMod", [ IsMatrixOrMatrixObj, IsObject ] );


#############################################################################
Expand Down Expand Up @@ -1178,11 +1178,11 @@ DeclareOperation( "KroneckerProduct", [ IsMatrixOrMatrixObj, IsMatrixOrMatrixObj
## <Oper Name="SolutionMatNoCo" Arg='mat, vec'/>
##
## <Description>
## Does thework for <C>SolutionMat</C> and <C>SolutionMatDestructive</C>.
## Does the work for <C>SolutionMat</C> and <C>SolutionMatDestructive</C>.
## </Description>
## </ManSection>
##
DeclareOperation( "SolutionMatNoCo", [ IsMatrix, IsRowVector ] );
DeclareOperation( "SolutionMatNoCo", [ IsMatrixOrMatrixObj, IsRowVector ] );


#############################################################################
Expand All @@ -1200,7 +1200,7 @@ DeclareOperation( "SolutionMatNoCo", [ IsMatrix, IsRowVector ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "SolutionMat", [ IsMatrix, IsRowVector ] );
DeclareOperation( "SolutionMat", [ IsMatrixOrMatrixObj, IsRowVector ] );

#############################################################################
##
Expand Down Expand Up @@ -1232,7 +1232,7 @@ DeclareOperation( "SolutionMat", [ IsMatrix, IsRowVector ] );
## <#/GAPDoc>
##
DeclareOperation( "SolutionMatDestructive",
[ IsMatrix and IsMutable, IsRowVector ] );
[ IsMatrixOrMatrixObj and IsMutable, IsRowVector ] );


############################################################################
Expand All @@ -1258,7 +1258,7 @@ DeclareOperation( "SolutionMatDestructive",
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "SumIntersectionMat", [ IsMatrix, IsMatrix ] );
DeclareOperation( "SumIntersectionMat", [ IsMatrixOrMatrixObj, IsMatrixOrMatrixObj ] );



Expand All @@ -1281,7 +1281,7 @@ DeclareOperation( "SumIntersectionMat", [ IsMatrix, IsMatrix ] );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "TriangulizedMat", [ IsMatrix ] );
DeclareOperation( "TriangulizedMat", [ IsMatrixOrMatrixObj ] );
DeclareSynonym( "RREF", TriangulizedMat);

#############################################################################
Expand Down Expand Up @@ -1312,7 +1312,7 @@ DeclareSynonym( "RREF", TriangulizedMat);
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "TriangulizeMat", [ IsMatrix and IsMutable ] );
DeclareOperation( "TriangulizeMat", [ IsMatrixOrMatrixObj and IsMutable ] );


#############################################################################
Expand Down Expand Up @@ -1506,7 +1506,7 @@ DeclareGlobalFunction( "BlownUpVector" );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "DiagonalizeMat", [IsRing,IsMatrix and IsMutable] );
DeclareOperation( "DiagonalizeMat", [IsRing, IsMatrixOrMatrixObj and IsMutable] );


#############################################################################
Expand Down Expand Up @@ -1960,7 +1960,7 @@ DeclareSynonymAttr( "TraceMat", TraceMatrix );
## </ManSection>
## <#/GAPDoc>
##
DeclareAttribute( "JordanDecomposition", IsMatrix );
DeclareAttribute( "JordanDecomposition", IsMatrixOrMatrixObj );


#############################################################################
Expand Down Expand Up @@ -2143,7 +2143,7 @@ DeclareOperation( "CharacteristicPolynomial",
##
DeclareOperation("CharacteristicPolynomialMatrixNC",
#IsField is not yet known
[IsRing,IsOrdinaryMatrix,IsPosInt]);
[IsRing,IsMatrixOrMatrixObj,IsPosInt]);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK, I guess the IsOrdinaryMatrix was here to avoid confusion about the meaning when applied to an IsLieMatrix (I think for MatrixObj we agreed that we only want "ordinary" MatrixObj; implementing Lie algebra elements, if desired, should be wrappers around ordinary MatrixObj. But I digrees)

So what do we do:

  1. ignore this issue and just switch to IsMatrixOrMatrixObj (i.e., what this patch does right now)
  2. Introduce a new filter IsOrdinaryMatrixOrMatrixObj and wire that in suitably, and use it here.
  3. leave this DeclareOperation at IsOrdinaryMatrix and add a second DeclareOperation invocation, i.e.:
Suggested change
[IsRing,IsMatrixOrMatrixObj,IsPosInt]);
[IsRing,IsOrdinaryMatrix,IsPosInt]);
DeclareOperation("CharacteristicPolynomialMatrixNC",
[IsRing,IsMatrixOrMatrixObj,IsPosInt]);



#############################################################################
Expand All @@ -2161,7 +2161,7 @@ DeclareOperation("CharacteristicPolynomialMatrixNC",
##
DeclareOperation("MinimalPolynomialMatrixNC",
#IsField is not yet known
[IsRing,IsOrdinaryMatrix,IsPosInt]);
[IsRing,IsMatrixOrMatrixObj,IsPosInt]);

#############################################################################
##
Expand Down
Loading
Loading