0

So following this previous post: Lambda Calculus Reduction steps

I'm still confused on some parts.

If I have something like

λx.(λz.zz)(λy.y)x

Notation from linked post:

(λ param . output)input

The Param would be λx, but would the output be (λz.zz) with (λy.y) being the input? Or would the input be (λz.zz)(λy.y) and x is the input?

- I want to say its

(λx.(λz.zz))(λy.y)) x

with the output being (λz.zz) with (λy.y) being the input since that one CAN be the first one to be worked on.

My steps, not sure if it is correct:

  1. (λx.(λz.zz))(λy.y)) x

(λy.y) gets dropped because there is no x to replace

  1. (λz.zz)x

  2. xx

Thanks

Kevin
  • 1

1 Answers1

0

Adding parentheses to your initial expression makes it:
λx.(((λz.zz) (λy.y)) x)
Here, there is only one reduction you can do:
((λz.zz) (λy.y)) => ((λy.y) (λy.y)) => λy.y
So the original expression becomes
λx.((λy.y) x)
which reduces to
λx.x
which is a normal form.

dimvar
  • 561
  • 5
  • 14