<s>
Combinatory	B-Application
logic	I-Application
is	O
a	O
notation	O
to	O
eliminate	O
the	O
need	O
for	O
quantified	B-Language
variables	I-Language
in	O
mathematical	O
logic	O
.	O
</s>
<s>
It	O
was	O
introduced	O
by	O
Moses	O
Schönfinkel	O
and	O
Haskell	O
Curry	O
,	O
and	O
has	O
more	O
recently	O
been	O
used	O
in	O
computer	B-General_Concept
science	I-General_Concept
as	O
a	O
theoretical	O
model	O
of	O
computation	O
and	O
also	O
as	O
a	O
basis	O
for	O
the	O
design	O
of	O
functional	B-Language
programming	I-Language
languages	I-Language
.	O
</s>
<s>
It	O
is	O
based	O
on	O
combinators	B-Application
,	O
which	O
were	O
introduced	O
by	O
Schönfinkel	O
in	O
1920	O
with	O
the	O
idea	O
of	O
providing	O
an	O
analogous	O
way	O
to	O
build	O
up	O
functions	O
—	O
and	O
to	O
remove	O
any	O
mention	O
of	O
variables	O
—	O
particularly	O
in	O
predicate	O
logic	O
.	O
</s>
<s>
A	O
combinator	B-Application
is	O
a	O
higher-order	B-Language
function	I-Language
that	O
uses	O
only	O
function	B-Algorithm
application	I-Algorithm
and	O
earlier	O
defined	O
combinators	B-Application
to	O
define	O
a	O
result	O
from	O
its	O
arguments	O
.	O
</s>
<s>
Combinatory	B-Application
logic	I-Application
was	O
originally	O
intended	O
as	O
a	O
'	O
pre-logic	O
'	O
that	O
would	O
clarify	O
the	O
role	O
of	O
quantified	B-Language
variables	I-Language
in	O
logic	O
,	O
essentially	O
by	O
eliminating	O
them	O
.	O
</s>
<s>
Another	O
way	O
of	O
eliminating	O
quantified	B-Language
variables	I-Language
is	O
Quine	O
's	O
predicate	O
functor	O
logic	O
.	O
</s>
<s>
While	O
the	O
expressive	B-Language
power	I-Language
of	O
combinatory	B-Application
logic	I-Application
typically	O
exceeds	O
that	O
of	O
first-order	O
logic	O
,	O
the	O
expressive	B-Language
power	I-Language
of	O
predicate	O
functor	O
logic	O
is	O
identical	O
to	O
that	O
of	O
first	O
order	O
logic	O
(	O
Quine	O
1960	O
,	O
1966	O
,	O
1976	O
)	O
.	O
</s>
<s>
The	O
original	O
inventor	O
of	O
combinatory	B-Application
logic	I-Application
,	O
Moses	O
Schönfinkel	O
,	O
published	O
nothing	O
on	O
combinatory	B-Application
logic	I-Application
after	O
his	O
original	O
1924	O
paper	O
.	O
</s>
<s>
Haskell	O
Curry	O
rediscovered	O
the	O
combinators	B-Application
while	O
working	O
as	O
an	O
instructor	O
at	O
Princeton	O
University	O
in	O
late	O
1927	O
.	O
</s>
<s>
In	O
the	O
late	O
1930s	O
,	O
Alonzo	O
Church	O
and	O
his	O
students	O
at	O
Princeton	O
invented	O
a	O
rival	O
formalism	O
for	O
functional	B-Language
abstraction	I-Language
,	O
the	O
lambda	B-Language
calculus	I-Language
,	O
which	O
proved	O
more	O
popular	O
than	O
combinatory	B-Application
logic	I-Application
.	O
</s>
<s>
The	O
upshot	O
of	O
these	O
historical	O
contingencies	O
was	O
that	O
until	O
theoretical	O
computer	B-General_Concept
science	I-General_Concept
began	O
taking	O
an	O
interest	O
in	O
combinatory	B-Application
logic	I-Application
in	O
the	O
1960s	O
and	O
1970s	O
,	O
nearly	O
all	O
work	O
on	O
the	O
subject	O
was	O
by	O
Haskell	O
Curry	O
and	O
his	O
students	O
,	O
or	O
by	O
Robert	O
Feys	O
in	O
Belgium	O
.	O
</s>
<s>
(	O
1972	O
)	O
survey	O
the	O
early	O
history	O
of	O
combinatory	B-Application
logic	I-Application
.	O
</s>
<s>
For	O
a	O
more	O
modern	O
treatment	O
of	O
combinatory	B-Application
logic	I-Application
and	O
the	O
lambda	B-Language
calculus	I-Language
together	O
,	O
see	O
the	O
book	O
by	O
Barendregt	O
,	O
which	O
reviews	O
the	O
models	O
Dana	O
Scott	O
devised	O
for	O
combinatory	B-Application
logic	I-Application
in	O
the	O
1960s	O
and	O
1970s	O
.	O
</s>
<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
combinatory	B-Application
logic	I-Application
is	O
used	O
as	O
a	O
simplified	O
model	O
of	O
computation	O
,	O
used	O
in	O
computability	O
theory	O
and	O
proof	O
theory	O
.	O
</s>
<s>
Despite	O
its	O
simplicity	O
,	O
combinatory	B-Application
logic	I-Application
captures	O
many	O
essential	O
features	O
of	O
computation	O
.	O
</s>
<s>
Combinatory	B-Application
logic	I-Application
can	O
be	O
viewed	O
as	O
a	O
variant	O
of	O
the	O
lambda	B-Language
calculus	I-Language
,	O
in	O
which	O
lambda	O
expressions	O
(	O
representing	O
functional	B-Language
abstraction	I-Language
)	O
are	O
replaced	O
by	O
a	O
limited	O
set	O
of	O
combinators	B-Application
,	O
primitive	O
functions	O
without	O
free	O
variables	O
.	O
</s>
<s>
It	O
is	O
easy	O
to	O
transform	O
lambda	O
expressions	O
into	O
combinator	B-Application
expressions	O
,	O
and	O
combinator	B-Application
reduction	O
is	O
much	O
simpler	O
than	O
lambda	O
reduction	O
.	O
</s>
<s>
Hence	O
combinatory	B-Application
logic	I-Application
has	O
been	O
used	O
to	O
model	O
some	O
non-strict	B-Application
functional	B-Language
programming	I-Language
languages	I-Language
and	O
hardware	B-Application
.	O
</s>
<s>
The	O
purest	O
form	O
of	O
this	O
view	O
is	O
the	O
programming	O
language	O
Unlambda	B-Language
,	O
whose	O
sole	O
primitives	O
are	O
the	O
S	O
and	O
K	O
combinators	B-Application
augmented	O
with	O
character	O
input/output	O
.	O
</s>
<s>
Although	O
not	O
a	O
practical	O
programming	O
language	O
,	O
Unlambda	B-Language
is	O
of	O
some	O
theoretical	O
interest	O
.	O
</s>
<s>
Combinatory	B-Application
logic	I-Application
can	O
be	O
given	O
a	O
variety	O
of	O
interpretations	O
.	O
</s>
<s>
Many	O
early	O
papers	O
by	O
Curry	O
showed	O
how	O
to	O
translate	O
axiom	O
sets	O
for	O
conventional	O
logic	O
into	O
combinatory	B-Application
logic	I-Application
equations	O
(	O
Hindley	O
and	O
Meredith	O
1990	O
)	O
.	O
</s>
<s>
Dana	O
Scott	O
in	O
the	O
1960s	O
and	O
1970s	O
showed	O
how	O
to	O
marry	O
model	O
theory	O
and	O
combinatory	B-Application
logic	I-Application
.	O
</s>
<s>
be	O
in	O
normal	B-Application
form	I-Application
.	O
</s>
<s>
Church	B-Application
encoding	I-Application
.	O
</s>
<s>
equivalent	O
to	O
lambda	B-Language
calculus	I-Language
,	O
but	O
without	O
abstraction	O
.	O
</s>
<s>
combinatory	B-Application
logic	I-Application
is	O
much	O
simpler	O
,	O
because	O
there	O
is	O
no	O
notion	O
of	O
substitution	O
.	O
</s>
<s>
P	O
Primitive	O
function	O
One	O
of	O
the	O
combinator	B-Application
symbols	O
I	O
,	O
K	O
,	O
S	O
.	O
(	O
M	O
N	O
)	O
Application	O
Applying	O
a	O
function	O
to	O
an	O
argument	O
.	O
</s>
<s>
The	O
primitive	O
functions	O
are	O
combinators	B-Application
,	O
or	O
functions	O
that	O
,	O
when	O
seen	O
as	O
lambda	O
terms	O
,	O
contain	O
no	O
free	O
variables	O
.	O
</s>
<s>
This	O
is	O
the	O
same	O
general	O
convention	O
(	O
left-associativity	O
)	O
as	O
for	O
multiple	O
application	O
in	O
lambda	B-Language
calculus	I-Language
.	O
</s>
<s>
It	O
is	O
in	O
this	O
way	O
that	O
primitive	O
combinators	B-Application
behave	O
as	O
functions	O
.	O
</s>
<s>
combinators	B-Application
.	O
</s>
<s>
A	O
more	O
interesting	O
combinator	B-Application
is	O
the	O
fixed	B-Application
point	I-Application
combinator	I-Application
or	O
Y	O
combinator	B-Application
,	O
which	O
can	O
be	O
used	O
to	O
implement	O
recursion	O
.	O
</s>
<s>
S	O
and	O
K	O
can	O
be	O
composed	O
to	O
produce	O
combinators	B-Application
that	O
are	O
extensionally	O
equal	O
to	O
any	O
lambda	O
term	O
,	O
and	O
therefore	O
,	O
by	O
Church	O
's	O
thesis	O
,	O
to	O
any	O
computable	O
function	O
whatsoever	O
.	O
</s>
<s>
The	O
proof	O
is	O
to	O
present	O
a	O
transformation	O
,	O
T[],	O
which	O
converts	O
an	O
arbitrary	O
lambda	O
term	O
into	O
an	O
equivalent	O
combinator	B-Application
.	O
</s>
<s>
T[ λx	O
.	O
</s>
<s>
Note	O
that	O
T[]	O
as	O
given	O
is	O
not	O
a	O
well-typed	O
mathematical	O
function	O
,	O
but	O
rather	O
a	O
term	O
rewriter	O
:	O
Although	O
it	O
eventually	O
yields	O
a	O
combinator	B-Application
,	O
the	O
transformation	O
may	O
generate	O
intermediary	O
expressions	O
that	O
are	O
neither	O
lambda	O
terms	O
nor	O
combinators	B-Application
,	O
via	O
rule	O
(	O
5	O
)	O
.	O
</s>
<s>
This	O
process	O
is	O
also	O
known	O
as	O
abstraction	B-Application
elimination	I-Application
.	O
</s>
<s>
This	O
definition	O
is	O
exhaustive	O
:	O
any	O
lambda	O
expression	O
will	O
be	O
subject	O
to	O
exactly	O
one	O
of	O
these	O
rules	O
(	O
see	O
Summary	O
of	O
lambda	B-Language
calculus	I-Language
above	O
)	O
.	O
</s>
<s>
It	O
is	O
related	O
to	O
the	O
process	O
of	O
bracket	O
abstraction	O
,	O
which	O
takes	O
an	O
expression	O
E	O
built	O
from	O
variables	O
and	O
application	O
and	O
produces	O
a	O
combinator	B-Application
expression	O
[x]E	O
in	O
which	O
the	O
variable	O
x	O
is	O
not	O
free	O
,	O
such	O
that	O
[x]E	O
x	O
=	O
E	O
holds	O
.	O
</s>
<s>
Bracket	O
abstraction	O
induces	O
a	O
translation	O
from	O
lambda	O
terms	O
to	O
combinator	B-Application
expressions	O
,	O
by	O
interpreting	O
lambda-abstractions	O
using	O
the	O
bracket	O
abstraction	O
algorithm	O
.	O
</s>
<s>
For	O
example	O
,	O
we	O
will	O
convert	O
the	O
lambda	O
term	O
λx.λy	O
.	O
</s>
<s>
T[ 	O
λx.λy	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
=	O
(	O
S	O
T[ λx	O
.	O
</s>
<s>
(	O
S	O
I	O
)	O
]	O
T[ λx	O
.	O
</s>
<s>
=	O
(	O
S	O
(	O
K	O
(	O
S	O
I	O
)	O
)	O
T[ λx	O
.	O
</s>
<s>
longer	O
than	O
the	O
representation	O
as	O
a	O
lambda	O
term	O
,	O
λx.λy	O
.	O
</s>
<s>
argument	O
to	O
combinators	B-Application
.	O
</s>
<s>
Rule	O
5	O
simply	O
says	O
that	O
to	O
convert	O
a	O
complex	O
abstraction	O
to	O
a	O
combinator	B-Application
,	O
we	O
must	O
first	O
convert	O
its	O
body	O
to	O
a	O
combinator	B-Application
,	O
and	O
then	O
eliminate	O
the	O
abstraction	O
.	O
</s>
<s>
λx	B-Language
.	O
</s>
<s>
( λx	O
.	O
</s>
<s>
λx	B-Language
.	O
</s>
<s>
Therefore	O
,	O
to	O
find	O
a	O
combinator	B-Application
equivalent	O
to	O
λx	B-Language
.	O
</s>
<s>
form	O
λx.E.	O
</s>
<s>
T[ λx	O
.	O
</s>
<s>
λx	B-Language
.	O
</s>
<s>
T[ 	O
λx.λy	O
.	O
</s>
<s>
=	O
(	O
S	O
(	O
K	O
(	O
S	O
I	O
)	O
)	O
T[ λx	O
.	O
</s>
<s>
This	O
combinator	B-Application
is	O
equivalent	O
to	O
the	O
earlier	O
,	O
longer	O
one	O
:	O
</s>
<s>
transformed	O
the	O
identity	O
function	O
λf.λx	O
.	O
</s>
<s>
With	O
the	O
η-reduction	O
rule	O
,	O
λf.λx	O
.	O
</s>
<s>
There	O
are	O
one-point	O
bases	O
from	O
which	O
every	O
combinator	B-Application
can	O
be	O
composed	O
extensionally	O
equal	O
to	O
any	O
lambda	O
term	O
.	O
</s>
<s>
X	O
≡	O
λx	B-Language
.	O
</s>
<s>
The	O
Iota	B-Application
programming	O
language	O
uses	O
X	O
as	O
its	O
sole	O
combinator	B-Application
.	O
</s>
<s>
X	O
 '	O
≡	O
λx	B-Language
.	O
</s>
<s>
In	O
addition	O
to	O
S	O
and	O
K	O
,	O
Schönfinkel	O
's	O
paper	O
included	O
two	O
combinators	B-Application
which	O
are	O
now	O
called	O
B	O
and	O
C	O
,	O
with	O
the	O
following	O
reductions	O
:	O
</s>
<s>
These	O
combinators	B-Application
are	O
extremely	O
useful	O
when	O
translating	O
predicate	O
logic	O
or	O
lambda	B-Language
calculus	I-Language
into	O
combinator	B-Application
expressions	O
.	O
</s>
<s>
T[ λx	O
.	O
</s>
<s>
T[ λx	O
.	O
</s>
<s>
T[ λx	O
.	O
</s>
<s>
λx.λy	O
.	O
</s>
<s>
T[ 	O
λx.λy	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
=	O
T[ λx	O
.	O
</s>
<s>
The	O
modern	O
names	O
for	O
the	O
combinators	B-Application
come	O
from	O
Haskell	O
Curry	O
's	O
doctoral	O
thesis	O
of	O
1930	O
(	O
see	O
B	B-Application
,	I-Application
C	I-Application
,	I-Application
K	I-Application
,	I-Application
W	I-Application
System	I-Application
)	O
.	O
</s>
<s>
λx.E	O
where	O
x	O
has	O
at	O
least	O
one	O
free	O
occurrence	O
in	O
E	O
.	O
</s>
<s>
As	O
a	O
consequence	O
,	O
combinator	B-Application
K	O
is	O
not	O
present	O
in	O
the	O
λI	O
calculus	O
nor	O
in	O
the	O
CLI	O
calculus	O
.	O
</s>
<s>
Every	O
λI	O
term	O
can	O
be	O
converted	O
into	O
an	O
equal	O
CLI	O
combinator	B-Application
according	O
to	O
rules	O
similar	O
to	O
those	O
presented	O
above	O
for	O
the	O
conversion	O
of	O
λK	O
terms	O
into	O
CLK	O
combinators	B-Application
.	O
</s>
<s>
L[C]	O
=	O
λx.λy.λz	O
.	O
</s>
<s>
L[B]	O
=	O
λx.λy.λz	O
.	O
</s>
<s>
L[S]	O
=	O
λx.λy.λz	O
.	O
</s>
<s>
A	O
normal	B-Application
form	I-Application
is	O
any	O
combinatory	O
term	O
in	O
which	O
the	O
primitive	O
combinators	B-Application
that	O
occur	O
,	O
if	O
any	O
,	O
are	O
not	O
applied	O
to	O
enough	O
arguments	O
to	O
be	O
simplified	O
.	O
</s>
<s>
It	O
is	O
undecidable	O
whether	O
a	O
general	O
combinatory	O
term	O
has	O
a	O
normal	B-Application
form	I-Application
;	O
whether	O
two	O
combinatory	O
terms	O
are	O
equivalent	O
,	O
etc	O
.	O
</s>
<s>
Now	O
,	O
suppose	O
N	O
were	O
a	O
combinator	B-Application
for	O
detecting	O
normal	O
forms	O
,	O
</s>
<s>
(	O
Where	O
and	O
represent	O
the	O
conventional	O
Church	B-Application
encodings	I-Application
of	O
true	O
and	O
false	O
,	O
λx.λy.x	O
and	O
λx.λy.y	O
,	O
transformed	O
into	O
combinatory	B-Application
logic	I-Application
.	O
</s>
<s>
Either	O
(	O
S	O
I	O
I	O
Z	O
)	O
has	O
a	O
normal	B-Application
form	I-Application
,	O
or	O
it	O
does	O
not	O
.	O
</s>
<s>
have	O
a	O
normal	B-Application
form	I-Application
,	O
then	O
the	O
foregoing	O
reduces	O
as	O
follows	O
:	O
</s>
<s>
but	O
Ω	O
does	O
not	O
have	O
a	O
normal	B-Application
form	I-Application
,	O
so	O
we	O
have	O
a	O
contradiction	O
.	O
</s>
<s>
The	O
combinatory	B-Application
logic	I-Application
analogue	O
of	O
Rice	O
's	O
theorem	O
says	O
that	O
there	O
is	O
no	O
complete	O
nontrivial	O
predicate	O
.	O
</s>
<s>
A	O
predicate	O
is	O
a	O
combinator	B-Application
that	O
,	O
when	O
applied	O
,	O
returns	O
either	O
T	O
or	O
F	O
.	O
A	O
predicate	O
N	O
is	O
nontrivial	O
if	O
there	O
are	O
two	O
arguments	O
A	O
and	O
B	O
such	O
that	O
N	O
A	O
=	O
T	O
and	O
N	O
B	O
=	O
F	O
.	O
A	O
combinator	B-Application
N	O
is	O
complete	O
if	O
NM	O
has	O
a	O
normal	B-Application
form	I-Application
for	O
every	O
argument	O
M	O
.	O
The	O
analogue	O
of	O
Rice	O
's	O
theorem	O
then	O
says	O
that	O
every	O
complete	O
predicate	O
is	O
trivial	O
.	O
</s>
<s>
From	O
this	O
undecidability	O
theorem	O
it	O
immediately	O
follows	O
that	O
there	O
is	O
no	O
complete	O
predicate	O
that	O
can	O
discriminate	O
between	O
terms	O
that	O
have	O
a	O
normal	B-Application
form	I-Application
and	O
terms	O
that	O
do	O
not	O
have	O
a	O
normal	B-Application
form	I-Application
.	O
</s>
<s>
If	O
EQUAL	O
would	O
exist	O
,	O
then	O
for	O
all	O
A	O
,	O
λx	B-Language
.	O
</s>
<s>
David	O
Turner	O
used	O
his	O
combinators	B-Application
to	O
implement	O
the	O
SASL	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
Kenneth	O
E	O
.	O
Iverson	O
used	O
primitives	O
based	O
on	O
Curry	O
's	O
combinators	B-Application
in	O
his	O
J	B-Language
programming	I-Language
language	I-Language
,	O
a	O
successor	O
to	O
APL	B-Language
.	O
</s>
<s>
This	O
enabled	O
what	O
Iverson	O
called	O
tacit	B-Application
programming	I-Application
,	O
that	O
is	O
,	O
programming	O
in	O
functional	O
expressions	O
containing	O
no	O
variables	O
,	O
along	O
with	O
powerful	O
tools	O
for	O
working	O
with	O
such	O
programs	O
.	O
</s>
<s>
It	O
turns	O
out	O
that	O
tacit	B-Application
programming	I-Application
is	O
possible	O
in	O
any	O
APL-like	O
language	O
with	O
user-defined	O
operators	O
.	O
</s>
<s>
Specifically	O
,	O
a	O
typed	O
combinatory	B-Application
logic	I-Application
corresponds	O
to	O
a	O
Hilbert	O
system	O
in	O
proof	O
theory	O
.	O
</s>
