Professional Documents
Culture Documents
Chapter2 Quantifiers
Chapter2 Quantifiers
Computer
Mathematics
Week3
Predicate Calculus
Mathematical Proofs
Predicate Logic (§1.3)
• Propositional logic treats simple propositions
(whole sentences) as atomic entities.
• In the sentence “The dog is sleeping”:
• The phrase “the dog” denotes the subject -
the object or entity that the sentence is
about.
• The phrase “is sleeping” denotes the
predicate - a property that is true of the
subject.
Subjects and Predicates
• Why distinguish subjects and predicates?
Alice is swimming
Bernard is swimming The same
Something can
Cythia is swimming action
swim
A dog is swimming
6
Universal Quantification
Example:
S(x): x is a Sunway student.
G(x): x is a genius.
7
Existential Quantification
Existentially quantified sentence:
There exists an x in the universe of discourse for
which P(x) is true.
8
Existential Quantification
Example:
P(x): x is a Sunway lecturer.
G(x): x is a genius.
9
Quantification
Another example:
Let the universe of discourse be the real numbers.
Is it true? yes
10
Disproof by Counterexample
A counterexample to x P(x) is an object c so that
P(c) is false.
11
Negation
12
Quantification
Introducing the universal quantifier and the
existential quantifier facilitates the translation of
world knowledge into predicate calculus.
Examples:
John beats up all lecturers who fail him.
x([Lecturer(x) Fails(x, John)] BeatsUp(John, x))
All computer scientists are either rich or crazy, but not both.
x (CS(x) [Rich(x) Crazy(x)] [Rich(x) Crazy(x)] )
Or, using XOR:
x (CS(x) [Rich(x) Crazy(x)])
13
More About Predicates
• Convention: Lowercase variables x, y, z... denote
objects/entities; uppercase variables P, Q, R…
denote propositional functions (predicates).
• Note Applying a predicate P to an object x is the
proposition P(x).
• The predicate P itself (e.g. P = “is swimming”) is not a
proposition (not a complete sentence).
• e.g. let P(x,y,z) = “x gave y the grade z”,
then if x = “Ray”, y = “Mike”, z = “A”, then
P(x,y,z) = “Ray gave Mike the grade A.”
Universes of Discourse (U.D.s)
• Predicates can be applied to many objects at
once.
• The collection of values that a object variable x
can take is called x’s universe of discourse
(domain).
• Example: P(x,y,z) = “x gave y the grade z”
x (S(x) C(x))
MTH2102
Discrete Mathematics
Week4a
Introduction to Proofs &
Number Theory
Proving Theorems
Direct proof:
An implication pq can be proved by showing that if
p is true, then q is also true.
n is odd.
19
Proving Theorems
Indirect proof:
An implication pq is equivalent to its contra-
positive q p. Therefore, we can prove pq by
showing that whenever q is false, then p is also false.
Example: Give an indirect proof of the theorem
“If 3n + 2 is odd, then n is odd.”
Idea: Assume that the conclusion of this implication
is false (n is even). Then use rules of inference and
known theorems to show that p must also be false
(3n + 2 is even).
20
Proving Theorems
n is even.
Therefore, 3n + 2 is even.
Proof:
Suppose n2 is even. Then n2 = 2k for some
integer k.
Let n = 2t for some integer t. Then n is an
even integer. (see example 18 for answer)
This argument is wrong. The statement “Let n = 2t
for some integer t.” occurs in the proof. No
argument has been given to show that n can be
written as 2t for some integer t. This is circular
reasoning because this statement is equivalent to
the statement being proved, namely “n is even”. Of
course, the result itself is correct, only the method
of proof is wrong.
27