Logic Combinatory A4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

pdf version of the entry

Combinatory Logic
https://plato.stanford.edu/archives/win2020/entries/logic-combinatory/ Combinatory Logic
from the Winter 2020 Edition of the First published Fri Nov 14, 2008; substantive revision Mon Nov 16, 2020

Stanford Encyclopedia Combinatory logic (henceforth: CL) is an elegant and powerful logical
theory that is connected to many areas of logic, and has found applications
of Philosophy in other disciplines, especially, in computer science and mathematics.

CL was originally invented as a continuation of the reduction of the set of


logical constants to a singleton set in classical first-order logic (FOL). CL
untangles the problem of substitution, because formulas can be prepared
for the elimination of bound variables by inserting combinators.
Edward N. Zalta Uri Nodelman Colin Allen R. Lanier Anderson Philosophically speaking, an expression that has no bound variables
Principal Editor Senior Editor Associate Editor Faculty Sponsor
represents the logical form of the original formula. Sometimes, bound
Editorial Board
variables are thought to signify “ontological commitments.” Another
https://plato.stanford.edu/board.html
philosophical rôle of CL is to show the variability of the ontological
Library of Congress Catalog Data assumptions a theory has.
ISSN: 1095-5054
Substitution is a crucial operation not only in first-order logics, but also in
Notice: This PDF version was distributed by request to mem-
higher-order logics, as well as in other formal systems that contain a
bers of the Friends of the SEP Society and by courtesy to SEP
content contributors. It is solely for their fair use. Unauthorized variable binding operator, such as the λ-calculi and the ε -calculus. Indeed,
distribution is prohibited. To learn how to join the Friends of the carrying out substitution correctly is particularly pressing in λ -calculi and
SEP Society and obtain authorized PDF versions of SEP entries, in the closely related functional programming languages. CL can emulate
please visit https://leibniz.stanford.edu/friends/ . λ-abstraction despite the fact that CL has no variable binding operators.
This makes CL a suitable target language for functional programming
Stanford Encyclopedia of Philosophy languages to be compiled into.
Copyright c 2020 by the publisher
The Metaphysics Research Lab
Center for the Study of Language and Information The connection to λ -calculi might suggest—correctly—that CL is
Stanford University, Stanford, CA 94305 sufficiently expressive to formalize recursive functions (i.e., computable
Combinatory Logic functions) and arithmetic. Consequently, CL is susceptible to Gödel-type
c 2020 by the author
Copyright incompleteness theorems.
Katalin Bimbó
All rights reserved.
Copyright policy: https://leibniz.stanford.edu/friends/info/copyright/

1
Combinatory Logic Katalin Bimbó

CL is an archetypical term rewriting system (TRS). These systems completeness


comprise a wide range of formal calculi from syntactic specifications of 3. Nonclassical logics and typed CL
programming languages and context-free grammars to Markov algorithms; 3.1 Simple types
even some number theoretic problems may be viewed as special instances 3.2 Intersection types
of questions about TRSs. Several notions and proof techniques that were 4. Models
originally invented for CL, later turned out to be useful in applications to 4.1 Scott’s models
less well-understood TRSs. 4.2 Relational semantics
5. Computable functions and arithmetic
CL is connected to nonclassical logics via typing. First, a correspondence 5.1 Gödel sentence
between formulas that are provable in the implicational fragment of Bibliography
intuitionistic logic and the typable combinatory terms was discovered. Academic Tools
Then the isomorphism was generalized to other combinatory bases and Other Internet Resources
implicational logics (such as the logic of relevant implication, exponential- Related Entries
free linear logic, affine logic, etc.).

Self-reference factors into some paradoxes, such as the widely known liar
1. Schönfinkel’s elimination of bound variables
paradox and Russell’s paradox. The set theoretical understanding of
functions also discourages the idea of self-application. Thus it is
1.1 The problem of substitution
remarkable that pure untyped CL does not exclude the self-application of
functions. Moreover, its mathematical models showed that a theory in Classical first-order logic includes quantifiers that are denoted by ∀ (“for
which functions can become their own arguments is completely sensible, all”) and ∃ (“there is a”). A simple sentence such as “All birds are
in addition to being consistent (what was established earlier using proof animals” may be formalized as ∀x(Bx ⊃ Ax), where x is a variable, B and
theoretic methods). A are one-place predicates, and ⊃ is a symbol for (material) implication.
The occurrences of the variables in the closed formula ∀x(Bx ⊃ Ax) are
bound, whereas those in the open formula Bx ⊃ Ax are free. If we assume
1. Schönfinkel’s elimination of bound variables
1.1 The problem of substitution
that t (for “Tweety”) is a name constant, then an instance of the above
1.2 The operators “nextand” and “U ”
sentence is Bt ⊃ At, that may be read as “Tweety is an animal, provided
1.3 Alternative approaches: basic logic and predicate functors
Tweety is a bird.” This illustrates that the instantiation of a (universal)
2. Combinatory terms and their main properties
quantifier involves substitution.
2.1 Reduction, equality and their formalizations
2.2 Church–Rosser theorems and consistency theorems Due to the simplicity of the example, the substitution of t for x in Bx and
2.3 The existence of fixed points and combinatorial in Ax seems to be easy to understand and to perform. However, a

2 Stanford Encyclopedia of Philosophy Winter 2020 Edition 3


Combinatory Logic Katalin Bimbó

definition of substitution for FOL (and in general, for an abstract syntax, (“nor,” which is Peirce’s joint denial). “Nand” is “not-and,” in other
that is, for a language with a variable binding operator) has to guarantee words, A ∣ B is defined as ¬(A ∧ B), where A, B range over formulas and
that no free occurrence of a variable in the substituted expression becomes ¬ is negation. Going into the other direction, if ∣ is a primitive, then ¬A is
bound in the resulting expression. definable as A ∣ A , and A ∧ B is (A ∣ B) ∣ (A ∣ B) . Although formulas with
numerous vertical lines may quickly become visually confusing and hard
To see what can go wrong, let us consider the (open) formula to parse, it is straightforward to prove that ∣ alone is sufficiently expressive
∀x(Rxy ∧ Rxr), where R is a two-place predicate, r is a name constant to define all the truth-functions.
abbreviating “Russell” and ∧ is conjunction. ∀x(Rxy ∧ Rxr) contains a
free occurrence of y (that is, y is a free variable of the formula), however, Schönfinkel’s aim was to minimize the number of logical constants that
y is not free for a substitution of a term that contains a free occurrence of are required for a formalization of FOL, just as Henry M. Sheffer (indeed,
x , for instance, x itself. More formally, the occurrence of y in the second already Charles S. Peirce) did for classical propositional logic. One of the
argument place of R in ∀x(Rxy ∧ Rxr) is not bound by a quantifier (the two quantifiers mentioned above suffices and the other may be assumed to
only quantifier) of the formula, whereas ∀x(Rxx ∧ Rxr) is a closed be defined. Let us say, ∃xA is an abbreviation for ¬∀x¬A . Even if ¬ and
formula, that is, it contains no free occurrences of variables. Informally, the rest of the connectives are traded in for ∣, two logical constants remain:
the following natural language sentences could be thought of as ∀ and ∣. A further pressing issue is that quantifiers may be nested (i.e., the
interpretations of the previous formulas. “Everybody reads him and scope of a quantifier may fully contain the scope of another quantifier),
Russell,” (where ‘him’ is deictic, or perhaps, anaphoric) and “Everybody and the variable bindings (that could be visualized by drawing lines
reads himself and Russell.” Obviously, the meanings of the two sentences between quantifiers and the variables they bind) may get quite intertwined.
are vastly different, even if we assume that everybody pens something. As Keeping for a moment the familiar logical constants, we may look at the
a contrast, ∀x(Rxw ∧ Rxr) exhibits an unproblematic substitution of the following formula that hints at the emerging difficulties—when the
name constant w for the free occurrence of y . (The latter formula, perhaps, question to be tackled is considered in its full generality.[2]
formalizes the sentence “Everybody reads Ludwig Wittgenstein and
Russell.”) These examples are meant to demonstrate the more complex ∀x(∃y(Py ∧ Bxy) ⊃ ∃y(Py ∧ Bxy ∧ ∀z((Rz ∧ Ozy) ⊃ ¬Cz)))

∀x binds all occurrences of x ; the variables in the second argument place


part of the problem Moses Schönfinkel set out to solve, and for what he
invented CL.[1]
of the two Bs are bound by one of the two ∃y s, the latter of which interacts
with ∀z via Ozy.
1.2 The operators “nextand” and “U ”
Predicates have a fixed finite arity in FOL, and nothing precludes binding
A well-known result about classical sentential logic (SL) is that all truth- at once a variable in the first argument of one predicate and in the second
functions can be expressed in terms of ¬ and ∧ (or of ¬ and ∨ , etc.). A argument of another predicate. (Indeed, FOL would lose some of its
minimal sufficient set of connectives, however, can contain just one expressiveness, if bindings of this sort would be excluded without some
connective such as ∣ (“nand,” which is often called, Sheffer’s stroke), or ↓

4 Stanford Encyclopedia of Philosophy Winter 2020 Edition 5


Combinatory Logic Katalin Bimbó

means to compensate for them.) These difficulties persist when a formula It is useful to have a notation for “nextand” (i.e., “not-exists-and”) without
is transformed into a(n equivalent) formula in prenex normal form. As assuming either that x has a free occurrence in the expressions joined, or
long as the variable bindings can interweave and braid into arbitrarily that if it has one, then it is the last component of the expressions.
complex patterns, there seems to be no way to eliminate bound variables. Following Schönfinkel, we use ∣x for the “nextand” operator that binds x.
(Note that free variables in open formulas—in a sense—behave like local (The notation ∣− , where − is the place for a variable, closely resembles the
name constants, and their elimination is neither intended, nor achieved in Sheffer stroke.) Schönfinkel achieved his goal of the reduction of the set
the procedures described here.) of logical constants for FOL to a singleton set {∣− } , because every formula
of FOL is equivalent to a formula that contains only “nextand.”
Schönfinkel’s ingenuity was that he introduced combinators to untangle
variable bindings. The combinators 𝖲 , 𝖪 , 𝖨 , 𝖡 and 𝖢 (in contemporary A formula ∀xA is usually defined to be well-formed in FOL even if A has
notation) are his, and he established that 𝖲 and 𝖪 suffice to define all the no free occurrences of x . Then, of course, ∀xA is equivalent to A as well
other combinators. In effect, he also defined an algorithm to carry out the as to ∃xA, and such quantifiers are called vacuous. In order to show that
elimination of bound variables, which is essentially one of the algorithms any formula can be rewritten into an equivalent formula that contains only
used nowadays to define bracket abstraction in CL.[3] “nextand,” it is sufficient to inspect the following definitions for ¬, ∨ and
∀ (with suitable variables)—that are due to Schönfinkel.
Schönfinkel introduced a new logical constant U , that expresses the
disjointness of two classes. For instance, UPQ may be written in usual ¬A ⇔df A ∣x A
FOL notation as ¬∃x(Px ∧ Qx) , when P and Q are one-place predicates. A ∨ B ⇔df (A ∣y A) ∣x (B ∣y B)
(The formula may be thought to formalize, for instance, the natural ∀xAx ⇔df (Ax ∣y Ax) ∣x (Ax ∣y Ax)

The definition for ¬, for instance, may be justified by the following


language sentence “No parrots are quiet.”) In the process of the
elimination of the bound variables, UXY is obtained from an expression
equivalences. A ⇔ A ∧ A, A ∧ A ⇔ ∃x(A ∧ A) (assuming that x is not
that contains ‘Xx ’ and ‘Yx’, where x does not occur in X or Y . For
free in A), hence by replacement, ¬A ⇔ ¬∃x(A ∧ A).
example, if X and Y happen to be n-ary predicates with n ≥ 2, then x
occurs only in their last argument places. “Nobody reads Aristotle and Now we give a concrete example to illustrate how to turn a formula of
Plato” can be formalized as ¬∃x(Rxa ∧ Rxp) , where a and p are name FOL into one that contains only ∣− , and then how to eliminate the bound
constants that stand for “Aristotle” and “Plato,” respectively. This formula variables using U and combinators. To put some excitement into the
cannot be written as U(Ra)(Rp). On the other hand, “There is nobody process, we start with the sentence in (#1).
whom both Russell and Wittgenstein read,” that is, ¬∃x(Rrx ∧ Rwx) turns
into U(Rr)(Rw), where the parentheses delineate the arguments of U . (#1) For every natural number there is a greater prime.
Often, the expressions X and Y (in UXY ) consist of predicates (and name
constants) together with combinators and other U s. A straightforward formalization of this sentence—on the foreground of the
domain of numbers—is the formula in (#2), (where ‘Nx’ stands for “x is a

6 Stanford Encyclopedia of Philosophy Winter 2020 Edition 7


Combinatory Logic Katalin Bimbó

natural number,” ‘Px ’ stands for “x is a prime” and ‘Gxy’ is to be read as “ Furthermore, the whole expression can be transformed into XNPG using
x is greater that y”). combinators, where X is composed of U s and combinators only. Such an X
concisely encodes the logical form or logical content of the formula with
(#2) ∀y∃x(Ny ⊃ (Px ∧ Gxy)) the predicates being arguments.[5]
This formula is equivalent to ∀y(Ny ⊃ ∃x(Px ∧ Gxy)) and further to The expressions obtained via the transformations outlined above quickly
¬∃y¬(Ny ⊃ ∃x(Px ∧ Gxy)) . In one or two more steps, we get become lengthy—as trying to rewrite a simple FOL sentence such as
Ny ∣y (Px ∣x Gxy) . (Expressions are considered to be grouped to the left ∃x(Px ∧ Qx) can show.[6] However, this does not diminish the importance
unless parentheses indicate otherwise. E.g., Gxy is ((Gx)y) not G(xy) as of Schönfinkel’s theoretical results. A slight increase (if any) in the length
could have been, perhaps, expected based on the most common way of of the expressions is not even an inconvenience, let alone an impediment
arranging parentheses in FOL formulas.) Unfortunately, neither ∣x nor ∣y in the era of computers with petabytes (or even exa- and zettabytes) of
can be replaced by U in the last expression. However, if the arguments of memory.
G were permuted then the former reduction could be carried out. One of
the combinators, 𝖢 does exactly what is needed: Gxy can be changed to It seems unfortunate that Schönfinkel’s reduction procedure for FOL is not
𝖢Gyx (see the definition of combinators in section 2.1). That is, we have widely known. As a measure of how widely Sheffer’s and Schönfinkel’s
Ny ∣y (Px ∣x 𝖢Gyx), and then Ny ∣y UP(𝖢Gy).[4] The expression may reductions are known, we appeal to the fact that the first is part of standard
give the impression that y is the last component of UP(𝖢Gy), which is the intro courses in logic, whereas the second is not. Undoubtedly, one of the
second argument of ∣y , but it is not so. The grouping within expressions reasons for this is that Schönfinkel’s process to eliminate bound variables
cannot be disregarded, and another combinator, 𝖡 is needed to turn is conceptually more opulent than defining a few truth functions from ∣ (or
UP(𝖢Gy) into the desired form 𝖡(UP)(𝖢G)y . From Ny ∣y 𝖡(UP)(𝖢G)y, ↓). Another reason may be that Schönfinkel, perhaps, did not place a
we get UN(𝖡(UP)(𝖢G)) in one more step. This expression is completely sufficiently strong emphasis on the intermediate step that allows the
free of variables, and it also makes the renaming of bound variables in elimination of all other logical connectives and quantifiers via “nextand.”
FOL easily comprehensible: given two sequences of (distinct) variables The importance of this step was also overlooked in the introduction to the
that are different in their first two elements, the reversal of the above English translation of Schönfinkel’s paper, which was written more than
process yields formulas that are (logically equivalent) alphabetic variants 30 years after the original publication. We may also note that although
of the formula in (#2). “nextand” is an operator in the standard logical sense, it is binary—unlike
∀ and ∃, which are unary.
The expression UN(𝖡(UP)(𝖢G)) may look “unfamiliar” when compared
to formulas of FOL, but notation—to a large extent—is a matter of If A ∣ B ⇔df ¬(A ∧ B) is added as a definition to SL, then the result is a
convention. It may be interesting to note that the first U is simply followed conservative extension, and it becomes provable that for any formula
by its two arguments, however, the second U is not. 𝖡(UP) is a A(p0 , … , pn ) (i.e., for a formula containing the displayed propositional
subexpression, but UP(𝖢G) is not a subexpressions of UN(𝖡(UP)(𝖢G)) . variables and some connectives) there is a formula B(p0 , … , pn )

8 Stanford Encyclopedia of Philosophy Winter 2020 Edition 9


Combinatory Logic Katalin Bimbó

containing only the connective ∣, and B(p0 , … , pn ) ⇔ A(p0 , … , pn ) itself regrouping the arguments. Although some of these additions may look
is provable. ∣ is, of course, interpreted as the “nand” truth function. superfluous or too fussy, for the understanding of Schönfinkel’s procedure
“Nand” as a binary connective or as a binary truth function is of the same to eliminate bound variables, it is crucial to note that formulas are viewed
sort of object as conjunction, disjunction, etc. as structured strings of symbols.[8]

The first stage in Schönfinkel’s extension of FOL is analogous. The In conclusion to this section, it is important to emphasize that there are no
addition of ∣− is (also) a conservative extension of FOL, and every questions of consistency with respect to the above reduction process,
occurrence of ∣− can be eliminated. (We noted that ∣− is a binary operator, because it can be viewed—or described in contemporary terms—as a well-
and so it may be thought to combine a quantifier (∃) with connectives (¬, defined algorithm. It is a completely different issue that if we consider the
∧ ), but ∣− of course, does not introduce any objects that are not definable language of FOL expanded with combinators, then the resulting system is
in FOL.) inconsistent, because CL is powerful enough to define the fixed point of
any function. The effect of having fixed points for all functions—
The second stage in Schönfinkel’s extension of FOL is slightly different. including truth functions—may be thought to amount to adding certain
UXY is definable in FOL only for one-place predicates P and Q (or for biconditionals (which may or may not be valid) as axioms. (For instance,
predicates of higher arity when the variable in their last argument is Russell’s paradox emerges from the fixed point of the negation
bound). Thus, in general, neither U nor the combinators are definable in connective.) Notably, both FOL and (pure) CL are consistent.
FOL.

The elimination of bound variables goes beyond the resources of FOL.


1.3 Alternative approaches: basic logic and predicate
The combinators are not only undefinable, but they are new kinds of
functors
objects—which are absent from FOL itself. Also, the intermediate steps of
In this section we briefly outline two ideas that are related to Schönfinkel’s
the bound variable elimination procedure presuppose that functions of
work or are motivated by his use of combinators in the elimination of
several arguments can be viewed as functions in one variable, and the
bound variables.
other way around.[7] Enriching a presentation of FOL with predicate
letters that have sufficiently many arguments in the right order would be Fitch’s metalogic
more or less unproblematic, and it would add objects to the language that From the late 1930s, Frederic Fitch worked on a logic that he called basic
would have the same sort of interpretation as other predicates. A potential logic. The label is motivated by his aim to provide a framework in which
problem though is that for each predicate, infinitely many (ℵ0 many) new any logic could be formalized. Fitch’s approach is utterly syntactic (much
predicates would be needed—together with axioms stipulating the like Schönfinkel’s), and “formalization” is to be understood as encoding a
intended equivalences between the meanings of the variants of the formally described system in another—not unlike the arithmetization of
predicates. Notationally, these steps amount to padding predicate symbols the syntax in Gödel’s incompleteness theorem.
with extra arguments, omitting some arguments, as well as permuting and

10 Stanford Encyclopedia of Philosophy Winter 2020 Edition 11


Combinatory Logic Katalin Bimbó

In 1942, Fitch introduced a logic that he labeled K . The expressions in K During the next two decades or so after his first paper on basic logic, Fitch
are formed like combinatory terms by a binary application operation, published a series of papers on basic logic devoted to (1) the
which is not assumed to be associative. (See the definition of combinatory representation of recursive functions (i.e., a demonstration of the
terms in the next section.) However, the constants of K do not coincide possibility of the arithmetization of syntax), (2) K ′ , an extension of K
with the constants of pure CL. Fitch uses 10 constants: ε , o, ε,́ ó , W , =, ∧ , with negation, universal quantifier and # (the dual of the ∗ operator), (3)
∨ , E and ∗. The first five constants are combinators, though the notation the consistency of K and K ′ , (4) L , an extension of K ′ with implication
may suggest a different (informal) meaning. ‘=’ is the syntactical identity and necessity operators, (5) the definability of some of the constants such
of expressions. ‘∧ ’ and ‘∨ ’ are intended to stand for “and” and “or.” ‘E’ is as ∗ and #, as well as E.
the analogue of Schönfinkel’s U , but it corresponds to a non-vacuous
existential quantifier. Finally, ‘∗’ is similar to the transitive closure The combinators that are included in K (hence, in all its extensions) are 𝖳,
operator for binary relations or the Kleene star. Notably, there is no 𝖡 and 𝖶. έ and ó are the ternary version of 𝖳 and the quaternary version
negation or universal quantifier in the system. The uses of the constants of 𝖡, respectively. Russell’s paradox involves negation, but (either variant
are characterized as follows—somewhat like axioms characterize of) Curry’s paradox is positive, in the sense that it relies on one or two
combinators. theorems of the positive implicational logic of David Hilbert. This means
that if the various systems of basic logic, especially K ′ and L are
1. = ab if and only if a and b are (syntactically) the same expression consistent, then they either cannot contain full abstraction, or the notions
2. εab if and only if ba of implication, entailment and identity should differ from their usual
3. oabc if and only if a(bc) counterparts. Indeed, K , K ′ and L are not extensional systems. That is,
4. έabc if and only if bac even if two expressions applied to the same expression are always equal,
5. ó abcd if and only if a(bc)d the equality of the applied expressions does not follow. Turning basic
6. Wab if and only if abb logic into an extensional system proved less than straightforward. Fitch’s
7. ∧ab if and only if a and b system JE ′ was shown to be inconsistent by Myhill, which led to a more
8. ∨ab if and only if a or b complicated formulation of the conditions for extensional identity.
9. Eb if and only if ∃a. ba
10. ∗abc if and only if abc and ∃d. abd&adc Basic logic has not (yet) become a widely used general framework for the
description of formal systems; however, renewed interest in this approach
In CL, the axioms are followed up with notions such as one-step and weak is signaled by Updike (2010), which attempts to situate basic logic in the
reduction, the latter of which can be viewed as a computation or inference broader context of foundational work at the middle of the 20th century.
step. (See the next section for some of these notions.) Similarly, an
axiomatic calculus for FOL, for instance, would contain rules of inference Quine’s elimination strategy
in addition to the axioms. One of the obstacles to penetrate the various From the late 1930s, W. V. O. Quine worked on an alternative way to
presentations of basic logic is the lack of a similar formulation. eliminate bound variables from first-order logic. It is plausible to assume

12 Stanford Encyclopedia of Philosophy Winter 2020 Edition 13


Combinatory Logic Katalin Bimbó

that Schönfinkel’s goal was to find a single operator in classical logic and based on their effects. Indeed, the groups of predicate functors are similar
then to eliminate the bound variables—as he claims in Schönfinkel (1924) to classes of combinators, though Quine’s labels are often sublime. In
—rather than defining an overarching symbolic system to describe all order to give a concrete example of this alternative approach, we outline a
mathematics. Nonetheless, CL was soon fused with classical logic in a slightly modified version of a set of predicate functors from Quine (1981).
more free-wheeling fashion, which resulted in an inconsistent system.
A first-order language with ∣− as the only operator is assumed. (F and G
Quine saw the way out of a situation where inconsistency may arise via are metavariables for predicates in the predicate functor language.) ≀n Invn ,
implicit typing of constants that are to some extent similar to combinators. invn , Padn+1 and Refn are predicate functors, for every n ∈ ω. A formula
He called such constants predicate functors, and introduced several groups of FOL is rewritten into a formula in a predicate functor language by
of them, the last one in Quine (1981). applications of the following clauses.

The most common presentations of FOL stipulate that an n-place predicate 1. A variable x and a predicate P of FOL is x and P, respectively, in the
followed by a sequence of n terms (possibly, punctuated by commas and predicate functor language.
surrounded by parentheses) is a formula. (This is in contrast with 2. Fx1 x2 … xn ∣x1 Gx1 x2 … xn :=: (F ≀ G)x2 … xn , where x2 , … , xn are
Schönfinkel’s view of formulas and in accordance with the informal and distinct from x1 , and F and G are followed by the same sequence of
formal interpretations of predicates as n -ary relations. In other words, FOL variables.
does not permit “currying” of predicates or of their interpretations.) Quine 3. Fx1 x2 … xn :=: (Inv F)x2 … xn x1
subscribes to the view that sequences of terms follow predicates. 4. Fx1 x2 … xn :=: (inv F)x2 x1 … xn
5. Fx2 … xn :=: (Pad F)x1 x2 … xn
Predicate functors are not applicable to each other—unlike the 6. Fx1 x1 x2 … xn :=: (Ref F)x1 x2 … xn
combinators are. This is a point that Quine repeatedly emphasizes. Atomic
predicates are the predicates of a first-order language, whereas complex There is an obvious similarity between Ref and 𝖶 , Pad and 𝖪 , as well as
predicates are obtained by applying a predicate functor (of appropriate Inv and inv and various combinators with permutative effects (e.g., 𝖢 and
arity) to predicates (which may be atomic or complex). 𝖳). If ∣− is the only operator in the first-order language, then all formulas,
which are not atomic, are almost of the form of the left-hand side
The prohibition of self-application together with the use of “flat” expression in 2. What has to be assured is that the side condition is
sequences of arguments means that infinitely many predicate functors are satisfied, and that is where clauses 3–6 enter. Although the various n -ary
needed to ensure the elimination of bound variables from all formulas of versions of ≀ , inv , Pad and Ref could be conflated (by ignoring unaffected
FOL. To explain the problem quickly: a permutation of a pair of elements arguments), Inv clearly stands for infinitely many predicate functors,
that are arbitrarily far apart cannot be ensured otherwise. Just as because x1 , … , xn cannot be ignored or omitted.
combinators may be divided into groups based on their effect, Quine was
able to select predicate functors that can be grouped together naturally

14 Stanford Encyclopedia of Philosophy Winter 2020 Edition 15


Combinatory Logic Katalin Bimbó

It may be interesting to note that there is a difference between ≀ and A few natural language examples provide a convenient illustration to
Schönfinkel’s U . Not only the place of the bound variable is different, but clarify the difference between (1), that is a well-formed (but meaningless)
≀ builds in contraction for n − 1 variables (which are separated by ∣− and expression and (2), which is a meaningful (but ill-formed) sentence. (The
other symbols in the left-hand expression). meaningfulness of (2), of course, should be taken with a grain of salt. In
reality, Kurt Gödel proved the system of PM to be incomplete in 1930.
Quine intended the predicate functor language to lead to a novel Thus (2) may be guessed—using syntactic and semantics clues—to be a
algebraization of first-order logic. While bound variables can be distorted version of (2ʹ) Peano arithmetic was proved to be incomplete by
eliminated using predicate functors, Quine never defined an algebra in the Gödel in 1930.)
usual sense—something similar, for instance, to cylindric algebras.
Predicate functors, by design, have a very limited applicability, which has (1) The derivative of λx (x 2 + 4x − 6) wishes to declare that functions
the unfortunate side effect that they seem to be of little interest and not are smart.
much of use outside their intended context. (2) Peano arithmetics prove incomplete with Gödel at 1930.

2. Combinatory terms and their main properties After these informal motivations, we turn to CL proper and introduce
some of its notions a bit more formally.
2.1 Reduction, equality and their formalizations The objects in CL are called terms.[9] Terms may be thought to be
interpreted as functions (as further explained in section 4.1). Primitive
The paradoxes that were discovered by Georg Cantor and Bertrand Russell
terms comprise variables and constants, whereas compound terms are
in the late 19th–early 20th century both involve self-membership of a set.
formed by combining terms. Usually, a denumerable set (i.e., a set with
The ramified theory of types due to Alfred N. Whitehead and Bertrand
cardinality ℵ0 ) of variables is included, and the constants include some
Russell, and ZF (the formalization of set theory named after Ernst Zermelo
(undefined) combinators. (We use x, y, z, v, w, u, x0 , … as variables in the
and Abraham A. Fraenkel) exclude self-membership. However, there
object language, and M, N, P, Q, … as metavariables that range over
seems to have been always a desire to create a theory that allows self-
terms.)
membership or self-application. Indeed, one of Curry’s motivations for the
development of CL was the goal to construct a formal language that Terms are inductively defined as follows.
includes a wide range of well-formed expressions, some of which—under
certain interpretations—may turn out to be meaningless. (This idea may be (t1) If x is a variable, then x is a term;
compared to the von Neumann–Bernays–Gödel formalization of set (t2) if c is a constant, then c is a term;
theory, in which—without the axiom of foundation—the Russell class can (t3) if M and N are terms, then (MN ) is a term.
be proved not to be a set, hence, to be a proper class.)
In the above definition, (t3) conceals the binary operation that conjoins the
two terms M and N . This operation is called application, and it is often

16 Stanford Encyclopedia of Philosophy Winter 2020 Edition 17


Combinatory Logic Katalin Bimbó

denoted by juxtaposition, that is, by placing its two arguments next to each The usual notational convention in CL is to drop parentheses from left-
other as in (MN ). associated terms together with the outmost pair. For instance, xyz would be
fully written as ((xy)z), whereas xy(xz) and (xy)(xz) are both “shorthand
Application is not assumed to possess additional properties (such as versions” of the term ((xy)(xz)) (unlike xyxz ). Grouping in terms
commutativity), because its intended interpretation is function application. delineates subterms. For instance, xy is a subterm of each of the terms
For instance, ((vw)u) and (v(wu)) are distinct terms—just as the derivative mentioned in this paragraph, whereas yz and yx are subterms of none of
of λx. x 2 + 4x − 6 applied to 8 (that is, (λx. 2x + 4)8 = 20) is different those terms.
from the derivative of 90 (that is, (82 + 32 − 6)′ = 0 ). Using λ notation,
the two terms in the example may be expressed as Subterms of a term are recursively defined as follows.

((λy. y′ )(λx. x2 + 4x − 6))8 (s1) M is a subterm of M ;


(s2) if M is a subterm of N or of P, then M is a subterm of NP.
vs
Incidentally, the notion of free variables is straightforwardly definable
(λy. y′)((λx. x2 + 4x − 6)8). now: x is a free variable of M iff x is a subterm of M . The set of free
variables of M is sometimes denoted by fv(M).
If terms are viewed as structured strings (where parentheses show
grouping), then the number of distinct terms associated to a string of All terms are interpreted as functions, and combinators are functions too.
length n is the Catalan number Cn−1 . For a non-negative integer n (i.e., Similarly, to some numerical and geometrical functions, that can be
for n ∈ ℕ), described and grasped easily, the combinators that are frequently
1 2n
n + 1( n )
encountered can be characterized as perspicuous transformations on terms.
Cn = . (Sans serif letters denote combinators and > denotes one-step reduction.)

The first seven Catalan numbers are C0 = 1, C1 = 1, C2 = 2, C3 = 5, Definition. (Axioms of some well-known combinators)
C4 = 14, C5 = 42 and C6 = 132. As an illustration, we may take—for 𝖲xyz ▹1 xz(yz) 𝖪xy ▹1 x 𝖨x ▹1 x
simplicity—strings consisting of x s, because the terms are to differ only in 𝖡xyz ▹1 x(yz) 𝖳xy ▹1 yx 𝖢xyz ▹1 xzy
their grouping. Clearly, if the term is x or xx, that is of length 1 or 2, then 𝖶xy ▹1 xyy 𝖬x ▹1 xx 𝖸x ▹1 x(𝖸x)
there is only one way to form a term, that is, there exists just one possible 𝖩xyzv ▹1 xy(xvz) 𝖡 xyz ▹1 y(xz)

𝖵xyz ▹1 zxy
term in each case. If we start with three xs, then we may form (xx)x or
These axioms tacitly specify the arity of a combinator as well as their
x(xx). If the length of the term is 4, then the five terms are: xxxx , x(xx)x,
reduction (or contraction) pattern. Perhaps, the simplest combinaetor is
xx(xx), x(xxx) and x(x(xx)). (It is a useful exercise to try to list the 14
the identity combinator 𝖨 , that applied to an argument x returns the same x .
distinct terms that can be formed from 5 xs.)
𝖪 applied to x is a constant function, because when it is further applied to

18 Stanford Encyclopedia of Philosophy Winter 2020 Edition 19


Combinatory Logic Katalin Bimbó

y , it yields x as a result, that is, 𝖪 is a cancellator with respect to its second The use of metavariables encompasses substitution (that we illustrated
argument. 𝖶 and 𝖬 are duplicators, because in the result of their above on the term 𝖶MN). The identity axiom and the rule of transitivity
application one of the arguments (always) appears twice.[10] 𝖢 , 𝖳 and 𝖵 imply that ▹ is a transitive and reflexive relation. The last two rules
are permutators, because they change the order of some of their characterize application as an operation that is monotone in both of its
arguments. 𝖡 is an associator, because 𝖡xyz turns into a term in which y is argument places. CL▹ includes only 𝖲 and 𝖪 , because the other
applied to z before x is applied to the result. 𝖸 is the fixed point combinators are definable from them—as we already mentioned in section
combinator, because for any function x , 𝖸x is the fixed point of that 1.2, and as we explain more precisely toward the end of this section.
function (see section 2.3). The combinator 𝖡′ is an associator and a
permutator, whereas 𝖲 and 𝖩 are also duplicators. 𝖲 is very special and it is The set of combinators {𝖲, 𝖪} is called a combinatory base, that is, these
called the strong composition combinator, because when applied to two two combinators are the undefined constants of CL▹ . To give an idea of a
functions, let us say, g and f (in that order), as well as x , then the resulting proof in this calculus, the following steps may be pieced together to prove
term gx(f x) expresses the composition of g and f both applied to the same 𝖲𝖪𝖪(𝖪𝖲𝖪) ▹ 𝖲 . 𝖪𝖲𝖪 ▹ 𝖲 is an instance of an axiom. Then
argument x . 𝖲𝖪𝖪(𝖪𝖲𝖪) ▹ 𝖲𝖪𝖪𝖲 is obtained by right monotonicity, and further,
𝖲𝖪𝖪(𝖪𝖲𝖪) ▹ 𝖲 results by instances of the 𝖲 and 𝖪 axioms together with
These informal explications did not mention any restrictions on the sort of applications of the transitivity rule.
functions x, y, z, f , g, … may be. However, the axioms above limit the
applicability of the combinators to variables. Intuitively, we would like to The relation ▹ is called weak reduction, and it may be defined
say that given any terms, that is, any functions M and N , 𝖶MN one-step alternatively as follows. (‘Weak reduction’ is a technical term used in CL
reduces to MNN (possibly, as a subterm of another term). For example, M to distinguish this relation on the set of terms from some other relations,
may be 𝖪 and N may be yy , and then 𝖶𝖪(yy) ▹1 𝖪(yy)(yy). The latter one of which is called ‘strong reduction’.) A term that is either of the form
term suggests a further one-step reduction, and indeed we might be 𝖲MNP or of the form 𝖪MN is a redex, and the leading combinators (𝖲 and
interested in successive one-step reductions—such as those leading from 𝖪 , respectively) are the heads of the redexes. If a term Q contains a
𝖶𝖪(yy) to yy. A way to achieve these goals is to formalize (a theory of) subterm of the form 𝖲MNP , then Q′ ; which is obtained by replacing that
CL starting with the standard inequational logic but to omit the anti- subterm by MP(NP) is a one-step reduct of Q . (Similarly, for the redex
symmetry rule and to add certain other axioms and rules. 𝖪MN and M.) That is, Q ▹ Q′ in both cases. Reduction then may be
defined as the reflexive transitive closure of one-step reduction. This
Inequational Calculus for CL (CL▹ ). notion is completely captured by CL▹ . The calculus CL▹ is complete in
the sense that if M ▹ N in the sense we have just described, then CL▹
M▹M 𝖲MNP ▹ MP(NP) 𝖪MN ▹ M
proves M ▹ N . (It is easy to see that the converse implication is true too.)
M▹N N▹P M▹N M▹N
M▹P MP ▹ NP PM ▹ PN The notion of reduction is a weaker relation than one-step reduction, and
so it is useful to distinguish a subclass of terms using the stronger relation.

20 Stanford Encyclopedia of Philosophy Winter 2020 Edition 21


Combinatory Logic Katalin Bimbó

A term is in normal form (nf) when it contains no redexes. Note that one- CL▹ and CL= share a feature that may or may not be desirable—
step reduction does not need to decrease the total number of redexes that a depending on what sort of understanding of functions is to be captured. To
term contains, hence, it does not follow that every term can be turned into illustrate the issue, let us consider the one-place combinators 𝖲𝖪𝖪 and
a term in nf via finitely many one-step reductions. Indeed, some terms do 𝖲𝖪(𝖪𝖪) . It is easy to verify that 𝖲𝖪𝖪M ▹ M and 𝖲𝖪(𝖪𝖪)M ▹ M .
not reduce to a term in nf. However, neither 𝖲𝖪𝖪 ▹ 𝖲𝖪(𝖪𝖪) nor 𝖲𝖪(𝖪𝖪) ▹ 𝖲𝖪𝖪 is provable in CL▹ ;
a fortiori, the equality of the two terms in not provable in CL= . This
Reduction is arguably an important relation between terms that denote means that CL▹ and CL= formalize intensional notions of functions,
functions. The typical steps in a program execution and in other concrete where “intensionality” implies that functions that give the same output on
calculations are function applications rather than moves in the other the same input may remain distinguishable.
direction, what is called expansion. However, the notion of the equality of
functions is familiar to everybody from mathematics, and the analogous The archetypical intensional functions that one is likely to encounter are
notion has been introduced in CL too. The transitive, reflexive, symmetric algorithms. As examples, we might think of various specifications to
closure of the one-step reduction relation is called (weak) equality. A calculate the decimal expansion of π, or various computer programs that
formalization of equational CL may be obtained by extending the standard behave in the same way. For instance, compilers (for one and the same
equational logic with combinatory axioms and rules characterizing the language) may differ from each other by using or not using some
combinatory constants and the application operation. optimizations, and thereby, producing programs from a given piece of
code that have identical input–output behavior but different run times.
Equational Calculus for CL (CL= ).
M=M 𝖪MN = M 𝖲MNP = MP(NP) If functions that are indistinguishable from the point of view of their
input–output behavior are to be identified, that is, an extensional
M=N N=P M=N M=N M=N understanding of functions is sought, then CL▹ and CL= have to be
M=P N=M MP = NP PM = PN extended by the following rule, (where the symbol ‡ is to be replaced by ▹
or =, respectively).
The first axiom and the first two rules constitute equational logic. The
constants are again the combinators 𝖲 and 𝖪 . Note that CL= could have Mx ‡ Nx
where x is not free in MN.
been defined as an extension of CL▹ by adding the rule of symmetry, that M‡N
would have paralleled the description of the definition of equality from
reduction as its transitive, symmetric closure. We chose instead to repeat
2.2 Church–Rosser theorems and consistency theorems

The calculi CL▹ and CL= of the previous section formalize reduction and
the inequational axioms and rules with the new notation (and add the rule

equality. However, ▹ and = have some further properties that are


of symmetry) to make the two definitions self-contained and easy to grasp.
The two characterizations of = coincide—as those of ▹ did.
important when the terms are thought to stand for functions. The next
theorem is one of the earliest and best-known results about CL.

22 Stanford Encyclopedia of Philosophy Winter 2020 Edition 23


Combinatory Logic Katalin Bimbó

Church–Rosser theorem (I). If M reduces to N and P, then there is a an enumeration of the rational numbers trying to find an r such that
term Q to which both N and P reduce. r ⋅ 0 = n.

The combinatory terms 𝖶𝖶𝖶 and 𝖶𝖨(𝖶𝖨) are, perhaps, the simplest
examples of terms that do not have a normal form. Both terms induce an
infinite reduction sequence, that is, an infinite chain of successive one-step
reductions. To make the example more transparent, let us assume for a
moment that 𝖶, 𝖨, 𝖢, etc. are not defined from 𝖪 and 𝖲 , but are primitive
constants. The contraction of the only redex in 𝖶𝖶𝖶 returns the same
term, which shows that uniqueness does not imply that the term is in nf.
The contraction of the only redex in 𝖶𝖨(𝖶𝖨) gives 𝖨(𝖶𝖨)(𝖶𝖨) that
FIGURE 1. Illustration for the Church–Rosser theorem (I) further reduces to the term we started with. A slightly more complicated
example of a term that has only infinite reduction sequences is 𝖸(𝖢𝖪𝖨) .
If we think that reduction is like computing the value of a function, then
This term has a reduction sequence (in which each contracted redex is
the Church–Rosser theorem—in a first approximation—can be thought to
headed by 𝖸) that contains infinitely many distinct terms. It is also
state that the final result of a series of calculations with a term is unique—
possible to create infinite reduction sequences that start with 𝖸(𝖢𝖪𝖨) and
independently of the order of the steps. This is a slight overstatement
have various loops too. To sum up, the Church–Rosser theorem, in
though, because uniqueness implies that each series of calculations ends
general, does not guarantee the uniqueness of the term Q . However, if M
(or “loops” on a term). That is, if there is a unique final term, then only
has a normal form then that is unique.
finitely many distinct consecutive calculation steps are possible.
The Church–Rosser theorem is often stated as follows.
A coarse analogy with elementary arithmetic operations, perhaps, can shed
some light on the situation. The addition and multiplication of natural Church–Rosser theorem (II). If N and P are equal, then there is a
numbers always yield a natural number. However, if division is included term Q to which both N and P reduces.
then it is no longer true that all numerical expressions evaluate to a natural
number, since 7/5 is a rational number that is not a natural one, and n/0 is
undefined (even if n were real). That is, some numerical expressions do
not evaluate to a (natural) number. Although the analogy with
combinatory terms is not very tight, it is useful. For instance, n/0
(assuming that the codomain of the function λn. n/0 is extended to permit
r to be rational) could be implemented on a computer by a loop (that
would never terminate when executed if n ≠ 0) which would go through

24 Stanford Encyclopedia of Philosophy Winter 2020 Edition 25


Combinatory Logic Katalin Bimbó

FIGURE 2. Illustration for the Church–Rosser theorem (II) 5. 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)) ▹1 𝖪(𝖪𝖪𝖲)(𝖪𝖪) ▹1 𝖪𝖪(𝖪𝖪) ▹1 𝖪

The second form of the Church–Rosser theorem differs from the first in its The failure of the diamond property is obvious once we note that
assumption. From the definition of equality as a superset of reduction, it is 𝖲𝖪𝖪𝖪 ▹1 𝖪𝖪(𝖪𝖪) (only), but 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)) does not reduce in one
obvious that the first form of the theorem is implied by the second. step to 𝖪𝖪(𝖪𝖪).
However, despite the weaker assumption in the second formulation of the
Church–Rosser theorem, the two theorems are equivalent. Equality is the An appropriate subrelation of reduction is the simultaneous reduction of a
transitive, symmetric closure of reduction, which means that if two terms set of nonoverlapping redexes, which is denoted by ▹sr . ‘Nonoverlapping’
are equal then there is a finite path comprising reduction and expansion means that there are no shared subterm occurrences between two redexes.
steps (which decompose into one-step reductions and one-step expansions, ▹sr includes ▹1 because a one-step reduction of a redex may be viewed
respectively). Then by finitely many applications of the first Church– instead as ▹sr of a singleton set of redexes. ▹sr is, obviously, included in ▹
Rosser theorem (i.e., by induction on the length of the path connecting N (i.e., in reduction). These two facts imply that the reflexive transitive
and P), the first Church–Rosser theorem implies the second formulation. closure of ▹sr is reduction—when the tonicity of the reflexive transitive
closure operation (denoted by ∗ ) is taken into account.
Modern proofs of the Church–Rosser theorem for CL proceed indirectly
because one-step reduction fails to have the diamond property. A binary (1)–(3) summarize the key inclusions between the relations mentioned.
relation R (e.g., reduction) is said to have the diamond property when xRy
and xRz imply that yRv and zRv for some v . If a binary relation R has the (1) ▹1 ⊆ ▹sr ⇒ ▹∗1 ⊆ ▹∗sr
diamond property, so does its transitive closure. To exploit this insight in (2) ▹sr ⊆ ▹ ⇒ ▹∗sr ⊆ ▹∗
the proof of the Church–Rosser theorem, a suitable subrelation of (3) ▹∗1 ⊆ ▹∗ and ▹∗ = ▹.

The central property of ▹sr that we need is the content of the following
reduction has to be found. The sought after subrelation should possess the
diamond property, and its reflexive transitive closure should coincide with
theorem.
reduction.
Theorem. (Diamond property for ▹sr ) If M ▹sr N and M ▹sr P then
there is a term Q such that both N ▹sr Q and P ▹sr Q.
The following counterexample illustrates that one-step reductions of a
term may yield terms that further do not reduce to a common term in one
step. 𝖲𝖪𝖪(𝖪𝖪𝖲) ▹1 𝖲𝖪𝖪𝖪 and 𝖲𝖪𝖪(𝖪𝖪𝖲) ▹1 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)), and The proof of this theorem is an easy induction on the term M. The
then the potential reduction sequences are as follows. properties of ▹sr guarantee that one or more one-step reductions can be
performed at once, but the reductions cannot interfere (or overlap) with
1. 𝖲𝖪𝖪𝖪 ▹1 𝖪𝖪(𝖪𝖪) ▹1 𝖪
each other.
2. 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)) ▹1 𝖪𝖪𝖲 ▹1 𝖪
3. 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)) ▹1 𝖪𝖪(𝖪(𝖪𝖪𝖲)) ▹1 𝖪𝖪(𝖪𝖪) ▹1 𝖪 The consistency of CL follows from the Church–Rosser theorem together
4. 𝖪(𝖪𝖪𝖲)(𝖪(𝖪𝖪𝖲)) ▹1 𝖪(𝖪𝖪𝖲)(𝖪𝖪) ▹1 𝖪𝖪𝖲 ▹1 𝖪 with the existence of (at least two) distinct normal forms.

26 Stanford Encyclopedia of Philosophy Winter 2020 Edition 27


Combinatory Logic Katalin Bimbó

Theorem. (Consistency) CL is consistent, that is, there are terms that have, for example, {𝖡, 𝖢, 𝖪} or {𝖡, 𝖢, 𝖨} , which have some independent
do not reduce to each other, hence they are not equal. interest in view of their connection to simply typed calculi. However,
these bases are far from being combinatorially complete and even a fixed
Not all terms have an nf, however, many do. Examples, first of all, include point combinator is undefinable in them.
𝖲 and 𝖪. (The variables, if included, of which there are ℵ0 many, are all in
nf.) None of these terms contains a redex, hence each reduces only to We could ask a slightly different question: If we start with the base {𝖲, 𝖪}
itself. By the Church–Rosser theorem, it is excluded that some term M and we omit 𝖲, then we get the base {𝖪} and all the combinators strongly
could reduce to both x and 𝖲 (making 𝖲 equal to x ). normalize, but what if we omit 𝖪? Do the combinators over {𝖲} strongly
normalize or at least normalize? The answer is “no.” A term (discovered
The interaction between infinite reduction sequences and nfs deserves a by Henk Barendregt in the early 1970s) that shows the lack of strong
more careful inspection though. The terms 𝖶𝖶𝖶 , 𝖸(𝖢𝖪𝖨) and 𝖶𝖨(𝖶𝖨) normalization is 𝖲𝖲𝖲(𝖲𝖲𝖲)(𝖲𝖲𝖲) . The first 𝖲 is the head of a (indeed, the
have only infinite reduction sequences. However, the existence of an only) redex, and the head reduction sequence of this term is infinite. Since
infinite reduction sequence for a term does not imply that the term has no {𝖲} does not contain any combinator with a cancellative effect, the
normal form (when the combinatory base is complete or contains a existence of an infinite reduction sequence for a term means that the term
cancellator). 𝖸(𝖪𝖨) reduces to 𝖪𝖨(𝖸(𝖪𝖨)), 𝖪𝖨(𝖪𝖨(𝖸(𝖪𝖨))), has no nf. There are shorter combinators over the base {𝖲} without an nf,
𝖪𝖨(𝖪𝖨(𝖪𝖨(𝖸(𝖪𝖨)))), … as well as to 𝖨 . for example, 𝖲(𝖲𝖲)𝖲𝖲𝖲𝖲𝖲 comprises only eight occurrences of 𝖲.

A term weakly normalizes when it has an nf, whereas a term strongly The sorts of questions we illustrated here (or rather, the answers to them)
normalizes when all its reduction sequences lead to an nf (hence, to the nf) can become a bit technical, because they often involve concepts and
of the term. A computational analogue of a strongly normalizing term is a techniques from graph theory, automata theory and the theory of term-
(nondeterministic) program that terminates on every branch of rewriting.
computation, whereas termination on at least one branch is akin to weak
normalization. 2.3 The existence of fixed points and combinatorial
The importance of normalization led to a whole range of questions (and an
completeness

Schönfinkel proved that 𝖲 and 𝖪 suffice to define the other combinators he


extensive literature of answers). How does the order of the reduction steps

introduced, and we mentioned in the definition of CL▹ that the set of


(i.e., a reduction strategy) affect finding the nf (if there is one)? Are there

constants is limited to 𝖲 and 𝖪, because other combinators could be


combinatory bases that guarantee the existence of normal forms for every
combinator over that base? To quickly illustrate possible answers to our
defined from those.
sample questions, we start with noting that if there is no combinator with a
duplicative effect in a base, then all combinators over that base strongly To demonstrate the sense in which definability is understood here we
normalize. This is a very easy answer, and as a concrete base, we could consider the example of 𝖡. The axiom for 𝖡 is 𝖡xyz ▹1 x(yz) , and if we

28 Stanford Encyclopedia of Philosophy Winter 2020 Edition 29


Combinatory Logic Katalin Bimbó

take 𝖲(𝖪𝖲)𝖪 instead of 𝖡, then the following reduction sequence results. to hint at the multiplicity and intricacy of such definitions, we list a
handful of them. We also introduce two further combinators 𝖲′ and 𝖱.
𝖲(𝖪𝖲)𝖪xyz ▹1 𝖪𝖲x(𝖪x)yz ▹1 𝖲(𝖪x)yz ▹1 𝖪xz(yz) ▹1 x(yz)
𝖨 = 𝖲𝖪𝖪 𝖨 = 𝖶𝖪 𝖨 = 𝖢𝖪(𝖪𝖪)
The term 𝖲(𝖪𝖲)𝖪 is in nf, however, to be in nf is not a requirement for
𝖡 = 𝖢𝖡′ 𝖲′ = 𝖢𝖲 𝖲 = 𝖢𝖲′
𝖶 = 𝖲′𝖨 𝖶 = 𝖡(𝖳(𝖡𝖬(𝖡𝖡𝖳)))(𝖡𝖡𝖳) 𝖶 = 𝖢(𝖲(𝖢𝖢)(𝖢𝖢))
definability. It is more convenient to work with defining terms that are in

𝖱 = 𝖡𝖡𝖳 𝖸 = 𝖡𝖬(𝖢𝖡𝖬) 𝖸 = 𝖡′ (𝖡′ 𝖬)𝖬


nf, because an application of a combinator that is not in nf could be started
with reducing the combinator to its normal form. (Also, there are always
infinitely many combinators that reduce to a combinator.) However, note If the fixed point combinator 𝖸 is not taken to be a primitive, then there
that the preference for choosing combinators in nf is not meant to imply are various ways to define it—so far, we have listed three.
that a combinator cannot be defined by two or more terms in nf; below we
give two definitions (involving only 𝖲 and 𝖪) for 𝖨. Fixed point theorem. For any function M , there is a term N such that
MN = N .
If the constants are 𝖲 and 𝖪 , then the combinators are all those terms that
are formed from 𝖲 and 𝖪 (without variables). Once we have defined 𝖡 as The proof of this theorem is easy using a fixed point combinator, because
𝖲(𝖪𝖲)𝖪 , we may use 𝖡 in further definitions as an abbreviation, and we do a term that can play the rôle of N is 𝖸M.
that primarily to reduce the size of the resulting terms as well as to
preserve the transparency of the definitions. Some of the definitions of 𝖸 have slightly different properties with respect
to reduction. But the importance of the fixed point combinator is that it
The following list gives definitions for the other well-known combinators ensures that all functions have a fixed point and all recursive equations
that we mentioned earlier. (Here ‘=’ is placed between a definiendum and can be solved.
a definiens.)
Both Haskell B. Curry and Alan Turing defined fixed point combinators
𝖨 = 𝖲𝖪(𝖪𝖪) 𝖳 = 𝖡(𝖲𝖨)𝖪 𝖢 = 𝖡(𝖳(𝖡𝖡𝖳))(𝖡𝖡𝖳) (in CL or in the λ-calculus). If we consider the definitions
𝖶 = 𝖢𝖲𝖨 𝖬 = 𝖲𝖨𝖨 𝖸 = 𝖡𝖶(𝖡𝖡′𝖬)(𝖡𝖶(𝖡𝖡′ 𝖬))
𝖸1 = 𝖡𝖬(𝖡𝖶𝖡) 𝖸2 = 𝖶(𝖡(𝖡𝖶(𝖡𝖳)))(𝖶(𝖡(𝖡𝖶(𝖡𝖳))))
𝖵 = 𝖡𝖢𝖳 𝖡′ = 𝖢𝖡 𝖩 = 𝖶(𝖡𝖢(𝖡(𝖡(𝖡𝖢))(𝖡(𝖡𝖡)(𝖡𝖡))))
(where the subscripts are added to distinguish the two definitions), then we
can see that 𝖸1 M = M(𝖸1 M), but for 𝖸2 , 𝖸2 M ▹ M(𝖸2 M) holds too. In
The definitions are easily seen to imply that all these combinators depend
on both 𝖲 and 𝖪 , but it is not obvious from the definitions that the defined
this respect, 𝖸1 is similar to Curry’s fixed point combinator (and really, to
any fixed point combinator), whereas 𝖸2 is like Turing’s fixed point
combinators are mutually independent, that is, that none of the listed
combinators is definable from another one. (Clearly, some subsets suffice
combinator.
to define some of the combinators.) We do not intend to give an exhaustive
list of interdefinability between various subsets of these combinators, but

30 Stanford Encyclopedia of Philosophy Winter 2020 Edition 31


Combinatory Logic Katalin Bimbó

The fixed point theorem demonstrates—to some extent—the expressive (k) [x]. M = 𝖪M, where x ∉ fv(M)
power of CL. However, fixed point combinators may be defined from (i) [x]. x = 𝖨
bases without a cancellator (as 𝖸1 and 𝖸2 show). The full power of CL (η) [x]. Mx = M, where x ∉ fv(M)
(with the base {𝖲, 𝖪}) is enunciated by the following theorem. (b) [x]. MN = 𝖡M([x]. N), where x ∉ fv(M)
(c) [x]. MN = 𝖢([x]. M)N, where x ∉ fv(N)
Theorem. (Combinatorial completeness) If f (x1 , … , xn ) = M (s) [x]. MN = 𝖲([x]. M)([x]. N)
(where M is a term containing no other variables than those explicitly
listed), then there is a combinator 𝖷 such that 𝖷x1 … xn reduces to M. For example, if this algorithm is applied to the term λxyz. x(yz) (that is, to
the λ -translation of 𝖡), then the resulting term is 𝖡. However, if η is
The theorem’s assumption may be strengthened to exclude the possibility omitted then a much longer term results, namely, 𝖢(𝖡𝖡(𝖡𝖡𝖨))(𝖢(𝖡𝖡𝖨)𝖨) .
that some occurrences of x do not occur in M. Then the consequent may Another algorithm, for example, consists of clauses (i), (k) and (s).
be strengthened by adding the qualification that 𝖷 is a relevant
combinator, more specifically, 𝖷 is a combinator over {𝖡, 𝖶, 𝖢, 𝖨} (a base 3. Nonclassical logics and typed CL
that does not contain a combinator with cancellative effect), or
equivalently, 𝖷 is a combinator over {𝖨, 𝖩} . (These bases correspond to 3.1 Simple types
Church’s preferred λ𝖨 -calculus.)
Combinatory terms are thought of as functions, and functions are thought
Combinatorial completeness is usually proved via defining a “pseudo” λ- to have a domain (a set of possible inputs) and a codomain (a set of
abstraction (or bracket abstraction) in CL. There are various algorithms to possible outputs). For example, if a unary function is considered as a set of
define a bracket abstraction operator in CL, that behaves as the λ operator ordered pairs, then the domain and codomain are given by the first and
does in a λ-calculus. This operator is usually denoted by [ ] or by λ∗ . The second projections, respectively. If partial and non-onto functions are
algorithms differ from each other in various aspects: (i) the set of permitted, then supersets of the sets resulting from the first and second
combinators they presuppose, (ii) the length of the resulting terms, (iii) projections can also be domains and codomains. Category theory, where
whether they compose into (syntactic) identity with the algorithm that functions are components of categories (without a set theoretic reduction
translates a combinatory term into a λ-term, and (iv) whether they assumed), retains the notions of a domain and a codomain; moreover,
commute with either of the reductions or equalities. every function has a unique domain and codomain.

The first algorithm, the elements of which may already be found in Functions that have the same domain and codomain may be quite
Schönfinkel (1924), consists of the following clauses that are applied in different, however, by abstraction, they are of the same sort or type. As a
the order of their listing. simple illustration, let f1 and f2 be two functions defined as f1 = λx. 8 ⋅ x
and f2 = λx. x/3 . If x is a variable ranging over reals, then f1 and f2 have
the same domain and codomain (i.e., they have the same type ℝ → ℝ),

32 Stanford Encyclopedia of Philosophy Winter 2020 Edition 33


Combinatory Logic Katalin Bimbó

although f1 ≠ f2 , because f1 (x) ≠ f2 (x) whenever x ≠ 0 . The usual Δ ⊢ M: A → B Θ ⊢ N: A


notation to indicate that a function f has A as its domain and B as its Δ, Θ ⊢ MN: B
codomain is f : A → B. It is a happy coincidence that nowadays ‘→’ is
Expressions of the form M: A above are called type assignments. A
often used in logics as a symbol for entailment or (nonclassical)
characteristic feature of type-assignment systems is that if M: A is
implication.
provable then A is considered to be one of the types that can be assigned
Given a set of basic types (that we denote by P), types are defined as to M. However, a provable assignment does not preclude other types from
follows. becoming associated to the same term M, that is a type assignment does
not fix the type of a term rigidly. Δ and Θ on the left-hand side of ⊢ are
1. If p ∈ P then p is a type; sets of type assignments to variables, and they are assumed to be
2. if A, B are types then (A → B) is a type. consistent—meaning that no variable may be assigned two or more types.

To distinguish these types from other types—some of which are Type assignment systems are often called Curry-style typing systems.
introduced in the next section—they are called simple types. Another way to type terms is by fixing a type for each term, in which case
each term has exactly one type. Such calculi are called Church-style typing
The connection between combinators and types may be explained on the systems. Then, for example, the identity combinator 𝖨 of type
example of the identity combinator. Compound combinatory terms are
formed by the application operation. Premises of modus ponens can be (A → A → A) → A → A → A
joined by fusion (denoted by ∘ ), which is like the application operation in
the strongest relevance logic B. 𝖨x ▹ x and so if x 's type is A, then 𝖨x's is not the same as the identity combinator 𝖨 of type
type should imply A . Furthermore, 𝖨x 's type should be of the form X ∘ A ,
((B → B) → B) → (B → B) → B.
for some type X; then 𝖨 can be of type A → A. In the example, we fixed
x 's type, however, 𝖨 can be applied to any term, hence, it is more accurate The two styles of typing have quite a lot in common, but there are certain
to say that A → A is the type schema of 𝖨 , or that 𝖨's type can be any differences between them. In particular, no self-application is typable in a
formula of the form of self-implication. Church-style typing system, whereas some of those terms can be assigned
a type in a Curry-style typing system. Curry-style typing systems proved
The type-assignment system TACL is formally defined as the following
very useful in establishing various properties of CL and λ-calculi. The
deduction system. (When implicational formulas are considered as types,
Church-style typing, on the other hand, emulates more closely the typing
the usual convention is to omit parentheses by association to the right.)
in certain functional programming languages (without objects).
Δ ⊢ 𝖲: (A → B → C) → (A → B) → A → C
There is no one-one correspondence between types and combinators in
Δ ⊢ 𝖪: A → B → A either style of typing: not all combinators can be assigned a type, and
some implicational formulas cannot be assigned to any combinatory term.
Δ ⊢ M: A → B Θ ⊢ N: A

34 Stanford Encyclopedia of Philosophy Winter 2020 Edition 35


Combinatory Logic Katalin Bimbó

A combinator that can be assigned a type is said to be typable, and a type Theorem. A → B is a theorem of R→ (or T→ ) iff for some M,
that can be assigned to a combinator is said to be inhabited. For instance, M: A → B is a provable type assignment where M is a combinator
𝖬 has no (simple) type, because an implicational formula is never over {𝖡, 𝖨, 𝖶, 𝖢} (or over {𝖡, 𝖡′ , 𝖨, 𝖲, 𝖲′} ).
identical to its own antecedent. On the other hand, Peirce’s law,
((A → B) → A) → A is not the type of any combinator in the type The calculus TACL may be amended by adding axiom schemas for the
assignment system TACL. Despite (or, indeed, due to) the discrepancy combinators in the two bases. (The axiom schemas of the combinators that
between implicational formulas and combinatory terms, classes of are not in these bases may be omitted from the calculus or simply may be
implicational formulas that can be assigned to certain sets of combinatory neglected in proofs.) The new axioms are as follows.
terms coincide with sets of theorems of some important logics.
𝖡: (A → B) → (C → A) → C → B
Theorem. A → B is a theorem of the intuitionistic implicational logic, 𝖡′ : (A → B) → (B → C) → A → C
denoted by IPC→ or J→ , iff for some M, M: A → B is a provable type 𝖢 : (A → B → C) → B → A → C
𝖶: (A → A → B) → A → B
assignment in TACL, where the term M is built from 𝖲 and 𝖪 , that is,
M is a combinator over the base {𝖲, 𝖪}. 𝖲′: (A → B) → (A → B → C) → A → C
𝖨: A → A

The combinatory base {𝖡, 𝖢, 𝖶, 𝖨} is especially interesting, because these


A combinator that inhabits an implicational theorem encodes a proof of
that theorem in the deduction system TACL . There is an algorithm to
combinators suffice for a definition of a bracket abstraction that is
recover the formulas that constitute a proof of the type of the combinator,
equivalent to the λ -abstraction of the λ𝖨 -calculus. To put it differently, all
moreover, the algorithm produces a proof that is minimal and well-
functions that depend on all of their arguments can be defined by this base.
structured. The correspondence between implicational theorems of
The other base allows the definition of functions that can be described by
intuitionistic logic (and their proofs) and typable closed λ-terms (or
terms in the class of the so-called hereditary right maximal terms (cf.
combinators) is called the Curry–Howard isomorphism. The usual notion
Bimbó 2005). Informally, the idea behind these terms is that functions can
of a proof in a Hilbert-style axiomatic system is quite lax, but it can be
be enumerated, and then their successive applications should form a
tidied up to obtain the notion of traversing proofs. In a traversing proof
sequence in which the indexes are “globally increasing.”
there is a one-one correspondence between subterms of a combinator and
the formulas in the traversing proof as well as between applications and A type assignment has two parts: a term and a formula. The questions
detachments therein (cf. Bimbó 2007). whether some term can be assigned a type and whether some type can be
assigned to a term are the problems of typability and of inhabitation,
The above correspondence can be modified for other implicational logics
respectively. Although these questions may be posed about one and the
and combinatory bases. The next theorem lists correspondences that obtain
same set of type assignments, the computational properties of these
between the implicational fragments of the relevance logics R and T and
problems may differ widely.
some combinatory bases that are of interest in themselves.

36 Stanford Encyclopedia of Philosophy Winter 2020 Edition 37


Combinatory Logic Katalin Bimbó

Theorem. It is decidable if a term M can be assigned a type, that is, if in the exceptional case when the major premise is an instance of self-
M is typable. identity it is identical to the minor premise). The lack of the retention of
all subformulas of premises through applications of modus ponens is the
The theorem is stated in a rather general way without specifying exactly culprit behind the difficulty of some of the decision problems of
which combinatory base or which modification of TACL is assumed, implicational logics. It is then somewhat unsurprising that for many
because the theorem holds for any combinatory base. Indeed, there is an decidable logics there is a decision procedure utilizing sequent calculi in
algorithm that given a combinator decides if the combinator is typable, which the cut theorem and the subformula property hold. A solution to the
and for a typable combinator produces a type too. Of course, in the problem of inhabitation may run into difficulties similar to those that arise
combinatorially complete base {𝖲, 𝖪} all the combinators are expressible in decidability problems in general.
as terms consisting of these two combinators only. However, this
assumption is not needed for a solution of typability, though it might For example, the combinator 𝖪 can be assigned the following type.
provide an explanation for the existence of a general algorithm.
p → (q → (q → q → q) → (q → q) → q → q) → p
The problem of inhabitation does not have a similar general solution,
because the problem of the equality of combinatory terms is undecidable. 𝖲𝖪𝖪 can be assigned the type p → p. There is a proof in TACL ending in
Given a set of axiom schemas that are types of combinators with 𝖲𝖪𝖪: p → p that does not contain the long formula above. However, there
detachment as the rule of inference, the problem of the decidability of a is a proof of 𝖲𝖪𝖪: p → p that contains the above formula the second
logic can be viewed as the problem of inhabitation. Indeed, if A is an antecedent of which is not a subformula of p → p, indeed, the sets of the
implicational formula, then to decide whether A is a theorem amounts to subformulas of the two formulas are disjoint. (We picked two different
determining if there is a term (over the base that corresponds to the axiom propositional variables, p and q to emphasize this point.) Some important
schemas) that can be assigned A as its type. (Of course, a more cases of the problem of inhabitation, however, are decidable.
sophisticated algorithm may actually produce such a term, in which case it
Theorem. It is decidable if a type has an inhabitant over the base
{𝖲, 𝖪}.
is easy to verify the correctness of the claim by reconstructing the proof of
the theorem.)
This theorem amounts to the typed version of the decidability of the
To see from where complications can emerge in the case of decidability,
implicational fragment of intuitionistic logic that is part of Gentzen’s
we compare the rule of the formation of terms and the rule of detachment.
decidability result (dating from 1935).
Given a combinatory base and a denumerable set of variables, it is
decidable by inspection whether a term is or is not in the set of the Theorem. It is decidable if a type has an inhabitant over the base
generated terms. That is, all the inputs of the rule are retained in the output {𝖨, 𝖢, 𝖡′ , 𝖶}.
as subterms of the resulting term. In contrast, an application of detachment
results in a formula that is a proper subformula of the major premise (and

38 Stanford Encyclopedia of Philosophy Winter 2020 Edition 39


Combinatory Logic Katalin Bimbó

The theorem is the typed equivalent of the decidability of the implicational The rule of substitution is built-in into the formulation of TACL via the
fragment of the logic of relevant implication. The decidability of R→ was rule schema called detachment and the axiom schemas for the basic
proved by Saul A. Kripke in 1959 together with the decidability of the combinators. It is obvious that there are formulas of least complexity that
closely related E→ (the implicational fragment of the logic of entailment). are types of 𝖲 and 𝖪 , such that all the other types of 𝖲 and 𝖪 are their
substitution instances. A formula that has this property is called a principal
Theorem. It is decidable if a type has an inhabitant over the base type of a combinator. Obviously, a combinator that has a principal type,
{𝖡, 𝖡′ , 𝖨, 𝖶}. has denumerably many principal types, which are all substitution instances
of each other; hence, it is justified to talk about the principal type schema
the theorem is the typed version of the decidability of the implicational
of a combinator. The existence of principal types for complex combinators
fragment of the logic of ticket entailment T→ , that was proved—together
t (T with is not obvious, nevertheless, obtains.
with the decidability of R→ (R→ with the truth constant t) and T→ →
the truth constant t)—in Bimbó and Dunn (2012) and Bimbó and Dunn Theorem. If the term M is typable, then M has a principal type and a
(2013). An independent result (for T→ only) is in Padovani (2013), which principal type schema.
extends Broda et al. (2004).
Principal types and principal type schemas may seem now to be
The decision procedures for T→ t and Rt do not use TA
→ CL or axiomatic interchangeable everywhere. Thus we could take a slightly different
calculi, instead, they build upon consecution calculi (i.e., sequent calculi approach and define TACL to include axioms and the rule schema of
in which the structural connective is not assumed to be associative). The detachment together with the rule of substitution. This version of TACL
idea that there is an affinity between structural rules and combinators goes would assume the following form.
back at least to Curry (1963). To tighten the connection, Dunn and Meyer
(1997) introduced structurally free logics in which introduction rules for Δ ⊢ 𝖲: (p → q → s) → (p → q) → p → s
combinators replace structural rules—hence the label for these logics.
Bimbó and Dunn (2014) introduced a technique to generate a combinatory Δ ⊢ 𝖪: q → s → q
inhabitant for theorems of T→ from their standard proofs in the sequent Δ ⊢ M: A → B Θ ⊢ N: A
t . Sequent calculi
calculus, which is used in the decision procedure for T→ Δ, Θ ⊢ MN: B
provide better control over proofs than natural deduction or axiomatic
systems do. The combinatory extraction procedure of Bimbó and Dunn
Δ ⊢ M: A
(2014) yields an effective link between combinators and types grounded in Δ[P/B] ⊢ M: A[P/B]
sequent calculus proofs, which obviates the apparent advantage of TACL where P ranges over propositional variables. (The substitution notation is
and axiomatic systems. extended—in the obvious way—to sets of type assignments.) Clearly, the
two deduction systems are equivalent.

40 Stanford Encyclopedia of Philosophy Winter 2020 Edition 41


Combinatory Logic Katalin Bimbó

If substitution were dropped altogether, then the applicability of and q → r would have to be unified, but they cannot be unified no matter
detachment would become extremely limited, for instance, 𝖲𝖪 no longer what formula is substituted for q. An immediate consequence of this is
would be typable. A compromise between having substitution everywhere that 𝖶𝖨 is not typable.
and having no substitution at all is to modify the detachment rule so that
that includes as much substitution as necessary to ensure the applicability On the other hand,

(r → r) → r → r
of the detachment rule. Such a rule (without combinatory terms or type
assignments) was invented in the 1950s by Carew A. Meredith, and it is
usually called condensed detachment. The key to the applicability of and
detachment is to find a common substitution instance of the minor premise
and of the antecedent of the major premise. This step is called unification. ((s → s) → s → s) → (s → s) → s → s
(A bit more formally, let s(A) denote the application of the substitution s
are substitution instances of p → p and of q → q. Furthermore, all simple
to A. Then, the result of the condensed detachment of A from B → C is
types are substitution instances of a propositional variable, hence 𝖨𝖨 can be
s(C) , when there is an s such that s(A) = s(B) , and for any s1 with this
assigned both the type r → r and the type (s → s) → s → s —and, of
property, there is an s2 such that s1 is the composition of s and s2 .)
course, the latter happens to be an instance of the former because A → A
Notice that it is always possible to choose substitution instances of a pair is the principal type schema of 𝖨𝖨. If we apply condensed detachment to
of formulas so that the sets of their propositional variables are disjoint, p → p and q → q, then we get q → q (via the substitutions [p/q → q] and
because formulas are finite objects. The most general common instance of [q/q]), and so condensed detachment yields the principal type of 𝖨𝖨.
two formulas A and B (that do not share a propositional variable) is C , Incidentally, 𝖨𝖨 and 𝖨 provide an excellent example to illustrate that
where C is a substitution instance of both A and B, and propositional distinct terms may have the same principal type schema.
variables are identified by the substitutions only if the identification is
Condensed detachment has been used extensively to refine
necessary to obtain a formula that is a substitution instance of both A and
axiomatizations of various implicational logics, especially, in search for
B. The unification theorem (specialized to simple types) implies that if two
shorter and fewer axioms. Some logics may be formulated using axioms
formulas A and B have a common instance then there is a formula C such
(rather than axiom schemas) together with the rule of condensed
that all the common instances of A and B are substitution instances of C .
detachment—without loss of theorems. All the logics that we mentioned
Obviously, a pair of formulas either has no common instance at all, or it
so far (J→ , R→, T→ and E→) are D-complete, that is, they all may be
has ℵ0 many most general common instances.
axiomatized by axioms and the rule of condensed detachment. That is, the
A famous example of a pair of formulas that have no common instance is implicational fragments of classical and intuitionistic logics, and the
A → A and A → A → B. The instances p → p and q → q → r share no implicational fragments of the relevance logics R, E and T are all D -
propositional variables, however, neither q → q nor (q → r) → q → r complete. (See Bimbó (2007) for some further technical details.)
matches the shape of the second formula. To put the problem differently, q

42 Stanford Encyclopedia of Philosophy Winter 2020 Edition 43


Combinatory Logic Katalin Bimbó

Simply typed systems have been extended in various directions. Logics Of course, if TACL is augmented with an expanded set of types, then new
often contain connectives beyond implication. It is a natural modification instances of the previously assigned types become available. However, the
of a type assignment system to expand the set of types via including gist of having types with the new type constructors ∧ and ⊤ is that the set
further type constructors. Conjunction and fusion are the easiest to explain of types has a richer structure than the relationships between types
or motivate as type constructors, however, disjunction and backward determined by the rules of substitution and modus ponens.
implication have been introduced into types too. Types are useful, because
they allow us to get a grip on classes of terms from the point of view of The structure of intersection types is described by the conjunction–
their behavior with respect to reduction. implication fragment of B, the basic relevance logic. In the following
presentation of this logic, ≤ is the main connective (an implication) of a
Tait’s theorem. If a combinatory term M is typable (with simple formula and ⇒ separates the premises and the conclusion of an inference
types) then M strongly normalizes, that is, all reduction sequences of rule.
M are finite (i.e., terminate).
A≤A A≤⊤ ⊤≤⊤→⊤
The converse of this claim is, obviously, not true. For example, 𝖶𝖨 A≤A∧A A∧B ≤A A∧B≤B
strongly normalizes but untypable, because the antecedent of contraction A ≤ B, B ≤ C ⇒ A ≤ C
cannot be unified with any instance of self-implication. The aim to extend A ≤ B, C ≤ D ⇒ A ∧ C ≤ B ∧ D
the set of typable terms led to the introduction of ∧ into types. (A → B) ∧ (A → C) ≤ (A → (B ∧ C))
A ≤ B, C ≤ D ⇒ B → C ≤ A → D
3.2 Intersection types
The axiom schemas for the combinators 𝖲 ,𝖪 and 𝖨 are as follows. Note
that the axiom for 𝖲 is not simply a substitution instance (with new
A different way to look at the problem of typing 𝖶𝖨 is to say that 𝖶
connectives included) of the previous axiom for 𝖲 .
should have a type similar to the formula (A → (A → B)) → A → B, but
in which the formulas in place of the two formulas A and A → B in the Δ ⊢ 𝖲: (A → B → C) → (D → B) → (A ∧ D) → C
antecedent can be unified. This is the motivation for the inclusion of
conjunction (∧ ) and top (⊤) as new type constructors. Δ ⊢ 𝖪: A → B → A Δ ⊢ 𝖨: A → A

An extended type system, that is often called the intersection type There are four new rules added, and there is an axiom for ⊤.
discipline, is due to Mario Coppo and Mariangiola Dezani-Ciancaglini.
Δ ⊢ M: A Δ ⊢ M: B Δ ⊢ M: A ∧ B Δ ⊢ M: A ∧ B
The set of intersection types (denoted by wff) is defined as follows.
Δ ⊢ M: A ∧ B Δ ⊢ M: A Δ ⊢ M: B
1. p ∈ wff if p is a propositional variable; Δ ⊢ M: A A ≤ BB
2. ⊤ ∈ wff, where ⊤ is a constant proposition;
Δ ⊢ M: ⊤
Δ ⊢ M: B
3. A, B ∈ wff implies (A → B), (A ∧ B) ∈ wff .

44 Stanford Encyclopedia of Philosophy Winter 2020 Edition 45


Combinatory Logic Katalin Bimbó

This type assignment system is equivalent to the intersection type 710 is 111 , that is, 7 = 1 ⋅ 22 + 1 ⋅ 21 + 1 ⋅ 20 = 4 + 2 + 1.) Each binary
assignment system for the λ -calculus, and it allows a more precise representation is of the form
characterization of classes of terms with respect to the termination of
reduction sequences. bm ⋅ 2m + bm−1 ⋅ 2m−1 + ⋯ + b1 ⋅ 21 + b0 ⋅ 20 ,

Theorem. where each b is 0 or 1 . Then each binary number may be viewed as the
(1) A term M normalizes whenever M is typable. characteristic function of a finite subset of natural numbers. (On the left,
(2) A term M strongly normalizes whenever M is typable and the there are infinitely many zeros, as in … 000111, which are omitted.) For a
proof does not contain ⊤ . natural number n, en denotes the corresponding finite set of natural
numbers. (E.g., e7 = {0, 1, 2}.)
4. Models The positive topology on Pω comprises finitely generated open sets. Let E
denote the finite subsets of ω . X ⊆ Pω is open iff X is a cone (with respect
CL has various kinds of models, three of which are exemplified in some
to ⊆) generated by a subset of E . Given the positive topology, a function
detail in this section. Algebraic models (often called “term models”) may
f : Pω → Pω turns out to be continuous (in the usual topological sense) iff
be constructed without difficulty for both the inequational and the
f (x) = ∪{f (en ): en ⊆ x} , where en ∈ E . This means that m ∈ f (x) iff
equational systems of CL that were introduced in section 2.1. The set of
∃en ⊆ x. m ∈ f (en ) , which leads to a characterization of a continuous
terms forms an algebra, and given a suitable equivalence relation (that is
function f by the pairs of natural numbers (n, m).
also a congruence), the application operation can be lifted to the
equivalence classes of terms in the standard way. The quasi-inequational A one-one correspondence between (ordered) pairs of natural numbers and
characterization of the so obtained algebra provides the basis for an natural numbers is defined by
algebraic semantics for these logics. Isolating the Lindenbaum algebra and
[(n + m) ⋅ (n + m + 1)] + 2 ⋅ m
verifying that it is not a trivial algebra constitutes a consistency proof for (n, m) =
CL▹ and CL= . 2
The set of pairs that constitute a (unary) function is sometimes called the
4.1 Scott’s models graph of the function. The graph of a continuous function f : Pω → Pω is
defined by graph(f ) = {(n, m): m ∈ f (en )}. In order to be able to model
Dana Scott defined Pω and D∞ for the λ-calculus. We first outline Pω—
type-free application—including self-application—subsets of ω should be
viewed as functions too. For x, y ⊆ ω, the function determined by y is
the so-called graph model, which is easier to understand.

The natural numbers have a very rich structure. Pω is the power set of the defined as fun(y)(x) = {m: ∃en ⊆ x. (n, m) ∈ y}. For a continuous
set of natural numbers and it is at the core of the model bearing the same function f , fun(graph(f )) = f holds.
label. Every natural number has a unique representation in base 2. (E.g.,

7=1⋅ 2
+1⋅ 1
+1⋅ 0
=4+2+1
46 Stanford Encyclopedia of Philosophy Winter 2020 Edition 47
Combinatory Logic Katalin Bimbó

The graph model of CL maps terms into subsets of ω . To start with, the (e.g., {{a}, {a, b}}) is never identical to either of its two elements.
combinators have concrete sets as their interpretations. As a simple Therefore, the main question concerning a mathematical model of CL is
example, 𝖨 = {(n, m): m ∈ en }. Of course, each pair corresponds to an how to deal with self-application.
element of ω, hence, we get a set of natural numbers. In particular, some
of the elements are {1, 6, 7, 11, 15, 23, 29, 30, …}. Scott’s original model is built starting with a complete lattice (D, ≤). That
is, (D, ≤) is a partially ordered set in which greatest lower bounds (infima)
If the combinators (as well as the variables) are interpreted as subsets of and least upper bounds (suprema) exist for arbitrary sets of elements. A
ω, then function application should take the first set (viewed as a function function f from (D, ≤) into a complete lattice (E, ≤) is said to be
of type Pω → Pω) and apply that to the second set. fun(y) is a suitable continuous when it preserves the supremum of each ideal on D, where an
function that is determined by y ⊆ ω . In general, if M and N are CL- ideal is an upward directed downward closed subset.
terms, and I is the interpretation of atomic terms into Pω, then I is
extended to compound terms by I(MN) = fun(I(M))(I(N)). (E.g., let I(x) A topology may be defined on D by selecting certain increasing sets as the
be e9 = {0, 3}. I(𝖨x) = fun(I(𝖨))(I(x)) = {m: ∃en ⊆ I(x). (n, m) ∈ I(𝖨)}. opens. More precisely, if I is an ideal and C is a cone, then C is open iff
We know what I(𝖨) and I(x) are; hence, we get further that C ∩ I ≠ ∅ provided that ⋁ I ∈ C, that is, provided that the supremum of I
I(𝖨x) = {m: ∃en ⊆ e9 . m ∈ en } . Of course, {0, 3} ⊆ {0, 3} , and so we is an element of C . (For example, complements of principal ideals are
have that I(𝖨x) = {0, 3}.) This model supports an intensional notion of open.) f turns out to be continuous in the usual topological sense, that is,
functions. the inverse image of an open set is open, when D and E are taken together
with their topologies. This motivates the earlier labeling of these functions
The earliest model for a typefree applicative system as a function space as continuous. Notably, all continuous functions are monotone.
was also given by Scott, a couple of years before the graph model, in the
late 60s. The following is an outline of some of the key elements of the For the purposes of modeling functions in CL, the interesting functions are
construction. those that are continuous on D . However, these functions by themselves
are not sufficient to obtain a modeling of self-application, because none of
In pure typefree CL, an expression of the form MM is a well-formed term. them has as its domain a set of functions—as D is not assumed to be a
Moreover, terms of this form can enter into provable equations and function space. The solution starts with defining a hierarchy of function
inequations in multiple ways. For example, xx = xx is an axiom, and by spaces D0 , D1 , D2, … so that each function space Dn, is a complete lattice
one of the rules, y(xx) = y(xx) is provable too. A more interesting on which continuous functions may be defined (creating the function space
occurrence of a term of the form MM can be seen in the provable Dn+1 ). The importance of selecting continuous functions is that the
inequation 𝖲(𝖲𝖪𝖪)(𝖲𝖪𝖪)x ▹ xx . emerging function space has the same cardinality as the underlying set,
which allows us to define embeddings between function spaces adjacent
The set-theoretic reduction of a function yields a set of pairs (in general, a within the hierarchy.
set of tuples). In set theory (assuming well-foundedness, of course) a pair

48 Stanford Encyclopedia of Philosophy Winter 2020 Edition 49


Combinatory Logic Katalin Bimbó

The hierarchy of all the function spaces Dn may be accumulated together. sorts of semantics are sometimes called “Kripke semantics” (because
A standard construction in model theory is to form the disjoint union of Kripke introduced possible-world semantics for some normal modal logics
structures. (Disjointness can always be guaranteed by indexing the carrier in 1959) or “gaggle semantics” (after the pronunciation of the abbreviation
sets of the structures.) Scott defined D∞ to be the disjoint union of the ‘ggl’ that stands for “generalized Galois logics” introduced by Dunn
function spaces Dn, for all n , except that the extremal elements are “glued (1991)).
together.” (More formally, the top elements and the bottom elements of the
function spaces, respectively, are identified with each other.) D∞ is a A model for CL▹ may be defined as follows. Let (W, ≤, R, S, K, v)
complete lattice, and by Tarski’s fixed point theorem, a continuous comprise a (nonempty) partially ordered set (W, ≤) with a three-place
function that maps D∞ into D∞ has a fixed point, which implies that D∞ is relation R on W , and let S, K ∈ W . Furthermore, for any α, β, γ, δ ∈ W ,
isomorphic to D∞ → D∞ . the conditions (s) and (k) are true.

The above construction may also be conceptualized in terms of strings and (s) ∃ζ1 , ζ2 , ζ3 ∈ W. RSαζ1 ∧ Rζ1 βζ2 ∧ Rζ2 γδ
Cartesian products. The back-and-forth moves between functions of one implies
and more than one variable—the “uncurrying” and “currying” of functions ∃ζ1 , ζ2 , ζ3 ∈ W. Rαγζ1 ∧ Rβγζ2 ∧ Rζ1 ζ2 δ ,
—algebraically corresponds to the two directions of residuation. For (k) ∃ζ1 ∈ W. RKαζ1 ∧ Rζ1 βγ
example, a function f : A × B → C may be represented by a function implies
f ′ : A → B → C, and vice versa. Thus, without loss of generality, it is α ≤ γ.
sufficient to consider unary functions. If a is a fixed element of the
The ternary relation is stipulated to be antitone in its first two argument
function space D∞, then x = (a, x) holds when x is the fixed point of a. In
places and monotone in the third. These components define a frame for
CL▹ . The valuation function v maps variables x, y, z, … into (nonempty)
terms of tuples, the solution may be viewed as the infinite tuple
(a, (a, (a, … .
cones on W , and it maps the two primitive combinators 𝖲 and 𝖪 into the
cones generated by S and K , respectively. Recall, that the standard
4.2 Relational semantics notation in CL hides application, a binary operation that allows forming
compound terms. The next clause extends v to compound terms and makes
A further model that we briefly outline falls into the set-theoretical
this operation explicit again.
semantics paradigm of nonclassical logic and it is due to J. Michael Dunn
and Robert K. Meyer (see Dunn and Meyer (1997)). CL and λ -calculi are v(MN) = {β: ∃α, γ. Rαγβ ∧ α ∈ v(M) ∧ γ ∈ v(N)}
inherently connected to intuitionistic, relevance and other nonclassical
logics. In particular, the CL▹ and CL= calculi are nonclassical logics An inequation M ▹ N is valid if v(M) ⊆ v(N) under all valuations on
themselves. Set theoretical semantics in which the intensional connectives frames for CL▹ . (That is, the relationship between the interpretations of
are modeled from relations on a collection of situations have been the the two terms is invariant whenever v is varied on the set of variables.)
preferred interpretation of nonclassical logics since the early 1960s. These

50 Stanford Encyclopedia of Philosophy Winter 2020 Edition 51


Combinatory Logic Katalin Bimbó

Informally, the underlying set W is a set of situations, and R is an 5. Computable functions and arithmetic
accessibility relation connecting situations. All the terms are interpreted as
sets of situations, and function application is the existential image A remarkable feature of CL is that despite its seeming simplicity it is a
operation derived from R. A difference from the previous models is that powerful formalism. Of course, the strength of CL cannot be appreciated
the result of an application of a term to a term is not determined by the without discovering certain relationships between combinatory terms or
objects themselves that interpret the two terms—rather the application without an illustration that computable functions are definable.
operation is defined from R.
An important beginning step in the formalization of mathematics is the
This semantics generalizes the possible worlds semantics for normal formalization of arithmetic, that was first achieved by the Dedekind–Peano
modal logics. Therefore, it is important to note that the situations are not axiomatization. There are various ways to formalize arithmetic in CL; two
maximally consistent theories, rather they are theories possessing the representations of numbers are described in this section together with
property that for any pair of formulas they contain a formula that implies some functions on them.
both of them. Equivalently, the situations may be taken to be dual ideals
on the Lindenbaum algebra of CL▹ . These situations are typically Numbers may be thought to be objects (or abstract objects) of some sort.
consistent in the sense that they do not contain all the terms in all but one (Here by numbers we mean natural numbers, that is, 0 and the positive
case. (The notion of negation consistency, of course, cannot be defined for integers.) Numbers could be characterized, for example, by the structure
CL▹ or for CL= .) they possess as a set. This structure supports properties such as 0 ≠ 1, and
that the sum of n and m is the same number as the sum of m and n .
Relational semantics can be defined for CL= along similar lines. Then Another well-known property of the natural numbers is, for example, the
soundness and completeness—that is, the following theorem—obtains. existence of infinitely many prime numbers.

Theorem. Numbers can be represented in CL by terms, and one way is to choose the
(1) An inequation M ▹ N is provable in CL▹ if and only if terms 𝖪𝖨 , 𝖨 , 𝖲𝖡𝖨 , 𝖲𝖡(𝖲𝖡𝖨), … for 0, 1, 2, 3, etc. The terms that represent
v(M) ⊆ v(N) in any model for CL▹ . the arithmetic operations vary, depending on which terms stand for the
(2) An equation M = N is provable in CL= if and only if v(M) = v(N) numbers. Note that unlike the Dedekind–Peano formalization of
in any model for CL= . arithmetic, CL makes no syntactic distinction that would parallel the
difference between individual constants and function symbols—in CL the
Relational and operational semantics for systems of CL that include dual only objects are terms. The above list of terms already shows the
and symmetric combinators can be found in Bimbó (2004). successor function, which is 𝖲𝖡. (𝖲𝖡(𝖪𝖨) strongly equals to 𝖨 , that is, 1 is
the successor of 0.)

52 Stanford Encyclopedia of Philosophy Winter 2020 Edition 53


Combinatory Logic Katalin Bimbó

Addition is the term 𝖡𝖲(𝖡𝖡) , and multiplication is the term 𝖡. The usual If n is a numeral, then Pn reduces to n𝖪𝖨(n(𝖪𝖨)) , which suggests that for
recursive definition of multiplication based on addition may suggest that positive numbers, P could have been defined to be the term 𝖳(𝖪𝖨),
addition should be a simpler operation than multiplication. However, in because 𝖳(𝖪𝖨)n reduces to n − 1 whenever n is a term of the form
CL the numbers themselves are functions, and so they have properties that 𝖵(𝖪𝖨)(n − 1).
allows 𝖡—a simpler looking term—to be chosen for the function that is
often perceived to be more complex than addition. (The addition operation Some models of computation (such as register machines) and certain
could be defined using primitive recursion, which would produce a more programming languages include a test for zero as a primitive construct. It
complex term.) As a classical example, we may consider the term 𝖡𝖨𝖨, that is useful to find a CL-term for a function Z such that Znxy reduces to x if
is strongly equal to 𝖨, that is, 1 × 1 = 1 —as expected. We do not pursue n is zero, whereas Znxy reduces to y when n is positive. Znxy may be
here this numerical representation further. We only note that the shape of thought of as the conditional instruction “If n = 0 then x else y ,” where x
these numbers is closely related to Church’s numerals in the λ -calculus, and y are themselves functions. (Of course, in the pseudo-code one should
each of which is a binary function (whereas here, each number is a unary have assumed that n is of integer type and cannot take a negative value,
function). that could be guaranteed by a declaration of variables and an additional
conditional statement.) The following definition works for branching on
Another way to represent numbers in CL is to start with a different choice zero.
of terms for the numbers. Previously, 𝖨 stood for 1, now we take 𝖨 to be 0 .
The successor of a number n is 𝖵(𝖪𝖨)n, where the second occurrence of n Z = 𝖳𝖪
indicates a numeral, that is, the combinator that represents n . (The numeral
𝖳𝖪nxy = n𝖪xy , and if n is zero, that is, n = 𝖨 , then by another step 𝖪xy
for n is often denoted—more precisely—by an overlined or otherwise
and then x results; whereas if n is positive, then after a few more
decorated n. However, the double usage of n in a limited context should
reductions, one gets 𝖪𝖨xy , that is, y. The two terms, 𝖪xy and 𝖪𝖨xy , hint
not cause any confusion.) In other words, the successor function is 𝖵(𝖪𝖨) .
toward an interpretation of 𝖪 and 𝖪𝖨 as truth and falsity, or they can be
Notice that the numbers in the present representation are terms over a
viewed as terms that can select, respectively, the first or the second
more restricted combinatory base than in the former case. For example, no
argument. These ideas may be further developed into definitions of truth
combinator with duplicative effect is definable from {𝖨, 𝖪, 𝖵} .
functions and a representation of tuples.
Some simple recursive functions may be defined as follows. The
Addition may be defined by the recursive equation
predecessor function P on numbers is “−1” (i.e., subtracting one) for all
+mn = Zmn(𝖵(𝖪𝖨)(+(Pm)n)) , where m and n are numerals, and P and Z
numbers greater than or equal to 1 , and the predecessor of 0 is set to be 0.
are the already defined functions. (The abbreviations are used to enhance
The next term defines the predecessor function which is abbreviated by P.
the readability of the terms—they can be replaced everywhere by the
P = 𝖢(𝖶(𝖡𝖡(𝖢(𝖳𝖪)𝖨)))(𝖪𝖨) defining combinators.) To put into words, if m is 0 then the sum is n,
otherwise m + n is the successor of (m − 1) + n. Of course, this definition

54 Stanford Encyclopedia of Philosophy Winter 2020 Edition 55


Combinatory Logic Katalin Bimbó

closely simulates the definition of addition from recursion theory, where ! m = Zm(𝖵(𝖪𝖨)𝖨)(⋅m( ! (Pm))) , that may be read as “if m is 0, then
addition is often defined by the two equations +(0, n) = n and ! m = 1 , otherwise ! m equals to m multiplied by the factorial of m − 1 .”
+(s(m), n) = s(+(m, n)) (with s denoting the successor function). The fact
that CL can express addition in this form shows—once again—the Of course, it is not necessary to define various numerical functions by
versatility of CL. simulating their recursive definitions. As we saw above in the case of the
first representation of numbers, we might just happen to have the right
Combinatorial completeness guarantees that the term on the right hand terms such as 𝖡𝖲(𝖡𝖡) and 𝖡, that behave as the target functions do on
side of the defining equation for + (i.e., the term Zmn(𝖵(𝖪𝖨)(+(Pm)n))) numbers. That is, an equally good way to define arithmetic functions is to
can be transformed into a term in which + is the first, m and n are the simply list some terms and then show that they behave as expected.
second and third arguments, respectively. Then + can be defined explicitly However, once it has been shown that the basic primitive recursive
as the fixed point of the combinator functions together with recursion and minimization can be emulated in CL,
we have got not only a nice collection of arithmetic functions in the form
𝖡(𝖡𝖶)(𝖡𝖶(𝖡(𝖡(𝖢(𝖡𝖡(𝖡𝖢(𝖳𝖪)))))(𝖡(𝖡(𝖡(𝖵(𝖪𝖨))))(𝖢𝖡(𝖳(𝖪𝖨)))))). of combinators to work with, but also a proof that combinatory logic is

Of course, we can abbreviate the so obtained term as + for the sake of


sufficiently expressive to formalize all partial recursive functions. Indeed,
the remaining steps of such a proof can be carried out in CL, though the
transparency, just as we used earlier P and Z as shorthands for longer
details are beyond the scope of this entry.
combinatory terms.

Multiplication is often denoted by ⋅ . The recursive equation 5.1 Gödel sentence


⋅ mn = Zm𝖨(+n( ⋅ (Pm)n)) defines multiplication and it can be deciphered
as “if m is 0 then the result is 0, else n is added to the result of The abbreviations and the interspersed explanations in the sketch above
(m − 1) ⋅ n.” The next step in the definition brings the right-hand side may obscure that arithmetic has been formalized in a language that
term to the form 𝖷 ⋅ mn, where 𝖷 does not contain occurrences of ⋅ , m or consists of five symbols (when juxtaposition is not counted): 𝖲, 𝖪, = plus
n. Then taking the fixed point of 𝖷, and setting ⋅ to be 𝖸𝖷 concludes the two delimiters, ( and ) . The finite (and perhaps, surprisingly small)
definition of the multiplication function. For instance, the abstraction can number of symbols and the availability of recursive functions conjure the
yield the combinator thought that an arithmetization of the syntax of CL could be attempted.

𝖡𝖶(𝖡(𝖡(𝖢(𝖡𝖡(𝖢(𝖳𝖪)𝖨))))(𝖡(𝖡𝖶)(𝖡(𝖡(𝖡(𝖢+)))(𝖢𝖡(𝖳(𝖪𝖨)))))). Gödel achieved an encoding of a formal language by assigning numbers to


symbols, formulas and sequences of formulas, which later became known
The factorial function is definable from the predecessor function plus from as “Gödel numbers.” Concretely, Gödel assigned odd numbers to symbols
multiplication, and it is useful e.g., in combinatorics. The factorial and products of powers of primes (with the number corresponding to a
function (denoted by ! ) is recursively definable by the equation symbol in the exponent) to sequences of symbols. However, it is possible
to arithmetize the language of CL without placing a strong emphasis on

56 Stanford Encyclopedia of Philosophy Winter 2020 Edition 57


Combinatory Logic Katalin Bimbó

the existence and the properties of prime numbers. (See for example, Bibliography
Raymond M. Smullyan’s books: Smullyan (1985) and Smullyan (1994).)
The five symbols get as their Gödel numbers the first five positive Due to obvious limitations of size, only some representative publications
integers. A string is assigned the number in base 10 that results from the are listed here. More comprehensive bibliographies may be found in
concatenation of the corresponding numbers for the symbols. Curry, Hindley and Seldin (1972), Hindley (1997), Anderson, Belnap and
Dunn (1992), Terese (2003) as well as Hindley and Seldin (2008).
The following outline gives the flavor of an analogue of Gödel’s
incompleteness theorem adapted to CL. It is possible to define a Anderson, A., N. Belnap, and J.M. Dunn, 1992. Entailment: The Logic of
combinator such that if this combinator is applied to a numeral n, then the Relevance and Necessity (Volume II), Princeton: Princeton University
whole term reduces to the numeral m that is the numeral denoting the Press.
Gödel number of the numeral n. Slightly more formally, there is a Barendregt, H. P., 1981. The Lambda Calculus. Its Syntax and Semantics,
combinator δ such that δn = G(n) (where G(n) denotes the Gödel number (Studies in Logic and the Foundations of Mathematics: Volume 103),
of the expression n). Furthermore, there is a combinatory term, which Amsterdam: North-Holland.
returns the numeral itself followed by G(n), when applied to a numeral n. Barendregt, H., J. Endrullis, J. W. Klop and J. Waldmann, 2017. “Dance of
For any term A there is a term B such that the equation A(δB) = B is true. the starlings,” in M. Fitting and B. Rayman (eds.), Raymond
This statement (or its concrete variant for a particular formal system) is Smullyan on Self Reference, (Outstanding Contributions to Logic:
usually called the second fixed point theorem. Computable characteristic Volume 14), Cham: Springer Nature, 67–111.
functions of recursive sets of numbers can be represented by combinators Bimbó, K., 2003. “The Church-Rosser property in dual combinatory
with the choice of 𝖪 for truth and 𝖪𝖨 for falsity. The complements of such logic,” Journal of Symbolic Logic, 68: 132–152.
functions are computable too. Finally, it can be proved that there is no –––, 2004. “Semantics for dual and symmetric combinatory calculi,”
combinator that represents the set of all true equations. To put it Journal of Philosophical Logic, 33: 125–153.
differently, any combinator either represents a set of equations that fails to –––, 2005. “Types of 𝖨-free hereditary right maximal terms,” Journal of
include some true equations, or represents a set of equations that includes Philosophical Logic, 34: 607–620.
all true but also some false equations. –––, 2007. “Relevance logics,” in D. Jacquette (ed.), Philosophy of Logic
(Handbook of the Philosophy of Science: Volume 5), D. Gabbay, P.
Alonzo Church proved the undecidability of classical first-order logic Thagard and J. Woods (eds.), Amsterdam: Elsevier/North-Holland,
relying on Gödel’s incompleteness theorem. Dana Scott proved that if A is 2007, pp. 723–789.
a nonempty proper subset of λ-terms that is closed under equality then A is –––, 2010. “Schönfinkel-type operators for classical logic,” Studia Logica,
not recursive. The analogous claim for CL, that follows from the existence 95: 355–378.
of a Gödelian sentence for CL, is that it is undecidable if two CL-terms –––, 2012. Combinatory Logic: Pure, Applied and Typed, Boca Raton, FL:
are equal. CRC Press.
–––, 2014. Proof Theory: Sequent Calculi and Related Formalisms, Boca

58 Stanford Encyclopedia of Philosophy Winter 2020 Edition 59


Combinatory Logic Katalin Bimbó

Raton, FL: CRC Press. the Foundations of Mathematics: Volume I), 1st edition, Amsterdam:
Bimbó, K., and J. M. Dunn, 2008. Generalized Galois Logics. Relational North-Holland.
Semantics of Nonclassical Logical Calculi (CSLI Lecture Notes: Curry, H. B., J. R. Hindley, and J. P. Seldin, 1972. Combinatory Logic
Volume 188), Stanford, CA: CSLI Publications. (Studies in Logic and the Foundations of Mathematics: Volume II),
–––, 2012. “New consecution calculi for Rt→,” Notre Dame Journal of Amsterdam: North-Holland.
Formal Logic, 53: 491–509. Dunn, J. M., 1991. “Gaggle theory: An abstraction of Galois connections
–––, 2013. “On the decidability of implicational ticket entailment,” and residuation with applications to negation, implication, and
Journal of Symbolic Logic, 78: 214–236 various logical operators,” in J. van Eijck (ed.), Logics in AI:
–––, 2014. “Extracting 𝖡𝖡'𝖨𝖶 inhabitants of simple types from proofs in European Workshop JELIA ’90 (Lecture Notes in Computer Science:
the sequent calculus LT→ t for implicational ticket entailment,” Logica Volume 478), Springer, Berlin, 1991, pp. 31–51.
Universalis, 8(2): 141–164. Dunn, J. M., and R. K. Meyer, 1997. “Combinators and structurally free
Broda, S., Damas, L., Finger, M. and P. S. Silve e Silva, 2004. “The logic,” Logic Journal of IGPL, 5: 505–537.
decidability of a fragment of 𝖡𝖡'𝖨𝖶-logic,” Theoretical Computer Endrullis, J., J. W. Klop and A. Polonsky, 2016. “Reduction cycles in
Science, 318: 373–408. lambda calculus and combinatory logic,” in J. van Eijck, R. Iemhoff
Bunder, M. W., 1992. “Combinatory logic and lambda calculus with and J. J. Joosten (eds.), Liber Amicorum Alberti. A Tribute to Albert
classical types,” Logique et Analyse, 137–128: 69–79. Visser (Tributes, Volume 30), London: College Publications, 111–
–––, 2000. “Expedited Broda–Damas bracket abstraction,” Journal of 124.
Symbolic Logic, 65: 1850–1857. Fitch, F., 1942. “A basic logic,” Journal of Symbolic Logic, 7: 105–114.
Cardone, F., and J. R. Hindley, 2006. “History of lambda-calculus and –––, 1942. “An extension of basic logic,” Journal of Symbolic Logic, 13:
combinatory logic,” in D. M. Gabbay and J. Woods (eds.), Logic from 95–106.
Russell to Church (Handbook of the History of Logic: Volume 5), Gierz, G., K. H. Hofmann, K. Keimel, J. D. Lawson, M. W. Mislove, and
Amsterdam: Elsevier, 2006, 732–817. D. S. Scott, 2003. Continuous Lattices and Domains (Encyclopedia
Church, A., 1941. The Calculi of Lambda-conversion, 1st edition, of Mathematics and its Applications: Volume 93), Cambridge:
Princeton, NJ: Princeton University Press. Cambridge University Press.
Coppo, M., and M. Dezani-Ciancaglini, 1980. “An extension of the basic Gödel, K., 1931. “Über formal unentscheidbare Sätze der Principia
functionality theory for the λ-calculus,” Notre Dame Journal of mathematica und verwandter Systeme I,” in S. Feferman (ed.), Kurt
Formal Logic, 21: 685–693. Gödel: Collected Works (Volume I), New York and Oxford: Oxford
Curry, H. B., 1963. Foundations of Mathematical Logic, 1st edition, New University Press and Clarendon Press, 1986, pp. 144–195.
York: McGraw–Hill Book Company, Inc. (2nd edition, 1977, New Hindley, J. R., 1997. Basic Simple Type Theory (Cambridge Tracts in
York: Dover Publications, Inc.) Theoretical Computer Science: Volume 42), Cambridge: Cambridge
Curry, H. B., and R. Feys, 1958. Combinatory Logic (Studies in Logic and University Press.

60 Stanford Encyclopedia of Philosophy Winter 2020 Edition 61


Combinatory Logic Katalin Bimbó

Hindley, J. R., and J. P. Seldin, 2008. λ-calculus and Combinators, an Seldin J. P., 2006. “The logic of Curry and Church,” in D. M. Gabbay and
Introduction, Cambridge: Cambridge University Press. J. Woods (eds.), Logic from Russell to Church (Handbook of the
Kleene, S. C., 1967. Mathematical Logic, New York: John Wiley & Sons, History of Logic: Volume 5), Amsterdam: Elsevier, 2006, 819–873.
Inc; reprinted Mineola, NY: Dover, 2002. Smullyan, R. M., 1985. To Mock a Mockingbird. And other Logic Puzzles
Mackie, I., 2019. “Linear numeral systems,” Journal of Automated Including an Amazing Adventure in Combinatory Logic, New York:
Reasoning, 63: 887–909. Alfred A. Knopf.
Padovani, V., 2013. “Ticket Entailment is decidable,” Mathematical –––, 1994. Diagonalization and Self-reference, Oxford: Clarendon.
Structures in Computer Science, 23(3): 568–607. Updike, E. T., 2010. Paradise Regained: Fitch’s Program of Basic Logic,
Quine, W. V. O., 1960. “Variables explained away,” Proceedings of the Ph.D. Thesis, University of California Irvine, Ann Arbor, MI:
American Philosophical Association, 104 (3): 343–347; reprinted in ProQuest (UMI).
W.V.O. Quine, Selected Logical Papers, New York: Random House, –––, 2012. “Abstraction in Fitch’s basic logic,” History and Philosophy of
1966, 227–235. Logic, 33: 215–243.
–––, 1981. “Predicate functors revisited,” Journal of Symbolic Logic, 46: Tait, W., 1967. “Intensional interpretations of functionals of finite type I,”
649–652. Journal of Symbolic Logic, 32: 198–212.
Révész, G. E., 1988. Lambda-calculus, Combinators and Functional Terese (by Marc Bezem, Jan Willem Klop, Roel de Vrijer, Erik Barendsen,
Programming, Cambridge: Cambridge University Press. Inge Bethke, Jan Heering, Richard Kennaway, Paul Klint, Vincent
Rezus, A., 1982. A Bibliography of Lambda-Calculi, Combinatory Logics van Oostrom, Femke van Raamsdonk, Fer-Jan de Vries and Hans
and Related Topics, Amsterdam: Mathematisch Centrum. Zantema), 2003. Term Rewriting Systems (Cambridge Tracts in
Rosser, J. B., 1936. “A mathematical logic without variables,” Annals of Theoretical Computer Science: Volume 55), Cambridge: Cambridge
Mathematics, 2: 127–150. University Press.
Schönfinkel, M., 1924. “On the building blocks of mathematical logic,” in
J. van Heijenoort, (ed.), From Frege to Gödel. A Source Book in Academic Tools
Mathematical Logic, Cambridge, MA: Harvard University Press,
1967, pp. 355–366. How to cite this entry.
Scott, D., 1970. Outline of a Mathematical Theory of Computation Preview the PDF version of this entry at the Friends of the SEP
Society.
(Technical report), Oxford: Oxford University Computing Laboratory
Look up this entry topic at the Internet Philosophy Ontology
Programming Research Group.
Project (InPhO).
–––, 1974. “The language Lambda, (abstract),” Journal of Symbolic Logic,
Enhanced bibliography for this entry at PhilPapers, with links
39: 425–426. to its database.
–––, 1976. “Data types as lattices,” SIAM Journal on Computing, 5: 522–
587.

62 Stanford Encyclopedia of Philosophy Winter 2020 Edition 63


Combinatory Logic Katalin Bimbó

Other Internet Resources Notes to Combinatory Logic


TLCA (Typed Lambda Calculi and Applications) open problem list 1. Moses Schönfinkel had a chance to publish just one paper on CL (see
RTA (Rewriting Techniques and Applications) open problem list Schönfinkel (1924)). CL was soon rediscovered and greatly expanded in
Gentzen Working Group’s open problem list from the Utrecht ’93 its scope by Haskell B. Curry, who was joined by several other logicians
meeting in an effort to develop CL and the closely related λ-calculi invented by
Combinatory Logic page at Software and Tutorials for Instruction in Alonzo Church.
Symbolic Logic in New Zealand.
Roger B. Jones’s λ-calculus website 2. This sentence may be seen to formalize a well-known metatheorem
Chris Rathman’s List of combinatory definitions about well-behaved sequent and consecution calculi—without explicating
some of the technical details.
Related Entries 3. The formal notions of algorithms, computable functions and alike had
not yet been formulated at the time when Schönfinkel published his paper.
algebra | category theory | computability and complexity | Curry’s paradox
λ-calculi, Turing machines and Post's calculi appeared a decade or more
| Gödel, Kurt | lambda calculus, the | logic, history of: intuitionistic logic |
later, and other notions such as Markov algorithms, register machines, 0-
logic: intuitionistic | logic: linear | logic: relevance | logic: second-order
type grammars and abstract state machines are even newer. See Kleene
and higher-order | logic: substructural | proof theory: development of |
(1967, Ch. V) concerning the early history of some of these concepts.
Quine, Willard Van Orman | reasoning: automated | recursive functions |
Russell’s paradox | type theory | type theory: Church’s type theory 4. ‘𝖢Gyx’ could be thought to be read as “y is less than x ,” and ‘Lyx’
could stand for this binary predicate in a more mnemonic presentation of
Acknowledgements FOL. However, given G, ‘𝖢Gyx’ and ‘Lyx ’ express the same meaning.

I am grateful to the referees of the first edition—both to the “internal 5. The possibility of this move follows from, and therefore, illustrates the
referees” of this Encyclopedia and to Jonathan P. Seldin—for their helpful combinatorial completeness theorem. Although this last potential
comments and suggestions, as well as certain corrections. Heeding the transformation is not important for the success of Schönfinkel's procedure,
advice of the referees, I repeatedly tried to make the entry less technical combinatorial completeness is.
and more readable.
6. This may be the reason why Schönfinkel gave second-order examples
toward the end of his paper, despite the fact that he unequivocally stated at
the beginning of his paper that he is concerned with FOL. (Incidentally,
the misleading examples were not caught by the German editor, who, on
the other hand, appended some paragraphs to the paper that contain

64 Stanford Encyclopedia of Philosophy Winter 2020 Edition 65


Combinatory Logic

mistaken claims.) The unfortunate choice of examples might have


contributed to the misinterpretation of Schönfinkel's aims along the line
that he attempted to provide a typefree framework for all of mathematics.

7. The importance of this idea can hardly be overstated. Viewing a


function of several arguments as a function of one argument is often called
“currying” (with the other direction termed “uncurrying”). The same idea
reappears in other areas of mathematics, for example, in algebra as
(abstract) residuation and in category theory (in the unary case) as adjoint
functors.

8. One might contend that the understanding of (closed) formulas not only
as meaningful sentences but also as sequences of symbols on paper is as
crucial to Schönfinkel's procedure as it is to Gödel's first incompleteness
theorem.

9. We follow Curry's meta-theoretical distinctions in calling the entities


that CL deals with ‘objects’ rather than using the neutral expression
‘expressions’. (Curry uses ‘obs’ as a technical term.)

10. We do not follow Curry's terminology completely, according to which


the combinator that is denoted here by 𝖬 is only a combinator with
“duplicative effect,” because we do not utilize the distinction between
regular and nonregular combinators. The interested reader should consult
Curry and Feys (1958) concerning a slightly different use of the terms
“cancellator,” “duplicator,” “permutator,” etc.

Copyright © 2020 by the author


Katalin Bimbó

66 Stanford Encyclopedia of Philosophy

You might also like