Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 7, lower bound — the expected off-line cost is at most j/(nH(n))+O(1)j/(nH(n)) + O(1)j/(nH(n))+O(1)

Proved
MetricalTaskSystem.Randomized.uniform_expOfflineCost_limsup

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisonline-algorithmsp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1probability

Let (S,d)(S,d)(S,d) be the uniform task system on nnn states, let the tasks be independent and uniformly distributed unit elementary tasks, and let s0s_0s0​ be an initial state. Then there is a constant CCC, independent of jjj, such that for every j≥0j \ge 0j≥0

E(c0(Tj))≤jnH(n)+C.E\big(c_0(\mathbf T^j)\big)\le\frac{j}{nH(n)}+C .E(c0​(Tj))≤nH(n)j​+C.

This is the denominator estimate in the application of Lemma 7.2: together with mj≥j/nm_j\ge j/nmj​≥j/n it gives lim sup⁡jmj/E(c0(Tj))≥H(n)\limsup_j m_j/E(c_0(\mathbf T^j))\ge H(n)limsupj​mj​/E(c0​(Tj))≥H(n).

Formalization Note The paper's O(1)O(1)O(1) is rendered as an explicit existential constant CCC chosen after the system and the initial state and before jjj. The paper's own justification (the elementary renewal theorem) gives only the limit of E(cj)/jE(c_j)/jE(cj​)/j; the additive bound as stated needs a sharper renewal estimate, which is a proof cost, not a change of statement.

Preamble
import Mathlib
import Definitions.Def_MetricalTaskSystem_Randomized_Model
import Definitions.Def_MetricalTaskSystem_Randomized_TaskDistribution
Formal statement
namespace MetricalTaskSystem.Randomized

/-- **Section 7, proof of the lower bound, off-line cost** (Borodin–Linial–Saks 1992, p. 760).
On the uniform task system with `n = |S|` states and independent uniformly distributed unit
elementary tasks, `E(c₀(Tʲ)) ≤ j/(n·H(n)) + O(1)`: there is a constant `C` (depending on the
system and the initial state, not on `j`) with `E(c₀(Tʲ)) ≤ j/(n·H(n)) + C` for every `j`. -/
theorem uniform_expOfflineCost_limsup {S : Type} [Fintype S] [DecidableEq S] [Nonempty S]
    [MeasurableSpace S] [MeasurableSingletonClass S] (s₀ : S) :
    ∃ C : ℝ, ∀ j : ℕ,
      expOfflineCost (uniformD (S := S)) s₀ (unitTask (S := S)) (uniformStateSeq S) j ≤
        (j : ℝ) / ((Fintype.card S : ℝ) * (harmonic (Fintype.card S) : ℝ)) + C := by sorry

end MetricalTaskSystem.Randomized
Source
Borodin, Linial, Saks, An Optimal On-Line Algorithm for Metrical Task System, J. ACM 39(4) (1992), p. 760, Section 7, proof of Theorem 7.1 (lower bound), off-line strategy and renewal argument
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Let SSS be a finite, nonempty type of "states" with decidable equality. Write n=∣S∣n = |S|n=∣S∣, so n≥1n \ge 1n≥1. SSS carries a σ-algebra in which every singleton is measurable. Because SSS is finite, every subset is then a finite union of singletons, so the σ-algebra is necessarily the full power set of SSS. Fix an arbitrary state s0∈Ss_0 \in Ss0​∈S.

Notation. H(n)H(n)H(n) denotes the nnn-th harmonic number:

H(n)=∑i=1n1i.H(n) = \sum_{i=1}^{n} \frac{1}{i}.H(n)=i=1∑n​i1​.

It is computed as a rational number and then viewed as a real number.

The statement also uses four objects from the imported definition files. Their definitions are not part of the code given here, so this read-back cannot unfold them. What is visible is how they are used:

  • expOfflineCost(D,s0,T,σ,j)\mathrm{expOfflineCost}(D, s_0, T, \sigma, j)expOfflineCost(D,s0​,T,σ,j) is a real-valued quantity that depends on a natural number jjj. Its arguments are:
    • D=uniformDD = \mathrm{uniformD}D=uniformD, an object specialised to SSS;
    • the starting state s0s_0s0​;
    • T=unitTaskT = \mathrm{unitTask}T=unitTask, an object specialised to SSS;
    • σ=uniformStateSeq(S)\sigma = \mathrm{uniformStateSeq}(S)σ=uniformStateSeq(S), an object built from SSS.

The names suggest an "expected off-line cost after jjj steps" for a "uniform" system with "unit tasks" and a "uniform state sequence". The code shown does not confirm any of these meanings. An auditor has to check them against the definition files.

Assertion. There is a real constant CCC such that, for every natural number j≥0j \ge 0j≥0,

expOfflineCost(uniformD,s0,unitTask,uniformStateSeq(S),j)  ≤  jn H(n)+C.\mathrm{expOfflineCost}(\mathrm{uniformD}, s_0, \mathrm{unitTask}, \mathrm{uniformStateSeq}(S), j) \;\le\; \frac{j}{n\,H(n)} + C.expOfflineCost(uniformD,s0​,unitTask,uniformStateSeq(S),j)≤nH(n)j​+C.

About the constant CCC:

  • It comes before the quantifier over jjj, so it cannot depend on jjj.
  • It may depend on everything fixed earlier: the type SSS, its structure, and s0s_0s0​.
  • Its sign and size are unrestricted; it may be negative or arbitrarily large.

The claim is only a one-sided upper bound whose leading term is j/(nH(n))j/(nH(n))j/(nH(n)) plus an additive constant. It makes no claim about a lower bound, a limit, or a limsup, even though the declaration's name mentions "limsup".

Degenerate cases.

  • Division. Since SSS is nonempty, n≥1n \ge 1n≥1 and H(n)≥1H(n) \ge 1H(n)≥1. The denominator nH(n)nH(n)nH(n) is therefore always positive, and the division never falls back to a default value.
  • One state (n=1n = 1n=1). Then H(1)=1H(1) = 1H(1)=1 and the bound reads expOfflineCost(…,j)≤j+C\mathrm{expOfflineCost}(\dots, j) \le j + CexpOfflineCost(…,j)≤j+C.
  • Zero steps (j=0j = 0j=0). The bound reduces to expOfflineCost(…,0)≤C\mathrm{expOfflineCost}(\dots, 0) \le CexpOfflineCost(…,0)≤C.
  • Hidden defaults. Whether the cost quantity itself contains default values cannot be determined from this code. Examples would be an integral of a non-integrable function evaluating to 000, or truncated subtraction. That depends entirely on the unseen definitions.
  • Vacuous case. If expOfflineCost(…,j)\mathrm{expOfflineCost}(\dots, j)expOfflineCost(…,j) were bounded above uniformly in jjj (for example, identically 000 because of such a default), the statement would hold trivially with a suitable CCC.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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