Documentation

LeanPool.OrderMaintenance.Proof.Word.TopWB

Theorem W, stage B2: the top structure's contract TopWB #

topWB: the top invariant of the cost proof (TIat TopInv P, the TI of insertAfter_cost in the final theorems, Impl/Caps.lean) satisfies TopWB with the job measure topMu, given room for labels and tags (TopRoom). The split's insertion is insertAround_wb, its new tags bounded by the top invariant after the split; a job step is jobStep_wb, and the node budget is node_step.

insertAfter_wb_top is insertAfter_wb at this instance, and room_wK gives the room at the candidate word size wK P = 64·L.

theorem OrderMaintenance.Proof.Word.markState_tag (t : Model.Core) (x y z : ℕ) (j : Model.Job) (c : ℕ) :
((markState t x y z j).C.getX c).tag = (t.C.getX c).tag

The top structure keeps the stored-value bound: TopWB for the cost proof's top invariant at parameters P, given room for labels and tags.

theorem OrderMaintenance.Proof.Word.insertAfter_wb_top {K : ℕ} {P : Model.Params} {n R : ℕ} {L : List ℕ} {s : Model.Core} {x : ℕ} (hC : CostInv (TIat Top.TopInv P) Top.topMu (Top.topJ P) n R L s) (hx : x ∈ L) (hk : 1 ≤ s.P.reservationBudget) (hRk : Top.topJ P / s.P.reservationBudget + 1 ≤ R) (hn : 1 ≤ n) (hsize : 2 + 2 * ((s.count + 1) / (s.P.theta + 1 - cmax s.P)) ≤ n + 1) (hcap : 2 + 2 * ((s.count + 1) / (s.P.theta + 1 - cmax s.P)) ≤ Top.capT s.P) (hI5 : ↑s.P.theta + ↑R * (Zeroing.Hn (n - 1) + 1) ≤ ↑s.P.T) (hh : ℕ) (hW : WB K s) (hL : LabRoom K s.P) (hTR : TopRoom K P) (hE : 4 * s.E.size + 8 ≤ 2 ^ K) (hG : s.Gs.size + 2 ≤ 2 ^ K) (hcnt : 2 * s.count + 4 ≤ 2 ^ K) (hNB : Impl.NodeB s) (hsP : s.P = P) (hNK : Impl.nb0 P + Top.topJ P * (2 + 2 * (s.count + 1)) + 2 ≤ 2 ^ K) :

A core insertion keeps the stored-value bound, at the cost proof's top invariant (insertAfter_wb with TopWB discharged by topWB). The node budget is that of NodeB (Impl/Caps.lean): nodes.size + topMu ≤ nb0 P + topJ P · C.size.

The room at the candidate word size #

Room at wK = 64·L for labels, tags and the construction's heights.