2
$\begingroup$

Given the following set of predicates:

$$\{cat(x), dog(x), love(x, y), hate(x, y)\}$$

How would you transform the following English statement into First Order Logic...

Statement: "All cats either love or hate dogs."

I came up with two possible ways to represent the statement, I am leaning towards the first, but I can also see the second being correct. Can someone give me some reasoning why one would be more correct than the other?

$$ \forall x \forall y (cat(x) \implies dog(y) \land [love(x, y) \lor hate(x, y)]) $$

$$ \forall x \forall y (cat(x) \land dog(y) \implies [love(x,y) \lor hate(x,y)])$$

$\endgroup$
  • 2
    $\begingroup$ The second thing looks right to me. $\endgroup$ – Akiva Weinberger Oct 2 '15 at 2:06
  • $\begingroup$ The given statement is somewhat ambiguous. I think the intended meaning is that every cat either loves all dogs or hates all dogs. But it could be interpreted in a way that allows a cat to love some dogs and hate others. It could also be interpreted to mean that either all cats love all dogs or all cats hate all dogs. Unfortunately, you can't translate ambiguity into first-order logic; you'll need to decide what the statement is supposed to mean before you can seriously consider writing it in first-order logic. $\endgroup$ – Andreas Blass Oct 2 '15 at 16:05
5
$\begingroup$

Neither of your suggestions captures the meaning I get from the original sentence.

However, the second one is the most wrong. It will be true as soon as there exists anything that is not a dog. Namely, no matter what $x$ is, you can choose the non-dog to be $y$, and then ${\rm cat}(x)\land{\rm dog}(y)$ will be false, which automatically makes the entire implication true.

The first one is better, but what it says is that every cat either loves or hates some dog. I would understand the sentence in the problem as saying that every cat belongs to one of two types: those that hate all dogs, and those that love all dogs. And that's not what your suggestion expresses.

$\endgroup$
  • $\begingroup$ Sorry there was a typo in both, I meant $$\forall x \forall y$$ I will edit the question $\endgroup$ – ak1 Oct 2 '15 at 1:19
  • 2
    $\begingroup$ @ak1 The first of your two new suggestions is false whenever there exists at least one cat and at least one thing (such as that cat) that is not a dog. $\endgroup$ – hmakholm left over Monica Oct 2 '15 at 1:21
  • $\begingroup$ Is it not implied that the thing Y will always be a dog in the right hand side of the implication? $\endgroup$ – ak1 Oct 2 '15 at 1:24
  • $\begingroup$ Never-mind, I understand why the first one is incorrect now. Because the truth of the implication is dependent on the right hand side being true as well. And in the case that dog(y) turns out to be false, my implication falls apart. Thanks for the enlightening comment. So I did have the correct answer, it was just not what I was leaning towards. $\endgroup$ – ak1 Oct 2 '15 at 1:37
1
$\begingroup$

Statement: "All cats either love or hate dogs."

I am sure there are different ways to interpret this statement, but how about:

$\forall x:[ Cat(x)\implies \neg Dog(x)]$

$\space\space\space\land \forall x:[Cat(x) \implies \forall y:[Dog(y) \implies Loves(x,y) \land \neg Hates(x,y)]$

$\space\space\space\space\space\space\lor \space \forall y:[Dog(y) \implies \neg Loves(x,y) \land Hates(x,y)]] $

Here, I assume:

  1. No cat can be a dog, and no dog can be a cat.
  2. No cat can both love and hate any dog.
  3. Every cat either loves all dogs or it hates all dogs. The original statement seems to rule out the possibility of a cat loving some dogs and hating others.

EDIT:

If you want to allow the possibility of an individual being both a dog and a cat and both loving and hating itself, as has been suggested, you could simplify matters:

$\forall x:[Cat(x) \implies \forall y :[Dog(y) \implies Loves(x,y)]\lor \forall y:[Dog(y) \implies Hates(x,y)] $

$\endgroup$
  • $\begingroup$ Why are you making assumptions 1 and 2? They're not in the question. $\endgroup$ – Najib Idrissi Oct 2 '15 at 15:25
  • $\begingroup$ Good point. See edit. $\endgroup$ – Dan Christensen Oct 2 '15 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.