AFTD Auto-Formalizing Theoretical Domains

Minimax.minimax

theoremverifiedformalizationimported Lean

Ordered-field von Neumann minimax. Every finite two-player zero-sum game over a linearly ordered field has a value and optimal mixed strategies.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Finset BigOperators in
variable {π•œ : Type*} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] in
variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
  [Nonempty I] [Nonempty J] in
theorem Minimax.minimax (A : I β†’ J β†’ π•œ) :
    βˆƒ (x : I β†’ π•œ) (y : J β†’ π•œ) (v : π•œ),
      (βˆ€ i, 0 ≀ x i) ∧ (βˆ‘ i, x i = 1) ∧ (βˆ€ j, 0 ≀ y j) ∧ (βˆ‘ j, y j = 1) ∧
      (βˆ€ j, v ≀ βˆ‘ i, x i * A i j) ∧ (βˆ€ i, βˆ‘ j, A i j * y j ≀ v)
Formalizes
EconCSLib, `Minimax.minimax`
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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 2
  • MatrixGame.exists_mixed_nash_equilibriumMatrix games have a mixed Nash equilibrium β€” over any linearly ordered field. Packages the field-generic saddle Minimax.minimax…
  • MatrixGame.minimax_theoremVon Neumann's Minimax Theorem: For any finite matrix game, maximin = minimax. [MSZ 5.11, von Neumann 1928] Proof: the general…

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BigOperators invariable {π•œ : Type*} [Field π•œ] [LinearOrder π•œ] [IsStrictOrderedRing π•œ] invariable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]  [Nonempty I] [Nonempty J] in/-- **Ordered-field von Neumann minimax.** Every finite two-player zero-sum game over a linearly ordered field has a value and optimal mixed strategies. -/theorem Minimax.minimax (A : I β†’ J β†’ π•œ) :    βˆƒ (x : I β†’ π•œ) (y : J β†’ π•œ) (v : π•œ),      (βˆ€ i, 0 ≀ x i) ∧ (βˆ‘ i, x i = 1) ∧ (βˆ€ j, 0 ≀ y j) ∧ (βˆ‘ j, y j = 1) ∧      (βˆ€ j, v ≀ βˆ‘ i, x i * A i j) ∧ (βˆ€ i, βˆ‘ j, A i j * y j ≀ v) := by  classical  obtain ⟨i0⟩ := β€ΉNonempty Iβ€Ί; obtain ⟨j0⟩ := β€ΉNonempty Jβ€Ί  set c : π•œ := 1 - Finset.inf' Finset.univ ⟨(i0, j0), Finset.mem_univ _⟩    (fun r : I Γ— J => A r.1 r.2) with hc  have hApos : βˆ€ i j, 0 < A i j + c := by    intro i j    have hle : Finset.inf' Finset.univ ⟨(i0, j0), Finset.mem_univ _⟩        (fun r : I Γ— J => A r.1 r.2) ≀ A i j :=      Finset.inf'_le _ (Finset.mem_univ (i, j))    rw [hc]; linarith  obtain ⟨x, y, v, hxnn, hxsum, hynn, hysum, hxA, hAy⟩ :=    minimax_pos (fun i j => A i j + c) hApos  refine ⟨x, y, v - c, hxnn, hxsum, hynn, hysum, ?_, ?_⟩  Β· intro j    have h := hxA j    rw [show (βˆ‘ i, x i * (A i j + c)) = (βˆ‘ i, x i * A i j) + c from by        rw [show (βˆ‘ i, x i * (A i j + c)) = βˆ‘ i, (x i * A i j + x i * c) from          Finset.sum_congr rfl (fun i _ => by ring), Finset.sum_add_distrib,          ← Finset.sum_mul, hxsum, one_mul]] at h    linarith  Β· intro i    have h := hAy i    rw [show (βˆ‘ j, (A i j + c) * y j) = (βˆ‘ j, A i j * y j) + c from by        rw [show (βˆ‘ j, (A i j + c) * y j) = βˆ‘ j, (A i j * y j + c * y j) from          Finset.sum_congr rfl (fun j _ => by ring), Finset.sum_add_distrib,          ← Finset.mul_sum, hysum, mul_one]] at h    linarith
See it in the graphDiscuss this resultChallenge it