AFTD Auto-Formalizing Theoretical Domains

OnlineLearning.continuousLinearMap_pi_apply_eq_sum_single

theoremverifiedimported Lean

Coordinate expansion of a continuous linear functional. Let $\iota$ be a finite index set and let $L \colon \bbr^{\iota} \to \bbr$ be a continuous linear functional. Writing $e_i$ for the standard basis vector whose $i$-th coordinate is $1$ and whose other coordinates are $0$, every vector $z \in \bbr^{\iota}$ satisfies \[ L(z) \;=\; \sum_{i \in \iota} z_i \, L(e_i). \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Real Finset BigOperators in
lemma OnlineLearning.continuousLinearMap_pi_apply_eq_sum_single {ι : Type*} [Fintype ι] [DecidableEq ι]
    (L : (ι → ℝ) →L[ℝ] ℝ) (z : ι → ℝ) :
    L z = ∑ i : ι, z i * L (Pi.single i (1 : ℝ))
Source
TCSlib, `OnlineLearning.continuousLinearMap_pi_apply_eq_sum_single`
Lean proof
By Karim Abdel Sadek, Mark Bedaywi, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Karim Abdel Sadek and Mark Bedaywi. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Real Finset BigOperators in/-- A continuous linear functional `L` on a finite product `ι → ℝ` is determined by its coordinate coefficients: `L z = Σ_i z i · L(e_i)`, where `e_i` is the `i`-th standard basis vector. Those coefficients are what we normalize into probabilities. -/lemma OnlineLearning.continuousLinearMap_pi_apply_eq_sum_single {ι : Type*} [Fintype ι] [DecidableEq ι]    (L : (ι → ℝ) →L[ℝ] ℝ) (z : ι → ℝ) :    L z = ∑ i : ι, z i * L (Pi.single i (1 : ℝ)) := by  rw [← ContinuousLinearMap.sum_comp_single (R := ℝ) (φ := fun _ : ι => ℝ) L z]  apply Finset.sum_congr rfl  intro i _  change L (Pi.single (M := fun _ : ι => ℝ) i (z i)) =    z i * L (Pi.single (M := fun _ : ι => ℝ) i (1 : ℝ))  have hsingle :      Pi.single (M := fun _ : ι => ℝ) i (z i) =        (z i) • Pi.single (M := fun _ : ι => ℝ) i (1 : ℝ) := by    ext j    by_cases hji : j = i    · subst hji      simp    · simp [Pi.single_eq_of_ne hji]  rw [hsingle, map_smul]  simp [smul_eq_mul]
See it in the graphDiscuss this resultChallenge it