This preview shows pages 1–6. Sign up to view the full content.
1
ENGG1007
Foundations of Computer Science
Predicate Logic
Predicate Logic
Prof. Francis Chin, Dr SM Yiu
(chapters 1.3, 1.4)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 2
ENGG1007
FCS
Subjects and Predicates
Subjects and Predicates
Do you still remember the definition of propositions?
Is “x > 3” a proposition?
No, unless the value of x is fixed.
Let P(x) denote the statement “x > 3” where P(x) is called a
propositional function
.
P(x) has a truth value once the value of x is fixed.
E.g. P(5) is true; P(1) is false.
P actually refers to the property “is greater than 3” and is called the
predicate
. Note that x is a variable (the subject).
A propositional function can have more than one variable (multi
value predicates).
E.g. Let Q(x, y) denote “x + y > 10”.
Then, Q(4, 5) is false; Q(5, 6) is true.
3
ENGG1007
FCS
Universe of Discourse
Universe of Discourse
•
The collection of values that a variable
x
may take is
called the
universe of discourse
.
•
Example
:
“x
is rich”,
x
can refer to people in HK, the world,
movies stars, IT people, …
For the statement
“x
is prime
”,
the universe of
discourse of
x
is the set of all positive integers.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 4
ENGG1007
FCS
Quantification (Quantifiers)
Quantification (Quantifiers)
Two ways to convert a propositional function, say P(x), into a
proposition.
•
Assign value(s) to variable(s).
•
Quantify variable(s):
P(x) is true for all possible values of x
(Universal Quantification)
These exists at least one value of x such that P(x) is true
(Existence Quantification)
Example:
Let P(x) denote the statement “x has 10 girl friends”.
P(x) has no truth value and is not a proposition.
P(SM Yiu) is a proposition
.
2200
x P(x) is a proposition.
“for all possible values of x (universe of discourse), P(x) is true”
e.g.
“
2200
x P(x)” is false
where x is any lecturer in our dept.
5
ENGG1007
FCS
Example:
Let P(x) denote the statement “x is married”.
P(x) has no truth value and is not a proposition.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/10/2011 for the course ENGG 1007 taught by Professor Unknown during the Spring '11 term at HKU.
 Spring '11
 Unknown
 Computer Science

Click to edit the document details