EconCSLib.Math.Simplex #
Generic utilities for working with the standard simplex stdSimplex ๐ I.
This module is neutral shared infrastructure: it provides simplex-indexed affine combinations and weighted sums, without any game-specific interpretation. Strategic games, lotteries, and utility theory all build on these lemmas.
Main definitions #
stdSimplex.affineCombinationโ affine combination using simplex weightswsumโ weighted sum/dot product:โแตข xแตข ยท f(i)forx : stdSimplex ๐ I
Main results #
wsum_constโ weighted sum of a constant equals the constantwsum_le_wsumโ monotonicity: pointwiseโคimplies weighted-sumโคwsum_nonnegโ non-negativity: non-negative summands give non-negative totalwsum_addโ weighted sums distribute over additionwsum_smulโ weighted sums distribute over scalar multiplicationwsum_wsum_commโ exchange order of iterated weighted sumswsum_pureโ a point mass evaluates the selected coordinate
Attribution #
Adapted from GameTheory/Simplex.lean and helper lemmas in
GameTheory/Zerosum.lean from
math-xmum/gametheory.
Affine combination of a finite family of points using simplex weights.
This is a thin wrapper around Mathlib's Finset.affineCombination, specialized
to weights coming from stdSimplex.
Equations
- stdSimplex.affineCombination x p = (Finset.affineCombination k Finset.univ p) โx
Instances For
In a module, simplex affine combinations are Mathlib finite linear combinations.
Weighted sum of f with weights from a simplex element x.
Thin abbrev over Mathlib's finite dot product โฌแตฅ: definitionally equal,
so simp [wsum] (or no unfold at all) switches between the two forms.
Kept as a named concept because the simplex-specific lemmas below
(wsum_const, wsum_le_wsum, wsum_nonneg, wsum_pure) depend on
โ x = 1 or x โฅ 0 and have no generic dotProduct analogue.
Instances For
Weighted sum of a constant equals the constant.
Weighted sum is monotone: pointwise โค implies wsum โค.
Weighted sum of non-negative values is non-negative.
Weighted sum of strictly-positive values is strictly positive.
Some coordinate a of any simplex point is strictly positive (since
โ x = 1), and the corresponding x_a ยท f a summand is strictly
positive while every other summand is non-negative.
Weighted sum respects โฅ.
Weighted sum is linear over addition.
Weighted sum commutes with scalar multiplication.
Convex combination of two simplex points: mix ฮฑ hฮฑโ hฮฑโ x y = ฮฑยทx + (1-ฮฑ)ยทy.
This is the basic vocabulary for compound lotteries and for any inductive
argument that interpolates between two mixed strategies (Loomis, Sion,
fictitious play). The hypotheses are passed as plain (ฮฑ : ๐) (hฮฑโ : 0 โค ฮฑ) (hฮฑโ : ฮฑ โค 1) rather than via a unit-interval subtype to match Mathlib
idioms and to keep call sites lightweight.
Equations
Instances For
Bilinearity of wsum over stdSimplex.mix:
wsum (mix ฮฑ x y) f = ฮฑ ยท wsum x f + (1-ฮฑ) ยท wsum y f.
Ordered-field arithmetic helpers about convex combinations #
These work directly on the scalar expression ฮฑ ยท x + (1-ฮฑ) ยท y without
reference to stdSimplex. They are the algebraic ingredients used to derive
strict-monotonicity facts about wsum_mix below.
Convex combination of "โฅ c" and "> c" stays "> c" (provided ฮฑ โฅ 0 and ฮฑ < 1).
Convex combination of "โค c" and "< c" stays "< c" (provided ฮฑ โฅ 0 and ฮฑ < 1).
wsum version of linear_comb_gt_of_ge_gt.
wsum version of linear_comb_lt_of_le_lt.
Neighborhood existential for convex combinations #
If c < x, then there is an interior t โ (0,1) with c < tยทx + (1-t)ยทy.
Over a general ordered field this is the elementary fact that the segment
s โฆ sยทx + (1-s)ยทy from y to x stays above c near s = 1; we pick t
explicitly (no continuity), so it holds for any
[Field ๐] [LinearOrder ๐] [IsStrictOrderedRing ๐]. This is the key
ingredient for the Loomis-style inductive step (perturbing the optimiser a
little in the y-direction).
Existence of a strictly interior t keeping tยทx + (1-t)ยทy > c, given
c < x. Constructive over any ordered field: pick t just above the crossing
threshold (c-y)/(x-y) (clamped to 0) when y < x, or any interior t
when x โค y.
Dual: strictly interior t keeping tยทx + (1-t)ยทy < c, given x < c.
Obtained from mix_gt_of_gt_nbh by negating x, y, c.
Exchange order of double weighted sums.
Point-mass simplex element at iโ.
Instances For
Weighted sum at a point mass evaluates the chosen coordinate.
Weighted sum with point mass at iโ equals f iโ. Legacy form using
the inline anonymous-structure point mass. New code should prefer
stdSimplex.pure together with wsum_pure_apply.
Order characterization of wsum ranges #
These lemmas turn pointwise bounds on f : I โ ๐ into bounds on the weighted
sum wsum x f over all simplex points x. They are the bridge that lets
Loomis-style arguments reduce a quantification over mixed strategies to a
quantification over pure responses.
Continuity (over โ) #
For the simplified Loomis route we need that x โฆ wsum x f is continuous on
stdSimplex โ I. The Mathlib instance stdSimplex.instCompactSpace_coe then
hands us compactness "for free", which is the workhorse for existence of
optimal mixed strategies.
The i-th coordinate projection on stdSimplex โ I is continuous.
Matrix-game expected payoff #
expectedPayoffMatrix was previously in StrategicGame.Simplex. It is placed
here because it is a purely arithmetic definition (bilinear evaluation on the
simplex) with no strategic-game vocabulary.
Expected payoff in a matrix game A : I โ J โ ๐ under mixed strategies.
Equations
- expectedPayoffMatrix A x y = โx โฌแตฅ fun (i : I) => โy โฌแตฅ A i
Instances For
Expected payoff is commutative in the summation order.