A Graded Modal Dependent Type Theory with Erasure, Formalized
Andreas Abel, Nils Anders Danielsson, Oskar Eriksson

TL;DR
This paper introduces a formal graded modal dependent type theory with erasure, formalized in Agda, enabling tracking of variable usage and erasure properties, with proven meta-theoretic guarantees.
Contribution
It develops a novel graded modal dependent type theory with erasure, formalized in Agda, and proves key properties like normalization and extraction soundness.
Findings
Formalization in Agda with meta-theoretic proofs
Extraction function preserves natural number values
Soundness of extraction for certain modalities
Abstract
We present a graded modal type theory, a dependent type theory with grades that can be used to enforce various properties of the code. The theory has -types, weak and strong -types, natural numbers, an empty type, and a universe, and we also extend the theory with weak and strong unit types and graded -types. The theory is parameterized by a modality structure, a kind of partially ordered semiring, whose elements (grades) are used to track the usage of variables in terms and types. Different modalities are possible. We focus mainly on quantitative properties, in particular erasure: with the erasure modality one can mark function arguments as erasable. 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
