AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
none listed
Used by 74

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
See it in the graphDiscuss this resultChallenge it