Incomplete draft: do not cite!

Thus far, we've only considered relations between pairs of things: binary relations.  But everyday life is full of relationships between more than two things.  For example, the word “between” expresses a relationship between three things: the thing on one side, the thing on the other, and the thing in-between.  We say between is a ternary relation (a relation between triples of things).  More generally, a relation between tuples of \(n\) objects is called an \(n\)-ary relation.  These are defined the same way as binary relations: as sets of tuples of objects for which they hold.  The only difference is that we use an \(n\)-tuple rather than a pair.

In this book, most of our work will be with binary relations.  However, when we get to logic and logic programming, then it will be natural to work with \(n\)-ary relations.