Enumerating Lambda Terms by Weighted Length of Their De Bruijn Representation
Olivier Bodini, Bernhard Gittenberger, Zbigniew, Go{\l}\k{e}biewski

TL;DR
This paper analyzes the enumeration of lambda terms using weighted de Bruijn representations, disproves a previous conjecture on their asymptotic count, and introduces efficient random sampling methods for large lambda terms.
Contribution
It generalizes the notion of size for lambda terms, provides precise asymptotic counts, and develops an efficient uniform sampling algorithm for large lambda terms.
Findings
Disproves Grygiel and Lescanne's conjecture on lambda term enumeration.
Establishes asymptotic formulas for various classes of lambda terms.
Introduces a highly efficient method for uniform random sampling of large lambda terms.
Abstract
John Tromp introduced the so-called 'binary lambda calculus' as a way to encode lambda terms in terms of 0-1-strings using the de Bruijn representation along with a weighting scheme. Later, Grygiel and Lescanne conjectured that the number of binary lambda terms with free indices and of size (encoded as binary words of length and according to Tromp's weights) is for . We generalize the proposed notion of size and show that for several classes of lambda terms, including binary lambda terms with free indices, the number of terms of size is with some class dependent constant , which in particular disproves the above mentioned conjecture. The methodology used is setting up the generating functions for the classes of lambda terms. These are infinitely nested radicals which are…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
