<< Chapter < Page | Chapter >> Page > |
When using relations in logic formulas, there are two things going on:
We'll start with a couple of equivalent ways of defining relations, and then discuss a common subclass of relations: binary relations.
Consider the set of WaterWorld locations . For this domain (also known as a universe ), we'll say a binary relation is a set of (ordered) pairs of the domain.
For instance, the relation of the previous section is the set .
That is, is related to if is in the set .
For the domain , the relation might be .
In general, a binary relation over the domain is a subset of . Note that these are ordered pairs; just because is related to doesn't mean has the same relation to . For example, while is in the relation , the pair most certainly is not.
You can consider the relation , over the domain of Hollywood actors. We won't list all the elements ofthe relation, but some related pairs are:
If binary relations are subsets of pairs of the domain, what might a unary relation be? Simply, subsets of the domain.
For the domain of vegetables, Ian defines the relation as and nothing else.
In one particular game of WaterWorld, the relation turned out to be .
If unary and binary relations make sense,
what about ternary,
relation of arity) over the domain is a subset of . However, any given relation has a fixed arity.That is, a relation may be binary or ternary, but not both.
As with propositions, rather than writing
is true, we'll simply write
. In fact, notice that once you choose some particular pair of and , then can be treated as a single true/false proposition.(We'll soon extend the idea of propositions to include such relation symbols,and then allow formulas to include these terms .)
is a proposition that's false, assuming the standard interpretation of .
is a proposition that is true on some boards and not others.
The relation , which we're defining as a set (of pairs), could also be thought of being a function.We say that the indicator function of a set is a Boolean function indicating whether its inputis in the set or not. So instead of being given the set , you would have been equally happy withits indicator function , where (for example) and . Similarly, if you know that and that , then this is enough information to conclude that and . The set and the function are equivalent ways of modeling the same underlying relation.
Notification Switch
Would you like to follow the 'Intro to logic' conversation and receive update notifications?