Lec 6&7
Lec 6&7
Lecture - 6
Components of a Predicate:
x is greater than 3
• Subject: The variable (e.g., x, y, z).
• Predicate: The property or condition (e.g., “is greater than 3”, “is under attack by an
intruder”).
• We can denote the statement “x is greater than 3” by P(x)
• The statement P(x) is also said to be the value of the propositional function P at x.
• Converting Predicates to Propositions: Once a value has been assigned to the
variable x, the statement P(x) becomes a proposition and has a truth value.
EXAMPLE1: Let P(x) denote the statement “x > 3”. What are the truth values of P(4) and
P(2)?
Solution: Predicate: P(x) = “x > 3”
P(4): “4 > 3” → True
P(2): “2 > 3” → False
EXAMPLE 2: 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: Predicate: A(x) = “Computer x is under attack by an intruder”
A(CS1): CS1 is not under attack → False
A(CS2): CS2 is under attack → True
A(MATH1): MATH1 is under attack → True
Predicates with Multiple Variables:
EXAMPLE 3: 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: Predicate: Q(x, y) = “x = y + 3”
Q(1, 2): “1 = 2 + 3” → False
Q(3, 0): “3 = 0 + 3” → True
Key Points:
• Predicates become propositions when variable values are assigned.
• Truth values depend on the specific values of the variables.
• Examples show how to evaluate predicates with given values to determine their truth.
EXAMPLE 4: Let A(c,n) denote the statement “Computer c is connected to network n,”
where c is a variable representing a computer and n is a variable representing a network.
Suppose that the computer MATH1 is connected to network CAMPUS2, but not to network
CAMPUS1. What are the values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)?
Solution: Predicate: A(c, n): “Computer c is connected to network n”
A(MATH1, CAMPUS1): False (MATH1 is not connected to CAMPUS1)
A(MATH1, CAMPUS2): True (MATH1 is connected to CAMPUS2)
EXAMPLE 5: What are the truth values of the propositions R(1,2,3) and R(0,0,1)?
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.
Solution: R(x, y, z): “x + y = z”
R(1, 2, 3): True (1 + 2 = 3)
R(0, 0, 1): False (0 + 0 ≠ 1)
General Statements:
• This type of statement shows whether a condition P is true or false when specific
values are plugged into the variables x1, x2, ..., xn.
Quantifiers
• Quantifiers are a way to turn a propositional function into a proposition by specifying
how true the statement is across a range of elements.
• When we assign values to variables in a propositional function, it becomes a
proposition with a truth value.
• Quantification helps express how much of the statement is true.
• Words like all, some, many, none, and few are used in quantification.
• There are two main types of quantification:
▪ Universal Quantification: The statement is true for every element in the set.
▪ Existential Quantification: The statement is true for at least one element in
the set.
• The area of logic that deals with predicates (statements with variables) and quantifiers
is called predicate calculus.
Universal quantifier
The universal quantifier is used in mathematical statements to say that a property is true
for all values of a variable within a specific set, called the domain of discourse (or simply,
the domain).
When we use universal quantification for the statement P(x), it means that P(x) is true for
every value of x in the domain. The domain tells us the possible values that x can take.
The meaning of the universal quantification can change if we change the domain. That's why
the domain must always be specified when using a universal quantifier. Without specifying
the domain, the universal quantification of a statement is undefined.
Let’s say the statement is:
• "For all x, x is greater than 0."
Now, the meaning of this statement changes based on the domain of x:
1. If the domain is positive integers, the statement means "For all positive integers x, x
is greater than 0." This is true.
2. If the domain is all integers, the statement means "For all integers x, x is greater than
0." This is false because negative integers and zero exist in this domain.
DEFINITION:
The universal quantification of P(x)is the statement
“P(x) for all values of x in the domain.”
The notation ∀x P(x) denotes the universal quantification of P(x).
Here ∀ is called the universal quantifier. We read ∀x P(x) as “for all x P(x)” or “for every x
P(x).” An element for which P(x) is false is called a counterexample of ∀x P(x).
Quantifiers:
Statement When True? When False?
∀x P(x) P(x) is true for every x. There is an x for which P(x) is false.
∃x P(x) There is an x for which P(x) is true. P(x) is false for every x.
EXAMPLE 8: Let P(x) be the statement “x +1 > x.” What is the truth value of the
quantification ∀x P(x), where the domain consists of all real numbers?
Solution: Since adding 1 to any real number x will always make it bigger than x, the
statement is true for all real numbers. Therefore, the statement ∀x P(x) is true.
Important Remark:
• The domain (the set of numbers we are considering) must always be non-empty. If the
domain were empty (no numbers at all), ∀x P(x) would automatically be true because
there would be no number x that could make P(x) false.
• The truth of ∀x P(x) depends on the domain. For example, if the domain were just a
set of specific numbers, the result might change.
Remark: It is best to avoid using “for any x” because it is often ambiguous as to whether
“any” means “every” or “some.”
In some cases, “any” is unambiguous, such as when it is used in negatives, for example,
“there is not any reason to avoid studying.”
Example 9: Let Q(x) be the statement "x < 2". What is the truth value of ∀x Q(x), where the
domain is all real numbers?
Solution: This is false because not every real number is less than 2.
For example, Q(3) (when x = 3) is false since 3 is greater than 2.
So, x = 3 is a counterexample that proves ∀x Q(x) is false.
Important Remark:
• To show that a statement like ∀x P(x) is false, all you need is a single counterexample.
If even one x in the domain makes the statement P(x) false, then ∀x P(x) is false.
Example: Let P(x) be the statement "x² > 0," where the domain consists of all integers.
• To prove that ∀x P(x) (i.e., "x² > 0 for all x") is false, we need to find a
counterexample.
• A counterexample is a value of x that makes P(x) false.
• In this case, x = 0 is a counterexample because 02 = 0, which is not greater than 0.
o Therefore, the statement ∀x P(x) is false.
Important Point:
• Looking for counterexamples is a crucial technique in mathematics to disprove
universally quantified statements (statements that are true for all elements of a set).
Example: What is the truth value of ∀x P(x), where P(x) is the statement “x2 < 10” and
the domain consists of the positive integers not exceeding 4?
Solution: The statement ∀xP(x) is the same as the conjunction
P(1) ∧ P(2) ∧ P(3) ∧ P(4)
because the domain consists of the integers 1, 2, 3, and 4.
Because P(4), which is the statement “42 < 10,” is false, it follows that ∀x P(x) is false.
Example: What does the statement ∀x N(x) mean if N(x) is “Computer x is connected to
the network” and the domain consists of all computers on campus?
Solution: Statement: ∀x N(x)
• ∀x: This symbol means "for all" or "every."
• N(x): This represents the statement "Computer x is connected to the network."
• Domain: The domain here consists of all computers on campus.
• ∀x N(x) means that the statement N(x) ("Computer x is connected to the network") is
true for every computer x in the domain (i.e., every computer on campus).
This statement can be expressed in English as
"Every computer on campus is connected to the network."
This means that if you pick any computer on campus, it will definitely be connected to the
network. There are no exceptions; all computers on campus are connected to the network.
Example: What is the truth value of ∀x (x2 ≥ x) if the domain consists of all real
numbers? What is the truth value of this statement if the domain consists of all
integers?
Solution: Domain 1: All Real Numbers
• Statement: ∀x (x2 ≥ x) means "For every real number x, x2 ≥ x."
• Counterexample: For x=1/2, (1/2)2 = 1/4, which is less than 1/2.
• Conclusion: The statement is false because there are real numbers where x2 < x.
Example: Let D={1,2,3,…,9}. Determine the truth value of the following statements:
(a) (∀x ∈ D) x + 4 < 15
(b) (∃x ∈ D) x + 4 = 10
(c) (∀x ∈ D) x + 4 ≤ 10
(d) (∃x ∈ D) x + 4 > 15
Solution:
(a) (∀x ∈ D) x + 4 < 15
This statement asserts that for every x in D, x + 4 < 15.
For every x ∈ D, the result of x+4 is as follows:
• For x = 1, 1 + 4 = 5
• For x = 2, 2 + 4 = 6
• For x = 3, 3 + 4 = 7
• For x = 4, 4 + 4 = 8
• For x = 5, 5 + 4 = 9
• For x = 6, 6 + 4 = 10
• For x = 7, 7 + 4 = 11
• For x = 8, 8 + 4 = 12
• For x = 9, 9 + 4 = 13
All of these values are less than 15, so the statement is true.
(b) (∃x ∈ D) x + 4 = 10
This statement asserts that there exists an x in D such that x + 4 = 10.
For x = 6, we have 6 + 4 = 10. Therefore, such an x exists, and the statement is true.
(c) (∀x ∈ D) x + 4 ≤ 10
This statement asserts that for every x in D, x + 4 is less than or equal to 10.
When x = 7, we have 7 + 4 =11, which is greater than 10. Thus, the statement is false.
(d) (∃x ∈ D) x + 4 > 15
This statement asserts that there exists an x in D such that x + 4 > 15.
For all x ∈ D, we find that:
• 1+4=5
• 2+4=6
• 3+4=7
• 4+4=8
• 5+4=9
• 6+4=1
• 7+4=11
• 8+4=12
• 9+4=13
None of these values exceed 15. Therefore, the statement is false.
Translating Sentences into Logical Expressions
Logical operators and quantifiers can be used to express English sentences into logical
expressions. Consider, for example, the sentence:
"Every person is precious."
This can be translated as:
For every x, if x is a person, then x is precious.
In ordinary grammar, "is precious" is the predicate of this sentence.
In the logical expression, we add the predicate "is a person" to represent the common noun
"person" in the sentence. Let:
• M(x) represent "x is a person",
• A(x) represent "x is precious".
Thus, the sentence can be written as:
∀x (M(x) → A(x))
or, equivalently:
∀x (M(x) ∧ A(x))
Statements containing words like "every," "each," or "everyone" usually indicate a
universal quantifier. Such statements are typically rephrased to start with "For every x,"
which is denoted by ∀x.
Why two predicates?
• The sentence "Every person is precious" actually involves two ideas:
1. The subject (we are talking about "people").
2. The property (those people are "precious").
In logical notation, we break these two ideas into separate predicates:
• M(x): This tells us the subject (whether "x is a person").
• A(x): This tells us the property (whether "x is precious").
2. Why not just one predicate?
If we only use A(x) (i.e., "x is precious"), we lose the information about who is precious. In
this case, we are specifically talking about people being precious, so we need to express
that x is a person before saying they are precious.
3. The Role of Logic
In logic, we break down sentences into their simplest components. "Person" is a category,
and "precious" is a quality. We use two predicates because:
• M(x) checks if something (x) is a person.
• A(x) says if that person is precious.
Without both, we couldn't specify that we're talking about people being precious.
Example: "Some student of this college passed the MCA entrance examination."
We can translate this sentence as:
"There exists a student of this college who passed the MCA entrance examination."
Predicates:
• S(x): "x is a student of this college."
• p(x): "x passed the MCA entrance examination."
Logical Expression: ∃x (S(x) ∧ p(x))
• ∃x: "There exists an x such that..."
• S(x) ∧ p(x): "x is a student of this college and x passed the MCA entrance examination."
Statements containing phrases like "some" or "at least one" suggest existential
quantification. They are rephrased as "There exists an x such that" and are translated
using ∃x.