Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 2, p. 23 — squared Euclidean distance from xxx to the ideal allocation ckc_kck​

Proved
SeqLoss.Equidistance.sq_dist_ideal

by mikedeng1 · Oct 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

cost-sharingeuclidean-distancep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let ℓ∈Rn\ell\in\mathbb R^nℓ∈Rn have total L=ℓ1+⋯+ℓnL=\ell_1+\dots+\ell_nL=ℓ1​+⋯+ℓn​, let 1≤k≤n1\le k\le n1≤k≤n, and let ck=(L/k,…,L/k,0,…,0)c_k=(L/k,\dots,L/k,0,\dots,0)ck​=(L/k,…,L/k,0,…,0) be the kkk-th ideal allocation. For every x∈Rnx\in\mathbb R^nx∈Rn,

d(x,ck)2=∑i=1k(xi−Lk)2+∑i=k+1nxi2=∑i=1nxi2−2Lk∑i=1kxi+L2k.d(x,c_k)^2=\sum_{i=1}^k\Big(x_i-\frac Lk\Big)^2+\sum_{i=k+1}^n x_i^2=\sum_{i=1}^n x_i^2-\frac{2L}{k}\sum_{i=1}^k x_i+\frac{L^2}{k}.d(x,ck​)2=i=1∑k​(xi​−kL​)2+i=k+1∑n​xi2​=i=1∑n​xi2​−k2L​i=1∑k​xi​+kL2​.

The first term does not depend on kkk, so equidistance from c1,…,cnc_1,\dots,c_nc1​,…,cn​ reduces to the last two terms being independent of kkk.

Formalization Note The paper writes the identity for x∈Xˉ(ℓ)x\in\bar X(\ell)x∈Xˉ(ℓ); it holds for every real vector xxx and every real ℓ\ellℓ, and is stated so. Agents are 0-based, so ∑i=1kxi\sum_{i=1}^k x_i∑i=1k​xi​ is the sum over indices i<ki<ki<k.

Preamble
import Mathlib
import Definitions.Def_SeqLoss_FixedFraction_Setting
import Definitions.Def_SeqLoss_Equidistance_IdealAllocations
Formal statement
namespace SeqLoss.Equidistance
theorem sq_dist_ideal {n : ℕ} (ℓ x : Fin n → ℝ) (k : ℕ) (hk1 : 1 ≤ k) (hkn : k ≤ n) :
    euclDist x (ideal ℓ k) ^ 2 =
      (∑ i, x i ^ 2)
        - 2 * SeqLoss.FixedFraction.total ℓ / (k : ℝ) * (∑ i ∈ Finset.univ.filter (fun i : Fin n => i.val < k), x i)
        + SeqLoss.FixedFraction.total ℓ ^ 2 / (k : ℝ) := by sorry
end SeqLoss.Equidistance
Source
Gudmundsson, Hougaard & Ko, Sharing Sequentially Triggered Losses, accepted manuscript (2023), p. 23, Appendix A, proof of Theorem 2, first display
Human review
  • Endorsed by Shuze Chen · Oct 15, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 15, 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