Beta reduction: how to?

325 Views Asked by At

I'm trying to beta-reduce the following: $$\lambda xy.y((\lambda xyz.xyz)(\lambda u.u)(\lambda u.uu))$$ Anyway I think that I didn't understand terms' scope.

Considering the application in the shape of $ (\lambda x.y)M $ and evaluating by leftmost outermost, at the first step, I have that my $ (\lambda x.y)M $ is:

  1. $ (\lambda xyz.xyz)(\lambda u.u), $ or
  2. $ (\lambda xyz.xyz)(\lambda u.u)(\lambda u.uu)$?

How should I choose M?

Thank you.

1

There are 1 best solutions below

6
On BEST ANSWER

Since the expression overall has the form $\def\L{\lambda}\L xy.yB$, any $\beta$-reduction will have to be inside the subexpression $B$, which is $(\L xyz.xyz)(\L u.u)(\L u.uu))$. There is a standard convention in $\L$-calculus in which $(a\,b\, c)$ is an abbreviation for $((a\,b)\, c)$, so the expression above should be considered short for $$(\color{darkblue}{((\L xyz.xyz)(\L u.u))}\;(\L u.uu)).$$

The only reducible subexpression is colored in dark blue. It has the form $(\L x.B)M$ where $M=\L u.u$, so you should have no trouble reducing it. (If you do, ask a question in the comments.)

After reducing the blue expression to a result $\color{darkblue}{R}$ you can further reduce $(\color{darkblue}{R} (\L u.uu))$.