1
$\begingroup$

Hindley & Seldin define ([1] Definition 4.2, p. 48) the Church numerals as follows: (I'm paraphrasing to save space. Here's the original page.)

For every $n \in \{0,1,\dots\}$, the Church numeral for $n$ is $$ \overline{n} := (SB)^n(KI) $$ where we used the abbreviations $$ \begin{align} X^nY &:= \underset{n}{\underbrace{X(X(\dots(X}}Y))) \\ B &:= S(KS)K \end{align} $$

They proceed to claim (ibid. Note 4.4, p. 48) that $\overline{n} = [x,y].x^ny$ for all $n\neq 1$.

I don't see why this claim holds. For instance, when $n=2$ we have $$ \begin{align} [x,y].x^ny &= [x].\Big([y].\big(x(xy)\big)\Big) \\ &= [x].\Big(S\big([y].x\big)\big([y].(xy)\big)\Big) \\ &= [x].\big(S(Kx)x\big) \\ &= S\Big([x].\big(S(Kx)\big)\Big)([x].x) \\ &= S\Big(S([x].S)\big([x].(Kx)\big)\Big)I \\ &= S\big(S(KS)K\big)I \\ &= SBI \\ &= (SB)^1I \\ &\neq (SB)^2(KI) \\ &= \overline{n} \end{align} $$

I checked the textbook's official errata list, but this is not listed there.

What am missing?


[1] J. Roger Hindley & Jonathan P. Seldin. (2008) Lambda-Calculus and Combinators - An Introduction. Cambridge University Press.

1 Answers 1

1

The following step isn't correct:

$$(SB)^1I \ne (SB)^2(KI)$$

because $(SB)Iab = a(ab)$ and $SB(SB(KI))ab = a(ab)$ using $Bxyz = x(yz)$.

An alternative (more straightforward) check that doesn't require the deduction thm transform you are using:

$$\begin{align} % \bar{2}fx &= (SB)^2(KI)fx \\ % &= SB(SB(KI))fx \\ % &= Bf(SB(KI)f)x \\ % &= f(SB(KI)fx) \\ % &= f(Bf(KIf)x) \\ % &= f(f(KIfx)) \\ % &= f(f(Ix)) \\ % &= f(fx) \\ % \end{align}$$

  • 0
    Thanks. However, I think your derivation is wrong, because you leave out the parentheses surrounding the sub term $KI$. Up until the fourth step it doesn't make a difference, however step no. five, namely $f(SBKIfx)=f(BI(KI)fx)$ is incorrect. If you put in the parentheses as appropriate you'll see that actually $\overline{2}fx\rhd f^2x$.2017-02-22
  • 1
    You are right, I'll update this.2017-02-22
  • 0
    I gave you an upvote, because you made me realize that $(SB)^1Iab\equiv_w(SB)^2(KI)ab$ for all CL-terms $a,b$. However, I'm not check-marking your answer, because it does not quite answer my question, since my question refers to syntactic identity, in other words, the textbook claims that for every $n\neq1$ the expression $\overline{n}$ is exactly the same expression as $(SB)^n(KI)$, and clearly $(SB)^1I$ is not the same expression as $(SB)^2(KI)$.2017-02-22
  • 1
    How could each $\lambda xy.x^ny$ possibly be textually equal to $(SB)^n(KI)$ ? One has a $\lambda$ and one doesn't. Is your book trying to define "syntactic" (I hate when people use that word) equivalence in terms of the $\lambda$ to $SKI$ transform?2017-02-22
  • 0
    The question is framed in the language of combinatory logic, not of lambda calculus. The symbol $\lambda$ is not part of the language.2017-02-22