Documentation

Mathlib.SetTheory.Game.Short

Short games #

A combinatorial game is Short [Conway, ch.9][conway2001] if it has only finitely many positions. In particular, this means there is a finite set of moves at every point.

We prove that the order relations and <, and the equivalence relation , are decidable on short games, although unfortunately in practice decide doesn't seem to be able to prove anything using these instances.

class inductive SetTheory.PGame.Short :
PGameType (u + 1)

A short game is a game with a finite set of moves at every turn.

Instances
    def SetTheory.PGame.Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves] (sL : (i : x.LeftMoves) → (x.moveLeft i).Short) (sR : (j : x.RightMoves) → (x.moveRight j).Short) :

    A synonym for Short.mk that specifies the pgame in an implicit argument.

    Equations
      Instances For
        def SetTheory.PGame.fintypeLeft {α β : Type u} {L : αPGame} {R : βPGame} [S : (mk α β L R).Short] :

        Extracting the Fintype instance for the indexing type for Left's moves in a short game. This is an unindexed typeclass, so it can't be made a global instance.

        Equations
          Instances For
            def SetTheory.PGame.fintypeRight {α β : Type u} {L : αPGame} {R : βPGame} [S : (mk α β L R).Short] :

            Extracting the Fintype instance for the indexing type for Right's moves in a short game. This is an unindexed typeclass, so it can't be made a global instance.

            Equations
              Instances For
                instance SetTheory.PGame.moveLeftShort (x : PGame) [S : x.Short] (i : x.LeftMoves) :
                Equations
                  def SetTheory.PGame.moveLeftShort' {xl xr : Type u_1} (xL : xlPGame) (xR : xrPGame) [S : (mk xl xr xL xR).Short] (i : xl) :
                  (xL i).Short

                  Extracting the Short instance for a move by Left. This would be a dangerous instance potentially introducing new metavariables in typeclass search, so we only make it an instance locally.

                  Equations
                    Instances For
                      def SetTheory.PGame.moveRightShort' {xl xr : Type u_1} (xL : xlPGame) (xR : xrPGame) [S : (mk xl xr xL xR).Short] (j : xr) :
                      (xR j).Short

                      Extracting the Short instance for a move by Right. This would be a dangerous instance potentially introducing new metavariables in typeclass search, so we only make it an instance locally.

                      Equations
                        Instances For
                          def SetTheory.PGame.Short.ofIsEmpty {l r : Type u_1} {xL : lPGame} {xR : rPGame} [IsEmpty l] [IsEmpty r] :
                          (PGame.mk l r xL xR).Short

                          This leads to infinite loops if made into an instance.

                          Equations
                            Instances For
                              class inductive SetTheory.PGame.ListShort :
                              List PGameType (u + 1)

                              Evidence that every PGame in a list is Short.

                              Instances
                                instance SetTheory.PGame.ListShort.cons (hd : PGame) [short_hd : hd.Short] (tl : List PGame) [short_tl : ListShort tl] :
                                ListShort (hd :: tl)
                                Equations
                                  instance SetTheory.PGame.listShortGet (L : List PGame) [ListShort L] (i : ) (h : i < L.length) :
                                  Equations

                                    If x is a short game, and y is a relabelling of x, then y is also short.

                                    Equations
                                      Instances For
                                        @[irreducible]
                                        instance SetTheory.PGame.shortAdd (x y : PGame) [x.Short] [y.Short] :
                                        (x + y).Short
                                        Equations
                                          instance SetTheory.PGame.shortNat (n : ) :
                                          (↑n).Short
                                          Equations
                                            instance SetTheory.PGame.shortBit0 (x : PGame) [x.Short] :
                                            (x + x).Short
                                            Equations
                                              instance SetTheory.PGame.shortBit1 (x : PGame) [x.Short] :
                                              (x + x + 1).Short
                                              Equations
                                                @[irreducible]

                                                Auxiliary construction of decidability instances. We build Decidable (x ≤ y) and Decidable (x ⧏ y) in a simultaneous induction. Instances for the two projections separately are provided below.

                                                Equations
                                                  Instances For
                                                    instance SetTheory.PGame.lfDecidable (x y : PGame) [x.Short] [y.Short] :
                                                    Equations
                                                      instance SetTheory.PGame.ltDecidable (x y : PGame) [x.Short] [y.Short] :
                                                      Decidable (x < y)
                                                      Equations