Differential structure of games
Project: Games as recursive coalgebras
Contents
The derivative of a position of a game is the family of its options. For this derivative, the Conway addition of games satisfies a Leibniz rule, and the nim-sum satisfies a Rota–Baxter equation with the mex. Games carry a differential structure, and their values an integral one; see Rota-Baxter rig.
1. Idea§
We write $x\to x'$ when $x'$ is an option of a position $x$ of a game. In the Conway addition $X\otimes Y$ of two games, a move is a move in $X$ or a move in $Y$. So the options of a position $(x,y)$ are the positions $(x',y)$ with $x\to x'$ and the positions $(x,y')$ with $y\to y'$.
Let $\partial$ send a position to the family of its options, and let $+$ be the disjoint union of two families. Then the figure says
This resembles the Leibniz rule $\partial(fg)=(\partial f)g+f(\partial g)$ [Hor25, §5.1].
The winning strategy of Nim comes from this differential structure on games and from an integral structure on the finite sets of natural numbers [Hor26].
2. Definition§
The options of one position are several positions. So the derivative is defined on families of games with a chosen position.
Definition 2.1 (Pointed game)§
A pointed game is a pair $(X,x)$ of a game $X$ and a position $x$ of $X$. We write $\mathbf{Games}_*$ for the category of pointed games; its morphisms are the game morphisms that preserve the chosen position.
Definition 2.2 (Conway addition)§
The Conway addition $X\otimes Y$ of two games $X$ and $Y$ is the game whose positions are the pairs $(x,y)$ of a position of $X$ and a position of $Y$, and whose moves are
In words, a move in $X\otimes Y$ is a move in one of the two games.
See Hor25, Definition 2.10. There it is written $X+Y$.
Example 2.3 (Two chains)§
Let $X$ be the chain $x_1\to x_0$ and $Y$ the chain $y_2\to y_1\to y_0$. Their Conway addition is the grid below. The vertical arrows are the moves in $X$, and the horizontal arrows are the moves in $Y$.
Remark 2.4 (Coalgebras)§
The same formula defines the Conway addition of two coalgebras $X\to\mathcal P_{\mathrm{fin}}(X)$ that need not be games. It is used in the proposition on monoids.
Definition 2.5 (Families of pointed games)§
Let $\mathrm{Fam}(\mathbf{Games}_*)$ be the free coproduct completion of $\mathbf{Games}_*$. Its objects are the families $\mathcal X=\{(X_i,x_i)\}_{i\in I}$ of pointed games. It is a rig category. The sum $\mathcal X+\mathcal Y$ is the coproduct, the disjoint union of two families. The product is the Conway addition of the members,
The zero $0$ is the empty family, and the one $1$ is the family whose only member is the one-position game.
Definition 2.6 (Derivative)§
The derivative of a pointed game is the family of its options,
The derivative of a family is the sum of the derivatives of its members, so $\partial$ preserves coproducts. In words, $\partial$ replaces every position by all positions one move later.
Example 2.7 (Nim heap with two stones)§
The Nim heap with two stones is the game $N$ with the positions $2$, $1$ and $0$, the number of remaining stones.
Its derivatives at the position $2$ are
The third derivative is the empty family, because a play from $2$ has at most two moves.
3. Leibniz rule§
The description of the options of a Conway addition becomes an isomorphism of families.
Proposition 3.1 (Leibniz rule)§☆
For all families $\mathcal X$ and $\mathcal Y$ of pointed games, there is an isomorphism in $\mathrm{Fam}(\mathbf{Games}_*)$
Proof§
Both sides preserve sums, so it suffices to treat two pointed games $(X,x)$ and $(Y,y)$. The options of $(x,y)$ in $X\otimes Y$ are the $(x',y)$ and the $(x,y')$; no position is of both kinds, because a game has no move $x\to x$. So both sides are the family of the pointed games $(X\otimes Y,(x',y))$ and $(X\otimes Y,(x,y'))$.
Remark 3.2 (Differential 2-rigs and species)§
Compare the Leibniz rule for the derivative of Joyal's species [Joy81, Proposition 5]. A category with coproducts, a monoidal product that distributes over them, and an endofunctor that satisfies a categorified Leibniz rule is called a differential 2-rig in [LT23].
4. Differential rigs§
A differential rig is a rig with a derivative, and a differential invariant sends families of games to its elements. For a monoid $M$, the differential rigs of finite degree on the finite subsets of $M$ correspond to the monoids in games with underlying monoid $M$.
Definition 4.1 (Differential rig)§
A differential rig is a rig $A$ with a map $\partial:A\to A$ such that for all $a,b\in A$
In words, $\partial$ is additive and satisfies the Leibniz rule. An example is the rig of smooth functions with the usual derivative.
Definition 4.2 (Differential invariant)§
A differential invariant of games with values in a differential rig $A$ is a function $p$ from the objects of $\mathrm{Fam}(\mathbf{Games}_*)$ to $A$ such that for all families $\mathcal X$ and $\mathcal Y$
Remark 4.3 (Game evaluation)§
On finite families, game evaluation in a calculus rig satisfies the equations of a differential invariant; see the propositions on sums and products and on its derivative.
Definition 4.4 (Rig of finite subsets)§
Let $M$ be a monoid with unit $e$. The rig of finite subsets of $M$ is the set $\mathcal P_{\mathrm{fin}}(M)$ of finite subsets of $M$ with sum $A\cup B$, zero $\emptyset$, product
and one $\{e\}$. For $a\in M$ we write $aB$ and $Ba$ for $\{a\}B$ and $B\{a\}$.
Proposition 4.5 (Monoids and differential rigs)§☆
Let $M$ be a monoid with unit $e$. The differential rig structures $\partial$ on its rig of finite subsets correspond bijectively, by $\partial A=\bigcup_{a\in A}\delta(a)$, to the maps $\delta:M\to\mathcal P_{\mathrm{fin}}(M)$ such that for all $a,b\in M$
These maps are the $\mathcal P_{\mathrm{fin}}$-coalgebra structures that make $M$ a monoid for the Conway addition.
Proof§
A map $\partial$ that preserves unions is determined by the map $\delta(a)=\partial\{a\}$, and every $\delta$ gives such a $\partial$. The equation $\partial 1=0$ and the Leibniz rule then say that $\delta(e)=\emptyset$ and $\delta(ab)=\delta(a)\,b\cup a\,\delta(b)$, that is, the unit and the multiplication are coalgebra morphisms.
Lemma 4.6 (Nilpotent derivative)§☆
Let $\delta:M\to\mathcal P_{\mathrm{fin}}(M)$ be a coalgebra on a set $M$, and put $\partial A=\bigcup_{a\in A}\delta(a)$ for $A\in\mathcal P_{\mathrm{fin}}(M)$. Then $(M,\delta)$ is a game if and only if for every $A\in\mathcal P_{\mathrm{fin}}(M)$ there is $n\geq0$ with $\partial^nA=\emptyset$.
Proof§
Since $\partial$ preserves unions, induction on $n$ shows that $\partial^nA$ is the set of endpoints of chains of moves $a\to a_1\to\cdots\to a_n$ with $a\in A$. So $\partial^nA=\emptyset$ for some $n$ if and only if the chains starting in $A$ have bounded length. As $A$ and the values of $\delta$ are finite, Kőnig's lemma shows that this holds exactly when no infinite chain starts in $A$.
Definition 4.7 (Finite degree)§
A differential rig $A$ has finite degree if for every $a\in A$ there is $n\geq0$ with $\partial^na=0$. Such a derivative is called locally nilpotent in [Hor26].
Corollary 4.8 (Finite degree)§☆
In the correspondence for a monoid $M$, the differential rig structures of finite degree on $\mathcal P_{\mathrm{fin}}(M)$ correspond to the monoid objects in $(\mathbf{Games},\otimes)$ with underlying monoid $M$.
Proof§
By the lemma, $\partial$ has finite degree exactly when the corresponding coalgebra $(M,\delta)$ is a game. Games form a full subcategory of $\mathcal P_{\mathrm{fin}}$-coalgebras that contains the unit and is closed under $\otimes$: an infinite chain of moves in $X\otimes Y$ moves infinitely often in one component, which gives an infinite chain there. So the monoid objects in $(\mathbf{Games},\otimes)$ are the monoids for the Conway addition whose coalgebra is a game, and the correspondence restricts as claimed.
Example 4.9 (Hereditarily finite sets)§
The terminal game $H$ of hereditarily finite sets is a monoid object in $(\mathbf{Games},\otimes)$. The options of a position of $H$ are its elements, so the corollary gives the differential rig of hereditarily finite sets $\mathcal P_{\mathrm{fin}}(H)=H$, with
5. Open questions§
Question 5.1 (Chain rule)§
Is there a composition of games for which a categorified chain rule holds?
Question 5.2 (Topos)§
Is $\mathrm{Fam}(\mathbf{Games}_*)$ a Grothendieck topos? The category $\mathrm{Fam}(\mathbf{Set}_*)$ of families of pointed sets is one: it is equivalent to the category of sets with an idempotent endomap.
6. Related concepts§
- Rota-Baxter rig · Bouton monoid · Games · Monoidal game sum
- Question on differential structure in Games as recursive coalgebras
7. References§
- [HS] Ryuya Hora and Ryo Suzuki, Differential calculus of games, unpublished draft.
- [Hor26] Ryuya Hora, A Rota–Baxter equation for winning games, talk slides, ItaCa Fest 2026.
- [Hor25] Ryuya Hora, Games as recursive coalgebras: A categorical view on the Nim-sum, arXiv:2510.22886, Definition 2.10 and §5.1.
- [LT23] Fosco Loregian and Todd Trimble, Differential 2-rigs, EPTCS 380 (2023), 159–182.
- [Joy81] André Joyal, Une théorie combinatoire des séries formelles, Advances in Mathematics 42 (1981), 1–82, Proposition 5.