Theorem W, option (A), stage A2: the peak of the queue, list, element and group procedures #
For each procedure, PK: from a state with the invariant Gd (and, for the few that store a
computed value, a bound on it), the run computes nothing at or above 2^W, W ≥ 2K + 4, and
keeps the invariant. Most procedures are safe (Stm.Safe, closed by proveSafe); the others store
a label after its guard (afterS), a centre label 2^(B−1), a size plus one, or a loop counter.
The locals are at width K (ΓK), except the candidate label v of afterS, at width K + 1
(ΓV).
Nothing here is used by Theorems A and B.
Every local at width K, except the candidate label v of afterS, at K + 1.
Instances For
The locals of a chunk split step: v (of afterS) at width K + 1, the moved size mv at
K + 2, every other at K.
Instances For
The locals of an element insertion: the handle h at width KH, the candidate label v at
K + 1, every other at K.
Instances For
The locals of roomNextTo: the lower bound lo (a label plus one) at width K + 1.
Instances For
Close Stm.Safe of a concrete statement (after its definitions are unfolded).
Equations
- OrderMaintenance.Impl.tacticProveSafe = Lean.ParserDescr.node `OrderMaintenance.Impl.tacticProveSafe 1024 (Lean.ParserDescr.nonReservedSymbol "proveSafe" false)
Instances For
Safe procedures #
Rules for the procedures below #
Close a width goal Exp.wq … ≤ W or Exp.vw … ≤ w of a concrete expression.
Equations
- OrderMaintenance.Impl.tacticProveWidth = Lean.ParserDescr.node `OrderMaintenance.Impl.tacticProveWidth 1024 (Lean.ParserDescr.nonReservedSymbol "proveWidth" false)
Instances For
Labels: afterS, and the centre label #
The centre label 2^(B − 1) with B ≤ K: an assignment below 2^K.
More rules #
An assignment whose value is known, then the rest.
A safe assignment whose value is known, then the rest.
A call with argument expressions of width K; the body's bound is given for the
callee's entry frame.
Run a safe first statement of a sequence.
Equations
- OrderMaintenance.Impl.tacticPeelSafe = Lean.ParserDescr.node `OrderMaintenance.Impl.tacticPeelSafe 1024 (Lean.ParserDescr.nonReservedSymbol "peelSafe" false)
Instances For
Group labels and moves #
The tail of labAfter and of the left label of a move: a, D, B := prm k, afterS.
Reads #
The tail of a group split step, the split start, the removal #
A group split step and the drive #
A group split step, given the size bound of the group that receives the element (after
the move, at the local d the move sets).