# What is the result of (λx.λy.x + ( λx.x+1) (x+y)) ( λz.z-4 5) 10?

Could you explain what should I do about

λx.λy.x

part? Thanks.

• Are the numbers encoded in the standard way in $\lambda$-calculus ? If yes, $\lambda x.\lambda y.x$ is $0$. May 30, 2013 at 10:35
• also it seems that you got your parenthesis wrong, since y appears later, it is probably in the scope of the first $\lambda y$. May 30, 2013 at 10:38
• I'm guessing the plus binds tighter, so $\lambda x.\lambda y.x$ is not an individual part. May 30, 2013 at 10:38
• @dkuper paranthesis should be true. May 30, 2013 at 10:39
• if the parenthesis are true, then you have a $y$ floating in your formula, so it does not evaluate to a number. Or as @Samuel says, the + binds tighter, but it is not not standard so parenthesis should be put to avoid ambiguity. May 30, 2013 at 10:44

$(\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10$
$$\begin{array}{l} (\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10\\ \to (\lambda x.\lambda y.(x + (x+y+1)))~(5-4)~10\\ \to (\lambda x.\lambda y.(2x+y+1))~1~10\\ \to (\lambda y.(2*1+y+1))~10\\ \to (2*1+10+1)\\ \to 13 \end{array}$$
• the $13$ is good, but the intermediate steps are weird. In particular the last one is not correct. I put the correct steps in the answer. May 30, 2013 at 10:59