Documentation

CslibFrontier.GameTheory.Bayesian.Basic

Finite Bayesian games, Bayesian Nash equilibria, and k-resilience #

This module formalizes finite games with incomplete information (Bayesian games) following [TV07a], Section 1.6 (pp. 18–19), and [DR07], Sections 8.2 and 8.4.1 (pp. 187–188, 191–192), extending Cslib.GameTheory.BayesianGame (CslibFrontier.GameTheory.Mechanism.Indirect, which models independent priors and private-value utilities) to:

Main definitions #

Main results #

References #

Core definitions: Bayesian games and action-profile kernels #

structure Cslib.GameTheory.Bayesian.Game (ι : Type u_1) (T : ι → Type u_2) (S : ι → Type u_3) :
Type (max (max u_1 u_2) u_3)

A finite game with incomplete information (Bayesian game) ([TV07a], Section 1.6, pp. 18–19; [DR07], Section 8.2, pp. 187–188):

  • prior is a publicly known joint distribution on the type profiles ∀ i, T i (not restricted to independent product distributions);
  • payoff i t s is player i's real-valued utility at full type profile t and action profile s.
  • prior : PMF ((i : ι) → T i)

    Joint prior distribution over players' private type profiles.

  • payoff : ι → ((j : ι) → T j) → ((j : ι) → S j) → ℝ

    Real-valued utility of player i given the full type profile t and action profile s.

noncomputable def Cslib.GameTheory.Bayesian.Game.ofPayoffGame {ι : Type u_1} {S : ι → Type u_2} (G : PayoffGame ι S) :
Game ι (fun (x : ι) => Unit) S

Embed a complete-information PayoffGame ι S as a Bayesian game with trivial types Unit and a point-mass prior ([DR07], Section 8.2, p. 188).

@[simp]
theorem Cslib.GameTheory.Bayesian.Game.ofPayoffGame_prior {ι : Type u_1} {S : ι → Type u_2} (G : PayoffGame ι S) :
(ofPayoffGame G).prior = PMF.pure fun (x : ι) => ()
@[simp]
theorem Cslib.GameTheory.Bayesian.Game.ofPayoffGame_payoff {ι : Type u_1} {S : ι → Type u_2} (G : PayoffGame ι S) (i : ι) (t : ι → Unit) (s : (j : ι) → S j) :
(ofPayoffGame G).payoff i t s = G.payoff i s
noncomputable def Cslib.GameTheory.Bayesian.Game.expectedPayoff {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (K : ((j : ι) → T j) → PMF ((j : ι) → S j)) (i : ι) :

Ex-ante expected payoff of player i under a type-conditioned action-profile kernel K : (∀ j, T j) → PMF (∀ j, S j): E_{t ∼ prior}[E_{s ∼ K t}[payoff i t s]].

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_eq {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (K : ((j : ι) → T j) → PMF ((j : ι) → S j)) (i : ι) :
G.expectedPayoff K i = ∑ t : (j : ι) → T j, (G.prior t).toReal * ∑ s : (j : ι) → S j, ((K t) s).toReal * G.payoff i t s
theorem Cslib.GameTheory.Bayesian.Game.ofPayoffGame_expectedPayoff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (S j)] (G : PayoffGame ι S) (K : (ι → Unit) → PMF ((j : ι) → S j)) (i : ι) :
(ofPayoffGame G).expectedPayoff K i = ∑ s : (j : ι) → S j, ((K fun (x : ι) => ()) s).toReal * G.payoff i s

Expected payoff on a complete-information game ofPayoffGame G evaluates the kernel at the unique type profile fun _ => ().

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_congr {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) {K₁ K₂ : ((j : ι) → T j) → PMF ((j : ι) → S j)} (hK : ∀ t ∈ G.prior.support, K₁ t = K₂ t) (i : ι) :
G.expectedPayoff K₁ i = G.expectedPayoff K₂ i

Expected payoff depends on the kernel K only on the support of G.prior.

theorem Cslib.GameTheory.Bayesian.Game.abs_expectedPayoff_sub_le {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (K₁ K₂ : ((j : ι) → T j) → PMF ((j : ι) → S j)) (i : ι) {B ε : ℝ} (hB : ∀ (t : (j : ι) → T j) (s : (j : ι) → S j), |G.payoff i t s| ≤ B) (hdist : ∀ t ∈ G.prior.support, dist (K₁ t) (K₂ t) ≤ ε) :
|G.expectedPayoff K₁ i - G.expectedPayoff K₂ i| ≤ 2 * B * ε

Statistical-distance stability of expected payoff: if player i's utility is bounded in absolute value by B and kernels K₁, K₂ have statistical distance at most ε on every type profile in G.prior.support, then the ex-ante expected payoffs differ by at most 2 * B * ε.

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_bind {ι : Type u_1} {α : Type u_2} {T : ι → Type u_3} {S : ι → Type u_4} [Fintype ι] [DecidableEq ι] [Fintype α] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (μ : PMF α) (K : α → ((j : ι) → T j) → PMF ((j : ι) → S j)) (i : ι) :
G.expectedPayoff (fun (t : (j : ι) → T j) => μ.bind fun (a : α) => K a t) i = ∑ a : α, (μ a).toReal * G.expectedPayoff (K a) i

Averaging a family of kernels K a over a finite distribution μ averages the expected payoff.

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_bind_le {ι : Type u_1} {α : Type u_2} {T : ι → Type u_3} {S : ι → Type u_4} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (μ : PMF α) (K : α → ((j : ι) → T j) → PMF ((j : ι) → S j)) (i : ι) {c : ℝ} (hc : ∀ (a : α), G.expectedPayoff (K a) i ≤ c) :
G.expectedPayoff (fun (t : (j : ι) → T j) => μ.bind fun (a : α) => K a t) i ≤ c

If every kernel K a achieves expected payoff at most c for player i, then any mixture fun t => μ.bind fun a => K a t over an arbitrary probability mass function μ : PMF α also achieves expected payoff at most c.

Behavioral strategies, coalition deviations, and equilibrium concepts #

noncomputable def Cslib.GameTheory.Bayesian.pureProfileToBehavioral {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} (σ : (i : ι) → T i → S i) (i : ι) :
T i → PMF (S i)

Embed a pure Bayesian strategy profile σ : ∀ i, T i → S i as a behavioral profile placing point mass on σ i (t i).

def Cslib.GameTheory.Bayesian.patchCoalition {ι : Type u_1} [DecidableEq ι] {α : ι → Type u_4} (C : Finset ι) (sC : (j : ↥C) → α ↑j) (s : (j : ι) → α j) (j : ι) :
α j

Replace coordinates in coalition C of a profile s by sC.

@[simp]
theorem Cslib.GameTheory.Bayesian.patchCoalition_mem {ι : Type u_1} [DecidableEq ι] {α : ι → Type u_4} {C : Finset ι} (sC : (j : ↥C) → α ↑j) (s : (j : ι) → α j) {j : ι} (hj : j ∈ C) :
patchCoalition C sC s j = sC ⟨j, hj⟩
@[simp]
theorem Cslib.GameTheory.Bayesian.patchCoalition_notMem {ι : Type u_1} [DecidableEq ι] {α : ι → Type u_4} {C : Finset ι} (sC : (j : ↥C) → α ↑j) (s : (j : ι) → α j) {j : ι} (hj : j ∉ C) :
patchCoalition C sC s j = s j
@[simp]
theorem Cslib.GameTheory.Bayesian.patchCoalition_self {ι : Type u_1} [DecidableEq ι] {α : ι → Type u_4} (C : Finset ι) (s : (j : ι) → α j) :
patchCoalition C (fun (j : ↥C) => s ↑j) s = s
@[simp]
theorem Cslib.GameTheory.Bayesian.patchCoalition_singleton {ι : Type u_1} [DecidableEq ι] {α : ι → Type u_4} (i : ι) (sC : (j : ↥{i}) → α ↑j) (s : (j : ι) → α j) :
noncomputable def Cslib.GameTheory.Bayesian.behavioralKernel {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] (β : (i : ι) → T i → PMF (S i)) (t : (j : ι) → T j) :
PMF ((j : ι) → S j)

The type-conditioned action-profile kernel induced by an independent behavioral strategy profile β : ∀ i, T i → PMF (S i): at type profile t, player j samples its action independently from β j (t j).

@[simp]
theorem Cslib.GameTheory.Bayesian.behavioralKernel_apply {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] (β : (i : ι) → T i → PMF (S i)) (t : (j : ι) → T j) (s : (j : ι) → S j) :
(behavioralKernel β t) s = ∏ j : ι, (β j (t j)) (s j)
theorem Cslib.GameTheory.Bayesian.behavioralKernel_pureProfile {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] (σ : (i : ι) → T i → S i) (t : (j : ι) → T j) :
behavioralKernel (pureProfileToBehavioral σ) t = PMF.pure fun (j : ι) => σ j (t j)

Pure behavioral strategies induce point-mass action profiles.

noncomputable def Cslib.GameTheory.Bayesian.coalitionKernel {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] [DecidableEq ι] (β : (i : ι) → T i → PMF (S i)) (C : Finset ι) (δC : ((j : ↥C) → T ↑j) → PMF ((j : ↥C) → S ↑j)) (t : (j : ι) → T j) :
PMF ((j : ι) → S j)

The type-conditioned action-profile kernel when coalition C pools its types t|_C and plays a correlated randomized action strategy δC, while outsiders j ∉ C play independently according to β ([DR07], Section 8.4.1, p. 192).

theorem Cslib.GameTheory.Bayesian.sum_coalitionKernel_mul {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] [DecidableEq ι] (β : (i : ι) → T i → PMF (S i)) (C : Finset ι) (δC : ((j : ↥C) → T ↑j) → PMF ((j : ↥C) → S ↑j)) (t : (j : ι) → T j) (f : ((j : ι) → S j) → ℝ) :
∑ s : (j : ι) → S j, ((coalitionKernel β C δC t) s).toReal * f s = ∑ sC : (j : ↥C) → S ↑j, ((δC fun (j : ↥C) => t ↑j) sC).toReal * ∑ s : (j : ι) → S j, ((behavioralKernel β t) s).toReal * f (patchCoalition C sC s)

Expectation under coalitionKernel separates coalition C's correlated draw from outsiders' independent draws.

theorem Cslib.GameTheory.Bayesian.coalitionKernel_singleton {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [(j : ι) → Fintype (S j)] [DecidableEq ι] (β : (i : ι) → T i → PMF (S i)) (i : ι) (βi : T i → PMF (S i)) (t : (j : ι) → T j) :
coalitionKernel β {i} (fun (tC : (j : ↥{i}) → T ↑j) => PMF.map (fun (a : S i) (j : ↥{i}) => ⋯ ▸ a) (βi (tC ⟨i, ⋯⟩))) t = behavioralKernel (Function.update β i βi) t

A singleton coalition deviation coincides with unilateral strategy replacement in behavioralKernel.

noncomputable def Cslib.GameTheory.Bayesian.Game.interimPayoff {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (β : (j : ι) → T j → PMF (S j)) (i : ι) [DecidableEq (T i)] (ti : T i) (a : S i) :

Division-free weighted interim payoff of player i at type ti when playing pure action a while the remaining players follow behavioral profile β: ∑_{t : t i = ti} prior(t) · E_{s ∼ β(t)}[payoff i t (update s i a)].

theorem Cslib.GameTheory.Bayesian.Game.interimPayoff_eq {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (β : (j : ι) → T j → PMF (S j)) (i : ι) [DecidableEq (T i)] (ti : T i) (a : S i) :
G.interimPayoff β i ti a = ∑ t : (j : ι) → T j, if t i = ti then (G.prior t).toReal * ∑ s : (j : ι) → S j, ((behavioralKernel β t) s).toReal * G.payoff i t (Function.update s i a) else 0
theorem Cslib.GameTheory.Bayesian.Game.sum_fiber_mul_sum {α : Type u_4} {β : Type u_5} {κ : Type u_6} [Fintype α] [Fintype β] [Fintype κ] [DecidableEq κ] (key : α → κ) (w : α → ℝ) (μ : κ → β → ℝ) (f : α → β → ℝ) :
∑ x : α, w x * ∑ y : β, μ (key x) y * f x y = ∑ k : κ, ∑ y : β, μ k y * ∑ x : α, if key x = k then w x * f x y else 0

Regroup a double sum ∑ x, w x * ∑ y, μ (key x) y * f x y by fibers key x = k.

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_update_eq_sum_interimPayoff {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (β : (j : ι) → T j → PMF (S j)) (i : ι) [DecidableEq (T i)] (βi : T i → PMF (S i)) :
G.expectedPayoff (behavioralKernel (Function.update β i βi)) i = ∑ ti : T i, ∑ a : S i, ((βi ti) a).toReal * G.interimPayoff β i ti a

Unilateral replacement of player i's behavioral strategy decomposes expectedPayoff as the sum over types ti : T i of the βi ti-average of interimPayoff.

theorem Cslib.GameTheory.Bayesian.Game.expectedPayoff_behavioralKernel_eq_sum_interimPayoff {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (β : (j : ι) → T j → PMF (S j)) (i : ι) [DecidableEq (T i)] :
G.expectedPayoff (behavioralKernel β) i = ∑ ti : T i, ∑ a : S i, ((β i ti) a).toReal * G.interimPayoff β i ti a

In particular, player i's honest ex-ante payoff is the sum over ti of its β i ti-average interim payoff.

def Cslib.GameTheory.Bayesian.Game.IsBayesianNash {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (β : (i : ι) → T i → PMF (S i)) :

A behavioral strategy profile β : ∀ i, T i → PMF (S i) is a Bayesian Nash equilibrium ([TV07a], Section 1.6, pp. 18–19; [DR07], Section 8.2, p. 187) if no player can strictly increase its ex-ante expected payoff by deviating unilaterally to any behavioral strategy.

theorem Cslib.GameTheory.Bayesian.Game.isBayesianNash_iff_interim {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) [(j : ι) → DecidableEq (T j)] {β : (j : ι) → T j → PMF (S j)} :
G.IsBayesianNash β ↔ ∀ (i : ι) (ti : T i) (a : S i), G.interimPayoff β i ti a ≤ ∑ b : S i, ((β i ti) b).toReal * G.interimPayoff β i ti b

Ex-ante / interim equivalence: a behavioral profile β is a Bayesian Nash equilibrium if and only if at every player i and every type ti, every pure action a yields weighted interim payoff at most player i's equilibrium interim payoff at ti.

theorem Cslib.GameTheory.Bayesian.Game.isBayesianNash_iff_pure {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) {β : (j : ι) → T j → PMF (S j)} :
G.IsBayesianNash β ↔ ∀ (i : ι) (σi : T i → S i), G.expectedPayoff (behavioralKernel (Function.update β i fun (ti : T i) => PMF.pure (σi ti))) i ≤ G.expectedPayoff (behavioralKernel β) i

Unilateral behavioral deviations gain no more than pure deviations: β is a Bayesian Nash equilibrium iff no player can strictly improve by deviating to a pure strategy σi : T i → S i.

Complete-information bridges to CostGame.IsMixedNash and PayoffGame.IsPureNash #

theorem Cslib.GameTheory.Bayesian.Game.ofPayoffGame_isBayesianNash_iff_isMixedNash {ι : Type u_1} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (S j)] (G₀ : PayoffGame ι S) (β : (i : ι) → Unit → PMF (S i)) :
(ofPayoffGame G₀).IsBayesianNash β ↔ G₀.toCostGame.IsMixedNash fun (i : ι) (a : S i) => ((β i ()) a).toReal

On a complete-information game ofPayoffGame G, behavioral Bayesian Nash equilibria coincide with mixed Nash equilibria of G.toCostGame.

theorem Cslib.GameTheory.Bayesian.Game.ofPayoffGame_isBayesianNash_pure_iff_isPureNash {ι : Type u_1} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (S j)] (G₀ : PayoffGame ι S) (s : (i : ι) → S i) :
(ofPayoffGame G₀).IsBayesianNash (pureProfileToBehavioral fun (i : ι) (x : Unit) => s i) ↔ G₀.IsPureNash s

On a complete-information game ofPayoffGame G₀, pure Bayesian Nash equilibria coincide with PayoffGame.IsPureNash.

Existence of Bayesian Nash equilibria (Harsanyi's agent-normal-form theorem) #

theorem Cslib.GameTheory.Bayesian.Game.exists_isBayesianNash {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) [∀ (j : ι), Nonempty (S j)] :
∃ (β : (i : ι) → T i → PMF (S i)), G.IsBayesianNash β

Existence of Bayesian Nash equilibria ([Har67]; [TV07a], Section 1.6): every finite Bayesian game with nonempty action sets admits a behavioral Bayesian Nash equilibrium. Proved via Harsanyi's agent-normal-form reduction to CostGame.exists_isMixedNash, treating each player-type pair ⟨i, ti⟩ : Σ j, T j as an independent agent.

k-resilient Bayesian Nash equilibria (§8.4.1, p. 192) #

def Cslib.GameTheory.Bayesian.Game.IsKResilientBayesianNash {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) (k : ℕ) (β : (i : ι) → T i → PMF (S i)) :

A behavioral profile β is a k-resilient Bayesian Nash equilibrium of G ([DR07], Section 8.4.1, p. 192) if for every coalition C of cardinality at most k, every correlated type-pooling deviation δC : (∀ j : C, T j.1) → PMF (∀ j : C, S j.1) of C, and every member i ∈ C, player i's expected payoff under δC is at most its equilibrium expected payoff.

theorem Cslib.GameTheory.Bayesian.Game.IsKResilientBayesianNash.anti {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] {G : Game ι T S} {k₁ k₂ : ℕ} {β : (i : ι) → T i → PMF (S i)} (h : G.IsKResilientBayesianNash k₂ β) (hk : k₁ ≤ k₂) :

k-resilient Bayesian Nash equilibrium is antitone in the coalition bound k.

theorem Cslib.GameTheory.Bayesian.Game.isKResilientBayesianNash_one_iff {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) {β : (i : ι) → T i → PMF (S i)} :

1-resilient Bayesian Nash equilibrium coincides with IsBayesianNash.

theorem Cslib.GameTheory.Bayesian.Game.isKResilientBayesianNash_iff_pure {ι : Type u_1} {T : ι → Type u_2} {S : ι → Type u_3} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (T j)] [(j : ι) → Fintype (S j)] (G : Game ι T S) {k : ℕ} {β : (i : ι) → T i → PMF (S i)} :
G.IsKResilientBayesianNash k β ↔ ∀ (C : Finset ι), C.card ≤ k → ∀ (dC : ((j : ↥C) → T ↑j) → (j : ↥C) → S ↑j), ∀ i ∈ C, G.expectedPayoff (coalitionKernel β C fun (tC : (j : ↥C) → T ↑j) => PMF.pure (dC tC)) i ≤ G.expectedPayoff (behavioralKernel β) i

Linearity of coalition deviations: a behavioral profile β is a k-resilient Bayesian Nash equilibrium iff no coalition of size at most k can strictly improve any member via a deterministic pooled-type deviation dC : (∀ j : C, T j.1) → (∀ j : C, S j.1).