Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

For an injective start, the work function is the Lipschitz extension of its injective restriction

Proved
KServer.workFnU_injective_witness

by Zexuan Liu · Sep 7, 2026 · Mathlib c5ea003 (Lean v4.30.0)

k-serveronline-algorithmswork-function

Fix a metric space MMM, a number k≥1k\ge1k≥1 of servers, and an initial configuration C0C_0C0​ that occupies kkk distinct points. For a request sequence σ\sigmaσ write w^σ=w^(C0;σ;⋅)\widehat w_\sigma=\widehat w(C_0;\sigma;\cdot)wσ​=w(C0​;σ;⋅) for the unordered work function, and for configurations X,YX,YX,Y write ∥X−Y∥=∑id(Xi,Yi)\lVert X-Y\rVert=\sum_i d(X_i,Y_i)∥X−Y∥=∑i​d(Xi​,Yi​) for the labelled movement cost.

Statement. For every σ\sigmaσ, every configuration YYY and every ε>0\varepsilon>0ε>0 there is an injective configuration XXX with

w^σ(X)+∥X−Y∥  ≤  w^σ(Y)+ε.\widehat w_\sigma(X)+\lVert X-Y\rVert\;\le\;\widehat w_\sigma(Y)+\varepsilon .wσ​(X)+∥X−Y∥≤wσ​(Y)+ε.

Since the opposite inequality w^σ(Y)≤w^σ(X)+∥X−Y∥\widehat w_\sigma(Y)\le\widehat w_\sigma(X)+\lVert X-Y\rVertwσ​(Y)≤wσ​(X)+∥X−Y∥ is the Lipschitz property of the work function, the two together say

w^σ(Y)  =  inf⁡{ w^σ(X)+∥X−Y∥  :  X injective },\widehat w_\sigma(Y)\;=\;\inf\{\,\widehat w_\sigma(X)+\lVert X-Y\rVert \;:\; X \text{ injective}\,\},wσ​(Y)=inf{wσ​(X)+∥X−Y∥:X injective},

that is, the work function is the largest 111-Lipschitz extension of its own restriction to injective configurations, and therefore carries no information at degenerate configurations beyond what it already carries at injective ones.

Role. The classical theory treats a configuration as a set of kkk points, so degenerate configurations, which place two servers at a single point, do not occur in it. A formalization over maps Fin k→M\mathrm{Fin}\,k\to MFink→M must deal with them, and the growth bounds of the work function are consequently available only in their injective form. This lemma is the bridge: any inequality between work functions that is proved at injective configurations and is preserved by the Lipschitz extension holds at every configuration.

The hypothesis on C0C_0C0​ is necessary. On the uniform three-point space with k=2k=2k=2 and C0=(p,p)C_0=(p,p)C0​=(p,p), after the single request ppp the work function vanishes at (p,p)(p,p)(p,p), while every injective configuration lies at distance 111 from it and has work-function value 111; the right-hand side above equals 222 and the statement fails by 222. What survives for a degenerate start is the same statement with an additive slack equal to twice the distance from C0C_0C0​ to the nearest injective configuration.

Formalization note. The error term ε\varepsilonε is present because on a general metric space the infimum over injective configurations need not be attained. The movement cost is the labelled one; this is the stronger reading, since the witness XXX may be relabelled freely and workFnU is invariant under relabelling.

Preamble
import Mathlib
import Definitions.Def_KServer_workfunctionU
Formal statement
namespace KServer

theorem workFnU_injective_witness (k : ℕ) (hk : 1 ≤ k) (M : Type) [MetricSpace M]
    (C₀ : Config k M) (hC₀ : Function.Injective C₀) (σ : List M) (Y : Config k M)
    (ε : ℝ) (hε : 0 < ε) :
    ∃ X : Config k M, Function.Injective X ∧
      workFnU C₀ σ X + moveCost X Y ≤ workFnU C₀ σ Y + ε := by sorry

end KServer
Source
E. Koutsoupias, The k-server problem (survey), Computer Science Review 3 (2009) 105-118, https://doi.org/10.1016/j.cosrev.2009.04.002, Section 3.4 (the Extended Cost Lemma and the work-function growth bounds, stated there for configurations as k-point sets). Original observation supplying the missing bridge between the set-valued classical formulation and the `Fin k -> M` formalization of this mission.

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me