AFTD Auto-Formalizing Theoretical Domains

IsBestResponse

defimported Lean

Player i is playing a best response to profile σ in game G if no unilateral deviation to any strategy s' yields a higher payoff.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {N U : Type*} [DecidableEq N] [Preorder U] in
open EconCSLib.StrategicGame in
def IsBestResponse (G : EconCSLib.StrategicGame N U) (σ : G.Profile) (i : N) : Prop
Defined in
EconCSLib, `IsBestResponse`
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.
What was changed in IsBestResponse
--- EconCSLib/GameTheory/StrategicGame/BestResponse.lean:24 (IsBestResponse)
+++ as compiled here
@@ -1,4 +1,6 @@
-/-- Player `i` is playing a best response to profile `σ` in game `G` if no unilateral
-    deviation to any strategy `s'` yields a higher payoff. -/
-def IsBestResponse (G : StrategicGame N U) (σ : G.Profile) (i : N) : Prop :=
-  ∀ s' : G.strategy i, G.payoff (deviate σ i s') i ≤ G.payoff σ i
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+variable {N U : Type*} [DecidableEq N] [Preorder U] in
+open EconCSLib.StrategicGame in
+def IsBestResponse (G : EconCSLib.StrategicGame N U) (σ : G.Profile) (i : N) : Prop :=
+  ∀ 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
Used by 4
  • IsWeaklyDominant.isBestResponseT2: A weakly dominant strategy is a best response to any profile where player i plays it.
  • IsBestResponse.congr_payoffT1: Best response depends only on player i's payoff column.
  • isNashEq_iffT6: The checker correctly decides Nash equilibrium (soundness and completeness).
  • IsNashEquilibriumA profile σ is a pure Nash equilibrium of game G if every player is playing a best response: no player can profitably deviate.

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {N U : Type*} [DecidableEq N] [Preorder U] in
open EconCSLib.StrategicGame in
/-- Player `i` is playing a best response to profile `σ` in game `G` if no unilateral deviation to any strategy `s'` yields a higher payoff. -/
def IsBestResponse (G : EconCSLib.StrategicGame N U) (σ : G.Profile) (i : N) : Prop :=
  ∀ s' : G.strategy i, G.payoff (EconCSLib.StrategicGame.deviate σ i s') i ≤ G.payoff σ i
See it in the graphDiscuss this resultChallenge it