Compacted GlobalMeta Tail Append (compAppendTailGMGenProg) #
Implements compAppendTailGMGenProg in Memory.Prog (¬ReadsWidth), proving its exact
gmAppendTail state effect, CompGmFrame preservation, RealizesBounded .exact, and
ValidProg w 0 admissibility.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compAppendTailGMGenProg,Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.CompAppendTailGMPre: tail-descriptor append subroutine in compactedGlobalMetaand its precondition.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compAppendTailGMGenProg_effect,Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.realizesBounded_compAppendTailGMGen,Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.validProg_compAppendTailGMGen: exactgmAppendTaileffect,RealizesBounded .exact, andValidProg w 0certificate.
Append one tail descriptor to bucket b in compacted GlobalMeta (gmAppendTail), returning
t_new = gm 1 (¬ReadsWidth).
@[simp]
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.compAppendTailGMGenProg_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) (htail :
Succinct.TailBijection N (compGmAt metaBase U w N s.mem)
(fun (b' : ℕ) => compGmAt metaBase U w N s.mem (Succinct.gmRIdx b')) (compGmAt metaBase U w N s.mem 1)) (hr_lt : compGmAt metaBase U w N s.mem (Succinct.gmRIdx b) < SuccinctBucket.tailCapPerBucket N) :
have s' := (Memory.spec 0).clientState s (compAppendTailGMGenProg ((mkCompParams U V w N, metaBase), b));
(Memory.spec 0).clientResult s (compAppendTailGMGenProg ((mkCompParams U V w N, metaBase), b)) = compGmAt metaBase U w N s.mem 1 ∧ CompGmFrame metaBase itemBase U V w N m_items s s' ∧ compGmAt metaBase U w N s'.mem = Succinct.gmAppendTail N (compGmAt metaBase U w N s.mem) b
Precondition for appending to the tail of global metadata.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.validProg_compAppendTailGMGen {w : ℕ} {d : (CompParams × ℕ) × ℕ} {s : Memory.State} (h : CompAppendTailGMPre w d s) :
Succinct.ValidProg w 0 s (compAppendTailGMGenProg d)