Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 7 — a law-independent empirical caching learner attains every larger factor

Open
NonuniformCompetitive.Snoopy.Supplement.theorem_7

by mikedeng1 · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisonline-algorithmsp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1

For every integral transfer cost p≥1p\ge1p≥1 there is one deterministic empirical threshold policy fpf_pfp​, independent of all run laws, with the following property. For every fixed finite block address space, every positive number of processors, every initial block-state family and every collection of iid run-length laws PbP_bPb​ on N\mathbb NN,

∀c>epep−1 ∃a∈R ∀(Nb):ECfp≤c ECopt+a,ep=(1+1/p)p.\forall c>\frac{e_p}{e_p-1}\ \exists a\in\mathbb R\ \forall (N_b):\qquad \mathbf E C_{f_p}\le c\,\mathbf E C_{opt}+a,\qquad e_p=(1+1/p)^p.∀c>ep​−1ep​​ ∃a∈R ∀(Nb​):ECfp​​≤cECopt​+a,ep​=(1+1/p)p.

The expectations use actual causal cache costs on the run inputs. All finite per-block horizons and all valid processor changes are covered. Blocks can have different laws and arbitrary cross-block dependence. The policy minimizes empirical complete-run cost over A0,…,ApA_0,\ldots,A_pA0​,…,Ap​ using all prior runs; its first choice is ApA_pAp​.

This is an exact every-strict-factor guarantee, with no moment or finite-support assumptions. The additive constant depends on the fixed instance, the laws and ccc, not on the input horizon.

Differences from the source:

  • encoding: a fixed unlimited-cache multiprocessor address space with possibly different laws per block → an arbitrary finite block type and sums of the projected block costs; reason: §2 uses finite task systems; all finite address spaces and all interleavings are represented
  • encoding: independent successive run lengths for each block → every joint input law with iid per-block marginals, and arbitrary adjacent-distinct run owners; reason: cost is invariant under interleaving and renaming active processors, so no cross-block independence is added
  • encoding: a deterministic adaptive learner obtained from the source mixture → the named empirical minimizer over the mixture support 0 through p, with A_p initially; reason: the finite family already has a member within the source ratio by the averaging argument on p. 557; this fixes an explicit witness without excluding any input law
  • encoding: c-competitive for all c above e_p/(e_p−1) → the learner is chosen before the instance laws and c, with a before every horizon; reason: this makes distribution independence and the additive-constant quantifiers explicit
Preamble
import Mathlib
import Definitions.Def_NonuniformCompetitive_Snoopy_Supplement_cacheLearning
Formal statement
namespace NonuniformCompetitive.Snoopy.Supplement

open MeasureTheory

/-- Theorem 7, pp.556–557. A single deterministic law-independent per-block
threshold learner works for all iid laws, all strict factors, and every fixed
finite unlimited-cache instance. No moment bound on run lengths is imposed.
All finite address spaces and any interleavings of their runs are covered;
separate blocks need not be independent. -/
theorem theorem_7 (p : ℕ) (hp : 1 ≤ p) :
    ∃ f : CachePolicy p, f = empiricalCachePolicy p ∧ ∀ (B : Type) [Fintype B] (n : ℕ), 1 ≤ n →
      ∀ (s₀ : B → NonuniformCompetitive.Snoopy.State n) (P : B → Measure ℕ),
        (∀ b, IsProbabilityMeasure (P b)) →
        ∀ c : ℝ, NonuniformCompetitive.Snoopy.ep p / (NonuniformCompetitive.Snoopy.ep p - 1) < c →
          CacheIIDCompetitive f s₀ P c := by sorry

end NonuniformCompetitive.Snoopy.Supplement
Source
Karlin, Manasse, McGeoch, Owicki, Competitive Randomized Algorithms for Nonuniform Problems, Algorithmica 11 (1994), DOI 10.1007/BF01189993, p. 556, Theorem 7 and governing context

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