natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism = propositions as types +programs as proofs +relation type theory/category theory
Modal type theory is a flavor of type theory with type formation rules for modalities, as in modal logic. A survey of the field is in (de Paiva-Goré-Mendler).
When the underlying type theory is homotopy type theory these modalities are a “higher” generalization of traditional modalities, with “higher” in the sense of higher category theory: they have categorical semantics in (∞,1)-categories. See (Shulman) for remarks on such higher modalities.
At least in many cases, modalities in type theory are identified with monads or comonads on the underlying type universe, or on the subuniverse of propositions.
See for instance (Benton-Bierman-de Paiva, section 3.2), (Kobayashi), (Gabbay-Nanevski, section 8), (Gaubault-Larrecq, Goubault, section 5.1), (Park-Harper, section 2.6), (Shulman) as examples of the first, and (Moggi, def. 4.7), (Awodey-Birkedal, section 4.2) as examples of the second.
As a special case of the modalities-are-monads relation, a Grothendieck topology on the site underlying a presheaf topos is equivalently encoded in the sheafification monad induced by the sheaf topos geometric embedding. More generally, any geometric subtopos is equivalently represented by a left-exact idempotent monad.
When restricted to act on (-1)-truncated objects (i.e. subterminal objects or more generally monomorphisms), this becomes a universal closure operator. When internalized as an operation on the subobject classifier, this becomes the corresponding Lawvere-Tierney operator. This modal perspective on sheafification was maybe first made explicit by Bill Lawvere:
A Grothendieck ‘topology’ appears most naturally as a modal operator of the nature ‘it is locally the case that’ (Lawvere).
More discussion along these lines is in (Goldblatt), where this kind of modality is called a geometric modality.
For higher toposes, it is no longer true in general that a subtopos is determined by its behavior on the -truncated objects, but we can still regard the entire sheafification monad as a higher modality in the internal homotopy type theory.
The canonical monad on a local topos gives rise to a closure modality on propositions in its internal language, as described in (Awodey-Birkedal).
By adding to homotopy type theory three (higher) modalities that encode discrete types and codiscrete types and hence implicitly a non-(co)-discrete notion of cohesion one obtained cohesive homotopy type theory. Adding furthermore modalities for infinitesimal (co)discreteness yields differential homotopy type theory.
A survey of the field of modal type theory is in the collections
and
and
The historically first modal type theory, the interpretation of sheafification as a modality in the internal language of a Grothendieck topos goes back to the notion of Lawvere-Tierney operator
reviewed in
A general relation between modalities in type theory and monads (in computer science) was noted in
This was observed to systematically yield constructive modal logic in (independently)
and
and
The modal systems “CL” and “PLL” in (Benton-Bierman-Paiva) and (Fairlough-Mendler), respectively, turn out to be equivalent to the geometric modality of Goldblatt. The system CS4 in (Kobayashi) yields a constructive version of S4 modal logic.
Modal type theory with an eye towards homotopy type theory is discussed in
Monadic modal type theory with idempotent monads/monadic reflection is discussed in
Andrzej Filinski, Representing Layered Monads, POPL 1999. (pdf)
Andrzej Filinski, On the Relations between Monadic Semantics, TCS 375:1-3, 2007. (pdf)
Andrzej Filinski, Monads in Action, POPL 2010. (pdf)
Oleg Kiselyov and Chung-chieh Shan, Embedded Probabilistic Programming. Working conference on domain-specific languages, (2009) (pdf)
Mike Shulman, Higher modalities (pdf)
Formalization of modalities in homotopy type theory is discussed also around def. 1.11 of
See also
Frank Pfenning, Towards modal type theory (2000) (pdf)
Frank Pfenning, Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory, Pages 221–230 of: Symposium on Logic in Computer Science (2001) (web)
Aleksandar Nanevski, Frank Pfenning, Brigitte Pientka, Contextual Model Type Theory (2005) (web, slides)
Giuseppe Primiero, A multi-modal dependent type theory (pdf)
Murdoch Gabbay, Aleksandar Nanevski, Denotation of contextual modal type theory (CMTT): syntax and metaprogramming (pdf)
A modality in the internal language of a local topos is discussed in section 4.2 of
A list of related references is also kept at