Lemma C3: group labels inside chunks (docs/PROOF.md §4.3) #
A chunk's group labels change through split starts (a halving of each gap next to the splitting group, or a push at an end of the chunk), group removals (two gaps merge), and chunk-split moves (groups pushed at the receiving end; groups leaving at the other chunk's end).
The Lean proof counts all halvings of a chunk X in one ghost counter hv X (each split start
in X halves at most two gaps), instead of following each gap's halving history as PROOF.md
does. Split starts are bounded as in PROOF.md:
- child splits (
cs X), by the charging argument of Claim 2:cs X · g_min ≤ ins X ≤ I_C; - root splits (
rs X): each root splits at most once, and the roots are the arrived groups andX's first group; - arrivals (
arB X,arF X): the source chunk moves at mostunits(s₀) + k_Cunits, of at most three groups each.
Pushes are counted per end, as in PROOF.md. The coarser halving count needs a wider group label:
groupBits ≈ 30L bits for the proof parameters instead of about 9L, still Θ(L).
Constants #
Units a chunk-split source moves, at most: units(T) + k_C(T).
Equations
Instances For
Insertions into a chunk over its life, at most: T + 2 k_C(T).
Equations
- OrderMaintenance.Proof.IC P = P.T + 2 * OrderMaintenance.Proof.kC P P.T
Instances For
Child splits in a chunk's life, at most.
Instances For
Root splits in a chunk's life, at most.
Equations
Instances For
Halvings in a chunk's life, at most.
Equations
Instances For
Pushes at one end of a chunk, at most.
Equations
Instances For
The centre of the group label range.
Equations
- OrderMaintenance.Proof.cG P = 1 <<< (P.groupBits - 1)
Instances For
The parameter conditions for group labels (I10, in the coarser form).
Instances For
Ghost state #
Ghost counters tracking each chunk’s label halvings, splits, pushes and arrivals.
A group created by a split start in its current chunk, and not moved since.
Halvings, child splits, root splits, insertions of a chunk.
Child splits started in each chunk.
Root splits started in each chunk.
Insertions charged to each chunk.
Pushes at the back and front, and groups arrived at the back and front.
Label pushes at the front of each chunk.
Groups arriving at the back of each chunk.
Groups arriving at the front of each chunk.
The size of a quiet chunk when it became quiet.
Instances For
Counts over the groups of a chunk #
The groups of chunk c (as indices).
Equations
- OrderMaintenance.Proof.GrpsC s c = {g ∈ Finset.range s.Gs.size | OrderMaintenance.Proof.LiveG s g ∧ OrderMaintenance.Proof.gC s g = c}
Instances For
Unsplit roots of chunk c: groups that are neither children nor splitting.
Equations
- OrderMaintenance.Proof.pending s lg c = {g ∈ OrderMaintenance.Proof.GrpsC s c | lg.child g = false ∧ OrderMaintenance.Proof.gSt s g ≠ OrderMaintenance.Model.St.splitting}.card
Instances For
The charge waiting to be converted into child splits (Claim 2): a family whose children were
created in c carries its insertions, a quiet child carries its progress towards a split.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The size of the family of a splitting chunk.
Equations
Instances For
The invariant #
Group-label separation, range and charging bounds across chunk phases.
- gaps (g : ℕ) : LiveG s g → g ≠ cLs s (gC s g) → gL s g + s.P.groupSpacing / 2 ^ lg.hv (gC s g) ≤ gL s (gN s g)
Gaps between consecutive groups of a chunk survive the chunk's halvings.
- range (g : ℕ) : LiveG s g → cG s.P ≤ gL s g + lg.pf (gC s g) * s.P.groupSpacing ∧ gL s g ≤ cG s.P + lg.pb (gC s g) * s.P.groupSpacing
Labels stay within the pushes from the centre.
Halvings and pushes, counted through split starts and arrivals.
Claim 2: child splits, paid for by insertions.
Insertions by phase.
- arrS (x : ℕ) : LiveC s x → cSt s x = Model.St.splitting → lg.arB (cLl s x) + lg.arF (cLl s x) + lg.arB (cRr s x) + lg.arF (cRr s x) + 3 * units s x + 3 * (δ (cLl s x) + δ x + δ (cRr s x)) + 3 * s₀ x ≤ 3 * (unitsOf s.P (s₀ x) + famC s x) + 3 * δu x
Arrivals: a source's moved units, and the frozen total afterwards.
The quiet size at the start of the quiet period.
- famChild (p : ℕ) : LiveG s p → gSt s p = Model.St.splitting → lg.child (gLl s p) = lg.child (gRr s p)
The two siblings of a family are children of the same split, or both arrived.
Instances For
The labels of a split start #
The guard conditions of labBefore, when it succeeds.
Across a split start #
The ghost update of a split start of g (new groups gl, gr, in chunk c).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The group before a non-first group of a chunk lies in the same chunk, right before it.
Unsplit roots after a split start: the splitting group stops being one.
One group's term in charge.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The charge after a split start: a quiet child's g_min became a child split.
Starting a group split preserves the gap between consecutive labels.
The group-label invariant across a split start.
Across a split move #
The group-label invariant across a split move (an element moves inside a family).
Across a group removal #
Removing a split family keeps the count of pending root splits unchanged.
The group-label invariant across a group removal: two gaps merge, the siblings become quiet, and the family's charge pays for theirs.
Across an insertion #
What an insertion into group g changes for the label invariant (the element link and the
chunk-size update): the sizes of g and of its chunk.
Instances For
The group whose charge an insertion into g may raise: g, or its family's source.
Equations
Instances For
The group-label invariant across an insertion: the chunk's insertion count grows with its size and its charge.