Documentation

LeanPool.OrderMaintenance.Proof.Cost.Budget

A chunk's budget #

Whatever its phase, a chunk's arrivals stay within 3·M_u and its insertions within I_C. For a quiet chunk this uses its size bound (Lemma R); for a family it uses Lemma C1.

theorem OrderMaintenance.Proof.C1.fam_le {s : Model.Core} {δ δu s₀ : ℕ → ℕ} {x : ℕ} (h : C1 s δ δu s₀ x) (hK : 2 ≤ s.P.chunkBudget) :
famC s x ≤ s₀ x + (δ (cLl s x) + δ x + δ (cRr s x)) + (kC s.P s.P.T - 1) ∧ s₀ x ≤ cSz s (cLl s x) - δ (cLl s x) + (cSz s x - δ x) + (cSz s (cRr s x) - δ (cRr s x)) ∧ cSz s (cLl s x) - δ (cLl s x) + (cSz s x - δ x) + (cSz s (cRr s x) - δ (cRr s x)) - s₀ x ≤ kC s.P s.P.T - 1

The family of a splitting chunk, by C1: its size exceeds s₀ by less than k_C(T), counting the undriven insertions.

theorem OrderMaintenance.Proof.chunk_budget {s : Model.Core} {L : List ℕ} {lg : LGh} {s₀ δ δu : ℕ → ℕ} (hC : CInv s L δ δu s₀) (hL : LInv s lg s₀ δ δu) (hCP : CParams s.P) {c : ℕ} (hcL : LiveC s c) (hnd : cSt s c ≠ Model.St.dead) (hδ1 : ∀ (x : ℕ), LiveC s x → cSt s x = Model.St.splitting → δ (cLl s x) + δ x + δ (cRr s x) ≤ 1) (hq : cSt s c = Model.St.quiet → cSz s c ≤ s.P.T + 1) :
lg.arB c + lg.arF c ≤ 3 * Mu s.P ∧ lg.ins c ≤ IC s.P

A chunk's budget: arrivals within 3·M_u, insertions within I_C.

theorem OrderMaintenance.Proof.CInvE.drop {s : Model.Core} {L : List ℕ} {δ δu s₀ : ℕ → ℕ} {ex : ℕ} (hC : CInvE s L δ δu s₀ ex) (hδ : ∀ (x : ℕ), LiveC s x → cSt s x = Model.St.splitting → δ (cLl s x) = 0 ∧ δ x = 0 ∧ δ (cRr s x) = 0 ∧ δu x = 0) :
CInvE s L (fun (x : ℕ) => 0) (fun (x : ℕ) => 0) s₀ ex

Undriven insertions outside every family can be forgotten (chunk invariant).

theorem OrderMaintenance.Proof.LInv.drop {s : Model.Core} {lg : LGh} {s₀ δ δu : ℕ → ℕ} (hL : LInv s lg s₀ δ δu) (hδ : ∀ (x : ℕ), LiveC s x → cSt s x = Model.St.splitting → δ (cLl s x) = 0 ∧ δ x = 0 ∧ δ (cRr s x) = 0 ∧ δu x = 0) :
LInv s lg s₀ (fun (x : ℕ) => 0) fun (x : ℕ) => 0

Undriven insertions outside every family can be forgotten (label invariant).