modal logic

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### $(0,1)$-Category theory
+--{: .hide}
[[!include (0,1)-category theory - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Modality
+-- {: .hide}
[[!include modalities - contents]]
=--
=--
=--

# Modal Logics
* table of contents
{:toc}

## Idea
 {#Idea}

The term _modal logic_ refers to an enrichment of standard [[formal logic]], where the standard [[logical conjunctions]] (*[[and]]*, *[[or]]*, *[[not]]*, *[[implication]]* and, [[first-order logic|perhaps]], *[[universal quantifier|for all]]*, *[[existential quantifier|exists]]* etc.) are accompanied by certain extra operations -- called _[[modal operators]]_ and traditionally denoted by symbols like "$\Box$", "$\lozenge$", , "$\bigcirc$" -- such that for $p$ any [[proposition]] an expression like $\Box p$ is a(nother) proposition whose interpretation is intended to be:

* "$p$ holds (only) _in a certain way_",

where the "certain way" is (implicitly) specified by whatever [[axioms]] are satisfied by the given [[modal operator]].

{#ModesOfBeing} In other words, [[modal operators]] in modal logic are meant to express a certain **mode of being true** --- and in generalization to [[modal type theory]] they express more generally a **mode of being**, whence the reference to  [[modalities]] as in [[Kant]]'s writings.

\begin{imagefromfile}
    "file_name": "LemmonScott-page1.jpg",
    "float": "right",
    "width": 370,
    "unit": "px",
    "margin": {
        "top": -50,
        "bottom": 20,
        "right": 0,
        "left": 20
    },
    "caption": "p. 1 from [Lemmon and Scott 1977](#LemmonScott77)"
\end{imagefromfile}

For example (see also pointers [below](#Examples)):

* in *[[alethic modal logic]]* ([Wright 1951, Sec. III](#Wright51)) one considers modal operators meant to express that

  "$p$ is _[[necessity|necessarily]]_ true", or that "$p$ is _[[possibility|possibly]]_ true"

  This is the original sense of modal logic, going all the way back to [[Aristotle]] (whose account on the matter is reviewed in much detail by [Lemmon & Scott (1977) pp 1-12](#LemmonScott77)).

* in *[[epistemic modal logic]]* ([Wright 1951, Sec. IV](#Wright51)) one consider modal operators meant to express that something is "known to be true" etc. (whence the  reference to [[epistemology]]).

* in *[[temporal logic]]* one considers modal operators meant to express that

  "$p$ will _eventually become_ true", etc.;

* in *[[doxastic logic]]* one is concerned with statements such as:

  "$p$ is _believed_ to be true", etc.

Beware however that there is no broad agreement on which further [[axioms]] exactly make a general [[modal operator]] --- which in itself is any ([[comonad|co]]-)[[monad]] on the underlying [[universe of propositions]] ([[universe of types|of types]]), see [below](modal%20type%20theory#RelationToMonads) --- encode/reflect any such intended "mode of being (true)". As a result:

>_'Ask three modal logicians what modal logic is, and you are likely to get at least three different answers'_. [[Blackburn, deRijke & Venema (2001), Introduction](#BlackburnDeRijkeVenema01)]

Historically, the default example of a modal logic is known as *[[S4 modal logic]]*, originally motivated as a model for [[epistemic logic]] (with a modality for being "[[necessity|necessarily true]]"), but really just axiomatizing ([[propositional logic]] equipped with) any [[monad (in computer science)|co-monad]] $\Box$ on the [[type of propositions|universe of propositions]], without further specification. There are variants known as *[[T modal logic]]* and *[[K modal logic]]* which drop some of the [[axioms]] even on this [[comonad|co]][[monad]], but it seems good practice to agree that a [[modal operator]] is *at least* a ([[comonad|co]]-)[[monad]] on the [[universe of propositions]] ([[universe of types|of types]]).

In this sense, modal logic is the counterpart in the *[[computational trilogy]]* to:

* [[category theory]] with ([[comonads|co]]-)[[monads]] ([[categorical algebra]]),

* [[computer science]] with (co-)[[monads in computer science]] ([[computational effects]]).

{#ModelsInIntroduction} Among [[semantics]]/[[models]] of modal logics are the [[geometric model for modal logics|geometric models]] based on *[[Kripke frames]]* which are [[sets]] (of *[[possible worlds]]*) on which the [[propositions]] in the logic may [[dependent type|dependend]] and equipped with [[relations]] which prescribe over which such worlds to [[quantifier|quantify]] in interpreting the [[modal operators]] (eg. which worlds to inspect to conclude that a proposition holds *possibly*).

Specifically for [[epistemic logic]] this *[[Kripke semantics]]* is hence also known as *[[possible worlds semantics]]*. (As least for [[S5 modal logic]] this is closely related to [[categorical models of dependent types]], as explained at *[[necessity and possibility]] -- [possible worlds via dependent types](necessity+and+possibility#InFirstOrderLogicAndTypeTheory)*.)

Some accounts of modal logic essentially regard the theory as being the logical study of such [[Kripke frames]] -- in the sense of sets equipped with [[relations]], hence "relational structures" (for instance [Blackburn, De Rijke & Venema (2001) p xi](#BlackburnDeRijkeVenema01) who start out saying that they do not know what modal logic is if not the study of relational structures).

There are also [[algebraic model for modal logics|algebraic models for modal logic]] in terms of algebras with (co)-[[closure operators]]. For instance, [[temporal logic|temporal logics]] can have [[posets]] as [[models]].

## Definition
 {#Definition}

### Modal Languages
{#modal+language}

Modal logics are built on **modal languages**, that is the usual propositional language plus those extra modalities. (Note that modalities may also be added to predicate logic, see [[first-order modal logic]].) The way the modalities work has to be laid down in an axiom system for the logic in question, for instance, for the temporal logic we might require an axiom saying
'If $F F\phi$ is true, then $F\phi$ is true', which will read a 'if it is going be true in the future that $\phi$ is going to be true in the future, then ...', see [[temporal logic]].  (Is this going to be something what we might want in '[[provability logic]]'; is it the case that we should expect that if it is provable that something is provable then that something must be itself provable. This concentrates the modelling process on exactly how we wish to have our 'context' to behave.) In this way the relational nature of a context that we are looking at can get encoded into the logic.

Modal languages add one or more modal operator, often denoted $\square$ or $\lozenge$ into the usual [[propositional logics]]. (For the moment, we will keep things fairly simple so assume these to  be unary operators and we will not be considering operators that have more than one input, for the moment at least. The general case will be considered later on, but in any case is discussed in detail in some of the books on modal logic listed below.)

We will give a modal language with $n$ modal operators, $\lozenge_i$, $i = 1,\ldots, n$, which can  be applied to propositions of the language to form new propositions.  If $n=1$, we will refer to the language, defined below,  as the _basic modal language_.

+-- {: .num_defn}
###### Definition

We suppose given a set of variables, the _$n$-operator basic modal language_, $\mathcal{L}_\omega(n)$, given by

$$\phi ::= p_\lambda \mid \bot \mid \neg \phi \mid \phi_1 \vee \phi_2 \mid \lozenge_i\phi,$$

where the $p_\lambda$ are the propositional variables ordered by finite ordinals, $\lambda$, and, as usual, $\lozenge_i$ is a modality for each  $i=1, \ldots , n$.

=--

+-- {: .num_remark}
###### Remark

This form of definition needs a bit of interpreting if you have not met it before.  It gives a way of deciding if a formula is 'well-formed'.  The well formed formulae of  $\mathcal{L}_\omega(n)$ are defined as follows: A formula is either

   * a proposition variable,

   * the propositional constant $\bot$, that is _falsum_,

   * a negated formula,

   * a disjunction of two formulae, or

   * a formula prefixed by one of the diamonds / modal operators.

=--

+-- {: .num_remark}
###### Remark

The basic modal language will be $\mathcal{L}_\omega(1)$.  We will sometimes write $Prop$ for the set of propositional variables / atomic formulae or whatever other reasonable term is used in a context.

=--

+-- {: .num_remark}
###### Remark

The interpretation of $\lozenge \phi$ depends on the context (to some extent), but in the initial form here it is usually said to mean 'possibly $\phi$'.

=--

+-- {: .num_remark}
###### Remark

Some authors use an equivalent generation rule using $\square \phi$, which is $\neg \lozenge \neg \phi$. Of course, this interprets as 'necessarily $\phi$' in this initial form.  In [[epistemic logic]] the basic modal language interprets $\square \phi$ as saying 'the agent knows that $\phi$'.

=--

+-- {: .num_remark}
###### Remark

Other formulations replace $\vee$ and $\neg$ by implication $\phi_1\to \phi_2$, or by $\wedge$ and $\neg$.

=--

### Modal logics

+-- {: .num_defn}
###### Definition

A **modal logic** in $\mathcal{L}_\omega(n)$ is any set $\Lambda$ of $\mathcal{L}_\omega(n)$-formulae such that

* $\Lambda$ includes all $\mathcal{L}_\omega(n)$-formulae that are instances of tautologies,

and

* $\Lambda$ is closed under the inference rule
_if $\phi$, $\phi\to \psi \in \Lambda$ then $\psi \in \Lambda$_ , i.e. detachment or __modus ponens__.

=--

One of the basic axiom systems leads to _[[normal modal logics]]_.

+-- {: .num_defn}
###### Definition
**(deducibility)**

Suppose given a [[normal modal logic]], $\Lambda$ in $\mathcal{L}_\omega(n)$.  A formula $\phi$ is **$\Lambda$-deducible** from a set, $\Gamma$ of formulae, if there are finitely many formulae $\psi_0,\ldots,\psi_m\in \Gamma$ such that

$$\vdash_\Lambda (\psi_0\to (\psi_1\to (\ldots \to (\psi_m\to \phi)\ldots)$$

that is the formula $(\psi_0\to (\psi_1\to (\ldots \to (\psi_m\to \phi)\ldots)$ is in $\Lambda$.

=--

+-- {: .num_remark}
###### Remark

As the set of all formulae in $\mathcal{L}_\omega(n)$ satisfies the conditions for a logic and any intersection of logics is itself also a logic, we have that given a set of formulae decreed to be 'axioms' for a logic, there is a smallest modal logic containing them.

=--

### Common modal axioms

* ([[axiom K (modal logic)|K]]) $\Box(A \to B) \to \Box A \to \Box B$
* (M) $\Box A \to A$
* (4) $\Box A \to \Box \Box A$
* (5) $\lozenge A \to \Box \lozenge A$
* (B) $A \to \Box \lozenge A$

## Examples
 {#Examples}

Here is a brief list of flavors of modal logic. More details are discussed below.

*  [[epistemic logics]]: it is known to $X$ that, it is common knowledge that;

* [[temporal logic]]: henceforth, eventually, hitherto, previously, now, tomorrow, yesterday, since, until, inevitably, finally, ultimately, endlessly, it will have been, it is being ...

*  [[dynamic logic]]: after the program/computation/action finishes, the program enables, throughout the computation;

* [[doxastic logic]]: it is believed that

* deontic logic: it is obligatory/forbidden/permitted/unlawful that

* [[Lawvere-Tierney topology|geometric logic]]: it is locally the case that

* metalogic: it is valid/satisfiable/provable/consistent that ([Goldblatt](#Goldblatt)).

  The metalogical version was important in the [history of modern modal logic](http://plato.stanford.edu/entries/logic-modal-origins/). Gödel played an important role there.

*  [[temporal logic|temporal logics]];

*  [[arrow structures|arrow logics]];

*  [[provability logics]]

   * [[Löb's axiom]] ([[incompleteness theorem]])

## Semantics

We discuss the [[semantics]] of modal logics, its [[models]].

### In Kripke frames / relational structures

The usual [[semantics]] of modal languages is in terms of [[frame (modal logic)|frames]], and this is where the link with relational structures comes in. (These are quite often called 'Kripke frames' as Kripke was one of the first to use relational semantics in this context.

A discussion of the history can be found in  ([BlackburnDeRijkeVenema, page 42](#BlackburnDeRijkeVenema)).

(As there is another sense to [[frame]] as the dual of a [[locale]], we need to consider the terminology here and where necessary will use [[frame (modal logic)]] as the entry name.) A more detailed discussion of [[frame (modal logic)|frames]], models and the whole question of the semantics of modal logics is to be found at that entry.

Modal logics are thus also the logics of [[relational structures]], in fact,   Blackburn et al (see references) have as their first slogan: **Modal languages are simple but expressive languages for talking about relational structures.**
The temporal logic that satisfies the axiom $(4)$ has models that are [[posets]], for instance, whilst many of the [[epistemic logics]] have models which are sets with equivalence relations on them. In each case, the idea is that the relational structure gives all the possible states of some system and the modal logic describes that system. This explains the great interest in computer science and artificial intelligence of applications of modal logics.

###Algebraic semantics
{#AlgebraicSemantics}

The usual algebraic semantics of modal logic is in terms of Boolean algebras with operators and is described in the entry [[algebraic models for modal logic]].

###Coalgebraic semantics

The geometric / relational /Kripke semantics of modal logics are instances of [[coalgebraic model for modal logic|coalgebraic semantics]].  This type of semantics also provides an excellent motivation and intuition for various types of modal logic that arise naturally in computer science.

### Categorical semantics
 {#CategoricalSemantics}

Every [[category]] comes with its [[internal logic]]. Modal operators in this internal logic can at least sometimes be identified with (co)reflectors into specified [[reflective subcategory|(co)reflective subcategories]]. See at _[[modal type theory]]_ for more on this.

Examples for this are [[local toposes]] and [[cohesive toposes]]. See there for more details.

## Theorems

* [[Goldblatt-Thomason theorem]]

## Related concepts

* [[modal hyperdoctrine]]

* [[modal operator]]

* [[adjoint modality]]

* [[adjoint logic]]

* [[modal type theory]]

* [[algebraic model for modal logic]]

* [[geometric model for modal logic]]

* [[coalgebraic model for modal logic]]

* [[coalgebra for an endofunctor]]

* The discussion of "[[possible worlds semantics]]" in modal logic is reminiscent of some discussion in the context of the "[[multiverse]]".

## References
 {#References}

One of the earliest texts that exhibits the [[intuitionism|intuitionist]] context is

* [[Oskar Becker]], *Zur Logik der Modalitäten*, Jahrbuch für Philosophie und phänomenologische Forschung **11** (1930)  497-548 [[digizeit](http://www.digizeitschriften.de/dms/img/?PID=PPN827944462_0011%7CLOG_0010), [ophen:101138](https://ophen.org/pub-101138), [[Becker-LogikModalitaeten.pdf:file]]]

translated in:

*  Stefania Centrone, Pierluigi Minari, *Oskar Becker, On the Logic of Modalities (1930): Translation, Commentary and Analysis*,  Synthese Library **444**, Springer (2022) [[doi:10.1007/978-3-030-87548-0](https://doi.org/10.1007/978-3-030-87548-0)]

The modern formalization of modal logic (and their enumeration by S1, ..., [[S4]], [[S5]]) originates with

* [[Clarence I. Lewis]], [[Cooper H. Langford]], pp 153 & App II of: *Symbolic Logic* (1932), Dover (2000) [App. II [pdf](https://www.hist-analytic.com/Lewisstrict.pdf)]

(who say "modal functions" for [[modal operators]]).

Early discussion making explicit [[epistemic modal logic]] and variants:

* {#Wright51} [[Georg H. von Wright]], *An Essay in Modal Logic*, North-Holland Publishing (1951)

* [[K. Jaakko J. Hintikka]], *Knowledge and belief: An introduction to the logic of the two notions*, Cornell University Press (1962) [[ark:/13960/t9k437s65](https://archive.org/details/knowledgebeliefi00hint_0)]

  > (introducing the formalism of [[K modal logic]])

Historical overview and introduction:

* {#Goldblatt03} [[Robert Goldblatt]], *Mathematical modal logic: A view of its evolution*, Journal of Applied Logic **1** 5–6 (2003) 309-392 [doi:10.1016/S1570-8683(03)00008-9]

* {#Goldblatt05} [[Robert Goldblatt]], *Mathematical Modal Logic: a View of its Evolution*, in *Handbook of the History of Logic vol. 7*, Elsevier (2005) [doi:10.1016/S1874-5857(06)80027-0,[draft](http://homepages.mcs.vuw.ac.nz/~rob/papers/modalhist.pdf)]

* {#SEPModernOrigins} Stanford Encyclopedia of Philosophy: _[Modern Origins of Modal Logic](http://plato.stanford.edu/entries/logic-modal-origins/)_.

* {#SEPModalLogic} Stanford Encyclopedia of Philosophy: _[Modal Logic](http://plato.stanford.edu/entries/logic-modal/)_.

Textbook accounts:
 {#TextbookAccounts}

* {#LemmonScott77} [[E. John Lemmon]] with [[Dana Scott]], *An Introduction to Modal Logic -- The "Lemmon Notes"*, B. Blackwell (1977) [[ark:/13960/t3gz25k3h](https://archive.org/details/introductiontomo0000lemm/)]

* {#BradleySwartz79} [[Raymond D. Bradley]], [[Norman Swartz]], *Possible Worlds -- An Introduction to Logic and its Philosophy*, Hackett Publishing (1979) [[webpage](http://www.sfu.ca/~swartz/pw/), [pdf](https://www.sfu.ca/~swartz/pw/text/pw_all.pdf)]

* {#BlackburnDeRijkeVenema01} [[Patrick Blackburn]], [[Maarten de Rijke]], [[Yde Venema]], *Modal Logic*, Cambridge Tracts in Theoretical Computer Science **53**, Cambridge University Press  (2001) [[doi:10.1017/CBO9781107050884](https://doi.org/10.1017/CBO9781107050884)]

* {#BlackburnvanBenthemWolter07} [[Patrick Blackburn]], [[Johan van Benthem]], [[Frank Wolter]] (eds.), *The Handbook of Modal Logic*, Studies in Logic and Practical Reasoning **3** (2007) [[book webpage](https://cgi.csc.liv.ac.uk/~frank/MLHandbook/), [publisher page](https://www.sciencedirect.com/bookseries/studies-in-logic-and-practical-reasoning/vol/3/suppl/C)]

* {#Benthem10} [[Johan van Benthem]], *Modal Logic for Open Minds* (2010) [[ISBN:9781575865980](http://web.stanford.edu/group/cslipublications/cslipublications/site/9781575865980.shtml), [pdf](http://fenrong.net/teaching/mljvb.pdf), [webpage](https://archive.illc.uva.nl/lgc/MLoM/)]

Other texts:

* {#Scott70} [[Dana Scott]], _Advice on Modal Logic_, in [[Karel Lambert]] (ed.) _Philosophical problems in Logic -- Some recent developments_, Reidel 1970

  > Here is what I consider one of the biggest mistakes in all of modal logic: concentration on a system with just _one_ modal operator. (p. 161)

* {#MakkaiReyes95} [[Michael Makkai]], [[Gonzalo Reyes]], _Completeness results for intuitionistic and modal logic in a categorical setting_, Annals of Pure and Applied Logic 72 (1995) 25-101

  > (on [[de dicto and de re]] phenomena in [[hyperdoctrine|hyperdoctrinal]] modal logic)

A formulation of modal logic in terms of [[type|typing]] [[judgements]] and  [[type formation rules]] is in

* {#Pfenning-Davies} [[Frank Pfenning]], Rowan Davies, *A judgemental reconstruction of modal logic*, Mathematical Structures in Comp. Sci. **11** 4 (2001) 511-540 [[pdf](http://www.cs.cmu.edu/~fp/papers/mscs00.pdf)]

See also:

* [[Marcus Kracht]], _Tools and Techniques in Modal Logic_ , Studies in Logic and the Foundation of Mathematics **142** Elsevier Amsterdam (1999) [[pdf](http://wwwhomes.uni-bielefeld.de/mkracht/html/tools/book.pdf), [doi:10.2307/2687780](https://doi.org/10.2307/2687780)]

A discussion of  coalgebraic modal logic and of general modal logic in terms of [[coalgebra]] and the [[terminal coalgebra of an endofunctor]] is in

* [[Corina Cirstea]], [[Alexander Kurz]], Dirk Pattinson, Lutz Schröder and [[Yde Venema]], _Modal logics are coalgebraic_ ([pdf](http://eprints.soton.ac.uk/267144/1/ModalCoalgRev.pdf))

Formalization of modalities ([[higher modalities]]) in [[homotopy type theory]] appears around definition 1.11 of

* [[Egbert Rijke]], [[Bas Spitters]], _Sets in homotopy type theory_ ([arXiv:1305.3835](http://arxiv.org/abs/1305.3835))

An overview of applications of modal logic in [[linguistics]] can be found in

* Lawrence S. Moss, Hans-Jörg Tiede, _Applications of Modal Logic in Linguistics_ , pp.299-341 in Blackburn, van Benthem, Wolter (eds.), _The Handbook of Modal Logic_ , Elsevier Amsterdam 2007. ([draft](http://www.indiana.edu/~iulg/moss/linguistics.pdf))

[[!redirects modal logic]]
[[!redirects modal logics]]


modal similarity type

##Idea##

In modal logic, the relational signature of the [[relational structures]] being described by a given logic are sometimes called a  **modal similarity type**.

+--
{: .un_def}
######Definition######
A modal similarity type is given by a pair $\tau = (O,\rho)$ where $O$ is a (usually non-empty) set and $\rho : O \to \mathbb{N}$ is a function.  The elements of $O$ are called the (labels for) **modal operators** and, if $\Delta \in O$, then $\rho(\Delta)$ indicates the **arity** of the modal operator $\Delta$, i.e. the number of arguments to which $\Delta$ is applied, so that, if $\rho(\Delta)= n$, the label $\Delta$ stands will stand for an $n$-ary relation on a given set.
=--

A _modal similarity type_ thus determines a **single sorted** relational [[signature (in logic)|signature]], $\Sigma$ where, in the notation used in the page on [[signatures in logic]], $Rel(\Sigma) = O$ and $ar: Rel(\Sigma) \to S^*$ is just  $\rho$.

##References##

General books on modal logics include

* P. [[Blackburn]], M. de Rijke and Y. [[Venema]], _Modal Logic_, Cambridge Tracts in Theoretical Computer Science, vol. 53, 2001.


modal type

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Modalities, Closure and Reflection
+-- {: .hide}
[[!include modalities - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

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 [[necessity|necessarily]] true or [[possibility|possibly]] true, in [[S4 modal logic]] ).

As one passes from [[logic]] to ([[homotopy type theory|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 object of an (infinity,1)-category|truncated]] types ("[[h-level]]"). Hence for a general [[type]]/[[homotopy type]] then a [[modality]] expresses just a "way of being".

For instance if $C$ is a discrete finite [[type]] ([[h-set]]) thought of as a type of "colors" and one [[term]] $g \colon C$ of it is thought of as the color "green", then the $C$-[[dependent type|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". (Formally, $g: 1 \to C$ induces $g^{\ast}: \mathbf{H}/C \to \mathbf{H}$ selecting the $g$-fiber of a $C$-colored type. Then composition with its left adjoint, [[dependent sum]], $\sum_g: \mathbf{H} \to \mathbf{H}/C$, yields the comonadic modal operator, $\sum_g \cdot g^{\ast}$, on $\mathbf{H}/C$, which acts on a colored type to filter out non-green entities.)

More practical examples arise for instance in [[cohesive homotopy type theory]], where for instance the [[flat modality]] expresses the "way of being [[discrete object|geometrically discrete]]" and the [[sharp modality]] expresses the "way of being [[codiscrete object|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".

## Definition

Given a [[modal type theory]], hence [[type theory]] equipped with a [[closure operator]] [[modality]] $\Diamond$ ([[idempotent monad|idempotent]] [[monad|monadic]]) or $\Box$ ([[idempotent comonad|idempotent]] [[comonad|comonadic]]), a [[type]] $X$ is _modal_ with respect to $\Diamond$/$\Box$ if

* the [[unit of an adjunction|unit]] $\eta \colon X \to \Diamond X$

* or the counit $\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](idempotent+monad#AlgebrasForAnIdempotentMonad)_ the modal types over an idempotent (co-)modality are precisely the types which are (co-)[[algebras over a monad|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 [[algebra over a monad|algebras]] as the corresponding modal types.

## Examples

## Related concepts

* [[modality]]

* [[reflective subcategory]]

* [[reflective sub-(∞,1)-category]]

* [[modal type theory]]

* [[reflective subuniverse]]

[[!redirects modal types]]

[[!redirects modal object]]
[[!redirects modal objects]]

[[!redirects modale]]
[[!redirects modales]]


modal type theory

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Modalities, Closure and Reflection
+-- {: .hide}
[[!include modalities - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

_Modal type theory_ is a flavor of [[type theory]] with [[type formation rules]] for [[modalities]], hence [[type theory]] which on [[propositions]] reduces to [[modal logic]].

Following ([Moggi91](#Moggi91), [Benton, Bierman & de Paiva 19198](#BentonBiermanPaiva98); [Bierman & de Paiva 1996](#BiermanDePaiva96), [2000](#BiermanDePaiva96); [Kobayashi 1997](#Kobayashi97)) modal type theory  is specifically understood as being a type theory equipped with  ([[comonad|co-]])[[monads]] on its type system, representing the intended [[modal operators]]. Since [[monad (in computer science)|monads in computer science]] embody a notion of [[computation]], some authors also speak of _[[computational type theory]]_ here ([Benton, Bierman & de Paiva 1998](#BentonBiermanPaiva98), [Fairtlough-Mendler 02](#FairtloughMendler02)).

According to ([Benton, Bierman & de Paiva 1998, p. 1-2](#BentonBiermanPaiva98)) this matches well with the default interpretation of ([[S4]]) [[modal logic]] as being about the [[modality]] $T$ of "[[possibility]]":

> The starting point for Moggi's work is an explicit semantic distinction between _computations_ and _values_. If $A$ is an object which interprets the values of a particular type, then $T(A)$ is the object which models computation of that type $A$. $[...]$ For a wide variety of notions of computation, the unary operator $T(-)$ turns out to have the categorical structure of a _strong monad_ on an underlying cartesian closed category of values. $[...]$ On a purely intuitive level and particularly if one thinks about non-termination, there is certainly something appealing about the idea that a computation of type $A$ represents the possibility of a value of type $A$.

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]] given by [[(∞,1)-monads]]. See ([Shulman 12](#Shulman),  [Rijke, Shulman, Spitters](#RSS) ) for definition of such _higher modalities_, and see at _[[reflective subuniverse]]_.

## Properties

### Relation to monads
 {#RelationToMonads}

At least in many cases, modalities in type theory are identified with [[monads (in computer science)|monads]] or comonads on the underlying [[type]] [[universe]], or on the subuniverse of [[propositions]].

See for instance ([Benton, Bierman & de Paiva 1998, section 3.2](#BentonBiermanPaiva98)), ([Kobayashi](#Kobayashi)), ([Gabbay-Nanevski, section 8](#GabbayNanevski)), ([Gaubault-Larrecq, Goubault, section 5.1](#Gaubault-LarrecqGoubault)), ([Park-Harper, section 2.6](#ParkHarper)), ([Shulman](#Shulman)) as examples of the first, and ([Moggi, def. 4.7](#Moggi)), ([Awodey-Birkedal, section 4.2](#AwodeyBirkedal)) as examples of the second.

### Relation to endo-adjunctions
An endo-adjunction on a [[lex category]] gives rise to a modal type theory satisfying the modal axiom K; see [dependent right adjoint](#dradjoint). This also gives rise to a sound sound and complete interpretation of Fitch-style modal $\lambda$-calculus.

## Examples

### Geometric modality -- Grothendieck topology
 {#GeometricModality}

As a special case of the [modalities-are-monads](#RelationToMonads) relation,
a [[Grothendieck topology]] on the [[site]] underlying a [[presheaf topos]] is equivalently encoded in the [[sheafification]] [[monad]] $PSh(C) \to Sh(C) \hookrightarrow PSh(C)$ 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 [[truncated object|(-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](#Lawvere)).

Here, "It is locally the case that [X is [[metric space#metrizable_spaces|metrizable]]/Euclidean/etc]," corresponds to, "X is locally metrizable/Euclidean/etc," in the usual parlance.

More discussion is in ([Goldblatt](#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 $(-1)$-truncated objects, but we can still regard the entire sheafification monad as a [[higher modality]] in the internal [[homotopy type theory]].

### Closure modality

The canonical monad on a [[local topos]] gives rise to a closure modality on propositions in its internal language, as described in ([Awodey-Birkedal](#AwodeyBirkedal)).

### Necessity and possibility

See at _[[necessity and possibility]]_ the section _[Possible worlds via dependent type theory](https://ncatlab.org/nlab/show/necessity+and+possibility#InFirstOrderLogicAndTypeTheory)_

### Cohesive and differential modality

By adding to [[homotopy type theory]] three (higher) modalities that encode [[discrete object|discrete types]] and [[codiscrete object|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]].

## Related concepts

* [[closure operator]]

* [[idempotent monad]], [[idempotent (∞,1)-monad]]

* [[modal type]], [[anti-modal type]]

* [[modal homotopy type theory]]

* [[adjoint logic]]

* [[reflective subuniverse]]

* [[geometric type theory]]

## References
 {#References}

The clear identification of [[modal operators]] on types with [[monads]] (see at _[[monad (in computer science)]]_) is due to

* {#Moggi91} [[Eugenio Moggi]], _Notions of computation and monads. Information and Computation_, 93(1), 1991. ([pdf](http://www.disi.unige.it/person/MoggiE/ftp/ic91.pdf))

This was observed (independently) to systematically yield constructive [[modal logic]] in (see also at [[computational type theory]])

* {#BentonBiermanPaiva98} [[Nick Benton]], [[Gavin Bierman]], [[Valeria de Paiva]], *Computational Types from a Logical Perspective*, Journal of Functional Programming **8** 2  (1998) 177-193 [[doi:10.1017/S0956796898002998](https://doi.org/10.1017/S0956796898002998), [web](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.5778)]

* {#BiermanDePaiva96} [[Gavin M. Bierman]], [[Valeria de Paiva]], *Intuitionistic necessity revisited*, School of Computer Science research reports-University of Birmingham CSR (1996) [[researchgate](https://www.researchgate.net/publication/2810611_Intuitionistic_Necessity_Revisited), [[Bierman-dePaiva-NecessityRevisited.pdf:file]]]

* {#BiermanDePaiva00} [[Gavin M. Bierman]], [[Valeria de Paiva]], *On an Intuitionistic Modal Logic*, Studia Logica **65** (2000) 383–416 [[doi:10.1023/A:1005291931660](https://doi.org/10.1023/A:1005291931660), [pdf] (https://www.researchgate.net/profile/Valeria-De-Paiva/publication/226515897_On_An_Intuitionistic_Modal_Logic/links/00b4951ed416906ccc000000/On-An-Intuitionistic-Modal-Logic.pdf)]

* {#Kobayashi97} [[Satoshi Kobayashi]], *Monad as modality*, Theoretical Computer Science **175** 1 (1997) 29-74 [doi:10.1016/S0304-3975(96)00169-7]

* {#FairloughMendler} M. Fairlough, Michael Mendler, _Propositional lax logic_, Information and computation 137(1):1-33 (1997) [[pdf](https://www.uni-bamberg.de/fileadmin/uni/fakultaeten/wiai_professuren/grundlagen_informatik/papersMM/pll.pdf)]

* [[Steve Awodey]], p. 279 in: *Category theory*, Oxford University Press (2006, 2010) [[doi:10.1093/acprof:oso/9780198568612.001.0001](https://doi.org/10.1093/acprof:oso/9780198568612.001.0001), [ISBN:9780199237180](https://global.oup.com/ukhe/product/category-theory-9780199237180), [pdf](http://englishonlineclub.com/pdf/Category%20Teory%20%5BEnglishOnlineClub.com%5D.pdf)]

See also the type-theoretic generalization of _[[adjoint logic]]_, as discussed in

* {#LicataShulman} [[Dan Licata]], [[Mike Shulman]], _Adjoint logic with a 2-category of modes_, in _[Logical Foundations of Computer Science 2016](http://lfcs.info/lfcs-2016/)_ ([pdf](http://dlicata.web.wesleyan.edu/pubs/ls15adjoint/ls15adjoint.pdf), [slides](http://dlicata.web.wesleyan.edu/pubs/ls15adjoint/ls15adjoint-lfcs-slides.pdf))

The modal systems "CL" and "PLL" in ([Benton, Bierman & de Paiva 1998](#BentonBiermanPaiva)) and ([Fairlough-Mendler](#FairloughMendler)), respectively,  turn out to be equivalent to the geometric modality of [Goldblatt](#Goldblatt). The system CS4 in ([Kobayashi 1997](#Kobayashi97)) yields a constructive version of [[S4 modal logic]].

Explicit mentioning of type theory equipped with such a monad as _modal type theory_ or [[computational type theory]] is in

* {#FairtloughMendler02} Matt Fairtlough, Michael Mendler, _On the Logical Content of Computational Type Theory: A Solution to Curry's Problem_, Types for Proofs and Programs Lecture Notes in Computer Science Volume 2277, 2002, pp 63-78

Discussion of modal operators explicitly in [[dependent type theory]] (and with a brief mentioning of the relation to [[monad (in computer science)|monads]]) is in

* {#NanevskiPfenningPientka05} [[Aleksandar Nanevski]], [[Frank Pfenning]], Brigitte Pientka, _Contextual Modal Type Theory_ (2005) [[web](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.61.2356), [slides](http://wips.cs.umn.edu/slides/pientka.pdf)]

* [[Valeria de Paiva]], Eike Ritter, _Fibrational Modal Type Theory_, Electronic Notes in Theoretical Computer Science Volume 323, 11 July 2016, Proceedings of the Tenth Workshop on Logical and Semantic Frameworks, with Applications (LSFA 2015), pp. 143–161 ([doi:10.1016/j.entcs.2016.06.010](http://www.sciencedirect.com/science/article/pii/S1571066116300378))

* Daniel Gratzer, [[Jonathan Sterling]], [[Lars Birkedal]], _Implementing Modal Dependent Type Theory_, ([pdf](https://jozefg.github.io/papers/2019-implementing-modal-dependent-type-theory.pdf), [GitHub](https://github.com/jozefg/blott))

* Daniel Gratzer, _Implementing Modal Dependent Type Theory_, talk at [ICFP 19](https://icfp19.sigplan.org/) ([slides pdf](https://jozefg.github.io/papers/2019-icfp-modal-slides.pdf))

* [[Daniel Gratzer]], [[G. Alex Kavvos]], [[Andreas Nuyts]], [[Lars Birkedal]]: _Multimodal Dependent Type Theory_, Logical Methods in Computer Science **17** 3 (2021) lmcs:7713 [[arXiv:2011.15021](https://arxiv.org/abs/2011.15021), doi:10.46298/lmcs-17(3:11)2021]

* [[Mike Shulman]], _Semantics of multimodal adjoint type theory_ ([arXiv:2303.02572](https://arxiv.org/abs/2303.02572))

* [[Daniel Gratzer]], *Syntax and semantics of modal type theory*, PhD Aarhus (2023) [[pdf](https://jozefg.github.io/papers/phd-thesis.pdf)]

A survey of the field of modal type theory is in the collections

* M. Fairtlough, M. Mendler, [[Eugenio Moggi]] (eds.), _Modalities in Type Theory_, Mathematical Structures in Computer Science, Vol. 11, No. 4, (2001)

* {#PaivaGoreMendler} [[Valeria de Paiva]], Rajeev Goré, Michael Mendler, _Modalities in constructive logics and type theories_, Special issue of the Journal of Logic and Computation, editorial pp. 439-446, Vol. 14, No. 4, Oxford University Press, (2004) ([pdf](http://www.cs.bham.ac.uk/~vdp/publications/final-preface.pdf))

* [[Valeria de Paiva]], Brigitte Pientka (eds.) _Intuitionistic Modal Logic and Applications (IMLA 2008)_, . Inf. Comput. 209(12): 1435-1436 (2011) ([web](http://www.sciencedirect.com/science/article/pii/S089054011100143X))

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]]

* {#Lawvere} [[Bill Lawvere]], _Quantifiers and sheaves_, Actes, Congrès intern, math., 1970. Tome 1, p. 329 à 334 ([pdf](https://pdfs.semanticscholar.org/6630/846a00261a071b71e264e0f532e29cd9152f.pdf))

reviewed in

* {#Goldblatt} [[Robert Goldblatt]], _Grothendieck topology as geometric modality_, Mathematical Logic Quarterly, Volume 27, Issue 31-35, pages 495–529, (1981)

Modal type theory with an eye towards [[homotopy type theory]] is discussed in

* [[UF-IAS-2012]], _[Modal type theory](http://uf-ias-2012.wikispaces.com/Modal+type+theory)_

Formalization of modalities in [[homotopy type theory]] ([[modal homotopy type theory]]) is discussed in

* {#Shulman} [[Mike Shulman]], _Higher modalities_, talk at [[UF-IAS-2012]], October 2012  ([pdf](http://uf-ias-2012.wikispaces.com/file/view/modalitt.pdf))

* {#RSS} [[Egbert Rijke]], [[Mike Shulman]], [[Bas Spitters]], *Modalities in homotopy type theory*,  Logical Methods in Computer Science, **16** 1 (2020) [[arXiv:1706.07526](https://arxiv.org/abs/1706.07526), [episciences:6015](https://lmcs.episciences.org/6015), doi:10.23638/LMCS-16(1:2)2020]

* [[Mike Shulman]], _[http://homotopytypetheory.org/2015/07/05/modules-for-modalities/](http://homotopytypetheory.org/2015/07/05/modules-for-modalities/)_  (2015)

* [[Egbert Rijke]], [[Bas Spitters]], around def. 1.11 of _Sets in homotopy type theory_ ([arXiv:1305.3835](http://arxiv.org/abs/1305.3835))

* Kevin Quirin and Nicolas Tabareau, _Lawvere-Tierney Sheafification in Homotopy Type Theory_, [Workshop](http://hott-uf.gforge.inria.fr/2015/) talk 2015 ([pdf](http://hott-uf.gforge.inria.fr/2015/HOTTUF_Kevin.pdf)), Kevin Quirin [thesis](https://kevinquirin.github.io/thesis/main.pdf)

and specifically in [[cohesive homotopy type theory]] in

* [[Urs Schreiber]], [[Michael Shulman]], _[[schreiber:Quantum gauge field theory in Cohesive homotopy type theory]]_, in [[Ross Duncan]], [[Prakash Panangaden]] (eds.) _Proceedings 9th Workshop on Quantum Physics and Logic_, Brussels, Belgium, 10-12 October 2012 ([arXiv:1408.0054](http://arxiv.org/abs/1408.0054))

* {#Shulman15} [[Mike Shulman]], _Brouwer's fixed-point theorem in real-cohesive homotopy type theory_, Mathematical Structures in Computer Science Vol 28 (6) (2018): 856-941 ([arXiv:1509.07584](https://arxiv.org/abs/1509.07584), [doi:10.1017/S0960129517000147](https://doi.org/10.1017/S0960129517000147))

* {#Wellen18} [[Felix Wellen]], _[[schreiber:thesis Wellen|Cartan Geometry in Modal Homotopy Type Theory]]_ ([arXiv:1806.05966](https://arxiv.org/abs/1806.05966), [thesis pdf](http://www.math.kit.edu/iag3/~wellen/media/diss.pdf))

* [[David Jaz Myers]], _Good Fibrations through the Modal Prism_ ([arXiv:1908.08034v2](https://arxiv.org/abs/1908.08034v2))

A monograph aimed at [[philosophy|philosophers]] is in

* {#Corfield20} [[David Corfield]], _Modal homotopy type theory_, Oxford University Press 2020 ([ISBN: 9780198853404](https://global.oup.com/academic/product/modal-homotopy-type-theory-9780198853404))

following

* [[David Corfield]], _Modal homotopy type theory_, 2017 ([PhilSci archive:15260](http://philsci-archive.pitt.edu/15260/))

Monadic modal type theory with [[idempotent monads]]/monadic reflection is discussed in

* [[Andrzej Filinski]], _Representing Layered Monads_, POPL 1999. ([pdf](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.2016))

* [[Andrzej Filinski]], _On the Relations between Monadic Semantics_, TCS 375:1-3, 2007. ([pdf](http://www.itu.dk/people/birkedal/teaching/advanced-semantics-Spring-2007/OtRbMS.pdf))

* [[Andrzej Filinski]], _Monads in Action_, POPL 2010. ([pdf](http://camlunity.ru/swap/Library/Computer%20Science/Category%20Theory/Monads%20in%20Action.pdf))

* Oleg Kiselyov and Chung-chieh Shan, _Embedded Probabilistic Programming. Working conference on domain-specific languages_, (2009) ([pdf](https://link.springer.com/content/pdf/10.1007/978-3-642-03034-5_17.pdf))

A general framework is discussed in

* {#LicataShulman16} [[Dan Licata]], [[Mike Shulman]], _Adjoint logic with a 2-category of modes_, in _[Logical Foundations of Computer Science 2016](http://lfcs.info/lfcs-2016/)_ ([pdf](http://dlicata.web.wesleyan.edu/pubs/ls15adjoint/ls15adjoint.pdf), [slides](http://dlicata.web.wesleyan.edu/pubs/ls15adjoint/ls15adjoint-lfcs-slides.pdf))

  (for [[modal type theory|modal]] [[unary type theory]])

* {#LicataShulman17} [[Daniel Licata]], [[Mike Shulman]], and [[Mitchell Riley]], _A Fibrational Framework for Substructural and Modal Logics (extended version)_, in Proceedings of 2nd International Conference on Formal Structures for Computation and Deduction (FSCD 2017) ([doi: 10.4230/LIPIcs.FSCD.2017.25](http://drops.dagstuhl.de/opus/volltexte/2017/7740/), [pdf](http://dlicata.web.wesleyan.edu/pubs/lsr17multi/lsr17multi-ex.pdf))

  (for [[modal type theory|modal]] [[simple type theory]])

{#ReferencesReview} Review includes

* {#LicataWellen18} [[Dan Licata]], [[Felix Wellen]], _Synthetic Mathematics in Modal Dependent Type Theories_, tutorial at _[Types, Homotopy Theory and Verification](https://www.him.uni-bonn.de/programs/current-trimester-program/types-sets-constructions/workshop-types-homotopy-type-theory-and-verification/)_, 2018

  Tutorial 1, Dan Licata:  _A Fibrational Framework for Modal Simple Type Theories_ ([recording](https://www.youtube.com/watch?v=uLLbSAYd3yI))

  Tutorial 2, Felix Wellen: _The Shape Modality in Real cohesive HoTT and Covering Spaces_ ([recording](https://www.youtube.com/watch?v=ACGjJDarEc4))

  Tutorial 3, Dan Licata: _Discrete and Codiscrete Modalities in Cohesive HoTT_ ([recording](https://www.youtube.com/watch?v=OHN9vEVPBN8))

  Tutorial 4, Felix Wellen, _Discrete and Codiscrete Modalities in Cohesive HoTT, II_ ([recording](https://www.youtube.com/watch?v=KXx9UDQdWPw))

  Tutorial 5, Dan Licata: _A Fibrational Framework for Modal Dependent Type Theories_ ([recording](https://www.youtube.com/watch?v=R4SsxUnIcng))

  Tutorial 6, Felix Wellen: _Differential Cohesive HoTT_, ([recording](https://www.youtube.com/watch?v=uEZXHPdwvJU&t=226s))

* {#Licata18} [[Dan Licata]], _Synthetic Mathematics in Modal Dependent Type Theories_, notes for tutorial at _[Types, Homotopy Theory and Verification](https://www.him.uni-bonn.de/programs/current-trimester-program/types-sets-constructions/workshop-types-homotopy-type-theory-and-verification/)_, 2018 ([pdf](http://dlicata.web.wesleyan.edu/pubs/lsr17multi/him-tutorial.pdf))

* {#Shulman19} [[Michael Shulman]], _Semantics of higher modalities_, talk at _[Geometry in Modal HoTT (2019)](https://felix-cherubini.de/modal-workshop.html)_ ([pdf slides](http://home.sandiego.edu/~shulman/papers/cmu2019b.pdf), [video recording](https://www.youtube.com/watch?v=Wcpi1vVMrCs))

* [[Felix Cherubini]], _Geometry in Modal HoTT_, talk at _[Geometry in Modal HoTT (2019)](https://felix-cherubini.de/modal-workshop.html)_ ([video recording](https://www.youtube.com/watch?v=oHc552-hzBY))

* [[Egbert Rijke]], _Reflective subuniverses and modalities_, talk at _[Geometry in Modal HoTT (2019)](https://felix-cherubini.de/modal-workshop.html)_ ([video recording](https://youtu.be/OQthe5HpiKM))

* [[Egbert Rijke]], _Modal descent_, talk at _[Geometry in Modal HoTT (2019)](https://felix-cherubini.de/modal-workshop.html)_ ([video recording](https://youtu.be/InaRkqKdyp4))

See also

* [[Frank Pfenning]], _Towards modal type theory_ (2000) [[pdf](http://www.cs.cmu.edu/~fp/talks/mantova00-talk.pdf)]

* [[Frank Pfenning]], _Intensionality, Extensionality, and Proof Irrelevance in Modal Type Theory_, in: Symposium on Logic in Computer Science (2001) 221&-230 [[web](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.28.5884)]

* Giuseppe Primiero, _A multi-modal dependent type theory_ ([pdf](http://logica.ugent.be/centrum/preprints/primiero_PSPL10.pdf))

* {#GabbayNanevski} Murdoch Gabbay, [[Aleksandar Nanevski]], _Denotation of contextual modal type theory (CMTT): syntax and metaprogramming_ ([pdf](http://www.gabbay.org.uk/papers/dencmt.pdf))

* G. A. Kavvos, _Modalities, Cohesion, and Information Flow_, ([arXiv:1809.07897](https://arxiv.org/abs/1809.07897))

* Y. Nishiwaki, Y. Kakutani, Y. Murase, _Modality via Iterated Enrichment_, MFPS 2018 ([pdf](https://www.mathstat.dal.ca/mfps2018/preproc/paper_15.pdf))

A modality in the [[internal language]] of a [[local topos]] is discussed in section 4.2 of

* {#AwodeyBirkedal} [[Steve Awodey]], [[Lars Birkedal]], _Elementary axioms for local maps of toposes_, Journal of Pure and Applied Algebra, 177(3):215-230, (2003) ([ps](http://www.itu.dk/people/birkedal/papers/elealm.ps.gz), [[AwodeyBirkedalLocalTopos.pdf:file]] )

* {#Gaubault-LarrecqGoubault} Jean Goubault-Larrecq, Éric Goubault, _On the geometry of intuitionistic S4 proofs_, Homology, homotopy and applications vol 5(2) (2003)

* {#ParkHarper} Sungwoo Park, [[Robert Harper]], _A modal language for Effects_ (2004) ([web](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.8252))

* {#LicataHarper} [[Dan Licata]], [[Robert Harper]], _A Monadic Formalization of ML5_ ([arXiv:1009.2793](http://arxiv.org/abs/1009.2793))

* {#dradjoint} Ranald Clouston, Bassel Mannaa, Rasmus Ejlers Møgelberg, Andrew M. Pitts, Bas Spitters, _Modal Dependent Type Theory and Dependent Right Adjoints_ [Arxiv](https://arxiv.org/abs/1804.05236), 2018

* [[Felix Cherubini]], [[Egbert Rijke]], _Modal Descent_, ([arXiv:2003.09713](https://arxiv.org/abs/2003.09713))

A list of related references is also kept at

* [[Valeria de Paiva]], _Intuitionistic Modal Logic Selected Publications_ ([web](https://docs.google.com/document/pub?id=1ASo__R-_Bzq9D9lGUo0xrfIxt_I9az7oqSg-wmP1K10))

[[!redirects modal type theory]]
[[!redirects modal type theories]]
[[!redirects modal dependent type theory]]
[[!redirects modal dependent type theories]]

[[!redirects multimodal type theory]]
[[!redirects multimodal type theories]]
[[!redirects multimodal dependent type theory]]
[[!redirects multimodal dependent type theories]]

[[!redirects geometric modality]]
[[!redirects geometric modalities]]

[[!redirects higher modality]]
[[!redirects higher modalities]]


modalities - contents

**[[modal type theory]]**, [[modal logic]]

**[[closure operator]]**, [[universal closure operator]]

* [[idempotent monad]], [[comonad]]

* [[modal type]], [[local object]]

* [[reflective subcategory]], [[coreflective subcategory]]

**Examples**

* [[Moore closure]]

* [[geometric modality]]/[[Lawvere-Tierney topology]]

* [[S4 modal logic]]

* [[n-truncated object in an (infinity,1)-category|n-truncation]]

* [[shape modality]] $\dashv$ [[flat modality]] $\dashv$ [[sharp modality]]


Modalities in homotopy type theory

* [[Egbert Rijke]], [[Michael Shulman]], [[Bas Spitters]]:

  **Modalities in homotopy type theory**

  Logical Methods in Computer Science **16** 1 (2020)

  [arXiv:1706.07526](https://arxiv.org/abs/1706.07526)

  lmcs:3826

on [[modal homotopy type theory]].

> **Abstract.** [[univalence|Univalent]] [[homotopy type theory]] (HoTT) may be seen as a language for the [[(infinity,1)-category|category]] of [[infinity-groupoid|$\infty$-groupoids]]. It is being developed as a [[univalent foundations|new foundation for mathematics]] and as an [[internal language]] for ([[elementary (infinity,1)-topos|elementary]]) [[(infinity,1)-topos|higher toposes]]. We develop the theory of [[factorization systems]], [[reflective subuniverses]], and [[modalities]] in [[homotopy type theory]], including their construction using a "[[localization]]" [[higher inductive type]]. This produces in particular the [[(n-connected, n-truncated) factorization system|($n$-connected, $n$-truncated) factorization system]] as well as internal presentations of [[subtoposes]], through [[lex]] [[modalities]]. We also develop the [[categorical semantics|semantics]] of these constructions.

## See also ##

* [[Localization in Homotopy Type Theory]]
* [[homotopy type theory - references]]

category: reference


modality

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Modalities, Closure and Reflection
+-- {: .hide}
[[!include modalities - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A _modality_ in [[philosophy]] and formally in [[formal logic]]/[[type theory]] expresses a certain _mode_ (or "moment" as in [Hegel 12](#Hegel12)) of [[being]].

### In philosophy
 {#IdeaInPhilosophy}

According to ([Kant 1900](#Kant1900)) (see [WP](http://de.wikipedia.org/wiki/Kategorie_%28Philosophie%29)) the four "[[category (philosophy)|categories]]" are

1. Quantity

1. Quality

1. Relation

1. Modality

and the modalities contain the three [[unity of opposites|pairs of opposites]]

* [[possibility]] - impossibility

* [[being]] - [[nothing]]

* [[necessity]] - Zufälligkeit

### In formal logic and type theory
 {#InFormalLogic}

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 monad|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 [[(infinity,1)-monad|monad]], perhaps idempotent.

#### Idempotent monadic modalities in homotopy type theory

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](#Shulman), [Rijke, Shulman, Spitters](#RSS) ).  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](#RSS):

* Higher modality: A modality consists of a modal operator $L : {Type} \to {Type}$ and for every type $X$ a modal unit $(-)^L : X \to LX$ together with

1. an induction principle of type
$$\text{ind} : ((a : A) \to LB(a^L)) \to ((u : LA) \to LB(u))$$
for any type $A$ and type $B$ depending on $LA$

1. a computation rule
$$\text{com} : \text{ind}(f)(a^L) = f(a).$$

1. 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
$$f \mapsto f \circ (-)^L : ((u : LA) \to LB(u)) \to ((a : A) \to LB(a^L))$$
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
$$f \mapsto f \circ (-)^L : (LA \to Z) \to (A \to Z)$$
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.

### Notation
 {#Notation}

Typical notation (e.g. [SEP](#SEP), [Reyes 91](#Reyes91), but not [Hermida 10](#Hermida10)) 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](#Reyes91) [RRZ 04, p. 116](#ReyesEtAl), [Hermida 10, p.11](#Hermida10)) 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 modality|flat comodality]] $\dashv$ [[sharp modality]] the generic notation would be:

$$
  \array{
     monad && comonad && monad
     \\
     \lozenge &\dashv& \Box &\dashv& \bigcirc
     \\
     \\
     shape && flat && sharp
     \\
     ʃ &\dashv& \flat &\dashv& \sharp
  }
$$

## Examples

* [[possibility]] $\dashv$ [[necessity]]

* [[local modality]], [[Lawvere-Tierney topology]]

* [[double negation modality]]

* [[n-truncation modality]]

* [[unit type]] modality, [[empty type]] co-modality ([[nothing]] $\dashv$ [[being]])

* [[exponential modality]]

* [[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]]

* [[classical modality]]

* [[affine modality]]

* [[graded modality]]

## Related concepts

* [[graded modality]]

* [[de dicto and de re]]

* [[monad (in computer science)]]

* [[modal type]], [[anti-modal type]]

* [[adjoint modality]], [[adjoint logic]]

* [[Galois connection]]

## References
 {#References}

### In philosopy

Origin in [[philosophy]]:

* {#Hegel12} [[Georg Hegel]], _[[Science of Logic]]_, 1812

* {#Kant1900} [[Kant]], AA III, 93– KrV B 106

* German Wikipedia, _[Modalität (Philosophie)](https://de.wikipedia.org/?curid=3382094)_

* {#SEP} Stanford Encyclopedia of Philosophy, _[Modal Logic](http://plato.stanford.edu/entries/logic-modal/)_

### In formal 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]]_):

* {#Shulman} [[Mike Shulman]], _Higher modalities_, talk at [[UF-IAS-2012]], October 2012  ([pdf](http://uf-ias-2012.wikispaces.com/file/view/modalitt.pdf))

* [[Mike Shulman]], _[All modalities are Higher Inductive Types](http://homotopytypetheory.org/2012/11/19/all-modalities-are-hits/)_

* {#RSS} [[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](https://arxiv.org/abs/1706.07526), [episciences:6015](https://lmcs.episciences.org/6015))

### In category theory

Discussion in [[category theory]] (fot more see at _[[modal operator]]_):

* {#Reyes91} [[Gonzalo Reyes]], _A topos-theoretic approach to reference and modality_, Notre Dame J. Formal Logic Volume 32, Number 3 (1991), 359-391 ([Euclid](http://projecteuclid.org/euclid.ndjfl/1093635834))

* {#ReyesEtAl} Reyes/Reyes/Zolfaghari, _Generic Figures and Their Glueings_ 2004, Polimetrica

* {#Hermida10} [[Claudio Hermida]], section 3.3. of _A categorical outlook on relational modalities and simulations_, 2010 ([pdf](http://maggie.cs.queensu.ca/chermida/papers/sat-sim-IandC.pdf))

[[!redirects modality]]
[[!redirects modalities]]
[[!redirects modal operator]]
[[!redirects modal operators]]

[[!redirects comodality]]
[[!redirects comodalities]]
[[!redirects comodal operator]]
[[!redirects comodal operators]]

[[!redirects co-modality]]
[[!redirects co-modalities]]
[[!redirects co-modal operator]]
[[!redirects co-modal operators]]


ModCat

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Categories of categories
+--{: .hide}
[[!include categories of categories - contents]]
=--
#### Model category theory
+--{: .hide}
[[!include model category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

There are several versions of a ([[very large category|very large]]) [[2-category]] of [[model categories]], depending on which notion of [[transformation of adjoints]] one takes to be the [[2-morphisms]] between [[1-morphisms]] given by [[Quillen functors]].

One choice is to consider [[2-morphisms]] to be [[conjugate transformations of adjoints]] between [[Quillen adjunctions]] [[Hovey (1999), p. 24](#Hovey99), cf. also [Harpaz & Prasma (2015), Def. 2.5.3](#HarpazPrasma15)], such that forgetting the [[model category]]-[[structure]] is a [[forgetful functor|forgetful]] [[2-functor]] to [[CatAdj|$Cat_{Adj}$]]:
$$
  ModCat \longrightarrow Cat_{Adj} \longrightarrow Cat
  \,.
$$
[Therefore](CatAdj#RelationToBifibrations) a [[pseudofunctor]] $\mathcal{B} \longrightarrow Cat$ which factors through $ModCat$ this way has as [[Grothendieck construction]] a [[bifibration]] of [[model categories]]. Under good conditions, the [[domain]] of this bifibration carries itself an induced [[model category structure]], see at *[[model structure on Grothendieck constructions]]*.

## Related concepts

* [[double category of model categories]]

* [[Ho(CombModCat)]]

* [[Grothendieck construction for model categories]]

[[!include categories of categories - contents]]

## References

The [[2-category]] of [[model categories]], left-pointing [[Quillen adjunctions]] and [[conjugate transformations of adjoints]] is considered in:

* {#Hovey99} [[Mark Hovey]], p. 24 of: *[[Model Categories]]*, Mathematical Surveys and Monographs, **63** AMS (1999) [[ISBN:978-0-8218-4361-1](https://bookstore.ams.org/surv-63-s), [doi:10.1090/surv/063](https://doi.org/http://dx.doi.org/10.1090/surv/063), [pdf](https://people.math.rochester.edu/faculty/doug/otherpapers/hovey-model-cats.pdf), [Google books](http://books.google.co.uk/books?id=Kfs4uuiTXN0C&printsec=frontcover)]

* {#HarpazPrasma15} [[Yonatan Harpaz]], [[Matan Prasma]], Def. 2.5.3 in: _The Grothendieck construction for model categories_, Advances in Mathematics **281** (2015) 1306-1363 [[arXiv:1404.1852](https://arxiv.org/abs/1404.1852), [10.1016/j.aim.2015.03.031](https://doi.org/10.1016/j.aim.2015.03.031)]

[[!redirects 2-category of model categories]]


model

This page is about the notion of _model_ in [[logic]]. For the notion in [[physics]] see _[[model (in theoretical physics)]]_.

***

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Model theory
+-- {: .hide}
[[!include model theory - contents]]
=--
=--
=--

#Model#
* table of contents
{:toc}

## Idea

In [[model theory]], a __model__ of a [[theory]] is a realization of the [[types]], operations, [[relations]], and [[axioms]] of that theory.  In ordinary model theory one usually studies mainly models in [[sets]], but in [[categorical logic]] we study models in other [[categories]], especially in [[topoi]].

The term _[[structure in model theory|structure]]_ is often used to mean a realization of types, operations, and relations in some [[signature]], but not satisfying any particular axioms.  This is of course the same as a model for the "empty theory" in that signature, which has the same types, operations, and relations, but no axioms at all.  One then talks about whether a given structure is, or is not, a *model* of a given theory in a given signature.

## Definition

### In first-order theories

The basic concept is of a _[[structure in model theory|structure]]_ for a [[first-order language]] $L$: a set $M$ together with an interpretation of $L$ in $M$. A theory $T$ is specified by a language and a set of sentences in $L$.

An $L$-structure $M$ is a __model__ of $T$ if for every sentence $\phi$ in $T$, its interpretation in $M$, $\phi^M$ is true ("$\phi$ holds in $M$").

We say that $T$ is __consistent__ or satisfiable (relative to the universe in which we do model theory) if there exist at least one model for $T$ (in our universe). Two theories, $T_1$, $T_2$ are said to be __equivalent__ if they have the same models.

Given a class $K$ of structures for $L$, there is a theory $Th(K)$ consisting of all sentences in $L$ which hold in every structure from $K$. Two structures $M$ and $N$ are __elementary equivalent__ (sometimes written by equality $M=N$, sometimes said "elementarily equivalent") if $Th(M)=Th(N)$, i.e. if they satisfy the same sentences in $L$. Any set of sentences which is equivalent to $Th(K)$ is called a __set of axioms__ of $K$. A theory is said to be __finitely axiomatizable__ if there exist a finite set of axioms for $K$.

A theory is said to be __complete__ if it is equivalent to $Th(M)$ for some structure $M$.

### For Lawvere theories

For $Syn(T)$ the [[syntactic category]] of an [[algebraic theory]] (where $Syn(T)$ is perhaps better known as a [[Lawvere theory]]), and for $C$ any category with finite [[limit]]s, a _model_ for $T$ in $C$ is a product-preserving functor

$$
  N : Syn(T) \to C
  \,.
$$

The **category of models** in this case is hence the [[full subcategory]] of the [[functor category]] $[Syn(T),C]$ on product-preserving functors.

## Examples

* [[models in presheaf toposes]]

## Related entries

* [[structure in model theory]]

[[!redirects models]]
[[!redirects category of models]]
[[!redirects categories of models]]

[[!redirects model (logic)]]


model (in theoretical physics)

> This entry is about the notion in [[physics]]. For the notion of _model_ in [[logic]] see at _[[model (logic)]]_.

***

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Physics
+--{: .hide}
[[!include physicscontents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

### In particle physics

In [[particle physics]] [[phenomenology]] a _model_ is the specification of a [[physical theory]], fundamentally of a [[quantum field theory]], that reproduces aspects [[phenomenology]], notably the fundamental physics observed in [[particle accelerators]].

The _[[standard model of particle physics]]_ is, by default, the currently best model available, given the available experimental data.

Despite the success of this model, it is conceptually unsatisfactory in many ways and it is clear that it can be a roughly accurate description of reality not high above the currently experimentally available [[energy]]-scales. Therefore [[phenomenology|phenomenologists]] still "build" plenty of other models that refine the standard model in one way or other, being compatible with the present data, but making various other predictions for what should be observed at higher energies.

It is generally understood that models are approximations to reality. The proverbial saying goes:

> Every model is wrong. But some models are useful.

## Examples

### In theoretical physics

* [[lattice model]]

  * [[Ising model]]

### In solid state physics

In [[solid state physics]]:

* [[Haldane model]]

### In particle physics

In [[particle physics]]:

* [[standard model of particle physics]]

* [[Connes-Lott-Chamseddine model]]

* [[Grand Unified Theory]]

* [[composite Higgs model]]

* [[MSSM]]

  * [[G2-MSSM]]

### In cosmology

In [[cosmology]]

* [[standard model of cosmology]]

## Related concepts

* [[theory (physics)]], [[experiment]], [[coordination]]

* [[bottom-up and top-down model building]]

* [[intersecting D-brane model]]

* [[computable physics]]

* [[mathematical physics]]

* [[naturalness]]

* [[landscape of string theory vacua]]

* [[string inspired model]]

* [string theory FAQ -- Does string theory make predictions?](string+theory+FAQ#HowDoesStringTheoryMakePredictions)

* [string theory FAQ -- What does it mean to say that string theory has a "landscape of solutions"?](http://ncatlab.org/nlab/show/string+theory+FAQ#WhatDoesItMeanToSayStringTheoryHasALandscapeOfSolutions)

[[!redirects model (in particle phyiscs)]]

[[!redirects model (in particle physics)]]

[[!redirects models (in theoretical physics)]]

[[!redirects model (physics)]]

[[!redirects model building]]


model (∞,1)-category

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### $(\infty,1)$-Category theory
+--{: .hide}
[[!include quasi-category theory contents]]
=--
#### Model category theory
+--{: .hide}
[[!include model category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

The notion of *model $(\infty,1)$-category* (or *model $\infty$-category*, for short) is the [[(infinity,1)-category|$(\infty,1)$-]][[categorification]] of that of *[[model category]]*.

Where the [[classical model structure on simplicial sets]] is an archetypical example of a [[model category]], so [[simplicial object in an (infinity,1)-category|simplicial]] [[infinity-groupoids|$\infty$-groupoids]] ("[[simplicial spaces]]", [[bisimplicial sets]]) form an archetypical example of a model $\infty$-category. In this example, a fundamental application of the theory says, for instance,  that [[geometric realization of simplicial topological spaces|geometric realization]] preserves [[homotopy pullbacks]] of [[homotopy Kan fibrations]] (see [there](geometric+realization+of+simplicial+topological+spaces#PreservationOfHomotopyLimits)).

## References
 {#References}

* [[Aaron Mazel-Gee]], *Model ∞-categories I: some pleasant properties of the ∞-category of simplicial spaces* [[arXiv:1412.8411](https://arxiv.org/abs/1412.8411)]

* [[Aaron Mazel-Gee]], *Model ∞-categories II: Quillen adjunctions*, New York Journal of Mathematics **27** (2021) 508-550.  [[arXiv:1510.04392](https://arxiv.org/abs/1510.04392), [nyjm:27-21](http://nyjm.albany.edu/j/2021/27-21.html)]

* [[Aaron Mazel-Gee]], *Model ∞-categories III: the fundamental theorem*, New York Journal of Mathematics **27** (2021) 551-599 [[arXiv:1510.04777](https://arxiv.org/abs/1510.04777), [nyjm:27-22](http://nyjm.albany.edu/j/2021/27-22.html)]

[[!redirects model (∞,1)-categories]]

[[!redirects model (infinity,1)-category]]
[[!redirects model (infinity,1)-categories]]

[[!redirects model infinity1-category]]


model 2-category

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### 2-category theory
+--{: .hide}
[[!include 2-category theory - contents]]
=--
#### Model category theory
+--{: .hide}
[[!include model category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A _strict model 2-category_ is a [[strict 2-category]] $C$ -- hence a [[category]] [[enriched category|enriched over]] [[Cat]] -- whose underlying [[category]] $C_1$ is equipped with the structure of a [[model category]] which is compatible, in some sense, with the [[folk model structure]] on the enrichment category [[Cat]].

The compatibility is such that in particular the notion of [[homotopy limit]] and of [[strict 2-limit|pseudo-limit]] coincide in such model 2-category.

To state the definition of a strict model 2-category, we need the following notation:

## Notation

For $C$ a [[enriched category|category enriched over]] [[Cat]] and for
$$
  u : X \to Y
$$
$$
  v : V \to W
$$
two morphisms in $C$, let

$$
  [u,v] : C(Y,V) \to C(Y,W) \times_{C(X,W)} C(X,V)
$$
be the unique morphism induced from the commutativity of the diagram
$$
  \array{
    C(Y,V) &\stackrel{C(u,V)}{\to}& C(X,V)
    \\
    \downarrow^{C(Y,v)} && \downarrow^{C(X,v)}
    \\
    C(Y,W) &\stackrel{C(u,W)}{\to}& C(X,W)
  }
  \,.
$$

## Definition

The structure of a **model 2-category** on a [[strict 2-category]] $C$ with finite limits and colimits is

* a [[model category]] structure on the underlying 1-category $C_1$;

* such that

  * if $u : X \to Y$ is a cofibration and $v : V \to W$ is a fibration in $C_1$ then the functor $[u,v]$ defined above is an [[isofibration]] in [[Cat]];

  * and $[u,v]$ is a weak equivalence (in the [[folk model structure]] on [[Cat]], i.e. an [[equivalence of categories]]) if either of $u$ or $v$ is.

This is just the usual notion of an [[enriched model category]] specialized to enrichment over the [[monoidal model category]] $Cat$.

## Examples

* Every suitably complete and cocomplete 2-category admits a "trivial" or "natural" model 2-category structure in which the weak equivalences are the categorical equivalences and the fibrations are the internal [[isofibration]]s.  By duality, there also is a second such model structure; in Cat both coincide with the [[folk model structure]].

* The 2-category $T Alg_s$ of algebras and _strict_ morphisms for a suitably well-behaved (strict) [[2-monad]] $T$ inherits a model structure where the weak equivalences are those that become weak equivalences in the underlying category.  These are precisely the morphisms that are equivalences in the 2-category $T Alg$ of $T$-algebras and _pseudo_ morphisms, so $T Alg$ is the "homotopy 2-category" of $T Alg_s$. Cofibrant replacements in this model structure can also be identified with [[flexible algebra|flexible]] replacements in the theory of 2-monads.

* The 2-category $[C,K]$ of diagrams in any 2-category $K$ also inherits two different, but Quillen equivalent, model structures, called the "projective" and "injective" model structures.

## Remarks

* Every model 2-category has a [[homotopy 2-cateory|homotopy (weak) 2-category]] which can be constructed by formally making the weak equivalences into categorical equivalences.  It can alternately be described using fibrant and cofibrant replacements, just like the ordinary homotopy category of a model category.

* In a strict model 2-category with a _natural_ model structure, the notions of 2-categorical [[strict 2-limit|pseudo-limit]] and (one canonical construction of) [[model category|model theoretic]] [[homotopy limit]]s coincide.  For a general model 2-category, homotopy limits can be construed as representatives of [[2-limit]]s in its homotopy 2-category.

## Related concepts

* [[homotopy 2-category]]

* [[model (infinity,1)-category|model $(\infty,1)$-category]]

## References
 {#References}

The idea that the [[2-category]] of [[model categories]] should itself be a "2-model category" in some sense has long been an item on [[Mark Hovey]]'s  *[Algebraic Topology Problem List](https://www-users.cse.umn.edu/~tlawson/hovey/index.html)* (now item 8 [here](https://www-users.cse.umn.edu/~tlawson/hovey/model.html)). See also at [[Ho(CombModCat)]].

The original definition of model 2-categories in the above form is due to

* [[Steve Lack]], _Homotopy theoretic aspects of 2-monads_, Journal of Homotopy and Related Structures, Vol. 2(2007), No. 2, pp. 229-260 ([math.CT/0607646](http://www.arxiv.org/abs/math.CT/0607646))

which constructs the natural model structure and its lifting to 2-monads.

The projective and injective model structures on diagrams, and the relation between pseudo-limits and homotopy limits, are discussed in the following (especially section 6).

* [[Nicola Gambino]], _Homotopy limits for 2-categories_, Mathematical Proceedings of the Cambridge Philosophical Society 145 (2008) 43-63 ([pdf](http://www1.maths.leeds.ac.uk/~pmtng/Publications/homotopy.pdf))

[[!redirects model 2-categories]]

[[!redirects 2-model category]]
[[!redirects 2-model categories]]


model bicategory

## References

* M. E. Descotte, [[E. J. Dubuc]], M. Szyld, _Model bicategories and their homotopy bicategories_.  [arXiv](https://arxiv.org/abs/1805.07749).


Model Categories

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Model category theory
+--{: .hide}
[[!include model category theory - contents]]
=--
=--
=--

There is the textbook

* [[Mark Hovey]]

  **Model Categories**

  Mathematical Surveys and Monographs, Volume 63, AMS (1999)

  [ISBN:978-0-8218-4361-1](https://bookstore.ams.org/surv-63-s)

  [doi:10.1090/surv/063](https://doi.org/http://dx.doi.org/10.1090/surv/063)

  [pdf](https://www.math.rochester.edu/people/faculty/doug/otherpapers/hovey-model-cats.pdf), (errata: [pdf](https://people.math.rochester.edu/faculty/doug/otherpapers/hovey-model-cats-errata.pdf))

  [Google books](http://books.google.co.uk/books?id=Kfs4uuiTXN0C&printsec=frontcover)

on [[model categories]] and the [[homotopy theory]] modeled by them.

## Preface

## Chapter 1. Model categories

* [[model category]]

### 1.1. The deﬁnition of a model category

### 1.2. The homotopy category

* [[homotopy category]]

* [[homotopy category of a model category]]

### 1.3. Quillen functors and derived functors

* [[Quillen functor]]

* [[derived functor]]

#### 1.3.1. Quillen functors

#### 1.3.2. Derived functors and naturality
#### 1.3.3. Quillen equivalences

* [[Quillen equivalence]]

### 1.4. 2-categories and pseudo-2-functors

* [[2-category]]

* [[2-functor]]

## Chapter 2. Examples

### 2.1. Coﬁbrantly generated model categories

* [[cofibrantly generated model category]]

#### 2.1.1. Ordinals, cardinals, and transﬁnite compositions

#### 2.1.2. Relative I-cell complexes and the small object argument

* [[cell complex]]

* [[small object argument]]

#### 2.1.3. Coﬁbrantly generated model categories

* [[cofibrantly generated model category]]

### 2.2. The stable category of modules

### 2.3. Chain complexes of modules over a ring

* [[model structure on chain complexes]]

### 2.4. Topological spaces

* [[classical model structure on topological spaces]]

* [[model structure on compactly generated topological spaces]]

### 2.5. Chain complexes of comodules over a Hopf algebra

#### 2.5.1. The category of B-comodules

#### 2.5.2. Weak equivalences

#### 2.5.3. The model structure

## Chapter 3. Simplicial sets

### 3.1. Simplicial sets

* [[simplicial set]]

### 3.2. The model structure on simplicial sets

* [[classical model structure on simplicial sets]]

### 3.3. Anodyne extensions

* [[anodyne extension]]

### 3.4. Homotopy groups

* [[homotopy group]]

### 3.5. Minimal ﬁbrations

* [[minimal fibration]]

### 3.6. Fibrations and geometric realization

* [[fibration]]

* [[geometric realization]]

## Chapter 4. Monoidal model categories

* [[monoidal model category]]

### 4.1. Closed monoidal categories and closed modules

* [[closed monoidal category]]

### 4.2. Monoidal model categories and modules over them

* [[monoidal model category]]

### 4.3. The homotopy category of a monoidal model category

* [[monoidal homotopy category of a monoidal model category]]

## Chapter 5. Framings

* [[framing]]

### 5.1. Diagram categories

### 5.2. Diagrams over Reedy categories and framings

* [[Reedy category]]

### 5.3. A lemma about bisimplicial sets

* [[bisimplicial set]]

### 5.4. Function complexes

* [[function complex]]

### 5.5. Associativity

### 5.6. Naturality

### 5.7. Framings on pointed model categories

## Chapter 6. Pointed model categories

* [[pointed model category]]

### 6.1. The suspension and loop functors

* [[suspension]]

* [[loop functor]]

### 6.2. Coﬁber and ﬁber sequences

* [[fiber sequence]]

* [[cofiber sequence]]

### 6.3. Properties of coﬁber and ﬁber sequences

### 6.4. Naturality of coﬁber sequences

### 6.5. Pre-triangulated categories

### 6.6. Pointed monoidal model categories

## Chapter 7. Stable model categories and triangulated categories

* [[stable model category]]

### 7.1. Triangulated categories

* [[triangulated category]]

### 7.2. Stable homotopy categories

* [[stable homotopy category]]

### 7.3. Weak generators

### 7.4. Finitely generated model categories

## Chapter 8. Vistas

## Bibliography

## Index

category: reference


A historically important early manuscript draft:

* [[William G. Dwyer]], [[Philip S. Hirschhorn]], [[Daniel M. Kan]]:

  \linebreak

  **Model Categories and More General Abstract Homotopy Theory**

  \linebreak

  (1997)

  [pdf](https://people.math.rochester.edu/faculty/doug/otherpapers/dhk.pdf), [[DwyerHirschhornKan-ModelCategories.pdf:file]]

on [[model category]]-theory in general and on [[cofibrantly generated model categories]] and [[Reedy model categories]] in particular.

This manuscript draft later transformed in
*[[Homotopy Limit Functors on Model Categories and Homotopical Categories]]*, adding [[Jeffrey H. Smith]] as a coauthor.

However, the draft serves as an original reference for the [[Kan recognition theorem]] (in §II.8) and the [[Kan transfer theorem]] (in §II.9), as well as [[cofibrantly generated model categories]] (in Chapter II).

Furthermore, this draft originates the modern definition of a [[model category]] (in §I.1.2), modifying the original definition of closed model category by [[Quillen]] by replacing finite (co)limits with small (co)limits and requiring factorizations to be functorial.

The first mention of [[monoidal model categories]] (without the [[unit axiom]]) under this name is in Remark 55.10, with no definition given, but the preceding section discusses the [[pushout product]] axiom.

All this material did not make it to the book.

category: reference


This page is about the textbook:

* [[Philip S. Hirschhorn]]

  \linebreak

  **Model Categories and Their Localizations**

  \linebreak

  American Mathematical Society

  Mathematical Surveys and Monographs **99**

  (2002)

  ISBN 0-8218-3279-4

  [doi:10.1090/surv/099](https://doi.org/10.1090/surv/099)

  [pdf](http://www.maths.ed.ac.uk/~aar/papers/hirschhornloc.pdf)

on [[model categories]] and their [[Bousfield localization of model categories|localization]].

# Contents

## Introduction
## Model categories and their homotopy categories
## Localizing model category structures
## Acknowledgments
## Part 1. Localization of Model Category Structures
### Summary of Part 1
### Chapter 1. Local Spaces and Localization
#### 1.1. Definitions of spaces and mapping spaces
#### 1.2. Local spaces and localization
#### 1.3. Constructing an $f$-localization functor
#### 1.4. Concise description of the $f$-localization
#### 1.5. Postnikov approximations
#### 1.6. Topological spaces and simplicial sets
#### 1.7. A continuous localization functor
#### 1.8. Pointed and unpointed localization
### Chapter 2. The Localization Model Category for Spaces
#### 2.1. The Bousfield localization model category structure
#### 2.2. Subcomplexes of relative $\overline{\Lambda\{f\}}$-cell complexes
#### 2.3. The Bousfield-Smith cardinality argument
### Chapter 3. Localization of Model Categories
#### 3.1. Left localization and right localization
#### 3.2. C-local objects and C-local equivalences
#### 3.3. Bousfield localization
#### 3.4. Bousfield localization and properness
#### 3.5. Detecting equivalences
### Chapter 4. Existence of Left Bousfield Localizations
#### 4.1. Existence of left Bousfield localizations
#### 4.2. Horns on S and S-local equivalences
#### 4.3. A functorial localization
#### 4.4. Localization of subcomplexes
#### 4.5. The Bousfield-Smith cardinality argument
#### 4.6. Proof of the main theorem
### Chapter 5. Existence of Right Bousfield Localizations
#### 5.1. Right Bousfield localization: Cellularization
#### 5.2. Horns on K and K-colocal equivalences
#### 5.3. K-colocal cofibrations
#### 5.4. Proof of the main theorem
#### 5.5. K-colocal objects and K-cellular objects
### Chapter 6. Fiberwise Localization
#### 6.1. Fiberwise localization
#### 6.2. The fiberwise local model category structure
#### 6.3. Localizing the fiber
#### 6.4. Uniqueness of the fiberwise localization
## Part 2. Homotopy Theory in Model Categories
### Summary of Part 2
### Chapter 7. Model Categories
#### 7.1. Model categories
#### 7.2. Lifting and the retract argument
#### 7.3. Homotopy
#### 7.4. Homotopy as an equivalence relation
#### 7.5. The classical homotopy category
#### 7.6. Relative homotopy and fiberwise homotopy
#### 7.7. Weak equivalences
#### 7.8. Homotopy equivalence
#### 7.9. The equivalence relation generated by “weak equivalence”
#### 7.10. Topological spaces and simplicial sets
### Chapter 8. Fibrant and Cofibrant Approximations
#### 8.1. Fibrant and cofibrant approximations
#### 8.2. Approximations and homotopic maps
#### 8.3. The homotopy category of a model category
#### 8.4. Derived functors
#### 8.5. Quillen functors and total derived functors
### Chapter 9. Simplicial Model Categories
#### 9.1. Simplicial model categories
#### 9.2. Colimits and limits
#### 9.3. Weak equivalences of function complexes
#### 9.4. Homotopy lifting
#### 9.5. Simplicial homotopy
#### 9.6. Uniqueness of lifts
#### 9.7. Detecting weak equivalences
#### 9.8. Simplicial functors
### Chapter 10. Ordinals, Cardinals, and Transfinite Composition
#### 10.1. Ordinals and cardinals
#### 10.2. Transfinite composition
#### 10.3. Transfinite composition and lifting in model categories
#### 10.4. Small objects
#### 10.5. The small object argument
#### 10.6. Subcomplexes of relative I-cell complexes
#### 10.7. Cell complexes of topological spaces
#### 10.8. Compactness
#### 10.9. Effective monomorphisms
### Chapter 11. Cofibrantly Generated Model Categories
#### 11.1. Cofibrantly generated model categories
#### 11.2. Cofibrations in a cofibrantly generated model category
#### 11.3. Recognizing cofibrantly generated model categories
#### 11.4. Compactness
#### 11.5. Free cell complexes
#### 11.6. Diagrams in a cofibrantly generated model category
#### 11.7. Diagrams in a simplicial model category
#### 11.8. Overcategories and undercategories
#### 11.9. Extending diagrams
### Chapter 12. Cellular Model Categories
#### 12.1. Cellular model categories
#### 12.2. Subcomplexes in cellular model categories
#### 12.3. Compactness in cellular model categories
#### 12.4. Smallness in cellular model categories
#### 12.5. Bounding the size of cell complexes
### Chapter 13. Proper Model Categories
#### 13.1. Properness
#### 13.2. Properness and lifting
#### 13.3. Homotopy pullbacks and homotopy fiber squares
#### 13.4. Homotopy fibers
#### 13.5. Homotopy pushouts and homotopy cofiber squares
### Chapter 14. The Classifying Space of a Small Category
#### 14.1. The classifying space of a small category
#### 14.2. Cofinal functors
#### 14.3. Contractible classifying spaces
#### 14.4. Uniqueness of weak equivalences
#### 14.5. Categories of functors
#### 14.6. Cofibrant approximations and fibrant approximations
#### 14.7. Diagrams of undercategories and overcategories
#### 14.8. Free cell complexes of simplicial sets
### Chapter 15. The Reedy Model Category Structure
#### 15.1. Reedy categories
#### 15.2. Diagrams indexed by a Reedy category
#### 15.3. The Reedy model category structure
#### 15.4. Quillen functors
#### 15.5. Products of Reedy categories
#### 15.6. Reedy diagrams in a cofibrantly generated model category
#### 15.7. Reedy diagrams in a cellular model category
#### 15.8. Bisimplicial sets
#### 15.9. Cosimplicial simplicial sets
#### 15.10. Cofibrant constants and fibrant constants
#### 15.11. The realization of a bisimplicial set
### Chapter 16. Cosimplicial and Simplicial Resolutions
#### 16.1. Resolutions
#### 16.2. Quillen functors and resolutions
#### 16.3. Realizations
#### 16.4. Adjointness
#### 16.5. Homotopy lifting extension theorems
#### 16.6. Frames
#### 16.7. Reedy frames
### Chapter 17. Homotopy Function Complexes
#### 17.1. Left homotopy function complexes
#### 17.2. Right homotopy function complexes
#### 17.3. Two-sided homotopy function complexes
#### 17.4. Homotopy function complexes
#### 17.5. Functorial homotopy function complexes
#### 17.6. Homotopic maps of homotopy function complexes
#### 17.7. Homotopy classes of maps
#### 17.8. Homotopy orthogonal maps
#### 17.9. Sequential colimits
### Chapter 18. Homotopy Limits in Simplicial Model Categories
#### 18.1. Homotopy colimits and homotopy limits
#### 18.2. The homotopy limit of a diagram of spaces
#### 18.3. Coends and ends
#### 18.4. Consequences of adjoint ness
#### 18.5. Homotopy invariance
#### 18.6. Simplicial objects and cosimplicial objects
#### 18.7. The Bousfield-Kan map
#### 18.8. Diagrams of pointed or unpointed spaces
#### 18.9. Diagrams of simplicial sets
### Chapter 19. Homotopy Limits in General Model Categories
#### 19.1. Homotopy colimits and homotopy limits
#### 19.2. Coends and ends
#### 19.3. Consequences of adjoint ness
#### 19.4. Homotopy invariance
#### 19.5. Homotopy pullbacks and homotopy pushouts
#### 19.6. Homotopy cofinal functors
#### 19.7. The Reedy diagram homotopy lifting extension theorem
#### 19.8. Realizations and total objects
#### 19.9. Reedy cofibrant diagrams and Reedy fibrant diagrams
## Index
## Bibliography

category: reference