Download Slides

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Predicate logic
Limitations of propositional
logic
Propositional logic only allows us to reason about completed
statements about things, not about the things themselves.
Example
Some chicken cannot fly
All chicken are birds
this reasoning can not
if y is not free in P andbeQexpressed in
Some birds cannot fly
propositional logic
Example
Every player except the winner looses a match
Unary predicate (example)
Consider the statement 2m>3.
a unary
relation
Whether this statement is true or false depends on the
value of m (and on the domain of values).
on ℤ
… -3 -2 -1 0 1 2 3 …
if y is not free in P and Q
3/2
val
Note: 2m > 3 = m > 3/2
val
2m > 3 = m ≥ 2
on ℤ and R
on ℤ but not on R
on R
Binary predicate (example)
The statement 3m+n > 3 is a binary predicate on R x N.
3m+n = 3
a binary
n N
relation
3
2
1
0 1
m
R
Predicates
In general, an n-ary predicate is an n-ary relation.
If it is on a domain D, then it’s a relation P(x1, .., xn) ⊆ Dn or
equivalently a function P: Dn → {0,1}.
2m>3
true for certain values
of the variables
if y is not free in P and Q
We can turn a predicate, into a proposition in three ways:
1. By assigning values to the variables.
for m=2
2. By universal quantification.
2·2 >3
3. By existential quantification.
is a true proposition
Universal quantification
The unary predicate 2m > 3 on Z can be turned into a
proposition by universal quantification:
false, e.g.
for m =1
Notation:
For all m in Z, 2m > 3
universal
quantifier
∀m [m∈ Z : 2m
if y >3]
is not
standard (!)
notation:
free in P and Q∀x (P(x) Q(x))
∀x. P(x) Q(x)
predicate
domain
(predicate)
In general:
∀x [P(x) : Q(x)] for “all x satisfying P satisfy Q”
Existential quantification
The unary predicate 2m > 3 on Z can also be turned into a
proposition by existential quantification:
true, e.g.
m =2
Notation:
There exists m in Z, 2m > 3
existential
quantifier
standard (!)
notation:
∃m [m∈ Z : 2m
if y >3]
is not free in P and Q∃x (P(x) ∧ Q(x))
predicate
∃x. P(x) ∧ Q(x)
domain
(predicate)
In general:
∃x [P(x) : Q(x)] for
“there exists x satisfying P that satisfies Q”
Quantification
The binary predicate 3m+n > 3 on R x N can also be
turned into a proposition by quantification:
in 8
possible
ways
One way is:
∃m [m∈ Rif: y∀nis[n∈
: 3m
>3]]
notN
free
in +P nand
Q
unary
predicate
standard (!) notation:
∃m (m∈ R ∧ ∀n (n ∈ N
3m+n>3))
binary
predicate
proposition,
nullary predicate
Notation
also for ∃
We write ∀x [P] for ∀x [T : P]
We also write ∃m, ∀n [(m,n)∈ R x N : 3m + n >3]
for ∃m [m∈ R : ∀n [n∈ N : 3m + n >3]]
in P and Q
And even ∃m, n [(m,n)∈ R ifx yNis: not
3m +free
n >3]
for ∃m [m∈ R : ∃n [n∈ N : 3m + n >3]]
but only for the same
quantifier!
Quantification - task
Let P be the set of all tennis players.
Let w ∈ P be the winner.
Thanks to Bas Luttik
For p, q ∈ P, write p≠q for “p and q are different players” .
Let M be the set of all matches.
For p ∈ P and m ∈ M, write L(p,m) for
if“player
y is notp free
P and m”.
Q
losesinmatch
Write the following sentence as a formula with predicates
and quantifiers:
Every player except the winner loses a match.
Equivalences with quantifiers
if y is not free in P and Q
Renaming bound variables
Bound variables
if y does not occur in
P or Q (not even in ∀y, ∃y)
Related documents