Chunks: Lemmas C1 and C2 (docs/PROOF.md §4.3) #
The chunk-level cost invariant CInvE.
- A unit of a chunk is a group family or a quiet group:
units s ccounts the groups ofcthat are not overflow groups (a family is counted through its splitting member). A chunk-split move transfers exactly one unit (fix 3, invariant F). - C1: a splitting chunk
xthat started splitting with sizes₀ ≤ Tsatisfiesunits(x) + (chunkBudget − 1)(t − s₀) ≤ ⌊s₀/g_min⌋ + 1, wheret ≥ s₀is its family's size, and its siblings' sizes differ by at mostu_max = G + k_G. - C2: a chunk that becomes quiet has size at most
c_max ≤ θ.
As for groups, δ c counts undriven insertions into chunk c, and δu c the units that the
group phase of such an insertion added to c.
Accessors and counts #
The element count stored in a chunk.
Equations
- OrderMaintenance.Proof.cSz s c = (s.C.getX c).size
Instances For
The current split state of a chunk.
Equations
- OrderMaintenance.Proof.cSt s c = (s.C.getX c).st
Instances For
The source chunk recorded by an overflow chunk.
Equations
- OrderMaintenance.Proof.cSrc s c = (s.C.getX c).src
Instances For
The left sibling recorded by a splitting chunk.
Equations
- OrderMaintenance.Proof.cLl s c = (s.C.getX c).l
Instances For
The right sibling recorded by a splitting chunk.
Equations
- OrderMaintenance.Proof.cRr s c = (s.C.getX c).r
Instances For
A chunk of the chunk list (chunks are never freed).
Instances For
Equations
Equations
The elements of chunk c, in list order.
Equations
- OrderMaintenance.Proof.celts s L c = List.filter (fun (e : ℕ) => decide (OrderMaintenance.Proof.gC s (OrderMaintenance.Proof.eG s e) = c)) L
Instances For
The groups of chunk c that count as its units: not overflow groups.
Equations
Instances For
Equations
The units of chunk c.
Equations
- OrderMaintenance.Proof.units s c = (Finset.filter (OrderMaintenance.Proof.UnitG s c) (Finset.range s.Gs.size)).card
Instances For
Constants #
The largest unit: a family.
Equations
Instances For
Units of a chunk of size s₀, at most.
Equations
- OrderMaintenance.Proof.unitsOf P s₀ = s₀ / OrderMaintenance.Proof.gmin P + 1
Instances For
k_C(s₀): insertions into a chunk's family until its split ends.
Equations
- OrderMaintenance.Proof.kC P s₀ = OrderMaintenance.Proof.unitsOf P s₀ / (P.chunkBudget - 1) + 1
Instances For
The size of a freshly quiet chunk, at most.
Equations
- OrderMaintenance.Proof.cmax P = (P.T + OrderMaintenance.Proof.kC P P.T + OrderMaintenance.Proof.umax P + 1) / 2
Instances For
The parameter conditions for the chunk level (I3, I4).
Instances For
The invariant #
C1 bounds the family-size excess by its initial unit budget.
The common family size and balance bounds used by every chunk-drive simulation.
The chunk-level invariant, exempting the C1 conditions of the family of ex.
Instances For
The chunk-level invariant with no family exempt.
Equations
- OrderMaintenance.Proof.CInv s L δ δu s₀ = OrderMaintenance.Proof.CInvE s L δ δu s₀ OrderMaintenance.Model.NIL
Instances For
Counting units #
A unit count after removing one counted group and adding two.