101

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)


Joseph O'Rourke
  • 149,182
  • 34
  • 342
  • 933
  • 2
    "The question you're asking appears subjective and is likely to be closed." So the software informs me. :-) – Joseph O'Rourke Apr 27 '14 at 00:20
  • 10
    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. –  Apr 27 '14 at 00:37
  • 20
    What result would that be, quid? :) – Lucia Apr 27 '14 at 00:59
  • 4
    I once went to bed thinking about a problem and in the morning had a conjectural resolution, which it then took me several months to prove. – Jim Conant Apr 27 '14 at 01:11
  • I'm not sure your example counts, quid. Did you discover the proof in a dream? I mean, it very often happens to me that I wake up with ideas in my head and I'm bursting to go, and no doubt stuff had been brewing subconsciously during sleep, but I cannot report any instances of wonderful mathematics carried out in a dream where the dream and its mathematical details were then lucidly recalled upon waking. – Todd Trimble Apr 27 '14 at 01:21
  • 48
    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 01:24
  • 8
    This has happened to me more than once. The most important example for me was I woke up realizing that Stallings foldings compute the profinite closure of the language accepted by a strongly connected automaton. This was the crucial starting point for a series of about 4 or 5 papers I wrote. I still don't know where the insight came from but I knew it to be true when I woke up. – Benjamin Steinberg Apr 27 '14 at 01:25
  • @EricWofsey That's precisely what I mean; that happens to me frequently. It's frustrating! Because it seemed so wonderful in the dream. – Todd Trimble Apr 27 '14 at 01:26
  • 1
    @ToddTrimble no, I did not mention any dream. But does the question ask for dreams specifically? –  Apr 27 '14 at 01:27
  • 3
    I have so far only disproved stuff in my sleep / dreams, so presumably this does not count :-) – Suvrit Apr 27 '14 at 01:28
  • 1
    @quid I think that's a critical question for Joseph to clarify. The phrase "significant and accurate reasoning occurring during sleep" signifies for me knowing that one had actually reasoned during sleep, and memories of thoughts that had transpired in sleep are barely distinguishable from memories of dreams (to me, anyway). – Todd Trimble Apr 27 '14 at 01:29
  • 3
    @quid: Yes, I did not mean a dream per se, but just subconscious significant progress during sleep; perhaps in a dream, perhaps not. – Joseph O'Rourke Apr 27 '14 at 01:31
  • 3
    @toddtrimble: I think the distinction between a remembered dream and awakenening with a "result" from who knows where---perhaps an unremembered dream---is tenuous. – Joseph O'Rourke Apr 27 '14 at 01:37
  • @Lucia I just meant to send you a reprint, but... ;-) More seriouly, I thought about if I could answer this question without the result, but then I understood the question being about the processes not the exact result. Also, I just left a comment :-) –  Apr 27 '14 at 01:37
  • Well if it's from "who knows where", how could one testify that it came out of last night's sleep? That would be a supposition at best. I guess I'm having a problem with the question... – Todd Trimble Apr 27 '14 at 01:41
  • 7
    @ToddTrimble: If the idea was not present in consciousness prior to sleep, but is present upon awakening...? – Joseph O'Rourke Apr 27 '14 at 01:45
  • I guess we can take that as defining more clearly what your question is asking for. (Sorry for the noise; I find that talking about unconscious processes is inherently difficult; it's hard to know what role sleep plays, and I have a real problem with "accurate reasoning occurring during sleep", which seems rife with difficulty.) – Todd Trimble Apr 27 '14 at 01:52
  • 30
    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 03:37
  • I recall a few proofs I had in my dreams, they were no worse than the proof I managed to come up with in this plane of existence. I did earn a great deal of intuition about forcing and symmetric extensions in my dreams whilst writing my masters thesis. – Asaf Karagila Apr 27 '14 at 04:33
  • 1
    When learning about matrices in school my friend asked me to solve AX = XB + C for X, given A,B and C. I wasn't sure, but that night I had a dream about expanding the matrices and writing out the equations and re-solving simultaneously. When I woke up I wrote out what I had dreamed and arrived at the correct answer. – Kenshin Apr 27 '14 at 11:28
  • 3
    I have made diverse experience: i managed to solve two problems, that kept me busy for a long time, after having contemplated them in a half-awake state and I also experienced misleading "that's it!" dreams. But, in all cases the ideas were worth checking and always have pen and paper in reach when sleeping. My explanation for creative dreams is, that then thoughts are not on the leash and they may bring anything, irrespective of value. – Manfred Weis Apr 28 '14 at 03:18
  • 4
    "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" This would be an interesting theme for psychiatryoverflow . – Georges Elencwajg Apr 28 '14 at 17:47
  • I would be really curious if any hard combinatorics problem was solved this way. –  Sep 05 '15 at 04:53
  • 2
    Isn't dream the major source of the significant proofs? – Włodzimierz Holsztyński Feb 01 '16 at 10:02
  • 6
    I am sure lots of people have had great ideas while sitting on the toilet, but this doesn't get mentioned as often as solving problems while sleeping because it's less sexy. – Federico Poloni Feb 01 '16 at 12:56
  • 1
    Have you thought of extending your question to include altered states of consciousness in general? – Paul Burchett May 10 '16 at 13:52
  • @PaulBurchett: That would be a different question. You or someone else is welcome to post it. – Joseph O'Rourke May 10 '16 at 14:27
  • 1
    Most of my ideas came to me not during sleep but while having shower in the afternoon on a day off. – Sylvain JULIEN Feb 16 '19 at 22:18

15 Answers15

105

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 intentionally 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... :-)

36

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.

24

I knew someone years ago who reported a dream of dying and going to Hell and meeting Fermat. (Fermat explained to him that that's where all mathematicians go.) My friend asked Fermat how his proof went -- the one that was too long for the margin. He got the beginning of an answer: First we rewrite the equation yn=znxn. But then he woke up.

23

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?

Chris Heunen
  • 3,919
20

A. Hitchkock had frequently bright ideas for films in his sleep. Unfortunately, he could not remember them at morning. One evening, he took a paper bond and a pen next to his bed. When an idea came up, he awoke and wrote it, then felt asleep again. At morning, he read the idea : "Boy meets girl".

I recall this well-known account to express my doubt about the efficiency of good reasoning during the sleep. I had many times the impression to achieve wonderful tasks in my sleep, and it was always an illusion.

On the other hand, my uncle told in many interviews how the idea of his thesis (about the higher homotopy groups) came up, in a sleeping car. Then he told is wife, lying on the bed just below : "I got it".

Denis Serre
  • 51,599
  • 10
    In the news today, it seems that the SNCF is planning to shut down almost all sleeper train services: http://www.theguardian.com/travel/2016/may/10/france-waves-goodbye-to-sleeper-trains Somebody should explain to them the harmful effects this will have on mathematics... – Lazzaro Campeotti May 10 '16 at 15:14
  • True indeed. And most of international night train are know operated by private companies – Denis Serre May 10 '16 at 15:21
  • 3
    On a few occasions I had a dream in full color, perfect image, and mood, then after I woke up I simply put my dream on the paper as a poem. I would feel embarrassed, and I would never admit to anybody that my poem was simply a dream. – Włodzimierz Holsztyński Jun 29 '16 at 07:05
16

Have you solved problems in your sleep?

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.

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

Lucian
  • 655
14

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 FO(GI) be the extension of first-order logic with a quantifier for graph isomorphism. The syntax is generated by the normal rules for FO plus the rule that, if φ(ˉx,ˉy) and ψ(ˉx,ˉy) are formulas in which the variables ˉx=x1xk and ˉy=y1yk are free, then GIˉx,ˉy(φ,ψ) is a formula in which ˉx and ˉy are bound. The semantics is as follows. In any relational structure with domain V, we can consider each of φ and ψ as defining a directed graph with vertex set Vk and an edge between any pair of vertices that satisfy the formula. Now, GIˉx,ˉy(φ,ψ) is true if, and only if, the two graphs are isomorphic.

Question: In the vocabulary with only equality (and no constant symbols), is FO=FO(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.

13

Yes, exactly this happened to me. I had spent the day on a laborious proof of a simple result in n-dimensional euclidean geometry. The proof was ugly, and I was unhappy with it; I felt that there should be an elegant way. I went to bed later than usual, exhausted and somewhat frustrated. The moment I woke the next morning, I had the key idea: embed the problem in a higher-dimensional space. This method is not original, but at the time it was new to me. There was a hint of it in the previous work---an (n+1)-square matrix popped up as a way of describing something in the proof---but it didn't occur to me to interpret this geometrically while I was awake.

John Bentin
  • 2,427
12

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:

https://webusers.imj-prg.fr/~michael.harris/androids.pdf

Joël
  • 25,755
10

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.

  • 9
    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
5

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.

Carlo Beenakker
  • 177,695
4

I wanted to extend a algorithm from the (sporadic finite simple) Monster group to the Bimonster (an extension of the direct product of the Monster by itself). I considered this as a difficult task. Then I had a dream:

I wanted to tune two organ pipes so that they produce the same note. But there were always beats, indicating that the two notes are not exactly the same. After waking up I found an error, in a paper on the subject that I have read, as well as in my algorithm:

For all generators of the Bimonster that I have used, both factors of the direct product were the same. Hence the generators did not generate the direct product, but just a diagonal of it. So in the dream I had do get the two notes together, and in my system of generators I had to take the two factors of the direct product apart.

3

Stanislaw Ulam, as quoted in Turing’s Cathe⁣dral:

Once in my life I had a mathematical dream which proved correct. I was twenty years old. I thought, my God, this is wonderful, I won’t have to work, it will all come in dreams! But it never happened again.

J Thomas:

Once after I had spent several days trying to prove a topology theorem, I dreamed about it and woke up with a counterexample. In the dream it just constructed itself, and I could see it. I didn’t have a fever then, though. Later one of my teachers, an old Polish woman, explained her experience. She kept a notebook by her bed so she could write down any insights she got in her sleep. She woke up in the night with a wonderful proof, and wrote it down, and in the morning when she looked at it it was all garbage. “You cannot do math in your sleep. You will have to work.”

Richard Guy:

Guy: If I do any mathematics at all I think I do it in my sleep.

MP: Do you think a lot of mathematicians work that way?

Guy: I do. Yes. The human brain is a remarkable thing, and we are a long way from understanding how it works. For most mathematical problems, immediate thought and pencil and paper—the usual things one associates with solving mathematical problems—are just totally inadequate. You need to understand the problem, make a few symbols on paper and look at them. Most of us, as opposed to Erdős who would probably give an answer to a problem almost immediately, would then probably have to go off to bed, and, if we’re lucky, when we wake up in the morning, we would already have some insight into the problem. On those rare occasions when I have such insight, I quite often don’t know that I have it, but when I come to work on the problem again, to put pencil to paper, somehow the ideas just seem to click together, and the thing goes through. It is clear to me that my brain must have gone on, in an almost combinatorial way, checking the cases or doing an enormous number of fairly trivial arithmetical computations. It seems to know the way to go. I first noticed this with chess endgames, which are indeed finite combinatorial problems. The first indication that I was interested in combinatorics—I didn’t know I had the interest, and I didn’t even know there was such a subject as combinatorics—was that I used to compose chess endgames. I would sit up late into the night trying to analyze a position. Eventually I would sink into slumber and wake up in the morning to realize that if I had only moved the pawns over one file the whole thing would have gone through clearly. My brain must have been checking over this finite but moderately large number of possibilities during the night. I think a lot of mathematicians must work that way.

MP: Have you talked to any other mathematicians about that?

Guy: No. But in Jacques Hadamard’s book on invention in the mathematical field, he quotes some examples there where it is fairly clear that people do that kind of thing. There was someone earlier this week who was talking about Jean-Paul Serre. He said that if you ask Serre a question he either gives you the answer immediately, or, if he hesitates, and you push him in any way, he will say, “How can I think about the question when I don’t know the answer?” I thought that was a lovely remark. At a much lower level, one should think, “What shape should the answer be?” Then your mind can start checking whether you’re right and how to find some logical sequence to get you where you want to go.

Jaques Hadamard, from An Essay on the Psychology of Invention in the Mathematical Field:

Let us come to mathematicians. One of them, Maillet, started a first inquiry as to their methods of work. One famous question, in particular, was already raised by him that of the “mathematical dream”, it having been suggested often that the solution of problems that have defied investigation may appear in dreams. Though not asserting the absolute non-existence of “mathematical dreams”, Maillet’s inquiry shows that they cannot be considered as having a serious significance. Only one remarkable observation is reported by the prominent American mathematician, Leonard Eugene Dickson, who can positively assert its accuracy…Except for that very curious case, most of the 69 correspondents who answered Maillet on that question never experienced any mathematical dream (I never did) or, in that line, dreamed of wholly absurd things, or were unable to state precisely the question they happened to dream of. 5 dreamed of quite naive arguments. There is one more positive answer; but it is difficult to take account of it, as its author remains anonymous.

Quotes mostly sourced from this essay.

2

Soon after getting married I dreamt of a number. I knew that that number was somehow very important, and I absolutely shouldn't forget it. Despite being asleep I managed to remember that number and recalled it in the morning. It was very important to me indeed: it was my new wife's social security number that I entered numerous times into various forms the day before.

Michael
  • 2,175
1

It is absolutely not about math but it conveys my experience with that kind of things better than anything else I know

Michel Gondry - rolling egg dream