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

From Esolang
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
           )
         )
       )

--Blashyrkh (talk) 12:27, 22 November 2026 (UTC)

We are currently working on other projects. We may look at that program soon, but we cannot give any estimate regarding the timeframe. --Hakerh400 (talk) 17:14, 26 November 2026 (UTC)
No problem, thanks in advance. I'm looking forward to all your contributions to this website, they're always a breath of fresh air. --Blashyrkh (talk) 17:25, 26 November 2026 (UTC)