Documentation

CslibFrontier.GameTheory.Extensive.SequenceForm

Sequence form, realization plans, and Kuhn's theorem #

This module develops the sequence form of an extensive-form game for a player i with perfect recall ([vS07], Sections 3.9–3.10):

References #

noncomputable def Cslib.GameTheory.Extensive.Node.extendDecisionOf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [∀ (j : ι) (h' : H j), Nonempty (Act j h')] {i : ι} {h : H i} {T : ExtensiveTree ι H Act} (v : Node T) :
IsDecisionOf i h v → Act i h → Terminal T

Given a node v where player i decides at information set h and an action a : Act i h, extend v through a to a terminal path.

theorem Cslib.GameTheory.Extensive.Node.playerSeq_append_singleton_prefix_extendDecisionOf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h' : H j), Nonempty (Act j h')] {i : ι} {h : H i} {T : ExtensiveTree ι H Act} (v : Node T) (hv : IsDecisionOf i h v) (a : Act i h) :
theorem Cslib.GameTheory.Extensive.Node.playerSeq_prefix_extendDecisionOf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h' : H j), Nonempty (Act j h')] {i : ι} {h : H i} {T : ExtensiveTree ι H Act} (v : Node T) (hv : IsDecisionOf i h v) (a : Act i h) :
theorem Cslib.GameTheory.Extensive.Terminal.exists_node_of_seq_append {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {i : ι} {T : ExtensiveTree ι H Act} (z : Terminal T) (pre post : Seq H Act i) (h : H i) (a : Act i h) :
seq i z = pre ++ ⟨h, a⟩ :: post → ∃ (v : Node T), Node.IsDecisionOf i h v ∧ Node.playerSeq i v = pre

Every decomposition z.seq i = pre ++ ⟨h, a⟩ :: post identifies a decision node v of player i at information set h along z whose preceding player-i sequence is pre.

@[reducible, inline]
abbrev Cslib.GameTheory.Extensive.SeqVar {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :

Finite type of player-i choice sequences occurring as a prefix of at least one terminal play in T.

Instances For
    noncomputable def Cslib.GameTheory.Extensive.occursSeqFinset {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) :
    Finset (Seq H Act i)

    Finite set of all player-i sequences occurring as a prefix of some terminal play in T.

    theorem Cslib.GameTheory.Extensive.mem_occursSeqFinset {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} {σ : Seq H Act i} :
    σ ∈ occursSeqFinset T i ↔ ∃ (z : Terminal T), σ <+: Terminal.seq i z
    @[instance_reducible]
    noncomputable instance Cslib.GameTheory.Extensive.SeqVar.instFintype {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) :
    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.infoSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (h : H i) :
    Seq H Act i

    Under perfect recall for player i, the unique player-i choice sequence preceding every decision node of information set h.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.PerfectRecall.playerSeq_eq_infoSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} {v : Node T} (hv : Node.IsDecisionOf i h v) :
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.PerfectRecall.not_mem_infoSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) :
    h ∉ List.map Sigma.fst (T.infoSeq i h)
    def Cslib.GameTheory.Extensive.SeqVar.nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) :
    SeqVar T i

    The empty sequence [] in SeqVar T i.

    @[simp]
    theorem Cslib.GameTheory.Extensive.SeqVar.nil_val {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) :
    ↑(nil T i) = []
    noncomputable def Cslib.GameTheory.Extensive.SeqVar.infoSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) :
    SeqVar T i

    T.infoSeq i h as an element of SeqVar T i when h occurs in T.

    noncomputable def Cslib.GameTheory.Extensive.SeqVar.infoSeqExt {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) (a : Act i h) :
    SeqVar T i

    Extension T.infoSeq i h ++ [⟨h, a⟩] as an element of SeqVar T i.

    theorem Cslib.GameTheory.Extensive.SeqVar.infoSeq_val {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) :
    ↑(infoSeq hpr hh) = T.infoSeq i h
    theorem Cslib.GameTheory.Extensive.SeqVar.infoSeqExt_val {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) (a : Act i h) :
    ↑(infoSeqExt hpr hh a) = T.infoSeq i h ++ [⟨h, a⟩]
    theorem Cslib.GameTheory.Extensive.seqVar_infoSeqExt_ne_nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h : H i} (hh : T.OccursInfoSet i h) (a : Act i h) :
    ↑(SeqVar.infoSeqExt hpr hh a) ≠ []
    theorem Cslib.GameTheory.Extensive.seqVar_infoSeqExt_inj {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {h₁ h₂ : H i} {hh₁ : T.OccursInfoSet i h₁} {hh₂ : T.OccursInfoSet i h₂} {a₁ : Act i h₁} {a₂ : Act i h₂} (heq : SeqVar.infoSeqExt hpr hh₁ a₁ = SeqVar.infoSeqExt hpr hh₂ a₂) :
    ⟨⟨h₁, hh₁⟩, a₁⟩ = ⟨⟨h₂, hh₂⟩, a₂⟩
    theorem Cslib.GameTheory.Extensive.exists_infoSeqExt_of_seqVar_ne_nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) (σ : SeqVar T i) (hne : ↑σ ≠ []) :
    ∃ (h : { h : H i // T.OccursInfoSet i h }) (a : Act i ↑h), σ = SeqVar.infoSeqExt hpr ⋯ a
    noncomputable def Cslib.GameTheory.Extensive.seqVarEquiv {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) :
    Unit ⊕ (h : { h : H i // T.OccursInfoSet i h }) × Act i ↑h ≃ SeqVar T i

    Under perfect recall for player i, SeqVar T i is in bijection with Unit ⊕ (Σ h : {h : H i // T.OccursInfoSet i h}, Act i h.1) ([vS07], Section 3.10).

    theorem Cslib.GameTheory.Extensive.card_seqVar {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] (hpr : T.PerfectRecall i) :
    Fintype.card (SeqVar T i) = 1 + ∑ h : { h : H i // T.OccursInfoSet i h }, Fintype.card (Act i ↑h)

    Under perfect recall for player i, the number of realized sequences equals 1 + ∑ h ∈ H_i, |C_h| ([vS07], Section 3.10, p. 70).

    @[instance_reducible]
    noncomputable instance Cslib.GameTheory.Extensive.SeqRow.instFintype {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) [Fintype (H i)] :

    Row index of the sequence-form constraint matrix E x = e ([vS07], Section 3.10): none selects the root normalization x [] = 1, and some h selects flow conservation at occurring information set h.

    noncomputable def Cslib.GameTheory.Extensive.seqMat {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :
    Matrix (Option { h : H i // T.OccursInfoSet i h }) (SeqVar T i) ℝ

    Sequence-form constraint matrix E of player i ([vS07], Section 3.10):

    • root row (none): 1 on [], 0 elsewhere;
    • information-set row (some h): -1 on infoSeq h, +1 on each extension infoSeq h ++ [⟨h, a⟩], 0 elsewhere.
    def Cslib.GameTheory.Extensive.seqRhs {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) :
    Option { h : H i // T.OccursInfoSet i h } → ℝ

    Sequence-form right-hand side e (1 at root none, 0 at every information set some h).

    @[simp]
    theorem Cslib.GameTheory.Extensive.seqRhs_none {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) :
    seqRhs T i none = 1
    @[simp]
    theorem Cslib.GameTheory.Extensive.seqRhs_some {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) (h : { h : H i // T.OccursInfoSet i h }) :
    seqRhs T i (some h) = 0
    def Cslib.GameTheory.Extensive.ExtensiveTree.IsRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (x : SeqVar T i → ℝ) :

    A realization plan of player i is a nonnegative vector x : SeqVar T i → ℝ satisfying seqMat T i *ᵥ x = seqRhs T i ([vS07], Section 3.10).

    theorem Cslib.GameTheory.Extensive.seqMat_mulVec_none {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (x : SeqVar T i → ℝ) :
    (seqMat T i).mulVec x none = x (SeqVar.nil T i)
    theorem Cslib.GameTheory.Extensive.seqMat_mulVec_some {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) (h : { h : H i // T.OccursInfoSet i h }) (x : SeqVar T i → ℝ) :
    (seqMat T i).mulVec x (some h) = -x (SeqVar.infoSeq hpr ⋯) + ∑ a : Act i ↑h, x (SeqVar.infoSeqExt hpr ⋯ a)
    theorem Cslib.GameTheory.Extensive.isRealizationPlan_iff {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) (x : SeqVar T i → ℝ) :
    T.IsRealizationPlan i x ↔ (∀ (σ : SeqVar T i), 0 ≤ x σ) ∧ x (SeqVar.nil T i) = 1 ∧ ∀ (h : H i) (hh : T.OccursInfoSet i h), ∑ a : Act i h, x (SeqVar.infoSeqExt hpr hh a) = x (SeqVar.infoSeq hpr hh)

    Proposition 3.10 (characterization) ([vS07], Section 3.10): under perfect recall, IsRealizationPlan T i x holds iff x ≥ 0, x [] = 1, and for every occurring information set h of player i, ∑ a : Act i h, x (infoSeq h ++ [⟨h, a⟩]) = x (infoSeq h).

    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.mixedToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) [Fintype (H i)] [DecidableEq (H i)] [(j : ι) → (h : H j) → Fintype (Act j h)] (μ : PureStrategy H Act i → ℝ) (σ : SeqVar T i) :

    Realization plan induced by a mixed strategy μ of player i.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.mixedToRealizationPlan_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) [Fintype (H i)] [DecidableEq (H i)] [(j : ι) → (h : H j) → Fintype (Act j h)] (μ : PureStrategy H Act i → ℝ) (σ : SeqVar T i) :

    Unfolding equation for ExtensiveTree.mixedToRealizationPlan, whose body is not exposed.

    def Cslib.GameTheory.Extensive.ExtensiveTree.behaviorToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (β : (h : H i) → Act i h → ℝ) (σ : SeqVar T i) :

    Realization plan induced by a behavior strategy β of player i.

    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.behaviorToRealizationPlan_apply {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (β : (h : H i) → Act i h → ℝ) (σ : SeqVar T i) :
    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.pureToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (s : PureStrategy H Act i) (σ : SeqVar T i) :

    Realization plan induced by a pure strategy s of player i.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.pureToRealizationPlan_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (s : PureStrategy H Act i) (σ : SeqVar T i) :

    Unfolding equation for ExtensiveTree.pureToRealizationPlan, whose body is not exposed.

    theorem Cslib.GameTheory.Extensive.pureToRealizationPlan_eq_mixedToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) [Fintype (H i)] [DecidableEq (H i)] [(j : ι) → (h : H j) → Fintype (Act j h)] [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) :
    theorem Cslib.GameTheory.Extensive.pureToRealizationPlan_eq_behaviorToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) :
    theorem Cslib.GameTheory.Extensive.sum_realizationProbMixed_append_singleton {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] (μ : PureStrategy H Act i → ℝ) (σ₀ : Seq H Act i) (h : H i) :
    ∑ a : Act i h, realizationProbMixed μ (σ₀ ++ [⟨h, a⟩]) = realizationProbMixed μ σ₀

    Flow-conservation identity for realizationProbMixed at any prefix σ₀ and information set h, without requiring perfect recall or even nonnegativity of μ.

    theorem Cslib.GameTheory.Extensive.isRealizationPlan_mixedToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] [DecidableEq (H i)] (hpr : T.PerfectRecall i) {μ : PureStrategy H Act i → ℝ} (hμ : IsMixedStrategy μ) :

    Proposition 3.10(a) ([vS07], Section 3.10): every mixed strategy of player i induces a valid realization plan.

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

    Proposition 3.10(a) ([vS07], Section 3.10): every behavior strategy of player i induces a valid realization plan.

    theorem Cslib.GameTheory.Extensive.isRealizationPlan_pureToRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Finite (H i)] (hpr : T.PerfectRecall i) (s : PureStrategy H Act i) :

    Proposition 3.10(a) ([vS07], Section 3.10): every pure strategy of player i induces a valid {0, 1} realization plan.

    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.realizationPlanToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (hpr : T.PerfectRecall i) (x : SeqVar T i → ℝ) (h : H i) (a : Act i h) :

    Behavior strategy reconstructed from a realization plan x ([vS07], §3.10): β(a | h) = x(σ_h a) / x(σ_h) when x(σ_h) > 0, and an arbitrary deterministic distribution at irrelevant (x(σ_h) = 0) or non-occurring information sets.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.realizationPlanToBehavior_eq_div {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {x : SeqVar T i → ℝ} {h : H i} (hh : T.OccursInfoSet i h) (hpos : 0 < x (SeqVar.infoSeq hpr hh)) (a : Act i h) :
    T.realizationPlanToBehavior i hpr x h a = x (SeqVar.infoSeqExt hpr hh a) / x (SeqVar.infoSeq hpr hh)

    Formula for realizationPlanToBehavior at any occurring information set reached with positive probability x (infoSeq h) > 0.

    theorem Cslib.GameTheory.Extensive.isBehaviorStrategy_realizationPlanToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {x : SeqVar T i → ℝ} (hx : T.IsRealizationPlan i x) :

    Proposition 3.10(b) ([vS07], Section 3.10): realizationPlanToBehavior produces a valid behavior strategy for every realization plan x.

    theorem Cslib.GameTheory.Extensive.behaviorToRealizationPlan_realizationPlanToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {x : SeqVar T i → ℝ} (hx : T.IsRealizationPlan i x) :

    Proposition 3.10(b) ([vS07], Section 3.10): under perfect recall, the realization plan of T.realizationPlanToBehavior i hpr x is x itself.

    theorem Cslib.GameTheory.Extensive.realizationPlanToBehavior_unique {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {x : SeqVar T i → ℝ} {β : (h : H i) → Act i h → ℝ} (hreal : T.behaviorToRealizationPlan i β = x) {h : H i} (hh : T.OccursInfoSet i h) (hpos : 0 < x (SeqVar.infoSeq hpr hh)) :
    β h = T.realizationPlanToBehavior i hpr x h

    Proposition 3.10 (uniqueness at relevant information sets) ([vS07], §3.10): any behavior strategy realizing x agrees with T.realizationPlanToBehavior i hpr x at every information set h reached with positive probability x (infoSeq h) > 0.

    theorem Cslib.GameTheory.Extensive.kuhn_theorem {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {μ : PureStrategy H Act i → ℝ} (hμ : IsMixedStrategy μ) :

    Corollary 3.12 (Kuhn's theorem) ([vS07], Section 3.10): under perfect recall for player i, every mixed strategy μ of player i is realization-equivalent to the explicit behavior strategy T.realizationPlanToBehavior i hpr (T.mixedToRealizationPlan i μ).

    theorem Cslib.GameTheory.Extensive.kuhn_theorem_exists {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) {μ : PureStrategy H Act i → ℝ} (hμ : IsMixedStrategy μ) :
    ∃ (β : (h : H i) → Act i h → ℝ), IsBehaviorStrategy β ∧ T.RealizationEquivMixedBehavior i μ β

    Existential form of Kuhn's theorem ([vS07], Corollary 3.12).

    theorem Cslib.GameTheory.Extensive.realizationEquivMixed_of_mixedToRealizationPlan_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} {μ₁ μ₂ : PureStrategy H Act i → ℝ} (heq : T.mixedToRealizationPlan i μ₁ = T.mixedToRealizationPlan i μ₂) :
    T.RealizationEquivMixed i μ₁ μ₂

    First half of Proposition 3.11 ([vS07], Section 3.10): mixed strategies with the same realization plan are realization-equivalent.

    theorem Cslib.GameTheory.Extensive.mixedToRealizationPlan_eq_of_realizationEquivMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpos : T.HasPositiveChance) (hnr : ∀ (j : ι), j ≠ i → T.NoRepeatedInfoSet j) {μ₁ μ₂ : PureStrategy H Act i → ℝ} (heq : T.RealizationEquivMixed i μ₁ μ₂) :

    Second half of Proposition 3.11 ([vS07], Section 3.10): under positive chance probabilities and no repeated opponent information sets, realization-equivalent mixed strategies must induce identical realization plans.

    theorem Cslib.GameTheory.Extensive.realizationEquivMixed_iff_mixedToRealizationPlan_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpos : T.HasPositiveChance) (hnr : ∀ (j : ι), j ≠ i → T.NoRepeatedInfoSet j) (μ₁ μ₂ : PureStrategy H Act i → ℝ) :

    Proposition 3.11 ([vS07], Section 3.10): under positive chance probabilities and no repeated opponent information sets, two mixed strategies of player i are realization-equivalent iff they induce the same realization plan.

    def Cslib.GameTheory.Extensive.ExtensiveTree.ReducedEquiv {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (s₁ s₂ : PureStrategy H Act i) :

    Reduced strategic form equivalence ([vS07], Section 3.9): two pure strategies of player i are equivalent in the reduced strategic form iff they induce the same {0, 1} realization plan (equivalently, make the same choices at all reachable information sets).

    theorem Cslib.GameTheory.Extensive.reducedEquiv_iff_agree_on_reachable {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hpr : T.PerfectRecall i) (s₁ s₂ : PureStrategy H Act i) :
    T.ReducedEquiv i s₁ s₂ ↔ ∀ (h : H i), T.OccursInfoSet i h → MatchesSeq s₁ (T.infoSeq i h) → s₁ h = s₂ h
    theorem Cslib.GameTheory.Extensive.evalPure_eq_of_reducedEquiv {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Finite ι] [DecidableEq ι] [∀ (j : ι) (h : H j), Finite (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} {s₁ s₂ : PureStrategy H Act i} (heq : T.ReducedEquiv i s₁ s₂) (s : (j : ι) → PureStrategy H Act j) (k : ι) :

    Pure strategies that agree in the reduced strategic form yield identical payoffs against all opponent pure strategy profiles.

    theorem Cslib.GameTheory.Extensive.mixedToRealizationPlan_eq_sum_pure {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) [Fintype (H i)] [DecidableEq (H i)] [(j : ι) → (h : H j) → Fintype (Act j h)] (μ : PureStrategy H Act i → ℝ) :
    theorem Cslib.GameTheory.Extensive.convex_isRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) :
    theorem Cslib.GameTheory.Extensive.exists_mixed_of_isRealizationPlan {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] [DecidableEq (H i)] (hpr : T.PerfectRecall i) {x : SeqVar T i → ℝ} (hx : T.IsRealizationPlan i x) :
    ∃ (μ : PureStrategy H Act i → ℝ), IsMixedStrategy μ ∧ T.mixedToRealizationPlan i μ = x

    Every realization plan under perfect recall is induced by some mixed strategy.

    theorem Cslib.GameTheory.Extensive.isRealizationPlan_iff_mem_convexHull {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Finite (H i)] (hpr : T.PerfectRecall i) (x : SeqVar T i → ℝ) :

    Under perfect recall, the set of realization plans is the convex hull of the pure realization plans pureToRealizationPlan T i s ([vS07], Section 3.10).

    theorem Cslib.GameTheory.Extensive.mem_extremePoints_isRealizationPlan_iff {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Finite (H i)] (hpr : T.PerfectRecall i) (x : SeqVar T i → ℝ) :

    Extreme points of the realization-plan polytope ([vS07], §§3.9–3.10): under perfect recall, x is an extreme point of {y | T.IsRealizationPlan i y} iff x is a {0, 1} pure realization plan T.pureToRealizationPlan i s.

    noncomputable def Cslib.GameTheory.Extensive.seqPolyMat {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :
    Matrix (Option { h : H i // T.OccursInfoSet i h } ⊕ Option { h : H i // T.OccursInfoSet i h } ⊕ SeqVar T i) (SeqVar T i) ℝ

    Inequality-system matrix stacking [E; -E; -I] so that seqPolyMat T i *ᵥ x ≤ seqPolyRhs T i is equivalent to T.IsRealizationPlan i x, enabling direct Matrix.IsVertex reasoning.

    def Cslib.GameTheory.Extensive.seqPolyRhs {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :
    Option { h : H i // T.OccursInfoSet i h } ⊕ Option { h : H i // T.OccursInfoSet i h } ⊕ SeqVar T i → ℝ

    Inequality-system right-hand side stacking [e; -e; 0].

    @[simp]
    theorem Cslib.GameTheory.Extensive.seqPolyRhs_inl {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (r : Option { h : H i // T.OccursInfoSet i h }) :
    seqPolyRhs T i (Sum.inl r) = seqRhs T i r
    @[simp]
    theorem Cslib.GameTheory.Extensive.seqPolyRhs_inr_inl {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (r : Option { h : H i // T.OccursInfoSet i h }) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.seqPolyRhs_inr_inr {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (σ : SeqVar T i) :
    theorem Cslib.GameTheory.Extensive.seqPolyMat_mulVec_le_iff {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (x : SeqVar T i → ℝ) :
    theorem Cslib.GameTheory.Extensive.isVertex_seqPolyMat_iff {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] (hpr : T.PerfectRecall i) (x : SeqVar T i → ℝ) :

    Polyhedral vertex characterization ([vS07], Section 3.10, p. 72): the basic feasible vertices (Matrix.IsVertex) of the realization-plan polytope seqMat *ᵥ x = seqRhs, x ≥ 0 are precisely the pure realization plans T.pureToRealizationPlan i s.

    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.seqPayoffMat {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) :

    Sequence-form payoff matrix of player p : Bool in a two-player extensive game ([vS07], Section 3.10).

    theorem Cslib.GameTheory.Extensive.seqPayoffMat_bilinear {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) (r₀ : Seq H Act false → ℝ) (r₁ : Seq H Act true → ℝ) :
    ((fun (σ : SeqVar T false) => r₀ ↑σ) ⬝ᵥ (T.seqPayoffMat p).mulVec fun (τ : SeqVar T true) => r₁ ↑τ) = ∑ z : Terminal T, z.chanceWeight * r₀ (Terminal.seq false z) * r₁ (Terminal.seq true z) * z.payoff p
    theorem Cslib.GameTheory.Extensive.evalBehavior_eq_seqPayoffMat {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (β : (i : Bool) → (h : H i) → Act i h → ℝ) (p : Bool) :

    Expected payoff in a two-player extensive game under behavior strategies expressed in bilinear sequence form xᵀ A_p y ([vS07], Section 3.10).

    theorem Cslib.GameTheory.Extensive.evalMixed_eq_seqPayoffMat {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) (μ : (i : Bool) → PureStrategy H Act i → ℝ) (p : Bool) :

    Expected payoff in a two-player extensive game under mixed strategies expressed in bilinear sequence form xᵀ A_p y ([vS07], Section 3.10).