Documentation

CombinatorialGames.GameForm

def GameFunctor (α : Type (u + 1)) :
Type (u + 1)
Equations
Instances For
    theorem GameFunctor.ext {α : Type (u + 1)} {x y : GameFunctor α} :
    ↑x = ↑y → x = y
    theorem GameFunctor.ext_iff {α : Type (u + 1)} {x y : GameFunctor α} :
    x = y ↔ ↑x = ↑y
    @[instance_reducible]
    Equations
    theorem GameFunctor.map_def {α β : Type (u_1 + 1)} (f : α → β) (s : GameFunctor α) :
    f <$> s = ⟨fun (x : Player) => f '' ↑s x, ⋯⟩
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[irreducible]
    def GameForm :
    Type (u + 1)
    Equations
    Instances For
      @[instance_reducible]

      Construct a GameForm from its Left and Right options.

      Equations
      • One or more equations did not get rendered due to their size.
      @[instance_reducible]
      Equations

      The set of Left options of the game.

      Equations
      Instances For

        The set of Right options of the game.

        Equations
        Instances For
          @[simp]
          theorem GameForm.ofSets_moves (x : GameForm) :
          !{fun (p : Player) => Moves.moves p x} = x
          theorem GameForm.ext {x y : GameForm} (h : ∀ (p : Player), Moves.moves p x = Moves.moves p y) :
          x = y

          Two GameForms are equal when their option sets are.

          theorem GameForm.ext_iff {x y : GameForm} :
          x = y ↔ ∀ (p : Player), Moves.moves p x = Moves.moves p y
          theorem GameForm.ofSets_inj {s₁ s₂ t₁ t₂ : Set GameForm} [Small.{u_1, u_1 + 1} ↑s₁] [Small.{u_1, u_1 + 1} ↑s₂] [Small.{u_1, u_1 + 1} ↑t₁] [Small.{u_1, u_1 + 1} ↑t₂] :
          !{s₁ | t₁} = !{s₂ | t₂} ↔ s₁ = s₂ ∧ t₁ = t₂
          @[irreducible]
          def GameForm.moveRecOn {motive : GameForm → Sort u_1} (x : GameForm) (mk : (x : GameForm) → ((p : Player) → (y : GameForm) → y ∈ Moves.moves p x → motive y) → motive x) :
          motive x

          Conway induction: build data for a game by recursively building it on its Left and Right sets. This rarely needs to be used explicitly, as the termination checker will handle it.

          See ofSetsRecOn for an alternate form.

          Equations
          Instances For
            theorem GameForm.moveRecOn_eq {motive : GameForm → Sort u_1} (x : GameForm) (mk : (x : GameForm) → ((p : Player) → (y : GameForm) → y ∈ Moves.moves p x → motive y) → motive x) :
            moveRecOn x mk = mk x fun (x_1 : Player) (y : GameForm) (x : y ∈ Moves.moves x_1 x) => moveRecOn y mk
            def GameForm.ofSetsRecOn {motive : GameForm → Sort u_1} (x : GameForm) (mk : (s t : Set GameForm) → [inst : Small.{u, u + 1} ↑s] → [inst_1 : Small.{u, u + 1} ↑t] → ((x : GameForm) → x ∈ s → motive x) → ((x : GameForm) → x ∈ t → motive x) → motive !{s | t}) :
            motive x

            Conway induction: build data for a game by recursively building it on its Left and Right sets. This rarely needs to be used explicitly, as the termination checker will handle it.

            See moveRecOn for an alternate form.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem GameForm.ofSetsRecOn_ofSets {motive : GameForm → Sort u_1} (s t : Set GameForm) [Small.{u, u + 1} ↑s] [Small.{u, u + 1} ↑t] (mk : (s t : Set GameForm) → [inst : Small.{u, u + 1} ↑s] → [inst_1 : Small.{u, u + 1} ↑t] → ((x : GameForm) → x ∈ s → motive x) → ((x : GameForm) → x ∈ t → motive x) → motive !{s | t}) :
              ofSetsRecOn !{s | t} mk = mk s t (fun (y : GameForm) (x : y ∈ s) => ofSetsRecOn y mk) fun (y : GameForm) (x : y ∈ t) => ofSetsRecOn y mk
              @[instance_reducible]

              $\def\form<#1>[#2]{\left\{#1 \mid #2\right\}}$ The conjugate of a game is defined by -!{s | t} = !{-t | -s}. In the literature, one would see $$ \overline{G}=\form<\overline{G^\mathcal{R}}>[\overline{G^\mathcal{L}}]. $$ In this repository, the conjugate is often referred to as the 'negative', even though it is not necessarily an additive inverse.

              Equations
              @[instance_reducible]
              Equations
              theorem GameForm.neg_ofSets' (st : Player → Set GameForm) [Small.{u_1, u_1 + 1} ↑(st Player.left)] [Small.{u_1, u_1 + 1} ↑(st Player.right)] :
              -!{st} = !{fun (p : Player) => -st (-p)}
              theorem GameForm.neg_eq' (x : GameForm) :
              -x = !{fun (p : Player) => -Moves.moves (-p) x}

              Addition and subtraction #

              @[instance_reducible]

              $\def\form<#1>[#2]{\left\{#1 \mid #2\right\}}$ The sum of x = !{s₁ | t₁} and y = !{s₂ | t₂} is !{s₁ + y, x + s₂ | t₁ + y, x + t₂}. In the literature, one would see $$ G+H=\form<G^\mathcal{L}+H,G+H^\mathcal{L}>[G^\mathcal{R}+H,G+H^\mathcal{R}]. $$

              Equations
              theorem GameForm.add_eq (x y : GameForm) :
              x + y = !{(fun (x : GameForm) => x + y) '' Moves.moves Player.left x ∪ (fun (x_1 : GameForm) => x + x_1) '' Moves.moves Player.left y | (fun (x : GameForm) => x + y) '' Moves.moves Player.right x ∪ (fun (x_1 : GameForm) => x + x_1) '' Moves.moves Player.right y}
              theorem GameForm.add_eq' (x y : GameForm) :
              x + y = !{fun (p : Player) => (fun (x : GameForm) => x + y) '' Moves.moves p x ∪ (fun (x_1 : GameForm) => x + x_1) '' Moves.moves p y}
              theorem GameForm.ofSets_add_ofSets (s₁ t₁ s₂ t₂ : Set GameForm) [Small.{u_1, u_1 + 1} ↑s₁] [Small.{u_1, u_1 + 1} ↑t₁] [Small.{u_1, u_1 + 1} ↑s₂] [Small.{u_1, u_1 + 1} ↑t₂] :
              !{s₁ | t₁} + !{s₂ | t₂} = !{(fun (x : GameForm) => x + !{s₂ | t₂}) '' s₁ ∪ (fun (x : GameForm) => !{s₁ | t₁} + x) '' s₂ | (fun (x : GameForm) => x + !{s₂ | t₂}) '' t₁ ∪ (fun (x : GameForm) => !{s₁ | t₁} + x) '' t₂}
              theorem GameForm.ofSets_add_ofSets' (st₁ st₂ : Player → Set GameForm) [Small.{u_1, u_1 + 1} ↑(st₁ Player.left)] [Small.{u_1, u_1 + 1} ↑(st₂ Player.left)] [Small.{u_1, u_1 + 1} ↑(st₁ Player.right)] [Small.{u_1, u_1 + 1} ↑(st₂ Player.right)] :
              !{st₁} + !{st₂} = !{fun (p : Player) => (fun (x : GameForm) => x + !{st₂}) '' st₁ p ∪ (fun (x : GameForm) => !{st₁} + x) '' st₂ p}
              theorem GameForm.forall_moves_neg {P : GameForm → Prop} {p : Player} {x : GameForm} :
              (∀ y ∈ Moves.moves p (-x), P y) ↔ ∀ y ∈ Moves.moves (-p) x, P (-y)
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              theorem GameForm.both_ends_eq_zero {g : GameForm} {p : Player} (h1 : Form.IsEnd p g) (h2 : Form.IsEnd (-p) g) :
              g = 0
              theorem GameForm.ne_zero_not_end {g : GameForm} (h1 : g ≠ 0) :
              ∃ (p : Player), ¬Form.IsEnd p g
              @[simp]
              theorem GameForm.zero_not_both_end {g : GameForm} {p : Player} (h1 : g ≠ 0) (h2 : Form.IsEnd p g) :