这个Y'怎么可能和这个Y组合器本身一样?

问题描述 投票:0回答:1

我在wiki中看到了这个:

Y' = SSK(S(K(SS(S(SSK))))K)

理解为什么它对应于这个lambda表达式

Y' = (λab.aba) (λab.a(bab))

但我不知道这怎么会和

X = λa.(λx.xx)(λx.a(xx))
X = λa.(λx.a(xx))(λx.a(xx))
一样。

可以通过

β-约简
或其他方式将
Y'
转化为X吗?如何转化?谢谢...

lambda-calculus y-combinator fixpoint-combinators
1个回答
0
投票

我知道!

我们可以做这个:

🤔 = S(K(SS(S(SSK))))K = λab.a(bab)

那么

Y' 
 = (λb'.(λab.a(bab))b'(λab.a(bab)))
 = λx.(λab.a(bab))x(λab.a(bab))
 = λx.🤔x🤔

Y' 
 = SSK(S(K(SS(S(SSK))))K)
 = (λb'.(λab.a(bab))b'(λab.a(bab)))
 = (λb'.(b'((λab.a(bab))b'(λab.a(bab)))))
 = (λb'.(b'(b'((λab.a(bab))b'(λab.a(bab))))))
 = (λb'.(b'(b'(b'((λab.a(bab))b'(λab.a(bab)))))))
 = (λb'.(b'(b'(b'(b'((λab.a(bab))b'(λab.a(bab))))))))
 = ...

Y' 
 = λx.🤔x🤔
 = λx.x(🤔x🤔)
 = λx.x(x(🤔x🤔))
 = ...

Y' f 
 = 🤔f🤔
 = f(🤔f🤔)
 = f(f(🤔f🤔))
 = ...

Y' f = f (Y' f)

那么

Y 
 = S(K(SII))(S(S(KS)K)(K(SII)))
 = λa.(λb.a(bb))(λc.a(cc))

Y f 
 = (λb.f(bb)) (λc.f(cc))
 = f ((λb.f(bb)) (λc.f(cc)))
 = f (Y f)
 = f (f (Y f))
 = f (f (f (Y f)))
 = ...

Y f = f (Y f)
Y' f = f (Y' f)

Y = Y'

S(K(SII))(S(S(KS)K)(K(SII))) = SSK(S(K(SS(S(SSK))))K)

(我不知道这是否正确......)

© www.soinside.com 2019 - 2024. All rights reserved.