Have you solved problems in your sleep?
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... :-)
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.
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?