User:Blashyrkh/UnnamedEsolang

From Esolang
Jump to navigation Jump to search

It's just an idea of a language, anyone is free to refine and implement it. It would be nice (but not mandatory) if you refer me somehow if you implement a language based on this idea.

This is an untyped functional language based on combinators, similar to Lazy K, its crippled little brother Crazy J, Iota, Jot and others.

Syntactically it looks like Lazy K and Unlambda, but uses different set of combinators:

Combinators
Symbol LC expression
0 λ f x . x
1 λ f x . f x
2 λ f x . f (f x) = λ f x . f(2) x
3 λ f x . f(3) x
... ...
9 λ f x . f(9) x
+1 λ n f x . f (n f x)
+ λ n m . n +1 m
* λ m n f x . m (n f) x
^ λ m n . n m
-1 λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)
/ division function, see wikipedia

It may seem that the language is suitable for arithmetics only, but it's not because it's untyped (in typed lambda calculus you can't pass * to +1, in untyped lambda calculus you can). It has duplicative combinators (2..9, +1), it has cancellative combinator (0), it has affine combinators (0, 1, *, ^), it has combinator of rank 3 (+1). The basis seems to be complete. To prove it's completeness (and, hence, Turing-completeness of the language) one need to express S,K,I combinators in this basis (use bruteforce or pen-and-paper).

IO model should be exactly the same as of Lazy K.

Since the language uses Alonzo Church's numerals as its basis, its name should refer Church somehow.