AFTD Auto-Formalizing Theoretical Domains

MatrixGame.expectedPayoff_toStrategicGame_one

theoremverifiedformalizationimported Lean

Mirror: expectedPayoff A.toStrategicGame p 1 = -(A.E (p 0) (p 1)).

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true 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.expectedPayoff_toStrategicGame_one {π•œ : Type}
    [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ]
    (A : MatrixGame I J π•œ) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :
    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 1
      = -(A.E (p 0) (p 1))
Formalizes
EconCSLib, `MatrixGame.expectedPayoff_toStrategicGame_one`
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.expectedPayoff_toStrategicGame_one
--- EconCSLib/GameTheory/StrategicGame/ZeroSum/MatrixGameNash.lean:585 (MatrixGame.expectedPayoff_toStrategicGame_one)
+++ as compiled here
@@ -1,10 +1,17 @@
-/-- Mirror: `expectedPayoff A.toStrategicGame p 1 = -(A.E (p 0) (p 1))`. -/
-theorem expectedPayoff_toStrategicGame_one {π•œ : Type}
+set_option autoImplicit true in
+set_option relaxedAutoImplicit true 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.expectedPayoff_toStrategicGame_one {π•œ : Type}
     [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ]
-    (A : MatrixGame I J π•œ) (p : StrategicGame.MixedProfile A.toStrategicGame) :
-    StrategicGame.expectedPayoff A.toStrategicGame p 1
+    (A : MatrixGame I J π•œ) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :
+    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 1
       = -(A.E (p 0) (p 1)) := by
   let double : π•œ := βˆ‘ i : I, βˆ‘ j : J, (p 0).val i * (p 1).val j * A.g i j
-  have hLHS : StrategicGame.expectedPayoff A.toStrategicGame p 1 = -double := by
-    unfold StrategicGame.expectedPayoff
+  have hLHS : EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 1 = -double := by
+    unfold EconCSLib.StrategicGame.expectedPayoff
     rw [show
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 13
Used by 1

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true 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/-- Mirror: `expectedPayoff A.toStrategicGame p 1 = -(A.E (p 0) (p 1))`. -/theorem MatrixGame.expectedPayoff_toStrategicGame_one {π•œ : Type}    [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ]    (A : MatrixGame I J π•œ) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 1      = -(A.E (p 0) (p 1)) := by  let double : π•œ := βˆ‘ i : I, βˆ‘ j : J, (p 0).val i * (p 1).val j * A.g i j  have hLHS : EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 1 = -double := by    unfold EconCSLib.StrategicGame.expectedPayoff    rw [show          (βˆ‘ Οƒ : (βˆ€ i : Fin 2, A.toStrategicGame.strategy i),              (∏ i : Fin 2, (p i).val (Οƒ i)) * A.toStrategicGame.payoff Οƒ 1)          = βˆ‘ ij : I Γ— J, -((p 0).val ij.1 * (p 1).val ij.2 * A.g ij.1 ij.2)        from ?_]    Β· rw [Finset.sum_neg_distrib, Fintype.sum_prod_type]    Β· apply Fintype.sum_equiv (piFinTwoEquiv A.toStrategicGame.strategy)      intro Οƒ      rw [Fin.prod_univ_two]      -- Unfold `payoff Οƒ 1 = -(A.g (Οƒ 0) (Οƒ 1))` and use ring.      show ((p 0).val (Οƒ 0) * (p 1).val (Οƒ 1)) * (-(A.g (Οƒ 0) (Οƒ 1)))         = -((p 0).val (Οƒ 0) * (p 1).val (Οƒ 1) * A.g (Οƒ 0) (Οƒ 1))      ring  have hRHS : A.E (p 0) (p 1) = double := by    change (βˆ‘ i, (p 0).val i * (βˆ‘ j, (p 1).val j * A.g i j)) = double    apply Finset.sum_congr rfl; intro i _    rw [Finset.mul_sum]    apply Finset.sum_congr rfl; intro j _    ring  rw [hLHS, hRHS]
See it in the graphDiscuss this resultChallenge it