We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:Kolakoski sequence/Lean
Jump to navigation
Jump to search
Can you rewrite in Lean this lambda calculus implementation (it uses BLC output convention)? Or does it match any of yours already?
I = λ x . x
M = λ x . x x
true = λ x y . x
false = λ x y . y
cons = λ x y f . f x y
0 = λ f x . x
1 = I
2 = λ f x . f (f x)
invert = λ v a b . v b a
expand = λ l v f . l (λ el cont v . el 1 2 (f v) (cont (invert v))) v
main = λ input . (
cons true (
cons false (
M
(λ self . expand (λ f . f true (self self f)) false)
cons
)
)
)