Consider the interpersonal relations of a small sorority. There are just four members - Abby, Bess, Cody, and Dana.
Some of the girls like each other, but some do not. Our goal is to represent information about who likes whom. The table below shows one set of possibilities. The checkmark in the first row here means that Abby likes Cody, while the absence of a checkmark means that Abby does not like the other girls (including herself). Bess likes Cody too. Cody likes everyone but herself. And Dana also likes the popular Cody.
In order to encode this information in Relational Logic, we adopt a vocabulary with four object constants (abby, bess, cody, dana) and one binary relation constant (likes).
If we had complete information about the likes and dislikes of the girls, we could completely characterize the state of affairs as a set of ground relational sentences or negations of ground relational sentences, like the ones shown below, with one sentence for each member of the Herbrand base. (In our example here, we have written the positive literals in black and the negative literals in grey in order to distinguish the two more easily.)
To make things more interesting, let's assume that we do not have complete information, only fragments of information about the girls' likes and dislikes. Let's see how we can encode such fragments in Relational Logic.
Let's start with a simple disjunction. Bess likes Cody or Dana. Encoding a sentence with a disjunctive noun phrase (such as Cody or Dana) is facilitated by first rewriting the sentence as a disjunction of simple sentences. Bess likes Cody or Bess likes Dana. In Relational Logic, we can express this fact as a simple disjunction with the two possibilities as disjuncts.
likes(bess,cody) ∨ likes(bess,dana)
Abby likes everyone Bess likes. Again, paraphrasing helps translate. If Bess likes a girl, then Abby also likes her. Since this is a fact about everyone, we use a universal quantifier.
∀y.(likes(bess,y) ⇒ likes(abby,y))
Cody likes everyone who likes her. In other words, if some girl likes Cody, then Cody likes that girl. Again, we use a universal quantifier.
∀y.(likes(y,cody) ⇒ likes(cody,y))
Bess likes somebody who likes her. The word somebody here is a tip-off that we need to use an existential quantifier.
∃y.(likes(bess,y) ∧ likes(y,bess))
Nobody likes herself. The use of the word nobody here suggests a negation. A good technique in such cases is to rewrite the English sentence as the negation of a positive version of the sentence before translating to Relational Logic.
Everybody likes somebody. Here we have a case requiring two quantifiers, one universal and one existential. The key to this case is getting the quantifiers in the right order. Reversing them leads to a very different statement.
There is someone everyone likes. The preceding sentence tells us that everyone likes someone, but that someone can be different for different people. This sentence tells us that everybody likes the same person.
Use the arrow keys to navigate. Press the escape key to toggle all / one.