3 Propositional Logic
|
|
- Crystal Bennett
- 6 years ago
- Views:
Transcription
1 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1
2 3.1 Syntax Definition 3.0 An alphabet Σ consists of a finite or countably infinite set. The elements of this set are calles symbols. Without loss of generality (Wlog) we assume that Λ Σ. The set of words (or strings) over Σ is denoted by Σ and is defined as follows: 1. Λ Σ. 2. If w Σ and a Σ, then aw Σ. 3. There are no other words in Σ. Λ is called empty word or empty string. Example Let Σ = {1, 2}. We can form the following words: Λ, 1Λ, 2Λ, 11Λ, 12Λ, 21Λ, 22Λ, 111Λ,.... Propositional Logic (25th October 2007) 2
3 3.1 Alphabet of Propositional Logic Definition 3.1 An alphabet of propositional logic consists of a (countably) infinite set R = {p 1, p 2,...} of propositional variables, the set { /1, /2, /2, /2, /2} of connectives, and the special characters ( and ). Indices are sometimes omitted. We will occasionally use other letters to denote variables. Propositional variables are also called nullary relation symbols. Different alphabets of propositional logic differ in R. Propositional Logic (25th October 2007) 3
4 Propositional Formulas Definition 3.2 A (propositional) atomic formula, briefly called atom, is a propositional variable. Definition 3.3 The set of propositional formulas is the smallest set L(R) with the following properties: 1. If F is an atomic formula, then F L(R). 2. If F L(R), then F L(R). 3. If /2 is a binary connective, F, G L(R), then (F G) L(R). Does such a smallest set exist? There are sets, which satisfy all properties. The intersection of such sets satisfies the properties too. The smallest set is the intersection of all sets satisfying the properties. Notation A (possibly indexed) denotes an atom, F, G, H (possibly indexed) denote propositional formulas. Propositional Logic (25th October 2007) 4
5 Structural Induction How can we prove properties of sets of formulas? Theorem 3.4 (Principle of structural induction) Every propositional formula has a property E, if the following conditions are met: 1. Induction Base: Every atom has property E. 2. Induction Steps: If F has property E, then F has property E as well. If /2 is a binary connective, and F and G have property E, then (F G) has property E as well. Proof Let E be the set of all formulas satisfying E. E L(R). E satisfies the three conditions of definition 3.3. Because L(R) is the smallest set satisfying these conditions, L(R) E must hold. qed Propositional Logic (25th October 2007) 5
6 Structural Recursion How can we define functions acting on formulas? Theorem 3.5 (Principle of structural recursion) Let M be an arbitrary set and let the following functions be given: foo R : R M, foo : M M, foo : M M M for {,,, }. Then there is exactly one function foo : L(R) M satisfying the following conditions: 1. Recursion base foo(a) = foo R (A) for all A R. 2. Recursion steps foo( G) = foo (foo(g)) for all G L(R). foo((g 1 G 2 )) = foo (foo(g 1 ), foo(g 2 )) for all G 1, G 2 L(R). Proof Exercise Propositional Logic (25th October 2007) 6
7 Structural Recursion Example M = N. foo 1R (A) = 0 for all A R. foo 1 (X) = X for all X M. foo 1 (X, Y ) = X + Y + 1 for all {,,, } and all X, Y M. We obtain: foo 1 (F ) = 8 < : 0 if F is an atom, foo 1 (G) if F is of the form G, foo 1 (G 1 ) + foo 1 (G 2 ) + 1 if F is of the form (G 1 G 2 ). Often foo 1R, foo 1 and foo 1 are not explicitely specified. foo is a function symbol af a meta language. Propositional Logic (25th October 2007) 7
8 Structural Recursion More Examples foo 2 (F ) = 8 < : 1 if F is an atom, foo 2 (G) if F is of the form G, foo 2 (G 1 ) + foo 2 (G 2 ) if F is of the form (G 1 G 2 ). counts the number of occurrences of atoms in F. foo 3 (F ) = 8 < : eliminates parentheses in F. foo 4 (F ) = {Λ} F if F is an atom, foo 3 (G) if F is of the form G, foo 3 (G 1 ) foo 3 (G 2 ) if F is of the form (G 1 G 2 ). 8 >< >: computes the set of positions in F. if F is an atom, {1π π foo 4 (G)} if F is of the form G, {1π 1 π 1 foo 4 (G 1 )} {2π 2 π 2 foo 4 (G 2 )} if F is of the form (G 1 G 2 ) Propositional Logic (25th October 2007) 8
9 Subformulas Definition 3.6 Let F be a propositional formula. The set of subformulas of F is the smallest set of formulas S(F ) satisfying the following conditions: 1. F S(F ). 2. If G S(F ), then G S(F ). 3. If (G 1 G 2 ) S(F ), then G 1, G 2 S(F ). Example S( ((p 1 p 2 ) p 1 )) = { ((p 1 p 2 ) p 1 ), ((p 1 p 2 ) p 1 ), (p 1 p 2 ), p 1, p 2 }. Propositional Logic (25th October 2007) 9
10 3.2 Semantics What is the meaning of ((p 1 p 2 ) p 1 )? Here: formulas may be true or false binary logic. Propositional Logic (25th October 2007) 10
11 3.2.1 The Structure of the Truth Values A structure consists of a set of individuals and a set of functions defined on it. The set of truth values W is the set {, }. Unary functions of type W W: Negation : ( ) = and ( ) =. Identity. Projections onto and. Binary functions of type W W W: Conjunction /2. Disjunction /2. Implication /2. NAND /2. NOR /2. Equivalence /2. Etc. Propositional Logic (25th October 2007) 11
12 The Functions over the Set of Truth Values Here negation, conjunction, disjunction, implication, equivalence. Propositional Logic (25th October 2007) 12
13 3.2.2 Interpretations and Models Definition 3.7 A (propositional) interpretation I = (W, I) consists of the set W and a mapping I : L(R) W with: [F ] I = 8 < : w W if F R, [G] I if F is of the form G, ([G 1 ] I [G 2 ] I ) if F is of the form (G 1 G 2 ). An interpretation I = (W, I) is uniquely defined by specifying how I acts on propositional variables. Recall that A denotes an atom. We will sometimes identify an interpretation I = (W, I) with {A [A] I = }. We often write F I instead of [F ] I. I (possibly indexed) denotes an interpretation. Propositional Logic (25th October 2007) 13
14 Satisfiability of Formulas Definition 3.10 Let F L(R). F is called satisfiable if there is an interpretation I = (W, I) with F I =. F is called valid (or F is a tautology) if for all interpretations I = (W, I) we have: F I =. F is called falsifiable if there is an interpretation I = (W, I) with F I =. F is called unsatisfiable if for all interpretations I = (W, I) we have: F I =. Propositional Logic (25th October 2007) 14
15 Models Definition 3.11 An interpretation I = (W, I) is called model for a propositional formula F, in symbols I = F, if F I =. Abbreviations If I is not a model for the formula F, i. e. if F I =, then we write I = F. If F is valid, then we write = F. Propositional Logic (25th October 2007) 15
16 Validity and Unsatisfiability Theorem 3.12 A propositional formula F is valid ( = F ), iff F is unsatisfiable. Proof = F iff all interpretations are models for F iff no interpretation is a model for F iff F is unsatisfiable. qed Propositional Logic (25th October 2007) 16
17 Satisfiability of a Set of Formulas Definition 3.13 Let G be a set of formulas. G is satisfiable, if there is an interpretation mapping each element F G to. An interpretation I is called model for G, in symbols I = G, if I is model for all F G. Propositional Logic (25th October 2007) 17
18 Logical Consequence Definition 3.14 A propositional formula F is a (propositional) consequence of a set of propositional formulas G, in symbols G = F, iff for every interpretation I we have: if I = G, then I = F as well. Exercises Does {p, (p q)} = q hold? Does {(p q)} = q hold? Does {(p p)} = q hold? Theorem 3.15 Let F, F 1,..., F n be propositional formulas. {F 1,..., F n } = F holds iff = ((... (F 1 F 2 )... F n ) F ) holds. Proof Exercise Propositional Logic (25th October 2007) 18
19 Truth Tabling How can we compute the value of a formula F under all possible interpretations? Computing a truth table: 1 Let m = S(F ) be the number of subformulas of F. 2 Let n = {p R p S(F )} be the number of propositional variables occurring in F. 3 Form a table with 2 n rows and m columns, where the first n columns are marked by the n propositional variables occurring in F, the last column is marked by F, and the remaining columns are marked by the other subformulas of F. 4 Fill in the first n columns with und as follows: In the first column fill in alternating downwards..., in the second column..., etc. 5 Calculate the values in the remaining columns using the known functions on the set of truth values. Propositional Logic (25th October 2007) 19
20 Working with Truth Tables Let F be a formula and T a corresponding truth table. Then: F is satisfiable iff T contains a row with in the last column. F is valid iff all rows in T have in the last column. F is falsifiable iff T contains a row with in the final column. F is unsatisfiable iff all rows T have in the final column. We can apply truth tabling to decide whether G = F holds for finite G Exercise. Exercise Write a (Prolog) program which generates a truth table for a given formula F. Propositional Logic (25th October 2007) 20
21 3.3 Equivalence and Normal Forms Semantic Equivalence Definition 3.16 Two propositional formulas F and G are semantically equivalent, in symbols F G, if for all interpretations I we have: I = F iff I = G. Observe is an equivalence relation: is reflexive: F F. is symmetric: If F G, then G F. is transitive: If F G and G H, then F H. This follows immediately from Definition 3.16 Exercise. Propositional Logic (25th October 2007) 21
22 Well-Known Semantic Equivalences Theorem 3.17 The following equivalences hold: (F F ) F (F F ) F idempotency (F G) (G F ) (F G) (G F ) commutativity ((F G) H) (F (G H)) ((F G) H) (F (G H)) associativity ((F G) F ) F ((F G) F ) F absorption (F (G H)) ((F G) (F H)) (F (G H)) ((F G) (F H)) distributivity Propositional Logic (25th October 2007) 22
23 Theorem 3.17 (continued) Theorem 3.17 (continued) The following equivalences hold: F F double negation (F G) ( F G) (F G) ( F G) de Morgan (F G) F, if F is valid (F G) G, if F is valid tautology (F G) G, if F is unsatisfiable (F G) F, if F is unsatisfiable unsatisfiability (F G) ((F G) ( G F )) equivalence (F G) ( F G) implication Proof Exercise Propositional Logic (25th October 2007) 23
24 Positions Recall foo 4 (F ) = {Λ} 8 >< >: if F is an atom, {1π π foo 4 (G)} if F is of form G, {1π 1 π 1 foo 4 (G 1 )} {2π 2 π 2 foo 4 (G 2 )} if F is of the form (G 1 G 2 ). foo 4 (F ) is the set of positions in a propositional logic formula F. Notation We denote this set also with P(F ). Positions are words over {1, 2}, where Λ denotes the empty word. Propositional Logic (25th October 2007) 24
25 Replacements The subformula of F at position π P(F ), in symbols F π, is defined by: 1. F Λ = F. 2. F 1π = G π, if F is of the form G. 3. F iπ = G i π, if F is of the form (G 1 G 2 ) and i {1, 2}. The replacement of the subformula of F at position π P(F ) by H, in symbols F π H, is defined by: 1. F Λ H = H, 2. F 1π H = (G π H ), if F is of the form G. 3. F 1π H = (G 1 π H G 2 ), if F is otf (G 1 G 2 ). 4. F 2π H = (G 1 G 2 π H ), if F is otf (G 1 G 2 ). Propositional Logic (25th October 2007) 25
26 The Replacement Theorem Theorem 3.18 (Replacement Theorem) Let F L(R), π P(F ), F π = G and G H. Then, F F π H. Proof Structural induction on π. Induction basis Let π = Λ. F = F Λ = G H = F Λ H. Induction hypothesis (IH) The theorem holds for π. Propositional Logic (25th October 2007) 26
27 Proof Replacement Theorem (Continuation) Induction step Let π = iπ. We distinguish two cases: i = 1 π = 1π P(F ), hence F must be otf F or (G 1 G 2 ). F F 1π H = ( F ) 1π H = (F π H ). From IH we conclude: F F π H Hence, for all interpretations I we find: [F ] I = [ F ] I Assumption = [F ] I Def I = [F π H ] I IH and Def = [ (F π H )] I Def I = [( F ) 1π H ] I Def replacement = [F 1π H ] I Assumption Hence, F F 1π H (G 1 G 2 ) analogously i = 2 analogously qed Propositional Logic (25th October 2007) 27
28 Agreement If π P(F ) then F π H := F. Let F π = G. If it is obvious from the context which subformula G is to be replaced, then we write F G H instead of F π H. Theorem 3.18 allows to replace all occurrences of the connectives and. Wlog we consider only formulas over R {,,, (, )}. Propositional Logic (25th October 2007) 28
29 3.3.2 Negation Normal Form Definition 3.19 A propositional formula F is in negation normal form if all negation signs occurring in F appear directly in front of propositional variables. Proposition 3.20 There is an algorithm which transforms any formula into a semantically equivalent formula in negation normal form. Algorithm Given F. While F is not in negation normal form do: Select a subformula of F having the form G with G R. If G = H, then replace H by H. If G = (G 1 G 2 ), then replace (G 1 G 2 ) by ( G 1 G 2 ). If G = (G 1 G 2 ), then replace (G 1 G 2 ) by ( G 1 G 2 ). Propositional Logic (25th October 2007) 29
30 The Rules of the Algorithm The rules will be abbreviated by: H H (G 1 G 2 ) ( G 1 G 2 ) (G 1 G 2 ) ( G 1 G 2 ) The algorithm is (don t care) non-deterministic! Example (r ( p q)) ( r ( p q)) de Morgan ( r ( p q)) double negation Propositional Logic (25th October 2007) 30
31 3.3.3 Clause Form Definition 3.21 A literal is a propositional variable, or a negated propositional variable. Notation L (possible indexed) denotes a literal. Generalized disjunction Generalized conjunction [F 1,..., F n ] = (... ((F 1 F 2 ) F 3 )... F n ) F 1,..., F n = (... ((F 1 F 2 ) F 3 )... F n ) Observe [F ] = F and F = F. Hence, [F ] F and F F. Empty generalized disjunction: [ ] with [ ] I = for all I. Empty generalized conjunction: with I = for all I. Observe (G [ ]) G and (G ) G. Propositional Logic (25th October 2007) 31
32 Clauses Definition 3.22 A clause is a generalized disjunction [L 1,..., L n ], n 0, where every L i, 1 i n, is a literal. A dual clause is a generalized conjunction L 1,..., L n, n 0, where every L i, 1 i n, is a literal. A formula is in conjunctive normal form, or clause form, iff it is of the form C 1,..., C m, m 0, and if every C j, 1 j m, is a clause. A formula is in disjunctive normal form, or dual clause form, iff it is of the form [C 1,..., C m ], m 0, and if every C j, 1 j m, is a dual clause. Notation C (possibly indexed) denotes a clause. Propositional Logic (25th October 2007) 32
33 An Observation Let F be a formula in clause form. The following holds: F is unsatisfiable if a clause occurring in F is unsatisfiable. A clause is unsatisfiable iff it is of the form [ ]. Propositional Logic (25th October 2007) 33
34 Transformation into Clause Form Theorem There is an algorithm which transforms any formula into a semantically equivalent formula in clause form. 2 There is an algorithm which transforms any formula into a semantically equivalent formula in dual clause form. Proof of 1 We have to specify the algorithm. We have to show that the algorithm is correct or sound, i.e., if it outputs G given F, then G must be in clause form and F G must hold. We have to show that the algorithm terminates, i.e., it stops in finite time given F. Propositional Logic (25th October 2007) 34
35 An Algorithm for the Transformation into Clause Form Input: A propositional formula F. Output: A formula, which is in conjunctive normal form and is equivalent to F. G := [F ]. (G is a conjunction of disjunctions.) While G is not in conjunctive normal form do: Select a non-clausal element H from G. Select a non-literal element K from H. Apply the rule among the following ones which is applicable. D D (D 1 D 2 ) (D 1 D 2 ) (D 1 D 2 ) (D 1 D 2 ) D 1 D 2 D 1, D 2 D 1, D 2 D 1 D 2 A rule D D is applicable to K if K is of the form D. If applied, then K is replaced by D. D A rule D 1 D is applicable to K if K is of the form D. 2 If applied, H is replaced by two disjunctions: The first one is obtained from H by replacing the occurrence of D by D 1. The second one is obtained from H by replacing the occurrence of D by D 2. Propositional Logic (25th October 2007) 35
36 An Example and a Lemma Example [ (p ( (p q) r))] [ p], [ ( (p q) r)] [ p], [ (p q), r] [ p], [(p q), r] [ p], [(p q), r] [ p], [p, r], [q, r] Lemma 3.24 If a propositional formula G is a conjunction of disjunctions and G is obtained from G by applying one of the rules of the algorithm, then G is a conjunction of disjunctions and G G. Proof Exercise. Propositional Logic (25th October 2007) 36
37 Induction Principle for While-Loops A loop invariant for a while-loop W is a statement E having the following property: If E holds, then E still holds after one execution of the body of W. Theorem 3.25 (Induction Principle for While-Loops) If a statement E holds before entering a loop W, and is a loop invariant for W, then E holds after termination of W as well (if W terminates). Proof Literature. Propositional Logic (25th October 2007) 37
38 Soundness of the Algorithm Let F be the given propositional formula and let E be the statement: G ist a conjunction of disjunctions and F G holds. Initially G is defined to be [F ]. Because F [F ] holds, E holds before entering the while-loop. From Lemma 3.24 we learn that E is a loop invariant for the while-loop. Hence, by Theorem 3.25 E holds when the loop has terminated. The loop terminates only when G is in conjunctive normal form. The algorithm is sound! Propositional Logic (25th October 2007) 38
39 Termination of the Algorithm When does a non-deterministic algorithm terminate? Weak Termination There is at least one way to execute the algorithm such that it terminates. Strong Termination The algorithm terminates independently of which choice we make in the non-deterministic situations. Definition 3.26 The function r, called rank of a propositional formula, is defined over L(R) as follows: r(h) = 8 >< >: 0 if H is a literal, r(f ) + 1 if H is of the form F, r(f ) + r(g) + 1 if H is of the form (F G) or (F G), r( F ) + r( G) + 1 if H is of the form (F G) or (F G). Propositional Logic (25th October 2007) 39
40 Multisets A multiset is comparable to a set, but the individual elements may occur multiple times in it. Here multisets of natural numbers. {1, 1, 2, 2, 2, 3 }. M 1 M 2 holds iff M 2 is obtained from M 1 by deleting a number n from M 1 and replacing it by finitely many numbers which are all less than n. {1, 1, 2, 2, 2, 3 } {1, 1, 1, 1, 2, 2, 2, 2 }. Observation there cannot be infinitely long sequences (M i i 0) of finite multisets of natural numbers such that M 0 M Proof see Dershowitz, Manna: Proving Termination with Multiset Orderings, CACM 22, (1979). Propositional Logic (25th October 2007) 40
41 Proof of Termination Let G = [H 11,..., H 1,n1 ],..., [H m1,..., H mn m]. We define: f(g) = { n 1 X j=1 r(h 1j ),..., nmx j=1 r(h mj ) } Observation With every execution of the while-loop, the associated multisets become smaller with respect to /2 (Proof Exercise) Termination. qed Example [ (p ( (p q) r))] {5 } [ p], [ ( (p q) r)] {0, 4 } [ p], [ (p q), r] {0, 3 } [ p], [(p q), r] {0, 2 } [ p], [(p q), r] {0, 1 } [ p], [p, r], [q, r] {0, 0, 0 } Observation If G is in clause form, then f(g) = {0,..., 0 } and the number of clauses occurring in G is equal to the number of occurrences of 0 in f(g). Propositional Logic (25th October 2007) 41
42 3.4 Proof Methods {F 1,..., F n } = F iff iff iff ( F 1,..., F n F ) is valid ( F 1,..., F n F ) is unsatisfiable F 1,..., F n, F is unsatisfiable. Truth tabling Resolution Semantic tableaus Calculus of natural deduction Sequent calculus Connection method Hilbert systems Propositional Logic (25th October 2007) 42
43 3.4.1 Resolution Resolution is a method to show unsatisfiability of formulas. Here: Wlog we assume that formulas are in clause form. A formula in clause form in unsatisfiable if it contains the empty clause, or it can be transformed into a semantically equivalent formula which contains the empty clause. Resolution is search for the empty clause using an appropriate inference rule. Propositional Logic (25th October 2007) 43
44 Example Some Facts K 1 If it is hot and humid, then it will rain. K 2 If it is humid, then it is hot. It is humid now. K 3 Question K 4 Will it rain? Introducing propositional variables p q r it is hot it is humid it will rain Formalization F 1 ((p q) r) F 2 (q p) F 3 q r F 4 Propositional Logic (25th October 2007) 44
45 Example (continued) {((p q) r), (q p), q} = r iff ( ((p q) r), (q p), q r) is valid iff ( ((p q) r), (q p), q r) is unsatisfiable iff ((p q) r), (q p), q, r is unsatisfiable iff [ p, q, r], [ q, p], [q], [ r] is unsatisfiable Propositional Logic (25th October 2007) 45
46 How to Show Unsatisfiability? Recall [ p, q, r], [ q, p], [q], [ r] Observation {[ p, q, r], [q]} = [ p, r] Hence [ p, q, r], [ q, p], [q], [ r] [ p, q, r], [ q, p], [q], [ r], [ p, r] Propositional Logic (25th October 2007) 46
47 Resolution Rule Definition 3.27 Let C 1 be a clause where the atom A occurs, and C 2 a clause where the negated atom A occurs. Let C be the result of performing the following steps: 1. Remove all occurrences of A from C Remove all occurrences of A from C Combine the clauses obtained in this way disjunctively. C was generated applying the (propositional) resolution rule to C 1 and C 2, where A is the literal that was resolved upon. We also call C the resolvent of C 1 and C 2 wrt A. C may be the resolvent of C 1 and C 1. Propositional Logic (25th October 2007) 47
48 Derivations and Refutations Definition 3.28 Let F = C 1,..., C n be a formula in clause form. 1. The sequence (C i 1 i n) is a resolution derivation for F. 2. If (C i 1 i m) is a resolution derivation for F, and C m+1 is obtained by applying the resolution rule to two elements from (C i 1 i m), then (C i 1 i m + 1) is a resolution derivation for F. 3. A resolution derivation for F which contains the empty clause [ ] is called resolution refutation for F. F may contain [ ]. It suffices to consider refutations in which [ ] occurs once. We may assume that [ ] is the last clause in a refutation. Propositional Logic (25th October 2007) 48
49 Example (continued) 1 [ p, q, r] 2 [ q, p] 3 [q] 4 [ r] 5 [ q, q, r] res(1, 2) 6 [r] res(3, 5) 7 [ ] res(4, 6) Propositional Logic (25th October 2007) 49
50 Resolution Proofs Definition 3.29 Let F be a propositional formula, and G a formula in clause form equivalent to F. A propositional resolution proof for F is a resolution refutation for G. F is called theorem of the resolution calculus, if there is a resolution proof for F. We denote by r F, that F has a resolution proof. Requirements Soundness If r F, then = F. Completeness If = F, then r F. Observation Let F be a formula with n propositional variables. (F (p p)) is unsatisfiable. The proof consists of a single resolution step! Propositional Logic (25th October 2007) 50
51 3.4.4 Further Proof Methods and Calculi Definition 3.35 A calculus consists of an alphabet, a language, a set of axioms, i. e., a set of formulas of the language, and a set of inference rules defining the provability relation. Definition 3.36 Let L be a logic and C a calculus, both defined over the same alphabet and the same language. Let = be the logical consequence relation of L and the provability relation of C. C is sound wrt L, if for every formula F of the language we find: if F holds then so does = F. C is complete wrt L, if for every formula F of the language we find: if = F holds then so does F. Propositional Logic (25th October 2007) 51
52 A Characterization of Calculi Definition 3.37 A calculus is positive, if its axioms are valid; negative, if its axioms are unsatisfiable; generating, if it operates by proving a formula starting out from the axioms; analyzing, if it operates by reducing the formula to be proved to the axioms. Propositional Logic (25th October 2007) 52
53 Additional Calculi and Methods Calculi Semantic Tableaus Hilbert Systems Calculus of Natural Deduction Sequent Calculus Davis-Putman-Logeman-Loveland (DPLL) Procedure Connection Method Model Generation Greedy Satisfiability Testing Binary Decision Diagrams Propositional Logic (25th October 2007) 53
54 Natural Deduction Gentzen 1935: How to represent logical reasoning in mathematics? Calculus of natural deduction. It s alphabet is the alphabet of propositional logic. Remember [ ] denotes some unsatisfiable formula. It s language is the language of propositional logic. Propositional Logic (25th October 2007) 54
55 An Introductory Example Suppose we want to show the validity of A proof could look like the following: ((p (q r)) ((p q) (p r))). Assume that (p (q r)) holds. We distinguish two cases: (i) Assume that p holds. Hence, (p q) must hold. (ii) Assume that (q r) holds. Hence, q and, consequently, (p q) must hold. Thus, (p q) must hold in any case. (1) Likewise, we conclude that (p r) must hold. (2) From (1) and (2) we conclude that ((p q) (p r)) holds. We can now cancel the assumption and, thus, obtain a proof of ((p (q r)) ((p q) (p r))). Propositional Logic (25th October 2007) 55
56 Inference Rules Example Elimination of the implication G (G F ) F ( E) Schema which needs to be instantiated, e.g., (p q) ((p q) (q p)) (q p) ( E) Propositional Logic (25th October 2007) 56
57 Derivations Some Notation Derivations have the form of trees, where the nodes are labeled by formulas. Derivations will be denoted by A derivation where the root is labeled by F is denoted by This will be called a derivation of F. A formula labeling a leaf node in a derivation is called hypothesis or assumption. If we want to single out a hypothesis G in a derivation of F, then we will write F G F This will be called a derivation of F from G. Propositional Logic (25th October 2007) 57
58 Derivations More Notation Some inference rule will cancel hypotheses. If a hypothesis has been cancelled, then this will be denoted by marking the hypothesis with. The hypotheses cancelled by the application a of a rule as well as a itself will be marked by a unique index. Propositional Logic (25th October 2007) 58
59 Natural Deduction - Inference Rules Negation [ ] G (f) F [ ] F (raa) F [ ] F ( I) F F [ ] ( E) Conjunction F G (F G) ( I) (F G) F ( E) (F G) G ( E) Disjunction F (F G) ( I) G (F G) ( I) (F G) F H H G H ( E) Propositional Logic (25th October 2007) 59
60 Natural Deduction Inference Rules (Continued) Implication G F (G F ) ( I) F G ( I) (G F ) G (G F ) F ( E) Equivalence G F (G F ) F G ( I) G (G F ) F ( E) F (G F ) G ( E) Propositional Logic (25th October 2007) 60
61 Derivations (1) The set of derivations in the calculus of natural deduction is the smallest set X with the following properties 1 L(R) X. 2 If is a derivation in X and H 1 H 1 H 2 is the instance of a rule r {(f), ( E), ( I)}, then H 1 r H 2 is a derivation in X. Propositional Logic (25th October 2007) 61
62 Derivations (2) 3 If H 1 H 2 is a derivation in X, j is a new index, and H 1 H 2 H 3 is an instance of a rule r {(raa), ( I), ( I)}, then H 1 j H 2 is a derivation in X. The hypothesis H 1 was cancelled by the application of the rule. H 3 r j Propositional Logic (25th October 2007) 62
63 Derivations (3) 4 If are derivations in X and if 1 2 H 1, H 2 1 H 1 2 H 2 H 3 is an instance of a rule r {( E), ( E), ( E)}, then 1 H 1 2 H 2 r H 3 is a derivation in X. Propositional Logic (25th October 2007) 63
64 Derivations (4) 5 If (F G), H, H are derivations in X and j is a new index, then F G 1 (F G) F j 2 H H G j 3 H ( E) j is a derivation in X. The hyotheses F and G are cancelled by the application of ( E). Propositional Logic (25th October 2007) 64
65 Derivations (5) 6 If 1 2 F, G are derivations in X and j is a new index, then G F G j 1 F (G F ) F j 2 G ( I) j is a derivation in X. The hypotheses G and F are cancelled by the application of ( I). Propositional Logic (25th October 2007) 65
66 Proofs An element of X is called derivation of F in the calculus of natural deduction if in its tree representation the root node is labeled by F. A proof of F in the calculus of natural deduction is a derivation of F in the calculus of natural deduction, where each hypothesis is cancelled. This will be denoted by n F. A Simple Example A proof of (p p) p 1 ( I) 1 (p p) Propositional Logic (25th October 2007) 66
67 The Introductory Example Revisited (p (q r)) 1 p 2 (q r) 2 ( E) q p 3 ( I) ( I) ( I) (p q) (p q) (p (q r)) 1 (p r) ( E) 2 (p q) (p r) ( I) ((p q) (p r)) ( I) 1 ((p (q r)) ((p q) (p r))) (q r) 3 ( E) r ( I) (p r) ( E) 3 Please compare this to the informal proof given at the beginning. Propositional Logic (25th October 2007) 67
68 Lemmas (1) Subderivations may occur over and over again, e.g., F F 1 ( E) [ ] F (raa) 1 Idea Generate such derivations once and for all, specify corresponding inference rules called lemmas, and apply the lemmas in addition to the usual inference rules. In the example we obtain F F (l1) Propositional Logic (25th October 2007) 68
69 Lemmas (2) The lemma (F G) G F (l2) and its derivation F G 1 ( I) (F G) [ ] G (F G) ( I) 1 ( E) Propositional Logic (25th October 2007) 69
70 Lemmas (3) The lemma (F G) F G (l3) and its derivation F 1 G ( I) (F G) (F G) ( E) [ ] ( I) 1 F Propositional Logic (25th October 2007) 70
71 Lemmas (4) The lemma (F G) ( F G) (l4) and its derivation (F G) [ ] F F 1 ( I) (F G) (F G) ( E) [ ] ( I) 1 G ( F G) G 2 (F G) ( I) 2 ( I) ( I) ( E) Propositional Logic (25th October 2007) 71
72 Another Example Demonstrating the Use of Lemmas A proof of (p p) (p p) 1 (l4) ( p p) ( E) p (l1) p [ ] (p p) (p p) 1 (l4) ( p p) ( E) p ( E) (raa) 1 Propositional Logic (25th October 2007) 72
73 Some Remarks on Natural Deduction Lemmas shorten proofs, but enlarge the search space. The calculus of natural deduction is sound and complete. Human readable proofs versus machine generated proofs. Sequent calculus. Proof theory. Propositional Logic (25th October 2007) 73
74 Sequent Calculus A sequent is an expression of the form F G, where F and G are multisets of formulas. Notation We use the following abbreviations: {F 1,..., F n } F1,..., F n. F {G } F, G. The inference rules are of the form S 1... S n r or S S r Propositional Logic (25th October 2007) 74
75 Sequent Calculus: Axiom, Cut and Structural Rules Axiom Cut H, F G, H ax F G, H F G H, F G cut Structural rules H, H, F G H, F G cl F G, H, H F G, H cr Propositional Logic (25th October 2007) 75
76 Sequent Calculus: Logical Rules Rules for the left hand side Rules for the right hand side F G, H 1 H 2, F G (H 1 H 2 ), F G l H 1, F G, H 2 F G, (H 1 H 2 ) r H 1, H 2, F G (H 1 H 2 ), F G l F G, H 1 F G, H 2 r F G, (H 1 H 2 ) H 1, F G H 2, F G (H 1 H 2 ), F G l F G, H 1, H 2 F G, (H 1 H 2 ) r F G, H H, F G l H, F G F G, H r Propositional Logic (25th October 2007) 76
77 Sequent Calculus: Soundness and Completeness A proof of the sequent S in the sequent calculus is defined as follows: An axiom of the form r is a proof of S. S If T 1,..., T n are proofs of S 1,..., S n respectively and the sequent calculus contains a rule of the form S 1... S n r, then T 1... T n r S S of S. is a proof The propositional sequent calculus is sound and complete. Subformula property: all formulas occurring in the condition of a rule occur as subformulas in the conclusion of the rule. Only the cut rule violates this property. Gentzen s Hauptsatz : Cuts can be removed in sequent calculus proofs. Propositional Logic (25th October 2007) 77
78 3.5 Properties Compactness Theorem Soundness and Completeness Theorems Propositional Logic (25th October 2007) 78
79 3.5.1 Compactness Theorem Introduction How can we decide whether a possibly infinite set of formulas is satisfiable? Idea We test all finite subsets. Remember is an equivalence relation on L(R). Let L(R, n) L(R) be the set of formulas in which only the variables p 1,..., p n occur. There are 2 n different interpretations for L(R, n). How many different equivalence classes are defined by on L(R, n)? 2 2n. Propositional Logic (25th October 2007) 79
80 Compactness Theorem Theorem 3.39 (Compactness Theorem) A set F of propositional formulas is satisfiable iff every finite subset G F is satisfiable. Proof Let F be a (possibly infinite) set of formulas. We have to show: (a) If F is satisfiable, so is each finite G F. (b) If each G F is satisfiable, so is F. (a) follows immediately from the definition of satisfiability for sets. To show (b) we have to prove the existence of a model for F starting from the models for each finite G F. Propositional Logic (25th October 2007) 80
81 Proof of Part (b) of the Compactness Theorem Suppose, each finite G F is satisfiable. Let G n = F L(R, n). There are at most k 2 2n different equivalence classes on G n defined by. Let G 1,..., G k be representatives of these equivalence classes. Hence, for each G G n there is an i, 1 i k, with G G i. Hence, each model for {G 1,..., G k } is also a model for G n. Because {G 1,..., G k } is a finite subset of F, it has a model. Let I n be this model. Because G 1 G 2... G n, I n is also a model for all G j, 1 j n. Propositional Logic (25th October 2007) 81
82 Proof of Part (b) of the Compactness Theorem (continued) We construct a model I for F as follows: Set I :=, K 0 := N and n = 1. Do the following: If there are infinitely many j K n 1 with [p n ] I j =, then set I := I {p n } and K n := K n 1 \ {j [p n ] I j = }, else set K n := K n 1 \ {j [p n ] I j = }. Set n := n + 1. Goto Do the following. ( ) ( ) I is an interpretation. By induction the following proposition E(n) can be proven: K n contains infinitely many elements and for all m K n with m > n we find: [p i ] Im = [p i ] I for all 1 i n. Proof Exercise. Propositional Logic (25th October 2007) 82
83 Proof of Part (b) of the Compactness Theorem (continued) To show: I is a model for F. Let F be an arbitrary but fixed element of F. There are at most finitely many propositional variables occurring in F. Let p n be the variable with the highest index. Then, F G n G n+1... and each interpretation I n, I n+1,... is a model for F. Because of E(n) we find: K n contains infinitely many elements. For all m K with m > n we find: [p i ] Im = [p i ] I for all 1 i n. Select m K n with m > n. Because I m is a model for F and F contains only the variables p 1,..., p n, I must be a model for F as well. Because F is an arbitrary element from F, I must also be a model for F. qed Propositional Logic (25th October 2007) 83
84 Implications of the Compactness Theorem The proof is not constructive. We may negate both sides of the compactness theorem. Corollary 3.40 A set of propositional formulas is unsatisfiable iff one of its finite subsets is unsatisfiable. Procedure to prove unsatisfiability of F: We generate all finite subsets of F in a systematic way and test them for unsatisfiability. Propositional Logic (25th October 2007) 84
85 3.5.2 Soundness and Completeness Theorems Lemma 3.41 (Propositional Resolution Lemma) Let F = C 1,..., C n be a propositional formula in clause form with the clauses C i, 1 i n, and let C be a resolvent of two clauses from F. Then F (F C) holds. Proof To show I = (F C) iff I = F. immediate. Suppose I = F. Let C be the resolvent of C 1 and C 2 wrt A. Let C 1 = C 1 without A and C 2 = C 2 without A. Then C = (C 1 C 2 ). Case 1 I = A. Then, I = A. Because I = C 2 we conclude I = C 2. Hence, I = C. Case 2 I = A. Because I = C 1 we find I = C 1. Hence I = C. qed Propositional Logic (25th October 2007) 85
86 An Implication of the Resolution Lemma Corollary 3.41(a) Let F = C 1,..., C n be a propositional logic formula in clause form with clauses C i, 1 i n, and let D 1,..., D m be the computed resolvents in a resolution derivation from F. Then, F F, D 1,..., D n. Proof Induction over n Exercise. Propositional Logic (25th October 2007) 86
87 Resolution Method Theorem 3.42 (Soundness and Completeness of the Prop. Resolution Method) Let F be a propositional formula. = F iff r F. Proof Soundness To show If r F, then = F. Suppose r F. By Definition 3.29 we find a resolution refutation for F, i.e. by Definition 3.28, a resolution derivation for F containing [ ]. By Theorem 3.23 we may assume wlog that F is in clause form. Let C 1,..., C n, [ ] be all resolvents computed in the refutation. By the Corollary 3.41(a) we find F F, C 1,..., C n, [ ]. Because [ ] is unsatisfiable we conlude by Theorem 3.17 that F [ ], i.e. F ist unsatisfiable. Applying Theorem 3.12 we find = F. Propositional Logic (25th October 2007) 87
88 Completeness of the Resolution Method Proof Completeness To show If = F, then r F. Suppose = F. By Theorem 3.23 we find a formula G in clause form with G F. By Theorem 3.12 we find that G is unsatisfiable. To show: there is a resolution refutation for G The proof is by induction on the number n of propositional variables occurring in G. n = 0 Then G = [ ],..., [ ] and we are done. n n + 1 Assume that the proposition holds for n, i.e. if G is unsatisfiable and in G occur only the variables p 1,..., p n, then there is a resolution refutation for G. Wlog we may assume that p 1,..., p n are the n variables occurring in G Exercise. Propositional Logic (25th October 2007) 88
89 Completeness of the Resolution Method (continued) Let G be a formula in clause form in which the variables p 1,..., p n+1 occur. Let G be the formula obtained from G by deleting each clause, in which p n+1 occurs, and deleting each occurrence of p n+1. Let G be the formula obtained from G by deleting each clause, in which p n+1 occurs, and deleting each occurrence of p n+1. We find: G and G are unsatisfiable if G is unsatisfiable Exercise. Propositional Logic (25th October 2007) 89
90 Completeness of the Resolution Method (continued) Applying the induction assumption we find refutations for G and G. resolvents G resolvents G. Case 1 resolution refutation for G. Case 2 resolution derivation with [ p n+1,... p n+1 ] as last entry. resolvents G resolvents G. Case 1 resolution refutation for G. Case 2 resolution derivation with [p n+1,..., p n+1 ] as last entry. If case 2 was selected twice, then compute the resolvent of [p n+1,..., p n+1 ] and [ p n+1,..., p n+1 ] resolution refutation for G. An application of the induction principle yields the desired result. qed Propositional Logic (25th October 2007) 90
91 Satisfiability Up to now Does = F hold? Now Is F satisfiable? Goal To find a model for F. Applications optimization problems, planning problems, etc. Method greedy satisfiability testing (gsat) Propositional Logic (25th October 2007) 91
92 Some Definitions Let F be a formula in clause form. C F iff clause C occurs in F. F u (I) = {C C F and I = C}. flip(i, p) denotes the interpretation obtained from I by reversing the truth value assigned to p. rank(i, F, p) = F u (I) F u (flip(i, p)) denotes the rank of F wrt I and p. Propositional Logic (25th October 2007) 92
93 Satisfiability Testing maxtries, maxloops N. initial selects an arbitrary interpretation I for F. pick selects an arbitrary element from a set of propositional variables. flip implements flip. rank impements rank. Propositional Logic (25th October 2007) 93
94 A Generic Algorithm Input: Output: A propositional formula F in clause form. A model for F, if one is found, or no model found. procedure gensat(f) for J := 1 to maxtries do I := initial(f); for K := 1 to maxloops do if I = F then return I; I := flip(i,pick(hillclimb(f,i))); end for; end for; return no model found ; end gensat; Propositional Logic (25th October 2007) 94
95 Hillclimbing Input: A propositional formula F in clause form and an interpretation I. Output: A set of variables occurring in F. procedure hillclimb(f,i); r := rnd(0,1); return {p select(f,i,p,r) = }; end hillclimb; gsat select(f, I, p, r) = j if rank(f, I, p) = max{rank(f, I, p ) p R}, otherwise. gwsat select(f, I, p, r) = 8 >< >: if r r and rank(f, I, p) = max{rank(f, I, p ) p R}, if r < r and p occurs in F u (I), otherwise. where r is some fixed value in [0, 1]. Propositional Logic (25th October 2007) 95
96 Some Results 3-CNF formulas (formulas in conjunctive normal form, each clause containing 3 literals). maxtries = 1, maxloops = N 100, where N is the number of variables occurring in F. maxtries = 15 : 26.3% 98.8%. N variant forced unforced 100 gsat 76.1% 23.5% gwsat 100% 82.2% 200 gsat 75.3% 8.4% gwsat 99% 48.7% 300 gsat 77.0% 2.7% gwsat 100% 26.3% 500 gsat 70.2% gwsat 100% Propositional Logic (25th October 2007) 96
Propositional Logic Language
Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite
More informationComputational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)
Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural
More informationPropositional and Predicate Logic - V
Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus
More informationPart 1: Propositional Logic
Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax
More informationPropositional Logic: Models and Proofs
Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505
More informationComputational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/26)
Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/26) Propositional Logic - algorithms Complete calculi for deciding logical
More informationAdvanced Topics in LP and FP
Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection
More informationPart 1: Propositional Logic
Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax
More informationCHAPTER 10. Gentzen Style Proof Systems for Classical Logic
CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning
More information7. Propositional Logic. Wolfram Burgard and Bernhard Nebel
Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics
More informationCOMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning
COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal
More informationComp487/587 - Boolean Formulas
Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016
More informationThe Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna
The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)
More informationLOGIC PROPOSITIONAL REASONING
LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1
More information02 Propositional Logic
SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or
More informationChapter 11: Automated Proof Systems
Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are
More informationDeductive Systems. Lecture - 3
Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth
More informationCS156: The Calculus of Computation
CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between
More informationPropositional and Predicate Logic. jean/gbooks/logic.html
CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/
More informationLanguage of Propositional Logic
Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called
More informationInformal Statement Calculus
FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example
More informationPropositional logic. First order logic. Alexander Clark. Autumn 2014
Propositional logic First order logic Alexander Clark Autumn 2014 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and
More informationNatural Deduction for Propositional Logic
Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic
More informationApplied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw
Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018
More informationKnowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.
Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes
More informationClassical Propositional Logic
Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a
More informationPropositional Calculus - Soundness & Completeness of H
Propositional Calculus - Soundness & Completeness of H Moonzoo Kim CS Dept. KAIST moonzoo@cs.kaist.ac.kr 1 Review Goal of logic To check whether given a formula Á is valid To prove a given formula Á `
More informationChapter 11: Automated Proof Systems (1)
Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems
More informationChapter 3: Propositional Calculus: Deductive Systems. September 19, 2008
Chapter 3: Propositional Calculus: Deductive Systems September 19, 2008 Outline 1 3.1 Deductive (Proof) System 2 3.2 Gentzen System G 3 3.3 Hilbert System H 4 3.4 Soundness and Completeness; Consistency
More informationComputation and Logic Definitions
Computation and Logic Definitions True and False Also called Boolean truth values, True and False represent the two values or states an atom can assume. We can use any two distinct objects to represent
More informationA Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming
A Little Logic International Center for Computational Logic Technische Universität Dresden Germany Propositional Logic Satisfiability Problems Solving Sudokus First Order Logic Logic Programming A Little
More informationResolution In Propositional Logic
Chapter 4 Resolution In Propositional Logic 4.1 Introduction In Chapter 3, a procedure for showing whether or not a given proposition is valid was given. This procedure, which uses a Gentzen system, yields
More information2.5.2 Basic CNF/DNF Transformation
2.5. NORMAL FORMS 39 On the other hand, checking the unsatisfiability of CNF formulas or the validity of DNF formulas is conp-complete. For any propositional formula φ there is an equivalent formula in
More informationTecniche di Verifica. Introduction to Propositional Logic
Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called
More informationVersion January Please send comments and corrections to
Mathematical Logic for Computer Science Second revised edition, Springer-Verlag London, 2001 Answers to Exercises Mordechai Ben-Ari Department of Science Teaching Weizmann Institute of Science Rehovot
More informationWarm-Up Problem. Is the following true or false? 1/35
Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,
More informationPropositional Logic: Evaluating the Formulas
Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere
More informationTitle: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)
B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876
More informationConjunctive Normal Form and SAT
Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute
More informationPrice: $25 (incl. T-Shirt, morning tea and lunch) Visit:
Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and
More informationCS156: The Calculus of Computation Zohar Manna Autumn 2008
Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)
More informationPropositional and Predicate Logic - IV
Propositional and Predicate Logic - IV Petr Gregor KTIML MFF UK ZS 2015/2016 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - IV ZS 2015/2016 1 / 19 Tableau method (from the previous lecture)
More informationTruth-Functional Logic
Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence
More informationPropositional Resolution
Artificial Intelligence Propositional Resolution Marco Piastra Propositional Resolution 1] Deductive systems and automation Is problem decidible? A deductive system a la Hilbert (i.e. derivation using
More informationCOMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning
COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms
More informationLogic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies
Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Stockholm University September 2016 Propositions Proposition:
More informationLogic: Propositional Logic (Part I)
Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.
More informationClassical Propositional Logic
The Language of A Henkin-style Proof for Natural Deduction January 16, 2013 The Language of A Henkin-style Proof for Natural Deduction Logic Logic is the science of inference. Given a body of information,
More informationNatural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson
Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of
More informationDescription Logics. Foundations of Propositional Logic. franconi. Enrico Franconi
(1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge
More informationIntroduction to Metalogic
Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)
More informationPropositional Logic: Part II - Syntax & Proofs 0-0
Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems
More informationLearning Goals of CS245 Logic and Computation
Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction
More informationIntroduction to Artificial Intelligence. Logical Agents
Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based
More informationIntelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK
Intelligent Systems Propositional Logic Dieter Fensel and Dumitru Roman www.sti-innsbruck.at Copyright 2008 STI INNSBRUCK www.sti-innsbruck.at Where are we? # Title 1 Introduction 2 Propositional Logic
More informationExercises 1 - Solutions
Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note
More informationThe Importance of Being Formal. Martin Henz. February 5, Propositional Logic
The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg
More informationA brief introduction to Logic. (slides from
A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity
More information6. Logical Inference
Artificial Intelligence 6. Logical Inference Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder University of Zagreb Faculty of Electrical Engineering and Computing Academic Year 2016/2017 Creative Commons
More informationOn the Complexity of the Reflected Logic of Proofs
On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,
More informationINF3170 Logikk Spring Homework #8 For Friday, March 18
INF3170 Logikk Spring 2011 Homework #8 For Friday, March 18 Problems 2 6 have to do with a more explicit proof of the restricted version of the completeness theorem: if = ϕ, then ϕ. Note that, other than
More informationSyntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.
First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable
More informationClasses of Boolean Functions
Classes of Boolean Functions Nader H. Bshouty Eyal Kushilevitz Abstract Here we give classes of Boolean functions that considered in COLT. Classes of Functions Here we introduce the basic classes of functions
More informationA Resolution Method for Modal Logic S5
EPiC Series in Computer Science Volume 36, 2015, Pages 252 262 GCAI 2015. Global Conference on Artificial Intelligence A Resolution Method for Modal Logic S5 Yakoub Salhi and Michael Sioutis Université
More informationMadhavan Mukund Chennai Mathematical Institute
AN INTRODUCTION TO LOGIC Madhavan Mukund Chennai Mathematical Institute E-mail: madhavan@cmiacin Abstract ese are lecture notes for an introductory course on logic aimed at graduate students in Computer
More informationPropositional Resolution Introduction
Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE
More informationProof Methods for Propositional Logic
Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1
More information185.A09 Advanced Mathematical Logic
185.A09 Advanced Mathematical Logic www.volny.cz/behounek/logic/teaching/mathlog13 Libor Běhounek, behounek@cs.cas.cz Lecture #1, October 15, 2013 Organizational matters Study materials will be posted
More informationPropositional Reasoning
Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS
More informationPropositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel
Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/
More informationPropositional Logic: Gentzen System, G
CS402, Spring 2017 Quiz on Thursday, 6th April: 15 minutes, two questions. Sequent Calculus in G In Natural Deduction, each line in the proof consists of exactly one proposition. That is, A 1, A 2,...,
More informationPropositional Dynamic Logic
Propositional Dynamic Logic Contents 1 Introduction 1 2 Syntax and Semantics 2 2.1 Syntax................................. 2 2.2 Semantics............................... 2 3 Hilbert-style axiom system
More informationSyntax of propositional logic. Syntax tree of a formula. Semantics of propositional logic (I) Subformulas
Syntax of propositional logic Syntax tree of a formula An atomic formula has the form A i where i =, 2, 3,.... Formulas are defined by the following inductive process: Every formula can be represented
More information1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology
More informationPřednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1
Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of
More informationOn Sequent Calculi for Intuitionistic Propositional Logic
On Sequent Calculi for Intuitionistic Propositional Logic Vítězslav Švejdar Jan 29, 2005 The original publication is available at CMUC. Abstract The well-known Dyckoff s 1992 calculus/procedure for intuitionistic
More information4 Predicate / First Order Logic
4 Predicate / First Order Logic 4.1 Syntax 4.2 Substitutions 4.3 Semantics 4.4 Equivalence and Normal Forms 4.5 Unification 4.6 Proof Procedures 4.7 Implementation of Proof Procedures 4.8 Properties First
More informationPropositional and Predicate Logic - II
Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic
More informationPropositional Calculus - Deductive Systems
Propositional Calculus - Deductive Systems Moonzoo Kim CS Division of EECS Dept. KAIST moonzoo@cs.kaist.ac.kr http://pswlab.kaist.ac.kr/courses/cs402-07 1 Deductive proofs (1/3) Suppose we want to know
More information1. Propositional Calculus
1. Propositional Calculus Some notes for Math 601, Fall 2010 based on Elliott Mendelson, Introduction to Mathematical Logic, Fifth edition, 2010, Chapman & Hall. 2. Syntax ( grammar ). 1.1, p. 1. Given:
More informationChapter 7 R&N ICS 271 Fall 2017 Kalev Kask
Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing
More informationAutomated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving
Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson SAT Solving 1 / 36 Review: Propositional
More informationFirst-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig
First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic
More informationMathematics 114L Spring 2018 D.A. Martin. Mathematical Logic
Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)
More informationPropositional logic. Programming and Modal Logic
Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness
More informationSolvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated
More informationIntroduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010
Introduction to Artificial Intelligence Propositional Logic & SAT Solving UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Today Representation in Propositional Logic Semantics & Deduction
More informationArtificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer
Artificial Intelligence Propositional Logic Copyright 2011 Dieter Fensel and Florian Fischer 1 Where are we? # Title 1 Introduction 2 Propositional Logic 3 Predicate Logic 4 Reasoning 5 Search Methods
More informationFirst-Order Logic. Chapter Overview Syntax
Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts
More informationPropositional Logic. Logic. Propositional Logic Syntax. Propositional Logic
Propositional Logic Reading: Chapter 7.1, 7.3 7.5 [ased on slides from Jerry Zhu, Louis Oliphant and ndrew Moore] Logic If the rules of the world are presented formally, then a decision maker can use logical
More informationLogic, Sets, and Proofs
Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.
More informationConjunctive Normal Form and SAT
Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute
More informationReview CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.
CHAPTER 2 Review 2.1 Definitions in Chapter 2 2.1 Set; Element; Member; Universal Set 2.2 Subset 2.3 Proper Subset 2.4 The Empty Set, 2.5 Set Equality 2.6 Cardinality; Infinite Set 2.7 Complement 2.8 Intersection
More informationEquational Logic. Chapter Syntax Terms and Term Algebras
Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from
More informationThe Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT
The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the
More informationFirst-order resolution for CTL
First-order resolution for Lan Zhang, Ullrich Hustadt and Clare Dixon Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK {Lan.Zhang, U.Hustadt, CLDixon}@liverpool.ac.uk Abstract
More informationTR : Binding Modalities
City University of New York (CUNY) CUNY Academic Works Computer Science Technical Reports Graduate Center 2012 TR-2012011: Binding Modalities Sergei N. Artemov Tatiana Yavorskaya (Sidon) Follow this and
More information