Encoded two-player rational bimatrix games and FNP verification #
This module defines the binary encoding of finite two-player rational bimatrix games, the exact
rational Nash equilibrium search problem BimatrixCode.BimatrixNash, and a polynomial-time exact
integer verifier showing BimatrixNash ∈ FNP encBimatrix.
Payoff matrices are encoded by the structure BimatrixCode (fields matA, matB) under
encBimatrix using Turing.MultiTapeTM.encRat, and rational mixed strategy pairs by
StrategyPair under encWitness. For well-formed nonempty m × n matrices, BimatrixNash c w
holds when w is a polynomially bounded canonical rational strategy pair forming an exact Nash
equilibrium of c.toGame; non-well-formed inputs admit only the empty witness [].
Verification clears payoff and strategy denominators without rational division, checking canonical lowest-terms nonnegativity, unit strategy sums, and all pure-deviation inequalities in signed binary integer arithmetic.
Main definitions #
Cslib.GameTheory.StrategyPair,Cslib.GameTheory.encWitness: rational mixed strategy pairs and their canonical binary encoding viaencRat.Cslib.GameTheory.BimatrixCode,Cslib.GameTheory.encBimatrix: explicitly presented two-player rational payoff matrices and their binary encoding.Cslib.GameTheory.BimatrixCode.WellFormed,Cslib.GameTheory.BimatrixCode.toGame: nonempty rectangularity predicate and inducedBimatrixGame.Cslib.GameTheory.BimatrixCode.IsSymmetric,Cslib.GameTheory.BimatrixCode.toSymGame: symmetric rational bimatrix codes (B = Aᵀ) and their induced symmetric games.Cslib.GameTheory.BimatrixCode.IsRationalNash,Cslib.GameTheory.BimatrixCode.BimatrixNash: exact rational Nash predicate and polynomially bounded total search relation.
Main results #
Cslib.GameTheory.BimatrixCode.IsRationalNash.toGame_isNash: rational Nash strategy pairs induce mixed Nash equilibria ofc.toGame.Cslib.GameTheory.BimatrixCode.BimatrixNash_mem_FNP:BimatrixNash ∈ FNP encBimatrix.
References #
Section 1: Encodings, games, and the rational Nash search problem #
Canonical encoding of a rational strategy pair (x, y) via Turing.MultiTapeTM.encRat.
Binary encoding of rational bimatrix games as (matA, matB) via encRat.
Number of pure strategies of player 1.
Number of pure strategies of player 2.
Decidable rectangularity and nonemptiness check for BimatrixCode.
Player 1's rational payoff matrix extracted from c.
Player 2's rational payoff matrix extracted from c.
The BimatrixGame induced by a BimatrixCode.
Predicate asserting that c : BimatrixCode encodes a finite symmetric two-player game:
nonempty, square (rows = cols), and with player 2's payoff matrix equal to the transpose of
player 1's (B = Aᵀ).
The symmetric two-player game ⟨A, Aᵀ⟩ on Fin c.rows extracted from player 1's payoff
matrix c.matA. When c.IsSymmetric, this coincides with c.toGame up to casting
Fin c.rows to Fin c.cols.
Polynomial witness length bound 120 * L^3 + 400 * L + 100 in L = (encBimatrix c).length.
The rational bimatrix Nash search problem: given c, find a polynomially bounded canonical
rational strategy pair s forming an exact Nash equilibrium of c.toGame (or [] on malformed
c).
Section 2: Executable denominator clearing #
Product of all rational denominators appearing in c.
Scale a single rational q by D via exact truncated division q.num * (D.tdiv q.den).
Section 3: Exact FNP verifier #
Two-player rational Nash equilibrium is in FNP.