Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.ResizableSuccinct.Dispatch.TailSlabOps.SlotPush

Amortized O(1) Compacted Slot Push (compPushBackSlotGenProg) #

Implements and certifies compPushBackSlotGenProg, appending (q_val, v_val) at logical slot bCount N gm b of bucket b and promoting K tail items into a full slab when r_b + 1 = 2 * K, with O(1) amortized memoryCost against 98 * slotPotential N gm.

Main definitions #

Main results #

Append (q_val, v_val) at logical slot bCount N gm b of bucket b in compacted layout (metaBase, itemBase), promoting K = slabSize N tail items into a full slab when r_b + 1 = 2 * K (¬ReadsWidth).

theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPushBackSlotGenProg_effect {metaBase itemBase U V w N m_cap b q_val v_val : ℕ} {s_fix s : Memory.State} (henv : CompEpochEnv U V w N metaBase itemBase m_cap s) (hcpl : FixedCoupled metaBase itemBase U V w N s_fix s) (hslot : Succinct.SlotStoreInv N (compGmAt metaBase U w N s.mem)) (hb : b < FeistelQuotient.numBuckets N) (htot : Succinct.totalSlots N (compGmAt metaBase U w N s.mem) < N) (hm_cap : Succinct.totalSlots N (compGmAt metaBase U w N s.mem) + 1 ≤ m_cap) (hq_lt : q_val < 2 ^ FeistelQuotient.quotientBits U N) (hv_lt : v_val < 2 ^ FeistelQuotient.valBits V) :
have d := ((((mkCompParams U V w N, metaBase, itemBase), b), q_val), v_val); have s' := (Memory.spec 0).clientState s (compPushBackSlotGenProg d); have s_fix' := (Memory.spec 0).clientState s_fix (Succinct.pushBackSlotProg U V (ghostW w) N (epochHashSpace U (ghostW w) N) (((0, b), q_val), v_val)); CompOpFrame metaBase itemBase U V w N m_cap s s' ∧ FixedCoupled metaBase itemBase U V w N s_fix' s' ∧ WordRAM.Realization.memoryCost (compPushBackSlotGenProg d) s + 98 * Succinct.slotPotential N (compGmAt metaBase U w N s'.mem) ≤ 98 * Succinct.slotPotential N (compGmAt metaBase U w N s.mem) + 178

compPushBackSlotGenProg maintains FixedCoupled with pushBackSlotProg, preserves outside memory via CompOpFrame, and satisfies the O(1) amortized memoryCost bound against 98 * slotPotential N gm.