0% found this document useful (0 votes)
32 views

Predicates

The document discusses logical paradigms and predicates. It defines predicates as statements involving variables that can be true or false depending on the values assigned. It also discusses propositional functions and how assigning values to variables in them results in propositions with truth values. The document covers universal and existential quantification.

Uploaded by

Sneha Imran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Predicates

The document discusses logical paradigms and predicates. It defines predicates as statements involving variables that can be true or false depending on the values assigned. It also discusses propositional functions and how assigning values to variables in them results in propositions with truth values. The document covers universal and existential quantification.

Uploaded by

Sneha Imran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Logical Paradigm

By
Syed Ijaz Hussain Bukhari
Predicates
• Statements involving variables, such as
“x > 3,” “x = y + 3,” “x + y = z,”
and
“computer x is under attack by an intruder,”
and
“computer x is functioning properly,”

• These statements are neither true nor false when the values
of the variables are not specified. In this section, we will
discuss the ways that propositions can be produced from
such statements.
• The statement “x is greater than 3” has two parts. The first
part, the variable x, is the subject of the statement. The
second part—the predicate, “is greater than 3”—refers to a
property that the subject of the statement can have. We
can denote the statement “x is greater than 3” by P (x),
where P denotes the predicate “is greater than 3” and x is
the variable. The statement P (x) is also said to be the value
of the propositional function P at x. Once a value has been
assigned to the variable x, the statement P (x) becomes a
proposition and has a truth value.
Example
• Let P (x) denote the statement “x > 3.” What
are the truth values of P (4) and P (2)?
Solution
• We obtain the statement P (4) by setting x = 4
in the statement “x > 3.” Hence, P (4), which is
the statement “4 > 3,” is true. However, P (2),
which is the statement “2 > 3,” is false.
Example
• Let A(x) denote the statement “Computer x is
under attack by an intruder.” Suppose that of
the computers on campus, only CS2 and
MATH1 are currently under attack by
intruders. What are truth values of A(CS1),
A(CS2), and A(MATH1)?
Solution
• We obtain the statement A(CS1) by setting x =
CS1 in the statement “Computer x is under
attack by an intruder.” Because CS1 is not on
the list of computers currently under attack,
we conclude that A(CS1) is false. Similarly,
because CS2 and MATH1 are on the list of
computers under attack, we know that A(CS2)
and A(MATH1) are true.
• We can also have statements that involve more
than one variable. For instance, consider the
statement “x = y + 3.” We can denote this
statement by Q(x, y), where x and y are variables
and Q is the predicate. When values are assigned
to the variables x and y, the statement Q(x, y)
has a truth value.
Example
• Let Q(x, y) denote the statement “x = y + 3.”
What are the truth values of the propositions
Q(1, 2) and Q(3, 0)?
Solution
• o obtain Q(1, 2), set x = 1 and y = 2 in the
statement Q(x, y). Hence, Q(1, 2) is the
statement “1 = 2 + 3,” which is false. The
statement Q(3, 0) is the proposition “3 = 0 +
3,”
which is true.
• Similarly, we can let R(x, y, z) denote the
statement ` ‘x + y = z.” When values are
assigned to the variables x, y, and z, this
statement has a truth value
Example
• What are the truth values of the propositions
R(1, 2, 3) and R(0, 0, 1)?
Solution
• The proposition R(1, 2, 3) is obtained by setting
x = 1, y = 2, and z = 3 in the statement R(x, y, z).
We see that R(1, 2, 3) is the statement “1 + 2 =
3,” which is true. Also note that R(0, 0, 1),
which is the statement “0 + 0 = 1,” is false.
• Consider the statement
if x > 0 then x := x + 1.
When this statement is encountered in a program, the
value of the variable x at that point in the
execution of the program is inserted into P (x), which is
“x > 0.” If P (x) is true for this value of x, the assignment
statement x := x + 1 is executed, so the value of x is
increased by 1. If P (x) is false for this value of x, the
assignment statement is not executed, so the value of x
is not changed.
Quantifier
• When the variables in a propositional function are assigned values,
the resulting statement becomes a proposition with a certain truth
value. However, there is another important way, called
quantification, to create a proposition from a propositional
function.
Quantification expresses the extent to which a predicate is true
over a range of elements. In English, the words all, some, many,
none, and few are used in quantifications. We will focus on two
types of quantification here: universal quantification, which tells us
that a predicate is true for every element under consideration, and
existential quantification, which tells us that there is one or more
element under consideration for which the predicate is true. The
area of logic that deals with predicates and quantifiers is called the
predicate calculus.
The Universal Quantifier
• The universal quantification of P (x) is the
statement
“P (x) for all values of x in the domain.”
The notation ∀xP (x) denotes the universal
quantification of P (x). Here ∀ is called the
universal quantifier. We read ∀xP (x) as “for all
xP (x)” or “for every xP (x).” An element for which
P (x) is false is called a counterexample of ∀xP
(x).
The Universal Quantifier
• The universal quantification of P (x) for a particular
domain is the proposition that asserts that P (x) is
true for all values of x in this domain. Note that the
domain specifies the possible values of the variable
x. The meaning of the universal quantification of P
(x) changes when we change the domain. The
domain must always be specified when a universal
quantifier is used; without it, the universal
quantification of a statement is not defined.
The Universal Quantifier
Example
• Let P (x) be the statement “x + 1 > x.” What is
the truth value of the quantification ∀xP (x),
where the domain consists of all real
numbers?
Solution:
• Because P (x) is true for all real numbers x, the
quantification
∀xP (x) is true.
The Existential Quantifier
• The existential quantification of P (x) is the
proposition
“There exists an element x in the domain such
that P (x).”
We use the notation ∃xP (x) for the existential
quantification of P (x). Here ∃ is called the
existential quantifier.
The Existential Quantifier
• A domain must always be specified when a statement ∃xP (x) is
used. Furthermore, the meaning of ∃xP (x) changes when the
domain changes. Without specifying the domain, the statement
∃xP (x) has no meaning.
Besides the phrase “there exists,” we can also express existential
quantification in many other
ways, such as by using the words “for some,” “for at least one,” or
“there is.” The existential quantification ∃xP (x) is read as
“There is an x such that P (x),”
“There is at least one x such that P (x),”
or
“For some xP (x).”
Example
• Let P(x) denote the statement “x > 3.” What is the truth value of
the quantification ∃xP(x),
where the domain consists of all real numbers?
• Solution:
Because “x > 3” is sometimes true—for instance, when x = 4—
the existential quantification of P(x), which is ∃xP(x), is true.

Observe that the statement ∃xP(x) is false if and only if there is no


element x in the domain for which P(x) is true. That is, ∃xP(x) is false
if and only if P(x) is false for every element of the domain.
Example
• Let Q(x) denote the statement “x = x + 1.”What
is the truth value of the quantification ∃xQ(x),
where the domain consists of all real numbers?

• Solution
• Because Q(x) is false for every real number x,
the existential quantification of Q(x),
which is ∃xQ(x), is false.

You might also like