June 11, 2026 · 1,843
Three Colors
Sperner's lemma, the intermediate value theorem, Brouwer's fixed point, and Nash equilibrium: one coloring puzzle, scrolled.
Three colors, three rules, and a triangle there is no avoiding.
There is a game. You will lose it, and the way you lose it is one of my favorite ideas in math.
We'll start by taking a big triangle, we'll cut it into small ones, and we'll put a dot at every corner. Now color the dots with three colors (rust, cobalt, jade) under three rules:
- The three corners of the big triangle get one of each. They're locked.
- A dot on a side of the big triangle may only use the colors of that side's two endpoints.
- Every interior dot is yours: any color, go wild.
The goal is to avoid creating a single rainbow triangle, a small triangle wearing all three colors. Go ahead.
3 rainbow triangles. An odd number, every time.
I did warn you that you'd lose. You can get the count down to one. In fact, you may have noticed something stranger: the count is always odd. Three, five, one; never two and, in particular, never zero.
This is Sperner's lemma, proved in 1928 by Emanuel Sperner, then a 22-year-old graduate student: every coloring that follows the three rules contains an odd number of rainbow triangles, and in particular at least one.1
If you're like me, you probably found this pretty underwhelming. I don't blame you! Strangely enough what feels like a contrived parlor game ends up underwriting some really important results of the 20th century. By the end of this page it will have proven the intermediate value theorem, then Brouwer's fixed point theorem, and the existence of Nash equilibria.
One dimension, one idea
Before the triangle, flatten the game onto a line. A row of beads: the left end is locked rust, the right end locked cobalt, and the beads between are yours. How many gaps sit between two beads of different colors?
It turns out it's an odd number, always. To see why, let's walk from left to right: you start on rust and end on cobalt, so you switch colors an odd number of times, and each two-colored gap is one switch. The rest of this post is this same idea in a nutshell: the boundary conditions guarantee the parity, and an odd count is at least one.
Doors and rooms
The two-dimensional proof is, I think, one of the most elegant arguments in mathematics, and it is also a walking tour.2
So the puzzle was never winnable. Every legal coloring hides an odd number of rainbow rooms, because the bottom edge, a one-dimensional game with its odd number of doors, leaves at least one walker stranded inside, and walkers can only strand in rainbow rooms.3
Sperner's lemma is a theorem of discrete mathematics, nary an epsilon in sight, which makes it a suspicious tool for proving theorems about continuous functions. What saves us is that the lemma does not care how fine you cut: divide the triangle into a million cells or a trillion, and the rainbow room is still there. The fact this guarantee survives every resolution means that we can take a limit.
The intermediate value theorem
The intermediate value theorem says a continuous function that starts below zero and ends above zero must cross it. "To get out of the basement you must pass the ground floor." Let's prove it as a consequence of Sperner's Lemma.
Color the interval by the sign of the function. Below zero, rust; at or above, cobalt. The hypothesis (starts below, ends above) locks the endpoints rust and cobalt, and we are playing the bead game again. Nothing about the game needed to be adapted; the hypotheses of the theorem are exactly its rules.4
Now sample the interval at n points. The one-dimensional lemma fires: there is an odd number of two-colored cells, at least one, and the first one brackets a sign change inside a window of width 1/n. Double n and the lemma fires again. You get a sequence of shrinking brackets, each pinning the function to both signs within a vanishing distance, and they converge to a point c.5 If f(c) were positive, continuity would make f positive in a whole neighborhood of c, yet every bracket near c contains a rust point. Negative fails the same way. The only value left is f(c) = 0.
In one dimension this argument is admittedly close to bisection.6 The reason to prefer the coloring language is that bisection does not generalize: in two dimensions there is no interval to halve and no single bracket to follow, while the coloring argument passes to the triangle unchanged.
The still point
Take two identical sheets of paper, one lying flat on a table. Crumple the other (fold it, twist it, anything short of tearing) and drop it on top, landing anywhere within the flat sheet's outline. Brouwer's fixed point theorem says some point of the crumpled sheet sits right on top of its twin on the flat one. Stir a cup of coffee gently, no splashing: when the surface settles, some point sits where it began. Continuous rearrangements of a disk, or a triangle, or a square (topology sees a single shape7) always leave something untouched.
Notice there weren't really any new ideas introduced. The map f, just by being continuous and trapped in the triangle, forces a legal coloring: paint each point by the share that shrinks the most.8 Sperner's lemma, which knows nothing about continuity, hands us a rainbow cell at every resolution: three points huddled arbitrarily close, each shedding a different share. Compactness squeezes those cells onto a single point x.9 At x, all three shares are trying to drop at once, but the three shares always total 100%, and you cannot lower all three parts of a whole. So nothing moves, and f(x) = x.
Nash
Game theory in 1949 was von Neumann's subject. His minimax theorem had settled two-player zero-sum games, where my loss is exactly your gain, and his book with Morgenstern treated everything beyond as a theory of coalitions. Nash, then a 21-year-old graduate student at Princeton, asked about the games this left out: interests that neither align nor oppose exactly, no coalitions, every player deciding alone. The question, in its smallest version: two players each pick one of two actions, simultaneously; payoffs land according to a little table. Some games have an obvious resting point. Others have none. Try matching pennies, where I want our coins to agree and you want them to disagree: whatever we're doing, someone wants to switch, forever.
Nash's reframe: let players mix. Instead of picking heads, pick "heads with probability p." Then everything a player might do is a dial from 0 to 1, and everything two players might do together is a point in a square. An equilibrium is a point where neither player can improve their lot by unilaterally moving their own dial: a profile that survives everyone's second-guessing simultaneously. Does such a point always exist?
It sure does, if you recast it as a fixed point problem and smack it with Brouwer. A square is a triangle as far as topology cares, so what's missing is a continuous map whose still points are the equilibria, and that map is what Nash built. Give each player a nudge toward temptation: compute how much each pure action would gain against the opponent's current mix, shift probability toward the gainers, renormalize. Tempted players move; untempted players stay. The result is a continuous map from the square to itself.10
Click anywhere in the square to drop the strategy profile and watch it follow the arrows.
A point the nudge map leaves in place is a point free of temptation, which is the definition of equilibrium. And the map must have an unmoved point: it is continuous, from a square to itself, so Brouwer applies. Every finite game, any number of players,11 any payoffs: at least one equilibrium exists. Auction design and the modeling of markets rest on this theorem (it is the work that later won Nash the Nobel Prize), and from this altitude it is a corollary.12 When Nash described the result to von Neumann, the story goes, von Neumann cut him off mid-sentence: "That's trivial, you know. That's just a fixed point theorem."13 He was right about the mathematics. The contribution was the reframing itself: equilibrium, stated correctly, is a fixed point, and the fixed point theorem already existed.
One caveat, visible in the matching pennies figure: the wandering profile orbits the equilibrium and never settles in. The proof is non-constructive. It guarantees that an equilibrium exists, but it offers no procedure for finding one, and the figure shows the most natural procedure failing. Computing Nash equilibria turns out to be hard in a precise sense, and PPAD, the complexity class that pins down how hard, is defined by the parity-of-paths argument from Part II.14
So the game was rigged from the start. All three theorems came from the same construction: discretize the continuous problem, color the sample so that the hypotheses fix the boundary, apply the lemma at every resolution, and let compactness pass to the limit. Notice that nothing was ever exhibited. We never produced a root, a fixed point, or an equilibrium. We counted, the count was odd, and an odd number is at least one.
Play the game once more on your way out; you will lose again. But you will lose for the same reason a continuous function cannot skip zero, a crumpled sheet cannot avoid its twin, and a finite game cannot escape equilibrium.
Footnotes
-
Sperner proved it as a lemma toward a cleaner proof of the invariance of dimension; fixed points were the last thing on his mind. The best tools rarely stay in the drawer they were built for. ↩
-
The doors-and-rooms framing follows Francis Su's write-up of Sperner's proof, the same source I leaned on when I first blogged this lemma in 2012. That version had figures that held still; this post is the one I wanted to write then, with figures you can poke. ↩
-
The same argument runs in any dimension: in 3D, tetrahedra with four colors, where the "doors" are rainbow faces and the induction hands you the parity of the boundary from one dimension down. Nothing new is needed, which is what makes it a great proof. ↩
-
My 2012 write-up called Sperner's lemma "The Discrete Mathematician's Intermediate Value Theorem." This section is the nickname, cashed out. ↩
-
Take the left endpoints of the brackets at n = 2, 4, 8, …; they live in a closed interval, so (Bolzano–Weierstrass) some subsequence converges to a point c, and every neighborhood of c inherits points of both colors. ↩
-
With one wrinkle: bisection follows a sign change, while the lemma counts all of them, and the odd count is the stronger fact. A function that wiggles across zero five times still shows an odd number of two-colored cells at every resolution. Parity is conserved; that's the law the figure is demonstrating. ↩
-
Any convex compact shape (disk, square, pentagon) can be continuously deformed onto the triangle and back, and fixed point theorems ride along under such deformations: conjugate the map, fix the point, deform back. So proving Brouwer for the triangle proves it for all of them. ↩
-
Two crumbs swept here. If several shares tie for the biggest drop, pick any, say the first; the boundary rules still come out legal because a color is never assigned where its share is zero. And at a point where no share drops, no color is needed, because that point is already fixed and the theorem is proved. ↩
-
Same compactness move as the interval: pick one rainbow cell per resolution, take a convergent subsequence of (say) their rust-shedding corners. The other two corners tag along since cell diameters vanish, and continuity of f promotes "shrinks at points arbitrarily near x" to "cannot grow at x" for all three shares at once. ↩
-
For our 2×2 games, with gains g for each pure action against the current mix: p′ = (p + g₀) / (1 + g₀ + g₁). Continuous, since maxima of linear things are continuous and the denominator is at least 1. One direction is immediate: at an equilibrium every gain is zero and nothing moves. The converse is the one lemma I'll wave at: if some action gains against the mix, some currently played action must pay below the mix's average, and the formula strictly drains probability away from it, so the profile moves. ↩
-
More players and more actions just upgrade the square to a product of simplices, a higher-dimensional convex compact, which Brouwer handles without blinking (see the previous footnote on shapes). ↩
-
Historical fine print: Nash's 1950 announcement leaned on Kakutani's fixed point theorem, a set-valued generalization of Brouwer that shrinks the argument to a paragraph and powers the Arrow–Debreu theorem on market equilibrium. The nudge map above is Nash's 1951 refinement, built to need plain Brouwer and nothing stronger. I proved Kakutani from Brouwer in 2012, by the recipe this essay keeps reusing: approximate, apply the finite tool, squeeze with compactness. ↩
-
The scene comes from Sylvia Nasar's A Beautiful Mind, reconstructed from interviews decades after the fact, so the quote is folklore with a good source rather than a transcript. Nasar also records Nash's own reading of the dismissal: he was aware that his non-cooperative framework implicitly challenged von Neumann's cooperative one, and he later understood the reaction partly in that light. ↩
-
PPAD (Papadimitriou, 1994) is the class of search problems reducible to "this graph of in/out-degree ≤ 1 has an odd number of dangling ends; find another one," which is the door-walk, verbatim. Computing a Nash equilibrium is PPAD-complete (Daskalakis–Goldberg–Papadimitriou 2006, Chen–Deng 2006); so is finding the rainbow room itself. The proof that an answer exists and the reason it's hard to find are the same walk through the same doors. ↩