Certified Memory.Prog Subroutines for emptyFastState Initialization and GoodSeedOnState #
This module implements two foundational large-regime Memory.Prog subroutines inside genuine
whpSpace c U V w n_max words (zero auxiliary scratch beyond offBktMeta):
initFastGenProg: initializesFastMemRep base c U V w n_max (emptyFastState n_max)in deterministic4 * numBucketsWhp n_max + 4 * poolSizeWhp n_max + 5(O(n_max)) memory charges once[base, base + 32)and[base + offQuotWhp c w n_max, base + largeSpaceWhp c U V w n_max)are zeroed andSeedWhpMemRepholds on[base + 32, base + offQuotWhp c w n_max).checkGoodSeedOnStateGenProg: evaluatescheckGoodSeedOnState c U n_max θ csrin place on anyCsrMemRepwithout external scratch arrays, storing per-bucket collision-free candidate salts(checkGoodSeedOnState c U n_max θ csr).2 binto the oddoffBktMetaentries16 * b + 1(b < numBucketsWhp n_max) while preserving bothSeedWhpMemRepandCsrMemRep.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.initFastCostWhp,initFastGenProg: certifiedMemory.Proginitializer foremptyFastState n_max.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.checkGoodSeedOnStateGenProg: certified scratch-freeMemory.Progdecision and salt-discovery procedure forGoodSeedOnState.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_initFastGen,initFastGenProg_spec:Realizes .exactcertificate and exactFastMemRepinitialization spec.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.realizes_checkGoodSeedOnStateGen,checkGoodSeedOnStateGenProg_spec:Realizes .exactcertificate and exactcheckGoodSeedOnStaterefinement preservingSeedWhpMemRepandCsrMemRep.
References #
Section 1: Primitive Helpers and Zeroed Packed-Segment Lemmas #
Section 2: initFastGenProg (emptyFastState n_max Initializer) #
Exact memoryCost of initFastGenProg (O(n_max) deterministic operations).
Initialize emptyFastState n_max at base (d = (cp, base)).
Exact specification of initFastGenProg: starting from zeroed headers [base, base + 32) and
zeroed body [base + offQuotWhp c w n_max, base + largeSpaceWhp c U V w n_max) with
SeedWhpMemRep on [base + 32, base + offQuotWhp c w n_max), establishes FastMemRep for
emptyFastState n_max in initFastCostWhp n_max deterministic memory operations.
Section 3: Scratch-Free checkGoodSeedOnStateGenProg #
Part 3a: Bucket load-balance loop (checkAllBalancedCsr) #
Part 3b: Pairwise-distinct rKeyAt check (checkPairwiseDistinctOn rKeyAt N) #
Part 3c: Per-bucket collision-free salt discovery (findSaltInRange into offBktMeta) #
Part 3d: Top-level checkGoodSeedOnStateGenProg #
Evaluate checkGoodSeedOnState c U n_max θ csr in place on CsrMemRep (d = (wp, base)),
returning 1 iff ok = true and storing (checkGoodSeedOnState c U n_max θ csr).2 b at
offBktMeta[16 * b + 1] for every b < numBucketsWhp n_max.
Exact specification of checkGoodSeedOnStateGenProg: evaluates
checkGoodSeedOnState c U n_max θ csr on any valid CsrMemRep, writes (checkGoodSeedOnState c U n_max θ csr).2 b into offBktMeta[16 * b + 1] for all b < numBucketsWhp n_max, and preserves
both SeedWhpMemRep and CsrMemRep.