Logical Preliminaries

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

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

Natural Deduction for Propositional Logic

Type Systems. Lecture 9: Classical Logic. Neel Krishnaswami University of Cambridge

Propositional Logic Language

AN ALTERNATIVE NATURAL DEDUCTION FOR THE INTUITIONISTIC PROPOSITIONAL LOGIC

15414/614 Optional Lecture 1: Propositional Logic

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

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

Introduction to Intuitionistic Logic

Consequence Relations and Natural Deduction

Structuring Logic with Sequent Calculus

Propositional Logic Review

Teaching Natural Deduction as a Subversive Activity

Lecture Notes on The Curry-Howard Isomorphism

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

CSCI 490 problem set 6

Rules and derivations in an elementary logic course arxiv: v1 [cs.lo] 7 Jan 2016

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

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Propositional Logic: Deductive Proof & Natural Deduction Part 1

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg

A BRIEF INTRODUCTION TO TYPED PREDICATE LOGIC

Fundamentals of Logic

Categories, Proofs and Programs

Equivalents of Mingle and Positive Paradox

Hypersequent Calculi for some Intermediate Logics with Bounded Kripke Models

On the Complexity of the Reflected Logic of Proofs

Introduction to Metalogic

Proofs. Joe Patten August 10, 2018

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

Chapter 11: Automated Proof Systems

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

The Curry-Howard Isomorphism

Lecture Notes on Certifying Theorem Provers

Lecture Notes on Linear Logic

Proof Complexity of Intuitionistic Propositional Logic

Logic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky

22c:145 Artificial Intelligence

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

Analyzing Extraction. N.B.: Each type has its own set of variables (Church typing).

Consequence Relations and Natural Deduction

3 Propositional Logic

INF3170 Logikk Spring Homework #8 For Friday, March 18

Propositional and Predicate Logic. jean/gbooks/logic.html

Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic

Propositional and Predicate Logic - V

Mathematical Logic and Linguistics

Chapter 2. Assertions. An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011

Computation and Logic Definitions

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

Prefixed Tableaus and Nested Sequents

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

AN INTRODUCTION TO SEPARATION LOGIC. 2. Assertions

Lecture Notes on Classical Linear Logic

On sequent calculi vs natural deductions in logic and computer science

Arguments and Proofs. 1. A set of sentences (the premises) 2. A sentence (the conclusion)

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

Learning Goals of CS245 Logic and Computation

Two hours. Note that the last two pages contain inference rules for natural deduction UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

1 IPL and Heyting Prelattices

Manual of Logical Style

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Stratifications and complexity in linear logic. Daniel Murfet

Logic for Computer Science - Week 4 Natural Deduction

PL: Truth Trees. Handout Truth Trees: The Setup

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.

Introduction to Metalogic

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

Lecture Notes on Combinatory Modal Logic

Chapter 1 Elementary Logic

Propositional and Predicate Logic - II

Propositional Logic: Syntax

Overview of Logic and Computation: Notes

A Formulae-as-Types Interpretation of Subtractive Logic

Lecture 4: Proposition, Connectives and Truth Tables

Semantics of intuitionistic propositional logic

Mathematics for linguists

Lecture Notes on Focusing

Command = Value Context. Hans-Dieter Hiep. 15th of June, /17

Adjoint Logic and Its Concurrent Semantics

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

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

Bidirectional Decision Procedures for the Intuitionistic Propositional Modal Logic IS4

185.A09 Advanced Mathematical Logic

Formal (natural) deduction in propositional logic

Manual of Logical Style (fresh version 2018)

The semantics of propositional logic

Proving Completeness for Nested Sequent Calculi 1

A Tutorial on Computational Classical Logic and the Sequent Calculus

4 Derivations in the Propositional Calculus

02 Propositional Logic

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

1 Functions and Sets. 1.1 Sets and Subsets. Phil 450: The Limits of Logic Jeff Russell, Fall 2014

A Little Deductive Logic

Kleene realizability and negative translations

Logic. Def. A Proposition is a statement that is either true or false.

FOUNDATIONS OF MATHEMATICS CHAPTER 1: FOUNDATIONS OF GEOMETRY

Classical Propositional Logic

Transcription:

Logical Preliminaries Johannes C. Flieger Scheme UK March 2003 Abstract Survey of intuitionistic and classical propositional logic; introduction to the computational interpretation of intuitionistic logic in the form of the Curry-Howard Isomorphism. 1 Introduction These are the notes for the first of a series of brief, informal talks on resource logics, functional programming, and sundry related matters, held under the auspices of Scheme UK. The aim of these talks is to impart enough working knowledge of basic concepts, terminology, and notation to approach the literature with a modicum of confidence, and to impress relatives at family gatherings. This first session covers certain elementary logical notions, and is intended to be a guerilla introduction to logic for those relatively new to it, as well as a refresher for those who have blocked out the traumatic memory of their first encounter with the subject. For those familiar with the material, it will serve to fix terminology and notation for future sessions. 2 Propositional Logic Definition 1 (Deductive system) A deductive system S is a pair S = L, R such that 1

L is a formal language consisting of countably many formulae, and R is a set of rules of inference. 2.1 Language We shall base our language on a symbolic repertoire comprising three kinds of symbols: Propositional Parameters: p, q, r,..., p 1, q 1, r 1,... Propositional Constants: Propositional Connectives:,, We employ lowercase Greek letters α, β, γ,..., α 1, β 1, γ 1,... as metavariables over formulae, and Greek capitals Γ,, Σ,..., Γ 1, Γ 2, Σ 1,... to denote (finite) sequences of formulae. The notation Γ, α denotes the result of appending one more occurrence of α to the sequence Γ, and Γ, denotes the result of appending the sequence to the sequence Γ. We construct propositional formulae inductively as follows: Definition 2 (Formulae of Propositional Logic) 1. All propositional parameters and propositional constants are formulae. 2. If α is a formula and β is a formula, then (α β) is a formula, for {,, }. 3. Nothing else is a formula. Other connectives and the constant are defined as abbreviations: α def (α β) = (α ) def 2.2 Inference Rules = def = ((α β) (β α)) Definition 3 (Sequent) A sequent has the form Γ ϕ, and is read as The truth of ϕ follows from the truth of Γ, or From Γ we can conclude that ϕ, or simply Γ entails ϕ. 2

A derivation is a rooted tree whose nodes are labelled by judgements. A rule consists of zero or more judgements written above a line, and a single judgement below it; if all the judgements above the line are derivable, then the judgement below is also derivable. 2.2.1 Axioms Definition 4 (Id) α α Id 2.2.2 Rules for Logical Constants and Connectives Definition 5 ( I) β Γ, (α β) I Definition 6 () 1. 2. Definition 7 ( I) 1. 2. Definition 8 ( E) Γ (α β) Γ (α β) Γ β Γ (α β) Γ (β α) I I Γ (α β) (α θ) Σ (β θ) Γ,, Σ θ E Definition 9 ( I) Γ, α β β I 3

Definition 10 ( E) Γ (α β) α Γ, β E Definition 11 (EFSQ) Γ EF SQ 2.2.3 Structural Rules Definition 12 (Exchange) Definition 13 (Weakening) Definition 14 (Contraction) Γ, α β α, Γ β Exchange Γ β Γ, α β W eakening Γ, α, α β Γ, α β Contraction Exchange expresses that the order of the premises is irrelevant. Weakening expresses that any premise may be discarded. Contraction expresses that any premise can be duplicated. 2.2.4 Alternative Rules for Conjunction and Disjunction Elimination There are alternative formulations of several of the rules of inference given above. For example, an alternative rule of conjunction elimination can be derived from the version of given above, using the structural rules of Weakening and Exchange: Definition 15 () Γ (α β), α, β θ Γ, θ 4

An alternative rule of disjunction elimination can be derived from the version of E given above: Definition 16 ( E) Γ (α β), α θ Σ, β θ Γ,, Σ θ E 3 From Intuitionistic to Classical Logic The addition of any of the following (interderivable) rules to our intuitionistic system yields a system of classical propositional logic: Definition 17 (Law of Excluded Middle) α α EM Definition 18 (Dilemma) Γ, α θ, α θ Γ, θ D Definition 19 (Reductio ad Absurdum RAA) Γ, α RAA Definition 20 (Double Negation) Γ α DN 4 Proofs and Programs Intuitionistic logic may be viewed as that part of classical logic that admits of an effective interpretation, and which exhibits a correspondence between proofs and programs. We can obtain a more exact analysis of proofs by treating them as first-class entities. To that end, we introduce proof objects into our derivations. We denote proof objects by terms which encode the structure of the proof. In this system, a statement is a pair x : ϕ of a term x and a (propositional) formula ϕ, and is read as x is a proof of proposition ϕ. 5

4.1 The Language of Terms It turns out that a language based on the (simply-typed) λ-calculus is particularly well-suited to representing the structure of proof objects. We assume the availability of countably many variables x 1, x 2, x 3,... which may be used to refer to proofs of any proposition ϕ; the proposition ϕ can be thought of as the type of its proofs. In order to keep track of the type of the proof referred to by the variable, we will sometimes explicitly write the type as a superscript: x ϕ 1, xϕ 2, xϕ 3,... Let u,v,...,y,z range over variables and a,b,c,...,s,t, range over terms. Then the language of terms is defined by t ::= x λx.f (f g) (f, g) (inl f) (inr f) (cases f g h) (abort f) Premises are written as x 1 : ϕ 1,..., x n : ϕ n where x 1,..., x n are variables, ϕ 1,..., ϕ n are propositions, and n 0. We shall require that the variables x 1,..., x n in a sequence be distinct; note that this extends also to concatenations of premises, so that in a concatenation Γ,, we shall require that Γ and contain distinct variables. 4.2 Inference Rules Revisited 4.2.1 Axioms Definition 21 (Id) x : α x : α Id 4.2.2 Rules for Logical Constants and Connectives Definition 22 ( I) Γ s : α t : β Γ, (s, t) : (α β) I Definition 23 () 1. Γ t : (α β) Γ (fst t) : α 6

2. Definition 24 ( I) 1. 2. Definition 25 ( E) Γ t : (α β) Γ (snd t) : β Γ t : α Γ (inl t) : (α β) Γ t : α Γ (inr t) : (β α) Γ t : (α β) f : (α θ) Σ g : (β θ) Γ,, Σ (cases t f g) : θ E Definition 26 ( I) Definition 27 ( E) Definition 28 (EFSQ) 4.2.3 Structural Rules Definition 29 (Exchange) Definition 30 (Weakening) Γ, x : α f : β Γ λx α.f : (α β) I I I Γ f : (α β) g : α Γ, (f g) : β E Γ t : Γ (abort α t) : α Definition 31 (Contraction) EF SQ Γ, α t : β α, Γ t : β Exchange Γ t : β Γ, x : α t : β W eakening Γ, x : α, y : α t : β Γ, u : α t[x := u, y := u] : β Contraction 7

4.3 Reduction Rules Given a system of terms representing proof objects, we can provide a set of rules over terms which represent proof reduction: Definition 32 (Reduction Rules) projection operators cases operator (fst (x, y)) x (snd (x, y)) y (cases (inl x) f g) (f x) (cases (inr x) f g) (g x) β-reduction ((λx.y) z) y[x := z] 4.4 Curry-Howard Isomorphism There a correspondence between the typed λ-calculus and constructive logic ( Curry-Howard Isomorphism ), under which propositions correspond to types and proofs correspond to members of those types (pairs, functions, etc.). The rules of constructive logic can be reinterpreted as rules of program construction in a typed functional programming language: under this interpretation, the linguistic formation rules define what the types of the programming language are, the introduction and elimination rules define which expressions belong to which types, and the proof reduction rules define how expressions can be evaluated. The pair x : ϕ, which earlier we read as x is a proof of proposition ϕ, is read under this interpretation as x is (an expression) of type ϕ. 4.5 Expressiveness and Fixpoints The typed term calculus is strictly less expressive than the untyped λ- calculus (note that every typed term has a normal form). In order to recover the ability to express every computable function, we add, for every type ϕ, a general recursion operator fix ϕ of type ((ϕ ϕ) ϕ): fix ϕ : ((ϕ ϕ) ϕ) 8

together with the reduction rule (fix ϕ f) (f (fix ϕ f)) 1 so that (fix ϕ f) is a fixed point of the (functional) term f. Note that a term containing this operator may not have a normal form, even if it is well-typed. In particular, we can derive the judgement (fix ϕ λx.x) : ϕ for every type ϕ, but this expression has no normal form: (fix ϕ λx.x) (λx.x (fix ϕ λx.x)) 5 Conclusion (fix ϕ λx.x) (λx.x (fix ϕ λx.x)) (fix ϕ λx.x)... In the next session, we introduce the view of premises as resources, and discuss the central motivations of relevance logic and linear logic. 1 Note that this judgement is interpreted logically as an assertion that (fix ϕ λx.x) is a proof of ϕ, for any proposition ϕ. So, the absence of a normal form in this case should be viewed as a good thing. 9