From 08653c9c1b7b00e1c7de669d3e4334da6fa8dccb Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 13 Dec 2022 14:27:00 +0100 Subject: [PATCH] Simplify OneSM/OneAttr/OneOp/OneMutable/... etc. Currently we have these three variants of `One`, together with a bunch of synonyms for each: - `OneImmutable` == `One` == `OneAttr` == `Identity` - `OneMutable` == `OneOp` - `OneSameMutability` == `OneSM` This is then repeated for `Zero`, `Inverse`, `AdditiveInverse`. The delegation between these is already complicated enough, but each time I have to look into this, my head starts spinning due to the many synonyms, and I can't quite remember which is which. I propose we narrow this down a bit: - the variants with `SM` seems to be purely to avoid some typing, so I've removed all uses of them. Turns out no packages uses it, either. So we can mark them as obsolete. - the `Attr` variants are also almost unused, except for a single use in the FinInG package (removed in FinInG 1.5.4). Still, we can safely mark it as obsolete, and remove all users of it beyond the documentation. (As a bonus, also make `TransposedMatAttr` obsolete.) - the `Op` synonym to me also seems redundant. Alas, a ton of packages use them, so I mostly left those alone. - I think it is fine to keep `One` (and `Identity`) as synonyms for `OneImmutable`; at least for me personally it seems I can deal with that one synonym sufficiently well in my head. --- doc/ref/lists.xml | 4 +- doc/ref/objects.xml | 10 ++-- doc/ref/obsolete.xml | 73 +++++++++++++++++++++++----- hpcgap/lib/ffeconway.gi | 4 +- hpcgap/lib/vecmat.gi | 2 +- lib/arith.gd | 42 ++-------------- lib/arith.gi | 12 ++--- lib/ffeconway.gi | 4 +- lib/list.gi | 8 +-- lib/matrix.gd | 8 +-- lib/obsolete.gd | 16 ++++++ lib/vecmat.gi | 2 +- lib/zmodnz.gi | 4 +- src/integer.c | 2 - tst/testbugfix/2012-12-06-t00266.tst | 2 +- tst/testinstall/zmodnz.tst | 4 +- tst/testspecial/bad-minus.g.out | 2 +- tst/teststandard/arithlst.g | 32 ++++++------ 18 files changed, 130 insertions(+), 101 deletions(-) diff --git a/doc/ref/lists.xml b/doc/ref/lists.xml index c3c49c79d0..01db02dea4 100644 --- a/doc/ref/lists.xml +++ b/doc/ref/lists.xml @@ -1368,8 +1368,8 @@ an operation that returns a result that is mutable (, , , ), and an operation whose result has the same immutability level as the argument -(, , -, ). +(, , +, ). The last kind of operations is equivalent to the corresponding infix operations 0 * list, - list, list^0, and list^-1. diff --git a/doc/ref/objects.xml b/doc/ref/objects.xml index 3e67beb69c..10501b6cfb 100644 --- a/doc/ref/objects.xml +++ b/doc/ref/objects.xml @@ -257,11 +257,11 @@ in .

It should be noted that -0 * obj is equivalent to ZeroSM( obj ), --obj is equivalent to AdditiveInverseSM( obj ), -obj^0 is equivalent to OneSM( obj), -and obj^-1 is equivalent to InverseSM( obj ). -The SM stands for same mutability, and indicates that the result is +0 * obj is equivalent to ZeroSameMutability( obj ), +-obj is equivalent to AdditiveInverseSameMutability( obj ), +obj^0 is equivalent to OneSameMutability( obj), +and obj^-1 is equivalent to InverseSameMutability( obj ). +The suffix SameMutability indicates that the result is mutable if and only if the argument is mutable.

The operations , , , and diff --git a/doc/ref/obsolete.xml b/doc/ref/obsolete.xml index b4717db3fa..ed0e5550f8 100644 --- a/doc/ref/obsolete.xml +++ b/doc/ref/obsolete.xml @@ -147,11 +147,6 @@ This type of information is now collected in the global record

Here are some further name changes.

-MonomialTotalDegreeLess -NormedVectors -MutableIdentityMat -MutableNullMat -RadicalGroup OLD @@ -159,32 +154,34 @@ Here are some further name changes. - MonomialTotalDegreeLess + MonomialTotalDegreeLessMonomialTotalDegreeLess - NormedVectors + NormedVectorsNormedVectors - MutableIdentityMat + MutableIdentityMatMutableIdentityMat - MutableNullMat + MutableNullMatMutableNullMat - MultRowVector + MultRowVectorMultRowVector - RadicalGroup + RadicalGroupRadicalGroup
+ + PositionFirstComponent The operation PositionFirstComponent has been deprecated in GAP 4.8 due to issues with its documentation and implementation, and was @@ -193,18 +190,72 @@ Instead of PositionFirstComponent(list,obj), you may use PositionSorted(list,[obj]) or PositionProperty(list,x->x[1]=obj) as a replacement, depending on your specific use case. + + MultRowVector The five argument version of the operation MultRowVector has been deprecated in GAP 4.10 since it was unused and only available for coefficient lists. Note that MultRowVector was also renamed to MultVectorLeft. + + TemporaryGlobalVarName The function TemporaryGlobalVarName has been deprecated in GAP 4.11. Code using it typically can be restructured to not need it, e.g. by using . + + +A bunch of synonyms have been deprecated in GAP 4.13. +The alternative names have always existed and so are safe +to use even in code which is meant to run in older GAP versions. + + + Deprecated + Recommended alternative + + + + OneSMOneSM + + + + InverseSMInverseSM + + + + ZeroSMZeroSM + + + + AdditiveInverseSMAdditiveInverseSM + + + + + OneAttrOneAttr + , + + + InverseAttrInverseAttr + , + + + ZeroAttrZeroAttr + , + + + AdditiveInverseAttrAdditiveInverseAttr + , + + +
+ +
+ +
diff --git a/hpcgap/lib/ffeconway.gi b/hpcgap/lib/ffeconway.gi index ceb8504cde..028bda0c0d 100644 --- a/hpcgap/lib/ffeconway.gi +++ b/hpcgap/lib/ffeconway.gi @@ -1039,7 +1039,7 @@ InstallMethod(ZeroOp, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.Zero); -InstallMethod(ZeroAttr, +InstallMethod(ZeroImmutable, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.Zero); @@ -1071,7 +1071,7 @@ InstallMethod(OneOp, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.One); -InstallMethod(OneAttr, +InstallMethod(OneImmutable, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.One); diff --git a/hpcgap/lib/vecmat.gi b/hpcgap/lib/vecmat.gi index 05a4110280..d72831bfb4 100644 --- a/hpcgap/lib/vecmat.gi +++ b/hpcgap/lib/vecmat.gi @@ -934,7 +934,7 @@ end ); ############################################################################# ## -#M OneSM( ) . . . . . . . . . . . . . . . . . . . identity GF2 matrix +#M OneSameMutability( ) . . . . . . . . . . . . identity GF2 matrix ## InstallMethod( OneSameMutability, "for GF2 Matrix", diff --git a/lib/arith.gd b/lib/arith.gd index 5cb997f82c..5cd43d86c6 100644 --- a/lib/arith.gd +++ b/lib/arith.gd @@ -1379,22 +1379,18 @@ DeclareProperty( "IsOne", IsMultiplicativeElementWithOne ); ############################################################################# ## #A ZeroImmutable( ) . . additive neutral of an element/domain/family -#A ZeroAttr( ) synonym of ZeroImmutable #A Zero( ) synonym of ZeroImmutable #O ZeroMutable( ) . . . . . . mutable additive neutral of an element #O ZeroOp( ) synonym of ZeroMutable #O ZeroSameMutability( ) mutability preserving zero (0*) -#O ZeroSM( ) synonym of ZeroSameMutability ## ## <#GAPDoc Label="ZeroImmutable"> ## ## -## ## ## ## ## -## ## ## ## , , @@ -1417,9 +1413,7 @@ DeclareProperty( "IsOne", IsMultiplicativeElementWithOne ); ## ZeroSameMutability( obj ) is equivalent to ## 0 * obj. ##

-## and are synonyms of -## . -## is a synonym of . +## is a synonym of . ## is a synonym of . ##

## If obj is a domain or a family then is defined @@ -1452,7 +1446,6 @@ DeclareProperty( "IsOne", IsMultiplicativeElementWithOne ); DeclareAttribute( "ZeroImmutable", IsAdditiveElementWithZero ); DeclareAttribute( "ZeroImmutable", IsFamily ); -DeclareSynonymAttr( "ZeroAttr", ZeroImmutable ); DeclareSynonymAttr( "Zero", ZeroImmutable ); DeclareOperationKernel( "ZeroMutable", [ IsAdditiveElementWithZero ], @@ -1461,7 +1454,6 @@ DeclareSynonym( "ZeroOp", ZeroMutable ); DeclareOperationKernel( "ZeroSameMutability", [ IsAdditiveElementWithZero ], ZERO_SAMEMUT ); -DeclareSynonym( "ZeroSM", ZeroSameMutability ); ############################################################################# @@ -1474,22 +1466,18 @@ DeclareOperationKernel( "+", [ IsExtAElement, IsExtAElement ], SUM ); ############################################################################# ## #A AdditiveInverseImmutable( ) . . . . additive inverse of an element -#A AdditiveInverseAttr( ) . . . . additive inverse of an element #A AdditiveInverse( ) . . . . additive inverse of an element #O AdditiveInverseMutable( ) . mutable additive inverse of an element #O AdditiveInverseOp( ) . mutable additive inverse of an element #O AdditiveInverseSameMutability( ) . additive inverse of an element -#O AdditiveInverseSM( ) . additive inverse of an element ## ## <#GAPDoc Label="AdditiveInverseImmutable"> ## ## -## ## ## ## ## -## ## ## ## , @@ -1513,10 +1501,8 @@ DeclareOperationKernel( "+", [ IsExtAElement, IsExtAElement ], SUM ); ## AdditiveInverseSameMutability( elm ) is equivalent to ## -elm. ##

-## and are -## synonyms of . -## is a synonym of -## . +## is a synonym of +## . ## is a synonym of ## . ##

@@ -1532,7 +1518,6 @@ DeclareOperationKernel( "+", [ IsExtAElement, IsExtAElement ], SUM ); ## <#/GAPDoc> ## DeclareAttribute( "AdditiveInverseImmutable", IsAdditiveElementWithInverse ); -DeclareSynonymAttr( "AdditiveInverseAttr", AdditiveInverseImmutable ); DeclareSynonymAttr( "AdditiveInverse", AdditiveInverseImmutable ); DeclareOperationKernel( "AdditiveInverseMutable", @@ -1541,7 +1526,6 @@ DeclareSynonym( "AdditiveInverseOp", AdditiveInverseMutable); DeclareOperationKernel( "AdditiveInverseSameMutability", [ IsAdditiveElementWithInverse ], AINV_SAMEMUT ); -DeclareSynonym( "AdditiveInverseSM", AdditiveInverseSameMutability); ############################################################################# @@ -1562,24 +1546,20 @@ DeclareOperationKernel( "*", [ IsExtRElement, IsExtLElement ], PROD ); ############################################################################# ## #A OneImmutable( ) multiplicative neutral of an element/domain/family -#A OneAttr( ) #A One( ) #A Identity( ) #O OneMutable( ) . . . . . . . . multiplicative neutral of an element #O OneOp( ) #O OneSameMutability( ) -#O OneSM( ) ## ## <#GAPDoc Label="OneImmutable"> ## ## -## ## ## ## ## ## -## ## ## ## , , @@ -1603,9 +1583,8 @@ DeclareOperationKernel( "*", [ IsExtRElement, IsExtLElement ], PROD ); ## OneSameMutability( obj ) ## is equivalent to obj^0. ##

-## , and are +## and are ## synonyms of OneImmutable. -## is a synonym of . ## is a synonym of . ##

## If obj is a domain or a family then is defined @@ -1644,7 +1623,6 @@ DeclareOperationKernel( "*", [ IsExtRElement, IsExtLElement ], PROD ); DeclareAttribute( "OneImmutable", IsMultiplicativeElementWithOne ); DeclareAttribute( "OneImmutable", IsFamily ); -DeclareSynonymAttr( "OneAttr", OneImmutable ); DeclareSynonymAttr( "One", OneImmutable ); DeclareSynonymAttr( "Identity", OneImmutable ); @@ -1654,28 +1632,23 @@ DeclareSynonym( "OneOp", OneMutable); DeclareOperationKernel( "OneSameMutability", [ IsMultiplicativeElementWithOne ], ONE_SAMEMUT ); -DeclareSynonym( "OneSM", OneSameMutability); ############################################################################# ## #A InverseImmutable( ) . . . . multiplicative inverse of an element -#A InverseAttr( ) #A Inverse( ) #O InverseMutable( ) #O InverseOp( ) #O InverseSameMutability( ) . . multiplicative inverse of an element -#O InverseSM( ) ## ## <#GAPDoc Label="InverseImmutable"> ## ## -## ## ## ## ## -## ## ## ## , , and @@ -1713,10 +1686,7 @@ DeclareSynonym( "OneSM", OneSameMutability); ## InverseSameMutability( elm ) is equivalent to ## elm^-1. ##

-## and are synonyms of -## . -## is a synonym of -## . +## is a synonym of . ## is a synonym of . ##

## The default method of calls @@ -1731,7 +1701,6 @@ DeclareSynonym( "OneSM", OneSameMutability); ## <#/GAPDoc> ## DeclareAttribute( "InverseImmutable", IsMultiplicativeElementWithInverse ); -DeclareSynonymAttr( "InverseAttr", InverseImmutable ); DeclareSynonymAttr( "Inverse", InverseImmutable ); DeclareOperationKernel( "InverseMutable", @@ -1740,7 +1709,6 @@ DeclareSynonym( "InverseOp", InverseMutable ); DeclareOperationKernel( "InverseSameMutability", [ IsMultiplicativeElementWithInverse ], INV_SAMEMUT ); -DeclareSynonym( "InverseSM", InverseSameMutability ); ############################################################################# diff --git a/lib/arith.gi b/lib/arith.gi index 381e046826..4243e670aa 100644 --- a/lib/arith.gi +++ b/lib/arith.gi @@ -103,7 +103,7 @@ InstallOtherMethod( Zero, return elm; end ); #T In cases where the OneOp result will normally be immutable, we could install -#T OneOp itself as a method for OneAttr. This is worse if the result is mutable, +#T OneOp itself as a method for OneImmutable. This is worse if the result is mutable, #T because a call to MakeImmutable is replaced by one to Immutable, but still #T works. This reduces the indirection to a method selection in these cases, #T which takes less than 1 microsecond on my system. @@ -123,7 +123,7 @@ InstallOtherMethod( ZeroSameMutability, if IsMutable( obj ) then TryNextMethod(); fi; - return ZeroAttr( obj ); + return ZeroImmutable( obj ); end ); @@ -174,7 +174,7 @@ InstallMethod( Zero, #M ZeroOp( ) ## ## If is not copyable (and hence immutable) then we may call the -## generic method for `ZeroAttr' that tries to fetch a stored zero from the +## generic method for `ZeroImmutable' that tries to fetch a stored zero from the ## family of . ## InstallMethod( ZeroOp, @@ -236,7 +236,7 @@ InstallOtherMethod( AdditiveInverseSameMutability, if IsMutable( elm ) then TryNextMethod(); fi; - a:= AdditiveInverseAttr( elm ); + a:= AdditiveInverseImmutable( elm ); MakeImmutable( a ); return a; end ); @@ -360,7 +360,7 @@ InstallMethod( One, #M OneOp( ) ## ## If is not copyable (and hence immutable) then we may call the -## generic method for `OneAttr' that tries to fetch a stored identity from +## generic method for `OneImmutable' that tries to fetch a stored identity from ## the family of . ## InstallMethod( OneOp, @@ -480,7 +480,7 @@ InstallOtherMethod( \/, #T #T This is there to handle some mgrvs, like [,2] which might not #T be IsExtRElement. In fact, plain lists will be caught by the -#T kernel and x/y turned into x*InverseSM(y). This method is thus +#T kernel and x/y turned into x*InverseSameMutability(y). This method is thus #T needed only for compressed matrices and other external objects #T #T It isn't clear that this is the right long-term solution. It might diff --git a/lib/ffeconway.gi b/lib/ffeconway.gi index c57c881e5a..f9ca230f00 100644 --- a/lib/ffeconway.gi +++ b/lib/ffeconway.gi @@ -1009,7 +1009,7 @@ InstallMethod(ZeroOp, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.Zero); -InstallMethod(ZeroAttr, +InstallMethod(ZeroImmutable, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.Zero); @@ -1041,7 +1041,7 @@ InstallMethod(OneOp, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.One); -InstallMethod(OneAttr, +InstallMethod(OneImmutable, [ IsCoeffsModConwayPolRep and IsFFE], FFECONWAY.One); diff --git a/lib/list.gi b/lib/list.gi index 4f8f2d9bb0..a71f1f6e47 100644 --- a/lib/list.gi +++ b/lib/list.gi @@ -3031,7 +3031,7 @@ InstallMethod( IsBound\[\], ############################################################################# ## #M ZeroOp( ) . . . . . . . . . . . for small list in `IsListDefault' -#M ZeroSM( ) . . . . . . . . . . . for small list in `IsListDefault' +#M ZeroSameMutability( ) . . . . . for small list in `IsListDefault' ## ## Default methods are installed only for small lists in `IsListDefault'. ## For those lists, `Zero' is defined pointwise. @@ -3051,7 +3051,7 @@ InstallOtherMethod( ZeroSameMutability, ############################################################################# ## #M AdditiveInverseOp( ) . . . . . for small list in `IsListDefault' -#M AdditiveInverseSM( ) . . . . . for small list in `IsListDefault' +#M AdditiveInverseSameMutability( ) for small list in `IsListDefault' ## ## Default methods are installed only for small lists in `IsListDefault'. ## For those lists, `AdditiveInverse' is defined pointwise. @@ -3302,7 +3302,7 @@ InstallOtherMethod( \-, ############################################################################# ## #M OneOp( ) . . . . . . . . . . . . . for matrix in `IsListDefault' -#M OneSM( ) . . . . . . . . . . . . . for matrix in `IsListDefault' +#M OneSameMutability( ) . . . . . . . for matrix in `IsListDefault' ## InstallOtherMethod( OneOp, [ IsListDefault ], @@ -3328,7 +3328,7 @@ InstallOtherMethod( OneSameMutability, ############################################################################# ## #M InverseOp( ) . . . . . . . . . . . for matrix in `IsListDefault' -#M InverseSM( ) . . . . . . . . . . . for matrix in `IsListDefault' +#M InverseSameMutability( ) . . . . . for matrix in `IsListDefault' ## ## The `INV_MAT_DEFAULT' methods are faster for lists of FFEs because they ## use `AddRowVector', etc. diff --git a/lib/matrix.gd b/lib/matrix.gd index 2237979e19..1df51f5103 100644 --- a/lib/matrix.gd +++ b/lib/matrix.gd @@ -978,7 +978,6 @@ DeclareOperation( "SemiEchelonMatsDestructive", [ IsList ] ); ############################################################################# ## #A TransposedMatImmutable( ) . . . . . . . . . transposed of a matrix -#A TransposedMatAttr( ) . . . . . . . . . . . transposed of a matrix #A TransposedMat( ) . . . . . . . . . . . . . transposed of a matrix #O TransposedMatMutable( ) . . . . . . . . . . transposed of a matrix #O TransposedMatOp( ) . . . . . . . . . . . . transposed of a matrix @@ -986,7 +985,6 @@ DeclareOperation( "SemiEchelonMatsDestructive", [ IsList ] ); ## <#GAPDoc Label="TransposedMatImmutable"> ## ## -## ## ## ## @@ -1004,8 +1002,8 @@ DeclareOperation( "SemiEchelonMatsDestructive", [ IsList ] ); ## is guaranteed to return a new ## mutable matrix. ##

-## and -## are synonyms of , +## is a synonym of +## , ## and is a synonym of ## , ## in analogy to operations such as . @@ -1014,8 +1012,6 @@ DeclareOperation( "SemiEchelonMatsDestructive", [ IsList ] ); ## <#/GAPDoc> ## DeclareAttribute( "TransposedMatImmutable", IsMatrixOrMatrixObj ); - -DeclareSynonymAttr( "TransposedMatAttr", TransposedMatImmutable ); DeclareSynonymAttr( "TransposedMat", TransposedMatImmutable ); DeclareOperation( "TransposedMatMutable", [ IsMatrixOrMatrixObj ] ); diff --git a/lib/obsolete.gd b/lib/obsolete.gd index 287c87630f..ce0226dbf6 100644 --- a/lib/obsolete.gd +++ b/lib/obsolete.gd @@ -765,3 +765,19 @@ DeclareSynonym( "FirstOp", First ); ## ## Still used in autpgrp, crisp, sophus (07/2022) DeclareObsoleteSynonym( "RadicalGroup", "SolvableRadical" ); + + +############################################################################# +## +## Not used in any redistributed package +DeclareObsoleteSynonym( "ZeroSM", "ZeroSameMutability" ); +DeclareObsoleteSynonym( "AdditiveInverseSM", "AdditiveInverseSameMutability" ); +DeclareObsoleteSynonym( "OneSM", "OneSameMutability" ); +DeclareObsoleteSynonym( "InverseSM", "InverseSameMutability" ); + +DeclareObsoleteSynonymAttr( "ZeroAttr", "ZeroImmutable" ); +DeclareObsoleteSynonymAttr( "AdditiveInverseAttr", "AdditiveInverseImmutable" ); +DeclareObsoleteSynonymAttr( "OneAttr", "OneImmutable" ); +DeclareObsoleteSynonymAttr( "InverseAttr", "InverseImmutable" ); + +DeclareObsoleteSynonymAttr( "TransposedMatAttr", "TransposedMatImmutable" ); diff --git a/lib/vecmat.gi b/lib/vecmat.gi index 749f69c5de..e18b956de2 100644 --- a/lib/vecmat.gi +++ b/lib/vecmat.gi @@ -934,7 +934,7 @@ end ); ############################################################################# ## -#M OneSM( ) . . . . . . . . . . . . . . . . . . . identity GF2 matrix +#M OneSameMutability( ) . . . . . . . . . . . . identity GF2 matrix ## InstallMethod( OneSameMutability, "for GF2 Matrix", diff --git a/lib/zmodnz.gi b/lib/zmodnz.gi index 58346119f9..2d70fe2fdf 100644 --- a/lib/zmodnz.gi +++ b/lib/zmodnz.gi @@ -803,7 +803,7 @@ InstallMethod( IsAssociated, ############################################################################# ## #M InverseOp( ) . . . . . . . . . . . . for ordinary matrix over Z/nZ -#M InverseSM( ) . . . . . . . . . . . . for ordinary matrix over Z/nZ +#M InverseSameMutability( ) . . . . . . for ordinary matrix over Z/nZ ## ## For a nonprime integer $n$, the residue class ring $\Z/n\Z$ has zero ## divisors, so the standard algorithm to invert a matrix over $\Z/n\Z$ @@ -830,7 +830,7 @@ InstallMethod( InverseOp, return mat; end ); -InstallMethod( InverseSM, +InstallMethod( InverseSameMutability, "for an ordinary matrix over a ring Z/nZ", [ IsMatrix and IsOrdinaryMatrix and IsZmodnZObjNonprimeCollColl ], function( mat ) diff --git a/src/integer.c b/src/integer.c index d5ad5e35c6..71fa96045e 100644 --- a/src/integer.c +++ b/src/integer.c @@ -169,7 +169,6 @@ static inline void ENSURE_BAG(Bag bag) /* for fallbacks to library */ static Obj String; -static Obj OneAttr; static Obj IsIntFilt; @@ -2901,7 +2900,6 @@ static Int InitKernel ( StructInitInfo * module ) ImportGVarFromLibrary( "TYPE_INT_LARGE_NEG", &TYPE_INT_LARGE_NEG ); ImportFuncFromLibrary( "String", &String ); - ImportFuncFromLibrary( "One", &OneAttr); /* install the type functions */ TypeObjFuncs[ T_INT ] = TypeIntSmall; diff --git a/tst/testbugfix/2012-12-06-t00266.tst b/tst/testbugfix/2012-12-06-t00266.tst index 467202a55f..ed673d3ba6 100644 --- a/tst/testbugfix/2012-12-06-t00266.tst +++ b/tst/testbugfix/2012-12-06-t00266.tst @@ -1,7 +1,7 @@ # 2012/12/06 (AK) gap> x := Indeterminate(Rationals); x_1 -gap> InverseSM(Zero(x)); +gap> InverseSameMutability(Zero(x)); fail gap> Inverse(Zero(x)); fail diff --git a/tst/testinstall/zmodnz.tst b/tst/testinstall/zmodnz.tst index 3fc67ecf97..e26b3e36a0 100644 --- a/tst/testinstall/zmodnz.tst +++ b/tst/testinstall/zmodnz.tst @@ -433,11 +433,11 @@ gap> m2 := Inverse(m); gap> IsOne( m * m2 ); IsOne( m2 * m ); true true -gap> m3 := InverseSM(m); IsMutable(m3); +gap> m3 := InverseSameMutability(m); IsMutable(m3); [ [ ZmodnZObj( 5, 6 ), ZmodnZObj( 5, 6 ) ], [ ZmodnZObj( 5, 6 ), ZmodnZObj( 4, 6 ) ] ] true -gap> m4 := InverseSM(Immutable(m)); IsMutable(m4); +gap> m4 := InverseSameMutability(Immutable(m)); IsMutable(m4); [ [ ZmodnZObj( 5, 6 ), ZmodnZObj( 5, 6 ) ], [ ZmodnZObj( 5, 6 ), ZmodnZObj( 4, 6 ) ] ] false diff --git a/tst/testspecial/bad-minus.g.out b/tst/testspecial/bad-minus.g.out index b216d361ad..ae0f01ff1b 100644 --- a/tst/testspecial/bad-minus.g.out +++ b/tst/testspecial/bad-minus.g.out @@ -6,7 +6,7 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `AdditiveInverseMutable' on 1 arguments at GAPROOT/lib/methsel2.g:LINE called from AdditiveInverseMutable( elm ) at GAPROOT/lib/arith.gi:LINE called from -AdditiveInverseAttr( elm ) at GAPROOT/lib/arith.gi:LINE called from +AdditiveInverseImmutable( elm ) at GAPROOT/lib/arith.gi:LINE called from 1 - "abc" at *stdin*:3 called from ( ) called from read-eval loop at *stdin*:5 diff --git a/tst/teststandard/arithlst.g b/tst/teststandard/arithlst.g index 659e9aee21..cdb8bdad79 100644 --- a/tst/teststandard/arithlst.g +++ b/tst/teststandard/arithlst.g @@ -129,23 +129,23 @@ end;; CheckMutabilityStatus := function( opname, list ) local attr, op, val, sm; - attr:= ValueGlobal( Concatenation( opname, "Attr" ) ); + attr:= ValueGlobal( Concatenation( opname, "Immutable" ) ); if ImmutabilityLevel( attr( list ) ) <> infinity then - error( opname, "Attr: mutability problem for ", list, + error( opname, "Immutable: mutability problem for ", list, " (", ImmutabilityLevel( list ), ")\n" ); fi; - op:= ValueGlobal( Concatenation( opname, "Op" ) ); + op:= ValueGlobal( Concatenation( opname, "Mutable" ) ); val:= op( list ); if val <> fail and IsCopyable( val ) and not IsMutable( val ) then - error( opname, "Op: mutability problem for ", list, + error( opname, "Mutable: mutability problem for ", list, " (", ImmutabilityLevel( list ), ")\n" ); fi; - sm:= ValueGlobal( Concatenation( opname, "SM" ) ); + sm:= ValueGlobal( Concatenation( opname, "SameMutability" ) ); val:= sm( list ); if val <> fail and IsCopyable( val ) and ImmutabilityLevel( sm( list ) ) <> ImmutabilityLevel( list ) then - error( opname, "SM: mutability problem for ", list, + error( opname, "SameMutability: mutability problem for ", list, " (", ImmutabilityLevel( list ), ")\n" ); fi; end;; @@ -227,8 +227,8 @@ ZeroTest := function( list ) Zero( list ), ListWithPrescribedHoles( list, Zero ) ); CheckMutabilityStatus( "Zero", list ); - CheckCompressionStatus( "ZeroAttr", list ); - CheckCompressionStatus( "ZeroSM", list ); + CheckCompressionStatus( "ZeroImmutable", list ); + CheckCompressionStatus( "ZeroSameMutability", list ); fi; end;; @@ -246,8 +246,8 @@ AdditiveInverseTest := function( list ) AdditiveInverse( list ), ListWithPrescribedHoles( list, AdditiveInverse ) ); CheckMutabilityStatus( "AdditiveInverse", list ); - CheckCompressionStatus( "AdditiveInverseAttr", list ); - CheckCompressionStatus( "AdditiveInverseSM", list ); + CheckCompressionStatus( "AdditiveInverseImmutable", list ); + CheckCompressionStatus( "AdditiveInverseSameMutability", list ); fi; end;; @@ -312,8 +312,8 @@ end;; OneTest := function( list ) if IsOrdinaryMatrix( list ) and Length( list ) = Length( list[1] ) then CheckMutabilityStatus( "One", list ); - CheckCompressionStatus( "OneAttr", list ); - CheckCompressionStatus( "OneSM", list ); + CheckCompressionStatus( "OneImmutable", list ); + CheckCompressionStatus( "OneSameMutability", list ); fi; end;; @@ -324,8 +324,8 @@ end;; InverseTest := function( list ) if IsOrdinaryMatrix( list ) and Length( list ) = Length( list[1] ) then CheckMutabilityStatus( "Inverse", list ); - CheckCompressionStatus( "InverseAttr", list ); - CheckCompressionStatus( "InverseSM", list ); + CheckCompressionStatus( "InverseImmutable", list ); + CheckCompressionStatus( "InverseSameMutability", list ); fi; end;; @@ -335,8 +335,8 @@ end;; ## TransposedMatTest := function( list ) if IsOrdinaryMatrix( list ) then - CheckCompressionStatus( "TransposedMatAttr", list ); - CheckCompressionStatus( "TransposedMatOp", list ); + CheckCompressionStatus( "TransposedMatImmutable", list ); + CheckCompressionStatus( "TransposedMatMutable", list ); fi; end;;