M6: removing from lists #
eraseIdxP k: remove elementpof listkof recordi(List.eraseIdx): the tail shifts left by one, then the last cell goes.filterP k: keep the elements whose key is notx(List.filter, Level F'sassocErase): the kept elements are compacted in place, then the list shrinks.
Element src of list k of record i is copied to position dst.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
OrderMaintenance.Impl.mvS_ok
{κ : Caps}
{k : LK}
{s : Model.Core}
{L : Loc}
{i q q' : ℕ}
{B : List (ℕ × ℕ)}
{dst src : Exp}
(hLi : L "i" = i)
(hd : ∀ (S : Model.Core), Exp.ev κ S L dst = some q)
(hs : ∀ (S : Model.Core), Exp.ev κ S L src = some q')
(hq : q < B.length)
(hq' : q' < B.length)
(hr : LK.recOk s i k = true)
(hir : i < κ.lrec k)
(hv : LK.valid B k = true)
(hlen : B.length ≤ κ.lcap k)
:
Removing an element #
The list after t steps of shifting the tail of l left over position p.
Equations
Instances For
Procedure removing the list entry at a specified index.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
OrderMaintenance.Impl.eraseIdxP_agree
(κ : Caps)
(k : LK)
(s : Model.Core)
(L : Loc)
{i p : ℕ}
(hi : L "i" = i)
(hp : L "p" = p)
(hpl : p < (LK.view s i k).length)
(hid : LK.idOk s i k)
(hr : LK.recOk s i k = true)
(hir : i < κ.lrec k)
(hcap : (LK.view s i k).length ≤ κ.lcap k)
:
eraseIdxP computes eraseIdx.
Filtering by key #
Retain one list entry when its key differs from the key being filtered out.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Procedure filtering every occurrence of a key from a stored list.
Equations
- One or more equations did not get rendered due to their size.