Documentation

Mathlib.SetTheory.Game.Domineering

Domineering as a combinatorial game. #

We define the game of Domineering, played on a chessboard of arbitrary shape (possibly even disconnected). Left moves by placing a domino vertically, while Right moves by placing a domino horizontally.

This is only a fragment of a full development; in order to successfully analyse positions we would need some more theorems. Most importantly, we need a general statement that allows us to discard irrelevant moves. Specifically to domineering, we need the fact that disjoint parts of the chessboard give sums of games.

The equivalence (x, y) ↦ (x, y+1).

Equations
Instances For
    @[simp]
    theorem SetTheory.PGame.Domineering.shiftUp_apply (a✝ : × ) :
    shiftUp a✝ = Prod.map id (fun (x : ) => x + 1) a✝
    @[simp]
    theorem SetTheory.PGame.Domineering.shiftUp_symm_apply (a✝ : × ) :
    shiftUp.symm a✝ = Prod.map id (fun (x : ) => x + -1) a✝
    @[simp]
    theorem SetTheory.PGame.Domineering.shiftRight_symm_apply (a✝ : × ) :
    shiftRight.symm a✝ = Prod.map (fun (x : ) => x + -1) id a✝
    @[simp]
    theorem SetTheory.PGame.Domineering.shiftRight_apply (a✝ : × ) :
    shiftRight a✝ = Prod.map (fun (x : ) => x + 1) id a✝
    @[reducible, inline]

    A Domineering board is an arbitrary finite subset of ℤ × ℤ.

    Equations
    Instances For

      Left can play anywhere that a square and the square below it are open.

      Equations
      Instances For

        Right can play anywhere that a square and the square to the left are open.

        Equations
        Instances For
          theorem SetTheory.PGame.Domineering.mem_left {b : Board} (x : × ) :
          x left b x b (x.1, x.2 - 1) b
          theorem SetTheory.PGame.Domineering.mem_right {b : Board} (x : × ) :
          x right b x b (x.1 - 1, x.2) b

          After Left moves, two vertically adjacent squares are removed from the board.

          Equations
          Instances For

            After Left moves, two horizontally adjacent squares are removed from the board.

            Equations
            Instances For

              The instance describing allowed moves on a Domineering board.

              Equations
              • One or more equations did not get rendered due to their size.

              Construct a pre-game from a Domineering board.

              Equations
              Instances For

                All games of Domineering are short, because each move removes two squares.

                Equations

                The Domineering board with two squares arranged vertically, in which Left has the only move.

                Equations
                Instances For

                  The L shaped Domineering board, in which Left is exactly half a move ahead.

                  Equations
                  Instances For