Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Real weighted energy identity

Proved
DerivativeChainPrivate.real_energy_identity

by labuka · Oct 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

derivative-chain-privatefoundations

Let I be a finite type with decidable equality, s a finite subset, p and a real-valued functions on I, and b real. If the weights on s sum to one and b is their weighted sum of the a-values, then

∑i∈spi(ai−b)2=∑i∈spiai2−b2.\sum_{i\in s}p_i(a_i-b)^2=\sum_{i\in s}p_i a_i^2-b^2.i∈s∑​pi​(ai​−b)2=i∈s∑​pi​ai2​−b2.

No positivity assumption on the weights is needed. This is an algebraic identity, not a derivative-chain bound.

Preamble
import Mathlib
open scoped BigOperators
set_option autoImplicit false
Formal statement
theorem DerivativeChainPrivate.real_energy_identity {ι : Type} [Fintype ι] [DecidableEq ι]
    (s : Finset ι) (p a : ι → ℝ) (b : ℝ)
    (hsum : ∑ i ∈ s, p i = 1)
    (hb : b = ∑ i ∈ s, p i * a i) :
    ∑ i ∈ s, p i * (a i - b) ^ 2 = ∑ i ∈ s, p i * (a i) ^ 2 - b ^ 2  := by sorry
Source
Derivative-zero chains: public formalization reference, R09, DerivativeChainPrivate.real_energy_identity. https://gist.github.com/Amal-David/d6612109c98595b12561cd638c60edf5/3883c57ddc7bf9d4c0e898c3d6bfd2ca0d7f9c95#file-notes-md
Human review
  • Endorsed by Shuze Chen · Oct 20, 2026

    Confirmed by the moderator at approval.

  • Endorsed by labuka · Oct 20, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me