Lambda calculus L9 103

Size: px
Start display at page:

Download "Lambda calculus L9 103"

Transcription

1 Lambda calculus L9 103

2 Notions of computability L9 104 Church (1936): λ-calculus Turing (1936): Turing machines. Turing showed that the two very different approaches determine the same class of computable functions. Hence: Church-Turing Thesis. Every algorithm [in intuitive sense of Lect. 1] can be realized as a Turing machine.

3

4 λ-terms, M L9 105 are built up from a given, countable collection of variables x, y, z,... by two operations for forming λ-terms: λ-abstraction: (λx.m) (where x is a variable and M is a λ-term) application: (M M ) (where M and M are λ-terms). Some random examples of λ-terms: x (λx.x) ((λy.(x y))x) (λy.((λy.(x y))x))

5 λ-terms, M L9 105 Notational conventions: (λx 1 x 2... x n.m) means (λx 1.(λx 2...(λx n.m)...)) (M 1 M 2... M n ) means (...(M 1 M 2 )... M n ) (i.e. application is left-associative) drop outermost parentheses and those enclosing the body of a λ-abstraction. E.g. write (λx.(x(λy.(y x)))) as λx.x(λy.y x). x # M means that the variable x does not occur anywhere in the λ-term M.

6 L9 106 Free and bound variables In λx.m, we call x the bound variable and M the body of the λ-abstraction. An occurrence of x in a λ-term M is called binding if in between λ and. (e.g. (λx.y x) x) bound if in the body of a binding occurrence of x (e.g. (λx.y x) x) free if neither binding nor bound (e.g. (λx.y x)x).

7 L9 106 Free and bound variables Sets of free and bound variables: FV(x) = {x} FV(λx.M) = FV(M) {x} FV(M N) = FV(M) FV(N) BV(x) = BV(λx.M) = BV(M) {x} BV(M N) = BV(M) BV(N) If FV(M) =, M is called a closed term, or combinator.

8 L9 106 Free and bound variables Sets of free and bound variables: FV(x) = {x} FV(λx.M) = FV(M) {x} FV(M N) = FV(M) FV(N) BV(x) = BV(λx.M) = BV(M) {x} BV(M N) = BV(M) BV(N) If FV(M) =, M is called a closed term, or combinator.

9 α-equivalence M = α M L9 107 λx.m is intended to represent the function f such that f(x) = M for all x. So the name of the bound variable is immaterial: if M = M{x /x} is the result of taking M and changing all occurrences of x to some variable x # M, then λx.m and λx.m both represent the same function. For example, λx.x and λy.y represent the same function (the identity function).

10 α-equivalence M = α M L9 107 is the binary relation inductively generated by the rules: x = α x z # (M N) M{z/x} = α N{z/y} λx.m = α λy.n M = α M N = α N M N = α M N where M{z/x} is M with all occurrences of x replaced by z.

11 α-equivalence M = α M L9 107 For example: λx.(λxx.x) x = α λy.(λx x.x)x because (λz x.z)x = α (λx x.x)x because λz x.z = α λx x.x and x = α x because λx.u = α λx.u and x = α x because u = α u and x = α x.

12 α-equivalence M = α M L9 107 For example: λx.(λxx.x) x = α λy.(λx x.x)x because (λz x.z)x = α (λx x.x)x because λz x.z = α λx x.x and x = α x because λx.u = α λx.u and x = α x because u = α u and x = α x.

13 α-equivalence M = α M L9 107 For example: λx.(λxx.x) x = α λy.(λx x.x)x because (λz x.z)x = α (λx x.x)x because λz x.z = α λx x.x and x = α x because λx.u = α λx.u and x = α x because u = α u and x = α x.

14 α-equivalence M = α M L9 107 For example: λx.(λxx.x) x = α λy.(λx x.x)x because (λz x.z)x = α (λx x.x)x because λz x.z = α λx x.x and x = α x because λx.u = α λx.u and x = α x because u = α u and x = α x.

15 α-equivalence M = α M L9 107 For example: λx.(λxx.x) x = α λy.(λx x.x)x because (λz x.z)x = α (λx x.x)x because λz x.z = α λx x.x and x = α x because λx.u = α λx.u and x = α x because u = α u and x = α x.

16 α-equivalence M = α M Fact: = α is an equivalence relation (reflexive, symmetric and transitive). We do not care about the particular names of bound variables, just about the distinctions between them. So α-equivalence classes of λ-terms are more important than λ-terms themselves. Textbooks (and these lectures) suppress any notation for α-equivalence classes and refer to an equivalence class via a representative λ-term (look for phrases like we identify terms up to α-equivalence or we work up to α-equivalence ). For implementations and computer-assisted reasoning, there are various devices for picking canonical representatives of α-equivalence classes (e.g. de Bruijn indexes, graphical representations,... ). L9 107

17 β-reduction Recall that λx.m is intended to represent the function f such that f (x) =M for all x. We can regard λx.m as a function on λ-terms via substitution: map each N to M[N/x]. So the natural notion of computation for λ-terms is given by stepping from a β-redex (λx.m)n to the corresponding β-reduct M[N/x] L10 109

18 Substitution N[M/x] x[m/x] = M y[m/x] = y if y = x (λy.n)[m/x] = λy.n[m/x] if y # (Mx) (N 1 N 2 )[M/x] = N 1 [M/x] N 2 [M/x] L9 108

19 Substitution N[M/x] x[m/x] = M y[m/x] = y if y = x (λy.n)[m/x] = λy.n[m/x] if y # (Mx) (N 1 N 2 )[M/x] = N 1 [M/x] N 2 [M/x] Side-condition y # (M x) (y does not occur in M and y = x) makessubstitution capture-avoiding. E.g. if x = y (λy.x)[y/x] = λy.y L9 108

20 Substitution N[M/x] x[m/x] = M y[m/x] = y if y = x (λy.n)[m/x] = λy.n[m/x] if y # (Mx) (N 1 N 2 )[M/x] = N 1 [M/x] N 2 [M/x] Side-condition y # (M x) (y does not occur in M and y = x) makessubstitution capture-avoiding. E.g. if x = y = z = x (λy.x)[y/x] = α (λz.x)[y/x] =λz.y In fact N N[M/x] induces a totally defined function from the set of α-equivalence classes of λ-terms to itself. L9 108

21

22

23

24

25

26

27 β-reduction One-step β-reduction, M M : (λx.m)n M[N/x] M M MN M N M M λx.m λx.m M M NM NM N = α M M M M = α N N N L10 109

28 E.g. β-reduction ((λy.λz.z)u)y (λx.x y)((λy.λz.z)u) (λz.z)y y (λx.xy)(λz.z) L10 109

29 E.g. β-reduction ((λy.λz.z)u)y (λx.xy)((λy.λz.z)u) (λz.z)y y (λx.xy)(λz.z) L10 109

30 E.g. β-reduction ((λy.λz.z)u)y (λx.xy)((λy.λz.z)u) (λz.z)y y (λx.xy)(λz.z) L10 109

31 E.g. β-reduction ((λy.λz.z)u)y (λx.xy)((λy.λz.z)u) (λz.z)y y (λx.x y)(λz.z) L10 109

32 E.g. β-reduction ((λy.λz.z)u)y (λx.xy)((λy.λz.z)u) (λz.z)y y (λx.xy)(λz.z) L10 109

33 Many-step β-reduction, M M : M = α M M M (no steps) M M M M (1 step) M M M M M M (1 more step) E.g. (λx.xy)((λyz.z)u) y (λx.λy.x)y λz.y L10 110

34 β-conversion M = β N Informally: M = β N holds if N can be obtained from M by performing zero or more steps of α-equivalence, β-reduction, or β-expansion (= inverse of a reduction). E.g. u ((λxy. vx)y) = β (λx. ux)(λx. vy) because (λx. ux)(λx. vy) u(λx. vy) and so we have u ((λxy. vx)y) = α u ((λxy. vx)y) u(λy. vy) reduction = α u(λx. vy) (λx. ux)(λx. vy) expansion L10 111

35 β-conversion M = β N Informally: M = β N holds if N can be obtained from M by performing zero or more steps of α-equivalence, β-reduction, or β-expansion (= inverse of a reduction). E.g. u ((λxy. vx)y) = β (λx. ux)(λx. vy) because (λx. ux)(λx. vy) u(λx. vy) and so we have u ((λxy. vx)y) = α u ((λxy. vx)y) u(λy. vy) reduction = α u(λx. vy) (λx. ux)(λx. vy) expansion L10 111

36 β-conversion M = β N Informally: M = β N holds if N can be obtained from M by performing zero or more steps of α-equivalence, β-reduction, or β-expansion (= inverse of a reduction). E.g. u ((λxy. vx)y) = β (λx. ux)(λx. vy) because (λx. ux)(λx. vy) u(λx. vy) and so we have u ((λxy. vx)y) = α u ((λxy. vx)y) u(λy. vy) reduction = α u(λx. vy) (λx. ux)(λx. vy) expansion L10 111

37 β-conversion M = β N Informally: M = β N holds if N can be obtained from M by performing zero or more steps of α-equivalence, β-reduction, or β-expansion (= inverse of a reduction). E.g. u ((λxy. vx)y) = β (λx. ux)(λx. vy) because (λx. ux)(λx. vy) u(λx. vy) and so we have u ((λxy. vx)y) = α u ((λxy. vx)y) u(λy. vy) reduction = α u(λx. vy) (λx. ux)(λx. vy) expansion L10 111

38 β-conversion M = β N is the binary relation inductively generated by the rules: M = α M M M M = β M M = β M M = β M M = β M M = β M M = β M M = β M M = β M λx.m = β λx.m M = β M N = β N MN= β M N L10 111

λ-terms, M Some random examples of λ-terms: L9 105

λ-terms, M Some random examples of λ-terms: L9 105 λ-terms, M L9 105 are built up from a given, countable collection of variables x, y, z,... by two operations for forming λ-terms: λ-abstraction: (λx.m) (where x is a variable and M is a λ-term) application:

More information

Computation Theory, L 9 116/171

Computation Theory, L 9 116/171 Definition. A partial function f is partial recursive ( f PR) ifitcanbebuiltupinfinitelymanysteps from the basic functions by use of the operations of composition, primitive recursion and minimization.

More information

λ-terms, M Some random examples of λ-terms: L9 105

λ-terms, M Some random examples of λ-terms: L9 105 λ-terms, M are built up from a given, countable collection of variables x, y, z,... by two operations for forming λ-terms: λ-abstraction: (λx.m) (where x is a variable and M is a λ-term) application: (M

More information

Models of Computation,

Models 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 information

The Lambda-Calculus Reduction System

The 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 information

Computation Theory. 12 lectures for University of Cambridge 2015 Computer Science Tripos, Part IB by Prof. Andrew Pitts.

Computation Theory. 12 lectures for University of Cambridge 2015 Computer Science Tripos, Part IB by Prof. Andrew Pitts. Computation Theory 12 lectures for University of Cambridge 2015 Computer Science Tripos, Part IB by Prof. Andrew Pitts c 2015 AM Pitts Contents Introduction: algorithmically undecidable problems 6 Decision

More information

Lecture 3. Lambda calculus. Iztok Savnik, FAMNIT. October, 2015.

Lecture 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 information

Lecture 2. Lambda calculus. Iztok Savnik, FAMNIT. March, 2018.

Lecture 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 information

Simply Typed λ-calculus

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

More information

3.2 Equivalence, Evaluation and Reduction Strategies

3.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 information

Functional Programming with Coq. Yuxin Deng East China Normal University

Functional 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 information

Optimizing Optimal Reduction: A Type Inference Algorithm for Elementary Affine Logic

Optimizing Optimal Reduction: A Type Inference Algorithm for Elementary Affine Logic Optimizing Optimal Reduction: A Type Inference Algorithm for Elementary Affine Logic Paolo Coppola Università di Udine Dip. di Matematica e Informatica Simone Martini Università di Bologna Dip. di Scienze

More information

Constructive approach to relevant and affine term calculi

Constructive approach to relevant and affine term calculi Constructive approach to relevant and affine term calculi Jelena Ivetić, University of Novi Sad, Serbia Silvia Ghilezan,University of Novi Sad, Serbia Pierre Lescanne, University of Lyon, France Silvia

More information

Type Systems. Lecture 2 Oct. 27th, 2004 Sebastian Maneth.

Type 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 information

Traditional and Non Traditional lambda calculi

Traditional 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 information

Programming Language Concepts: Lecture 18

Programming 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 information

The Safe λ-calculus. William Blum. Joint work with C.-H. Luke Ong. Lunch-time meeting, 14 May Oxford University Computing Laboratory

The Safe λ-calculus. William Blum. Joint work with C.-H. Luke Ong. Lunch-time meeting, 14 May Oxford University Computing Laboratory The Safe λ-calculus William Blum Joint work with C.-H. Luke Ong Oxford University Computing Laboratory Lunch-time meeting, 14 May 2007 Overview Safety is originally a syntactic restriction for higher-order

More information

summer school Logic and Computation Goettingen, July 24-30, 2016

summer 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 information

Alonzo Church ( ) Lambda Calculus. λ-calculus : syntax. Grammar for terms : Inductive denition for λ-terms

Alonzo 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 information

Lazy Strong Normalization

Lazy 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 information

Origin in Mathematical Logic

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 information

TYPED LAMBDA CALCULI. Andrzej S. Murawski University of λeicester.

TYPED 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 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

Equivalent Computers. Lecture 39: Lambda Calculus. Lambda Calculus. What is Calculus? Real Definition. Why?

Equivalent 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 information

Lambda-Calculus (I) 2nd Asian-Pacific Summer School on Formal Methods Tsinghua University, August 23, 2010

Lambda-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 information

Tutorial on Semantics Part I

Tutorial 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 information

Type Systems. Today. 1. What is the Lambda Calculus. 1. What is the Lambda Calculus. Lecture 2 Oct. 27th, 2004 Sebastian Maneth

Type Systems. Today. 1. What is the Lambda Calculus. 1. What is the Lambda Calculus. Lecture 2 Oct. 27th, 2004 Sebastian Maneth Today 1. What is the Lambda Calculus? Type Systems 2. Its Syntax and Semantics 3. Church Booleans and Church Numerals 4. Lazy vs. Eager Evaluation (call-by-name vs. call-by-value) Lecture 2 Oct. 27th,

More information

MANY BILLS OF CONCERN TO PUBLIC

MANY BILLS OF CONCERN TO PUBLIC - 6 8 9-6 8 9 6 9 XXX 4 > -? - 8 9 x 4 z ) - -! x - x - - X - - - - - x 00 - - - - - x z - - - x x - x - - - - - ) x - - - - - - 0 > - 000-90 - - 4 0 x 00 - -? z 8 & x - - 8? > 9 - - - - 64 49 9 x - -

More information

Logic and Probability Lecture 3: Beyond Boolean Logic

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

More information

Lambda-Calculus (cont): Fixpoints, Naming. Lecture 10 CS 565 2/10/08

Lambda-Calculus (cont): Fixpoints, Naming. Lecture 10 CS 565 2/10/08 Lambda-Calculus (cont): Fixpoints, Naming Lecture 10 CS 565 2/10/08 Recursion and Divergence Consider the application: Ω ((λ x. (x x)) (λ x. (x x))) Ω evaluates to itself in one step. It has no normal

More information

Mathematical Logic IV

Mathematical 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 information

Typed 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 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 information

Origin in Mathematical Logic

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 The Combinatory

More information

A Type-Theoretic Characterization of Polynomial Time Computable Functions

A Type-Theoretic Characterization of Polynomial Time Computable Functions A Type-Theoretic Characterization of Polynomial Time Computable Functions Master Thesis in Mathematics at the Radboud Universiteit Nijmegen Rik de Kort supervised by Dr. Herman Geuvers September 7, 2016

More information

l-calculus and Decidability

l-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 information

On the Standardization Theorem for λβη-calculus

On 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 information

System F. Proofs and Types. Bow-Yaw Wang. Academia Sinica. Spring 2012

System F. Proofs and Types. Bow-Yaw Wang. Academia Sinica. Spring 2012 Proofs and Types System F Bow-Yaw Wang Academia Sinica Spring 2012 The Calculus Types in System F are defined as follows. type variables: X, Y,.... if U and V are types, then U V is a type. if V is a type

More information

Computational Soundness of a Call by Name Calculus of Recursively-scoped Records. UMM Working Papers Series, Volume 2, Num. 3.

Computational Soundness of a Call by Name Calculus of Recursively-scoped Records. UMM Working Papers Series, Volume 2, Num. 3. Computational Soundness of a Call by Name Calculus of Recursively-scoped Records. UMM Working Papers Series, Volume 2, Num. 3. Elena Machkasova Contents 1 Introduction and Related Work 1 1.1 Introduction..............................

More information

An Implicit Characterization of PSPACE

An Implicit Characterization of PSPACE An Implicit Characterization of PSPACE Marco Gaboardi Dipartimento di Scienze dell Informazione, Università degli Studi di Bologna - Mura Anteo Zamboni 7, 40127 Bologna, Italy, gaboardi@cs.unibo.it and

More information

Formal 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 ) 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 information

Introduction to Type Theory

Introduction 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 information

Introduction to λ-calculus

Introduction to λ-calculus p.1/65 Introduction to λ-calculus Ken-etsu FUJITA fujita@cs.gunma-u.ac.jp http://www.comp.cs.gunma-u.ac.jp/ fujita/ Department of Computer Science Gunma University :Church 32, 36, 40; Curry 34 1. Universal

More information

COMP6463: λ-calculus

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

More information

Reducibility proofs in λ-calculi with intersection types

Reducibility 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 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

Introduction to lambda calculus Part 2

Introduction 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 information

Lambda 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 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 information

Lambda Calculus. Andrés Sicard-Ramírez. Semester Universidad EAFIT

Lambda 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 information

Programming Language Concepts: Lecture 16

Programming 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 information

Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees

Intersection 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 information

Realisability methods of proof and semantics with application to expansion

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

More information

Proofs 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 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 information

Scuola Estiva di Logica Gargnano, August

Scuola 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

Models of computation

Models 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 information

Formal 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 ) 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 information

Small families. (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy

Small families. (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy Small families (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy INRIA Rocquencourt and Microsoft Research-INRIA Joint Centre June 22, 2007 caml years coq sixty years is 31,557,600

More information

A syntactical proof of the operational equivalence of two λ-terms

A syntactical proof of the operational equivalence of two λ-terms A syntactical proof of the operational equivalence of two λ-terms René DAVID and Karim NOUR Abstract In this paper we present a purely syntactical proof of the operational equivalence of I = λxx and the

More information

LOWELL JOURNAL. MUST APOLOGIZE. such communication with the shore as Is m i Boimhle, noewwary and proper for the comfort

LOWELL JOURNAL. MUST APOLOGIZE. such communication with the shore as Is m i Boimhle, noewwary and proper for the comfort - 7 7 Z 8 q ) V x - X > q - < Y Y X V - z - - - - V - V - q \ - q q < -- V - - - x - - V q > x - x q - x q - x - - - 7 -» - - - - 6 q x - > - - x - - - x- - - q q - V - x - - ( Y q Y7 - >»> - x Y - ] [

More information

Computability via the Lambda Calculus with Patterns

Computability 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 information

Programming Languages

Programming 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 information

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University

The 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 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

3. The λ-calculus and Implication

3. The λ-calculus and Implication 3. The λ-calculus and Implication (a) (b) (c) (d) (e) (f) The untyped λ-calculus. The typed λ-calculus. The λ-calculus in Agda. Logic with Implication Implicational Logic in Agda. More on the typed λ-calculus.

More information

The Greek Alphabet. (a) The Untyped λ-calculus

The Greek Alphabet. (a) The Untyped λ-calculus 3. The λ-calculus and Implication Greek Letters (a) The untyped λ-calculus. (b) The typed λ-calculus. (c) The λ-calculus in Agda. (d) Logic with Implication (e) Implicational Logic in Agda. (f) More on

More information

Five Basic Concepts of. Axiomatic Rewriting Theory

Five Basic Concepts of. Axiomatic Rewriting Theory Five Basic Concepts of Axiomatic Rewriting Theory Paul-André Melliès Institut de Recherche en Informatique Fondamentale (IRIF) CNRS & Université Paris Denis Diderot 5th International Workshop on Confluence

More information

Neatest and Promptest Manner. E d i t u r ami rul)lihher. FOIt THE CIIILDIIES'. Trifles.

Neatest and Promptest Manner. E d i t u r ami rul)lihher. FOIt THE CIIILDIIES'. Trifles. » ~ $ ) 7 x X ) / ( 8 2 X 39 ««x» ««! «! / x? \» «({? «» q «(? (?? x! «? 8? ( z x x q? ) «q q q ) x z x 69 7( X X ( 3»«! ( ~«x ««x ) (» «8 4 X «4 «4 «8 X «x «(» X) ()»» «X «97 X X X 4 ( 86) x) ( ) z z

More information

Strong normalization of a symmetric lambda calculus for second order classical logic

Strong normalization of a symmetric lambda calculus for second order classical logic Archive for Mathematical Logic manuscript No. (will be inserted by the editor) Strong normalization of a symmetric lambda calculus for second order classical logic YAMAGATA, yoriyuki e-mail: yoriyuki@ms.u-tokyo.ac.jp

More information

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus

CS 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 information

Lecture 2: Self-interpretation in the Lambda-calculus

Lecture 2: Self-interpretation in the Lambda-calculus Lecture 2: Self-interpretation in the Lambda-calculus H. Geuvers Nijmegen, NL 21st Estonian Winter School in Computer Science Winter 2016 H. Geuvers - Radboud Univ. EWSCS 2016 Self-interpretation in λ-calculus

More information

Light Types for Polynomial Time Computation in Lambda Calculus

Light Types for Polynomial Time Computation in Lambda Calculus Light Types for Polynomial Time Computation in Lambda Calculus Patrick Baillot 1 LIPN - UMR 7030 CNRS - Université Paris 13, F-93430 Villetaneuse, France Kazushige Terui 2 Research Institute for Mathematical

More information

EasyChair Preprint. Normalization and Taylor expansion of lambda-terms

EasyChair 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 information

FORMAL SYSTEMS: COMBINATORY LOGIC

FORMAL 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 information

Computability Theory for Neuroscience

Computability Theory for Neuroscience Computability Theory for Neuroscience by Doug Rubino Abstract Neuronal circuits are ubiquitously held to be the substrate of computation in the brain, information processing in single neurons is though

More information

Cartesian closed 2-categories and rewriting

Cartesian closed 2-categories and rewriting Cartesian closed 2-categories and rewriting Aurore Alcolei A brief presentation of Tom Hirschowitz s paper, Cartesian closed 2-categories and permutation equivalence in higher-order rewriting June 7, 2014

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

Using models to model-check recursive schemes

Using models to model-check recursive schemes Using models to model-check recursive schemes S Salvati and I Walukiewicz Université de Bordeaux, INRIA, CNRS, LaBRI UMR5800 Abstract We propose a model-based approach to the model checking problem for

More information

Characterizing Polynomial and Exponential Complexity Classes in Elementary Lambda-Calculus

Characterizing Polynomial and Exponential Complexity Classes in Elementary Lambda-Calculus Characterizing Polynomial and Exponential Complexity Classes in Elementary Lambda-Calculus Patrick Baillot 1, Erika De Benedetti 2, and Simona Ronchi Della Rocca 2 1 CNRS, ENS de Lyon, INRIA, UCBL, Université

More information

Introduction to first-order logic:

Introduction to first-order logic: Introduction to first-order logic: First-order structures and languages. Terms and formulae in first-order logic. Interpretations, truth, validity, and satisfaction. Valentin Goranko DTU Informatics September

More information

Rewriting, Explicit Substitutions and Normalisation

Rewriting, 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 information

Review. Principles of Programming Languages. Equality. The Diamond Property. The Church-Rosser Theorem. Corollaries. CSE 230: Winter 2007

Review. 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 information

Equivalence of Algebraic λ -calculi extended abstract

Equivalence of Algebraic λ -calculi extended abstract Equivalence of Algebraic λ -calculi extended abstract Alejandro Díaz-Caro LIG, Université de Grenoble, France Alejandro.Diaz-Caro@imag.fr Christine Tasson CEA-LIST, MeASI, France Christine.Tasson@cea.fr

More information

Combinators & Lambda Calculus

Combinators & 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 information

LOWELL WEEKLY JOURNAL

LOWELL WEEKLY JOURNAL Y -» $ 5 Y 7 Y Y -Y- Q x Q» 75»»/ q } # ]»\ - - $ { Q» / X x»»- 3 q $ 9 ) Y q - 5 5 3 3 3 7 Q q - - Q _»»/Q Y - 9 - - - )- [ X 7» -» - )»? / /? Q Y»» # X Q» - -?» Q ) Q \ Q - - - 3? 7» -? #»»» 7 - / Q

More information

Tape encoding of lists of numbers

Tape encoding of lists of numbers L7 74 We ve seen that a Turing machine s computation can be implemented by a register machine. The converse holds: the computation of a register machine can be implemented by a Turing machine. To make

More information

SHARING IN THE WEAK LAMBDA-CALCULUS REVISITED

SHARING 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 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

Parallel Reduction in Type Free Lambda-mu- Calculus

Parallel 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 information

Call-by-Value Non-determinism in a Linear Logic Type Discipline

Call-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 1,, Giulio Manzonetto 1,2, and Michele Pagani 1,2 1 Université Paris 13, Sorbonne Paris Cité, LIPN, F-93430, Villetaneuse,

More information

arxiv: v1 [cs.lo] 29 May 2014

arxiv: v1 [cs.lo] 29 May 2014 An Introduction to the Clocked Lambda Calculus Jörg Endrullis, Dimitri Hendriks, Jan Willem Klop, and Andrew Polonsky VU University Amsterdam, The Netherlands Abstract We give a brief introduction to the

More information

Advanced Lambda Calculus Lecture 5

Advanced 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 information

REVISITING CALL-BY-VALUE BÖHM TREES IN LIGHT OF THEIR TAYLOR EXPANSION

REVISITING CALL-BY-VALUE BÖHM TREES IN LIGHT OF THEIR TAYLOR EXPANSION REVISITING CALL-BY-VALUE BÖHM TREES IN LIGHT OF THEIR TAYLOR EXPANSION EMMA KERINEC, GIULIO MANZONETTO, AND MICHELE PAGANI Université de Lyon, ENS de Lyon, Université Claude Bernard Lyon 1, LIP e-mail

More information

forty-two XLII Equivalent Computers? Lecture 40: Computing with Glue and Photons What is 42? cuarenta y dos Meaning of Numbers Meaning of Numbers

forty-two XLII Equivalent Computers? Lecture 40: Computing with Glue and Photons What is 42? cuarenta y dos Meaning of Numbers Meaning of Numbers ), #, R #,, - ), #, R #,, - Lecture 40: Computing with Glue and Photons Equivalent Computers? z z z... term = variable term term (term) λ variable. term λy. M α λv. (M [y α v]) where v does not occur in

More information

THE A-CALCULUS IS c-incomplete

THE A-CALCULUS IS c-incomplete THE JOURNAL OF SYSTOLIc LoGIc Volume 39, Number 2, June 1974 THE A-CALCULUS IS c-incomplete G. D. PLOTKIN?1. Introduction. The w-rule in the A-calculus (or, more exactly, the AK-fg, 7 calculus) is MZ =

More information

Simply Typed λ-calculus

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

More information

Edinburgh Research Explorer

Edinburgh Research Explorer Edinburgh Research Explorer On the completeness of order-theoretic models of the lambdacalculus Citation for published version: Honsell, F & Plotkin, GD 2009, 'On the completeness of order-theoretic models

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

Karim NOUR 1 LAMA - Equipe de Logique, Université de Savoie Le Bourget du Lac cedex 2

Karim NOUR 1 LAMA - Equipe de Logique, Université de Savoie Le Bourget du Lac cedex 2 S-STORAGE OPERATORS Karim NOUR 1 LAMA - Equipe de Logique, Université de Savoie - 73376 Le Bourget du Lac cedex 2 Abstract In 1990, JL Krivine introduced the notion of storage operator to simulate, for

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Elementary Affine Logic and the Call by Value Lambda Calculus

Elementary Affine Logic and the Call by Value Lambda Calculus Elementary Affine Logic and the Call by Value Lambda Calculus Paolo Coppola 1, Ugo Dal Lago 2, and Simona Ronchi Della Rocca 3 1 Università di Udine 2 Università di Bologna 3 Università di Torino Abstract.

More information