First-Epoch Initialization Parameter-Write and Arena-Growth Setup (initFirstSetupCode) #
Internal deterministic setup half of initFirstEpochCode before resampleHashCode: computes
N₁ = targetCap U 1, grows [base + 8, base + 63) and writes first-epoch parameters, loads
mNewHp / mNewCp, evaluates iw₁, and grows to base + compactedEpochWords U V w N₁ 1.
noncomputable def Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.initFirstSetupCode :
Deterministic setup half of initFirstEpochCode before resampleHashCode.
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.initFirstSetupCode_exec {U V w base : ℕ} {x : WordRAM.Resizable.RData rResize} (hx : WordRAM.Resizable.RData.Bounded w x) (hfr : x.frontier = base + 8) (hhdr : RootHeaderValid U V w 0 0 0 base x.mem) (hfit_peak : WordRAM.Fits w (base + compactedEpochWords U V w (targetCap U 1) 1)) (hbase : x.regs mBase = base) :
have N₁ := targetCap U 1;
have off₁ := offCompItems U w N₁;
have fr₁ := base + compactedEpochWords U V w N₁ 1;
∃ (y_set : WordRAM.Resizable.RData rResize) (steps_set : ℕ),
(WordRAM.Resizable.RDemonicExec w fr₁ initFirstSetupCode x steps_set fun (x : WordRAM.Resizable.RData rResize) =>
x = y_set) ∧ steps_set ≤ 126 * migFactor + 5260 ∧ WordRAM.Resizable.RData.Bounded w y_set ∧ y_set.frontier = fr₁ ∧ abiPreserved x y_set ∧ (∀ addr < base, y_set.mem addr = x.mem addr) ∧ RootHeaderValid U V w N₁ 1 1 base y_set.mem ∧ EpochParamsStored U V w N₁ base y_set.mem ∧ y_set.regs mBase = base ∧ y_set.regs mFr = fr₁ ∧ y_set.regs mItemBase = base + off₁ ∧ y_set.regs mHashBase = base + epochHdrWords ∧ (∀ (i : Fin 19),
y_set.regs (mNewHp i) = HashFamily.WordRAM.RuntimeReducedKWise.mkHashParams w (epochQBits U N₁) (epochHashB N₁)
(SuccinctBucket.totalMicroBits N₁) 3 i) ∧ ∀ (i : Fin 36), y_set.regs (mNewCp i) = mkCompParams U V w N₁ i