De Bruijn Numerals
text.marvinborner.de·6d·
Discuss: Hacker News
Flag this post
  • Arithmetic

  • Hybrid

  • Projections assumptions in this post

  • understanding of pure lambda calculus

  • zero-based de Bruijn indices instead of named variables

  • nn consecutive lambdas are written as λn\lambda^n

  • ⟨n⟩e\langle n\rangle_e encodes n∈N0n\in\mathbb{N}_0 as a lambda calculus term of encoding ee

  • S(n)S(n) is the Peano successor function

There are many ways to encode numbers and do arithmetic in the pure lambda calculus, for example using unary Church numerals, various nn-ary representations, and the [Scott encoding](https://en.wikipedia.org/wiki/Mogensen–Scott…

Similar Posts

Loading similar posts...