GameTree
inductiveimported Lean
A finite extensive-form game of perfect information, without chance. * Leaf payoff — a terminal state with a payoff vector N → U. * Node mover head tail — a decision node owned by mover, with non-empty children head :: tail. Finiteness is built into the inductive type; non-emptiness of children is built into the Node constructor via head + tail.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in inductive GameTree (N : Type*) (U : Type*) : Type _
- Defined in
- EconCSLib, `GameTree`
- Lean proof
- By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at
1a88f809b538(Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.GameTree← GameTree (EconCSLib/GameTheory/ExtensiveGame/GameTree.lean:53): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Used by 82
- GameTree.value_LeafGameTree.value_Leaf
- GameTree.size_mem_tail_ltAny tail child is structurally smaller.
- GameTree.Kuhn_exists_SPE_onKuhn's theorem, root-scoped SPE form: every finite perfect-information game without chance has a pure strategy that is subgame-perfect…
- GameTree.value_Node_eq_some_child_valueThe value at a node is itself the value of some child (the argmax). Specifically,
argMaxOn ... ∈ value h :: valueList t, so it equals… - GameTree.value₀Minimax value for player 0 in a two-player zero-sum game. Under zero-sum, this fully determines both players' values (player 1's value…
- GameTree.value_NodeGameTree.value_Node
- GameTree.IsSubgamePerfectOnRoot-scoped subgame perfection on the subtrees of a fixed root.
IsSubgamePerfect σis global over everyGameTree N U. This predicate… - GameTree.size_posSize is always positive.
- GameTree.outcome_LeafGameTree.outcome_Leaf
- GameTree.IVariant.refl
IVariantis reflexive: any strategy is ani-variant of itself. - GameTree.zermelo_exists_pure_NEPure root Nash existence for a finite two-player game on
ℚ: theFin 2/ℚinstance ofKuhn_exists_NE. Zero-sum is not needed. - GameTree.profileStrategyCombine a normal-form profile into the global
GameTree.Strategyused by the game-tree evaluator. At each node, the mover's contingent… - GameTree.Kuhn_exists_NEKuhn's theorem, NE form: every finite perfect-information game without chance has a pure-strategy Nash equilibrium.
- GameTree.value₀_Node_eq_some_childAt any decision node, the backward-induction
value₀is realized by one of the node's children. - GameTree.size_mem_children_ltAny child (head or in tail) is structurally smaller than the node.
- GameTree.value_zero_sumBackward induction preserves the zero-sum invariant: if every terminal payoff vector is zero-sum, then the selected backward-induction…
- GameTree.IsZeroSum.of_subtreeZero-sumness is inherited by subgames.
- GameTree.value₀_eq_outcome_and_zeroSumPackaging lemma: the backward-induction strategy realizes player 0's value, and the value vector is zero-sum. This is *not* the minimax…
- GameTree.value₀_Node_one_le_childAt a zero-sum player-1 node,
value₀is no greater than thevalue₀of every child. Equivalently, player 1's local maximization of their… - GameTree.valueList_eq_map
valueList lis exactlyl.map value. Useful for rewriting. - GameTree.outcome_zero_sumIn a zero-sum tree, the terminal outcome of any strategy is zero-sum: following any strategy ends at some leaf, and every leaf of a…
- GameTree.IsZeroSum.tail_memEvery tail child of a zero-sum node is zero-sum.
- GameTree.valueList_nilGameTree.valueList_nil
- GameTree.optStrategy_isSubgamePerfectOptimality of
optStrategy: for every subtreeg, every playeri, and everyi-variant deviationσ', the deviating outcome is… - GameTree.HasOnlyRootSubgamesA fixed
GameTreehas no proper subgames when every subtree is the root itself. This is the pure finite-tree analogue of having no… - GameTree.valueList_consGameTree.valueList_cons
- GameTree.IsNashAtRoot-scoped Nash equilibrium predicate for a fixed
GameTreeroot. This is definitionally the existingIsNashEquilibrium, with the… - GameTree.Subtree.child_memAny child (head or tail) is a subtree.
- GameTree.IsNashAt.toSubgamePerfectOn_of_hasOnlyRootSubgamesIf a tree has no proper subgames, root Nash equilibrium already implies subgame perfection on that tree. This is the pure finite-tree form…
- GameTree.outcome_le_value₀_of_iVariant_zeroPlayer 1's security. If player 1 plays
optStrategy(soσ'is a0-variant, leaving player 1's choices fixed), then player 0's… - GameTree.outcome_NodeGameTree.outcome_Node
- GameTree.toStrategicGameThe strategic-form extraction of a finite perfect-information tree.
- GameTree.Subtree.transThe subtree relation is transitive. In game-theoretic terms, a subgame of a subgame is also a subgame of the original game.
- GameTree.sizeStructural size, used for well-founded recursion.
- GameTree.value₀_LeafAt a zero-sum leaf,
value₀equals player 0's payoff and-value₀equals player 1's. - GameTree.value₀_Node_zero_ge_childAt a player-0 node,
value₀is at least thevalue₀of every child. - GameTree.value_Node_geKey optimality lemma: at a
Node m h t, the moverm's coordinate of the backward-induction value dominates every child's. - ExtensiveGame.extractTerminalGameTreeTerminal states extract to one-leaf
GameTrees. - GameTree.size_head_ltThe head of a
Node's children is structurally smaller. - GameTree.IsSubgamePerfectA strategy is subgame-perfect (SPE) if, at every subtree, no player can strictly improve their payoff by a unilateral deviation —…
- GameTree.outcome_optStrategy_eq_valueKey lemma: the outcome of the backward-induction strategy equals the backward-induction value vector at every game tree. This is the…
- GameTree.value₀_Node_zero_isMaxAt a player-0 node, some child realizes the node's
value₀, and that value is at least every child'svalue₀. - StochasticGameTree.ofGameTreeEmbed an ordinary no-chance
GameTreeinto the stochastic tree layer. - GameTree.IsZeroSum.headThe head child of a zero-sum node is zero-sum.
- GameTree.IsSubgamePerfectOn.toNashAtRoot-scoped subgame perfection implies Nash equilibrium at the same root.
- GameTree.value₀_le_outcome_of_iVariant_onePlayer 0's security. If player 0 plays
optStrategy(so the deviating profileσ'is a1-variant, leaving player 0's choices… - GameTree.valueGameTree.value
- GameTree.children_node_ne_nilChildren of a
Nodeare never empty. - ExtensiveGame.ExtractsGameTree.spe_on_to_nash_atOn any extracted tree, root-scoped subgame perfection implies root Nash equilibrium through the ordinary
GameTreeequilibrium API. - GameTree.IVariantTwo strategies are
i-variants if they agree on all nodes NOT owned byi. I.e.,σ'is obtained fromσby changing only playeri's… - ExtensiveGame.extractTerminal_extractsThe certified terminal-state extractor satisfies the relational extraction interface.
- GameTree.Subtree
Subtree s g—soccurs as a subtree ofg. - GameTree.IsSubgamePerfect.toSubgamePerfectOnA global subgame-perfect equilibrium is subgame-perfect on every fixed root.
- ExtensiveGame.extractTerminal_payoffExtensiveGame.extractTerminal_payoff
- ExtensiveGame.ExtractsGameTree.node_head_reachableAt an extracted decision node, the head child is reached by one Arena transition and itself has an extracted subtree.
- GameTree.value₀_eq_optStrategy_outcomeThe backward-induction strategy realizes
value₀for player 0. - GameTree.IsZeroSumA 2-player
GameTreevalued inℚis zero-sum if at every leaf the two players' payoffs sum to zero. - GameTree.value₀_Node_one_isMinAt a zero-sum player-1 node, some child realizes the node's
value₀, and that value is no greater than every child'svalue₀. - GameTree.PlayerStrategyA single player's pure strategy in the normal form of a
GameTree: a complete contingent plan choosing a child at every possible node. - GameTree.childrenThe full child list at a
Node, as a guaranteed non-empty list. - GameTree.Subtree.tail_memAny tail member of a
Nodeis a subtree of the node. - GameTree.strong_inductionStrong induction: to prove
motive g, it suffices to handleLeafand, for eachNode, to prove the motive given the motive for… - GameTree.StrategyA pure strategy for the entire game tree: at every possible node context
(mover, head, tail), specify one child (bundled with its… - GameTree.IsNashEquilibriumNash equilibrium: no single player can improve their outcome at the root game by unilateral deviation. Weaker than
IsSubgamePerfect,… - GameTree.profileStrategy_deviate_variantReplacing player
i's normal-form contingent plan produces ani-variant global tree strategy. - GameTree.optStrategyThe canonical backward-induction strategy: at each node, pick a child whose backward-induction value equals the node's value (i.e., a…
- GameTree.zermelo_determinacyZermelo's theorem (determinacy / saddle value). In a finite two-player zero-sum perfect-information game,
optStrategyis a saddle… - GameTree.outcomeThe outcome (terminal payoff vector) of playing strategy
σstarting from game treeg. Walks down the tree, usingσto pick a child… - GameTree.IsZeroSum.child_memEvery child of a zero-sum node is zero-sum.
- GameTree.zermelo_exists_pure_SPEPure root-scoped subgame-perfect existence for a finite two-player game on
ℚ: theFin 2/ℚinstance ofKuhn_exists_SPE_on.… - GameTree.value_one_eq_neg_value₀In a zero-sum game, player 1's backward-induction value is determined by player 0's value.
- GameTree.value_optStrategy_eqAt a node, the
optStrategypicks a child whose value equals the node's value. - GameTree.Kuhn_exists_SPEKuhn's theorem (existence form): every finite perfect-information game without chance admits a subgame-perfect equilibrium. The…
- GameTree.mem_valueList_iffMembership in
valueListvia membership in the source list. - GameTree.Subtree.selfEvery tree is a subtree of itself.
- ExtensiveGame.ExtractsGameTreeExtensiveGame.ExtractsGameTree
- GameTree.IsSubgamePerfect.toNESPE ⇒ NE: every subgame-perfect equilibrium is a Nash equilibrium (at any fixed root game).
- ExtensiveGame.ExtractsGameTree.leaf_payoffIf an Arena state extracts to a leaf, the leaf payoff is exactly the Arena payoff at that state.
- GameTree.Subtree.headThe head of a
Nodeis a subtree of the node. - GameTree.outcome_optStrategy_one_eq_neg_value₀In a zero-sum game, the backward-induction outcome for player 1 is the negative of player 0's backward-induction value.
- GameTree.outcome_optStrategy_zero_sumThe terminal outcome reached by the backward-induction strategy is zero-sum whenever the game tree is zero-sum.
- GameTree.isSubgamePerfectOn_iff_forall_subtree_isNashAtRoot-scoped subgame perfection is equivalent to Nash equilibrium at every subtree of the root. This is the pure finite-tree form of MSZ…
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in /-- A finite extensive-form game of perfect information, without chance. * `Leaf payoff` — a terminal state with a payoff vector `N → U`. * `Node mover head tail` — a decision node owned by `mover`, with non-empty children `head :: tail`. Finiteness is built into the inductive type; non-emptiness of children is built into the `Node` constructor via `head + tail`. -/ inductive GameTree (N : Type*) (U : Type*) : Type _ | Leaf (payoff : N → U) : GameTree N U | Node (mover : N) (head : GameTree N U) (tail : List (GameTree N U)) : GameTree N U