HackerPapers

arXiv:1405.3311cs.LO

Beta Reduction is Invariant, Indeed (Long Version)

Beniamino Accattoli, Ugo Dal Lago

Abstract

Slot and van Emde Boas' weak invariance thesis states that reasonable machines can simulate each other within a polynomially overhead in time. Is $λ$-calculus a reasonable machine? Is there a way to measure the computational complexity of a $λ$-term? This paper presents the first complete positive answer to this long-standing problem. Moreover, our answer is completely machine-independent and based over a standard notion in the theory of $λ$-calculus: the length of a leftmost-outermost derivation to normal form is an invariant cost model. Such a theorem cannot be proved by directly relating $λ$-calculus with Turing machines or random access machines, because of the size explosion problem: there are terms that in a linear number of steps produce an exponentially long output. The first step towards the solution is to shift to a notion of evaluation for which the length and the size of the output are linearly related. This is done by adopting the linear substitution calculus (LSC), a calculus of explicit substitutions modelled after linear logic and proof-nets and admitting a decomposition of leftmost-outermost derivations with the desired property. Thus, the LSC is invariant with respect to, say, random access machines. The second step is to show that LSC is invariant with respect to the $λ$-calculus. The size explosion problem seems to imply that this is not possible: having the same notions of normal form, evaluation in the LSC is exponentially longer than in the $λ$-calculus. We solve such an impasse by introducing a new form of shared normal form and shared reduction, deemed useful. Useful evaluation avoids those steps that only unshare the output without contributing to $β$-redexes, i.e., the steps that cause the blow-up in size.

arXiv comments
29 pages
Journal reference
DOI
Subjects
cs.LOLogic in Computer Science

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Dec 2015 to Sep 2021.

Comments linking this paper, per year.

Discussed in comments2 threads

  1. Turing Oversold? 1 comment
    • Didn’t have access to my archive at the time, so got some of the details wrong it seems (e.g. CbV not CbN, result for time is older than I remembered). Main thrust should remain valid, but be careful. In any case, here you go: Dal Lago, Martini (2008). “The weak lambda calculus…

      mananaysiempreView on HNParent context

    • If you don't understand what I'm saying -- and that could be entirely my fault -- you can just ask. If you (mistakenly) assume that by 2 + 2 I mean the expression "2 + 2" rather than the computation 2 + 2, why not assume that you may have missed something (which is the actual…

      pronView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.