isNashEq
defimported Lean
Executable Nash equilibrium checker. Returns true iff σ is a pure Nash equilibrium of G.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {N U : Type*} [DecidableEq N] [Preorder U] [DecidableRel (· ≤ · : U → U → Prop)] in open EconCSLib.StrategicGame in def isNashEq [Fintype N] (G : EconCSLib.StrategicGame N U) [∀ i, Fintype (G.strategy i)] (σ : G.Profile) : Bool
- Defined in
- EconCSLib, `isNashEq`
- 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.isNashEq← isNashEq (EconCSLib/GameTheory/StrategicGame/Checker.lean:25): adapted
What was changed in
isNashEq--- EconCSLib/GameTheory/StrategicGame/Checker.lean:25 (isNashEq) +++ as compiled here @@ -1,5 +1,7 @@ -/-- Executable Nash equilibrium checker. - Returns `true` iff `σ` is a pure Nash equilibrium of `G`. -/ -def isNashEq [Fintype N] (G : StrategicGame N U) [∀ i, Fintype (G.strategy i)] +set_option autoImplicit true in +set_option relaxedAutoImplicit true in +variable {N U : Type*} [DecidableEq N] [Preorder U] [DecidableRel (· ≤ · : U → U → Prop)] in +open EconCSLib.StrategicGame in +def isNashEq [Fintype N] (G : EconCSLib.StrategicGame N U) [∀ i, Fintype (G.strategy i)] (σ : G.Profile) : Bool := - decide (∀ i : N, ∀ s' : G.strategy i, G.payoff (deviate σ i s') i ≤ G.payoff σ i) + decide (∀ i : N, ∀ s' : G.strategy i, G.payoff (EconCSLib.StrategicGame.deviate σ i s') i ≤ G.payoff σ i) - Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 6
- EconCSLib.StrategicGameA strategic game (normal-form game) with players
Nand utilities inU. The structure records only the bare data: strategy spaces and a… - EconCSLib.StrategicGame.ProfileThe type of strategy profiles for game
G: each player picks a strategy. This is a dependent function∀ i, G.strategy i. The profile… - EconCSLib.StrategicGame.deviateUnilateral deviation in a game-bound profile: player
iswitches tos', while all other players keep their current strategies. - EconCSLib.StrategicGame.Profile.deviate_selfDeviating to the same strategy is the identity.
- EconCSLib.StrategicGame.Profile.deviate_sameAt the deviated player, the updated profile returns the new strategy.
- EconCSLib.StrategicGame.Profile.deviate_of_neAt every other player, the updated profile is unchanged.
- EconCSLib.StrategicGameA strategic game (normal-form game) with players
- Used by 1
- isNashEq_iffT6: The checker correctly decides Nash equilibrium (soundness and completeness).
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {N U : Type*} [DecidableEq N] [Preorder U] [DecidableRel (· ≤ · : U → U → Prop)] in open EconCSLib.StrategicGame in /-- Executable Nash equilibrium checker. Returns `true` iff `σ` is a pure Nash equilibrium of `G`. -/ def isNashEq [Fintype N] (G : EconCSLib.StrategicGame N U) [∀ i, Fintype (G.strategy i)] (σ : G.Profile) : Bool := decide (∀ i : N, ∀ s' : G.strategy i, G.payoff (EconCSLib.StrategicGame.deviate σ i s') i ≤ G.payoff σ i)