
Introduction Sequent calculus Benefits The benefits of sequent calculus Etienne´ Miquey Equipe´ Gallinee, INRIA LS2N, Universite´ de Nantes Logic Mentoring Workshop 22/06/2019 1/ 22 Introduction Sequent calculus Benefits Forewords This talk is about: sequent calculus / Curry-Howard / operational semantics But also : proofs, programs, type systems, safe computation/compilation, … A fairy tale Sequent calculus provides wonderful tools! Gives principled answers to problems such as: how to soundly compile ×××? how to prove normalization of ×××? how should control operators and ××× interact? deciding the equivalence of normal forms 2/ 22 Introduction Sequent calculus Benefits Forewords This talk is about: sequent calculus / Curry-Howard / operational semantics But also : proofs, programs, type systems, safe computation/compilation, … A fairy tale Sequent calculus provides wonderful tools! Gives principled answers to problems such as: how to soundly compile ×××? how to prove normalization of ×××? how should control operators and ××× interact? deciding the equivalence of normal forms 2/ 22 Introduction Sequent calculus Benefits Forewords This talk is about: sequent calculus / Curry-Howard / operational semantics But also : proofs, programs, type systems, safe computation/compilation, … A fairy tale Sequent calculus provides wonderful tools! Gives principled answers to problems such as: how to soundly compile ×××? how to prove normalization of ×××? how should control operators and ××× interact? deciding the equivalence of normal forms 2/ 22 Introduction Sequent calculus Benefits Proofs A bit of history, fast-tracked 3/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 Euclide Euclide’s Elements 4/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 2019 Euclide 4/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 1666 2019 Euclide Leibniz A crazy dream: “when there are disputes among persons, we can simply say: Let us calculate, without further ado, to see who is right.” Leibniz’s calculus ratiocinator 4/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 1666 1879 2019 Euclide Leibniz Frege Frege’s Begrisschri: a ! F C¹aº f formal notations F¹aº quantifications / b F¹bº 8 9 c d distinction: c = d x vs 0x 0 F¹dº signified signifier F¹cº A¹c; dº 4/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 1666 1879 1928 2019 a ! F C¹aº f F¹aº b F¹bº c d c = d F¹dº F¹cº Euclide Leibniz FregeA¹c; dº Hilbert Entscheidungsproblem (with Acker- mann): To decide if a formula of first-order logic is a tautology. # “to decide” is meant by means of a procedure Hilbert 4/ 22 Introduction Sequent calculus Benefits Once upon a time… -300 1666 1879 1928 1936 2019 a ! F C¹aº f F¹aº b F¹bº c d c = d F¹dº F¹cº Euclide Leibniz FregeA¹c; dº Hilbert Church λ-calculus - first (negative) answer to the Entscheidungsproblem ! Church 4/ 22 Introduction Sequent calculus Benefits A somewhat obvious observation Deduction rules Typing rules A 2 Γ ¹x : Aº 2 Γ ¹Axº ¹Axº Γ ` A Γ ` x : A Γ; A ` B Γ; x : A ` t : B ¹! º ¹! º Γ ` A ) B I Γ ` λx:t : A ! B I ` ) ` ` ! ` Γ A B Γ A ¹! º Γ t : A B Γ u : A ¹! º Γ ` B E Γ ` t u : B E 5/ 22 Introduction Sequent calculus Benefits Sequent, you said? Sequent: Hypotheses A1;:::; An ` B Conclusion Remark: »A¼ . Γ; A ` B . ¹)I º is almost . Γ ` A ) B B ¹) º A ) B I “a` la Gentzen”“a` la Prawitz” … a.k.a. natural deduction 6/ 22 Introduction Sequent calculus Benefits Sequent, you said? Sequent: Hypotheses A1;:::; An ` B Conclusion Remark: »A¼ . Γ; A ` B . ¹)I º is almost . Γ ` A ) B B ¹) º A ) B I “a` la Gentzen”“a` la Prawitz” … a.k.a. natural deduction 6/ 22 Introduction Sequent calculus Benefits Gentzen’s sequent calculus (1934) Sequent: Hypotheses A1;:::; An ` B1;:::; Bp Conclusions Identity rules connect hypotheses/conclusions Γ ` A; ∆ Γ; A ` ∆ ¹Cutº ¹Axº Γ ` ∆ A ` A Structural rules weaken, contract, permute Γ ` ∆ Γ ` A; A; ∆ Γ ` σ¹∆º ¹w º ¹c º ¹σ º … Γ ` A; ∆ r Γ ` A; ∆ r Γ ` ∆ r Logical rules le/right introduction of connectives Γ; A ` B; ∆ Γ ` A; ∆ Γ; B ` ∆ Γ ` A; ∆ Γ ` B; ∆ ¹) º ¹) º ¹^ º Γ ` A ) B; ∆ r Γ; A ) B ` ∆ l Γ ` A ^ B; ∆ r 7/ 22 Introduction Sequent calculus Benefits Gentzen’s sequent calculus (1934) Sequent: Hypotheses A1;:::; An ` B1;:::; Bp Conclusions Identity rules connect hypotheses/conclusions Γ ` A; ∆ Γ; A ` ∆ ¹Cutº ¹Axº Γ ` ∆ A ` A Structural rules weaken, contract, permute Γ ` ∆ Γ ` A; A; ∆ Γ ` σ¹∆º ¹w º ¹c º ¹σ º … Γ ` A; ∆ r Γ ` A; ∆ r Γ ` ∆ r Logical rules le/right introduction of connectives Γ; A ` B; ∆ Γ ` A; ∆ Γ; B ` ∆ Γ ` A; ∆ Γ ` B; ∆ ¹) º ¹) º ¹^ º Γ ` A ) B; ∆ r Γ; A ) B ` ∆ l Γ ` A ^ B; ∆ r 7/ 22 Introduction Sequent calculus Benefits Gentzen’s sequent calculus (1934) Sequent: Hypotheses A1;:::; An ` B1;:::; Bp Conclusions Proof-theoretic properties: cut elimination last rule subformula classical logic built-in … 7/ 22 Introduction Sequent calculus Benefits Gentzen’s sequent calculus (1934) Sequent: Hypotheses A1;:::; An ` B1;:::; Bp Conclusions Identity rules connect hypotheses/conclusions Γ ` A; ∆ Γ; A ` ∆ ¹Cutº ¹Axº Γ ` ∆ A ` A Structural rules Symmetry weaken, contract, permute Γ ` ∆ Γ ` A; A; ∆ Γ ` σ¹∆º ¹w º ¹c º ¹σ º … Γ ` A; ∆ r Γ ` A; ∆ r Γ ` ∆ r Logical rules le/right introduction of connectives Γ; A ` B; ∆ Γ ` A; ∆ Γ; B ` ∆ Γ ` A; ∆ Γ ` B; ∆ ¹) º ¹) º ¹^ º Γ ` A ) B; ∆ r Γ; A ) B ` ∆ l Γ ` A ^ B; ∆ r 7/ 22 Introduction Sequent calculus Benefits What about the computational content? 8/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s duality of computation Griin (1990): classical logic control operator Starting observation: Computational duality: ·? Terms Contexts ·? Sequent calculus abstract machine-like calculus 9/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s duality of computation Griin (1990): classical logic control operator Starting observation: Computational duality: ·? Terms Contexts ·? Sequent calculus abstract machine-like calculus 9/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s duality of computation Griin (1990): classical logic control operator Starting observation: Computational duality: ·? Terms Contexts ·? Sequent calculus abstract machine-like calculus 9/ 22 Introduction Sequent calculus Benefits Abstract machine Reduction h jj i h jj · i t u e Babs t u e h jj · i h » / ¼ jj i λx: t u e Babs t u x e Syntax c ::= ht jj ei commands terms t;u ::= e; f ::= contexts variable j x;y; z j ? empty application j t u j t · e application stack λ-abstraction j λx: t 10/ 22 Introduction Sequent calculus Benefits Introducing µ h jj i h jj · i t u e Babs t u e This reduction defines ¹t uº: It is the term that, when put against j ei, reduces to ht jju · ei. Idea: introduce a more primitive syntax hµα: c jj ei Bµ c »e/α¼ t u , µα: ht jj u · αi (actually the intuitionistic version µ?:c is enough) 11/ 22 Introduction Sequent calculus Benefits Introducing µ h jj i h jj · i t u e Babs t u e This reduction defines ¹t uº: It is the term that, when put against j ei, reduces to ht jju · ei. Idea: introduce a more primitive syntax hµα: c jj ei Bµ c »e/α¼ t u , µα: ht jj u · αi (actually the intuitionistic version µ?:c is enough) 11/ 22 Introduction Sequent calculus Benefits Introducing µ˜ A regular syntax? c ::= ht jj ei t;u ::= e; f ::= j x;y j α; β j λx:t j t · e j µα: c j ? h¹ Reminder:º jj i λx:t u e Babs Same idea, in the dual situation: 12/ 22 h jj i h jj i00 let x = t in u e Babs t “let x = in u e / ht jj µ˜x:ci Bµ˜ c »t x¼ Introduction Sequent calculus Benefits Introducing µ˜ A regular syntax? c ::= ht jj ei t;u ::= e; f ::= j x;y j α; β j λx:t j t · e j µα: c j ? Same idea, in the dual situation: h¹ º jj i h jj i h jj i00 λx:t u e Babs let x = t in u e Babs t “let x = in u e / ht jj µ˜x:ci Bµ˜ c »t x¼ 12/ 22 Introduction Sequent calculus Benefits Introducing µ˜ A regular syntax c ::= ht jj ei t;u ::= e; f ::= j x;y j α; β j λx:t j t · e j µα: c j µ˜x: c Same idea, in the dual situation: h¹ º jj i h jj i h jj i00 λx:t u e Babslet x = t in u e Babs t “let x = in u e | {z } µ˜x:hu jj ei / ht jj µ˜x:ci Bµ˜ c »t x¼ 12/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s λµµ˜-calculus Syntax: t;u ::= c ::= ht jj ei e; f ::= j x;y j α; β j λx:t j t · e j µα: c j µ˜x: c Reduction: hλx:t jj u · ei ! u µ˜x:ht jj ei ht jj µ˜x:ci ! c»t/x¼ hµα:c jj ei ! c»e/α¼ 13/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s λµµ˜-calculus Syntax: t;u ::= c ::= ht jj ei e; f ::= j x;y j α; β j λx:t j t · e j µα: c j µ˜x: c Reduction: hλx:t jj u · ei ! u µ˜x:ht jj ei ht jj µ˜x:ci ! c»t/x¼ hµα:c jj ei ! c»e/α¼ Critical pair: hµα:c jj µ˜x:c 0i .& c»µ˜x:c 0/α¼ c 0»µα:c/x¼ 13/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s λµµ˜-calculus Syntax: t;u ::= c ::= ht jj ei e; f ::= n j x;y j α; β o Values Co-values j λx:t j t · e j µα: c j µ˜x: c Reduction: hλx:t jj u · ei ! u µ˜x:ht jj ei ht jj µ˜x:ci ! c»t/x¼ t 2 V hµα:c jj ei ! c»e/α¼ e 2 E Critical pair: h jj 0i CbV µα:c µ˜x:c CbN .& c»µ˜x:c 0/α¼ c 0»µα:c/x¼ 13/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s λµµ˜-calculus Syntax: t;u ::= c ::= ht jj ei e; f ::= n j x;y j α; β o Values Co-values j λx:t j t · e j µα: c j µ˜x: c Reduction: hλx:t jj u · ei ! u µ˜x:ht jj ei ht jj µ˜x:ci ! c»t/x¼ t 2 V hµα:c jj ei ! c»e/α¼ e 2 E Critical pair: h jj 0i CbV µα:c µ˜x:c CbN .& c»µ˜x:c 0/α¼ Duality c 0»µα:c/x¼ (again and again) 13/ 22 Introduction Sequent calculus Benefits Curien-Herbelin’s λµµ˜-calculus Syntax: t;u ::= c ::= ht jj ei e; f ::= n j x;y j α; β o Values Co-values j λx:t j t · e j µα: c j µ˜x: c Typing rules:
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages61 Page
-
File Size-