modal type


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

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idemponent) 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



In modal logic a modality expresses a “way of being true” and a modal proposition (or stable proposition) is a proposition which is indeed true in the given way (for instance being necessarily true or possibly true, in S4 modal logic ).

As one passes from logic to (homotopy) type theory and hence from modal logic to modal type theory, then being true is just the lowest stage of a hierarchy of truncated types (“h-level”). Hence for a general type/homotopy type then a modality expresses just a “way of being”.

For instance if CC is a discrete finite type (h-set) thought of as a type of “colors” and one term g:Cg \colon C of it is thought of as the color “green”, then the CC-dependent types may be thought of as colored types; and so there is a modal operator whose modal types are those which are unicolored in green. Hence here the “way of being” expressed by the modality is “being green”.

More practical examples arise for instance in cohesive homotopy type theory, where for instance the flat modality expresses the “way of being geometrically discrete” and the sharp modality expresses the “way of being codiscrete”.

If one also regards non-idempotent (co-)monads as modal operators then the “way of being” expressed by them may involve structure and not just property. For instance the modal types of the maybe monad are the pointed objects and hence the maybe modality expresses the “way of being pointed”.


Given a modal type theory, hence type theory equipped with a closure operator modality \Diamond (idempotent monadic) or \Box (idempotent comonadic), the a type XX is modal with respect to \Diamond/\Box if

  • the unit η:XX\eta \colon X \to \Diamond X

  • or the counit ϵ:XX\epsilon \colon \Box X \to X

is an equivalence.

The collection of modal types forms the closure of the given closure operator.

Under propositions as types a proposition that is modal is also called a stable proposition.

By the discussion at idempotent monad – Properties – Eilenberg-Moore category of algebra the modal types over an idempotent (co-)modality are precisely the types which are (co-)algebras over the given (co-)monad. Hence more generally it makes sense to regard a not-necessarily idempotent (co-)monad as a modal operator and regard its algebras as the corresponding modal types.


Last revised on June 15, 2018 at 10:00:14. See the history of this page for a list of all contributions to it.