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
- OrderMaintenance.Proof.tacticTopsame = Lean.ParserDescr.node `OrderMaintenance.Proof.tacticTopsame 1024 (Lean.ParserDescr.nonReservedSymbol "topsame" false)
Instances For
theorem
OrderMaintenance.Proof.top_modN
(i : ℕ)
(f : Model.Node → Model.Node)
:
Pres TopRel (Model.modN i f)
theorem
OrderMaintenance.Proof.top_setInTables
(e h : ℕ)
(l : List ℕ)
:
Pres TopRel (Model.setInTables e h l)
theorem
OrderMaintenance.Proof.top_roomNextTo
(t e : ℕ)
(b : Bool)
:
Pres TopRel (Model.roomNextTo t e b)
theorem
OrderMaintenance.Proof.top_tableInsert
(t e new : ℕ)
(b : Bool)
(lab : ℕ)
:
Pres TopRel (Model.tableInsert t e new b lab)
theorem
OrderMaintenance.Proof.top_fundLoop
(j : Model.Job)
(v up src k : ℕ)
:
Pres TopRel (Model.fundLoop j v up src k)
theorem
OrderMaintenance.Proof.top_afterDrain
(j : Model.Job)
(v up : ℕ)
:
Pres TopRel (Model.afterDrain j v up)
theorem
OrderMaintenance.Proof.top_walkBody
(j : Model.Job)
(v : ℕ)
:
Pres TopRel (Model.walkBody j v)
theorem
OrderMaintenance.Proof.top_insertAroundFinish
(x y z : ℕ)
(tabs ly lz : List ℕ)
(lp : ℕ)
:
Pres TopRel (Model.insertAroundFinish x y z tabs ly lz lp)