M5: the state after a chunk split, with the path copy completed #
insFin s x: the top structure after insertAround x y z (y, z the new chunks) on the linked
core, with the job's path copy completed. Its views, field by field.
The split's job.
Equations
- OrderMaintenance.Proof.Top.insJob s x = { x := x, y := s.C.size, z := s.C.size + 1, pc := OrderMaintenance.Model.JobPc.copy 1 }
Instances For
The core after insertAround.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The top structure after the split, path copy completed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The core after insertAround #
theorem
OrderMaintenance.Proof.Top.insFinS_nodes
(t : Model.Core)
(x y z : ℕ)
(f : ℕ → ℕ × ℕ)
:
(insFinS t x y z f).nodes = (List.foldl (fun (ns : Array Model.Node) (T : ℕ) => ns.modify T (aroundF t x y z f T)) t.nodes (t.cin.getX x)).modify
(t.lpar.getX x) fun (n : Model.Node) =>
{ height := n.height, livePar := n.livePar, children := n.children.replace1 x [y, x, z], weight := n.weight,
table := n.table, inTables := n.inTables, first := n.first, last := n.last, draining := n.draining, t1 := n.t1,
t2 := n.t2, side := n.side, overflowOf := n.overflowOf, alive := n.alive }
theorem
OrderMaintenance.Proof.Top.tagsS_top
(t : Model.Core)
(y z a b : ℕ)
:
(tagsS t y z a b).P = t.P ∧ (tagsS t y z a b).path = t.path ∧ (tagsS t y z a b).cin = t.cin ∧ (tagsS t y z a b).lpar = t.lpar ∧ (tagsS t y z a b).nodes = t.nodes ∧ (tagsS t y z a b).C = (t.C.modify y 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 := a, alive := C.alive }).modify
z 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 := b, alive := C.alive }
@[reducible, inline]
The core right before insertAroundFinish: both tags written.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
OrderMaintenance.Proof.Top.ins3_nodes
(s : Model.Core)
(x f1x i1 : ℕ)
:
(ins3 s x f1x i1).nodes = (List.foldl
(fun (ns : Array Model.Node) (T : ℕ) =>
ns.modify T (aroundF (ins2 s x f1x i1) x s.C.size (s.C.size + 1) (insF s x) T))
s.nodes (s.cin.getX x)).modify
(s.lpar.getX x) fun (n : Model.Node) =>
{ height := n.height, livePar := n.livePar, children := n.children.replace1 x [s.C.size, x, s.C.size + 1],
weight := n.weight, table := n.table, inTables := n.inTables, first := n.first, last := n.last,
draining := n.draining, t1 := n.t1, t2 := n.t2, side := n.side, overflowOf := n.overflowOf, alive := n.alive }
The top structure after the split, copy completed #
The new chunks take over the first and last range pointers along the split chunk path.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A node's range endpoint after inserting replacement chunks along the copied path.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The views of the top structure after the split, with the copy completed.
- node (u : ℕ) : nd t u = let __src := insNode s x u; { height := __src.height, livePar := __src.livePar, children := __src.children, weight := __src.weight, table := __src.table, inTables := __src.inTables, first := insFirst s x u, last := insLast s x u, draining := __src.draining, t1 := __src.t1, t2 := __src.t2, side := __src.side, overflowOf := __src.overflowOf, alive := __src.alive }
Instances For
theorem
OrderMaintenance.Proof.Top.insFin_frame
(s : Model.Core)
(x f1x i1 : ℕ)
(hxs : x < s.C.size)
(hnd : (s.cin.getX x).Nodup)
(hdist : ∀ (i i' : ℕ), 1 ≤ i → i ≤ s.P.H → 1 ≤ i' → i' ≤ s.P.H → pth (ts s) x i = pth (ts s) x i' → i = i')
(hex : ∀ (i : ℕ), 1 ≤ i → i ≤ s.P.H → pth (ts s) x i < s.nodes.size)
: