wsum_pure_apply
theoremverifiedformalizationimported Lean
Weighted sum at a point mass evaluates the chosen coordinate.
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 @[simp] theorem wsum_pure_apply [DecidableEq I] (i₀ : I) (f : I → 𝕜) : wsum (stdSimplex.pure (𝕜 := 𝕜) i₀) f = f i₀
- Formalizes
- EconCSLib, `wsum_pure_apply`
- 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_pure_apply← wsum_pure_apply (EconCSLib/Math/Simplex.lean:319): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- wsumWeighted sum of
fwith weights from a simplex elementx. Thinabbrevover Mathlib's finite dot product⬝ᵥ: definitionally equal,… - stdSimplex.purePoint-mass simplex element at
i₀. - stdSimplex.pure_applystdSimplex.pure_apply
- wsumWeighted sum of
- Used by 119
- 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… - Loomis.exists_xx_lamB0Attainment of
lamB0: there exists a mixed strategyxxwith(xA xx)_j ≥ lamB0 · (xB xx)_jfor every column. - MatrixGame.E_eq_wsum_wsumHelper: writing
A.Eas an iteratedwsumexposes the structure that the saddle-point bounds rely on. - EconCSLib.StrategicGame.nash_map_cont
nash_map Gis a continuous self-map of the product simplex. - Loomis.muB0_oneLoomis.muB0_one
- VNM.NotComplete.not_completeVNM.NotComplete.not_complete
- 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
- Loomis.lamB.aux.continuous
lamB.aux A Bis continuous on the simplex. - MinimaxLoomis.mu.aux_lt_iff_lt
mu.aux A y < ciff every pure-row expected payoff is belowc. - EconCSLib.StrategicGame.g_function_nonnegThe augmented weight is nonnegative.
- MinimaxLoomis.lam.aux_gt_iff_gt
lam.aux A x > ciff every pure-column expected payoff exceedsc. - MinimaxLoomis.mu0Player II's minmax value (the column player's best cap).
- MinimaxLoomis.lam.aux.le_lam0The supremum
lam0dominates everylam.auxvalue. - Loomis.AyColumn-vector product
(Ay)_i = ∑ⱼ Aᵢⱼ yⱼ. - Loomis.lamB.aux_oneLoomis.lamB.aux_one
- expectedPayoffMatrix_commExpected payoff is commutative in the summation order.
- 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 ℝ. - Loomis.lamB.aux.le_lamB0Every
lamB.auxvalue is bounded by the supremumlamB0. - MinimaxLoomis.lam.aux.continuous
lam.aux Ais continuous as a function of the simplex point. - VNM.NotContinuous.not_continuousVNM.NotContinuous.not_continuous
- Loomis.xB_oneLoomis.xB_one
- MinimaxLoomis.mu.aux.bddBelow
mu.aux Ais uniformly bounded below on the simplex. - Loomis.muB.aux_lt_of_rowOffset_pos
muB.aux A B yis strictly belowmuiff every offsetrowOffsetis strictly positive aty. - MinimaxLoomis.wsum_extendDropRowCompanion for row extension.
- EconCSLib.StrategicGame.nash_mapThe Nash best-response map: sends a mixed profile
σto the profile where each playeriplays proportional tog_function i σ. A fixed… - EconCSLib.LinearAlgebra.perron_frobeniusPerron-Frobenius for positive matrices [MFoGT, Section 2.8, Exercise 1(2)]. A square matrix with strictly positive entries has a…
- Lottery.expectedValue_constExpected value of a constant is the constant.
- Loomis.colRatioRow player's per-column Loomis ratio
(xA)_j / (xB)_j. - Loomis.xA_extendDropRowLoomis.xA_extendDropRow
- Lottery.expectedValue_mixLinearity of expected value under convex combination.
E[mix α L₁ L₂] = α · E[L₁] + (1-α) · E[L₂]This is the key property… - MinimaxLoomis.exists_xx_lam0There exists a mixed strategy
xxwhose column-payoffs all dominatelam0 A. Compactness + continuity gives a maximiser oflam.aux;… - Loomis.rowOffsetLinearised row constraint:
rowOffset A B μ y i = μ · (By)_i - (Ay)_i. - Loomis.minmax_from_generalSimplified Loomis as a corollary of the general theorem: the finite von Neumann minimax
MinimaxLoomis.lam0 A = MinimaxLoomis.mu0 A… - expectedValue_isLinearUtilityExpected value (with respect to a fixed payoff function) is a linear utility.
- 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… - Loomis.muB.aux.ge_muB0Every
muB.auxvalue dominates the infimummuB0. - MinimaxLoomis.exists_yy_mu0There exists a mixed strategy
yywhose row-payoffs are all dominated bymu0 A. - Lottery.expectedValue_monoExpected value is monotone: if
f ≤ gpointwise, thenE[f] ≤ E[g]. - 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… - le_iff_simplex_le
f ≤ vpointwise iff every simplex weighted sum is≤ v. - Loomis.lamB.auxPlayer I's guaranteed Loomis ratio under mixed strategy
x: infimum over pure columns. - Loomis.lamB0_le_muB0Weak duality for the Loomis scalars:
lamB0 ≤ muB0. - EconCSLib.StrategicGame.nash_map_auxThe normalized augmented weight:
g_function i σ a / ∑_b g_function i σ b. Private auxiliary used to constructnash_map. - 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… - Lottery.expectedValue_pureExpected value of a pure lottery equals the outcome value.
- Loomis.muB0Minmax Loomis scalar
μ₀ = inf_y μ_aux(y). - Loomis.lamB.aux_gt_of_colOffset_pos
lamB.aux A B xstrictly exceedslamiff every offsetcolOffsetis strictly positive atx. - Loomis.muB.aux_oneLoomis.muB.aux_one
- Loomis.colOffsetLinearised column constraint:
colOffset A B λ x j = (xA)_j - λ · (xB)_j. Note that… - 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ᵢⱼ. - MatrixGame.common_guarantee_eq_valueCommon guarantee gives the value. If both players guarantee the same scalar
w, thenwequals the game value. - MinimaxLoomis.wsum_extendDropColumn
wsum (extendDropColumn j₀ y') fequals thewsumofy'restricted to the corresponding sub-function on{j // j ≠ j₀}. - Loomis.muB.aux.continuous
muB.aux A Bis continuous on the simplex. - MatrixGame.optimalRowSet_nonemptyMatrixGame.optimalRowSet_nonempty
- Loomis.rowOffset_mixConvex combination linearity for
rowOffsetin the simplex argument. - EconCSLib.StrategicGame.evaluate_at_mixed_linear
evaluate_at_mixed G iis linear in thei-th mixed strategy: for anyτ : stdSimplex ℝ (G.strategy i),… - MatrixGame.mem_optimalColumnStrategies_iff_E_leA column strategy is optimal iff against every mixed row it caps payoff at the value.
- Loomis.lamB.aux_gt_iff_gtCharacterisation:
lamB.aux A B x > ciff every column ratio exceedsc. - Lottery.pureA pure (degenerate) lottery: outcome
o₀with probability 1. Alias ofstdSimplex.pure. - Loomis.muB.aux.bddBelow
muB.aux A Bis bounded below on the simplex. - Loomis.rowRatio_oneLoomis.rowRatio_one
- EconCSLib.StrategicGame.nash_map_certThe normalized augmented weights form a valid probability distribution on
G.strategy i. - 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. - Loomis.loomis_value_eqLoomis scalar equality: every finite positive-
Bmatrix pair overℝhas equal maxmin and minmax Loomis ratios. - 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
- MinimaxLoomis.mu.aux.ge_mu0The infimum
mu0is dominated by everymu.auxvalue. - Loomis.loomis_theoremLoomis Theorem [MFoGT, Theorem 2.5.1]. For any pair of matrices
A B : I → J → ℝwithBentrywise positive, there exist mixed… - MatrixGame.image_optimalRowStrategies_eqThe image of the row-optimal subtype set equals the H-representation polytope
A.optimalRowSet. - EconCSLib.StrategicGame.g_functionAugmented weight for pure strategy
aof playeriat mixed profileσ: the original probabilityσ_i(a)plus the positive part of the… - EconCSLib.LinearAlgebra.xA_idMatEconCSLib.LinearAlgebra.xA_idMat
- EconCSLib.StrategicGame.g_function_cont
g_function G i (· ) ais continuous in the mixed profile (fixedi,a). - EconCSLib.StrategicGame.MatrixGame.disp_EiRow-side payoff under
disp A:Ei i y = (Ay)_i − y_i. - Loomis.By_oneLoomis.By_one
- Loomis.By_posPositivity of the column aggregate when
Bis entrywise positive. - Loomis.xB_posPositivity of the row aggregate when
Bis entrywise positive. - MinimaxLoomis.lam0_le_mu0Weak duality for the two-player zero-sum matrix game: every maxmin value is bounded by every minmax value.
- EconCSLib.StrategicGame.sigma_le_g_functionThe augmented weight is at least
σ_i(a). - IsAffineUtility.isRiskNeutralAn affine utility function is risk neutral. [MSZ 2.27, easy direction]
- Loomis.rowRatioColumn player's per-row Loomis ratio
(Ay)_i / (By)_i. - Loomis.lamB0_oneLoomis.lamB0_one
- Loomis.muB.aux_lt_iff_ltCharacterisation:
muB.aux A B y < ciff every row ratio is belowc. - Loomis.colOffset_eq_wsum
colOffsetis awsumofA i j - λ B i joveri. - Loomis.exists_yy_muB0Attainment of
muB0: there exists a mixed strategyyywith(Ay yy)_i ≤ muB0 · (By yy)_ifor every row. - 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.
- Loomis.lamB.aux.bddAbove
lamB.aux A Bis bounded above on the simplex (continuous function on a compact set). - Loomis.muB.auxPlayer II's Loomis-ratio cap under mixed strategy
y: supremum over pure rows. - 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. - EconCSLib.StrategicGame.evaluate_at_mixed_update_cont
σ ↦ evaluate_at_mixed G i (update σ i (stdSimplex.pure a))is continuous. - Loomis.colOffset_mixConvex combination linearity for
colOffsetin the simplex argument. - Loomis.xBy_swapThe bilinear pairing
xByand its symmetric variants. - Loomis.lamB0Maxmin Loomis scalar
λ₀ = sup_x λ_aux(x). - EconCSLib.LinearAlgebra.Ay_idMatEconCSLib.LinearAlgebra.Ay_idMat
- 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. - EconCSLib.StrategicGame.one_le_sum_gThe sum of augmented weights is at least 1.
- MatrixGame.optimalColumnSet_nonemptyMatrixGame.optimalColumnSet_nonempty
- ge_iff_simplex_ge
f ≥ vpointwise iff every simplex weighted sum is≥ v. - Loomis.colRatio.continuousEach column ratio
(xA)_j / (xB)_jis continuous onΔ(I). - MinimaxLoomis.lam0Player I's maxmin value (the row player's best guarantee).
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Finset BigOperators Matrix invariable {𝕜 : Type*} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] invariable {I : Type*} [Fintype I] inset_option linter.unusedSectionVars false in/-- Weighted sum at a point mass evaluates the chosen coordinate. -/@[simp]theorem wsum_pure_apply [DecidableEq I] (i₀ : I) (f : I → 𝕜) : wsum (stdSimplex.pure (𝕜 := 𝕜) i₀) f = f i₀ := by change (∑ i, (if i = i₀ then (1 : 𝕜) else 0) * f i) = f i₀ simp