🤖 AI Summary
Existing extension-tracking mechanisms operate outside the type system, making it difficult to precisely characterize definitions’ dependencies on language extensions. This leads to non-reusable definitions across incompatible extensions, restricted cross-extension referencing, and potential logical inconsistencies. To address this, we internalize extension dependencies into the type system, proposing a novel type-theoretic framework based on a dependency-level lattice—where the lattice structure formally models extension compatibility. We annotate variables and terms with dependency levels and integrate dependency-conscious observational indistinguishability (DCOI) to enable fine-grained dependency tracking and cross-extension safe reasoning. Our approach enables precise localization and isolation of extension impacts, supports safe reuse of heterogeneous extension definitions in non-conflicting contexts, and significantly enhances modularity and logical reliability in proof assistants.
📝 Abstract
Many proof assistants allow the use of features and axioms that increase their expressive power. However, these extensions must be used with care, as some combinations are known to lead to logical inconsistencies. Therefore, proof assistants include mechanisms that track which extensions are used in a proof development or module, ensuring that incompatible extensions are not used simultaneously.
Unfortunately, existing extension tracking mechanisms are external to the type system. This means that we cannot specify precisely which extensions a definition depends on. Having the ability to write more precise specifications means we are not picking an overapproximation of the extensions needed, which prevents reusing definitions in the presence of incompatible extensions. Furthermore, we cannot refer to definitions that use incompatible extensions even if they are never used in inconsistent ways. The reasoning principles of one extension therefore cannot be used as a metatheory to reason about the properties of an incompatible extension.
In this report, I explore the use of the Dependent Calculus of Indistinguishability (DCOI) by Liu et al. for extension tracking. DCOI is a dependent type system with dependency tracking, where terms and variables are assigned dependency levels alongside their types. These dependency levels form a lattice that describes which levels are permitted to access what. To instead track extensions, each set of extensions would correspond to a dependency level, and the lattice would describe how extensions are permitted to interact.