Professional Documents
Culture Documents
Propositional Logic:
Dealt very well with sentence components like: not, and, or, if then
Limitations: cannot deal with modifiers like there exists, all, among, only.
However, the phrase has a finer logical structure. It is a statement about the
following properties:
– being a student
– being an instructor
– being younger than somebody else
Slide 2 CS3234 — Logic and Formal Systems — Lecture 03 — 26/08/04
Predicates, Variables and Quantifiers
x S x y I y Y x y
Slide 3 CS3234 — Logic and Formal Systems — Lecture 03 — 26/08/04
More Examples
D x : x is a dictionary x D x G x
Denote m x : mother of x x C x Y x m x
Using the function m to encode the “mother of” relationship
is more appropriate, since every person has a unique mother.
Slide 4 CS3234 — Logic and Formal Systems — Lecture 03 — 26/08/04
More Examples (2)
Alternative representation:
m m a m m p
Expressions that can be given truth values. These are modeled by formulas.
Predicate symbols P ; Each predicate and function symbol comes with a fixed
Function symbols F ; arity (i.e. number of arguments)
Constants C.
Terms
Formulas
Free and bound variables
Substitution
Remarks:
More complex terms are built from function symbols using previously buit
terms.
BNF definition:
Φ :: P t1 tn Φ Φ Φ Φ Φ
Φ Φ x Φ x Φ
where P is a predicate of arity n, ti are terms, i 1
n , x is a variable.
Two alternatives:
x is bound.
P Q x y
y is free.
x x free
bound
Formula: x P x Q x
P x Q y
Parse tree:
x
Q
P Q P y
x x x
Variables are placeholders, so we must have means of replacing them with more
concrete information.
x P x Q x
P x Q y
f x y x is
x P x Q x
P f x y Q y
x
Q
P Q P y
x x f
x y
Example:
S x y P x Q y
y x is S y y P y Q y
S x z P x Q z
y x is S y z P y Q z
Quantifier equivalences
t1 t2 Φ t1 x
i e
t t Φ t2 x
Proof example:
x x 1 0 1 0
x 1 1 1 x 1 1 x 1 x
1 x 1 1 x premise
2 x 1 1 x 1 0 premise
3 1 x 1 1 x 0 e 1,2
x0
..
.
xΦ Φ x0 x
xe xi
Φ t x xΦ
Proof examples:
x P x Q x x P x x Q x P t x P x Q x
Q t
x0 Φ x 0 x
xΦ ..
.
Φ t x χ
xi Side condition: x0
doesn’t occur in χ xe
xΦ χ
Proof examples: x P x Q x
x P x x Q x
xΦ xΦ x P x Q x
1 premise
2 P x premise
1 xΦ premise
3 x0 P x0 assumption
2 Φ x x xe1
4 P x0 Q x0 xe1
3 xΦ xi2
5 Q x0 e 4,3
6 x Q x xi5
7 x Q x x e 2,3–6
Slide 17 CS3234 — Logic and Formal Systems — Lecture 03 — 26/08/04
Another Example
x P x x y P x Q y y Q y
1 x P x premise
2 x y P x Q y premise
3 y0
4 x0 P x0 assumption
5 y P x0 Q y xe2
6 P x 0 Q y0 ye2
7 Q y0 6,4
8 Q y0 x e 1,4-7
9 y Q y y i 3–8