0% found this document useful (0 votes)
15 views76 pages

Chapter1 (Sec 4-5)

This document discusses predicates and quantifiers in logic, introducing concepts such as universal and existential quantifiers, and their roles in forming propositions from propositional functions. It explains how to translate English statements into logical expressions and emphasizes the importance of specifying the domain when using quantifiers. Additionally, it covers the properties of quantifiers, their precedence, and the concept of binding variables.

Uploaded by

arafatbhuiyan09
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)
15 views76 pages

Chapter1 (Sec 4-5)

This document discusses predicates and quantifiers in logic, introducing concepts such as universal and existential quantifiers, and their roles in forming propositions from propositional functions. It explains how to translate English statements into logical expressions and emphasizes the importance of specifying the domain when using quantifiers. Additionally, it covers the properties of quantifiers, their precedence, and the concept of binding variables.

Uploaded by

arafatbhuiyan09
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/ 76

Section

1.4

Predicates and Quantifiers


Section Summary
Predicates predicate ['predɪkeɪt]
n. 〔数〕谓词 ; 〔语〕谓语
Variables
quantifier ['kwɑntə.faɪər]
Quantifiers n. 量词
 Universal Quantifier
 Existential Quantifier
Negating Quantified Expressions
 De Morgan’s Laws for Quantifiers
Translating English to Logic
Logic Programming (optional)
Propositional Logic Not
Enough
If we have: mortal ['mɔrt(ə)l] adj.
凡人的,不能不死的
“All men are mortal.” /sɔkrəti:z/ 苏格拉底
“Socrates is a man.”
Does it follow that “Socrates is
mortal?”
Need a language that talks about
objects, their properties, and their
relations.
Example
The statement “x is greater than 3”
Two parts:
a) The variable “x”, subject of the
statement
b) “is greater than 3”, predicate, P
The statement is denoted by P(x)
The value of the propositional function P
at x
Propositional Functions
The statement P(x) is said to be
the value of the propositional
function P at x.
Propositional functions become
propositions (and have truth
values) when their variables are
each replaced by a value from the
domain (or bound by a quantifier,
as we will see later).
Example

0” and the domain be the integers.


For example, let P(x) denote “x >

Then:
P(-3) is false.
P(0) is false.
P(3) is true.
Often the domain is denoted by U.
So in this example U is the
integers.
predicate
A statement of the form P() is the
value of the propositional function
P at the n-tuple () .
P is also called an n-place
predicate or a n-ary predicate.
Domain
Many mathematical statements
assert that a property is true for all
or some values of a variable in a
particular domain, called the
domain of discourse, often just
referred to as the domain.
Introducing Predicate
Logic
Predicate logic uses the following new
features:
 Variables: x, y, z
 Predicates: P(x), M(x)
 Quantifiers : (to be covered in a few slides)
Propositional functions are a
generalization of propositions.
 They contain variables and a predicate, e.g.,
P(x)
 domain
Variables can [doʊ'meɪn]
be replaced by elements from
n. 域;范畴
their domain.
Examples of Propositional Functions
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)?
Examples of Propositional
Functions
Let “x + y = z” be denoted by R(x, y, z)
and U (for all three variables) be the
integers. Find these truth values:
R(2,-1,5)

R(3, 4,7)
Solution: F

R(x, 3, z)
Solution: T

Solution: Not a Proposition


Examples of Propositional Functions
Now let “x - y = z” be denoted by Q(x,
y, z), with U as the integers. Find these
truth values:
Q(2,-1,3)
Solution: T
Q(3,4,7)

Q(x, 3, z)
Solution: F

Solution: Not a Proposition


Compound Expressions
If P(x) denotes “x > 0,” find these truth

P(3) ∨ P(-1) Solution:Connectives


T
values:

P(3) ∧ P(-1) Solution:to F


from
propositional logic carry over

P(3) → P(-1) Solution: F


predicate logic.

P(3) → P(-1) Solution: T


Expressions with variables are not
propositions and therefore do not have

P(3) ∧ P(y)
truth values. For example,

P(x) → P(y)
Proposition and Predicate
When the variables in a propositional
function are assigned values, the resulting
statement becomes a proposition with a
certain truth value.
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
The area over
of logic a deals
that rangewith
of predicates
elements.
and quantifiers is called the predicate
calculus.
Quantifiers
Charles
We need quantifiers to express the meaning
Peirce
of English words including all and some: (1839-
 “All men are Mortal.” 1914)
 “Some cats do not have fur.”
The two most important quantifiers
are:
Universal Quantifier, x P(x) asserts P(x) is
“For all,” symbol:  true for every x in the
Write as P(x) domain.

Existential Quantifier, x P(x) asserts P(x) is


“There exists,” true for some x in the
symbol:  domain.
Write as P(x)
The quantifiers are said to bind the variable x in these
expressions.
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.
An element for which P(x) is false is
called a counterexample of ∀xP(x).
Universal Quantifier
 x P(x) is read as “ For all x, P(x) ” or “
For every x, P(x) ”

1) If P(x) denotes “x > 0” and U is the


Examples: [ˈɪntɪdʒə(r)] 整数

integers, then x P(x) is false.


2) If P(x) denotes “x > 0” and U is the
positive integers, then x P(x) is true.
3) If P(x) denotes “x is even” and U is the
integers, then  x P(x) is false.
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.
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.
Remark on Universal
Quantifier
 Note that if the domain is empty, then
∀xP(x) is true for any propositional
function P(x) because there are no
elements x in the domain for which P(x)
is false.
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.”
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.
Existential Quantifier
x P(x) is read as “ For some x, P(x) ”,
or as “ There is an x such that P(x),” or
“ For at least one x, P(x).”

1. If P(x) denotes “x > 0” and U is the


Examples:

integers, then x P(x) is true. It is also

2. If P(x) denotes “x < 0” and U is the


true if U is the positive integers.

positive integers, then x P(x) is false.


3. If P(x) denotes “x is even” and U is the
integers, then x P(x) is true.
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.
Remark on Existential
Quantifier
If the domain is empty, then ∃x
Q(x) is false whenever Q(x) is a
propositional
function because when the domain
is empty, there can be no
element x in the domain for which
Q(x) is true.
Uniqueness Quantifier
(optional)
!x P(x) means that P(x) is true for one
and only one x in the universe of
discourse.
This is commonly expressed in English
in the following equivalent ways:
 “There is a unique x such that P(x).”

 “There is one and only one x such

that P(x)” discourse ['dɪs.kɔrs]


n. 论述,论文
Examples:
 If P(x) denotes “x + 1 = 0” and U is
the integers, then !x P(x) is true.
 But if P(x) denotes “x > 0,” then !x
P(x) is false.

The uniqueness quantifier is


not really needed as the
restriction that there is a
unique x such that P(x) can be
expressed as:
x (P(x) ∧y (P(y) → y =x))
Thinking about Quantifiers
When the domain of discourse is finite,
we can think of quantification as looping
through the elements of the domain.

To evaluate x P(x) loop through all x in


the domain.
 If at every step P(x) is true, then x

P(x) is true.
 If at a step P(x) is false, then x P(x)

is false and the loop terminates.


Thinking about Quantifiers
To evaluate x P(x) loop through all x in
the domain.
 If at some step, P(x) is true, then x

P(x) is true and the loop terminates.


 If the loop ends without finding an x

for which P(x) is true, then x P(x) is


false.
Even if the domains are infinite, we can
still think of the quantifiers this fashion,
but the loops will not terminate in some
cases.
Thinking about Quantifiers as
Conjunctions and
Disjunctions
If the domain is finite, a universally
quantified proposition is equivalent to a
conjunction of propositions without
quantifiers and an existentially
quantified proposition is equivalent to a
disjunction of propositions without

If U consists of the integers 1,2, and 3:


quantifiers.
Properties of Quantifiers
The truth value of x P(x) and  x P(x)
depend on both the propositional function P(x)
and on the domain U.
Examples:

“x < 2”, then x P(x) is true,


1. If U is the positive integers and P(x) is the

but  x P(x) is false.


statement

2. If U is the negative integers and P(x) is the

“x < 2”, then both x P(x) and  x P(x) are


statement

true.
3. If U consists of 3, 4, and 5, and P(x) is the

“x > 2”, then both x P(x) and  x P(x) are


statement

true. But
if P(x) is the statement “x < 2”, then both x
P(x)
Precedence of Quantifiers
The quantifiers  and  have higher
precedence than all the logical
operators.

x P(x) ∨ Q(x) means (x P(x))∨ Q(x)


For example,

x (P(x) ∨ Q(x)) means something


different.
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.
Binding 9.15

Variables
The scope of a quantifier is the part of a
logical expression to which a quantifier
is applied.
Example: In the statement ∃x(x + y =
1), the variable x is bound by the
existential quantification ∃x, but the
variable y is free because it is not bound
by a quantifier and no value is assigned
to this variable. This illustrates that in
the statement ∃x(x + y = 1), x is bound,
but y is free.
Equivalences in Predicate
Logic
Statements involving predicates and
quantifiers are logically equivalent if and
only if they have the same truth value
 for every predicate substituted into these
statements and
 for every domain of discourse used for the

The notation S ≡T indicates that S and T


variables in the expressions.

are logically equivalent.


Example: x ¬¬S(x) ≡ x S(x)
Equivalences in Predicate
Logic
Example: show that ∀x(P(x) ∧ Q(x)) and
∀xP(x) ∧ ∀xQ(x) are logically equivalent
(where the same domain is used
throughout).
Solution: Suppose we have particular
predicates P and Q, with a common
domain. We can show that ∀x(P(x) ∧ Q(x))
and ∀xP(x) ∧ ∀xQ(x) are logically
equivalent by doing two things.
First, we show that if ∀x(P(x) ∧ Q(x)) is
true, then ∀xP(x) ∧ ∀xQ(x) is true.
First, suppose that ∀x(P(x) ∧ Q(x)) is
true.
This means that if a is in the domain, then
P(a) ∧ Q(a) is true. Hence, P(a) is true and
Q(a) is true. Because P(a) is true and Q(a)
is true for every element in the domain,
we can conclude that ∀xP(x) and ∀xQ(x)
are both true.
This means that ∀xP(x) ∧ ∀xQ(x) is true.
Next, suppose that ∀xP(x) ∧ ∀xQ(x) is
true.
It follows that ∀xP(x) is true and ∀xQ(x) is
true. Hence, if a is in the domain, then P(a)
is true and Q(a) is true [because P(x) and
Q(x) are both true for all elements in the
domain, there is no conflict using the same
value of a here].It follows that for all a, P(a)
∧ Q(a) is true.
∀x(P(x)
It follows that∧ ∀x(P(x)
Q(x)) ≡ ∀xP(x) ∧ ∀xQ(x)
∧ Q(x)) is true.
x(P(x) ∨ Q(x)) ≡ xP(x) ∨xQ(x) ?
Negating Quantified
Expressions
Consider x J(x)
“Every student in your class has taken a course in

Here J(x) is “x has taken a course in calculus” and


Java.”

the domain is students in your class.

Negating the original statement gives “It is not


the case that every student in your class has
taken Java.” This implies that “There is a
student in your class who has not taken

Symbolically ¬x J(x) and x ¬J(x) are


calculus.”

equivalent?
Negating Quantified
Expressions
(continued)
Now Consider  x J(x)
“There is a student in this class who has taken a course in

Where J(x) is “x has taken a course in Java.”


Java.”

Negating the original statement gives “It is not


the case that there is a student in this class who
has taken Java.” This implies that “Every student

Symbolically ¬ x J(x) and  x ¬J(x) are


in this class has not taken Java”

equivalent?
De Morgan’s Laws for
Quantifiers
The rules for negating quantifiers are:

¬∀ xP(x)
¬ (P () ∧ P() ∧ · · · ∧ P()), ¬ P()∨
¬ P() ∨· ·· ∨ ¬ P() ¬∃ xP(x)
(De Morgan’s laws) ¬ (P (x1) ∨ P(x2) ∨ · · · ∨ P(xn)),
∃x ¬ P(x). ¬ P(x1)∧ ¬ P(x2) ∧ ··· ∧ ¬ P(xn),
(De Morgan’s laws)
∀x ¬ P(x)
The reasoning in the table shows
that:
Example:
What are the negations of the
statements 1.“There is an honest
politician”
Solution: Let H(x) denote “x is honest.”
The domain consists of all
politicians.
∃xH(x) --- ¬∃ xH(x)---∀x ¬ H(x)
This negation can be expressed as
“Every politician is dishonest.”
Example:
2. “All Americans eat
cheeseburgers”?
Solution: Let C(x) denote “x eats
ChB.”
The domain consists of all
Americans.
∀xC(x)--- ¬∀ xC(x)--- ∃x ¬ C(x)
This negation can be expressed in
several different ways, including
“Some American does not eat
Exercise:

Show that ¬∀ x(P(x) → Q(x)) and


∃x(P(x)∧ ¬ Q(x)) are logically
equivalent.
Translating from English to
Logic
Example 1: Translate the following sentence
into predicate logic: “Every student in this
class has taken a course in Java.”

Solution:

Solution 1: If U is all students in this class, define a


First decide on the domain U.

course in Java” and translate as x J(x).


propositional function J(x) denoting “x has taken a

Solution 2: But if U is all people, also define a

x (S(x)→ J(x)).
propositional function S(x) denoting “x is a student in

x (S(x) ∧ J(x)) is not correct. What does it mean?


this class” and translate as
Translating from English to
Logic
Example 2: Translate the following sentence
into predicate logic: “Some student in this
class has taken a course in Java.”

Solution:

Solution 1: If U is all students in this class, translate as


First decide on the domain U.

x J(x)

Solution 2: But if U is all people, then translate as x


(S(x) ∧ J(x))
x (S(x)→ J(x)) is not correct.

What does it mean?


Returning to the Socrates
Example
Introduce the propositional functions Man(x)
denoting “x is a man” and Mortal(x) denoting
“x is mortal.” Specify the domain as all
people.
The two premises are:

The conclusion is:


Quantifiers with restricted
domains

The restriction of a universal


quantification is the same as the
universal quantification of a
conditional statement.
Example: ∀x < 0 (> 0) is another way
of expressing ∀x(x < 0 → > 0)
Quantifiers with restricted
domains
The restriction of an existential
quantification is the same as the
existential quantification of a
conjunction.
Example: ∃z > 0 (= 2) is another way
of expressing ∃z(z > 0 ∧ = 2).
Translation from English to
Logic
Examples:
1. “Some student in this class has visited
Mexico.”
Solution: Let M(x) denote “x has visited

this class,” and U be all people.


Mexico” and S(x) denote “x is a student in

x (S(x) ∧ M(x))
2. “Every student in this class has
visited
Canada
Solution: Addor Mexico.”
C(x) denoting “x has visited

x (S(x)→ (M(x)∨C(x)))
Canada.”
Translating from English into
Logical Expressions
U = {professor, ignorant, vain}
F(x): x is a professor
S(x): x is a ignorant
T(x): x is vain
Translate “No professors are ignorant.”

Solution: ∀x(F(x) → ¬ S(x))


Translation (cont)
U = {professor, ignorant, vain}
F(x): x is a professor
S(x): x is a ignorant
T(x): x is vain
“All ignorant people are vain.”
Solution: ∀x(S(x) → T(x))
Translation (cont)
U = {professor, ignorant, vain}
F(x): x is a professor
S(x): x is a ignorant
T(x): x is vain
“No professors are vain.”

Solution: ∀x(F(x) → ¬ T(x))


System Specification
Example
Predicate logic is used for specifying
properties that systems must satisfy.

For example, translate into predicate logic:


 “Every mail message larger than one

megabyte will be compressed.”


[ˈmegəbaɪt]
 “If a user is active, at least one network link

will be available.”
System Specification
Example
For example, translate into predicate logic:
 “Every mail message larger than one megabyte will be

compressed.”
 “If a user is active, at least one network link will be

available.”
Decide on predicates and domains (left implicit
here) for the variables:
 Let L(m, y) be “Mail message m is larger than y
megabytes.”
 Let C(m) denote “Mail message m will be
compressed.”
 Let A(u) represent “User u is active.”
 Let S(n, x) represent “Network link n is state x.
Now we have:
The author of Alice in wonderland

Lewis Carroll Example


The first two are called premises and the third is
called the conclusion.
1. “All lions are fierce.” Charles Lutwidge
2. “Some lions do not drink coffee.” Dodgson
3. “Some fierce creatures do not drink coffee.” (1832-1898)
Here is one way to translate these statements to
predicate logic. Let P(x), Q(x), and R(x) be the
propositional functions “x is a lion,” “x is fierce,” and

x (P(x)→ Q(x))
“x drinks coffee,” respectively.

x (P(x) ∧ ¬R(x))
1.

x (Q(x) ∧ ¬R(x))
2.

3.

Later we will see how to prove that the conclusion


follows from the premises.
Section
1.5

Nested Quantifiers
Section Summary
Nested Quantifiers
Order of Quantifiers
Translating from Nested Quantifiers into
English
Translating Mathematical Statements
into Statements involving Nested
Quantifiers.
Translated English Sentences into
Logical Expressions.
Negating Nested Quantifiers.
Nested Quantifiers
Nested quantifiers are often necessary to
express the meaning of sentences in English
as well as important concepts in computer
science and mathematics.
Example: “Every real number has an inverse”
inverse ['ɪn.vɜrs]

x y(x + y = 0)
n. [ 数 ] 相反数
is

where the domains of x and y are the real


numbers.
 We can also think of nested propositional
functions:
x y(x + y = 0) can be viewed as x Q(x)
where
Thinking of Nested
Quantification

To see if xyP (x,y) is true, loop through


Nested Loops

the values of x :

 At each step, loop through the values for y.


 If for some pair of x andy, P(x,y) is false, then x
yP(x,y) is false and both the outer and inner loop
terminate. terminate [‘tɜrmɪ.neɪt] v. 终止

y P(x, y) where P(x, y) is (x + y = 0)

x y P(x,y) is true if the outer loop ends


after stepping through each x.
Thinking of Nested
Quantification

To see if x yP(x,y) is true, loop through


Nested Loops

the values of x:

 At each step, loop through the values for y.


 The inner loop ends when a pair x and y is found
such that P(x, y) is true.
 If no y is found such that P(x, y) is true the outer
loop terminates as x yP(x,y) has been shown

x y P(x,y) is true if the outer loop ends


to be false.

after stepping through each x.


If the domains of the variables are infinite,
then this process can not actually be carried
out.
Order of Quantifiers

1. Let P(x,y) be the statement “x + y = y


Examples:

+ x.” Assume that U is the real


numbers. Then x yP(x,y) and y

2. Let Q(x,y) be the statement “x + y =


xP(x,y) have the same truth value.

0.” Assume that U is the real numbers.


Then x yP(x,y) is true, but y
xP(x,y) is false.
Questions on Order of
Quantifiers
Example 1: Let U be the real numbers,
Define P(x,y) : x ∙ y = 0

1.
What is the truth value of the following:
xyP(x,y)

2.
Answer: False
xyP(x,y)

3. xy P(x,y)
Answer: True

4. x  y P(x,y)
Answer: True

Answer: True
Questions on Order of
Quantifiers
Example 2: Let U be the real numbers,
Define P(x,y) : x / y = 1

1.
What is the truth value of the following:
xyP(x,y)

2.
Answer: False
xyP(x,y)

3. xy P(x,y)
Answer: True

4. x  y P(x,y)
Answer: False

Answer: True
Quantifications of Two
Variables
Statement When True? When False
P(x,y) is true for There is a pair x, y
every pair x,y. for which P(x,y) is
false.
For every x there is There is an x such
a y for which P(x,y) that P(x,y) is false
is true. for every y.
There is an x for For every x there is
which P(x,y) is true a y for which P(x,y)
for every y. is false.
There is a pair x, y P(x,y) is false for
for which P(x,y) is every pair x,y
true.
Translating Nested
Quantifiers into English
Example 1: Translate the statement
x (C(x )∨ y (C(y ) ∧ F(x, y)))
where C(x) is “x has a computer,” and F(x,y) is “x and y
are friends,” and the domain for both x and y consists of
all students in your school.

Solution: Every student in your school has a computer or


has a friend who has a computer.

Example 2: Translate the statement


xy z ((F(x, y)∧ F(x,z) ∧ (y
≠z))→¬F(y,z))
Solution: Every student none of whose friends are also
friends with each other.
Translating Mathematical
Statements into Predicate
Logic
Example : Translate “The sum of two positive
integers is always positive” into a logical
expression.
Solution:
1. Rewrite the statement to make the implied quantifiers
and
domains explicit:
“For every two integers, if these integers are both positive, then
the sum of these integers is positive.”
2. Introduce the variables x and y, and specify the domain,
to
obtain:
“For allis:positive integers x and y, x + y is positive.”
x  y ((x > 0)∧ (y > 0)→ (x + y > 0))
3. The result

where the domain of both variables consists of all


integers
Translating English into Logical
Expressions Example
Example: Use quantifiers to express the
statement “There is a woman who has
taken a flight on every airline in the
world.”
1. Let P(w,f) be “w has taken f ” and Q(f,a)
Solution:

on aof.”w is all women, the domain


be “f is
a flight
2. The domain
of f is

airlines. w a f (P(w,f ) ∧ Q(f,a))


3. all flights,
Then and the domain
the statement can beofexpressed
a is all as:
Calculus in Logic (optional)
Example: Use quantifiers to express the
definition of the limit of a real-valued function
f(x) of a real variable x at a point a in its
domain.
Solution: Recall the definition of the statement

is “For every real number ε > 0, there exists a real


number δ > 0 such that |f(x) – L| < ε whenever 0 <
|x –a| < δ.”
Using quantifiers:

Where the domain for the variables ε and δ


consists of all positive real numbers and the domain
for x consists of all real numbers.
Questions on Translation from
English
Example 1: “Brothers are siblings.”
Choose the obvious predicates and express in predicate logic.

Solution: x y (B(x,y) → S(x,y))


Example 2: “Siblinghood is symmetric.”
Solution: x y (S(x,y) → S(y,x))
Example 3: “Everybody loves somebody.”

Example 4: “There is someone who is loved by everyone.”


Solution: x y L(x,y)

Example 5: “There is someone who loves someone.”


Solution: y x L(x,y)

Example 6: “Everyone loves himself”


Solution: x y L(x,y)

Solution: x L(x,x)
Negating Nested Quantifiers
Example 1: Recall the logical expression developed three slides back:
w a f (P(w,f ) ∧ Q(f,a))
Part 1: Use quantifiers to express the statement that “There does not

Solution: ¬w a f (P(w,f ) ∧ Q(f,a))


exist a woman who has taken a flight on every airline in the world.”

Part 2: Now use De Morgan’s Laws to move the negation as far inwards
as possible.

¬w a f (P(w,f ) ∧ Q(f,a))


Solution:

2. w ¬ a f (P(w,f ) ∧ Q(f,a)) by De Morgan’s for 


1.

3. w  a ¬ f (P(w,f ) ∧ Q(f,a)) by De Morgan’s for 


w  a f ¬ (P(w,f ) ∧ Q(f,a)) by De Morgan’s for 
w  a f (¬ P(w,f ) ∨ ¬ Q(f,a)) by De Morgan’s for
4.

Part 3:∧.
5.
Can you translate the result back into English?
Solution:
“For every woman there is an airline such that for all flights, this
woman has not taken that flight or that flight is not on this airline”
Return to Calculus and Logic
(Opt)
Example : Recall the logical expression developed in the calculus example three
slides back.
Use quantifiers and predicates to express that does not exist.

1. We need to say that for all real numbers L,

2. The result from the previous example can be negated to yield:

3. Now we can repeatedly apply the rules for negating quantified expressions:

The last step uses the equivalence ¬(p→q) ≡ p∧¬q


Calculus in Predicate Logic
(optional)
4. Therefore, to say that does not
exist means that for all real numbers L,
can be expressed as:

Remember that ε and δ range over all positive


real numbers and x over all real numbers.

real number L, there is a real number ε > 0,


5. Translating back into English we have, for every

such that for every real number δ > 0, there


exists a real number x such that 0 < | x – a | <
δ and |f(x) – L | ≥ ε .
Some Questions about
Quantifiers (optional)
Can you switch the order of quantifiers?
 Is this a valid equivalence?
Solution: Yes! The left and the right side will
always have the same truth value. The order in
which x and y are picked does not matter.

 Is this a valid equivalence?


Solution: No! The left and the right side may

functions for P. Try “x + y = 0” for P(x,y) with U


have different truth values for some propositional

being the integers. The order in which the values of


x and y are picked does matter.
Some Questions about
Quantifiers (optional)
Can you distribute quantifiers over logical
connectives?
 Is this a valid equivalence?
Solution: Yes! The left and the right side will
always have the same truth value no matter what
propositional functions are denoted by P(x) and Q(x).

 Is this a valid equivalence?


Solution: No! The left and the right side may have
different truth values. Pick “x is a fish” for P(x) and “x
has scales” for Q(x) with the domain of discourse being
all animals. Then the left side is false, because there
are some fish that do not have scales. But the right
side is true since not all animals are fish.

You might also like