Documentation

Mathlib.SetTheory.Game.Birthday

Birthdays of games #

There are two related but distinct notions of a birthday within combinatorial game theory. One is the birthday of a pre-game, which represents the "step" at which it is constructed. We define it recursively as the least ordinal larger than the birthdays of its left and right options. On the other hand, the birthday of a game is the smallest birthday among all pre-games that quotient to it.

The birthday of a pre-game can be understood as representing the depth of its game tree. On the other hand, the birthday of a game more closely matches Conway's original description. The lemma SetTheory.Game.birthday_eq_pGameBirthday links both definitions together.

Main declarations #

Todo #

The birthday of a pre-game is inductively defined as the least strict upper bound of the birthdays of its left and right games. It may be thought as the "step" in which a certain game is constructed.

Equations
Instances For
    theorem SetTheory.PGame.birthday_def (x : SetTheory.PGame) :
    x.birthday = max (Ordinal.lsub fun (i : x.LeftMoves) => (x.moveLeft i).birthday) (Ordinal.lsub fun (i : x.RightMoves) => (x.moveRight i).birthday)
    theorem SetTheory.PGame.birthday_moveLeft_lt {x : SetTheory.PGame} (i : x.LeftMoves) :
    (x.moveLeft i).birthday < x.birthday
    theorem SetTheory.PGame.birthday_moveRight_lt {x : SetTheory.PGame} (i : x.RightMoves) :
    (x.moveRight i).birthday < x.birthday
    theorem SetTheory.PGame.lt_birthday_iff {x : SetTheory.PGame} {o : Ordinal.{u_1}} :
    o < x.birthday (∃ (i : x.LeftMoves), o (x.moveLeft i).birthday) ∃ (i : x.RightMoves), o (x.moveRight i).birthday
    theorem SetTheory.PGame.Relabelling.birthday_congr {x : SetTheory.PGame} {y : SetTheory.PGame} :
    x.Relabelling yx.birthday = y.birthday
    @[simp]
    theorem SetTheory.PGame.birthday_eq_zero {x : SetTheory.PGame} :
    x.birthday = 0 IsEmpty x.LeftMoves IsEmpty x.RightMoves
    @[simp]
    theorem SetTheory.PGame.birthday_neg (x : SetTheory.PGame) :
    (-x).birthday = x.birthday
    @[simp]
    theorem SetTheory.PGame.birthday_ordinalToPGame (o : Ordinal.{u_1}) :
    o.toPGame.birthday = o
    theorem SetTheory.PGame.le_birthday (x : SetTheory.PGame) :
    x x.birthday.toPGame
    theorem SetTheory.PGame.neg_birthday_le (x : SetTheory.PGame) :
    -x.birthday.toPGame x
    @[simp, irreducible]
    theorem SetTheory.PGame.birthday_add (x : SetTheory.PGame) (y : SetTheory.PGame) :
    (x + y).birthday = x.birthday.nadd y.birthday
    @[simp]
    theorem SetTheory.PGame.birthday_sub (x : SetTheory.PGame) (y : SetTheory.PGame) :
    (x - y).birthday = x.birthday.nadd y.birthday
    @[simp]
    theorem SetTheory.PGame.birthday_natCast (n : ) :
    (↑n).birthday = n

    The birthday of a game is defined as the least birthday among all pre-games that define it.

    Equations
    Instances For
      theorem SetTheory.Game.birthday_eq_pGameBirthday (x : SetTheory.Game) :
      ∃ (y : SetTheory.PGame), y = x y.birthday = x.birthday
      @[simp]
      theorem SetTheory.Game.birthday_eq_zero {x : SetTheory.Game} :
      x.birthday = 0 x = 0
      @[simp]
      theorem SetTheory.Game.birthday_ordinalToGame (o : Ordinal.{u_1}) :
      o.toGame.birthday = o
      @[simp]
      theorem SetTheory.Game.birthday_natCast (n : ) :
      (↑n).birthday = n
      @[simp]
      theorem SetTheory.Game.birthday_ofNat (n : ) [n.AtLeastTwo] :
      (OfNat.ofNat n).birthday = OfNat.ofNat n
      @[simp]
      theorem SetTheory.Game.birthday_neg (x : SetTheory.Game) :
      (-x).birthday = x.birthday
      theorem SetTheory.Game.le_birthday (x : SetTheory.Game) :
      x x.birthday.toGame
      theorem SetTheory.Game.neg_birthday_le (x : SetTheory.Game) :
      -x.birthday.toGame x
      theorem SetTheory.Game.birthday_add_le (x : SetTheory.Game) (y : SetTheory.Game) :
      (x + y).birthday x.birthday.nadd y.birthday
      theorem SetTheory.Game.birthday_sub_le (x : SetTheory.Game) (y : SetTheory.Game) :
      (x - y).birthday x.birthday.nadd y.birthday