Linear Recursion
We define two extensions of the typed linear lambda-calculus that yield minimal Turing-complete systems. The extensions are based on unbounded recursion in one case, and bounded recursion with minimisation in the other. We show that both approaches are compatible with linearity and typeability constraints. Both extensions of the typed linear lambda-calculus are minimal, in the sense that taking out any of the components breaks the universality of the system. We discuss implementation techniques that exploit the linearity of the calculi. Finally, we apply the results to languages with fixpoint operators: we give a compilation of the programming language PCF into a linear lambda-calculus with linear unbounded recursion.
💡 Research Summary
The paper investigates how to obtain minimal, Turing‑complete extensions of the simply‑typed linear λ‑calculus while preserving syntactic linearity and type safety. Starting from the linear λ‑calculus, which enforces that each variable occurs exactly once and therefore guarantees operational linearity (all computations run in linear time), the authors identify two distinct augmentations that are both sufficient and necessary for universality.
The first system, L rec, enriches the calculus with natural numbers, binary pairs, and a linear unbounded recursor rec. The recursor takes four closed sub‑terms and behaves like a primitive recursion operator: on the numeral 0 it returns a base value, and on a successor it recursively invokes itself. Crucially, the reduction strategy is closed‑reduction: every recursive call must be applied to a closed function, eliminating the need for α‑conversion during substitution and ensuring that linearity is never violated. The type system remains the standard linear one (A ::= N | A ⊸ B | A ⊗ B), and no explicit copy or erase combinators are introduced; duplication and disposal of resources are performed solely by the recursor.
The second system, L µ, replaces unbounded recursion with a combination of bounded iteration (the iter construct from System L) and a minimisation operator μ. The iteration operator alone captures exactly the primitive recursive functions, while the minimisation operator alone cannot generate all partial recursive functions. The authors prove that only the joint presence of both operators yields full Turing completeness. As with L rec, the calculus is linear, and all variables remain used exactly once.
Both extensions are shown to be minimal: removing any of the added components (numbers, pairs, the recursor in L rec; iteration or minimisation in L µ) destroys universality, reducing the expressive power to either the linear fragment or to primitive recursion. This minimality result demonstrates that the presented operators constitute the smallest possible set needed to achieve universality in a linear typed setting.
On the implementation side, the paper presents an abstract machine for L rec. A machine configuration consists of a term together with a stack of terms; the stack encodes the linear context without requiring an environment for variable bindings. Both call‑by‑name and call‑by‑value evaluation strategies are defined, and the authors show how the closed‑reduction discipline integrates smoothly with these strategies. The machine’s transition rules directly reflect the operational semantics of rec, guaranteeing that each reduction step respects linear usage of resources.
Finally, the authors give a compilation of the full PCF language into L rec. PCF’s fixpoint operator is encoded using the linear unbounded recursor together with pair‑testing primitives, effectively translating a non‑linear recursion construct into a linear one. Because the target language already has an abstract machine, this translation yields a concrete implementation of PCF via a simple stack‑based machine, illustrating how linear calculi can serve as compilation targets for conventional functional languages.
Overall, the paper makes four major contributions: (1) the definition of two minimal, Turing‑complete linear calculi (L rec and L µ); (2) proofs of subject reduction, confluence, and minimality for both systems; (3) an abstract machine exploiting syntactic linearity for efficient evaluation; and (4) a PCF‑to‑L rec compilation that bridges linear logic‑based formalisms with mainstream functional programming. These results deepen our understanding of the interplay between linearity, recursion, and computational universality, and they provide a solid foundation for designing resource‑aware programming languages, hardware description languages, and quantum‑computing formalisms where copying is intrinsically restricted.
Comments & Academic Discussion
Loading comments...
Leave a Comment