Lemma 5.2 — LRU's cache is a window of distinct recent requests
ProvedChangingCache.UpperBound.lemma_5_2cachingcompetitive-analysislrup2o-batch-stoc27ap2o-gran-per-chapterp2o-plan-paperp2o-v1pagingresource-augmentation
Consider a reduced run of length under augmentation, and write .
- After request (), LRU holds exactly the pages , which are distinct.
- is nondecreasing in .
- Consequently, a page requested at a step with is in LRU after every step with .
This is the window property that replaces Sleator and Tarjan's fixed-cache phases: in normal form LRU's cache is always a block of the most recent requests.
Differences from the source:
- encoding: a page is an identifier; a request sequence is a finite list → pages are elements of an arbitrary type with decidable equality; the sequence is a
List, request is the 0-based entryσ[i]and position is the moment after the first requests; reason: Lean convention; same instances - encoding: a legal policy may discard pages at any time; on its -th miss the loaded page must fit capacity → a policy is the family of pages held after the first requests, including the discards made before request : , , and at its -th miss; reason: moving a discard earlier, to just after the previous request, changes no hit, miss or capacity check; this is the placement the source itself uses in (R3) and Eq. (5)
- encoding: (Eq. (3)) →
augCap 2 3 m kwith the real speed ; reason: the same capacity law as Section 4 at ; it equals - encoding: a reduced run of OPT and LRU on a memory profile →
IsReduced 2 3 m σ S: is a memory profile, is an optimal legal policy for on , and (R1)–(R3) hold; reason: Definition 4.1 transcribed; OPT is a designated optimal policy of the run - encoding: LRU holds exactly the pages , which are distinct; → , the list
(σ.take i).drop (i - c i)has no duplicates and its set of entries is ; is compared in ; reason: the window presupposes ; the integer form avoids truncated subtraction - encoding: a page requested at step → the entry
σ[i' - 1], for ; reason: 0-based list indexing
Preamble
import Mathlib import Definitions.Def_ChangingCache_UpperBound_NormalForm
Formal statement
namespace ChangingCache.UpperBound
/-- **Lemma 5.2**, p. 12. In a reduced run under `(2, 3)` augmentation, write `c(i) = |P_LRU(i)|`.
1. After request `σ_i` (`0 ≤ i ≤ n`), LRU holds exactly the pages `σ_{i-c(i)+1}, …, σ_i`, which are
distinct (in particular `c(i) ≤ i`);
2. `i - c(i)` is nondecreasing in `i`;
3. consequently, a page requested at a step `i'` with `i - c(i) < i' ≤ i` is in LRU after every step
`u` with `i' ≤ u ≤ i`. -/
theorem lemma_5_2 {α : Type*} [DecidableEq α] (m : ℕ → ℕ) (σ : List α) (S : ℕ → Finset α)
(hred : IsReduced 2 3 m σ S) :
(∀ i ≤ σ.length,
(lruCache (augCap 2 3 m) σ i).card ≤ i ∧
((σ.take i).drop (i - (lruCache (augCap 2 3 m) σ i).card)).Nodup ∧
lruCache (augCap 2 3 m) σ i =
((σ.take i).drop (i - (lruCache (augCap 2 3 m) σ i).card)).toFinset) ∧
(∀ i j, i ≤ j → j ≤ σ.length →
(i : ℤ) - ((lruCache (augCap 2 3 m) σ i).card : ℤ) ≤
(j : ℤ) - ((lruCache (augCap 2 3 m) σ j).card : ℤ)) ∧
(∀ i ≤ σ.length, ∀ i', 1 ≤ i' → i' ≤ i →
(i : ℤ) - ((lruCache (augCap 2 3 m) σ i).card : ℤ) < (i' : ℤ) →
∀ u, i' ≤ u → u ≤ i → ∀ p ∈ σ[i' - 1]?, p ∈ lruCache (augCap 2 3 m) σ u) := by sorry
end ChangingCache.UpperBound
Source
Michael A. Bender, Daniel DeLayo, Pritom Kundu, Charlie McGuffey, Zofia Stefankovic, Zhonglue Wang, STOC 2027 submission #93 (October 2026), Caching with a Changing Cache Size, SHA-256 9d5334fdae9f69a8802bcb33b61c3699463aa88862a32b7bb8d17bd3efdf533d, Lemma 5.2, p. 12
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.