You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to make more true equations hold definitionally. For example, although thinnings are not unique in general, empty thinnings and endothinnings surely are. Suppose th is variable typed as a thinning from nonempty list of types Nat, Xs to itself. We could select by th from some tuple which starts with 3, then take first projection. With beta rules only, that should get stuck because th is neutral. But if we impose uniqueness of endothinnings, then we must deliver 3, as th is equal to a thinning which retains the head.
So if we want that little bit of eta, we need to be able to tell that th is an endothinning, and that amounts obtaining the type of th, then testing definitional equality of its source and target lists of types. That is, we must ask "is this type the type of the identity thinning?".
Unlike nu-rules, where we replace stuck things by tidier stuck things, this example replaces a stuck thing by 3. Correspondingly, it cannot be delayed until quotation time (i.e., used only when testing definitional equality). This check must be done during evaluation to head normal form. From this we may deduce that we need type information to be present in open evaluation, at least some of the time, which almost certainly means that we need to propagate it everywhere. Moreover, as we need to test definitional equality, we surely need the means to work under binders, which means we should also manage a supply of fresh names (or de Bruijn levels).
Note that the necessity of type information to support computation with open terms does not imply the impossibility of type erasure for execution of closed terms. It's time we stopped treating open computation merely as closed computation with stuff in the way.
The text was updated successfully, but these errors were encountered:
We're trying to make more true equations hold definitionally. For example, although thinnings are not unique in general, empty thinnings and endothinnings surely are. Suppose
th
is variable typed as a thinning from nonempty list of typesNat, Xs
to itself. We could select byth
from some tuple which starts with3
, then take first projection. With beta rules only, that should get stuck becauseth
is neutral. But if we impose uniqueness of endothinnings, then we must deliver3
, asth
is equal to a thinning which retains the head.So if we want that little bit of eta, we need to be able to tell that
th
is an endothinning, and that amounts obtaining the type ofth
, then testing definitional equality of its source and target lists of types. That is, we must ask "is this type the type of the identity thinning?".Unlike nu-rules, where we replace stuck things by tidier stuck things, this example replaces a stuck thing by 3. Correspondingly, it cannot be delayed until quotation time (i.e., used only when testing definitional equality). This check must be done during evaluation to head normal form. From this we may deduce that we need type information to be present in open evaluation, at least some of the time, which almost certainly means that we need to propagate it everywhere. Moreover, as we need to test definitional equality, we surely need the means to work under binders, which means we should also manage a supply of fresh names (or de Bruijn levels).
Note that the necessity of type information to support computation with open terms does not imply the impossibility of type erasure for execution of closed terms. It's time we stopped treating open computation merely as closed computation with stuff in the way.
The text was updated successfully, but these errors were encountered: