Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The work function of the antipodal extension of an antipodal space

Proved
KServer.workFnU_antipodal_extension_antipode

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

competitive-analysisk-serveronline-algorithmswork-function

Let (M,d)(M,d)(M,d) be a metric space that is already antipodal at scale Δ\DeltaΔ: there is a map a:M→Ma : M \to Ma:M→M with

d(x,a(y))=Δ−d(x,y)for all x,y∈M,d(x, a(y)) = \Delta - d(x,y) \qquad \text{for all } x,y \in M,d(x,a(y))=Δ−d(x,y)for all x,y∈M,

so that a(y)a(y)a(y) is the antipode of yyy and Δ\DeltaΔ is the diameter of MMM. The circle of circumference 2Δ2\Delta2Δ with its arc metric is the standard example, aaa being the rotation by half the circle.

Let N=M⊔MˉN = M \sqcup \bar MN=M⊔Mˉ be the antipodal extension of MMM at scale Δ\DeltaΔ (KServer.antipodalExtension), in which the two copies carry the metric of MMM and d(x,yˉ)=2Δ−d(x,y)d(x,\bar y) = 2\Delta - d(x,y)d(x,yˉ​)=2Δ−d(x,y) across the copies. Fix kkk servers, an initial configuration C0C_0C0​ in MMM and a request sequence σ\sigmaσ in MMM, both carried into NNN by the inclusion of the base copy, and write w^\widehat ww for the unordered work function of that instance evaluated in NNN, and www for the unordered work function of the same instance evaluated in MMM.

Statement. For every configuration X=(X1,…,Xk)X = (X_1,\dots,X_k)X=(X1​,…,Xk​) of NNN,

w^(X)  =  w(π(X1),…,π(Xk))  +  Δ⋅#{ i:Xi∈Mˉ },\widehat w(X) \;=\; w\bigl(\pi(X_1),\dots,\pi(X_k)\bigr) \;+\; \Delta\cdot\#\{\,i : X_i \in \bar M\,\},w(X)=w(π(X1​),…,π(Xk​))+Δ⋅#{i:Xi​∈Mˉ},

where π:N→M\pi : N \to Mπ:N→M is the identity on the base copy and the antipode map aaa on the added copy Mˉ\bar MMˉ.

The point of the identity is that on an antipodal space the added copy Mˉ\bar MMˉ is redundant: writing ℓ(p)∈{0,1}\ell(p) \in \{0,1\}ℓ(p)∈{0,1} for the copy in which ppp lies, the metric of NNN splits as

dN(p,q)  =  d(π(p),π(q))  +  Δ ∣ℓ(p)−ℓ(q)∣,d_N(p,q) \;=\; d\bigl(\pi(p),\pi(q)\bigr) \;+\; \Delta\,|\ell(p)-\ell(q)|,dN​(p,q)=d(π(p),π(q))+Δ∣ℓ(p)−ℓ(q)∣,

because dN(x,yˉ)=2Δ−d(x,y)=Δ+d(x,a(y))d_N(x,\bar y) = 2\Delta - d(x,y) = \Delta + d(x,a(y))dN​(x,yˉ​)=2Δ−d(x,y)=Δ+d(x,a(y)) and aaa is an isometry. So NNN is two isometric copies of MMM at "vertical" distance Δ\DeltaΔ, and an offline solution pays Δ\DeltaΔ for each change of copy. Since the requests lie in the base copy, an optimal schedule stays there and moves to Mˉ\bar MMˉ only in the final move, paying exactly Δ\DeltaΔ for each server that ends in the added copy; conversely, along every schedule the total number of copy changes of a server that ends in Mˉ\bar MMˉ is at least one.

Consequently, on an antipodal space every quantity built from work-function values at configurations of the doubled extension — in particular the Coester--Koutsoupias potential Φ\PhiΦ, whose k+1k+1k+1 configurations use 0,1,…,k0,1,\dots,k0,1,…,k antipodal servers — differs from the corresponding quantity computed with the intrinsic antipodes of MMM by the fixed constant Δk(k+1)/2\Delta k(k+1)/2Δk(k+1)/2. The identity is therefore the bridge that carries statements about the potential on antipodal spaces (the circle above all) to the doubled-extension formalization used here, and vice versa.

Formalization note. The count of antipodal servers is written as the sum of Sum.elim (fun _ => 0) (fun _ => 1) over the servers, and the projection π\piπ as Sum.elim id a. The hypothesis hΔ (that Δ\DeltaΔ bounds all distances) is the one required to form the extension; it also follows from ha. The special case X=inl∘YX = \mathrm{inl} \circ YX=inl∘Y with YYY a configuration of MMM is KServer.workFnU_antipodal_extension_restrict, and holds without any antipodality assumption.

Preamble
import Mathlib
import Definitions.Def_KServer_workfunctionU
import Definitions.Def_KServer_antipodal_extension
Formal statement
namespace KServer

theorem workFnU_antipodal_extension_antipode (k : ℕ) (hk : 1 ≤ k) (M : Type) [MetricSpace M]
    (Δ : ℝ) (hΔ0 : 0 < Δ) (hΔ : ∀ x y : M, dist x y ≤ Δ) (a : M → M)
    (ha : ∀ x y : M, dist x (a y) = Δ - dist x y)
    (C₀ : Config k M) (σ : List M) (X : Config k (M ⊕ M)) :
    @workFnU k (M ⊕ M) (antipodalExtension M Δ hΔ0 hΔ)
        (fun i => Sum.inl (C₀ i)) (σ.map Sum.inl) X
      = workFnU C₀ σ (fun i => Sum.elim id a (X i))
        + Δ * ∑ i, Sum.elim (fun _ => (0:ℝ)) (fun _ => (1:ℝ)) (X i) := by sorry

end KServer
Source
C. Coester, E. Koutsoupias, 'Towards the k-server conjecture: a unifying potential, pushing the frontier to the circle', ICALP 2021, arXiv:2102.10474, Section 3.2 (definition of the antipodal extension and of the k-server potential, printed p. 7); E. Koutsoupias, 'Weak adversaries for the k-server problem' (1999), for the antipodal extension construction.

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.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me