Sums and comparison

Where the impartial theory stops

Sprague–Grundy gives every impartial position one number, and the number is complete. The moment the two players have different moves no number works at all — not a harder one to compute, none — and three positions here are compared against every nimber to show it.

Assumes: Every impartial game is a Nim heap · Comparing positions

The Sprague–Grundy theorem is the strongest result in the impartial theory and it has one hypothesis: both players must have the same moves from every position.

Drop it and the theorem does not weaken. It fails completely.

Three partizan positions against every nimber, and not one match. Sprague and Grundy give every impartial position a single number that is complete: two positions with the same value are interchangeable everywhere. The three positions here are partizan — the two players have different moves — and each is compared against every nimber up to eight. Nothing is equal to anything. The magenta cells are worse than inequality: a position confused with a nimber is not above it or below it either, so no ordering could rescue the substitution.
Fig. 1 Three partizan positions compared against every nimber up to eight. No cell reads “=”, so no Grundy value stands in for any of them. The magenta cells are the worse case: a position confused with a nimber is neither above nor below it, so no ordering could rescue the substitution either.

What is being claimed, precisely

For impartial games, every position PP has a number g(P)g(P) such that PP and the Nim heap of size g(P)g(P) are equal as games: their difference is a second-player win, so either may replace the other in any sum whatsoever without changing any outcome.

For partizan games, the corresponding claim would be that every position equals some nimber. The figure tests it directly on three positions and finds nothing equal to anything.

The three are chosen to fail in different ways, and the pattern along each row is the content.

Three ways of not being a number

A position worth ½ — Left may move to 0, Right may move to 1 — is above every nimber. That is a clean failure: ½ is a positive number, every nimber is confused with zero, and a positive number beats anything confused with zero.

Up is above 0 and above ∗2 and ∗3 and the rest, and confused with ∗. So it is not merely unequal to the nimbers; it is not comparable with one of them.

A switch — Left to 1, Right to −1 — is confused with every nimber. Nothing in the row is a comparison at all.

Three positions chosen to fail in three different ways is an argument with an obvious objection in it: they were chosen. The reply is to run the identical comparison on positions nobody selected — the values of ordinary Domineering boards, computed from the rules of the game and only then compared with anything.

Three Domineering boards against every nimber. The values of three Domineering boards, computed from the rules of the game and then compared against every nimber up to eight. Nothing is equal to anything. The three positions in the default reading of this figure were chosen to fail in three different ways, which invites the objection that they were chosen at all; these are boards.
Fig. 2 Three Domineering boards against every nimber up to eight, with each board’s value computed from its own move rules before any comparison is made. The empty 2 × 3 is worth {2 | −1/2} and is confused with every nimber; the 2 × 4 is worth {{20}0}\{\{2 \mid 0\} \mid 0\}, which is below nought and confused with every nimber above it; the 3 × 3 with four squares taken is worth 1∗ and is above the lot. Three shapes of failure again, and this time the shapes were not selected — the boards were, and the values arrived.

What impartial means, and how easily it is lost

The hypothesis sounds like a mild regularity condition and it is extremely strong.

Impartial: from every position, both players have exactly the same set of moves. Not similar moves, not symmetric moves — the same ones.

Nim qualifies: whoever is to move may take from any heap. Sprouts qualifies. Kayles and the octal games qualify. And that is close to the end of the list of games anybody plays.

Domineering does not, because Left places vertical dominoes and Right horizontal ones. Hackenbush does not, because the edges are coloured and each colour belongs to a player. Go does not, and neither does chess, draughts or anything else with two kinds of piece.

Domineering is the one to keep hold of, because it is as ordinary a game as this subject contains and the hypothesis fails at its very first position rather than somewhere deep in an analysis. Nothing subtle is going wrong: the two players are simply doing different things with the same board.

So the theorem covers a family that is mathematically natural and, as games go, unusual. The subject’s centre of gravity is on the other side of the hypothesis.

Why “confused” is the fatal word, not “unequal”

If partizan positions were merely unequal to all nimbers but comparable with them, there would be a repair available: locate each position between two nimbers and see how much of the theory survives.

Confusion kills that. Two games that are confused are not ordered relative to each other at all — the difference between them is a first-player win, so whoever moves in it wins, and neither is “bigger”. A structure with confused elements is a partial order, and the nimbers do not sit inside it as a spine along which everything else can be located.

That is the precise sense in which one number per position stops working. It is not that the right number is hard to find. It is that the target — a totally ordered set of values that every position is equal to a member of — does not exist.

The repair worth running rather than dismissing is the obvious one: if the nimbers are the wrong totally ordered family, try a better one. The numbers are the family every reader already has, they are dense where the nimbers are sparse, and they are what a score would be measured in.

Four positions against the numbers, and not one match. The nimbers are not the only totally ordered family of values available, so the natural repair is to compare a partizan position against the numbers instead. Four positions are compared against seven of them. Up is above every negative number and below every positive one — perfectly located, equal to nothing — while star is confused with nought and the two switches with a band of numbers, so the order fails as well. Neither failure is repaired by taking a finer grid.
Fig. 3 The same table with the numbers along the top instead of the nimbers, and four positions down the side. Up fails in the way a reader can accept — above every negative number, below every positive one, perfectly located and equal to none of them — so a finer grid would place it more precisely and never reach it. The other three fail in the way that ends the repair. Star is confused with nought and comparable with everything else; the switch {11}\{1 \mid -1\} is confused with six of the seven numbers here; {20}\{2 \mid 0\} is confused with five. Refining the grid does nothing whatever to a row of ‖.

Both halves of that matter. A value that is squeezed between numbers without being one is an inconvenience — the theory would need limits, and limits are a thing mathematics knows how to build. A value that is confused with a whole interval is not squeezed anywhere, and no refinement of a totally ordered set reaches it.

What impartiality does give: a position that is its own negative

There is a structural fact underneath the collapse that makes it feel less arbitrary, and it is worth getting exactly right because the tempting version of it is false.

An impartial position is symmetric between the players, so swapping their options changes nothing: G=G-G = G. Adding GG to both sides gives G+G=0G + G = 0. Every impartial position is its own negative, and that much is immediate from the definition — no recursion, no mex, no theorem.

The tempting next step is to say that the values with that property are exactly the nimbers, and to conclude that impartiality has pinned the position down before the theorem is invoked at all. It is a tidy argument and it does not survive contact with the third row of the hero figure.

Partizan positions are in general not self-negating, are not forced anywhere, and the set of values they can take is the whole structure. The question is what the exceptions do, and the section below is about one of them.

Negation is the mirror: swap the two players’ options and negate them, recursively. A star comes back where it started, because an impartial position is symmetric between the players. A switch {20}\{2 \mid 0\} goes to {02}\{0 \mid -2\} and \uparrow goes to \downarrow, which is what a partizan position ordinarily does under the mirror — and the section below is about the positions that ordinarily do not.

The failure is not gradual

It is worth being clear that partizan games are not “less impartial” by degrees with a correspondingly degraded theory.

A position where the two players’ moves differ in one place, deep in the tree, is fully partizan: the Grundy value does not approximately work, it does not work. There is no measure of how impartial a game is and no theorem that says nearly-impartial games have nearly-nimber values.

Small Domineering boards and what they are worth. Every value here was computed from the moves rather than looked up. Even on boards this small the values are switches and infinitesimals rather than numbers, which is the ordinary situation for a partizan game and the reason the theory needs more than arithmetic.
Fig. 4 Four Domineering positions with their values, two of them boards with squares already taken. Some are nimbers — the empty 1×1 is 0 and a 2×3 with its two end squares gone is ∗ — because a particular position may happen to be self-negating even in a partizan game. That does not help: the whole 2×3 is worth {2 | −1/2} and the punctured 3×3 is 1∗, and the theory needs the value of every position. The ones that are not nimbers are not nearly nimbers either.

The presence of some nimber-valued positions inside a partizan game is worth noticing precisely because it is the thing that could mislead. A reader who computed a few values of a partizan game and found ∗ and 0 might reasonably conclude the impartial machinery applies. It does not, and the next position computed will show it.

The sharper form of the claim is available by construction rather than by survey, and it settles the word gradual directly. Start with a Nim heap, which is as impartial as a position gets, and take away one of Right’s moves. Then rebuild the heap above it with that damaged position in place of one of its options, so that everything a player can see for the first move, or the first two, or the first three, is still perfectly symmetric and the single missing option sits further and further down.

One option removed, at three depths, and no nimber fits any of them. A Nim heap with one of Right's options removed, and then the same removal pushed one level further down the tree while everything above it stays impartial. None of the three is equal to any nimber. The heap each was built from is equal to exactly one, which is checked here, so the difference is the removal and not the construction — there is no measure of how impartial a position is.
Fig. 5 ∗2 with one of Right’s two moves removed, and then the same removal pushed a level deeper twice over. The first row is worth ↑∗ — already no nimber, from one missing option in a position with four. The rows below it are impartial at the root, impartial at every position a first move reaches in the second row, and still equal to no nimber at all. Each row also checks the heap it was built from, which is equal to exactly one nimber and confused with the rest, so the difference between the two is the removal.

Nothing degrades along that sequence. The third row’s asymmetry is two moves down a tree whose top two levels are indistinguishable from Nim, and its value is as far from a nimber as the first row’s — confused with three of them, above the rest, equal to none. There is no quantity here that gets smaller as the flaw gets deeper, which is what “not gradual” means and why no approximate version of the theorem exists to be looked for.

What had to be built instead

The replacement is not a better number. It is a larger object: a value that is itself a game, written {LR}\{L \mid R\} from the values of the options, reduced to a canonical form, and compared with others by playing the difference.

That structure is a group under the disjunctive sum with a partial order on top, and the nimbers sit inside it as one small family among many. Numbers are another family. The infinitesimals are a third. And most values belong to none of the named families and are written out as brace expressions.

The reduction that makes such a value well defined is canonical form: dominated options removed, reversible options replaced, and the result unique whatever order the steps are taken in. That machinery is most of what the partizan theory costs, and the impartial theory needs none of it, because a nimber is already canonical.

What survives the crossing

The collapse is total for the value, and several other things cross over intact, which is worth recording because it explains why the partizan theory was buildable at all.

The disjunctive sum survives. Games still add, the sum of partizan games is a partizan game, and the operation is still associative and commutative with 0 as identity.

Negation survives, and does more work than before: G-G is GG with the two players’ options swapped, and G+(G)=0G + (-G) = 0 for every GG. That is what makes the values a group and makes comparison a subtraction.

Termination survives, so the recursion still bottoms out and values are still finite objects.

So a sum of three partizan components with values of three kinds — a number, a nimber, an infinitesimal — is combined by exactly the operation the impartial theory uses. The operation is unchanged. What changed is that the things being combined are no longer single integers.

What does not survive is the compression. The impartial theory’s achievement is not that games add; it is that a position collapses to one small number. Partizan games add just as well and collapse to a tree, and the whole difference in cost between the two theories is there.

The self-negation argument, and why it is not the proof

The shortcut is worth following to its end, because the place it breaks is the most informative thing on this page and it breaks on a position already drawn above.

The first two steps hold. An impartial position GG has the same options for both players, so swapping them changes nothing and G=G-G = G. Adding GG to both sides gives G+G=0G + G = 0: every impartial position is its own negative under the sum.

The third step is the one to refuse. Which values satisfy x+x=0x + x = 0? Not only the nimbers — and the counterexample is the switch in the bottom row of the hero figure.

Take ±1\pm 1, the position where Left may move to 11 and Right to 1-1. Negating swaps the options and negates them, which turns {11}\{1 \mid -1\} into {11}\{1 \mid -1\}: the switch is its own negative, exactly as an impartial position is. So ±1+±1=0\pm 1 + \pm 1 = 0, and the second player really does win it — Left takes one switch to 11, Right takes the other to 1-1, the total is zero and Left has nothing left.

And ±1\pm 1 is not a nimber. It is confused with every nimber, which is what its row in the hero figure says: no cell in it reads “=”, and no cell reads “≥” or “≤” either.

So self-negation is necessary and not sufficient. It is a property the nimbers have and share, not a property that picks them out; the same holds for ±2\pm 2, and for ±1\pm 1 added to a star, and for an unbounded family beyond them. Impartiality does not pin a position to the star family in one step, and any account saying it does has proved the theorem by assuming it.

What does the real work is that impartiality is hereditary. A follower of an impartial position is impartial, and so is a follower of that, all the way to the end of the game. So the induction has something to stand on: assume every option is a nimber, note that the option set is the same for both players, and the mex of their indices is forced. Self-negation is true at every step of that induction and decides nothing at any of them.

That is why the theorem is a theorem. The symmetry is visible in one line and gives a large, badly behaved class; the nimber comes out of a recursion over the whole tree, and the switch is the reminder that the line and the recursion are not the same argument.

Every position has an exact opposite. A position beside its negative, which is the same game with the players exchanged, and the sum of the two. The sum is worth zero every time — a second-player win — because the second player can answer each move with its mirror image. It is the fact that makes values a group, and it is what lets one position be subtracted from another.
Fig. 6 Negation as a mirror, with the counterexample drawn beside the nimbers. Both stars are their own mirror image and so is {11}\{1 \mid -1\}, which is not a nimber and is confused with every one of them — so being one’s own negative is a property the star family shares with the switches rather than a property that selects it. The mirror is nonetheless where the whole partizan theory of comparison comes from.

The check that refuses the shortcut

A false step of that shape is not caught by looking at pictures, because the picture it draws is correct: the star really is its own mirror image, and every cell the mirror figure shows is right. What was wrong was a sentence next to it, and a sentence is exactly what nothing on this site reads.

So the shortcut is now something the machinery refuses rather than something a reader has to notice. Three claims are asserted against the same evaluator every other value on this site comes from.

That ±1\pm 1 is its own negative. Negate it and compare, and the comparison comes back equal — so the premise of the shortcut is genuinely satisfied by a position that is not a nimber.

That ±1+±1\pm 1 + \pm 1 is zero. Built as a sum and compared against the empty game, it is, so the conclusion drawn from that premise is genuinely available and genuinely useless.

That ±1\pm 1 equals no nimber in the drawn range, which is the hero figure’s third row re-asserted as a claim rather than as a picture.

Together those three are the refusal: a value satisfying x+x=0x + x = 0 that is not in the star family, produced by the same recursion that produces every other number on this page. The same three hold for ±2\pm 2 and for ±1\pm 1 added to a star, so the counterexample is not a single awkward game but a family, and the check is fed all three.

Which makes it drawable, and drawing it is worth more than asserting it, because the whole force of the shortcut is that its premise looks like a description of the nimbers. Put the three switches in the same table as two stars and the premise is visibly common property.

Every value here is its own negative, and two of them are nimbers. Impartiality gives −G = G in one line, and therefore G + G = 0, and the tempting next step is that the values with that property are the nimbers. These five all have it. Three are switches and match no nimber; two are nimbers and match themselves. So self-negation is a property the star family shares with the switches rather than one that selects it, and the theorem needs the recursion over the whole tree.
Fig. 7 Five values, every one of them its own negative and every one doubling to nought, against every nimber up to eight. The two stars match themselves and nothing else, which is the theorem. The three switches — ±1\pm 1, ±2\pm 2, and ±1\pm 1 with a star added — match nothing at all and are confused with the whole row. The two facts the shortcut runs on are recomputed for each row rather than quoted, and the figure refuses to draw if a row fails either of them or if a switch turns out to match after all.

What the check cannot do is notice the next sentence of its kind. It can only refuse this one, which is the ordinary limit of turning a correction into a test.

Where the model stops

The comparison is exhaustive over a range. The hero figure checks against nimbers up to ∗8, and the claim that no nimber equals these positions is a claim about that range. The general statement — no nimber at all — follows from the self-negation argument above rather than from the table.

And the collapse is one-directional. Every impartial game is a partizan game, so the larger theory covers everything; there is no loss. What is lost is the cheapness: an impartial position has a small integer where a partizan one has a tree.

What the picture cannot show

The table of relations is a grid of four symbols and it makes the four look equally weighted. They are not.

Three of them — above, below, equal — say the two positions are on a common scale. The fourth says they are not. Drawing all four as cells of the same size in the same grid gives no sense that one of them is a different kind of answer from the other three, and the essay has to carry that.

Who found it, and when

The gap sat open from 1939 to about 1970. That is a long time for a subject to have a complete theory of half of itself and nothing for the other half, and the reason is the one the notation essay makes: there was no way to write a partizan value, so there was no object to have a theory of.

Conway’s construction supplies the object, and everything else follows from having something to write down.

Why the gap took thirty years, mechanically

The notation essay gives one reason — there was nothing to write down — and there is a second, which is about what was being looked for.

The natural extension to try is: keep one number per position, but let the number be from a richer set. Rationals, perhaps, or pairs of numbers, or a number with a sign convention for which player it favours.

Every version of that fails for the same reason, and it is the reason the hero figure draws: the values have to be partially ordered, because confusion is real and any totally ordered set of values cannot represent it. A pair of numbers is totally orderable lexicographically; so is any tuple; so is anything anybody would reach for first. The table of comparisons against the numbers, above, is that search run to its end on the richest ordered family anybody would try first, and the rows of ‖ in it are what every later attempt would have found.

The obstruction is in the comparison itself. A relation between two positions is decided by playing their difference and reading off who wins, and the difference has four outcome classes rather than three; the fourth is a first-player win, which is confusion, and no arrangement of numbers produces that answer.

So the search had to be for a structure that is not a set of numbers at all, and there was no reason to look for one until it was clear nothing simpler could work. Establishing that takes as long as it takes.

The one place a number does come back

There is a partial consolation, and it is the closest thing the partizan theory has to a Grundy value.

For positions that are all-small — where a player has a move exactly when the opponent does — there is a single number, the atomic weight, which measures roughly how many copies of ↑ the position is worth. It behaves a great deal like a Grundy value: it adds, it decides outcomes in most cases, and it collapses a tree to an integer.

It is not complete. Atomic weight decides the outcome of a sum only when the weight is large enough in absolute value, and near zero the theory needs the full value again. So it is a compression that works most of the time, which is a weaker claim than Sprague–Grundy makes and is the strongest available on the partizan side.

What it is measuring against is the infinitesimals ordered among themselves, which is a scale rather than a line: the tinies sit above nought and below every multiple of ↑, so a number of ups is a coarse reading of a family it cannot separate. A single number summarising a position does reappear on the partizan side, then, and unlike a Grundy value it arrives with conditions on when it may be trusted.

What the impartial theory keeps that the partizan one wants

Running the comparison the other way is worth a paragraph, because the impartial theory is not simply a special case with less in it.

Its values are totally ordered by nothing at all, which sounds like a loss and is a simplification: every pair of distinct nimbers is confused, so there is no ordering to maintain, no comparison to compute, and no partial order to reason about. A Grundy value is an index and behaves like one.

Its canonical form is free. A nimber is canonical; there is no reduction step, no dominated options to remove, no reversibility to detect. The reduction machinery that the partizan theory needs simply has no work to do.

And its addition is a machine instruction. Exclusive-or, on integers, at whatever width the values need.

All three of those are one cell in a table this page has now drawn six times. Run the identical comparison on impartial positions and every row has an equality in it, in the column the mex rule names, with confusion in every other column of the row — which is the ordering that is not there, the canonical form that needed no reduction, and the number the exclusive-or operates on, all at once.

The same table with impartial positions, and one match in every row. Three positions of a subtraction game compared against every nimber up to eight, by the same routine that finds no match for a partizan position. Every row has exactly one equality, in the column the mex rule names. That single cell is the Sprague–Grundy theorem, and it is what the partizan rows have none of.
Fig. 8 Three heaps of the subtraction game taking one, three or four counters, against every nimber up to eight, by the routine that finds nothing for a partizan position. A heap of four matches ∗2, a heap of five matches ∗3, a heap of seven matches nought and is a loss for the mover, and every other cell in every row is confusion. Each row’s single equality is checked against the mex rule separately, and the figure refuses to draw if a row matches twice, matches nothing, or matches a nimber the mex does not name.

That one cell per row is the whole of what Sprague and Grundy give, and it is the cell the partizan tables above have none of. It is also why the impartial theory feels like arithmetic and the partizan theory feels like algebra: with an equality in hand, a position is a number and the rest of the row can be forgotten; without one, the row is the position.

So the impartial theory is not a fragment. It is a case where the general theory’s objects collapse to something a computer does in one cycle, and the reason to state the collapse carefully is that anybody meeting the subject through Nim will assume the general case is a slightly harder version of it. It is a different order of thing.

Where the ladder goes next

This anchor runs from the theorem, through why the mex was forced, to here — the boundary. Past it the ladder is not about impartial games any more: it is about what a value has to be when a number will not do, which is what the notation was for and what the rest of this site is about.

Part 4 of 4

One argument about Sprague–Grundy. The parts either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 29.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.

Canonical formComparisonDisjunctive sumGrundy valueImpartialInfinitesimalsNimberOutcome classPartizanSprague–GrundySwitches