Internal Top-Slab Unlink and Moved-Slab Relink Helpers for compGmPopSlabGenProg #
Internal subroutines, cost bounds, CompGmFrame effects, RealizesBounded .exact, and
ValidProg w 0 certificates for top-slab unlinking (compGmUnlinkTopSlabGenProg) and moved-slab
relinking (compGmRelinkMovedSlabGenProg), used privately by Dispatch.SlotOps.GmPopSlab.
Write the new top slab pointer bel_del and decremented count q_b - 1 for bucket b.
Unlink the top slab of bucket b and return its pool index p_del.
Relink owner directory and top pointer from vacated slot p_last to p_del.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compGmUnlinkTopSlabGenProg_effect {metaBase itemBase U V w N m_items b : ℕ} (hw : 0 < w) (hitem : metaBase + offCompItems U w N ≤ itemBase) (hb_pos : 0 < FeistelQuotient.bucketBits N) (hb : b < FeistelQuotient.numBuckets N) (s : Memory.State) (hslab :
Succinct.SlabBijection N (compGmAt metaBase U w N s.mem)
(fun (b' : ℕ) => compGmAt metaBase U w N s.mem (Succinct.gmQIdx b')) (compGmAt metaBase U w N s.mem 0)) (hq_pos : 1 ≤ compGmAt metaBase U w N s.mem (Succinct.gmQIdx b)) :
have gm := compGmAt metaBase U w N s.mem;
have s' := (Memory.spec 0).clientState s (compGmUnlinkTopSlabGenProg ((mkCompParams U V w N, metaBase), b));
(Memory.spec 0).clientResult s (compGmUnlinkTopSlabGenProg ((mkCompParams U V w N, metaBase), b)) = gm (Succinct.gmSlabTopIdx b) ∧ CompGmFrame metaBase itemBase U V w N m_items s s' ∧ compGmAt metaBase U w N s'.mem = Succinct.gmUnlinkTopSlab N gm b
Precondition for compGmUnlinkWriteProg.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compGmRelinkMovedSlabGenProg_effect {metaBase itemBase U V w N m_items p_del p_last : ℕ} (hw : 0 < w) (hitem : metaBase + offCompItems U w N ≤ itemBase) (s : Memory.State) (hpre : PureMovedSlabInv N (compGmAt metaBase U w N s.mem) p_del p_last) :
have gm := compGmAt metaBase U w N s.mem;
have s' :=
(Memory.spec 0).clientState s (compGmRelinkMovedSlabGenProg (((mkCompParams U V w N, metaBase), p_del), p_last));
CompGmFrame metaBase itemBase U V w N m_items s s' ∧ compGmAt metaBase U w N s'.mem = Succinct.gmRelinkMovedSlab N gm p_del p_last
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.pureMovedSlabInv_after_relink {N p_del p_last : ℕ} {gm : ℕ → ℕ} (hinv : PureMovedSlabInv N gm p_del p_last) :
PureMovedSlabInv N (Succinct.gmRelinkMovedSlab N gm p_del p_last) p_del p_last
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.validProg_compGmRelinkMovedSlab {w : ℕ} {d : ((CompParams × ℕ) × ℕ) × ℕ} {s : Memory.State} (h : CompGmMovedSlabPre w d s) :