Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Similar documents
Propositional Logic: Gentzen System, G

Deductive Systems. Lecture - 3

Predicate Logic - Deductive Systems

Propositional and Predicate Logic - V

Propositional and Predicate Logic - IV

Propositional Calculus - Soundness & Completeness of H

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

02 Propositional Logic

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

Propositional Logic Language

Propositional Calculus - Semantics (3/3) Moonzoo Kim CS Dept. KAIST

Propositional Calculus - Hilbert system H Moonzoo Kim CS Dept. KAIST

Discrete Mathematics

Classical Propositional Logic

Lecture 5 : Proofs DRAFT

The proposition p is called the hypothesis or antecedent. The proposition q is called the conclusion or consequence.

Propositional Calculus - Deductive Systems

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Chapter 11: Automated Proof Systems

Marie Duží

3 Propositional Logic

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Review

Logic: Propositional Logic Truth Tables

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Logic for Computer Science - Week 4 Natural Deduction

Language of Propositional Logic

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Propositional Logic: Models and Proofs

On some Metatheorems about FOL

Chapter 11: Automated Proof Systems (1)

Introduction to Metalogic

Artificial Intelligence Knowledge Representation I

Natural Deduction for Propositional Logic

a. (6.25 points) where we let b. (6.25 points) c. (6.25 points) d. (6.25 points) B 3 =(x)[ H(x) F (x)], and (11)

5-valued Non-deterministic Semantics for The Basic Paraconsistent Logic mci

Modal Logic XX. Yanjing Wang

Lecture 13: Soundness, Completeness and Compactness

Propositional Logic: Syntax

Madhavan Mukund Chennai Mathematical Institute

Inference in Propositional Logic

Learning Goals of CS245 Logic and Computation

CHAPTER 11. Introduction to Intuitionistic Logic

Advanced Topics in LP and FP

TR : Tableaux for the Logic of Proofs

1. Propositional Calculus

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

6c Lecture 14: May 14, 2014

Version January Please send comments and corrections to

Equivalents of Mingle and Positive Paradox

Propositional Resolution

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

An Introduction to Modal Logic III

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Mathematical Induction

Propositional and Predicate Logic - II

Section 1.2: Propositional Logic

The Language. Elementary Logic. Outline. Well-Formed Formulae (wff s)

On the Complexity of the Reflected Logic of Proofs

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

CITS2211 Discrete Structures Proofs

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

Proofs. Chapter 2 P P Q Q

Solutions to Sample Problems for Midterm

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

Informal Statement Calculus

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Logic via Algebra. Sam Chong Tay. A Senior Exercise in Mathematics Kenyon College November 29, 2012

Chapter 9. Proofs. In this chapter we will demonstrate how this system works. The precise definition of 9-1

Formal (natural) deduction in propositional logic

1. Propositional Calculus

Logic: Propositional Logic (Part I)

A Resolution Method for Modal Logic S5

Logic Part II: Intuitionistic Logic and Natural Deduction

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

Lecture 11: Measuring the Complexity of Proofs

Predicate Calculus - Semantic Tableau (2/2) Moonzoo Kim CS Division of EECS Dept. KAIST

Propositional logic (revision) & semantic entailment. p. 1/34

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Packet #1: Logic & Proofs. Applied Discrete Mathematics

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Gödel s Completeness Theorem

3 The Semantics of the Propositional Calculus

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

Knowledge based Agents

Propositional Dynamic Logic

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Proofs. Joe Patten August 10, 2018

Hilbert s problems, Gödel, and the limits of computation

CSE 1400 Applied Discrete Mathematics Proofs

Transcription:

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

3.1 Deductive (Proof) System Deductive system: 1 (finite) set of axioms 2 (finite) set of rules of inference Proof in a deductive system: a finite sequence of formulas such that each formula in the sequence is either: (a) an axiom; or (b) derived from previous formulas in the sequence using a rule of inference. The last formula A in the sequence is called a theorem A

In this course, we will study two proof systems for propositional logic: 1 Gentzen system G 2 Hilbert system H

3.2 Gentzen System G this proof system is based on the reversal of semantic tableaux. Main Idea: in order to prove that A is valid, we are trying to show that A is unsatisfiable, i.e. that its semantic tableau is closed. After that, we write the proof in G by traversing the tableau from the bottom to the top, changing every formula in every node to its negation.

Example Prove that (p q) (q p) (1) We first construct a tableau for [(p q) (q p)]: [(p q) (q p)] α p q, (q p) β β p q, q p q, p α p, q, q α p, q, p

The corresponding proof in G: 1. p, q, q Axiom 2. p, q, p Axiom 3. (p q), q α-rule applied to 1 4. (p q), p α-rule applied to 2 5. (p q), q p β-rule applied to 3,4 6. (p q) (q p) α-rule applied to 5

Gentzen Proof System G Axioms: all sets of formulas containing a pair of complementary literals Rules of Inference: 1 α-rules: U 1 {α 1, α 2 } U 1 {α} 2 β-rules: U 1 {β 1 }, U 2 {β 2 } U 1 U 2 {β}

α α 1 α 2 A A (A 1 A 2 ) A 1 A 2 A 1 A 2 A 1 A 2 A 1 A 2 A 1 A 2 (A 1 A 2 ) (A 1 A 2 ) (A 2 A 1 ) β β 1 β 2 B 1 B 2 B 1 B 2 (B 1 B 2 ) B 1 B 2 (B 1 B 2 ) B 1 B 2 B 1 B 2 B 1 B 2 B 2 B 1

Theorem Suppose U is a set of formulas and U is the set of complements of formulas from U. Then U in system G if and only if there is a closed semantic tableau for U. Corollary A in system G if and only if there is a closed semantic tableau for A. Theorem (Soundness and Completeness) = A if and only if G A

Example Prove G (A B) ( B A) A semantic tableau for [(A B) ( B A)]: [(A B) ( B A)] α A B, ( B A) α A B, B, A α A B, B, A β β A, B, A B, B, A

Proof in G: 1. A, B, A Axiom 2. B, B, A Axiom 3. (A B), B, A β-rule 1,2 4. (A B), B A α-rule 3 5. (A B) ( B A) α-rule 4

3.3 Hilbert System H Recall, first, that every propositional formula is equivalent to one using and as its only connectives. Axioms: 1 A (B A) 2 (A (B C)) ((A B) (A C)) 3 ( B A) (A B) Rule of Inference (Modus Ponens): MP: A, A B B

Theorem H A A Proof. 1. A ((A A) A) Axiom 1 2. [A ((A A) A)] Axiom 2 [((A (A A)) (A A))] 3. (A (A A)) (A A) MP 1,2 4. A (A A) Axiom 1 5. A A MP 3,4

We can simplify proofs in system H by using shortcuts ; namely, if we have proved a certain theorem or a rule, we can use it in later proofs. Definition U A will mean the following: A can be proved from axioms and additional assumptions U, using Modus Ponens.

Deduction Rule U {A} B U A B Proof. Proof is by induction on the length of the proof of U {A} B

Contrapositive Rule U B A U A B Proof. Suppose Then, 1. U B A 2. U ( B A) (A B) Ax.3 3. U A B MP 1,2

Theorem (A B) [(B C) (A C)] Proof. 1. {A B, B C, A} A Assumption 2. {A B, B C, A} A B Assumption 3. {A B, B C, A} B MP 1,2 4. {A B, B C, A} B C Assumption 5. {A B, B C, A} C MP 3,4 6. {A B, B C} A C Ded. Rule 5 7. {A B} (B C) (A C) Ded. Rule 6 8. (A B) [(B C) (A C)] Ded. Rule 7

We have just proved: Transitivity Rule U A B, U B C U A C

Theorem [A (B C)] [B (A C)] Proof. 1. {A (B C), B, A} A Assumption 2. {A (B C), B, A} A (B C) Assumption 3. {A (B C), B, A} B C MP 1,2 4. {A (B C), B, A} B Assumption 5. {A (B C), B, A} C MP 4,3 6. {A (B C), B} A C Ded. Rule 5 7. {A (B C)} B (A C) Ded. Rule 6 8. [A (B C)] [B (A C)] Ded. Rule 7

This proves Exchange of Antecedent Rule U A (B C) U B (A C)

Theorem A (A B) Proof. 1. { A} A ( B A) Axiom 1 2. { A} A Assumption 3. { A} B A MP 2,1 4. { A} ( B A) (A B) Axiom 3 5. { A} A B MP 3,4 6. A (A B) Ded. Rule 5

One consequence of the preceding theorem is the following: Corollary A ( A B) Proof. By the exchange of antecedent rule, applied to A (A B)

Double Negation Rule U A U A Proof. We need to show: A A 1. { A} A ( A A) Axiom 1 2. { A} A Assumption 3. { A} A A MP 2,1 4. { A} A A Contrap. Rule 3 5. { A} A A Contrap. Rule 4 6. { A} A MP 2,5 7. A A Ded. Rule 6

One can prove similarly: 1 (A B) ( B A) 2 A A Notation: false = any contradictory formula, e.g. (p p) true = any valid formula, e.g. p p

Reduction to Contradiction Rule U A false U A So, we need to prove in H: ( A false) A

Proof. 1. { A false} A false Assumption 2. { A false} false A Contrap. Rule 1 3. { A false} A A Double. Neg. Rule 4. { A false} false A Transitivity 2,3 5. { A false} p p Proved earlier 6. { A false} (p p) Double Neg. 5 7. { A false} A MP 6,4 8. ( A false) A Ded. Rule 7

We can now introduce the remaining logical connectives,, into our proof system H as abbreviations for certain equivalent formulas that use and only. A B means (A B) A B means A B A B means (A B) (B A) (or: ((A B) (B A)))

Example Prove A (B A B) Solution: 1. {A, B} (A B) (A B) Proved earlier 2. {A, B} A ((A B) B) Exch. Antec. 1 3. {A, B} A Assumption 4. {A, B} (A B) B MP 3,2 5. {A, B} B (A B) Contrap. Rule 4 6. {A, B} B B Double Neg. 7. {A, B} B (A B) Transitivity 6,5

8. {A, B} B Assumption 9. {A, B} (A B) MP 8,7 10. {A} B (A B) Ded. Rule 9 11. A (B (A B)) Ded. Rule 10

Example Prove A B B A Solution: It suffices to show A B B A, and B A A B 1. { A B, B} A B Assumption 2. { A B, B} B A Contrap. Rule 1 3. { A B, B} B Assumption 4. { A B, B} A MP 3,2 5. { A B, B} A A Double Neg. 6. { A B, B} A MP 4,5 7. { A B} B A Ded. Rule 6 8. ( A B) ( B A) Ded. Rule 7 The other implication has an analogous proof.

3.4 Soundness and Completeness; Consistency Theorem Hilbert system H is sound; i.e. if A then = A Proof. By induction on the length n of the proof A. If n = 1, A is an axiom, and every axiom is a valid formula

If n > 1, then A is derived from two previous lines of the proof using Modus Ponens:. i. B By inductive hypothesis:. n-1. B A n. A MP i, n 1 = B, = B A so A must be valid, too. Theorem Hilbert system H is complete; i.e. if = A then A

Definition A set of formulas is inconsistent if, for some formula A, U A and U A Theorem A set of formulas U is inconsistent if, and only if, for all formulas A, U A

Proof. (= ) Suppose U is an inconsistent set of formulas. Then, for some formula A, U A, U A We have proved earlier that, for any formula B (reduction to contradiction) U A (A B) 1. U A (A B) Contrad. Rule 2. U A given 3. U A B MP 1,2 4. U A given 5. U B MP 4,3 So, all formulas B are logical consequences of U.

( =) Suppose that every formula A is a consequence of U. Then, for any formula B, we have both U B and U B which shows that U is inconsistent. So, if there is a propositional formula in the proof system which is not valid, the proof system will be consistent. Theorem U A if and only if U { A} is inconsistent. Proof. (= ) Suppose U A. Since U { A} A U { A} A the set U { A} is inconsistent.

( =) Suppose U { A} is an inconsistent set of formulas. Then, since any formula can be derived from U { A}, 1. U { A} false given 2. U A false Ded. Rule 1 3. U false A Contrap. Rule 2 4. U false Proved earlier 5. U A MP 4,3 6. U A Double Neg. 5 All of these facts also apply to the case when U is an infinite set of formulas. Note the following: an infinite set of formulas is consistent if and only if every finite subset is consistent.

Compactness Theorem Theorem (Compactness Theorem) An infinite set of propositional formulas U is satisfiable if and only if every finite subset of U is satisfiable.

Example (Graph Colorability Problem) We say that a (possibly, infinite) graph G is n-colorable, if every vertex of G can be assigned one of the n different colors {c 1, c 2,..., c n } in such a way that no two vertices joined by an edge are assigned the same color. Given an infinite graph G and some positive integer n > 1, show that, if every finite induced subgraph of G is n-colorable, then so is G.

Solution: We will try to capture the n-colorability property using the language of propositional logic. Suppose G = (V, E), where V = {v 1, v 2,..., v m,...}. We need to express two properties: 1 Every vertex v i is assigned exactly one of the colors c j (j = 1,..., n). 2 If (v k, v l ) E is an edge of the graph G, then the colors assigned to v k and v l have to be different.

First, we introduce infinitely many propositional atoms p i,j, i = 1, 2,... j = 1, 2,..., n whose meaning will be the following: The variable p i,j is true if the vertex v i is assigned the color c j in a coloring of G. Then, our two requirements can be coded as follows: 1 For every i = 1, 2,..., we include the formula (p i,1 p i,2... p i,n )... ( p i,1 p i,2... p i,n 1 p i,n ) 2 For every edge (v k, v l ) E, we include the formula (p k,1 p l,1 ) (p k,2 p l,2 )... (p k,n p l,n ) Let U denote the infinite set of formulas obtained in this way. Clearly, G is n-colorable if and only if U is satisfiable.

To show that U is satisfiable, we will use the Compactness Theorem. So, it suffices to show that every finite subset of U is satisfiable. Let U 0 be a finite subset of U. Obviously, the formulas in U 0 can mention only finitely many vertices of G. Let G 0 be the induced subgraph of G whose vertices are those mentioned by U 0. Then, G 0 is a finite induced subgraph of G and is n-colorable, by the assumption made about G. So, the set of formulas U 0 is satisfiable, which is precisely what we were trying to show. Therefore, U is satisfiable as an infinite set, so G is an n-colorable graph..