Introduction to λ-calculus
|
|
- Frederica Cain
- 5 years ago
- Views:
Transcription
1 p.1/65 Introduction to λ-calculus Ken-etsu FUJITA fujita/ Department of Computer Science Gunma University
2 :Church 32, 36, 40; Curry Universal Language Martin-Löf s Type Thoery 2. Entscheidungsproblem Turing Machine, recursive function, D 3. Abstract Prog. Lang. (Lisp, ML, etc.) 4. Logical Framework (PTS) Curry-Howard p.2/65
3 p.3/65 Church 41: The Calculi of Lambda-Conversion Underlying the formal calculi which we shall develop is the concept of a function, A function is a rule of correspondence by which when anything is given (as argument) another thing (the value of the function for that argument) may be obtained. That is, a function is an operation......
4 Church 41: The Calculi of Lambda-Conversion Underlying the formal calculi which we shall develop is the concept of a function, A function is a rule of correspondence by which when anything is given (as argument) another thing (the value of the function for that argument) may be obtained. That is, a function is an operation In particular it is not excluded that one of the elements of the range of arguments of a function f should be the function f itself. This possibility has frequently been denied, Here, however, we regard the operation or rule of correspondence, which constitutes the function, as being first given, and p.4/65
5 p.5/65 Barendregt 81: The Lambda Calculus The lambda calculus is a type free theory about functions as rule, rather than a graphs. Functions as rules is the old fashioned notion of function and refers to the process of going from argument to value, a process coded by a definition. the λ-calculus regards functions again as rules in order to stress their computational aspects. The functions as rules are considered in full generality.
6 Barendregt 81: The Lambda Calculus The lambda calculus is a type free theory about functions as rule, rather than a graphs. Functions as rules is the old fashioned notion of function and refers to the process of going from argument to value, a process coded by a definition. the λ-calculus regards functions again as rules in order to stress their computational aspects. The functions as rules are considered in full generality. This is the starting point of the type free λ-calcuus. In particular a function can be applied to itself. For the usual notion of function in mathematics (as in ZF set theory), this is impossible (because of the axiom of foundation). p.6/65
7 p.7/65 λ (λ-abstraction, Application) x + 1 x f : x x + 1
8 p.8/65 λ (λ-abstraction, Application) x + 1 x f : x x + 1 λ f = λx.(x + 1)
9 λ (λ-abstraction, Application) x + 1 x f : x x + 1 λ f = λx.(x + 1) λ λx.m N M x N M[x := N] (λx.(x + 1))(0) p.9/65 f(0) = (λx.(x + 1))(0) = 0 + 1
10 p.10/65 Curry (Schönfinkel) (x,y) f(x,y)
11 p.11/65 Curry (Schönfinkel) (x,y) f(x,y) 1 ( ) f = λx.λy.f(x,y)
12 p.12/65 Curry (Schönfinkel) (x,y) f(x,y) 1 ( ) f = λx.λy.f(x,y) (f )(a) = (λx.λy.f(x,y))(a) = λy.f(a,y) (f (a))(b) = (λy.f(a,y))(b) = f(a,b)
13 p.13/65 λ (Var, Abst, App) Def. (λ-terms Λ) 1. x 0,x 1,... λ 2. M N λ (MN) λ 3. M λ x (λx.m) λ Λ M ::= x (MM) (λx.m)
14 λ (Var, Abst, App) Def. (λ-terms Λ) 1. x 0,x 1,... λ 2. M N λ (MN) λ 3. M λ x (λx.m) λ Λ M ::= x (MM) (λx.m) (λx.x) (λx.((x y) z)) (x(λx.(λy.(λz.z)))) application λx.x λy.y λx.xyz x(λx.λy.λz.z) M N λ abstraction λx.m p.14/65
15 p.15/65 Examples λy.y(y x) x 2 (λy.y(y x))f = f(f x) λ f λf.λx.f(f x), λf.λx.f(f(f x)) 2 3
16 p.16/65 Examples λy.y(y x) x 2 (λy.y(y x))f = f(f x) λ f λf.λx.f(f x), λf.λx.f(f(f x)) 2 3 (β-contraction, β-reduction) (λy.y(y x))f β (y(y x))[y := f] f(f x)
17 p.17/65 β β-reduction β Def. (β ( β ))1-1. (λx.m)n β M[x := N] 1-2. M β N λx.m β λx.n M β N MP β NP M β N PM β PN
18 p.18/65 β β-reduction β Def. (β ( β ))1-1. (λx.m)n β M[x := N] 1-2. M β N λx.m β λx.n M β N MP β NP M β N PM β PN 2. β def = β
19 β β-reduction β Def. (β ( β ))1-1. (λx.m)n β M[x := N] 1-2. M β N λx.m β λx.n M β N MP β NP M β N PM β PN 2. β def = β (λy.y(yx))n β (λy.x)n β (λx.(λy.yx)z)v β β (λx.xxy)(λx.xxy) β (y(yx))[y := N] N(Nx) x[y := N] x (λy.yv)z zv (λx.xxy)(λx.xxy)y... etc. p.19/65
20 p.20/65 β β-normal form Def. (β (β-nf)) (λx.m)n (β-redex)
21 p.21/65 β β-normal form Def. (β (β-nf)) (λx.m)n (β-redex) 1. zv is β-nf of (λx.(λy.yx)z)v 2. L (λx.xxy)(λx.xxy) has no β-nf L β Ly β Lyy β...
22 β β-normal form Def. (β (β-nf)) (λx.m)n (β-redex) 1. zv is β-nf of (λx.(λy.yx)z)v 2. L (λx.xxy)(λx.xxy) has no β-nf L β Ly β Lyy β β (λu.v)l β v (λu.v)l β (λu.v)(ly) β (λx.(λy.yx)z)v β (λy.yv)z β zv (λx.(λy.yx)z)v β (λx.zx)v β zv p.22/65
23 p.23/65 Church-Rosser Thm. (Church-Rosser Theorem for β ) P β M and P β N = T Λ. M β T and N β T
24 p.24/65 Church-Rosser Thm. (Church-Rosser Theorem for β ) P β M and P β N = T Λ. M β T and N β T Cor. (Uniqueness of β-nf if exists) P has β-nfs M and N = M N
25 Church-Rosser Thm. (Church-Rosser Theorem for β ) P β M and P β N = T Λ. M β T and N β T Cor. (Uniqueness of β-nf if exists) P has β-nfs M and N = M N Lem. (β-nf) 1. atom β-nf 2. M1,...,M n β-nf x Atom xm 1...M n β-nf M β-nf λx.m β-nf λx 1.λx 2...λx n.xm 1 M 2...M m β-nf for M i β-nf λx 1.λx 2...λx n.xm 1 M 2...M m HNF, Solvable p.25/65
26 p.26/65 β-equal β-convertible Def. (β-equal (= β )) P 0,...,P n (n 0). P = β Q def = 1. P 0 P 2. i (n 1). P i β P i+1 or P i+1 β P i 3. P n Q
27 p.27/65 β-equal Church-Rosser Def. (β-equal (= β )) P 0,...,P n (n 0). P = β Q def = 1. P 0 P 2. i (n 1). P i β P i+1 or P i+1 β P i 3. P n Q Thm. (Church-Rosser for = β ) P = β Q = T Λ. P β T and Q β T
28 β-equal Church-Rosser Def. (β-equal (= β )) P 0,...,P n (n 0). P = β Q def = 1. P 0 P 2. i (n 1). P i β P i+1 or P i+1 β P i 3. P n Q Thm. (Church-Rosser for = β ) P = β Q = T Λ. P β T and Q β T By induction on the number n IH: T n Λ. P β T n and P n β T n Show: P = β P n+1 = T n+1 Λ. P β T n+1 P n+1 β T n+1 Take T n+1 T n or T n+1 T from C-R for β p.28/65
29 p.29/65 Thm. (Fixed point theorem) M Λ. X Λ. MX = β X
30 p.30/65 Thm. (Fixed point theorem) M Λ. X Λ. MX = β X Let X Y M, where Y λf.(λx.f(xx))(λx.f(xx)). Then Y M = β (λx.m(xx))(λx.m(xx)) = β M((λx.M(xx))(λx.M(xx))) = β M(Y M)
31 p.31/65 Thm. (Fixed point theorem) M Λ. X Λ. MX = β X Let X Y M, where Y λf.(λx.f(xx))(λx.f(xx)). Then Y M = β (λx.m(xx))(λx.m(xx)) = β M((λx.M(xx))(λx.M(xx))) = β M(Y M) CF. Y Turing (λx.λf.f(xxf))(λx.λf.f(xxf)) Y Turing M β M(Y TuringM)
32 p.32/65 Functional Programming (1/4) t λx.λy.x, f λx.λy.y And λx.λy.xyf, Or λx.λy.xty, Not λx.xft And t B β B, Or f B β B, Not(And P Q) = β Or(Not P)(Not Q) if B then P else Q BPQ
33 Functional Programming (1/4) t λx.λy.x, f λx.λy.y And λx.λy.xyf, Or λx.λy.xty, Not λx.xft And t B β B, Or f B β B, Not(And P Q) = β Or(Not P)(Not Q) if B then P else Q BPQ M,N λx.xmn fst λx.xt, snd λx.xf fst M,N β M, M 1,M 2,...,M n snd M,N β N M 1, for n = 1 M 1, M 2,...,M n, for n > 1 p.33/65
34 p.34/65 (2/4) n f,f,...,f,i, where I λx.x }{{} n 0 I I, 1 f,i, 2 f,f,i, n +1 f,n
35 p.35/65 (2/4) n f,f,...,f,i, where I λx.x }{{} n 0 I I, 1 f,i, 2 f,f,i, n +1 f,n succ λx. f,x succ n β f,n n +1 pred λx.xf pred 0 β f, pred (n +1) β n IsZero λx.xt IsZero 0 β t, IsZero (n +1) β f n β-nf
36 p.36/65 λ-definable (3/4) Def. (λ (λ-definable)) λ G g λ = g : N k N λ G n, for g(n Gn 1... n k 1,...,n k ) = n β unsolvable, for g(n 1,...,n k ) undefined g λ def
37 p.37/65 λ-definable (3/4) Def. (λ (λ-definable)) λ G g λ = g : N k N λ G n, for g(n Gn 1... n k 1,...,n k ) = n β unsolvable, for g(n 1,...,n k ) undefined g λ Thm. (recursive λ-definable) g : N k N is a recursive function iff g is λ-definable def
38 p.38/65 (4/4) g(x, 0) = h(x) g(x,y + 1) = f(x,y,g(x,y)) m (λ ) m
39 p.38/65 (4/4) g(x, 0) = h(x) g(x,y + 1) = f(x,y,g(x,y)) m (λ ) m h,f λ H,F H m β h(m), F m n k β f(m,n,k)
40 p.39/65 (4/4) g(x, 0) = h(x) g(x,y + 1) = f(x,y,g(x,y)) m (λ ) m h,f λ H,F H m β h(m), F m n k β f(m,n,k) g λ G G x y β if (IsZero y)then (H x)else (F x (predy) (G x (predy)))
41 p.40/65 (4/4) g(x, 0) = h(x) g(x,y + 1) = f(x,y,g(x,y)) m (λ ) m h,f λ H,F H m β h(m), F m n k β f(m,n,k) g λ G G x y β if (IsZero y)then (H x)else (F x (predy) (G x (predy))) λ G M Y M
42 (4/4) g(x, 0) = h(x) g(x,y + 1) = f(x,y,g(x,y)) m (λ ) m h,f λ H,F H m β h(m), F m n k β f(m,n,k) g λ G G x y β if (IsZero y)then (H x)else (F x (predy) (G x (predy))) λ G M Y M M λg.λx.λy.if (IsZero y)then (H x)else (F x (predy) (g x (predy))) G Y Turing M β MG p.41/65
43 Types length : List(N) N [0,1] : List(N) length [0,1] : N ( ) member : N List(N) B Well-typed member 0 [1, 2, 3] plus : N N N, plus : R R R Curry-Howard Formulae-as-Types, Proofs-as-Programs A B B A ( E) f : A B fa : B a : A (app) p.42/65
44 p.43/65 λ Simply typed λ-calculus Def. ( (Types)) A ::= α (A A) (α α) α α (α (β α)) α β α ((α (β γ)) ((α β) (α γ))) (α β γ) (α β) α γ
45 p.44/65 λ Simply typed λ-calculus Def. ( (Types)) A ::= α (A A) (α α) α α (α (β α)) α β α ((α (β γ)) ((α β) (α γ))) (α β γ) (α β) α γ Def. ( (Terms)) à la Church M ::= x (λx:a.m) (MM) CF. à la Curry
46 p.45/65 λ Simply typed λ-calculus Def. ( (Types)) A ::= α (A A) (α α) α α (α (β α)) α β α ((α (β γ)) ((α β) (α γ))) (α β γ) (α β) α γ Def. ( (Terms)) à la Church Def. ( (Context)) M ::= x (λx:a.m) (MM) Γ ::= x 1 :A 1,x 2 :A 2,...,x n :A n
47 p.46/65 λ Derivation rules Def. ( Γ M : A) x:a Γ Γ x : A Γ,x:A M : B Γ λx:a.m : A B Γ M : A B Γ N : A Γ MN : B
48 p.47/65 λ Derivation rules Def. ( Γ M : A) x:a Γ Γ x : A Γ,x:A M : B Γ λx:a.m : A B Γ M : A B Γ N : A Γ MN : B x:a x : A λx:a.x : A A x:a,y:b x : A x:a λy:b.x : B A λx:a.λy:b.x : A B A
49 p.48/65 λ Derivation rules Def. ( Γ M : A) x:a Γ Γ x : A Γ,x:A M : B Γ λx:a.m : A B Γ M : A B Γ N : A Γ MN : B x:a x : A λx:a.x : A A x:a,y:b x : A x:a λy:b.x : B A λx:a.λy:b.x : A B A λx:a.x has type A A A B A is inhabited by λx:a.λy:b.x (A A) A is not inhabited
50 p.49/65 Static Properties Type checking problem Given Γ, M, and A, does one have Γ M : A? Typability problem Given Γ and M, does there exists Γ M :? Inhabitation problem Given A, does there eixists closed? : A
51 p.50/65 Static Properties, Formulae-as-Types (1/2) Type checking problem Given Γ, M, and A, does one have Γ M : A? Typability problem Given Γ and M, does there exists Γ M :? Inhabitation problem Given A, does there eixists closed? : A x 1 :A 1,...,x n :A n M : A 1. M is a program of output-type A from input-types A 1,...,A n 2. M is a proof of formula A from assumptions A 1,...,A n
52 p.51/65 Static Properties, Formulae-as-Types (2/2) Type checking problem = Is M a proof of A under Γ? Given Γ, M, and A, does one have Γ M : A? Typability problem = Find a formula with proof M Given Γ and M, does there exists Γ M :? Inhabitation problem = Find a proof of formula A Given A, does there eixists closed? : A x 1 :A 1,...,x n :A n M : A 1. M is a program of output-type A from input-types A 1,...,A n 2. M is a proof of formula A from assumptions A 1,...,A n
53 p.52/65 Examples: Formulae-as-Types λx:a B C.λy:A B.λz:A.xz(yz) : (A B C) (A B) A C
54 p.53/65 Examples: Formulae-as-Types λx:a B C.λy:A B.λz:A.xz(yz) : (A B C) (A B) A C [A B C] [A] [A B] [A] ( E) ( E) B C B ( E) C ( I) A C ( I) (A B) A C ( I) (A B C) (A B) A C
55 Examples: Formulae-as-Types λx:a B C.λy:A B.λz:A.xz(yz) : (A B C) (A B) A C [A B C] [A] [A B] [A] ( E) ( E) B C B ( E) C ( I) A C ( I) (A B) A C ( I) (A B C) (A B) A C [x : A B C] [z : A] [y : A B] [z : A] (app) (app) xz : B C yz : B (app) xz(yz) : C λx A.xz(yz) : A C (abst) λy A B.λx A.xz(yz) : (A B) A C (abst) λx A B C.λy A B.λx A.xz(yz) : (A B C) (A B) A C (abst) p.54/65
56 p.55/65 β-reduction Def. (β β ) (λx:a.m)n β M[x := N]
57 p.56/65 β-reduction Def. (β β ) [x : A] Π 1 M : B λx:a.m : A B (λx:a.m)n β M[x := N] (λx:a.m)n : B Π 2 N : A β Π 2 N : A Π 1 M[x := N] : B
58 p.57/65 β-reduction, Cut-elimination Def. (β β ) [x : A] Π 1 M : B λx:a.m : A B (λx:a.m)n β M[x := N] (λx:a.m)n : B Π 2 N : A β Π 2 N : A Π 1 M[x := N] : B [A] Π 1 B A B ( I) Π 2 A B ( E) Π 2 A Π 1 B
59 p.58/65 Fundamental Properties of λ : SN, CR Uniqueness of types Γ M : A and Γ M : B = A B
60 p.58/65 Fundamental Properties of λ : SN, CR Uniqueness of types Γ M : A and Γ M : B = A B Subject reduction Γ M : A and M β N = Γ N : A
61 p.58/65 Fundamental Properties of λ : SN, CR Uniqueness of types Γ M : A and Γ M : B = A B Subject reduction Γ M : A and M β N = Γ N : A Strong normalization Γ M : A = Every reduction sequence M β... is finite
62 Fundamental Properties of λ : SN, CR Uniqueness of types Γ M : A and Γ M : B = A B Subject reduction Γ M : A and M β N = Γ N : A Strong normalization Γ M : A = Every reduction sequence M β... is finite Terms may get larger, multiplied (λx.λy.x(xy))m β λy.m(my) New redexes may be created (λx.λy.x(xy))(λz.m) β λy.(λz.m)((λz.m)y) p.59/65
63 p.60/65 Strong Normalization Γ M : A = M SN
64 p.61/65 Strong Normalization Γ M : A = M SN By induction on the derivation? x:a Γ Γ x : A Γ,x:A M : B Γ λx:a.m : A B Γ M : A B Γ N : A Γ MN : B IH: M SN is too weak!
65 Strong Normalization Γ M : A = M SN By induction on the derivation? x:a Γ Γ x : A Γ,x:A M : B Γ λx:a.m : A B Γ M : A B Γ N : A Γ MN : B IH: M SN is too weak! A set of SN terms closed under head β-expansion SAT def = set of all saturated sets Interpret type A by saturated set [A] SAT [[A B]] = {M Λ N [[A]]. MN [[B]]} M : A = M [A] SN p.62/65
66 p.63/65 Tiny Demo: ML, Agda ML > fn x => fn y => x; val it = fn : a -> b -> a > fn x => fn y => fn z => x z (y z); val it = fn : ( a -> b -> c) -> ( a -> b) -> a -> c Martin-Löf s Type Theory Agda data (\/) (A,B::Set) = inl (a::a) inr (b::b) or_elim (A,B,C::Set) :: A \/ B -> (A -> C) -> (B -> C) -> C or_elim p q r = case p of (inl a)-> q a (inr b)-> r b data (/\) (A,B::Set) = pair (a::a) (b::b) and_elim (A,B,C::Set) :: A /\ B -> (A -> B -> C) -> C and_elim p f = case p of (pair a b)-> f a b
67 p.64/65 1., 2. J.R. Hindley and J.P. Seldin: Introduction to Combinators and λ-calculus, Cambridge Univ. 3. H.P. Barendregt: Lambda Calculi with Types, Handbook of Logic in Computer Science Vol. 2, Oxford Univ. 4. J.-Y. Girard, P. Taylor and Y. Lafont: Proofs and Types, Cambridge Univ. 5. H.P. Barendregt: The Lambda Calculus Its Syntax and Semantics, North-Holland
68 p.65/65 1. Poly/ML 2. Agda /Research/Logic/TypesSS05/software.html 3. Coq 4. Isabelle 5. Mizar 6. PVS 7. The Seventeen Provers of the World freek/comparison/
Origin in Mathematical Logic
Lambda Calculus Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica, NBG/ZF Origin
More informationLambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010
Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables conversion
More informationLecture 2. Lambda calculus. Iztok Savnik, FAMNIT. March, 2018.
Lecture 2 Lambda calculus Iztok Savnik, FAMNIT March, 2018. 1 Literature Henk Barendregt, Erik Barendsen, Introduction to Lambda Calculus, March 2000. Lambda calculus Leibniz had as ideal the following
More informationLecture 3. Lambda calculus. Iztok Savnik, FAMNIT. October, 2015.
Lecture 3 Lambda calculus Iztok Savnik, FAMNIT October, 2015. 1 Literature Henk Barendregt, Erik Barendsen, Introduction to Lambda Calculus, March 2000. Lambda calculus Leibniz had as ideal the following
More informationLambda Calculus. Andrés Sicard-Ramírez. Semester Universidad EAFIT
Lambda Calculus Andrés Sicard-Ramírez Universidad EAFIT Semester 2010-2 Bibliography Textbook: Hindley, J. R. and Seldin, J. (2008). Lambda-Calculus and Combinators. An Introduction. Cambridge University
More informationAdvanced Lambda Calculus. Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands
Advanced Lambda Calculus Henk Barendregt & Giulio Manzonetto ICIS Faculty of Science Radboud University Nijmegen, The Netherlands Form of the course Ordinary lecture Seminar form Exam: working out an exercise
More informationModels of computation
Lambda-Calculus (I) jean-jacques.levy@inria.fr 2nd Asian-Pacific Summer School on Formal ethods Tsinghua University, August 23, 2010 Plan computation models lambda-notation bound variables odels of computation
More informationOrigin in Mathematical Logic
Lambda Calculus Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica, NBG/ZF The Combinatory
More informationHenk 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 informationsummer school Logic and Computation Goettingen, July 24-30, 2016
Università degli Studi di Torino summer school Logic and Computation Goettingen, July 24-30, 2016 A bit of history Alonzo Church (1936) The as formal account of computation. Proof of the undecidability
More informationReview. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007
CSE 230: Winter 2007 Principles of Programming Languages Lecture 12: The λ-calculus Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2 Several evaluation
More informationThe Lambda-Calculus Reduction System
2 The Lambda-Calculus Reduction System 2.1 Reduction Systems In this section we present basic notions on reduction systems. For a more detailed study see [Klop, 1992, Dershowitz and Jouannaud, 1990]. Definition
More informationProgramming Language Concepts: Lecture 16
Programming Language Concepts: Lecture 16 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 16, 23 March 2009 λ-calculus:
More informationProgramming Languages
CSE 230: Winter 2010 Principles of Programming Languages Lecture 10: Programming in λ-calculusc l l Ranjit Jhala UC San Diego Review The lambda calculus is a calculus of functions: e := x λx. e e 1 e 2
More informationFORMAL SYSTEMS: COMBINATORY LOGIC
FORMAL SYSTEMS: COMBINATORY LOGIC AND λ-calculus Andrew R. Plummer Department of Linguistics The Ohio State University 30 Sept., 2009 OUTLINE 1 INTRODUCTION 2 APPLICATIVE SYSTEMS 3 USEFUL INFORMATION COMBINATORY
More informationOn Upper Bounds on the Church-Rosser Theorem
On Upper Bounds on the Church-Rosser Theorem Ken-etsu Fujita Department of Computer Science Gunma University Kiryu, Japan fujita@cs.gunma-u.ac.jp The Church-Rosser theorem in the type-free λ-calculus is
More informationAdvanced Lambda Calculus Lecture 5
Advanced Lambda Calculus Lecture 5 The fathers Alonzo Church (1903-1995) as mathematics student at Princeton University (1922 or 1924) Haskell B. Curry (1900-1982) as BA in mathematics at Harvard (1920)
More informationIntersection and Singleton Type Assignment Characterizing Finite Böhm-Trees
Information and Computation 178, 1 11 (2002) doi:101006/inco20022907 Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees Toshihiko Kurata 1 Department of Mathematics, Tokyo Metropolitan
More informationTyped 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 informationCategories, Proofs and Programs
Categories, Proofs and Programs Samson Abramsky and Nikos Tzevelekos Lecture 4: Curry-Howard Correspondence and Cartesian Closed Categories In A Nutshell Logic Computation 555555555555555555 5 Categories
More informationSimply Typed λ-calculus
Simply Typed λ-calculus Lecture 1 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 1 Semester 2, 2017 1 / 23 A Brief History of Type Theory First developed
More information3.2 Reduction 29. Truth. The constructor just forms the unit element,. Since there is no destructor, there is no reduction rule.
32 Reduction 29 32 Reduction In the preceding section, we have introduced the assignment of proof terms to natural deductions If proofs are programs then we need to explain how proofs are to be executed,
More informationLambda Calculus. Week 12 The canonical term models for λ. Henk Barendregt, Freek Wiedijk assisted by Andrew Polonsky
Lambda Calculus Week 12 The canonical term models for λ Henk Barendregt, Freek Wiedijk assisted by Andrew Polonsky Two version of λ Curry version (type assignment). Λ Γ (A) {M Λ Γ M : A} with (axiom) Γ
More informationThe 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 informationMathematical Logic IV
1 Introduction Mathematical Logic IV The Lambda Calculus; by H.P. Barendregt(1984) Part One: Chapters 1-5 The λ-calculus (a theory denoted λ) is a type free theory about functions as rules, rather that
More informationJustifying Algorithms for βη-conversion
Justifying Algorithms for βη-conversion Healfdene Goguen AT&T Labs, 180 Park Ave., Florham Park NJ 07932 USA hhg@att.com. Abstract. Deciding the typing judgement of type theories with dependent types such
More informationCS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus
CS 4110 Programming Languages & Logics Lecture 16 Programming in the λ-calculus 30 September 2016 Review: Church Booleans 2 We can encode TRUE, FALSE, and IF, as: TRUE λx. λy. x FALSE λx. λy. y IF λb.
More informationLazy Strong Normalization
Lazy Strong Normalization Luca Paolini 1,2 Dipartimento di Informatica Università di Torino (ITALIA) Elaine Pimentel 1,2 Departamento de Matemática Universidade Federal de Minas Gerais (BRASIL) Dipartimento
More informationSequent Combinators: A Hilbert System for the Lambda Calculus
Sequent Combinators: A Hilbert System for the Lambda Calculus Healfdene Goguen Department of Computer Science, University of Edinburgh The King s Buildings, Edinburgh, EH9 3JZ, United Kingdom Fax: (+44)
More informationCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline Alejandro Díaz-Caro? Giulio Manzonetto Université Paris-Ouest & INRIA LIPN, Université Paris 13 Michele Pagani LIPN, Université Paris 13
More informationOn the Standardization Theorem for λβη-calculus
On the Standardization Theorem for λβη-calculus Ryo Kashima Department of Mathematical and Computing Sciences Tokyo Institute of Technology Ookayama, Meguro, Tokyo 152-8552, Japan. e-mail: kashima@is.titech.ac.jp
More informationParallel Reduction in Type Free Lambda-mu- Calculus
九州大学学術情報リポジトリ Kyushu University Institutional Repository Parallel Reduction in Type Free Lambda-mu- Calculus Baba, Kensuke Graduate School of Information Science and Electrical Engineering, Kyushu University
More informationAlonzo Church ( ) Lambda Calculus. λ-calculus : syntax. Grammar for terms : Inductive denition for λ-terms
Alonzo Church (1903-1995) Lambda Calculus 2 λ-calculus : syntax Grammar for terms : t, u ::= x (variable) t u (application) λx.t (abstraction) Notation : Application is left-associative so that t 1 t 2...
More informationl-calculus and Decidability
U.U.D.M. Project Report 2017:34 l-calculus and Decidability Erik Larsson Examensarbete i matematik, 15 hp Handledare: Vera Koponen Examinator: Jörgen Östensson Augusti 2017 Department of Mathematics Uppsala
More informationFunctional Programming with Coq. Yuxin Deng East China Normal University
Functional Programming with Coq Yuxin Deng East China Normal University http://basics.sjtu.edu.cn/ yuxin/ September 10, 2017 Functional Programming Y. Deng@ECNU 1 Reading materials 1. The Coq proof assistant.
More informationTyped Lambda Calculi. Nikos Tzeveλekos Queen Mary, University of London 1 / 23
Typed Lambda Calculi Nikos Tzeveλekos Queen Mary, University of London 1 / 23 What is the Lambda Calculus A minimal formalism expressing computation with functionals s ::= x λx.s ss All you need is lambda.
More informationTYPED LAMBDA CALCULI. Andrzej S. Murawski University of λeicester.
TYPED LAMBDA CALCULI Andrzej S. Murawski University of λeicester http://www.cs.le.ac.uk/people/amurawski/mgs2011-tlc.pdf THE COURSE The aim of the course is to provide an introduction to the lambda calculus
More informationTraditional and Non Traditional lambda calculi
Strategies July 2009 Strategies Syntax Semantics Manipulating Expressions Variables and substitutions Free and bound variables Subterms and substitution Grafting and substitution Ordered list of variables
More informationProgramming Language Concepts: Lecture 18
Programming Language Concepts: Lecture 18 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 18, 30 March 2009 One step reduction
More informationKomponenten- und Service-orientierte Softwarekonstruktion
Komponenten- und Service-orientierte Softwarekonstruktion Vorlesung 5: Combinatory Logic Synthesis Jakob Rehof LS XIV Software Engineering TU Dortmund Sommersemester 2015 SS 2015 J. Rehof (TU Dortmund)
More informationType 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(2) (15pts) Using Prolog, implement a type-checker for the following small subset of System F:
CS 6371 Advanced Programming Languages Sample Spring 2018 Final Exam This sample final exam is LONGER than a real final exam (to give you more practice problems) and has a medium difficulty level. You
More informationThe Lambda Calculus. Stephen A. Edwards. Fall Columbia University
The Lambda Calculus Stephen A. Edwards Columbia University Fall 2014 Lambda Expressions Function application written in prefix form. Add four and five is (+ 4 5) Evaluation: select a redex and evaluate
More informationNon-Idempotent Typing Operators, beyond the λ-calculus
Non-Idempotent Typing Operators, beyond the λ-calculus Soutenance de thèse Pierre VIAL IRIF (Univ. Paris Diderot and CNRS) December 7, 2017 Non-idempotent typing operators P. Vial 0 1 /46 Certification
More information3.2 Equivalence, Evaluation and Reduction Strategies
3.2 Equivalence, Evaluation and Reduction Strategies The λ-calculus can be seen as an equational theory. More precisely, we have rules i.e., α and reductions, for proving that two terms are intensionally
More informationAn Introduction to the Lambda Calculus
An Introduction to the Lambda Calculus Mayer Goldberg February 20, 2000 1 Notation and Conventions It is surprising that despite the simplicity of its syntax, the λ-calculus hosts a large body of notation,
More informationLecture Notes on The Curry-Howard Isomorphism
Lecture Notes on The Curry-Howard Isomorphism 15-312: Foundations of Programming Languages Frank Pfenning Lecture 27 ecember 4, 2003 In this lecture we explore an interesting connection between logic and
More informationLambda Calculus with Types. Henk Barendregt ICIS Radboud University Nijmegen The Netherlands
Lambda Calculus with Types Henk Barendregt ICIS Radboud University Nijmegen The Netherlands New book Cambridge University Press / ASL Perspectives in Logic, 2011 Lambda Calculus with Types (698 pp) Authors:
More informationTutorial on Semantics Part I
Tutorial on Semantics Part I Basic Concepts Prakash Panangaden 1 1 School of Computer Science McGill University on sabbatical leave at Department of Computer Science Oxford University Fields Institute,
More informationSimply Typed λ-calculus
Simply Typed λ-calculus Lecture 2 Jeremy Dawson The Australian National University Semester 2, 2017 Jeremy Dawson (ANU) COMP4630,Lecture 2 Semester 2, 2017 1 / 19 Outline Properties of Curry type system:
More informationRewriting, Explicit Substitutions and Normalisation
Rewriting, Explicit Substitutions and Normalisation XXXVI Escola de Verão do MAT Universidade de Brasilia Part 1/3 Eduardo Bonelli LIFIA (Fac. de Informática, UNLP, Arg.) and CONICET eduardo@lifia.info.unlp.edu.ar
More informationTyping λ-terms. Types. Typed λ-terms. Base Types. The Typing Relation. Advanced Formal Methods. Lecture 3: Simply Typed Lambda calculus
Course 2D1453, 200607 Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Some material from B. Pierce: TAPL + some from G. Klein, NICTA Typing λterms The uptyped λcalculus
More informationRealisability methods of proof and semantics with application to expansion
Realisability methods of proof and semantics with application to expansion First Year Examination Supervisors : Professor Fairouz Kamareddine and Doctor Joe B. Wells Student : Vincent Rahli ULTRA group,
More informationSHARING IN THE WEAK LAMBDA-CALCULUS REVISITED
SHARING IN THE WEAK LAMBDA-CALCULUS REVISITED TOMASZ BLANC, JEAN-JACQUES LÉVY, AND LUC MARANGET INRIA e-mail address: tomasz.blanc@inria.fr INRIA, Microsoft Research-INRIA Joint Centre e-mail address:
More informationParallel Reduction in Type Free λµ-calculus
Electronic Notes in Theoretical Computer Science 42 (2001) URL: http://www.elsevier.nl/locate/entcs/volume42.html 15 pages Parallel Reduction in Type Free λµ-calculus Kensuke Baba 1 Graduate School of
More informationFoundations of Computation. Ana Bove
Foundations of Computation Ana Bove Programming Logic (ProgLog) Group February 13th 2018 Outline of the talk: What we do in ProgLog Origines of computer science Courses in the area Warming-up Exercise
More informationReducibility proofs in λ-calculi with intersection types
Reducibility proofs in λ-calculi with intersection types Fairouz Kamareddine, Vincent Rahli, and J. B. Wells ULTRA group, Heriot-Watt University, http://www.macs.hw.ac.uk/ultra/ March 14, 2008 Abstract
More informationPrinciples of Programming Languages
Principles of Programming Languages Lecture 03 Theoretical Foundations 1 Domains Semantic model of a data type: semantic domain! Examples: Integer, Natural, Truth-Value Domains D are more than a set of
More informationTopology in Denotational Semantics
Journées Topologie et Informatique Thomas Ehrhard Preuves, Programmes et Systèmes (PPS) Université Paris Diderot - Paris 7 and CNRS March 21, 2013 What is denotational semantics? The usual stateful approach
More informationProofs in classical logic as programs: a generalization of lambda calculus. A. Salibra. Università Ca Foscari Venezia
Proofs in classical logic as programs: a generalization of lambda calculus A. Salibra Università Ca Foscari Venezia Curry Howard correspondence, in general Direct relationship between systems of logic
More informationComputability via the Lambda Calculus with Patterns
Computability via the Lambda Calculus with Patterns Bodin Skulkiat (Corresponding author) Department of Mathematics, Faculty of Science Chulalongkorn University, Bangkok, Thailand Tel: 66-89-666-5804 E-mail:
More informationSemantics with Intersection Types
Semantics with Intersection Types Steffen van Bakel Department of Computing, Imperial College of Science, Technology and Medicine, 180 Queen s Gate, London SW7 2BZ, U.K., E-mail: svb@doc.ic.ac.uk (Sections
More informationCombinators & Lambda Calculus
Combinators & Lambda Calculus Abstracting 1/16 three apples plus two pears = five fruits concrete 3+2 = 5 abstract objects a+b = b+a a (b c) = (a b) c abstract quantities abstract operations a, b[r(a,
More informationCOMP6463: λ-calculus
COMP6463: λ-calculus 1. Basics Michael Norrish Michael.Norrish@nicta.com.au Canberra Research Lab., NICTA Semester 2, 2015 Outline Introduction Lambda Calculus Terms Alpha Equivalence Substitution Dynamics
More informationLogical 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 informationClassical Combinatory Logic
Computational Logic and Applications, CLA 05 DMTCS proc. AF, 2006, 87 96 Classical Combinatory Logic Karim Nour 1 1 LAMA - Equipe de logique, Université de Savoie, F-73376 Le Bourget du Lac, France Combinatory
More informationLogic and Probability Lecture 3: Beyond Boolean Logic
Logic and Probability Lecture 3: Beyond Boolean Logic Wesley Holliday & Thomas Icard UC Berkeley & Stanford August 13, 2014 ESSLLI, Tübingen Wesley Holliday & Thomas Icard: Logic and Probability, Lecture
More informationComputer Science at Kent
Computer Science at Kent New eta-reduction and Church-Rosser Yong Luo Technical Report No. 7-05 October 2005 Copyright c 2005 University of Kent Published by the Computing Laboratory, University of Kent,
More information258 Handbook of Discrete and Combinatorial Mathematics
258 Handbook of Discrete and Combinatorial Mathematics 16.3 COMPUTABILITY Most of the material presented here is presented in far more detail in the texts of Rogers [R], Odifreddi [O], and Soare [S]. In
More informationIntroduction to lambda calculus Part 2
Introduction to lambda calculus Part 2 Antti-Juhani Kaijanaho 2017-01-24... 1 Untyped lambda calculus 1.1 Syntax... x, y, z Var t, u Term t, u ::= x t u λx t... In this document, I will be using the following
More informationCharles Wells 1. February 25, 1999
NOTES ON THE λ-calculus Charles Wells 1 February 25, 1999 Department of Mathematics Case Western Reserve University 10900 Euclid Ave. Cleveland, OH 44106-7058 USA charles@freude.com http://www.cwru.edu/artsci/math/wells/home.html
More informationModels of Computation,
Models of Computation, 2010 1 The Lambda Calculus A brief history of mathematical notation. Our notation for numbers was introduced in the Western World in the Renaissance (around 1200) by people like
More information1. each λ-variable is a λρ-term, called atom or atomic term, 2. if M and N are λρ-term then (MN) is a λρ-term called application,
Yuichi Komori Arato Cho λρ-calculus abstract. In [K02], one of the authors introduced the system λρ-calculus and stated without proof that the strong normalization theorem hold. We have discovered an elegant
More informationBeyond 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 informationChurch s undecidability result
Church s undecidability result Alan Turing Birth Centennial Talk at IIT Bombay, Mumbai Joachim Breitner April 21, 2011 Welcome, and thank you for the invitation to speak about Church s lambda calculus
More informationEquivalent Computers. Lecture 39: Lambda Calculus. Lambda Calculus. What is Calculus? Real Definition. Why?
#,, - Lecture 39: Lambda Calculus Equivalent Computers z z z... term = variable term term (term) λ variable. term λy. M α λv. (M [y α v]) where v does not occur in M. (λx. M)N β M [ x α N ] Turing Machine
More informationEasyChair Preprint. Normalization and Taylor expansion of lambda-terms
EasyChair Preprint 165 Normalization and Taylor expansion of lambda-terms Federico Olimpieri EasyChair preprints are intended for rapid dissemination of research results and are integrated with the rest
More informationSafety Analysis versus Type Inference
Information and Computation, 118(1):128 141, 1995. Safety Analysis versus Type Inference Jens Palsberg palsberg@daimi.aau.dk Michael I. Schwartzbach mis@daimi.aau.dk Computer Science Department, Aarhus
More informationLecture Notes on Combinatory Modal Logic
Lecture Notes on Combinatory Modal Logic 15-816: Modal Logic Frank Pfenning Lecture 9 February 16, 2010 1 Introduction The connection between proofs and program so far has been through a proof term assignment
More informationConsequence Relations and Natural Deduction
Consequence Relations and Natural Deduction Joshua D. Guttman Worcester Polytechnic Institute September 9, 2010 Contents 1 Consequence Relations 1 2 A Derivation System for Natural Deduction 3 3 Derivations
More informationType Systems Winter Semester 2006
Type Systems Winter Semester 2006 Week 7 November 29 November 29, 2006 - version 1.0 Plan PREVIOUSLY: 1. type safety as progress and preservation 2. typed arithmetic expressions 3. simply typed lambda
More informationA Lambda Calculus for Gödel Dummett Logic Capturing Waitfreedom
A Lambda Calculus for Gödel Dummett Logic Capturing Waitfreedom Yoichi Hirai Univ. of Tokyo, JSPS research fellow 2012-05-23, FLOPS 2012, Kobe 1 2 Curry Howard Correspondence Logic Intuitionistic propositional
More informationA Common Notation System for the Lambda-Calculus and Combinatory Logic
A Common Notation System for the Lambda-Calculus and Combinatory Logic Masahiko Sato Graduate School of Informatics, Kyoto University Joint work with Takafumi Sakurai and Helmut Schwichtenberg IFIP WG
More informationFormal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages )
Formal Methods Lecture 6 (B. Pierce's slides for the book Types and Programming Languages ) This Saturday, 10 November 2018, room 335 (FSEGA), we will recover the following activities: 1 Formal Methods
More informationType Systems. Lecture 2 Oct. 27th, 2004 Sebastian Maneth.
Type Systems Lecture 2 Oct. 27th, 2004 Sebastian Maneth http://lampwww.epfl.ch/teaching/typesystems/2004 Today 1. What is the Lambda Calculus? 2. Its Syntax and Semantics 3. Church Booleans and Church
More informationGraph lambda theories
Under consideration for publication in Math. Struct. in Comp. Science Graph lambda theories A N T O N I O B U C C I A R E L L I 1 and A N T O N I N O S A L I B R A 2 1 Equipe PPS (case 7014), Université
More informationIntroduction to dependent type theory. CIRM, May 30
CIRM, May 30 Goals of this presentation Some history and motivations Notations used in type theory Main goal: the statement of main properties of equality type and the univalence axiom First talk P ropositions
More informationProbabilistic Applicative Bisimulation and Call-by-Value Lam
Probabilistic Applicative and Call-by-Value Lambda Calculi Joint work with Ugo Dal Lago ENS Lyon February 9, 2014 Probabilistic Applicative and Call-by-Value Lam Introduction Fundamental question: when
More informationLambda Calculus. Yuxi Fu. 31 May, 2013
Lambda Calculus Yuxi Fu 31 May, 2013 Origin in Mathematical Logic Foundation of mathematics was very much an issue in the early decades of 20th century. Cantor, Frege, Russel s Paradox, Principia Mathematica,
More informationNotes on the λ-calculus
Notes on the λ-calculus J.R.B. Cockett Department of Computer Science, University of Calgary Calgary, T2N 1N4, Alberta, Canada November 30, 2017 1 Introduction The λ-calculus was one of the first descriptions
More informationSubtyping 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Γ 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λ 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 informationFormal Methods Lecture 6. (B. Pierce's slides for the book Types and Programming Languages )
Formal Methods Lecture 6 (B. Pierce's slides for the book Types and Programming Languages ) Programming in the Lambda-Calculus, Continued Testing booleans Recall: tru = λt. λf. t fls = λt. λf. f We showed
More informationIntroduction to Type Theory
Introduction to Type Theory Herman Geuvers Radboud University Nijmegen & Technical University Eindhoven, The Netherlands July 8, 2008 1 Overview These notes comprise the lecture Introduction to Type Theory
More informationMathematical Synthesis of Equational Deduction Systems. Marcelo Fiore. Computer Laboratory University of Cambridge
Mathematical Synthesis of Equational Deduction Systems Marcelo Fiore Computer Laboratory University of Cambridge TLCA 2009 3.VII.2009 Context concrete theories meta-theories Context concrete theories meta-theories
More informationBisimulation and coinduction in higher-order languages
Bisimulation and coinduction in higher-order languages Davide Sangiorgi Focus Team, University of Bologna/INRIA ICE, Florence, June 2013 Bisimulation Behavioural equality One of the most important contributions
More informationType Inference. For the Simply-Typed Lambda Calculus. Peter Thiemann, Manuel Geffken. Albert-Ludwigs-Universität Freiburg. University of Freiburg
Type Inference For the Simply-Typed Lambda Calculus Albert-Ludwigs-Universität Freiburg Peter Thiemann, Manuel Geffken University of Freiburg 24. Januar 2013 Outline 1 Introduction 2 Applied Lambda Calculus
More informationA general method to prove the normalization theorem for first and second order typed λ-calculi
Under consideration for publication in Math. Struct. in Comp. Science A general method to prove the normalization theorem for first and second order typed λ-calculi Venanzio Capretta and Silvio Valentini
More informationScuola Estiva di Logica Gargnano, August
Linear Logic, Linear Logic, Università degli Studi di Torino Scuola Estiva di Logica 2015 Gargnano, August 28 2015 Complexity theory Linear Logic, study of complexity classes and their relations define
More information