1
我無法將flip的lambda轉換爲SKI combinators(我希望有道理)。這裏是我的轉換:將flip lambda轉換爲SKI條款
/fxy.fyx
/f./x./y.fyx
/f./x.S (/y.fy) (/y.x)
/f./x.S f (/y.x)
/f./x.S f (K x)
/f.S (/x.S f) (/x.K x)
/f.S (/x.S f) K
/f.S (S (/x.S) (/x.f)) K
/f.S (S (K S) (K f)) K
S (/f.S (S (K S) (K f))) (/f.K)
S (/f.S (S (K S) (K f))) (K K)
S (S (/f.S) (/f.S (K S) (K f))) (K K)
S (S (K S) (/f.S (K S) (K f))) (K K)
S (S (K S) (S (/f.S (K S)) (/f.K f))) (K K)
S (S (K S) (S (/f.S (K S)) K)) (K K)
S (S (K S) (S (S (/f.S) (/f.K S)) K)) (K K)
S (S (K S) (S (S (K S) (/f.K S)) K)) (K K)
S (S (K S) (S (S (K S) (S (/f.K) (/f.S))) K)) (K K)
S (S (K S) (S (S (K S) (S (K K) (K S))) K)) (K K)
如果我正確地理解,在B,C,K,W系統,C是翻蓋,它的滑雪條件定義爲S (S (K (S (K S) K)) S) (K K)
。顯然我的答案是不一樣的C組合子...這裏是我使用的轉換規則:
K y = /x.y - K combinator
(SKK) = /x.x - I combinator
(S (/x.f) (/x.g)) = (/x.fg) - S combinator
y = (/x.yx) - eta reduction
/x./y.f = /xy.f - currying
Note that the S rule can convert longer expressions - for example, λ x.abcdeg can be converted by setting f = abcde.
我缺少什麼?