2 Predicates and Predicated Logic

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 41

PREDICATES AND

PREDICATED LOGIC
Lecture by
Ms. Cherry Rose R.
Estabillo
MATH102C

C.

PREDICATE LOGIC
Predicate Logic is an extension
of Propositional Logic.
It was used to express the
meaning of wide range of
statements in mathematics
and computer science in
ways that permit us to
reason and explore
MATH102C
relationships between C.

Consider the statement:


x>5
x=y+2
Computer x is under attack
by hackers.
neither true nor false
when the values of the
variables are not specified
MATH102C

C.

Two components:
The variable subject of the statement
Predicate refers to a property that the
subject of the statement can have.

MATH102C

C.

Consider, x > 5
variable: x
P: is greater than 5
Propositional function P
at x: P(x)

P(8)
P(1)

MATH102C

C.

Consider, x=y+2
variable: x, y
Predicate: Q
Propositional function Q at
x,y: Q(x,y)

Q(1,3)
Q(7,5)

MATH102C

C.

A statement can have


more than one
variable.
A statement of the form
P(x1,x2,,xn) is the
value of the propositional
function P at the n-tuple
(x1,x2,,xn) and P is
called a n-place
MATH102C
C.
predicate or a n-ary

Exercise

1.) Let P(x) denote the


statement x4. What are
the truth values?
2.) Let
P(x) denote
the
a.)
P(0)
b) P(4)
statement
c.) P(6)the word x
contains the letter a. What
are the truth values?
a.) P(orange)
b)
MATH102C

C.

THE TRUTH VALUES


Determine the truth values of the ff.
statements
(1) P(x) : 3x + 5 < 3 ; P(2), P(4)
(2) P(x, y) : 2x 3y = 4 ; P(0, 1) , P(6, 1)
(3) P(x, y, z) : x y < z ; P(1, 1,1), P(2,
-1, 0)
MATH102C

C.

These propositions can be negated


or conjoined
Variable: x
Z: is an integer
Q: is a rational number
Nine is not an integer.
Nine is an integer and zero is a rational
number.
If nine is an integer, then zero is a
rational number.
MATH102C

C.

PROPOSITIONAL FUNCTION
Let P(x) be a statement
involving the variable x and
let D be a set. We call P a
PROPOSITIONAL FUNCTION
(wrt D) if for each x in D, P(x)
is a PROPOSITION. We call D
the DOMAIN OF DISCOURSE.
MATH102C

C.

Let:
P(x) : x + 2x2 is a rational
number.
D: set of rational numbers
P(x) : Student x scored perfect
in the test.
D: set of students in UST
MATH102C

C.

QUANTIFICATION
- used to create a
proposition from a
propositional function. It
expresses the extent to
which a predicate is true
over a range of elements.
TWO TYPES OF
QUANTIFICATION
MATH102C
(1)UNIVERSAL

C.

THE UNIVERSAL QUANTIFIER


Let P(x) be a proposition function with
domain of discourse D.
The statement for every x, P(x) is said to be
UNIVERSAL QUANTIFIED STATEMENT.
The symbol (universal quantifier)
means for every or for All
The statement for all x, P(x) can be
written as xP(x).

MATH102C

C.

THE UNIVERSAL QUANTIFIER


The statement for all x, P(x) is TRUE
if P(x) is true for every x in D.
The statement for all x, P(x) is FALSE
if P(x) is false for at least one x in
D.

MATH102C

C.

Examples
(1)Let P(x) be the statement x + 2 >
2. What is the truth value of the
quantification xP(x), where the
domain consist of all non-negative
integers?
(2) What is the truth value of xP(x),
where P(x) is the statement x2 < 9
and the domain consists of the
positive integers less than 3?

MATH102C

C.

THE EXISTENTIAL
QUANTIFIER
Let P(x) be a proposition function with
domain of discourse D.
The statement for some x, P(x) is said to be
EXISTENTIALLY QUANTIFIED
STATEMENT.
The symbol (existential quantifier)
means for some or there exists.
The statement for some x, P(x) can be
written as xP(x).
MATH102C

C.

THE EXISTENTIAL
QUANTIFIER
The statement for some x, P(x) is
TRUE if P(x) is true for at least
one x in D.
The statement for some x, P(x) is
FALSE if P(x) is false for every x
in D.
MATH102C

C.

Examples
(1)Let P(x) be the statement x + 2 >
2. What is the truth value of the
quantification xP(x), where the
domain consist of all non-negative
integers?
(2) What is the truth value of xP(x),
where P(x) is the statement x2 < 9
and the domain consists of integers
greater than 3?

MATH102C

C.

Exercises
Let P(x) be the statement x has
visited the Museum where the
domain consists of the students UST.
Express each of these
quantifications in English.
(1)xP(x)
(2)x P(x)
(3)xP(x)
(4)x P(x)
MATH102C

C.

Exercises
For each statement, find a
domain for which the ff
statement is true and domain
where the following statement
is false.
1.) Everyone speaks Ilocano.
2.) There is someone older than
21 years.
MATH102C

C.

Exercises
Translate these statements into
English, where C(x) is x is a
comedian and F(x) is x is funny
and the domain consists of all
people.
(1)x(C(x) F(x))
(2)x (C(x) F(x))
(3)x(C(x) F(x))
(4)x (C(x) F(x))
MATH102C

C.

Exercise
Let C(x) be the statement x has a cat, let D(x) be
the statement x has a dog, and let H(x) be the
statement x has a hamster. Express each of these
statement in terms of C(x), D(x), H(x), quantifiers, and
logical connectives. Let the domain consist of all
students in your class.
1.) A student in your class has a cat, a dog and a
hamster.
2.) All student in your class has a cat, a dog or a
hamster.
3.) Some student in your class has a cat and a
hamster, but not a dog.

MATH102C

C.

OTHER QUANTIFIERS
UNIQUENESS QUANTIFIER
The statement There exists a
unique x such that P(x) is true
or there is exactly one or
there is one and only one is an
example of quantification using
UNIQUENESS QUANTIFIER.
And this can be written as !
xP(x).
MATH102C

C.

Quantifiers with Restricted


Domain
To restrict a domain, an abbreviated
notation is often used

Example 1: x<0 (x>0)


where the domain is all
real
numbers
The square
of a negative real
number is positive.
x(x<0 x>0)
MATH102C

C.

Example 2: y0 (y 0)
where the domain is all
real numbers
The cube of a nonzero real
number is nonzero.

y(y0 y0)

MATH102C

C.

PRECEDENCE QUANTIFIER
The quantifiers and have
higher precedence than all
logical operations.
Example.
The conjunction of xP(x) and
Q(x) : (xP(x))Q(x) rather than
x(P(x)Q(x)).
MATH102C

C.

BINDING VARIABLES
The occurrence of the variable is said to be
BOUND when the quantifier is used on
the variable.
The occurrence of the variable that is not
bound by a quantifier is said to be FREE.
The part of a logical expression to which a
quantifier is applied called the SCOPE of
quantifier.
MATH102C

C.

Example
(1)x(4x + 4y <2z)
Bound: x (by universal quantifier)
Free: y & z
(2) x(P(x)Q(x))xR(x)
Bound: all variables
Free: DOES NOT EXIST
Scope of x: P(x)Q(x)
Scope of x:
R(x)
MATH102C

C.

NEGATING QUANTIFIED
EXPRESSIONSWHEN IS
NEGATION EQUIVALEN WHEN IS
T
STATEMEN
T

NEGATION
TRUE?

xP(x) xP(x) For every


x, P(x) is
false

NEGATION FALSE?

There is an x
for which
P(x) is true.

xP(x xP(x) There is an P(x) is true


)
x for which for every x.
P(x) is
false.
Note: The rules for negations for
quantifiers are called DE MORGANS LAWS
FOR
QUANTIFIERS
MATH102C
C.

Examples
What are the negations of
1.) x(x>x)
2.) x(x=9)
Show that x(P(x) Q(x))
and x(P(x) Q(x)) are
logically equivalent.
MATH102C

C.

TWO PLACE PREDICATES


TWO-PLACE PREDICATES are
referred to as relational
predicates, they express a
relation between two
components.
Let P(x,y): x is easier than y
xP(x, y): Some x is easier than y.
yP(x,y): x is easier than every y.
MATH102C

C.

TWO PLACE PREDICATES


TWO-PLACE PREDICATES are
referred to as relational
predicates, they express a
relation between two
components.
Let P: is easier than
P(x,y): x is easier than y
xP(x, y): Some x is easier than y.
MATH102C

C.

NESTED QUANTIFIERS
Two quantifiers are NESTED if one
quantifier is within the scope of the other
quantifier.
EXAMPLE
xy((x<0)(y<0))(xy < 0)
Consider that the domain of discourse for
both variables are real numbers.
For all real number x and for all real
number y, if x is less than 0 or y less
than 0, then xy is less than 0.
MATH102C

C.

Exercise

Let P(x,y) be the statement student x


has taken y, where domain of x consists
of all students of IICS and y consists of
all Math courses. Express each of these
quantifications in English sentences.
1.) xyP(x,y)
4.) xyP(x,y)
2.) yxP(x,y)
5.) xyP(x,y)
3.) xyP(x,y)
6.) yxP(x,y)

THE ORDER OF
QUANTIFIERS

It is important to note that the


order of the quantifier, unless all
the quantifiers are
universal(existential) quantifiers.

MATH102C

C.

THE ORDER OF
QUANTIFIERS

Let P(x, y): 2xy = 3x + y


What are the truth values of
xyP(x, y) yxP(x, y)
xyP(x, y)
xyP(x, y)
xyP(x, y)
yxP(x, y)
where the domain for all variables
consists of all real numbers?
MATH102C

C.

QUANTIFICATION OF TWO
VARIABLES

STATEMEN WHEN TRUE?


T

WHEN FALSE?

xyP(x,
y)
yxP(x,
y)

P(x, y) is true for


every pair x, y.

There is a pair x, y for


which P(x, y) is false.

xyP(x,
y)

For every x, there There is an x such


is a y for which
that P(x, y) is false
P(x, y) is true.
for every y.

xyP(x,
y)

There is an x for
which P(x, y) is
true for every y.

xyP(x,
There is pair x, y
y) MATH102C for which P(x, y)

For every x there is a


y for which P(x, y) is
false.
P(x, y) is false for
every x, y. C.

Exercise
Let P(x, y): 2x + y =5
What are the truth values of
xyP(x, y) yxP(x, y)
xyP(x, y)
xyP(x, y)
xyP(x, y)
yxP(x, y)
where the domain for all variables
consists of all integers?
MATH102C

C.

Exercise
1.)Let P(x, y): x + 1 > y + 1
What are the truth values of
a.)xyP(x, y)
c.) xyP(x, y)
b.) xyP(x, y)
d.) xyP(x, y)
where the domain for all variables consists of
all integers?
2.) Express the negations of each statements
so that negation symbols immediately
precedes predicates.
a.) xy(P(x,y)Q(x,y))
b.)
xyP(x,y)xyQ(x,y)
MATH102C
C.

NEGATING NESTED
QUANTIFIERS

Express the negations of each


statements so that negation
symbols immediately precedes
predicates.
1.) xy(P(x,y)Q(x,y))
2.) xyP(x,y)xyQ(x,y)

MATH102C

C.

You might also like