We are currently working on new rules that expand the scope of this website to allow more content, and are looking for feedback! See Esolanging:2026 topicality proposal to view and give feedback on the current draft.

Draft:Unnamed BLC ripoff

From Esolanging
Jump to navigationJump to search

Semantics

Like Binary lambda calculus, the program is a sequence of bits that correspond to a lambda term. Unlike BLC, however, the syntax can only represent a restricted set of lambda terms; specifically, terms that are Hereditarily of Order Two (or HOT for short).

  • 00x represents two lambda abstractions, e.g. 00M represents λ λ M.
  • 01xy represents an application, e.g. 0101AB01CD represents A B (C D).
  • 10 represents the De Bruijn index 0, and 11 represents the De Bruijn index 1.

Properties

Non-completeness

Statman (1988, 2005)[1][2] proves that there are some lambda terms that cannot be expressed under these restrictions, e.g. B = \x. \y. \z. x (y z) and S = \x. \y. \z. x z (y z).

Ranks

The proof makes use of "ranks" of HOT terms (not to be confused with the usual sense of a combinator's rank); in this language, a term's HOT rank is defined as follows:

  • 10 or 11 has a HOT rank of 0.
  • 01xy has whichever of x's or y's HOT rank is larger.
  • 00x has a HOT rank one higher than x.

Computational class

Statman (1988)[1] proves that the HOT subset, regardless of being incomplete, is Turing-complete; more specifically, he shows that any unary general recursive function has a corresponding HOT term, such that when it is given a Barendregt numeral corresponding to the function's input, it returns the Barendregt numeral corresponding to the function's return value (or loops forever if the function has no return value).

Examples

Cat program

0100100010

This represents the expression (\x. \y. y) (\x. \y. y).