Documentation

CombinatorialGames.Game.Loopy.Outcome

Outcomes of loopy games #

We define when a loopy game is a win, a draw, or a loss with each player going first (under the normal play convention).

inductive LGame.IsWin :
PlayerLGameProp

IsWin p x means that player p wins x going first.

Instances For
    inductive LGame.IsLoss :
    PlayerLGameProp

    IsLoss p x means that player p loses x going first.

    Instances For
      theorem LGame.isWin_iff_exists {p : Player} {x : LGame} :
      IsWin p x ymoves p x, IsLoss (-p) y
      theorem LGame.isLoss_iff_forall {p : Player} {x : LGame} :
      IsLoss p x ymoves p x, IsWin (-p) y
      theorem LGame.IsLoss.isWin_of_mem_moves {p : Player} {x y : LGame} (h : IsLoss p x) (hy : y moves p x) :
      IsWin (-p) y
      theorem LGame.not_isWin_iff_forall {p : Player} {x : LGame} :
      ¬IsWin p x ymoves p x, ¬IsLoss (-p) y
      theorem LGame.not_isLoss_iff_exists {p : Player} {x : LGame} :
      ¬IsLoss p x ymoves p x, ¬IsWin (-p) y

      A surviving strategy for player p, going second.

      This is a set of states, such that for every move the opposite player makes, p can bring it back to the set.

      You can think of this as a nonconstructive version of the more common definition of a strategy, which gives an explicit answer for every reachable state.

      Equations
      Instances For
        theorem LGame.IsStrategy.neg {p : Player} {s : Set LGame} (h : IsStrategy p s) :
        IsStrategy (-p) (-s)
        @[simp]
        theorem LGame.IsStrategy.iUnion {p : Player} {ι : Sort u_1} {s : ιSet LGame} (h : ∀ (i : ι), IsStrategy p (s i)) :
        IsStrategy p (⋃ (i : ι), s i)
        theorem LGame.IsStrategy.sUnion {p : Player} {S : Set (Set LGame)} (h : sS, IsStrategy p s) :
        @[simp]
        theorem LGame.not_isLoss_of_isWin {p : Player} {x : LGame} (h : IsWin p x) :
        @[simp]
        theorem LGame.not_isWin_of_isLoss {p : Player} {x : LGame} (h : IsLoss p x) :
        def LGame.IsDraw (p : Player) (x : LGame) :

        IsDraw p x means that p draws x going first.

        Equations
        Instances For
          @[simp]
          theorem LGame.IsDraw.not_isWin {p : Player} {x : LGame} (h : IsDraw p x) :
          @[simp]
          theorem LGame.IsDraw.not_isLoss {p : Player} {x : LGame} (h : IsDraw p x) :
          inductive LGame.Outcome :

          The three possible outcomes of a game.

          Instances For
            noncomputable def LGame.outcomeFor (p : Player) (x : LGame) :

            outcomeFor p x is the outcome of x with p going first.

            Equations
            Instances For
              @[simp]
              theorem IGame.fuzzy_zero_iff_isWin {x : IGame} :
              x0 ∀ (p : Player), LGame.IsWin p (toLGame x)
              theorem IGame.equiv_zero_iff_isLoss {x : IGame} :
              x0 ∀ (p : Player), LGame.IsLoss p (toLGame x)