Lambda Calculus: Evaluating Functions

58 Views Asked by At

I have to evaluate two lambda functions. I have done so and will explain how I did. I'm wondering that if it is noticed that I made a mistake someone might say so. I do not want answers; but hints, tips, suggestions, etc.

  1. $[[\lambda n.\lambda m.2(n\times m)](6)](3)$

I bound (n) to $n$ to get: $[\lambda m.2(6\times m)](3)$
Then I bound (3) to $m$ to get: $2(6\times 3)$.
= 36

  1. $[[\lambda f.\lambda m.f(m + m^2))](\lambda n.2n)](3)$

I bound the doubling function to $f$ to get: $[[\lambda m.[\lambda n.2n](m+m^2)](3)$
Then I bound the $(m+m^2)$ to $n$ and got this: $[\lambda m.[2(m+m^2)]](3)$
Then, binding 3 to $m$ to get: $2(3+3^2)$
= 24.

Does anyone see where I may have made any mistakes? Any tips or suggestions would be greatly appreciated.