%% Image selected per Image Pickin' thread: http://tvtropes.org/pmwiki/posts.php?discussion=1375357693038892900
%% Please do not change or remove without starting a new thread.
%%
[[quoteright:350:http://static.tvtropes.org/pmwiki/pub/images/butterfly_dreaming_1529.jpg]]

->''"Once I dreamt I was a butterfly, a butterfly flitting and fluttering around, happy with myself and doing as I pleased. I didn't know I was myself. Suddenly I woke up and there I was, solid and unmistakably myself. But I didn't know if I was myself who had dreamt I was a butterfly, or a butterfly dreaming he was me."''
-->-- '''Creator/{{Zhuangzi}}'''

When a story introduces the possibility of [[RecursiveReality worlds within worlds]], be they a LotusEaterMachine or perfectly lucid dreams, there will always be a nagging doubt in the back of a viewer's mind whether the story is real (that is to say, at the highest possible level of reality inside the work of fiction) or if they aren't dreaming or "still plugged in".

This serves as a source of mystery and speculation in a story. Did the heroes really break the spell cast by the MasterOfIllusion, or are they all imagining it? Did they escape the ConvenientComa that trapped them in a HappyPlace... or merely trade a perfect illusory world for a more realistic one? These doubts may never be resolved until a {{Sequel}} comes out or WordOfGod clarifies it. Sometimes, the ambiguity works in favor of the story, leaving it [[LeaveThePlotThreadsHanging open to interpretation.]]

Much like the [[SchrodingersCast other]] [[SchrodingersGun Schrödinger]] [[SchrodingersSuggestionBox tropes]], this plot point can also serve as an AuthorsSavingThrow by retroactively making it AllJustADream or a DreamWithinADream. Or if the author ''really'' wants to mess with us, end the movie or film on a DownerEnding, with a fading shot of the character's [[DyingDream dying]] or still comatose body trapped in the illusion.

The trope name is a reference to a poem by the 4th century BC Chinese philosopher {{Zhuangzi}}, a Taoist philosopher who influenced Chinese Buddhism. It refers also to [[UsefulNotes/SchrodingersCat Erwin Schrödinger's thought experiment relating to quantum uncertainty]]. If you can't tell, we like to be well balanced in our {{geek}}ery on this wiki.

Compare: EveryoneIsJesusInPurgatory and DreamApocalypse. Compare also OpeningACanOfClones, which has this effect regarding a character's uniqueness. Contrast OrWasItADream. See also: UnreliableNarrator, MentalWorld, CuckooNest, DyingDream, ThroughTheEyesOfMadness, {{Masquerade}}, TheEndingChangesEverything, and {{Brainwashed}}.

'''Expect spoilers.'''

----
!!Examples:

[[foldercontrol]]

[[folder:Anime & Manga]]
* In ''Manga/{{Naruto}}'', brothers Sasuke and Itachi Uchiha practice ''genjutsu,'' techniques centering around illusions. Thus, during the Sasuke vs Itachi fight, the first major stage of the battle consists of Sasuke and Itachi standing perfectly still while both add layer upon layer of illusions. The readers, of course, are ignorant of what is an illusion and what isn't until after the illusion breaks. As a result, there are several points in which the fight seems over, only for the illusion to break and reveal that the brothers ''hadn't actually started fighting yet.''
** Practically lampshaded when Sasuke breaks Tsukuyomi (Itachi's strongest genjutsu), and [[CombatCommentator Zetsu]] pretty much lets the reader know the rest of this ''isn't'' genjutsu.
* ''XxxHolic'' actually even refers to the above quote and it is an allegory of a central theme in the series.
* In ''Manga/GetBackers'', in one of the episodes, an elderly homeless man asks the Get Backers to save his daughter from the mafia. [[spoiler:When they arrive the girl doesn't want to go with them, and they leave her there. Upon seeing the old man being loaded onto an ambulance, Ban catches both the old man's and Ginji's eyes before the daughter runs up to tell her father that she loves and forgives him. It is never revealed whether the daughter truly showed up, or if Ban was showing both men a pleasant illusion.]] The viewer is often confused as to what is the illusion and what is reality, only being sure when Ban reveals his trick.
** In the original manga, Ginji asks him if he used the Evil Eye, and Ban replies with a dejected 'yeah'.
* In ''Anime/GhostInTheShell 2: Innocence,'' Batou and Togusa meet a cyborg hacker with the ability to completely alter the perception of people with any kinds of brain implants. When they notice they are trapped in an illusion, they manage to break out, only to realize they are just in another illusion, before they finally manage to break free for real. Of course, they wonder if perhaps they never actually left the false realities, and if they might unknowingly live out the rest of their lives in an illusion. Scary!
* ''Anime/DotHackSign'' ends with [[spoiler: Helba forcibly deleting Net Slum in a desperate effort to stop Skeith, causing everyone to be ejected from the game as the server crashes. This results in Tsukasa finally logging out of the game for the first time in the entire series and having a heartwarming meeting with Subaru in the real world...but when their hands touch, a distinctly cyberspace-y hexagon grid appears, and it then cuts to a scene of what appears to be the ruins of Net Slum (which is very similar to the very start of the first episode), with a mysterious monologue from Morganna. It doesn't help either that the "real world" segment of Tsukasa leaving the hospital and meeting Subaru has a somewhat surreal tone to it, what with the whole silent movie style and all. Ultimately, it's not really clear until later installments in the .hack series whether or not Tsukasa actually ever managed to log out.]]
* [[spoiler:Aizen]]'s zanpakutou ability in ''Manga/{{Bleach}}'' Its very essence is to [[MasterOfIllusion warp a victim's perception of reality]].
* ''Manga/JoJosBizarreAdventure'': Gold Experience Requiem's powers is like this, specifically the endless chain of "waking" only to be in another fabricated scenario. The victim catches on after about three times that he's no longer alive, but that doesn't change the fact that he'll [[FateWorseThanDeath never die, either.]]
* Never really happens in ''Anime/ElHazardTheMagnificentWorld'', but at one point Makoto wakes up after having a weird dream. Since he's not entirely sure that [[Anime/ElHazardTheMagnificentWorld El-Hazard]] itself isn't a dream, he gets a bit confused on the subject.
-->'''Makoto:''' What a weird dream. Within a dream. Or is this the dream?
* ''VisionOfEscaflowne'': Every episode for the first half or so of the episodes starts with ""Was it all just a dream? Or maybe a vision... no, it was real!". In addition on several occasions she does go to the other reality in a dream
-->First episode has her see a vision of Van appearing through a beam of light before she passes out, [[spoiler:later on in the episode this actually happens]].
-->While in Gaea she has several dreams where she is back with her friends in Japan.
* Are we all (as in, all of objective reality, not just the reality within the series) but a dream of ''LightNovel/HaruhiSuzumiya''? At least Koizumi sets this as one of the possible theories.
* Used in episode 6 of the second season of ''Manga/SayonaraZetsubouSensei''. Zhuangzi is even quoted.
[[/folder]]

[[folder:Comic Books]]
* At the end of Creator/GrantMorrison's run on ''Comicbook/DoomPatrol'', Crazy Jane finds herself trapped on a mundane [[AlternateUniverse alternate Earth]], being treated by Marcia, a psychologist who regards her strange memories and dreams as delusions. The vividness of Jane's stories and the ineffectiveness of psychotherapy in explaining them away leads Marcia to doubt whether she's doing the right thing. After another doctor forcibly subjects Jane to electro-convulsive therapy, Jane appears to be cured of her delusions and her multiple personalities, but she gives Marcia the "Mystery Coin" she described in her stories, confirming Marcia's suspicion that Jane was not simply mentally ill.
** Morrison uses it again in ''Comicbook/TheInvisibles'', when Jack Frost tries to engage in one-on-one psychic combat with [[EldritchAbomination the King-of-All-Tears]]. Among the various tactics it uses (such as MindRape) is having illusions of his teammates show up, telling him that they've managed to win, and he can break that warding circle now...
* ''Comicbook/TheInvisibles'' actually provides several alternative explanations of how everything that happens in it may be a case of RecursiveReality: the whole story might have been a [[spoiler:drug hallucination]] experienced by one of the characters, or an [[spoiler:in-universe example of SelfInsertFic]] by another character, or a [[spoiler:futuristic video game]] produced by a third character, or...
* One DonaldDuck comic revolves around the world being the dream of an ancient cephalophoid monster slumbering in a city at the bottom of the sea. Yes, there exists ''a Donald Duck CosmicHorrorStory''.
* In Creator/NeilGaiman's ''Comicbook/TheSandman'', Dream subjects a character (who'd accidentally captured Dream in an attempt to seal Death and gain immortality) to a punishment of "eternal waking". The character in question continually dreams that he's woken up, only to see some nightmarish thing that [[OrWasItADream tells him he's still dreaming]], only to wake up from that dream... [[spoiler: For five real-time years!]]
* Invoked in one ''Comicstrip/CalvinAndHobbes'' strip, when he wakes up, gets dressed, eats breakfast, walks outside, and hears his mother telling him to get up. Then he wakes up again in his bed.
-->'''''Calvin:''' My dreams are getting way too literal.''
** And [[http://i.imgur.com/kuiCm.jpg later played for laughs and drama]] when he puts on a coat, walks outside, trips over a rock, and falls off a cliff miles into the air. Then he wakes up, gets dressed, leaves the house, and falls out the door through the sky. Then he wakes up, and is clearly ''terrified to get out of bed.''
* ''Comicstrip/{{Garfield}}'''s [[http://www.gocomics.com/garfield/1989/10/26/ delusional Halloween strip week, anyone?]] While WordOfGod has apparently stated that this was a one-off event and that the comics aren't really the result of a delusional Garfield, some fans still speculate.
* TheQuestion (whose Sensei nicknamed him "The Butterfly") is [[CatchPhrase fond of]] throwing around the {{Zhuangzi}} quote, [[NonSequitur whether the context calls for it or not.]] He's even used it as a pick-up line.
[[/folder]]

[[folder:Film]]
* ''Film/StarTrekGenerations''. Captain Picard and Dr. Soran, the villain, enter the Nexus, a dimension of eternal pleasure that shapes itself to your desires. Picard is told by a mental projection of Guinan that he can use it to travel anywhere in time, and so he goes back right before Soran blew up the sun that destroyed the planet they were on and the Enterprise. It's entirely plausible that Picard never did leave the Nexus, and that he still exists there to continue his voyages in his own perfect reality. And if he did really travel through time and stopped Soran, whether the Soran that entered the Nexus in the alternate timeline is actually still there. In fact, see the [[WMG/StarTrek Trek]] WildMassGuessing page for more interpretation of this.
* ''TaxiDriver'' shows our sociopathic "hero" getting great praise for his shoot out, right after being probably gunned down. Even if he really did live, you can bet he's still crazy.
* A large chunk of another [[Creator/MartinScorsese Scorsese]]-[[RobertDeNiro De Niro]] film, ''Film/TheKingOfComedy'', can be interpreted as a product of its [[ThroughTheEyesOfMadness protagonist's imagination]].
* ''Film/TotalRecall1990'' (1990): Is it a memory implant gone awry, or all real, or the way story implanted in the memory playing out correctly? In the short story ''We Can Remember It for You Wholesale'' that inspired this (can't say based on, can't even say very, very loosely based on), it ''did'' really happen.
* ''TheThirteenthFloor'' (which [[AdaptationDisplacement is based]] on the novel Simulacron-3) has someone invent an artificial virtual reality world at the beginning, then [[spoiler:reveal that their world is also a virtual reality world.]]
* ''Film/TheMatrix''. Particularly at the end of the [[Film/TheMatrixReloaded second movie]] when Neo was able to stop a machine with his mind in what was supposed to be the real world when nobody had shown powers in the real world before, fans speculated that the "real world" might just have been another layer of the matrix used to control rebellious minds. One of the comics also references the TropeNamer in a short comic where a monk or something beats up some agents.
* The deleted scenes of ''Film/X2XMenUnited'' show that Jason didn't just make Xavier think he was back at the institute, he made him think that he succeeded in convincing Jason to let him escape from the LotusEaterMachine.
* As ''Film/{{Brazil}}'' unfolds, the line between the real world and Sam's dreams gets progressively blurrier. The final scene reveals that Sam's escape [[spoiler:was a delusion, likely brought on by the trauma of being tortured by his friend Jack.]]
* ''Film/EXistenZ''. How many levels of this virtual reality are there? And how do you know when you're in real life?
* ''Film/MinorityReport'': [[spoiler: Did John Anderton clear his name or was the ending of the film just a dream he was having in his containment cell?]]
* ''Film/FourteenOhEight'': The whole movie plays with this concept a lot but especially when [[spoiler: the main character (as well as the viewing audience) is tricked into thinking that he escapes the hotel room and has returned to a normal life before he realizes that it was all a vicious illusion. This arguably comes to an end when he burns the place down and escapes, but there's still the feeling that too could possibly be an illusion.]] Only in the theatrical ending, though. In the director's cut [[spoiler: it's clear he burned the entire room down, though at the cost of his life.]]
* The final MindScrew of ''AmericanPsycho'' is that [[spoiler: [[UnreliableNarrator Bateman himself is unsure how many of his experiences are real or imagined.]] ]]
* The big [[MindScrew brain hump]] of ''MulhollandDrive'' is you don't know which is real; the last half hour, or everything preceding it? Considering that the former is surreal and bizarre, while the latter is mundane and somewhat explains why [[spoiler: a disturbed person might dream up the former to escape her reality]], OccamsRazor says the last half-hour.
* ''Film/MysticRiver'' itself isn't an example, but at the end one of the characters proposes this as a possibility: The recent events are too bizarre for it to be reality, so what if it's all a dream that he is/they are having to shut out a darker reality: [[spoiler: that all three of them were kidnapped and still being molested]].
* This is the entire premise of ''Film/JacobsLadder'', too. The main character keeps bouncing back and forth between two realities, each of which shares some people and places in common, but both of which seem to have demons in them as well. [[spoiler: It's finally shown that he had died in Vietnam, and this was all just an in-your-head Purgatory.]]
* This is a concern in ''Film/{{Inception}}'', so those involved take precautions. [[spoiler:It's also the cliffhanger ending]]
* In ''Film/RepoMen'', we are told throughout the Company has produced a device that can create a idyllic fantasy dream for someone on a life support machine. When the palm tree that is featured in its advert [[spoiler: appears for 'real']], we discover [[spoiler: the entire second half of the film had been a fabrication to placate the conscience of the lead's best friend]].
* ''WesternAnimation/WakingLife'' is a series of psychedelic sequences which mostly feature the main character as an observer, and many of them segue with him waking up yet again.
* ''Film/TheLovelyBones'', to a very small and brief degree, when Susie Salmon [[spoiler: Is attacked by George Harvey in the underground trap, she is seen running from the scene as though she has escaped and is running for her life.]] it is not until a little later we realise [[spoiler: that she is actually dead and this is her ghost's immediate projection of what she wanted to happen. She had actually been killed in the underground lair, but she has no recollection of the event happening.]] This is absent in the original [[Literature/TheLovelyBones book version]], where Susie remembers everything exactly how it happened, and describes it in painful detail.
* ''MrNobody''. From a two-hour film, the most popular conclusion is that only around ''twenty'' minutes of it ''actually happened''.
* ''Film/EyesWideShut''. ''Very'' subtle hints in the movie provide clues that Dr. Harford dreamed up the events of the movie.
* In ''Film/{{Gozu}}'', when the hero wakes from a nightmare he finds the letter that was handed to him in the dream. Is this just another illusion? Or wasn't it a dream in the first place?
* TheReveal of ''TheLegoMovie'' pushes it into this territory [[spoiler: because while it turns out the movie is all being played out by a child, we see nearly all of it from the perspectives of the Lego figurines. While the scene with Emmet moving on his own proves that they have minds of their own, it's not known to what extent they have free will or influence]].
[[/folder]]

[[folder:Literature]]
* Creator/TerryPratchett loves to reference this one. Once he combined this trope with the ButterflyOfDoom in some kind of mega-metaphor involving butterflies.
* ''HouseOfLeaves'' has tons of this. There are multiple layers of narration; Johnny is editing a text written by Zampano about ''The Navidson Record'', which is a movie made by Navidson about the [[color:blue:house]]. Throughout the book, there are hints that Zampano or Johnny are altering or completely fabricating things, or that Zampano made up the film, or that Johnny made up both Zampano and the film, or that ''Johnny himself'' is also made up.
* ''The Three Stigmata of Palmer Eldritch'' by PhilipKDick involves a plot to TakeOverTheWorld through hallucinogens that in theory could take a thousand years to wear off. Every main character takes the drugs at one point or another, more than once [[DreamWithinADream a seeming recovery is merely hallucinated]]. By the end, it's [[MindScrew virtually impossible to decide what's "real" and what's not]].
** The complete mind screw ending of ''The Man in the High Castle'' which seems to somehow end in our world.
** In ''Literature/{{Ubik}}'', the line between the living and the dead existing in "half-life" becomes blurred in the end, after having been seemingly resolved.
*** Dick, who was also the author of the original short story "The Minority Report" and the story that inspired ''Total Recall'', among many others of this type, could be said to owe his whole career to this trope. To a certain extent, his whole life orbited around this trope.
* In the ''Literature/AliceInWonderland'' sequel, Creator/LewisCarroll's ''Through the Looking Glass'' the question is repeated brought up as to whether this is all the Red King's dream, and [[DreamApocalypse what might happen if the Red King wakes up while Alice is still in it]].
** In ''Literature/SylvieAndBruno'', the narrator explicitly thinks it:
-->''"So, either I've been dreaming about Sylvie," I said to myself, "and this is the reality. Or else I've really been with Sylvie, and this is a dream! Is Life itself a dream, I wonder?"''
* This is basically the plot of ''The Red King'', the second novel in the ''Literature/StarTrekTitan'' series. The novel features an eponymous intelligence, which resides within a protouniverse overlapping with our own. As a result of this overlap, its expansion threatens several worlds with destruction. The legends of many local races' speak of the protouniverse, or at least the associated intelligence. They describe it as a sleeping dreamer, the surrounding region of space being the content of the dream. The expansion and its resultant destruction is therefore supposedly the [[DreamApocalypse dream coming to an end as the being begins to wake]]. Frane, a native of the Neyel (whose world is part of the threatened region), describes the myth to the ''Titan's'' crew:
-->"And when it wakes, it ceases to dream. But all the worlds that surround it are part of that dream. Like Newaerth, the first world to vanish as the Sleeper begins stirring from its long ages of slumber".
* ''GodelEscherBach'' uses several of these, nesting several layers of drama. In one story, Achilles and the Tortoise are on an airship and start reading a book about themselves, and inside the book. The bad news is that the story doesn't "pop back" all the way to the last level, and the initial story is still left hanging. The good news is that the Tortoise and Achilles can move up to a previous level using popcorn.
* This is basically the entire premise of a Jostein Gaarder novel ''SophiesWorld''.
* Pedro Calderón de la Barca's ''Life is a Dream,'' a 17th-century Spanish play, deals with [[ExactlyWhatItSaysOnTheTin the conception of life as a dream]] particularly in the first act.
* ''Literature/{{Liar}}'' by Justine Larbalestier is told from the point of view of a [[UnreliableNarrator compulsive liar]], who lies to the reader. To make things worse, she even lies about her lies, most notably on the issue of [[spoiler: whether Jordan is alive or not, or even if he's ''real'']].
* In Creator/RobertEHoward's "The Mirrors of Tuzun Thune", the mirrors nearly trap {{Kull}} in another world.
-->''For there are worlds beyond worlds, as Kull knows, and whether the wizard bewitched him by words or by mesmerism, vistas did open to the kings gaze beyond that strange door, and Kull is less sure of reality since he gazed into the mirrors of Tuzun Thune.''
* Polaris by HPL is based on this entirely.
* The ''{{Goosebumps}}'' book ''I Live In Your Basement'', to the point of being a MindScrew.
* Stanislaw Lem did this in his novel ''The Futurological Congress''. With hallucinogens being used as a war weapon, neither the protagonist or the reader is really sure when or if things get back to reality.
* Some Literature/ChooseYourOwnAdventure books had the results of really bad screw-ups followed by "it was all a dream". An [[TVTropesWikiDrinkingGame egregious]] exanple is ''Space and Beyond''; one ending has it be AllJustADream; the rest of the endings say that it is not.
* Several times during the course of ''TheCircleSeries'', Thomas Hunter actually asks himself whether he's dreaming or not. [[spoiler: He never does figure out which he's actually living in.]]
* Creator/StephenKing's ''Literature/PetSematary'' includes a heart-wrenching scene in which the protagonist has exactly this kind of dream.
* The second series of Hawkmoon novels by Michael Moorcock start with the hero trying to be happy with his wife and young family but being haunted by the ghosts of his friends who died at the climax of the first series. It then switches around to him being comforted by those friends having recovered from a delusion caused by the death of his new wife instead.
* In MichaelFlynn's ''[[Literature/SpiralArm The January Dancer]]'', the CompellingVoice can make you forgot things. As a consequence, you can't be sure that anything you know really is true. Perhaps the person with the Dancer has taken over the galazy and you just don't realize because you've been ordered not to. Perhaps the Dancer made you think that you had destroyed it. Perhaps. . . .
* Not a dream, but ''Literature/GalaxyOfFear: The Nightmare Machine'' has the titular Nightmare Machine, a real-seeming simulation. A large chunk of the book, by the end, is revealed to have been simulated through it; the protagonists thought they had gone in for a minute, experienced a brief simulation, and left, but of course they had not.
* In AndreNorton's ''Storm Over Literature/{{Warlock}}'', Thorvald wonders if they could tell whether meeting each other was another of the dreams.
* The ''Series/ForeverKnight'' tie-in novel, "Imitations of Mortality", has Nick having a series of dreams where he and other vampire characters are human, while the human characters are vampires. Each time he goes to sleep in one world, he wakes up in the other.
[[/folder]]

[[folder:Live Action TV]]
* One ''Series/BuffyTheVampireSlayer'' episode has her [[CuckooNest "wake up" in an insane asylum]], having dreamt the last few seasons in a fugue. In the end, Buffy decides that Sunnydale is real and saves her friends... and then we see her psychologist pronounce her too far gone to save. Presumably the rest of the series is her continued hallucinations; how Series/{{Angel}} fits in is anybody's guess.
** The writers of that episode admitted in the commentary that they were going for a MindScrew and didn't think so many people would go as far as to declare the entire series and its spinoff a delusion. JossWhedon told the New York Times that the matter is open to interpretation and that he personally subscribes to the belief that Buffy's life in Sunnydale is not a delusion.
** Another point of view is that all fiction is delusion, and the creation of an additional layer of crazy-Buffy metadelusion doesn't really change anything.
* ''Series/StargateAtlantis'':
** "Home" ends with [=McKay=] asking if they were really relased from the fake mental world projected to them by a cloud of sentient gas. The gas then yells at him that it's real.
** "The Real World" ends with the heroes briefly wondering if the reality they're in is real or another Asuran deception, then quickly deciding [[BellisariosMaxim they'd rather not know]].
* ''Franchise/StarTrek'' [[BlatantLies never used this trope]].
** ''Series/StarTrekDeepSpaceNine'':
*** An undeveloped script idea for ''Series/StarTrekDeepSpaceNine'' had Chief O'Brien and Julian Bashir trapped in a virtual reality prison. They escape and make it back to [=DS9=], only to find that they're still in prison, so they escape again and make it back to [=DS9=]. The episode was to end with O'Brien telling his wife that he didn't know for sure if he'd actually escaped, and he never will.
*** The season 7 episode "Extreme Measures" does this exact thing with O'Brien and Bashir, when Sloan's mind tricks them into believing they've returned to reality (when in actuality they are still inside his mind, slowly dying with him).
*** A similar concept would also be used in the 6th season episode "Far Beyond the Stars" in which Sisko hallucinates that he is Benny Russell, a pulp fiction writer, whose latest story stars none other than Sisko. It gets even more extreme in that Benny Russell has hallucinations about being Sisko. At the end of the episode Sisko is telling his father that for all he knows he is a figment of his own (alter-ego Benny Russell's) imagination.
*** ThePowersThatBe apparently toyed with the idea of having the entire series (and therefore the entire TrekVerse?) being ''all'' Benny Russell's book.
** ''Series/StarTrekVoyager'':
*** This appears to describe an episode of ''[[Series/StarTrekVoyager Voyager]]'' involving a species which spend their entire life dreaming. Only [[MagicalNativeAmerican Native American spirit magic]] can free the crew... or something.
*** In another episode, the crew falls prey to a gigantic space pitcher plant. It makes the crew [[LotusEaterMachine see what they want to see]] (a worm hole to Earth), but they would actually be flying into its stomach. Seven of Nine and Naomi Wildman are the only ones immune because Seven was a Borg since childhood and Naomi was born on the ship; [[YouCantGoHomeAgain the whole "getting home" thing]] is not either's ultimate ambition. However, at one point Seven believes the ship has escaped. It turns out that it is just the creature showing her what she wants to see (that is, Voyager outside the creature), because not getting eaten is ''very much'' something Seven and Naomi both desire.
** ''Series/StarTrekTheNextGeneration'':
*** In "Ship in a Bottle", [[spoiler:Picard and Data were in a holographic simulation of the Enterprise, thinking they had exited the program, trying to fulfill Moriarty's request to be let out. They were still in the Holodeck, and Moriarty was actually holding them hostage. They eventually catch on. At the end a holographic Moriarty thinks he escaped from the computer-- but he is actually "exploring" a 24th-century screen saver.]] At the end, Picard speculates about his crew being someone else's entertainment in a little box... ''oooh, meta.''
*** "Frame of Mind" both explores and inverts this trope, nearly driving Commander Riker insane.
*** The trope is invoked in the first season episode that introduced the holodeck into the ''Star Trek'' universe, "The Big Goodbye."
* ''Series/TheXFiles'' episode "Field Trip" dealt with this trope.
--> "Name me one hallucinogen that loses its effectiveness because you know you've taken it. ''We're still there.'' "
* ''Series/RedDwarf'':
** "[[LotusEaterMachine Better Than Life]]" from Season 2, and at least one novel. By the end of the series, it's impossible to tell whether they've really escaped the game, or the game just lets them ''think'' they have. (It does explain a lot of the [[LampshadeHanging self-admitted]] [[MohsScaleOfSciFiHardness implausible science]].) The episode plays it almost entirely for laughs. The book version was much darker. The show version was basically the Holodeck driven by whatever your surface wish was; no mistaking it for reality. The book lets us go a good while thinking the cast has fully made it home. Over much of the rest of the book they manage to escape, and find that things were still a ''little'' too good to be true. When they escape for ''real,'' a message left by the creator of the game appears to congratulate them, and they finally return to the real world. Hopefully. Apparently, they ''wanted'' to do it this way all along in the show but budget or something didn't allow - in "Future Echoes," elderly Lister has "U=BTL" etched into his arm. No attention is called to it at the time (or ever, in the show. In the book, we see this happen in book 1 and Lister notices. Better than Life is book 2.)
** "Back to Reality", the season 5 finale. The crew dies, only to see the "Game Over" text appear and shortly afterwards wake up in VR-game chairs... The series continued after that episode, of course. It plays the concept very seriously. Not only did this sort of go hand in hand with the series "growing up" over time, it also helped create multiple levels of mindscrew.
** At the end of series VI in "Out of Time." Just before the cataclysmic ending, Starbug hits a "reality mine" -- a pocket of alternate history space. Followed immediately by Rimmer deliberately triggering a strange sort of GrandfatherParadox. Followed immediately by the [[spoiler: future Dwarfers]] triggering ''another'' GrandfatherParadox. How many layers of unreality can two minutes of airtime possibly layer ... ?
** Season 8, episode 3, when they [[spoiler:return to the reconstructed Red Dwarf, courtesy of the Nanites,]] and are placed in the brig after signing agreements to participate in a trial involving psychotropic drugs that will cause them to hallucinate. They engineer a daring escape before the trial and make it out into space, at which point they realize that the entire escape attempt has been a hallucination. They enlist the aid of the reconstructed Rimmer and break out again... and realize that, once again, they've all been duped. When they finally make it out of their hallucinated trial, Rimmer asks, "Is this reality? But how can we be sure?" Cat poignantly states, "Why do we care? Nothing makes any sense no matter where we are!"
* A CruelTwistEnding from the ''Series/TheOuterLimits'' {{revival}} episode "Tempests": did the hero escape early in the episode, or at the end? Neither--he's still hallucinating.
** Happens InUniverse as part of a condemned criminal's sentence: he's doomed to have nightmares of being murdered by his victim over and over again, "waking up" from one nightmare to the next.
* Played with at the end of a LotusEaterMachine episode of ''Series/StargateSG1''--the protagonists are certain they're in the real world. The guy who trapped them in virtual reality wouldn't be freaking out over the other people they've led to escape ruining his beloved garden if it were virtual.
* In the American version of ''TouchingEvil'', Creegan befriends Cyril, a homeless man who believes that he's dreaming the show's reality, and that when he goes to sleep, he's really waking up in the "real" world, the space colony Alpha 9.
* An episode of ''Series/{{Farscape}}'' has Chiana introducing John to a buggy VR program based on his memories. John manages to find an exit, only to end up getting captured when [[MagnificentBastard Scorpius]] escapes from confinement and takes everyone hostage. After a great deal of [[CouldntFindAPen bloodshed]], John finally breaks out of his cell... only to realise that he's still playing the game when he finds one of the hint-vouchers in his pocket.
** Interesting to note in this case is that typically, when this trope occurs in an episode/issue of a running series, the possibility of still being trapped in the illusion is almost NEVER brought up in later episodes. ''Series/{{Farscape}}'' features an aversion in that, at the start of the next episode, Crichton and Noranti pull up to Moya in a transport pod, only to find that there's no response, exactly as it had happened in the game's simulation of the real world. John momentarily wonders if they had not actually escaped at all... only to realise that Moya's been invaded by a gang of bounty hunters.
* ''Series/{{Supernatural}}'':
** The show's [[OurGeniesAreDifferent version of the genie]] seen in "What Is And What Should Never Be" works that way: he grants you your wish by making you hallucinate he did, while feeding on you till you die. Because ''Supernatural'' is [[SarcasmMode optimistic.]]
** The Season 3 episode "Dream A Little Dream Of Me" follows a similar plot to the movie ''{{Film/Inception}}'' (although the episode predates the film by a couple of years), with people hopping in and out of one another's dreams and controlling them; the similarity extends to the episode being a total MindScrew in places.
** [[InvokedTrope Invoked]] in season 7. Sam's hallucination of Lucifer taunts him with the idea that he never escaped from Hell and the events of seasons 6 and 7 was just Lucifer using his RealityWarper abilities to mess with him. After a confrontation with Dean, Sam (and the show) decide that this isn't the case, but that hasn't stopped the EpilepticTrees.
* There was a ''Series/TheTwilightZone'' episode in which the entire story consisted of a woman's repeatedly waking up from nightmares, only to find each time that [[DreamWithinADream she was still dreaming]].
* Played with in ''{{Chuck}}'' but only for a moment. After an episode putting Chuck's mental health in question the end of the episode shows that Chuck is not crazy. However, then he wakes up back in the mental ward. However, the mental ward scene is only for a moment before it becomes clear that it is another vivid dream, and not!crazy Chuck is in fact reality.
* ''Series/DoctorWho'' plays with this in the episode ''Amy's Choice'', when the "Dream Lord" traps the Doctor and his two companions in two deadly situations which they switch between by falling asleep every five minutes or so, claiming one of them to be real and one of them to be a dream, and that if you die in the dream you wake up in reality, while if you die in reality, "[[DeadpanSnarker you die, stupid, that's why it's called reality]]". [[spoiler: In the end, the Doctor, in a twist of genius, realises that the Dream Lord gave them a choice between two dreams, because he "conceded defeat" and revived the dead TARDIS, while the Dream Lord is supposed to have no power over reality. He subsequently blows up the TARDIS to [[KillEmAll kill them all]], and they all get returned to reality, where they were brought into a collective hallucination by a few grammes of psychotropic dust, and the Dream Lord is just an inner demon within the Doctor.]]
* ''Series/{{Lost}}'': Hurley spent an episode believing that the Island was a hallucination and that he was still back at Santa Rosa Hospital. Desmond seems to have these reality doubts sometimes too.
* ''Series/{{Angel}}'' has a mini-version of this in a Season 4 episode. [[spoiler: Angel is seen to defeat the demon and (finally) go to bed with Cordelia. Then we realize it was a dream designed to make Angel lose his soul in a moment of perfect happiness (understandably, sleeping with Charisma Carpenter = perfect happiness).]] It intersects with YourMindMakesItReal; it qualifies here because the audience doesn't realize it's a dream until it's over, and this event blurs the lines between (in-show) reality and dream.
** Also used in the fifth season episode "Soul Purpose." Angel is under the influence of a parasite the makes him go through his worst fears and insecurities; while under its effect each time it seems like he's finally woken up it turns out he's still under the effects of the parasite and is dreaming.
* The basic premise of ''Series/{{Awake}}'', in which Detective Michael Britten has one life in which his son died and his wife is still alive, another where it's vice versa. Both are equally real to him.
* One very simple [[OntologicalMystery interpretation]] of ''Series/{{Life On Mars|2006}}'' and ''AshesToAshes'' is that it is all in the mind of the main characters.
* The final episode of BeingHuman. The devil creates different dreamworlds for all the main characters in which they have to choose their previous lives or the new ones.
** [[spoiler: There is also a big debate whether the trio is now in the real world or in a dream after killing the devil.]]
*** If you want a more definite answer there is an extra scene here: http://www.youtube.com/watch?v=30fnJqB_3Cw
* The ultimate example of this is the [[StElsewhere Tommy Westphall]] Universe theory. The final episode of StElsewhere reveals the entire show to be in the imagination of an autism boy named Tommy Westphall. The show had a crossover with HomicideLifeOnTheStreet, a show that has JohnMunch who appeared on eight other shows, meaning that all these shows and all the shows those shows had crossovers with and so on and so on are a figment of his imagination. There are, of course, arguments against this theory, such as saying that Tommy Westphall simply watched the show HomicideLifeOnTheStreet and imagined his characters having a crossover with them. Another is that if a person has a dream about something, i.e. a real place like London, that doesn't mean that place exists only in that Universe. It was simply that Universe's version of the place or person. Because of this, we'll never know if dozens (if not ''hundreds'') of shows take place in his imagination or not.
[[/folder]]

[[folder:Music]]
* The opening lyrics of the [[Music/{{Queen}} "Bohemian Rhapsody"]] is a well-known example.
-->Is this the real life?
-->Is this just fantasy?
-->Caught in a landslide,
-->No escape from reality.
* Jonathan Coulton's song Creepy Doll ends something like this:
-->You decide that you've had enough
-->And you lock the doll in the wooden box
-->You put the box in the fireplace
-->Next to your bag of big city money.
-->As the smoke fills up your tiny room there's nothing you can do
-->And far too late you see the one inside the box is you.
** This is actually (or also) a reference to the original ghost story the song is based on, in which the doll drives its owner insane enough to try destroying it once and for all, and when they do, it takes over their body (or just vanishes, its mischief complete, depending on the retelling) and leaves the owner in the form of a new doll, ready to do the same to the next person who picks it up.
[[/folder]]

[[folder:Theater]]
* Creator/WilliamShakespeare's ''Theatre/TheTamingOfTheShrew" begins with a FramingDevice of a drunk vagrant named Christopher Sly who passes out. A passing noble decides it would be good fun to mess with Sly's head and have all his servants pretend Sly is a lord when he wakes up, telling him that he was sick for like fifteen years or something. Sly asks himself "Do I dream? Or have I dream'd till now?"
** The same kind of plot is not unknown in the european theatre of that period : Compare with the Spanish play ''La Vida es sueño'' (Calderon, 1635) and the lesser-known French play ''Le Songe des hommes eveillés'' (Des Brosses, 1646)
[[/folder]]

[[folder:Toys]]
* In ''Franchise/{{Bionicle}}'', a character asks the question of whether [[spoiler:Metus]] is a snake dreaming he's an Agori or an Agori dreaming he's a snake.
[[/folder]]

[[folder:Video Games]]
* ''VideoGame/{{Catherine}}'': The day before Vincent's final climb, he wakes up to find Catherine in his bed and Katherine banging on his door. There's a tense scene between the three until the [[TheOtherDarrin K/]] [[OneSteveLimit Catherine]]s start to fight. Katherine backs up to a sink, looking for a knife that Catherine already has. The two women fight and Catherine ends up getting stabbed before Vincent and Katherine are pulled into the dream world and have to climb to escape a monster [[spoiler:demon form of Catherine]]. At the top, Katherine [[DriventoSuicide tries to throw herself off]] but Vincent saves her, and going through the top door....wakes him up. He realizes it was all a dream when Katherine shows up and he openly admits to her about Catherine in an attempt to explain the dream and she admits to having already known about Vincent's other woman.
* Maribel Han in the AllThereInTheManual material for ''Videogame/{{Touhou}}'' has a dual existence in a grayer Earth and in Gensokyo. It's mentioned that she visits the rest of the cast often, however we have never seen her directly in Gensokyo. It is [[WildMassGuessing speculated by some]] that she has a [[RealityWarper different identity]] when dreaming.
* Zhuangzi's poem is the source of all the butterfly symbolism in the ''VideoGame/{{Persona}}'' games, as referenced by ''Megami Ibunroku Persona's'' intro. The remake even references this in the opening lyrics.
--> ''Dream of butterfly / Or is life a dream? / Don't wanna wake up / [[SpoilerOpening Cause I'm happy here]]'''
* ''SilentHill1's'' Bad Ending shows us the protagonist dying in his broken car; apparently all the game was just [[DyingDream a dream he had between the car crash and his death]]. Other endings are less unhappy, though... except for the one where he kills his daughter and he and an InnocentBystander get roasted alive in a collapsing [[DarkWorld hell-dimension]]. Oh, and there are four sequels; he's revealed to have survived in the third [[spoiler: [[SuddenSequelDeathSyndrome only to be killed off-screen]]]].
* Part of the ending of the Ciel route in ''{{Tsukihime}}'' involves Shiki in a mental dream world where there are no vampires, Ciel is just a normal girl and he doesn't have his [[MagicalEye Eyes of Death Perception.]] He catches on pretty quick and has a little chat with his Nanaya side over whether he wants to leave or not, because leaving most likely means death.
* The whole point of ''EternalSonata'' is the question of whether Frédéric Chopin is [[DyingDream just having an extremely lucid fever dream]], or if he really is in another world. [[spoiler:He eventually decides that it ''is'' a dream designed to have him accept death, but having deduced that Polka is trapped in a GroundhogDayLoop, attempts a SuicideByCop to end the dream and spare her from her fate. When he is defeated but does not wake up, he realises that the world ''is'' reality to its inhabitants, and uses his powers over the dreamworld to save Polka]].
* ''TheLegendOfZeldaLinksAwakening'' - [[spoiler:The island is nothing but one big dream, and the point of gathering the 8 dungeon items this time around is to wake both you and the Wind Fish up. Link is oblivious to this since you aren't directly told that it's a dream until late in the game, but the owl and boss monsters don't really try to hide this fact from you]].
** It should also be noted that at one point you end up in a dream sequence ''inside'' the dream world in order to get the Ocarina.
** This makes it a hell of a DownerEnding, though: [[spoiler:The Wind Fish is who is ''having'' the dream. Waking it up ''erases the entire island and everyone you've met,'' though the GoldenEnding ''seems'' to mean Marin got her wish of being a seagull.]]
* Referenced in [[MultipleEndings one of the endings]] to ''YoJinBo''. Sayori wakes up at home, alone, in her own bed, and assumes her adventure in 19th century Japan was just a dream. And yet, she says she can't shake the feeling that that time was the "real" time, and today's present is only a dream that her 19th century self is having.
* Occurs in a particularly soul-crushing way at the end of ''RealmsOfTheHaunting''.
* Parodied in ''VideoGame/ChronoTrigger'' in the Kingdom of Zeal.
--> Am I a man dreaming I'm a butterfly, or a bowling ball dreaming I'm a plate of sashimi?
* In ''Videogame/MassEffect3'', Joker discusses this trope after [[PlayerCharacter Shepard]] [[spoiler: takes a virtual trip through the geth consensus]], wondering if you really came back out or if you're still in there and everything you're seeing now is an illusion. It becomes HilariousInHindsight when you consider some of the [[EpilepticTrees fan theories]] that came out about the ending of the game.
* ''VideoGame/MonkeyIsland2LechucksRevenge'' has an infamous GainaxEnding that makes it [[TheEndingChangesEverything extremely unclear what exactly happened]]. Once [[TheHero Guybrush]] finds [[MacGuffin Big Whoop]], things become [[MakesAsMuchSenseInContext progressively weirder]] until he finds himself in what is either a LotusEaterMachine or [[AllJustADream reality]]... until things are made even more confusing as during TheStinger another character is shown [[OrWasItADream impatiently waiting for him in the "other" reality]]. The next game cleared all this up, though (by applying heavy {{retcon}}ning).
[[/folder]]

[[folder: Web Comics]]
* In [[http://www.jsayers.com/thingpart/thingpart218.html this]] ''[[http://www.jsayers.com/thingpart/thingpart.html thingpart]]'', is the boy hallucinating on a subway, is he hallucinating that he's playing with psychologist dolls, is he hallucinating that he's hallucinating on a subway, is he hallucinating that he's hallucinating on a subway from the other direction, is he not hallucinating at all and either the whole thing is a MindScrew or the second through fourth panels or first through third panels are hypothetical, or doe the rabbit hole go even deeper in unseen panels?
* ''Webcomic/BobAndGeorge'' [[http://www.bobandgeorge.com/archives/010304c Can the characters change the past of the Megaman games so that the author never gets hooked on them and so never starts the strip?]] (Note that The Author is a character in the story, too.)
** A more straightforward example: [[http://www.bobandgeorge.com/archives/011223c Waking up from the Megaman universe]] is [[http://www.bobandgeorge.com/archives/011224c just a dream]]
* ''TheDreamer'' relies heavily on this trope, as Beatrice and the audience is unsure whether or not her dreams are simply that, or an AlternateUniverse.
* In ''Webcomic/KoanOfTheDay'', the guru begins to worry that he is [[http://www.koanoftheday.com/21/ merely a reflection in the lake]].
* In ''{{Sinfest}}'', [[http://www.sinfest.net/archive_page.php?comicID=2526 Pooch is confused by memory]] -- [[http://www.sinfest.net/archive_page.php?comicID=2527 what if he's not really in the time he thinks he is, but in the future, remembering.]]
* In ''{{Webcomic/Freefall}}'', [[http://freefall.purrsia.com/ff300/fv00279.htm Sam asks for all virtual reality to be turned off. Helix prankishly covers his eyes.]]
* The world of the ''{{Franchise/Buildingverse}}'' (''{{Webcomic/Roommates}}'', ''Webcomic/GirlsNextDoor'', ''Webcomic/DownTheStreet'' and ''{{Webcomic/Superintendent}}'') is by definition recursive and mind screwy (things like fiction being real ''and also'' acknowledged to be fiction is normal) but there was also interaction with {{Film/Inception}} and a full blown LotusEaterMachine. Even the ''readers'' routinely joke about their own possible fictionality.
* The ''Webcomic/ElectricWonderland'' story "The New Adventures of the Nettropolis Narvel" starts off with eponymous Narvel performing typical superheroic duties in cyberspace, only to abruptly find himself in a psych ward. He soon learns that he's not really a superhero, but a madman who lived his life in a simulation chamber to [[TrumanShowPlot entertain viewers of a Venezuelan TV channel.]] However, Narvel eventually re-enters the life he led as a crimefighter, revealing that the world in which he had superpowers was nothing more than a simulation in a chamber in cyberspace.
* Spoofed in ''Webcomic/TheOrderOfTheStick''. Shortly after escaping from a LotusEaterMachine, Roy thanks Elan and says he did a good job. Elan panics and thinks he's still in the dream, and Haley has to assure him that Roy was being sincere.
[[/folder]]

[[folder:Web Original]]
* During the Third Night of ''TheTaleOfTheExile'' Gaven Morren, the protagonist, is dosed with a potent hallucinogen. As he's the narrator, we only see things from his point of view, making his perception of events [[UnreliableNarrator questionable at best]]. How much of the danger he faces is real and how much is in his head is [[ShrugOfGod an open question]], especially since his guide isn't being honest with him. [[spoiler: For good reason, too, as [[DreamApocalypse She'll cease to exist]] if he stops [[ClapYourHandsIfYouBelieve believing in her presence]].]]
[[/folder]]

[[folder:Western Animation]]
* Bender in ''WesternAnimation/{{Futurama}}'' [[LampshadeHanging Lampshades]] this when the episode "Obsoletely Fabulous" turns out to be just a dream while he gets a compatibility upgrade:
-->'''Bender:''' "Uff. If that stuff wasn't real, how can I be sure anything is real? Is it not possible, nay, probable that my whole life is just a product of my or someone else's imagination?"
-->'''Clerk:''' "No, get out. Next!"
-->''Bender then walks out into a world of magical beer fairies and cigar trees while whistling.''
** "Anthology of Interest 1" shows several characters' theoretical scenarios playing out on the Professor's "What if" machine, only for it to be revealed at the end that the whole episode was one big "What if" scenario for Professor's Fing-longer invention shown at the beginning. This raises certain questions when the "What if" machine makes a repeat appearance in "Anthology of Interest 2".
* Played with in the ''[[WesternAnimation/BeavisAndButthead Beavis and Butt-Head]]'' episode "Cow Tipping" when the duo are watching the Music/ViolentFemmes' video for "Nightmares". Beavis mentions that he had a "real scary" nightmare the night before where "everything sucked". Butt-Head replies "But Beavis, everything ''does'' suck!", causing Beavis to scream in terror under the "revelation" that he is still in said dream where "everything sucks". The rest of the scene involves Beavis doing this every time Butt-Head ''or'' Beavis himself mentions that something "sucks".
[[/folder]]

[[folder:Real Life]]
* The Chinese philosopher [[http://en.wikipedia.org/wiki/Zhuangzi_dreamed_he_was_a_butterfly#The_butterfly_dream Zhuangzi]] is the TropeCodifier. Zhuangzi, however, did not think reality could be a dream. He was not Buddhist, idealist, rationalist, or (ontological) dualist. The short anecdote actually finishes "Zhōu and the Butterfly, there must be distinction. This is the 'becoming of things'." 'Becoming of things', 物化 "wùhuà", can also translated as 'transubstantiation,' 'objectification,' or 'being.' The point is not that life might be a dream but that the distinction between dreamer and dream, thinker and thought, subject and object, the distinction itself is ontologically fundamental (a philosophy similar to Descartes' "I think therefore I am"). While early Daoists did not have the same concept of consciousness as Continental philosophers this is really closer to Phenomenology than the popular Buddhist/idealist interpretation used in this trope.
* This trope probably derives from a dream commonly experienced during the earliest stages of deep mourning. In the dream the dead person is still alive, and it's explicitly stated in the dream (either by the dreamer or the deceased) that the "mourning" the dreamer has just gone through was nothing but a bad nightmare. The dreamer then awakes and suffers extreme confusion. It's common enough that journal articles and even a book have been written about it.
* A fairly common one is [[http://en.wikipedia.org/wiki/False_awakening false awakening]] Which, if it happens enough, just gets annoying.
* Another fairly common dream/hallucination right after serious injury is that the injured person suffers the delusion that the injury didn't happen and continuing the remainder of their day in their dream (especially if passed out from pain). It can lead to a confused state when arriving in the hospital or coming back to reality in the ambulance.
* The personality disorder called Solipsism has the person believing everything around them is a figment of their imagination or similar. Most of these people are entirely normal-seeming folk who will treat the people around them civilly despite them being "unreal".
** Solipsism is also both a philosophical belief and a common argument against empiricist and sceptic philosophy (we can only know what our senses tell us and what we experience, but since we are often mistaken, and our senses decieve us sometimes, maybe we can't). The idea is that if you doubt everything, then what is left is total uncertainty, a life which is near-impossible to lead and one which most people would find utterly pointless. Philosophical solipsism can be summed up as "My mind is something I know for sure exists, but as for anything or anybody else..."
[[/folder]]

----