Amortized O(1) Compacted Slot Pop (compPopBackSlotGenProg) #
Implements and certifies compPopBackSlotGenProg, removing the last logical slot
bCount N gm b - 1 of non-empty bucket b and demoting the top full slab into K tail items when
r_b - 1 = 0 ∧ 0 < q_b, with O(1) amortized memoryCost against 98 * slotPotential N gm.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPopBackSlotGenProg,CompPopBackSlotPre: compacted bucket-pop operation and its parameter-free realization precondition.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPopBackSlotGenProg_effect,realizesBounded_compPopBackSlotGen,validProg_compPopBackSlotGen:FixedCoupledequivalence topopBackSlotProg,O(1)amortized cost bound,RealizesBounded .exactcertificate, andValidProgadmissibility.
Remove the last logical slot bCount N gm b - 1 of non-empty bucket b in compacted layout
(metaBase, itemBase), demoting the top full slab into K = slabSize N tail items when
r_b - 1 = 0 ∧ 0 < q_b (¬ReadsWidth).
Precondition for compPopBackSlotGenProg.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compPopBackSlotGenProg_effect {metaBase itemBase U V w N m_cap b : ℕ} {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) (hbc : 1 ≤ Succinct.bCount N (compGmAt metaBase U w N s.mem) b) (hm_cap : Succinct.totalSlots N (compGmAt metaBase U w N s.mem) ≤ m_cap) :
have d := ((mkCompParams U V w N, metaBase, itemBase), b);
have s' := (Memory.spec 0).clientState s (compPopBackSlotGenProg d);
have s_fix' :=
(Memory.spec 0).clientState s_fix (Succinct.popBackSlotProg U V (ghostW w) N (epochHashSpace U (ghostW w) N) (0, b));
CompOpFrame metaBase itemBase U V w N m_cap s s' ∧ FixedCoupled metaBase itemBase U V w N s_fix' s' ∧ WordRAM.Realization.memoryCost (compPopBackSlotGenProg d) s + 98 * Succinct.slotPotential N (compGmAt metaBase U w N s'.mem) ≤ 98 * Succinct.slotPotential N (compGmAt metaBase U w N s.mem) + 242
compPopBackSlotGenProg maintains FixedCoupled with popBackSlotProg, 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_compPopBackSlotGen {w : ℕ} {d : (CompParams × ℕ × ℕ) × ℕ} {s : Memory.State} (h : CompPopBackSlotPre w d s) :
Succinct.ValidProg w 0 s (compPopBackSlotGenProg d)