Modal logic

Modal logic, or (less commonly) intensional logic is the branch of logic that deals with sentences that are qualified by modalities such as can, could, might, may, must, possibly, and necessarily, and others. Any logical system making use of modal operators, such as possibly, or necessarily is thus also called a modal logic. Modal logics are characterized by semantic intensionality: nonmodal logics all have the feature that the truth value of a complex sentence is determined by the truth values of its subsentences. They are thus extensional. In modal logics, by contrast, this does not hold: both "George W. Bush is President of the United States" and "2 + 2 = 4" are true, yet "Necessarily, George W. Bush is President of the United States" is false, while "Necessarily, 2 + 2 = 4" is true.
A formal modal logic represents modalities using modal sentential operators. The basic set of modal operators are usually given to be <math>\Box<math> and <math>\Diamond<math>. In alethic modal logic (i.e. the logic of necessity and possibility) the <math>\Box<math> represents necessity and the <math>\Diamond<math> possibility. A sentence is said to be
 possible if it might be true (whether it is actually true or actually false);
 necessary if it could not possibly be false;
 contingent if it is not necessarily true, i.e., is possibly true, and possibly false. A contingent truth is one which is actually true, but which could have been otherwise.
Contents 
Metaphysical and other modalities
Subjunctive, epistemic
Modal logic is most often used for talk of the socalled subjunctive modalities: "it is necessarily the case that..." or "it is possibly the case that...." These (which include metaphysical modalities and logical modalities) are most easily confused with epistemic modalities (from the Greek episteme, knowledge): "It is certainly true that..." and "It may (given the available information) be true that..." In ordinary speech both modalities are often expressed with the same words; the following contrasts may help:
A person, Jones, might reasonably say both (1) No, it's not possible that Bigfoot exists; I'm quite certain of that; and (2) sure, Bigfoot possibly could exist. What Jones means by (1) is that given all the available information, there is no question remaining as to whether Bigfoot exists. This is an epistemic claim. By (2) he means that things might have been otherwise. He does not mean "it's possible that Bigfoot existsfor all I know." (So he is not contradicting (1).) Rather, he is making the metaphysical claim that it's possible for Bigfoot to exist, even though he doesn't.
From the other direction, Jones might say (3) it's possible that Goldbach's conjecture is true, but also possible that it is false, and also (4) if it is true, then it is necessarily true, and not possibly false. Here Jones means that it is epistemically possible that it is true or false, for all he knows (Goldbach's conjecture has not been proven either true or false). But if there *is* a proof (heretofore undiscovered), then that would show that it is not logically possible for Goldbach's conjecture to be false—there could be no set of numbers that violated it. Logical possibility is a form of subjunctive possibility; (4) makes a claim about whether it is possible for a mathematical truth to have been false, but (3) only makes a claim about whether it is possible that the mathematical claim turns out false, for all Jones knows, and so again Jones does not contradict himself.
Epistemic possibilities also bear on the actual world in a way that metaphysical possibilities do not. Metaphysical possibilities bear on ways the world might have been, but epistemic possibilities bear on the way the world may be (for all we know). Suppose, for example, that I want to know whether or not to take an umbrella before I leave. If you tell me "It's possible that it is raining outside"in the sense of epistemic possibilitythen that would weigh on whether or not I take the umbrella. But if you just tell me that "It's possible for it to rain outside"in the sense of metaphysical possibilitythen I am no better off for this bit of modal enlightenment.
The vast bulk of philosophical literature on modalities concerns subjunctive rather than epistemic modalities. (Indeed, most of it concerns the broadest sort of subjunctive modalitythat is, bare logical possibility). This is not to say that subjunctive possibilities are more important to our everyday life than epistemic possibilities (consider the example of deciding whether or not to take an umbrella). It's just to say that the priorities in philosophical investigations have not been set by importance to everyday life.
Deontic, temporal
There are several analogous modes of speech, which though less likely to be confused with alethic modalities are still closely related. One is talk of time. It seems reasonable to say that possibly it will rain tomorrow, and possibly it won't; on the other hand, if it rained yesterday, if it really already did so, then it cannot be quite correct to say "It may not have rained yesterday." It seems the past is "fixed," or necessary, in a way the future is not. Many philosophers and logicians think this reasoning is not very good; but the fact remains that we often talk this way and it is good to have a logic to capture its structure. Likewise talk of morality, or of obligation and norms generally, seems to have a modal structure. The difference between "You must do this" and "You may do this" looks a lot like the difference between "This is necessary and this is possible." Such logics are called deontic, from the Greek for "duty".
Significantly, modal logics can be developed to accommodate most of these idioms; it is the fact of their common logical structure (the use of "intensional" or nontruthfunctional sentential operators) that make them all varieties of the same thing. Epistemic logic is (arguably) best captured in the system "S4" ; deontic logic in the system "D", temporal logic in "t" (sic:lowercase) and alethic logic with "S5".
The interpretation of modal logic
In the most common interpretation of modal logic, one considers "all logically possible worlds". If a statement is true in all possible worlds, then it is a necessary truth. If a statement happens to be true in our world, but is not true in all possible worlds, then it is a contingent truth. A statement that is true in some possible world (not necessarily our own) is called a possible truth.
Whether this "possible worlds idiom" is the best way to interpret modal logic, and how literally this idiom can be taken, is a live issue for metaphysicians. For example, the possible worlds idiom would translate the claim about Bigfoot as "There is some possible world in which Bigfoot exists". To maintain that Bigfoot's existence is possible, but not actual, one could say, "There is some possible world in which Bigfoot exists; but in the actual world, Bigfoot does not exist". But it is unclear what it is that making modal claims commits us to. Are we really alleging the existence of possible worlds, every bit as real as our actual world, just not actual? David Lewis infamously bit the bullet and said yes, possible worlds are as real as our own. This position is called "modal realism". Unsurprisingly, most philosophers are unwilling to sign on to this particular doctrine, seeking alternate ways to paraphrase away the apparent ontological commitments implied by our modal claims.
Formal rules
The concepts of necessity and possibility satisfy the following de Morganesque relationship:
 "It is not necessary that X" is equivalent to "It is possible that not X.
 "It is not possible that X" is equivalent to "It is necessary that not X.
Modal logic adds to the well formed formulae of propositional logic operators for necessity and possibility. In some notations "necessarily p" is represented using a "box" ( <math>\Box p <math>), and "possibly p" is represented using a "diamond" (<math>\Diamond p<math>). Whatever the notation, the two operators are definable in terms of each other:
 <math>\Box p<math> (necessarily p) is equivalent to <math>\neg \Diamond \neg p <math> (not possible that notp)
 <math> \Diamond p <math> (possibly p) is equivalent to <math> \neg \Box \neg p <math> (not necessarily notp)
Hence, the <math>\Box<math> and <math>\Diamond<math> are called dual operators.
Precisely what axioms must be added to propositional logic to create a usable system of modal logic has been the subject of much debate. One weak system, named K after Saul Kripke, adds only the following to a classical axiomatization of propositional logic:
 Necessitation Rule: If p is a theorem of K, then so is <math>\Box p<math>.
 Distribution Axiom: If <math> \Box (p \rightarrow q)<math> then <math> (\Box p \rightarrow \Box q) <math> (this is also known as axiom K)
These rules lack an axiom to go from the necessity of p to p actually being the case, and therefore are usually supplemented with the following "reflexivity" axiom, which yields a system often called T.
 <math> \Box p \rightarrow p <math> (If it's necessary that p, then p is the case)
K is a weak modal logic, however. In particular, it leaves it open that a proposition be necessary but only contingently necessary. That is, it is not a theorem of K that if <math> \Box p <math> is true then <math> \Box \Box p <math> is true, i.e., that necessary truths are necessarily necessary. This may not be a great defect for K, since these seem like awfully strange questions and any attempt to answer them involves us in confusing issues. In any case, different solutions to questions such as these produce different systems of modal logic.
The system most commonly used today is modal logic S5, which robustly answers the questions by adding axioms which make all modal truths necessary: for example, if it's possible that p, then it's necessarily possible that p, and if it's necessary that p it's also necessary that it's necessary. This has been thought by many to be justified on the grounds that it is the system which is obtained when we demand that every possible world is possible relative to every other world. Nevertheless, other systems of modal logic have been formulated, in part, because S5 may not be a good fit for every kind of metaphysical modality of interest to us. (And if so, that may mean that possible worlds talk is not a good fit for these kinds of modality either.)
Development of the field of modal logic
Although Aristotle's logic is almost entirely concerned with the theory of the categorical syllogism, his work also contains some extended arguments on points of modal logic (such as his famous SeaBattle Argument in De Interpretatione § 9) and their connection with potentialities and with time. Following on his works, the Scholastics developed the groundwork for a rigorous theory of modal logic, mostly within the context of commentary on the logic of statements about essence and accident. Among the medieval writers, some of the most important works on modal logic can be found in the works of William of Ockham and John Duns Scotus.
The contemporary logical analysis of modality can be traced to C. I. Lewis's "A Survey of Symbolic Logic" (1918), in which he developed the logical systems S1S5. J. C. C. McKinsey used algebraic methods (Boolean algebras with operators) to prove the decidability of Lewis' S2 and S4 in 1941. Saul Kripke developed the relational semantics for modal logics (1959, 1963). Vaughan Pratt introduced dynamic logic in 1976. Amir Pnueli proposed the use of temporal logic to formalise the behaviour of continually operating concurrent programs in 1977.
Temporal logic is closely related to modal logic, as adding modal operators [F] and [P], meaning, respectively, henceforth and hitherto, leads to a system of temporal logic.
Flavours of modal logics include: propositional dynamic logic (PDL), propositional linear temporal logic (PLTL), linear temporal logic (LTL), computational tree logic (CTL), HennessyMilner logic, S1S5, and T.
References
 Robert Goldblatt, "Logics of Time and Computation", CSLI Lecture Notes No. 7, Centre for the Study of Language and Information, Stanford University, Second Edition, 1992, (distributed by University of Chicago Press).
 Robert Goldblatt, "Mathematics of Modality", CSLI Lecture Notes No. 43, Centre for the Study of Language and Information, Stanford University, 1993, (distributed by University of Chicago Press).
 G.E. Hughes and M.J. Cresswell, "An Introduction to Modal Logic", Methuen, 1968.
 E.J. Lemmon (with Dana Scott), "An Introduction to Modal Logic", American Philosophical Quarterly Monograpph Series, no. 11 (ed. by Krister Segerberg), Basil Blackwell, Oxford, 1977.
See also
 De dicto and de re
 Hybrid logic
 Interior algebra
 Interpretability logic
 Provability logic
 Kripke semantics
External links
 Stanford Encyclopedia of Philosophy entry (http://plato.stanford.edu/entries/logicmodal/)
 A discussion of modal logic (http://wwwformal.stanford.edu/jmc/mcchay69/node22.html) by John McCarthy
 Peter Suber's Bibliography of NonStandard Logics (http://www.earlham.edu/~peters/courses/logsys/nonstbib.htm)
 http://turing.wins.uva.nl/~mdr/AiML/  Advances in Modal Logic
This article contains some material originally from the Free Online Dictionary of Computing which is used with permission under the GFDL.de:Modallogik fr:Logique modale nl:Modale logica ja:様相論理学