1. Lecture 3
• p=“All humans are mortal.”
• q=“Hypatia is a human.”
• Does it follow that “Hypatia is mortal?”
• In propositional logic these would be two
unrelated propositions
• We need a language to encode sets and
variables (e.g., the set of humans and the
element “Hypatia”)
2. Predicate Logic (First
order Logic)
• Predicate P(x,y,z) is a statement involving a
variable, e.g., x+y<z
• Universal quantifier xP (x)
• For all x (in the domain), P(x) x DP (x)
• Existential quantifier xP (x)
• There is an element x (in the domain)
such that P(x) x DP (x)
3. Example
• Let “x - y = z” be denoted by Q(x, y, z).
Find these truth values:
• Q(2,-1,3)
• Solution: T
• Q(3,4,7)
• Solution: F
• Q(x, 3, z)
• Solution: Not a Proposition
4. Set Notation
Z = {. . . , 2, 1, 0, 1, 2, . . . } set of integers
N = {x Z : x 0} set of natural numbers
Z = {x Z : x > 0} set of positive integers
+
Q = {p/q : p Z, q Z {0}}set of rational numbers
R = the set of real numbers
5. Examples
x Z(x > 0)
x Z (x > 0)
+
x Z (x < 0)
+
x Z (x is even)
6. Examples
x Z(x > 0) is false
x Z (x > 0) is true
+
x Z (x < 0) is false
+
x Z (x is even) is true
7. Propositional Logic is
not Enough
• “All humans are mortal.”
• “Hypatia is a human.”
xHuman(x) M ortal(x)
Human(Hypatia)
= M ortal(Hypatia)
8. Uniqueness Quantifier
• !x U (P (x)) means that P(x) is true for
one and only one x in the universe of
discourse.
• “There is a unique x such that P(x).”
• “There is one and only one x such that
P(x)”
9. Uniqueness Quantifier
• Examples: !x Z(x + 1 = 0) is true
!x Z(x > 0) 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)))
10. Are These Negations
Correct?
• Every animal wags its tail when it is happy
• No animal wags its tail when it is happy.
• There is an animal that wags its tail when
happy
• There is an animal that does not wag its
tail when happy
11. Correct Negations
• Every animal wags its tail when it is happy
• There is an animal that does not wag its
tail when it is happy
• There is an animal that wags its tail when
happy
• All animals do not wag their tail when
happy
14. Nested Quantifiers
y R x R:x+y =0
• There is a y such that for all x, x+y=0
• Is this true?
15. y R x R:x+y =0
• There is a y such that for all x, x+y=0
• False!
• The correct proposition is the following:
y R x R:x+y =0
16. The Order of
Quantifiers is Important
y xP (x, y) is true = x yP (x, y) is true
• The converse might not be true!
x yP (x, y) is true = y xP (x, y) is true
18. The Negation is True
(so original is false)
x
¬ x>0 y>0 =1
y
x
x>0 y>0 =1
y
e.g., x = 3, y = 4
19. The Negation is True
(so the original is false)
x
¬ x>0 y>0 =1
y
x
x>0 y>0 =1
y
e.g., y = 2x
20. Example:
Limit of a Function
lim f (x) = L :
x a
>0 > 0 x(0 < |x a| < |f (x) L| <
• Can be considered as a game (or challenge)
• You give me any > 0
• I guarantee you that I can find an interval
0 < |x a| <
• Such that for all values of x in that interval,
the distance from f(x) to L is smaller than
21. Negating Limit
Definition
lim f (x) = L
x a
¬( > 0 > 0 x(0 < |x a| < |f (x) L| < ))
> 0 > 0 x¬(0 < |x a| < |f (x) L| < )
> 0 > 0 x(0 < |x a| < |f (x) L| )
The last step uses the equivalence ¬(p→q) ≡ p∧¬q