Documentation

LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies

LeanPool.AFormalizationOfBorelDeterminacyInLean.Game.BuildStrategies #

Auxiliary declarations for the Borel determinacy formalization.

noncomputable def GaleStewartGame.PreStrategy.tryAndElse {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (planA planB : PreStrategy T p) :

try following PreStrategy planA if possible, else follow planB

Equations
Instances For
    theorem GaleStewartGame.PreStrategy.tryAndElse_mono {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} {planA planB planB' : PreStrategy T p} (hB : planB ≤ planB') :
    planA.tryAndElse planB ≤ planA.tryAndElse planB'
    theorem GaleStewartGame.PreStrategy.quasi_of_planB {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} {planA planB : PreStrategy T p} (h : planB.IsQuasi) :
    (planA.tryAndElse planB).IsQuasi
    theorem GaleStewartGame.PreStrategy.planA_sub {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} {planA planB : PreStrategy T p} :
    planA ≤ planA.tryAndElse planB
    theorem GaleStewartGame.PreStrategy.eq_planA {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} {planA planB : PreStrategy T p} (hQ : ∀ (x : ↥planA.subtree) (hp : IsPosition (↑x) p), ∃ (a : Descriptive.Tree.ExtensionsAt ⟨↑x, ⋯⟩), a ∈ planA ⟨↑x, ⋯⟩ hp) :
    (planA.tryAndElse planB).subtree = planA.subtree
    @[simp]
    theorem GaleStewartGame.PreStrategy.tryAndElse_residual {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} {planA planB : PreStrategy T p} (x : List A) :
    (planA.tryAndElse planB).residual x = (planA.residual x).tryAndElse (planB.residual x)
    @[instance_reducible]
    Equations
    @[simp]
    theorem GaleStewartGame.PreStrategy.eval_bot {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (x : ↥T) (hp : IsPosition (↑x) p) :
    ⊥ x hp = ∅
    @[instance_reducible]
    Equations
    @[simp]
    theorem GaleStewartGame.PreStrategy.eval_top {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (x : ↥T) (hp : IsPosition (↑x) p) :
    @[simp]

    Auxiliary declaration for the Borel determinacy formalization.

    Equations
    Instances For

      Extend a pre-strategy to a quasi-strategy. The definition boundary keeps API-level simp lemmas stated through extQuasi instead of exposing the tryAndElse implementation.

      Equations
      Instances For
        theorem GaleStewartGame.PreStrategy.eq_extQuasi {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (S : PreStrategy T p) (hT : Descriptive.Tree.IsPruned T) (h : ∀ (x : ↥S.subtree) (hp : IsPosition (↑x) p), ∃ (a : Descriptive.Tree.ExtensionsAt (S.subtreeIncl x)), a ∈ S (S.subtreeIncl x) hp) :
        @[simp]

        sew a map from possible opponent moves to strategies in the resulting residual games to a strategy in the original game

        Equations
        Instances For
          theorem GaleStewartGame.PreStrategy.sew_isQuasi {A : Type u_1} {T : ↥(Descriptive.tree A)} (f : (a : A) → [a] ∈ T → PreStrategy (Descriptive.Tree.subAt T [a]) Player.zero) (hf : ∀ (a : A) (ha : [a] ∈ T), (f a ha).IsQuasi) :
          theorem GaleStewartGame.PreStrategy.sew_subtree {A : Type u_1} {T : ↥(Descriptive.tree A)} (f : (a : A) → [a] ∈ T → PreStrategy (Descriptive.Tree.subAt T [a]) Player.zero) (a : A) (x : List A) :
          a :: x ∈ (sew f).subtree ↔ ∃ (h : [a] ∈ T), x ∈ (f a h).subtree
          theorem GaleStewartGame.PreStrategy.sew_isWinning {A : Type u_1} {G : Game A} (f : (a : A) → [a] ∈ G.tree → PreStrategy (G.residual [a]).tree Player.zero) (h : ∀ (a : A) (h : [a] ∈ G.tree), (f a h).IsWinning) :
          theorem GaleStewartGame.PreStrategy.sew_residual {A : Type u_1} {T : ↥(Descriptive.tree A)} (S : PreStrategy T Player.one) :
          (sew fun (a : A) (x : [a] ∈ T) => S.residual [a]) = S

          in the first move, play a, then follow s

          Equations
          Instances For
            @[simp]
            theorem GaleStewartGame.PreStrategy.firstMove_subtree {A : Type u_1} {T : ↥(Descriptive.tree A)} (a : A) (h : [a] ∈ T) (s : PreStrategy (Descriptive.Tree.subAt T [a]) Player.one) (a' : A) (x : List A) :
            a' :: x ∈ (firstMove a h s).subtree ↔ a = a' ∧ x ∈ s.subtree
            def GaleStewartGame.PreStrategy.preserveProp {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (P : (x : ↥T) → IsPosition (↑x) p.swap → Prop) :

            play such that the proposition P x holds in every position x resulting from your move

            Equations
            Instances For
              theorem GaleStewartGame.PreStrategy.preserveProp_eq_extQuasi {A : Type u_1} {T : ↥(Descriptive.tree A)} {p : Player} (P : (x : ↥T) → IsPosition (↑x) p.swap → Prop) (h : ∀ (x : ↥T) (hp : IsPosition (↑x) p.swap), P x hp → ∀ (a : Descriptive.Tree.ExtensionsAt x), (preserveProp P a.valT' ⋯).Nonempty) (hT : Descriptive.Tree.IsPruned T) (hst0 : ∀ (hp : p = Player.zero), ∃ (a : A) (ha : [a] ∈ T), P ⟨[a], ha⟩ ⋯) (hst1 : ∀ (hp : p = Player.one) (hn : [] ∈ T), P ⟨[], hn⟩ ⋯) :
              def GaleStewartGame.Game.WinningPosition {A : Type u_1} (G : Game A) (x : List A) (p : Player := Player.zero) :

              a position is winning if there is a winning strategy in the residual game

              Equations
              Instances For
                @[simp]
                theorem GaleStewartGame.Game.winningPosition_residual {A : Type u_1} {G : Game A} {p : Player} (x y : List A) :
                def GaleStewartGame.Game.WonPosition {A : Type u_1} (G : Game A) (x : List A) (p : Player := Player.zero) :

                a position is won if it cannot be lost by playing however

                Equations
                Instances For
                  @[simp]
                  theorem GaleStewartGame.Game.wonPosition_residual {A : Type u_1} {G : Game A} {p : Player} (x y : List A) :
                  (G.residual x).WonPosition y p ↔ G.WonPosition (x ++ y) p
                  theorem GaleStewartGame.Game.WonPosition.extend {A : Type u_1} {G : Game A} {p : Player} {x : List A} (y : List A) (hW : G.WonPosition x p) :

                  the defensive PreStrategy never moves into a winning position of the opponent

                  Equations
                  Instances For
                    theorem GaleStewartGame.Game.defensivePre_subtree {A : Type u_1} {G G' : Game A} {p p' : Player} {hG : G = G'} {hp : p = p'} :

                    Auxiliary declaration for the Borel determinacy formalization.

                    Equations
                    Instances For
                      theorem GaleStewartGame.Game.defensiveQuasi_subtree {A : Type u_1} {G G' : Game A} {p p' : Player} {hG : G = G'} {hp : p = p'} (h : Descriptive.Tree.IsPruned G.tree) :
                      noncomputable def GaleStewartGame.PreStrategy.followUntilWon {A : Type u_1} {G : Game A} {p : Player} (S : PreStrategy G.tree p) :

                      Auxiliary declaration for the Borel determinacy formalization.

                      Equations
                      Instances For