English
The Grundy value of G equals the Infimum (in the appropriate lattice) of the Grundy values of its left moves.
Русский
Грандивая величина G равна инфимума над величинами грандиевой значимости левых ходов.
LaTeX
$$$ \operatorname{grundyValue}(G) = \inf\{ \operatorname{grundyValue}(G.moveLeft(i)) : i \in \text{LeftMoves}(G) \}. $$$
Lean4
/-- The Grundy value of an impartial game is recursively defined as the minimum excluded value
(the infimum of the complement) of the Grundy values of either its left or right options.
This is the ordinal which corresponds to the game of nim that the game is equivalent to.
This function takes a value in `Nimber`. This is a type synonym for the ordinals which has the same
ordering, but addition in `Nimber` is such that it corresponds to the grundy value of the addition
of games. See that file for more information on nimbers and their arithmetic. -/
noncomputable def grundyValue (G : PGame.{u}) : Nimber.{u} :=
sInf (Set.range fun i => grundyValue (G.moveLeft i))ᶜ
termination_by G