0% found this document useful (0 votes)
5 views

semantic predicate calculus

Uploaded by

defaultt827
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)
5 views

semantic predicate calculus

Uploaded by

defaultt827
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/ 16

Semantic predicate calculus

Dept. Informatique et Mathématiques Appliquées


Esprit school of business

April 24, 2024


Outline

Introduction General

Predicate calculus
Introduction

▶ In the previous chapter, we looked at propositions as the basic elements of


our language. basic elements of our language.
▶ In this chapter, we will enrich our analysis of these by introducing a new
structure, that of the predicate.
▶ A predicate formalises a notion known in grammar as the
”subject-predicate” structure.
▶ So let’s consider the proposition: ”Every man is mortal”. The structure ”is
mortal” is a predicate and ”man” is the subject of the predicate.
▶ The calculus of predicates allows us to look at statements relating to a set
of objects, such as ”Every man is mortal”. of objects, such as ”Every man
is mortal”, or to certain elements of these sets, such as ”there are bad
men”.
▶ The notions of ”whatever” and ”there exist” are fundamental to predicate
calculus. Finally, predicate calculus is also known as first-order logic.
▶ Limitations of propositional logic Consider the following problem: Every
man is mortal. Socrates is a man.
▶ Therefore, Socrates is mortal.
▶ We have already translated statements in propositional logic. Suppose we
translate translation:
1. Every man is mortal is translated as proposition a.
2. Socrates is a man is translated as proposition
3. Therefore, Socrates is mortal is translated by proposition c.
▶ The problem is then written, in propositional logic, a ∧ bc.
▶ This translation is correct. correct.
▶ But it is of poor quality.
▶ Indeed, it will not escape anyone that the original reasoning was valid but
that its translation is not (although it is satisfiable)
Legitimacy of predicate logic

Definition (of APredicate)


A predicate is a property or relation that relates to one or more elements of a
domain D. or several elements of a domain D. It is a function of D in T ,F.
The previous problem can be adequately translated into predicate logic:
Hypothesis 1: Whatever x belongs to the domain D, if x is a man, then x is
mortal (∀ x(H(x) → M(x))) ;
Hypothesis 2: Socrates has the property of being a man (H(Socrates))
Conclusion: Socrates has the property of being mortal (M(Socrates)).
▶ In this example, we have used two predicates (H and M), a constant
(Socrates), a variable (x) and the universal quantifier (∀). As we’ll see
later, this reasoning, formalised in this way in predicate logic, will be valid.
Definition of a formula

Whereas propositional calculus relied solely on atoms and connectors, predicate


calculus relies on six classes of symbols:
1. variables: these are generally denoted x,y,z,... ; -
2. constant symbols: these are denoted a,b,c,... ;
3. function symbols: symbols for functions of arity n > 0 are denoted by
f,g,... ;
4. predicate symbols: predicates of positive or zero arity are denoted by p,q,...
(a predicate of zero arity is equivalent to an atom in the propositional
calculus) connectors: connectors are those used in propositional calculus;
5. quantifiers: quantifiers (or quanters) are ∀ and ∃.

Definition (Term)
A term is defined recursively by:
1. a variable is a term ;
2. a constant symbol is a term ; if f is a function symbol of arity n and if
t1 , t2 , ..., tn are terms, then f(t1 , t2 , ..., tn ) is a term; Any term is obtained
by applying the above rules a finite number of times.
Example
For example, Socrate, x, y, Carre’(x), Plus(x,y), Plus(x,Carre’(y)), can be
terms. Here Carre’ is an arity 1 function which returns the square of its
argument and Plus is an arity 2 function which returns the sum of its two
arguments.
The definition of 1 in predicate calculus is very similar to the definition of in
propositional calculus. We begin by defining atoms:
Definition (Atoms)
If p is a predicate symbol of arity n and t1 , t2 , ..., tn are terms, then
p(t1 , t2 , ..., tn ) is an atom, or atomic formula.
Definition (Formula)
A formula is defined recursively by :
1. any atomic formula is a formula.
2. if A and B are formulas, then (A‘ → B), (A ←→ B), (A ∧ B) and (A ∨ B)
are formulas.
3. If A is a formula, then (¬A) is a formula.
4. if A is a formula and x is any variable, then (∀ xA(x)) is a formula, A is
said to be the scope of the quantifier x ;
5. if A is a formula and x is any variable then (∃ xA(x)) is a formula,
6. A is said to be the scope of the quantifier ∃x ;
7. Any formula is obtained by applying the previous rules a finite number of
times.

Example
For example, ∀x Inf(x, Plus(x, x)) or ∀x(H(x) → M(x)) are formulas.
Definition (Parenthesis)
▶ In the same way as in propositional logic, we will accept formulas in which
parenthesis is partially or completely implicit.
▶ For this purpose, connectors and quantifiers are traditionally classified in
the following way (by decreasing priority of connectors and quantifiers):
∀, ∃, ¬, ∧, ∨, →, ←→.

Definition (Bound variables)


When a formula begins with ∀x or x, we say that the variable x is bound in it.
If a quantifier is followed by several variables then all of them are bound.
When a variable is not bound then we say that it is free in the formula. For
instance, in the formula
∃i(j = i2 ) (1)
the variable i is bound, and the variable j is free. In the formula

∃i∃j(i2 + j2 = 29) (2)

both i and j are bound.


Quantifiers as Conjunctions/Disjunctions

▶ The difference between free and bound variables is important because the
truth value of a formula depends on the values of its free variables, but
does not depend on the values of its bound variables.
▶ For instance, formula (1) expresses that j is a complete square; whether or
not it is true depends on the value of its free variable j.
▶ Formula (2) expresses that 29 can be represented as the sum of two
squares; we don’t need to specify the values of any variables before we ask
whether this formula is true.
▶ If the domain is finite then universal/existential quantifiers can be
expressed by conjunctions/disjunctions. If U consists of the integers 1,2,
and 3, then
∀ xP(x) ≡ P(1) ∧ P(2) ∧ P(3)
∃xP(x)P(1) ∨ P(2) ∨ P(3)
▶ Even if the domains are infinite, you can still think of the quantifiers in
this fashion, but the equivalent expressions without quantifiers will be
infinitely long.
Predicate calculus

▶ An assertion in predicate calculus is valid if it is true


1. for all domains
2. for every propositional functions substituted for the predicates in the
assertion.
▶ An assertion in predicate calculus is satisfiable if it is true
1. for some domain
2. for some propositional functions that can be substituted for the predicates in
the assertion.

Example
1. ∀x(F(x) ←→ G(x)) is not valid, but satisfiable.
2. ∀x(F(x) ←→ ¬F(x)) is unsatisfiable.
Nested Quantifiers

▶ Nested Loops
▶ To see if ∀x∀yP(x, y) is true, loop through the values of x:
▶ At each step, loop through the values for y.
▶ If for some pair of x and y, P(x, y) is false, then ∀x∀yP(x, y) is false and
both the outer and inner loop terminate.
▶ ∀x∀yP(x, y) is true if the outer loop ends after stepping through each x.
▶ To see if ∀x∃yP(x, y) is true, loop through the values of x:
▶ At each step, loop through the values for y.
▶ The inner loop ends when a pair x and y is found such that P(x, y) is true.
▶ If no y is found such that P(x, y) is true the outer loop terminates as
∀x∃yP(x, y) has been shown to be false.
▶ ∀x∃yP(x, y) is true if the outer loop ends after stepping through each x.
▶ If the domains of the variables are infinite, then this process can not
actually be carried out.
Quantifications of Two Variables

Statement When True? When False ?


∀x∀yP(x, y), P(x,y) is true for There is a pair x, y for
∀y∀xP(x, y) every pair x,y. which P(x,y) is false
For every x there is a There is an x such
y for which P(x,y) is that P(x,y) is false for
∀x∃yP(x, y) true. every y.
There is an x for For every x there is a
which P(x,y) is true y for which P(x,y) is
∃x∀yP(x, y) for every y. false.
For every x there is a There is an x such
∃x∃yP(x, y) y for which P(x,y) is that P(x,y) is false for
∃y∃xP(x, y) true. every y.
Example of valuation of predicates formulas

Let’s consider the set of :


constants : a, b, c, d, k1 , k2 , k3 and k4 .
predicates : P(unary), S(unary), C(unary), Su(binary).
variables : x, y, z, u, v, w
We are going to give an interpretation of this vocabulary in the domain
composed of students, courses, persons and subscriptions of a micro-university.
The domain or the universe D = Persons ∪ Students ∪ Courses where :
Persons ={Alice, Bob, Charles, Diane}
Students ={Alice, Bob, Charles}
Courses ={C1122, C1101, M2001, M2002}
The interpretation of constants is given by :
I(a) = Alice, I(b) = Bob, I(c) = Charles, I(d) = Diane, I(k1 ) = C1122, I(k2 ) =
C1101, I(k3 ) = M2001, I(k4 ) = M2002 and the interpretation of predicates are :
I(P)=Persons, I(S)= Students, I(C)= courses, I(Su)=subscriptions.
Interpretations of some formulas
.
1. I(a)= Alice.
2. I(C(k3 ))= T because I(C(k3 ))=I(C)(I(k3 ))=Course(M2001), I(k3 ) ∈ I(C).
3. I(C(a))=⊥ because I(a)=Alice ∈ / I(C)=course.
4. I(Su(c,k1 ))= T because (I(c),I(k1 ))=(Charles,
C1122)∈ I(Su) = subscription
5. I(∃xSu(x, k2 ))=∃x I(Su)(I(x),I(k2 ))=∃x subscription (I(x),
C1101)=subscription (I(b),C1101)
x=b
=subscription(Bob,C1101)=T.
6. I(∀x∃ySu(x, y)) =⊥ because I(∀x∃ySu(x, y)) = ∀x∃yI(Su)(I(x), I(y)) =
∃yI(Su)(I(a), I(y)) = Subscription(Alice, C1122) = T
x=a x=a,y=k1


∃yI(Su)(I(b), I(y)) = Subscription(Bob, C1101) = T
x=b x=b,y=k2


∃yI(Su)(I(c), I(y)) = Subscription(Charles, C1122) = T
x=c x=c,y=k1

=T
7 I(∀x(E(x) → ∃ySu(x, y))) = T because
I(∀x(Ex) → ∃ySu(x, y)) = ∀x(E(x) → ∃yI(Su)(I(x), I(y))) =

∃(E(a) → yI(Su)(I(a), I(y)) = (E(a) → (Subscription)(Alice, C1122)) = T


x=a x=a,y=k1


∃(E(b) → yI(Su)(I(b), I(y)) = (E(a) → (Subscription)(Bob, C1101)) = T
x=b x=b,y=k2


∃(E(c) → yI(Su)(I(c), I(y)) = (E(c) → (Subscription)(Charles, C1122)) = T
x=c x=c,y=k1

=T

You might also like