Beta reduction: how to?

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.

• Are there no parentheses around the $\lambda xy.y$ part? Otherwise it's rather hard to be sure what is meant here. – MJD Oct 10 '14 at 17:20
• No, I suppose they are hidden: before the first lambda and after the last parenthesis in the equation. – MoreOver Oct 10 '14 at 17:40

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))$.
• Are you aware that $\lambda xyz.B$ is a shorthand for $\lambda x.(\lambda y.(\lambda z.B))$? Or should I explain that in more detail? – MJD Oct 10 '14 at 21:58