Logic Part II: Intuitionistic Logic and Natural Deduction

Similar documents
Logic Part I: Classical Logic and Its Semantics

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

15414/614 Optional Lecture 1: Propositional Logic

CHAPTER 11. Introduction to Intuitionistic Logic

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

Natural Deduction for Propositional Logic

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

Introduction to Intuitionistic Logic

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

Propositional and Predicate Logic - V

Chapter 11: Automated Proof Systems

Deductive Systems. Lecture - 3

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

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

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

PREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

02 Propositional Logic

Completeness for FOL

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Chapter 11: Automated Proof Systems (1)

Learning Goals of CS245 Logic and Computation

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

On the Complexity of the Reflected Logic of Proofs

Logic. Part I: Propositional Logic. Max Schäfer. Formosan Summer School on Logic, Language, and Computation 2010

Propositional Logics and their Algebraic Equivalents

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Marie Duží

Logic for Computer Science - Week 4 Natural Deduction

First Order Logic (FOL) 1 znj/dm2017

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

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

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

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

Language of Propositional Logic

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

On some Metatheorems about FOL

Mat 243 Exam 1 Review

Informal Statement Calculus

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

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

Packet #1: Logic & Proofs. Applied Discrete Mathematics

MAI0203 Lecture 7: Inference and Predicate Calculus

Propositional Logic: Review

Advanced Topics in LP and FP

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

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

CHAPTER 2. FIRST ORDER LOGIC

Propositional and Predicate Logic - IV

Readings: Conjecture. Theorem. Rosen Section 1.5

Boolean Algebra and Propositional Logic

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

EXERCISE 10 SOLUTIONS

Boolean Algebra and Propositional Logic

Logic: Propositional Logic (Part I)

From Syllogism to Common Sense

It rains now. (true) The followings are not propositions.

Gödel s Completeness Theorem

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional Logic: Syntax

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

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

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

Chapter 4: Classical Propositional Semantics

Realizable Extensions of Intuitionistic Analysis: Brouwer, Kleene, Kripke and the End of Time

TR : Tableaux for the Logic of Proofs

Fundamentals of Logic

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Overview of Logic and Computation: Notes

Lecture Notes on Combinatory Modal Logic

Completeness in the Monadic Predicate Calculus. We have a system of eight rules of proof. Let's list them:

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

Propositional Logic Language

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

A note on fuzzy predicate logic. Petr H jek 1. Academy of Sciences of the Czech Republic

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

Finite information logic

Propositional logic. Programming and Modal Logic

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Introduction to Logic

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Topic 1: Propositional logic

Solutions to Homework I (1.1)

LING 501, Fall 2004: Laws of logic and the definitions of the connectives

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

Mathematics for linguists

First Order Logic: Syntax and Semantics

software design & management Gachon University Chulyun Kim

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

First Order Logic (1A) Young W. Lim 11/18/13

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

Propositions and Proofs

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

3 Propositional Logic

06 From Propositional to Predicate Logic

Lecture 11: Measuring the Complexity of Proofs

Propositional and Predicate Logic - XIII

Transcription:

Yesterday Remember yesterday? classical logic: reasoning about truth of formulas propositional logic: atomic sentences, composed by connectives validity and satisability can be decided by truth tables formulas can be normalized: NNF, DNF, canonical DNF number of connectives can be reduced: functionally complete set rst order logic: can reason about individuals validity and satisability are undecidable, but can be checked by semantic denitions formulas can be normalized: PNF (but also NNF, DNF) 1 / 40

Logic Part II: Intuitionistic Logic and Natural Deduction Max Schäfer Formosan Summer School on Logic, Language, and Computation 2007 July 2, 2007 2 / 40

Principles of Intuitionistic Logic Intuitionistic logic advocates a dierent understanding of what logic is about. mathematics is about solving concrete problems nd x, y, z N such that x 2 + y 2 = z 2 given one root of ax 2 + bx + c = 0, nd the other assuming that π is rational, prove that e is rational, too logic abstracts away from concrete problems investigates how complex problems are composed from simpler ones how complex problems can be solved given solutions of their constituent problems 3 / 40

Outline Intuitionistic Propositional Logic 4 / 40

Outline Intuitionistic Propositional Logic 5 / 40

Intuitionistic Propositional Logic: The Basics The language of intuitionistic propositional logic is the same as classical propositional logic, but the meaning of formulas is dierent propositional letters represent abstract problems more complex problems are formed by using the connectives solutions of abstract problems are called proofs it does not make sense to speak about a formula having a truth value we are only interested in how to prove formulas 6 / 40

The Brouwer-Heyting-Kolmogorov Interpretation Proofs of complex formulas are given in terms of the proofs of their constituents: a proof of ϕ ψ is a proof of ϕ together with a proof of ψ a proof of ϕ ψ is a proof of ϕ or a proof of ψ a proof of ϕ ψ is a procedure that can be seen to produce a proof of ψ from a proof of ϕ there is no proof of 7 / 40

Examples For three propositional letters a, b, c we can prove a a Given a proof u of a, we can produce a proof of a, namely u itself. (a b) a Assume we have a proof v of a b. Then we can extract from it a proof of a, since it must contain both a proof of a and a proof of b. a (a b) a (b a) (a (b c)) (a b) (a c) 8 / 40

Examples For three propositional letters a, b, c we can prove a a Given a proof u of a, we can produce a proof of a, namely u itself. (a b) a Assume we have a proof v of a b. Then we can extract from it a proof of a, since it must contain both a proof of a and a proof of b. a (a b) a (b a) (a (b c)) (a b) (a c) 8 / 40

Examples For three propositional letters a, b, c we can prove a a Given a proof u of a, we can produce a proof of a, namely u itself. (a b) a Assume we have a proof v of a b. Then we can extract from it a proof of a, since it must contain both a proof of a and a proof of b. a (a b) a (b a) (a (b c)) (a b) (a c) 8 / 40

Comparison with Classical Propositional Logic Comparison of a formula is true and a formula has a proof: in CL, to show that ϕ ψ is true, we can 1. assume that ϕ is false 2. then show that ψ is true in the second step, we can use the fact that ϕ is false in IL, to give a proof of ϕ ψ, we must 1. either give a proof of ϕ (no matter whether ψ has one) 2. or give a proof of ψ (no matter whether ϕ has one) For other connectives, the dierence is not so marked. 9 / 40

Comparison with Classical Propositional Logic Comparison of a formula is true and a formula has a proof: in CL, to show that ϕ ψ is true, we can 1. assume that ϕ is false 2. then show that ψ is true in the second step, we can use the fact that ϕ is false in IL, to give a proof of ϕ ψ, we must 1. either give a proof of ϕ (no matter whether ψ has one) 2. or give a proof of ψ (no matter whether ϕ has one) For other connectives, the dierence is not so marked. 9 / 40

Comparison with Classical Propositional Logic Comparison of a formula is true and a formula has a proof: in CL, to show that ϕ ψ is true, we can 1. assume that ϕ is false 2. then show that ψ is true in the second step, we can use the fact that ϕ is false in IL, to give a proof of ϕ ψ, we must 1. either give a proof of ϕ (no matter whether ψ has one) 2. or give a proof of ψ (no matter whether ϕ has one) For other connectives, the dierence is not so marked. 9 / 40

Comparison: Example in CL, a is true if a and vice versa in IL, if a has a proof then there can be no proof of a and vice versa: Assume we have a proof u of a. Because a a this means that u is a procedure that produces a proof of given a proof of a. But there is no proof of, hence there can be no proof of a. Assume that we have a proof v of a. Then there can be no proof of a. For assume that we had a proof w of a; then w could produce a proof of from v. But this is impossible. 10 / 40

Comparison: Example in CL, a is true if a and vice versa in IL, if a has a proof then there can be no proof of a and vice versa: Assume we have a proof u of a. Because a a this means that u is a procedure that produces a proof of given a proof of a. But there is no proof of, hence there can be no proof of a. Assume that we have a proof v of a. Then there can be no proof of a. For assume that we had a proof w of a; then w could produce a proof of from v. But this is impossible. 10 / 40

Comparison: Further Examples a a is true in CL; for assume a is false, then a is true a a does not seem provable in IL in CL, if a is true then so is a; hence a a is a classical tautology in IL, there does not seem to be a way to get a proof of a from a proof of a in CL, is never true; in IL, never has a proof in CL, ϕ is true for any ϕ in IL, ϕ is vacuosly provable for any ϕ (ex falso quodlibet, EFQ) 11 / 40

Comparison: Further Examples a a is true in CL; for assume a is false, then a is true a a does not seem provable in IL in CL, if a is true then so is a; hence a a is a classical tautology in IL, there does not seem to be a way to get a proof of a from a proof of a in CL, is never true; in IL, never has a proof in CL, ϕ is true for any ϕ in IL, ϕ is vacuosly provable for any ϕ (ex falso quodlibet, EFQ) 11 / 40

Comparison: Further Examples a a is true in CL; for assume a is false, then a is true a a does not seem provable in IL in CL, if a is true then so is a; hence a a is a classical tautology in IL, there does not seem to be a way to get a proof of a from a proof of a in CL, is never true; in IL, never has a proof in CL, ϕ is true for any ϕ in IL, ϕ is vacuosly provable for any ϕ (ex falso quodlibet, EFQ) 11 / 40

Comparison: Further Examples a a is true in CL; for assume a is false, then a is true a a does not seem provable in IL in CL, if a is true then so is a; hence a a is a classical tautology in IL, there does not seem to be a way to get a proof of a from a proof of a in CL, is never true; in IL, never has a proof in CL, ϕ is true for any ϕ in IL, ϕ is vacuosly provable for any ϕ (ex falso quodlibet, EFQ) 11 / 40

Excursus: Why EFQ? in many elds of mathematics, there are contradictory propositions from which anything is derivable for example, if 1 = 0 were true, then 2 = 1 + 1 = 0 + 0 = 0, 3 = 1 + 1 + 1 = 0,... hence: for all n N, n = 0 but also: for all r R, r = r 1 = r 0 = 0 Thus, any equality between numbers holds, all functions are equal! in intuitonistic logic, abstractly represents such a proposition 12 / 40

Formalization: First Step we want to formalize the process of forming a proof, in particular a good way to handle assumptions (e.g., naming them) a diagrammatic derivation set out in tree-shape shows how the proof of a complex formula depends on simpler proofs in the course of a derivation, assumptions can temporarily be made and later discharged (see examples involving implication) 13 / 40

Example Here is an informal proof of a b b a: 1. Assume we have a proof of a b. 2. This proof contains of a proof of a. 3. It also contains a proof of b. 4. So if we take the proof of b and put it together with the proof of a, we obtain a proof of b a. 5. We have shown how to construct a proof of a b from a proof of a b. This constitutes a proof of a b b a. 14 / 40

Example Here is an informal proof of a b b a: 1. Assume we have a proof of a b. 2. This proof contains of a proof of a. 3. It also contains a proof of b. 4. So if we take the proof of b and put it together with the proof of a, we obtain a proof of b a. 5. We have shown how to construct a proof of a b from a proof of a b. This constitutes a proof of a b b a. 14 / 40

Example Here is an informal proof of a b b a: 1. Assume we have a proof of a b. 2. This proof contains of a proof of a. 3. It also contains a proof of b. 4. So if we take the proof of b and put it together with the proof of a, we obtain a proof of b a. 5. We have shown how to construct a proof of a b from a proof of a b. This constitutes a proof of a b b a. 14 / 40

Example Here is an informal proof of a b b a: 1. Assume we have a proof of a b. 2. This proof contains of a proof of a. 3. It also contains a proof of b. 4. So if we take the proof of b and put it together with the proof of a, we obtain a proof of b a. 5. We have shown how to construct a proof of a b from a proof of a b. This constitutes a proof of a b b a. 14 / 40

Example Here is an informal proof of a b b a: 1. Assume we have a proof of a b. 2. This proof contains of a proof of a. 3. It also contains a proof of b. 4. So if we take the proof of b and put it together with the proof of a, we obtain a proof of b a. 5. We have shown how to construct a proof of a b from a proof of a b. This constitutes a proof of a b b a. 14 / 40

The Example in Natural Deduction u : a b the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Example in Natural Deduction u : a b a the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Example in Natural Deduction u : a b b u : a b a the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Example in Natural Deduction u : a b u : a b b a b a the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Example in Natural Deduction [u : a b] [u : a b] b a b a a b b a the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Example in Natural Deduction [u : a b] [u : a b] b a b a a b b a the derivation is a tree with assumptions at the leaves assumptions are labeled (here with u) the levels correspond to the steps of the informal proof derivation steps may discharge assumptions (as in the nal step) discharged assumptions are enclosed in brackets 15 / 40

The Calculus NJ of Natural Deduction (Propositional Part) the assumption rule: assumptions can be added to the current node at any time x : ϕ for the connectives, there are introduction and elimination rules the introduction rules specify how to construct proofs the elimination rules specify how to extract the information contained in a proof 16 / 40

The Rules for Conjunction Conjunction Introduction: ( I) ϕ ψ ϕ ψ Conjunction Elimination: ( E l ) ( E r ) ϕ ψ ϕ ϕ ψ ψ 17 / 40

Example ( E l ) u : a (b c) a ( I) ( I) ( E r ) a b u : a (b c) ( E l ) b c b (a b) c ( E r ) u : a (b c) ( E r ) b c c 18 / 40

The Rules for Disjunction Disjunction Introduction: ( I l ) ( I r ) ϕ ϕ ψ ψ ϕ ψ Disjunction Elimination: [v : ϕ] [w : ψ] ( E v,w ) ϕ ψ. ϑ ϑ All open assumptions from the left subderivation are also open in the two right subderivations.. ϑ 19 / 40

Example ( E v,w ) u : a b ( I r ) [v : a] b a b a ( I l ) [w : b] b a In the same manner, we can prove (a b) c from the assumption a (b c). 20 / 40

The Rules for Implication Implication Introduction: [x : ϕ] ( I x ). ψ ϕ ψ Implication Elimination (modus ponens, MP): ( E) ϕ ψ ψ ϕ 21 / 40

Examples ( I u ) [u : a] a a ( I w ) ( I v ) [w : b] [v : a] b a a b a 22 / 40

The Rules for Falsity Falsity Introduction: Falsity Elimination (EFQ): there is no introduction rule for falsity ( E) ϕ Example: ( E) ( I u ) [u : ] a a 23 / 40

Further Examples ( E) [u : p q] [v : p] q [w : q] ( E) ( I v ) p ( I w ) q p ( I u ) (p q) ( q p) 24 / 40

Further Examples ( E) [v : a] ( I l ) [u : (a b) c] a b [u : (a b) c] ( E) c c ( I v ) ( I w ) a c b c ( I) (a c) (b c) ( I u ) ((a b) c) (a c) (b c) ( Ir ) [w : b] a b 25 / 40

Derivability and Theorems a context Γ is a list of assumptions, i.e. Γ x 1 : ϕ 1,..., x n : ϕ n the range of Γ, written Γ, is the set of assumption formulas in Γ, i.e. the ϕ i we write Γ NJ ϕ to mean that ϕ can be derived from assumptions Γ using the rules of NJ for example, u : p q, v : q NJ p if Γ is a nite set of formulas, Γ NJ ϕ is taken to mean that there is some context with = Γ and ϕ for example, p q, q NJ p if NJ ϕ (i.e., ϕ is derivable without assumptions), then ϕ is a theorem of NJ 26 / 40

Some Theorems Theorems: (a (b c)) (b (a c)) (a (b c)) (a b c) (a a b) a b Non-Theorems: a a a a (a b) a b ( b a) (a b) Theorems: (a a) a a a b (a b) (a b) ( b a) 27 / 40

Properties of NJ(I) Theorem (Soundness Theorem) The system NJ is sound: If NJ ϕ then = ϕ, i.e. all theorems are propositional tautologies. 28 / 40

Consequences of the Soundness Theorem Corollary If Γ NJ ϕ then Γ = ϕ. Corollary The system NJ is consistent, i.e. there is a propositional formula ϕ such that we do not have NJ ϕ. Proof: Indeed, take. If we could derive NJ, then by the soundness lemma =. But that is not the case. 29 / 40

Consequences of the Soundness Theorem Corollary If Γ NJ ϕ then Γ = ϕ. Corollary The system NJ is consistent, i.e. there is a propositional formula ϕ such that we do not have NJ ϕ. Proof: Indeed, take. If we could derive NJ, then by the soundness lemma =. But that is not the case. 29 / 40

Properties of NJ(II) is natural deduction complete for classical logic, i.e. does = ϕ imply NJ ϕ? no: there are classical tautologies (e.g., a a) without a proof in natural deduction but we obtain a complete inference system for classical logic if we accept assumptions of the form as axioms ϕ ϕ 30 / 40

Outline Intuitionistic Propositional Logic 31 / 40

the language of intuitionistic rst order logic is the same as with classical logic the BHK interpretation can be extended to quantied formulas: a proof of x.ϕ is a procedure that can be seen to produce a proof of ϕ for every value of x a proof of x.ϕ is a value for x together with a proof of ϕ for this value NJ contains introduction and elimination rules for the quantiers 32 / 40

Comparison with Classical Propositional Logic Comparison of a formula is true and a formula has a proof (ctd.): in CL, to show that x.ϕ is true, we can 1. assume that ϕ is false for all x 2. then derive a contradiction from this assumption in IL, to give a proof of x.ϕ, we must present a concrete value for x (called a witness) and a proof that ϕ holds for this x The existential quantier of intuitionistic logic is constructive. 33 / 40

Rules for the Universal Quantier Universal Introduction: ( I) ϕ x.ϕ where x cannot occur free in any open assumption Universal Elimination: ( E) x.ϕ [x := t]ϕ for any term t 34 / 40

Example For any ϕ, we can build the following derivation: ( E) u : x. y.ϕ y.ϕ ϕ x.ϕ y. x.ϕ ( E) ( I) ( I) The following attempt to derive p(x) p(y) fails due to the variable condition: ( I) ( I) ( E) [u : p(x)] x.p(x) p(y) p(x) p(y) 35 / 40

Rules for the Existential Quantier Existential Introduction: for any term t ( I) [x := t]ϕ x.ϕ Existential Elimination: [u : ϕ] ( E u ) x.ϕ where x cannot occur free in any open assumptions on the right and in ψ All open assumptions from the left subderivation are also open in the right subderivation. ψ. ψ 36 / 40

Example For any ϕ, we can build the following derivation: ( E v ) u : x. y.ϕ [w : ϕ] ( I) x.ϕ ( I) [v : y.ϕ] y. x.ϕ ( E w ) y. x.ϕ y. x.ϕ The following attempt to derive ( x.ϕ) ( x.ϕ) fails due to the variable condition, if x FV(ϕ): ( E v ) u : x.ϕ [v : ϕ] ϕ ( I) x.ϕ 37 / 40

Example For any ϕ and ψ where x FV(ϕ), we have ϕ x.ψ NJ x.ϕ ψ : ( E u,v ) t : ϕ ( x.ψ) ( I l ) ( I) [u : ϕ] ϕ ψ x.ϕ ψ x.ϕ ψ ( E w ) [w : ψ] ( Ir ) ϕ ψ ( I) [v : x.ψ] x.ϕ ψ x.ϕ ψ 38 / 40

Example The following attempt to derive x. y.x < y NJ y. x.x < y fails: ( E) ( E v ) [v : x < y] ( I) u : x. y.x < y x.x < y ( I) y.x < y y. x.x < y y. x.x < y 39 / 40

Soundness and Completeness of NJ Theorem (Soundness Theorem) NJ is sound with respect to the classical semantics. Theorem (Completeness Theorem) When extended with axioms of the form ϕ ϕ, NJ is complete with respect to the classical semantics. 40 / 40