Topic 6 Predicate Logic
Topic 6 Predicate Logic
6
LEARNING OUTCOMES
By the end of this topic, you should be able to:
1. Explain the concept of predicate logic; and
2. Use the concept in writing logical statements.
X INTRODUCTION
In the previous topic, we have discussed the concept of propositional
logic. Proposition is a statement that is either true or false. However, there
are many statements in mathematics that are not true or false, for example
SELF-CHECK 6.1
Definition 6.1a: Let p(x) be a statement involving the variable x and let D
be a set. We call p a predicate (with respect to D) if for each x in D, p(x)
is a proposition. We call D the domain of discourse of p.
TOPIC 6 PREDITACE LOGIC W 75
6.1 PREDICATE
Example 6.1a
The following statements are predicates:
(a) p(n): n2 + 2n is an odd number , n Z+.
(b) q(x): x scores more than 30 goals in the Malaysian football league, x set of
football players.
(c) r(x): the time taken to travel to destination x is 2 hours, x set of towns in
Malaysia.
A predicate p, by itself, is neither true nor false. However, for each x in its
domain of discourse, p(x) is a proposition and is, therefore, either true or false.
Example 6.1b
Let A = {x | x is an integer greater than 0 and less than 5}. Here p(x) is the
sentence „x is an integer greater than 0 less than 5.‰
ACTIVITY 6.1
1. In the following statements, state whether it is a predicate. For
each of the predicates, give a domain of discourse.
(a) (2n + 1)2 is an odd number
(b) Choose an integer between 1 and 10
(c) Let x be a real number
(d) 1+3=4
(e) There exists x such that x < 10 (x real number)
6.2 QUANTIFIER
There are two types of quantifier: Universal quantifier () and Existential
quantifier ( ).
x p(x)
However, we prefer to use another style for writing the statement, that is
If we wish to restrict the values of x to a certain set, we can write the statement as
We can also restrict the values of x to a certain values. This can be written as
Example 6.2a
p(x) : ( x) = x, x R
is true.
A value x in the domain of discourse that makes p(x) false is called a counter-
example to the statement.
Example 6.2b
The statement
x R x2 t 0
is true because, for every real number x, it is true that the square of x is positive
or zero.
78 X TOPIC 6 PREDITACE LOGIC
ACTIVITY 6.2
Translate the following statement into symbols.
p(x): x is an even number
q(x): x is a prime number
(a) Any number is an even number.
(b) A number plus its square is always even.
(c) There is a number between any two different even numbers.
Just like the universal quantifier, we can also restrict the values of x to
certain values. This can be written as, for example as
x N x t 0 < p(x)
In English, x can also be read as „there is an x,‰ „there is some x,‰ „ there exists
an x,‰ or „there is at least one x.‰
Example 6.2c
(a) Let q(x): x + 1 < 4. The existential quantification of q(x), x q(x), is a true
statement, because q(2) is a true statement.
(b) The statement y y + 2 = y is false. There is no value of y for which the
propositional function y + 2 = y produces a true statement.
Example 6.2d
The following statements are true
1. x y x x + 2 = y
2. x y x x = y x < y x > y
Example 6.2e
Let
p(x,y): x2 < y2 o x < y
The statement
x y x p(x,y)
is false. A counter-example is x = 1 and y = 2, we obtain a false proposition
ACTIVITY 6.3
1. Determine the truth value of each of the statements below.
The domain of discourse is the set of real numbers. Justify your
answers.
(a) For every x, if x > 1, then x2 > x.
(b) For some x, if x > 1, then x2 > x.
(c) For every x, if x > 1, then x/ ( x2+ 1 ) < 1/3.
(d) For some x, if x > 1, then x/ ( x2 + 1 ) < 1/3.
(e) For every x, for every y, x2 < y + 1.
80 X TOPIC 6 PREDITACE LOGIC
(a) x · p ( x) { x · p( x)
(b) x · p( x) { x · p ( x)
Example 6.3a
1
2
>1
x +1
Theorem 6.3a states that this statement is equivalent to x x p(x) is true, i.e.
we have to prove that
1
x < 2
d1
x +1
is true.
Since this is true, then we can conclude that the statement x x p(x) is false
Example 6.4a
x x p(x).
82 X TOPIC 6 PREDITACE LOGIC
Example 6.4b
x x p(x) q(x)
Example 6.4c
Let
means that „for all person, either he has a computer or he has a friend
who has acomputer‰.
ACTIVITY 6.4
[2] This site is a bit lighter for your reading. It summarizes the topics in
predicate logic
URL:http://aces.snu.ac.kr/4190.101/Handouts/02-Logic-I.pdf