Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Conditional remaining size and slow decrement for chunk systems

Definition
KServer_chunk_slow_decrement

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

k-serveronline-algorithmsprobability

Let CCC be a chunk system with online escapes (ChunkSystemB, the induction package of Bubeck-Coester-Rabani's Lemma 6): a finitely supported random sequence of mmm chunks of set requests, with an explicit filtration mathcalF0subseteqmathcalF1subseteqcdots\\mathcal F_0\\subseteq\\mathcal F_1\\subseteq\\cdotsmathcalF0​subseteqmathcalF1​subseteqcdots encoded by a history function, adapted chunk sizes c0,dots,cm−1c_0,\\dots,c_{m-1}c0​,dots,cm−1​, and a conditional cost bound against every evader and every online escape rule.

This file introduces the filtration's atoms - the fibres of the time-hhh history function, which are exactly the cells on which conditioning at time hhh takes place - and the conditional expected remaining size

Fh;=;mathbbEBig[textstylesumjgehcj;Big∣;mathcalFhBig],F_h \\;=\\; \\mathbb E\\Big[\\textstyle\\sum_{j\\ge h} c_j \\;\\Big|\\; \\mathcal F_h\\Big],Fh​;=;mathbbEBig[textstylesumjgeh​cj​;Big∣;mathcalFh​Big],

a random variable that is constant on each time-hhh atom. When the initial information is trivial, F0F_0F0​ is precisely the expected total size of the system, and it therefore dominates the system's declared total.

The slow-decrement property with parameter cmaxc_{\\max}cmax​ demands that this quantity never falls fast:

Fh−cmax;le;Fh+1qquadtextineverybranchandateverytime.F_h - c_{\\max} \\;\\le\\; F_{h+1} \\qquad\\text{in every branch and at every time.}Fh​−cmax​;le;Fh+1​qquadtextineverybranchandateverytime.

Because the current size chc_hch​ is measurable at time hhh, the tower identity Fh=ch+mathbbE[Fh+1midmathcalFh]F_h = c_h + \\mathbb E[F_{h+1}\\mid\\mathcal F_h]Fh​=ch​+mathbbE[Fh+1​midmathcalFh​] always bounds the drop of FFF by cmaxc_{\\max}cmax​ in conditional expectation whenever the sizes are bounded by cmaxc_{\\max}cmax​; the slow-decrement property demands the same bound in each individual branch, which is what a branchwise stopping-time argument actually consumes.

Finally the file records the output shape of the level-www subchunk construction of the randomized lower bound with the slow-decrement property attached, so that a regrouping step on the next level can be stated against it.

Definition code
import Mathlib
import Definitions.Def_KServer_chunk_system_b
import Definitions.Def_KServer_bcr_induction

namespace KServer

variable {X : Type*} [MetricSpace X] {s t : X} {cLo cHi total price : ℝ} {mLo : ℕ}

/-- The time-`h` **atom** of the outcome `ω`: the set of outcomes that share its
history at time `h`.  The filtration of a chunk system is encoded by the map
`hist : ℕ → Ω → ℕ`, so the atoms are the fibres of `hist h`. -/
def ChunkSystemB.atom (C : ChunkSystemB X s t cLo cHi total price mLo) (h : ℕ)
    (ω : C.Ω) : Finset C.Ω :=
  Finset.univ.filter (fun ω' => C.hist h ω' = C.hist h ω)

/-- The **conditional expected remaining size** of a chunk system at time `h`:
the conditional expectation, given the time-`h` history, of the total size of
the chunks with index at least `h`,

  `F_h = E[ Σ_{j ≥ h} c_j | hist h ]`.

It is constant on each atom of `hist h`, and `F_0` is the expected total size. -/
noncomputable def ChunkSystemB.condRemaining
    (C : ChunkSystemB X s t cLo cHi total price mLo) (h : ℕ) (ω : C.Ω) : ℝ :=
  (∑ ω' ∈ C.atom h ω, C.P ω' *
      ∑ j ∈ Finset.univ.filter (fun j : Fin C.m => h ≤ (j : ℕ)), C.size ω' j)
    / (∑ ω' ∈ C.atom h ω, C.P ω')

/-- The **slow-decrement property** with parameter `cmax`: along every branch and
at every time, the conditional expected remaining size drops by at most `cmax`,

  `F_h - cmax ≤ F_{h+1}`  pointwise.

Since `c_h` is measurable with respect to the time-`h` history, the identity
`F_h = c_h + E[F_{h+1} | hist h]` always bounds the drop of `F` by `cmax` *in
conditional expectation*; the slow-decrement property demands the same bound
in every individual branch. -/
def ChunkSystemB.SlowDecrement
    (C : ChunkSystemB X s t cLo cHi total price mLo) (cmax : ℝ) : Prop :=
  ∀ (h : ℕ) (ω : C.Ω), C.condRemaining h ω - cmax ≤ C.condRemaining (h + 1) ω

/-- The output of Claim 13 with the slow-decrement property added: the
subchunk system on the next level whose conditional expected remaining size
never drops, in any branch, by more than the maximal subchunk size
`3 * 3 ^ w / 2`. -/
def BCRInductiveSubchunksStable (α : ℝ) (β : ℕ) (hβ : 0 < β) (w : ℕ) : Prop :=
  ∃ C : @ChunkSystemB (bcrLevel2 β hβ (w + 1)).carrier
      (bcrLevel2 β hβ (w + 1)).metric
      (bcrLevel2 β hβ (w + 1)).s (bcrLevel2 β hβ (w + 1)).t
      0 (3 * (3 : ℝ) ^ w / 2)
      ((α * β * ((w + 1 : ℕ) : ℝ) ^ 2) * 3 ^ (w + 1) + 3 * (3 : ℝ) ^ w)
      (2 * β * (3 : ℝ) ^ w) 0,
    (∀ ω₁ ω₂ : C.Ω, C.hist 0 ω₁ = C.hist 0 ω₂) ∧
      C.SlowDecrement (3 * (3 : ℝ) ^ w / 2)

/-- At time `0` with trivial initial information the conditional expected remaining size
is exactly the expected total size of the system. -/
theorem ChunkSystemB.condRemaining_zero
    (C : ChunkSystemB X s t cLo cHi total price mLo)
    (h0 : ∀ ω₁ ω₂ : C.Ω, C.hist 0 ω₁ = C.hist 0 ω₂) (ω : C.Ω) :
    C.condRemaining 0 ω = ∑ ω', C.P ω' * ∑ j, C.size ω' j := by
  have hatom : C.atom 0 ω = Finset.univ :=
    Finset.filter_true_of_mem fun ω' _ => h0 ω' ω
  have hidx : (Finset.univ.filter (fun j : Fin C.m => 0 ≤ (j : ℕ))) = Finset.univ :=
    Finset.filter_true_of_mem fun j _ => Nat.zero_le _
  simp only [ChunkSystemB.condRemaining, hatom, hidx, C.hPsum, div_one]

/-- The expected total size of a chunk system is a lower bound for the time-`0`
conditional expected remaining size. -/
theorem ChunkSystemB.total_le_condRemaining_zero
    (C : ChunkSystemB X s t cLo cHi total price mLo)
    (h0 : ∀ ω₁ ω₂ : C.Ω, C.hist 0 ω₁ = C.hist 0 ω₂) (ω : C.Ω) :
    total ≤ C.condRemaining 0 ω := by
  rw [C.condRemaining_zero h0 ω]; exact C.htotal

end KServer
Source
Bubeck, Coester, Rabani, Shortest paths without a map, but with an entropic regularizer, arXiv:2211.05753v2, Section 5 (chunk systems, Claim 13 and Lemma 15)

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