Documentation

LeanPool.OrderMaintenance.Proof.Cost.TopFrame

What the top structure may change #

TopRel s s': everything below the top structure is unchanged, except chunk tags. The top structure's own fields (nodes, path, cin, lpar), the deferred construction (prep) and the running job (resJob) may change. Every top-structure operation is in this relation, whether it succeeds or fails a guard.

A top-structure step preserves core fields except for chunk tags.

Instances For
    theorem OrderMaintenance.Proof.TopRel.trans {a b c : Model.Core} (h1 : TopRel a b) (h2 : TopRel b c) :
    TopRel a c
    theorem OrderMaintenance.Proof.TopRel.of_top (s : Model.Core) (nodes : Array Model.Node) (path : Array (Array ℕ)) (cin : Array (List ℕ)) (lpar : Array ℕ) :
    TopRel s { P := s.P, E := s.E, Gs := s.Gs, C := s.C, 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 := nodes, path := path, cin := cin, lpar := lpar }

    Updates that leave everything but the top structure's fields alone.

    theorem OrderMaintenance.Proof.TopRel.of_tag (s : Model.Core) (c t : ℕ) :
    TopRel s { 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 }

    Close ∀ s, TopRel s (f s) for a top-only update.

    Equations
    Instances For
      theorem OrderMaintenance.Proof.top_tableInsert (t e new : ℕ) (b : Bool) (lab : ℕ) :
      Pres TopRel (Model.tableInsert t e new b lab)
      theorem OrderMaintenance.Proof.top_insertAroundFinish (x y z : ℕ) (tabs ly lz : List ℕ) (lp : ℕ) :
      Pres TopRel (Model.insertAroundFinish x y z tabs ly lz lp)