The following attributes and properties for elements and domains correspond to the operational structure.
Characteristic( obj ) A
Characteristic returns the characteristic of obj,
where obj must either be an additive element, a domain or a family.
For a domain D, the characteristic is defined if D is closed under
addition and has a zero element z = Zero( D ) (see Zero);
in this case, Characteristic( D ) is the smallest positive integer
p such that p * x = z for all elements x in D,
if such an integer exists, and the integer zero 0 otherwise.
If a family has a characteristic then this means that all domains of elements in this family have this characteristic. In this case, also each element in the family has this characteristic. (Note that also the zero element z of a finite field in characteristic p has characteristic p, although n \* z = z for any integer n.)
One( obj ) A
Identity( obj ) A
OneOp( obj ) O
One and OneOp return the multiplicative neutral element of the
multiplicative element obj.
Identity is a synonym for One.
The only difference between One and OneOp is that the former is an
attribute and hence returns an immutable result,
and the latter is guaranteed to return a new mutable object whenever
a mutable version of the required element exists in GAP.
If obj is a domain or a family then One is defined as the identity
element of all elements in obj,
provided that all these elements have the same identity.
For example, the family of all cyclotomics has the identity element 1,
but a collections family (see CollectionsFamily) may contain
matrices of all dimensions and then it cannot have a unique identity
element.
Note that One is applicable to a domain only if it is a
magma-with-one (see IsMagmaWithOne);
use MultiplicativeNeutralElement (see MultiplicativeNeutralElement)
otherwise.
If obj is a multiplicative element then OneOp( obj ) is equivalent
to obj^0.
The identity of an object need not be distinct from its zero, so for example a ring consisting of a single element can be regarded as a ring-with-one (see Rings). This is particularly useful in the case of finitely presented algebras, where any factor of a free algebra-with-one is again an algebra-with-one, no matter whether or not it is a zero algebra.
The default method of One for multiplicative elements is to call
OneOp (note that OneOp must not delegate to One);
other methods to compute identity elements need to be installed only for
OneOp.
For domains, One may call Representative (see Representative),
but Representative is allowed to fetch the identity of a domain D
only if HasOne( D ) is true.
Zero( obj ) A
ZeroOp( obj ) O
Zero and ZeroOp return the additive neutral element of the additive
element obj.
The only difference between Zero and ZeroOp is that the former is an
attribute and hence returns an immutable result,
and the latter is guaranteed to return a new mutable object whenever
a mutable version of the required element exists in GAP.
If obj is a domain or a family then Zero is defined as the zero
element of all elements in obj,
provided that all these elements have the same zero.
For example, the family of all cyclotomics has the zero element 0,
but a collections family (see CollectionsFamily) may contain
matrices of all dimensions and then it cannot have a unique zero element.
Note that Zero is applicable to a domain only if it is an
additive magma-with-zero (see IsAdditiveMagmaWithZero);
use AdditiveNeutralElement (see AdditiveNeutralElement) otherwise.
If obj is an additive element then ZeroOp( obj ) is equivalent to
0 * obj.
The default method of Zero for additive elements is to call ZeroOp
(note that ZeroOp must not delegate to Zero);
other methods to compute zero elements need to be installed only for
ZeroOp;
For domains, Zero may call Representative (see Representative),
but Representative is allowed to fetch the zero of a domain D
only if HasZero( D ) is true.
MultiplicativeZeroOp( elt ) O
returns the element z in the family F of elt with the property that z * m = z = m * z holds for all m Î F, if such an element is known.
Families of elements in the category IsMultiplicativeElementWithZero often arise from adjoining a new zero to an existing magma. See InjectionZeroMagma for details.
IsOne( elm ) P
is true if elm = One( elm ), and false otherwise.
IsZero( elm ) P
is true if elm = Zero( elm ), and false otherwise.
Inverse( elm ) A
InverseOp( elm ) O
Inverse and InverseOp return the multiplicative inverse
of an element elm, that is, an element inv such that
elm * inv = inv * elm = One( elm ) holds;
if elm is not invertible then fail (see Fail) is returned.
Note that the above definition implies that a (general) mapping
is invertible in the sense of Inverse only if its source equals its
range (see Technical Matters Concerning General Mappings).
For a bijective mapping f whose source and range differ,
InverseGeneralMapping (see InverseGeneralMapping) can be used
to construct a mapping g with the property
that f * g is the identity mapping on the source of f
and g * f is the identity mapping on the range of f.
The only difference between Inverse and InverseOp
is that the former is an attribute and hence returns an immutable result,
and the latter is guaranteed to return a new mutable object whenever
a mutable version of the required element exists in GAP.
InverseOp( elm ) is equivalent to elm^-1.
The default method of Inverse is to call InverseOp
(note that InverseOp must not delegate to Inverse);
other methods to compute additive inverses need to be installed only for
InverseOp.
AdditiveInverse( elm ) A
AdditiveInverseOp( elm ) O
AdditiveInverse and AdditiveInverseOp return the additive inverse
of elm.
The only difference between AdditiveInverse and AdditiveInverseOp
is that the former is an attribute and hence returns an immutable result,
and the latter is guaranteed to return a new mutable object whenever
a mutable version of the required element exists in GAP.
AdditiveInverseOp( elm ) is equivalent to -obj.
The default method of AdditiveInverse is to call AdditiveInverseOp
(note that AdditiveInverseOp must not delegate to AdditiveInverse);
other methods to compute additive inverses need to be installed only for
AdditiveInverseOp.
Order( elm ) A
is the multiplicative order of elm.
This is the smallest positive integer n such that
elm^n = One( elm ) if such an integer exists. If the order is
infinite, Order may return the value infinity, but it also might run
into an infinite loop trying to test the order.
LieObject( obj ) A
Let obj be a ring element. Then LieObject( obj ) is the
corresponding Lie object. If obj lies in the family F,
then LieObject( obj ) lies in the family LieFamily( F )
(see LieFamily).
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual