Skip to main content

Subsection 6.3.1 Choosing Appropriate Predicates

When we’re writing mathematics, it’s usually clear what predicates we should define. When we’re expressing formal claims about databases, we choose predicates that correspond to the fields and values in the database we’re working with. When we’re stating program specifications, we generally know what values of what objects are important.

But the story is very different when we want to encode facts about our complex world. Very quickly it becomes obvious that we won’t be able to capture every aspect of everything. We will have to simplify. The key is that we have to simplify in a way that lets us accomplish all the reasoning that we care about.

Thus, one of the hardest things to do, when we try to encode facts about our complex world, is to choose appropriate predicates.

In our Bad Movie example, we used the predicate:

InClass(x): True if x is in our class.

That worked fine when all we cared about was reasoning about our classmates and their movie preferences.

But, suppose we’d wanted to reason more generally about the fact that various classes have different tastes and tendencies. Then, almost surely, we’d have needed something more like:

InClass(x, y): True if person x is in class y.

For example, now we could say that someone can’t be in more than one class:

[1] x, y, z ((InClass(x, y)  InClass(x, z))  (y = z))

We couldn’t say that before.

We’ve already seen some other examples of this problem:

Should we have:

HasLostWallet(x) or HasLost(x, y)

Should we have:

HasTenockritus(x) or HasDisease(x, Tenockritus)

A general rule of thumb is that if your predicate names get very long, you’re probably trying to roll too much into a single predicate. If you want to be able to generalize what you know, even a little bit, it is probably a good idea to break the complex predicate apart into meaningful units.

But very short predicate names can also be symptoms of a problem.

Should we use the very simple predicate Has in all of these example:

[1] John has tenockritus. Has(John, Tenockritus)

[2] All bears have tails. x (Bear(x)  Has(x, Tail))

[3] Terry has a red car. x (Has(Terry, x)  Car(x)  ColorOf (x, Red))

[4] Kerry has a crush on Chris. x (Has(Kerry, x)  Crush(x)  CrushObject(x, Chris))

It’s hard to find anything meaningful (about which we might want to prove something) in common across these four examples. [1] describes a disease state. [2] describes a part/whole relationship. [3] describes ownership. And [4] corresponds to an idiom that happens to include the word, “has”.

On the other hand, if we have a problem and we want to reason about it, we will never get off the ground if we try to imagine every possible generalization and every possible related problem that we might, someday, decide to pursue. So it’s necessary to stop someplace.

Big Idea

There’s no perfect set of predicates. Just ones that get the job done.

Exercises Exercises

1.

1. Suppose that we have chosen some predicates that allow us to write, among other things:

[1] ∀x (SpeakEnglish(x) → CanCope(x, Europe))

Now we want to say some more things. Consider each of the following claims:

I. Every employee speaks at least two languages.

II. English speakers have a big advantage in international business.

III. Learning one European language isn’t hard if you already speak another one.

IV. Kerry speaks English and Chinese.

For which (one or more) of them can we make use of the SpeakEnglish predicate that we already have?

  1. I and II.

  2. I and III.

  3. I and IV.

  4. II and III.

  5. II and IV.

Answer.
Correct answer is E.
Solution.
Explanation: For I, we need something like Speaks(x, l), where x would be a person and l would be a language. Then we could say that there must be two. For III, again, we want the generalization of being a language. We might want Speaks(x, l), then LanguageFamily(l, f), where f could take on the value European. II and IV, since they talk specifically about English and not about languages in general, can use SpeakEnglish.

2.

Back in our discussion of Boolean logic, we were forced to let single Boolean variables stand for arbitrarily complex ideas. We didn’t have the tools of predicate logic to work with. But now we do.

Recall that we attempted to represent, “We’ll have chips but no peanuts at the party.” We defined:

C : We’ll have chips at the party.

P: We’ll have peanuts at the party.

Then we wrote:

[1] C ∧ ¬P

Now let’s do this one in predicate logic. We could start by defining:

HaveAtParty(x, y): True if there will be x at party y.

Let's give the name TheParty to the party we are talking about.  Then we could write:

[2] HaveAtParty(Chips, TheParty) ∧ ¬HaveAtParty(Peanuts, TheParty)

But now suppose that we want to ask whether there will be food at the party. In other words, can we prove:

[3] HaveAtParty(Food, TheParty)

Consider the following additional premises that we might add to [2]:

I. Food(Chips)

II. ∀x (Party(x) → HasFood(x))

III. HaveAtParty(Chips) → HaveAtParty(Food)

IV. HaveAtParty(Burgers) → HaveAtParty(Food)

Which of them would be sufficient to allow us to conclude that there would be food at the party? (Be as flexible as you like with how you would represent the fact that there would be food at the party. But don’t add any additional premises.)

  1. Just I

  2. Just II

  3. Just III

  4. Just IV

  5. There is more than one way to do it.

Answer.
Correct answer is E
Solution.
Explanation: I doesn’t help at all. There’s no way to tie the Food claim to the HaveAtParty claim. II works, but it ignores what we know about our particular party. III works. But notice that it doesn’t generalize about chips being food. For example, if we knew that we had chips and we were hungry and needed food, we wouldn’t realize that we actually had food. IV doesn’t help because we don’t know that there will be burgers.