Documentation

CombinatorialGames.Game.Player

Type of players #

This file implements the two-element type of players (Left, Right), alongside other basic notational machinery to be used within game theory.

Players #

inductive Player :

Either the Left or Right player.

  • left : Player

    The Left player.

  • right : Player

    The Right player.

Instances For
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    @[reducible, inline]
    abbrev Player.cases {α : Sort u_1} (l r : α) :
    Player → α

    Specify a function Player → α from its two outputs.

    Equations
    Instances For
      theorem Player.apply_cases {α : Sort u_1} {β : Sort u_2} (f : α → β) (l r : α) (p : Player) :
      f (cases l r p) = cases (f l) (f r) p
      @[simp]
      theorem Player.cases_inj {α : Sort u_1} {l₁ r₁ l₂ r₂ : α} :
      cases l₁ r₁ = cases l₂ r₂ ↔ l₁ = l₂ ∧ r₁ = r₂
      theorem Player.const_of_left_eq_right {α : Sort u_1} {f : Player → α} (hf : f left = f right) (p q : Player) :
      f p = f q
      theorem Player.const_of_left_eq_right' {f : Player → Prop} (hf : f left ↔ f right) (p q : Player) :
      f p ↔ f q
      @[simp]
      theorem Player.forall {p : Player → Prop} :
      (∀ (x : Player), p x) ↔ p left ∧ p right
      @[simp]
      theorem Player.exists {p : Player → Prop} :
      (∃ (x : Player), p x) ↔ p left ∨ p right
      theorem Player.range_eq {α : Type u_1} (f : Player → α) :
      @[simp]
      theorem Player.range_cases {α : Type u_1} (l r : α) :
      Set.range (cases l r) = {l, r}
      @[instance_reducible]
      Equations
      @[simp]
      theorem Player.eq_neg {p q : Player} :
      p = -q ↔ p ≠ q
      @[simp]
      theorem Player.neg_eq {p q : Player} :
      -p = q ↔ p ≠ q
      theorem Player.ne_neg {p q : Player} :
      p ≠ -q ↔ p = q
      theorem Player.neg_ne {p q : Player} :
      -p ≠ q ↔ p = q
      @[instance_reducible]

      The multiplication of Players is used to state the lemmas about the multiplication of combinatorial games, such as IGame.mulOption_mem_moves_mul.

      Equations
      @[simp]
      theorem Player.left_mul (p : Player) :
      left * p = p
      @[simp]
      theorem Player.right_mul (p : Player) :
      right * p = -p
      @[simp]
      theorem Player.mul_left (p : Player) :
      p * left = p
      @[simp]
      theorem Player.mul_right (p : Player) :
      p * right = -p
      @[simp]
      theorem Player.mul_self (p : Player) :
      p * p = left
      @[instance_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[simp]
      @[simp]
      theorem Player.inv_eq_self (p : Player) :
      p⁻¹ = p

      Outcomes #

      inductive Outcome :

      The three possible outcomes of a game.

      We register a linear order, with ⊤ = win and ⊥ = loss.

      • loss : Outcome

        A given player loses in perfect play.

      • draw : Outcome

        A given player draws in perfect play.

      • win : Outcome

        A given player wins in perfect play.

      Instances For
        @[instance_reducible]
        Equations
        @[instance_reducible]
        Equations
        @[simp]
        theorem Outcome.loss_le (x : Outcome) :
        @[simp]
        theorem Outcome.le_win (x : Outcome) :
        @[instance_reducible]
        Equations

        OfSets #

        class OfSets (α : Type (u + 1)) (Valid : outParam ((Player → Set α) → Prop)) :
        Type (u + 1)

        Type class for the ofSets operation. Used to implement the !{st} and !{s | t} syntax.

        • ofSets (st : Player → Set α) (h : Valid st) [Small.{u, u + 1} ↑(st Player.left)] [Small.{u, u + 1} ↑(st Player.right)] : α

          Construct a combinatorial game from its left and right sets.

          Conventions for notations in identifiers:

          • The recommended spelling of !{st}'h in identifiers is ofSets.

          • The recommended spelling of !{s | t}'h in identifiers is ofSets.

          • The recommended spelling of !{st} in identifiers is ofSets.

          • The recommended spelling of !{s | t} in identifiers is ofSets.

        Instances

          Construct a combinatorial game from its left and right sets.

          Conventions for notations in identifiers:

          • The recommended spelling of !{st}'h in identifiers is ofSets.
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Construct a combinatorial game from its left and right sets.

            Conventions for notations in identifiers:

            • The recommended spelling of !{s | t}'h in identifiers is ofSets.
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              A tactic which attempts to automatically solve goals which appear on OfSets.

              Equations
              Instances For

                Construct a combinatorial game from its left and right sets.

                Conventions for notations in identifiers:

                • The recommended spelling of !{st} in identifiers is ofSets.
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Construct a combinatorial game from its left and right sets.

                  Conventions for notations in identifiers:

                  • The recommended spelling of !{s | t} in identifiers is ofSets.
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Delaborates ofSets (Player.cases s t) to !{s | t} and ofSets st to !{st}.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      theorem ofSets_eq_ofSets_cases {α : Type (u_1 + 1)} {Valid : (Player → Set α) → Prop} [OfSets α Valid] (st : Player → Set α) (h : Valid st) [Small.{u_1, u_1 + 1} ↑(st Player.left)] [Small.{u_1, u_1 + 1} ↑(st Player.right)] :
                      !{st} = !{st Player.left | st Player.right}