Lattice specialisation in const generics?

Continuing the discussion from `impl Default` for generically sized arrays? (`[T; N]`):

Perhaps we should consider providing a comprehensive framework for const-generics and lattice specialisation? For example, we should consider a specific value to be a special case of a generic value in const generics.

This would solve the impl Default problem, in my opinion, as a specific subtyping system will prove to Rust that the implementations discussed by @SkiFire13 and @the8472 are valid.

In my opinion, this would also be sound, as it would not suffer trans-erasure like lifetimes.

This is a very nebulous idea and I would require some help fleshing it out before submitting an RFC.

I don't know what you mean here, since that's not the meaning of "subtype" I'm used to.

Are you perhaps thinking of something kinda like lattice specialization?

Yes, that's it! I think this will be safer than lifetime-based lattice specialization as const generics are carried over to trans (as per my understanding)

Edited my post to make it more clear.