AFTD Auto-Formalizing Theoretical Domains

CoalitionalGame.shapleyValue

defimported Lean

The Shapley value of player i. [MSZ 18.14, 18.17] φᵢ(v) = ∑_{S ⊆ N{i}} |S|!(|N|-|S|-1)!/|N|! · (v(S∪{i}) - v(S))

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators in
variable {N : Type*} [DecidableEq N] [Fintype N] in
variable (G : CoalitionalGame N ℝ) in
noncomputable def CoalitionalGame.shapleyValue (i : N) : ℝ
Defined in
EconCSLib, `CoalitionalGame.shapleyValue`
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.
Verified
08 Oct 2026
Axioms
none listed
Built on 2
  • CoalitionalGame.marginalContribThe marginal contribution of player i to coalition S (where i ∉ S).
  • CoalitionalGameA coalitional game with transferable utility. N is the player type; U is the utility type. v assigns a worth to each coalition, with…

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators in
variable {N : Type*} [DecidableEq N] [Fintype N] in
variable (G : CoalitionalGame N ℝ) in
/-- The Shapley value of player `i`. [MSZ 18.14, 18.17] `φᵢ(v) = ∑_{S ⊆ N\{i}} |S|!(|N|-|S|-1)!/|N|! · (v(S∪{i}) - v(S))` -/
noncomputable def CoalitionalGame.shapleyValue (i : N) : ℝ :=
  ∑ S ∈ Finset.univ.filter (i ∉ ·),
    (Nat.factorial S.card * Nat.factorial (Fintype.card N - S.card - 1) : ℝ)
      / Nat.factorial (Fintype.card N)
      * G.marginalContrib i S
See it in the graphDiscuss this resultChallenge it