Table of Contents
Fetching ...

DeLaM: A Dependent Layered Modal Type Theory for Meta-programming

Jason Z. S. Hu, Brigitte Pientka

TL;DR

DeLaM unifies dependent types with a $2$-layered modal type theory to enable type-safe meta-programming and introspective analysis of code. It extends prior layered modal frameworks with context variables, provides a comprehensive syntactic and semantic apparatus (weakening, substitutions, reducibility, and validity judgments), and develops a complete convertibility framework with normalization. The work presents a full dependent extension, including code promotion, non-cumulativity, universe polymorphism, and Tarski-style universes, along with modal and meta-programming constructs for tactics and introspection. Together, these results establish a solid, consistency-preserving foundation for proof assistants that can support type-safe meta-programming and tactic languages within a single, unified theory.

Abstract

We scale layered modal type theory to dependent types, introducing DeLaM, dependent layered modal type theory. This type theory is novel in that we have one uniform type theory in which we can not only compose and execute code, but also intensionally analyze the code of types and terms. The latter in particular allows us to write tactics as meta-programs and use regular libraries when writing tactics. DeLaM provides a sound foundation for proof assistants to support type-safe tactic mechanism.

DeLaM: A Dependent Layered Modal Type Theory for Meta-programming

TL;DR

DeLaM unifies dependent types with a -layered modal type theory to enable type-safe meta-programming and introspective analysis of code. It extends prior layered modal frameworks with context variables, provides a comprehensive syntactic and semantic apparatus (weakening, substitutions, reducibility, and validity judgments), and develops a complete convertibility framework with normalization. The work presents a full dependent extension, including code promotion, non-cumulativity, universe polymorphism, and Tarski-style universes, along with modal and meta-programming constructs for tactics and introspection. Together, these results establish a solid, consistency-preserving foundation for proof assistants that can support type-safe meta-programming and tactic languages within a single, unified theory.

Abstract

We scale layered modal type theory to dependent types, introducing DeLaM, dependent layered modal type theory. This type theory is novel in that we have one uniform type theory in which we can not only compose and execute code, but also intensionally analyze the code of types and terms. The latter in particular allows us to write tactics as meta-programs and use regular libraries when writing tactics. DeLaM provides a sound foundation for proof assistants to support type-safe tactic mechanism.
Paper Structure (41 sections, 170 theorems, 59 equations, 1 table)

This paper contains 41 sections, 170 theorems, 59 equations, 1 table.

Key Result

lemma 1

$$

Theorems & Definitions (171)

  • lemma 1: Presupposition
  • lemma 2: Lifting
  • lemma 3: Associativity
  • lemma 4: Algebra of global weakenings
  • lemma 5: Global weakenings
  • lemma 6
  • lemma 7
  • lemma 8: Algebra of global weakenings
  • lemma 9: Algebra of local weakenings
  • lemma 10: Algebra of Global Substitutions
  • ...and 161 more