Binary combinatory logic

Binary combinatory logic (BCL) is a complete formulation of combinatory logic (CL) using only the symbols 0 and 1, together with two term-rewriting rules. BCL has applications in the theory of program-size complexity (Kolmogorov complexity).

Syntax

 *  ::= 00 | 01 | 1  

Semantics
Rewriting rules for subterms of a given term (parsing from the left): where x, y, and z are arbitrary terms.
 *  1100xy  -->  x   
 *  11101xyz --> 11xz1yz  

(Note, for example, that because parsing is from the left, 10000</tt> is not a subterm of 11010000</tt>.)

The terms 00</tt> and 01</tt> correspond, respectively, to the K and S basis combinators of CL, and the "prefix 1</tt>" acts as a left parenthesis (which is sufficient for disambiguation in a CL expression).

There are four equivalent formulations of BCL, depending on the manner of encoding the triplet (left-parenthesis, K, S). These are (1, 00, 01)</tt> (as above), (1, 01, 00)</tt>, (0, 10, 11)</tt>, and (0, 11, 10)</tt>.

External resources

 * John's Lambda Calculus and Combinatory Logic Playground