Think of a concrete vector space (say of dimension 4) over an unknown field. You can also see this as a record definition with some manifest entries (i.e. definitional extensions). The change of perspective can at times be useful. 2/
Conversation
In both cases, I think the best view is as a substitution [aka generalized term], mapping from the vector space context to the field that specifies part of it, and the rest is the identity. Yes, this is related to existentials, but where you slice off a whole leading context.
1
2
Oh cool! Didn't know they were your student! Yeah I first noticed the weirdness of bundling with traits in Rust - ie. do I use a type parameter or an associated type? Then in the 1ML paper where they showed that you can do stuff in the 'type class style' or the 'ML style'.
2
You should look at Arend, the theorem prover. It has a beautiful solution to the (un)bundling problem. The bundling problem ought to be regarded as an instance of a false choice - but most systems force it anyways.
1
2
Yeah! I've seen it before, it's pretty cool! Maybe I should re-investigate implementing that for records.
I guess I've been wondering if it's possible to allow some amount of out-of order application/construction, like labelled parameters/records in non-dependent type systems.
2
You're getting into really deep waters here (pun intended). This gets into higher-order unification and/or fragile elaboration algorithms. You'd need to deeply study the work in Agda, Idris. The state of the art is well explained in github.com/AndrasKovacs/e
2
3
Heh, I think had a thread on higher order unification the other week!
That repo is really handy! Many of us have found it useful! 🤩 I've also been planning to look at Andras' implicit function elaboration repo at some stage too. Sadly I've not found the time yet!


