Lemmas C1 and C2: the chunk drive #
driveChunkFrom x makes chunkBudget chunk-split moves of x, each moving one unit to the lighter
sibling, or removes x once it is empty. With the units counted as in C1, the split ends
within k_C(s₀) insertions, and the siblings then hold at most c_max ≤ θ elements each (C2).
The extra invariant of the chunk drive survives its steps; a move also finds room for the moved groups' labels (Lemma C3 provides it).
- moveL (t : Model.Core) (A' : Abs) (gh : GGh) : INV t A' → A'.elist = L → (GInv t L gh fun (x : ℕ) => 0) → CInvE t L δ δu s₀ x → LiveC t x → cSt t x = Model.St.splitting → cF t x ≠ Model.NIL → cSz t (cLl t x) ≤ cSz t (cRr t x) → FamBound t δ s₀ x → X t → ∃ (labs : List ℕ), EStateM.run (pushLabsL t x (Model.unitCand t x true).length) t = EStateM.Result.ok labs t ∧ X (cmoveLState t x (Model.unitCand t x true) labs)
- moveR (t : Model.Core) (A' : Abs) (gh : GGh) : INV t A' → A'.elist = L → (GInv t L gh fun (x : ℕ) => 0) → CInvE t L δ δu s₀ x → LiveC t x → cSt t x = Model.St.splitting → cF t x ≠ Model.NIL → cSz t (cRr t x) < cSz t (cLl t x) → FamBound t δ s₀ x → X t → ∃ (labs : List ℕ), EStateM.run (pushLabsR t x (Model.unitCand t x false).length) t = EStateM.Result.ok labs t ∧ X (cmoveRState t x (Model.unitCand t x false) labs)
Instances For
The chunk drive's invariant after j moves of x's split.
Instances For
The chunk drive ended.
- ef : EFrame s t
Instances For
Facts used by the step #
The units at an end of a chunk, as needed for a move.
An empty source leaves both siblings within the common chunk and threshold bounds.
Closing a chunk drive: C1 holds again for the family of x, and nothing else was exempt.
Lemmas C1 and C2 for one chunk drive. Driving the family of x after at most one undriven
insertion into it ends with the chunk invariant restored (no undriven insertion): either x has
made chunkBudget moves and C1 holds again, or x was removed and its siblings are quiet
chunks of size at
most c_max ≤ θ.