Documentation

CslibFrontier.GameTheory.Extensive.ZeroSum

Zero-sum extensive-form games, sparse sequence form, minimax duality, and subgame perfection #

This module develops two-player zero-sum extensive-form game theory in sequence, behavioral, mixed, and perfect-information form ([vS96], [vS07], Chapter 3):

References #

def Cslib.GameTheory.Extensive.ExtensiveTree.leafSeqPair {H : Bool → Type v} {Act : (i : Bool) → H i → Type} (T : ExtensiveTree Bool H Act) (z : Terminal T) :

The pair (z.seq false, z.seq true) of sequence-form indices realized at terminal leaf z.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.leafSeqPair_eq_iff {H : Bool → Type v} {Act : (i : Bool) → H i → Type} (T : ExtensiveTree Bool H Act) (z : Terminal T) (σ₀ : SeqVar T false) (σ₁ : SeqVar T true) :
T.leafSeqPair z = (σ₀, σ₁) ↔ Terminal.seq false z = ↑σ₀ ∧ Terminal.seq true z = ↑σ₁
theorem Cslib.GameTheory.Extensive.seqPayoffMat_apply {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (p : Bool) (σ₀ : SeqVar T false) (σ₁ : SeqVar T true) :
T.seqPayoffMat p σ₀ σ₁ = ∑ z : Terminal T, if Terminal.seq false z = ↑σ₀ ∧ Terminal.seq true z = ↑σ₁ then z.chanceWeight * z.payoff p else 0

Exact entry formula for T.seqPayoffMat p ([vS96], §3; [vS07], §3.10): entry (σ₀, σ₁) sums z.chanceWeight * z.payoff p over terminal leaves realizing sequence pair (σ₀, σ₁).

theorem Cslib.GameTheory.Extensive.seqPayoffMat_eq_sum_filter_terminal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (p : Bool) (σ₀ : SeqVar T false) (σ₁ : SeqVar T true) :
T.seqPayoffMat p σ₀ σ₁ = ∑ z : Terminal T with T.leafSeqPair z = (σ₀, σ₁), z.chanceWeight * z.payoff p

Express entry (σ₀, σ₁) of T.seqPayoffMat p as the sum over the leaf bucket {z : Terminal T | T.leafSeqPair z = (σ₀, σ₁)}.

theorem Cslib.GameTheory.Extensive.card_support_seqPayoffMat_le_card_terminal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (p : Bool) :

Sparse payoff matrix size bound ([vS96], §3; [vS07], §3.10): the sequence-form payoff matrix T.seqPayoffMat p has at most Fintype.card (Terminal T) nonzero entries—linear in the number of leaves of the extensive game tree.

theorem Cslib.GameTheory.Extensive.dotProduct_seqPayoffMat_mulVec_eq_sum_support {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (p : Bool) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :
x ⬝ᵥ (T.seqPayoffMat p).mulVec y = ∑ e : SeqVar T false × SeqVar T true with T.seqPayoffMat p e.1 e.2 ≠ 0, x e.1 * T.seqPayoffMat p e.1 e.2 * y e.2

Sparse bilinear evaluation of x ⬝ᵥ (T.seqPayoffMat p *ᵥ y) restricted strictly to the nonzero entries of T.seqPayoffMat p.

theorem Cslib.GameTheory.Extensive.dotProduct_seqPayoffMat_mulVec_eq_sum_terminal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (p : Bool) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :
x ⬝ᵥ (T.seqPayoffMat p).mulVec y = ∑ z : Terminal T, z.chanceWeight * x (T.leafSeqPair z).1 * y (T.leafSeqPair z).2 * z.payoff p

Leaf-indexed evaluation of x ⬝ᵥ (T.seqPayoffMat p *ᵥ y) for arbitrary vectors x, y.

def Cslib.GameTheory.Extensive.ExtensiveTree.HasNoChance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} :
ExtensiveTree ι H Act → Prop

An extensive-form game tree has no chance nodes (HasNoChance).

theorem Cslib.GameTheory.Extensive.ExtensiveTree.HasNoChance.chanceWeight_eq_one {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {T : ExtensiveTree ι H Act} :
T.HasNoChance → ∀ (z : Terminal T), z.chanceWeight = 1

In a chance-free two-player extensive game tree, distinct terminal leaves realize distinct player-sequence pairs T.leafSeqPair z ([vS96], §3; [vS07], §3.10).

theorem Cslib.GameTheory.Extensive.ExtensiveTree.HasNoChance.seqPayoffMat_leafSeqPair {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] {T : ExtensiveTree Bool H Act} (hnc : T.HasNoChance) (p : Bool) (z : Terminal T) :
T.seqPayoffMat p (T.leafSeqPair z).1 (T.leafSeqPair z).2 = z.payoff p

In a chance-free two-player extensive game, the sequence-form payoff matrix entry at terminal leaf z's sequence pair (z.seq false, z.seq true) equals the bare leaf payoff z.payoff p ([vS96], §3; [vS07], §3.10).

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.seqLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (x : SeqVar T false → ℝ) :

Worst-case sequence-form payoff ⨅ y, x ⬝ᵥ (T.seqPayoffMat false *ᵥ y) over all valid realization plans y of player true.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (y : SeqVar T true → ℝ) :

Worst-case sequence-form loss ⨆ x, x ⬝ᵥ (T.seqPayoffMat false *ᵥ y) over all valid realization plans x of player false.

theorem Cslib.GameTheory.Extensive.isLeast_seqLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H true)] (hpr : T.PerfectRecall true) (x : SeqVar T false → ℝ) :
theorem Cslib.GameTheory.Extensive.isGreatest_seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] (hpr : T.PerfectRecall false) (y : SeqVar T true → ℝ) :
theorem Cslib.GameTheory.Extensive.seqLowerVal_le {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H true)] (hpr : T.PerfectRecall true) (x : SeqVar T false → ℝ) {y : SeqVar T true → ℝ} (hy : T.IsRealizationPlan true y) :
theorem Cslib.GameTheory.Extensive.le_seqLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall true) {x : SeqVar T false → ℝ} {c : ℝ} (h : ∀ (y : SeqVar T true → ℝ), T.IsRealizationPlan true y → c ≤ x ⬝ᵥ (T.seqPayoffMat false).mulVec y) :
theorem Cslib.GameTheory.Extensive.le_seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] (hpr : T.PerfectRecall false) {x : SeqVar T false → ℝ} (y : SeqVar T true → ℝ) (hx : T.IsRealizationPlan false x) :
theorem Cslib.GameTheory.Extensive.seqUpperVal_le {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall false) {y : SeqVar T true → ℝ} {c : ℝ} (h : ∀ (x : SeqVar T false → ℝ), T.IsRealizationPlan false x → x ⬝ᵥ (T.seqPayoffMat false).mulVec y ≤ c) :
theorem Cslib.GameTheory.Extensive.seqLowerVal_le_seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) {x : SeqVar T false → ℝ} {y : SeqVar T true → ℝ} (hx : T.IsRealizationPlan false x) (hy : T.IsRealizationPlan true y) :

Weak minimax inequality in sequence form: every feasible lower value is at most every feasible upper value.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isBehaviorNash_iff_saddlePoint {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] {T : ExtensiveTree Bool H Act} (hzs : T.IsZeroSum) (β : (i : Bool) → (h : H i) → Act i h → ℝ) :
T.IsBehaviorNash β ↔ (∀ (i : Bool), IsBehaviorStrategy (β i)) ∧ (∀ (β₀ : (h : H false) → Act false h → ℝ), IsBehaviorStrategy β₀ → evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β₀ | true => β true) T false ≤ evalBehavior β T false) ∧ ∀ (β₁ : (h : H true) → Act true h → ℝ), IsBehaviorStrategy β₁ → evalBehavior β T false ≤ evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β false | true => β₁) T false

In a zero-sum extensive game, β is a behavioral Nash equilibrium iff it is a saddle point for T.evalBehavior _ false over behavioral strategies.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isSeqNash_iff_saddlePoint {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

In a zero-sum extensive game with perfect recall, (x, y) is a sequence-form Nash equilibrium iff (x, y) is a saddle point of x' ⬝ᵥ (T.seqPayoffMat false *ᵥ y') on the sequence-form polytopes.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.seq_minimax_duality {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :

Sequence-form realization-plan minimax duality ([vS96], §3; [vS07], §3.10, derived from exists_seq_lp_minimax): the maximin problem max_x min_y xᵀ A y and minimax problem min_y max_x xᵀ A y over the sequence-form polytopes {x | E x = e, x ≥ 0} both attain a common value v, realized at a sequence-form Nash saddle point (x*, y*).

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.seq_iSup_iInf_eq_iInf_iSup {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), ⨅ (y : { y : SeqVar T true → ℝ // T.IsRealizationPlan true y }), ↑x ⬝ᵥ (T.seqPayoffMat false).mulVec ↑y = ⨅ (y : { y : SeqVar T true → ℝ // T.IsRealizationPlan true y }), ⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), ↑x ⬝ᵥ (T.seqPayoffMat false).mulVec ↑y

Explicit max_x min_y = min_y max_x identity over sequence-form polytopes ([vS96], [vS07], §3.10): ⨆ x, ⨅ y, x ⬝ᵥ (A *ᵥ y) = ⨅ y, ⨆ x, x ⬝ᵥ (A *ᵥ y) over valid realization plans.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isSeqNash_iff_maximin_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

Maximin/minimax characterization of sequence-form Nash equilibria in two-player zero-sum games with perfect recall: (x, y) is a sequence-form Nash equilibrium iff x maximizes T.seqLowerVal and y minimizes T.seqUpperVal.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsSeqNash.payoff_eq {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {x : SeqVar T false → ℝ} {y : SeqVar T true → ℝ} (hnash : T.IsSeqNash x y) :
x ⬝ᵥ (T.seqPayoffMat false).mulVec y = ⨆ (x' : { x' : SeqVar T false → ℝ // T.IsRealizationPlan false x' }), T.seqLowerVal ↑x' ∧ x ⬝ᵥ (T.seqPayoffMat false).mulVec y = ⨅ (y' : { y' : SeqVar T true → ℝ // T.IsRealizationPlan true y' }), T.seqUpperVal ↑y'

In a zero-sum extensive game with perfect recall, every sequence-form Nash equilibrium attains both the ⨆ min maximin value and the ⨅ max minimax value.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsSeqNash.interchange {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {x₁ x₂ : SeqVar T false → ℝ} {y₁ y₂ : SeqVar T true → ℝ} (h₁ : T.IsSeqNash x₁ y₁) (h₂ : T.IsSeqNash x₂ y₂) :
T.IsSeqNash x₁ y₂ ∧ x₁ ⬝ᵥ (T.seqPayoffMat false).mulVec y₂ = x₁ ⬝ᵥ (T.seqPayoffMat false).mulVec y₁

Interchangeability of sequence-form Nash equilibria in two-player zero-sum games with perfect recall: mixing strategies from two equilibrium profiles (x₁, y₁) and (x₂, y₂) preserves equilibrium and yields the same value.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.behaviorLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (β₀ : (h : H false) → Act false h → ℝ) :

Worst-case expected payoff ⨅ β₁, T.evalBehavior (false => β₀, true => β₁) false over all behavioral strategies β₁ of player true.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.behaviorUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (β₁ : (h : H true) → Act true h → ℝ) :

Worst-case expected loss ⨆ β₀, T.evalBehavior (false => β₀, true => β₁) false over all behavioral strategies β₀ of player false.

theorem Cslib.GameTheory.Extensive.behaviorLowerVal_eq_seqLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall true) (β₀ : (h : H false) → Act false h → ℝ) :

Under perfect recall for player true, behavioral lower value equals the sequence-form lower value of the induced realization plan T.behaviorToRealizationPlan false β₀.

theorem Cslib.GameTheory.Extensive.behaviorUpperVal_eq_seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall false) (β₁ : (h : H true) → Act true h → ℝ) :

Under perfect recall for player false, behavioral upper value equals the sequence-form upper value of the induced realization plan T.behaviorToRealizationPlan true β₁.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.behavior_minimax_eq_seq_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (_hzs : T.IsZeroSum) :
⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), T.behaviorLowerVal ↑β₀ = ⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), T.seqLowerVal ↑x

The behavioral maximin value equals the sequence-form LP maximin value.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.behavior_iSup_iInf_eq_iInf_iSup {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), ⨅ (β₁ : { β₁ : (h : H true) → Act true h → ℝ // IsBehaviorStrategy β₁ }), evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => ↑β₀ | true => ↑β₁) T false = ⨅ (β₁ : { β₁ : (h : H true) → Act true h → ℝ // IsBehaviorStrategy β₁ }), ⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => ↑β₀ | true => ↑β₁) T false

Behavioral minimax equality ([vS07], §3.10): in a zero-sum extensive game with perfect recall, maximizing the worst-case payoff over behavioral strategies equals minimizing the opponent's worst-case loss.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isBehaviorNash_iff_maximin_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) (β : (i : Bool) → (h : H i) → Act i h → ℝ) :

Maximin/minimax characterization of behavioral Nash equilibria in two-player zero-sum extensive games with perfect recall: β is a behavioral Nash equilibrium iff β false maximizes T.behaviorLowerVal and β true minimizes T.behaviorUpperVal.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsBehaviorNash.evalBehavior_eq {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {β : (i : Bool) → (h : H i) → Act i h → ℝ} (hβ : T.IsBehaviorNash β) :
evalBehavior β T false = ⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), T.behaviorLowerVal ↑β₀ ∧ evalBehavior β T false = ⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), T.seqLowerVal ↑x

Every behavioral Nash equilibrium in a zero-sum game with perfect recall realizes both the behavioral and sequence-form minimax game value.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsBehaviorNash.interchange {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {β₁ β₂ : (i : Bool) → (h : H i) → Act i h → ℝ} (h₁ : T.IsBehaviorNash β₁) (h₂ : T.IsBehaviorNash β₂) :
(T.IsBehaviorNash fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β₁ false | true => β₂ true) ∧ evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β₁ false | true => β₂ true) T false = evalBehavior β₁ T false

Interchangeability of behavioral Nash equilibria in two-player zero-sum extensive games with perfect recall: combining player false's strategy from β₁ with player true's strategy from β₂ produces another behavioral Nash equilibrium with the same expected payoff.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isBehaviorNash_of_saddle {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {β : (i : Bool) → (h : H i) → Act i h → ℝ} (v : ℝ) (hbeh : ∀ (i : Bool), IsBehaviorStrategy (β i)) (hup : ∀ (β₀ : (h : H false) → Act false h → ℝ), IsBehaviorStrategy β₀ → evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β₀ | true => β true) T false ≤ v) (hlo : ∀ (β₁ : (h : H true) → Act true h → ℝ), IsBehaviorStrategy β₁ → v ≤ evalBehavior (fun (x : Bool) => match (motive := (x : Bool) → (h : H x) → Act x h → ℝ) x with | false => β false | true => β₁) T false) :
T.IsBehaviorNash β ∧ T.IsSeqNash (T.behaviorToRealizationPlan false (β false)) (T.behaviorToRealizationPlan true (β true)) ∧ evalBehavior β T false = v ∧ ⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), T.behaviorLowerVal ↑β₀ = v ∧ ⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), T.seqLowerVal ↑x = v

Saddle-point certificate for finite extensive games: checking that β consists of valid behavior strategies and forms a saddle point around v immediately yields T.IsBehaviorNash β, T.IsSeqNash for its realization plans, T.evalBehavior β false = v, and exact equality with both behavioral and sequence-form minimax values.

theorem Cslib.GameTheory.Extensive.mixedToRealizationPlan_behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {β : (h : H i) → Act i h → ℝ} (hβ : IsBehaviorStrategy β) :

Relating mixed realization plans to behavioral realization plans (behaviorToMixed): under perfect recall, the product mixed strategy behaviorToMixed β induces the same realization plan as β.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.mixedLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (μ₀ : PureStrategy H Act false → ℝ) :

Worst-case expected payoff ⨅ μ₁, T.evalMixed (false => μ₀, true => μ₁) false over all mixed strategies μ₁ of player true.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.mixedUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (μ₁ : PureStrategy H Act true → ℝ) :

Worst-case expected loss ⨆ μ₀, T.evalMixed (false => μ₀, true => μ₁) false over all mixed strategies μ₀ of player false.

theorem Cslib.GameTheory.Extensive.mixedLowerVal_eq_seqLowerVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall true) (μ₀ : PureStrategy H Act false → ℝ) :

Under perfect recall for player true, mixed lower value equals the sequence-form lower value of T.mixedToRealizationPlan false μ₀.

theorem Cslib.GameTheory.Extensive.mixedUpperVal_eq_seqUpperVal {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : T.PerfectRecall false) (μ₁ : PureStrategy H Act true → ℝ) :

Under perfect recall for player false, mixed upper value equals the sequence-form upper value of T.mixedToRealizationPlan true μ₁.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.mixed_minimax_eq_behavior_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
⨆ (μ₀ : { μ₀ : PureStrategy H Act false → ℝ // IsMixedStrategy μ₀ }), T.mixedLowerVal ↑μ₀ = ⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), T.behaviorLowerVal ↑β₀

The mixed maximin value equals both the behavioral and sequence-form maximin values.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.mixed_iSup_iInf_eq_iInf_iSup {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
⨆ (μ₀ : { μ₀ : PureStrategy H Act false → ℝ // IsMixedStrategy μ₀ }), ⨅ (μ₁ : { μ₁ : PureStrategy H Act true → ℝ // IsMixedStrategy μ₁ }), evalMixed (fun (x : Bool) => match (motive := (x : Bool) → PureStrategy H Act x → ℝ) x with | false => ↑μ₀ | true => ↑μ₁) T false = ⨅ (μ₁ : { μ₁ : PureStrategy H Act true → ℝ // IsMixedStrategy μ₁ }), ⨆ (μ₀ : { μ₀ : PureStrategy H Act false → ℝ // IsMixedStrategy μ₀ }), evalMixed (fun (x : Bool) => match (motive := (x : Bool) → PureStrategy H Act x → ℝ) x with | false => ↑μ₀ | true => ↑μ₁) T false

Mixed minimax equality in a zero-sum extensive game with perfect recall: mixed maximin equals mixed minimax, matching the sequence-form and behavioral minimax values.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.isMixedNash_evalMixed_eq {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) {μ : (i : Bool) → PureStrategy H Act i → ℝ} (hμ : T.toCostGame.IsMixedNash μ) :
evalMixed μ T false = ⨆ (β₀ : { β₀ : (h : H false) → Act false h → ℝ // IsBehaviorStrategy β₀ }), T.behaviorLowerVal ↑β₀ ∧ evalMixed μ T false = ⨆ (x : { x : SeqVar T false → ℝ // T.IsRealizationPlan false x }), T.seqLowerVal ↑x

Every mixed Nash equilibrium of T.toCostGame in a two-player zero-sum extensive game with perfect recall attains the sequence-form and behavioral minimax value.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior_pureToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) (T : ExtensiveTree ι H Act) :
evalBehavior (fun (i : ι) => pureToBehavior (s i)) T = evalPure s T

Expected payoff of a pure strategy profile realized as deterministic behavioral strategies fun i => pureToBehavior (s i) equals T.evalPure s.

A two-player perfect-information game is zero-sum if the two players' payoffs sum to 0 at every terminal leaf.

theorem Cslib.GameTheory.Extensive.PerfectInfoTree.IsZeroSum.chance {C : Type} [Fintype C] {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → PerfectInfoTree Bool} (hzs : (PerfectInfoTree.chance prob hprob next).IsZeroSum) (c : C) :
(next c).IsZeroSum

A perfect-information tree is zero-sum iff its extensive-form embedding T.toExtensiveTree satisfies ExtensiveTree.IsZeroSum.

noncomputable def Cslib.GameTheory.Extensive.PerfectInfoTree.toExtensiveBehavior {ι : Type u} (T : PerfectInfoTree ι) (s : (i : ι) → PureStrategy i T) (i : ι) (h : InfoSet i T) :
h.Act → ℝ

View a pure strategy profile on T : PerfectInfoTree ι as a deterministic behavioral strategy profile on T.toExtensiveTree.

Under T.toExtensiveBehavior, behavioral Nash equilibria on T.toExtensiveTree coincide with pure Nash equilibria of T.toCostGame.

A behavioral strategy profile β on T.toExtensiveTree is a behavioral subgame-perfect equilibrium (IsBehaviorSPE) if its restriction to every subgame of T is a behavioral Nash equilibrium of that subgame's embedded extensive tree.

Every behavioral subgame-perfect equilibrium of T is a behavioral Nash equilibrium of T.toExtensiveTree.

A pure strategy profile s is a pure subgame-perfect equilibrium iff its embedded behavioral strategy T.toExtensiveBehavior s is a behavioral subgame-perfect equilibrium.

Backward induction constructs an explicit behavioral subgame-perfect equilibrium of T.toExtensiveTree.

In a zero-sum perfect-information game, every behavioral Nash equilibrium β of T.toExtensiveTree (regardless of continuation ties or off-path threats) attains the unique backward-induction payoff vector T.backwardInduction.payoff.

The value of player false's backward-induction solution equals both the sequence-form maximin/minimax values and the behavioral maximin value of T.toExtensiveTree.

Every behavioral subgame-perfect equilibrium of a zero-sum perfect-information game attains the backward-induction payoff vector T.backwardInduction.payoff.

Every pure Nash equilibrium (and hence every pure subgame-perfect equilibrium) of a zero-sum perfect-information game has expected payoff equal to T.backwardInduction.payoff.

Every mixed Nash equilibrium of T.toCostGame in a zero-sum perfect-information game attains the unique backward-induction payoff vector T.backwardInduction.payoff.