The properties of an object are those of its attributes (see Attributes)
whose values can only be true or false.
The main difference between attributes and properties is that a
property defines two sets of objects, namely the usual set of all
objects for which the value is known, and the set of all objects for
which the value is known to be true.
(Note that it makes no sense to consider a third set, namely the set
of objects for which the value of a property is true whether or not
it is known, since there may be objects for which the containment in
this set cannot be decided.)
For a property prop, the containment of an object obj in the first
set is checked again by applying Tester( prop ) to obj,
and obj lies in the second set if and only if
Tester( prop )( obj ) and prop( obj ) is true.
If a property value is known for an immutable object then this value is also stored, as part of the type of the object. To some extent, property values of mutable objects also can be stored, for example a mutable list all of whose entries are immutable can store whether it is strictly sorted. When the object is mutated (for example by list assignment) the type may need to be adjusted.
Important properties for domains are IsAssociative, IsCommutative,
IsAnticommutative, IsLDistributive, and IsRDistributive,
which mean that the multiplication of elements in the domain satisfies
(a \* b ) \* c = a \* ( b \* c ), a \* b = b \* a,
a \* b = - ( b \* a ), a \* ( b + c ) = a \* b + a \* c,
and ( a + b ) \* c = a \* c + b \* c, respectively,
for all a, b, c in the domain.
KnownPropertiesOfObject( object ) O
returns a list of the names of the properties whose values are known for object.
KnownTruePropertiesOfObject( object ) O
returns a list of the names of the properties known to be true for
object.
gap> g:=Group((1,2),(1,2,3));; gap> KnownPropertiesOfObject(g); [ "IsFinite", "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", "IsGeneratorsOfMagmaWithInverses", "IsAssociative", "IsFinitelyGeneratedGroup", "IsSubsetLocallyFiniteGroup", "KnowsHowToDecompose", "IsChainTypeGroup", "IsStabChainViaChainSubgroup" ] gap> Size(g); 6 gap> KnownPropertiesOfObject(g); [ "IsEmpty", "IsTrivial", "IsNonTrivial", "IsFinite", "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", "IsGeneratorsOfMagmaWithInverses", "IsAssociative", "IsFinitelyGeneratedGroup", "IsSubsetLocallyFiniteGroup", "KnowsHowToDecompose", "IsPerfectGroup", "IsSolvableGroup", "IsPolycyclicGroup", "IsChainTypeGroup", "IsStabChainViaChainSubgroup" ] gap> KnownTruePropertiesOfObject(g); [ "IsNonTrivial", "IsFinite", "CanEasilyCompareElements", "CanEasilySortElements", "IsDuplicateFree", "IsGeneratorsOfMagmaWithInverses", "IsAssociative", "IsFinitelyGeneratedGroup", "IsSubsetLocallyFiniteGroup", "KnowsHowToDecompose", "IsSolvableGroup", "IsPolycyclicGroup" ]
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual