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.
@[class]
The definition for a impartial game, defined using Conway induction
Equations
- G.impartial = (G.equiv (-G) ∧ (∀ (i : G.left_moves), (G.move_left i).impartial) ∧ ∀ (j : G.right_moves), (G.move_right j).impartial)
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
@[instance]
@[instance]
def
pgame.impartial.move_right_impartial
{G : pgame}
[h : G.impartial]
(j : G.right_moves) :
(G.move_right j).impartial
theorem
pgame.impartial.equiv_iff_sum_first_loses
(G H : pgame)
[G.impartial]
[H.impartial] :
G.equiv H ↔ (G + H).first_loses
theorem
pgame.impartial.no_good_left_moves_iff_first_loses
(G : pgame)
[G.impartial] :
(∀ (i : G.left_moves), (G.move_left i).first_wins) ↔ G.first_loses
theorem
pgame.impartial.no_good_right_moves_iff_first_loses
(G : pgame)
[G.impartial] :
(∀ (j : G.right_moves), (G.move_right j).first_wins) ↔ G.first_loses
theorem
pgame.impartial.good_left_move_iff_first_wins
(G : pgame)
[G.impartial] :
(∃ (i : G.left_moves), (G.move_left i).first_loses) ↔ G.first_wins
theorem
pgame.impartial.good_right_move_iff_first_wins
(G : pgame)
[G.impartial] :
(∃ (j : G.right_moves), (G.move_right j).first_loses) ↔ G.first_wins