Documentation

LeanPool.OrderMaintenance.Impl.Elem

M6: elements (Model/Core.lean: insertion, deletion, order) #

linkElem: link the new element y after x (locals x g glast nx lab h).

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem OrderMaintenance.Impl.linkElemS_agree (κ : Caps) (σ : Model.Core) (L : Loc) {x lab hh : ℕ} (hx : L "x" = x) (hg : L "g" = (σ.E.getX x).grp) (hgl : L "glast" = (σ.Gs.getX (σ.E.getX x).grp).last) (hnx : L "nx" = (σ.E.getX x).next) (hlab : L "lab" = lab) (hl : L "h" = hh) (hxE : x < σ.E.size) (hgG : (σ.E.getX x).grp < σ.Gs.size) (hnE : (σ.E.getX x).next = 0 ∨ (σ.E.getX x).next < σ.E.size) (hE : σ.E.size < κ.tbl Tbl.E) (hG : σ.Gs.size ≤ κ.tbl Tbl.G) :
    ∃ (L' : Loc), ∃ (n : ℕ), evalF κ linkElemS σ L = Res.ok (Model.linkElem σ x σ.E.size lab hh) L' n ∧ L' "y" = σ.E.size ∧ n ≤ 120

    The label of the new element, guarded.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      insertElem x h: a new element with handle h right after x.

      Equations
      Instances For
        theorem OrderMaintenance.Impl.insertElem_agree (κ : Caps) (σ : Model.Core) (L : Loc) {x hh : ℕ} (hx : L "x" = x) (hl : L "h" = hh) (hxE : x < σ.E.size) (hgG : (σ.E.getX x).grp < σ.Gs.size) (hnE : (σ.E.getX x).next = 0 ∨ (σ.E.getX x).next < σ.E.size) (hE : σ.E.size < κ.tbl Tbl.E) (hG : σ.Gs.size ≤ κ.tbl Tbl.G) {y : ℕ} {σ' : Model.Core} (h : EStateM.run (Model.insertElem x hh) σ = EStateM.Result.ok y σ') :
        ∃ (L' : Loc), ∃ (n : ℕ), evalF κ insertElemP.body σ L = Res.ok σ' L' n ∧ L' "y" = y ∧ n ≤ 200

        Procedure marking an element dead without unlinking it.

        Equations
        Instances For
          theorem OrderMaintenance.Impl.markDead_agree (κ : Caps) (σ : Model.Core) (L : Loc) {x : ℕ} (hx : L "x" = x) (hxE : x < σ.E.size) (_hE : σ.E.size ≤ κ.tbl Tbl.E) {σ' : Model.Core} (h : EStateM.run (Model.markDead x) σ = EStateM.Result.ok () σ') :
          ∃ (L' : Loc), ∃ (n : ℕ), evalF κ markDeadP.body σ L = Res.ok σ' L' n ∧ n ≤ 5

          The key of element e: its chunk's tag, its group's label, its own label.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Procedure comparing the lexicographic order labels of two element indices.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem OrderMaintenance.Impl.order_agree (κ : Caps) (σ : Model.Core) (L : Loc) {x y : ℕ} (hx : L "x" = x) (hy : L "y" = y) (hxE : x < κ.tbl Tbl.E) (hyE : y < κ.tbl Tbl.E) (hxG : (σ.E.getX x).grp < κ.tbl Tbl.G) (hyG : (σ.E.getX y).grp < κ.tbl Tbl.G) (hxC : (σ.Gs.getX (σ.E.getX x).grp).chk < κ.tbl Tbl.C) (hyC : (σ.Gs.getX (σ.E.getX y).grp).chk < κ.tbl Tbl.C) {b : Bool} {σ' : Model.Core} (h : EStateM.run (Model.order x y) σ = EStateM.Result.ok b σ') :
              ∃ (L' : Loc), ∃ (n : ℕ), evalF κ orderP.body σ L = Res.ok σ' L' n ∧ L' "r" = b2n b ∧ n ≤ 80