COMS W3261
Lecture 24: The Lambda Calculus II

Outline

  1. Normal form
  2. Reduction strategies
  3. The Church-Rosser theorems
  4. The Y combinator
  5. Implementing factorial using the Y combinator

1. Normal Form

2. Reduction Strategies

3. The Church-Rosser Theorems

4. The Y Combinator

5. Implementing Factorial using the Y Combinator

6. Practice Problems

  1. Evaluate (λx.λy.x) a ((λz.b) z) using normal order evaluation and applicative order evaluation.
  2. Evaluate ((λx.a)((λx.x)(λx.((λy.xy)x)))) using normal order evaluation and applicative order evaluation.
  3. Evaluate ((λx.((λw.λz. + w z)1)) ((λx. xx)(λx. xx))) ((λy. * y 1) (- 3 2)) using normal order evaluation and applicative order evaluation.
  4. Prove the Church-Rosser Theorem I.
  5. Prove the Church-Rosser Theorem II.
  6. Give an example of a code optimization transformation that when repeatedly applied to a program always yields the same optimized program.
  7. Evaluate FAC 2.

7. References


aho@cs.columbia.edu
verma@cs.columbia.edu