AFTD Auto-Formalizing Theoretical Domains

MatrixGame.exists_strategic_game_nash_equilibrium

theoremverifiedformalizationimported Lean

The strategic-game embedding of a finite matrix game admits a mixed Nash equilibrium. Combines MatrixGame.exists_mixed_nash_equilibrium with the profile-expansion bridge lemmas above.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open MatrixGame in
open Finset BigOperators in
set_option linter.unusedSectionVars false in
universe u in
variable {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] in
variable (A : MatrixGame I J ℝ) in
variable [DecidableEq I] [DecidableEq J] in
theorem MatrixGame.exists_strategic_game_nash_equilibrium :
    ∃ p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame,
      EconCSLib.StrategicGame.IsMixedNashEq A.toStrategicGame p
Formalizes
EconCSLib, `MatrixGame.exists_strategic_game_nash_equilibrium`
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 MatrixGame.exists_strategic_game_nash_equilibrium
--- EconCSLib/GameTheory/StrategicGame/ZeroSum/MatrixGameNash.lean:619 (MatrixGame.exists_strategic_game_nash_equilibrium)
+++ as compiled here
@@ -1,7 +1,13 @@
-/-- **The strategic-game embedding of a finite matrix game admits a mixed Nash
-    equilibrium.** Combines `MatrixGame.exists_mixed_nash_equilibrium` with the
-    profile-expansion bridge lemmas above. -/
-theorem exists_strategic_game_nash_equilibrium :
-    ∃ p : StrategicGame.MixedProfile A.toStrategicGame,
-      StrategicGame.IsMixedNashEq A.toStrategicGame p := by
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true in
+open MatrixGame in
+open Finset BigOperators in
+set_option linter.unusedSectionVars false in
+universe u in
+variable {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] in
+variable (A : MatrixGame I J ℝ) in
+variable [DecidableEq I] [DecidableEq J] in
+theorem MatrixGame.exists_strategic_game_nash_equilibrium :
+    ∃ p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame,
+      EconCSLib.StrategicGame.IsMixedNashEq A.toStrategicGame p := by
   classical
@@ -19,24 +25,36 @@
     rw [expectedPayoff_toStrategicGame_zero, expectedPayoff_toStrategicGame_zero]
-    have hdev0 : (StrategicGame.deviateMixed A.toStrategicGame
+    have hdev0 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame
                     (A.toMixedProfile xx yy) 0 s') 0
-                = StrategicGame.pureToMixed s' := by
-      simp [StrategicGame.deviateMixed, Function.update]
-    have hdev1 : (StrategicGame.deviateMixed A.toStrategicGame
+                = EconCSLib.StrategicGame.pureToMixed s' := by
+      simp only [EconCSLib.StrategicGame.deviateMixed]
+      first
+        | exact Function.update_self ..
+        | exact Function.update_of_ne (by decide) _ _
+    have hdev1 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame
                     (A.toMixedProfile xx yy) 0 s') 1
                 = yy := by
-      simp [StrategicGame.deviateMixed, Function.update]
+      simp only [EconCSLib.StrategicGame.deviateMixed]
+      first
+        | exact Function.update_self ..
+        | exact Function.update_of_ne (by decide) _ _
     rw [hdev0, hdev1, toMixedProfile_zero, toMixedProfile_one]
-    exact hxx (StrategicGame.pureToMixed s')
+    exact hxx (EconCSLib.StrategicGame.pureToMixed s')
   · -- Player 1 (column): deviating to pure s' ∈ J cannot improve player 1's payoff.
     rw [expectedPayoff_toStrategicGame_one, expectedPayoff_toStrategicGame_one]
-    have hdev0 : (StrategicGame.deviateMixed A.toStrategicGame
+    have hdev0 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame
                     (A.toMixedProfile xx yy) 1 s') 0
                 = xx := by
-      simp [StrategicGame.deviateMixed, Function.update]
-    have hdev1 : (StrategicGame.deviateMixed A.toStrategicGame
+      simp only [EconCSLib.StrategicGame.deviateMixed]
+      first
+        | exact Function.update_self ..
+        | exact Function.update_of_ne (by decide) _ _
+    have hdev1 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame
                     (A.toMixedProfile xx yy) 1 s') 1
-                = StrategicGame.pureToMixed s' := by
-      simp [StrategicGame.deviateMixed, Function.update]
+                = EconCSLib.StrategicGame.pureToMixed s' := by
+      simp only [EconCSLib.StrategicGame.deviateMixed]
+      first
+        | exact Function.update_self ..
+        | exact Function.update_of_ne (by decide) _ _
     rw [hdev0, hdev1, toMixedProfile_zero, toMixedProfile_one]
-    have h := hyy (StrategicGame.pureToMixed s')
+    have h := hyy (EconCSLib.StrategicGame.pureToMixed s')
     linarith
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 25

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen MatrixGame inopen Finset BigOperators inset_option linter.unusedSectionVars false inuniverse u invariable {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] invariable (A : MatrixGame I J ℝ) invariable [DecidableEq I] [DecidableEq J] in/-- **The strategic-game embedding of a finite matrix game admits a mixed Nash equilibrium.** Combines `MatrixGame.exists_mixed_nash_equilibrium` with the profile-expansion bridge lemmas above. -/theorem MatrixGame.exists_strategic_game_nash_equilibrium :    ∃ p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame,      EconCSLib.StrategicGame.IsMixedNashEq A.toStrategicGame p := by  classical  obtain ⟨xx, yy, hxx, hyy⟩ := A.exists_mixed_nash_equilibrium  refine ⟨A.toMixedProfile xx yy, ?_⟩  intro who s'  -- Manually split on who ∈ {0, 1} so the substitution makes `who` literally 0 or 1.  have hcases : who = 0 ∨ who = 1 := by    rcases who with ⟨_ | _ | n, hn⟩    · left; rfl    · right; rfl    · omega  rcases hcases with rfl | rfl  · -- Player 0 (row): deviating to pure s' ∈ I cannot improve.    rw [expectedPayoff_toStrategicGame_zero, expectedPayoff_toStrategicGame_zero]    have hdev0 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame                    (A.toMixedProfile xx yy) 0 s') 0                = EconCSLib.StrategicGame.pureToMixed s' := by      simp only [EconCSLib.StrategicGame.deviateMixed]      first        | exact Function.update_self ..        | exact Function.update_of_ne (by decide) _ _    have hdev1 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame                    (A.toMixedProfile xx yy) 0 s') 1                = yy := by      simp only [EconCSLib.StrategicGame.deviateMixed]      first        | exact Function.update_self ..        | exact Function.update_of_ne (by decide) _ _    rw [hdev0, hdev1, toMixedProfile_zero, toMixedProfile_one]    exact hxx (EconCSLib.StrategicGame.pureToMixed s')  · -- Player 1 (column): deviating to pure s' ∈ J cannot improve player 1's payoff.    rw [expectedPayoff_toStrategicGame_one, expectedPayoff_toStrategicGame_one]    have hdev0 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame                    (A.toMixedProfile xx yy) 1 s') 0                = xx := by      simp only [EconCSLib.StrategicGame.deviateMixed]      first        | exact Function.update_self ..        | exact Function.update_of_ne (by decide) _ _    have hdev1 : (EconCSLib.StrategicGame.deviateMixed A.toStrategicGame                    (A.toMixedProfile xx yy) 1 s') 1                = EconCSLib.StrategicGame.pureToMixed s' := by      simp only [EconCSLib.StrategicGame.deviateMixed]      first        | exact Function.update_self ..        | exact Function.update_of_ne (by decide) _ _    rw [hdev0, hdev1, toMixedProfile_zero, toMixedProfile_one]    have h := hyy (EconCSLib.StrategicGame.pureToMixed s')    linarith
See it in the graphDiscuss this resultChallenge it