Mathematically, a relation on a set X is a subset of
X ×X. In GAP a relation on X is a general mapping
from X to itself. In fact, the category IsBinaryRelation is
the same as the category IsEndoGeneralMapping.
Of course, a binary relation can have the properties:
IsReflexiveBinaryRelation, IsTransitiveBinaryRelation and
IsSymmetricBinaryRelation. When all three are true, we call
the relation an equivalence relation.
IsBinaryRelation( R ) C
IsBinaryRelation(R) is true precisely when IsEndoGeneralMapping(R) is true.
IsSymmetricBinaryRelation( rel ) P
IsTransitiveBinaryRelation( rel ) P
IsReflexiveBinaryRelation( rel ) P
Properties of binary relations. Note that a reflexive binary relation is necessarily total.
IsEquivalenceRelation( Relation ) C
An equivalence relation is a symmetric, transitive, reflexive binary relation.
EquivalenceRelationPartition( equiv ) A
EquivalenceRelationPartition returns a list of lists of elements. The lists are precisely the nonsingleton equivalence classes. This allows us to describe ``small'' equivalences on infinite sets.
EquivalenceRelationByPartition( domain, list ) F
domain is the domain over which the relation is defined, and list is a list of lists, each of these is a list of elements of domain which are related to each other. list need only contain the nontrivial blocks and will ignore singletons.
IsEquivalenceClass( O ) C
An equivalence class is a collection of elements which are mutually related to each other in the associated equivalence relation. Note, this is a special category of object and not just a list of elements.
EquivalenceClassRelation( C ) A
The equivalence relation of which C is a class.
EquivalenceClasses( rel ) A
The set of all equivalence classes of the equivalence relation rel.
EquivalenceClassOfElement( rel, elt ) O
EquivalenceClassOfElementNC( rel, elt ) O
The equivalence class of elt in rel. In the second form, it is not checked that elt is in the domain over which rel is defined.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual