wsum
abbrevimported Lean
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.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Finset BigOperators Matrix in variable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] in variable {I : Type*} [Fintype I] in set_option linter.unusedSectionVars false in abbrev wsum (x : stdSimplex 𝕜 I) (f : I → 𝕜) : 𝕜
- Defined in
- EconCSLib, `wsum`
- 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.wsum← wsum (EconCSLib/Math/Simplex.lean:87): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Used by 74
- Loomis.xB_extendDropRowLoomis.xB_extendDropRow
- MatrixGame.optimal_pairs_iff_saddle_pointOptimal 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… - MatrixGame.E_eq_wsum_wsumHelper: writing
A.Eas an iteratedwsumexposes the structure that the saddle-point bounds rely on. - Loomis.ByColumn-vector product
(By)_i = ∑ⱼ Bᵢⱼ yⱼ. - EconCSLib.StrategicGame.MatrixGame.disp_EjColumn-side payoff under
disp A:Ej x j = (xA)_j − x_j. - MinimaxLoomis.mu.aux.continuous
mu.aux Ais continuous as a function of the simplex point. - Loomis.By_extendDropColumnLoomis.By_extendDropColumn
- MinimaxLoomis.mu.aux_lt_iff_lt
mu.aux A y < ciff every pure-row expected payoff is belowc. - MinimaxLoomis.lam.aux_gt_iff_gt
lam.aux A x > ciff every pure-column expected payoff exceedsc. - Loomis.AyColumn-vector product
(Ay)_i = ∑ⱼ Aᵢⱼ yⱼ. - Loomis.lamB.aux_oneLoomis.lamB.aux_one
- MatrixGame.image_optimalColumnStrategies_eqMatrixGame.image_optimalColumnStrategies_eq
- Loomis.rowRatio.continuousEach row ratio
(Ay)_i / (By)_iis continuous onΔ(J). - wsum_continuous
wsum (·) fis continuous on the standard simplex over ℝ. - MinimaxLoomis.lam.aux.continuous
lam.aux Ais continuous as a function of the simplex point. - wsum_mix_gt_of_ge_gt
wsumversion oflinear_comb_gt_of_ge_gt. - MinimaxLoomis.mu.aux.bddBelow
mu.aux Ais uniformly bounded below on the simplex. - MinimaxLoomis.wsum_extendDropRowCompanion for row extension.
- EconCSLib.LinearAlgebra.perron_frobeniusPerron-Frobenius for positive matrices [MFoGT, Section 2.8, Exercise 1(2)]. A square matrix with strictly positive entries has a…
- wsum_posWeighted sum of strictly-positive values is strictly positive. Some coordinate
aof any simplex point is strictly positive (since… - Loomis.xA_extendDropRowLoomis.xA_extendDropRow
- MinimaxLoomis.exists_xx_lam0There exists a mixed strategy
xxwhose column-payoffs all dominatelam0 A. Compactness + continuity gives a maximiser oflam.aux;… - MinimaxLoomis.lam.aux.bddAbove
lam.aux Ais uniformly bounded above on the simplex. - MinimaxLoomis.lam.auxPlayer I's guaranteed payoff from mixed strategy
x: the minimum over pure columns of the expected payoff. - Loomis.loomis_value_eq_auxLoomis induction:
lamB0 A B = muB0 A Bfor any finite positive-Bmatrix pair with2 ≤ |I| + |J|, by strong induction on the… - wsum_le_wsumWeighted sum is monotone: pointwise
≤implieswsum ≤. - MinimaxLoomis.exists_yy_mu0There exists a mixed strategy
yywhose row-payoffs are all dominated bymu0 A. - Loomis.wsum_const_mulWeight a constant multiple under
wsum:wsum z (c · f) = c · wsum z f. A direct unfold ofwsum_smul, restated here so chained… - MatrixGame.support_complementarity_columnSupport complementarity (column). For an optimal pair
(xx, yy), every columnjwith positive probability underyyis a best… - MatrixGame.isMixedNashEq_of_purePure-strategy guarantees give a mixed Nash equilibrium. If
xxguarantees valuevagainst every pure column andyycaps the row… - wsum_addWeighted sum is linear over addition.
- le_iff_simplex_le
f ≤ vpointwise iff every simplex weighted sum is≤ v. - wsum_mix_lt_of_le_lt
wsumversion oflinear_comb_lt_of_le_lt. - Loomis.lamB0_le_muB0Weak duality for the Loomis scalars:
lamB0 ≤ muB0. - IsRiskNeutralRisk neutrality for lotteries over a finite index set
I:u(∑ pᵢ·xᵢ) = ∑ pᵢ·u(xᵢ). Equivalent toubeing affine. [MSZ 2.27] - MatrixGame.exists_mixed_nash_equilibriumMatrix games have a mixed Nash equilibrium — over any linearly ordered field. Packages the field-generic saddle
Minimax.minimax… - wsum_pure_applyWeighted sum at a point mass evaluates the chosen coordinate.
- Loomis.muB.aux_oneLoomis.muB.aux_one
- Loomis.xBy_posPositivity of the bilinear pairing
xBy = ∑ᵢⱼ xᵢ Bᵢⱼ yⱼ. - Loomis.rowOffset_eq_wsum
rowOffsetis awsumofμ B i j - A i joverj. - MinimaxLoomis.mu.auxPlayer II's maximum loss against mixed strategy
y: the maximum over pure rows of the expected payoff. - Loomis.xBRow-vector product
(xB)_j = ∑ᵢ xᵢ Bᵢⱼ. - MinimaxLoomis.wsum_extendDropColumn
wsum (extendDropColumn j₀ y') fequals thewsumofy'restricted to the corresponding sub-function on{j // j ≠ j₀}. - wsum_mixBilinearity of
wsumoverstdSimplex.mix:wsum (mix α x y) f = α · wsum x f + (1-α) · wsum y f. - Loomis.rowOffset_mixConvex combination linearity for
rowOffsetin the simplex argument. - MatrixGame.mem_optimalColumnStrategies_iff_E_leA column strategy is optimal iff against every mixed row it caps payoff at the value.
- wsum_wsum_commExchange order of double weighted sums.
- wsum_ge_wsumWeighted sum respects
≥. - Loomis.rowRatio_oneLoomis.rowRatio_one
- Loomis.xARow-vector product
(xA)_j = ∑ᵢ xᵢ Aᵢⱼ. - Loomis.loomis_value_IJ_2Base case of the Loomis induction: a 1×1 matrix pair has the single ratio
A i₀ j₀ / B i₀ j₀as the common Loomis value. - MatrixGame.minimax_optimal_strategiesExistence of optimal mixed strategies: there exist mixed strategies
xxfor Player I andyyfor Player II and a valuevsuch that: -… - Loomis.colRatio_oneLoomis.colRatio_one
- wsum_smulWeighted sum commutes with scalar multiplication.
- MatrixGame.image_optimalRowStrategies_eqThe image of the row-optimal subtype set equals the H-representation polytope
A.optimalRowSet. - EconCSLib.StrategicGame.MatrixGame.disp_EiRow-side payoff under
disp A:Ei i y = (Ay)_i − y_i. - MinimaxLoomis.lam0_le_mu0Weak duality for the two-player zero-sum matrix game: every maxmin value is bounded by every minmax value.
- IsAffineUtility.isRiskNeutralAn affine utility function is risk neutral. [MSZ 2.27, easy direction]
- wsum_nonnegWeighted sum of non-negative values is non-negative.
- Loomis.colOffset_eq_wsum
colOffsetis awsumofA i j - λ B i joveri. - positive_matrix_order_four_left_stationaryA strictly positive order-four real matrix with constant row sum has a strictly positive normalized left eigenvector with that eigenvalue.
- Loomis.Ay_extendDropColumnExtending
y' ∈ Δ(J')toΔ(J)by zero atj₀recovers the same row aggregates fromA(andB). - MatrixGame.E_eq_wsum_wsum_swapHelper: swap order of the iterated
wsuminA.E. - wsum_pureWeighted sum with point mass at
i₀equalsf i₀. Legacy form using the inline anonymous-structure point mass. New code should prefer… - MatrixGame.mem_optimalRowStrategies_iff_E_geA row strategy is optimal iff against every mixed column it secures the value.
- MatrixGame.support_complementarity_rowSupport complementarity (row). For an optimal pair
(xx, yy), every rowiwith positive probability underxxis a best response… - IsRiskNeutral.isAffineRisk neutrality implies affine utility. [MSZ 2.27, hard direction] Requires
|I| ≥ 2so that non-trivial distributions exist. - Loomis.colOffset_mixConvex combination linearity for
colOffsetin the simplex argument. - Loomis.xBy_swapThe bilinear pairing
xByand its symmetric variants. - Lottery.expectedValueExpected value of
funder lotteryL:E_L[f] = ∑ o, L(o) · f(o). Alias ofwsumfromMath.Simplex. - MinimaxLoomis.EExpected payoff of a matrix game
A : I → J → ℝunder mixed strategiesx : stdSimplex ℝ Iandy : stdSimplex ℝ J. - ge_iff_simplex_ge
f ≥ vpointwise iff every simplex weighted sum is≥ v. - wsum_constWeighted sum of a constant equals the constant.
- Loomis.colRatio.continuousEach column ratio
(xA)_j / (xB)_jis continuous onΔ(I).
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Finset BigOperators Matrix in variable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] in variable {I : Type*} [Fintype I] in set_option linter.unusedSectionVars false in /-- 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. -/ abbrev wsum (x : stdSimplex 𝕜 I) (f : I → 𝕜) : 𝕜 := x ⬝ᵥ f