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

Lecture 4

The document discusses nested quantifiers and illegal quantifications. It provides examples of expressions with nested quantifiers and explains why certain expressions are nonsensical, such as binding a variable multiple times. It also discusses order matters for expressions with multiple quantifiers, and how negating multiple quantifiers works by changing the quantifiers and negating the predicates.

Uploaded by

Arif Imran
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Lecture 4

The document discusses nested quantifiers and illegal quantifications. It provides examples of expressions with nested quantifiers and explains why certain expressions are nonsensical, such as binding a variable multiple times. It also discusses order matters for expressions with multiple quantifiers, and how negating multiple quantifiers works by changing the quantifiers and negating the predicates.

Uploaded by

Arif Imran
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Nested Quantifiers

1
Illegal Quantifications
Once a variable has been bound, we cannot bind it again. For
example the expression
x ( x P (x) )
is nonsensical.
The interior expression (x P (x)) bounded x already and
therefore made it unobservable to the outside.
Going back to our example, the English equivalent would be:
Everybody is an everybody is an octopus.
Let P (x) = “x is an octopus”

L4 2
Multivariate Quantification
Quantification involving only one variable is fairly
straightforward. Just a bunch of OR’s or a bunch of AND’s.
When two or more variables are involved each of which is bound
by a quantifier, the order of the binding is important and the
meaning often requires some thought.

L4 3
Parsing Example
A: True.
For any “exists” we need to find a positive instance.
Since x is the first variable in the expression and is
“existential”, we need a number that works for
all other y, z. Set x = 0 (want to ensure that y -x
is not too small).
Now for each y we need to find a positive instance z
such that y - x ≥ z holds. Plugging in x = 0 we
need to satisfy y ≥ z so set z := y.

L4 6
Parsing Example

Q: Did we have to set z := y ?


A: No. Could also have used the constant z := 0. Many other
valid solutions.
Q: Isn’t it simpler to satisfy
x y z (y - x ≥ z )
by setting x := y and z := 0 ?
A: No, this is illegal ! The existence of x comes before we know
about y. i.e., the scope of x is higher than the scope of y so
as far as y can tell, x is a constant and cannot affect x.

L4 7
Multiple quantifiers
• You can have multiple quantifiers on a statement

• xy P(x, y)
– “For all x, there exists a y such that P(x,y)”
– Example: xy (x+y == 0)

• xy P(x,y)
– There exists an x such that for all y P(x,y) is true”
– xy (x*y == 0)

8
Order matters
Set the universe of discourse to be all natural numbers {0, 1, 2,
3, … }.
Let R (x,y ) = “x < y”.
Q1: What does x y R (x,y ) mean?
A1: x y R (x,y ):
“All numbers x admit a bigger number y ”
Q2: What does y x R (x,y ) mean?
A2: y x R (x,y ):
“Some number y is bigger than all x”

L4 9
Order matters
Q: What’s the true value of each expression?
A: x y R (x,y ) is true.
How: Just set y = x + 1
y x R (x,y ) is false
How: y is never bigger than itself, so setting x = y is a
counterexample
Q: What if we have two quantifiers of the same kind? Does
order still matter?

L4 10
Order matters –but not always
If we have two quantifiers of the same kind order is irrelevant.
x y is the same as y x because these are both interpreted
as “for every combination of x and y…”
x y is the same as y x because these are both interpreted
as “there is a pair x , y…”

L4 11
Negating multiple quantifiers
• Recall negation rules for single quantifiers:
– ¬x P(x) = x ¬P(x)
– ¬x P(x) = x ¬P(x)
– Essentially, you change the quantifier(s), and negate what
it’s quantifying

• Examples:
– ¬(xy P(x,y))
• = x ¬y P(x,y)
• = xy ¬P(x,y)
– ¬(xyz P(x,y,z))
• = x¬yz P(x,y,z)
• = x¬yz P(x,y,z)
• = xyz ¬P(x,y,z)

12
Negating multiple quantifiers 2
• Consider ¬(xy P(x,y)) = xy ¬P(x,y)
– The left side is saying “for all x, there exists a y such that P
is true”
– To disprove it (negate it), you need to show that “there
exists an x such that for all y, P is false”

• Consider ¬(xy P(x,y)) = xy ¬P(x,y)


– The left side is saying “there exists an x such that for all y,
P is true”
– To disprove it (negate it), you need to show that “for all x,
there exists a y such that P is false”
13
Translating between English and
quantifiers
• Rosen, section 1.4, question 20

• The product of two negative integers is positive


– xy ((x<0)  (y<0) → (xy > 0))
– Why conditional instead of and?
• The average of two positive integers is positive
– xy ((x>0)  (y>0) → ((x+y)/2 > 0))
• The difference of two negative integers is not necessarily
negative
– xy ((x<0)  (y<0)  (x-y≥0))
– Why and instead of conditional?
• The absolute value of the sum of two integers does not
exceed the sum of the absolute values of these integers
– xy (|x+y| ≤ |x| + |y|) 14
Translating between English and
quantifiers
• Rosen, section 1.4, question 24

• xy (x+y = y)
– There exists an additive identity for all real numbers
• xy (((x≥0)  (y<0)) → (x-y > 0))
– A non-negative number minus a negative number is greater
than zero
• xy (((x≤0)  (y≤0))  (x-y > 0))
– The difference between two non-positive numbers is not
necessarily non-positive (i.e. can be positive)
• xy (((x≠0)  (y≠0)) ↔ (xy ≠ 0))
– The product of two non-zero numbers is non-zero if and
only if both factors are non-zero
15
Rosen, section 1.4 question 30
• Rewrite these statements so that the negations
only appear within the predicates
a) yx P(x,y)
yx P(x,y)
yx P(x,y)
b) xy P(x,y)
xy P(x,y)
xy P(x,y)
c) y (Q(y)  x R(x,y))
y (Q(y)  x R(x,y))
y (Q(y)  (x R(x,y)))
y (Q(y)  x R(x,y))

16
Rosen, section 1.4 question 31
• Express the negations of each of these statements so that
all negation symbols immediately precede predicates.
a) xyz T(x,y,z)
(xyz T(x,y,z))
xyz T(x,y,z)
xyz T(x,y,z)
xyz T(x,y,z)
xyz T(x,y,z)
b) xy P(x,y)  xy Q(x,y)
(xy P(x,y)  xy Q(x,y))
xy P(x,y)  xy Q(x,y)
xy P(x,y)  xy Q(x,y)
xy P(x,y)  xy Q(x,y)

17

You might also like