0% found this document useful (0 votes)
21 views4 pages

Corr Exercises Series 6 LM 24 25

Uploaded by

Sonia Saradouni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Corr Exercises Series 6 LM 24 25

Uploaded by

Sonia Saradouni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

UMBB / FS / Computer Science Department

Subject: Mathematical logic Groups: 1st year computer-science Engineers


Date: December 7th , 2024 Established by: S.Djeddai

EXERCISE SERIES N°6


Introduction to Predicate Logic

Exercise 1 (*)
Let: P, Q be two binary predicate symbols,
R a unary predicate symbol,
f, h two unary function symbols,
a a 0-ary function symbol (a constant) and
g a ternary function symbol.

Let the following predicate calculus formula be:


F = ∀y Q(y, g(a, z, h(z)))→∃x P(x, f (y))

1. The terms appearing in F:


y, a, z, x, h(z),f (y), g(a, z, h(z))

2. The atoms appearing in F:


Q(y, g(a, z, h(z)))
P(x, f (y))

3. The sub-formulas of F:
Q(y, g(a, z, h(z)))
P(x, f (y))
∀y Q(y, g(a, z, h(z)))
∃x P(x, f (y))

Exercise 2 (*)
For each of the following formulas, indicate whether the variables are free or bound, and if so
to which connector they are bound.

Here, we represent free variables with the green color.


All the other colors represent bound variables. The two sided arrows represent the fild of the
quantifiers.

P(f(a, y)) → ∀z R(x, z)

∀x P(x, y, z) → ∀z P(z) → R(z)

∀x P(x, y, z) → ∀z (P(z) → R(z))

∀x A(x) → ∃x (B(x) → ¬∃t C(x, t))

∀x [∃y (P(x, y)) ∧ ∃x (Q(y, x) ∧ ∀y R(y, y))] (

There are 2 quantifications for x, we take the nearest)


∃x (Q(x) ∨ P (x, x)) → ¬Q(x) ∧ ∀y P (x, y)

∃x ∀y R(x, y) → ¬T (x, b)

Exercise 3 (*)
We are using a language with a constant me (the person speaking) and three binary relations:
— Friend(x, y): x is the friend of y
— Enemy(x, y): x is the enemy of y (x is my enemy therefore corresponds to the formula
enemy(x, me))
— x = y : if x and y are equal

1. Translate the following formulas into French:

(a) ∀x (¬Friend(x, me)⇒Enemy(x, me) )


Anyone who is not my friend is my enemy

(b) ∃x ∀y ¬Friend(y, x)
There is someone who has no friends

(c) ∀x ∃y Enemy(y, x)
Everyone has at least one enemy

2. Give the logical formulas that correspond to the following statements:

(a) The enemies of my friends are my enemies.


∀x ∀y (Enemy(x, y) ∧ Friend(y, me) ⇒ Enemy(x, me))

(b) One cannot be both a friend and an enemy.


∀x ∀y (Enemy(x, y)⇒¬Friend(x, y))

(c) I have only one friend. (The use of the connective ∃! is not allowed)
∃x ∀y (Friend(x, me) ∧ Friend(y, me) ⇒ x=y)

Exercise 4
Using the following predicate symbols:
C(x): "x is a mushroom"
R(x): "x is pink"
V(x): "x is poisonous"
Translate the following statements into the first-order predicate calculus:

1. No pink mushroom is poisonous.


∀x (C(x)∧R(x) ⇒ ¬V(x))

2. All pink mushrooms are poisonous


∀x (C(x)∧R(x) ⇒ V(x))

3. Every mushroom is either pink or poisonous.


∀x (C(x) ⇒ R(x) ∨ V(x))

4. Every mushroom is either pink or poisonous, but not both (exclusive #or#).
∀x (C(x) ⇒ (R(x) ∨ V(x)) ∧ ¬(R(x) ∧ V(x)) )
Or
∀x (C(x) ⇒ (R(x) ∧ ¬V(x)) ∨ (¬R(x) ∧ V(x)) )

5. All pink mushrooms, except at least one, are poisonous.


∀x (C(x)∧R(x)) ⇒ ∃y ¬V(y)

Exercise 5 (*)
Using the following predicate symbols
A(x): "x is English"
H(x, y): "x hates y"
C(x, y): "x knows y"
And the following function symbols
e(x): denotes x's worst enemy
n: denotes Napoleon

Translate the following statements into the first-order predicate calculus:


1. Every Englishman hates his worst enemy
∀x (A(x) ⇒ H(x,e(x)))

2. Napoleon knows his worst enemy.


C(n, e(n))

3. Whoever knows his worst enemy does not hate him.


∀x (C(x, e(x))⇒ ¬H(x,e(x)))

4. Nobody knows Napoleon's worst enemy.


¬ (∃x C(x, e(n)))

5. Napoleon's worst enemy is English.


A(e(n))

6. Anyone who hates someone does not hate his worst enemy.
∀x∃y (H(x,y)⇒¬ H(x, e(y)))

Exercise 6
We consider a subset of the predicate calculus with: a and b as constant symbols f as unary
function symbol P as binary predicate symbol Let I be an interpretation of this language
defined by its domain D={1, 2} and by:
i[a] = 1; i[b] = 2; i[f(1)] = 2; i[f(2)] = 1; i[P(u, v)] = true if and only if u = 1
Establish the truth value of the following formulas:
a) P(a,f(a))
true

b) P(b,f(b))
false

c) ∀x ∀y P(x,y)
false

d) ∀x ∀y (P(x,y) → P(f(x),f(y)))
false

e) ∃x ∀y (P(x,y) → P(f(x),f(y)))
true
Exercise 7 (*)
Using the following interpretation:
D ={a,b} and P(a,a) = true, P(a,b)= false, P(b,a)=false, P(b,b) = true.
Determine the truth values of the following formulas:
a) ∃y ¬ P(x,x)
false

b) ∀x P(x,x)
true

c) ∀x ∃y P(x,y)
true

d) ∃x ∀y(P(x,y)→P(y,x))
true

Exercise 8
Show that the following formulas are valid:
1. ∀x A(x) → ∃x A(x)
2. (∃x A(x) → ∀x B(x)) → ∀x (A(x) →B(x))
3. ∀x ∀y P(x,y) → ∀y ∀x P(x,y)

You might also like