English

Combinatorics of $\lambda$-terms: a natural approach

Logic in Computer Science 2016-10-17 v2 Discrete Mathematics Combinatorics Logic

Abstract

We consider combinatorial aspects of λ\lambda-terms in the model based on de Bruijn indices where each building constructor is of size one. Surprisingly, the counting sequence for λ\lambda-terms corresponds also to two families of binary trees, namely black-white trees and zigzag-free ones. We provide a constructive proof of this fact by exhibiting appropriate bijections. Moreover, we identify the sequence of Motzkin numbers with the counting sequence for neutral λ\lambda-terms, giving a bijection which, in consequence, results in an exact-size sampler for the latter based on the exact-size sampler for Motzkin trees of Bodini et alli. Using the powerful theory of analytic combinatorics, we state several results concerning the asymptotic growth rate of λ\lambda-terms in neutral, normal, and head normal forms. Finally, we investigate the asymptotic density of λ\lambda-terms containing arbitrary fixed subterms showing that, inter alia, strongly normalising or typeable terms are asymptotically negligible in the set of all λ\lambda-terms.

Keywords

Cite

@article{arxiv.1609.07593,
  title  = {Combinatorics of $\lambda$-terms: a natural approach},
  author = {Maciej Bendkowski and Katarzyna Grygiel and Pierre Lescanne and Marek Zaionc},
  journal= {arXiv preprint arXiv:1609.07593},
  year   = {2016}
}
R2 v1 2026-06-22T15:59:55.678Z