270 likes | 733 Views
Predicate Calculus. David England 9/28/2011. Overview. What is Predicate Calculus Propositional Logic Problems with Propositional Logic Language of Predicate Calculus Some examples Applications to this course. What is Predicate Calculus?. pred·i·cate cal·cu·lus noun /ˈ predəkət /
E N D
Predicate Calculus David England 9/28/2011
Overview • What is Predicate Calculus • Propositional Logic • Problems with Propositional Logic • Language of Predicate Calculus • Some examples • Applications to this course
What is Predicate Calculus? • pred·i·catecal·cu·lus • noun /ˈpredəkət/ • The branch of symbolic logic that deals with propositions containing predicates, names, and quantifiers • Example: • “Every person is better off than someone else.” • x[Px⊃(y[Py⋀B(x,y)])]
Propositional Logic (1 of 5) • A proposition, or statement, is any declarative sentence which is either true (T) or false (F). • Rules on propositions: • No questions or directives • “What time is it?” • “Get me a coffee” • No “Self-Referential” statements • “This sentence is false” • We denote propositions as follows: • p:“the moon is round”
Propositional Logic (2 of 5) • Logical operators on statements: • Negation (not) ~ ~ P • Conjunction (and) ⋀ S ⋀ P • Disjunction (or) ⋁ S ⋁ P • Conditional (if-then) ⊃ S ⊃ P • ~p:“the moon is not round” • Negation truth table:
Propositional Logic (3 of 5) • Conjunction (and) truth table: • Example: • p:“It is raining outside” • q:“I am 23 years old” • p⋀ q = ? • What about p⋀ ~q = ?
Propositional Logic (4 of 5) • Disjunction (or) truth table: • Example: • p:“It is raining outside” • q:“It is a sunny day” • p⋁ q = ? • How about (p⋁ q) ⋀ ~(p⋀ q) = ?
Propositional Logic (5 of 5) • Conditional (if-then) truth table: • Example: • p:“I think” • q:“I am” • p⊃ q = ?
More About Implications • There are a few relations among implications that are given special names • Consider the statement p ⊃ q, then: • q⊃ p is called the converse • ~q ⊃ ~p is called the contrapositive • ~p⊃ ~q is called the inverse
Tautologies, Logical Equivalence and Contradictions • Tautologies are statements that are true for all possible truth values • Example: p ≡ ~(~p) • Logically equivalent statements have the same truth tables • Example: p⊃ q and ~q⊃ ~p (contrapositive) • Contradictions are statements that are false for all possible truth values • Examples: p ⋀ ~p or (p ⋁ q) ⋀ [(~p) ⋀ (~q)]
Important Tautologies • Double Negative • ~(~p) ≡ p • DeMorgan’s Law: • ~(p ⋁ q) ≡ (~p)⋀ (~q) • ~(p⋀ q) ≡ (~p) ⋁ (~q) • Commutative laws: • p⋀ q ≡ q⋀ p • p⋁ q ≡ q⋁ p • Associative laws: • (p ⋀q) ⋀r ≡p ⋀(q ⋀r) • (p⋁ q) ⋁ r ≡ p⋁ (q⋁ r) • Distributive Laws: • p⋀ (q ⋁ r) ≡ (p⋀ q) ⋁ (p⋀ r) • p⋁ (q⋀ r) ≡ (p ⋁ q) ⋀ (p ⋁ r)
Tautological Implications • Modus Ponens (Direct Reasoning): • [(p⊃ q)⋀ p ]⊃ q • Modus Tollens (Indirect Reasoning): • [(p ⊃ q) ⋀ ~q ] ⊃ ~p • Simplification • (p ⋀ q) ⊃ p • (p ⋀ q) ⊃ q • Addition • p⊃ (p⋁ q) • Disjunctive Syllogism • [(p ⋁ q)⋀ (~p)] ⊃ q • Syllogism (Transivity) • [(p⊃ q) ⋀ (q⊃ r)]⊃ (p⊃ r)
Arguments • An argument is a list of statements called premises followed by a statement called the conclusion. • The argument is valid if: • P1⋀ P2⋀ P3⋀ …⋀ Pn ⊃ C, where the Pi’s are premises and C is the conclusion • A proof is a list of statements proving an argument, in which each statement is obtained via tautological manipulation from the last statement • Example: • Premises: a⊃ q and b ⊃ q, Conclusion (a ⋁ b) ⊃ q • a⊃ q • b⊃ q • ~a⋁ q • ~b⋁ q • (~a⋁ q)⋀ (~b⋁ q) • (~a ⋀ ~b)⋁ q • ~(a⋁ b) ⋁ q • (a⋁ b) ⊃ q
Limits of Propositional Calculus • How do we solve the following argument: • All men are mortals • Socrates is a man • Therefore, Socrates is a mortal • We would write the following: • p: “All men are mortal” • q: “Socrates is a man” • r: “Socrates is a mortal” • Premise p and q, Conclusion r • Is that a valid argument?
Predicate Calculus • Consider the sentence: • "For all x, if x is a man then x is mortal.“ • The sentence “x is a man” is not a statement in propositional calculus • This sentence can be broken down into its subject, x, and a predicate, "is a man.“ • How do we write it symbolically? • As above we call the subject x • We call the predicate “is a man” P • We write Px to represent “x is a man” • Let Q represent the predicate “is a mortal” • Now “if x is a man then x is mortal” reads • Px ⊃ Qx
Universal Quantifiers • For all xP(x) • P(x0) P(x1) P(x2) P(x3) . . . for all xi • There exists xP(x) • P(x0) P(x1) P(x2) P(x3) . . . for all xi • Examples: • "For all x, if x is a man then x is mortal.“ • x[Px⊃ Qx] • “No men are mortal” • x[Px ⊃ ~Qx] • “Some men are mortal” • ~x[Px ⊃ Qx] • x[Px⊃ Qx]
Is Socrates a mortal? • Lets go back to the argument: • All men are mortals • Socrates is a man • Therefore, Socrates is a mortal • Can we deal with this now? • Let P be “is a man”, Q be “is a mortal”, and s be “Socrates” • Then our argument becomes: • Premise x[Px ⊃ Qx], Ps • Conclusion Qs • Is this a valid argument?
One More Example • Examine the following argument: "For every person x, there is a person y such that x is better off than y." • Now we can see two quantifiers, a universal one and an existential one. We also need some predicates, including P for "is a person," and one more predicate B(x,y) to stand for "x is better off than y." • This is a new kind of predicate, taking two terms. Since it relates its two terms, such a 2-place predicate is often called a relation.
Why should you care? • Predicate calculus allows us to derive new knowledge from old in a manner that computers understand • Example: • Let F be “is a female” and P be “is a parent of” (P is a relation) • Then Fx P(x,y) ⊃ M(x,y), where M is “is a mother of” • Relation to rough set theory
Conclusion • Propositional logic allows us to find tautological relationships and prove conclusions based on premises • Predicate calculus is built upon propositional logic • Predicate calculus allows us to extend propositional logic to cases of abstract predicates • With these tools we can infer knowledge! Questions???