SKI combinator calculus
SKI combinator calculus is a computational system that is a reduced, untyped version of Lambda calculus. The system states that all operations in Lambda calculus can be expressed in terms of the three combinators , , and .
All functions in this system can be expressed using the alphabet of only , , , and parentheses (used as grouping symbols). Although the most formal representation of this system requires fully balanced parentheses, it is usually simplified for readability by leaving out parentheses on the left (those that do not effect order of operations), as expressions are evaluated left to right.
The SKI combinators
(, , and represent expressions made frome the functions , , and , and set values)
takes one argument and returns it:
takes two arguments, throws away the second, and returns the first:
is a substitution operator. It takes three arguments and then returns the first argument applied to the third, which is then applied to the result of the second argument applied to the third. More clearly:
Note that from these definitions it can be shown that SKI calculus is not the minimum system that can fully perform the computations of Lambda calculus, as can be expressed in terms of and :
Formal expression of the SKI combinators
The terms and derivations in this system can also be more formally defined.
Terms: The set of terms is defined recursively by the following rules.
- , , and are terms.
- If and are terms, then is a term.
- Nothing is a term if not required to be so by the first two rules.
Derivations: A derivation is a finite sequence of terms defined recursively by the following rules (where all Greek letters represent valid terms or expressions with fully balanced parentheses):
- If is a derivation of the form , then can also be expressed as the derivation .
- If is a derivation of the form , then can also be expressed as the derivation .
- If is a derivation of the form , then can also be expressed as the derivation .
Assuming a sequence is a valid derivation to begin with, it can be evaluated using these rules. [2]