1 / 45

Predicate Logic: Rules and Equivalences

Learn about the rules of inference and equivalences in predicate logic, including quantifiers and Boolean operators. Understand how to manipulate formulas to derive new conclusions.

Download Presentation

Predicate Logic: Rules and Equivalences

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ece 627intelligent web: ontology and beyond lecture 14: predicate logic

  2. predicate logic… a predicate (relation) – is a function that maps its arguments to the truth values 0 or 1 known example: less then (symbol <), for arguments 5 and 8 we have 5<8 is true, and 8<5 is false they can be written as infix like <, or letter(s), for example R(x,y) or mother(x,y)

  3. predicate logic… predicate logic is not a replacement for propositional logic but an extension or refinement of it

  4. predicate logic… in propositional logic, the preposition Every peach is fuzzy is represented by a single symbol p, in predicate logic, the statement is shown in finer detail - with universal quantifier ( x)(peach(x) fuzzy(x))

  5. predicate logic… - with existential quantifier ~( x)(peach(x) ~fuzzy(x))

  6. predicate logic… - with both quantifiers ( x)( y)(integer(x) (prime(y) x<y)

  7. predicate logic… order of quantifiers ( x)( y) ( man(x) dept(x,account) (woman(y) hometown(y,Boston) married(x,y)) )

  8. predicate logic… while … ( y)( x) ( man(x) dept(x,account) (woman(y) hometown(y,Boston) married(x,y)) )

  9. predicate logicformation rules vocabulary contains symbols for constants and variables, parenthesis, Boolean operators, and symbols for quantifiers, functions and predicates all of them are combined according to three rules

  10. predicate logicformation rules a term is either a constant (2 or a, b, c, …), a variable (x, y or x0, x1, x2, …), or a function or an operator symbol applied to its arguments, each of which is itself a term for example: f(x), 2+2

  11. predicate logicformation rules an atom is either a single letter (p) representing preposition or a predicate symbol (P, Q, R, …) applied to its arguments, each of which is itself a term for example: P(f(x), 2+2), Q(7)

  12. predicate logicformation rules a formula is either an atom, a formula preceded by ~, any two formulas A and B together with any two-place Boolean operator op in the combination (A op B), or any formula A and any variable x in either of the combinations ( x)A or ( x)A

  13. predicate logicformulas - examples (P(f(x),2+2) Q(7)) ~(P(f(x),2+2) Q(7)) ( y)~(P(f(x),2+2) Q(7)) ( x)( y)~(P(f(x),2+2) Q(7)) the occurrence of x in f(x) is bound by the quantifier ( x), the quantifier ( y) has not effect on the formula, y does not occur as an argument of any function/predicate

  14. predicate logicformulas - examples John is tall T(j) John is taller than Bill TR(j,b) Everybody sleeps x (S(x)) Somebody likes David x [L(x,d)]

  15. predicate logicformulas - examples There are happy people x H(x) Some books are interesting x [B(x) I(x)] Some books are interesting and some are easy to read x [B(x) I(x)] x [B(x) E(x)] No books are good x [B(x) G(x)]

  16. predicate logicrules of inference rule of inference - is to preserve truth, if we start with formulas that are true, the result of performing a rule of inference on them must also be true

  17. predicate logicrules of inference issue of equivalence: ( x)(peach(x) fuzzy(x)) ~( x)(peach(x) ~fuzzy(x)) if these formulas were represented by p and q, there would be no way to prove p q, but the rules of predicate logic can show the equivalence

  18. predicate logicrules of inference the rule for relating the quantifiers ( x)A is equivalent to ~( x)~A ( x)A is equivalent to ~( x)~A

  19. predicate logicrules of inference so, the first rule: ~( x)~(peach(x) fuzzy(x)) knowing, that ~(p ~q), then ~( x)~~(peach(x) ~fuzzy(x))

  20. predicate logicrules of inference and ~( x)(peach(x) ~fuzzy(x)) this shows 1st formula implies 2nd, if we use the inverse of rules to show the 2nd implies 1st – then both formulas are equivalent

  21. predicate logicrules of inference Modus ponens: from p and p q, derive q Modus tollens: from ~q and p q, derive ~p

  22. predicate logicrules of inference Hypothetical syllogism: from p q and q r, derive p r Disjunctive syllogism: from p q and ~p, derive p

  23. predicate logicrules of inference Conjunction: from p and q, derive p q Addition: from p, derive p q (any formula may be added to a disjunction)

  24. predicate logicrules of inference Subtraction: from p q, derive p (extra conjuncts may be thrown away)

  25. predicate logicequivalences Idempotency: p p is equivalent to p, and p p is equivalent to p Commutativity: p q is equivalent to q p, and p q is equivalent to q p

  26. predicate logicequivalences Associativity: p (q r) is equivalent to (p q) r, and p (q r) is equivalent to (p q) r Distributivity: p (q r) is equivalent to (p q) (p r), and p (q r) is equivalent to (p q) (p r)

  27. predicate logicequivalences Absorption: p (p q) is equivalent to p, and p (p q) is equivalent to p Double negation: p is equivalent to ~~p

  28. predicate logicequivalences De Morgan’s laws: ~(p q) is equivalent to ~p ~q, and ~(p q) is equivalent to ~p ~q

  29. predicate logicrules for quantifiers if A is an atom, then all occurrences of a variable in A are said to be free if a formula C was derived from formulas A and B by combining them with Boolean operators, then all occurrences of variables that are free in A and B are also free in C

  30. predicate logicrules for quantifiers if a formula C was derived form a formula A by preceding A with either ( x) or ( x), then all free occurrences of x in A are said to be bound in C, all free occurrences of other variables in A remain free in C

  31. predicate logicrules for quantifiers rules for dealing with variables depend on which occurrences are free and bound and which variables must be renamed to avoid name clashes with other variables

  32. predicate logicrules for quantifiers let F(x) be a formula with one or more free occurrences of a variable x, then F(t) is the result of substituting every free occurrence of x in F with t

  33. predicate logicrules of quantifier negation ( x)A ~( x)~A ( x)A ~( x)~A ~( x)A ( x)~A ~( x)A ( x)~A

  34. predicate logicrules of quantifier (in)dependence ( x)( y)A(x,y) ( y)( x)A(x,y) ( x)( y)A(x,y) ( y)( x)A(x,y) ( x)( y)A(x,y) ( y)( x)A(x,y)

  35. predicate logicrules of quantifier movement A ( x)(B(x)) ( x)(A B(x)) A ( x)(B(x)) ( x)(A B(x)) ( x)(B(x)) A ( x)(B(x) A) ( x)(B(x)) A ( x)(B(x) A)

  36. predicate logicrules of quantifier movement example: ( x)(P(x)) ( y)(Q(y)) ( y)[( x)(P(x)) (Q(y))] ( y)( x)[(P(x)) (Q(y))]

  37. predicate logicrules for quantifiers: permissible substitutions universal instantiation: from ( x)F(x), derive F(c) where c is any constant existential generalization: from F(c), where c is any constant, derive ( x)F(x) provided that every occurrence of x in F(x) is free

  38. predicate logicrules for quantifiers: permissible substitutions dropping quantifiers: if the variable x does not occur free in F, then from ( x)F(x) derive F, and from ( x)F(x) derive adding quantifiers: from F derive ( x)F or derive ( x)F, where x is any variable

  39. predicate logicrules for quantifiers: permissible substitutions substituting equal for equals: for any terms s and t where s=t, derive F(t) from F(s), provided that all free occurrences of variables in t remain free in F(t)

  40. typed predicate logic… this form is a purely syntactic extension of untyped logic – its semantic identical to untyped logic, as well as ever theorem and proof the only difference – addition of a type label after the quantifier – x:N - (label is a monadic predicate - n(x))

  41. typed predicate logic… for knowledge representation typed logic has the advantage of being more concise and readable it can support rules of inference based on inheritance (they do not make logic more expressive, they shorten some proofs)

  42. typed predicate logic… Universal: ( x:N)F(x) ( x)(n(x) F(x)) Existential: ( x:N)F(x) ( x)(n(x) F(x))

  43. typed predicate logic… with a string of multiple quantifiers of the same kind and with the same type label, it is permissible to factor out the common quantifier and type label ( x,y,x:Number) ((x < y y < z) x < z)

  44. typed predicate logic… for untyped … ( x)(number(x) ( y)(number(y) ( z)(number(z) ((x < y y < z) x < z) )))

  45. typed predicate logic… Untyped formula as a special case of a typed one Universal: ( x:T)F(x) ( x)(T(x) F(x)) ( x) F(x) Existential: ( x:T)F(x) ( x)(T(x) F(x)) ( x) F(x)

More Related