ArticleslgStudy

mathematics

SKI combinator calculus

SKI combinator calculus is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SKI combinator calculus rather than just read about it. In short: The SKI combinator calculus is a combinatory logic system and a computational system. It can be thought of as a computer programming language, though it is not convenient for writing software.

Key takeaways

  • SKI combinator calculus belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SKI combinator calculus to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SKI combinator calculus from memory before moving on to harder problems.

Reference excerpt

The SKI combinator calculus is a combinatory logic system and a computational system. It can be thought of as a computer programming language, though it is not convenient for writing software. Instead, it is important in the mathematical theory of algorithms because it is an extremely simple Turing complete language. It can be likened to a reduced version of the untyped lambda calculus. It was introduced by Moses Schönfinkel and Haskell Curry. All operations in lambda calculus can be encoded via abstraction elimination into the SKI calculus as binary trees whose leaves are one of the three symbols S, K, and I (called combinators). I itself is redundant and can be expressed with S and K only, e.g. as SKK, but its use often makes the definitions shorter and easier to grasp.

Notation Although the most formal representation of the objects in this system requires binary trees, for simpler typesetting they are often represented as parenthesized expressions, as a shorthand for the tree they represent. Any subtrees may be parenthesized, but often only the right-side subtrees are parenthesized, with left associativity implied for any unparenthesized applications. For example, ISK means ((IS)K). Using this notation, a tree whose left subtree is the tree KS and whose right subtree is the tree SK can be written as KS(SK). If more explicitness is desired, the implied parentheses can be included as well: ((KS)(SK)).

Informal description Informally, and using programming language jargon, a tree (xy) can be thought of as an application of the function x to an argument y. When evaluated (i.e., when the "function" is "applied" to the argument), the tree "returns a value", i.e., transforms into another tree. The "function", "argument" and the "value" are either combinators or binary trees with application nodes. If they are binary trees, they may be thought of as functions too, if needed. The evaluation operation is defined as follows: (x, y, and z represent expressions made from the combinators S, K, and I, and possibly variables standing for some as yet unspecified SKI expressions): I returns its argument:

Ix = x K, when applied to any argument x, yields a one-argument constant function Kx, which, when applied to any argument y, returns x:

Kxy = x S 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:

Sxyz = xz(yz) Example computation: SKSK evaluates to KK(SK) by the S-rule. Then if we evaluate KK(SK), we get K by the K-rule. As no further rule can be applied, the computation halts here. For all trees x and all trees y, SKxy will always evaluate to y in two steps, Ky(xy) = y, so the ultimate result of evaluating SKxy will always be the same as the result of evaluating y. We say that SKx and I are "functionally equivalent" for any x, because they always yield the same result when applied to any y. From these definitions it can be shown that SKI calculus, while being a minimalistic system, can fully perform any computations of the lambda calculus. All occurrences of I in any expression can be replaced by (SKK) or (SKS) or (SK x) for any x, and the resulting expression will yield the same result. So the "I" is merely syntactic sugar. Since I is optional, the system is also referred to as SK calculus or SK combinator calculus. It is possible to define a complete system using only one (improper) combinator. An example is Chris Barker's iota combinator, which can be expressed in terms of S and K as follows:

ιx = xSK = S(λx.xS)(λx.K)x = S(S(λx.x)(λx.S))(KK)x = S(SI(KS))(KK)x It is possible to reconstruct S, K, and I from the iota combinator. Applying ι to itself gives ιι = ιSK = SSKK = SK(KK) which is functionally equivalent to I. K can be constructed by applying ι twice to I (which is equivalent to application of ι to itself): ι(ι(ιι)) = ι(ιιSK) = ι(ISK) = ι(SK) = SKSK = K. Applying ι one more time gives ι(ι(ι(ιι))) = ιK = KSK = S. The simplest possible term forming a basis is X = λf.f (λxyz.x z (y z)) (λxyz.x), which satisfies X X = K, and X (X X) = S.

Formal definition The terms and derivations in this system can also be more formally defined: Terms: The set T of terms is defined recursively by the following rules.

S, K, and I are terms. If τ1 and τ2 are terms, then (τ1τ2) 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 α and ι are words over the alphabet {S, K, I, (, )} while β, γ and δ are terms):

If Δ is a derivation ending in an expression of the form α(Iβ)ι, then Δ followed by the term αβι is a derivation. If Δ is a derivation ending in an expression of the form α((Kβ)γ)ι, then Δ followed by the term αβι is a derivation. If Δ is a derivation ending in an expression of the form α(((Sβ)γ)δ)ι, then Δ followed by the term α((βδ)(γδ))ι is a derivation. Assuming a sequence is a valid derivation to begin with, it can be extended using these rules. All derivations of length 1 are valid derivations.

Conversion of lambda terms to SKI combinators By extensionality, an expression in the lambda calculus can be converted into a corresponding SKI combinator calculus expression in accordance with the following rules:

λx. x = I λx. c = K c (provided that c does not depend on x) λx. c x = c (provided that c does not depend on x) λx. y z = S (λx.y) (λx.z) Applied to an arbitrary argument, both left and right hand side expressions for each rule produce the same results.

SKI expressions

Self-application and recursion SII is an expression that takes an argument and applies that argument to itself:

SIIα = Iα(Iα) = αα This is also known as U combinator, Ux = xx. One interesting property of it is that its self-application is irreducible:

SII(SII) = I(SII)(I(SII)) = SII(I(SII)) = SII(SII) Or, using the equation Ux = xx as its definition directly, we immediately get U U = U U. Another thing is that it allows one to write a function that applies one thing to the self application of another thing:

(S(Kα)(SII))β = Kαβ(SIIβ) = α(Iβ(Iβ)) = α(ββ) or it can be seen as defining yet another combinator directly, Hxy = x(yy). This function can be used to achieve recursion. If β is the function that applies α to the self application of something else,

β = Hα = S(Kα)(SII) then the self-application of this β is the fixed point of that α:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with SKI combinator calculus

Start with the simplest possible case. Write down what SKI combinator calculus claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SKI combinator calculus before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SKI combinator calculus ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SKI combinator calculus

In research
SKI combinator calculus appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SKI combinator calculus in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SKI combinator calculus is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatory logic, Lambda calculus, so understanding it makes those chapters shorter.
In everyday life
Look for SKI combinator calculus outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SKI combinator calculus” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study SKI combinator calculus in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SKI combinator calculus means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SKI combinator calculus out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SKI combinator calculus in simple terms?

The SKI combinator calculus is a combinatory logic system and a computational system. It can be thought of as a computer programming language, though it is not convenient for writing software.

Why does SKI combinator calculus matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SKI combinator calculus?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SKI combinator calculus.

Tags

  • Combinatory logic
  • Lambda calculus

Keep exploring