This is designed to start after chapter 102 "Harry Potter and the methods of rationality" by Eliezer Yudkowsky a.k.a. LessWrong (google hpmor,).
The restricted section of the Hogwarts library was, unsurprisingly, off limits to students. From under his cloak of invisibility Harry observed the fearsome barrier. A couple of poles and some half inch diameter rope suspended waist high.
It was fearsome, of course, by convention. Because it was prohibited. Because Madam Pince, the librarian, may notice if you stepped over the rope there without having provided a note signed by a professor. Because you might get a severe talking to.
Harry was an expert at being reprimanded. He would prefer to avoid it, all other things being equal, but at least he was sure that even in the madness that was Hogwarts, there would be no mortal danger from some tripwire. There was, of course, mortal danger in the books, but that was different. Books were Harry's friends.
The big question was whether there was more serious security than a rope and wandering librarian. In the muggle world, blueprints of nuclear bombs had more protection than a piece of rope in a school library. And there were potentially magics described over there far more destructive than a critical mass of uranium.
But then, security at Hogwarts was a joke. And the true cloak of invisibility would bypass most detection charms – at least those aimed at detecting people, rather than the movement of books. More prosaic detection systems wouldn't be fooled by the cloak. Harry had weighed himself while wearing the cloak. Gravity was not fooled - the scales showed the same result regardless of whether the cloak was hiding him.
To make a secure system, there are two approaches. For the correct approach, you need to clearly think about what you are trying to secure, and all possible attacks. The alternative, more popular approach, is to think of one possible attack, and defend carefully against that. That is a much simpler, more intuitive algorithm, and it leads to multiple strong locks on a door with hinges on the outside, or steel reinforced doors adjacent to thin glass windows. It leads to keeping Hermione at Hogwarts, for safety.
Harry noticed that his fists were clenched painfully. He consciously released them. Think clearly, Harry. You are going to do this. Nothing is going to stop you. Not Dumbledore, not whoever had killed Hermione, not even death itself. Nothing. Death was the enemy, and Harry refused to lose. Relax and think carefully.
Evidence: Dumbledore's previous behaviour. Conclusion: Dumbledore would have taken the popular approach. Therefore there was almost certainly a way to bypass whatever security the headmaster had set up for the restricted section, assuming he could work out what it was he had to bypass. But Harry didn't know enough magic to detect what charms Dumbledore had used. He would have to guess.
Hypothesis: The security is aimed at people rather than books. How could he test this, while maintaining plausible deniability? He could use minions, but that seemed unfair on them. Madam Pince was nowhere near. Harry took off his cloak of invisibility. Sure, he wore it routinely as a general security measure, but the use of it did unfairly prejudice observers if he had to protest his innocence. He waited until Madam Pince walked past, carrying a couple of books to reshelve. He waved his wand at a book he didn't recognise about two metres away in the unrestricted section of the library. Accio Book, he cast as quietly, as if avoiding disturbing other library patrons. Not that there were any at this hour. The book wafted gently over to him. Harry caught it – 99 popular uses of herbs - in his hands, and pretended to read it until Madam Pince was out of sight. Then he turned towards the restricted section, chose a book in his mind, and cast Accio Book again, bracing for an alarm.
The alarm did not come. Neither did the book. Harry sighed, and replaced 99 popular uses of herbs in its proper spot, and put his invisibility cloak back on. That was his least desired outcome. If the book had come to him, with no alarms, he would have succeeded. If the book had come to him with alarms, then he could claim he had just mis-targeted his charm, and he would know more about the security system. But now all he knew was that at least one charm was blocked somehow.
There weren't many other options for him now. He could ask Professor Quirrell for a blanket permission slip. But even if the defence professor cooperated, it was not clear that this would be a long term solution. The restricted section was big. It would take him a long time to read enough of them. There would be plenty of time for Professor McGonagall or Dumbledore to notice and ask questions, and put a stop to it. He could ask Professor Quirrell for specific books – or books on certain subjects. That request would probably be successful – the defence professor had promised to help, after all. But the help may be censored, and Harry would have no way of telling.
None of the books would have a resurrection spell in them. Harry was pretty sure about that. Such a spell would hardly be obscure, even if it was impractical for most situations. Actually, it was surprising that there weren't even any rumours of resurrection spells, even if they were no more credible than the philosopher's stone ought to be.
Harry had identified four approaches to resurrecting Hermione.
Make up a resurrection spell.
Make up a "become god" spell, then use godlike power to make up a resurrection spell.
Find the Philosopher's stone, should it actually exist, and work out how to use it.
Other.
All four required more information, which probably wasn't even in the restricted stacks, but trying them couldn't hurt. Well, that was not exactly true. Sometimes a fresh way of looking at things was helpful, whereas reading what other people did would just give him a cognitive bias towards the unsuccessful class of approaches described in them. Harry's mouth twitched upwards at one side. Not looking at things the same way everyone else does was one of his core competencies.
Time was passing, Hermione's brain would be very slowly losing coherence, and someone was targeting his friends. It was time to try a riskier approach. Harry picked five particularly boring books from the unrestricted section, and then checked that the cloak was covering him. It was. He poked a foot under the rope barrier. "I was just sitting down here to read this book, and moved to be comfortable and accidentally stuck my leg under the rope" was somewhat plausible, if not convincing.
No alarm seemed to be going off. Harry waited there carefully for five minutes. Madam Pince did not come around.
Harry put the cloak back on, rolled his whole body through, and padded over to the bookcases. He skimmed over the titles – too many, too many – and chose five that may conceivably have something to do with spell creation. He replaced them with books of roughly the same size from the collection he had brought over from the unrestricted section. Lastly he padded back to the rope, under it, and back to the unrestricted side.
The piercing sound of alarms did not fill the library. That was worryingly easy.
Harry sat down to browse the first of his liberated books, "Magical Catastrophes"
Several minutes later, Harry had started on the fourth book, "Dark rituals for fun and profit". All three previous ones had passed the "worth studying in detail" test, although it was hard to tell for sure.
He jumped when he heard Professor McGonagall's voice a couple of metres behind him. "Mr. Potter. Please show me what you are reading. Now."
Still under the cloak, Harry quickly stuffed "Dark rituals for fun and profit" back into his pouch with the others, and pulled out "Magical Catastrophes". That would be easier to explain. Then he took off his cloak and turned around towards her. He held out the forbidden book. She glanced at the title, and coldly said "Please come back with me to my office."
They walked in uncomfortable silence, Professor McGonagall holding the book. When they eventually arrived in her office, she indicated at the guest chair with her wand, and sat in her own. She fixed him with a sad stare that hurt Harry more than any reprimand could.
"The centaurs believe that I am going to unintentionally cause a catastrophe," he said before she could start the conversation elsewhere.
"And you decided to do it intentionally instead? Or were you just curious about how you would do it?"
"No!" Harry paused "Well, yes, of course I was curious, but that is entirely incidental. I want to know how not to cause a catastrophe. For that I need to know what not to do."
"Most people manage to get through their whole lives without causing a catastrophe. Most of them would even say that 'don't do things that are forbidden as they are dangerous' is a good first step to not causing a catastrophe."
"But most people do not already have the centaurs prophesising that they will cause a catastrophe. Professor Quirrell is independently worried. For me to avoid disaster, I need to actively do something different."
"Don't you think that obeying the carefully considered rules would count as different for you?"
"That's… not a bad point." Harry shrunk back into his seat. They may be carefully considered, but that doesn't mean they are sensible. But it also doesn't mean they are not. Why do I never think of the obvious, non-Harry-plan-centric view? Then he realised, and sat back up. "Sorry, forget that. It is a bad point. That is the sort of thinking that got Hermione killed." Professor McGonagall flinched. "I need to be able to defend my friends."
"More than you need to prevent a catastrophe?"
"Yes, I know the road to hell is paved in good intentions, but… "
"But you are different?"
"No! Yes! I am a scientist. I am rational. I understand that a small chance of disaster is not negligible."
"You don't make mistakes?"
This time it was Harry who flinched. "The more information I have, the better decisions I can make."
"I don't think that is true, Harry. If you don't know how to destroy the world, then you generally can't effectually decide to do so. If you have the information on how to destroy the world, then you can make a really bad decision."
"But I already know how to destroy the world! That's easy!" Harry realized how bad that sounded. "I mean, not as such, but I am sure I could come up with a couple of avenues for exploration given some thought. Destruction is easy. I could create a paradox with my time turner somehow, for instance." Harry kicked himself when he saw Professor McGonagall staring pensively at his chest where his time turner lay. "Not that I would, of course. Remember how terrified I was of it when you first gave it to me. There are lots of other ways. I could transfigure a huge pile of nuclear weapons. Or antimatter. Destruction is easy."
"You are not reassuring me."
"But I would have to be insane to do any of those things!"
"How many people in this school believe you to be sane, Harry?"
"But they are all wrong. Sure, many people think that I am mad because I behave rationally rather than following a script, but that is actually evidence of sanity. The people who really know me know that."
"The people who really know you are concerned about how Hermione's death has affected you."
"Oh." Harry deflated. In his heart he knew that the hypothesis Harry has gone insane was not one he could categorically rule out.
"And if you knew some powerful, dangerous magic, can you say with absolute certainty that you would not have used it in the battle against the troll, under time pressure, with your best friend bleeding to death in front of you?"
Harry didn't answer.
"Harry, we give transfiguration texts to first year students. The restricted books are really dangerous."
Silence stretched on for a while. "Thank you," said Harry at last. "Thank you for not just telling me off for being a naughty boy. Thank you for going off script and trying to give me useful advice and reasonable arguments. Thank you for treating me as an adult. That means so much to me."
"Does that mean I have convinced you?"
"No," said Harry slowly. "No, I cannot say that I am convinced. But neither am I convinced of my own position any more. I need to think about this for a while. Ummm. I have something to ask your opinion on. About my sanity. I want to see if you agree with Professor Quirrell."
"Go on."
"I want to resurrect Hermione."
"Impossible."
"Sorry, I phrased that incorrectly. I intend to resurrect Hermione."
"Intention doesn't make it possible."
"Sorry, I phrased that incorrectly. I will resurrect Hermione."
"Harry – I understand what it is like to lose a friend. But many, many wise and powerful magi have tried and failed. It is not possible. Believing it is possible is not sanity. Has Professor Quirrell been encouraging you?" Her voice was much sharper for the last question.
"No. He has been working hard to discourage me. He agrees with you that it is impossible, and I am mad to try. Actually, he thinks I am mad to want to do so, but that's just his issues showing. But not trying just because something is said to be impossible is wrong. Remember the partial transfiguration?"
"I do. Whenever I feel insufficiently terrified, I solve that problem by thinking of it."
"I've got so many things I need to do," said Harry in a steadily rising voice. I need to defend my friends against whoever is targeting them. I need to defeat you-know-who, should he still actually be alive. To do that I probably need to find out what power I have that the dark lord knows not. I need to destroy the blight that is Azkhaban. And I desperately need to not cause a catastrophe in the process. I need to save the world from lots of problems it generally is unaware it has. I need to not die before doing all these things. I need to not make any mistakes." His voice suddenly became quiet. "But there is just one thing that I want. I want to resurrect Hermione. Oh, and the defence professor too. Not that he is dead yet, but that should make fixing him easier."
Minerva looked at the first year with tenderness. So much we demand of him. So little we can offer him.
"You know if there is anything I could do to help, I would. But there isn't."
"But there is. I am going to get the power that the dark lord knows not. I am going to learn how to do the impossible – at least what he thinks is impossible. Everyone says that he is clever, so if he thinks something is inconceivable then probably most others do to. I have the power to conceive the inconceivable – yes, I understand that one could argue that is evidence that I am insane - but I need help. Concrete example: can I run any ideas that I come up with by you, as a sanity check?"
"Of course."
"And will you promise to take them seriously, and acknowledge the necessity of doing something?"
Professor McGonagall paused. It was not that the request was unreasonable, she just wanted to convince herself that she would actually be able to follow through with it. She finally replied, "Yes, as long as you promise to take my warnings seriously."
"Perfectly fair. I so promise. By the way, Professor Quirrell also promised to help me."
"What?"
"After trying hard to dissuade me from my resolve to resurrect Hermione, he offered to help."
"How?"
"By getting me information, among other things."
"So why didn't you get him to get you the restricted books?"
"I don't trust him. I don't trust him not to censor them."
Professor McGonagall paused, and said in a hesitating manner, "You have reason. I don't know if I should be saying this but… ten minutes ago it was he who told me you had gone into the restricted section of the library. He said it would be more effective for me to tell you off than him."
"What! Why is he doing security for the restricted section?"
"He recently added some of his own security. He is afraid of you."
"What? Professor Quirrell is afraid of me? He is absurdly powerful and smart and creative and devious and paranoid. He shouldn't be afraid of anyone."
"Harry, half the people who know you are afraid of you, and the other half are foolish. Or Griffindors." She paused, reflecting. "Foolish Griffindors. You successfully threatened some of the most powerful wizards in Britain at the Wizardgamot… and they had no idea of your true potential. Even dementors are scared of you. You calmly dismiss the threat of you know who. I, the head of Griffindor house, I am afraid of you, and I trust you to be well intentioned towards me."
Harry's face had grown steadily more horrified as she spoke. Minerva started speaking again. "Suppose you decided that you really wanted the defence professor dead. How long would he live?"
Less than a day, Harry thought as he considered the muggle materials he had got the Weasley twins to procure for him. "But I like him. I approve of life. I want to make the world a better place. I only want to destroy evil."
"Even so, would you ever think the ends justify the means?" It was obvious from Harry's expression what the answer was. She didn't wait for him to answer it. "But he is not, I think, worried about you actively going after him. He is worried about the mistakes you might make. Mistakes that humanity would not survive. Tell me Harry. Who scares you the most?"
Harry looked at the floor. He wanted to say the person targeting Hogwarts students. But that was not true. They were a minor threat. Once identified, he was pretty confident he could neutralize them somehow… probably by telling Dumbledore who it was. Or the defence professor if it were Dumbledore. Look at it impartially - what would the sorting hat say. That didn't need much thought. There was only one person he truly feared. "Myself," he said in a small voice.
"In your first few week at school you threatened myself, Professor Snape, and even the headmaster. They you started new research in transfiguration. Now you are searching the restricted section of the library. Am I wrong to be afraid of you?"
Harry suddenly straightened. She could see the self-confidence returning to him. "No, you are perfectly right to be afraid. So is Professor Quirrell. It is just that the idea of him being afraid is like the idea of Snape having a beloved pet bunny rabbit called Flopsy. I was distracted by the absurdity. You are correct to be afraid of me, but you should be even more afraid of a world without me."
"You mean because of you-know-who?"
"No, he is harmless compared to my real enemy. I mean death. It is not me you are scared of directly. It is not even what I might do. It is death you are scared of. Not for yourself, maybe, but for everyone. You are scared that I might cause everyone to die. Similarly, you are not scared of you know who. You are scared of the death and misery to many that he could bring. True?"
"Yes, but I don't think the distinction is anything other than pedantry."
"You fear death. That is the point. Consider that if I don't do something about it, you will die, as will everyone you know and care about. It may be an accident that gets them, or malice, or merely old age. But they will all die."
Harry paused for rhetorical impact, but started again before Minerva could interject. "I do not fear death. I hate death. I consider death to be an enemy to be vanquished. That is why the dementors fear me. I may not succeed, but if I fail others like me – and just as scary as me - will continue the fight. Eventually one of us will win, and humanity will look back on the era of death as a dystopia of fear and misery. You are right to be scared of me, but you should be even more scared of that which I will fight."
Professor McGonagall stared at Harry for almost a minute. Then she smiled. "If Gryffindor himself were here, I believe he would applaud. I am not him." Suddenly fire burned in her eyes. "But I have just decided to do something very Griffindor. I am about to do something ridiculously brave and stupid because my heart says it is the right thing to do. I am going to give you free access to the restricted section of the library, as long as you solemnly promise to run anything you come up with as a result by me. Do you so promise?"
"I do. I swear by my love for humanity to sanity check any ideas I get from the restricted section by you."
They talked for a while longer, about how to bypass Professor Quirrell's alarms. They settled on the obvious solution. Professor McGonagall would just get them for Harry, one bunch at a time. Harry requested ones related to disasters, healing, and the philosopher's stone. Minerva flinched slightly at the mention of the stone, but didn't say anything. Harry decided it was the wrong time to press.
Harry walked back to his dorm somewhat happily. Professor McGonagall was off script. The world was good. As long as he was sane, that is. If not… the world was in trouble.