开发者

lambda calculus question - concrete

开发者 https://www.devze.com 2023-02-05 07:42 出处:网络
I have the following开发者_StackOverflow社区 (f.x.f(f x))(y.y+1) = x.(y.y+1)((y.y+1) x) = x.(y.y+1)(x+1)

I have the following

开发者_StackOverflow社区
(f.x.f(f x))(y.y+1) = x.(y.y+1)((y.y+1) x)
= x.(y.y+1)(x+1)
= x.x+1+1

I don't understand why is it ok the last transformation? Shouldn't it be x.(y.y+1)(x+1)= y+1? Why can he get rid of the y


(y . y + 1) is applied to its argument (x + 1), so it's substituted for y to give ((x + 1) + 1).

I don't see how you come up with x . (y . y + 1)(x + 1)= y + 1. y only exists in the scope of the inner function.

0

精彩评论

暂无评论...
验证码 换一张
取 消