Combinatorics of explicit substitutions

Abstract

λ is an extension of the λ-calculus which internalises the calculus of substitutions. In the current paper, we investigate the combinatorial properties of λ focusing on the quantitative aspects of substitution resolution. We exhibit an unexpected correspondence between the counting sequence for λ-terms and famous Catalan numbers. As a by-product, we establish effective sampling schemes for random λ-terms. We show that typical λ-terms represent, in a strong sense, non-strict computations in the classic λ-calculus. Moreover, typically almost all substitutions are in fact suspended, i.e. unevaluated, under closures. Consequently, we argue that λ is an intrinsically non-strict calculus of explicit substitutions. Finally, we investigate the distribution of various redexes governing the substitution resolution in λ and investigate the quantitative contribution of various substitution primitives.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…