Lecture # 3.
Lecture # 3.
CHAPTER # 1
PREDICATE:
These statements are neither true nor false when the values of the variables are not specified.
Once a value has been assigned to the variable x, the statement P (x) becomes a proposition and has a truth value.
METHOD OF SOLVING PREDICATE LOGIC
When the variables in a propositional function are assigned values, the resulting statement becomes a proposition with a
certain truth value.
1) propositional function
2) Quantifications
PREDICATE:
DEFINITION: A predicate is a sentence that contains a finite number of variables and becomes a statement when
specific values are substituted for the variables. The domain of a predicate variable is the set of all values that may be
substituted in place of the variable.
let P stand for the words :- “is a student at the oxford University”
The sentences :
“x is a student at the “oxford University” and “x is a student at y” are symbolized as P(x) and Q(x, y),
where x and y are predicate variables and take values in appropriate sets.
When concrete values are substituted in place of predicate variables, a statement results.
Propositional Function
EXAMPLES # 01
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.
EXAMPLES # 02
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.
EXAMPLES # 03
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:
• 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:
1) universal quantification, which tells us that a predicate is true for every element under consideration
2) 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.
UNIVERSAL QUANTIFICATION
EXAMPLES # 01
EXAMPLES # 01
EXAMPLES # 02
EXISTENTIAL QUANTIFICATION
∃xP (x) is the same as the disjunction P (x1) ∨ P (x2) ∨··· ∨ P (xn),
EXAMPLE # 1
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.
EXAMPLE # 2
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.
For instance, ∃!x(x − 1 = 0), where the domain is the set of real numbers, states that there is a unique real number x
such that x − 1 = 0.
Observe that we can use quantifiers and propositional logic to express uniqueness
so the uniqueness quantifier can be avoided.
Generally, it is best to stick with existential and universal quantifiers so that rules of inference for these quantifiers can
be used
Precedence of Quantifiers The quantifiers ∀ and ∃ have higher precedence than all logical operators from
propositional calculus.
Binding Variables When a quantifier is used on the variable x, we say that this occurrence of the variable is
bound. An occurrence of a variable that is not bound by a quantifier or set equal to a particular value is said to be free.
All the variables that occur in a propositional function must be bound or set equal to a particular value to turn it into a
proposition. This can be done using a combination of universal quantifiers, existential quantifiers, and value assignments.