Every bee hates all flowers

127 Views Asked by At

I'm trying to translate the following statement to predicate logic:

Every bee hates all flowers.

Let

  • $B(x)$: $x$ is a bee.

  • $F(x)$: $x$ is a flower.

  • $L(x,y)$: $x$ loves $y$.

I came up with these two solutions:

$$(\forall x)[B(x) \to (\forall y)(F(y) \to L’(x,y))]$$

and

$$(\forall x)[F(x)→(\forall y)(B(y) \to L’(y,x))]$$

I feel as though they both say the same thing, but I'm not so sure. The first says

for all things $x$, if $x$ is a bee, and for all things $y$, $y$ is a flower, then $x$ hates $y$.

The second says

for all things $x$, if $x$ is a flower, and for all things $y$, $y$ is a bee, then $y$ hates $x$.

Are they both correct?

2

There are 2 best solutions below

2
On BEST ANSWER

Great intuition, sandwich610! Yes, they are correct and logically equivalent. Proof of their equivalence is as follows:

$\forall x[B(x) \rightarrow \forall y(F(y) \rightarrow \neg L(x,y))]$

$\Leftrightarrow \forall x \forall y [B(x) \rightarrow (F(y) \rightarrow \neg L(x,y))]$ by null quantification law

$\Leftrightarrow \forall x \forall y [(B(x) \wedge F(y)) \rightarrow \neg L(x,y)]$ by exportation rule

$\Leftrightarrow \forall x \forall y [(F(y) \wedge B(x)) \rightarrow \neg L(x,y)]$ by commutative rule

$\Leftrightarrow \forall x \forall y [F(y) \rightarrow (B(x) \rightarrow \neg L(x,y))]$ by exportation rule

If the quantifiers of a propositional function are either all universal or all existential, then their order is irrelevant. Hence,

$\Leftrightarrow \forall y \forall x [F(y) \rightarrow (B(x) \rightarrow \neg L(x,y))]$

$\Leftrightarrow \forall y [F(y) \rightarrow \forall x(B(x) \rightarrow \neg L(x,y))]$ by null quantification

Since the choice of $x$ or $y$ is arbitrary, we can swap them as long as we are consistent. Hence,

$\Leftrightarrow \forall x [F(x) \rightarrow \forall y(B(y) \rightarrow \neg L(y,x))]$ by null quantification

Therefore,

$\forall x[B(x) \rightarrow \forall y(F(y) \rightarrow \neg L(x,y))] \Leftrightarrow \forall x [F(x) \rightarrow \forall y(B(y) \rightarrow \neg L(y,x))]$


I would like to make a small correction to the natural interpretation of your statements, however. The first statement $\forall x[B(x) \rightarrow \forall y(F(y) \rightarrow \neg L(x,y))]$ reads as:

"For all things x, if x is a bee, then for all things y, if y is a flower, then x hates y."

The second statement $\forall x [F(x) \rightarrow \forall y(B(y) \rightarrow \neg L(y,x))]$ reads as:

"For all things x, if x is a flower, then for all things y, if y is a bee, then y hates x."

1
On

Those are both correct and equivalent. In general, we're safe to move the quantifiers outside so long as we don't change which variable is referred to.

So first we can move them outside to get:

$(\forall x)(\forall y)[B(x)→F(y)→L’(x,y)]$

and

$(\forall x)(\forall y)[F(x)→B(y)→L’(y,x)]$

Now, we're free to rename variables so long as we don't change the quantifiers they refer to, so swap x and y in the second to get:

$(\forall y)(\forall x)[F(y)→B(x)→L’(x,y)]$

We're also free to reorder quantifiers, so long as there's no dependencies that cause an issue (and there isn't here between the two foralls).

$(\forall x)(\forall y)[F(y)→B(x)→L’(x,y)]$

Now are two statements are:

$(\forall x)(\forall y)[B(x)→F(y)→L’(x,y)]$

and

$(\forall x)(\forall y)[F(y)→B(x)→L’(x,y)]$

These are obviously equivalent, since we can change the order of the two parameters on the left of the implications (requiring X and then Y is same as requiring Y and then X).