# 2.8 Operations for Relations

`rel1 * rel2`

The operator `*` evaluates to the product of the two relations rel1 and rel2 if both have the same degree.

`rel * trans`
`trans * rel`

The operator `*` evaluates to the product of the relation rel and the transformation trans in the given order provided both have the same degree (see chapter Transformations).

`rel * perm`
`perm * rel`

The operator `*` evaluates to the product of the relation rel and the permutation perm in the given order provided both have the same degree (see chapter "Permutations").

`list * rel`
`rel * list`

The operator `*` evaluates to the list of products of the elements in list with the relation rel. That means that the value is a new list new such that `new[i] = list[i] * rel` or ```new[i] = rel * list[i]```, respectively.

`i ^ rel`

The operator `^` evaluates to the set of successors <i>^<rel> of the positive integer i under the relation rel if i is smaller than or equal to the degree of rel.

`set ^ rel`

The operator `^` evaluates to the image or the set set under the relation rel which is defined as the union of the sets of successors of the elements of set.

`rel ^ 0`

The operator `^` evaluates to the identity relation on n points if rel is a relation on n points (see IdentityRelation).

`rel ^ i`

For a positive integer i the operator `^` evaluates to the i-th power of the relation rel which is defined in the usual way as the i-fold product of rel by itself.

`rel ^ -1`

The operator `^` evaluates to the inverse of the relation rel. The inverse of a relation R subseteq {1, ..., n} x {1, ..., n} is given by {(y, x) | (x, y) in R}. Note that, in general, the product of a binary relation and its inverse is not equal to the identity relation. Neither is it in general equal to the product of the inverse and the binary relation.

Version 2.4 (May 1998)