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
A modality in philosophy and formally in formal logic/type theory expresses a certain mode (or “moment” as in Hegel 12) of being.
According to (Kant 1900) (see WP) the four “categories” are
Quantity
Quality
Relation
Modality
and the modalities contain the three pairs of opposites
possibility - impossibility
necessity - Zufälligkeit
In formal logic and type theory modalities are formalized by modal operators or closure operators $\sharp$, that send propositions/types $X$ to new propositions/types $\sharp X$, satisfying some properties.
Adding such modalities to propositional logic or similar produces what is called modal logic. Here the most famous modal operators are those meant to formalize necessity (denoted $\Box$) and possibility (denoted $\lozenge$), which together form S4 modal logic. Similarly, adding modalities more generally to type theory and homotopy type theory yields modal type theory and modal homotopy type theory; See there for more details.
In general, the categorical semantics of these modalities is that $\sharp$ is interpreted as some kind of functor on the category of contexts or types. Often it is either a monad or comonad, and often this monad or comonad is idempotent, but not always. Similarly, in homotopy type theory, the categorical semantics of a higher modality or homotopy modality is an (infinity,1)-functor or monad, perhaps idempotent.
Since idempotent monadic modalities are very common and important in homotopy type theory, and other sorts are more difficult to formalize internally, sometimes those adjectives are dropped and we speak merely of “modalities” (e.g. Shulman 12, Rijke, Shulman, Spitters ). Here we describe the idempotent monadic case, although it should be noted that comonadic and non-idempotent modalities also arise and are important; they are generally formalized using some kind of modal type theory.
In fact, there are a number of different but equivalent ways to define an (idempotent, monadic) modality in homotopy type theory (see at modal homotopy type theory). From Rijke, Shulman, Spitters 17:
an induction principle of type
for any type $A$ and type $B$ depending on $LA$
a computation rule
a witness that for any $x, y : LA$, the modal unit $(-)^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
is an equivalence for all types $A$ and types $B$ depending on $LA$.
$\Sigma$-closed reflective subuniverse (aka localization): A reflective subuniverse (a.k.a. localization) consists of a proposition $isLocal : {Type} \to {Prop}$ together with an operator $L : {Type} \to {Type}$ and a unit $(-)^L : X \to LX$ such that $LX$ is local for any type $X$ and for any local type $Z$, then function
is an equivalence. A localization is $\Sigma$-closed if whenever $A$ is local and for all $a : A$, $B(a)$ is local, then the dependent sum $\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 : X \to LX$ are $L$-connected.
We say that a type $X$ is $L$-modal if the unit $(-)^L : X \to LX$ is an equivalence. We say a type $X$ $L$-connected if $LX$ is contractible.
In terms of the other structure, the stable factorization system associated to a modality $L$ has
left class the $L$-connected maps, whose fibers are $L$-connected.
right class the $L$-modal maps, whose fibers are $L$-modal.
Conversely, given a stable factorization system, the modal operator and unit are given by factorizing the terminal map.
Typical notation (e.g. SEP, Reyes 91, but not Hermida 10) is as follows:
a co-modality represented by a comonad (perhaps idempotent) is typically denoted by $\Box$, following the traditional example of necessity in modal logic;
a modality represented by a monad (perhaps idempotent) is typically denoted by $\lozenge$ or (less often) by $\bigcirc$, following the traditional example of possibility in modal logic.
When adjunctions between modalities matter (adjoint modalities), then some authors (Reyes 91, p. 367 RRZ 04, p. 116, Hermida 10, p.11) use $\lozenge$ for a left adjoint of a $\Box$. That leaves $\bigcirc$ as the natural choice of notation for a right adjoint (if any) of a $\Box$-modality.
This way for instance for cohesion with shape modality $\dashv$ flat comodality $\dashv$ sharp modality the generic notation would be:
possibility$\dashv$ necessity
unit type modality, empty type co-modality (nothing $\dashv$ being)
shape modality$\dashv$ flat modality $\dashv$ sharp modality
reduction modality$\dashv$ infinitesimal shape modality $\dashv$ infinitesimal flat modality
fermionic modality$\dashv$ bosonic modality $\dashv$ rheonomy modality
Origin in philosophy:
Georg Hegel, Science of Logic, 1812
Kant, AA III, 93– KrV B 106
German Wikipedia, Modalität (Philosophie)
Stanford Encyclopedia of Philosophy, Modal Logic
Discussion in formal logic, type theory and homotopy type theory (for more see at modal logic, modal type theory and modal homotopy type theory):
Mike Shulman, Higher modalities, talk at UF-IAS-2012, October 2012 (pdf)
Egbert Rijke, Mike Shulman, Bas Spitters, Modalities in homotopy type theory, Logical Methods in Computer Science, January 8, 2020, Volume 16, Issue 1 (arXiv:1706.07526, episciences:6015)
Discussion in category theory (fot more see at modal operator):
Gonzalo Reyes, A topos-theoretic approach to reference and modality, Notre Dame J. Formal Logic Volume 32, Number 3 (1991), 359-391 (Euclid)
Reyes/Reyes/Zolfaghari, Generic Figures and Their Glueings 2004, Polimetrica
Claudio Hermida, section 3.3. of A categorical outlook on relational modalities and simulations, 2010 (pdf)
Last revised on April 21, 2023 at 05:29:34. See the history of this page for a list of all contributions to it.