0% found this document useful (0 votes)
120 views10 pages

Topic 6 Predicate Logic

1. Predicate logic allows representing statements that are not strictly true or false, unlike propositional logic. It involves predicates - statements with variables - that can be true or false depending on the value assigned to the variable. 2. This document introduces predicates and their domains, quantifiers like universal and existential, and how to combine them to write logical statements translating natural language sentences. Generalized De Morgan's laws are also covered. 3. The goal is to explain predicate logic and how to use it to write logical statements, as assessed through activities translating statements into logical expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views10 pages

Topic 6 Predicate Logic

1. Predicate logic allows representing statements that are not strictly true or false, unlike propositional logic. It involves predicates - statements with variables - that can be true or false depending on the value assigned to the variable. 2. This document introduces predicates and their domains, quantifiers like universal and existential, and how to combine them to write logical statements translating natural language sentences. Generalized De Morgan's laws are also covered. 3. The goal is to explain predicate logic and how to use it to write logical statements, as assessed through activities translating statements into logical expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Topic X 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

p: x is an integer greater than 2

p is true if x = 3 and it is false if x = 1. To be able to represent statements of this


nature, we need another type of logic called the predicate logic.

SELF-CHECK 6.1

Who is the first person to develop Predicate Logic (Calculus)?

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.‰

Since p(1) is true, 1  A.


Similarly p(2), p(3), p(4) are all true, so A = {1,2,3,4}.

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)

2. Let p(n) be predicate „n divides 66‰. Write each of the


propositions below in words and state whether it is true or
false. The domain of discourse is the set of positive integers.
(a) p(11)
(b) p(1)
(c) p(3)
76 X TOPIC 6 PREDITACE LOGIC

6.2 QUANTIFIER
There are two types of quantifier: Universal quantifier () and Existential
quantifier ( ).

Figure 6.1: Types of quantifier

6.2.1 Universal Quantifier

Definition 6.2a: Universal quantification of a predicate p(x) is a


proposition „p(x) is true for all values of x in the domain of discourse‰.

In most of the books, universal quantification of p(x) is denoted as

x p(x)

However, we prefer to use another style for writing the statement, that is

x < p(x)

If we wish to restrict the values of x to a certain set, we can write the statement as

x  N < p(x)

We can also restrict the values of x to a certain values. This can be written as

x  N x t 0 < p(x)


TOPIC 6 PREDITACE LOGIC W 77

Example 6.2a

Figure 6.3: Notation for universal quantifier

Figure 6.3: Notation for universal quantifier with restriction

(a) The predicate

p(x) :  ( x) = x, x  R

is true for all real numbers x. So the statement


x < p(x)

is true.

(b) Let q(x) : x + 1 < 4


The predicate
x t 0 < q(x)

is a false statement, because q(5) is not 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

6.2.2 Existential Quantifier

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.

Definition 6.2b: The existential quantification of a predicate p(x) is the


proposition „There exists a value of x in the domain of discourse for which p(x)
is true‰.

Existential quantification is denoted as

x p(x) or x < p(x)

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.‰

Figure 6.4: Notation for existential quantifier


TOPIC 6 PREDITACE LOGIC W 79

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.

6.2.3 Combining Quantifiers


Two or more quantifiers may be used in a 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

(1)2 < (2)2 o 1 < 2.

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

(f) For every x, for some y, x2 < y + 1.


(g) For some x, for every y, x2 < y + 1.
(h) For some x, for some y, x2 < y + 1.
(i) For every x, for every y, if x < y, then x2 < y2.
(j) For every x, for some y, if x < y, then x2 < y2.
(k) For some x, for every y, if x < y, then x2 < y2.
(l) For some x, for some y, if x < y, then x2 < y2.

2. Let G (x, y) be the predicate „ x loves y‰. The domain of discourse is


the set of all living people. Write each of the propositions below
symbolically.
(a) Someone loves everybody
(b) Everybody loves everybody
(c) Somebody loves somebody
(d) Everybody loves somebody

3. Let p(x,y) be the propositional function „x is taller than y‰. The


domain of discourse consists of three students:
(a) Azrul who is 5 feet 11 inches tall
(b) Erina, who is 5 feet 6 inches tall
(c) Shah who is 6 feet tall

Write each of the propositions below in words and state whether it


is true or false.
(a) x  y • p(x, y)
(b)  x  y • p(x, y)
(c)  x  y • p(x, y)
(d)  x  y • p(x, y)

6.3 GENERALISED DE MORGAN LAWS


An important theorem about quantifiers is Generalised De Morgan Laws,
which was introduced by Augustus De Morgan. A brief life history of De
Morgan is given in the introduction to this unit.
TOPIC 6 PREDITACE LOGIC W 81

Theorem 6.3a: If p(x) is a predicate

(a) x · p ( x) {  x · p( x)

(b) x · p( x) { x · p ( x)

Example 6.3a

Let p(x) be the predicate

1
2
>1
x +1

We want to show that x x p(x) is false.

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

6.4 TRANSLATING SENTENCES INTO LOGICAL


EXPRESSIONS
The following examples show how to translate some of the natural language
sentences into logical expressions.

Example 6.4a

Let p(x) : x has exactly one father.

So the statement „Everyone has exactly one father‰ can be expressed as

x x p(x).
82 X TOPIC 6 PREDITACE LOGIC

Example 6.4b

Let p(x) : x is a student in the university


Let q(x) : x has grade A for all of the courses taken

So the statement „There is a student in a university who has managed to get


grade A for all of the courses taken‰ can be expressed as:

 x x p(x) š q(x)

Example 6.4c

Let

p(x) : x has a computer q(x,y) : x and y are friends

The logical expression

x x (p(x) ›  y x p(y) š q(x,y))

means that „for all person, either he has a computer or he has a friend
who has acomputer‰.

ACTIVITY 6.4

Let m(x,y) be „x has sent an e-mail message to y‰


Let t(x,y) be „x has telephoned y‰

The domain of discourse is all students in your class.


Write the following statements in logical expressions.
(a) Ahmad has never sent an e-mail message to Abu.
(b) Ranjit has never sent an e-mail message to Ramlah or telephoned her.
(c) There is a student in the class who has sent everyone else an e-mail
message.
(d) No one in the class has telephoned Nina.
(e) Every student in the class has either received an e-mail message or
telephone call from another student in the class.
TOPIC 6 PREDITACE LOGIC W 83

[1] It is a 51 page PDF file format. It will probably take sometime to


download as it is a large file. However, it is worth waiting and make sure
to save a copy in your hard disk so that you can read it at anytime. It
explains about how predicate logic can be applied to Computer Science and
Programming. Refer to the URL below.
URL:
http://www-2.cs.cmu.edu/afs/andrew.cmu.edu/course/15/354/
www/postscript/pred-logic2.pdf

[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

You might also like