Since reading Logicomix (which, as I said, I really like), I've been wondering about the "logic and madness" theme that runs through the book. In the making-of movie (which I also recommend), Papadimitriou says at the beginning, "We were both interested in this very curious fact, that the majority of the protagonists of this intellectual adventure [the quest for mathematical foundations] ended up insane" and Doxiadis cites the well known line from Gian-Carlo Rota's Indiscrete Thoughts:
It cannot be a complete coincidence that several outstanding logicians of the twentieth century found shelter in asylums at some point in their lives: Cantor, Zermelo, Gödel and Post are some. (p. 4)
And, if you've read the book, you'll probably agree that the "logic and madness" theme does make for a great story. But is it true? Is there a link between logic and madness?
First, some facts, and corrections of claims of facts. It is well known that Georg Cantor underwent psychiatric treatment and "died in an asylum". But as Grattan-Guiness and Dauben have documented, it was neither Kronecker's attacks on Cantor's set theory, nor Cantor's failure to solve the continuum hypothesis that drove him mad. Cantor suffered from bipolar affective disorder, i.e., he was manic depressive, and stress such as that caused by having your work viciously attacked by a leading member of the profession, or that caused by expending every last effort and yet failing to prove a theorem, caused the onset of manic periods. He would have had such attacks also if he hadn't invented set theory (see Dauben's Georg Cantor, Ch. 12, esp. p. 285; Dauben is very critical of people like E. T. Bell here, and offers a very nuanced interpretation of the relationship between Cantor's mental health and his mathematics). Remember, this all happened between 1884 and 1918, when no effective treatment for bipolar disorder was available; lithium wasn't used until the 1950s and approved by the FDA for this use only in 1970.
Emil Post likewise was manic depressive, and died from a heart attack following electric shock therapy he was undergoing in 1954. And Gödel did die because he starved himself to death as he suffered from the paranoid fear that people were trying to poison him. But also Gödel's mental health problems manifested themselves quite early, and not as a result of a lifetime of work on logic, or because he couldn't prove the continuum hypothesis (see Dawson's Logical Dilemmas). In addition to Cantor, Post, and Gödel, Moses Schönfinkel, the inventor of combinatory logic, is reported to have been mentally ill.
What about the others? Rota mentions Peano and Zermelo. I couldn't find any evidence that either of them had mental health problems. Both spent time in medical institutions, but underwent treatment not for mental health problems but for lung disease.
That leaves Frege. In Logicomix, Frege is portrayed as a raving lunatic spewing paranoid anti-semitic nonsense. In the biographical section at the end of the book, one reads the following:
In the last decades of his life, Frege became increasingly paranoid, writing a series of rabid treatises attacking parliamentary democracy, labor unions, foreigners, and especially, the Jews, even suggesting a "final solution" to the "Jewish problem". (p. 325-326)
The source of these claims is Frege's infamous "political diary" (edited by Gottfried Gabriel and Wolfgang Kienzler, "Frege's politisches Tagebuch", Deutsche philosophische Zeitschrift 42:6 (1994) p.105–1098; translated by Richard Mendelsohn, "Diary: Written by professor Dr Gottlob Frege in the time from 10 March to 9 April 1924", Inquiry 39 (1996) 303–342; you can get a taste for them with a bit of background in Stroll's Twentieth-century Analytic Philosophy and in the chapter on Frege in Martin Davis' The Universal Computer). As you can see for yourself, the diaries reveal the very dark side of Frege's political views: reactionary, anti-semitic, anti-catholic, anti-socialist. But: Frege didn't write "increasingly rabid treatises" over "the last decades of his life"—these are diary entries written over two months in the very last year before he died. As far as I can tell, he never advocated a "final solution" to the "Jewish problem" with anything like the meaning that these terms have taken on, and he didn't use this Nazi terminology. There is no indication that he admired Hitler (he opposed the Munich Putsch of 1923), and there's no indication that his anti-semitism was racially motivated or anywhere near the level of the Nazis. But most importantly: He wasn't clinically paranoid. As objectionable as his views are, they were widespread in Germany at the time (Had they not been, Hitler would never have come to power). Moreover, if he had been paranoid, this would, I think, absolve Frege of moral responsibility. After all, we don't hold people morally (or legally) responsible for their actions when they're insane. So: Frege: reactionary anti-semite, but no Nazi, and not insane.
Of the "protagonists of this intellectual adventure", four (Cantor, Schönfinkel, Gödel, Post) had mental health issues. We don't know enough about Schönfinkel, Cantor and Post were manic depressives, Gödel more than the others, and probably paranoid schizophrenic. Is that "a majority"? Is it even a statistically significant increase from the norm?
The National Institutes of Mental Health puts the percentage of the US population with "serious mental illness" at 6%. What's the percentage of pioneers of logic with a serious mental illness? We've found four, but what's the sample? Let's say Rota had in mind the authors of papers in van Heijenoort's From Frege to Gödel. That's 30, and doesn't even include Tarski, Lukasiewicz, Church, Fraenkel, Gentzen, Turing (all not insane), or many of the less well known people working in foundations at around that time. So: 13% of the pioneers of logic had a serious mental illness. But with a sample of 30, the margin of error has to be huge. I'm no statistician, but using the standard formula, I get a margin of error of ±12% (ok, I know you probably shouldn't use the standard formula for samples this small; if you know stats, help me out, please). This suggests that there's good reason to think that Rota's claim is just wrong: it may very well be pure coincidence.
All this of course doesn't detract from the good story told in Logicomix, which, after all is mainly about Russell, about his personal life, and about his struggle with the foundations of mathematics; the "logic and madness" theme isn't that pronounced. But that story does play into a myth that, if taken on its own, is not exactly the image any field of science wants to project (or have painted) of itself: that it's the domain of lunatics. It's not only detrimental to the field and hurtful to the people working in it, it also distorts and minimizes the actual personal struggles of the protagonists and the interesting historical context. All of these people lived through one world war, many of them through two and the toughest economic times of the last 100 years. Some were forced to flee their home countries, some faced persecution and prejudice, some personal tragedy, some professional misfortune. Most of them produced their groundbreaking results despite these obstacles. These are the important stories, not any myths about how doing logic drives people mad.