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

Size: px
Start display at page:

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

Transcription

1 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 University of Nottingham

2 The Big Picture

3 The Big Picture

4 The Big Picture

5 The Big Picture

6 The Big Picture

7 The Big Picture

8 The Big Picture

9 The Big Picture Inductive diveucl a b : Set := divex : q r, b > r a = q b + r diveucl a b. Lemma eucl dev : n, n > 0 m:nat, diveucl m n. Proof. intros b H a; pattern a in ; apply gt wf rec; intros n H0. elim (le gt dec b n). intro lebn. elim (H0 (n - b)); auto with arith. intros q r g e. apply divex with (S q) r; simpl in ; auto with arith. elim plus assoc. elim e; auto with arith. intros gtbn. apply divex with 0 n; simpl in ; auto with arith. Qed.

10 The Big Picture

11 The Curry-Howard isomorphism Programming language = Proof system

12 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment.

13 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Epigram PVS DML Ωmega

14 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Epigram PVS DML Ωmega

15 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Epigram PVS DML Ωmega

16 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Paradigm Purely functional. Epigram PVS DML Ωmega

17 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Paradigm Purely functional. Total, no separation of terms and types. Epigram PVS DML Ωmega

18 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Paradigm Purely functional. Total, no separation of terms and types. Development style and proof automation Interactive, semi-automatic proof using tactics. Epigram PVS DML Ωmega

19 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Paradigm Purely functional. Total, no separation of terms and types. Development style and proof automation Interactive, semi-automatic proof using tactics. Phase distinction none Epigram PVS DML Ωmega

20 The Curry-Howard isomorphism Programming language = Proof system Program extends the Coq proof-assistant into a dependently-typed programming environment. Logical Framework Type Theory. Separates proofs and programs using sorts Extraction Paradigm Purely functional. Total, no separation of terms and types. Development style and proof automation Interactive, semi-automatic proof using tactics. Phase distinction in Program Epigram PVS DML Ωmega

21 1 The idea A simple idea From PVS to Coq 2 Theoretical development Russell Interpretation in Coq Inductive types 3 Program Architecture Hello world Extensions 4 Conclusion M. Sozeau (LRI) Program-ing in Coq 4 / 27

22 A simple idea Definition {x : T P } is the set of objects of set T verifying property P. Useful for specifying, widely used in mathematics ; Links object and property. M. Sozeau (LRI) Program-ing in Coq 5 / 27

23 A simple idea Definition {x : T P } is the set of objects of set T verifying property P. Useful for specifying, widely used in mathematics ; Links object and property. Adapting the idea t : T P [t/x] t : { x : T P } t : { x : T P } t : T M. Sozeau (LRI) Program-ing in Coq 5 / 27

24 A simple idea Definition {x : T P } is the set of objects of set T verifying property P. Useful for specifying, widely used in mathematics ; Links object and property. Adapting the idea t : T p : P [t/x] (t, p) : { x : T P } t : { x : T P } proj t : T M. Sozeau (LRI) Program-ing in Coq 5 / 27

25 From Predicate subtyping... PVS Specialized typing algorithm for subset types, generating Type-checking conditions. t : { x : T P } used as t : T ok t : T used as t : { x : T P } if P [t/x] M. Sozeau (LRI) Program-ing in Coq 6 / 27

26 From Predicate subtyping... PVS Specialized typing algorithm for subset types, generating Type-checking conditions. t : { x : T P } used as t : T ok t : T used as t : { x : T P } if P [t/x] + Practical success ; M. Sozeau (LRI) Program-ing in Coq 6 / 27

27 From Predicate subtyping... PVS Specialized typing algorithm for subset types, generating Type-checking conditions. t : { x : T P } used as t : T ok t : T used as t : { x : T P } if P [t/x] + Practical success ; No strong safety guarantee in PVS. M. Sozeau (LRI) Program-ing in Coq 6 / 27

28 ... to Subset coercions 1 A property-irrelevant language (Russell) with decidable typing ; Γ t : { x : T P } Γ t : T Γ t : T Γ, x : T P : Prop Γ t : { x : T P } M. Sozeau (LRI) Program-ing in Coq 7 / 27

29 ... to Subset coercions 1 A property-irrelevant language (Russell) with decidable typing ; 2 A total interpretation to Coq terms with holes ; Γ t : { x : T P } Γ proj t : T Γ t : T Γ, x : T P : Prop Γ (t,?) : { x : T P } Γ? : P [t/x] M. Sozeau (LRI) Program-ing in Coq 7 / 27

30 ... to Subset coercions 1 A property-irrelevant language (Russell) with decidable typing ; 2 A total interpretation to Coq terms with holes ; 3 A mechanism to turn the holes into proof obligations and manage them. Γ t : { x : T P } Γ proj t : T Γ t : T Γ, x : T P : Prop Γ p : P [t/x] Γ (t, p) : { x : T P } M. Sozeau (LRI) Program-ing in Coq 7 / 27

31 1 The idea A simple idea From PVS to Coq 2 Theoretical development Russell Interpretation in Coq Inductive types 3 Program Architecture Hello world Extensions 4 Conclusion M. Sozeau (LRI) Program-ing in Coq 8 / 27

32 Russell syntax x V s, t, u, v ::= x Set Prop Type M. Sozeau (LRI) Program-ing in Coq 9 / 27

33 Russell syntax x V s, t, u, v ::= x Set Prop Type λx : s.t s t Πx : s.t M. Sozeau (LRI) Program-ing in Coq 9 / 27

34 Russell syntax x V s, t, u, v ::= x Set Prop Type λx : s.t s t Πx : s.t (u, v) Σx:s.t π 1 s π 2 s Σx : s.t M. Sozeau (LRI) Program-ing in Coq 9 / 27

35 Russell syntax x V s, t, u, v ::= x Set Prop Type λx : s.t s t Πx : s.t (u, v) Σx:s.t π 1 s π 2 s Σx : s.t { x : s t } M. Sozeau (LRI) Program-ing in Coq 9 / 27

36 Russell typing and coercion Calculus of Constructions with Γ t : U Γ U βπ T : s Γ t : T M. Sozeau (LRI) Program-ing in Coq 10 / 27

37 Russell typing and coercion Calculus of Constructions with Γ t : U Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s M. Sozeau (LRI) Program-ing in Coq 10 / 27

38 Russell typing and coercion Calculus of Constructions with Γ t : U Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s Γ U V : Set Γ, x : U P : Prop Γ { x : U P } V : Set Γ U V : Set Γ, x : V P : Prop Γ U { x : V P } : Set M. Sozeau (LRI) Program-ing in Coq 10 / 27

39 Russell typing and coercion Calculus of Constructions with Γ t : U Example Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s Γ U V : Set Γ, x : U P : Prop Γ { x : U P } V : Set Γ U V : Set Γ, x : V P : Prop Γ U { x : V P } : Set Γ 0 : N Γ N { x : N x 0 } : Set Γ 0 : { x : N x 0 } M. Sozeau (LRI) Program-ing in Coq 10 / 27

40 Russell typing and coercion Calculus of Constructions with Γ t : U Example Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s Γ U V : Set Γ, x : U P : Prop Γ { x : U P } V : Set Γ U V : Set Γ, x : V P : Prop Γ U { x : V P } : Set Γ 0 : N Γ N { x : N x 0 } : Set Γ 0 : { x : N x 0 } Γ? : 0 0 M. Sozeau (LRI) Program-ing in Coq 10 / 27

41 Russell typing and coercion Calculus of Constructions with Γ t : U Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s Γ U V : Set Γ, x : U P : Prop Γ { x : U P } V : Set Γ U V : Set Γ, x : V P : Prop Γ U { x : V P } : Set Γ U T : s 1 Γ, x : U V W : s 2 Γ Πx : T.V Πx : U.W : s 2 Γ T U : s Γ, x : T V W : s s {Set, Prop} Γ Σx : T.V Σy : U.W : s M. Sozeau (LRI) Program-ing in Coq 10 / 27

42 Russell typing and coercion Calculus of Constructions with Γ t : U Γ U T : s Γ t : T Γ T βπ U : s Γ T U : s Γ U V : Set Γ, x : U P : Prop Γ { x : U P } V : Set Γ U V : Set Γ, x : V P : Prop Γ U { x : V P } : Set Γ U T : s 1 Γ, x : U V W : s 2 Γ Πx : T.V Πx : U.W : s 2 Γ T U : s Γ, x : T V W : s s {Set, Prop} Γ Σx : T.V Σy : U.W : s is symmetric! M. Sozeau (LRI) Program-ing in Coq 10 / 27

43 Results Theorem (Decidability of type checking and type inference) Γ t : T is decidable. Γ f : T Γ T Πx : A.B : s Γ e : E Γ E A : s Γ (f e) : B[e/x] M. Sozeau (LRI) Program-ing in Coq 11 / 27

44 Results Theorem (Decidability of type checking and type inference) Γ t : T is decidable. Γ f : T Γ T Πx : A.B : s Γ e : E Γ E A : s Γ (f e) : B[e/x] Coq corner Mechanised proofs of Subject Reduction and equivalence between declarative and algorithmic presentations of the system. M. Sozeau (LRI) Program-ing in Coq 11 / 27

45 1 The idea A simple idea From PVS to Coq 2 Theoretical development Russell Interpretation in Coq Inductive types 3 Program Architecture Hello world Extensions 4 Conclusion M. Sozeau (LRI) Program-ing in Coq 12 / 27

46 From Russell to Coq The target system : Cic with metavariables Γ? t : T Γ? p : P [t/x] Γ? elt T P t p : { x : T P } Γ? t : { x : T P } Γ? σ 1 t : T Γ? t : { x : T P } Γ? σ 2 t : P [σ 1 t/x] Γ? P : Prop Γ?? P : P We build an interpretation Γ from Russell to Cic? terms. M. Sozeau (LRI) Program-ing in Coq 13 / 27

47 From Russell to Coq The target system : Cic with metavariables Γ? t : T Γ? p : P [t/x] Γ? elt T P t p : { x : T P } Γ? t : { x : T P } Γ? σ 1 t : T Γ? t : { x : T P } Γ? σ 2 t : P [σ 1 t/x] Γ? P : Prop Γ?? P : P We build an interpretation Γ from Russell to Cic? terms. Our goal If Γ t : T then Γ? t Γ : T Γ. M. Sozeau (LRI) Program-ing in Coq 13 / 27

48 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. M. Sozeau (LRI) Program-ing in Coq 14 / 27

49 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U M. Sozeau (LRI) Program-ing in Coq 14 / 27

50 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U M. Sozeau (LRI) Program-ing in Coq 14 / 27

51 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition Γ? T βπ U Γ? : T U : { x : T P } T M. Sozeau (LRI) Program-ing in Coq 14 / 27

52 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U Γ? σ 1 : { x : T P } T M. Sozeau (LRI) Program-ing in Coq 14 / 27

53 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U Γ? σ 1 : { x : T P } T Γ? : T { x : T P } M. Sozeau (LRI) Program-ing in Coq 14 / 27

54 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U Γ? σ 1 : { x : T P } T Γ? elt? P Γ,x:T [ /x] : T { x : T P } M. Sozeau (LRI) Program-ing in Coq 14 / 27

55 Deriving explicit coercions Interpretation of coercions If Γ T U : s then Γ? c[ ] : T U which implies Γ, x : T Γ? c[x] : U Γ. Definition T βπ U Γ? : T U Γ? σ 1 : { x : T P } T Γ? elt? P Γ,x:T [ /x] : T { x : T P } Example Γ? 0 : N Γ? elt? (x 0)[ /x] : N { x : N x 0 } Γ? elt 0? 0 0 : { x : N x 0 } M. Sozeau (LRI) Program-ing in Coq 14 / 27

56 Interpretation of terms Example (Application) Γ f : T Γ T Πx : V.W : s Γ u : U Γ U V : s Γ (f u) : W [u/x] f u Γ let π = coerce Γ T (Πx : V.W ) in let c = coerce Γ U V in (π[ f Γ ]) (c[ u Γ ]) Theorem (Soundness) If Γ t : T then Γ? t Γ : T Γ. M. Sozeau (LRI) Program-ing in Coq 15 / 27

57 Theoretical matters...? s equational theory: (β) (λx : X.e) v e[v/x] (π i ) π i (e 1, e 2 ) T e i (σ i ) σ i (elt E P e 1 e 2 ) e i (η) (λx : X.e x) e if x / F V (e) (SP) elt E P (σ 1 e) (σ 2 e) e M. Sozeau (LRI) Program-ing in Coq 16 / 27

58 Theoretical matters...? s equational theory: (β) (λx : X.e) v e[v/x] (π i ) π i (e 1, e 2 ) T e i (σ i ) σ i (elt E P e 1 e 2 ) e i (η) (λx : X.e x) e if x / F V (e) (SP) elt E P (σ 1 e) (σ 2 e) e (PI) elt E P t p elt E P t p if t t Proof Irrelevance M. Sozeau (LRI) Program-ing in Coq 16 / 27

59 Theoretical matters...? s equational theory: (β) (λx : X.e) v e[v/x] (π i ) π i (e 1, e 2 ) T e i (σ i ) σ i (elt E P e 1 e 2 ) e i (η) (λx : X.e x) e if x / F V (e) (SP) elt E P (σ 1 e) (σ 2 e) e (PI) elt E P t p elt E P t p if t t Proof Irrelevance... have practical effects Difficulty to reason on code: elt T P x p 1 elt T P x p 2 where p 1, p 2 : P x. M. Sozeau (LRI) Program-ing in Coq 16 / 27

60 Inductive types Different representations vector n { x : list A length x = n } or vector n vnil : vector 0 vcons : A n, vector n vector (S n)? M. Sozeau (LRI) Program-ing in Coq 17 / 27

61 Inductive types Different representations vector n { x : list A length x = n } or vector n vnil : vector 0 vcons : A n, vector n vector (S n)? Γ v : vector x Γ x = y : Prop Γ vector x vector y : Set Γ v : vector y M. Sozeau (LRI) Program-ing in Coq 17 / 27

62 1 The idea A simple idea From PVS to Coq 2 Theoretical development Russell Interpretation in Coq Inductive types 3 Program Architecture Hello world Extensions 4 Conclusion M. Sozeau (LRI) Program-ing in Coq 18 / 27

63 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). M. Sozeau (LRI) Program-ing in Coq 19 / 27

64 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). 1 Use the Coq parser. Program Definition f : T := t. M. Sozeau (LRI) Program-ing in Coq 19 / 27

65 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). 1 Use the Coq parser. 2 Typecheck Γ t : T and generate Γ? t Γ : T Γ ; Program Definition f : T Γ := t Γ. M. Sozeau (LRI) Program-ing in Coq 19 / 27

66 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). 1 Use the Coq parser. 2 Typecheck Γ t : T and generate Γ? t Γ : T Γ ; 3 Interactive proving of obligations ; Program Definition f : T Γ := t Γ + obligations. M. Sozeau (LRI) Program-ing in Coq 19 / 27

67 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). 1 Use the Coq parser. 2 Typecheck Γ t : T and generate Γ? t Γ : T Γ ; 3 Interactive proving of obligations ; 4 Final definition. Definition f : T Γ := t Γ + obligations. M. Sozeau (LRI) Program-ing in Coq 19 / 27

68 The Program vernacular Architecture Wrap around Coq s vernacular commands (Definition, Fixpoint, Lemma,... ). 1 Use the Coq parser. 2 Typecheck Γ t : T and generate Γ? t Γ : T Γ ; 3 Interactive proving of obligations ; 4 Final definition. Restriction We assume Γ CCI T Γ : s. Definition f : T Γ := t Γ + obligations. M. Sozeau (LRI) Program-ing in Coq 19 / 27

69 Hello world: Euclidean division DEMO M. Sozeau (LRI) Program-ing in Coq 20 / 27

70 1 The idea A simple idea From PVS to Coq 2 Theoretical development Russell Interpretation in Coq Inductive types 3 Program Architecture Hello world Extensions 4 Conclusion M. Sozeau (LRI) Program-ing in Coq 21 / 27

71 Pattern-matching revisited Put logic into the terms. Let e : N: match e return T with S n t 1 0 t 2 end M. Sozeau (LRI) Program-ing in Coq 22 / 27

72 Pattern-matching revisited Put logic into the terms. Let e : N: match e as t return t = e T with S n fun (H : S n = e) t 1 0 fun (H : 0 = e) t 2 end (refl equal e) M. Sozeau (LRI) Program-ing in Coq 22 / 27

73 Pattern-matching revisited Put logic into the terms. Further refinements Each branch typed only once ; Let e : N: match e as t return t = e T with S (S n) fun (H : S (S n) = e) t 1 n fun (H : n = e) t 2 end (refl equal e) M. Sozeau (LRI) Program-ing in Coq 22 / 27

74 Pattern-matching revisited Put logic into the terms. Further refinements Each branch typed only once ; Let e : N: match e as t return t = e T with S (S n) fun (H : S (S n) = e) t 1 S 0 fun (H : S 0 = e) t 2 0 fun (H : 0 = e) t 2 end (refl equal e) M. Sozeau (LRI) Program-ing in Coq 22 / 27

75 Pattern-matching revisited Put logic into the terms. Further refinements Each branch typed only once ; Add inequalities for intersecting patterns ; Let e : N: match e as t return t = e T with S (S n) fun (H : S (S n) = e) t 1 n fun (H : n = e) let H : n, n S (S n ) in t 2 end (refl equal e) M. Sozeau (LRI) Program-ing in Coq 22 / 27

76 Pattern-matching revisited Put logic into the terms. Further refinements Each branch typed only once ; Add inequalities for intersecting patterns ; Generalized to dependent inductive types. Let e : vector n: match e return T with vnil t 1 vcons x n v t 2 end M. Sozeau (LRI) Program-ing in Coq 22 / 27

77 Pattern-matching revisited Put logic into the terms. Further refinements Each branch typed only once ; Add inequalities for intersecting patterns ; Generalized to dependent inductive types. Let e : vector n: match e as t in vector n return n = n t e T with vnil fun (H : 0 = n)(hv : vnil e) t 1 vcons x n v fun (H : S n = n)(hv : vcons x n v e) t 2 end(refl equal n)(jmeq refl e) M. Sozeau (LRI) Program-ing in Coq 22 / 27

78 Sugar Obligations Unresolved implicits ( ) are turned into obligations, à la refine. Bang! (False rect ) where False rect : A : Type, False A. It corresponds to ML s assert(false). match 0 with 0 0 n! end M. Sozeau (LRI) Program-ing in Coq 23 / 27

79 Sugar Obligations Unresolved implicits ( ) are turned into obligations, à la refine. Bang! (False rect ) where False rect : A : Type, False A. It corresponds to ML s assert(false). match 0 with 0 0 n! end Destruction Let let p := tin e match t with p e end. p can be an arbitrary pattern. M. Sozeau (LRI) Program-ing in Coq 23 / 27

80 Recursion Support for well-founded recursion and measures. Program Fixpoint f (a : N) {wf < a} : N := b. M. Sozeau (LRI) Program-ing in Coq 24 / 27

81 Recursion Support for well-founded recursion and measures. Program Fixpoint f (a : N) {wf < a} : N := b. a : N f : {x : N x < a} N b : N M. Sozeau (LRI) Program-ing in Coq 24 / 27

82 Safe Lists DEMO M. Sozeau (LRI) Program-ing in Coq 25 / 27

83 Conclusion Our contributions A more flexible programming language, (almost) conservative over Cic, integrated with the existing environment and a formal justification of Predicate subtyping. A tool to make programming in Coq using the full language possible, which can effectively be used for non-trivial developments. Ongoing and future work Reasoning support through tactics Implementation of proof-irrelevance in Coq s kernel Overloading support through a typeclass mechanism. M. Sozeau (LRI) Program-ing in Coq 26 / 27

84 The End sozeau/research/russell.en.html M. Sozeau (LRI) Program-ing in Coq 27 / 27

Programming with Dependent Types in Coq

Programming with Dependent Types in Coq Programming with Dependent Types in Coq Matthieu Sozeau LRI, Univ. Paris-Sud - Démons Team & INRIA Saclay - ProVal Project PPS Seminar February 26th 2009 Paris, France Coq A higher-order, polymorphic logic:

More information

Univalence for Free. Matthieu Sozeau Joint work with Nicolas Tabareau - INRIA. GT Types & Réalisabilité March 13th 2013

Univalence for Free. Matthieu Sozeau Joint work with Nicolas Tabareau - INRIA. GT Types & Réalisabilité March 13th 2013 Univalence for Free Matthieu Sozeau Joint work with Nicolas Tabareau - INRIA Project Team πr 2 INRIA Rocquencourt & PPS, Paris 7 University GT Types & Réalisabilité March 13th 2013 Univalence for Free

More information

A New Look at Generalized Rewriting in Type Theory

A New Look at Generalized Rewriting in Type Theory A New Look at Generalized Rewriting in Type Theory Matthieu Sozeau Harvard University 1st Coq Workshop August 21th 2009 Munich, Germany Generalized Rewriting Equational reasoning x = y - x + 1 ==> y +

More information

A New Look At Generalized Rewriting in Type Theory

A New Look At Generalized Rewriting in Type Theory A New Look At Generalized Rewriting in Type Theory Matthieu Sozeau Harvard University TYPES 09 May 13th 2009 Aussois, France Generalized Rewriting Equational reasoning x = y - x + 1 ==> y + 1 Logical reasoning

More information

Interactive Theorem Provers

Interactive Theorem Provers Interactive Theorem Provers from the perspective of Isabelle/Isar Makarius Wenzel Univ. Paris-Sud, LRI July 2014 = Isabelle λ β Isar α 1 Introduction Notable ITP systems LISP based: ACL2 http://www.cs.utexas.edu/users/moore/acl2

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

Modeling Ontological Structures with Type Classes in Coq

Modeling Ontological Structures with Type Classes in Coq Modeling Ontological Structures with Type Classes in Coq Richard Dapoigny 1 Patrick Barlatier 1 1 LISTIC/Polytech Savoie University of Savoie, Annecy, (FRANCE) Cite as: Dapoigny, R., Barlatier, P. Modeling

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

Computer Algebra in Coq using reflection

Computer Algebra in Coq using reflection , 2 Computer Algebra in using reflection INRIA, team Marelle and Éducation Nationale 26-07-2012 Automatization in proof assistants, 2 From Computer Algebra Systems to Proof Assistants : certified computations.

More information

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods NICTA Advanced Course Theorem Proving Principles, Techniques, Applications Gerwin Klein Formal Methods 1 ORGANISATORIALS When Mon 14:00 15:30 Wed 10:30 12:00 7 weeks ends Mon, 20.9.2004 Exceptions Mon

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

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

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

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

Programming Languages Fall 2013

Programming Languages Fall 2013 Programming Languages Fall 2013 Lecture 11: Subtyping Prof Liang Huang huang@qccscunyedu Big Picture Part I: Fundamentals Functional Programming and Basic Haskell Proof by Induction and Structural Induction

More information

Classical First-Order Logic

Classical First-Order Logic Classical 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) First-Order Logic (Classical) MFES 2008/09

More information

Programming Languages and Types

Programming Languages and Types Programming Languages and Types Klaus Ostermann based on slides by Benjamin C. Pierce Subtyping Motivation With our usual typing rule for applications the term is not well typed. ` t 1 : T 11!T 12 ` t

More information

Universe Polymorphism in Coq

Universe Polymorphism in Coq Universe Polymorphism in Coq Matthieu Sozeau 1,2 and Nicolas Tabareau 1,3 1 Inria πr 2 and Ascola teams 2 PPS, Univ Paris Diderot 3 Laboratoire d Informatique de Nantes Altantique (LINA) firstname.surname@inria.fr

More information

Programming with Higher Inductive Types

Programming with Higher Inductive Types 1/32 Programming with Higher Inductive Types Herman Geuvers joint work with Niels van der Weide, Henning Basold, Dan Frumin, Leon Gondelman Radboud University Nijmegen, The Netherlands November 17, 2017

More information

Automating Interactive Theorem Proving with Coq and Ltac. by Oron Propp and Alex Sekula Mentored by Drew Haven PRIMES

Automating Interactive Theorem Proving with Coq and Ltac. by Oron Propp and Alex Sekula Mentored by Drew Haven PRIMES Automating Interactive Theorem Proving with Coq and Ltac by Oron Propp and Alex Sekula Mentored by Drew Haven PRIMES Motivation Math is usually written by hand, checked by other mathematicians Verifying

More information

Cylindrical Algebraic Decomposition in Coq

Cylindrical Algebraic Decomposition in Coq Cylindrical Algebraic Decomposition in Coq MAP 2010 - Logroño 13-16 November 2010 Assia Mahboubi INRIA Microsoft Research Joint Centre (France) INRIA Saclay Île-de-France École Polytechnique, Palaiseau

More information

Recursion and Intro to Coq

Recursion and Intro to Coq L02-1 Recursion and Intro to Coq Armando Solar Lezama Computer Science and Artificial Intelligence Laboratory M.I.T. With content from Arvind and Adam Chlipala. Used with permission. September 21, 2015

More information

An Introduction to Proof Assistants

An Introduction to Proof Assistants An Introduction to Proof Assistants Patrick Schnider Student Seminar in Combinatorics: Mathematical Software, ETH Zürich 1 Motivation The development of proof assistants was motivated by the use of computers

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

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

Gerwin Klein, June Andronick, Ramana Kumar S2/2016

Gerwin Klein, June Andronick, Ramana Kumar S2/2016 COMP4161: Advanced Topics in Software Verification {} Gerwin Klein, June Andronick, Ramana Kumar S2/2016 data61.csiro.au Content Intro & motivation, getting started [1] Foundations & Principles Lambda

More information

The Locally Nameless Representation

The Locally Nameless Representation Noname manuscript No. (will be inserted by the editor) The Locally Nameless Representation Arthur Charguéraud Received: date / Accepted: date Abstract This paper provides an introduction to the locally

More information

Nunchaku: Flexible Model Finding for Higher-Order Logic

Nunchaku: Flexible Model Finding for Higher-Order Logic Nunchaku: Flexible Model Finding for Higher-Order Logic Simon Cruanes, Jasmin Blanchette, Andrew Reynolds Veridis, Inria Nancy https://cedeela.fr/~simon/ April 7th, 2016 1 / 21 Summary Introduction Nunchaku

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

The Formal Proof Susan Gillmor and Samantha Rabinowicz Project for MA341: Appreciation of Number Theory Boston University Summer Term

The Formal Proof Susan Gillmor and Samantha Rabinowicz Project for MA341: Appreciation of Number Theory Boston University Summer Term The Formal Proof Susan Gillmor and Samantha Rabinowicz Project for MA341: Appreciation of Number Theory Boston University Summer Term 1 2009 Instructor: Kalin Kostadinov The Formal Proof 2 A proof verifies

More information

Formalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl)

Formalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl) Formalising the Completeness Theorem of Classical Propositional Logic in Agda (Proof Pearl) Leran Cai, Ambrus Kaposi, and Thorsten Altenkirch University of Nottingham {psylc5, psxak8, psztxa}@nottingham.ac.uk

More information

The Coq Proof Assistant

The Coq Proof Assistant The Coq Proof Assistant Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan October 15, 2018 Bow-Yaw Wang (Academia Sinica) The Coq Proof Assistant October 15, 2018 1 / 59 Outline 1 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

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification

λ Slide 1 Content Exercises from last time λ-calculus COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Content COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ Slide 1 Intro & motivation, getting started [1] Foundations & Principles Lambda

More information

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions Chapter 1 Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions 1.1 The IMP Language IMP is a programming language with an extensible syntax that was developed in the late 1960s. We will

More information

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

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Iris: Higher-Order Concurrent Separation Logic. Lecture 6: Case Study: foldr

Iris: Higher-Order Concurrent Separation Logic. Lecture 6: Case Study: foldr 1 Iris: Higher-Order Concurrent Separation Logic Lecture 6: Case Study: foldr Lars Birkedal Aarhus University, Denmark November 10, 2017 2 Overview Earlier: Operational Semantics of λ ref,conc e, (h, e)

More information

A Machine Checked Model of Idempotent MGU Axioms For a List of Equational Constraints

A Machine Checked Model of Idempotent MGU Axioms For a List of Equational Constraints A Machine Checked Model of Idempotent MGU Axioms For a List of Equational Constraints Sunil Kothari, James Caldwell Department of Computer Science, University of Wyoming, USA Machine checked proofs of

More information

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

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

Chapter 2. Assertions. An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011 Chapter 2 An Introduction to Separation Logic c 2011 John C. Reynolds February 3, 2011 Assertions In this chapter, we give a more detailed exposition of the assertions of separation logic: their meaning,

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

Cylindrical Algebraic Decomposition in Coq

Cylindrical Algebraic Decomposition in Coq Cylindrical Algebraic Decomposition in Coq MAP 2010 - Logroño 13-16 November 2010 Assia Mahboubi INRIA Microsoft Research Joint Centre (France) INRIA Saclay Île-de-France École Polytechnique, Palaiseau

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

Local Representations of Binding

Local Representations of Binding Local Representations of Binding Randy Pollack LFCS, University of Edinburgh Joint work with James McKinna, Christian Urban, Arthur Charguéraud, Brian Aydemir, Benjamin Pierce, Stephanie Weirich Version

More information

Software Engineering

Software Engineering Software Engineering Lecture 07: Design by Contract Peter Thiemann University of Freiburg, Germany 02.06.2014 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

A Canonical 1 Locally Named Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh

A Canonical 1 Locally Named Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh A Canonical 1 Locally Named Representation of Binding Randy Pollack LFCS, University of Edinburgh Masahiko Sato Graduate School of Informatics, Kyoto University Version of September 3, 2009 1 α -equivalence

More information

Church and Curry: Combining Intrinsic and Extrinsic Typing

Church and Curry: Combining Intrinsic and Extrinsic Typing 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,

More information

Representations of Boolean Functions in Constructive Type Theory

Representations of Boolean Functions in Constructive Type Theory Saarland University Faculty of Natural Sciences and Technology I Department of Computer Science Bachelor s Program in Computer Science Bachelor s Thesis Representations of Boolean Functions in Constructive

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

Γ is usually left implicit: ϕ

Γ is usually left implicit: ϕ Types Summer School Gothenburg Sweden August 2005 Type Systems Herman Geuvers Radboud University Nijmegen, NL Lecture 2: Higher Order Logic and Type Theory The original motivation of Church to introduce

More information

logical verification lecture program extraction and prop2

logical verification lecture program extraction and prop2 logical verification lecture 7 2017-05-04 program extraction and prop2 overview program extraction program extraction: examples verified programs: alternative approach formulas of prop2 terminology proofs

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2009/2010 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2009/10

More information

What is a Proof? Jean Gallier and Kurt W.A.J.H.Y. Reillag CIS, Upenn and Hospices de Beaune. Friday, February 22, 13

What is a Proof? Jean Gallier and Kurt W.A.J.H.Y. Reillag CIS, Upenn and Hospices de Beaune. Friday, February 22, 13 What is a Proof? Jean Gallier and Kurt W.A.J.H.Y. Reillag CIS, Upenn and Hospices de Beaune Reillag s office Another office After a bad proof! Finally, some peace! Quick History Quick History Formalizing

More information

INF3170 Logikk Spring Homework #8 For Friday, March 18

INF3170 Logikk Spring Homework #8 For Friday, March 18 INF3170 Logikk Spring 2011 Homework #8 For Friday, March 18 Problems 2 6 have to do with a more explicit proof of the restricted version of the completeness theorem: if = ϕ, then ϕ. Note that, other than

More information

Structural Foundations for Abstract Mathematics

Structural Foundations for Abstract Mathematics May 5, 2013 What no foundation can give us: Certainty What foundations need not give us: Ontological reduction What set theory gives us: Common language in which all mathematics can be encoded:,,,... Dispute

More information

LF P A Logical Framework with External Predicates

LF P A Logical Framework with External Predicates LF P A Logical Framework with External Predicates Petar Maksimović in collaboration with Furio Honsell, Marina Lenisa, Luigi Liquori, and Ivan Scagnetto Mathematical Institute of the Serbian Academy of

More information

Limitations of OCAML records

Limitations of OCAML records Limitations of OCAML records The record types must be declared before they are used; a label e can belong to only one record type (otherwise fun x x.e) would have several incompatible types; we cannot

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

Typed Arithmetic Expressions

Typed Arithmetic Expressions Typed Arithmetic Expressions CS 550 Programming Languages Jeremy Johnson TAPL Chapters 3 and 5 1 Types and Safety Evaluation rules provide operational semantics for programming languages. The rules provide

More information

Coinductive big-step operational semantics

Coinductive big-step operational semantics Coinductive big-step operational semantics Xavier Leroy a, Hervé Grall b a INRIA Paris-Rocquencourt Domaine de Voluceau, B.P. 105, 78153 Le Chesnay, France b École des Mines de Nantes La Chantrerie, 4,

More information

hal , version 1-21 Oct 2009

hal , version 1-21 Oct 2009 ON SKOLEMISING ZERMELO S SET THEORY ALEXANDRE MIQUEL Abstract. We give a Skolemised presentation of Zermelo s set theory (with notations for comprehension, powerset, etc.) and show that this presentation

More information

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate

More information

Equational Reasoning in Algebraic Structures: a Complete Tactic

Equational Reasoning in Algebraic Structures: a Complete Tactic Equational Reasoning in Algebraic Structures: a Complete Tactic Luís Cruz-Filipe 1,2 and Freek Wiedijk 1 1 NIII, University of Nijmegen, Netherlands and 2 CLC, Lisbon, Portugal Abstract We present rational,

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

On Modal Logics of Partial Recursive Functions

On Modal Logics of Partial Recursive Functions arxiv:cs/0407031v1 [cs.lo] 12 Jul 2004 On Modal Logics of Partial Recursive Functions Pavel Naumov Computer Science Pennsylvania State University Middletown, PA 17057 naumov@psu.edu June 14, 2018 Abstract

More information

Proofs of randomized algorithms in Coq

Proofs of randomized algorithms in Coq Proofs of randomized algorithms in Coq Philippe Audebaud LIP - ENS Lyon 46, allée d Italie - 69437 Lyon - France Christine Paulin-Mohring INRIA Futurs, ProVal - Parc Orsay Université - F-91893 LRI, Univ

More information

Safety Analysis versus Type Inference for Partial Types

Safety Analysis versus Type Inference for Partial Types Safety Analysis versus Type Inference for Partial Types Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department, Aarhus University Ny Munkegade, DK-8000

More information

Structuring the verification of heap-manipulating programs

Structuring the verification of heap-manipulating programs Structuring the verification of heap-manipulating programs Aleksandar Nanevski (IMDEA Madrid) Viktor Vafeiadis (MSR / Univ. of Cambridge) Josh Berdine (MSR Cambridge) Hoare/Separation Logic Hoare logic

More information

The TLA + proof system

The TLA + proof system The TLA + proof system Stephan Merz Kaustuv Chaudhuri, Damien Doligez, Leslie Lamport INRIA Nancy & INRIA-MSR Joint Centre, France Amir Pnueli Memorial Symposium New York University, May 8, 2010 Stephan

More information

Logical Preliminaries

Logical Preliminaries Logical Preliminaries Johannes C. Flieger Scheme UK March 2003 Abstract Survey of intuitionistic and classical propositional logic; introduction to the computational interpretation of intuitionistic logic

More information

Computer-Checked Meta-Logic

Computer-Checked Meta-Logic 1 PART Seminar 25 February 2015 Computer-Checked Meta-Logic Jørgen Villadsen jovi@dtu.dk Abstract Over the past decades there have been several impressive results in computer-checked meta-logic, including

More information

Propositions and Proofs

Propositions and Proofs Propositions and Proofs Gert Smolka, Saarland University April 25, 2018 Proposition are logical statements whose truth or falsity can be established with proofs. Coq s type theory provides us with a language

More information

Full reduction in the face of absurdity

Full reduction in the face of absurdity Full reduction in the face of absurdity Gabriel Scherer 1 and Didier Rémy 1 INRIA, {gabriel.scherer,didier.remy}@inria.fr Abstract. Core calculi that model the essence of computations use full reduction

More information

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

Rules and derivations in an elementary logic course arxiv: v1 [cs.lo] 7 Jan 2016 Rules and derivations in an elementary logic course arxiv:160101483v1 [cslo] 7 Jan 2016 Gilles Dowek Inria, 23 avenue d Italie, CS 81321, 75214 Paris Cedex 13, France gillesdowek@inriafr When teaching

More information

Write your own Theorem Prover

Write your own Theorem Prover Write your own Theorem Prover Phil Scott 27 October 2016 Phil Scott Write your own Theorem Prover 27 October 2016 1 / 31 Introduction We ll work through a toy LCF style theorem prover for classical propositional

More information

Ordinal Strength of Logic-Enriched Type Theories

Ordinal Strength of Logic-Enriched Type Theories Ordinal Strength of Logic-Enriched Type Theories Robin Adams Royal Holloway, University of London 27 March 2012 Robin Adams (RHUL) Ordinal Strength of LTTs 27 March 2012 1 / 27 Introduction Type theories

More information

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Computation Tree Logic (CTL) & Basic Model Checking Algorithms Computation Tree Logic (CTL) & Basic Model Checking Algorithms Martin Fränzle Carl von Ossietzky Universität Dpt. of Computing Science Res. Grp. Hybride Systeme Oldenburg, Germany 02917: CTL & Model Checking

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

ArgoCaLyPso SAT-Inspired Coherent Logic Prover

ArgoCaLyPso SAT-Inspired Coherent Logic Prover ArgoCaLyPso SAT-Inspired Coherent Logic Prover Mladen Nikolić and Predrag Janičić Automated Reasoning GrOup (ARGO) Faculty of Mathematics University of, February, 2011. Motivation Coherent logic (CL) (also

More information

Formal Logic and Deduction Systems

Formal Logic and Deduction Systems Formal Logic and Deduction Systems Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Formal Logic and Deduction Systems MFES

More information

higher-order logic (e:g:, Church's simple theory of types [5]) P must be a simple type. Although CC types include the types of the simply-typed -calcu

higher-order logic (e:g:, Church's simple theory of types [5]) P must be a simple type. Although CC types include the types of the simply-typed -calcu The Calculus of Constructions as a Framework for Proof Search with Set Variable Instantiation Amy Felty Bell Laboratories Lucent Technologies, 700 Mountain Ave., Murray Hill, NJ 07974, USA felty@bell-labs.com

More information

Inductive types and identity types

Inductive types and identity types 1 / 49 Inductive types and identity types Michael Shulman February 7, 2012 3 / 49 Type constructors For every type constructor, we have rules for: 1 Constructing types 2 Constructing terms in those types

More information

CS411 Notes 3 Induction and Recursion

CS411 Notes 3 Induction and Recursion CS411 Notes 3 Induction and Recursion A. Demers 5 Feb 2001 These notes present inductive techniques for defining sets and subsets, for defining functions over sets, and for proving that a property holds

More information

AN INTRODUCTION TO SEPARATION LOGIC. 2. Assertions

AN INTRODUCTION TO SEPARATION LOGIC. 2. Assertions AN INTRODUCTION TO SEPARATION LOGIC 2. Assertions John C. Reynolds Carnegie Mellon University January 7, 2011 c 2011 John C. Reynolds Pure Assertions An assertion p is pure iff, for all stores s and all

More information

Chapter 11: Automated Proof Systems (1)

Chapter 11: Automated Proof Systems (1) Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems

More information

Formal Techniques for Software Engineering: Denotational Semantics

Formal Techniques for Software Engineering: Denotational Semantics Formal Techniques for Software Engineering: Denotational Semantics Rocco De Nicola IMT Institute for Advanced Studies, Lucca rocco.denicola@imtlucca.it May 2013 Lesson 4 R. De Nicola (IMT-Lucca) FoTSE@LMU

More information

ILP = Logic, CS, ML Stop counting, start reasoning

ILP = Logic, CS, ML Stop counting, start reasoning ILP = Logic, CS, ML Stop counting, start reasoning Gilles Richard AOC team The story so far Several actors K. Brouwer K. Godel J. Herbrand A. Colmerauer R. Kowalski S. Muggleton L. Brouwer (1881-1966)

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

A Principled approach to Ornamentation in ML

A Principled approach to Ornamentation in ML 0 0 A Principled approach to Ornamentation in ML THOMAS WILLIAMS, Inria DIDIER RÉMY, Inria Ornaments are a way to describe changes in datatype definitions reorganizing, adding, or dropping some pieces

More information

Proof assistants as a tool for thought

Proof assistants as a tool for thought Proof assistants as a tool for thought Katherine Ye @hypotext Tools for thought workshop, March 16 circa 1700 Disputants unable to agree would not waste much time in futile argument... Leibniz (Harrison)

More information

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

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

More information

Normalisation by Evaluation for Dependent Types

Normalisation by Evaluation for Dependent Types Normalisation by Evaluation for Dependent Types Ambrus Kaposi Eötvös Loránd University, Budapest, Hungary (j.w.w. Thorsten Altenkirch, University of Nottingham) FSCD, Porto 24 June 2016 Introduction Goal:

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

Introduction to type theory and homotopy theory

Introduction to type theory and homotopy theory Introduction to type theory and homotopy theory Michael Shulman January 24, 2012 1 / 47 Homotopy theory Homotopy type theory types have a homotopy theory Intensional type theory New perspectives on extensional

More information

1 / A bird s-eye view of type theory. 2 A bird s-eye view of homotopy theory. 3 Path spaces and identity types. 4 Homotopy type theory

1 / A bird s-eye view of type theory. 2 A bird s-eye view of homotopy theory. 3 Path spaces and identity types. 4 Homotopy type theory Introduction to type theory and homotopy theory Michael Shulman January 24, 2012 Homotopy theory Homotopy type theory types have a homotopy theory New perspectives on extensional vs. intensional Intensional

More information

The L Machines are very high-level, in two senses:

The L Machines are very high-level, in two senses: What is a Computer? State of the machine. CMPSCI 630: Programming Languages An Abstract Machine for Control Spring 2009 (with thanks to Robert Harper) Internal registers, memory, etc. Initial and final

More information

The equivalence axiom and univalent models of type theory.

The equivalence axiom and univalent models of type theory. The equivalence axiom and univalent models of type theory. (Talk at CMU on February 4, 2010) By Vladimir Voevodsky Abstract I will show how to define, in any type system with dependent sums, products and

More information

A Canonical 1 Local Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh

A Canonical 1 Local Representation of Binding. α -equivalence is identity. Randy Pollack. Masahiko Sato. LFCS, University of Edinburgh A Canonical 1 Local Representation of Binding Randy Pollack LFCS, University of Edinburgh Masahiko Sato Graduate School of Informatics, Kyoto University Version of May 12, 2009 1 α -equivalence is identity

More information

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007 Dynamic Noninterference Analysis Using Context Sensitive Static Analyses Gurvan Le Guernic July 14, 2007 1 Abstract This report proposes a dynamic noninterference analysis for sequential programs. This

More information