Lambda Calculus Reduction (applicative vs normal order)

364 Views Asked by At

I am a little confused to reduce these lambda calculus expressions. I am instructed to give applicative and normal order reductions for these expressions.

(a) (λx. ((λy.(* 2 y)) (+ x y)))y
(b) (λx. λy. (x y)) (λz. (z y))

Here are the steps I took in my first attempt at (a):
(λx. (* 2 (+ x y)))y
(λx. (* 2 (+ x z)))y (substituting y with z)
(* 2 (+ y z))

I'm unsure if I even reduced that correctly and how I would reduce in applicative order. Any help is appreciated, thanks!

1

There are 1 best solutions below

0
On

The reduction you gave is right. However this is the applicative order.

Recall:

  1. Normal order: The leftmost, outermost redex is always reduced first.
  2. Applicative order: The leftmost, innermost redex is always reduced first.