Documentation

LeanPool.OrderMaintenance.Proof.Word.PeakSD

Theorem W, option (A), stage A2: the peak of a drain start (startDrain) #

All locals at width K, except the weight sums t, b, ws at K + 9 (ΓD).

Nothing here is used by Theorems A and B.

Runs #

theorem OrderMaintenance.Impl.evalF_push_inv {κ : Caps} {s s' : Model.Core} {L L' : Loc} {n : ℕ} {t : Tbl} {x : Machine.Reg} (h : evalF κ (Stm.push t x) s L = Res.ok s' L' n) :
theorem OrderMaintenance.Impl.Fld.set_nodes {κ : Caps} {s s' : Model.Core} {f : Fld} {i v : ℕ} (h : set κ s i v f = some s') :
theorem OrderMaintenance.Impl.newNodes_ne {κ : Caps} {s s' : Model.Core} {L L' : Loc} {n : ℕ} (h : evalF κ newNodesS s L = Res.ok s' L' n) :
L' "v1" ≠ L' "v2"

The two new nodes of a drain start differ.

theorem OrderMaintenance.Impl.findCall_le {κ : Caps} {s s' : Model.Core} {L L' : Loc} {n : ℕ} {k : LK} {a b : Exp} (hE : EncOK κ s) (h : evalF κ ((findP k).call [a, b] ["r"]) s L = Res.ok s' L' n) :
L' "r" ≤ κ.lcap k ∧ s' = s

The position found by find is at most the list capacity.

The drain start #

theorem OrderMaintenance.Impl.PKok.seqF {K KH W : ℕ} {κ : Caps} {Γ Γ' : Machine.Reg → ℕ} {Q : Model.Core → Prop} {c d : Stm} {s : Model.Core} {L : Loc} (hc : PKok K KH κ Γ' W c s L) (hF : Fin Q (c;; d) s L) (hd : ∀ (s1 : Model.Core) (L1 : Loc) (n1 : ℕ), evalF κ c s L = Res.ok s1 L1 n1 → Gd K KH κ Γ' s1 L1 → Fin Q d s1 L1 → PKok K KH κ Γ W d s1 L1) :
PKok K KH κ Γ W (c;; d) s L

Sequencing a PKok first statement, passing the end-state bound on.

theorem OrderMaintenance.Impl.gdD_lt {K KH : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hG : Gd K KH κ (ΓD K) s L) {x : Machine.Reg} (hx : ¬(x = "t" ∨ x = "b" ∨ x = "ws")) :
L x < 2 ^ K
theorem OrderMaintenance.Impl.insS_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓD2 K) s L) :
PK K KH κ (ΓD2 K) W insS s L

The insertion of the two new nodes into the tables that contain v (insS); its locals a, b (the room labels) at width K.

theorem OrderMaintenance.Impl.newTab_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcapT : κ.lcap LK.table < 512) (hG : Gd K KH κ (ΓD K) s L) :
PK K KH κ (ΓD K) W newTabS s L

The table of a new node (newTabS).

theorem OrderMaintenance.Impl.stage3_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcapT : κ.lcap LK.table < 512) (hG : Gd K KH κ (ΓD K) s L) :
PK K KH κ (ΓD K) W stage3S s L

The tables of the two new nodes (stage3S).

theorem OrderMaintenance.Impl.chS_pkok {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcap : κ.lcap LK.children < 512) (hG : Gd K KH κ (ΓD K) s L) (hF : Fin (FBat K KH κ (Fld.n NF.weight) (L "u")) chS s L) :
PKok K KH κ (ΓD K) W chS s L

The children of a new node and its weight (chS at u): the weight sum of at most 511 children, written once, bounded by the end state.

theorem OrderMaintenance.Impl.stage56_pkok {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcap : κ.lcap LK.children < 512) (hG : Gd K KH κ (ΓD K) s L) (hne : L "v1" ≠ L "v2") (hF : Fin (FB K KH κ (Fld.n NF.weight)) stage56S s L) :
PKok K KH κ (ΓD K) W stage56S s L

The children of the two new nodes (stage56S), the new nodes v1 ≠ v2.

theorem OrderMaintenance.Impl.stage7_pk {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hG : Gd K KH κ (ΓD K) s L) :
PK K KH κ (ΓD K) W stage7S s L

The parent's children (stage7S): the position r + 1 after find.

theorem OrderMaintenance.Impl.sdMain_pkok {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcap : κ.lcap LK.children < 512) (hcapT : κ.lcap LK.table < 512) (hG : Gd K KH κ (ΓD K) s L) (hF : Fin (FB K KH κ (Fld.n NF.weight)) sdMain s L) :
PKok K KH κ (ΓD K) W sdMain s L

The main part of a drain start (sdMain).

theorem OrderMaintenance.Impl.startDrain_pkok {K KH W : ℕ} {κ : Caps} {s : Model.Core} {L : Loc} (hC : CapsW K κ) (hK : 8 ≤ K) (hW : 2 * K + 4 ≤ W) (hcap : κ.lcap LK.children < 512) (hcapT : κ.lcap LK.table < 512) (hG : Gd K KH κ (ΓD K) s L) (hF : Fin (FB K KH κ (Fld.n NF.weight)) startDrainS s L) :
PKok K KH κ (ΓD K) W startDrainS s L

A drain start (startDrainS), the new nodes' weights bounded by the end state.