Impredicativity in Linear Dependent Type Theory
We construct a realizability model of linear dependent type theory from a linear combinatory algebra. Our model motivates a number of additions to the type theory. In particular, we add a universe with two decoding operations: one takes codes to cartesian types and the other takes codes to linear types. The universe is impredicative in the sense that it is closed under both large cartesian dependent products and large linear dependent products. We also add a rule for injectivity of the modality turning linear terms into cartesian terms. With all of the additions, we are able to encode (linear) inductive types. As a case study, we consider the type of lists over a linear type, and demonstrate that our encoding has the relevant uniqueness principle. The construction of the realizability model is fully formalized in the proof assistant Rocq.
💡 Research Summary
**
This paper presents a novel realizability model for Linear Dependent Type Theory (LDTT) built from a Linear Combinatory Algebra (LCA). The authors address two major challenges in modern type theory: incorporating impredicativity—where a universe can quantify over all types, including those that involve large dependent products—and preserving linearity, which enforces that resources are used exactly once. By leveraging LCAs, the authors construct a linear realizability category and then a linear comprehension category, providing a categorical semantics that simultaneously supports both linear and cartesian (non‑linear) fragments of the type theory.
A central contribution is the introduction of a single impredicative universe U that lives in the cartesian fragment but is equipped with two decoding operations: El_C maps codes to cartesian types, while El_L maps the same codes to linear types. This design avoids the need for separate cartesian and linear universes and enables the universe to be closed under “large” cartesian dependent products (Π‑types) as well as “large” linear dependent products (⊓‑types). Moreover, the universe is also closed under linear function types and equalizers, making it robust enough to encode a wide range of constructions.
To connect the linear and cartesian worlds, the paper adds two modalities: M, which turns linear terms (in an empty linear context) into cartesian terms, and L, which embeds linear types into the cartesian fragment. Crucially, the authors introduce an injectivity rule for M (M‑inj), stating that if M a = M a' then a = a'. Semantically this corresponds to the functor M being faithful, and it allows the derivation of linear identity types from cartesian identity types.
The paper also enriches the linear fragment with equalizers (Eq(f,g)) and provides introduction, elimination, β‑ and η‑rules for them. These equalizers enable the definition of a function extensionality principle for linear functions and for the dependent linear arrow ⊓. Together with the injectivity of M, this yields a powerful extensionality tool that is essential for reasoning about linear programs.
Using the impredicative universe and the new rules, the authors encode linear inductive types, focusing on the list type over a linear element type A. The encoding follows a polymorphic style reminiscent of System F: List_A is represented as a code in U that, when decoded, yields the usual fold‑based definition Π X:U. (A → X → X) → X → X. The authors prove that this encoding satisfies the relevant uniqueness principle, meaning that any two proofs of equality between list elements are themselves equal—a property that standard impredicative encodings lack in the linear setting. This demonstrates that the model can faithfully represent inductive data while respecting linear resource discipline.
All constructions, definitions, and proofs are fully formalized in the Coq‑based proof assistant Rocq, using the UniMath library for categorical foundations. The formalization includes the definition of linear comprehension categories, the translation from an LCA to a linear realizability model, the universe closure properties, and the correctness of the list encoding. The accompanying Paper.v file documents the correspondence between the informal paper and the mechanized development, ensuring reproducibility.
The paper situates its contributions within a broader landscape: traditional realizability models rely on cartesian combinatory algebras and cannot directly handle linear resources; existing linear realizability approaches lack impredicative universes; and prior attempts to combine impredicativity with linearity either restrict the universe or forgo full dependent types. By providing a single, impredicative, dual‑decoded universe together with a faithful modality and linear equalizers, this work offers the first comprehensive model that unifies these aspects.
In conclusion, the authors demonstrate that impredicativity is compatible with linear dependent type theory, that linear inductive types can be encoded with the appropriate uniqueness properties, and that the entire development can be mechanically verified. Future directions include extending the framework to more complex inductive families (e.g., trees, co‑inductive processes), integrating with quantum programming languages where linearity is essential, and exploring automated extraction of programs from proofs within this enriched linear setting.
Comments & Academic Discussion
Loading comments...
Leave a Comment