Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.ResizableSuccinct.Migration.Exec.Witness

Internal Migration Register Banks, Witness Arrays, and Frame Helpers #

Internal register banks (mOldHp, mOldCp, mNewHp, mNewCp), RealizesBounded source/scratch register arrays (src*, tmp*), width-independence simp lemmas, and shared representation/ABI framing lemmas used privately across Migration.Exec submodules.

@[reducible, inline]

Hardware frontier register 1 (= epochEmb rFr).

@[reducible, inline]

Relocated item-base register 14.

@[reducible, inline]

Hash-seed base register 15 (metaBase + 225).

@[reducible, inline]

New-epoch metadata base address register 146 (base + offCompItems U w N_old).

@[reducible, inline]

New-epoch arena base address register 147 (mNewMeta + mOffNew).

@[reducible, inline]

Right-shifted old-item destination base register 148.

@[reducible, inline]

Target capacity N_new = targetCap U n register 149.

@[reducible, inline]

New-epoch item-offset offCompItems U w N_new register 150.

@[reducible, inline]

New-epoch hash-space output scratch register 151.

@[reducible, inline]

Old-epoch compacted item-word count register 152.

@[reducible, inline]

New-epoch compacted item-word count register 153.

@[reducible, inline]

Migration arena word-count register 154 (max iwOld iwNew + 6).

@[reducible, inline]

Migration peak hardware-frontier register 155.

@[reducible, inline]

Temporary address scratch register 156.

@[reducible, inline]

Secondary temporary address scratch register 157.

@[reducible, inline]

Reconstructed key output register 158 (deleteLastOneCode).

@[reducible, inline]

Reconstructed value output register 159 (deleteLastOneCode).

Old-epoch HashParams register bank (32..50).

Old-epoch CompParams register bank (52..87).

New-epoch HashParams register bank (90..108).

New-epoch CompParams register bank (110..145).

Source register map for old-epoch compItemWordsGenProg.

Output/scratch register map for old-epoch compItemWordsGenProg.

Source register map for new-epoch compItemWordsGenProg.

Output/scratch register map for new-epoch compItemWordsGenProg.

Source register map for computeTargetCapProg.

Output/scratch register map for computeTargetCapProg.

Source register map for writeEpochParamsGenProg.

Output/scratch register map for writeEpochParamsGenProg.

Source register map for copyRightwardProg.

Scratch register map for copyRightwardProg.

Source register map for copyLeftwardProg.

Scratch register map for copyLeftwardProg.

Source register map for initNewEpochMetaProg.

Scratch register map for initNewEpochMetaProg.

Source register map for readOldItemKeyValGenProg.

Output/scratch register map for readOldItemKeyValGenProg.

Source register map for streamInsertFreshGenProg.

Scratch register map for streamInsertFreshGenProg.

noncomputable def Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.srcStreamAll :
Fin (19 + 36 + (1 + 1) + (19 + 36 + (1 + 1)) + 1 + 1) → Fin rResize

Source register map for streamAllItemsProg.

Scratch register map for streamAllItemsProg.

theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.fixedCoupled_of_shift {metaBase srcItemBase dstItemBase U V w N n : ℕ} {s_fix s₀ s₁ : Memory.State} (hw : 0 < w) (hcpl : FixedCoupled metaBase srcItemBase U V w N s_fix s₀) (htot : Succinct.totalSlots N (compGmAt metaBase U w N s₀.mem) = n) (hmeta : ∀ (a : ℕ), metaBase + offCompLM U w N ≤ a ∧ a < metaBase + offCompItems U w N → s₁.mem a = s₀.mem a) (hitem : ∀ j < compactedItemWords U V w N n, s₁.mem (dstItemBase + j) = s₀.mem (srcItemBase + j)) :
FixedCoupled metaBase dstItemBase U V w N s_fix s₁ ∧ compGmAt metaBase U w N s₁.mem = compGmAt metaBase U w N s₀.mem

Agreement on the caller-supplied ABI input registers (mBase, mTag, mArgU, mArgV).

theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.rootHeaderValid_congr {U V w N n n_init metaBase : ℕ} {mem₁ mem₂ : ℕ → ℕ} (hhdr : RootHeaderValid U V w N n n_init metaBase mem₂) (heq : ∀ (a : ℕ), metaBase ≤ a ∧ a < metaBase + 8 → mem₁ a = mem₂ a) :
RootHeaderValid U V w N n n_init metaBase mem₁
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.epochParamsStored_congr {U V w N metaBase : ℕ} {mem₁ mem₂ : ℕ → ℕ} (hpar : EpochParamsStored U V w N metaBase mem₂) (heq : ∀ (a : ℕ), metaBase ≤ a ∧ a < metaBase + 63 → mem₁ a = mem₂ a) :
EpochParamsStored U V w N metaBase mem₁
theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.ne_mReg_of_lt_five {reg : Fin rResize} (h5 : ↑reg < 5) {c : Fin 160} (hc : 5 ≤ ↑c) :
reg ≠ mReg c