In logic and philosophy, S5 is one of five systems of modal logic proposed by Clarence Irving Lewis and Cooper Harold Langford in their 1932 book Symbolic Logic. It is a normal modal logic, and one of the oldest systems of modal logic of any kind. It is formed with propositional calculus formulas and tautologies, and inference apparatus with substitution and modus ponens, but extending the syntax with the modal operator necessarily
\Box
\Diamond
\Box
\Diamond
S5 is characterized by the axioms:
\Box(A\toB)\to(\BoxA\to\BoxB)
\BoxA\toA
and either:
\DiamondA\to\Box\DiamondA
\BoxA\to\Box\BoxA
A\to\Box\DiamondA
R
(wRv\landwRu)\impliesvRu
In terms of Kripke semantics, S5 is characterized by frames where the accessibility relation is an equivalence relation: it is reflexive, transitive, and symmetric.
Determining the satisfiability of an S5 formula is an NP-complete problem. The hardness proof is trivial, as S5 includes the propositional logic. Membership is proved by showing that any satisfiable formula has a Kripke model where the number of worlds is at most linear in the size of the formula.
S5 is useful because it avoids superfluous iteration of qualifiers of different kinds. For example, under S5, if X is necessarily, possibly, necessarily, possibly true, then X is possibly true. Unbolded qualifiers before the final "possibly" are pruned in S5. While this is useful for keeping propositions reasonably short, it also might appear counter-intuitive in that, under S5, if something is possibly necessary, then it is necessary.
Alvin Plantinga has argued that this feature of S5 is not, in fact, counter-intuitive. To justify, he reasons that if X is possibly necessary, it is necessary in at least one possible world; hence it is necessary in all possible worlds and thus is true in all possible worlds. Such reasoning underpins 'modal' formulations of the ontological argument.
\Diamond\dashv\Box
Leibniz proposed an ontological argument for the existence of God using this axiom. In his words, "If a necessary being is possible, it follows that it exists actually".
S5 is also the modal system for the metaphysics of saint Thomas Aquinas and in particular for the Five Ways.[5]
However, these applications require that each operator is in a serial arrangement of a single modality.[6] Under multimodal logic, e.g., "X is possibly (in epistemic modality, per one's data) necessary (in alethic modality)," it no longer follows that X being necessary in at least one epistemically possible world means it is necessary in all epistemically possible worlds. This aligns with the intuition that proposing a certain necessary entity does not mean it is real.