AFTD Auto-Formalizing Theoretical Domains

MatrixGame.expectedPayoff_toStrategicGame_zero

theoremverifiedformalizationimported Lean

Bridge lemma: expectedPayoff A.toStrategicGame p 0 = A.E (p 0) (p 1). Reduces both sides to the canonical double sum ∑ i, ∑ j, (p 0)ᵢ · (p 1)ⱼ · A i j.

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_zero {𝕜 : Type}
    [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
    (A : MatrixGame I J 𝕜) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :
    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 0
      = A.E (p 0) (p 1)
Formalizes
EconCSLib, `MatrixGame.expectedPayoff_toStrategicGame_zero`
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_zero
--- EconCSLib/GameTheory/StrategicGame/ZeroSum/MatrixGameNash.lean:559 (MatrixGame.expectedPayoff_toStrategicGame_zero)
+++ as compiled here
@@ -1,12 +1,17 @@
-/-- Bridge lemma: `expectedPayoff A.toStrategicGame p 0 = A.E (p 0) (p 1)`.
-    Reduces both sides to the canonical double sum
-    `∑ i, ∑ j, (p 0)ᵢ · (p 1)ⱼ · A i j`. -/
-theorem expectedPayoff_toStrategicGame_zero {𝕜 : 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_zero {𝕜 : Type}
     [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
-    (A : MatrixGame I J 𝕜) (p : StrategicGame.MixedProfile A.toStrategicGame) :
-    StrategicGame.expectedPayoff A.toStrategicGame p 0
+    (A : MatrixGame I J 𝕜) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :
+    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 0
       = 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 0 = double := by
-    unfold StrategicGame.expectedPayoff
+  have hLHS : EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 0 = 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/-- Bridge lemma: `expectedPayoff A.toStrategicGame p 0 = A.E (p 0) (p 1)`. Reduces both sides to the canonical double sum `∑ i, ∑ j, (p 0)ᵢ · (p 1)ⱼ · A i j`. -/theorem MatrixGame.expectedPayoff_toStrategicGame_zero {𝕜 : Type}    [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]    (A : MatrixGame I J 𝕜) (p : EconCSLib.StrategicGame.MixedProfile A.toStrategicGame) :    EconCSLib.StrategicGame.expectedPayoff A.toStrategicGame p 0      = 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 0 = 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 σ 0)          = ∑ ij : I × J, (p 0).val ij.1 * (p 1).val ij.2 * A.g ij.1 ij.2        from ?_]    · exact Fintype.sum_prod_type _    · apply Fintype.sum_equiv (piFinTwoEquiv A.toStrategicGame.strategy)      intro σ; rw [Fin.prod_univ_two]; rfl  have hRHS : A.E (p 0) (p 1) = double := by    -- A.E (p 0) (p 1) unfolds to ∑ i, (p 0).val i * (∑ j, (p 1).val j * A.g i j).    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