Many philosophers and writers throughout the ages have considered life or the nature of reality as a dream or illusion.
It's our mind and imagination that creates a life and reality for us human beings, but reality in itself may remain something mysterious and
forever unknowable to us. But some believe that we can access the ultimate reality through a special faculty of our mind,
like aesthetic intuition (art), intellectual intuition (philosophy) or meditation or mystical experience (religion).
Below I quote a few select philosophers and writers that wrote about life as a dream or compared reality to an illusion.
Plato: The Allegory of the Cave
[514α]μετὰ ταῦτα δή, εἶπον, ἀπείκασον τοιούτῳ πάθει τὴν ἡμετέραν φύσινπαιδείας τε πέρι καὶ ἀπαιδευσίας.
ἰδὲ γὰρ ἀνθρώπους οἷον ἐν καταγείῳ οἰκήσει σπηλαιώδει, ἀναπεπταμένην πρὸς τὸ φῶς τὴν εἴσοδον ἐχούσῃ μακρὰν παρὰ πᾶν τὸ σπήλαιον,
ἐν ταύτῃ ἐκ παίδων ὄντας ἐν δεσμοῖς καὶ τὰ σκέλη καὶ τοὺς αὐχένας, ὥστε μένειν τε αὐτοὺς εἴς τε τὸ[514β]
πρόσθεν μόνον ὁρᾶν, κύκλῳ δὲ τὰς κεφαλὰς ὑπὸ τοῦ δεσμοῦ ἀδυνάτους περιάγειν, φῶς δὲ αὐτοῖς πυρὸς ἄνωθεν καὶ
πόρρωθεν καόμενον ὄπισθεν αὐτῶν, μεταξὺ δὲ τοῦ πυρὸς καὶ τῶν δεσμωτῶν ἐπάνω ὁδόν, παρ᾽ ἣν ἰδὲ τειχίον παρῳκοδομημένον,
ὥσπερ τοῖς θαυματοποιοῖς πρὸ τῶν ἀνθρώπων πρόκειται τὰ παραφράγματα, ὑπὲρ ὧν τὰ θαύματα δεικνύασιν.
[514a] "Next," said I, "compare our nature in respect of education and its lack to such an experience as this.
Picture men dwelling in a sort of subterranean cavern with a long entrance open to the light on its entire width. Conceive them as
having their legs and necks fettered from childhood, so that they remain in the same spot, [514b] able to look forward only,
and prevented by the fetters from turning their heads. Picture further the light from a fire burning higher up and at a distance
behind them, and between the fire and the prisoners and above them a road along which a low wall has been built,
as the exhibitors of puppet-shows have partitions before the men themselves, above which they show the puppets."
[Republic, 514a - 520a, Book VII]
Allegory of Plato's Cave, Jan Saenredam, 1604
ὁρῶ γὰρ ἡμᾶς οὐδὲν ὄντας ἄλλο πλὴν
εἴδωλ᾽ ὅσοιπερ ζῶμεν ἢ κούφην σκιάν.
For I see well, nought else are we but mere phantoms, all we that live, mere fleeing shadows.
Pedro Calderon de la Barca: Life is a Dream
and I think I'm still asleep.
And I can't be that far wrong
For if everything was a dream
Everything I saw and touched for sure
Then anything could be a dream,
Everything I see and touch just now.
And it seems very possible now
Now I am so utterly defeated
That even though I'm sleeping I can still see
That even though I'm waking I can still dream.
That everyone who lives is only dreaming
Who they are till they awake.
Everyone dreams they are who they are
Although no-one understands this.
What is life? A frenzy.
Life's an illusion.
Life's a shadow, a fiction,
And the greatest good is worth nothing at all,
For the whole life is just a dream
And dreams…dreams are only dreams.
Are wonderful experiences so like dreams
That what's real can be utterly dreamlike
And what's unreal can be taken to be true?
Which means, which means it must be obvious
That this dream is what life is
And that this life is really just a dream.
The thing to do is make the most of what we've got.
If everything's just a dream,
Then let's dream, my soul,
Let's dream of happiness
Because we know it will soon be grief.
[Nick Hern Books, London 1998]
Descartes: Mediation I
Quasi scilicet non recorder a similibus etiam cogitationibus me alias in somnis fuisse delusum; quae dum cogito attentius,
tam plane video nunquam certis indiciis vigiliam a somno posse distingui, ut obstupescam, & fere his ipse stupor mihi opinionem somni confirmet.
Indeed! As if I did not remember other occasions when I have been tricked by exactly similar thoughts while asleep!
As I think about this more carefully, I see plainly that there are never any sure signs by means of which being awake can be
distinguished from being asleep. The result is that I begin to feel dazed, and this very feeling only reinforces the notion that I may be asleep.
[The Philosophical Writings of Descartes, Volume II, Cambridge University Press, 1994, p. 13]
Once I, Chuang Chou, dreamed that I was a butterfly and was happy as a butterfly. I was conscious that I was quite pleased with myself,
but I did not know that I was Chou. Suddenly I awoke, and there I was, visibly Chou. I do not know whether it was Chou dreaming that he
was a butterfly or the butterfly dreaming that it was Chou. Between Chou and the butterfly there must be some distinction.
[But one may be the other.] This is called the transformation of things.
[Wing-Tsit Chan: A Source Book In Chinese Philosophy, Princeton University Press, 1963, p. 190]
Johann Gottlieb Fichte: Die Bestimmung des Menschen (The Vocation of Man)
Es gibt überall kein Dauerndes, weder ausser mir, noch in mir, sondern nur einen unaufhörlichen Wechsel.
Ich weiss überall von keinem Sein, und auch nicht von meinem eignen. Es ist kein Sein. – Ich selbst weiss überhaupt nicht, und bin nicht.
Bilder sind: sie sind das Einzige, was da ist, und sie wissen von sich, nach Weise der Bilder...Ich selbst bin eins dieser Bilder;
ja, ich bin selbst dies nicht, sondern nur ein verworrenes Bild von den Bildern, - Alle Realität verwandelt sich in einen wunderbaren Traum,
ohne ein Leben, von welchem geträumt wird, und ohne einen Geist, dem da träumt; in einen Traum, der in einem Traume von sich selbst zusammenhängt.
[Felix Meiner Verlag, Hamburg 1979, p. 81]
There is nowhere anything lasting, neither outside me, nor within me, but only incessant change. I nowhere know of any being not even my own.
There is no being. I myself know nothing and am nothing. There are only images: they are the only thing which exists, and they know of
themselves in the manner of images…I myself am only one of these images; indeed, I am not even this, but only a confused image of images.
All reality is transformed into a wondrous dream, without a life with is dreamed about, and without a spirit which creams;
into dream which coheres in a dream of itself.
[The Vocation of Man, Open Court, 1965, p. 9]
Arthur Schopenhauer: The World as Will and Representation, Volume I
Die Veden und Puranas wissen für die ganze Erkenntnis der wirklichen Welt, welche sie das Gewebe der Maja nennen, keinen bessern
Vergleich und brauchen keinen häufiger, als den Traum. Plato sagt öfter, dass die Menschen nur im Traume leben,
der Philosoph allein sich zu wachen bestrebe.
[Sämtliche Werke, Zweiter Band, Die Welt als Willen und Vorstellung I, F. A. Brockhaus, Mannheim 1988, §5, p. 20]
The Vedas and Puranas know no better simile for the whole knowledge of the actual world, called by them the web of Maya, than the dream.
Plato often says that men live only in the dream; only the philosopher strives to be awake.
[Dover Publications, Inc. 1969, §5, p. 17]
Indian Philosophy: Maya (माया)
Māyā is the principle of appearance, illusion and the power of creation. According to Advaita Vedanta, it is the indeterminable
principle which brings about the illusory manifestation of the universe. It is the principle of illusion which explains how the one reality
appears as many. It is an attribute of Brahman and some use it interchangeably with avidyā (ignorance).
[John Grimes: A Concise Dictionary of Indian Philosophy, State University of New York Press, 1989]
The root of माया (māyā) is mā. The term mā means 'to measure' – the immeasurable Brahman appears as if measured.
The term mā also means leading to the idea of illusion or appearance. Another derivation of the term māyā is mā yā,
that which truly is not, but appears to be.
[A Dictionary of Advaita Vedanta, Ramakrishna Mission Institute of Culture, 2016]
Lewis Carrol: Life is But a Dream
A boat, beneath a sunny sky
Lingering onward dreamily
In an evening of July
Children three that nestle near,
Eager eye and willing ear,
Pleased a simple tale to hear
Long has paled that sunny sky;
Echoes fade and memories die;
Autumn frosts have slain July.
Still she haunts me, phantomwise,
Alice moving under skies
Never seen by waking eyes.
Children yet, the tale to hear,
Eager eye and willing ear,
Lovingly shall nestle near.
In a Wonderland they lie,
Dreaming as the days go by,
Dreaming as the summers die;
Ever drifting down the stream
Lingering in the golden gleam
Life, what is it but a dream?
Alexandre Dumas: The Three Musketeers
External existence then resembles a sleep of which this thought is the dream.
Anatole France: The Crime of Sylvestre Bonnard
To know is nothing at all; to imagine is everything. Nothing exists except that which is imagined. I am imaginary.
That is what it is to exist, I should think! I am dreamed of, and I appear.
Everything is only dream…
Marcel Proust: In Search of Lost Time - Volume 4 (Sodom and Gomorrah)
I was alarmed nevertheless by the thought that this dream had had the clarity of consciousness. By the same token, might consciousness
have the unreality of a dream?