Quantitative aspects of linear and affine closed lambda terms
arXiv:1702.03085
Abstract
Affine -terms are -terms in which each bound variable occurs at most once and linear -terms are -terms in which each bound variables occurs once. and only once. In this paper we count the number of closed affine -terms of size , closed linear -terms of size , affine -normal forms of size and linear -normal forms of ise , for different ways of measuring the size of -terms. From these formulas, we show how we can derive programs for generating all the terms of size for each class. For this we use a specific data structure, which are contexts taking into account all the holes at levels of abstractions.