All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

De Bruijn Numerals: A Novel Number Encoding Method in Lambda Calculus

By

marvinborner

6mo ago· 22 min readenInsight

Summary

The article introduces a novel method for encoding numbers in pure lambda calculus called 'de Bruijn numerals', which uses nested de Bruijn indices to represent numbers through reference depth. The author explains that this encoding differs from traditional methods like Church numerals, n-ary representations, and Scott encoding, and presents the mathematical formulation where a number n is encoded as λ^(S(n)) n (lambda raised to S(n) applied to n). The article appears to be a technical exploration of lambda calculus representations with mathematical notation and examples.

Key quotes

· 4 pulled
A method that I have not seen yet is an encoding by reference depth. Specifically, I refer to a nested de Bruijn index that, by itself, encodes the number: ⟨n⟩d=λS(n) n
For example, the decimal number 4 would be encoded as ⟨4⟩d=λ5 4.
Isn't this just so elegant? Because I could not find a name for the encoding, I call it 'de Bruijn numerals'.
There are many ways to encode numbers and do arithmetic in the pure lambda calculus, for example using unary Church numerals, various n-ary representations, and the Scott encoding.
Snippet from the RSS feed
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.

You might also wanna read