Lecture 11:
Important concepts in rewriting theory: when redexes are created
How can this situation happen?
-
when $u$ is a redex itself
-
when $u = (λx.λy. p) q ⟶ λy. p \lbrace x ← q\rbrace$
-
when $u = I (λx. p) ⟶ λx. p$
-
-
$u$ is a variable $x$ and it is substituted by a $λ$.
(λz. δ) (xy) δ ⟶ δδ
Value substitution calculus:
- Functional Programming Languages: weak $λ$-calulus + closed terms
- Proof assistants: strong $λ$ + open terms
Intermediate level: OPEN: (weak $λ$ + open terms)
In CBN: open vs. closed doesn’t change much whereas for CBV: open vs. closed is crucial, it can affect termination
Fireables (aka fireball) and Intert terms:
And new rewriting rules:
Harmony property:
- either $t ⟶_{βf} t’$
- or $t$ is a fireball
NB: When $t$ is closed:
- $t ⟶_{βv} t’$
- $t$ is a value
There are a couple of issues though if you extend this calculus under $λ$’s. Consider this term:
So in the strong case, fireball doesn’t work.
Intermediate between a calculus with explicit substitutions and a $λ$-calulus:
Split fireball calculus:
and
The point of inert terms is that substituting them does not create new redexes.
Sum up:
-
Size explosion: there’s a mismatch: $β$-step cannot be taken as an atomic operatic for all strategies (both CBN and CBV are reasonable, given two AM with polynomial overhead)
Important concept: being reasonable doesn’t mean to be efficient, it’s about being able to be implemented with a polynomial overhead
-
AM: search (linear in the work done by substitutions) and substitutions. By removing search ⟹ linear substitution calculus
-
Certain strategies in PN never change the boxes ⟹ subterm property
-
CBneed: best of the two worlds (CBV and CBN), but doesn’t have a clean interpretation in linear logic
Leave a comment