Introduction To Predicate Logic: Ling 324
Introduction To Predicate Logic: Ling 324
Introduction To Predicate Logic: Ling 324
Ling 324
Usefulness of Predicate Logic for Natural Language Semantics
• While in propositional logic, we can only talk about sentences as a whole,
predicate logic allows us to decompose simple sentences into smaller parts:
predicates and individuals.
(1) a. John is tall.
b. T(j)
1
Usefulness of Predicate Logic for Natural Language Semantics
(cont.)
• Sentences with quantificational expressions can be divided into two
interpretive components.
2
Usefulness of Predicate Logic for Natural Language Semantics
(cont.)
3
Syntax of Predicate Logic
1. Primitive vocabulary
(a) A set of terms:
A set of individual constants: a, b, c, d, ...
John, Mary, Pavarotti, Loren
A set of individual variables: x, y, z, x, x, x, ...
he, she, it
(b) A set of predicates: P, Q, R, ...
One-place predicates: is happy, is boring
Two-place predicates: like, hate, love, hit
Three-place predicates: introduce, give
(c) A binary identity predicate: =
(d) The connectives of propositional logic: ¬, ∧, ∨, →, ↔
(e) Quantifiers: ∀, ∃
(f) brackets: (, ), [, ]
4
2. Syntactic rules
(a) If P is an n-place predicate and t, ..., tn are all terms, then P (t , ..., tn ) is
an atomic formula.
John is happy: H(j)
John loves Mary: L(j,m)
John introduced Mary to Sue: I(j,m,s)
• ∃xL(x, d)
∃xL(x, d)
∃x L(x,d)
L x d
QUESTION: Draw the syntactic tree for the expression in (7) that are
well-formed formulas of Predicate Logic.
5
Some Syntactic Notions in Predicate Logic
[∃xR(x)] ∨ P(x)
∃xR(x) ∨ P(x)
∃x R(x) P x
R x
What is the scope of ∃x?
6
Some Syntactic Notion in Predicate Logic (cont.)
• We say that an occurrence of a variable x is bound if it occurs in the scope of
∀x or ∃x. A variable is free if it is not bound.
Syntactically, an occurrence of x is bound by a lowest c-commanding
quantifier Qx.
∀x[∃xR(x) ∨ P(x)]
∀x ∃xR(x) ∨ P(x)
∃xR(x) ∨ P(x)
∃x R(x) P x
R x
x in R(x) is bound by ∃x;
x in P(x) is bound by ∀x.
• ∀y[∃xR(x) ∨ P(y)] and ∀x[∃xR(x) ∨ P(x)] are alphabetic variants of each
other and are semantically equivalent.
7
Some Syntactic Notions in Predicate Logic (cont.)
• Formulas with no free variables are called closed formulas, simply formulas,
or sentences.
H(j)
∀x H(x)
∃x L(j,x)
∃x [H(x)∨ L(x,j)]
H(x)
[∃xH(x)] ∨ L(x,j)
∀x L(x, y)
8
Translations in Predicate Logic
c. A whale is a mammal.
f. Every student heard some news. (possibly different news for each student)
10
Semantics of Predicate Logic
1. If α is a variable, then [[α]] is specified by a variable assignment function g (in
the model M ) that assigns an individual object to each variable.
[[α]]M,g = g(α)
[[α]]M,g = V (α)
[[P ]]M,g = V (P )
3. If P is an n-ary predicate and t, ..., tn are all terms (constants or variables),
then for any model M and an assignment function g, [[P (t , ..., tn)]]M,g = 1
iff < [[t]]M,g , ..., [[tn ]]M,g >∈ [[P ]]M,g
4. If φ and ψ are formulas, then for any model M and an assignment function g,
g[d/v]: the variable assignment g ) that is exactly like g except (maybe) for
g(v), which equals the individual d.
x → John
x → Mary
g = where n≥4
x → Pete
xn → Pete
x → John
x → Mary
g [John/x] = where n≥4
x → John
xn → Pete
x → Pete
x → Mary
g [[John/x]Pete/x] =
where n≥4
x → John
xn → Pete
Semantics of Predicate Logic (cont.)
1. g[Paul/x](x) =
2. g[Paul/x](y) =
3. g[[Paul/x]Susan/x](x) =
4. g[[Paul/x]Susan/x](y) =
5. g[[Paul/x]Susan/y](x) =
6. g[[Paul/x]Susan/y](y) =
12
Semantics of Predicate Logic (cont.)
• An example model
Let us take the model M , depicted below. Let us take a language in
Predicate Logic such that the constants a, b, and c denote the individuals
dark box, dark circle and dark trapezoid, respectively, the unary predicate A
denotes the set of individuals with a circle around, and the binary predicate R
denotes the relation encoded by the arrows.
Μ1
U(niverse) = {a, b, c}
A = {a, b}
R = {<a,b>, <a,c>, <c,b>, <c,c>}
13
Compositional Interpretation
• Assume M , lexical meanings and assignment function g ) specified below:
U(niverse) = {a, b, c}
) )
[[Allan]]M ,g = V (Allan) = a; [[Betty]]M ,g = V (Betty) = b
)
[[H]]M ,g = V (H) = {b, c}
M ,g )
[[L]] = V (L) = {<a,a>, <a,b>, <b,a>, <c,b>}
Assignment g ):
) )
[[x]]M ,g = g )(x) = a; [[y]]M ,g =g )(y) = b.
H x )
[[H(x)]]M 2,g =1 iff g )(x) ∈ {b,c}
) )
[[H]]M 2,g =V (H)={b,c} [[x]]M 2,g =g )(x)
14
Compositional Interpretation (cont.)
QUESTION: Draw the syntactic trees and spell out the compositional semantic
interpretation of the following predicate logic formulas, against M2.
(13) a. ∀y[H(y)]
b. ∃y[H(Allan)]
c. ∀y[L(y, x)]
d. ∀x∃y[L(x, y)]
e. ∃y∀x[L(x, y)]
15
Compositional Interpretation: Examples
) ) )
[[∀x∃y[L(x, y)]]]M 2,g = 1 iff for all d) ∈ U , [[∃y[L(x, y)]]]M 2,g [d /x] = 1.
) )
= 1 iff for all d) ∈ U , there is a d ∈ U , such that [[L(x, y)]]M 2,g [[d /x]d/y] = 1.
=1 iff for all d) ∈ U , there is a d ∈ U , such that < d), d >∈ {<a,a>,<a,b>,<b,a>,<c,b>}.
) )
∀x [[∃y[L(x, y)]]]M 2,g = 1 iff there is a d ∈ U , such that [[L(x, y)]]M 2,g [d/y] = 1.
) ) )
=1 iff there is a d ∈ U , such that < [[x]]M 2,g [d/y], [[y]]M 2,g [d/y] >∈ [[L]]M 2,g [d/y].
=1 iff there is a d ∈ U , such that < g )(x), d >∈ {<a,a>,<a,b>,<b,a>,<c,b>}.
)
∃y [[L(x, y)]]M 2,g = 1
iff < g )(x), g )(y) >∈ {<a,a>,<a,b>,<b,a>,<c,b>}
) ) )
[[L]]M 2,g = V (L) [[x]]M 2,g = g )(x) [[y]]M 2,g = g )(y)
= {<a,a>,<a,b>,<b,a>,<c,b>}
)
=⇒ [[∀x∃y[L(x, y)]]]M ,g = 1
16
Compositional Interpretation: Examples (cont.)
) ) )
[[∃y∀x[L(x, y)]]]M 2,g = 1 iff there exists a d) ∈ U , such that [[∀x[L(x, y)]]]M 2,g [d /y] = 1.
) )
=1 iff there is a d) ∈ U , such that for all d ∈ U , [[L(x, y)]]M 2,g [[d /y]d/x] = 1.
=1 iff there is a d) ∈ U , such that for all d ∈ U , < d, d) >∈ {<a,a>,<a,b>,<b,a>,<c,b>}.
) )
∃y [[∀x[L(x, y)]]]M 2,g = 1 iff for all d ∈ U , [[L(x, y)]]M 2,g [d/x] = 1.
) ) )
=1 iff for all d ∈ U , < [[x]]M 2,g [d/x], [[y]]M 2,g [d/x] >∈ [[L]]M 2,g [d/x] .
=1 iff for all d ∈ U , < d, g )(y) >∈ {<a,a>,<a,b>,<b,a>,<c,b>}.
)
∀x [[L(x, y)]]M 2,g = 1
iff < g )(x), g )(y) >∈ {<a,a>,<a,b>,<b,a>,<c,b>}
) ) )
[[L]]M 2,g = V (L) [[x]]M 2,g = g )(x) [[y]]M 2,g = g )(y)
= {<a,a>,<a,b>,<b,a>,<c,b>}
)
=⇒ [[∃y∀x[L(x, y)]]]M ,g = 0
17
Entailment, Logical Equivalence, Contradiction, Validity (cont.)
• A formula φ entails a formula ψ iff for every model M such that [[φ]] = 1, [[ψ]]
= 1.
18
Entailment, Logical Equivalence, Contradiction, Validity
19
Entailment, Logical Equivalence, Contradiction, Validity (cont.)
– Assume that [[∀x[¬P (x)]]]M,g = 1 for any model M and any assignment g.
– For all d ∈ U , [[¬P (x)]]M,g[d/x] = 1, by the semantics for ∀.
– For all d ∈ U , [[P (x)]]M,g[d/x] = 0, by the semantics for ¬.
– There is no d ∈ U such that [[P (x)]]M,g[d/x] = 1.
– [[∃xP (x)]]M,g = 0, by the semantics of ∃.
– [[¬∃xP (x)]]M,g = 1, by the semantics of ¬.
– Assume that [[¬∃x[P (x)]]]M,g = 1 for any model M and any assignment g.
– [[∃x[P (x)]]]M,g = 0, by the semantics of ¬.
– There is no d ∈ U such that [[P (x)]]M,g[d/x] = 1, by the semantics of ∃.
– For all d ∈ U , [[P (x)]]M,g[d/x] = 0.
– For all d ∈ U , [[¬P (x)]]M,g[d/x] = 1, by the semantics of ¬.
– [[∀x¬P (x)]]M,g = 1, by the semantics of ∀.
20