In general we try to keep GAP 4 compatible with former releases as much as possible. Nevertheless, from time to time it seems appropriate to remove some commands or to change the names of some commands or variables. There are various reasons for that: Some functionality was improved and got another (hopefully better) interface, names turned out to be too special or too general for the underlying functionality, or names are found to be unintuitive or inconsistent with other names.
In this chapter we collect such old names while pointing to the sections which explain how to substitute them. Usually, old names will be available for several releases; they may be removed when they don't seem to be used any more.
The obsolete GAP code is collected in two library files, lib/obsolete.gd
and lib/obsolete.gi
. By default, these files are read when GAP is started. It may be useful to omit reading these files, for example in order to make sure that one's own GAP code does not rely on the obsolete variables. For that, one can use the -O
command line option (see 3.1) or set the component ReadObsolete
in the file gap.ini
to false
(see 3.2). Note that -O
command line option overrides ReadObsolete
.
(Note that the condition whether the library files with the obsolete GAP code shall be read has changed. In GAP 4.3 and 4.4, the global variables GAP_OBSOLESCENT
and GAPInfo.ReadObsolete
–to be set in the user's .gaprc
file– were used to control this behaviour.)
The concept of a group action is sometimes referred to as a "group operation". In GAP 3 as well as in older versions of GAP 4 the term Operation
was used instead of Action
. We decided to change the names to avoid confusion with the term "operation" as in DeclareOperation
(79.18-6) and "operations for Xyz".
Here are some examples of such name changes.
OLD | NOW USE |
Operation |
Action (41.7-2) |
RepresentativeOperation |
RepresentativeAction (41.6-1) |
OperationHomomorphism |
ActionHomomorphism (41.7-1) |
FunctionOperation |
FunctionAction (41.12-4) |
With GAP 4.4 the package interface was changed. Thereby some functions became obsolete and the names of some others were made more consistent.
The following functions are no longer needed: DeclarePackage
, DeclareAutoPackage
, DeclarePackageDocumentation
and DeclarePackageAutoDocumentation
. They are substituted by entries in the packages' PackageInfo.g
files, see 76.3-12.
Furthermore, the global variable PACKAGES_VERSIONS
is no longer needed, since this information is now contained in the GAPInfo.PackagesInfo
record (see 3.5-1). The global variable Revisions
is also no longer needed, since the function DisplayRevision
was made obsolete in GAP 4.5.
The following function names were changed.
OLD | NOW USE |
RequirePackage |
LoadPackage (76.2-1) |
ReadPkg |
ReadPackage (76.3-1) |
RereadPkg |
RereadPackage (76.3-1) |
Former versions of GAP 4 documented several functions for computing the Smith or Hermite normal form of integer matrices. Some of them were never implemented and it was unclear which commands to use. The functionality of all of these commands is now available with NormalFormIntMat
(25.2-9) and a few interface functions.
In former releases of GAP 4 there were some global variable names bound to general information about the running GAP, such as path names or command line options. Although they were not officially documented they were used by several users and in some packages. We mention here BANNER
and QUIET
. This type of information is now collected in the global record GAPInfo
(3.5-1).
Here are some further name changes.
OLD | NOW USE |
MonomialTotalDegreeLess |
MonomialExtGrlexLess (66.17-14) |
NormedVectors |
NormedRowVectors (61.9-11) |
MutableIdentityMat |
IdentityMat (24.5-1) |
MutableNullMat |
NullMat (24.5-2) |
The operation PositionFirstComponent
has been deprecated in GAP 4.8 and later due to issues with its documentation and implementation. 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.
‣ InfoObsolete | ( info class ) |
is an info class to display warnings when an obsolete variable is used. By default, these warnings are switched off since the info level for this class is 0. Setting it to 1 will trigger warnings if GAP will detect that an obsolete variable is used at runtime (this detection is possible, however, only for obsolete variables declared using DeclareObsoleteSynonym
).
To check that the GAP code does not use obsolete variables at the parsing time, and not at a runtime, use -O
command line option, see 3.1.
Up to GAP 4.4, a file .gaprc
in the user's home directory (if available, and GAP was started without -r
option) was read automatically during startup, early enough for influencing the autoloading of packages and late enough for being allowed to execute any GAP code. On Windows machines this file was called gap.rc
.
In GAP 4.5 the startup mechanism has changed, see 3.2 for details. These new configuration files are now contained in a directory GAPInfo.UserGapRoot
.
For the sake of partial backwards compatibility, also the former file ~/.gaprc
is still supported for such initializations, but this file is read only if the directory GAPInfo.UserGapRoot
does not exist. In that case the ~/.gaprc
is read at the same time as gaprc
would be read, i. e., too late for influencing the startup of GAP.
As before, the command line option -r
disables reading ~/.gaprc
, see 3.1.
To migrate from the old setup to the new one introduced with GAP 4.5, first have a look at the function WriteGapIniFile
(3.2-3). Many users will find that all or most of what was set in the old ~/.gaprc
file can now be done via the user preferences in a gap.ini
file. If you had code for new functions or abbreviations in your old ~/.gaprc
file or you were reading additional files, then move this into the file gaprc
(without the leading dot, same name for all operating systems) in the directory GAPInfo.UserGapRoot
.
Until Version 4.8 of GAP there was inconsistent use of the following properties of semigroups: IsGroupAsSemigroup
, IsMonoidAsSemigroup
, and IsSemilatticeAsSemigroup
. IsGroupAsSemigroup
was true for semigroups that mathematically defined a group, and for semigroups in the category IsGroup
(39.2-7); IsMonoidAsSemigroup
was true for semigroups that mathematically defined monoids, but did not belong to the category IsMonoid
(51.2-1); and IsSemilatticeAsSemigroup
was simply a property of semigroups, there is no category IsSemilattice
.
From Version 4.8 onwards, IsSemilatticeAsSemigroup
is renamed IsSemilattice
, and IsMonoidAsSemigroup
returns true
for semigroups in the category IsMonoid
(51.2-1).
‣ IsSemilatticeAsSemigroup ( S ) | ( property ) |
IsSemilatticeAsSemigroup
returns true
if the semigroup S is a semilattice and false
if it is not.
A semigroup is a semilattice if it is commutative and every element is an idempotent. The idempotents of an inverse semigroup form a semilattice. This is identical to IsSemilattice
(Semigroups: IsSemilattice) # and is present in GAP 4.8 # only for the sake of compatibility with beta-releases. # It should not be used in new code.
generated by GAPDoc2HTML