Papers
Topics
Authors
Recent
Search
2000 character limit reached

Modal Dependent Type Theory Overview

Updated 2 April 2026
  • Modal dependent type theory is a framework that extends standard dependent type systems with modal operators to internalize properties like necessity, possibility, and graded modalities.
  • It employs categorical semantics such as adjoint functors and presheaf models to formalize complex constructs including guarded recursion and linear logic.
  • The approach supports practical applications in metaprogramming, resource analysis, and staged computation, underpinned by strong normalization, canonicity, and decidability results.

Modal dependent type theory is a class of dependently typed systems enriched with modal operators, most notably variants of necessity (\Box), possibility, graded/quantitative modalities, or relational (parametric) modalities, that internalize structural, quantitative, or relational properties directly into the type theory. Modalities are often formulated categorically as (families of) adjoint functors or as algebraic structures on types and contexts, enabling precise tracking of scope, resources, staged computation, intensionality, guarded recursion, and internalized parametricity within the syntax and semantics of dependent type theory.

1. Modalities in Dependent Type Theory: Definitions and Syntax

Modal dependent type theories extend the standard dependent type theory by introducing type-formers and term-formers parameterized by modal structure. The archetypal example is the modal necessity or "box" operator, giving rise to types like A\Box A with corresponding introduction and elimination rules. In the general setting, modal extensions allow binders, quantifiers, or variable declarations to be parameterized by a variance or mode (e.g., μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\} for identity, parametric, irrelevant) (Nuyts, 2018), or by a semiring-based grade in the graded case (Moon et al., 2020, Abel et al., 31 Mar 2026).

The general modal Π- and Σ-binders in the style of Nuyts et al. are as follows:

  • Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx} extends Γ\Gamma with a variable x:Ax: A at variance μ\mu.
  • ΓΠμ(x:A).Btype\Gamma \vdash \Pi^\mu(x:A). B\,\mathsf{type}, ΓΣμ(x:A).Btype\Gamma \vdash \Sigma^\mu(x:A).B\,\mathsf{type} with introduction, elimination, and substitution rules parameterized by μ\mu.
  • In the graded case, A\Box A0 or A\Box A1 annotate grades for resource or relevance usage (Moon et al., 2020, Abel et al., 31 Mar 2026).

Modalities may also appear as unary type formers (e.g., A\Box A2 or A\Box A3 for graded A\Box A4), with corresponding introduction (shut/box) and elimination (open/let/unbox) forms (Birkedal et al., 2018, Moon et al., 2020).

Fitch-Style Modal Calculi

A prominent syntactic approach employs Fitch-style discipline: contexts are extended by "lock" tokens representing modal scopes, and modal rules introduce or eliminate locks, as in:

Modalities are indexed by a mode theory or semiring, and both contexts and judgments are graded or annotated accordingly (Gratzer et al., 2020, Moon et al., 2020, Abel et al., 31 Mar 2026).

2. Categorical and Presheaf Models: Right Adjoints and Mode Categories

The semantics of modal dependent type theory centrally involve adjunctions in categories with families (CwFs), typically via dependent right adjoints (DRAs) (Birkedal et al., 2018, Mannaa et al., 2020, Gratzer et al., 2020):

  • A DRA is a structure on A\Box A7, where A\Box A8 is context extension and A\Box A9 is a right adjoint modal operation on types and families.
  • μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}0 is interpreted as a family over μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}1, and elements in μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}2 correspond to DRAs applied to μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}3.

Modalities arise as functors between presheaf categories (e.g., via reshuffles in cubical sets) that preserve or reflect type-theoretic structure, and often admit adjoint chains:

  • For each variance μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}4, a morphism μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}5 is induced, usually by precomposition (Nuyts, 2018).
  • These functors preserve Σ, Π, Id, and more exotic type formers (Glue, Weld).

Multimodal theories parametrize the type system by a mode theory μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}6, a strict 2-category of modes, modalities, and 2-cells (Gratzer et al., 2020, Gratzer, 2023). Each modality (1-cell) corresponds to a modal shift, and 2-cells to transformations between modalities, enabling simultaneous support for multiple interacting modalities.

3. Principal Families of Modal Dependent Type Theory

Several major instantiations and variants have emerged, driven by different modal objectives:

Relational and Parametric Modalities

Relational modalities ("parametric modalities") in Nuyts et al.'s framework introduce parametric quantifiers (e.g., μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}7) allowing internalized reasoning about relatedness and parametricity in the type theory. The presheaf model on cubical sets supports a hierarchy of relatedness modes, operationalized as reshuffles with left/right adjoints, enabling definitions of type-theoretic operations at degrees of relatedness (Nuyts, 2018).

Graded Modal Dependent Type Theory

Graded modal dependent type theory (GrTT) equips contexts and binders with semiring-based grades, subsuming affine, linear, and erasure modalities (Moon et al., 2020, Abel et al., 31 Mar 2026). Modalities parameterized by grades enable fine-grained tracking of resource usage, information flow, or relevance at the typing level. Special cases include the erasure modality (μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}8) for dead code elimination, linear grades for single-use variables, and parametric grades for polymorphism.

Multimodal and Mode-Theory-Parametrized Systems

Multimodal dependent type theory (MTT) is parameterized by an arbitrary mode theory—supporting arbitrary mode lattices, adjacent modalities, and transformations—enabling the uniform internalization of guarded recursion (μ{id,,}\mu \in \{\text{id},\,\sharp,\,\llcorner\}9), cohesive type theory (Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}0), internal parametricity, and others within a single modal framework (Gratzer et al., 2020, Gratzer, 2023). Every modal type former and substitution tracking is indexed by the mode signature and can be transformed according to the 2-category structure.

Linear Dependent Type Theory and Modalities

The diagram model for linear dependent type theory integrates linear and cartesian types with adjoint modalities Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}1, generalizing "of course" and "why not" to the dependent setting (Lundfall, 2018). Fiberwise adjunctions and linear quantifiers are internalized via Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}2/Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}3 (linear universal/existential quantification). The modal structure bridges linear and non-linear worlds with Beck–Chevalley and Frobenius reciprocity laws.

Guarded, Clocked, and Staged Computation

Modal dependent type theories for guarded recursion introduce clock-indexed "later" modalities Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}4 and universal clock quantification Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}5, supporting step-indexed or temporal reasoning, especially for coinductive types (Bizjak et al., 2016, Mannaa et al., 2020, Gratzer et al., 2020). Clocked type theory and its semantics rely on dependent right adjoints indexed over clocks, yielding modalities varying over presheaf slices (Mannaa et al., 2020).

4. Metatheoretic Results: Normalization, Decidability, and Canonicity

All major modal dependent type theories admit extensive metatheoretic development:

Parametricity theorems, function extensionality, and univalence (in some models) also lift from the underlying category-theoretic or presheaf semantics (Nuyts, 2018, Lundfall, 2018).

5. Applications and Instantiations

Table: Representative Modal Dependent Type Theories and Modalities

Theory/Framework Modal Constructs Categorical Model
Guarded DTT (Bizjak et al., 2016) Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}7, Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}8 Presheaves on Γμx ⁣: ⁣Actx\Gamma \vdash_\mu x\!:\!A\,\mathsf{ctx}9, DRAs
Graded DTT (Moon et al., 2020, Abel et al., 31 Mar 2026) Γ\Gamma0, grades Γ\Gamma1 Semiring-indexed, Kripke models
Multimodal DTT (Gratzer et al., 2020, Gratzer, 2023) multimodal Γ\Gamma2, 2-cells Γ\Gamma3 Mode-2-category-indexed presheaves
Parametric/Relational (Nuyts, 2018) Variance Γ\Gamma4 Presheaf models on cubical sets
Linear DTT (Lundfall, 2018) Γ\Gamma5, Γ\Gamma6 Split comprehension + monoidal fibration

Applications include:

  • Guarded recursion: Type-theoretic foundations for productivity, step-indexing, and coinductive types (Bizjak et al., 2016, Mannaa et al., 2020).
  • Parametricity: Internalizing relational reasoning, degrees of relatedness, and parametric quantification (Nuyts, 2018).
  • Quantitative/resource analysis: Variable usage tracking, erasure, and security/flow control (Moon et al., 2020, Abel et al., 31 Mar 2026).
  • Staged computation/metaprogramming: Layered modal type theory enables tactic programming and safe meta-level code analysis (Hu et al., 2024).
  • Linearity and resource-sensitive DTT: Modeling linear logic and mixed linear/nonlinear systems in a dependent setting (Lundfall, 2018).

6. Technical Innovations, Limitations, and Outlook

Modal dependent type theory advances several key technical directions:

  • Parametric mode theories: Mode-theoretic frameworks parameterize the syntax and semantics by arbitrary mode categories, yielding unification of disparate modal ideas (Gratzer et al., 2020, Gratzer, 2023).
  • Adjunction lifting: Systematic lifting of adjoint functors and Kan extensions to dependent settings provides a uniform categorical semantics (Birkedal et al., 2018, Nuyts, 2018).
  • Normalization by evaluation/gluing: Synthetic Tait computability and categorical gluing furnish normalization and decidability proofs generic in the modal situation (Gratzer, 2023).
  • Interoperability and reusability: By abstracting modality via mode theories or algebraic structures, one instantiation (e.g., for guarded recursion) can be transferred structurally to others (e.g., cohesion, parametricity) (Gratzer et al., 2020).

Limitations include the complexity of substitution mechanisms (especially in graded and multimodal systems), syntactic overhead for managing locks/modes, and the absence of cumulative universes in certain implementations for technical simplicity (Hu et al., 2024). Integration with higher-dimensional/homotopy type theory and full univalence remains a challenging area.


Modal dependent type theory thus provides a principled, modular framework for integrating modality—structural, resource-sensitive, temporal, or relational—into dependent type theory, validated both syntactically (via Fitch-style and graded calculi) and semantically (via adjoint functor and presheaf constructions), and supporting strong metatheoretic results across a wide spectrum of applications (Birkedal et al., 2018, Moon et al., 2020, Gratzer et al., 2020, Gratzer, 2023, Bizjak et al., 2016, Nuyts, 2018, Lundfall, 2018).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Modal Dependent Type Theory.