SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
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”)
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)
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 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
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
Propositional Logic is
     not Enough

• “All humans are mortal.”
• “Hypatia is a human.”
            xHuman(x)   M ortal(x)
           Human(Hypatia)
            = M ortal(Hypatia)
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)”
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)))
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?
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
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
Are These True?
           x
x>0 y>0      =1
           y
           x
x>0 y>0      =1
           y
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
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
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
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

Contenu connexe

Tendances

Frstorder 9 sldes read
Frstorder 9 sldes readFrstorder 9 sldes read
Frstorder 9 sldes read
Yasir Khan
 
11 X1 T02 06 relations and functions (2010)
11 X1 T02 06 relations and functions (2010)11 X1 T02 06 relations and functions (2010)
11 X1 T02 06 relations and functions (2010)
Nigel Simmons
 

Tendances (14)

Day 3 of Free Intuitive Calculus Course: Limits by Factoring
Day 3 of Free Intuitive Calculus Course: Limits by FactoringDay 3 of Free Intuitive Calculus Course: Limits by Factoring
Day 3 of Free Intuitive Calculus Course: Limits by Factoring
 
Bayes2
Bayes2Bayes2
Bayes2
 
1202 ch 12 day 2
1202 ch 12 day 21202 ch 12 day 2
1202 ch 12 day 2
 
Calculus II - 21
Calculus II - 21Calculus II - 21
Calculus II - 21
 
1201 ch 12 day 1
1201 ch 12 day 11201 ch 12 day 1
1201 ch 12 day 1
 
Theorems on limits
Theorems on limitsTheorems on limits
Theorems on limits
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 5: Continuity (slides)
Lesson 5: Continuity (slides)Lesson 5: Continuity (slides)
Lesson 5: Continuity (slides)
 
Frstorder 9 sldes read
Frstorder 9 sldes readFrstorder 9 sldes read
Frstorder 9 sldes read
 
Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)Lesson 13: Exponential and Logarithmic Functions (slides)
Lesson 13: Exponential and Logarithmic Functions (slides)
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
11 X1 T02 06 relations and functions (2010)
11 X1 T02 06 relations and functions (2010)11 X1 T02 06 relations and functions (2010)
11 X1 T02 06 relations and functions (2010)
 
Lesson 17: Indeterminate forms and l'Hôpital's Rule (slides)
Lesson 17: Indeterminate forms and l'Hôpital's Rule (slides)Lesson 17: Indeterminate forms and l'Hôpital's Rule (slides)
Lesson 17: Indeterminate forms and l'Hôpital's Rule (slides)
 
Day 2: Basic Properties of Limits
Day 2: Basic Properties of LimitsDay 2: Basic Properties of Limits
Day 2: Basic Properties of Limits
 

Similaire à Lecture3

Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptx
MohanKumarP34
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 

Similaire à Lecture3 (20)

X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment help
 
3 fol examples v2
3 fol examples v23 fol examples v2
3 fol examples v2
 
PredicateLogic (1).ppt
PredicateLogic (1).pptPredicateLogic (1).ppt
PredicateLogic (1).ppt
 
PredicateLogic.pptx
PredicateLogic.pptxPredicateLogic.pptx
PredicateLogic.pptx
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Quantifier
QuantifierQuantifier
Quantifier
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 
Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptx
 
Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Probability_Review.ppt
Probability_Review.pptProbability_Review.ppt
Probability_Review.ppt
 
Probability_Review.ppt for your knowledg
Probability_Review.ppt for your knowledgProbability_Review.ppt for your knowledg
Probability_Review.ppt for your knowledg
 

Lecture3

  • 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
  • 12. Negation of Quantified Expressions ¬( x SP (x)) x S¬P (x) ¬( x SP (x)) x S¬P (x)
  • 13.
  • 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
  • 17. Are These True? x x>0 y>0 =1 y x x>0 y>0 =1 y
  • 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