# Lambda Calculus

## Overview

 Professor Prof. Tobias Nipkow Time and Place T.B.A. Live stream T.B.A. First Lecture T.B.A. Language English TUMonline IN2358 Moodle Course Link Discussion Forum Zulip Lecture Notes Lecture Notes on Lambda Calculus

None yet.

## General notice

• Questions regarding the lecture and exercises can be discussed on Zulip. You can subscribe to all Lambda-* streams by visiting this stream and clicking the curry emoji.
• This course overlaps with the second half of the course Equational Logic and Lambda Calculus (IN2048). Only one of the two courses can be credited towards your degree.
• The weekly homework sheets will be marked but there won’t be a grade bonus.

T.B.A.

## Exercises

 Organiser Lukas Stevens Time and Place T.B.A. First Tutorial T.B.A.

### Exercise Sheets

Exercise sheet Tutorial solution
Coming soon™

## Contents

The $$\lambda$$-calculus is a universal model of computation, i.e. it can simulate any Turing machine, that was introduced by Alonzo Church in the 1930s. Today it forms the basis of many functional programming languages such as Haskell or Idris. Due to the Curry-Howard correspondence terms of the $$\lambda$$-calculus can not only be interpreted as programs but also as proofs. In its simplest form, the $$\lambda$$-calculus only has three rules that dictate how a term can be constructed:

Syntax Name Description
$$x$$ Variable A name representing a parameter or mathematical value.
$$(\lambda x.\ t)$$ Abstraction Function definition where $$t$$ is a $$\lambda$$-term. The variable $$x$$ becomes bound in the expression.
$$(f\ t)$$ Application Applying the function $$f$$ to the argument $$t$$. Both $$f$$ and $$t$$ are $$\lambda$$-terms.

In order to compute with $$\lambda$$-terms we define $$\beta$$-reduction: the term $$(\lambda x.\ t)\ s$$ reduces to $$t[s / x]$$ which means that any occurence of the variable $$x$$ in $$t$$ is replaced by $$s$$. The above rules formalise the basic untyped $$\lambda$$-calculus. In the lecture, we will discuss the theoretical properties of both untyped and (simply) typed lambda calculus. In particular, we will investigate the correspondence of programs and proofs in the second part of the lecture:

1. Untyped Lambda calculus

1. Syntax: Terms, notational conventions, Currying, static binding, free and bound variables, substitution, alpha-conversion.

2. Beta-reduction: Definition of $$\beta$$-reduction. Proof that $$\beta$$-reduction is confluent.

3. Eta-reduction: Motivation, definition and basic properties: termination and (local) confluence.

4. Reduction strategies: Without proof: contraction of leftmost $$\beta$$-redexes leads to a normal form if one exists.

5. Lambda calculus as a programming language: Booleans, pairs, Church numerals, fixed-point combinators.

2. Typed Lambda calculus

1. Simply typed lambda calculus: Simple types. Implicitly and explicitly typed terms. Type checking rules.

2. Type inference: Type-correct terms no longer have a unique type but still a most general type. Proof by a concrete Prolog-like interpretation of the typing rules as backward computation rules.

3. Let-polymorphism: Universally quantified type schemas. Typing rules for “let” and for type schemas. Syntax-directed typing rules with built-in quantifier handling.

4. Curry-Howard correspondence: Types = propositions, lambda-terms = proofs, beta-reduction = proof-reduction. Proof of the subterm property of proofs in normal form. Proof of decidability of intuitionistic propositional logic via proofs in normal form.

## Literature

• Hendrik Pieter Barendregt. The Lambda Calculus, its Syntax and Semantics, North-Holland, 2nd edition, 1984
• Jean-Yves Girard, Yves Lafont, and Paul Taylor. Proofs and Types, Cambridge Tracts in Theoretical Computer Science, Cambridge University Press, 1989
• Chris Hankin. An Introduction to Lambda Calculi for Computer Scientists, King’s College Publications, 2004
• J. Roger Hindley and Jonathan P. Seldin. Introduction to Combinators and Lambda Calculus, Cambridge University Press, 1986
• J. Roger Hindley and Jonathan P. Seldin. Lambda-Calculus and Combinators: An Introduction, Cambridge University Press, 2008