Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting Sentences into first Order logic

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 !!

like image 506
Noor Avatar asked Jan 21 '23 06:01

Noor


1 Answers

From

xy [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

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

it follows that

x Turtle(x) ∧ ∀y Rabbit(y) ∧ ∀xy 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".

like image 73
Fred Foo Avatar answered Feb 02 '23 09:02

Fred Foo