M5: running startDrain #
The data startDrain v computes from the state (children, weights, the cut, the sides, the two
parts), and its run as a sequence of pure state updates.
The data #
Height of the node whose drain is being started.
Equations
- OrderMaintenance.Proof.Top.sH t v = (t.nodes.getX v).height
Instances For
Live children of the node whose drain is being started.
Equations
- OrderMaintenance.Proof.Top.sKids t v = (t.nodes.getX v).children
Instances For
Weight of an entry at the drain source's height.
Equations
Instances For
The source's child weights in live-list order.
Equations
Instances For
The adjacent-child restriction used to choose a drain cut.
Equations
Instances For
Index of the selected balanced cut in the source's child list.
Equations
Instances For
The child at the selected cut, or zero beyond the child list.
Equations
Instances For
Table entries whose sides must be assigned when this drain starts.
Equations
Instances For
The checked side assignment for the source's table entries.
Equations
Instances For
Table entries assigned to the left drain target.
Equations
- OrderMaintenance.Proof.Top.sLeft t v side = List.filter (fun (x : ℕ) => OrderMaintenance.Model.lookup side x == some OrderMaintenance.Model.Side.left) (OrderMaintenance.Proof.Top.sEntries t v)
Instances For
Table entries assigned to the right drain target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Live children assigned to the left drain target.
Equations
- OrderMaintenance.Proof.Top.sCh1 t v side = List.filter (fun (x : ℕ) => OrderMaintenance.Model.lookup side x == some OrderMaintenance.Model.Side.left) (OrderMaintenance.Proof.Top.sKids t v)
Instances For
Live children assigned to the right drain target.
Equations
- OrderMaintenance.Proof.Top.sCh2 t v side = List.filter (fun (x : ℕ) => OrderMaintenance.Model.lookup side x == some OrderMaintenance.Model.Side.right) (OrderMaintenance.Proof.Top.sKids t v)
Instances For
The updates #
addTable h w e, as a state update.
Equations
- One or more equations did not get rendered due to their size.
Instances For
setParent h w e, as a state update.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The two new nodes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
v1, v2 around v in every table holding v.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The tables of the two newly allocated targets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The entries learn their new tables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The children of the first target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The children of the second target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The state after starting the drain of the selected node.
Equations
- One or more equations did not get rendered due to their size.