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):
-
\(\Box\) (Necessarily): \(\Box p\) means "\(p\) is necessarily true." In other words, in every relevant scenario or world, \(p\) holds. We sometimes read \(\Box p\) as "it must be that \(p\)."
-
\(\Diamond\) (Possibly): \(\Diamond p\) means "\(p\) is possibly true." In other words, in at least one possible scenario, \(p\) holds. Think of \(\Diamond p\) as "it's not ruled out that \(p\)," or "there is a chance/option that \(p\)."
These operators are inter-definable by negation:
- \(\Box p\) is logically equivalent to \(\neg \Diamond \neg p\) (if \(p\) is necessary, then it's impossible for \(p\) to be false).
- \(\Diamond p\) is equivalent to \(\neg \Box \neg p\) (if \(p\) is possible, then it's not necessary that \(p\) is false).
Everyday Interpretations
-
\(\Box p\): "p is true in all cases" or "p is true no matter what."
Example: "\(\Box (2+2=4)\)" is true (mathematically, 2+2=4 is necessarily true; there's no scenario where it's false).
"\(\Box (\text{the sky is blue})\)" – this is false, because we can imagine scenarios (times of day, other planets, etc.) where the sky is not blue. -
\(\Diamond p\): "p might be true" or "it's possible that p."
Example: "\(\Diamond (\text{it will rain tomorrow})\)" – true (assuming it's not utterly impossible by some magic; there's a chance of rain).
"\(\Diamond (\text{2+2=5})\)" – false (there's no possible world in classical arithmetic where 2+2 equals 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:
-
\(\Box p \land \Diamond q\): "It is necessarily the case that \(p\) is true, and it is possibly the case that \(q\) is true."
-
\(\Box(p \to q)\): "It is necessarily true that if \(p\) then \(q\)." (In every possible world, if \(p\) then \(q\) holds.)
-
\(\Diamond (p \land q)\): "Possibly, both \(p\) and \(q\) are true at the same time."
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 \(\Box p\) is true, then \(p\) is true (because if \(p\) is true in all worlds, in particular it's true in the actual world). Formally, \(\Box p \to p\). This property is often assumed in modal logic systems (known as the T axiom). - If \(p \to q\) is necessary, and \(p\) is necessary, then \(q\) is necessary. (If in every world \(p \to q\), and in every world \(p\), then in every world \(q\).) Formally, \((\Box(p \to q) \land \Box p) \to \Box q\). - \(\Diamond p\) does not imply \(p\) (just because something is possible doesn't mean it's actually true). And \(p\) does not imply \(\Box p\) (just because it's true here doesn't mean it's necessarily always true).
Examples of Modal Reasoning
-
Physical Necessity: "It is necessary, given the laws of physics, that nothing can travel faster than light."
We might formalize: \(\Box (\text{no object travels faster than light})\) relative to worlds with the same physical laws. -
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." \(\Diamond (\text{I win lottery})\) is true (assuming I bought a ticket).
"It's possible cats can talk" \(\Diamond (\text{cats 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). -
Epistemic Modal (knowledge): Sometimes \(\Box\) and \(\Diamond\) 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 \(\Diamond (\text{lights on})\) in an epistemic sense. However, to avoid confusion, we’ll stick with the basic necessity/possibility interpretation.
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, \(\Box p\) might mean "it is obligatory that p (p must be done)" and \(\Diamond 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).
-
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: \(\Box p \to p\) (if p is necessary, then p is true). Assumes our actual world is one of the possible worlds and follows the modal truth. This is usually assumed for most modalities like knowledge, physical necessity, etc. - 4 axiom: \(\Box p \to \Box \Box p\) (if p is necessary, then it's necessary that it's necessary). This can be intuitive for some notions (if something must be true, it must be unavoidably true that it must be true...). - 5 axiom: \(\Diamond p \to \Box \Diamond p\) (if p is possible, then it is necessarily possible — no new info will rule it out in other worlds).
These axioms define different systems of modal logic (S5, S4, etc.). For example, in an epistemic context, \(\Box p\) might mean "I know p". Then \(\Box p \to p\) means "if I know p, then p is true" (a reasonable axiom: I can't know something that's false — at least in the normal definition of knowledge). Another axiom might be \(\Box p \to \Box \Box p\) meaning "if I know p, then I know that I know p" (which might be debatable for human knowledge, but in idealized logic systems often assumed).
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: \(\Box p\) 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 then \(\Box p\) means \(p\) is a tautology in propositional logic sense. But if we're talking physical necessity, \(\Box p\) might not be a logical tautology, just a law-of-nature truth. -
Mixing scopes: People sometimes confuse \(\Box(p \land q)\) with \(\Box p \land \Box q\) (the latter implies the former, but the former doesn't necessarily imply the latter unless some frame conditions hold). Generally, \(\Box\) distributes over \(\land\) (since \(\Box(p \land q) \to (\Box p \land \Box q)\) is valid), but \(\Diamond\) does not distribute over \(\lor\) similarly (actually \(\Diamond(p \lor q) \equiv \Diamond p \lor \Diamond q\) is valid distribution for possibility over or). The logic rules can be tricky.
-
"Possible means we have no information."
Reality: In some contexts, \(\Diamond p\) 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.
Exercises
10.1. Using modal operators, symbolize the statement: "It is possible that John will be late to the meeting." (Let \(L\) = "John is late to the meeting".)
10.2. Symbolize: "It is necessary that if the alarm is set then it will ring when triggered." (Let \(A\) = "the alarm is set", \(R\) = "the alarm rings when triggered". Hint: you want \(\Box(...)\) of an implication.)
10.3. Consider the statement: \(\Diamond (p \land q)\). In plain English, what does this mean? Provide a scenario (context) where such a statement might be used and make sense (you can make \(p\) and \(q\) represent simple conditions).
10.4. Does \(\Diamond p \to p\) hold in general? If not, give a counterexample in plain terms (a situation where "possibly p" is true but p is false). What about the converse \(p \to \Diamond p\)?
10.5. If \(\Box p\) is true, must \(\Diamond p\) also be true? If \(\Diamond p\) is true, must \(\Box p\) be true? Explain in words.
10.6. Provide an example of a statement that is:
- true, but not necessarily true (so \(p\) is true but \(\neg \Box p\) is also true).
- false, but possibly true (so \(p\) is false but \(\Diamond p\) is true).
(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 \(E\) = "the murderer entered through the window".)
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 \(W_1\) = "Player1 wins", \(W_2\) = "Player2 wins"). Does this imply that it's not possible for the game to tie? Explain.
10.9. (Challenge/Thinking) If \(\Box p\) is true in our actual world, then \(p\) is true in all possible worlds (including this one). Does it follow that \(\Box p \to p\) is a tautology of modal logic (always true no matter what \(p\) is)? Explain. (This relates to the axiom T in modal logic.)
10.10. Suppose we have \(\Box(p \to q)\) and we also know \(\Diamond p\). Can we infer \(\Diamond q\)? Explain intuitively and confirm with the idea of possible worlds. (Hint: if in every world \(p \to q\) holds, and there's some world where \(p\) holds, in that same world \(q\) should hold, hence it's possible \(q\).)
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 \(\Box\) and \(\Diamond\). But the fundamental idea is always to reason about what must be true versus what might be true.