Classes of games #
This file collects multiple basic classes of games, so as to make them available on most files. We develop their theory elsewhere.
Dicotic games #
A game is dicotic when every non-zero subposition has both left and right moves. The Lawnmower
theorem (proven in CombinatorialGames.Game.Small) shows that every dicotic game is small.
Impartial games #
We define an impartial game as one where every subposition is equivalent to its negative. This is a weaker definition than that found in the literature (which requires equality, rather than equivalence), but this is still strong enough to prove the Sprague--Grundy theorem, as well as closure under the basic arithmetic operations of multiplication and division.
Numeric games #
A game is Numeric if all the Left options are strictly smaller than all the Right options, and all
those options are themselves numeric. In terms of combinatorial games, the numeric games have
"frozen"; you can only make your position worse by playing, and Left is some definite "number" of
moves ahead (or behind) Right.
Short games #
A combinatorial game is Short if it has only finitely many subpositions. In particular, this means
there is a finite set of moves at every point.
We historically defined Short x as data, which we then used to enable some degree of computation
on combinatorial games. This functionality is now implemented through the game_cmp tactic instead.
Dicotic games #
A game x is dicotic if both players can move from every nonempty subposition of x.
- of_DicoticAux :: (
- out : IGame.DicoticAux✝ x
- )
Instances
dicotic eagerly adds all possible Dicotic hypotheses.
Equations
- IGame.Dicotic.tacticDicotic = Lean.ParserDescr.node `IGame.Dicotic.tacticDicotic 1024 (Lean.ParserDescr.nonReservedSymbol "dicotic" false)
Instances For
Impartial games #
An impartial game is one that's equivalent to its negative, such that each left and right move is also impartial.
Note that this is a slightly more general definition than the one that's usually in the literature,
as we don't require x = -x. Despite this, the Sprague-Grundy theorem still holds: see
IGame.equiv_nim_grundyValue.
In such a game, both players have the same payoffs at any subposition.
- of_ImpartialAux :: (
- out : IGame.ImpartialAux✝ x
- )
Instances
impartial eagerly adds all possible Impartial hypotheses.
Equations
- IGame.Impartial.tacticImpartial = Lean.ParserDescr.node `IGame.Impartial.tacticImpartial 1024 (Lean.ParserDescr.nonReservedSymbol "impartial" false)
Instances For
A strategy stealing argument. If there's a move in x, such that any immediate move could
have also been reached in the first turn, then x is won by the first player.
Numeric games #
A game !{s | t} is numeric if everything in s is less than everything in t, and all the
elements of these sets are also numeric.
The Surreal numbers are built as the quotient of numeric games under equivalence.
- of_NumericAux :: (
- out : IGame.NumericAux✝ x
- )
Instances
numeric eagerly adds all possible Numeric hypotheses.
Equations
- IGame.Numeric.tacticNumeric = Lean.ParserDescr.node `IGame.Numeric.tacticNumeric 1024 (Lean.ParserDescr.nonReservedSymbol "numeric" false)
Instances For
Short games #
A short game is one with finitely many subpositions. That is, the left and right sets are finite, and all of the games in them are short as well.
- of_shortAux :: (
- out : IGame.ShortAux✝ x
- )
Instances
short eagerly adds all possible Short hypotheses.
Equations
- IGame.Short.tacticShort = Lean.ParserDescr.node `IGame.Short.tacticShort 1024 (Lean.ParserDescr.nonReservedSymbol "short" false)