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 #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPushBackSlotGenProg,CompPushBackSlotPre: compacted bucket-append operation and its parameter-free realization precondition.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPushBackSlotGenProg_effect,realizesBounded_compPushBackSlotGen,validProg_compPushBackSlotGen:FixedCoupledequivalence topushBackSlotProg,O(1)amortized cost bound,RealizesBounded .exactcertificate, andValidProgadmissibility.
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).
Precondition for compPushBackSlotGenProg.
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.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.validProg_compPushBackSlotGen {w : ℕ} {d : (((CompParams × ℕ × ℕ) × ℕ) × ℕ) × ℕ} {s : Memory.State} (h : CompPushBackSlotPre w d s) :
Succinct.ValidProg w 0 s (compPushBackSlotGenProg d)