Combinatory logic, combinatorial calculi, and other questions about combinators and variable-free variants of the $\lambda$-calculus.

# Questions tagged [combinatory-logic]

49 questions

**34**

votes

**3**answers

### Can someone explain the Y Combinator?

The Y combinator is a concept in functional programming, borrowed from the lambda calculus. It is a fixed-point combinator. A fixed point combinator $G$ is a higher-order function (a functional, in mathematical language) that, given a function $f$,…

Chris Taylor

- 27,485
- 5
- 79
- 121

**25**

votes

**1**answer

### Why can't we formalize the lambda calculus in first order logic?

I'm reading through Hindley and Seldin's book about the lambda calculus and combinatory logic. In the book, the authors express that, though combinatory logic can be expressed as an equational theory in first order logic, the lambda calculus cannot.…

Jacob Denson

- 1,939
- 10
- 19

**19**

votes

**0**answers

### Where to go after _To Mock A Mockingbird_?

So long ago I read Raymond Smullyan's delightful To Mock A Mockingbird, a gentle introduction to combinatory logic (representing combinators as 'birds' singing back and forth to each other). I fell in love with the book and was fascinated by the…

Steven Stadnicki

- 50,003
- 9
- 78
- 143

**9**

votes

**2**answers

### What axioms can be added to $S,K$ combinator algebra without making it collapse into triviality?

My understanding is that if you start with the free magma on two generators (call them $S$ and $K$) and then take a quotient with respect to the usual $S$ and $K$ equivalence rules ($Sfgx = fx(gx)$ and $Kxy = x$), you get the usual $S,K$ combinator…

J. Rees

- 91
- 2

**6**

votes

**2**answers

### In what sense is the S-combinator "substitution"?

According to the Wikipedia page on SKI-combinator calculus, I is the identity function, K is the constant function, and S is "substitution". I understand the first two, but I don't see what S has to do with substitution and wikipedia offers no…

dspyz

- 800
- 3
- 16

**6**

votes

**1**answer

### Is there a proof of (non)existence of a proper universal combinator?

It is a well-known fact that all combinators can be derived from the two fundamental combinators K and S. It seems only natural to also ask whether there is a single universal combinator, but I can’t find much information on the topic. The only…

user287393

- 261
- 1
- 5

**6**

votes

**1**answer

### Fixed point combinator (Y) and fixed point equation

In Hindley (Lambda-Calculus and Combinators, an Introduction), Corollary 3.3.1 to the fixed-point theorem states:
In $\lambda$ and CL: for every $Z$ and $n \ge 0$ the equation $$xy_1..y_n = Z$$
can be solved for $x$. That is, there is a term $X$…

vinothkr

- 725
- 6
- 15

**5**

votes

**1**answer

### Smullyan-To-Mock-a-Mockingbird, Find egocentric bird in L

Question (29, p. 81). Let me tell you the most surprising thing I know about larks: Suppose we are given that the forest contains a lark $L$ and we are not given any other information. From just this one fact alone, it can be proved that at least…

Johnny Bre

- 149
- 1
- 1
- 5

**5**

votes

**2**answers

### Prove that all combinators must fulfill A x = x for some x, given that M x = x x and composability of any two combinators

I'm working through Raymond Smullyan's "To Mock a Mockingbird" and I'm stuck on the first problem in the combinatory logic section. I'd appreciate hints, but no spoilers please. The problem is basically as follows:
There exists a forest of magical…

user17137

**5**

votes

**0**answers

### Can all computable numeric functions on church numerals in ski-combinator calculus be expressed using only completely evaluated terms?

Let a term in ski-combinator calculus be called "complete" if every primitive is partially applied (so all S's are applied to at most two arguments, all K's to at most 1, and all I's are not applied).
So for instance:
S(II)I is not complete, but it…

dspyz

- 800
- 3
- 16

**4**

votes

**1**answer

### How to represent Smullyan's "Mockingbird" puzzles in (Homotopy) Type Theory?

(If you're unfamiliar with the puzzles from To Mock a Mockingbird, three pages tell you everything you should need.)
Is it possible to solve the riddles in To Mock a Mockingbird in a "propositions as types" style?
As an example, let's take the…

Josh Tilles

- 271
- 1
- 4

**4**

votes

**0**answers

### Relationship between the semantics of simply typed lambda calculus and combinatory logic

The simply typed lambda calculus has a class of extremely intuitive models where each basic type $\sigma$ is modeled by some set $[\![\sigma]\!]$, and a complex type $\sigma\rightarrow\tau$ is then straightforwardly interpreted as the full function…

R. Thomas

- 137
- 4

**4**

votes

**1**answer

### combinatory basis for head reduction

Consider combinatory calculi that don't have tail reduction. So there may be combinators $x$, $y$ and $z$ such that $y\to z$ but $xy\nrightarrow xz$. We can still write every combinator as a combination of the following four: $\mathbf bxyz\to…

Wouter Stekelenburg

- 1,176
- 6
- 12

**3**

votes

**1**answer

### Looping (ω) Combinator

Can someone explain this combinator? I understand $\lambda x. x$,
but I don't understand $\lambda x. x x$
From what I've gathered, this means given x, return the application of x to x. I don't understand the application of x to itself part. For…

J.R. Garcia

- 133
- 1
- 6

**3**

votes

**1**answer

### SKI Calculus prefix notation of odd/even number

I'm working on a homework with SKI calculus. I saw the hints in this very useful post.
We basically defined SKI functions as:
def tt = K;
def ff = S K;
def inc = S (S (K S) K);
def _0 = S K;
def _1 = inc _0;
def _2 = inc _1;
def _3 = inc…

windweller

- 179
- 5