Documentation

LeanPool.OrderMaintenance.Proof.Correct.Frame

What the top structure and the priority queue may change #

The priority queue, the top tree's tables, paths and jobs, and the sizes and states of groups and chunks are invisible to INV-S, so every function that touches only them preserves Same; the top structure's tag writes preserve Safe.

Preserve all structural links and every chunk order tag.

Equations
Instances For

    Preserve structural links and carry every established core invariant to the new state.

    Equations
    Instances For

      Close a goal ∀ s, Same s (f s) for a state update f that leaves INV-S's fields alone.

      Equations
      Instances For

        Reads #

        Top structure: tables, paths, nodes #

        theorem OrderMaintenance.Proof.pres_tableInsert (t e new : ℕ) (b : Bool) (lab : ℕ) :
        Pres Same (Model.tableInsert t e new b lab)

        Priority queue, sizes and states #

        Guarded tag writes #

        The guard of a tag write: t lies strictly between the tags of c's neighbours.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem OrderMaintenance.Proof.inv_setTag {s : Model.Core} {A : Abs} (h : INV s A) {c t : ℕ} (hg : TagOK s c t) :
          INV { P := s.P, E := s.E, Gs := s.Gs, C := s.C.modify c fun (C : Model.Chunk) => { next := C.next, prev := C.prev, first := C.first, last := C.last, size := C.size, st := C.st, src := C.src, l := C.l, r := C.r, tag := t, alive := C.alive }, freeG := s.freeG, count := s.count, head := s.head, tail := s.tail, firstGroup := s.firstGroup, firstChunk := s.firstChunk, ready := s.ready, prep := s.prep, resJob := s.resJob, fallbacks := s.fallbacks, pqHead := s.pqHead, pqNext := s.pqNext, pqPrev := s.pqPrev, pqWhere := s.pqWhere, nbNext := s.nbNext, nbPrev := s.nbPrev, pqHi := s.pqHi, pqLo := s.pqLo, nodes := s.nodes, path := s.path, cin := s.cin, lpar := s.lpar } A

          Writing a tag that passed its guard preserves INV-S.

          The top structure's jobs #