Help with First Order Logic

538 Views Asked by At

I am having a hard time understanding how to represent sentences in first order logic. Here is an example I am trying to understand, but I really can't:

enter image description here

enter image description here

There's another slide I cannot upload (don't have enough reputation), which says:

The "all its children can fly" part needs to be read as: "if it's a child of the elephant, then it can fly"

This will be inside another if-then statement: "if all the children of an elephant can fly, then the elephant is happy"

Then, we need a third implication to say that if something is an elephant, then, if all its children can fly, it is happy.

The original sentence seems to implicitly state that children of an elephant could also not fly, while according to the explanation: if one is a child, then it can fly (as if this was a direct implication). This seems wrong to me.

I would have said that the 4) is the right answer. I can't understand why 1) is correct instead.

1

There are 1 best solutions below

3
On BEST ANSWER

Let's look at the last part of (4):

$$\forall y[(child(y, x)\wedge fly(y))\implies happy(x)].$$ Note that I've changed a pair of curved braces to square braces for improved readability.

The problem is that "$\forall y$" binds too much: the expression above says

$(*)\quad$ For all $y$, if $y$ is a child of $x$ that flies then $x$ is happy.

Now let's imagine an $x$ that has two children $a$ and $b$, and $a$ flies and $b$ doesn't. Then:

  • Clearly $x$ shouldn't be happy.

  • BUT, $a$ is a child of $x$ that flies! And $(*)$ says that for any child of $x$, if that child flies then $x$ is happy. So since $a$ flies, $x$ is happy.

This is an instance of the following derivation:

"$\forall y(P(y)\implies Q(x))$" and "$P(a)$" together imply "$Q(x)$".

Basically, "$\forall y(P(y)\implies Q(x))$" means that any $y$ satisfying $P$ triggers the consequent $Q(x)$.