Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.

Similar presentations


Presentation on theme: "Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna."— Presentation transcript:

1 Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna

2 Propositional logic

3 A formal definition of propositional logic formulas: [Adapted from M.Davis, E.Weyukerl]

4 Propositional logic - assignments [Adapted from M.Davis, E.Weyukerl]

5 Propositional logic How useful is propositional logic?

6 Satisfiability and tautologies In Latvian: satisfiable = nepretrunīga unsatisfiable=pretrunīga [Adapted from M.Davis, E.Weyukerl]

7 Some useful equivalences [Adapted from M.Davis, E.Weyukerl]

8 Normal forms - DNF

9 Normal forms - CNF

10 Logical consequence [Adapted from M.Davis, E.Weyukerl]

11 How it looks for CNFs/DNFs? [Adapted from M.Davis, E.Weyukerl]

12 Logical consequence Deciding (1) is much simpler for DNFs Deciding (2) is much simpler for CNFs Unfortunately: When applying case (1) it is easy to obtain CNF, not DNF... When applying case (2) it is easy to obtain DNF, not CNF... (This also means that CNF  DNF conversion in general requires an exponential time) Largely by following the tradition we will use case (2) [Adapted from M.Davis, E.Weyukerl]

13 Conversion of formula to CNF (III) Use distributive laws to obtain CNF [Adapted from M.Davis, E.Weyukerl]

14 CNF - some more simplifications [Adapted from M.Davis, E.Weyukerl]

15 Thus, we currently have: [Adapted from M.Davis, E.Weyukerl]

16 Some useful notation [Adapted from M.Davis, E.Weyukerl]

17 Empty clauses and empty formulas [Adapted from M.Davis, E.Weyukerl]

18 Yet more of notation [Adapted from M.Davis, E.Weyukerl]

19 Davis-Putnam rules I [Adapted from M.Davis, E.Weyukerl]

20 Davis-Putnam rules I [Adapted from M.Davis, E.Weyukerl]

21 Davis-Putnam rules I [Adapted from M.Davis, E.Weyukerl]

22 Davis-Putnam rules II and III [Adapted from M.Davis, E.Weyukerl]

23 Davis-Putnam procedure Use rules II, III and I (in this order of preference) [Adapted from M.Davis, E.Weyukerl]

24 Complexity of Davis-Putnam procedure Each step decreases the number of literals by 1 (thus for n literals there will be up to n steps) Rules II and III do not increase the number of formulas to be checked Unfortunately, when only rule I applies, the number of formulas doubles In worst case the complexity might be  (2 n )

25 Davis-Putnam procedure - some improvements

26 Resolvent [Adapted from M.Davis, E.Weyukerl]

27 Notation again... [Adapted from M.Davis, E.Weyukerl]

28 Resolution method [Adapted from M.Davis, E.Weyukerl]

29 Resolution method [Adapted from M.Davis, E.Weyukerl]

30 Ground Resolution Theorem [Adapted from M.Davis, E.Weyukerl]

31 Ground Resolution Theorem [Adapted from M.Davis, E.Weyukerl]

32 Finite satisfiability This will be useful when we move up to predicate logic... [Adapted from M.Davis, E.Weyukerl]

33 Enumeration principle [Adapted from M.Davis, E.Weyukerl]

34 Finite satisfiability - some lemmas [Adapted from M.Davis, E.Weyukerl]

35 Finite satisfiability - some lemmas [Adapted from M.Davis, E.Weyukerl]

36 Finite satisfiability - some lemmas

37 [Adapted from M.Davis, E.Weyukerl]

38 Compactness theorem [Adapted from M.Davis, E.Weyukerl]

39 Predicate logic Lets start with a formal definition: [Adapted from M.Davis, E.Weyukerl]

40 Predicate logic - an alphabet [Adapted from M.Davis, E.Weyukerl]

41 Predicate logic - terms [Adapted from M.Davis, E.Weyukerl]

42 Predicate logic - formulas [Adapted from M.Davis, E.Weyukerl]

43 Free and bound occurrences [Adapted from M.Davis, E.Weyukerl]

44 Predicate logic - interpretations [Adapted from M.Davis, E.Weyukerl]

45 Interpretations - some notation [Adapted from M.Davis, E.Weyukerl]

46 Interpretations [Adapted from M.Davis, E.Weyukerl]

47 Interpretations [Adapted from M.Davis, E.Weyukerl]

48 Interpretations [Adapted from M.Davis, E.Weyukerl]

49 Interpretations [Adapted from M.Davis, E.Weyukerl]

50 Interpretations [Adapted from M.Davis, E.Weyukerl]

51 Interpretations [Adapted from M.Davis, E.Weyukerl]

52 Models, valid and satisfiable formulas An interpretation I is called a model of a sentence , if  I =1 An interpretation I is a model for a set of sentences, if it is a model for each of the sentences from this set A predicate logic formula is satisfiable, if it has a model A predicate logic formula is valid, if every it's interpretation is it's model

53 Logical consequence [Adapted from M.Davis, E.Weyukerl]

54 Logical consequence Looks very similar to what we had for propositional logic A problem: What to use here instead of DNFs/CNFs? [Adapted from M.Davis, E.Weyukerl]

55 Simplification of formulas [Adapted from M.Davis, E.Weyukerl]

56 Simplification of formulas [Adapted from M.Davis, E.Weyukerl]

57 Skolemization [Adapted from M.Davis, E.Weyukerl]

58 Skolemization [Adapted from M.Davis, E.Weyukerl]

59 Skolemization [Adapted from M.Davis, E.Weyukerl]

60 Simplification of formulas [Adapted from M.Davis, E.Weyukerl]

61 Universal sentences [Adapted from M.Davis, E.Weyukerl]

62 Herbrand universe [Adapted from M.Davis, E.Weyukerl]

63 Checking for satisfiabilty Thus, we have reduced the problem of satisfiabilty of a predicate logic formula to a problem of satisfiability for a (maybe infinite) set of propositional logic formulas Recall that by compactness theorem if a set of propositional formulas is unsatisfiable, it is also finitely unsatisfiable [Adapted from M.Davis, E.Weyukerl]

64 Checking for satisfiabilty [Adapted from M.Davis, E.Weyukerl]

65 Again some lemmas [Adapted from M.Davis, E.Weyukerl]

66 Returning to proof [Adapted from M.Davis, E.Weyukerl]

67 Returning to proof [Adapted from M.Davis, E.Weyukerl]

68 Lemmas again [Adapted from M.Davis, E.Weyukerl]

69 Proof completed [Adapted from M.Davis, E.Weyukerl]

70 Herbrands theorem [Adapted from M.Davis, E.Weyukerl]

71 The procedure for checking satisfiability But - if the formula is unsatisfiable we eventually will be able to prove this )although we might not be able wait as long as will be necessary) If the formula is satisfiable the current procedure will terminate just if the Herbrand universe will be finite... [Adapted from M.Davis, E.Weyukerl]

72 Satisfiability? If the formula is unsatisfiable we eventually will be able to prove this )although we might not be able wait as long as will be necessary) If the formula is satisfiable the current procedure will terminate just if the Herbrand universe will be finite... It can be shown that in general the problem whether a given predicate logic formula is satisfiable is algorithmically unsolvable (the famous Gödel's Theorem) Still, we can do a little better than with a current procedure...

73 Unification [Adapted from M.Davis, E.Weyukerl]

74 Robinson's theorem This is the version of resolution method that is generally used You may be able to show that a formula is satsifiable also in the case when the unification procedure does not produce any new terms [Adapted from M.Davis, E.Weyukerl]


Download ppt "Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna."

Similar presentations


Ads by Google