Nimber multiplication and division #
The nim product a * b is recursively defined as the least nimber not equal to any
a' * b + a * b' + a' * b' for a' < a and b' < b. When endowed with this operation, the nimbers
form a field.
It's possible to show the existence of the nimber inverse implicitly via the simplest extension
theorem. Instead, we employ the explicit formula given in [On Numbers And Games][conway2001]
(p. 56), which uses mutual induction and mimics the definition for the surreal inverse. This
definition invAux "accidentally" gives the inverse of 0 as 1, which the real inverse corrects.
Nimber multiplication #
@[implicit_reducible]
Nimber multiplication is recursively defined so that a * b is the smallest nimber not equal to
a' * b + a * b' + a' * b' for a' < a and b' < b.
Equations
- Nimber.instMul = { mul := Nimber.mul✝ }
@[implicit_reducible]
Equations
- Nimber.instMulZeroClass = { toMul := Nimber.instMul, toZero := instZeroNimber, zero_mul := ⋯, mul_zero := ⋯ }
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
Nimber division #
@[implicit_reducible]
Equations
- Nimber.instInv = { inv := fun (a : Nimber) => if a = 0 then 0 else Nimber.invAux✝ a }
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.