Outcomes of loopy games #
We define when a loopy game is a win, a draw, or a loss with each player going first (under the normal play convention).
In particular, this proves the correctness of the characterization of the order in IGame. See the
theorems:
isWin_left_iff_zero_lf: Left winsxiff0 ⧏ x.isLoss_left_iff_le_zero: Left losesxiffx ≤ 0.isWin_right_iff_lf_zero: Right winsxiffx ⧏ 0.isLoss_right_iff_zero_le: Right losesxiff0 ≤ x.
A surviving strategy for player p, going second.
This is a set of states, such that for every move the opposite player makes, p can bring it back
to the set.
You can think of this as a nonconstructive version of the more common definition of a strategy, which gives an explicit answer for every reachable state.
Equations
- LGame.IsStrategy p s = ∀ y ∈ s, ∀ z ∈ LGame.moves (-p) y, ∃ r ∈ LGame.moves p z, r ∈ s
Instances For
theorem LGame.IsStrategy.neg {p : Player} {s : Set LGame} (h : IsStrategy p s) :
IsStrategy (-p) (-s)
@[simp]
theorem LGame.IsStrategy.iUnion {p : Player} {ι : Sort u_1} {s : ι → Set LGame} (h : ∀ (i : ι), IsStrategy p (s i)) :
IsStrategy p (⋃ (i : ι), s i)
theorem LGame.IsStrategy.sUnion {p : Player} {S : Set (Set LGame)} (h : ∀ s ∈ S, IsStrategy p s) :
IsStrategy p (⋃₀ S)
IsDraw p x means that p draws x going first.
Equations
- LGame.IsDraw p x = (¬LGame.IsWin p x ∧ ¬LGame.IsLoss p x)
Instances For
outcomeFor p x is the outcome of x with p going first.
Equations
- LGame.outcomeFor p x = if LGame.IsWin p x then Outcome.win else if LGame.IsLoss p x then Outcome.loss else Outcome.draw
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
Outcome calculations #
dud #
on #
off #
tis and tisn #
Outcomes of well-founded games #
@[simp]
Well-founded games can never be tied; they must end eventually.
@[simp]
@[simp]
@[simp]
@[simp]