Download presentation
Presentation is loading. Please wait.
Published byLenard Sutton Modified over 9 years ago
1
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa
2
Lecture 042 Predicate Logic Domain objects (constants/variables): Socrates, SSK3003 Predicates: Mortal(Socrates) Teach(SSK3003) Happened(haze,yesterday) Quantifiers: For all, Exists Statements/formulae: Atomic, conjunctive, etc. Quantified (universally / existentially)
3
Lecture 043 The Big Picture Logic is being used to verify validity of arguments An argument is valid iff its conclusion logically follows from the premises Derivations (deductions) are used to prove validity Inference rules are used as part of derivations
4
Lecture 044 Limitations of Propositional Logic Let’s get back to Socrates “All people are mortal” “Socrates is a man” “Socrates is mortal” Can we formalize this in propositional logic? Our previous attempt was: “If Socrates is a man then Socrates is mortal” “Socrates is a man” “Socrates is mortal” Clearly NOT the same!
5
Lecture 045 What is the matter? The problem is: We operate with constant objects only We have no domain context and no domain variables We cannot say “all”, “is a”, etc. Solution? Predicate Logic
6
Lecture 046 Translation Examples “Every man is mortal” x [man(X) mortal(x)] “Socrates is a man” man(Socrates) “Socrates is mortal” mortal(Socrates) The last statement logically follows from the premises
7
Lecture 047 More translations “Ducks fly” x [duck(x) flies(x)] “F-16s fly” x [F-16(x) flies(x)] “F-16s are ducks” x [F-16(x) duck(x)] The last statement does not logically follow from the premises
8
Lecture 048 PredicatePredicate A predicate is a sentence that contains a finite number of variables and becomes a statement when specific values are substituted for the variables. The domain of a predicate variable is the set of all values that may be substituted in place of the variable.
9
Lecture 049 Domain Objects We can now have variables and constants: Socrates is a constant (a specific member) in the set of all people X is a variable over the set of people i.e., X can be any person We can instantiate X=Socrates
10
Lecture 0410 Evaluating Predicates Predicates take domain objects and map them to true/false depending on the properties of the objects Thus, a predicate with all its variables instantiated (substituted) is a statement (i.e., true/false) Example: BetterThan(v 1,v 2 ) BetterThan(Ferrari,nothing)=true
11
Lecture 0411 Truth values of a Predicate P(x) be the predicate “x 2 > x ” with domain the set R of all real numbers. P(2): 2 2 > 2. True. P(1/2): (1/2) 2 > ½. False P(-1/2): (-1/2) 2 > -1/2 or 1/4 > -1/2. True.
12
Lecture 0412 Truth Set Suppose P(x) is “x is a factor of 8” So how about the following: P(1) True P(2) True P(0) False The set of all x such that P(x) holds (remains true) is called the truth set of P(x) Here it would be {1,2,4,8}
13
Lecture 0413 ExamplesExamples Suppose P(x,y,r) is “x 2 +y 2 =r 2 ” What is the truth set of P(x,y,5)? Circle with the radius of 5 centered in the origin Suppose P(n) is “n is an even three- digit prime number” What is the truth set of P(n)? An empty set
14
Lecture 0414 Universal Quantifier The statement For all x U, p(x) is symbolized by x U p(x). The above statement is TRUE if and only if p(x) is TRUE for every x U. The symbol is called the universal quantifier.
15
Lecture 0415 Example Universal Quantifier Let U = {1, 2, 3, 4, 5, 6}. Determine the truth value of the statement x U [(x – 4)(x – 8) > 0]. Let p(x) = “(x – 4)(x – 8) > 0.” p(1) is TRUE because “(1 – 4)(1 – 8) > 0” is TRUE. p(2) is TRUE because “(2 – 4)(2 – 8) > 0” is TRUE. p(3) is TRUE because “(3 – 4)(3 – 8) > 0” is TRUE.
16
Lecture 0416 Example Universal Quantifier p(x) = “(x – 4)(x – 8) > 0.” p(4) is FALSE because “(4 – 4)(4 – 8) > 0” is FALSE. Therefore, the statement x U [(x – 4)(x – 8) > 0] is FALSE because 4 U and p(4) is FALSE.
17
Lecture 0417 Existential Quantifier The statement There exists an x U such that p(x) is symbolized by x U p(x). The above statement is TRUE if and only there is at least one element x U such that p(x) is TRUE. The symbol is called the existential quantifier.
18
Lecture 0418 Example Existential Quantifier Let U = {1, 2, 3, 4, 5, 6, 7, 8}. Determine the truth value of x U [(x – 3)(x + 2) = 0]. Let p(x) = “(x – 3)(x + 2) = 0.” p(1) is FALSE because “(1 – 3)(1 + 2) = 0” is FALSE. p(2) is FALSE because “(2 – 3)(2 + 2) = 0” is FALSE. p(3) is TRUE because “(3 – 3)(3 + 2) = 0” is TRUE. Therefore, the statement x U [(x – 3)(x + 2) = 0] is TRUE because we found 3 U such that p(3) is TRUE.
19
Lecture 0419 Predicate Formulae Everything from propositional logic Boolean variables become 0-arity predicates… Additionally: Predicates, e.g.: Mortal(x) Universally quantified formulae, e.g.: x [man(x) mortal(x)] Existentially quantified formulae, e.g.: x [man(x) & likes272(x)]
20
Lecture 0420 Evaluating formulae Predicate formula: D=( x [likes(x,c272)]) A possible interpretation assigns: Domain set for x : people Domain value for 2 nd argument of likes(a,b) : things Domain value for constant c272 : class CMPUT 272 Semantics for predicate likes(a,b) : holds iff person a likes thing b So what is the value of formula D given the interpretation? True/false? How can we tell?
21
Lecture 0421 Evaluating Formula 0-arity predicate : P() Interpretation directly Predicate with variables : P(x) Use the assignment of x and the semantics of P() Universally quantified formula : x P(x) Evaluates to true iff P(x) holds on all possible values of x Existentially quantified formulae : x P(x) Evaluates to true iff P(x) holds on at least one possible value of x
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.