Upload
alvaro-cardenas
View
134
Download
1
Embed Size (px)
Citation preview
• 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”)
Lecture 3
• Predicate P(x,y,z) is a statement involving a variable, e.g., x+y<z
• Universal quantifier
• For all x (in the domain), P(x)
• Existential quantifier
• There is an element x (in the domain) such that P(x)
Predicate Logic (First order Logic)
�xP (x)
�xP (x)
�x � DP (x)
�x � DP (x)
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
Set Notation
Z = {. . . ,�2,�1, 0, 1, 2, . . . } set of integersN = {x � Z : x � 0} set of natural numbers
Z+ = {x � Z : x > 0} set of positive integersQ = {p/q : p � Z, q � Z� {0}}set of rational numbersR = the set of real numbers
Examples
�x � Z(x > 0)
�x � Z+(x > 0)
�x � Z+(x < 0)�x � Z (x is even)
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
• “All humans are mortal.”
• “Hypatia is a human.”
Propositional Logic is not Enough
�xHuman(x)�Mortal(x)Human(Hypatia)=� Mortal(Hypatia)
Uniqueness Quantifier
• 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)”
�!x � U(P (x))
Uniqueness Quantifier
• Examples:
• 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 � Z(x + 1 = 0) is true�!x � Z(x > 0) is false
�x(P (x) � �y(P (y) � (y = x)))
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
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
Negation of Quantified Expressions
¬(�x � SP (x)) �� �x � S¬P (x)
¬(�x � SP (x)) �� �x � S¬P (x)
Nested Quantifiers
�y � R�x � R : x + y = 0• There is a y such that for all x, x+y=0
• Is this true?
• 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
�y � R�x � R : x + y = 0
The Order of Quantifiers is Important
• The converse might not be true!
�y�xP (x, y) is true =� �x�yP (x, y) is true
�x�yP (x, y) is true =� �y�xP (x, y) is true
Are These True?
�x > 0�y > 0�
x
y= 1
�
�x > 0�y > 0�
x
y= 1
�
The Negation is True (so original is false)
¬��x > 0�y > 0
�x
y= 1
����
�x > 0�y > 0�
x
y�= 1
�
e.g., x = 3, y = 4
The Negation is True (so the original is false)
¬��x > 0�y > 0
�x
y= 1
����
�x > 0�y > 0�
x
y�= 1
�
e.g., y = 2x
Example: Limit of a Function
• Can be considered as a game (or challenge)
• You give me any
• I guarantee you that I can find an interval
• Such that for all values of x in that interval, the distance from f(x) to L is smaller than
limx�a
f(x) = L :��
�� > 0�� > 0�x(0 < |x� a| < � � |f(x)� L| < �
� > 0
0 < |x� a| < �
�
Negating Limit Definition
limx�a
f(x) �= L ��
¬(�� > 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