Church and Curry: Combining Intrinsic and Extrinsic Typing

Size: px
Start display at page:

Download "Church and Curry: Combining Intrinsic and Extrinsic Typing"

Transcription

1 Church and Curry: Combining Intrinsic and Extrinsic Typing Frank Pfenning Dedicated to Peter Andrews on the occasion of his retirement Department of Computer Science Carnegie Mellon University April 5, / 24

2 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... 2 / 24

3 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus 2 / 24

4 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus Some objections 2 / 24

5 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus Some objections As a computer scientist: classical 2 / 24

6 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus Some objections As a computer scientist: classical As a philosopher: impredicative 2 / 24

7 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus Some objections As a computer scientist: classical As a philosopher: impredicative Components 2 / 24

8 Church s Simple Theory of Types Language and logic for the formalization of mathematics (Church 1940) Stood the test of time (72 years!) HOL, Isabelle/HOL, TPS, LEO, Satallax,... Synthesis, simplification, and generalization of Russell and Whitehead s ramified theory of types Church and Rosser s (untyped) λ-calculus Some objections As a computer scientist: classical As a philosopher: impredicative Components Simply typed λ-calculus (this talk) Logical axioms and inference rules 2 / 24

9 Simply Typed λ-calculus Church s definitions 3 / 24

10 Simply Typed λ-calculus Church s definitions Types 1 ι and o are types. 2 If α and β are types, then α β is a type. (Church wrote βα) 3 / 24

11 Simply Typed λ-calculus Church s definitions Types 1 ι and o are types. 2 If α and β are types, then α β is a type. (Church wrote βα) Well-formed terms M α of type α 1 Any variable x α or constant c α is a term. 2 If x α is a variable and M β a term then (λx. M) α β is a term. 3 If M α β 1 and M α 2 are terms, then (M 1 M 2 ) β is a term. 3 / 24

12 Intrinsic Typing Every well-formed term has an intrinsic type, including variables 4 / 24

13 Intrinsic Typing Every well-formed term has an intrinsic type, including variables This kind of intrinsic formulation has become rare, but it has a number of advantages 4 / 24

14 Intrinsic Typing Every well-formed term has an intrinsic type, including variables This kind of intrinsic formulation has become rare, but it has a number of advantages Supports conventions, such as In the remainder of this [talk] we assume that all terms are well-formed according to the above definition. 4 / 24

15 Intrinsic Typing Every well-formed term has an intrinsic type, including variables This kind of intrinsic formulation has become rare, but it has a number of advantages Supports conventions, such as In the remainder of this [talk] we assume that all terms are well-formed according to the above definition. In a logical framework tp : type. arrow : tp -> tp -> tp. tm : tp -> type. lam : (tm A -> tm B) -> tm (arrow A B). app : tm (arrow A B) -> tm A -> tm B. 4 / 24

16 Untyped λ-calculus (Church 1932) (Church and Rosser 1936) Terms 1 Any variable x or constant c is a term. 2 If x is a variable and M a term then (λx. M) is a term. 3 If M 1 and M 2 are terms, then (M 1 M 2 ) is a term. 5 / 24

17 Extrinsic Typing (Curry 1934) [for combinators, not λ-terms] Types as properties of terms 6 / 24

18 Extrinsic Typing (Curry 1934) [for combinators, not λ-terms] Types as properties of terms Typing judgments defined by rules x:α Γ Γ x : α c:α Σ Γ c : α Γ, x:α M : β (x dom(γ)) Γ λx. M : α β Γ M : α β Γ N : α Γ M N : β 6 / 24

19 Types as Properties A term can have multiple types λx. x : ι ι λx. x : (ι ι) (ι ι) 7 / 24

20 Types as Properties A term can have multiple types λx. x : ι ι λx. x : (ι ι) (ι ι) Express explicitly in the form of a single type 7 / 24

21 Types as Properties A term can have multiple types λx. x : ι ι λx. x : (ι ι) (ι ι) Express explicitly in the form of a single type Parametric polymorphism (universal types) λx. x : t. t t 7 / 24

22 Types as Properties A term can have multiple types λx. x : ι ι λx. x : (ι ι) (ι ι) Express explicitly in the form of a single type Parametric polymorphism (universal types) λx. x : t. t t Ad hoc polymorphism (intersection types) λx. x : (ι ι) ((ι ι) (ι ι)) 7 / 24

23 Extrinsic Rules Parametric polymorphism Γ M : β (t ftv(γ)) Γ M : t. β I Γ M : t. α Γ M : [β/t]α E 8 / 24

24 Extrinsic Rules Parametric polymorphism Γ M : β (t ftv(γ)) Γ M : t. β Intersection polymorphism I Γ M : t. α Γ M : [β/t]α E Γ M : A Γ M : B Γ M : A B I Γ M : A B Γ M : A E 1 Γ M : A B Γ M : B E 2 8 / 24

25 Types as Properties: The Good News Can type terms more generally λx. x x : ( α. α α) ( β. β β) λx. x x : ((ι ι) ι) ι 9 / 24

26 Types as Properties: The Good News Can type terms more generally λx. x x : ( α. α α) ( β. β β) λx. x x : ((ι ι) ι) ι Can type type terms more accurately λx. s(s(s x)) : (even odd) (odd even) 9 / 24

27 Types as Properties: The Bad News The typing judgment is undecidable 10 / 24

28 Types as Properties: The Bad News The typing judgment is undecidable Challenge: generalize to a complete language Practical Useful Philosophically justified Easy to reason about 10 / 24

29 Layering Type Systems Intrinsic simple types for basic consistency Avoiding Russell s paradox 11 / 24

30 Layering Type Systems Intrinsic simple types for basic consistency Avoiding Russell s paradox Extrinsic sorts on well-formed terms for precision Circumvent problems with general extrinsic types Achieve pragmatic goals 11 / 24

31 Layering Type Systems Intrinsic simple types for basic consistency Avoiding Russell s paradox Extrinsic sorts on well-formed terms for precision Circumvent problems with general extrinsic types Achieve pragmatic goals Instances Intersection types to datasort refinement (this talk) Dependent types to index refinements 11 / 24

32 Layering Type Systems Intrinsic simple types for basic consistency Avoiding Russell s paradox Extrinsic sorts on well-formed terms for precision Circumvent problems with general extrinsic types Achieve pragmatic goals Instances Intersection types to datasort refinement (this talk) Dependent types to index refinements Parametric polymorphism is a different story 11 / 24

33 Representing Data Multiple techniques in Church s Type Theory Church numerals Constants and axioms 12 / 24

34 Representing Data Multiple techniques in Church s Type Theory Church numerals Constants and axioms We have only basic type ι (o is for truth values) 12 / 24

35 Representing Data Multiple techniques in Church s Type Theory Church numerals Constants and axioms We have only basic type ι (o is for truth values) Example: natural numbers Constants z ι and s ι ι (constructors) Constant nat ι o (predicate) Axioms nat(z) x ι. nat(x) nat(s(x)) 12 / 24

36 Representing Data Multiple techniques in Church s Type Theory Church numerals Constants and axioms We have only basic type ι (o is for truth values) Example: natural numbers Constants z ι and s ι ι (constructors) Constant nat ι o (predicate) Axioms nat(z) x ι. nat(x) nat(s(x)) Lists, trees, etc. all have type ι Sort out using sorts 12 / 24

37 Simple Sorts Example nat ι sort z ι : nat s ι ι : nat nat 13 / 24

38 Simple Sorts Example nat ι sort z ι : nat s ι ι : nat nat Define sorts S α refining type α under signature Σ 1 A base sort Q ι declared in Σ is a simple sort. 2 If S α and T β are simple sorts, then (S T ) α β is a simple sort. 13 / 24

39 Sorting Judgment Context Γ consisting of declarations x α : S α Sorting judgment Γ M α : S α 14 / 24

40 Sorting Judgment Context Γ consisting of declarations x α : S α Sorting judgment Γ M α : S α Defined only for terms of intrinsic type α and sort refining the same type α! 14 / 24

41 Sorting Judgment Context Γ consisting of declarations x α : S α Sorting judgment Γ M α : S α Defined only for terms of intrinsic type α and sort refining the same type α! Rules x:s Γ Γ x : S c:s Σ Γ c : S Γ, x:s M : T (x dom(γ)) Γ λx. M : S T Γ M : S T Γ N : S Γ M N : T 14 / 24

42 Subsorts Subsort declarations Q ι 1 Q ι 2 New rules Q Q Q 1 Q 2 Q 2 Q 3 Q 1 Q 3 Γ M : Q Q Q Γ M : Q Defined on base types only Can derive principles for higher types 15 / 24

43 Subsorting Example Refining natural numbers zero nat pos nat z : zero s : nat pos 16 / 24

44 Subsorting Example Refining natural numbers Examples zero nat pos nat z : zero s : nat pos λx. x : nat nat λx. x : zero nat λx. λy. x y : (nat zero) (zero nat) λx. s x : nat pos 16 / 24

45 Combining Properties Want to express and exploit multiple properties of terms 17 / 24

46 Combining Properties Want to express and exploit multiple properties of terms Example: even and odd numbers even nat odd nat z : even s : even odd s : odd even 17 / 24

47 Combining Properties Want to express and exploit multiple properties of terms Example: even and odd numbers even nat odd nat z : even s : even odd s : odd even Have no way to express in one sort: λx ι. s(s(s x)) : even odd λx ι. s(s(s x)) : odd even 17 / 24

48 Intersection Sorts Define sorts S α refining types α (in intrinsic style) 1 A base sort Q ι declared in Σ is a sort. 2 If S α and T β are sorts, then (S T ) α β is a sort. 3 If S α and T α are sorts then (S T ) α is a sort. 4 α is a sort for each type α. 18 / 24

49 Extended Sorting Judgments Recall Γ M α : S α 19 / 24

50 Extended Sorting Judgments Recall Γ M α : S α New typing rules Γ M : S 1 Γ M : S 2 Γ M : S 1 S 2 I Γ M : S 1 S 2 Γ M : S 1 E 1 Γ M : S 1 S 2 Γ M : S 2 E 2 Γ M : I 19 / 24

51 Extended Sorting Judgments Recall Γ M α : S α New typing rules Γ M : S 1 Γ M : S 2 Γ M : S 1 S 2 I Γ M : S 1 S 2 Γ M : S 1 E 1 Γ M : S 1 S 2 Γ M : S 2 E 2 Γ M : I Philosophically justified in the sense of Dummett/Martin-Löf 19 / 24

52 Example Revisited Can now conjoin properties λx ι. s(s(s x)) : (even odd) (odd even) (nat pos) / 24

53 Example Revisited Can now conjoin properties λx ι. s(s(s x)) : (even odd) (odd even) (nat pos)... Every (well-formed) term has a principal sort 20 / 24

54 Some Results Sort checking is decidable Proof: there are effectively only finitely many refinements of a given type 21 / 24

55 Some Results Sort checking is decidable Proof: there are effectively only finitely many refinements of a given type Sorting is closed under β-reduction Proof: standard substitution property 21 / 24

56 Some Results Sort checking is decidable Proof: there are effectively only finitely many refinements of a given type Sorting is closed under β-reduction Proof: standard substitution property Sorting is closed under η-expansion Proof: induction over sorts 21 / 24

57 More Results Define η α (M) as η-long form of M α 22 / 24

58 More Results Define η α (M) as η-long form of M α Define subsorting S α T α at higher types S T : x:s η α (x) : T 22 / 24

59 More Results Define η α (M) as η-long form of M α Define subsorting S α T α at higher types S T : x:s η α (x) : T Extend subsumption rule 22 / 24

60 More Results Define η α (M) as η-long form of M α Define subsorting S α T α at higher types S T : x:s η α (x) : T Extend subsumption rule Sorting is closed under β-expansion Proof: intersect all sorts the abstracted term is used at 22 / 24

61 More Results Define η α (M) as η-long form of M α Define subsorting S α T α at higher types S T : x:s η α (x) : T Extend subsumption rule Sorting is closed under β-expansion Proof: intersect all sorts the abstracted term is used at Sorting is closed under η-reduction Proof: by subsorting at higher types 22 / 24

62 More Results Define η α (M) as η-long form of M α Define subsorting S α T α at higher types S T : x:s η α (x) : T Extend subsumption rule Sorting is closed under β-expansion Proof: intersect all sorts the abstracted term is used at Sorting is closed under η-reduction Proof: by subsorting at higher types Conclusion Extrinsic (Curry) sorting with intersections refining intrinsic (Church) typing is closed under λ-conversion! 22 / 24

63 Related Developments (my students only) Expressive power extends tree automata to higher types Canonical (= β-normal, η-long) terms can by typed bidirectionally In: Festschrift in Honor of Peter B. Andrews on his 70th Birthday, C. Benzmüller, C. Brown, J. Siekmann, and R. Statman, editors Crucial for logical frameworks (Lovas 2010) Refinement type inference for ML (Freeman 1994) Practical refinements type for SML (Davies 2005) Dependent refinements over decidable domains (Xi 1998) Unifying sort and dependent refinements (Dunfield 2007) 23 / 24

64 Conclusion Church s original intrinsic formulation of the simply-typed λ-calculus has fallen into disfavor, perhaps unjustly 24 / 24

65 Conclusion Church s original intrinsic formulation of the simply-typed λ-calculus has fallen into disfavor, perhaps unjustly It suggests an elegant layering with Curry s extrinsic typing judgment (translated to λ-calculus) 24 / 24

66 Conclusion Church s original intrinsic formulation of the simply-typed λ-calculus has fallen into disfavor, perhaps unjustly It suggests an elegant layering with Curry s extrinsic typing judgment (translated to λ-calculus) Can be usefully combined with Coppo et al. s intersection types for high expressiveness, precision, and surprisingly strong metatheoretic results 24 / 24

Subtyping and Intersection Types Revisited

Subtyping and Intersection Types Revisited Subtyping and Intersection Types Revisited Frank Pfenning Carnegie Mellon University International Conference on Functional Programming (ICFP 07) Freiburg, Germany, October 1-3, 2007 Joint work with Rowan

More information

The Calculus of Inductive Constructions

The Calculus of Inductive Constructions The Calculus of Inductive Constructions Hugo Herbelin 10th Oregon Programming Languages Summer School Eugene, Oregon, June 16-July 1, 2011 1 Outline - A bit of history, leading to the Calculus of Inductive

More information

REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE

REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE WILLIAM LOVAS AND FRANK PFENNING Carnegie Mellon University, Pittsburgh, PA 15213, USA e-mail address: wlovas@cs.cmu.edu

More information

A Bidirectional Refinement Type System for LF

A Bidirectional Refinement Type System for LF LFMTP 2007 A Bidirectional Refinement Type System for LF William Lovas 1 Frank Pfenning 2 Computer Science Department Carnegie Mellon University Pittsburgh, PA, USA Abstract We present a system of refinement

More information

The Curry-Howard Isomorphism

The Curry-Howard Isomorphism The Curry-Howard Isomorphism Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) The Curry-Howard Isomorphism MFES 2008/09

More information

Agent-Based HOL Reasoning 1

Agent-Based HOL Reasoning 1 Agent-Based HOL Reasoning 1 Alexander Steen Max Wisniewski Christoph Benzmüller Freie Universität Berlin 5th International Congress on Mathematical Software (ICMS 2016) 1 This work has been supported by

More information

Lecture Notes on Subject Reduction and Normal Forms

Lecture Notes on Subject Reduction and Normal Forms Lecture Notes on Subject Reduction and Normal Forms 15-814: Types and Programming Languages Frank Pfenning Lecture 4 September 13, 2018 1 Introduction In the last lecture we proved some key aspect of a

More information

Lecture Notes on Combinatory Modal Logic

Lecture Notes on Combinatory Modal Logic Lecture Notes on Combinatory Modal Logic 15-816: Modal Logic Frank Pfenning Lecture 9 February 16, 2010 1 Introduction The connection between proofs and program so far has been through a proof term assignment

More information

Simply Typed λ-calculus

Simply Typed λ-calculus Simply Typed λ-calculus Lecture 1 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 1 Semester 2, 2017 1 / 23 A Brief History of Type Theory First developed

More information

Lecture Notes on Classical Linear Logic

Lecture Notes on Classical Linear Logic Lecture Notes on Classical Linear Logic 15-816: Linear Logic Frank Pfenning Lecture 25 April 23, 2012 Originally, linear logic was conceived by Girard [Gir87] as a classical system, with one-sided sequents,

More information

Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison

Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison 1 Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison Amy Felty University of Ottawa July 13, 2010 Joint work with Brigitte Pientka, McGill University 2 Comparing Systems We focus on

More information

HOAS by example What is a Formal System? A Simply Typed Framework What Does it Mean? Canonical LF References HOAS. Randy Pollack

HOAS by example What is a Formal System? A Simply Typed Framework What Does it Mean? Canonical LF References HOAS. Randy Pollack HOAS Randy Pollack Version of November 2, 2011 Outline 1 HOAS by example 2 What is a Formal System? 3 A Simply Typed Framework 4 What Does it Mean? 5 Canonical LF Judgement Forms and Rules Hereditary Substitution

More information

Introduction to lambda calculus Part 6

Introduction to lambda calculus Part 6 Introduction to lambda calculus Part 6 Antti-Juhani Kaijanaho 2017-02-16 1 Untyped lambda calculus 2 Typed lambda calculi 2.1 Dynamically typed lambda calculus with integers 2.2 A model of Lisp 2.3 Simply

More information

Lecture Notes on Call-by-Value and Call-by-Name

Lecture Notes on Call-by-Value and Call-by-Name Lecture Notes on Call-by-Value and Call-by-Name 15-816: Substructural Logics Frank Pfenning Lecture 22 November 16, 2017 In this lecture we consider two different polarization strategies for structural

More information

Type inference in context

Type inference in context Type inference in context Adam Gundry University of Strathclyde Microsoft Research PhD Scholar Conor McBride University of Strathclyde James McKinna Radboud University Nijmegen MSFP 25 September 2010 Two

More information

Logic and Probability Lecture 3: Beyond Boolean Logic

Logic and Probability Lecture 3: Beyond Boolean Logic Logic and Probability Lecture 3: Beyond Boolean Logic Wesley Holliday & Thomas Icard UC Berkeley & Stanford August 13, 2014 ESSLLI, Tübingen Wesley Holliday & Thomas Icard: Logic and Probability, Lecture

More information

Notes on Logical Frameworks

Notes on Logical Frameworks Notes on Logical Frameworks Robert Harper IAS November 29, 2012 1 Introduction This is a brief summary of a lecture on logical frameworks given at the IAS on November 26, 2012. See the references for technical

More information

Lecture Notes on Intuitionistic Kripke Semantics

Lecture Notes on Intuitionistic Kripke Semantics Lecture Notes on Intuitionistic Kripke Semantics 15-816: Modal Logic Frank Pfenning Lecture 15 March 18, 2010 1 Introduction In this lecture we present an intuitionistic approach to describing a multipleworld

More information

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

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 17 Tuesday, April 2, 2013 1 There is a strong connection between types in programming languages and propositions

More information

Realisability methods of proof and semantics with application to expansion

Realisability methods of proof and semantics with application to expansion Realisability methods of proof and semantics with application to expansion First Year Examination Supervisors : Professor Fairouz Kamareddine and Doctor Joe B. Wells Student : Vincent Rahli ULTRA group,

More information

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

Type Theory and Constructive Mathematics. Type Theory and Constructive Mathematics Thierry Coquand. University of Gothenburg Type Theory and Constructive Mathematics Type Theory and Constructive Mathematics Thierry Coquand University of Gothenburg Content An introduction to Voevodsky s Univalent Foundations of Mathematics The

More information

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications NICTA Advanced Course Theorem Proving Principles, Techniques, Applications λ 1 CONTENT Intro & motivation, getting started with Isabelle Foundations & Principles Lambda Calculus Higher Order Logic, natural

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

COMP6463: λ-calculus

COMP6463: λ-calculus COMP6463: λ-calculus 1. Basics Michael Norrish Michael.Norrish@nicta.com.au Canberra Research Lab., NICTA Semester 2, 2015 Outline Introduction Lambda Calculus Terms Alpha Equivalence Substitution Dynamics

More information

Refinement Types for Logical Frameworks

Refinement Types for Logical Frameworks Carnegie Mellon University Research Showcase @ CMU Dissertations Theses and Dissertations 9-2010 Refinement Types for Logical Frameworks William Lovas Carnegie Mellon University Follow this and additional

More information

Theoretical Computer Science. Representing model theory in a type-theoretical logical framework

Theoretical Computer Science. Representing model theory in a type-theoretical logical framework Theoretical Computer Science 412 (2011) 4919 4945 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs Representing model theory in a type-theoretical

More information

Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory

Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory Frank Pfenning LICS 01 Boston, Massachusetts June 17, 2001 Acknowledgments: Alberto Momigliano,... 1 Outline 1. Introduction 2.

More information

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012 1 λ Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky Radboud University Nijmegen March 5, 2012 2 reading Femke van Raamsdonk Logical Verification Course Notes Herman Geuvers Introduction to

More information

Lecture Notes on Sequent Calculus

Lecture Notes on Sequent Calculus Lecture Notes on Sequent Calculus 15-816: Modal Logic Frank Pfenning Lecture 8 February 9, 2010 1 Introduction In this lecture we present the sequent calculus and its theory. The sequent calculus was originally

More information

Justifying Algorithms for βη-conversion

Justifying Algorithms for βη-conversion Justifying Algorithms for βη-conversion Healfdene Goguen AT&T Labs, 180 Park Ave., Florham Park NJ 07932 USA hhg@att.com. Abstract. Deciding the typing judgement of type theories with dependent types such

More information

Beyond First-Order Logic

Beyond First-Order Logic Beyond First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Beyond First-Order Logic MFES 2008/09 1 / 37 FOL

More information

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

3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule. 32 Reduction 29 32 Reduction In the preceding section, we have introduced the assignment of proof terms to natural deductions If proofs are programs then we need to explain how proofs are to be executed,

More information

Towards a general framework for metareasoning on HOAS encodings

Towards a general framework for metareasoning on HOAS encodings Towards a general framework for metareasoning on HOAS encodings 1 Project TOSCA TASK HOAS LF Slide 1 Towards a general framework for metareasoning on HOAS encodings Anna Bucalo, Martin Hofmann, Furio Honsell,

More information

Minimal logic for computable functionals

Minimal logic for computable functionals Minimal logic for computable functionals Helmut Schwichtenberg Mathematisches Institut der Universität München Contents 1. Partial continuous functionals 2. Total and structure-total functionals 3. Terms;

More information

Midterm Exam Types and Programming Languages Frank Pfenning. October 18, 2018

Midterm Exam Types and Programming Languages Frank Pfenning. October 18, 2018 Midterm Exam 15-814 Types and Programming Languages Frank Pfenning October 18, 2018 Name: Andrew ID: Instructions This exam is closed-book, closed-notes. You have 80 minutes to complete the exam. There

More information

Foundations of Computation. Ana Bove

Foundations of Computation. Ana Bove Foundations of Computation Ana Bove Programming Logic (ProgLog) Group February 13th 2018 Outline of the talk: What we do in ProgLog Origines of computer science Courses in the area Warming-up Exercise

More information

The λ-calculus and Curry s Paradox Drew McDermott , revised

The λ-calculus and Curry s Paradox Drew McDermott , revised The λ-calculus and Curry s Paradox Drew McDermott drew.mcdermott@yale.edu 2015-09-23, revised 2015-10-24 The λ-calculus was invented by Alonzo Church, building on earlier work by Gottlob Frege and Moses

More information

Lecture Notes on Heyting Arithmetic

Lecture Notes on Heyting Arithmetic Lecture Notes on Heyting Arithmetic 15-317: Constructive Logic Frank Pfenning Lecture 8 September 21, 2017 1 Introduction In this lecture we discuss the data type of natural numbers. They serve as a prototype

More information

A Concurrent Logical Framework

A Concurrent Logical Framework A Concurrent Logical Framework Frank Pfenning Carnegie Mellon University Types Workshop Torino, Italy, April 2003 Joint work with Iliano Cervesato, David Walker, and Kevin Watkins Types 03, Torino, April

More information

A Bidirectional Refinement Type System for LF

A Bidirectional Refinement Type System for LF A Bidirectional Refinement Type System for LF William Lovas 1 Frank Pfenning 2 May 2008 CMU-CS-08-129 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 Abstract We present a system

More information

Kleene realizability and negative translations

Kleene realizability and negative translations Q E I U G I C Kleene realizability and negative translations Alexandre Miquel O P. D E. L Ō A U D E L A R April 21th, IMERL Plan 1 Kleene realizability 2 Gödel-Gentzen negative translation 3 Lafont-Reus-Streicher

More information

How to Think of Intersection Types as Cartesian Products

How to Think of Intersection Types as Cartesian Products Available online at www.sciencedirect.com Electronic Notes in Theoretical Computer Science 325 (2016) 305 312 www.elsevier.com/locate/entcs How to Think of Intersection Types as Cartesian Products Rick

More information

Normalization by Evaluation

Normalization by Evaluation Normalization by Evaluation Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University PhD Seminar in Mathematical Engineering EAFIT University, Medellin, Colombia 9

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC

MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra Iliano Cervesato iliano@itd.nrl.navy.mil ITT Industries, inc @ NRL Washington, DC http://theory.stanford.edu/~iliano ISSS 2003,

More information

Lectures on Computational Type Theory

Lectures on Computational Type Theory Lectures on Computational Type Theory From Proofs-as-Programs to Proofs-as-Processes Robert L. Constable Cornell University Lecture Schedule Lecture 1: Origins and Introduction to Computational Type Theory

More information

Lecture Notes on Identity and Inversion

Lecture Notes on Identity and Inversion Lecture Notes on Identity and Inversion 15-816: Linear Logic Frank Pfenning Lecture 8 February 13, 2012 In the last lecture we saw cut elimination as the global version of cut reduction. In this lecture

More information

Extending higher-order logic with predicate subtyping: application to PVS

Extending higher-order logic with predicate subtyping: application to PVS Extending higher-order logic with predicate subtyping: application to PVS Frédéric Gilbert To cite this version: Frédéric Gilbert. Extending higher-order logic with predicate subtyping: application to

More information

Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types

Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types Lars Birkedal IT University of Copenhagen Joint work with Kristian Støvring and Jacob Thamsborg Oct, 2008 Lars

More information

Type Systems as a Foundation for Reliable Computing

Type Systems as a Foundation for Reliable Computing Type Systems as a Foundation for Reliable Computing Robert Harper Carnegie Mellon University Summer School on Reliable Computing University of Oregon July, 2005 References These lectures are based on the

More information

Between proof theory and model theory Three traditions in logic: Syntactic (formal deduction)

Between proof theory and model theory Three traditions in logic: Syntactic (formal deduction) Overview Between proof theory and model theory Three traditions in logic: Syntactic (formal deduction) Jeremy Avigad Department of Philosophy Carnegie Mellon University avigad@cmu.edu http://andrew.cmu.edu/

More information

Lecture Notes on Cut Elimination

Lecture Notes on Cut Elimination Lecture Notes on Cut Elimination 15-816: Substructural Logics Frank Pfenning Lecture 4 September 8, 2016 We first present some additional examples illustrating ordered inference that capture computations

More information

Completeness Theorems and λ-calculus

Completeness Theorems and λ-calculus Thierry Coquand Apr. 23, 2005 Content of the talk We explain how to discover some variants of Hindley s completeness theorem (1983) via analysing proof theory of impredicative systems We present some remarks

More information

Introduction to dependent type theory. CIRM, May 30

Introduction to dependent type theory. CIRM, May 30 CIRM, May 30 Goals of this presentation Some history and motivations Notations used in type theory Main goal: the statement of main properties of equality type and the univalence axiom First talk P ropositions

More information

From Constructibility and Absoluteness to Computability and Domain Independence

From Constructibility and Absoluteness to Computability and Domain Independence From Constructibility and Absoluteness to Computability and Domain Independence Arnon Avron School of Computer Science Tel Aviv University, Tel Aviv 69978, Israel aa@math.tau.ac.il Abstract. Gödel s main

More information

CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers

CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers CS 6110 Lecture 28 Subtype Polymorphism 3 April 2013 Lecturer: Andrew Myers 1 Introduction In this lecture, we make an attempt to extend the typed λ-calculus for it to support more advanced data structures

More information

Notes from Yesterday s Discussion. Big Picture. CIS 500 Software Foundations Fall November 1. Some lessons.

Notes from Yesterday s  Discussion. Big Picture. CIS 500 Software Foundations Fall November 1. Some lessons. CIS 500 Software Foundations Fall 2006 Notes from Yesterday s Email Discussion November 1 Some lessons This is generally a crunch-time in the semester Slow down a little and give people a chance to catch

More information

On the Undecidability of Partial Polymorphic Type Reconstruction

On the Undecidability of Partial Polymorphic Type Reconstruction On the Undecidability of Partial Polymorphic Type Reconstruction Frank Pfenning January 1992 CMU-CS-92-105 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 Abstract We prove that

More information

Towards Modal Type Theory

Towards Modal Type Theory Towards Modal Type Theory Frank Pfenning Constructivism in Non-Classical Logics and Computer Science In Memoriam Pierangelo Miglioli Mantova, Italy October 2, 2000 Disclaimer: Work in Progress! Acknowledgments:

More information

LCF + Logical Frameworks = Isabelle (25 Years Later)

LCF + Logical Frameworks = Isabelle (25 Years Later) LCF + Logical Frameworks = Isabelle (25 Years Later) Lawrence C. Paulson, Computer Laboratory, University of Cambridge 16 April 2012 Milner Symposium, Edinburgh 1979 Edinburgh LCF: From the Preface the

More information

Proving Fixed Points

Proving Fixed Points Proving Fixed Points Hervé Grall Team Ascola (INRIA EMN < LINA < CNRS) École des mines de Nantes Saturday, August 21st 2010 FICS 2010 - BRNO 1 In this talk A new proof method for order-theoretic fixed

More information

From Operational Semantics to Abstract Machines

From Operational Semantics to Abstract Machines From Operational Semantics to Abstract Machines John Hannan Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen East, Denmark. hannan@diku.dk Dale Miller

More information

Sequent Combinators: A Hilbert System for the Lambda Calculus

Sequent Combinators: A Hilbert System for the Lambda Calculus Sequent Combinators: A Hilbert System for the Lambda Calculus Healfdene Goguen Department of Computer Science, University of Edinburgh The King s Buildings, Edinburgh, EH9 3JZ, United Kingdom Fax: (+44)

More information

Termination and Reduction Checking for Higher-Order Logic Programs

Termination and Reduction Checking for Higher-Order Logic Programs Termination and Reduction Checking for Higher-Order Logic Programs Brigitte Pientka Department of Computer Science Carnegie Mellon University Pittsburgh, PA 15213, USA bp@cs.cmu.edu Abstract. In this paper,

More information

Algorithmic Reasoning about Böhm Trees

Algorithmic Reasoning about Böhm Trees Algorithmic Reasoning about Böhm Trees Luke Ong University of Oxford (Joint with Bahareh Afshari, Matthew Hague, Graham Leigh, Steven Ramsay, and Takeshi Tsukada) IMS Workshop on Higher-Order Model Checking

More information

CMSC 336: Type Systems for Programming Languages Lecture 10: Polymorphism Acar & Ahmed 19 February 2008

CMSC 336: Type Systems for Programming Languages Lecture 10: Polymorphism Acar & Ahmed 19 February 2008 CMSC 336: Type Systems for Programming Languages Lecture 10: Polymorphism Acar & Ahmed 19 February 2008 Contents 1 Polymorphism 1 2 Polymorphic λ-calculus: Syntax 1 3 Static Semantics 2 4 Dynamic Semantics

More information

Proof-theoretic semantics, self-contradiction and the format of deductive reasoning

Proof-theoretic semantics, self-contradiction and the format of deductive reasoning St. Andrews, 19.11.2011 p. 1 To appear as an article in: L. Tranchini (ed.), Anti-Realistic Notions of Truth, Special issue of Topoi vol. 31 no. 1, 2012 Proof-theoretic semantics, self-contradiction and

More information

Deductive System: Calculus of axioms and inference rules dening judgments. Used in the presentation of logics and programming derivable Logical Framew

Deductive System: Calculus of axioms and inference rules dening judgments. Used in the presentation of logics and programming derivable Logical Framew Paris, France PPDP'99, 30, 1999 September Logical and Meta-Logical Frameworks Frank Pfenning 1. Introduction 2. Logical Frameworks 3. Meta-Logical Frameworks 4. Conclusion (see also: upcoming article in

More information

The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations

The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations Journal of Automated Reasoning manuscript No. (will be inserted by the editor) The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations Part 1 A Foundational View

More information

Principal-Centric Reasoning in Constructive Authorization Logic

Principal-Centric Reasoning in Constructive Authorization Logic Principal-Centric Reasoning in Constructive Authorization Logic Deepak Garg Revised February 09, 2009 CMU-CS-09-120 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 e-mail: dg@cs.cmu.edu

More information

Simply Typed Lambda Calculus

Simply Typed Lambda Calculus Simply Typed Lambda Calculus Mathias Vorreiter Pedersen November 13, 2015 1 Recalling the untyped lambda calculus 1.1 Syntax t ::= x λ x. t t t 1.2 Evaluation x x t t λx.t λx.t t 1 t 1 t 2 t 2 t 1 t 2

More information

Komponenten- und Service-orientierte Softwarekonstruktion

Komponenten- und Service-orientierte Softwarekonstruktion Komponenten- und Service-orientierte Softwarekonstruktion Vorlesung 5: Combinatory Logic Synthesis Jakob Rehof LS XIV Software Engineering TU Dortmund Sommersemester 2015 SS 2015 J. Rehof (TU Dortmund)

More information

On a computational interpretation of sequent calculus for modal logic S4

On a computational interpretation of sequent calculus for modal logic S4 On a computational interpretation of sequent calculus for modal logic S4 Yosuke Fukuda Graduate School of Informatics, Kyoto University Second Workshop on Mathematical Logic and Its Applications March

More information

Program-ing in Coq. Matthieu Sozeau under the direction of Christine Paulin-Mohring

Program-ing in Coq. Matthieu Sozeau under the direction of Christine Paulin-Mohring Program-ing in Coq Matthieu Sozeau under the direction of Christine Paulin-Mohring LRI, Univ. Paris-Sud - Démons Team & INRIA Saclay - ProVal Project Foundations of Programming seminar February 15th 2008

More information

Lecture Notes on A Concurrent Logical Framework

Lecture Notes on A Concurrent Logical Framework Lecture Notes on A Concurrent Logical Framework 15-816: Linear Logic Frank Pfenning Lecture 21 April 9, 2012 Today we will put many of pieces together that we have put in place so far, by moving from a

More information

Formal Verification of Mathematical Algorithms

Formal Verification of Mathematical Algorithms Formal Verification of Mathematical Algorithms 1 Formal Verification of Mathematical Algorithms John Harrison Intel Corporation The cost of bugs Formal verification Levels of verification HOL Light Formalizing

More information

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

Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic Evaluation Driven Proof-Search in Natural Deduction Calculi for Intuitionistic Propositional Logic Mauro Ferrari 1, Camillo Fiorentini 2 1 DiSTA, Univ. degli Studi dell Insubria, Varese, Italy 2 DI, Univ.

More information

Intersection Synchronous Logic

Intersection Synchronous Logic UnB 2007 p. 1/2 Intersection Synchronous Logic Elaine Gouvêa Pimentel Simona Ronchi della Rocca Luca Roversi UFMG/UNITO, 2007 UnB 2007 p. 2/2 Outline Motivation UnB 2007 p. 2/2 Outline Motivation Intuitionistic

More information

Principal types Robustness to program transformations Practice. Type constraints for simple types Type constraints for ML Type inference in ML F

Principal types Robustness to program transformations Practice. Type constraints for simple types Type constraints for ML Type inference in ML F 1 Design iml F : an implicity-typed extension of System F Types explained eml F : an explicitly-typed version of iml F 2 Results Principal types Robustness to program transformations Practice 3 Type inference

More information

Investigation of Prawitz s completeness conjecture in phase semantic framework

Investigation of Prawitz s completeness conjecture in phase semantic framework Investigation of Prawitz s completeness conjecture in phase semantic framework Ryo Takemura Nihon University, Japan. takemura.ryo@nihon-u.ac.jp Abstract In contrast to the usual Tarskian set-theoretic

More information

Equality and dependent type theory. CIRM, May 31

Equality and dependent type theory. CIRM, May 31 CIRM, May 31 The Axiom of Univalence, a type-theoretic view point In type theory, we reduce proof-checking to type-checking Hence we want type-checking to be decidable This holds as soon as we have the

More information

Lecture Notes on Certifying Theorem Provers

Lecture Notes on Certifying Theorem Provers Lecture Notes on Certifying Theorem Provers 15-317: Constructive Logic Frank Pfenning Lecture 13 October 17, 2017 1 Introduction How do we trust a theorem prover or decision procedure for a logic? Ideally,

More information

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem Michael Beeson The hypotheses needed to prove incompleteness The question immediate arises whether the incompleteness

More information

Lecture Notes on Linear Logic

Lecture Notes on Linear Logic Lecture Notes on Linear Logic 15-816: Modal Logic Frank Pfenning Lecture 23 April 20, 2010 1 Introduction In this lecture we will introduce linear logic [?] in its judgmental formulation [?,?]. Linear

More information

Benchmarks for reasoning with syntax trees containing binders and contexts of assumptions

Benchmarks for reasoning with syntax trees containing binders and contexts of assumptions Math. Struct. in Comp. Science: page 1 of 34. c Cambridge University Press 2017 doi:10.1017/s0960129517000093 Benchmarks for reasoning with syntax trees containing binders and contexts of assumptions AMY

More information

CSCI 490 problem set 6

CSCI 490 problem set 6 CSCI 490 problem set 6 Due Tuesday, March 1 Revision 1: compiled Tuesday 23 rd February, 2016 at 21:21 Rubric For full credit, your solutions should demonstrate a proficient understanding of the following

More information

Paradox Machines. Christian Skalka The University of Vermont

Paradox Machines. Christian Skalka The University of Vermont Paradox Machines Christian Skalka The University of Vermont Source of Mathematics Where do the laws of mathematics come from? The set of known mathematical laws has evolved over time (has a history), due

More information

Final Exam (100 points)

Final Exam (100 points) Final Exam (100 points) Honor Code: Each question is worth 10 points. There is one bonus question worth 5 points. In contrast to the homework assignments, you may not collaborate on this final exam. You

More information

Lecture Notes on The Curry-Howard Isomorphism

Lecture Notes on The Curry-Howard Isomorphism Lecture Notes on The Curry-Howard Isomorphism 15-312: Foundations of Programming Languages Frank Pfenning Lecture 27 ecember 4, 2003 In this lecture we explore an interesting connection between logic and

More information

Formal verification of IA-64 division algorithms

Formal verification of IA-64 division algorithms Formal verification of IA-64 division algorithms 1 Formal verification of IA-64 division algorithms John Harrison Intel Corporation IA-64 overview HOL Light overview IEEE correctness Division on IA-64

More information

The LCF Approach to Theorem Proving

The LCF Approach to Theorem Proving The LCF Approach to Theorem Proving 1 The LCF Approach to Theorem Proving John Harrison Intel Corporation Ideas and historical context Key ideas of LCF Equational logic example More about HOL Light Programming

More information

Simply Typed λ-calculus

Simply Typed λ-calculus Simply Typed λ-calculus Lecture 2 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 2 Semester 2, 2017 1 / 19 Outline Properties of Curry type system:

More information

Lecture Notes on Ordered Logic

Lecture Notes on Ordered Logic Lecture Notes on Ordered Logic 15-317: Constructive Logic Frank Pfenning Lecture 21 November 16, 2017 1 Introduction In this lecture we first review ordered inference with two new examples: a finite state

More information

Model Theory in the Univalent Foundations

Model Theory in the Univalent Foundations Model Theory in the Univalent Foundations Dimitris Tsementzis January 11, 2017 1 Introduction 2 Homotopy Types and -Groupoids 3 FOL = 4 Prospects Section 1 Introduction Old and new Foundations (A) (B)

More information

On the Complexity of the Reflected Logic of Proofs

On the Complexity of the Reflected Logic of Proofs On the Complexity of the Reflected Logic of Proofs Nikolai V. Krupski Department of Math. Logic and the Theory of Algorithms, Faculty of Mechanics and Mathematics, Moscow State University, Moscow 119899,

More information

Proving Theorems Automatically, Semi-Automatically, and Interactively with TPS. Peter B. Andrews.

Proving Theorems Automatically, Semi-Automatically, and Interactively with TPS. Peter B. Andrews. Proving Theorems Automatically, Semi-Automatically, and Interactively with TPS Peter B. Andrews http://gtps.math.cmu.edu/tps.html Developers of TPS: Peter B. Andrews Eve Longini Cohen Dale A. Miller, Ph.D.

More information

On a Logical Foundation for Explicit Substitutions

On a Logical Foundation for Explicit Substitutions On a Logical Foundation for Explicit Substitutions Frank Pfenning Carnegie Mellon University Joint Invited Talk Typed Lambda Calculi and Applications (TLCA 07) Rewriting Techniques and Applications (RTA

More information

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus

Typing λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus

More information

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC.  MSR 3.0: MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra MSR 3: Iliano Cervesato iliano@itd.nrl.navy.mil One Year Later ITT Industries, inc @ NRL Washington, DC http://www.cs.stanford.edu/~iliano

More information