EconCSLib.GameTheory.ExtensiveGame.ZeroSumGameTreeWithChance #
2-player zero-sum extensive game with rational chance (Nature) nodes.
This module sits strictly between the chance-free Zermelo.lean and the
fully general StochasticGameTree.lean (which requires vNM utility theory).
Because payoffs and probabilities are both in ℚ, rational arithmetic suffices
for chance averaging — no vNM theorem is needed.
Ported from math-xmum/gametheory (finitegame branch),
GameTheory/ZerosumFiniteGame.lean, with EconCSLib-style docstrings and
targeted imports (no import Mathlib).
Design #
inductive GameTree
| Leaf (val : ℚ) -- terminal payoff for player A
| Pnode (p : Player) (L R : GameTree) -- player decision node (binary)
| Nnode (p : Set.Icc (0:ℚ) 1) (L R : GameTree) -- chance node (prob p → L)
value : GameTree → ℚ computes the backward-induction value for player A:
- Leaf → the leaf payoff.
- Player A node → max of children's values.
- Player B node → min of children's values.
- Nature node → probability-weighted average of children's values.
DStrategy : Strategy is A's canonical optimal (dominant) strategy:
always choose the child with the higher value.
value_prop is the soundness theorem: for every B-strategy SB,
t.value ≤ t.outcome DStrategy SB.
Main definitions #
ZeroSumChance.Player— two players:A(maximizer) andB(minimizer).ZeroSumChance.Select— binary selection:l(left) orr(right).ZeroSumChance.GameTree— inductive binary game tree with Nature.ZeroSumChance.GameTree.value— backward-induction value (computable).ZeroSumChance.GameTree.DStrategy— dominant strategy for A.ZeroSumChance.GameTree.outcome— outcome under a strategy pair.ZeroSumChance.GameTree.value_prop—t.value ≤ t.outcome DStrategy SB.
References #
- Ported from
math-xmum/gametheoryfinitegame branch,ZerosumFiniteGame.lean. - [MSZ] Maschler, Solan, Zamir, Game Theory, §3.6 (Zermelo / finite games).
Related modules #
EconCSLib.GameTheory.ExtensiveGame.Zermelo— the chance-free variant.EconCSLib.GameTheory.ExtensiveGame.StochasticGameTree— n-player general utility (needs vNM).
Players and binary selection #
The two players in a zero-sum game: A is the maximizer, B is the minimizer.
Instances For
Equations
- ZeroSumChance.instReprPlayer = { reprPrec := ZeroSumChance.instReprPlayer.repr }
Equations
- ZeroSumChance.instReprPlayer.repr ZeroSumChance.Player.A prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "ZeroSumChance.Player.A")).group prec✝
- ZeroSumChance.instReprPlayer.repr ZeroSumChance.Player.B prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "ZeroSumChance.Player.B")).group prec✝
Instances For
Equations
- ZeroSumChance.instReprSelect = { reprPrec := ZeroSumChance.instReprSelect.repr }
Equations
- ZeroSumChance.instReprSelect.repr ZeroSumChance.Select.l prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "ZeroSumChance.Select.l")).group prec✝
- ZeroSumChance.instReprSelect.repr ZeroSumChance.Select.r prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "ZeroSumChance.Select.r")).group prec✝
Instances For
Game tree #
A finite binary game tree for a 2-player zero-sum game with Nature.
Leaf val— terminal node;valis A's payoff (B gets-val).Pnode p L R— playerp's decision node; player chooses L or R.Nnode prob L R— Nature's chance node; Nature picks L with probabilityprob ∈ [0,1]and R with probability1 - prob.
- Leaf (val : ℚ) : GameTree
- Pnode (p : Player) (L R : GameTree) : GameTree
- Nnode (prob : ↑(Set.Icc 0 1)) (L R : GameTree) : GameTree
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- ZeroSumChance.instDecidableEqGameTree.decEq ([L a]) ([L b]) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq ([L val]) (ZeroSumChance.GameTree.Pnode p L R) = isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq ([L val]) (ZeroSumChance.GameTree.Nnode prob L R) = isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq (ZeroSumChance.GameTree.Pnode p L R) ([L val]) = isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq (ZeroSumChance.GameTree.Pnode p L R) (ZeroSumChance.GameTree.Nnode prob L_1 R_1) = isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq (ZeroSumChance.GameTree.Nnode prob L R) ([L val]) = isFalse ⋯
- ZeroSumChance.instDecidableEqGameTree.decEq (ZeroSumChance.GameTree.Nnode prob L R) (ZeroSumChance.GameTree.Pnode p L_1 R_1) = isFalse ⋯
Instances For
Structural size #
Every game tree has positive size.
Strategies and value #
The backward-induction value of the game tree for player A.
- A-node: A maximizes, so we take the max of both children's values.
- B-node: B minimizes, so we take the min of both children's values.
- Nature node: probability-weighted average (rational arithmetic).
Equations
Instances For
A's dominant strategy: at each A-node, move to whichever child has the higher value; ties go left.
Equations
Instances For
Outcome under a strategy pair #
The realized payoff for player A when A plays SA and B plays SB.
Nature's moves are resolved by their fixed probabilities.
Equations
- One or more equations did not get rendered due to their size.
- ZeroSumChance.GameTree.outcome SA SB ([L a]) = a
- ZeroSumChance.GameTree.outcome SA SB (ZeroSumChance.GameTree.Nnode a a_1 a_2) = ↑a * ZeroSumChance.GameTree.outcome SA SB a_1 + (1 - ↑a) * ZeroSumChance.GameTree.outcome SA SB a_2
Instances For
Main theorem #
Soundness of DStrategy: the backward-induction value is a lower bound
on the outcome A achieves by following DStrategy, regardless of how B plays.
Formally: for every B-strategy SB and game tree t,
t.value ≤ t.outcome DStrategy SB.
Notation helpers #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.