Rota-Baxter rig
Project: Games as recursive coalgebras
Contents
The Grundy number and the generating function that counts plays both turn Conway addition into multiplication. A Rota-Baxter rig describes the recursion common to these two game invariants.
1. Idea§
A Rota–Baxter ring of weight zero is a ring $R$ with an additive operator $P:R\to R$ satisfying
This identity uses only addition and multiplication, so it also makes sense on a rig, where elements need not have additive inverses.
For games, a position with no moves has value $1$: the product of games combines two positions by letting a player move in either one, and adjoining a position with no moves adds no choices. The sum over its possible moves is empty, so the operator assigning a value to the position must send $0$ to $1$. An additive operator sends $0$ to $0$. In a Rota-Baxter rig we therefore retain the weight-zero identity, allow an arbitrary function $P$ as the operator, and require $P(0)=1$.
For a finite set $S$ of natural numbers, let $\mathrm{mex}\,S$ be the least natural number that is not in $S$. Let $\oplus$ be the nim-sum, the binary addition without carry, and write $a\oplus T=\{a\oplus t\mid t\in T\}$ for a number $a$ and a set $T$. Then for all finite sets $S$ and $T$ of natural numbers
This is the only non-trivial step in the proof of the nim-sum rule for Grundy numbers. It has the same form as the Rota–Baxter equation, which integration satisfies:
So the mex plays the role of the integral, the nim-sum that of the product, and the union that of the sum.
A Rota-Baxter rig is a rig with such an integral. Every Rota-Baxter rig gives an invariant of games that sends the Conway addition of games to the product of the rig. For the mex, this invariant is the Grundy number.
2. Definition§
An integral is a map from a rig to itself. It is not assumed to be additive, because the mex is not.
Definition 2.1 (Rota-Baxter rig)§
A Rota-Baxter rig is a rig $A$ with a map $\int:A\to A$ such that for all $f,g\in A$
The map $\int$ is the integral, and the second equation is the binary equation.
Remark 2.2 (Rota–Baxter operators)§
The binary equation is the equation of a Rota–Baxter operator of weight $0$. A Rota–Baxter operator is additive, so it sends $0$ to $0$; an additive map with $\int 0=1$ exists only on the trivial rig. An integral is therefore a non-additive, unital variant of a Rota–Baxter operator.
Remark 2.3 (n-ary equation)§
In a Rota-Baxter rig, for all $n\geq 0$ and all $f_1,\dots,f_n$,
In words, a product of $n$ integrals is the integral of the sum of the $n$ terms in which one integral sign is removed. The cases $n=0$ and $n=2$ are the two equations of the definition, and the general case follows from them by induction on $n$.
Lemma 2.4 (Sums of units)§☆
In a Rota-Baxter rig, if $\int h_1=\dots=\int h_n=1$ then $\int(h_1+\dots+h_n)=1$.
Proof§
The case $n=0$ is $\int 0=1$. For $n=2$ the binary equation gives
and the general case follows by induction.
Definition 2.5 (Calculus rig)§
A calculus rig is a Rota-Baxter rig $A$ with an additive map $\partial:A\to A$ such that for all $f,g\in A$
The first two equations say that $\partial$ is a derivation, as in a differential rig. The third is the fundamental theorem of calculus.
3. Examples§
The integral of analysis and the mex are the two examples behind the definition. The third example is built from the hereditarily finite sets, which are the positions of the terminal game.
Example 3.1 (Smooth functions)§
The smooth functions $\mathbb R\to\mathbb R$, with the pointwise sum and product, form a calculus rig: the map $\partial$ sends $f$ to its derivative, and
The constant $1$ cannot be replaced by another number, since $\int 0=1$.
Example 3.2 (Grundy rig)§
Let $\mathcal P_{\mathrm{fin}}(\mathbb N)$ be the set of finite sets of natural numbers. It is a rig with sum $S\cup T$, zero $\varnothing$, product
and one $\{0\}$. With $\int S=\{\mathrm{mex}\,S\}$, this is a Rota-Baxter rig. We call it the Grundy rig. Its binary equation is the equation of the mex and the nim-sum in the Idea. No map $\partial$ makes it a calculus rig: the integral of a calculus rig is injective, but $\int\varnothing=\int\{1\}=\{0\}$.
Definition 3.3 (Conway addition of hereditarily finite sets)§
A hereditarily finite set is a finite set whose elements are hereditarily finite sets. Let $H$ be the set of all of them, so that $H=\mathcal P_{\mathrm{fin}}(H)$. We read $a\in H$ as a game position whose options are the elements of $a$. The Conway addition of two such positions is defined by recursion,
Example 3.4 (Hereditarily finite sets)§
Let $H$ be the set of hereditarily finite sets, with the Conway addition $*$. Then $H$ is a calculus rig with sum $A\cup B$, zero $\varnothing$, product $\{a*b\mid a\in A,\ b\in B\}$, one $\{\varnothing\}$, and
Here a set $A\in H$ is read as a family of positions: the derivative $\partial A$ is the family of all options of the members of $A$, and the integral $\int A$ is the single position whose options are the members of $A$.
Example 3.5 (Initial Rota-Baxter rig)§
Finite formal sums of finite rooted trees form the initial Rota-Baxter rig, with integration given by joining the roots of the summands under a new root.
4. Game evaluation§
A Rota-Baxter rig $A$ assigns to every position of every game an element of $A$, computed by recursion from the options. We call this process game evaluation. For smooth functions the resulting value is the generating function that counts plays. Game evaluation sends Conway addition to multiplication in $A$.
Definition 4.1 (Game evaluation)§
Let $A$ be a Rota-Baxter rig and $X$ a game; we write $x\to x'$ when $x'$ is an option of the position $x$. The value in $A$ of a pointed game $(X,x)$ is the element $F_{(X,x)}\in A$ defined by recursion on the options,
For a finite family $\mathcal X$ of pointed games, $F_{\mathcal X}$ is the sum of the values of its members.
Example 4.2 (Nim heap with two stones)§
The Nim heap with two stones has the positions $2$, $1$ and $0$, the number of remaining stones.
Write $F_n$ for the value of the position $n$. Since $0$ has no options, $F_0=\int 0=1$; then $F_1=\int F_0$ and $F_2=\int(F_0+F_1)$. Evaluating in the Grundy rig and in smooth functions gives
Proposition 4.3 (Evaluation preserves sums and products)§☆
Let $+$ be the disjoint union of finite families of pointed games and $\otimes$ their Conway addition. For all finite families $\mathcal X$ and $\mathcal Y$,
Moreover $F$ is $0$ on the empty family and $1$ on the game with one position.
Proof§
Sums and $0$ are preserved by definition, and the game with one position has the value $\int 0=1$. For the product it suffices to treat two pointed games $(X,x)$ and $(Y,y)$; we write $F_x$ and $F_y$ for their values. The options of $(x,y)$ in the Conway addition are the $(x',y)$ and the $(x,y')$, so by induction and the binary equation
Proposition 4.4 (Derivative)§☆
Let $A$ be a calculus rig, and let $\partial\mathcal X$ be the family of options of a finite family $\mathcal X$ of pointed games. Then $F_{\partial\mathcal X}=\partial F_{\mathcal X}$.
Proof§
Both sides are additive, and for a pointed game
Lemma 4.5 (Values of games commute)§☆
In a Rota-Baxter rig, the finite sums of values of pointed games form a commutative Rota-Baxter subrig.
Proof§
The sums of values contain $0$ and $1$. They are closed under products because evaluation preserves products, and under the integral because a sum of values, integrated, is the value of the game whose options are the summands. The product is commutative because the Conway addition of two games is symmetric up to isomorphism.
Remark 4.6 (Origin of the proofs)§
The proof that $F$ preserves products is Ryo Suzuki's simplification of Hora's original proof.
Example 4.7 (Nim-sum rule)§
The Grundy number of a position is defined by recursion, $g(x)=\mathrm{mex}\{g(x')\mid x\to x'\}$. So in the Grundy rig, $F_{(X,x)}=\{g(x)\}$, and preservation of products is the nim-sum rule
for the Conway addition of two games. It contains Bouton's theorem on Nim.
See Hora, Theorem 2.17.
Example 4.8 (Counting plays)§
Let $c_n$ be the number of plays $x\to x_1\to\cdots\to x_n$ of length $n$ from $x$. In the example of smooth functions,
A Nim heap with $h$ stones has $c_n=\binom hn$, and its generating function is the Laguerre polynomial $L_h(-z)$.
Remark 4.9 (From mex to binary digits)§
In the Grundy rig, the integral assigns $\{\mathrm{mex}(S)\}$ to a finite set $S$. Why do the resulting heap values multiply by binary addition without carry? Write $e_n$ for the value of a heap of size $n$. In any commutative Rota-Baxter rig, if $e_{2^k}^2=1$ for every $k\geq0$, the binary digits give the factors of $e_n$: for example, $e_3=e_2e_1$ and $e_3e_1=e_2$. See the general formula and its proof.
5. Related concepts§
- Differential structure of games · Bouton monoid · Game value
- Initial Rota-Baxter rig · Laguerre values · Calculus in characteristic 2 · Bypass law
- Question on differential structure in Games as recursive coalgebras
6. References§
- [Hor26] Ryuya Hora, A Rota–Baxter equation for winning games, talk slides, ItaCa Fest 2026; partially based on joint work with Ryo Suzuki.
- [HS] Ryuya Hora and Ryo Suzuki, Differential calculus of games, unpublished draft.
- [Hor25] Ryuya Hora, Games as recursive coalgebras: A categorical view on the Nim-sum, arXiv:2510.22886, Proposition 5.2.