🤖 AI Summary
Pure Subtype Systems (PSS), a unifying framework for types and terms, hold significant promise for integrating dependent types with higher-order subtyping; however, their type safety—specifically progress and preservation—has remained unproven for over a decade since their inception.
Method: We introduce a fine-grained subtyping derivation framework that overcomes the long-standing obstacle of transitivity elimination in higher-order subtyping. Building upon this, we fully reconstruct the subtyping derivation mechanism and provide the first formal proof of PSS type safety. Additionally, we design and verify a decidable type-checking algorithm.
Results: We establish the first rigorous correctness proof of this algorithm and thereby resolve Hutchins’ key open problem. Our work not only settles a foundational theoretical question but also lays a solid groundwork for the principled integration of dependent and higher-order subtyping.
📝 Abstract
We address the open problem of type safety in Hutchins' pure subtype systems (PSS). PSS (hereafter in the singular) harmoniously mixes terms and types, thus enabling a number of advanced language features that combine dependent types with higher-order subtyping. In PSS terms and types belong to the same kind (everything is a subtype) and the resulting theory is based on subtyping. Since PSS lacks strong normalisation, a type soundness result can only be stated in terms of type safety defined as progress and preservation. Proving type safety rests on the well-known problem of transitivity elimination in higher-order subtyping, where a key inversion lemma fails under the presence of intermediary steps in transitive subtype derivations. Despite his attempts, Hutchins failed to prove PSS type safety. We propose a reformulation of pure subtype systems with a more fine-grained notion of subtyping derivation that enables a direct proof of transitivity elimination, and thus of type safety. We also reformulate Hutchins' practical type-checking algorithm to our system and prove it correct.