Documentation

CslibFrontier.GameTheory.Graphical.Basic

Graphical games #

A graphical game ([Kea07], Definition 7.1, p. 162) on a set of players ι with strategy sets S : ι → Type* consists of an undirected interaction graph G : SimpleGraph ι together with a local payoff table localPayoff i : (∀ j : ClosedNeighborhood G i, S j.1) → ℝ for each player i. Player i's payoff at a global action profile s : ∀ k, S k depends only on the actions of i and its neighbors in G (payoff_congr). Kearns states Definition 7.1 for binary actions {0, 1} while noting (§7.2, p. 161) that all basic notions extend directly to general finite action sets; this module works over arbitrary S : ι → Type*.

Negating payoffs embeds any graphical game into Cslib.GameTheory.CostGame (toCostGame), just as BimatrixGame.toCostGame embeds two-player payoff games. Conversely, a normal-form CostGame arises from a graphical game on G if and only if each player's cost is invariant under changes outside its closed neighborhood (CostGame.isGraphicalOn_iff_exists_graphicalGame); in particular, every normal-form game is represented by a graphical game on the complete graph ⊤ (ofCostGameComplete, [Kea07], §7.2 Remarks, p. 162).

On finite player and action sets, the domain of localPayoff has tableEntries M entries, equal to ∑ i, ∏ j ∈ insert i (M.graph.neighborFinset i), Fintype.card (S j) (tableEntries_eq_sum_prod) and bounded by Fintype.card ι * m ^ (d + 1) when Fintype.card (S i) ≤ m and M.graph.degree i ≤ d (tableEntries_le_card_mul_pow), compared with CostGame.normalFormEntries ι (fun _ => α) = Fintype.card ι * (Fintype.card α) ^ Fintype.card ι for normal form (tableEntries_lt_normalFormEntries when M.graph ≠ ⊤ and 2 ≤ Fintype.card (S i)).

Under independent mixed strategies p : ∀ i, S i → ℝ, marginalizing out players outside the neighborhood reduces expectedPayoff and deviationPayoff to sums over ClosedNeighborhood and neighborSet (expectedPayoff_eq_localSum, deviationPayoff_eq_localDeviationPayoff). Consequently, whether a mixed strategy x : S i → ℝ is an ε-best response for player i depends only on the mixed strategies of M.graph.neighborSet i (IsApproxBestResponse, isApproxNash_iff_local). For general joint distributions ([Kea07], §7.4.1, Definitions 7.7–7.8 and Lemmas 7.9–7.10, pp. 170–171), local neighborhood equivalence LocalNeighborhoodEquiv strictly refines expected payoff equivalence ExpectedPayoffEquiv and preserves correlated equilibria.

Main definitions #

Main results #

References #

@[reducible, inline]
abbrev Cslib.GameTheory.ClosedNeighborhood {ι : Type u_1} (G : SimpleGraph ι) (i : ι) :
Type u_1

The closed neighborhood N_G(i) = {i} ∪ Γ_G(i) of vertex i in G ([Kea07], §7.2, p. 162), as a subtype.

structure Cslib.GameTheory.GraphicalGame (ι : Type u_1) (S : ι → Type u_2) :
Type (max u_1 u_2)

A graphical game ([Kea07], Definition 7.1, p. 162) over player type ι and strategy sets S : ι → Type*: an undirected graph graph together with a local payoff function localPayoff i for each player i depending only on actions in ClosedNeighborhood graph i.

  • graph : SimpleGraph ι

    The undirected interaction graph G over the players.

  • localPayoff (i : ι) : ((j : ClosedNeighborhood self.graph i) → S ↑j) → ℝ

    Local payoff table M_i(a^i) for player i on closed-neighborhood action profiles.

def Cslib.GameTheory.CostGame.IsGraphicalOn {ι : Type u_1} {S : ι → Type u_2} (G : SimpleGraph ι) (C : CostGame ι S) :

A normal-form cost game C is graphical on G if each player's cost depends only on the actions of its closed neighborhood in G.

def Cslib.GameTheory.CostGame.normalFormEntries (ι : Type u_3) (S : ι → Type u_4) [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] :

Number of scalar payoff entries in the normal-form table ι → (∀ i, S i) → ℝ.

theorem Cslib.GameTheory.CostGame.normalFormEntries_eq (ι : Type u_3) (S : ι → Type u_4) [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] :
normalFormEntries ι S = Fintype.card ι * ∏ i : ι, Fintype.card (S i)
def Cslib.GameTheory.GraphicalGame.restrictNeighborhood {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (i : ι) (s : (k : ι) → S k) (j : ClosedNeighborhood M.graph i) :
S ↑j

Restrict a global pure action profile s to player i's closed neighborhood N_G(i) (a^i in [Kea07], §7.2, p. 162).

@[simp]
theorem Cslib.GameTheory.GraphicalGame.restrictNeighborhood_apply {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (i : ι) (s : (k : ι) → S k) (j : ClosedNeighborhood M.graph i) :
M.restrictNeighborhood i s j = s ↑j
def Cslib.GameTheory.GraphicalGame.payoff {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (i : ι) (s : (k : ι) → S k) :

Player i's payoff at a global action profile s, evaluated from M.localPayoff i.

@[simp]
theorem Cslib.GameTheory.GraphicalGame.payoff_eq_localPayoff {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (i : ι) (s : (k : ι) → S k) :
M.payoff i s = M.localPayoff i fun (j : ClosedNeighborhood M.graph i) => s ↑j
theorem Cslib.GameTheory.GraphicalGame.payoff_congr {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) {i : ι} {s₁ s₂ : (k : ι) → S k} (h : ∀ (j : ι), j = i ∨ M.graph.Adj i j → s₁ j = s₂ j) :
M.payoff i s₁ = M.payoff i s₂

Local neighborhood payoff invariance ([Kea07], Definition 7.1, p. 162): player i's payoff depends only on the actions of i and its neighbors in M.graph.

theorem Cslib.GameTheory.GraphicalGame.payoff_update_of_not_adj {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) [DecidableEq ι] {i k : ι} (hne : k ≠ i) (hnadj : ¬M.graph.Adj i k) (s : (j : ι) → S j) (a : S k) :
M.payoff i (Function.update s k a) = M.payoff i s

Changing the action of a non-neighbor k (k ≠ i and ¬ M.graph.Adj i k) leaves player i's payoff unchanged.

def Cslib.GameTheory.GraphicalGame.toCostGame {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) :

The normal-form cost-minimization game induced by a graphical game, with costs equal to negated payoffs (cost i s = - M.payoff i s, matching BimatrixGame.toCostGame).

@[simp]
theorem Cslib.GameTheory.GraphicalGame.toCostGame_cost {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (i : ι) (s : (k : ι) → S k) :
M.toCostGame.cost i s = -M.payoff i s
def Cslib.GameTheory.GraphicalGame.ofCostGameComplete {ι : Type u_1} {S : ι → Type u_2} (C : CostGame ι S) :

Represent any normal-form CostGame as a graphical game on the complete graph ⊤ ([Kea07], §7.2 Remarks, p. 162).

theorem Cslib.GameTheory.CostGame.isGraphicalOn_iff_exists_graphicalGame {ι : Type u_1} {S : ι → Type u_2} [∀ (k : ι), Nonempty (S k)] {G : SimpleGraph ι} {C : CostGame ι S} :
IsGraphicalOn G C ↔ ∃ (M : GraphicalGame ι S), M.graph = G ∧ M.toCostGame = C

Normal-form locality characterization: a CostGame with nonempty strategy sets is induced by a graphical game with interaction graph G if and only if it satisfies CostGame.IsGraphicalOn G.

def Cslib.GameTheory.GraphicalGame.tableEntries {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] :

Total number of scalar entries across all local payoff tables M.localPayoff ([Kea07], §7.2 Remarks, p. 162).

theorem Cslib.GameTheory.GraphicalGame.tableEntries_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] :
M.tableEntries = Fintype.card ((i : ι) × ((j : ClosedNeighborhood M.graph i) → S ↑j))
theorem Cslib.GameTheory.GraphicalGame.tableEntries_eq_sum_prod {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] :
M.tableEntries = ∑ i : ι, ∏ j ∈ insert i (M.graph.neighborFinset i), Fintype.card (S j)

Exact parameter count of a graphical game: ∑ i, ∏ j ∈ N_G(i), |S j|.

theorem Cslib.GameTheory.GraphicalGame.tableEntries_le_card_mul_pow {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] {m d : ℕ} (hm : ∀ (i : ι), Fintype.card (S i) ≤ m) (hd : ∀ (i : ι), M.graph.degree i ≤ d) :

Succinct representation bound ([Kea07], §7.2 Remarks, p. 162): if every player has at most m pure strategies and degree at most d in M.graph, then M stores at most |ι| * m ^ (d + 1) scalar payoff entries (exponential only in d + 1, linear in |ι|).

theorem Cslib.GameTheory.GraphicalGame.tableEntries_of_graph_eq_top {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] (htop : M.graph = ⊤) :

On the complete graph ⊤, tableEntries equals CostGame.normalFormEntries.

theorem Cslib.GameTheory.GraphicalGame.tableEntries_lt_normalFormEntries {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] (hntop : M.graph ≠ ⊤) (hcard : ∀ (i : ι), 2 ≤ Fintype.card (S i)) :

Whenever M.graph ≠ ⊤ and every player has at least 2 actions, the graphical game stores strictly fewer entries than the normal-form representation ([Kea07], §7.2 Remarks, p. 162).

theorem Cslib.GameTheory.GraphicalGame.sum_productWeight_mul_restrict {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (P : ι → Prop) [DecidablePred P] {p : (i : ι) → S i → ℝ} (hp : ∀ (j : ι), ¬P j → ∑ a : S j, p j a = 1) (f : ((j : { j : ι // P j }) → S ↑j) → ℝ) :
(∑ s : (i : ι) → S i, productWeight p s * f fun (j : { j : ι // P j }) => s ↑j) = ∑ u : (j : { j : ι // P j }) → S ↑j, (∏ j : { j : ι // P j }, p (↑j) (u j)) * f u

Marginalization of a product distribution over coordinates outside {j : ι // P j}: if f depends only on {j // P j} and every coordinate outside P has total weight 1, then ∑ s, productWeight p s * f (restrict s) reduces to the product sum on {j // P j}.

def Cslib.GameTheory.GraphicalGame.expectedPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) :

Expected payoff M_i(p) = E_{s ∼ p}[M.payoff i s] of player i under independent mixed strategies p ([Kea07], §7.2, p. 162).

theorem Cslib.GameTheory.GraphicalGame.expectedPayoff_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) :
M.expectedPayoff p i = ∑ s : (i : ι) → S i, productWeight p s * M.payoff i s
@[simp]
theorem Cslib.GameTheory.GraphicalGame.toCostGame_expectedCost {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) :
def Cslib.GameTheory.GraphicalGame.deviationPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) (a : S i) :

Expected payoff of player i when i plays pure strategy a and all other players draw independently from p.

theorem Cslib.GameTheory.GraphicalGame.deviationPayoff_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) (a : S i) :
M.deviationPayoff p i a = ∑ s : (i : ι) → S i, productWeight p s * M.payoff i (Function.update s i a)
@[simp]
theorem Cslib.GameTheory.GraphicalGame.toCostGame_deviationCost {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) (i : ι) (a : S i) :
theorem Cslib.GameTheory.GraphicalGame.sum_mul_deviationPayoff_eq_expectedPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (p : (i : ι) → S i → ℝ) {i : ι} (hp : ∑ a : S i, p i a = 1) :
∑ a : S i, p i a * M.deviationPayoff p i a = M.expectedPayoff p i
def Cslib.GameTheory.GraphicalGame.localNeighborPayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (M : GraphicalGame ι S) (i : ι) (a : S i) (u : (j : ↑(M.graph.neighborSet i)) → S ↑j) :

Player i's payoff when i plays pure action a and its neighbors j ∈ M.graph.neighborSet i play u j.

theorem Cslib.GameTheory.GraphicalGame.localNeighborPayoff_def {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (M : GraphicalGame ι S) (i : ι) (a : S i) (u : (j : ↑(M.graph.neighborSet i)) → S ↑j) :
M.localNeighborPayoff i a u = M.localPayoff i fun (j : ClosedNeighborhood M.graph i) => if h : ↑j = i then cast ⋯ a else u ⟨↑j, ⋯⟩
theorem Cslib.GameTheory.GraphicalGame.payoff_update_eq_localNeighborPayoff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (M : GraphicalGame ι S) (i : ι) (a : S i) (s : (k : ι) → S k) :
M.payoff i (Function.update s i a) = M.localNeighborPayoff i a fun (j : ↑(M.graph.neighborSet i)) => s ↑j
noncomputable def Cslib.GameTheory.GraphicalGame.localDeviationPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (i : ι) (a : S i) (nbr : (j : ↑(M.graph.neighborSet i)) → S ↑j → ℝ) :

Purely local expected payoff of player i playing pure action a when its neighbors in M.graph use mixed strategies nbr.

theorem Cslib.GameTheory.GraphicalGame.localDeviationPayoff_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] (i : ι) (a : S i) (nbr : (j : ↑(M.graph.neighborSet i)) → S ↑j → ℝ) :
M.localDeviationPayoff i a nbr = ∑ u : (j : ↑(M.graph.neighborSet i)) → S ↑j, (∏ j : ↑(M.graph.neighborSet i), nbr j (u j)) * M.localNeighborPayoff i a u
theorem Cslib.GameTheory.GraphicalGame.expectedPayoff_eq_localSum {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) [DecidableRel M.graph.Adj] {p : (k : ι) → S k → ℝ} {i : ι} (hp : ∀ (k : ι), ¬(k = i ∨ M.graph.Adj i k) → ∑ a : S k, p k a = 1) :
M.expectedPayoff p i = ∑ u : (j : ClosedNeighborhood M.graph i) → S ↑j, (∏ j : ClosedNeighborhood M.graph i, p (↑j) (u j)) * M.localPayoff i u

Local factorization of expectedPayoff: when players outside ClosedNeighborhood M.graph i use probability vectors summing to 1, M.expectedPayoff p i sums only over closed-neighborhood profiles.

theorem Cslib.GameTheory.GraphicalGame.deviationPayoff_eq_localDeviationPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {p : (k : ι) → S k → ℝ} {i : ι} (hp : ∀ (k : ι), ¬M.graph.Adj i k → ∑ a : S k, p k a = 1) (a : S i) :
M.deviationPayoff p i a = M.localDeviationPayoff i a fun (j : ↑(M.graph.neighborSet i)) => p ↑j

Local factorization of deviationPayoff: when every non-neighbor of i uses a vector summing to 1, M.deviationPayoff p i a equals M.localDeviationPayoff i a evaluated only on M.graph.neighborSet i (independent of both p i and all non-neighbors).

theorem Cslib.GameTheory.GraphicalGame.deviationPayoff_congr_neighbors {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {p q : (k : ι) → S k → ℝ} {i : ι} (hp : ∀ (k : ι), ¬M.graph.Adj i k → ∑ a : S k, p k a = 1) (hq : ∀ (k : ι), ¬M.graph.Adj i k → ∑ a : S k, q k a = 1) (h_eq : ∀ (j : ι), M.graph.Adj i j → p j = q j) (a : S i) :

Two mixed strategy profiles agreeing on M.graph.neighborSet i give player i identical deviation payoffs for every pure action a.

theorem Cslib.GameTheory.GraphicalGame.expectedPayoff_congr_closedNeighborhood {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {p q : (k : ι) → S k → ℝ} {i : ι} (hp : ∀ (k : ι), ∑ a : S k, p k a = 1) (hq : ∀ (k : ι), ∑ a : S k, q k a = 1) (h_eq : ∀ (j : ι), j = i ∨ M.graph.Adj i j → p j = q j) :

Two mixed strategy profiles agreeing on ClosedNeighborhood M.graph i give player i the same expected payoff ([Kea07], §7.2 & Definition 7.8 / Lemma 7.9 product case).

Exact and ε-approximate Nash equilibria #

def Cslib.GameTheory.GraphicalGame.IsApproxNash {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (ε : ℝ) (p : (i : ι) → S i → ℝ) :

An additive ε-approximate Nash equilibrium of a graphical game ([Kea07], §7.2, p. 162): every player uses a mixed strategy and no player can gain more than ε by a unilateral pure deviation.

theorem Cslib.GameTheory.GraphicalGame.isApproxNash_zero_iff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {p : (i : ι) → S i → ℝ} :

At ε = 0, IsApproxNash coincides with M.toCostGame.IsMixedNash.

theorem Cslib.GameTheory.GraphicalGame.IsApproxNash.mono {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {ε₁ ε₂ : ℝ} {p : (i : ι) → S i → ℝ} (h : M.IsApproxNash ε₁ p) (hle : ε₁ ≤ ε₂) :
M.IsApproxNash ε₂ p
theorem Cslib.GameTheory.GraphicalGame.isApproxNash_iff_mixed {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {ε : ℝ} {p : (i : ι) → S i → ℝ} :
M.IsApproxNash ε p ↔ (∀ (i : ι), IsMixedStrategy (p i)) ∧ ∀ (i : ι) (x : S i → ℝ), IsMixedStrategy x → M.expectedPayoff (Function.update p i x) i ≤ M.expectedPayoff p i + ε

Equivalence between pure-deviation and mixed-deviation ε-Nash equilibrium ([Kea07], §7.2, p. 162: ∀ i, ∀ p'_i, M_i(p) + ε ≥ M_i(p[i : p'_i])).

noncomputable def Cslib.GameTheory.GraphicalGame.IsApproxBestResponse {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (ε : ℝ) (i : ι) (x : S i → ℝ) (nbr : (j : ↑(M.graph.neighborSet i)) → S ↑j → ℝ) :

Purely local ε-best-response predicate for player i against neighbor mixed strategies nbr ([Kea07], §7.2–7.3, pp. 162, 165).

noncomputable def Cslib.GameTheory.GraphicalGame.IsBestResponse {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) (i : ι) (x : S i → ℝ) (nbr : (j : ↑(M.graph.neighborSet i)) → S ↑j → ℝ) :

Purely local exact best-response predicate (ε = 0).

theorem Cslib.GameTheory.GraphicalGame.isApproxBestResponse_zero_iff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {i : ι} {x : S i → ℝ} {nbr : (j : ↑(M.graph.neighborSet i)) → S ↑j → ℝ} :
theorem Cslib.GameTheory.GraphicalGame.isApproxNash_iff_local {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {ε : ℝ} {p : (i : ι) → S i → ℝ} :
M.IsApproxNash ε p ↔ ∀ (i : ι), M.IsApproxBestResponse ε i (p i) fun (j : ↑(M.graph.neighborSet i)) => p ↑j

Locality of IsApproxNash: p is an ε-Nash equilibrium of M if and only if each p i is locally an ε-best response to (fun j : M.graph.neighborSet i => p j.1).

theorem Cslib.GameTheory.GraphicalGame.isMixedNash_toCostGame_iff_local {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (M : GraphicalGame ι S) {p : (i : ι) → S i → ℝ} :
M.toCostGame.IsMixedNash p ↔ ∀ (i : ι), M.IsBestResponse i (p i) fun (j : ↑(M.graph.neighborSet i)) => p ↑j

Locality of exact Nash equilibrium: p is a mixed Nash equilibrium of M.toCostGame if and only if each p i is locally an exact best response to its neighbors in M.graph.

def Cslib.GameTheory.GraphicalGame.ExpectedPayoffEquiv {ι : Type u_1} {S : ι → Type u_2} (M : GraphicalGame ι S) (σ τ : Convexity.StdSimplex ℝ ((i : ι) → S i)) :

Expected payoff equivalence σ ≡_EP τ ([Kea07], Definition 7.7, p. 170): two finitely supported joint action distributions give every player the same expected payoff in M.

noncomputable def Cslib.GameTheory.neighborhoodMarginal {ι : Type u_1} {S : ι → Type u_2} (G : SimpleGraph ι) (σ : Convexity.StdSimplex ℝ ((i : ι) → S i)) (i : ι) (u : (j : ClosedNeighborhood G i) → S ↑j) :

Marginal probability assigned by a finitely supported joint distribution σ to the closed-neighborhood setting u of player i in G ([Kea07], Definition 7.8, p. 171).

theorem Cslib.GameTheory.neighborhoodMarginal_def {ι : Type u_1} {S : ι → Type u_2} (G : SimpleGraph ι) (σ : Convexity.StdSimplex ℝ ((i : ι) → S i)) (i : ι) [DecidableEq ((j : ClosedNeighborhood G i) → S ↑j)] (u : (j : ClosedNeighborhood G i) → S ↑j) :
neighborhoodMarginal G σ i u = σ.sum fun (s : (i : ι) → S i) (w : ℝ) => if (fun (j : ClosedNeighborhood G i) => s ↑j) = u then w else 0
def Cslib.GameTheory.LocalNeighborhoodEquiv {ι : Type u_1} {S : ι → Type u_2} (G : SimpleGraph ι) (σ τ : Convexity.StdSimplex ℝ ((i : ι) → S i)) :

Local neighborhood equivalence σ ≡_LN τ with respect to G ([Kea07], Definition 7.8, p. 171): σ and τ induce identical marginal distributions on every closed neighborhood ClosedNeighborhood G i.

theorem Cslib.GameTheory.LocalNeighborhoodEquiv.expectedPayoffEquiv {ι : Type u_1} {S : ι → Type u_2} {M : GraphicalGame ι S} {σ τ : Convexity.StdSimplex ℝ ((i : ι) → S i)} (h : LocalNeighborhoodEquiv M.graph σ τ) :

Local neighborhood equivalence implies expected payoff equivalence ([Kea07], Lemma 7.9, first part, p. 171): if σ ≡_LN τ with respect to M.graph, then σ ≡_EP τ in M.

theorem Cslib.GameTheory.exists_graphicalGame_not_expectedPayoffEquiv {ι : Type u_1} {S : ι → Type u_2} {G : SimpleGraph ι} {σ τ : Convexity.StdSimplex ℝ ((i : ι) → S i)} (h : ¬LocalNeighborhoodEquiv G σ τ) :
∃ (M : GraphicalGame ι S), M.graph = G ∧ ¬M.ExpectedPayoffEquiv σ τ

Strictness of local neighborhood equivalence ([Kea07], Lemma 7.9, second part, p. 171): if ¬ LocalNeighborhoodEquiv G σ τ, there exists a graphical game on G with {0, 1} payoffs under which σ and τ are not expected-payoff equivalent.

Local neighborhood equivalence preserves approximate correlated equilibria ([Kea07], Lemma 7.10, p. 171, generalized to additive slack ε).

Local neighborhood equivalence preserves correlated equilibria ([Kea07], Lemma 7.10, p. 171).