11: Modal Logic
( \newcommand{\kernel}{\mathrm{null}\,}\)
Table of contents
Part 10: Modal Logic
Why Modal Logic Matters
Up to now, our logical statements have been either true or false in an absolute sense. But often, we want to reason about possibilities and necessities rather than concrete truth. For example: - "It is possible that it will rain tomorrow."
- "Given the rules of the game, it's necessary that one team wins."
Modal logic extends classical logic by introducing modalities – concepts like necessity and possibility (and others like obligation, knowledge, time, etc., in various branches). Modal logic allows us to talk not just about what is true, but about what could be true or must be true under certain conditions.
Modal Operators: Necessity (□) and Possibility (◇)
Modal logic introduces two new operators (we'll use the common symbols from modal logic):
(Necessarily):◻ means "◻p is necessarily true." In other words, in every relevant scenario or world,p holds. We sometimes readp as "it must be that◻p ."p (Possibly):◊ means "◊p is possibly true." In other words, in at least one possible scenario,p holds. Think ofp as "it's not ruled out that◊p ," or "there is a chance/option thatp ."p
These operators are inter-definable by negation:
-
-
Everyday Interpretations
-
: "p is true in all cases" or "p is true no matter what."◻p
Example: " " is true (mathematically, 2+2=4 is necessarily true; there's no scenario where it's false).◻(2+2=4)
" " – this is false, because we can imagine scenarios (times of day, other planets, etc.) where the sky is not blue.◻(the sky is blue) -
: "p might be true" or "it's possible that p."◊p
Example: " " – true (assuming it's not utterly impossible by some magic; there's a chance of rain).◊(it will rain tomorrow)
" " – false (there's no possible world in classical arithmetic where 2+2 equals 5).◊(2+2=5)
Combining Modal Operators with Logic
Modal operators work like an added layer on top of propositional logic. We can nest them or combine with connectives:
: "It is necessarily the case that◻p∧◊q is true, and it is possibly the case thatp is true."q : "It is necessarily true that if◻(p→q) thenp ." (In every possible world, ifq thenp holds.)q : "Possibly, both◊(p∧q) andp are true at the same time."q
We interpret these by imagining different scenarios (possible worlds) and the modal must hold across those worlds as specified.
Reasoning Patterns in Modal Logic
There are some common intuitions: - If
Examples of Modal Reasoning
-
Physical Necessity: "It is necessary, given the laws of physics, that nothing can travel faster than light."
We might formalize: relative to worlds with the same physical laws.◻(no object travels faster than light) - Logical Necessity vs Physical: "Necessarily 2+2=4" (logical/mathematical necessity, true in all conceivable worlds) versus "Necessarily, the sun rises in the east" (this might be physically necessary if laws of nature are fixed, but one could imagine a different planet or axis flip — so maybe not absolutely necessary).
-
Possibility: "It’s possible I will win the lottery."
is true (assuming I bought a ticket).◊(I win lottery)
"It's possible cats can talk" might be false under our understanding of biology (or we consider a very different possible world? If we allow a far-fetched scenario, maybe it's logically possible, just not physically in our world).◊(cats talk) - Epistemic Modal (knowledge): Sometimes
and◻ are interpreted as "I know for sure" vs "for all I know, maybe". For example, "For all I know, it’s possible that the lights are still on at home" would be◊ in an epistemic sense. However, to avoid confusion, we’ll stick with the basic necessity/possibility interpretation.◊(lights on)
Real-World Applications of Modal Logic
- Philosophy: Modal logic was originally developed for philosophical reasoning (like necessity in metaphysics, possibility in counterfactuals, etc.). Also used in analyzing philosophical arguments (like modal versions of proofs or the famous "modal ontological argument" for God's existence, which uses the idea of necessary existence).
- Computer Science:
- Temporal Logic (a form of modal logic) is used in program verification and hardware design: one can assert things like "necessarily (if request then eventually grant)" meaning in all future execution paths, whenever a request happens, eventually a grant follows.
- Modal logics of knowledge and belief (epistemic logic) model what different agents know or believe in distributed systems or game theory.
- Law and Ethics (Deontic Logic): There's a branch of modal logic for obligations and permissions. For example,
might mean "it is obligatory that p (p must be done)" and◻p meaning "it is permitted that p (p is allowed)". This is useful in formalizing rules and checking for conflicts (like ensuring something is not both obligatory and forbidden).◊p - Planning and AI: Reasoning about what could possibly happen vs what must happen can be captured in modal frameworks, especially in AI planning algorithms or exploring alternate scenarios.
A Taste of Modal Reasoning Structure
Modal logic often involves additional "axioms" depending on what kind of modality you're modeling. For instance: - T axiom:
These axioms define different systems of modal logic (S5, S4, etc.). For example, in an epistemic context,
We won't go deep into these, but it's good to be aware that modal logic has different flavors depending on which axioms (constraints on the possible worlds relations) you assume.
Common Misconceptions
-
"Possibly p means p is true at least sometimes (in time)."
Reality: "Possibly" in modal logic doesn't necessarily mean sometimes in time (that's temporal logic). It means in some conceivable scenario or under some assumption. So if I say "It’s possible it’s raining," I don't mean timewise, I mean there is a scenario consistent with what I know (or consistent with physical laws, etc.) where it's raining. -
"Necessarily p means p is true no matter what, so p is just a tautology."
Reality: being true means given the modality in question (logical necessity, physical necessity, etc.),◻p holds in all those worlds. If we're talking logical necessity, yes thenp means◻p is a tautology in propositional logic sense. But if we're talking physical necessity,p might not be a logical tautology, just a law-of-nature truth.◻p - Mixing scopes: People sometimes confuse
with◻(p∧q) (the latter implies the former, but the former doesn't necessarily imply the latter unless some frame conditions hold). Generally,◻p∧◻q distributes over◻ (since∧ is valid), but◻(p∧q)→(◻p∧◻q) does not distribute over◊ similarly (actually∨ is valid distribution for possibility over or). The logic rules can be tricky.◊(p∨q)≡◊p∨◊q -
"Possible means we have no information."
Reality: In some contexts, can mean "for all we know, p could be true." But in strictly logical modal terms, it means "there is some accessible world (scenario) where p is true." It's not just ignorance, it's about whether a scenario exists or not under the modality's rules.◊p
Exercises
10.1. Using modal operators, symbolize the statement: "It is possible that John will be late to the meeting." (Let
10.2. Symbolize: "It is necessary that if the alarm is set then it will ring when triggered." (Let
10.3. Consider the statement:
10.4. Does
10.5. If
10.6. Provide an example of a statement that is: - true, but not necessarily true (so
- false, but possibly true (so
(For instance, think of a factual statement about the world that is true but we can imagine a scenario where it's false, and vice versa.)
10.7. Translate into modal logic: "After studying the evidence, the detective concluded that the murderer must have entered through the window." (Hint: interpret "must have" as necessity relative to the detective's knowledge or the scenario. Let
10.8. Consider a simple game where either one player wins or the other. Express the rule "Necessarily, either Player1 wins or Player2 wins" in modal logic (let
10.9. (Challenge/Thinking) If
10.10. Suppose we have
Congratulations on wading into the waters of modal logic! This is a more advanced topic, and we've only scratched the surface. Modal logic opens doors to many specialized systems (temporal, deontic, epistemic, etc.) each with their own interpretations of