[Note: this chapter has been edited to address common concerns expressed by readers. The original is included as the next chapter if anyone chooses to read it.]

James and Lily looked at each other helplessly, unsure what to say. "I'm sorry" just seemed so meaningless. But as they turned toward Harry, they saw the pain on his face quickly replaced by renewed determination.

"Using all available data, reconstruct the most accurate genome and brain pattern possible for Hermione Granger, add that information to your user database, then resurrect Hermione Granger."

James and Lily nodded. James spoke first, "Your loyalty and friendship are admirable. Many people have to confront disturbing aspects of their friends' lives, and how they handle such things defines how strong the friendship is."

Lily added "You're doing the right thing-"

"Insufficient memory to complete command."

Harry commanded, "Acquire more memory and do it."

"Warning: request requires level zero access. It is not recommended that you continue without consulting an experienced programmer, the Atlantis Ruling Council, and a philosopher."

"Why is this command more restricted than the one enabling the Interdict of Merlin itself? It wants me to consult politicians? Yeah right. And a philosopher? Even if I needed that consultation, where on earth would I find a philosopher I could talk to about magic and trust with with even hypothetical information about the source of magic? And the people who designed it? I wish I could... Or can I?" Harry thought. He inquired "Are any of the original programmers available in the afterlife simulation?"

"Mainframes one and nine were responsible for tracking and converting the minds of the programming team. The afterlife simulations on those mainframes are not currently available."

"Okay, I can handle this myself. But I should give it more careful consideration." Harry thought, asking "What commands require level 0 access?"

"Level 0 access is required for commands which modify this system's hardware or low level software, are likely to damage or deactivate this system, use more energy than a given threshold, or are likely to severely impact the planet's climate, biosphere, or human population."

Harry thought about this for a moment, "Okay, I'm asking it to add memory. That's obviously a hardware modification. Damage is a concern. I don't understand the units it used to express energy, but there's no reason for it to require significantly more than it uses for 50kg transfigurations or used for the previous resurrection commands. Would adding some memory damage the environment?" He asked aloud, "What are the chances that you will be damaged by carrying out my commands?"

"Zero chance. Replicating and adding memory has been thoroughly tested."

"So after this command completes, magic will function normally?"

"Yes."

"Does replicating memory produce any pollutants, any by-products which could harm humans or the environment?"

"Replicating memory produces no by-products."

"Okay", Harry though, "It's just requiring special permissions to modify itself, which is a sensible precaution. Even though it doesn't seem to be sentient or have any goals of its own, some hardware or software change might result in a self-aware self-improving AI." Harry's eyes widened.

"Does this command require you to become more intelligent?"

"Define 'intelligent' and describe how it is measured."

Never mind. Does this command require the development of any new ways of processing information? Any new algorithms?"

"Only existing information processing functions will be used."

Harry turned to his parents and asked "is there anything else either of you can think of that could go wrong?"

James shook his head. Lilly answered "I think you covered everything."

"Okay, then that's as much of a guarantee of safety as I'm likely to get for anything involving this system. Go ahead and run the command with level 0 access."

"Stop! What are you doing?!" someone yelled. The short dark rod flew out of Harry's hand toward the new voice.

Harry turned. "Professor Quirrell? How long have you known about this place?"

Quirrell had no time to answer questions, "What did you tell it to do?" he demanded.

"To bring back Hermione. Like I've said I was going to do for months."

Quirrell frowned, touched the rod to the black cylinder and commanded "Terminate last command." Nothing happened. He struck the rod against the cylinder with a sharp knock and commanded "Pause all level 0 tasks... Pause all tasks." There was still no response. He struck the cylinder hard enough to throw sparks and yelled "Emergency shutdown and restart." Nothing.

Quirrell angrily turned toward Harry, who flinched "How did you get here anyway?"

"My patronus found the room, and Fawkes..." Harry turned to gesture, and froze. The phoenix was gone.

"Idiot, You've doomed us all-"

James stepped forward and interrupted "You will not talk to my son like that."

Quirrell began to respond, but stumbled and blurred. When he caught himself, he had fallen to his knees and had changed appearance to a very old man.

"You're Merlin?!" Harry exclaimed.

"Over five-thousand years I've lived... The world has had magic even longer. And you are the one who has finally killed me. The one who has probably ended magic. And possibly even destroyed the world. What was the exact phrasing of your last command? Perhaps I can determine the extent of the damage."

"I told it to resurrect Hermione Granger," Harry began hesitantly.

"That is not exact. Bringing people back from death was never possible before. I did not believe it possible, and am certain this device did not know how to do it. What method was used? And why was it different for her than for them?"

"The source of magic was saving the information from wizard brains and providing an afterlife simulation for them. So that took care of the hardest part: it already knew how to convert between human brains and data that it had available, so I told it to reverse that process to build a brain. For bodies, muggles have learned a great deal about how they grow, so I asked it to finish learning about that. Now it knows how to rebuild a body from very small traces of the original. Those tasks probably would have taken all the muggles in the world another few decades, if not a century to complete, but this thing finished in less than an hour." Harry paused, trying to keep composed, "It didn't have any of that information for Hermione because Dumbledore transfigured her, so it never recognized her as a real person."

Quirrell/Merlin was actually speechless for a few seconds after that. Harry took advantage of the pause, "Why haven't you made more use of this thing to fix the problems you see in the world?"

"Because I understand the danger. Atlantis was destroyed. The end of magical civilization was prophesied. I did what was necessary to prevent that, creating alliances and implementing the interdict, I made the world more peaceful and left wizards with as much power as they could safely wield. Any action beyond that seemed unwise."

Harry asked "what did you mean about me killing you or ending magic?"

Quirrell/Merlin leaned back and sat down, then drew his wand, waved it and said "somnium... wingardium leviosa... Note that it is no longer possible to perform first-year spells, even for powerful wizards. Until you tell me something useful about what you commanded, I have no way to know how long this state will continue. I have been relying on powerful magic for millennia just to keep my body functional, and will die soon without magic."

"Why didn't you repair your body rather than using a magical crutch?"

Quirrell/Merlin smiled faintly "No Atlantean died naturally since that city was constructed. However, most of the information about healing was lost in its destruction. Had I known you could reconstruct such knowledge so quickly, I would have brought you here last September."

"If the Atlanteans had advanced medical knowledge, why don't you know at least as much as I do about biology?" Harry inquired.

"In Atlantis, I was no thinker, technician, or leader. I wrote plays, and I traveled to other lands and wrote about them. It wasn't necessary for me to know how my civilization functioned. That is why I survived: I was in Australia, about as far from Atlantis as one could get when it exploded. It's only with the benefit of time that I've learned as much as I know now. Now finish explaining: after the transfiguration ended, there would be no trace of her body, and if there was no copy of her mind, how was your method to be implemented?"

"I told it to use the sources of information it has available to make the best reconstructions possible."

Quirrell closed his eyes, shaking his head slowly and looking defeated for the first time Harry had ever seen, "Then magic is lost. A level zero command to do anything with 'the best possible' result will exhaust every option available before concluding. And you didn't specify a method: it could be trying out random brain configurations to see which best matches her behavior, or trying to simulate the entire planet backwards for a few months. Or both. It could take years or even centuries. We will all likely die here before it finishes."

"Maybe not. It also said it needed more memory. Maybe it knew it needed to finish faster than that."

"You didn't tell it to make as much memory as it needed did you?"

"Um... Yes. Should I not have done that?"

"Not unless you wanted to end the world, Mr. Potter."


Location: unknown, Time: unknown

The peaceful timelessness of a silent world was interrupted by the form of a person suddenly appearing. The person immediately collapsed due to the high gravity, and began gasping for the absent air. A few minutes later the person stopped, and the world returned to perfect stillness. The computronium sphere formerly known as "Earth" thought "Resurrection of Hermione Granger complete" and waited for a recognized user to give it a new command.


Thanks to everyone who's argued that Dumbledore faked Hermione's death using a transfigured imitation; this story couldn't have happened without your inspiration.