2-Level λ-lifting

The process of λ-lifting (or bracket abstraction) translates expressions in a typed λ-calculus into expressions in a typed combinator language. This is of interest because it shows that the λ-calculus and the combinator language are equally expressive (as the translation from combinators to λ-expressions is rather trivial). This paper studies the similar problems for 2-level λ-calculi and 2-level combinator languages. The 2-level nature of the type system enforces a formal distinction between binding times, e.g. between computations at compile-time and computations at run-time. In this setting the natural formulations of 2-level λ-calculi and 2-level combinator languages turn out not to be equally expressive. The translation into 2-level λ-calculus is straight-forward but the 2-level λ-calculus is too powerful for λ-lifting to succeed. We then develop a restriction of the 2-level λ-calculus for which λ-lifting succeeds and that is as expressive as the 2-level combinator language.