Some binary relations have a special property: each element of the domain occurs as the first item in exactly one tuple. For example, isPlanet = {(Earth, true) , (Venus, true) , (Sol, false) , (Ceres, false) , (Mars, true)}is actually a (unary) function. On the other hand, isTheSquareOf = {(0, 0) , (1, 1) , (1, −1) , (4, 2) , (4, −2) , (9, 3) , (9, −3) ,...} is not a function, for two reasons. First, some numbers occur as the first element of multiple pairs. Second, some numbers, like 3, occurs as the first element of no pairs.
We can generalize this to relations of higher arity, also. This is explored in this exercise (Exercise 4.4.2) and this one (Exercise 4.4.3).
- 1281 reads