A Graded Modal Dependent Type Theory with a Universe and Erasure, Formalized
Journal article, 2023
The theory is fully formalized in Agda. The formalization, which uses a syntactic Kripke logical relation at its core and is based on earlier work, establishes major meta-theoretic properties such as subject reduction, consistency, normalization, and decidability of definitional equality. We also prove a substitution theorem for grade assignment, and preservation of grades under reduction. Furthermore we study an extraction function that translates terms to an untyped λ-calculus and removes erasable content, in particular function arguments with the "erasable" grade. For a certain class of modalities we prove that extraction is sound, in the sense that programs of natural number type have the same value before and after extraction. Soundness of extraction holds also for open programs, as long as all variables in the context are erasable, the context is consistent, and erased matches are not allowed for weak Σ-types.
erasure
linearity
formalization
dependent types
modalities
graded modal type theory
Author
Andreas Abel
University of Gothenburg
Nils Anders Danielsson
University of Gothenburg
Oskar Eriksson
University of Gothenburg
Proceedings of the ACM on Programming Languages
24751421 (eISSN)
Vol. 7 ICFP 920-954 220Subject Categories
Computer Science
DOI
10.1145/3607862