0

There is a definition in "Lambda Calculi with Types" by Henk Barendregt (pdf) that I am really struggling with. Definition 2.2.13 There are seemingly no examples of it, and I can't find anyone else on the internet using it. Is this a number? I can try and use this definition and apply # to something like PRED and end up with something like <3, <3, #n, <3, #f < ...>>> and that really means nothing to me. And then they applied it to a set and then I get even more confused. A is recursive is #A is recursive? The more I think about it the less I understand. Please help

Guy Coder
  • 179

1 Answers1

1

The first clause in Def. 2.2.13 just introduces a convenient notation $v^{(n)}$ for the symbol (presumably a variable) consisting of the letter $v$ with $n$ primes attached. The second clause introduces, for each expression $A$ of the lambda calculus, a number $\#A$. The three equations in this clause might suggest that $\#A$ is actually a pair of pairs of $\dots$ pairs of numbers, but the very beginning of this clause says that $\langle x,y\rangle$ is not a pair but a number coding the pair (in some standard pairing function). The last clause in this definition introduces a notation ($M$ with corner-quotes around it) for the lambda term that represents the number $\#M$.

You complained that "they applied it to a set", which probably refers to the $\#\mathcal A$ in the last clause of Def. 2.2.14. But that notation is defined right there; it means apply $\#$ to all the members $M$ of the set $\mathcal A$.

I think that covers what you were asking about, in regard to $\#$. The other clauses in the definitions don't involve $\#$.

Andreas Blass
  • 71,833
  • I kinda get that the <x,y> is representing a number, however it doesn't really resemble a number system to me. Which pair refers to 0? which pair refers to 1? and so on. Or does it not matter? Does it work as long as I treat <> as any bijection to the natural numbers? – marcopopo May 07 '22 at 07:25
  • @MarcoLeung Not quite any bijection. As it says in clause 2 of Definition 2.2.13, you want a recursive bijection. But any recursive bijection works. – Andreas Blass May 07 '22 at 13:27