Repository navigation
Add interfaces to declare generic level polymorphic n-ary functions - #73
Conversation
This work is based on Guillaume Allais - "Generic Level Polymorphic N-ary Functions" (TyDe 2019)
fblanqui
left a comment
There was a problem hiding this comment.
Thanks Alessio. Here are some remarks:
|
Various functions can be declared as injective: Please add an example using the unification rules. |
This comment was marked as resolved.
This comment was marked as resolved.
… arity of the function implicit
|
I think we have a better API now. |
|
I think we can merge this one |
|
Hi Alessio. Your unification rules are unsound: (fun unit b) can be an arrow type (if b so is). I also propose some renamings: Sets -> VSet, sets -> vset, arrows -> fun, Arrow -> Fun, cong_n -> refl_cong, subst_n -> refl_subs, compose_n -> comp. I already fixed all this. Can I push on your branch? |
good catch No problem changing the name; I just followed the one in the paper when I implemented it during my PhD to make things easier. Yes feel free to commit on top of mine |
|
It is perhaps possible for the user to only give the arity instead of the domain by defining functions on n instead of on ts. |
I've thought about that too, but I haven't found a way to implement it yet. |
|
One problem to get this feature is to have Lambdapi infer that any meta ?X:VSet 0 can be instantiated by unit (◃ now). |
|
Remark: List.Arr n a b is the same as NaryFun.Fun n (vcst a) b. |
Implementation of N-ary functions and relations based on Guillaume Allais, "Generic Level Polymorphic N-ary Functions" (TyDe 2019).
This API provides n-ary functions that automatically reconstruct the representation of their input types through unification.
It helps to define fully level polymorphic n-ary versions of congruence, substitution and the combinators for indexed families,
that are used by programs such as SMT solvers. Lemmas provided in the rest of the library such as
Eq.lpare implemented for fixed arities, and the implementation here aims to provide similar lemmas for N-ary Combinators.