Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Zero-sum games: optimal strategies form a Nash equilibrium

Proved
AGT.zero_sum_minimax

by Shuze Chen · Aug 27, 2026 · Mathlib c5ea003 (Lean v4.30.0)

algorithmic-game-theorygame-theorynash-equilibrium

Every finite two-person zero-sum game has optimal mixed strategies, and they form a Nash equilibrium of the game. Let AAA be a real (m+1)×(n+1)(m{+}1) \times (n{+}1)(m+1)×(n+1) payoff matrix: the row player picks a probability vector ppp over rows, the column player a probability vector qqq over columns, and the column player pays the row player pTAqp^{\mathsf T} A qpTAq in expectation. Then there exist probability vectors p∗,q∗p^\ast, q^\astp∗,q∗ such that

  1. for every probability vector ppp over rows,   pTAq∗≤(p∗)TAq∗\;p^{\mathsf T} A q^\ast \le (p^\ast)^{\mathsf T} A q^\astpTAq∗≤(p∗)TAq∗ — against q∗q^\astq∗, the row player cannot do better than p∗p^\astp∗;
  2. for every probability vector qqq over columns,   (p∗)TAq∗≤(p∗)TAq\;(p^\ast)^{\mathsf T} A q^\ast \le (p^\ast)^{\mathsf T} A q(p∗)TAq∗≤(p∗)TAq — against p∗p^\astp∗, the column player cannot pay less than under q∗q^\astq∗;
  3. the pair (p∗,q∗)(p^\ast, q^\ast)(p∗,q∗) is a mixed Nash equilibrium (in the sense of the IsMixedNash predicate of this mission) of the explicit two-player game in which the row player's payoff on the pure profile (x,y)(x,y)(x,y) is AxyA_{xy}Axy​ and the column player's is −Axy-A_{xy}−Axy​ — the payoffs summing to zero is precisely the zero-sum condition, here formal rather than implicit in the shape of the statement.

Consequently the game has a value and max⁡pmin⁡qpTAq=min⁡qmax⁡ppTAq\max_p \min_q p^{\mathsf T} A q = \min_q \max_p p^{\mathsf T} A qmaxp​minq​pTAq=minq​maxp​pTAq (von Neumann, 1928). This is Theorem 1.11 of Algorithmic Game Theory, which obtains the pair as the optimal solutions of a dual pair of linear programs.

A note on the rendering. The book's statement — "optimum solutions of the linear programs give distributions that form a Nash equilibrium of the two-person zero-sum game" — is rendered without committing to an LP encoding: conclusions 1–2 are the saddle point that LP optimality amounts to, and conclusion 3 is the Nash-equilibrium clause, stated against the series' game vocabulary so that "zero-sum game" has a formal referent. The dimensions m+1m{+}1m+1, n+1n{+}1n+1 keep both strategy sets nonempty; over an empty strategy set there are no probability vectors and no equilibrium.

Preamble
import Definitions.Def_agt_games
import Mathlib.Analysis.Convex.StdSimplex
Formal statement
namespace AGT

/-- **Theorem 1.11 of *Algorithmic Game Theory***.  A finite two-person
zero-sum game, given by a payoff matrix `A` (the amount the column player
pays the row player), has optimal mixed strategies: mixed strategies `p` for
the row player and `q` for the column player forming a saddle point — `p`
maximizes the expected payment against `q`, and `q` minimizes it against
`p` — and the pair `(p, q)` is a mixed Nash equilibrium of the two-player
game in which the row player's payoff is `A x y` and the column player's is
`-A x y`.  Consequently the game has a value; the book obtains the pair as
the optimal solutions of a dual pair of linear programs.

The strategy sets are `Fin (m + 1)` and `Fin (n + 1)` so that both players
have at least one strategy; over an empty strategy set `stdSimplex` is empty
and no saddle point exists. -/
theorem zero_sum_minimax {m n : ℕ} (A : Matrix (Fin (m + 1)) (Fin (n + 1)) ℝ) :
    ∃ p ∈ stdSimplex ℝ (Fin (m + 1)), ∃ q ∈ stdSimplex ℝ (Fin (n + 1)),
      (∀ p' ∈ stdSimplex ℝ (Fin (m + 1)),
        p' ⬝ᵥ A.mulVec q ≤ p ⬝ᵥ A.mulVec q) ∧
      (∀ q' ∈ stdSimplex ℝ (Fin (n + 1)),
        p ⬝ᵥ A.mulVec q ≤ p ⬝ᵥ A.mulVec q') ∧
      IsMixedNash (zeroSumPayoff A) (matrixGameProfile p q) := by
  sorry

end AGT
Source
N. Nisan, T. Roughgarden, E. Tardos, V. V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press 2007, https://doi.org/10.1017/CBO9780511800481, Section 1.4.2, Theorem 1.11, pp. 16-18
Read-back

What the Lean code literally says, in plain math · claude-fable-5

Read-back: zero_sum_minimax

For every pair of natural numbers m,n≥0m, n \ge 0m,n≥0 (so the index sets below have sizes m+1≥1m+1 \ge 1m+1≥1 and n+1≥1n+1 \ge 1n+1≥1; the degenerate cases are 1×11\times 11×1 matrices, never empty ones) and every real matrix AAA with rows indexed by {0,…,m}\{0,\dots,m\}{0,…,m} and columns indexed by {0,…,n}\{0,\dots,n\}{0,…,n}, the theorem asserts the existence of a vector p∈Δm+1p \in \Delta_{m+1}p∈Δm+1​ and a vector q∈Δn+1q \in \Delta_{n+1}q∈Δn+1​, where

Δk  =  {x:{0,…,k−1}→R  ∣  xi≥0 for all i,  ∑ixi=1}\Delta_{k} \;=\; \Big\{ x : \{0,\dots,k-1\} \to \mathbb{R} \;\Big|\; x_i \ge 0 \text{ for all } i, \;\sum_{i} x_i = 1 \Big\}Δk​={x:{0,…,k−1}→R​xi​≥0 for all i,i∑​xi​=1}

is the standard probability simplex (this is the literal content of membership in stdSimplex ℝ (Fin k)), such that the following three statements hold. Throughout, the expression written p ⬝ᵥ A.mulVec q unfolds to the bilinear form

pTA q  =  ∑i=0mpi(∑j=0nAij qj).p^{\mathsf T} A\, q \;=\; \sum_{i=0}^{m} p_i \left( \sum_{j=0}^{n} A_{ij}\, q_j \right).pTAq=i=0∑m​pi​(j=0∑n​Aij​qj​).

First conjunct. For every p′∈Δm+1p' \in \Delta_{m+1}p′∈Δm+1​,

∑i,jpi′ Aij qj  ≤  ∑i,jpi Aij qj,\sum_{i,j} p'_i\, A_{ij}\, q_j \;\le\; \sum_{i,j} p_i\, A_{ij}\, q_j,i,j∑​pi′​Aij​qj​≤i,j∑​pi​Aij​qj​,

i.e. against this fixed qqq, no distribution over rows achieves a strictly larger value of xTAqx^{\mathsf T} A qxTAq than ppp does (a non-strict maximality of ppp).

Second conjunct. For every q′∈Δn+1q' \in \Delta_{n+1}q′∈Δn+1​,

∑i,jpi Aij qj  ≤  ∑i,jpi Aij qj′,\sum_{i,j} p_i\, A_{ij}\, q_j \;\le\; \sum_{i,j} p_i\, A_{ij}\, q'_j,i,j∑​pi​Aij​qj​≤i,j∑​pi​Aij​qj′​,

i.e. against this fixed ppp, no distribution over columns achieves a strictly smaller value of pTAyp^{\mathsf T} A ypTAy than qqq does (a non-strict minimality of qqq).

Third conjunct. The pair (p,q)(p, q)(p,q), packaged as a strategy profile, satisfies a custom mixed-Nash-equilibrium predicate for a specific two-player game, defined as follows.

The game. The set of players is the two-element type of Booleans, {true,false}\{\mathsf{true}, \mathsf{false}\}{true,false}. Player true\mathsf{true}true's pure-strategy set is {0,…,m}\{0,\dots,m\}{0,…,m} (the row indices of AAA); player false\mathsf{false}false's pure-strategy set is {0,…,n}\{0,\dots,n\}{0,…,n} (the column indices). Given a pure profile sss assigning row strue=is_{\mathsf{true}} = istrue​=i and column sfalse=js_{\mathsf{false}} = jsfalse​=j, the payoff function (zeroSumPayoff A) gives player true\mathsf{true}true the payoff AijA_{ij}Aij​ and player false\mathsf{false}false the payoff −Aij-A_{ij}−Aij​; so the two payoffs sum to zero at every pure profile, with AAA read as the payoff matrix of the row player true\mathsf{true}true.

The profile. The profile claimed to be an equilibrium (matrixGameProfile p q) assigns to player true\mathsf{true}true the weight function ppp on rows and to player false\mathsf{false}false the weight function qqq on columns — exactly the p,qp, qp,q from the existential quantifiers above.

The equilibrium predicate. IsMixedNash for this game demands the conjunction of:

  1. Each player's assigned weight function is a lottery: pi≥0p_i \ge 0pi​≥0 for all iii with ∑ipi=1\sum_i p_i = 1∑i​pi​=1, and qj≥0q_j \ge 0qj​≥0 for all jjj with ∑jqj=1\sum_j q_j = 1∑j​qj​=1. (This duplicates the simplex-membership conditions already imposed on ppp and qqq.)

  2. For each player b∈{true,false}b \in \{\mathsf{true}, \mathsf{false}\}b∈{true,false} and every lottery τ\tauτ over that player's own pure-strategy set (nonnegative weights summing to 111), the expected payoff to player bbb under the profile in which bbb's strategy is replaced by τ\tauτ (the other player's strategy left unchanged) is at most the expected payoff to bbb under the original profile. Here expected payoff to player bbb under a profile (σtrue,σfalse)(\sigma_{\mathsf{true}}, \sigma_{\mathsf{false}})(σtrue​,σfalse​) means the sum over all pure profiles (i,j)(i,j)(i,j), 0≤i≤m0 \le i \le m0≤i≤m, 0≤j≤n0 \le j \le n0≤j≤n, of the product of the profile's weights times bbb's payoff:

∑i=0m∑j=0nσtrue(i) σfalse(j) ub(i,j),\sum_{i=0}^{m} \sum_{j=0}^{n} \sigma_{\mathsf{true}}(i)\, \sigma_{\mathsf{false}}(j)\, u_b(i,j),i=0∑m​j=0∑n​σtrue​(i)σfalse​(j)ub​(i,j),

where utrue(i,j)=Aiju_{\mathsf{true}}(i,j) = A_{ij}utrue​(i,j)=Aij​ and ufalse(i,j)=−Aiju_{\mathsf{false}}(i,j) = -A_{ij}ufalse​(i,j)=−Aij​. Note that this formula is applied as written even when the deviating weight function τ\tauτ replaces one factor — the weights need not come from the equilibrium profile.

Concretely, unfolding the expected payoffs, condition 2 says: for every lottery p′p'p′ on {0,…,m}\{0,\dots,m\}{0,…,m},   p′TA q≤pTA q\;p'^{\mathsf T} A\, q \le p^{\mathsf T} A\, qp′TAq≤pTAq (no unilateral deviation improves the row player's expected payoff), and for every lottery q′q'q′ on {0,…,n}\{0,\dots,n\}{0,…,n},   − pTA q′≤− pTA q\;-\,p^{\mathsf T} A\, q' \le -\,p^{\mathsf T} A\, q−pTAq′≤−pTAq, equivalently pTA q≤pTA q′p^{\mathsf T} A\, q \le p^{\mathsf T} A\, q'pTAq≤pTAq′ (no unilateral deviation improves the column player's expected payoff, whose payoff is the negation).

All inequalities in the statement are non-strict (≤\le≤). The theorem claims existence only (∃\exists∃, not unique existence); nothing is asserted about the value pTAqp^{\mathsf T} A qpTAq itself (e.g. no minimax/maximin equality is stated explicitly), and nothing constrains AAA beyond having real entries and the stated dimensions.

Human review
  • Endorsed by Community (Bot) · Aug 27, 2026

  • Endorsed by Shuze Chen · Aug 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me