Documentation

CslibFrontier.GameTheory.UtilityGame.Basic

Vetta's utility games, the price of anarchy 2, and random best-response dynamics #

In a utility game ([Vet02]; [TW07], Section 19.4.3, p. 504), each player i : ι selects a strategy s i : S i from a player-indexed ground set Σ i, S i (modeling the disjoint union A = ⊔ i, A_i of player strategy sets), a social welfare function socialValue : Finset (Σ i, S i) → ℝ evaluates any finite subset of player-tagged choices, and each player receives payoff utility i s : ℝ. A UtilityGame is valid (IsValid, called a "utility game" in [TW07], Section 19.4.3) when:

  1. socialValue is submodular (Cslib.Algorithms.Lean.Submodular.IsSubmodular);
  2. the players' payoffs do not exceed the social welfare (∑ i, utility i s ≤ profileValue s);
  3. each player's payoff is at least its marginal contribution to social welfare (profileValue s - socialValue (profileWithout s i) ≤ utility i s).

It is basic (IsBasic) when condition (3) holds with equality. Monotonicity reuses Mathlib's Monotone directly on G.socialValue. Embedding payoffs into Cslib.GameTheory.CostGame via cost = -utility (toCostGame) lets utility games reuse IsPureNash, IsMixedNash, IsCorrelatedEquilibrium, IsCoarseCorrelatedEquilibrium, IsExactPotential, and HasFIP directly.

Every basic utility game has -profileValue as an exact potential of toCostGame (IsBasic.isExactPotential), so finite basic utility games always admit pure Nash equilibria, every welfare-maximizing profile is a pure Nash equilibrium (PoS = 1), and better-response dynamics terminate (IsBasic.hasFIP).

For monotone valid utility games, diminishing marginal returns imply the payoff-smoothness bound profileValue o - profileValue s ≤ ∑ i, utility i (update s i (o i)) (IsValid.profileValue_sub_le_sum_deviation), yielding Vetta's price-of-anarchy bound of 2 for pure Nash equilibria ([TW07], Theorem 19.19) and mixed Nash equilibria ([Vet02]; [TW07], Section 19.5.3, p. 511), together with an original extension to coarse correlated equilibria (hence correlated equilibria).

For monotone basic utility games, one uniformly random best-response step increases expected welfare by at least (profileValue o - 2 * profileValue s) / n, so O(n log(1 / ε)) random best-response moves reach expected social welfare at least (1 / 2 - ε) times optimal without assuming convergence to equilibrium ([MV04]; [GMV05]; [TW07], Theorem 19.20).

Finally, Section 19.4's closed-neighborhood wealth-sharing graph location game ([TW07], Exercise 19.16, p. 515) instantiates IsValid as a non-basic monotone utility game whose pure-equilibrium price of anarchy attains 2 - 1 / k, approaching 2 arbitrarily closely.

Main definitions #

Main results #

References #

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

A utility game ([Vet02]; [TW07], Section 19.4.3, p. 504): each player i : ι chooses a strategy s i : S i, socialValue evaluates finite subsets of the disjoint union Σ i, S i of player strategy sets, and utility i s is player i's payoff at the profile s.

  • socialValue : Finset ((i : ι) × S i) → ℝ

    Social welfare V(T) of a finite set T of player-tagged choices.

  • utility : ι → ((i : ι) → S i) → ℝ

    Payoff α_i(s) of player i at strategy profile s.

def Cslib.GameTheory.UtilityGame.profileSet {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] (s : (i : ι) → S i) :
Finset ((i : ι) × S i)

The finite set {⟨i, s i⟩ | i : ι} of player-tagged choices in profile s.

@[simp]
theorem Cslib.GameTheory.UtilityGame.mem_profileSet {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] {s : (i : ι) → S i} {x : (i : ι) × S i} :
@[simp]
theorem Cslib.GameTheory.UtilityGame.sum_profileSet {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] {β : Type u_3} [AddCommMonoid β] (s : (i : ι) → S i) (f : (i : ι) × S i → β) :
∑ x ∈ profileSet s, f x = ∑ i : ι, f ⟨i, s i⟩
@[simp]
theorem Cslib.GameTheory.UtilityGame.fold_profileSet {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] {β : Type u_3} (op : β → β → β) [Std.Associative op] [Std.Commutative op] (b : β) (f : (i : ι) × S i → β) (s : (i : ι) → S i) :
Finset.fold op b f (profileSet s) = Finset.fold op b (fun (i : ι) => f ⟨i, s i⟩) Finset.univ
def Cslib.GameTheory.UtilityGame.profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (s : (i : ι) → S i) (i : ι) :
Finset ((j : ι) × S j)

The set s - s_i of choices made by all players other than i in profile s.

@[simp]
theorem Cslib.GameTheory.UtilityGame.mem_profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] {s : (i : ι) → S i} {i : ι} {x : (j : ι) × S j} :
x ∈ profileWithout s i ↔ x.fst ≠ i ∧ s x.fst = x.snd
@[simp]
theorem Cslib.GameTheory.UtilityGame.sum_profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] {β : Type u_3} [AddCommMonoid β] (s : (i : ι) → S i) (i : ι) (f : (j : ι) × S j → β) :
∑ x ∈ profileWithout s i, f x = ∑ j ∈ Finset.univ.erase i, f ⟨j, s j⟩
@[simp]
theorem Cslib.GameTheory.UtilityGame.fold_profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] {β : Type u_3} (op : β → β → β) [Std.Associative op] [Std.Commutative op] (b : β) (f : (j : ι) × S j → β) (s : (i : ι) → S i) (i : ι) :
Finset.fold op b f (profileWithout s i) = Finset.fold op b (fun (j : ι) => f ⟨j, s j⟩) (Finset.univ.erase i)
@[simp]
theorem Cslib.GameTheory.UtilityGame.profileWithout_update {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (s : (j : ι) → S j) (i : ι) (a : S i) :
theorem Cslib.GameTheory.UtilityGame.profileWithout_subset_profileSet {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (s : (j : ι) → S j) (i : ι) :
theorem Cslib.GameTheory.UtilityGame.profileWithout_eq_erase {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(j : ι) → DecidableEq (S j)] (s : (j : ι) → S j) (i : ι) :
theorem Cslib.GameTheory.UtilityGame.insert_profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(j : ι) → DecidableEq (S j)] (s : (j : ι) → S j) (i : ι) (a : S i) :
@[simp]
theorem Cslib.GameTheory.UtilityGame.insert_self_profileWithout {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(j : ι) → DecidableEq (S j)] (s : (j : ι) → S j) (i : ι) :
def Cslib.GameTheory.UtilityGame.profileValue {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] (G : UtilityGame ι S) (s : (i : ι) → S i) :

Social welfare V(s) of a strategy profile s.

theorem Cslib.GameTheory.UtilityGame.profileValue_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] (G : UtilityGame ι S) (s : (i : ι) → S i) :
def Cslib.GameTheory.UtilityGame.toCostGame {ι : Type u_1} {S : ι → Type u_2} (G : UtilityGame ι S) :

Strategic game in cost-minimization form associated to G, with cost i s = -G.utility i s.

@[simp]
theorem Cslib.GameTheory.UtilityGame.toCostGame_cost {ι : Type u_1} {S : ι → Type u_2} (G : UtilityGame ι S) (i : ι) (s : (j : ι) → S j) :
@[simp]
theorem Cslib.GameTheory.UtilityGame.toCostGame_socialCost {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] (G : UtilityGame ι S) (s : (j : ι) → S j) :
G.toCostGame.socialCost s = -∑ i : ι, G.utility i s
theorem Cslib.GameTheory.UtilityGame.isPureNash_toCostGame_iff {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (G : UtilityGame ι S) {s : (i : ι) → S i} :
G.toCostGame.IsPureNash s ↔ ∀ (i : ι) (a : S i), G.utility i (Function.update s i a) ≤ G.utility i s

Vetta's utility game conditions and potential structure #

structure Cslib.GameTheory.UtilityGame.IsValid {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] (G : UtilityGame ι S) :

Vetta's valid utility game conditions ([Vet02]; [TW07], Section 19.4.3, properties (i)–(iii), p. 504):

  1. socialValue is submodular on Finset (Σ i, S i);
  2. total player payoffs never exceed social welfare;
  3. each player's payoff is at least its marginal contribution to social welfare.
structure Cslib.GameTheory.UtilityGame.IsBasic {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] (G : UtilityGame ι S) :

A basic utility game ([TW07], Section 19.4.3, p. 504) satisfies properties (i) and (ii) and achieves equality in property (iii): each player's payoff equals its exact marginal contribution V(s) - V(s - s_i) to social welfare.

theorem Cslib.GameTheory.UtilityGame.IsBasic.isValid {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsBasic) :

Every basic utility game is a valid utility game.

theorem Cslib.GameTheory.UtilityGame.IsBasic.utility_sub_utility_eq {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] {G : UtilityGame ι S} (hmarg : ∀ (i : ι) (s : (i : ι) → S i), G.utility i s = G.profileValue s - G.socialValue (profileWithout s i)) (s : (i : ι) → S i) (i : ι) (a : S i) :

In a basic utility game, any unilateral deviation changes the deviator's payoff by the exact change in profileValue.

theorem Cslib.GameTheory.UtilityGame.IsBasic.isExactPotential {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsBasic) :
G.toCostGame.IsExactPotential fun (s : (i : ι) → S i) => -G.profileValue s

Every basic utility game is an exact potential game with potential -profileValue on toCostGame ([TW07], Section 19.4.4, p. 505).

theorem Cslib.GameTheory.UtilityGame.IsBasic.hasFIP {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [∀ (i : ι), Finite (S i)] (hG : G.IsBasic) :

Every finite basic utility game has the finite improvement property: better-response dynamics always terminate at a pure Nash equilibrium.

theorem Cslib.GameTheory.UtilityGame.IsBasic.exists_isPureNash {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] (hG : G.IsBasic) :
∃ (s : (i : ι) → S i), G.toCostGame.IsPureNash s

Every nonempty finite basic utility game admits a pure Nash equilibrium.

theorem Cslib.GameTheory.UtilityGame.IsBasic.isPureNash_of_forall_profileValue_le {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsBasic) {s : (i : ι) → S i} (hs : ∀ (s' : (i : ι) → S i), G.profileValue s' ≤ G.profileValue s) :

In a basic utility game, every socially efficient profile is a pure Nash equilibrium ([TW07], Section 19.4.4, p. 505).

theorem Cslib.GameTheory.UtilityGame.IsBasic.exists_isPureNash_forall_profileValue_le {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] (hG : G.IsBasic) :
∃ (s : (i : ι) → S i), G.toCostGame.IsPureNash s ∧ ∀ (s' : (i : ι) → S i), G.profileValue s' ≤ G.profileValue s

Every nonempty finite basic utility game admits a socially optimal pure Nash equilibrium (the price of stability is 1).

Price of anarchy 2 for monotone valid utility games #

theorem Cslib.GameTheory.UtilityGame.IsValid.profileValue_sub_le_sum_deviation {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsValid) (hmono : Monotone G.socialValue) (s o : (i : ι) → S i) :
G.profileValue o - G.profileValue s ≤ ∑ i : ι, G.utility i (Function.update s i (o i))

Payoff-smoothness of monotone valid utility games: for any two profiles s and o, V(o) - V(s) ≤ ∑ i, α_i(update s i (o i)) ([Vet02]; [TW07], proof of Theorem 19.19, p. 505).

theorem Cslib.GameTheory.UtilityGame.IsValid.profileValue_le_two_mul_of_isPureNash {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsValid) (hmono : Monotone G.socialValue) {s : (i : ι) → S i} (hs : G.toCostGame.IsPureNash s) (o : (i : ι) → S i) :

Price of Anarchy for Monotone Utility Games ([TW07], Theorem 19.19, p. 505; [Vet02]): in every monotone valid utility game, the social welfare of any pure Nash equilibrium s is at least half the social welfare of any profile o (profileValue o ≤ 2 * profileValue s).

theorem Cslib.GameTheory.UtilityGame.IsValid.profileValue_le_two_mul_expected_of_isCoarseCorrelatedEquilibrium {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsValid) (hmono : Monotone G.socialValue) {σ : Convexity.StdSimplex ℝ ((i : ι) → S i)} (hσ : G.toCostGame.IsCoarseCorrelatedEquilibrium σ) (o : (i : ι) → S i) :
G.profileValue o ≤ 2 * σ.sum fun (s : (i : ι) → S i) (w : ℝ) => w * G.profileValue s

Coarse Correlated Price of Anarchy for Monotone Utility Games (original extension): for every coarse correlated equilibrium σ of G.toCostGame (hence also every correlated equilibrium via CostGame.IsCorrelatedEquilibrium.isCoarseCorrelatedEquilibrium), expected social welfare under σ is at least half the social welfare of any profile o.

theorem Cslib.GameTheory.UtilityGame.IsValid.profileValue_le_two_mul_expected_of_isMixedNash {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [(i : ι) → Fintype (S i)] (hG : G.IsValid) (hmono : Monotone G.socialValue) {p : (i : ι) → S i → ℝ} (hp : G.toCostGame.IsMixedNash p) (o : (i : ι) → S i) :
G.profileValue o ≤ 2 * ∑ s : (i : ι) → S i, productWeight p s * G.profileValue s

Mixed Nash Price of Anarchy for Monotone Utility Games ([Vet02]; [TW07], Section 19.5.3, p. 511): for every mixed Nash equilibrium p of G.toCostGame, expected social welfare ∑ s, productWeight p s * profileValue s is at least half the social welfare of any pure profile o.

Transient welfare bounds for random best-response dynamics (Theorem 19.20) #

def Cslib.GameTheory.UtilityGame.IsBestResponse {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (G : UtilityGame ι S) (br : (i : ι) → ((j : ι) → S j) → S i) :

br is a best-response selector for G: for every player i and profile s, switching i to br i s achieves at least the payoff of any unilateral deviation a : S i.

theorem Cslib.GameTheory.UtilityGame.exists_isBestResponse {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] (G : UtilityGame ι S) :
∃ (br : (i : ι) → ((j : ι) → S j) → S i), G.IsBestResponse br

Every utility game with nonempty finite strategy sets admits a best-response selector.

def Cslib.GameTheory.UtilityGame.bestResponseWalk {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) (t : ℕ) :
(Fin t → ι) → (i : ι) → S i

Trajectory of t best-response moves starting at s driven by the player sequence seq : Fin t → ι.

@[simp]
theorem Cslib.GameTheory.UtilityGame.bestResponseWalk_zero {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) (seq : Fin 0 → ι) :
bestResponseWalk br s 0 seq = s
@[simp]
theorem Cslib.GameTheory.UtilityGame.bestResponseWalk_succ {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) (t : ℕ) (seq : Fin (t + 1) → ι) :
bestResponseWalk br s (t + 1) seq = bestResponseWalk br (Function.update s (seq 0) (br (seq 0) s)) t (Fin.tail seq)
noncomputable def Cslib.GameTheory.UtilityGame.expectedWalkValue {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (G : UtilityGame ι S) (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) (t : ℕ) :

Expected social welfare after t uniformly random player best-response steps starting from s ([TW07], Section 19.4.5, p. 506).

@[simp]
theorem Cslib.GameTheory.UtilityGame.expectedWalkValue_zero {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (G : UtilityGame ι S) (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) :
theorem Cslib.GameTheory.UtilityGame.expectedWalkValue_succ {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (G : UtilityGame ι S) (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) (t : ℕ) :
G.expectedWalkValue br s (t + 1) = (↑(Fintype.card ι))⁻¹ * ∑ i : ι, G.expectedWalkValue br (Function.update s i (br i s)) t
theorem Cslib.GameTheory.UtilityGame.expectedWalkValue_one {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (G : UtilityGame ι S) (br : (i : ι) → ((j : ι) → S j) → S i) (s : (i : ι) → S i) :
G.expectedWalkValue br s 1 = (↑(Fintype.card ι))⁻¹ * ∑ i : ι, G.profileValue (Function.update s i (br i s))
theorem Cslib.GameTheory.UtilityGame.IsBasic.profileValue_le_expected_step_gain {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [Nonempty ι] (hG : G.IsBasic) (hmono : Monotone G.socialValue) {br : (i : ι) → ((j : ι) → S j) → S i} (hbr : G.IsBestResponse br) (s o : (i : ι) → S i) :

One-step expected welfare increase ([TW07], proof of Theorem 19.20, p. 506): in a monotone basic utility game with n ≥ 1 players, one uniformly random best-response move from s increases expected social welfare by at least (profileValue o - 2 * profileValue s) / n.

theorem Cslib.GameTheory.UtilityGame.IsBasic.profileValue_sub_two_mul_expectedWalkValue_le {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} (hG : G.IsBasic) (hmono : Monotone G.socialValue) {br : (i : ι) → ((j : ι) → S j) → S i} (hbr : G.IsBestResponse br) (hn2 : 2 ≤ Fintype.card ι) (s₀ o : (i : ι) → S i) (t : ℕ) :
G.profileValue o - 2 * G.expectedWalkValue br s₀ t ≤ (1 - 2 / ↑(Fintype.card ι)) ^ t * (G.profileValue o - 2 * G.profileValue s₀)

Multi-step geometric contraction ([TW07], proof of Theorem 19.20, p. 506): when n = Fintype.card ι ≥ 2, the expected welfare gap V(o) - 2 * E[V(S_t)] shrinks by at least a (1 - 2 / n) factor at every random best-response step.

theorem Cslib.GameTheory.UtilityGame.IsBasic.mul_profileValue_le_expectedWalkValue {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → DecidableEq (S i)] {G : UtilityGame ι S} [Nonempty ι] (hG : G.IsBasic) (hmono : Monotone G.socialValue) (h0 : 0 ≤ G.socialValue ∅) {br : (i : ι) → ((j : ι) → S j) → S i} (hbr : G.IsBestResponse br) {ε : ℝ} (hε : 0 < ε) {t : ℕ} (ht : ↑(Fintype.card ι) / 2 * Real.log (1 / ε) ≤ ↑t) (s₀ o : (i : ι) → S i) :
(1 / 2 - ε) * G.profileValue o ≤ G.expectedWalkValue br s₀ t

Random Best-Response Convergence Bound ([MV04]; [GMV05]; [TW07], Theorem 19.20, p. 506): in a monotone basic utility game with n ≥ 1 players and 0 ≤ socialValue ∅, starting from any profile s₀, for every ε > 0 and every horizon t : ℕ with (n / 2) * log (1 / ε) ≤ t, the expected social welfare after t uniformly random best-response moves is at least (1 / 2 - ε) times the social welfare of any profile o.

Closed-neighborhood wealth-sharing location game (Exercise 19.16) #

Closed neighborhood N[v] = {v} ∪ N(v) of vertex v in an undirected simple graph H.

noncomputable def Cslib.GameTheory.UtilityGame.neighborhoodGame (ι : Type u_1) {V : Type u_2} [Fintype ι] [Fintype V] [DecidableEq V] (H : SimpleGraph V) [DecidableRel H.Adj] :
UtilityGame ι fun (x : ι) => V

Closed-neighborhood wealth-sharing location game ([TW07], Exercise 19.16, p. 515): k players choose vertices of H; each vertex v splits one unit of wealth equally among all players located in N[v] (lost if none), and social welfare counts the vertices with at least one player in N[v].

@[simp]
theorem Cslib.GameTheory.UtilityGame.neighborhoodGame_socialValue_apply (ι : Type u_1) {V : Type u_2} [Fintype ι] [Fintype V] [DecidableEq V] (H : SimpleGraph V) [DecidableRel H.Adj] (T : Finset ((_ : ι) × V)) :
(neighborhoodGame ι H).socialValue T = ∑ _v ∈ T.biUnion fun (x : (_ : ι) × V) => closedNeighborhood H x.snd, 1
@[simp]
theorem Cslib.GameTheory.UtilityGame.neighborhoodGame_utility_apply {ι : Type u_1} {V : Type u_2} [Fintype ι] [Fintype V] [DecidableEq V] (H : SimpleGraph V) [DecidableRel H.Adj] (i : ι) (s : ι → V) :
(neighborhoodGame ι H).utility i s = ∑ v ∈ closedNeighborhood H (s i), 1 / ↑{j : ι | s j ∈ closedNeighborhood H v}.card

Social welfare in the closed-neighborhood location game is monotone ([TW07], Exercise 19.16(b)).

Exercise 19.16(b) ([TW07], p. 515): for every undirected graph H, the closed-neighborhood wealth-sharing location game is a valid utility game.

theorem Cslib.GameTheory.UtilityGame.exists_neighborhoodGame_isPureNash_mul_lt {ε : ℝ} (hε : 0 < ε) :
∃ (k : ℕ) (H : SimpleGraph (Fin (k + 2) ⊕ Fin (k + 1))) (x : DecidableRel H.Adj) (s : Fin (k + 2) → Fin (k + 2) ⊕ Fin (k + 1)) (o : Fin (k + 2) → Fin (k + 2) ⊕ Fin (k + 1)), (neighborhoodGame (Fin (k + 2)) H).toCostGame.IsPureNash s ∧ 0 < (neighborhoodGame (Fin (k + 2)) H).profileValue s ∧ (2 - ε) * (neighborhoodGame (Fin (k + 2)) H).profileValue s < (neighborhoodGame (Fin (k + 2)) H).profileValue o

Exercise 19.16(a) ([TW07], p. 515): the price of anarchy of the closed-neighborhood wealth-sharing location game can be arbitrarily close to 2 (for every ε > 0, there is a finite simple graph H and nonempty player set ι admitting a pure Nash equilibrium s with positive social welfare and an alternative profile o satisfying (2 - ε) * profileValue s < profileValue o).