M5: weights, drain timing and label room after a chunk split #
After the split, y and z sit below x's live ancestors, so those weigh 2 more while their
stored weights lag: they are the job's pending nodes. A ghost one of whose targets is above x
is funded by the job.
The live ancestors as an up-chain #
Sums over entries #
Weights after the split #
theorem
OrderMaintenance.Proof.Top.ins_filter_len
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
(p : ℕ → ℕ → Prop)
[(a b : ℕ) → Decidable (p a b)]
(u : ℕ)
:
Filtering the chunk list after the split, for a predicate on the chunk each one stands for.
theorem
OrderMaintenance.Proof.Top.ins_rng_len
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
{u : ℕ}
(hu : 1 ≤ ht (ts s) u)
(hH : ht (ts s) u ≤ s.P.H)
:
theorem
OrderMaintenance.Proof.Top.ins_ew_live
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
{u : ℕ}
(hu : liveN (ts s) u)
:
theorem
OrderMaintenance.Proof.Top.ins_ew_ghost
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
{u : ℕ}
(hu : ghostN (ts s) u)
:
theorem
OrderMaintenance.Proof.Top.ins_time
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
(hTP : TopParams s.P)
:
The drain timing after the split, the job at its start.
theorem
OrderMaintenance.Proof.Top.ins_ew_up
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
{X h : ℕ}
(hX : isN (ts s) X)
(hh : ht (ts s) X = h)
(h1 : 1 ≤ h)
(hH : h ≤ s.P.H)
(hm : anc (ts s) x (h - 1) ∈ order (ts s) X)
(hl : h = 1 ∨ liveN (ts s) (anc (ts s) x (h - 1)))
:
A node whose table holds x's live ancestor of height h - 1 serves 2 more after the split.
theorem
OrderMaintenance.Proof.Top.ins_room
{s : Model.Core}
{cl : List ℕ}
{ord : ℕ → List ℕ}
{dr n0 : ℕ → ℕ}
(hI : InvJ (ts s) cl ord dr n0 none)
(hcs : ∀ (c : ℕ), c ∈ cl ↔ 1 ≤ c ∧ c < s.C.size)
{x : ℕ}
(hx : x ∈ cl)
{f1x i1 : ℕ}
{t : TS}
(F : InsFrame s x f1x i1 t)
(hTP : TopParams s.P)
:
The label room after the split.