Read-Only Root-to-Leaf B+-Tree Descent (descendLoopGenProg) #
Implements and certifies the bounded iterate read-only root-to-leaf descent subroutine
descendLoopGenProg over Basis.exact.
Bounded iterate loop refining descendToLeaf
(d = (((((cp, base), sIdx), q), cur), fuel)).
Precondition for descendLoopGenProg (d = (((((cp, base), sIdx), q), cur), fuel)).
theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.descendLoopGenProg_spec {isRoot : Bool} {c U V w n_max base sIdx q cur fuel lo hi : ℕ} {sl : SuccinctWhp.BTreeSlice} {mapFn : ℕ → Option ℕ} {T : SuccinctWhp.BTreeTree} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hsIdx : sIdx < 3 * SuccinctWhp.numBucketsWhp n_max) (hrep : BTreeSliceMemRep base c U V w n_max sIdx sl s.mem) (hrt : T.rootIdx = cur) (hqlo : lo ≤ q) (hqhi : q ≤ hi) (hhi : hi < 2 ^ SuccinctWhp.fpBitsWhp n_max) (hv :
SuccinctWhp.ValidSubtree isRoot (SuccinctWhp.fpBitsWhp n_max) (SuccinctWhp.valLaneBitsWhp n_max)
(SuccinctWhp.tMinWhp n_max) sl.alloc sl.nodes lo hi mapFn T) :
have d0 := (((mkWhpCoreParams c U V w n_max, base), sIdx), q);
have prog := descendLoopGenProg ((d0, cur), fuel);
(Memory.spec 0).clientState s prog = s ∧ (Memory.spec 0).clientResult s prog = SuccinctWhp.descendToLeaf (SuccinctWhp.fpBitsWhp n_max) (SuccinctWhp.valLaneBitsWhp n_max)
(SuccinctWhp.tMinWhp n_max) sl.nodes fuel cur q ∧ WordRAM.Realization.memoryCost prog s = 6 * fuel ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog ∧ DescendLoopGenPre w ((d0, cur), fuel) s