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

in This Session We Will Look At: - Predicates and Quantifiers - Translating Sentences Into Logical Expressions

This lecture covered: 1. Predicates and quantifiers, where a predicate refers to a property a subject can have, and quantifiers are used to create propositions from propositional functions. 2. Universal quantification refers to a proposition being true for all values, while existential quantification refers to there existing an element for which the proposition is true. 3. Examples of translating English sentences into logical expressions using predicates, quantifiers, and logical connectives like conjunction and negation. 4. The order of quantifiers is important, as ∀x∃y is not necessarily equivalent to ∃y∀x.

Uploaded by

Shannan Richards
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

in This Session We Will Look At: - Predicates and Quantifiers - Translating Sentences Into Logical Expressions

This lecture covered: 1. Predicates and quantifiers, where a predicate refers to a property a subject can have, and quantifiers are used to create propositions from propositional functions. 2. Universal quantification refers to a proposition being true for all values, while existential quantification refers to there existing an element for which the proposition is true. 3. Examples of translating English sentences into logical expressions using predicates, quantifiers, and logical connectives like conjunction and negation. 4. The order of quantifiers is important, as ∀x∃y is not necessarily equivalent to ∃y∀x.

Uploaded by

Shannan Richards
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Lecture 3

• In this session we will look at:


– Predicates and Quantifiers
– Translating sentences into logical expressions
Predicates and Quantifiers
Consider the statement: “x < 5” which is found in computer
programs.

“x < 5” has two parts:


• The variable “x” is the subject of the statement.
• While “is less than 5” is the predicate and refers to
the property that the subject of the statement can
have.
• The statement “x < 5” can be denoted by P(x)
where P denotes “is less than 5” and x is the
variable.
• 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.

• To create a proposition from a propositional


function we use quantifiers.
Universal Quantification

Definition
• The universal quantification of P(x) is the
proposition “ P(x) is true for all values of x in
the universe of discourse”.
• The notation: ∀x P(x) denotes the universal
quantification of P(x)
• Here ∀ denotes the universal quantifier.
Example 1:
1

• Let P(x) be the statement “x * 0 = 0”. What is the


truth value of the quantification ∀x P(x), where
the universe of discourse is the set of real
numbers?

Solution:
• Since P(x) is true for all real numbers x, (any
number multiplied by zero is zero) then ∀x P(x) is
true.
Example 2
Express the statement “ All Mathematicians are
analytical” as a universal quantification.

Solution:
•Let M(x) denote “ x is a mathematician”
•Let A(x) denote “ x is analytical”
•This statement can now be expressed as :
•∀x [M(x) → A(x)] where the universe of
discourse is the set of mathematicians at UWI.
Example 3
What is the truth value of the function ∀x
Q(x), where Q(x) is the statement “x2 < 10”
and the universe of discourse consist of
• (i) positive integers not exceeding 4.
• (ii) integers not exceeding 3?
Solution
(i) The statement ∀x Q(x) is the same as Q(1) ∧
Q(2) ∧ Q(3) ∧ Q(4) since the universe consist of
the integers 1, 2, 3, 4. Since Q(4) is false, ∀x
Q(x) is false.
• (ii) false. Why???
Existential quantification

Definition
• The existential quantification of P(x) is the
proposition “ There exist an element in the
universe of discourse such that P(x) is true”.
• The notation: ∃xP(x) denotes the
existential quantification of P(x)
• Here ∃ denotes the existential
quantifier
Example:
• Let P(x) be the statement “x2 > 10 ”. What is the truth
value of quantification ∃xP(x) where the universe of
discourse consists of the positive integers not
exceeding 4?

Solution:
• The universe of discourse is {1, 2, 3, 4}, the
proposition ∃xP(x) is the same as P(1) ∨ P(2) ∨ P(3)
∨ P(4).
• Since P(4) , which is the statement “42 > 10” is true, it
follows that ∃xP(x) is true.
Negation

• ~∀x P(x) ⇔ ∃x~P(x) important


• ~∃xQ(x) ⇔ ∀∀x ~Q(x) important

Eg. Consider the statement


“Every Student in the class has taken a course in
calculus”.

The statement is a universal quantification and can


be written as ∀x P(x) where
P(x): x has taken a course in calculus.

The negation of this statement is


“it is not the case that every student has taken a
course in calculus”.

What does this mean???


• This is equivalent to saying that
“there is a student in the class who has not
taken a course in calculus”.

That is: ∃x~P(x) and not ~∃xP(x)

See Example 20, 21, 22 page 41.


Read Sections 1.3 and 1.4
Translating sentences into logical
expressions
We can now use logical operators and quantifiers to
express English sentences.
• Example 1:

Express the statement “Every student in


this class has studied calculus” using
predicates and quantifiers.
Solution
• Rephrase as follows:
– “for every student in this class, that student has
studied calculus”

• Introduce variable x, and refine statement as:


“for every student x in this class, x has studied
calculus”

• Now let C(x): x has studied calculus, where the


domain of discourse is the class.

• Hence we get ∀x C(x)


Observations (1)
• Our final solution depends on the domain of
discourse which we choose.
• We have given our answer when the domain of
discourse in the class.

(i) Consider the case when the domain of


discourse is the set of all people.
• We now rephrase our statement as follows:
“for every person x, if x is a student in the
class, then x has studied calculus”
• Now let S(x): x is a student in the class
• Our solution becomes
∀x(S(x) → C(x))

Note : the solution cannot be written as


∀x(S(x) ∧ C(x))

Why?
(ii) Consider the case when the domain of
discourse is the set of all people base on subject
choices
• We may use a two variable quantifier
Q(x, y) to mean “student x has studied subject y”

• Our solution is
– ∀x(Q(x, calculus) if the domain is the class, or
– ∀x(S(x) → (Q(x, calculus)) if the domain is the set of
all people.
Example 2
• Express the statement “Everyone has exactly
one best friend” using quantifiers and logical
connectives.

Solution:
• Let B(x, y) : y is the best friend of x. The
statement given may be rephrased as follows.
• For every person x there is another person y, such
that y is the best friend of x and if z is another
person other than y, then z is not the best friend of
x.
Hence the require expression is:
∀x ∃y ∀z[B( x, y) ∧ (( z != y) → ~B(x, z))]
Example 3:

Consider the following statements. The first two


are premises while the third is called the
conclusion. The entire set is called an
argument.
• “All lions are fierce”
• “Some lions do not drink coffee”
• “Some fierce creatures do not drink coffee”
• Where the universe of discourse is the set of all
animals
Express the above statements using quantifiers and
logical connectives. You may use he following
propositional function definition.
• Let P(x) be the statement “ x is a lion”
• Let Q(x) be the statement “ x is fierce”
• Let R(x) be the statement “ x drinks coffee”

Solution:
We can express these statements as:
• ∀x (P(x) → Q(x))
• ∃x(P(x) ∧ ~R(x))
• ∃x(Q(x) ∧ ~R(x))
Note:

• The second statement cannot be written as


∃x(P(x) → ~R(x)).
• The reason is that P(x) → ~R(x) is true
whenever x is not a lion, so ∃x(P(x) → ~R(x))
is true as long as there is at least one creature
that is not a lion.
• AVOID USING THE IMPLICATION “→”
WITH ∃.
Exercise

• Consider the following statements the first


three of which are premises and the fourth
a valid conclusion.
• All humming birds are richly coloured.
• No large bird live on honey.
• Birds that do not live on honey are dull
coloured.
• Humming birds are small.
• Let P(x) : x is a humming bird,
• Q(x) : x is large,
• R(x): x lives on honey and
• S(x): x is richly coloured be propositional
functions.
• Assume that the universe of discourse is
the set of all birds. Express the
statements in the arguments using
quantifiers, P(x), Q(x), R(x), S(x) and
logical connectives.
Soln

• ∀x (P(x) → S(x))
• ~∃x(Q(x) ∧ R(x))
• ∀x (~R(x)→ ~S(x))
• ∀x (P(x) →~Q(x))
• Here small means not big and dull means
not brightly coloured.
• Let Q(x, y) denote “x + y = 0”. What is the truth
value of the following quantifications, for x, y
real numbers.
(i) ∀x∃y Q(x, y)
(ii) ∃y ∀x Q(x, y)
(iii) ∀x∀y Q(x, y)
Solution

(i) ∀x∃y Q(x, y) : For every real number x there is a


real number y such that Q(x, y) is true. This
statement is true since y = -x.

(ii) ∃y ∀x Q(x, y): there is a real number y such that


for every real x Q(x, y) is true. This statement is
false since when y is chosen it will only apply to
only one value of x.

(iii) ∀x∀y Q(x, y) : false , a consequence of (ii)


above.
NB. The order in which quantifiers appear makes a
difference:
Example:
• Let Q(x,y) denote “x + y = 0”. What are the truth
values of the quantifications ∃y ∀x Q(x,y) and
∀x ∃y Q(x,y)? The universe of discourse is the
set of real numbers.
Solution:
• ∃y ∀x Q(x,y) denotes the proposition “
There is a real number y such that for
every real number x, Q(x,y) is true.”
• Since there is no value y such that for every
real value of x, x + y = 0 then ∃y ∀x Q(x,y)
is false.

• ∀x ∃y Q(x,y) denotes the proposition “ For


every real number x, there is a real number such
that Q(x,y) is true.” This is the case when we let y
= -x.
Therefore ∀x ∃y Q(x,y) is true.

• Note, if ∃y ∀x Q(x,y) is true then ∀x ∃y Q(x,y)


is also true. However if ∀x ∃y Q(x,y) is true, it is
not necessarily that ∃y ∀x Q(x,y) is true.
Translating logical statements

• Example 1:
Translate the statement
∀x(C(x) ∨ ∃y(C(y) ∧ F(x, y)))
into English, where C(x) is “x has a
computer,” F(x, y) is “x and y are friends,”
and the universe of discourse for both x
and y is the set of all students at the
University.
• Solution
Every student has a computer or has a
friend who has a computer.

• Read example 9 – 13 page 55 - 57


• End of Lecture 3

You might also like