I know that the meaning of dreams is a controversial topic and I do not think that they have a specific meaning, although I am certain, by experience, that dreams are deeply connected with what happens to us in everyday life. That is, most dreams are personal and thus an objective study of dreams would seem a bit of a paradox to me. In any case, I might already have shown my ignorance in the cognitive sciences by giving my misinformed opinion, but I am writing here to ask you how it is possible to prove a relatively simple mathematical theorem in a dream, which happened to me this early morning shortly before waking up. Proving a mathematical theorem is extremely complex, on a cognitive base, how is it possible to prove it while sleeping? My idea was that I registered the theorem and I had it embedded somewhere in my memory and this night it just bubbled up, with no rational implication. What do you think?
Did you remember the mathematical proof after you woke up?
You did not.
We often dream that we achieve something without actually achieving it. For example, we often dream that we meet a specific person, but in out dream that person does not have any specific characteristics but rather a blurry face and only a general shape. We just attach the label of a certain name ("Bob") or characteristic ("beautiful") to that general shape and thus feel that we have dreamed of Bob or a beautiful stranger. This makes it possible for us to dream of persons that are both our mother and our daughter at the same time, by simply attaching multiple labels to the same indistinct shape.
Similarly, we see a blurry page with vague but indiscernible mathematical symbols on it and the label "mathematical proof", so we feel that we had the proof in our dreams, while in fact there was nothing but a blurry page with the feeling of "solution" attached to it.
How does this work?
We know what a mathematical proof feels like. We know what meeting Bob feels like. And in a dream we can attach these feelings to anything. For example, a female shape might somehow feel like Bob to us; or dreaming of a field of flowers might feel like the solution to a mathematical problem to us. The attachment of the lable to this image might mean something (e.g. you think that Bob's wife is ruling him, or mathematical solutions have the same beauty to you as flowers), but they certainly don't mean that whatever the label is attached to is what the label says.
Think of a dream of flying. You feel as if you fly, because you remember or extrapolate that feeling from similar feelings (falling, being carried as a child, riding a car, etc.), but you certainly don't fly, because of course you are lying in bed. You just attach the feeling to some imagery (that you remember from tv) and then the label that you "fly".
Your conscious mind is very limited and weak, compared to your unconscious mind. Many problems are so complex that you cannot solve them consciously. In the case of difficult decisions, it usually helps to "sleep over them". Einstein famously found the solution to a theoretical problem while he slept.
When you sleep, what you do is you let the problem be, consciously. You stop considering it. And by doing that, you allow your unconscious to work it out (if it can). You don't have to sleep to do that. Often it is enought to stop thinking about the problem once you have accumulated all the fact, and allow your mind to wander. Mediation helps, daydreaming helps, whatever you can do to let the problem go and not focus on something else will allow your unconscious to solve the problem for you.
In the case of decisions, this is called intuition. You just know, but you cannot explain.