The live handles of a core #
The client sees a core through the handles of its live elements, in list order:
liveH c l = (l.filter live).map h. This file relates it to insertion, deletion, order queries
and appending, for generic p (live) and f (handle).
Filter-map lemmas #
Filter element indices by liveness and map the retained indices to their handles.
Equations
- OrderMaintenance.Proof.FM p f l = List.map f (List.filter p l)
Instances For
Cores seen through handles #
Read the liveness flag of an element in a core.
Equations
- OrderMaintenance.Proof.live c e = (c.E.getX e).live
Instances For
Read the external handle stored in an element.
Equations
- OrderMaintenance.Proof.hdl c e = (c.E.getX e).h
Instances For
@[reducible, inline]
List the live external handles in an ordered list of element indices.
Equations
Instances For
idx maps every handle of L to a live element with that handle.
Equations
- OrderMaintenance.Proof.IdxOK c A idx L = ∀ x ∈ L, idx.getX x ∈ A.elist ∧ OrderMaintenance.Proof.live c (idx.getX x) = true ∧ OrderMaintenance.Proof.hdl c (idx.getX x) = x
Instances For
theorem
OrderMaintenance.Proof.core_insert
{c : Model.Core}
{A : Abs}
(hR : CoreR c A)
{xi : ℕ}
(hx : xi ∈ A.elist)
(hh : ℕ)
:
∃ (c' : Model.Core) (A' : Abs),
EStateM.run (Model.insertAfter xi hh) c = EStateM.Result.ok c.E.size c' ∧ CoreR c' A' ∧ A'.elist = Spec.insertAfterL xi c.E.size A.elist ∧ (∀ e ∈ A.elist, live c' e = live c e ∧ hdl c' e = hdl c e) ∧ live c' c.E.size = true ∧ hdl c' c.E.size = hh ∧ c.E.size ∉ A.elist ∧ c.E.size ≠ Model.NIL ∧ c'.head = c.head ∧ c'.P = c.P
Core insertion through handles.