combinatory logic (original) (raw)

A combinator is simply a function with no free variables. A free variable is any variable referred to in a function that is not a parameter of that function. The operation of combination is then simply the application of a combinator to its parameters. Combination is specified by simple juxtaposition of two terms, and is left-associative. Parentheses may also be present to override associativity. For example

f⁢g⁢x⁢y=(f⁢g)⁢x⁢y=((f⁢g)⁢x)⁢y

All combinators in combinatory logic can be derived from two basic combinators, S and K. They are defined as

S⁢f⁢g⁢x = f⁢x⁢(g⁢x)
K⁢x⁢y = x

Reference is sometimes made to a third basic combinator, I, which can be defined in terms of S and K.

Combinatory logic where I is considered to be derived from S and K is sometimes known as pure combinatory logic.

Combinatory logic and lambda calculusMathworldPlanetmath are equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmath. However, lambda calculus is more concise than combinatory logic; an expression of size 𝒪⁢(n) in lambda calculus is equivalent to an expression of size 𝒪⁢(n2) in combinatory logic.

For example, S⁢f⁢g⁢x=f⁢x⁢(g⁢x) in combinatory logic is equivalent toS=(λ⁢f⁢(λ⁢g⁢(λ⁢x⁢((f⁢x)⁢(g⁢x))))), and K⁢x⁢y=xis equivalent to K=(λ⁢x⁢(λ⁢y⁢x)).

Title combinatory logic
Canonical name CombinatoryLogic
Date of creation 2013-03-22 12:32:29
Last modified on 2013-03-22 12:32:29
Owner Logan (6)
Last modified by Logan (6)
Numerical id 5
Author Logan (6)
Entry type Definition
Classification msc 03B40
Related topic LambdaCalculus
Related topic Substitutability
Defines combinator
Defines combination
Defines free variable
Defines pure combinatory logic