bitonic / tog

25 stars 3 forks source link

How to handle currying of meta-variables with pruning #8

Closed bitonic closed 9 years ago

bitonic commented 9 years ago

Given

α : ((A × B) -> C)  -> D
β : A × B -> C

Let's say that we want to prune variable x in α β. Everything should go smoothly, however if we curry β, which we must do in the general case for unification to be complete, we're left with

γ : A -> B -> C

β = λ x -> γ (fst x) (snd x)

α β = α (λ x -> γ (fst x) (snd x))

Usually we never attempt to prune λ-arguments to a meta-variable, but here we really should. We can't eta-contract the abstraction over γ.

We need a better way to prune under abstractions, but I'm not sure how to proceed.

Saizan commented 9 years ago

x doesn't appear in α β so it's not clear what you're aiming at here.

bitonic commented 9 years ago

Right... I thought there were cases where the expansion was a problem but actually I think it was a consequence of how I performed the pruning in my code.