A General Theory for Determined Two-player Games #
Nothing here is specific about PDL, but we give a general
definition of games and show that one of the two players
must have a winning strategy: gamedet
at the end.
Equations
- instDecidableEqPlayer x✝ y✝ = if h : x✝.toCtorIdx = y✝.toCtorIdx then isTrue ⋯ else isFalse ⋯
Two-player game with
- perfect information
- sequential moves (i.e. only one player moves at each position)
- finitely many moves at each step
- a decreasing bound on the number of remaining steps
- Pos : Type
Positions in the game.
Whose turn is it?
What are the available moves?
Upper bound for the number of steps left.
- bound_h (p next : Game.Pos) : next ∈ Game.moves p → Game.bound next < Game.bound p
The step bound goes down with each move.
Instances
theorem
Game.no_moves_of_bound_zero
{g : Game}
{p : Game.Pos}
(bound_zero : Game.bound p = 0)
:
Game.moves p = ∅
If the bound bound is zero then there are no more moves.
Equations
- instLTPos_1 = { lt := fun (p q : Game.Pos) => Game.bound p < Game.bound q }
The cone of all positions reachable from p
assuming that i
plays sI
.
- nil {i : Player} {g : Game} {sI : Strategy g i} {p : Game.Pos} : inMyCone sI p p
- myStep {i : Player} {g : Game} {sI : Strategy g i} {p q : Game.Pos} : inMyCone sI p q → ∀ (has_moves : q.moves.Nonempty) (h : Game.turn q = i), inMyCone sI p ↑(sI q h has_moves)
- oStep {i : Player} {g : Game} {sI : Strategy g i} {p q r : Game.Pos} : inMyCone sI p q → Game.turn q = other i → r ∈ Game.moves q → inMyCone sI p r
Instances For
Equations
- good_strat i p turn nempty = if W : good i p then let_fun E := ⋯; ⟨E.choose, ⋯⟩ else choose_move nempty
Instances For
theorem
good_strat_winning
{i : Player}
{self✝ : Game}
{p : Game.Pos}
(W : good i p)
:
winning p (good_strat i)