3
votes

in first order logic, i know the rules. However, whenever i convert some sentences into FOL, i get errors, I read many books and tutorials, do u have any tricks that can help me out,

some examples where i makes errors

Some children will eat any food

C(x) means “x is a child.”
F(x) means “x is food.”
Eat(x,y) x eats y
I would have written like this:

(∃x)(∀y) C(x) ∧ Eat(x,y)

edit:  (∃x)(∀y) C(x) ∧  F(y) ∧ Eat(x,y)

But the book write it like this

(∃x)(C(x) ∧ (∀y)(F(y)→Eat(x,y)))

Edit No2: 2nd Type of error i'm making: Turtles outlast Rabbits.

i'm writing it like this: ∀x,y Turtle(x)  ∧  Rabbit(y)  ∧ Outlast(x,y)

 but according to the book  ∀x,y Turtle(x)  ∧  Rabbit(y)  --> Outlast(x,y)

Of course, I agree with the book, but is there any problem with my version !!

3
You should describe the errors... - gary
@gary comtois,Hi, I modified the question with one type of error i'm making - Noor

3 Answers

3
votes

From

∃x ∀y [C(x) ∧ F(y) ∧ Eat(x, y)]

it follows that ∀y F(y), i.e. everything is food. ("There exists a child x such that for all y, y is food" and a bunch of other propositions hold.) It also follows that the child eats itself: if we denote the child by an arbitrary constant c and fill that in, we get

∀y [C(c) ∧ F(y) ∧ Eat(c, y)]

and since y is universally quantified, we can instantiate it by replacing it with c to get

C(c) ∧ F(c) ∧ Eat(c, c)

which is an undesirable state of affairs.

From your second example

∀x ∀y [Turtle(x) ∧ Rabbit(y) ∧ Outlasts(x, y)]

it follows that

∀x Turtle(x) ∧ ∀y Rabbit(y) ∧ ∀x ∀y Outlasts(x, y)

I.e., everything is a turtle, everything is a rabbit, and everything outlasts everything, including itself.

The version in your book uses → to indicate that for every object y, if it is food, then it is eaten by x. You need a conditional to express sentences of the form "all Xs are Ys" or "every X does Y".

2
votes

Whenever you have determiner every (or any or no) in an English sentence the corresponding FOL sentence should have both a universal quantifier and an implication in it. E.g. the translation template for the noun phrase every man would be:

∀ x (man(x) ⇒ ...)

If your English sentence does not contain any determiners, then reformulate it so that every noun in it would come with a determiner. This way the mapping to FOL becomes clear. E.g. the ambiguous/vague sentence

Turtles outlast Rabbits.

could be reformulated in several semantically different ways:

  • Every turtle outlasts every rabbit.
  • There are some turtles that outlast every rabbit.
  • There are some turtles that outlast some rabbits.
  • Most turtles outlast most rabbits.
  • ...

Btw, there is an online tool APE that converts English sentences into FOL provided that you first reformulate your sentences so that they fall into the fragment of English that this tool supports. Note however that this tool returns a single FOL reading, i.e. it does not enumerate all the ambiguity the input might contain.

1
votes

You didn't check whether y was food first. Considering your statement, let a be a children, ie. C(a) is true. Then (∃x)(∀y) C(x) ∧ Eat(x,y) implies (∃x) C(x) ∧ Eat(x,a). In other words, you're stating that some children will eat anything, not only food.