nLab modal homotopy type theory



Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels


Modalities, Closure and Reflection

Homotopy theory

homotopy theory, (∞,1)-category theory, homotopy type theory

flavors: stable, equivariant, rational, p-adic, proper, geometric, cohesive, directed

models: topological, simplicial, localic, …

see also algebraic topology



Paths and cylinders

Homotopy groups

Basic facts




The refinement of modal type theory to homotopy type theory: hence homotopy type theory equipped with modalities as in modal logic (and in modal type theory).


There are a number of different but equivalent ways to define a modality in homotopy type theory. From Rijke, Shulman, Spitters 17:

  • Higher modality: A modality consists of a modal operator L:TypeTypeL : {Type} \to {Type} and for every type XX a modal unit () L:XLX(-)^L : X \to LX together with
  1. an induction principle of type

    ind:((a:A)LB(a L))((u:LA)LB(u))\text{ind} : ((a : A) \to LB(a^L)) \to ((u : LA) \to LB(u))

    for any type AA and type BB depending on LALA

  2. a computation rule

    com:ind(f)(a L)=f(a).\text{com} : \text{ind}(f)(a^L) = f(a).
  3. a witness that for any x,y:LAx, y : LA, the modal unit () L:(x=y)L(x=y)(-)^L : (x = y) \to L(x = y) is an equivalence.

  • Uniquely eliminating modality: A modality consists of a modal operator and modal unit such that operation

    ff() L:((u:LA)LB(u))((a:A)LB(a L))f \mapsto f \circ (-)^L : ((u : LA) \to LB(u)) \to ((a : A) \to LB(a^L))

    is an equivalence for all types AA and types BB depending on LALA.

  • Σ\Sigma-closed reflective subuniverse (aka localization): A reflective subuniverse (a.k.a. localization) consists of a proposition isLocal:TypePropisLocal : {Type} \to {Prop} together with an operator L:TypeTypeL : {Type} \to {Type} and a unit () L:XLX(-)^L : X \to LX such that LXLX is local for any type XX and for any local type ZZ, then function

    ff() L:(LAZ)(AZ)f \mapsto f \circ (-)^L : (LA \to Z) \to (A \to Z)

    is an equivalence. A localization is Σ\Sigma-closed if whenever AA is local and for all a:Aa : A, B(a)B(a) is local, then the dependent sum Σ a:AB(a)\Sigma_{a : A} B(a) is local.

  • Stable factorization systems: A modality consists of an orthogonal factorization system (,)(\mathcal{L}, \mathcal{R}) in which the left class is stable under pullback.

  • A localization (reflective subuniverse) whose units () L:XLX(-)^L : X \to LX are LL-connected.

We say that a type XX is LL-modal if the unit () L:XLX(-)^L : X \to LX is an equivalence. We say a type XX LL-connected if LXLX is contractible.

In terms of the other structure, the stable factorization system associated to a modality LL has

  • left class the LL-connected maps, whose fibers are LL-connected.

  • right class the LL-modal maps, whose fibers are LL-modal.

Conversely, given a stable factorization system, the modal operator and unit are given by factorizing the terminal map.


See also the references at modal type theory.



For a discussion of the reflective factorization system generated by a modality, see

See also

Outlook in view of cohesive homotopy type theory:

Introduction from the perspective of philosophy:

Specifically for localization in the classical sense of algebraic topology:

Specifically for cohesive homotopy type theory see:

Formalization of the shape/flat-fracture square (differential cohomology hexagon) in cohesive homotopy type theory:

See also the proof of the Blakers-Massey theorem for modalities in this generality:

Last revised on July 29, 2023 at 16:03:16. See the history of this page for a list of all contributions to it.