Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.SuccinctWhpBTreeProg.Lookup

Certified SWAR B+-Tree Lookup (btreeLookupGenProg) #

Parameter-free Memory.Prog implementation, O(1) specification, and Realizes .exact certificate for btreeLookup.

Main definitions #

Main results #

@[irreducible]

Parameter-free btreeLookup (d = (((cp, base), sIdx), q)), returning (1, val) on hit or (0, 0) on miss.

theorem Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.btreeLookupGenProg_spec {c U V w n_max base sIdx insCount q : ℕ} {sl : SuccinctWhp.BTreeSlice} {mapFn : ℕ → Option ℕ} {s : Memory.State} (henv : WhpLargeEnv c U V w n_max w base) (hsIdx : sIdx < 3 * SuccinctWhp.numBucketsWhp n_max) (hins : insCount ≤ 8 * FeistelQuotient.slabScale n_max ^ 12) (hrep : BTreeSliceMemRep base c U V w n_max sIdx sl s.mem) (hv : SuccinctWhp.ValidWhpSlice n_max insCount sl mapFn) (hq : q < 2 ^ SuccinctWhp.fpBitsWhp n_max) :
have prog := btreeLookupGenProg (((mkWhpCoreParams c U V w n_max, base), sIdx), q); (Memory.spec 0).clientState s prog = s ∧ ((Memory.spec 0).clientResult s prog = match mapFn q with | some v => (1, v) | none => (0, 0)) ∧ WordRAM.Realization.memoryCost prog s ≤ 262 ∧ Succinct.ValidProg w (base + SuccinctWhp.largeSpaceWhp c U V w n_max) s prog