Sign up ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

I have hit upon major (for me—relative to my trivial accomplishments) insights in my research in various sleep-deprived altered states of consciousness, e.g., long solo car-drives extending through the night into the morning. But I have never actually solved a problem in my sleep. I have awakened thinking That's it!, but never was it actually it.

Q. Can anyone report an actual significant advance in their research that occurred during and emerged from their sleep?

Of course this is entirely subjective, but you would know it if it happened to you.

Poincaré's famous step onto the bus in 1908 ("At the moment when I put my foot on the step the idea came to me...") indicates significant unconscious processing, and his insomnia account (quoted below) adds further credence to such "background" processing. But I am not aware of first-hand reports of significant and accurate reasoning occurring during sleep.

One evening, contrary to my custom, I drank black coffee and could not sleep. Ideas rose in crowds; I felt them collide until pairs interlocked, so to speak, making a stable combination. ... (Link)

share|cite|improve this question
Yes, this happened to me. My very first pusblished result in fact (so at least then it was major for me :-)). I thought I knew how to do it while brushing my teeth in the evening but then realized it did not work that way. Yet, the next morning I knew how to actually prove it. –  quid Apr 27 '14 at 0:37
What result would that be, quid? :) –  Lucia Apr 27 '14 at 0:59
I have come up with proofs in dreams, but when I wake up they've always turned out to be nonsense. –  Eric Wofsey Apr 27 '14 at 1:24
@ToddTrimble: If the idea was not present in consciousness prior to sleep, but is present upon awakening...? –  Joseph O'Rourke Apr 27 '14 at 1:45
I'm surprised nobody's mentioned the Thomason-Trobaugh theorem, which is the only instance I can think of where a dream character was bestowed coauthorship. –  Evan Jenkins Apr 27 '14 at 3:37

8 Answers 8

up vote 49 down vote accepted

On several occasions it has happened that I have made a key insight while sleeping or drifting in and out of sleep.

For example, one of the critical ideas in my paper

  • Joel David Hamkins, Gap forcing, Israel J. Math. 125 (2001), 237--252,

came to me this way, and waking up with the mathematical idea, I tore myself out of bed to work it out more fully on paper. It was totally right and formed the basis of later work. I remember sitting in my night attire in the bare moonlight at the table in my apartment, looking out at the empty sidewalk at Wall Street and Williams, where I lived at the time, pondering the approximation property applied to ultrafilters.

Because this has now happened several times, I now quite regularly try to prime myself, by intensionally focusing on a particular mathematical issue just as I am going to sleep. My mind floods with mathematical ideas just as I drift off. On welcome rare occasions, the problem is solved in the hypnagogic state, and having awoken I lay in bed pondering it, trying to check it, and wondering if it really is right (sometimes, of course, what seems right is later found to be mistaken). More often, though, when there is welcome news it consists not of a full solution but rather of a new perspective, which later forms the framework of a solution. That is, the result of the unconscious thought is a new way of thinking about the problem, rather than a complete logical proof.

At times, naturally, it is an interesting (or obsessive) MathOverflow question that I set myself to thinking about as I lay myself down. But let me say categorically that it has never been the case (ahem, cough, cough) that an hour or two after going to bed, I would wake with an answer and crawl out to my computer to type up an MO answer in the dark, while the rest of the household is sleeping, only to realize at that point, right before clicking "Post Your Answer" that the solution was totally flawed or wrong. What a downer that would be, to be sitting in the dark in the middle of the night, tired, with nothing to show for it but a wrong mathematical idea. That has NEVER happened... :-)

share|cite|improve this answer
+1. $1-\epsilon$ of which is for the last paragraph. –  Tony Huynh Apr 27 '14 at 13:38

In a dream I saw such a vivid image of a sort of vortex at a crossroads that I woke up convinced that it was an important geometric message to myself. In a half-waking state I free-associated and became certain that I knew roughly what question this was the answer to and roughly what direction it was pointing me in. For about two days I was fully expecting this to lead to a little breakthrough, muttering to myself about PL cotangent microbundles; but it all came to nothing.

share|cite|improve this answer
"Use the fork, Tom." –  The Masked Avenger Apr 27 '14 at 15:47
Well, it looked more like a crossroads than a fork in the road, but I'll bear that in mind. I haven't given up on this. –  Tom Goodwillie Apr 27 '14 at 16:58
@TheMaskedAvenger: Is the fork quote a "literary" reference? Do explain for the less literate... –  Joseph O'Rourke Apr 27 '14 at 19:25
Star Wars episode IV (1977). Except the advice is given to Luke by Kenobi. –  The Masked Avenger Apr 27 '14 at 20:09
And except that the original line is "use the force". It appears that it has been repeatedly parodied as "use the fork". –  Tom Goodwillie Apr 27 '14 at 20:56

Hadamard investigates these kinds of issues at length in his book The psychology of invention in the mathematical field. He gives several examples of famous mathematicians dreaming about solutions, including Poincare. His conclusion is that the unconscious definitely plays a decisive role in mathematics, and that sleep often has to do with it, but that it differs from person to person how to tap in to it.

It is (necessarily) a bit pseudoscientific, but has some great tidbits. For example, did you know Mobius' grandson, who was a psychologist into the then-popular phrenology, actually went around measuring mathematicians' heads, trying to locate the "bump" in the skull where mathematical ability should lie?

share|cite|improve this answer

Have you solved problems in your sleep?

$\quad$ T. K. Rajagopolan, a former accountant general of Madras, would tell of Ramanujan's insistence that after seeing in dreams the drops of blood that, according to tradition, heralded the presence of the god Narasimha, $\,$ the $\,$ male $\,$ consort $\,$ of $\,$ the $\,$ goddess $\,$ Namagiri, “scrolls containing the most complicated mathematics used to unfold before his eyes.”

K. Gopalachary, a friend of Ramanujan from Madras days, said that Ramanujan even attributed his early interest in mathematics to a dream-a dream about, of all things, a street peddler hawking pills.

$\qquad\qquad\qquad\qquad$ — Robert Kanigel, The Man Who Knew Infinity: A Life of the Genius Ramanujan.

share|cite|improve this answer

An interesting piece to read which tells the story of a dream leading, not to a single result, but a fundamental shift in a mathematician's work (leading to the proof, with collaborators, of Local Langlands for $p$-adic fields and of the Sato-Tate conjecture) by Michael Harris:

share|cite|improve this answer

I had a "near miss" while I was a PhD student. In a dream, I proved something about definability in some fragment of first-order logic with generalized quantifiers. I woke up straight away and wrote the proof down before going back to sleep. In the morning, it still looked like a proof so I went and discussed it with my advisor. After a little while, he found a flaw but the proof was still correct in a special case.

I'm not sure if this meets your criterion of "significance". It wasn't trivial (the proof was about a third of a page) but it was hardly ground-breaking. It was something we'd been thinking about for a couple of weeks and, as far as I'm aware, the problem is still open.

As I recall, the problem was something like this. Let $\mathrm{FO}(\mathrm{GI})$ be the extension of first-order logic with a quantifier for graph isomorphism. The syntax is generated by the normal rules for $\mathrm{FO}$ plus the rule that, if $\varphi(\bar{x},\bar{y})$ and $\psi(\bar{x},\bar{y})$ are formulas in which the variables $\bar{x}=x_1\dots x_k$ and $\bar{y}=y_1\dots y_k$ are free, then $\mathrm{GI}_{\bar{x},\bar{y}}(\varphi,\psi)$ is a formula in which $\bar{x}$ and $\bar{y}$ are bound. The semantics is as follows. In any relational structure with domain $V$, we can consider each of $\varphi$ and $\psi$ as defining a directed graph with vertex set $V^k$ and an edge between any pair of vertices that satisfy the formula. Now, $\mathrm{GI}_{\bar{x},\bar{y}}(\varphi,\psi)$ is true if, and only if, the two graphs are isomorphic.

Question: In the vocabulary with only equality (and no constant symbols), is $\mathrm{FO}=\mathrm{FO}(\mathrm{GI})$ on finite structures?

The case $k=1$ is trivial, as there are only four graphs you can define. I think my proof worked for $k=2$ but not for anything larger.

share|cite|improve this answer

The article "Do androids prove theorems in their sleep?" available here describes an instance in which a dream inspired a mathematical result. It describes the details of the Thomason-Trobaugh theorem mentioned above in the comments.

share|cite|improve this answer
Reading Harris's article makes me realize how sorely we miss Martin Gardner's wit: he would have found the right words for debunking the quoted article's pretentious nonsense. –  Georges Elencwajg Apr 28 '14 at 15:36

This BBC article mentions the Ramanujan story, with other examples from the arts and science, and is followed by readers giving their own examples. One conclusion to draw from this, is that quite often the "discovery in a dream" is just made up. Kekulé's well-known story how he discovered the ring structure of Benzene in a dream may be just an anecdote.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.