Propositional Logic: Syntax

Similar documents
Section 1.2: Propositional Logic

02 Propositional Logic

Logic for Computer Science - Week 4 Natural Deduction

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

Propositional Logic Review

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

Introduction to Metalogic

Manual of Logical Style

In this chapter, we specify a deductive apparatus for PL.

Module 5 K and Equivalent Systems

cis32-ai lecture # 18 mon-3-apr-2006

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

Marie Duží

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

Deductive Systems. Lecture - 3

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Propositional Logics and their Algebraic Equivalents

3 The Semantics of the Propositional Calculus

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

Manual of Logical Style (fresh version 2018)

Systems of modal logic

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

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

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

Lecture Notes on Combinatory Modal Logic

Propositional Logic: Models and Proofs

Formal (natural) deduction in propositional logic

Language of Propositional Logic

Propositional natural deduction

KRIPKE S THEORY OF TRUTH 1. INTRODUCTION

Axiom Systems For Classical Sentential Logic

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

15414/614 Optional Lecture 1: Propositional Logic

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

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

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Natural Deduction for Propositional Logic

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system:

PHIL012. SYMBOLIC LOGIC PROPOSITIONAL LOGIC DERIVATIONS

Philosophy 134 Module 2 Non-Modal Sentential Logic

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

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Class 29 - November 3 Semantics for Predicate Logic

PL: Truth Trees. Handout Truth Trees: The Setup

CHAPTER 11. Introduction to Intuitionistic Logic

Inference in Propositional Logic

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

Truth-Functional Logic

An Introduction to Modal Logic III

Artificial Intelligence. Propositional logic

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

4 Derivations in the Propositional Calculus

Gödel s Completeness Theorem

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

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

Modal Sentential Logic I

185.A09 Advanced Mathematical Logic

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

(ÀB Ä (A Â C)) (A Ä ÀC) Á B. This is our sample argument. Formal Proofs

CS 512, Spring 2016, Handout 02 Natural Deduction, and Examples of Natural Deduction, in Propositional Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

Deductive Characterization of Logic

Logic for Computer Science - Week 5 Natural Deduction

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Propositional Resolution

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Notes on Inference and Deduction

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

The Logic of Compound Statements cont.

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Formal Logic. Critical Thinking

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

Advanced Topics in LP and FP

Introduction: What Is Modal Logic?

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Informal Statement Calculus

Propositional Logic. Spring Propositional Logic Spring / 32

Proof strategies, or, a manual of logical style

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

Natural deduction for truth-functional logic

Chapter 1: The Logic of Compound Statements. January 7, 2008

a. ~p : if p is T, then ~p is F, and vice versa

Formal Logic 2. This lecture: Standard Procedure of Inferencing Normal forms Standard Deductive Proofs in Logic using Inference Rules

Gödel s Incompleteness Theorems

Logical Agents. September 14, 2004

Lecture 11: Measuring the Complexity of Proofs

Todays programme: Propositional Logic. Program Fac. Program Specification

Overview of Logic and Computation: Notes

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

Chapter 1 Elementary Logic

Intermediate Logic. Natural Deduction for TFL

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

Transcription:

4 Propositional Logic: Syntax Reading: Metalogic Part II, 22-26 Contents 4.1 The System PS: Syntax....................... 49 4.1.1 Axioms and Rules of Inference................ 49 4.1.2 Definitions................................. 50 4.1.3 Further results about...................... 51 4.1.4 Sample Derivations.......................... 52 4.2 The Deduction Theorem...................... 54 4.2.1 Theorems Into Prooofs....................... 54 4.2.2 The Deduction Theorem..................... 55 4.3 A System of Natural Deduction............... 57 4.3.1 Establishing the Rules....................... 57 4.3.2 Introduction and Elimination Rules........... 57 4.3.3 Establishing Our Axioms..................... 59 4.4 Homework Exercises.......................... 60 4.4.1 Questions.................................. 60 4.4.2 Answers................................... 61 4.1 The System PS: Syntax 4.1.1 Axioms and Rules of Inference The system PS is a Hilbert Style Axiom System for propositional logic. Hunter has three axioms: PS1 A (B A) PS2 (A (B C)) ((A B) (A C)) PS3 ( A B) (B A) In addition, Hunter has one Rule of Inference, Modus Ponens: 1 1 We might have expressed Modus Ponens as follows:

50 4 Propositional Logic: Syntax MP If A and B are any formulas of P, then B is an immediate consequence in PS of the pair of formulas A and (A B). Hunter presents his axioms as axiom schemata: A, B, C are not part of the language of P; they are part of the metalanguage. A and B can be any wffs of P, whether propositional symbols or complex wffs. Each of the following is an instance of the first axiom schema: (p (p p )) (p ((p p ) p )) ( p ((p (p p )) p )) If, instead of axiom schemata, Hunter had presented his axioms as wffs of P, then he would have had to introduce a second rule of inference that would allow us to substitute wffs for the propositional symbols in the axioms. 2 4.1.2 Definitions Definition 4.1.1 (Derivation) A sequence of wffs of P, < c 1,..., c n > constitutes a derivation in PS of a wff A from a set Γ of wffs of P if (i) c n = A (ii) for all i, 1 i n, either c i is an axiom of PS there exist j, k < i such that c i is an immediate consequence of c j and c k c i is one of the Γ When we are working out derivations, we will also allow a c i to be a previously proven theorem, or the result of operating on lines < i by a previously proven rule of inference. Strictly speaking, we do not need to include this in our formal definition because any such derivation could be inserted into the current derivation. When Γ = Φ, the derivation is said to be a proof. A, (A B) PS B 2 That is, Hunter s axioms would be PS1 p (p p) PS2 (p (p p )) ((p p ) (p p )) PS3 ( p p ) (p p) The rules are Modus Ponens: A, (A B) PS B and Substitution: Where C is a propositional symbol occurring in A and A 1 is any wff If PS A then PS A A 1 C Note that even with a substitution rule, we require metalinguistic variables to express rules of inference. (Why?)

4.1 The System PS: Syntax 51 Definition 4.1.2 (Syntactic Consequence) A wff A is a Syntactic Consequence in PS of a set of wffs Γ iff there is a derivation in PS of A from the set Γ. We use Γ PS A to express that A is a syntactic consequence of the set Γ in PS. Definition 4.1.3 (Theorem) A wff A is a Theorem of PS iff there is some proof in PS whose last wff is. Since a proof is a derivation in which Γ = Φ, we can express that A is a theorem of PS by saying that it is a syntactic consequence of the empty set, i.e., Φ PS A But it is more usual to write just PS A Definition 4.1.4 (Proof-Theoretically Consistent) A set Γ of wffs of P is a Proof-Theoretically Consistent Set of PS iff for no wff A of P is it the case that both Γ PS A and Γ PS A. Definition 4.1.5 (Proof-Theoretically Inconsistent) A set Γ of wffs of P is a Proof-Theoretically Inconsistent Set of PS iff for some wff A of P, both Γ PS A and Γ PS A. 4.1.3 Further results about Proposition 21 For every wff A, A PS A Every wff is a syntactic consequence of itself. One need only consider the derivation sequence consisting of the single wff A as first and last element. Proposition 22 For every wff A, if Γ PS A, then Γ PS A. That is, if A is a derivable from the set Γ, then we can add any additional assumptions to the set Γ, and A will still be derivable. The proof is straightforward. Since each c i in the derivation is either an axiom, the result of using MP on two previous lines, or one of the wffs in Γ, and since Γ Γ, each c i will be either an axiom, the result of using MP on two previous lines, or one of the wffs in Γ. As a corollary, we have Proposition 23 For every wff A, if PS A, then Γ PS A The transitivity of is given by: Proposition 24 If Γ PS A and A PS B, then Γ PS B. Then, as a result of Modus Ponens: Proposition 25 If Γ PS A and Γ PS A B, then Γ PS B

52 4 Propositional Logic: Syntax 4.1.4 Sample Derivations Here are some examples of derivations in the system PS. Exercise 4.1.1 Prove: PS (p p) 1. (p ((p p) p)) PS1 2. ((p ((p p) p)) ((p (p p)) (p p))) PS2 3. ((p (p p)) (p p)) MP,1, 2 4. (p (p p)) PS1 5. (p p) MP,3,4 Don t let the fact that a particular wff (p p) is proved hide the generality of the result. Of course, the proof just given is not a proof of (p p ), because this wff contains different symbols from the ones in the proof. On the other hand, it is easily seen how we could construct a proof for this wff modeled on the one we gave. Similarly, we could construct a proof for any wff having the form A A. 3 For example, we can easily construct a proof of the wff (( p p ) ( p p )) by substituting ( p p ) for p in Ex. 1.1. When we refer back to previous exercises to sanction a particular line in a derivation, we will indicate the substitution necessary for constructing a derivation of the wff needed to sanction this particular line. Exercise 4.1.2 Prove: PS ( p (p p)) 1. (p p) Ex. 1.1 2. ((p p) ( p (p p))) PS1 3. ( p (p p)) MP, 1,2 The reference to Ex. 1 in this proof can be removed, as we remarked earlier, by simply adding the proof of (p p) to the beginning of this one, to get 1. (p ((p p) p)) PS1 2. ((p ((p p) p)) ((p (p p)) (p p))) PS2 3. ((p (p p)) (p p)) MP,1, 2 4. (p (p p)) PS1 5. (p p) MP,3,4 6. ((p p) ( p (p p))) PS1 7. ( p (p p)) MP, 5,6 And this constitutes a proof in the strict definition we gave earlier. Exercise 4.1.3 Prove: (p p ), (p p ) PS (p p ) 3 In fact, Hunter sometimes states his derivations using metalinguistic letters. The metalinguistc way of stating them is, in fact, preferable for our purposes.

4.1 The System PS: Syntax 53 1. (p p ) Hyp. 2. (p p ) Hyp. 3. ((p p ) (p (p p ))) PS1 4. ((p (p p )) ((p p ) (p p ))) PS2 5. (p (p p )) MP, 3,4 6. ((p p ) (p p )) MP, 4,5 7. (p p ) MP, 1,6 Exercise 4.1.4 Prove: PS (( p (p p )) 1. (( p p) (p p )) PS3 2. ( p ( p p)) PS1 3. ( p (p p )) Ex 1.3 p,( p p),(p p ) p,p,p, 1,2 Here, again, we can remove the reference to Ex. 1.3, by adding the derivation of Ex. 1.3 to this derivation with the substitutions that are indicated. The two hypotheses in Ex. 1.3 will be replaced by the first two lines of this derivation, each of which is an instance of an axiom schema, so we end up with a proof, and not just a derivation. 1. (( p p) (p p )) PS3 2. ( p ( p p)) PS1 3. (((p p ) (p p )) ( p ((p p ) (p p )))) PS1 4. (( p ((p p ) (p p ))) (( p (p p )) ( p (p p )))) PS2 5. ( p ((p p ) (p p ))) MP, 3,4 6. (( p (p p )) ( p (p p ))) MP, 4,5 7. ( p (p p )) MP, 1,6 We have now a proof of ( p (p p )) that satisfies the strict definition given earlier. Exercise 4.1.5 Prove: (p (p p )) PS (p (p p )) 1. p (p p ) Hyp 2. (p (p p )) ((p p ) (p p )) PS2 3. (p p ) (p p ) MP,1,2 4. p (p p ) PS1 5. p (p p ) Ex. 1.3 p,(p p ),(p p ) p,p,p,3,4 Exercise 4.1.6 Prove: ( p p) PS p

54 4 Propositional Logic: Syntax 1. ( p p) Hyp 2. ( p ( ( p p) p)) PS1 3. (( ( p p) p) (p ( p p))) PS3 4. ( p (p ( p p))) Ex. 1.3, 2,3 5. (( p (p ( p p))) (( p p) ( p ( p p)))) PS2 6. (( p p) ( p ( p p))) MP, 4,5 7. (( p ( p p)) (( p p) p)) PS3 8. (( p p) (( p p) p)) Ex. 1.3, 6,7 9. (( p) p) p MP 1,8 10. p MP 1,9 The substitution in step 4 is as follows: Ex. 1.3 p,( ( p p) p),(p ( p p)) p,p,p The substitution in step 8 is as follows: Ex. 1.3 ( p p),( p ( p p)),(( p p) p) p,p,p Exercise 4.1.7 Prove: ( p p), ( p p) PS p 1. ( p p) Hyp 2. ( p p) Hyp 3. (( p p) (p p )) PS3 4. (p p ) MP 1,3 5. ( p p ) Ex. 1.3 p,p,p p,p,p, 2,4 6. p Ex. 1.6 p p 4.2 The Deduction Theorem 4.2.1 Theorems Into Prooofs Exercise 1.6 says that if we assume ( p p), we can derive p. This is very closely related to the conditional, If ( p p) then p. It would seem that we should be able to transform this derivation, which is based on an assumption, into a proof of a conditional, whose antecedent is the former assumption. As a matter of fact, we can! Exercise 4.2.1 Prove: PS ( p p) p

4.2 The Deduction Theorem 55 1. ( p ( ( p p) p)) PS1 2. (( ( p p) p) (p ( p p))) PS3 3. ( p (p ( p p))) Ex 1.3, 1,2 4. (( p (p ( p p))) (( p p) ( p ( p p)))) PS2 5. (( p p) ( p ( p p))) MP, 3,4 6. (( p ( p p)) (( p p) p)) PS3 7. (( p p) (( p p) p)) Ex 1.3, 5,6 8. ((( p p) (( p p) p)) ((( p p) ( p p)) (( p p) p))) PS2 9. ((( p p) ( p p)) (( p p) p)) MP 7,8 10. (( p p) ( p p)) Ex1.1 11. (( p p) p) MP 9,10 We can do the same for Exercise 1.3: Exercise 4.2.2 Prove: PS ((p p ) ((p p ) (p p ))) 1. ((p (p p )) ((p p ) (p p ))) PS2 2. (((p (p p )) ((p p ) (p p ))) ((p p ) ((p (p p )) ((p p ) (p p )))) PS1 3. ((p p ) ((p (p p )) ((p p ) (p p )))) MP, 1,2 4. (((p p ) ((p (p p )) ((p p ) (p p )))) (((p p ) (p (p p ))) ((p p ) ((p p ) (p p ))))) PS2 5. (((p p ) (p (p p ))) ((p p ) ((p p ) (p p )))) MP, 3,4 6. ((p p ) (p (p p ))) PS1 7. ((p p ) ((p p ) (p p ))) MP 5,6 8. (((p p ) ((p p ) (p p ))) ((p p ) (p p )) ((p p ) (p p )))) PS2 9. (((p p ) (p p )) ((p p ) (p p ))) MP 7,8 10. ((((p p ) (p p )) ((p p ) (p p ))) ((p p ) (((p p ) (p p )) ((p p ) (p p ))))) PS1 11. ((p p ) (((p p ) (p p )) ((p p ) (p p )))) MP 9.10 12. (((p p ) (((p p ) (p p )) ((p p ) (p p )))) (((p p ) ((p p ) (p p ))) ((p p ) ((p p ) (p p ))))) PS2 13. (((p p ) ((p p ) (p p ))) ((p p ) ((p p ) (p p ))))) MP 11,12 14. ((p p ) ((p p ) (p p ))) PS1 15. ((p p ) ((p p ) (p p ))) MP 13,14 We leave it as an exercise for the reader to establish the analogue to Exercise 1.5, Exercise 4.2.3 PS ((p (p p )) (p (p p ))) 4.2.2 The Deduction Theorem Can we transform all such derivations into proofs? The answer is that we can. At least that is the result of The Deduction Theorem. The Deduction

56 4 Propositional Logic: Syntax Theorem is one of those obvious results that make one s life easier. It is stated thus Claim. Suppose Γ is a set of wffs, and A and B are each wffs. If Γ, A PS B then Γ PS A B. The Deduction Theorem is the theoretical underpinning that allows us to use Conditional Proof. For, it tells us that if we can derive a formula B on the assumption A, then we can derive If A then B. So, we have the strategy that to prove a conditional, assume the antecedent and derive the consequent. The Deduction Theorem is, more generally, the basis for the formation of a natural deduction system. Our proof of the Deduction Theorem is by induction on the length of the proof of B. That is, we shall show how to turn a proof of B on the assumption A into a proof of A B. Proof Let B 1,..., B n be a derivation of B from Γ and A, where B = B n. We will prove by induction on the length of the derivation that Γ A B. Basis Step B = B 1. Then B must be either an axiom, or it must be A, or it must be one of the wffs in Γ. Case 1a B is an axiom. By axiom (PS1), B (A B). So, we have the following proof of A B: (i) B B is an axiom (ii) B (A B) Axiom (PS1) (iii) A B Modus Ponens, 1,2 Case 1b B is one of the Γ. The case is the same as the previous one. Case 1c B is A. Then A B is just A A, and we have already shown that A A. Induction Step Assume the theorem for all k < n; we show it holds for n. The only interesting case is where B n follows by Modus Ponens from two earlier lines. So, Suppose there are j, m < n such that B m = B j B n By the induction hypothesis, we can add on to the proof, the following two lines A B j A (B j B n ) To this we append (A (B j B n )) ((A B j ) (A B n )) as an instance of axiom (PS2). Then, two applications of Modus Ponens gives us the desired result A B n

4.3 A System of Natural Deduction 4.3.1 Establishing the Rules 4.3 A System of Natural Deduction 57 We will suppose that we have the full complement of truth functional connectives,,,,, and that they are defined in the usual way in terms of and. We will, in this section, establish only the rule of Indirect Proof; we will leave it as an exercise for the reader to establish the rest. Proposition 26 If Γ, A PS B B, then Γ PS A. For simplicity of argument, instead of B B, we will use (B B). By the Deduction Theorem, if then By PS3, So, by Modus Ponens, we get Γ, A PS (B B), Γ PS A (B B). PS ( A (B B)) ((B B) A). And since, as we have already proved Γ PS (B B) A PS B B Another application of Modus Ponens gets us Γ PS A 4.3.2 Introduction and Elimination Rules Once we have established the Deduction Theorem, we can introduce a set of Introduction and Elimination Rules, or Intelim Rules for propositional logic. The idea is to have a rule for introducing a connective into a line of a derivation (i.e., the introduction rule) and a rule for breaking into a complex wff and writing down one of the constituents (i.e., the elimination rule). There are two such rules for each connective:

58 4 Propositional Logic: Syntax NEGATION Double Negation Introduction A PS A Indirect Proof If Γ, A PS B B then Γ PS A CONJUNCTION Principle of Conjunction A, B PS A B Simplification A B PS A A B PS B DISJUNCTION Addition A PS A B B PS A B Disjunctive Syllogism A B, A PS B A B, B PS A CONDITIONAL Conditional Proof If Γ, A PS B, then Γ PS A B Modus Ponens A, A B PS B BICONDITIONAL Principle of the Biconditional A B, B A PS A B Modus Ponens of the Biconditional A, A B PS B We will record our derivations Fitch-style, numbering each step and recording the reason to the right. We will start every such derivation by drawing a vertical line down the left hand margin. We will introduce a new vertical lines to the right of the original one each time a hypothesis is introduced; and we will eliminate a vertical line each time a hypothesis is discharged by either CP or IP, as in the following examples. For CP: A Hyp......... B A B CP And for IP, similarly:

A Hyp......... B B A IP 4.3 A System of Natural Deduction 59 The left-most line of a derivation is called the main line of the argument. Any vertical line to the right of the main line is a subordinate line of the argument. Let us lay down, first, that two steps in a derivation belong to the same line of the argument if and only if exactly the same vertical lines pass by both of them, and second, that one step in a derivation S belongs to a line of argument subordinate to that of another step W if and only if (a) every vertical line which passes to the left of W also passes to the left of S and (b) at least one additional vertical line passes to the left of S and not W. Then we can add the Rule of Reiteration: Reiteration: Any step in a derivation can be reiterated on a step below it that belongs either to the same line of argument or to a line of argument subordinate to it. A derivation is complete when the last step is on the main line of the argument. 4.3.3 Establishing Our Axioms We just want to show that each of the axioms of Hunter s system PS is derivable using our Intelim Rules. So, we need to prove each of PS1-PS3. Proposition 27 PS A (B A) 1. A Hyp 2. B Hyp 3. A R, 1 4. B A CP, 2-3 5. A (B A) CP, 1-4 Proposition 28 PS (A (B C)) ((A B) (A C)) 1. A (B C) Hyp 2. A B Hyp 3. A Hyp 4. B C MP 1,3 5. B MP 2,3 6. C MP 4,5

60 4 Propositional Logic: Syntax 7. A C CP 3-6 8. (A B) (A C) CP 2-7 9. (A (B C)) (A B) (A C) CP 1-8 Proposition 29 PS ( B A) (A B) 1. B A Hyp 2. A Hyp 3. B Hyp 4. A MP 1,3 5. A R 2 6. B IP 3,4,5 7. A B CP 2-6 8. ( B A) (A B) CP 2-7 4.4 Homework Exercises 4.4.1 Questions 4.1. Use mathematical induction to show that the set {, } is inadequate to define all the truth functional connectives. (Hunter, 21.7) 4.2. Construct derivations in PS for the following: (i) (p p ), (p p ) PS (p p ) (ii) (p (p p )) PS (p (p p )) (iii) (( p p ) (( p p ) p ) 4.3. Do Exercise 2.3.