Take Charles Stross’s Laundry stories as an exemplar for this modern day approach that makes explicit the analogy between computer geeks and fantasy mages. If P = NP then magic is possible. Here’s a passage for bringing the reader up to speed in one of the later Laundry novels:

I’m actually a specialist in a field called Applied Computational Demonology: the summoning and binding to service of unspeakable horrors from other dimensions, by means of mathematical tools. Magic is a branch of applied mathematics: we live in a multiverse, there is a platonic realm of pure numbers, and when we solve [sic] certain theorems, listeners in alien universes hear the echoes. By performing certain derivations and manipulating theorems, we can make extradimensional entities sit up and listen, and sometimes get them to do what we want them to.

There have been variations in other stories, but Stross seems to lead the pack in mashing up supernatural and information technology.

Consider the bold part of the blockquote above. In (for example) Terry Pratchett’s Discworld® series, supernatural beings listen to people and might decide to meddle; speaking or performing rituals gets the specific attention of those paying general attention to human activity.

  ❝ what exactly does solving a theorem do? ❞

But what exactly does solving a theorem do? If all theorems exist in the Platonic realm, in what manner does knowing about it bring on some action? If it's in a book somewhere, does a human mind going over the steps tickle something? Or does it require some degree of understanding of the complete proof?

How might this trope be made a little more rigorous?

(See also this story where magic is an API. It was described as being discovered by working on physics and math theorems as above, but upon reviewing I see it’s like a programming language and is spoken. So how did that initial discovery “work”?)

  • 6
    $\begingroup$ You're asking how inter-dimensional entities hear people doing math in a realm composed of numbers? Simple. Hand wave it. They're from another dimension, how are we supposed to understand? (And if you don't support that, maybe hey literally hear you. Along with your echoes.) $\endgroup$ – Xandar The Zenon Feb 9 '16 at 13:35
  • $\begingroup$ @srm are you saying that this word is not changed to reflect American spelling in the American editions that use American spelling and quotation marks throughout? $\endgroup$ – JDługosz Jan 26 '17 at 7:47
  • 1
    $\begingroup$ @jdlugosz There is no Diskworld, American edition or otherwise. It's a proper noun. And besides that, "disc" is the word even in American English for a plate-like shape. "Disk" is used only for the technological medium of data exchange. (I shouldn't say "only"... but mostly.) $\endgroup$ – SRM Jan 26 '17 at 7:53
  • $\begingroup$ It was always (only) “disk” here until Sony propagated the Europe spelling. I recall “disc” written on their 3½″ diskette, when other brands (and popular use) showed “disk”. It really took of with CDs though, thanks to the logo and uniform usage; it became associated with optical media (only) and “disk” is used everywhere else. $\endgroup$ – JDługosz Jan 26 '17 at 18:19
  • $\begingroup$ Anyway, I dug out a paperback of The Lights Fantastic and verified that it has (mostly) American spelling and formatting. But the cover indeed uses “Discworld®” complete with pigeon dropping. $\endgroup$ – JDługosz Jan 26 '17 at 18:25

10 Answers 10


Going through each question one by one:

what exactly does solving a theorem do? underlying question: what is a theorem? A theorem is a tautology, something that can't be false. 2=2 IS a theorem (not an interesting one, I agree but still). With this definition I think you can understand that the word "solving" has little to do with theorems. However you can prove that something is a theorem (which is I assume, what you wanted to say).

</hard-math> <philosophy> 

In this case proving that something is a theorem depends on how you see math. Some think that mathematics is a human invention that only exists in our mind and has been created to help us understand the complexity of our world. In this case math does not exist by itself and proving a theorem means creating it

Other people think that mathematics is part of the physical world, it exists as rules just like physics does, it does not come from our mind but from us observing how the world works. In this case it's obvious that proving a theorem means discovering it (since it already exists in nature).

Now concerning your trope: Maybe the first interpretation suits you better: if the platonic realm is created as we prove theorems (because it only exists in our mind), your alien living in this realm does not even exist before it has been proven to exist between two symbols. Then your alien can't do anything until it has been proven to be able to alter his world in some ways, and * tadadadam * can't alter our world until he has been proven to be able to do so. That's your initial discovery.

  • 2
    $\begingroup$ Interesting: with the mention of Platonism I was assuming the second definition. But if finding a theorem creates the other realm, that is certainly an effect! (Shades of Greg Egan's Luminous / The Dark Integers) But once it exists and the proof is in a book somewhere, how does a person activate it or utilize it? $\endgroup$ – JDługosz Feb 9 '16 at 13:41
  • 1
    $\begingroup$ That's one of the hot topic that comes with the first interpretation. If no one think about a theorem then how can we assume that it exists? does it exists for eternity as soon as it has been "invented"? If the whole human civilization collapses, what happens to our world of human-made abstractions? An answer to that, that would also works to tell your story would be that an idea can't exist with no one to think it. A triangle can exist by itself but the idea of triangle only exist if someone is thinking about it. (it exclude theorems written in a book, unless someone read/undertsand it) $\endgroup$ – Nyashes Feb 9 '16 at 13:47
  • $\begingroup$ Then the next question to address in the metaphysics might be, if a computer proves a theorem but no human looks at the result and/or the proof, then does it have the same effect, and why? And what about erroneous proofs whose faults are overlooked, do they have the same or different effect on the mind (and hence reality) as correct ones? $\endgroup$ – Steve Jessop Aug 12 '16 at 10:27
  • $\begingroup$ @SteveJessop: I can imagine that since people are different, when you re-prove a theorem, you actually prove a different theorem, which is however isomorphic to the original one (that means, it has all the same properties; you can map one to the other; which is exactly what you are doing when communicating the proof). The reason why they are different is because the terms used have slightly different meaning in different people, even though those differences are irrelevant to the mathematics in question.For example, with numbers one person might think of marbles, another one of apples, … $\endgroup$ – celtschk Aug 12 '16 at 12:21
  • $\begingroup$ … and a third one just of digits on paper; and then there's the set theorist who always has in mind the von-Neumann construction of ordinal numbers, which contain the natural numbers. All of them have a slightly different concept of the numbers, yet all of them can prove 2+2=4, with apparently the exact same proof. But because one of them establishes a relation between marbles, the other between apples, the third between strings of digits, and the fourth between sets with special properties, they really do different, but equivalent proofs. $\endgroup$ – celtschk Aug 12 '16 at 12:23

Means of perception: could be anything

If we go by the model in the Laundry books, given that it is said that the those beings who perceive that a human Applied Computational Demonologist has solved a theorem are to be found in alien universes in-the-plural, the means by which they perceive this could vary literally infinitely. (And if you can say that tongue-twister three times quickly, you too can summon a demon.)

For some demons it could be hearing a voice from the skies or inside their minds, for others a searing pain, for others their personal computer sends them an alert.

Level of human mental involvement that will trigger the spell - could vary along a scale

Summoning cannot reasonably work by merely reproducing the steps of the mathematical proof without comprehension; otherwise we would be able to completely automate the process and it wouldn't be magic at all - or much of a story. At the other end of the spectrum, a computational magician writing, typing or speaking the spell/series of equations with full understanding and concentration ought to be virtually certain to be able to summon the demon and control it. However most summonings lie between these extremes. A person who never did get to grips with algebra can probably look at the Program of Summoning with no effect. A more mathematically-aware human skim-reading the relevant equations probably does no more than give a demon a slight headache.

Spell macros: allowed or not?

Depending on how your magic system works, the rules of magic might or might not allow a human to write or type a spell in advance, perhaps leaving off the final line until the last minute, and then press "send" when activation is required. If this is allowed then the once-common peril of making a mistake in saying the spell and so letting the demon out of the pentacle would be eradicated. However one might argue that magic, even mathematical magic, requires a human act of will to break through the barriers between universes and because of the way the human mind works just pressing "send" wouldn't cut it. On this model, it is psychologically impossible for a magically and mathematically skilled person to mentally go through the steps of the proof but stop before the end, just as I could not write out all but one of the steps of a geometrical proof and then stop myself from perceiving the last step whether I wrote it or not.

What is solving a theorem anyway?

By a rather sinister coincidence given the topic under discussion, Alexandre Thouvenin's mind-bending answer has appeared at the very moment when I was about to embark on a discussion of what exactly is meant by this, and the answer I give now incorporates ideas I got from him.

My mathematical studies are long ago, but I don't remember solving theorems. I solved simultaneous equations and suchlike (i.e. found values of previously unknown variables for which certain conditions held true) and proved theorems. Since I wasn't Euclid, "proving" the theorems meant in practice just remembering the proof someone else had invented and writing it out again. Although it helped me to remember the proof if I understood it, that wasn't necessary. This seems unsatisfactory for magic, somehow. I feel intuitively that mathematical magic must be a process of discovery, like solving simultaneous equations. But there is a problem here. The "process" of discovery only feels like discovery because I lack the intelligence to perceive instantly the solution that is inherent in the equations. When some prehistoric genius first made explicit the statement "two plus two equals four", that this equivalence was possible was a discovery - but to you and me it is a tautology. Several mathematicians have pointed out that in a sense all mathematical statements are tautological if we could but perceive it.

This leads me to not exactly an answer to your question of what exactly counts as "solving" a mathematical theorem for it to trigger the summoning, but at least to a revelation about the process: summoning demons is only possible because humans are stupid. We can only do it with the help of that surge of satisfaction we get from finally perceiving the answer. Demons perceive the answer as obvious as soon as they look at the question, which simply doesn't excite them enough. This is why demons cannot summon humans. Can you imagine how irritating this is to know? It's why they are so angry when we summon them.

  • 3
    $\begingroup$ +1 for "Humans are Stupid... ...Its why they're so angry when we summon them." $\endgroup$ – Miller86 Feb 9 '16 at 16:23

True Names

True names are a powerful tool in lots of works, and give an individual with the knowledge of an entities' true name either power over or power via them. Perhaps in the Magic=Math universe, the beings with power don't have Names, but Equations, and knowledge of the supernatural equations gives power. If these equations live in a realm of pure math, the more complex the equation the greater the potential power. After all, Knowledge is Power.

Additionally, if you go down this route, it's quite easy to have imperfect knowledge be incredibly dangerous. If you don't understand the equation correctly, the equation itself could cause untold damage as the parts not wholly understood seek freedom on behalf of the whole equation.

  • $\begingroup$ So how does the existence of a being identified with an equasion get paged by someone? How does knowing of it trigger a specific event? $\endgroup$ – JDługosz Feb 9 '16 at 14:45
  • $\begingroup$ It depends on the "system" used, but it could be that the math plane is a pocket universe on the back of the material plane. As math is intrinsic to how everything works (like the force), it has its own little universe where the math resides - like the universes briefcase. Knowledge of these higher level equations means you can call upon their power to do things. In essence, because math permeates our plane and they're incredibly powerful beings, they can't help but hear us when we call upon them. $\endgroup$ – Miller86 Feb 9 '16 at 16:05

Knowledge is power. What if this was taken to the extreme?

Let's presume we don't really understand what happens when information is "lost to entropy." This isn't much of a make-believe story to believe in, it's actually pretty accurate. We know the information gets diffused (such as the information contained in a tendril of smoke is diffused into the wind), and the information becomes inaccessible to us, simply because it has been mixed with other information until it is incomprehensible. Entropy seems to work this way in the physical world. Even Stephen Hawking's latest theory involves the topological mixing of information on the event horizon of black holes to avoid all sorts of confusion about information getting destroyed or being preserved.

But what if there was more to it than just the physical realm? What if information or knowledge was actually a metaphysical thing. This also is not such a flight of fancy. Many who believe in a dualist philosophy that there is some mental component to us which is more than just the bare matter that makes us up already believe this. We like to believe we are "something more."

Now let's start to depart from our world. What if our world was in a unique position at the cusp of a multiverse. Knowledge or information in our world which was "consumed by entropy" from our perspective actually influences the other universes, potentially jeopardizing their very survival. The only hope of survival for such universes is to make sure to manipulate our world such that some knowledge just doesn't get out. As long as its never discovered in our world, that knowledge can never heart their world.

In such a world, Aliens would have a vested interest in interfering with our world, and in particular with us. As humans we are either the single most powerful source of information in the universe, or at least one which stands out in the crowd, we would see quite a lot of interference. They may not want certain information to get consumed by entropy in certain ways, and they may be willing to expend a great deal of energy to do so. We may not understand what the particulars of their needs are (in particular, we may have no idea what particular ways entropy could consume information to trigger an effect), but we may understand that certain shapes or equations lead Aliens to action.

Presumably they would want to teach us how to search for new knowledge without causing their universe trouble. They might carefully teach us particular tricks that help them. This could pick up an element of gnosticism. You could have an outer message, in the form of a mathematical proof, which itself is useful, and an inner message which contains the true power to influence that universe. Or they might pick up a Daoist perspective, trying to get us to accept that we are all part of one fabric to be preserved and enjoyed. They might even come in with an Abrahamic approach, with a show of force and the dictation of a set of rules for us to follow.

It would also permit some of the more anarchistic groups to seek symbols and equations which are destructive to all universes.

How did this come to pass? Tying it up in a nice little bow, we entered this path because one day, somebody discovered that information lost to entropy wasn't just getting mixed up like we thought.. it was actually getting lost. Somehow they managed to disseminate this information. Whether they escaped the violent reach of Entropy, or whether Entropy struck a deal with them, we may never know. Regardless, now we know, and knowing is half the battle. We still don't know what Entropy is, mind you, but maybe that's the whole point.


It's really a form of the same trope as summoning demons by pronouncing certain words/names, or following certain rituals. Or making yourself subject to external influences by reading the Necronomicon. How, rigorously, does a demon know whether you've said its name or not? Really good inter-dimensional hearing? Some kind of universal monitoring system that rushes off and tells it whenever someone says its name, like demonic Echelon? How does it detect from another world, what kind of incense you're using and what sigils you've drawn? Similarly, how does it know what mathematics you're doing?

Part of the point of magic is that the mechanism is not rigorous: if it was then it would be physics, or just a political or commercial interaction with the demon.

But as a general theme, the idea seems to be either that certain energies or entities are attracted to certain words/signs/substances/etc (by some form of sympathy), or else that certain states of mind allow the practitioner to perceive or interact with a world they normally cannot.

Converted to mathematical form, it could be that there's some etheric substance that is pushed around by mathematical symbols, and that a proof of a theorem pushes that substance into a mechanism that then is able to do whatever it takes to pierce the veil. So, proving Fermat's Last Theorem is like building the machine in Sagan's Contact except that you're not building it out of material substance, you're building it out of some magical hand-wavey stuff that exists locally, and responds to local stimulus, but then is capable of a distant effect. In that case, a written proof might be a permanent magical doohickey provided that the symbols continue to hold the machine in shape. You still have to explain how the energy "knows" that the symbol "2" means the number that comes after the number represented by the symbol "1", but perhaps what matters is the structure of the patterns/relationships among symbols, and this explains why the actual symbols used are irrelevant.

Alternatively, it might be that humans happen to be innately equipped with some faculty that draws the attention of demons, but that we're unable to use that faculty except when guided into a series of very specific mental states/visualisations, corresponding to the steps of a proof. In that case, a written proof in a book is nothing, but when someone reads it and it has its intended effect on them (of understanding the proof that it represents) then the magic happens and they start dreaming of unknown Kadath. The proof itself is no more or less magical than the mental exercises used by a Zen archer to shoot a bow, (and vice-versa the shooting exercises used to achieve mental and spiritual development). It's just that in the case of demon-summoning humans are actually so awful at it without the exercises as to be incapable.

Or in a broader sense of the law of sympathy, perhaps there is some entity that definitionally is (or has some direct connection with) the platonic ideal of the number 2. Wherever things appear in pairs, or whenever someone thinks about the mathematical properties of the number 2, there that entity is, just as we might say that Thor exists wherever thunder does, or that silver is connected with the powers/associations of the Moon, or that God is omnipresent. Naturally then demons respond to mathematics: to do mathematics is to touch a part of their multi-dimensional self. It's then up to you whether the demon summoned is the demon of Fermat's Last Theorem specifically, or whether the general fuss and commotion caused in the region of the platonic universe corresponding to the intersection between "elliptic curves" and "modular forms", by proving the Taniyama-Shimura conjecture, is what attracts other demons.

As for the rigorous details of why there is a law of sympathy at all, or what causes there to be a God of Thunder or a demon of Banach-Tarski dissections, or how the force is mediated by which symbols to build etheric machines, or by what mechanism humans have an innate capacity to summon demons or shoot bows: those may have to remain as irreducible principles of your in-fiction theory of magic. No doubt you can drill into some of them by introducing further concepts that dictate them.


I've got a slightly different take on this. Think of quantum physics and the observer effects. Quantum states that only "collapse" once observed.

From the point of view of our universe all the demons are in a quantum state of possibility, a quantum state where they may or may not exist. By solving the right theoretical mathematics and visualizing it in your mind you are actually collapsing the wave-form of that demon and allowing it to come into physical form.

  • $\begingroup$ Well, we know that decoherance takes place even if nobody's watching, just from air and light and everything. Even so, how does visualizing a theorm constitute an observation of the demon? $\endgroup$ – JDługosz Feb 25 '16 at 12:18

A mathematical variation of the True Name trope

Since the entities are real numbers, what is relevant is not their name, but their formal definition: roughly, a real number is definable if it can be uniquely described by a finite mathematical formula. For example, $\sqrt{2}$ is the positive solution of $x^2=2$; $e\simeq 2.71$ is the value at $1$ of the solution of the differential equation $y'=y$ with initial condition $y(0)=1$; etc...

With that idea, you define have a hierarchy of powers among your entities using the complexity, that is the length of the shortest formula describing it. A surprising consequence of Cantor's theory of cardinals is that most real numbers are not definable.


  • You can adapt this to use the concept of computable numbers. That would be a natural setting if you want your story to speak about Alan Turing
  • Why limiting yourself to a "dimension of pure numbers", when you can consider the behemothic universe of mathematical objects?
  • $\begingroup$ I don’t understand. And how does that answer what I’m asking: does knowing the differential equation give you power, or do you have to recite it or derive it or what, and how do “they” know you’re doing that? $\endgroup$ – JDługosz Jan 26 '17 at 6:33
  • 1
    $\begingroup$ @JDługosz I think his point is that it is impossible to state most of the names [aka large, possibly transcendental, numbers] numerically. Instead, you find a way to express it as an equation. The poor demon whose name is 3.141592...etc... is easy to summon by writing "Pi". Similarly, his brother "Pi / 2". But others require a more complex formula. Writing down the formula is the same as writing the true name because they are mathematically equivalent. Taladris, do I have that right? $\endgroup$ – SRM Jan 26 '17 at 7:38

My first answer explored how a theorem itself could be valuable. The bounty suggests more interests is needed, so I wanted to put forth a theory that suggests the theorem itself isn't as important as it may appear.

I wanted to focus on two parts of the question


How might this trope be made a little more rigorous?

I think this trope can be made more rigorous by not looking at the theorem itself, but rather what the act of "solving" it implies. To this end, the theorems the supernatural beings listen for are not all that meaningful at all. However, the fact that a sentient mind "solved" these theorems could be of great interest. If they can solve that theorem, what else might they be able to do?

If there are things which the supernatural do not want us doing, or ideas the supernatural do not want us to think of, they would be encouraged to meddle in our affairs to prevent us from doing or thinking those things. "Solving" a theorem might demonstrate that we are capable of taking the next step and thinking of the forbidden thing, or capable of leveraging that theorem to do some forbidden thing.

What makes this powerful is that the "solving" of a theorem can now be treated as a symbolic gesture, rather than the thing that actually has power. This provides key direction for questions such as:


The answer is now dependent on how the supernatural being feels, rather than some strict rule set. Perhaps for a given entity, one must truly understand the implications of a proof of Fermat's Last Theorem before the entity cares enough to be cajoled into action. It may be that the entity doesn't actually care about his Last Theorem at all, but does care about some other great problem which can be solved using a similar approach. Someone who understands Fermat's Last Theorem is a likely candidate for being able to solve this entity's great problem.

On the other hand, the same entity may treat a proof of P=NP differently. This may be a sufficiently powerful tool in the hands of a mathematician that the entity has to pay attention to anyone who knows the proof, even if they don't fully understand it. It may be that the entity wants to snuff out all memory of this proof, for fear that an uneducated person who memorized the proof might tell it to an educated person who would then understand it and know what to do with it.

Approaching the theorems this way makes the theorems into threats and other gestures targeting the supernatural. This sort of posturing is very rigorous in other disciplines such as hand to hand combat. In addition, it offers many many quirks. Perhaps an entity doesn't really care about P=NP. What they really care about is BQP=NP. An entity might appreciate the fact that mathematicians are constantly getting sucked off into P=NP and aren't paying as much attention to BQP=NP. Perhaps that entity might reward a math-wizard for "solving" theorems in a way that encourages others to waste their time on P=NP. The options are limitless, and yet it would be easy to develop a rigorous structure within which any given supernatural being might choose to operate.

  • Every concept, such as a theorem, is matter in Platonic realm for being able to exist.

Only in math can you 100% prove something. => The concept has to materialize itself in our world, because the theorem is perfect not only in the Platonic realm, but also in our world. This means that it is either a perfect copy of the concept in Platonic realm, or it brings the concept from that realm. => If latter, the concept may still have a tendency to stay in the Platonic realm.

Then, there must be some conditions when a concept materializes itself in our world. It could be that it only materializes itself when somebody is thinking it clearly enough, aka. casting a spell by going the theorem in mind or in word. People think a bit differently when they speak (it even has a difference when sitting or standing). That might explain why the mages speak when casting.

EDIT PS: This would also explain miracles, created by pure or perfect love, belief, friendship etc. Just might make a nice plot element if well implemented, but with high risk of being mawkish.


You depict the math physically and bring it into the world. Draw the pattern. Build the temple. Play the fugue and variations. Bring the geometry and ratios into the physical world. Humans have been honoring and courting supernatural beings thus for thousands of years.


Your Answer

