Quantifiers in first order logic

55 Views Asked by At

I am trying to express the following sentence in first order logic with quantifiers:

All cats like to eat any mouse

Using the following properties and relation:

Properties: Cat, Mouse

Relation: LikesToEat

Here's my attempt, however I am not quite sure if that's the right representation:

$$\forall x(Cat(x) \to \forall y(Mouse(y) \land LikesToEat(x,y)))$$

1

There are 1 best solutions below

0
On

Close, but you should be nesting the statement like so:

  • If any $x$ is a cat, then if any $y$ is a mouse, then that $x$ likes to eat that $y$.

$$\forall x~\bigl(\operatorname{Cat}(x)\to \forall y~(\operatorname{Mouse}(y)\to\operatorname{LikesToEat}(x,y))\bigr)$$

Or even$$\forall x~\forall y~\bigl(\operatorname{Cat}(x)\to (\operatorname{Mouse}(y)\to\operatorname{LikesToEat}(x,y))\bigr)$$


You can also write this as

  • If any $x$ is a cat and any $y$ is a mouse, then that $x$ likes to eat that $y$.

$$\forall x~\forall y~\bigl((\operatorname{Cat}(x)\wedge\operatorname{Mouse}(y))\to\operatorname{LikesToEat}(x,y)\bigr)$$