Single-Tape 1 · OPT Capacity Migration and Trajectory-Relative Dispatcher #
This module formalizes single-tape capacity migration and trajectory-relative operational dispatch
for the resizable succinct dynamic dictionary on the word-granular Resizable Word RAM
(Cslib.WordRAM.Resizable), combining the in-epoch dispatcher inEpochOpCode (Dispatch) with the
single-tape 1 · OPT streaming rebuild migrateActiveCode, empty-to-active initializer
initFirstEpochCode, and singleton collapse deleteLastOneCode (Migration.Exec) into the unified
parameter-free operational dispatcher resizableOpCode : RCode .exact rResize
(¬resizableOpCode.ReadsWidth).
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.resizableOpCode: unified parameter-freeRCode .exact rResizedispatcher acrossquery,insert, anddeleteat all capacities.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.EpochAnchorInv,EpochState,ReachedEpochsFit: deterministic epoch-capacity trajectory(dict, cap, initCount)and trajectory-relative peak-frontier admissibility predicate.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.stepExactPeakWords,resizablePotential,resizableBaseCharge,resizableCharge: exact stepwise peak word bound, combined hysteresis + migration potential, and parameter-free $O(1)$ expected amortized charge.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.LatentSeed,EpochRep,EpochSeqInv: latent quotient-hash seed bundle and uniform-marginal sequence invariant.
Main results #
not_readsWidth_resizableOpCode:resizableOpCodedoes not inspect the ambient word widthw.stepExactPeakWords_inEpoch_le_succinctWords,stepExactPeakWords_le_succinctWords,w_mul_stepExactPeakWords_le_bits: strict1 · OPTpeak hardware-frontier bounds (1355, 441in-epoch and2699, 888across capacity-doubling/halving migrations; never2 · OPT).resizableOpCode_step_pointwise: per-stateExecRCodeDiststep specification with pointwise potential-amortized cost bound and uniform-seed preservation/resampling.resizableOpCode_step_expected_amortized,resizableOpCode_steps_expected_amortized: single-step and multi-step trajectory-relative expected amortized $O(1)$ execution bounds underReachedEpochsFit.
References #
Section 1: ABI Register Wrappers and RCode.rename epochEmb Bridge #
Standalone register encoding for Dynamic.Op U on Fin rResize.
Entry argument-agreement predicate on Fin rResize (mTag, mArgU, mArgV).
Output decoder on Fin rResize, delegating to decode along epochEmb.
Section 2: Unified Parameter-Free Operational Dispatcher (resizableOpCode) #
Unified parameter-free operational dispatcher (RCode .exact rResize) for query, insert,
and delete across empty, in-epoch, 0 → 1, 1 → 0, and capacity-doubling/halving states.
resizableOpCode does not inspect the ambient word width w (¬resizableOpCode.ReadsWidth).
Section 3: Epoch Trajectory, 1 · OPT Peak Space, Potential, and Charges #
Epoch capacity and anchor-count invariant (N = targetCap U n_init):
EpochValid U n N, N = targetCap U n_init, n = 0 ↔ n_init = 0, and n_init ≤ U.
Deterministic post-step epoch capacity N' on o : Dynamic.Op U.
Deterministic post-step epoch anchor count n_init' on o : Dynamic.Op U.
Deterministic epoch-trajectory state (dict, cap, initCount).
Initial empty EpochState.
Single-operation transition of EpochState U.
Epoch state reached after executing ops : List (Dynamic.Op U) from st.
Exact peak hardware word footprint above base during resizableOpCode on o.
In-Epoch Tight 1 · OPT Peak Word-Space Bound
(stepExactPeakWords_inEpoch_le_succinctWords):
Whenever (Dynamic.spec U V U).valid s_abs o holds and o does not trigger active capacity
migration, stepExactPeakWords V w N s_abs o ≤ Dynamic.succinctWords 1355 441 U V w (max n n').
1 · OPT Stepwise Peak Word-Space Bound (stepExactPeakWords_le_succinctWords):
Across every admissible operation o (in-epoch, 0 → 1, 1 → 0, capacity-doubling, and
capacity-halving migrations), stepExactPeakWords V w N s_abs o never exceeds
Dynamic.succinctWords 2699 888 U V w (max n n') — strictly 1 · OPT(U, V, max n n') plus
O((max n n') log log (max n n')) bits, never 2 · OPT.
1 · OPT Stepwise Peak Bit-Space Bound (w_mul_stepExactPeakWords_le_bits):
Multiplying stepExactPeakWords V w N s_abs o by w never exceeds
Dynamic.optBits U V (max n n') + 2699 * (max n n') * Dynamic.logLogFactor (max n n') + 889 * w
bits across all dynamic operations and capacity migrations.
Trajectory-relative address-space fit predicate (ReachedEpochsFit): requires
Fits w (base + stepExactPeakWords V w st_t.cap st_t.dict o_t) only at epoch states st_t
reached along ops, never globally across U.
Combined potential function for the resizable succinct dictionary:
inEpochPotential (slab/tail hysteresis) plus (2 * migLinearFactor) * Nat.dist n n_init
(epoch-migration potential, zero at epoch creation n = n_init and when empty n = n_init = 0).
Parameter-free base charge before adding (12 * inEpochFactor) * probeExcess.
Parameter-free $O(1)$ expected amortized instruction charge per operation across all
query, insert, and delete steps (including capacity-doubling and capacity-halving rebuilds).
Section 4: Latent Seed Bundle, Pointwise Step Execution, and Expected Amortized Bounds #
Latent quotient-hash seed coupled with its active epoch capacity cap.
- cap : ℕ
Current epoch capacity (
0when the dictionary is empty). - seed : Succinct.QuotHashSeed U self.cap
Quotient-hash seed for capacity
cap.
Extract a QuotHashSeed U N from ls : LatentSeed U without dependent casts in callers.
Canonical empty latent seed (cap = 0).
Per-state representation coupling st : EpochState U, ls : LatentSeed U, and
x : RData rResize.
Pointwise Distributional Step Certificate (resizableOpCode_step_pointwise):
From any state (ls, x) satisfying EpochRep U V w base st ls x and resizableArgMatch o x.regs,
resizableOpCode executes under ExecRCodeDist within base + stepExactPeakWords, establishes
EpochRep for st' = st.step V o, either resamples a uniform QuotHashSeed U st'.cap or preserves
ls identically, and satisfies the potential-amortized bound with probeExcess.
Section 5: Multi-Step Trajectory-Relative Expected Amortized Execution #
Exact resting word footprint above base after executing prefOps from EpochState.empty U.
Exact stepwise peak word footprint above base on o after executing prefOps from
EpochState.empty U.
ObliviousPeakFits with epochPeakSpaceBound is equivalent to ReachedEpochsFit.
Distributional sequence invariant on ν : PMF (SeqROutcome (LatentSeed U) Dynamic.Op.Result rResize) after executing a prefix reaching st : EpochState U with canonical output trace
out_pref and initial caller memory mem₀:
Single-Step Expected Amortized Bound (resizableOpCode_step_expected_amortized):
From any sequence distribution ν satisfying EpochSeqInv V w base st out_pref mem₀ ν, executing
one admissible operation o via P.code = resizableOpCode preserves EpochSeqInv at
st' = st.step V o and pays expected instruction cost plus expected potential change at most
resizableCharge = O(1).
Multi-Step Trajectory-Relative Expected Amortized Execution
(resizableOpCode_steps_expected_amortized):
Across any admissible operation sequence remOps from prefix prefOps whose trajectory peaks fit
in w-bit words (ReachedEpochsFit V w base st remOps), resizableOpCode executes under
Resizable.Randomized.ExecSteps, produces the exact canonical dictionary transcript, preserves
EpochSeqInv, and executes in at most E[Φ_init] + remOps.length * resizableCharge expected
instructions.