Nested Quantifiers
https://slides.com/georgelee/ics141-nested-quantifiers/live
Yo dawg I heard you like quantifiers
So I put some quantifiers in your quantifiers
∀x ∀y ∃z x * y = z
(where the domain of x, y, and z are the real numbers)
Let's break it down
∀x ∀y ∃z x * y = z
- ∀x P(x) where P(x) = "∀y ∃z x * y = z"
- ∀x ∀y Q(y) where Q(y) = "∃z x * y = z"
- ∀x ∀y ∃z R(z) where R(z) = "x * y = z"
∀x ∀y ∃z x * y = z
- What if it were "∀z"?
- What if we did "∃z ∀x ∀y"?
Two Variable Quantifiers
Let P(x, y) be "x has seen movie y" where x are students in this class and y are movies on Netflix.
- ∀x ∀y P(x, y)
- ∀x ∃y P(x, y)
- ∃x ∀y P(x, y)
- ∃x ∃y P(x, y)
Let's Get Crazier
Let P(x) = "x owns a PS4" and Q(x, y) = "x played y"
x is students in this class, y is PS4 games
- ∃x P(x) ^ ¬Q(x, Uncharted 4)
- ∀x P(x) → ∃y Q(x, y)
- ∃x P(x) ^ ¬∀y Q(x, y)
- ∃x P(x) ^ ∃y ¬Q(x, y)
How do we express "Exactly two students own PS4s and played Destiny"?
The Uniqueness Quantifier
- Recall "∃! x P(x)" means there exists exactly 1 x
- We can express this in terms of our other quantifiers
- ∃! x P(x) ↔ ∃ x P(x) ^ ∀ y (P(y) → y = x)
Exactly two students own PS4s and played Destiny
- ∃ x P(x) ^ Q(x, Destiny)
- ∃ x ∃ y (P(x) ^ Q(x, Destiny)) ^ (P(y) ^ (Q(y, Destiny))
- ∃ x ∃ y (P(x) ^ Q(x, Destiny)) ^ (P(y) ^ (Q(y, Destiny))
∀ z (P(z) ^ Q(z, Destiny)) → (z = x v z = y)
Negating Nested Quantifiers
DeMorgan's Laws all the way down
-
¬∃x ∃y ∀z P(x, y, z)
think of it as ¬∃x P(x) -
∀x ¬∃y ∀z P(x, y, z)
∀x ¬P(x) - ∀x ∀y ¬∀z P(x, y, z)
- ∀x ∀y ∃z ¬P(x, y, z)
Nested Quantifiers
By George Lee
Nested Quantifiers
I heard you like quantifiers
- 1,117