# Bit confused on how to convert this statement to a predicate logic formula?

'Only red dogs like eating and sleeping'

The use of the word 'only' here has me stumped as I'm not sure how to convey this concept using predicate logic. For example if I was saying red dogs like sleeping I'd do something like:

(∀X•(redDog(X) ⇒ sleeping(X)))

How would I convert my top statement into a predicate formula?

• Hint : The "only" means that if something likes eating AND sleeping, then it must be a red dog. Mar 1 '16 at 21:18
• (($\forall X$(eating($X$)$\wedge$ sleeping($X$) $\Rightarrow$ redDog($X$))) Mar 1 '16 at 21:21
• Aaah I see...that's clever haha I didn't think to write it that way, thanks a lot guys I appreciate it Mar 1 '16 at 21:26

It's a bit of a trick question, because it is not really about understanding predicate logic, but about being aware of the particular ritualized way the word "only" is used in mathematical English.

In mathematical English, saying

Only dogs like eating.

is exactly the same as saying

There is nothing that likes eating and is not a dog.

or (equivalently)

Everything that likes eating is a dog.

That's not a matter of logic, but is simply a linguistic convention.

Unfortunately, this convention is by itself not quite enough to unravel the meaning of your sentence,

Only red dogs like eating and sleeping.

On one end, it is unclear how the qualifier "red" is applied. Depending on the context the sentence can mean either of

Everything that likes eating and sleeping is a red dog.
Every dog that likes eating and sleeping is red.

(which mean different things; for example the former implies that a white cat won't like eating and sleeping whereas the latter doesn't) and it is not possible to know which of these is actually meant without guessing what makes most sense in the context. This ambiguity is part of the reason why one might want to use formal logic in order to be precise.

A second ambiguity is in how "eating" and "sleeping" is combined. In ordinary everyday English the sentence could mean either of

Only red dogs like both of eating and sleeping.
Only red dogs like eating, and only red dogs like sleeping.

In a classroom excercise like this you can be reasonably confident that the former of these is meant -- but don't expect this to be true about mathematical writing in general!

• Definitely a bit of a sneaky question haha I didn't think of it that way at all. Thanks for the explanation I appreciate it Mar 1 '16 at 21:30