Embedding logics in Dedukti

Size: px
Start display at page:

Download "Embedding logics in Dedukti"

Transcription

1 1 INRIA, 2 Ecole Polytechnique, 3 ENSIIE/Cedric Embedding logics in Dedukti Ali Assaf 12, Guillaume Burel 3 April 12, 2013 Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 1

2 Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 2

3 Introduction Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 3

4 Introduction Universal proof checker Source: HOL, Coq,... Pure type systems Reconstruction, proof search,... HOL PVS Dedukti Coq Target: Dedukti λπ-calculus modulo (see previous talk) Proof checking (no reconstruction, no proof search,...) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 4

5 Introduction Towards interoperability Prove A B in system 1. Prove A in system 2. Can we deduce B? A B 1 A 2 B?? Shallow embeddings: A B 1 = A 1 B 1 Only need to relate A 1 with A 2 Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 5

6 Introduction Shallow vs. deep embeddings Reuse features of the target language Variables, binders,... Rewriting, computation,... Advantages: Lighter translations Make interoperability easier Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 6

7 Embedding pure type systems Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 7

8 Embedding pure type systems Pure type systems Signature P = (S, A, R) S a set of sorts A S S a set of axioms R S S S a set of rules Syntax sorts s S terms t, u, A, B ::= x s λx:a. t Πx:A. B t u contexts Γ ::= Γ, x : A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 8

9 Embedding pure type systems Typing rules Γ well-formed Γ x : A (x : A) Γ Γ well-formed Γ s 1 : s 2 (s 1 : s 2) A Γ A : s 1 Γ, x : A t : B Γ (Πx:A. B) : s 3 Γ (λx:a. t) : (Πx:A. B) Γ A : s 1 Γ, x : A B : s 2 (s 1, s 2, s 3) R Γ (Πx:A. B) : s 3 Γ t : (Πx:A. B) Γ (t u) : [u/x]b Γ u : A Γ t : A Γ B : s A β B Γ t : B well-formed Γ well-formed Γ A : s x Γ Γ, x : A well-formed Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 9

10 Embedding pure type systems Example Example The calculus of constructions (CC) is the PTS defined by the signature: S = type, kind A = (type : kind) R = (type, type, type), (kind, type, type), (type, kind, kind), (kind, kind, kind) The polymorphic identity function id = (λa:type. λx:a. x) is well-typed in CC: id : (ΠA:type. A A) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 10

11 Embedding pure type systems Translations λπ-calculus: types may only depend on terms PTS: terms and types may depend on types (polymorphism, type operators) Two translations: t as a term t as a type Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 11

12 Embedding pure type systems Two Translations As a type: s = s, the universe of terms of type s Πx:A. B = Πx: A. B As a term: s = ṡ, a constant Πx:A. B = π A (λx: A. B ) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 12

13 Embedding pure type systems Decoding function A term A can be used as a type Decoding function ε Constraints: A = ε A s = s Πx:A. B = Πx: A. B Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 13

14 Embedding pure type systems Decoding function A term A can be used as a type Decoding function ε Constraints: A = ε A ε s = s ε Πx:A. B = Πx:ε A. ε B Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 13

15 Embedding pure type systems Decoding function A term A can be used as a type Decoding function ε Constraints: A = ε A ε ṡ = s ε ( π A (λx: A. B )) = Πx:ε A. ε B Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 13

16 Embedding pure type systems Decoding function A term A can be used as a type Decoding function ε Constraints: A = ε A ε ṡ = s ε ( π A B) = Πx:ε A. ε (B x) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 13

17 Embedding pure type systems Decoding function A term A can be used as a type Decoding function ε Constraints: A = ε A ε ṡ s ε ( π A B) Πx:ε A. ε (B x) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 13

18 Embedding pure type systems The embedding Constants s : Type s S ε s : s Type s S ṡ 1 : s 2 (s 1 : s 2 ) A π s1,s 2,s 3 : ΠA:s 1. (ε s1 A s 2 ) s 3 (s 1, s 2, s 3 ) R Rewrite rules ε s2 (ṡ 1 ) s 1 (s 1 : s 2 ) A ε s3 ( π s1,s 2,s 3 A B) Πx:ε s1 A. ε s2 (B x) (s 1, s 2, s 3 ) R Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 14

19 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:a. x : ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

20 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:a. x : ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

21 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa: type. λx: A. x : ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

22 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:ε type. λx:ε A. x : ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

23 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

24 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ε ΠA:type. A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

25 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ε( π type (λa: type....)) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

26 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ε( π type (λa:type....)) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

27 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ΠA:ε type. (λa:type....)a Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

28 Embedding pure type systems Example Example Polymorphic identity in CC Translation: λa:type. λx:a. x : (ΠA:type. A A) λa:type. λx:ε A. x : ΠA:type. ε A ε A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 15

29 Embedding pure type systems Properties Theorem If Γ t : A then Γ t : A. (Soundness) Proof. In [Cousineau and Dowek 2007]. Theorem If Γ t : A then Γ t : A. (Conservativity) Proof. Coming soon! Partial result in [Cousineau and Dowek 2007]. Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 16

30 Holide: HOL in Dedukti Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 17

31 Holide: HOL in Dedukti HOL A family of theorem provers (HOL Light, HOL4, ProofPower,...) Based on higher order logic Large formalizations Flyspeck project (Kepler s conjecture) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 18

32 Holide: HOL in Dedukti Higher order logic Formulas are terms of the simply-typed λ-calculus types A, B ::= prop A B terms t, u ::= x λx:a. t t u c Can be seen as a PTS S = prop, type, kind A = (prop : type), (type : kind) R = (prop, prop, prop), (type, prop, prop), (type, type, type), (kind, kind, kind) Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 19

33 Holide: HOL in Dedukti Challenges Classical formulation Equality as a primitive connective, no PTS structure Axioms (β, extensionality, choice,...) No proof inspection LCF architecture: theorems as an abstract datatype Proofs are not kept in memory Proof size No computation in proofs (β, definitions,...) Huge proof trees Free variables Implicit quantification Name clashes Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 20

34 Holide: HOL in Dedukti Proof retrieval HOL kernel OCaml module defining an abstract datatype for theorems + methods for constructing theorems The HOL kernel must be modified! OpenTheory project [Hurd 2011] A standard for exporting and exchanging HOL proofs A well-defined standard library Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 21

35 Holide: HOL in Dedukti The OpenTheory article format Instructions that are executed to reconstruct the theorems. Example Reflexivity on a variable x of type A: x A = x A refl OpenTheory article file "A" vartype "x" var varterm refl OCaml execution let A = vartype("a") in let x = varterm(var("x", A)) in refl x Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 22

36 Holide: HOL in Dedukti Proof size Example A proof of t + t = u + u: let p =... (* A very large proof of t = u *) in appthm (appthm (refl f) p p) (+) = (+) refl π t = u Need proof sharing! (+) t = (+) u appthm (+) t t = (+) u u π t = u appthm Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 23

37 Holide: HOL in Dedukti Proof sharing Share common subproofs Already provided (partially) by OpenTheory Going further: factorize every step step1 : proof (t = u) :=... step2 : proof ((+) = (+)) := refl q. step3 : proof ((+) t = (+) u) := appthm step2 step1. step4 : proof ((+) t t = (+) u u) := appthm step3 step1. Need lambda lifting Abstract over free variables α-renaming to avoid clashes Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 24

38 Holide: HOL in Dedukti Proof sharing Share common subproofs Already provided (partially) by OpenTheory Going further: factorize every step step1 : proof (t = u) :=... step2 : proof ((+) = (+)) := refl q. step3 : proof ((+) t = (+) u) := appthm step2 step1. step4 : proof ((+) t t = (+) u u) := appthm step3 step1. Need lambda lifting Abstract over free variables α-renaming to avoid clashes To-do: extend to terms Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 24

39 Holide: HOL in Dedukti Translation process HOL Light bool.ml list.ml OpenTheory hollight bool.art list.art Dedukti holide bool.dk list.dk hol.dk Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 25

40 Holide: HOL in Dedukti Results Package Size (in kb) Time (in s) Percentage OpenTheory Dedukti Translation Verification Verified unit % function 89 1, % pair 195 4, % bool 305 4, % sum , % option , % relation , % list , % real , % natural , % set , % Total , ,661 85% Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 26

41 Coqine: Coq in Dedukti Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 27

42 Coqine: Coq in Dedukti Coq Proof system based on the calculus of inductive constructions Infinite hierarchy of universes type i Subtyping type i type i+1 Floating universes Inductive types Co-inductive types Modules... Large formalizations 4 color theorem, Feit Thompson theorem,... Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 28

43 Coqine: Coq in Dedukti Challenges Rich and complex theory (CIC) Much more than a PTS Can we encode it in the λπ-calculus modulo? Proof retrieval No direct export functions Implementation jungle No complete specification Huge code base ( s lines of code) Poorly documented Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 29

44 Coqine: Coq in Dedukti Infinite universe hierarchy. type 2 type 1 prop type 0 prop : Type. type : Type. eprop : prop Type. etype : type Type. dprop : type. dtype : type. etype dprop prop. etype dtype type. Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 30

45 Coqine: Coq in Dedukti Infinite universe hierarchy. type 2 type 1 prop type 0 prop : Type. type : nat Type. eprop : prop Type. etype : i : nat type i Type. dprop : type (s z). dtype : i : nat type (s i). etype (s z) dprop prop. etype (s i) (dtype i) type i. Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 30

46 Coqine: Coq in Dedukti Subtyping In Coq Γ t : A Γ B : s A B Γ t : B A B A B prop type i i j type i type j B C Πx:A. B Πx:A. C In Dedukti Confluence = uniqueness of types Uniqueness of types = no shallow encoding Use type casting Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 31

47 Coqine: Coq in Dedukti Type casting No implicit type casting Γ t : ε A A B Γ t : ε B Cast function cast : A B ε A ε B Insert when needed Γ t : ε A Γ h : A B Γ cast h t : ε B Need to define A B Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 32

48 Coqine: Coq in Dedukti Subtyping relation As an inductive relation sub_refl : A A sub_prop : prop type i sub_type : type i type i+j sub_prod : (Πx:εA. (B x) (C x)) π A B π A C = large cast annotations As a rewrite system prop type i prop prop type i type i+j type i type i π A B π A C Πx:εA. (B x) (C x) = canonical proof sub_refl : A A Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 33

49 Coqine: Coq in Dedukti Inductive types In Coq Inductive nat : Type := z : nat s : nat -> nat. In Dedukti nat : type. z : etype nat. s : etype nat etype nat. Pattern matching: nat_case : P : (etype nat type) fz : etype (P z) fs : (n : eset nat etype (P (s n))) n : etype nat etype (P n). [...] nat_case P fz fs z fz. [...] nat_case P fz fs (s x) fs n. Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 34

50 Coqine: Coq in Dedukti Fixpoints Translate fixpoints using rewriting rules Fixpoint f x1... xn struct xn := t. [...] f x1... xn t. Termination: CIC fixpoints are unfolded only if their structural argument starts with a constructor. Need to give the same semantics in the λπ-calculus modulo Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 35

51 Coqine: Coq in Dedukti Fixing fixpoints Cannot use pattern matching because of dependent types Fixpoint f (x y : A) (p : x = y) := t. [...] f x y (eq_refl x) t. Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 36

52 Coqine: Coq in Dedukti Fixing fixpoints Cannot use pattern matching because of dependent types Fixpoint f (x y : A) (p : x = y) := t. [...] f x y (eq_refl x) t. Add guards to constructors pre_nat : type. z : etype pre_nat. s : etype nat etype pre_nat. nat_constr : pre_nat nat. z = nat_constr z s n = nat_constr (s n ) [...] f x1... (nat_constr xn) t. Increased term size no syntactic equivalence Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 36

53 Coqine: Coq in Dedukti Fixing fixpoints Cannot use pattern matching because of dependent types Fixpoint f (x y : A) (p : x = y) := t. [...] f x y (eq_refl x) t. Add guards to constructors pre_nat : type. z : etype pre_nat. s : etype nat etype pre_nat. nat_constr : pre_nat nat. z = nat_constr z s n = nat_constr (s n ) [...] f x1... (nat_constr xn) t. Increased term size no syntactic equivalence Use recursors? Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 36

54 Coqine: Coq in Dedukti Modules In Coq: Nested modules Module A.... Module B.... End B.... End A. Functors Module F (A : T).... End N. Module expressions Module B := F(A). In Dedukti: Only separate namespaces for files Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 37

55 Coqine: Coq in Dedukti Translating modules Flatten nesting A.B.C translated as A.B_C Module is expanded into its individual elements Module A := B. is translated into A_x := B_x. A_y := B_y.... Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 38

56 Coqine: Coq in Dedukti Translating modules Flatten nesting A.B.C translated as A.B_C Module is expanded into its individual elements Module A (C):= B. is translated into A_x C_z1 C_z2... := B_x. A_y C_z1 C_Z2... := B_y.... Increased term size Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 38

57 Coqine: Coq in Dedukti Proof retrieval Coq proof scripts (.v) Notations Implicit arguments Tactics Coq compiled file (.vo) Low-level proof terms Binary dump of memory content Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 39

58 Coqine: Coq in Dedukti Using.vo files Advantages: Reconstructed proof terms Exactly the ones used by Coq Reuse Coq s code Disadvantages: Rely on Coq s code Must use the same versions of both ocaml and coqc Coqine is built on top of coqchk Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 40

59 Coqine: Coq in Dedukti Translation process Coq bool.v arith.v Coq coqc bool.vo arith.vo Dedukti coqine bool.dk arith.dk dedukti coq.dk Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 41

60 Coqine: Coq in Dedukti Results Working prototype Coq standard library: Can translate 84% Can type-check 20% File size: List.v: 45 kb List.vo: 260 kb List.dk: 2.2MB Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 42

61 Coqine: Coq in Dedukti Future work Complete the current implementation Solve remaining features Floating universes Contradicts weakening Non-modularity, side-effects Co-inductive types New coq features still coming! Long term: better specification for Coq Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 43

62 Conclusion Outline Introduction Embedding pure type systems Holide: HOL in Dedukti Coqine: Coq in Dedukti Conclusion Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 44

63 Conclusion Coqine Conclusion Embedding various logics can be fun! Theoretical and practical challenges Need good specifications and exporting standards HOL Light HOL4 Coq OpenTheory iprover (modulo) PVS Holide Dedukti Software available at Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 45

64 Conclusion Coqine Conclusion Embedding various logics can be fun! Theoretical and practical challenges Need good specifications and exporting standards HOL Light HOL4 Coq OpenTheory iprover (modulo) PVS Holide Dedukti your system Software available at Ali Assaf, Guillaume Burel: Embedding logics in Dedukti, 45

Toward explicit rewrite rules in the λπ-calculus modulo

Toward explicit rewrite rules in the λπ-calculus modulo Toward explicit rewrite rules in the λπ-calculus modulo Ronan Saillard (Olivier Hermant) Deducteam INRIA MINES ParisTech December 14th, 2013 1 / 29 Motivation Problem Checking, in a trustful way, that

More information

Calculus of Inductive Constructions

Calculus of Inductive Constructions Calculus of Inductive Constructions Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Calculus of Inductive Constructions

More information

Packaging Theories of Higher Order Logic

Packaging Theories of Higher Order Logic Packaging Theories of Higher Order Logic Joe Hurd Galois, Inc. joe@galois.com Theory Engineering Workshop Tuesday 9 February 2010 Joe Hurd Packaging Theories of Higher Order Logic 1 / 26 Talk Plan 1 Introduction

More information

First-Class Type Classes

First-Class Type Classes First-Class Type Classes Matthieu Sozeau Joint work with Nicolas Oury LRI, Univ. Paris-Sud - Démons Team & INRIA Saclay - ProVal Project Gallium Seminar November 3rd 2008 INRIA Rocquencourt Solutions for

More information

Importing HOL-Light into Coq

Importing HOL-Light into Coq Outlines Importing HOL-Light into Coq Deep and shallow embeddings of the higher order logic into Coq Work in progress Chantal Keller chantal.keller@ens-lyon.fr Bejamin Werner benjamin.werner@inria.fr 2009

More information

Theory Engineering Using Composable Packages

Theory Engineering Using Composable Packages Theory Engineering Using Composable Packages Joe Leslie-Hurd Intel Corp. joe@gilith.com SVARM & VMCAI 21 January 2013 Joe Leslie-Hurd Theory Engineering Using Composable Packages 1 / 52 Theory Engineering

More information

Inductive datatypes in HOL. lessons learned in Formal-Logic Engineering

Inductive datatypes in HOL. lessons learned in Formal-Logic Engineering Inductive datatypes in HOL lessons learned in Formal-Logic Engineering Stefan Berghofer and Markus Wenzel Institut für Informatik TU München = Isabelle λ β HOL α 1 Introduction Applications of inductive

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

Exporting an Arithmetic Library from Dedukti to HOL

Exporting an Arithmetic Library from Dedukti to HOL Exporting an rithmetic Library from Dedukti to HOL François Thiré To cite this version: François Thiré. Exporting an rithmetic Library from Dedukti to HOL. 2017. HL Id: hal-01668250 https://hal.inria.fr/hal-01668250

More information

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1 LAST TIME ON HOL Proof rules for propositional and predicate logic Safe and unsafe rules NICTA Advanced Course Forward Proof Slide 1 Theorem Proving Principles, Techniques, Applications Slide 3 The Epsilon

More information

Integration of SMT Solvers with ITPs There and Back Again

Integration of SMT Solvers with ITPs There and Back Again Integration of SMT Solvers with ITPs There and Back Again Sascha Böhme and University of Sheffield 7 May 2010 1 2 Features: SMT-LIB vs. Yices Translation Techniques Caveats 3 4 Motivation Motivation System

More information

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic 3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

More information

An experiment with variable binding, denotational semantics, and logical relations in Coq. Adam Chlipala University of California, Berkeley

An experiment with variable binding, denotational semantics, and logical relations in Coq. Adam Chlipala University of California, Berkeley A Certified TypePreserving Compiler from Lambda Calculus to Assembly Language An experiment with variable binding, denotational semantics, and logical relations in Coq Adam Chlipala University of California,

More information

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics Dan Grossman Spring 2011 Review e ::= λx. e x e e c v ::= λx. e c τ ::= int τ τ Γ ::= Γ, x : τ (λx. e) v e[v/x] e 1 e 1 e 1 e

More information

Lecture slides & distribution files:

Lecture slides & distribution files: Type Theory Lecture slides & distribution files: http://www.cs.rhul.ac.uk/home/zhaohui/ttlectures.html Zhaohui Luo Department of Computer Science Royal Holloway, University of London April 2011 2 Type

More information

The design of a programming language for provably correct programs: success and failure

The design of a programming language for provably correct programs: success and failure The design of a programming language for provably correct programs: success and failure Don Sannella Laboratory for Foundations of Computer Science School of Informatics, University of Edinburgh http://homepages.inf.ed.ac.uk/dts

More information

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214 Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in

More information

CSE-321 Programming Languages 2011 Final

CSE-321 Programming Languages 2011 Final Name: Hemos ID: CSE-321 Programming Languages 2011 Final Prob 1 Prob 2 Prob 3 Prob 4 Prob 5 Prob 6 Total Score Max 15 15 10 17 18 25 100 There are six problems on 18 pages in this exam, including one extracredit

More information

Adam Chlipala University of California, Berkeley ICFP 2006

Adam Chlipala University of California, Berkeley ICFP 2006 Modular Development of Certified Program Verifiers with a Proof Assistant Adam Chlipala University of California, Berkeley ICFP 2006 1 Who Watches the Watcher? Program Verifier Might want to ensure: Memory

More information

MLW. Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. March 26, Radboud University Nijmegen

MLW. Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. March 26, Radboud University Nijmegen 1 MLW Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky Radboud University Nijmegen March 26, 2012 inductive types 2 3 inductive types = types consisting of closed terms built from constructors

More information

Typed Compilation Against Non-Manifest Base Classes

Typed Compilation Against Non-Manifest Base Classes Typed Compilation Against Non-Manifest Base Classes Christopher League Long Island University christopher.league@liu.edu Stefan Monnier Université de Montréal monnier@iro.umontreal.ca FTfJP workshop 26

More information

On a few open problems of the Calculus of Inductive Constructions and on their practical consequences

On a few open problems of the Calculus of Inductive Constructions and on their practical consequences On a few open problems of the Calculus of Inductive Constructions and on their practical consequences Hugo Herbelin PPS, 24 September 2009 (updated May 2010) 1 Outline - From the Calculus of Constructions

More information

Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms

Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms Frank Pfenning Workshop on Implementation of Logic Réunion Island, France November 11, 2000 Joint work with Carsten

More information

Introduction to Coq Proof Assistant

Introduction to Coq Proof Assistant Introduction to Coq Proof Assistant Qian Hu, M.Sc McMaster University March 3, 2010 Presentation Outline Overview Computer Assistance in Proofs Proof Assistant Coq Introduction The Coq Proof Assistant

More information

Inductive Definitions, continued

Inductive Definitions, continued 1 / 27 Inductive Definitions, continued Assia Mahboubi Jan 7th, 2016 2 / 27 Last lecture Introduction to Coq s inductive types: Introduction, elimination and computation rules; Twofold implementation :

More information

λ calculus is inconsistent

λ calculus is inconsistent Content Rough timeline COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Gerwin Klein, June Andronick, Toby Murray λ Intro & motivation, getting started [1] Foundations & Principles

More information

Symmetry in Type Theory

Symmetry in Type Theory Google May 29th, 2012 What is Symmetry? Definition Symmetry: Two or more things that initially look distinct, may actually be instances of a more general underlying principle. Why do we care? Simplicity.

More information

Coq, a formal proof development environment combining logic and programming. Hugo Herbelin

Coq, a formal proof development environment combining logic and programming. Hugo Herbelin Coq, a formal proof development environment combining logic and programming Hugo Herbelin 1 Coq in a nutshell (http://coq.inria.fr) A logical formalism that embeds an executable typed programming language:

More information

Preuves Interactives et Applications

Preuves Interactives et Applications Preuves Interactives et Applications Christine Paulin & Burkhart Wolff http://www.lri.fr/ paulin/preuvesinteractives Université Paris-Saclay HOL and its Specification Constructs 10/12/16 B. Wolff - M2

More information

A NEW PROOF-ASSISTANT THAT REVISITS HOMOTOPY TYPE THEORY THE THEORETICAL FOUNDATIONS OF COQ USING NICOLAS TABAREAU

A NEW PROOF-ASSISTANT THAT REVISITS HOMOTOPY TYPE THEORY THE THEORETICAL FOUNDATIONS OF COQ USING NICOLAS TABAREAU COQHOTT A NEW PROOF-ASSISTANT THAT REVISITS THE THEORETICAL FOUNDATIONS OF COQ USING HOMOTOPY TYPE THEORY NICOLAS TABAREAU The CoqHoTT project Design and implement a brand-new proof assistant by revisiting

More information

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ 1 Last time... λ calculus syntax free variables, substitution β reduction α and η conversion

More information

Dedukti: a Logical Framework based on the λπ-calculus Modulo Theory

Dedukti: a Logical Framework based on the λπ-calculus Modulo Theory Dedukti: a Logical Framework based on the λπ-calculus Modulo Theory Ali Assaf 1, Guillaume Burel 2, Raphaël Cauderlier 3, David Delahaye 4, Gilles Dowek 5, Catherine Dubois 2, Frédéric Gilbert 6, Pierre

More information

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Higher-Order Logic. Specification and Verification with Higher-Order Logic Higher-Order Logic Specification and Verification with Higher-Order Logic Arnd Poetzsch-Heffter (Slides by Jens Brandt) Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern

More information

Computing Fundamentals 2 Introduction to CafeOBJ

Computing Fundamentals 2 Introduction to CafeOBJ Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal Faria, Prof. Heinrich Hußmann. See notes on slides

More information

Lecture 13: Subtyping

Lecture 13: Subtyping Lecture 13: Subtyping Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Programming Languages Pratikakis (CSD) Subtyping CS546, 2018-2019 1 / 15 Subtyping Usually found

More information

Probabilistic Parsing of Mathematics

Probabilistic Parsing of Mathematics Probabilistic Parsing of Mathematics Jiří Vyskočil Josef Urban Czech Technical University in Prague, Czech Republic Cezary Kaliszyk University of Innsbruck, Austria Outline Why and why not current formal

More information

Coq with Classes. Matthieu Sozeau. Journées PPS 2011 September 5th 2011 Trouville, France. Project Team πr 2 INRIA Paris

Coq with Classes. Matthieu Sozeau. Journées PPS 2011 September 5th 2011 Trouville, France. Project Team πr 2 INRIA Paris Coq with Classes Matthieu Sozeau Project Team πr 2 INRIA Paris Journées PPS 2011 September 5th 2011 Trouville, France This talk A quick overview of Coq Elaboration Type Classes Matthieu Sozeau - Coq with

More information

A Simple Supercompiler Formally Verified in Coq

A Simple Supercompiler Formally Verified in Coq A Simple Supercompiler Formally Verified in Coq IGE+XAO Balkan 4 July 2010 / META 2010 Outline 1 Introduction 2 3 Test Generation, Extensional Equivalence More Realistic Language Use Information Propagation

More information

Coq. LASER 2011 Summerschool Elba Island, Italy. Christine Paulin-Mohring

Coq. LASER 2011 Summerschool Elba Island, Italy. Christine Paulin-Mohring Coq LASER 2011 Summerschool Elba Island, Italy Christine Paulin-Mohring http://www.lri.fr/~paulin/laser Université Paris Sud & INRIA Saclay - Île-de-France September 2011 Lecture 4 : Advanced functional

More information

CSE-321 Programming Languages 2010 Final

CSE-321 Programming Languages 2010 Final Name: Hemos ID: CSE-321 Programming Languages 2010 Final Prob 1 Prob 2 Prob 3 Prob 4 Prob 5 Prob 6 Total Score Max 18 28 16 12 36 40 150 There are six problems on 16 pages, including two work sheets, in

More information

From Types to Sets in Isabelle/HOL

From Types to Sets in Isabelle/HOL From Types to Sets in Isabelle/HOL Extented Abstract Ondřej Kunčar 1 and Andrei Popescu 1,2 1 Fakultät für Informatik, Technische Universität München, Germany 2 Institute of Mathematics Simion Stoilow

More information

Second-Order Type Systems

Second-Order Type Systems #1 Second-Order Type Systems Homework 5 Summary Student : 37.9704 Student : 44.4466 ORIGINAL : 50.2442 Student : 50.8275 Student : 50.8633 Student : 50.9181 Student : 52.1347 Student : 52.1633 Student

More information

Static and User-Extensible Proof Checking. Antonis Stampoulis Zhong Shao Yale University POPL 2012

Static and User-Extensible Proof Checking. Antonis Stampoulis Zhong Shao Yale University POPL 2012 Static and User-Extensible Proof Checking Antonis Stampoulis Zhong Shao Yale University POPL 2012 Proof assistants are becoming popular in our community CompCert [Leroy et al.] sel4 [Klein et al.] Four-color

More information

Introduction to the Calculus of Inductive Definitions

Introduction to the Calculus of Inductive Definitions Introduction to the Calculus of Inductive Definitions Christine Paulin-Mohring 1 LRI, Univ Paris-Sud, CNRS and INRIA Saclay - Île-de-France, Toccata, Orsay F-91405 Christine.Paulin@lri.fr 1 Introduction

More information

Combining Programming with Theorem Proving

Combining Programming with Theorem Proving Combining Programming with Theorem Proving Chiyan Chen and Hongwei Xi Boston University Programming with Theorem Proving p.1/27 Motivation for the Research To support advanced type systems for practical

More information

Formally Certified Satisfiability Solving

Formally Certified Satisfiability Solving SAT/SMT Proof Checking Verifying SAT Solver Code Future Work Computer Science, The University of Iowa, USA April 23, 2012 Seoul National University SAT/SMT Proof Checking Verifying SAT Solver Code Future

More information

Lecture 3: Typed Lambda Calculus and Curry-Howard

Lecture 3: Typed Lambda Calculus and Curry-Howard Lecture 3: Typed Lambda Calculus and Curry-Howard H. Geuvers Radboud University Nijmegen, NL 21st Estonian Winter School in Computer Science Winter 2016 H. Geuvers - Radboud Univ. EWSCS 2016 Typed λ-calculus

More information

First-Order Proof Tactics in Higher Order Logic Theorem Provers Joe Hurd p.1/24

First-Order Proof Tactics in Higher Order Logic Theorem Provers Joe Hurd p.1/24 First-Order Proof Tactics in Higher Order Logic Theorem Provers Joe Hurd joe.hurd@cl.cam.ac.uk University of Cambridge First-Order Proof Tactics in Higher Order Logic Theorem Provers Joe Hurd p.1/24 Contents

More information

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic

More information

Types Summer School Gothenburg Sweden August Dogma oftype Theory. Everything has a type

Types Summer School Gothenburg Sweden August Dogma oftype Theory. Everything has a type Types Summer School Gothenburg Sweden August 2005 Formalising Mathematics in Type Theory Herman Geuvers Radboud University Nijmegen, NL Dogma oftype Theory Everything has a type M:A Types are a bit like

More information

Ornaments in ML. Thomas Williams, Didier Rémy. April 18, Inria - Gallium

Ornaments in ML. Thomas Williams, Didier Rémy. April 18, Inria - Gallium Ornaments in ML Thomas Williams, Didier Rémy Inria - Gallium April 18, 2017 1 Motivation Two very similar functions let rec add m n = match m with Z n S m S (add m n) let rec append ml nl = match ml with

More information

10 Years of Partiality and General Recursion in Type Theory

10 Years of Partiality and General Recursion in Type Theory 10 Years of Partiality and General Recursion in Type Theory Ana Bove Chalmers University of Technology DTP 10 July 9th 2010 Claims and Disclaims I know that I know nothing Socrates Ana Bove DTP 10 July

More information

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals Review CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics e ::= λx. e x ee c v ::= λx. e c (λx. e) v e[v/x] e 1 e 2 e 1 e 2 τ ::= int τ τ Γ ::= Γ,x : τ e 2 e 2 ve 2 ve 2 e[e /x]:

More information

Programming Languages Lecture 15: Recursive Types & Subtyping

Programming Languages Lecture 15: Recursive Types & Subtyping CSE 230: Winter 2008 Principles of Programming Languages Lecture 15: Recursive Types & Subtyping Ranjit Jhala UC San Diego News? Formalize first-order type systems Simple types (integers and booleans)

More information

Modular dependent induction in Coq, Mendler-style. Paolo Torrini

Modular dependent induction in Coq, Mendler-style. Paolo Torrini Modular dependent induction in Coq, Mendler-style Paolo Torrini Dept. of Computer Science, KU Leuven ITP 16, Nancy, 22.08.2016 * The Author left the Institution in April 2016 motivation: cost-effective

More information

The λπ-calculus Modulo as a Universal Proof Language

The λπ-calculus Modulo as a Universal Proof Language Author manuscript, published in "the Second International Workshop on Proof Exchange for Theorem Proving (PxTP 2012), Manchester : United Kingdom (2012)" The λπ-calculus Modulo as a Universal Proof Language

More information

Inductive data types

Inductive data types Inductive data types Assia Mahboubi 9 juin 2010 In this class, we shall present how Coq s type system allows us to define data types using inductive declarations. Generalities Inductive declarations An

More information

Denotational Semantics. Domain Theory

Denotational Semantics. Domain Theory Denotational Semantics and Domain Theory 1 / 51 Outline Denotational Semantics Basic Domain Theory Introduction and history Primitive and lifted domains Sum and product domains Function domains Meaning

More information

Programs and Proofs in Isabelle/HOL

Programs and Proofs in Isabelle/HOL Programs and Proofs in Isabelle/HOL Makarius Wenzel http://sketis.net March 2016 = Isabelle λ β α Introduction What is Isabelle? Hanabusa Itcho : Blind monks examining an elephant Introduction 2 History:

More information

Theorem Proving Principles, Techniques, Applications Recursion

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

More information

Programming Languages Lecture 14: Sum, Product, Recursive Types

Programming Languages Lecture 14: Sum, Product, Recursive Types CSE 230: Winter 200 Principles of Programming Languages Lecture 4: Sum, Product, Recursive Types The end is nigh HW 3 No HW 4 (= Final) Project (Meeting + Talk) Ranjit Jhala UC San Diego Recap Goal: Relate

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

a brief introduction to (dependent) type theory

a brief introduction to (dependent) type theory a brief introduction to (dependent) type theory Cory Knapp January 14, 2015 University of Birmingham what is type theory? What is type theory? formal language of terms with types x : A x has type A What

More information

Specification, Verification, and Interactive Proof

Specification, Verification, and Interactive Proof Specification, Verification, and Interactive Proof SRI International May 23, 2016 PVS PVS - Prototype Verification System PVS is a verification system combining language expressiveness with automated tools.

More information

HIGHER-ORDER ABSTRACT SYNTAX IN TYPE THEORY

HIGHER-ORDER ABSTRACT SYNTAX IN TYPE THEORY HIGHER-ORDER ABSTRACT SYNTAX IN TYPE THEORY VENANZIO CAPRETTA AND AMY P. FELTY Abstract. We develop a general tool to formalize and reason about languages expressed using higher-order abstract syntax in

More information

Partiality and Recursion in Interactive Theorem Provers - An Overview

Partiality and Recursion in Interactive Theorem Provers - An Overview Partiality and Recursion in Interactive Theorem Provers - An Overview Ana Bove, Alexander Krauss, Matthieu Sozeau To cite this version: Ana Bove, Alexander Krauss, Matthieu Sozeau. Partiality and Recursion

More information

Logical Verification Course Notes. Femke van Raamsdonk Vrije Universiteit Amsterdam

Logical Verification Course Notes. Femke van Raamsdonk Vrije Universiteit Amsterdam Logical Verification Course Notes Femke van Raamsdonk femke@csvunl Vrije Universiteit Amsterdam autumn 2008 Contents 1 1st-order propositional logic 3 11 Formulas 3 12 Natural deduction for intuitionistic

More information

Basic Foundations of Isabelle/HOL

Basic Foundations of Isabelle/HOL Basic Foundations of Isabelle/HOL Peter Wullinger May 16th 2007 1 / 29 1 Introduction into Isabelle s HOL Why Type Theory Basic Type Syntax 2 More HOL Typed λ Calculus HOL Rules 3 Example proof 2 / 29

More information

The Next 700 Syntactic Models of Type Theory

The Next 700 Syntactic Models of Type Theory The Next 700 Syntactic Models of Type Theory Simon Boulier 1 Pierre-Marie Pédrot 2 Nicolas Tabareau 1 1 INRIA, 2 University of Ljubljana CPP 17th January 2017 Pédrot & al (INRIA & U Ljubljana) The Next

More information

Introduction to Co-Induction in Coq

Introduction to Co-Induction in Coq August 2005 Motivation Reason about infinite data-structures, Reason about lazy computation strategies, Reason about infinite processes, abstracting away from dates. Finite state automata, Temporal logic,

More information

Introduction to Homotopy Type Theory

Introduction to Homotopy Type Theory Introduction to Homotopy Type Theory Lecture notes for a course at EWSCS 2017 Thorsten Altenkirch March 5, 2017 1 What is this course about? To explain what Homotopy Type Theory is, I will first talk about

More information

A CONSTRUCTIVE SEMANTICS FOR REWRITING LOGIC MICHAEL N. KAPLAN

A CONSTRUCTIVE SEMANTICS FOR REWRITING LOGIC MICHAEL N. KAPLAN A CONSTRUCTIVE SEMANTICS FOR REWRITING LOGIC BY MICHAEL N. KAPLAN A DISSERTATION SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY IN COMPUTER SCIENCE UNIVERSITY

More information

Coq projects for type theory 2018

Coq projects for type theory 2018 Coq projects for type theory 2018 Herman Geuvers, James McKinna, Freek Wiedijk February 6, 2018 Here are five projects for the type theory course to choose from. Each student has to choose one of these

More information

Intrinsically Typed Reflection of a Gallina Subset Supporting Dependent Types for Non-structural Recursion of Coq

Intrinsically Typed Reflection of a Gallina Subset Supporting Dependent Types for Non-structural Recursion of Coq Intrinsically Typed Reflection of a Gallina Subset Supporting Dependent Types for Non-structural Recursion of Coq Akira Tanaka National Institute of Advanced Industrial Science and Technology (AIST) 2018-11-21

More information

c constructor P, Q terms used as propositions G, H hypotheses scope identifier for a notation scope M, module identifiers t, u arbitrary terms

c constructor P, Q terms used as propositions G, H hypotheses scope identifier for a notation scope M, module identifiers t, u arbitrary terms Coq quick reference Meta variables Usage Meta variables Usage c constructor P, Q terms used as propositions db identifier for a hint database s string G, H hypotheses scope identifier for a notation scope

More information

Coq quick reference. Category Example Description. Inductive type with instances defined by constructors, including y of type Y. Inductive X : Univ :=

Coq quick reference. Category Example Description. Inductive type with instances defined by constructors, including y of type Y. Inductive X : Univ := Coq quick reference Category Example Description Meta variables Usage Meta variables Usage c constructor P, Q terms used as propositions db identifier for a hint database s string G, H hypotheses scope

More information

Lost in translation. Leonardo de Moura Microsoft Research. how easy problems become hard due to bad encodings. Vampire Workshop 2015

Lost in translation. Leonardo de Moura Microsoft Research. how easy problems become hard due to bad encodings. Vampire Workshop 2015 Lost in translation how easy problems become hard due to bad encodings Vampire Workshop 2015 Leonardo de Moura Microsoft Research I wanted to give the following talk http://leanprover.github.io/ Automated

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

More information

Lecture Notes on Data Representation

Lecture Notes on Data Representation Lecture Notes on Data Representation 15-814: Types and Programming Languages Frank Pfenning Lecture 9 Tuesday, October 2, 2018 1 Introduction In this lecture we ll see our type system in action. In particular

More information

Embedding Cryptol in Higher Order Logic

Embedding Cryptol in Higher Order Logic Embedding Cryptol in Higher Order Logic Joe Hurd Computer Laboratory Cambridge University joe.hurd@cl.cam.ac.uk 10 March 2007 Abstract This report surveys existing approaches to embedding Cryptol programs

More information

From natural numbers to the lambda calculus

From natural numbers to the lambda calculus From natural numbers to the lambda calculus Benedikt Ahrens joint work with Ralph Matthes and Anders Mörtberg Outline 1 About UniMath 2 Signatures and associated syntax Outline 1 About UniMath 2 Signatures

More information

CS 4110 Programming Languages & Logics. Lecture 28 Recursive Types

CS 4110 Programming Languages & Logics. Lecture 28 Recursive Types CS 4110 Programming Languages & Logics Lecture 28 Recursive Types 7 November 2014 Announcements 2 Foster office hours 11-12pm Guest lecture by Fran on Monday Recursive Types 3 Many languages support recursive

More information

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012 CS-XXX: Graduate Programming Languages Lecture 9 Simply Typed Lambda Calculus Dan Grossman 2012 Types Major new topic worthy of several lectures: Type systems Continue to use (CBV) Lambda Caluclus as our

More information

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 Contents 1 Solution to the Exercise 1 1.1 Semantics for lambda calculus.......................

More information

Partiality and Recursion in Interactive Theorem Provers An Overview

Partiality and Recursion in Interactive Theorem Provers An Overview Under consideration for publication in Math. Struct. in Comp. Science Partiality and Recursion in Interactive Theorem Provers An Overview A N A B O V E 1, A L E X A N D E R K R A U S S 2, and M A T T H

More information

Univalent fibrations in type theory and topology

Univalent fibrations in type theory and topology Univalent fibrations in type theory and topology Dan Christensen University of Western Ontario Wayne State University, April 11, 2016 Outline: Background on type theory Equivalence and univalence A characterization

More information

Importing HOL Light into Coq

Importing HOL Light into Coq Importing HOL Light into Coq Chantal Keller 1,2 and Benjamin Werner 2 1 ENS Lyon 2 INRIA Saclay Île-de-France at École polytechnique Laboratoire d informatique (LIX) 91128 Palaiseau Cedex France keller@lix.polytechnique.fr

More information

Lecture 5: The Untyped λ-calculus

Lecture 5: The Untyped λ-calculus Lecture 5: The Untyped λ-calculus Syntax and basic examples Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Static Analysis Pratikakis (CSD) Untyped λ-calculus I CS49040,

More information

CSE-321 Programming Languages 2014 Final

CSE-321 Programming Languages 2014 Final Name: Hemos ID: CSE-321 Programming Languages 2014 Final Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Total Score Max 15 12 14 14 30 15 100 There are six problems on 12 pages in this exam.

More information

Functional programming languages

Functional programming languages Functional programming languages Part VI: towards Coq mechanization Xavier Leroy INRIA Paris MPRI 2-4, 2016-2017 X. Leroy (INRIA) Functional programming languages MPRI 2-4, 2016-2017 1 / 58 Prologue: why

More information

Introduction to System F. Lecture 18 CS 565 4/20/09

Introduction to System F. Lecture 18 CS 565 4/20/09 Introduction to System F Lecture 18 CS 565 4/20/09 The Limitations of F 1 (simply-typed λ- calculus) In F 1 each function works exactly for one type Example: the identity function id = λx:τ. x : τ τ We

More information

Verified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 27, 2017

Verified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 27, 2017 Verified Characteristic Formulae for CakeML Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 27, 2017 Goal: write programs in a high-level (ML-style) language, prove them correct interactively,

More information

Ideas over terms generalization in Coq

Ideas over terms generalization in Coq Ideas over terms generalization in Coq Vincent Siles 1,2 LIX/INRIA/Ecole Polytechnique Palaiseau, France Abstract Coq is a tool that allows writing formal proofs and check their correctness in its underlying

More information

Program certification with computational

Program certification with computational Program certification with computational effects Burak Ekici j.w.w. Jean-Guillaume Dumas, Dominique Duval, Damien Pous y LJK, University Joseph Fourier, Grenoble y LIP, ENS-Lyon November 5, 2014 JNCF 14,

More information

Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types

Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types Hyeonseung Im 1, Keiko Nakata 2, and Sungwoo Park 3 1 LRI - Université Paris-Sud 11, Orsay, France 2 Institute of Cybernetics

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

The Implicit Calculus of Constructions

The Implicit Calculus of Constructions The Implicit Calculus of Constructions Extending Pure Type Systems with an Intersection Type Binder and Subtyping Alexandre Miquel 1 INRIA Rocquencourt Projet LogiCal BP 105, 78 153 Le Chesnay cedex, France

More information

The Polymorphic Blame Calculus and Parametricity

The Polymorphic Blame Calculus and Parametricity 1 / 31 The Polymorphic Blame Calculus and Parametricity Jeremy G. Siek Indiana University, Bloomington University of Strathclyde August 2015 2 / 31 Integrating static and dynamic typing Static Dynamic

More information

The Untyped Lambda Calculus

The Untyped Lambda Calculus Resources: The slides of this lecture were derived from [Järvi], with permission of the original author, by copy & x = 1 let x = 1 in... paste or by selection, annotation, or rewording. [Järvi] is in turn

More information

Constructing the Propositional Truncation using Non-recursive HITs

Constructing the Propositional Truncation using Non-recursive HITs Constructing the Propositional Truncation using Non-recursive HITs Floris van Doorn Carnegie Mellon University January 19, 2016 Floris van Doorn (CMU) Constructing Propositional Truncation January 19,

More information