nLab S5 modal logic



(0,1)(0,1)-Category theory

Type theory

natural deduction metalanguage, practical foundations

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

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

syntax object language

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

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

homotopy levels





In modal logic the moniker “S5” refers to the logic obtained from S4 modal logic by adjoining the axiom scheme that there is the implication

pp. \lozenge p \to \Box \lozenge p \,.

In the possible worlds semantics for modal logic, S5 corresponds precisely to those Kripke frames (W:Set,R:W×WProp)\big(W \colon Set, \, R \colon W \times W \to Prop\big) where the relation RR is an equivalence relation [Kripke (1959) (1964), cf. Fagin, Halpern, Moses & Vardi (1995) Thm. 3.1.5 (c)].

Via dependent type theory

In mild generalization of the discussion at necessity & possibility – Via dependent types, we may observe that the modal operators in S5 Kripke semantics

(Here we are writing — following notation for subtypesP:WPropP \,\colon\,W \to Prop for a WW-dependent proposition, equivalently a proposition about the elements of WW, equivalently the subset of WW where the proposition holds.)

are precisely those arising as adjoint pairs of (co)monads induced on the left from a base change adjoint triple (the categorical semantics in Set of dependent pair type \dashv context extension \dashv dependent function type-formation) along display maps WΓW /RW \to \Gamma \equiv W_{/R} identified with the quotient coprojection of the Kripke frame:

(Obvious as this may be, the only existing reflection of this fact in the literature may be a side remark in Awodey 2006, p. 279, albeit not relating to dependent type formation.)


This suggests that one may equivalently regard dependent type theory as a universal form of epistemic modal type theory, in generalization of how modal logics may be viewed as just another perspective on (fragments of) first-order logic (as in Blackburn, van Benthem & Wolter (2007) pp. xiii): In both cases one switches perspective from type formation by base change adjoint triples (of quantification or dependent (co)product formation, respectively) to the induced adjoint pair of (co)monads. (Another example of a change in perspective of this form occurs when describing descent as monadic descent).


The above (co)monadic formulation of modal logic makes manifest another basic point not usually discussed in the subject, namely that the canonical epistemic entailments

are natural transformations.

This means that the following squares commute. Their pasting to the hexagonal commuting diagram as shown may not have received attention (?):

type of modal logicrelation in its Kripke frames
K modal logicany relation
K4 modal logic?transitive relation
T modal logicreflexive relation
B modal logic?symmetric relation
S4 modal logicreflexive & transitive relation
S5 modal logicequivalence relation

(following BdRV (2001) Table 4.1; cf. Fagin, Halpern, Moses & Vardi (1995) Thm. 3.1.5)



The terminology “S5” in modal logic originates with:

The geometric model for S5 modal logic via Kripke frames originates with:

See also:

A natural deduction-formulation and making explicit the modal operator as a comonad:

Understanding of S5 Kripke semantics as base change along the lines discussed at necessity and possibility – via dependent types:

S5 modal logic as epistemic logic

Discussion of S5 modal logic as epistemic logic:

[[Ditmarsch, Hoek & Kooi (2008):]] “in Aumann’s survey paper on interactive epistemology the reader will immediately recognise the system S5.”

p. 35: “in a precise sense the S5 properties completely characterize our definition of knowledge”

pp. 121: “What standard logics of knowledge capture is not actual knowledge, but potential knowledge — what one is entitled to know. The switch to potential knowledge means we drop all considerations of complexity [...][...] It is easy to see that, under such an assumption, a knowledge modality should be a normal modal operator. But, what else should be required? [...][...] All these together make a knowledge operator obey the S5 conditions.”

p. 198: “Modal epistemic logic, the logic of knowledge, provides a very natural interpretation to the accessibility relation in Kripke models. For an agent ii, two worlds ww and vv are connected (written R iwvR_i w v), if the agent cannot (epistemically) distinguish them. In other words, we have R ivwR_i v w if, according to ii’s information at ww, the world might as well be in state vv, or that vv is compatible with i’s information at w. Using this interpretation of access, R iR_i is obviously an equivalence relation. [...][...] Thus, we are in the realm of the multi-modal logic S5 mS5_m.”

p. 11: “The logical system S5 is by far the most popular and accepted epistemic logic”

  • Dov Samet, S5 knowledge without partitions, Synthese 172 (2010) 145–155 [[doi:10.1007/s11229-009-9469-0]]

  • Meghyn Bienvenu, Hélène Fargier, Pierre Marquis, Knowledge Compilation in the Modal Logic S5, Proceedings of the AAAI Conference on Artificial Intelligence 24 1 (2010) [[doi:10.1609/aaai.v24i1.7587, pdf]]

    p. 1: “Propositional epistemic logic S5 is a well-known modal logic which is suitable for representing and reasoning about the knowledge of a single agent”

  • Rasmus Rendsvig, John Symons, Epistemic Logic, The Stanford Encyclopedia of Philosophy (2011) [[web]]

Fagin, Halpern, Moses, and Vardi (1995) and many others use S5 for knowledge”

  • Rachel Boddy, Epistemic Issues and Group Knowledge, Amsterdam (2014) [[pdf]]

p. 13: “Formal approaches to epistemology – such as game theory and computer science – typically assume the S5 conditions for knowledge, which is (partly) explained by the convenient formal properties of the logic. Philosophers typically opt for a weaker notion. Hintikka (1962), for instance, argues that the proper logic for knowledge is the modal system S4”

  • Yakoub Salhi and Michael Sioutis, A Resolution Method for Modal Logic S5, EPiC Series in Computer Science 36 (2015) 252–262 [[pdf]]

  • Ronald de Haan, Iris van de Pol, On the Computational Complexity of Model Checking for Dynamic Epistemic Logic with S5 Models [[arXiv:1805.09880]]

Last revised on August 3, 2023 at 19:08:23. See the history of this page for a list of all contributions to it.