mathlib documentation

Basic definitions about impartial (pre-)games #

We will define an impartial game, one in which left and right can make exactly the same moves. Our definition differs slightly by saying that the game is always equivalent to its negative, no matter what moves are played. This allows for games such as poker-nim to be classifed as impartial.

def pgame.impartial_aux  :
pgame → Prop

The definition for a impartial game, defined using Conway induction.

theorem pgame.impartial_def {G : pgame} :
G.impartial G.equiv (-G) (∀ (i : G.left_moves), (G.move_left i).impartial) ∀ (j : G.right_moves), (G.move_right j).impartial
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
theorem pgame.impartial.nonpos (G : pgame) [G.impartial] :
¬0 < G
theorem pgame.impartial.nonneg (G : pgame) [G.impartial] :
¬G < 0

In an impartial game, either the first player always wins, or the second player always wins.

theorem pgame.impartial.add_self (G : pgame) [G.impartial] :
(G + G).equiv 0

This lemma doesn't require H to be impartial.

This lemma doesn't require H to be impartial.

theorem pgame.impartial.lf_zero_iff {G : pgame} [G.impartial] :
G.lf 0 0.lf G