diff --git a/lib/ctblmono.gd b/lib/ctblmono.gd
index d941850010..eae517aac8 100644
--- a/lib/ctblmono.gd
+++ b/lib/ctblmono.gd
@@ -350,13 +350,12 @@ DeclareProperty( "IsPrimitiveCharacter", IsClassFunction );
## rec( comment := "all restrictions checked", isQuasiPrimitive := true )
## gap> chi:= Irr( Sl23 )[7];
## Character( CharacterTable( SL(2,3) ), [ 3, 0, 0, 3, 0, 0, -1 ] )
-## gap> TestQuasiPrimitive( chi );
-## rec( character := Character( CharacterTable( Group(
-## [ [ [ 0*Z(3), Z(3) ], [ Z(3)^0, 0*Z(3) ] ],
-## [ [ Z(3), 0*Z(3) ], [ 0*Z(3), Z(3) ] ],
-## [ [ Z(3)^0, Z(3) ], [ Z(3), Z(3) ] ] ]) ),
-## [ 1, -1, 1, -1, 1 ] ), comment := "restriction checked",
-## isQuasiPrimitive := false )
+## gap> test:= TestQuasiPrimitive( chi );;
+## gap> test.isQuasiPrimitive; test.comment;
+## false
+## "restriction checked"
+## gap> ValuesOfClassFunction( test.character );
+## [ 1, -1, 1, -1, 1 ]
## ]]>
##
##
diff --git a/lib/matobjnz.gi b/lib/matobjnz.gi
index 7c8e0225f5..d2095a7bab 100644
--- a/lib/matobjnz.gi
+++ b/lib/matobjnz.gi
@@ -1353,14 +1353,6 @@ InstallMethod( InverseSameMutability, "for a zmodnz matrix",
return n;
end );
-InstallMethod( RankMat, "for a zmodnz matrix", [ IsZmodnZMatrixRep ],
-function( m )
- m:=MutableCopyMatrix(m);
- m:=SemiEchelonMatDestructive(m);
- if m<>fail then m:=Length(m.vectors);fi;
- return m;
-end);
-
#InstallMethodWithRandomSource( Randomize,
# "for a random source and a mutable zmodnz matrix",
@@ -1489,14 +1481,6 @@ InstallMethod( CompatibleVector, "for a zmodnz matrix",
return NewZeroVector(IsZmodnZVectorRep,BaseDomain(v),NumberRows(v));
end );
-InstallMethod( DeterminantMat, "for a zmodnz matrix", [ IsZmodnZMatrixRep ],
-function( a )
-local m;
- m:=Size(BaseDomain(a));
- a:=List(a![ROWSPOS],x->x![ELSPOS]);
- return ZmodnZObj(DeterminantMat(a),m);
-end );
-
# Minimal/Characteristic Polynomial stuff
#############################################################################
diff --git a/lib/matrix.gd b/lib/matrix.gd
index 620a961cd6..3b72b02f06 100644
--- a/lib/matrix.gd
+++ b/lib/matrix.gd
@@ -195,7 +195,7 @@ DeclareSynonym( "DiagonalOfMat", DiagonalOfMatrix );
##
## <#/GAPDoc>
##
-DeclareAttribute( "BaseMat", IsMatrix );
+DeclareAttribute( "BaseMat", IsMatrixOrMatrixObj );
#############################################################################
##
@@ -222,7 +222,7 @@ DeclareAttribute( "BaseMat", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareOperation( "BaseMatDestructive", [ IsMatrix ] );
+DeclareOperation( "BaseMatDestructive", [ IsMatrixOrMatrixObj ] );
#############################################################################
##
@@ -244,7 +244,7 @@ DeclareOperation( "BaseMatDestructive", [ IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrix );
+DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrixOrMatrixObj );
#############################################################################
@@ -271,7 +271,7 @@ DeclareAttribute( "BaseOrthogonalSpaceMat", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareAttribute( "DefaultFieldOfMatrix", IsMatrix );
+DeclareAttribute( "DefaultFieldOfMatrix", IsMatrixOrMatrixObj );
#############################################################################
@@ -295,7 +295,7 @@ DeclareAttribute( "DefaultFieldOfMatrix", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareAttribute( "DepthOfUpperTriangularMatrix", IsMatrix );
+DeclareAttribute( "DepthOfUpperTriangularMatrix", IsMatrixOrMatrixObj );
#############################################################################
@@ -402,7 +402,7 @@ DeclareSynonym( "DeterminantMatDivFree", DeterminantMatrixDivFree );
##
## <#/GAPDoc>
##
-DeclareAttribute( "DimensionsMat", IsMatrix );
+DeclareAttribute( "DimensionsMat", IsMatrixOrMatrixObj );
#############################################################################
@@ -449,7 +449,7 @@ DeclareAttribute( "DimensionsMat", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareOperation( "ElementaryDivisorsMat", [IsRing,IsMatrix] );
+DeclareOperation( "ElementaryDivisorsMat", [IsRing, IsMatrixOrMatrixObj] );
DeclareGlobalFunction( "ElementaryDivisorsMatDestructive" );
#############################################################################
@@ -522,7 +522,7 @@ DeclareGlobalFunction( "ElementaryDivisorsMatDestructive" );
##
## <#/GAPDoc>
##
-DeclareOperation( "ElementaryDivisorsTransformationsMat", [IsRing,IsMatrix] );
+DeclareOperation( "ElementaryDivisorsTransformationsMat", [IsRing, IsMatrixOrMatrixObj] );
DeclareGlobalFunction( "ElementaryDivisorsTransformationsMatDestructive" );
#############################################################################
@@ -539,7 +539,7 @@ DeclareGlobalFunction( "ElementaryDivisorsTransformationsMatDestructive" );
##
##
##
-DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrix ] );
+DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrixOrMatrixObj ] );
#############################################################################
@@ -565,8 +565,8 @@ DeclareOperation( "TriangulizedNullspaceMatNT", [ IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareAttribute( "NullspaceMat", IsMatrix );
-DeclareAttribute( "TriangulizedNullspaceMat", IsMatrix );
+DeclareAttribute( "NullspaceMat", IsMatrixOrMatrixObj );
+DeclareAttribute( "TriangulizedNullspaceMat", IsMatrixOrMatrixObj );
#############################################################################
@@ -605,8 +605,8 @@ DeclareAttribute( "TriangulizedNullspaceMat", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareOperation( "NullspaceMatDestructive", [ IsMatrix and IsMutable] );
-DeclareOperation( "TriangulizedNullspaceMatDestructive", [ IsMatrix and IsMutable] );
+DeclareOperation( "NullspaceMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );
+DeclareOperation( "TriangulizedNullspaceMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );
#############################################################################
@@ -678,7 +678,7 @@ DeclareOperation( "Eigenvalues", [ IsRing, IsMatrixOrMatrixObj ] );
##
## <#/GAPDoc>
##
-DeclareOperation( "Eigenspaces", [ IsRing, IsMatrix ] );
+DeclareOperation( "Eigenspaces", [ IsRing, IsMatrixOrMatrixObj ] );
#############################################################################
##
@@ -694,7 +694,7 @@ DeclareOperation( "Eigenspaces", [ IsRing, IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareOperation( "Eigenvectors", [ IsRing, IsMatrix ] );
+DeclareOperation( "Eigenvectors", [ IsRing, IsMatrixOrMatrixObj ] );
#############################################################################
@@ -717,7 +717,7 @@ DeclareOperation( "Eigenvectors", [ IsRing, IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareAttribute( "ProjectiveOrder", IsMatrix );
+DeclareAttribute( "ProjectiveOrder", IsMatrixOrMatrixObj );
#############################################################################
##
@@ -825,7 +825,7 @@ DeclareSynonymAttr( "RankMatDestructive", RankMatrixDestructive );
##
## <#/GAPDoc>
##
-DeclareAttribute( "SemiEchelonMat", IsMatrix );
+DeclareAttribute( "SemiEchelonMat", IsMatrixOrMatrixObj );
#############################################################################
##
@@ -849,7 +849,7 @@ DeclareAttribute( "SemiEchelonMat", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrix and IsMutable] );
+DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrixOrMatrixObj and IsMutable] );
#############################################################################
@@ -886,7 +886,7 @@ DeclareOperation( "SemiEchelonMatDestructive", [ IsMatrix and IsMutable] );
##
## <#/GAPDoc>
##
-DeclareAttribute( "SemiEchelonMatTransformation", IsMatrix );
+DeclareAttribute( "SemiEchelonMatTransformation", IsMatrixOrMatrixObj );
#############################################################################
##
@@ -902,7 +902,7 @@ DeclareAttribute( "SemiEchelonMatTransformation", IsMatrix );
##
##
DeclareOperation( "SemiEchelonMatTransformationDestructive", [
- IsMatrix and IsMutable ] );
+ IsMatrixOrMatrixObj and IsMutable ] );
#############################################################################
@@ -1034,7 +1034,7 @@ DeclareSynonym( "MutableTransposedMat", TransposedMatMutable ); # needed?
##
##
##
-DeclareOperation( "MutableTransposedMatDestructive", [IsMatrix and IsMutable] );
+DeclareOperation( "MutableTransposedMatDestructive", [IsMatrixOrMatrixObj and IsMutable] );
#############################################################################
@@ -1062,7 +1062,7 @@ DeclareOperation( "MutableTransposedMatDestructive", [IsMatrix and IsMutable] );
##
## <#/GAPDoc>
##
-DeclareOperation( "TransposedMatDestructive", [ IsMatrix ] );
+DeclareOperation( "TransposedMatDestructive", [ IsMatrixOrMatrixObj ] );
@@ -1085,7 +1085,7 @@ DeclareOperation( "TransposedMatDestructive", [ IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareProperty( "IsMonomialMatrix", IsMatrix );
+DeclareProperty( "IsMonomialMatrix", IsMatrixOrMatrixObj );
#############################################################################
@@ -1110,7 +1110,7 @@ DeclareProperty( "IsMonomialMatrix", IsMatrix );
##
## <#/GAPDoc>
##
-DeclareOperation( "InverseMatMod", [ IsMatrix, IsObject ] );
+DeclareOperation( "InverseMatMod", [ IsMatrixOrMatrixObj, IsObject ] );
#############################################################################
@@ -1145,11 +1145,11 @@ DeclareOperation( "KroneckerProduct", [ IsMatrixOrMatrixObj, IsMatrixOrMatrixObj
##
##
##
-## Does thework for SolutionMat and SolutionMatDestructive.
+## Does the work for SolutionMat and SolutionMatDestructive.
##
##
##
-DeclareOperation( "SolutionMatNoCo", [ IsMatrix, IsRowVector ] );
+DeclareOperation( "SolutionMatNoCo", [ IsMatrixOrMatrixObj, IsRowVector ] );
#############################################################################
@@ -1167,7 +1167,7 @@ DeclareOperation( "SolutionMatNoCo", [ IsMatrix, IsRowVector ] );
##
## <#/GAPDoc>
##
-DeclareOperation( "SolutionMat", [ IsMatrix, IsRowVector ] );
+DeclareOperation( "SolutionMat", [ IsMatrixOrMatrixObj, IsRowVector ] );
#############################################################################
##
@@ -1199,7 +1199,7 @@ DeclareOperation( "SolutionMat", [ IsMatrix, IsRowVector ] );
## <#/GAPDoc>
##
DeclareOperation( "SolutionMatDestructive",
- [ IsMatrix and IsMutable, IsRowVector ] );
+ [ IsMatrixOrMatrixObj and IsMutable, IsRowVector ] );
############################################################################
@@ -1225,7 +1225,7 @@ DeclareOperation( "SolutionMatDestructive",
##
## <#/GAPDoc>
##
-DeclareOperation( "SumIntersectionMat", [ IsMatrix, IsMatrix ] );
+DeclareOperation( "SumIntersectionMat", [ IsMatrixOrMatrixObj, IsMatrixOrMatrixObj ] );
@@ -1248,7 +1248,7 @@ DeclareOperation( "SumIntersectionMat", [ IsMatrix, IsMatrix ] );
##
## <#/GAPDoc>
##
-DeclareOperation( "TriangulizedMat", [ IsMatrix ] );
+DeclareOperation( "TriangulizedMat", [ IsMatrixOrMatrixObj ] );
DeclareSynonym( "RREF", TriangulizedMat);
#############################################################################
@@ -1279,7 +1279,7 @@ DeclareSynonym( "RREF", TriangulizedMat);
##
## <#/GAPDoc>
##
-DeclareOperation( "TriangulizeMat", [ IsMatrix and IsMutable ] );
+DeclareOperation( "TriangulizeMat", [ IsMatrixOrMatrixObj and IsMutable ] );
#############################################################################
@@ -1473,7 +1473,7 @@ DeclareGlobalFunction( "BlownUpVector" );
##
## <#/GAPDoc>
##
-DeclareOperation( "DiagonalizeMat", [IsRing,IsMatrix and IsMutable] );
+DeclareOperation( "DiagonalizeMat", [IsRing, IsMatrixOrMatrixObj and IsMutable] );
#############################################################################
@@ -1927,7 +1927,7 @@ DeclareSynonymAttr( "TraceMat", TraceMatrix );
##
## <#/GAPDoc>
##
-DeclareAttribute( "JordanDecomposition", IsMatrix );
+DeclareAttribute( "JordanDecomposition", IsMatrixOrMatrixObj );
#############################################################################
@@ -2087,12 +2087,12 @@ DeclareSynonym("OnSubspacesByCanonicalBasisGF2",OnSubspacesByCanonicalBasis);
##
## <#/GAPDoc>
##
-DeclareAttribute( "CharacteristicPolynomial", IsMatrix );
-DeclareOperation( "CharacteristicPolynomial", [ IsMatrix, IsPosInt ] );
+DeclareAttribute( "CharacteristicPolynomial", IsMatrixOrMatrixObj );
+DeclareOperation( "CharacteristicPolynomial", [ IsMatrixOrMatrixObj, IsPosInt ] );
DeclareOperation( "CharacteristicPolynomial",
- [ IsRing, IsRing, IsMatrix, IsPosInt ] );
+ [ IsRing, IsRing, IsMatrixOrMatrixObj, IsPosInt ] );
DeclareOperation( "CharacteristicPolynomial",
- [ IsRing, IsRing, IsMatrix ] );
+ [ IsRing, IsRing, IsMatrixOrMatrixObj ] );
#############################################################################
@@ -2110,7 +2110,7 @@ DeclareOperation( "CharacteristicPolynomial",
##
DeclareOperation("CharacteristicPolynomialMatrixNC",
#IsField is not yet known
- [IsRing,IsOrdinaryMatrix,IsPosInt]);
+ [IsRing,IsMatrixOrMatrixObj,IsPosInt]);
#############################################################################
@@ -2128,7 +2128,7 @@ DeclareOperation("CharacteristicPolynomialMatrixNC",
##
DeclareOperation("MinimalPolynomialMatrixNC",
#IsField is not yet known
- [IsRing,IsOrdinaryMatrix,IsPosInt]);
+ [IsRing,IsMatrixOrMatrixObj,IsPosInt]);
#############################################################################
##
diff --git a/lib/matrix.gi b/lib/matrix.gi
index cdddb1f869..a80ea46b1e 100644
--- a/lib/matrix.gi
+++ b/lib/matrix.gi
@@ -747,7 +747,7 @@ InstallMethod( CharacteristicPolynomial, "spinning over field",
fi;
return false;
end,
- [ IsField, IsField, IsOrdinaryMatrix, IsPosInt ],
+ [ IsField, IsField, IsMatrixOrMatrixObj, IsPosInt ],
function( F, E, mat, inum )
local B;
@@ -766,7 +766,7 @@ InstallMethod( CharacteristicPolynomial, "spinning over field",
InstallMethod( CharacteristicPolynomialMatrixNC, "spinning over field",
IsElmsCollsX,
- [ IsField, IsOrdinaryMatrix, IsPosInt ],
+ [ IsField, IsMatrixOrMatrixObj, IsPosInt ],
Matrix_CharacteristicPolynomialSameField);
@@ -777,7 +777,7 @@ InstallMethod( CharacteristicPolynomialMatrixNC, "spinning over field",
InstallMethod( MinimalPolynomial,
"spinning over field",
IsElmsCollsX,
- [ IsField, IsOrdinaryMatrix, IsPosInt ],
+ [ IsField, IsMatrixOrMatrixObj, IsPosInt ],
function( F, mat,inum )
local fld, B;
@@ -814,7 +814,7 @@ end);
InstallMethod( MinimalPolynomialMatrixNC, "spinning over field",
IsElmsCollsX,
- [ IsField, IsOrdinaryMatrix, IsPosInt ],
+ [ IsField, IsMatrixOrMatrixObj, IsPosInt ],
Matrix_MinimalPolynomialSameField);
@@ -1459,7 +1459,7 @@ end);
##
InstallMethod( DeterminantMatDestructive,
"fraction-free method",
- [ IsOrdinaryMatrix and IsMutable],
+ [ IsMatrixOrMatrixObj and IsMutable],
function ( mat )
local det, sgn, row, zero, m, i, j, k, mult, row2, piv;
@@ -1530,7 +1530,7 @@ end);
## through here also.
##
InstallMethod( DeterminantMatDestructive,"non fraction free",
- [ IsOrdinaryMatrix and IsFFECollColl and IsMutable],
+ [ IsMatrixOrMatrixObj and IsFFECollColl and IsMutable],
function( mat )
local m, zero, det, sgn, k, j, row, l, row2, x;
@@ -1605,7 +1605,7 @@ InstallMethod( DeterminantMat,
end );
InstallMethod( DeterminantMatDestructive,"nonprime residue rings",
- [ IsOrdinaryMatrix and
+ [ IsMatrixOrMatrixObj and
CategoryCollections(CategoryCollections(IsZmodnZObjNonprime)) and IsMutable],
DeterminantMatDivFree);
@@ -1641,7 +1641,7 @@ InstallMethod( DeterminantMatDestructive,"nonprime residue rings",
##
InstallMethod( DeterminantMatDivFree,
"Division-free method",
- [ IsMatrix ],
+ [ IsMatrixOrMatrixObj ],
function ( M )
local u,v,w,i, ## indices
a,b,c,x,y, ## temp indices
@@ -2197,7 +2197,7 @@ end );
##
InstallMethod( NullspaceMat,
"generic method for ordinary matrices",
- [ IsOrdinaryMatrix ],
+ [ IsMatrixOrMatrixObj ],
mat -> SemiEchelonMatTransformation(mat).relations );
InstallOtherMethod(NullspaceMat,"matrix objects",[IsMatrixObj],
@@ -2218,7 +2218,7 @@ end);
InstallMethod( NullspaceMatDestructive,
"generic method for ordinary matrices",
- [ IsOrdinaryMatrix and IsMutable],
+ [ IsMatrixOrMatrixObj and IsMutable],
mat -> SemiEchelonMatTransformationDestructive(mat).relations );
InstallOtherMethod( TriangulizedNullspaceMat,
@@ -2243,7 +2243,7 @@ end );
InstallMethod( TriangulizedNullspaceMatNT,
"generic method",
- [ IsOrdinaryMatrix ],
+ [ IsMatrixOrMatrixObj ],
function( mat )
local nullspace, n, empty, i, k, row, zero, one;#
@@ -2287,7 +2287,7 @@ InstallMethod( TriangulizedNullspaceMatNT,
end );
#InstallMethod(TriangulizedNullspaceMat,"generic method",
-# [IsOrdinaryMatrix],
+# [IsMatrixOrMatrixObj],
# function ( mat )
# # triangulize the transposed of the matrix
# return TriangulizedNullspaceMatNT(
@@ -2295,7 +2295,7 @@ end );
#end );
#InstallMethod(TriangulizedNullspaceMatDestructive,"generic method",
-# [IsOrdinaryMatrix],
+# [IsMatrixOrMatrixObj],
# function ( mat )
# # triangulize the transposed of the matrix
# return TriangulizedNullspaceMatNT(
@@ -2402,7 +2402,7 @@ end );
##
InstallOtherMethod( RankMatDestructive,
"generic method for mutable matrices",
- [ IsMatrix and IsMutable ],
+ [ IsMatrixOrMatrixObj and IsMutable ],
function( mat )
mat:= SemiEchelonMatDestructive( mat );
if mat <> fail then
@@ -2413,7 +2413,7 @@ InstallOtherMethod( RankMatDestructive,
InstallOtherMethod( RankMat,
"generic method for matrices",
- [ IsMatrix ],
+ [ IsMatrixOrMatrixObj ],
mat -> RankMatDestructive( MutableCopyMatrix( mat ) ) );