Currently, (external) open type equality factors through the internal open type equality: basically, if the two equands are equal types at equal total substitutions, then they are equal as open types.
This is a perfectly sensible notion of type equality, but it doesn't seem to work that well for some things. In particular, it is not necessarily the case that we can conclude /\k. A[k] = /\k. B[k] type
from forall k, A[k] = B[k] type
, so it does not seem possible (or at least easy) for us to prove the naïve formation rule for the intersection type. On the other hand, I have proved the version of this rule that uses equality in a universe, rather than general typehood. This version actually suffices for all applications, fwiw; just like how in Nuprl, you can't even state type equality without a universe.
Why does this happen? Remember that the judgments are interpreted with respect to the join of the type system hierarchy. So, ultimately the meaning of forall k, A[k] = B[k] type
is something like forall k, there exists level i such that τ[i] != A[k] ~ B[k]
. So, when we make the judgment generic in the clock, we have at each clock a level at which the equality holds, but we don't necessarily have a uniform such level. It seems like we ought to have one (some kind of "continuity" principle), but if it is even true, it would be very hard to prove.
We can get around the problem by simply defining the external type equality judgment so that it fixes a level outside the quantification over clocks: basically, we get around the problem of commuting those quantifiers by just changing a definition. This would be equivalent to just using equality-in-the-universe everywhere, but it might lead to easier-to-use rules. I may experiment with this at some point soon.
Right now it is not an emergency, since it is possible to just use equality in the universe for everything.