Documentation

EconCSLib.GameTheory.StrategicGame.ZeroSum.MatrixGameNash

EconCSLib.GameTheory.StrategicGame.ZeroSum.MatrixGameNash #

Existence of a mixed Nash equilibrium for a finite matrix game.

Main statements #

The intermediate IsMixedNashEq defined here is on the matrix game itself (not on the strategic-game embedding) because it is exactly the textbook statement of "matrix game has a value" and is easier to reason about than the dependently-typed Fin 2-indexed strategic game.

References #

Saddle-point mixed Nash equilibrium #

def MatrixGame.IsMixedNashEq {I J : Type u} [Fintype I] [Fintype J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :

Saddle-point form of a mixed Nash equilibrium for a matrix game.

For zero-sum two-player games, the standard mixed-strategy Nash equilibrium is exactly the saddle point of the bilinear payoff: the row player cannot improve by deviating to any mixed row, and the column player cannot improve (i.e., decrease the row player's payoff) by deviating to any mixed column.

Field-generic: the saddle-point inequalities only need a linearly ordered field, not order-completeness.

Equations
Instances For
    @[reducible, inline]
    abbrev MatrixGame.IsSaddlePoint {I J : Type u} [Fintype I] [Fintype J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :

    A pair of mixed strategies is a saddle point when player I's payoff is maximised by the row strategy against the column strategy and minimised by the column strategy against the row strategy. For a matrix game this is synonymous with the mixed Nash equilibrium predicate [MatrixGame.IsMixedNashEq].

    Equations
    Instances For
      theorem MatrixGame.isMixedNashEq_iff_isSaddlePoint {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :

      Nash equilibrium ↔ saddle point for matrix games. Both sides unfold to the same saddle-point inequality system; the equivalence is therefore definitional.

      noncomputable def MatrixGame.value {I J : Type u} [Fintype I] [Fintype J] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
      π•œ

      The value of a matrix game (sSup-based; needs order completeness).

      Equal to both maximin and minimax by the minimax theorem ([MatrixGame.minimax_theorem]); the maximin = minimax equality is the ℝ-bound piece (Loomis). Field-generic existence of a value (without sSup) is the IsValue predicate in Minimax.lean.

      Equations
      Instances For
        theorem MatrixGame.value_eq_maximin {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
        noncomputable def MatrixGame.dualityGap {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :
        π•œ

        Point-wise duality gap at a strategy pair: the column player's realised loss-cap minus the row player's realised guarantee. Always nonnegative, zero exactly at optimal pairs.

        Field-generic: just the difference of two L2 guarantees, no sup/inf.

        Equations
        Instances For
          def MatrixGame.optimalRowStrategies {I J : Type u} [Fintype I] [Fintype J] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
          Set ↑(stdSimplex π•œ I)

          The set of optimal row strategies: mixed strategies that achieve the maximin value.

          Equations
          Instances For
            def MatrixGame.optimalColumnStrategies {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
            Set ↑(stdSimplex π•œ J)

            The set of optimal column strategies: mixed strategies that achieve the minimax value.

            Equations
            Instances For
              def MatrixGame.IsEpsilonOptimalRow {I J : Type u} [Fintype I] [Fintype J] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (Ξ΅ : π•œ) (xx : ↑(stdSimplex π•œ I)) :

              An Ξ΅-optimal row strategy guarantees at least value - Ξ΅.

              Equations
              Instances For
                def MatrixGame.IsEpsilonOptimalColumn {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [ConditionallyCompleteLinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (Ξ΅ : π•œ) (yy : ↑(stdSimplex π•œ J)) :

                An Ξ΅-optimal column strategy caps player I's payoff at value + Ξ΅.

                Equations
                Instances For
                  def MatrixGame.IsPlayerIGuarantee {I J : Type u} [Fintype I] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (w : π•œ) :

                  w is a guarantee for player I when some mixed row strategy achieves expected payoff β‰₯ w against every pure column. Equivalent to w ≀ A.maximin.

                  Equations
                  Instances For
                    def MatrixGame.IsPlayerIIGuarantee {I J : Type u} [Fintype J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (w : π•œ) :

                    w is a guarantee for player II when some mixed column strategy caps expected payoff ≀ w against every pure row. Equivalent to A.minimax ≀ w.

                    Equations
                    Instances For
                      noncomputable def MatrixGame.support {I : Type u} [Fintype I] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] [DecidableEq I] (xx : ↑(stdSimplex π•œ I)) :

                      Support of a mixed strategy: the indices with positive probability.

                      Equations
                      Instances For

                        Optimal pairs ↔ saddle points #

                        theorem MatrixGame.mem_optimalRowStrategies_iff_E_ge {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] (A : MatrixGame I J ℝ) (xx : ↑(stdSimplex ℝ I)) :
                        xx ∈ A.optimalRowStrategies ↔ βˆ€ (y' : ↑(stdSimplex ℝ J)), A.value ≀ A.E xx y'

                        A row strategy is optimal iff against every mixed column it secures the value.

                        theorem MatrixGame.mem_optimalColumnStrategies_iff_E_le {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] (A : MatrixGame I J ℝ) (yy : ↑(stdSimplex ℝ J)) :
                        yy ∈ A.optimalColumnStrategies ↔ βˆ€ (x' : ↑(stdSimplex ℝ I)), A.E x' yy ≀ A.value

                        A column strategy is optimal iff against every mixed row it caps payoff at the value.

                        theorem MatrixGame.support_complementarity_row {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] (A : MatrixGame I J ℝ) [DecidableEq I] (xx : ↑(stdSimplex ℝ I)) (yy : ↑(stdSimplex ℝ J)) (hxx : xx ∈ A.optimalRowStrategies) (hyy : yy ∈ A.optimalColumnStrategies) {i : I} (hi : 0 < ↑xx i) :
                        A.Ei i yy = A.value

                        Support complementarity (row). For an optimal pair (xx, yy), every row i with positive probability under xx is a best response to yy, i.e., A.Ei i yy = A.value.

                        theorem MatrixGame.support_complementarity_column {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] (A : MatrixGame I J ℝ) [DecidableEq J] (xx : ↑(stdSimplex ℝ I)) (yy : ↑(stdSimplex ℝ J)) (hxx : xx ∈ A.optimalRowStrategies) (hyy : yy ∈ A.optimalColumnStrategies) {j : J} (hj : 0 < ↑yy j) :
                        A.Ej xx j = A.value

                        Support complementarity (column). For an optimal pair (xx, yy), every column j with positive probability under yy is a best response to xx, i.e., A.Ej xx j = A.value.

                        Common guarantee gives the value. If both players guarantee the same scalar w, then w equals the game value.

                        Optimal pairs ↔ saddle points. A pair of mixed strategies is in the product X(A) Γ— Y(A) of optimal strategy sets iff it is a saddle point.

                        Existence #

                        theorem MatrixGame.isMixedNashEq_of_pure {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) {xx : ↑(stdSimplex π•œ I)} {yy : ↑(stdSimplex π•œ J)} {v : π•œ} (Hxx : βˆ€ (j : J), v ≀ wsum xx fun (i : I) => A.g i j) (Hyy : βˆ€ (i : I), wsum yy (A.g i) ≀ v) :

                        Pure-strategy guarantees give a mixed Nash equilibrium. If xx guarantees value v against every pure column and yy caps the row player's payoff at v against every pure row, then (xx, yy) is a saddle-point mixed Nash equilibrium. Field-generic β€” only the saddle inequalities are used (no order-completeness).

                        theorem MatrixGame.exists_mixed_nash_equilibrium {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
                        βˆƒ (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)), A.IsMixedNashEq xx yy

                        Matrix games have a mixed Nash equilibrium β€” over any linearly ordered field. Packages the field-generic saddle Minimax.minimax (proved by von Neumann symmetrisation; no compactness, no order-completeness) into the IsMixedNashEq saddle-point form. The ℝ case is the π•œ := ℝ instance, so all ℝ consumers are unaffected.

                        Strategic-game embedding #

                        A matrix game A : I β†’ J β†’ π•œ lifts to a two-player zero-sum strategic game with players Fin 2, strategy spaces I and J, and payoffs A (for the row player) and βˆ’A (for the column player). Polymorphic in the scalar field π•œ. The standard [StrategicGame.IsMixedNashEq] then unfolds β€” modulo a 2-player profile expansion β€” to the saddle-point form MatrixGame.IsMixedNashEq above.

                        noncomputable def MatrixGame.toStrategicGame {I J : Type u} {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :
                        StrategicGame (Fin 2) π•œ

                        The two-player zero-sum strategic game associated with a matrix game.

                        See MatrixGame.toStrategicGame_isZeroSum for the proof that this game satisfies the abstract StrategicGame.IsZeroSum predicate, so results stated against IsZeroSum (e.g. IsZeroSum.nash_payoff_eq) can be invoked on A.toStrategicGame without re-unfolding the definition.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem MatrixGame.toStrategicGame_isZeroSum {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) :

                          A.toStrategicGame satisfies the abstract zero-sum predicate: by construction player 1's payoff is the negation of player 0's.

                          toStrategicGame instance synthesis #

                          @[implicit_reducible]
                          instance MatrixGame.instDecidableEqStrategyFinOfNatNatToStrategicGame {I J : Type u} {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) [DecidableEq I] [DecidableEq J] (i : Fin 2) :
                          Equations
                          @[implicit_reducible]
                          instance MatrixGame.instFintypeStrategyFinOfNatNatToStrategicGame {I J : Type u} [Fintype I] [Fintype J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (i : Fin 2) :
                          Equations
                          instance MatrixGame.instNonemptyStrategyFinOfNatNatToStrategicGame {I J : Type u} [Nonempty I] [Nonempty J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (i : Fin 2) :
                          noncomputable def MatrixGame.toMixedProfile {I J : Type u} [Fintype I] [Fintype J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :

                          Build a MixedProfile of toStrategicGame from a saddle-point pair.

                          Equations
                          Instances For
                            @[simp]
                            theorem MatrixGame.toMixedProfile_zero {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] [DecidableEq I] [DecidableEq J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :
                            A.toMixedProfile xx yy 0 = xx
                            @[simp]
                            theorem MatrixGame.toMixedProfile_one {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] [DecidableEq I] [DecidableEq J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (xx : ↑(stdSimplex π•œ I)) (yy : ↑(stdSimplex π•œ J)) :
                            A.toMixedProfile xx yy 1 = yy

                            Profile expansion for Fin 2 #

                            Player-0's strategic-game expected payoff on toStrategicGame reduces to A.E, and player-1's to -A.E. This is the technical core of the bridge from saddle-point Nash to StrategicGame.IsMixedNashEq.

                            theorem MatrixGame.expectedPayoff_toStrategicGame_zero {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] [DecidableEq I] [DecidableEq J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (p : A.toStrategicGame.MixedProfile) :
                            A.toStrategicGame.expectedPayoff p 0 = A.E (p 0) (p 1)

                            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_one {I J : Type u} [Fintype I] [Fintype J] [Nonempty I] [Nonempty J] [DecidableEq I] [DecidableEq J] {π•œ : Type} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] (A : MatrixGame I J π•œ) (p : A.toStrategicGame.MixedProfile) :
                            A.toStrategicGame.expectedPayoff p 1 = -A.E (p 0) (p 1)

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

                            Main theorem: mixed Nash equilibrium of the embedded strategic game #

                            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.