"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."
In 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 Zetsu pretty much lets the reader know the rest of this isn't genjutsu.
×××HOLiC actually even refers to the above quote and it is an allegory of a central theme in the series.
In Get Backers, in one of the episodes, an elderly homeless man asks the Get Backers to save his daughter from the mafia. 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 Ghost in the Shell 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!
.hack//SIGN ends with 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.
JoJo's Bizarre Adventure: Gold Experience Requiem's powers are 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 never die, either.
Never really happens in El-Hazard: The Magnificent World, but at one point Makoto wakes up after having a weird dream. Since he's not entirely sure that 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?
Vision of Escaflowne: 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, 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 Haruhi Suzumiya? At least Koizumi sets this as one of the possible theories.
At the end of Grant Morrison's run on Doom Patrol, Crazy Jane finds herself trapped on a mundane 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 The Invisibles, when Jack Frost tries to engage in one-on-one psychic combat with the King-of-All-Tears. Among the various tactics it uses (such as Mind Rape) is having illusions of his teammates show up, telling him that they've managed to win, and he can break that warding circle now...
The Invisibles actually provides several alternative explanations of how everything that happens in it may be a case of Recursive Reality: the whole story might have been a drug hallucination experienced by one of the characters, or an in-universe example of Self-Insert Fic by another character, or a futuristic video game produced by a third character, or...
One Donald Duck 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 Cosmic Horror Story.
In Neil Gaiman's The Sandman, 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 tells him he's still dreaming, only to wake up from that dream... For five real-time years!
Invoked in one Calvin and Hobbes 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 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.
Star Trek: Generations. 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 TrekWild Mass Guessing page for more interpretation of this.
Taxi Driver 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.
Total Recall (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.
The Thirteenth Floor (which is based on the novel Simulacron-3) has someone invent an artificial virtual reality world at the beginning, then reveal that their world is also a virtual reality world.
The Matrix. Particularly at the end of the 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 Trope Namer in a short comic where a monk or something beats up some agents.
The deleted scenes of X2: X-Men United 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 Lotus-Eater Machine.
As Brazil unfolds, the line between the real world and Sam's dreams gets progressively blurrier. The final scene reveals that Sam's escape was a delusion, likely brought on by the trauma of being tortured by his friend Jack.
E Xisten Z. How many levels of this virtual reality are there? And how do you know when you're in real life?
Minority Report: Did John Anderton clear his name or was the ending of the film just a dream he was having in his containment cell?
Fourteen Oh Eight: The whole movie plays with this concept a lot but especially when 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 it's clear he burned the entire room down, though at the cost of his life.
The big brain hump of Mulholland Dr. 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 a disturbed person might dream up the former to escape her reality, Occam's Razor says the last half-hour.
Mystic River 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: that all three of them were kidnapped and still being molested.
This is the entire premise of Jacobs Ladder, 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. 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 Inception, so those involved take precautions. It's also the cliffhanger ending
In Repo Men, 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 appears for 'real', we discover the entire second half of the film had been a fabrication to placate the conscience of the lead's best friend.
Waking Life 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.
The Lovely Bones, to a very small and brief degree, when Susie Salmon 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 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 book version, where Susie remembers everything exactly how it happened, and describes it in painful detail.
Mr. Nobody. From a two-hour film, the most popular conclusion is that only around twenty minutes of it actually happened.
Eyes Wide Shut. Very subtle hints in the movie provide clues that Dr. Harford dreamed up the events of the movie.
In 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?
The Reveal of The Lego Movie pushes it into this territory 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.
House of Leaves 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 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 complete mind screw ending of The Man in the High Castle which seems to somehow end in our world.
In 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.
"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 Star Trek: Titan 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 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".
Gödel, Escher, Bach 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. 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 Sophie's World.
Liar by Justine Larbalestier is told from the point of view of a compulsive liar, who lies to the reader. To make things worse, she even lies about her lies, most notably on the issue of whether Jordan is alive or not, or even if he's real.
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.
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.
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 Michael Flynn's The January Dancer, the Compelling Voice 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 Galaxy of Fear: 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 Andre Norton's Storm Over Warlock, Thorvald wonders if they could tell whether meeting each other was another of the dreams.
The Forever Knight 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.
Live Action TV
One Buffy the Vampire Slayer episode has her "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 Angel fits in is anybody's guess.
The writers of that episode admitted in the commentary that they were going for a Mind Screw and didn't think so many people would go as far as to declare the entire series and its spinoff a delusion. Joss Whedon 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.
An undeveloped script idea for Star Trek: Deep Space Nine 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.
The Powers That Be apparently toyed with the idea of having the entire series (and therefore the entire Trek Verse?) being all Benny Russell's book.
This appears to describe an episode of Voyager involving a species which spend their entire life dreaming. Only 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 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; 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.
In "Ship in a Bottle", 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."
The X-Files 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. "
"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 self-admittedimplausible 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 Grandfather Paradox. Followed immediately by the future Dwarfers triggering anotherGrandfather Paradox. How many layers of unreality can two minutes of airtime possibly layer ... ?
Season 8, episode 3, when they 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!"
Happens In-Universe 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 Lotus-Eater Machine episode of Stargate SG-1—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 Touching Evil, 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 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 Scorpius escapes from confinement and takes everyone hostage. After a great deal of 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. 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.
The show's 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 optimistic.
The Season 3 episode "Dream A Little Dream Of Me" follows a similar plot to the movie 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 Mind Screw in places.
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 Reality Warper 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 Epileptic Trees.
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.
Doctor Who 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, "you die, stupid, that's why it's called reality". 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 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.
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.
Angel has a mini-version of this in a Season 4 episode. 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 Your Mind Makes It Real; 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 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.
The ultimate example of this is the Tommy Westphall Universe theory. The final episode of St. Elsewhere reveals the entire show to be in the imagination of an autistic boy named Tommy Westphall. The show had a crossover with Homicide: Life on the Street, a show that has John Munch 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 Homicide: Life on the Street 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.
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.
William Shakespeare's ''The Taming of the Shrew" begins with a Framing Device 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)
In BIONICLE, a character asks the question of whether Metus is a snake dreaming he's an Agori or an Agori dreaming he's a snake.
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 K/Catherines 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 demon form of Catherine. At the top, Katherine 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.
Zhuangzi's poem is the source of all the butterfly symbolism in the Shin Megami Tensei: Persona games, as referenced by Megami Ibunroku Persona's intro. The remake even references this in the opening lyrics.
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 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 Eternal Sonata is the question of whether Frédéric Chopin is just having an extremely lucid fever dream, or if he really is in another world. He eventually decides that it is a dream designed to have him accept death, but having deduced that Polka is trapped in a "Groundhog Day" Loop, attempts a Suicide by Cop 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.
The Legend of Zelda: Link's Awakening. 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.
Referenced in one of the endings to Yo-Jin-Bo. 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.
Am I a man dreaming I'm a butterfly, or a bowling ball dreaming I'm a plate of sashimi?
In Mass Effect 3, Joker discusses this trope after Shepard 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 Hilarious in Hindsight when you consider some of the fan theories that came out about the ending of the game.
In thisthingpart, 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 Mind Screw or the second through fourth panels or first through third panels are hypothetical, or doe the rabbit hole go even deeper in unseen panels?
The Electric Wonderland 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 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 The Order of the Stick. Shortly after escaping from a Lotus-Eater Machine, 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.
Bender in FuturamaLampshades 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 Beavis and Butt-Head episode "Cow Tipping" when the duo are watching the Violent Femmes' 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".
The Chinese philosopher Zhuangzi is the Trope Codifier. 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 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..."