Trouble solving lambda calculus example

57 Views Asked by At

Let $M \equiv \lambda xy.y(xx)$, then what is $MM(\lambda z.M)$. I tried and i got a recursion, but I know the answer should be M.

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

This seems to be a problem mostly about correctly applying function arguments:

$$MM(\lambda z.M)$$

This is $M$ applied to two arguments, $M$ and $(\lambda z.M)$. That's good because $M$ has 2 parameters $x$ and $y$. So replace the first $M$ with it's definition:

$$(\lambda xy.y(xx))~M~(\lambda z.M)$$

And fit the 2 arguments into the $x$ and $y$ parameters:

$$(\lambda z.M)(MM)$$

Now we have a 1 parameter function, and some argument that totally doesn't matter because the function is a constant as $\lambda z.M$ is always equal to $M$.

$$M$$

The $(MM)$ part could have been anything , as it does not affect the final value.