# Basics: Modal Logic

I’ve received a request from a long-time reader to write a basics post on modal logics. In particular, what is a modal logic, and why did Gödel believe that a proof for the existence of God was more compelling in modal logic than in standard predicate logic.

The first part is the easy one. Modal logics are logics that assign values to statements that go beyond “This statement is true” or “This statement is false”. Modal logics add the concepts of possibility and necessity. Modal logic allows statements like “It is necessary for X to be true”, “It is possible for X to be true”, etc.

The classic presentation of modal logic is basically to take first order predicate logic, and add two modal operators to it:

1. Necessity: “□P” means It is necessary that P be true.
2. Possibility: “◊P” means It is possible that P is true.

Possibility and necessity are, naturally, related by negation: ¬◊P⇔□¬P (P is not possible if and only if it’s necessary that P is not true), and □P⇔¬◊¬P. (P is not necessary if and only if it’s possible that P is not true.)

Going the modal route allows you to incorporate contingent reasoning into an inference process in a very nice way. You can make statements like “If it’s possible that Jane murdered Joe, then it’s necessary to make sure that Jane doesn’t get left alone with other potential victims”. Statements like that are quite easy in a modal logic (◊Murdered(Joe,Jane) ⇒ ∀x:◊Victim(x): □¬LeaveAlone(Jane,x)).

In math circles, the term “modal logic” has also been expanded to include a range of logics that do similar things: things like temporal logics (which add “X is true sometimes”, “X must always be true”, “X can never be true”, “X can be true after Y happens”, etc) are often called modal logics. Intuitionistic logic is also sometimes incorrectly referred to as a modal logic. (Intuitionistic logic still assigns strict truth values to statements; but it also includes the ability to have statements whose truth value is unknown.)

The second half of the question is much harder: Why did Gödel find a modal proof to be compelling? The honest answer to that is: I don’t know. My suspicion is that the idea that you could prove that it’s necessary for God to exist meant something to him. Even as a religious person, I don’t find the modal proof any more compelling than the non-modal one: at it’s core, it’s really the same old silly argument that in order for human beings to have an idea of truth and beauty, there must be some source of that concept, and that the only possible source of it is some being which is the embodiment of all things good, which must be God.

But Gödel was, sadly, quite seriously mentally ill: he was depressed, paranoid, and extremely obsessive. In the end, he starved himself to death because when his wife became ill and was hospitalized, he refused to eat, because he didn’t trust anyone else – including himself – to prepare food that wasn’t poisoned. Throughout his life, one of his great obsessions was the idea that there was more to the world than just what we can see; he was desperate to find some kind
of meaning, something that showed we were more that just automatons – but he never found anything
compelling in any of the organized religions – almost every “real world” construct built by human beings fell under the umbrella of his paranoia, and ended being viewed by him as another effort to poison either his body or his mind. The modal proof of God was, perhaps, his answer: an answer in the pureness of mathematics, which he could, in his own mind, verify was untainted by the poison of human hands.

## 0 thoughts on “Basics: Modal Logic”

1. Mustafa Mond, FCD

The second half of the question is much harder: Why did Gödel find a modal proof to be compelling?

Maybe it’s for the same reason that people trust the accuracy of a clock more if it’s digital rather than analog.

2. Ashley Yakeley

“Necessary” and “possible” are not a particularly helpful way of illustrating modal logic, since the difference between “P is true” and “P is necessarily true” is not very intuitive.
Much better is □P as “I (or you) believe P”. Then the difference is clear, and the various optional axioms of modal logic make sense. For instance, if one is infallible, then axiom T holds. If one knows all one’s beliefs, then axiom 4 holds. If one is consistent, then axiom D holds.
There is, of course, a Haskell angle for □ under Curry-Howard, where it would correspond to a type-constructor. It is not a Functor, but since provability is a modal logic, □T can be used to represent compiled code that evaluates to something of type T. Here axiom K represents your ability to apply one compiled program to another to create a new compiled program, while axiom T is the ability to run your program.

3. Brandon

at it’s core, it’s really the same old silly argument that in order for human beings to have an idea of truth and beauty, there must be some source of that concept, and that the only possible source of it is some being which is the embodiment of all things good, which must be God.
Strictly speaking, no ontological argument involves an inference to the source of the concepts; rather, the various kinds are arguments that a contradiction can be derived from the statement “God does not exist”. Godel, by the way, is not the first logician to be impressed by the argument he gives; his version of the argument is a slightly revised and tightened version of Leibniz’s. It’s possible that some of the same traits that make a good logician can also (in particular cases) create a temptation to think that if you just manage to be brilliantly insightful enough you can pull everything out of pure reasoning.
It’s also worth pointing out that it doesn’t take much to think an ontological argument works, because they are usually well-constructed and valid. It’s usually just one concept in the argument (simple perfections in Leibniz’s, positive attributes in Godel’s) that turns out to be murky, and in ways very relevant to the truth of the premises. So all that you really have to do to mislead yourself into thinking it works is to convince yourself that you have a clear understanding of that concept, which is sometimes easy to do. (There is a very famous story Bertrand Russell tells about himself, in which he was taking a walk one day in 1894, suddenly stopped, threw what he was holding in the air, and said something like, “Great Scott, the ontological argument is sound!” For a moment he thought he saw that it was obviously true, that it had to be sound, on pain of contradiction. But later he couldn’t figure out what had come to him that made it seem so obvious.)

4. Mark C. Chu-Carroll

Brandon:

Strictly speaking, no ontological argument involves an inference to the source of the concepts; rather, the various kinds are arguments that a contradiction can be derived from the statement “God does not exist”

To me, that’s just a nitpick. If we’re talking informally, saying that “A proof doesn’t infer the existence of X, it just proves that the non-existence of X creates contradictions” is a distinction without a difference. Clearly Gödel, Leibniz, and the various others who bought into the kind of argument did believe that they were proving the existince of god.
I still don’t understand just what’s so compelling about this proof. To me, it’s always been obvious that the premises necessarily include the fundamental assumption of the existence of God. In Gödel’s proof, his whole idea of fundamentally and intrinsically positive traits clearly includes the idea of some external entity that defines that sense of intrinsic positivity. So it all collapses down to “If I assume the existence of God (described in *this* way), then I can infer the existence of God (described in this *other* way).” Yipee.
That’s why I’m personally convinced that his acceptance of this proof was a product of his mental illness – because so much of the rest of his work was such careful and meticulous analysis of logic, and math, and other peoples theories to find every weak point, every corner where something could fail – I just cannot believe that in his right mind, he could have not seen the essentially circularity of that proof.

5. Jon L

It’s strange that godel would be convinced someone was trying to poison him for no reason since you would expect a logician to be, well, logical.
Then again, I suppose there is no way to prove everyone was not trying to poison him.
Anyway, as for Modal logic, the only other logic other than predicate logic I had learned of was Fuzzy logic which to my understanding assigned a probability to the truth of statements. I assume Modal logic (and intuitionistic logic) don’t assign a specific probability to there statements of possibility/uncertainty?

6. Brian Shapiro

Goedels work can lead one to a metamathmatical understanding that Math is not derived from logic but from experience (just like all other sciences). The existence of God is not derivable from logic.

7. Doug Henning

An interestingly ludicrous proof by Alvin Plantinga states as follows: (n.b. he uses axiom S5 of modal logic, namely: if p is possibly necessary then p is necessary = if p is possible then it is necessarily possible)
Def1. We define a being in a possible world W to be maximally excellent if and only if it is omnipotent, omniscient, and perfectly good within W
Def2. We define a maximally great being to be one that has maximal excellence in every possible world.
Premiss1. It is possible that there exists a being with maximal greatness.
2. Therefore possibly it is necessarily true that a maximally great being exists in all W.
3. (by S5) Therefore it is necessarily true that a maximally great being exists in all W.
4. Therefore a maximally great being exists.
It is then claimed that the existence of a god (read maximally great being) is dependent on acceptance of Premiss 1, whether or not it is possible. Thus, by Axiom S5, it is either impossible or necessary that a maximally great being exists.

8. wonder31415

Did you miss out a “¬” in the following?
… and □P⇔¬◊¬P. (P is not necessary if and only if it’s possible that P is not true.)

9. Doug Henning

No, not in S5. This is why it is controversial. Because it claims that if P is possibly necessary in world A and then there exists a possible world B where P is strictly necessary, in which its negation is contradictory. But if ~P is contradictory in some world, it is claimed, it is contradictory in all worlds. Therefore by LEM, P is necessarily true for all worlds and therefore by logical bootstraps it has been upgraded from possibly necessary to necessary. Essentially, necessary breaks out of possible but not vice versa, according to axiom S5.
Although if you replace P with ~P (P=maximal being exists in some world), I’m sure a disproof could be constructed along the lines of it is not possibly necessary only contingent, then no rampaging necessities come barging out. Of course one could reject S5 too.

10. Harald K

“… in order for human beings to have an idea of truth and beauty, there must be some source of that concept,”
That’s not what I believe, but perhaps it is related. I am called by conscience to do certain things, and don’t do others. Curiously, conscience forbids me from asserting that conscience is in any way arbitrary, man-made, a mere product of situation, or personal. Conscience – my conscience at least – has a circular reference. It demands that I should trust in it absolutely. I could of course choose to reject it absolutely instead!
I identify conscience with purpose. I believe that for conscience to be meaningful (which it insists that it is), it has to be connected to a purpose – a purpose in life, in other words. But since I did not and can not choose my own conscience, I did not and can not choose my purpose in life. I believe that someone or something beside myself _wants_ me to act according to conscience – because the alternative seems to be that conscience is arbitrary, which it insists that it is not.
I realise that rejecting conscience, or at least conscience’s claim of universality and non-arbitrariness, would be an option. But for me (with my conscience, which my conscience forces me to suspect that others share in 😉 that would throw out the possibility of believing in a meaningful purpose in life also. I could go on living after the non-circular edicts of conscience, choosing that as my “purpose”, but I think the futility of it all would then get me down pretty quickly. It wouldn’t exactly inspire me to do great things, and if I did them nonetheless I think I’d have trouble feeling that it mattered afterwards. The circularity of concscience is where it gets its fuel, without it I think I would burn out pretty quickly.
This is not a proof of God’s existence, but I consider it a sufficient justification for believing in God.

Intuitionistic logic still assigns strict truth values to statements; but it also includes the ability to have statements whose truth value is unknown.

I find it slightly humorous that this logic is referred to as intuitionist since it seems more posed to handle our dynamical world of facts than the static world of idealized knowledge. That is at least what my intuition tells me.
A question I have had for a time without getting to an answer is why it is preferred to add new categories as modal operators instead of evaluation values? Is it because it is natural, or is it because it is more compatible with predicate logic?

The circularity of concscience

IMHO every time one see a seeming circularity without a resolution a red flag should go up. Either something is done wrong or it is in all probability a variant of a known problem.
But here it isn’t necessary to make such an analysis. Many social animals can be observed to express shame, at least most dogs I have been acquainted with. So for me conscience is an evolutionary product and not an exercise in setting up a philosophical selfreference.

12. frederik

Mark C. Chu-Carroll:
That’s why I’m personally convinced that his acceptance of this proof was a product of his mental illness – because so much of the rest of his work was such careful and meticulous analysis of logic, and math, and other peoples theories to find every weak point, every corner where something could fail – I just cannot believe that in his right mind, he could have not seen the essentially circularity of that proof.

As far as I know Gödel’s proof was never ment to be published. It was found in his notes. Maybe he wasn’t that convinced of his proof?

13. Mark C. Chu-Carroll

Torbjön:
The reason that intuitionistic logic is called intuitionistic is precisely because of what you argue: intuitionistic logic is much closer to our intuition of how things should work. In particular, the idea of non-constructive existence proofs was considered non-intuitive – and so the basic structure of intuitionistic logic guarantees that all proofs are constructive.

14. Harald Korneliussen

Torbjörn: Conscience may be an evolutionary product, but is it _just_ and evolutionary product? If you are going to follow your conscience, it demands the answer is “no”. If you are not going to follow it, what are you going to follow? And by which standard should you decide what rule to follow?
It isn’t as easy as that, you know.
You say that a red flag should go up, but that isn’t much of a criticism. I am aware of what the circularity of conscience means – it means you can reject conscience altogether without being inconsistent. I see a certain inconsistence in partially rejecting conscience, though. If you think the standard of conscience is merely a product of chance (through social influence or evolution, it doesn’t matter), why do you accept anything of it at all? And by which standard do you decide which bits to accept and not?
Saying that conscience has no meaning and still trying to live by it, that is the same as saying you don’t believe something and then acting as if you did.

15. p

As far as I know Gödel’s proof was never ment to be published. It was found in his notes. Maybe he wasn’t that convinced of his proof?
He showed it to lots of people, but never published it. This “proof” was actually just a formalization of the “ontological argument” of St. Anselm, which can be found online. While logical people usually just treat Anselm’s work like an attempt at logical proof, it was also intended as a meditative aid, a formula for the experiment of attempting to glimpse an actual vision of God.
Anselm’s views were very similar to those of Nicolas de Cusa, who assserted that the highest principle (God) must entail all contradictory aspects of reality, good and evil, strength and weakness, beauty and terror, etc.

16. Anonymous

Intuitionistic logic is also sometimes incorrectly referred to as a modal logic.

That is most likely because of Gödel’s embedding of intuitionistic logic in S4.

17. Mark C. Chu-Carroll

JonL:
Fuzzy logics don’t actually assign a probability to the truth or falsehood of a statement; they just include a range of truth values. Probability still implies that the statement is either true or false, but we don’t know, so we assign some probability. Fuzzy logic allows us to say things like “My genes and my son’s genes are 50% the same”, by saying “My genes are the same as my son’s genes” is 50% true. That’s not a statement of probability: I know he’s my son (he couldn’t possibly be so evil if he wasn’t!), and I we know that (modulo mutation, mitochondrial DNA, etc.) that half of a child’s genes come from each of his parents. Standard logic doesn’t provide a way of saying “50% true” – fuzzy logic does. Fuzzy logic is, I think, considered a modal logic, because it does have that expanded concept of a truth value: things aren’t strictly true or strictly false, but rather have *degrees* of truth and falsehood.

18. Walker

Fuzzy logics don’t actually assign a probability to the truth or falsehood of a statement; they just include a range of truth value.

This is true in the strict notion of fuzzy logic. However, it and many other various logics are used to reason about uncertainty. See the text Reasoning about Uncertainty for an overview.

19. Sam Cartwright

I’m not convinced that I really see what your objection to Gödel’s argument is. There are certainly problems with the argument but I’m not sure from where your issue arises, perhaps from the lack of a definition of a positive property? Could you spell it out a little more precisely?
I’m interested as I’m in the middle of writing an essay on contemporary ontological arguments as we speak.

In particular, the idea of non-constructive existence proofs was considered non-intuitive

Thanks, that part would explain it, going back to intuitionist math I presume.

is it _just_ and evolutionary product?

Seems like we are going OT here, which is perhaps unlucky in a basics post. But if conscience has a basis as an evolutionary product, it ceases to be an entirely philosophical question.
It is also hard to demarcate where the uniquely human perspective starts, since some social animals have different cultures as well, perhaps influencing the degree of shame they show.

You say that a red flag should go up, but that isn’t much of a criticism.

I’m sorry if I was too laconic, it was a criticism in my eyes.
Not being a philosopher I can’t really appreciate all the nuances of such reasoning. But I’m quite tired of seeing claims of circularity or infinite regression in situations where it clearly doesn’t apply, especially in models of any kind.

If you think the standard of conscience is merely a product of chance

I think it should be contingency here. Evolution has constraints and selection, and I’m not sure anyone knows at all how it would play out if it was replayed.
Observing that many social animals shows conscience, it seems probable that it isn’t by chance.

Saying that conscience has no meaning

I’m not claiming that. We (must) create meaning in the social arena where we need it. I’m also not claiming that it is purely an evolutionary product, since many other concerns of culture and knowledge are relevant for human views and actions.

21. iain

I seem to recall being taught that all logics are modal, but that the nature of the modality varies. ‘Ordinary’ logic was referred to as having ‘alethic’ modality, I think.

22. Harald K

Torbjörn Larsson, you’re right that it’s OT so perhaps we should cut it, I just want to say that Popper points to reason being circular in a similar fashion – reason can be defended with reason, but that means that it can also be rejected entirely. Choosing to act according to reason is not itself a rational choice.
Also, I don’t think you’ve read me closely enough. I wanted to downplay evolution’s role, because it makes no difference whether morality is a product of social setting or biology – it’s the claim that it is (solely) a product of circumstances, and could equally well be completely different, which I consider bad.
(I also think that it is nonsense to speak about creating meaning where we need it. First of all, that makes me ask “need it for what?”, if there really is no meaning to it in the first place? Second, I can no more create meaning for my own life than my minesweeper program can create the reason why I made it. That holds even if I build into it a super-advanced AI and all sorts of genetic algorithm stuff.)

23. Brandon

With regard to Mark’s comment:
To me, that’s just a nitpick. If we’re talking informally, saying that “A proof doesn’t infer the existence of X, it just proves that the non-existence of X creates contradictions” is a distinction without a difference. Clearly Gödel, Leibniz, and the various others who bought into the kind of argument did believe that they were proving the existince of god.
It was a nitpick, but I don’t disagree with anything here. My quibble was only with the use of the phrase ‘source of that concept’ in your original summary, which I think was misleading; the only reason I brought it up is that there is, in fact, a type of argument that is a causal argument from concepts, and which is logically very different from any ontological argument. Ontological arguments don’t consider the sources of the concepts. Nitpicky, but in my own field (early modern philosophy) it’s a pretty important distinction (e.g., for understanding Descartes).
I think it’s fair enough to say that, in fact, the ontological argument posits in one way in its premises the conclusion that it formulates in a different way. But imagine that you’re a fairly strongly Platonistic about logical and mathematical objects, like Godel certainly was. Godel, for instance, held that the things described in mathematical logic could be perceived directly by the mind (with proper training) in a way analogous to sensation. Anyone who would go that far with Godel wouldn’t be able to give the response you do. Basically he’s saying, look closely at these premises, which you can directly perceive to be true (at least with proper training in rigorous perception of logical truths); you will find that, slightly re-ordered, they require the existence of something reasonably called ‘God’. There’s nothing intrinsically wrong with such an argument, any more than there’s anything wrong with using sensation to prove that something exists. The only things that can be wrong with it are either its assumption that such truths are directly perceived, or its claim that what’s described by these particular premises is directly perceived. So I still think that the real crux here is what Godel thought he could directly perceive. This might, of course, have been heavily influenced by his mental illness.
I’m inclined to think that, in general, people who are strong Platonists about mathematics (like Godel) will tend to be more favorable to the argument than people who are not.

reason can be defended with reason

If you are discussing tautologies, there are plenty of levels where scientific theories are tautological, and plenty where they are not but informed by observation. Ultimately it is the success of the methods that makes us use them.

I wanted to downplay evolution’s role,

It was your reference to chance, usually a strawman for evolution, that I was discussing. I have a hard time parse “it’s the claim that it is (solely) a product of circumstances, and could equally well be completely different, which I consider bad” except by suggesting that you are still using the strawman.

I also think that it is nonsense to speak about creating meaning where we need it.

here “meaning”, “free will”, et cetera are easily identified as folk psychology concepts, used in our theories of minds to explain and plan our own and others behavior.

25. Anonymous

□P⇔¬◊¬P. (P is not necessary if and only if it’s possible that P is not true.)
Shouldn’t that rather be read as P is necessary if and only if it’s not possible that P is not true.