semantic predicate calculus
semantic predicate calculus
Introduction General
Predicate calculus
Introduction
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):
∀, ∃, ¬, ∧, ∨, →, ←→.
▶ 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
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
∧
∃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(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