<< Chapter < Page | Chapter >> Page > |
How shall we encode concepts such as
location has 3 dangerous neighbors, using relations?
A good first guess might be to say we have a function which returns the number of pirates next to a given location.That is,
. However,
doesn't qualify as a relation. Why not?
To work around this, we could propose a binary relation along the lines of
. This is better, but it requires our domainto be not only board locations, but also numbers. And to be able to talk about numbers, we'd need more axioms,as well as numeric relations such as>.
>?
Okay, the third time's the charm: we'll implement the concept
neighbors three piratesas a relation being true. To cover the cases when there are exactly two neighboring pirates,we'll use a whole new separate relation,
; would be false on any board where is true (at least, in our standard interpretation).
Proofs otherwise unchanged.Note that we might express our rules as
for any locations and , we have the following axiom:. Really, note that there's something else going on here: and are symbols which can represent any location: they are variables, whose value can be any element of the domain.
For the domain of types-of-vegetables, the relation is a useful one to know, when cooking. In case you weren't sure, , and .
Suppose we had a second relation, . Is it conceivable that we could model a vegetable that's neitheryucky nor yummy, using these relations? Sure! (Iceberg lettuce, perhaps.)In fact, we could even have a vegetable which is both yummy and yucky — radishes!
Notification Switch
Would you like to follow the 'Intro to logic' conversation and receive update notifications?