Theorem W, option (A), stage A2: the peak of the table procedures #
roomP_pk: the free label between two neighbours, below the upper one (a label, or2^βwithβ < K).tableInsert_pk: the insertion positionr + (1 − bf), at most the table's length.
Nothing here is used by Theorems A and B.
theorem
OrderMaintenance.Impl.roomCall_pk
{K KH W : ℕ}
{κ : Caps}
{s : Model.Core}
{L : Loc}
(hC : CapsW K κ)
(hK : 8 ≤ K)
(hW : 2 * K + 4 ≤ W)
{Γ : Machine.Reg → ℕ}
{args : List Exp}
{ds : List Machine.Reg}
(hG : Gd K KH κ Γ s L)
(ha : ∀ e ∈ args, Exp.OK Γ K KH W e ∧ Exp.vw Γ K KH K e ≤ K)
(hd : ∀ d ∈ ds, K ≤ Γ d)
:
theorem
OrderMaintenance.Impl.tableInsertCall_pk
{K KH W : ℕ}
{κ : Caps}
{s : Model.Core}
{L : Loc}
(hC : CapsW K κ)
(hK : 8 ≤ K)
(hW : 2 * K + 4 ≤ W)
{Γ : Machine.Reg → ℕ}
{args : List Exp}
{ds : List Machine.Reg}
(hG : Gd K KH κ Γ s L)
(ha : ∀ e ∈ args, Exp.OK Γ K KH W e ∧ Exp.vw Γ K KH K e ≤ K)
(hd : ∀ d ∈ ds, K ≤ Γ d)
:
PK K KH κ Γ W (tableInsertP.call args ds) s L