Documentation

CslibFrontier.DataStructure.Dictionary.SuccinctWhpModelStep.Invariants

Core and Pre-Tick Fast-Mode Invariants for SuccinctWhpModel #

This module defines the intermediate fast-mode invariants (CoreFastInv, PreOvermarsBucketInv, ValidEpochStagePreTick) shared across overmarsStep, fastDelete, fastInsert, and epochTick, together with conversion and field-congruence lemmas.

Main definitions #

Main results #

structure Cslib.DataStructure.Dictionary.SuccinctWhp.CoreFastInv (c U V n_max : ℕ) (θ : SeedWhp c U n_max) (fs : FastState) (dict : State U) :

Core fast-state invariant (all fields of ValidFastState except overmars_valid and stage_valid), shared across intermediate pre-overmarsStep and pre-epochTick states.

Relaxed per-bucket Overmars invariant immediately prior to overmarsStep on bucket b.

Stage invariant between fastDelete and epochTick (relaxing rebScanCursor < bktCount b_cur to ≤ and removing the + 16 slack in 16 * rebInsCount ≤ 17 * rebScanCursor until epochTick scans the next 16 slots).

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.ValidFastState.toCore {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hv : ValidFastState c U V n_max θ fs dict) :
CoreFastInv c U V n_max θ fs dict
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.CoreFastInv.toValidFastState {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hc : CoreFastInv c U V n_max θ fs dict) (hom : ∀ b < numBucketsWhp n_max, OvermarsBucketInv c U n_max θ fs b) (hst : ValidEpochStage c U n_max θ fs) :
ValidFastState c U V n_max θ fs dict
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.OvermarsBucketInv.toPre {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {b : ℕ} (h : OvermarsBucketInv c U n_max θ fs b) :
PreOvermarsBucketInv c U n_max θ fs b
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.ValidEpochStage.toPreTick {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} (h : ValidEpochStage c U n_max θ fs) :
ValidEpochStagePreTick c U n_max θ fs
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.fpAt_lt {c U n_max : ℕ} (θ : SeedWhp c U n_max) (fs : FastState) (salt b loc : ℕ) :
FastState.fpAt c U n_max θ fs salt b loc < 2 ^ fpBitsWhp n_max
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.keyValAt_eq_of_fields {c U n_max : ℕ} {θ₁ : BktSeed c U n_max} {fs₁ fs₂ : FastState} (hq : fs₁.quotArr = fs₂.quotArr) (hbp : fs₁.backPtr = fs₂.backPtr) :
FastState.keyValAt c U n_max θ₁ fs₁ = FastState.keyValAt c U n_max θ₁ fs₂
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.fpAt_eq_of_fields {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs₁ fs₂ : FastState} (hq : fs₁.quotArr = fs₂.quotArr) (hbp : fs₁.backPtr = fs₂.backPtr) (salt b : ℕ) :
FastState.fpAt c U n_max θ fs₁ salt b = FastState.fpAt c U n_max θ fs₂ salt b
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.rKeyAt_eq_of_fields {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs₁ fs₂ : FastState} (hq : fs₁.quotArr = fs₂.quotArr) (hbp : fs₁.backPtr = fs₂.backPtr) :
FastState.rKeyAt c U n_max θ fs₁ = FastState.rKeyAt c U n_max θ fs₂
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.OvermarsBucketInv.of_eq_on {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs fs' : FastState} {b : ℕ} (h : OvermarsBucketInv c U n_max θ fs b) (hfp : FastState.fpAt c U n_max θ fs' (fs'.bktSalt b) b = FastState.fpAt c U n_max θ fs (fs.bktSalt b) b) (hst : fs'.rebStage = fs.rebStage) (hep : fs'.curEp = fs.curEp) (hdn : fs'.rebDoneFlag b = fs.rebDoneFlag b) (hls : fs'.locState b = fs.locState b) (hcnt : fs'.bktCount b = fs.bktCount b) (hlic : fs'.liveInsCount b = fs.liveInsCount b) (hoa : fs'.overmarsActive b = fs.overmarsActive b) (hoc : fs'.overmarsCursor b = fs.overmarsCursor b) (hoi : fs'.overmarsInsCount b = fs.overmarsInsCount b) (hsl : fs'.slices (fs'.overmarsSliceIdx b) = fs.slices (fs.overmarsSliceIdx b)) :
OvermarsBucketInv c U n_max θ fs' b
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.OvermarsBucketInv.of_eq_lt {c U n_max : ℕ} {θ : SeedWhp c U n_max} {fs fs' : FastState} {b : ℕ} (h : OvermarsBucketInv c U n_max θ fs b) (hsalt : fs'.bktSalt b = fs.bktSalt b) (hfp : ∀ loc < fs.bktCount b, FastState.fpAt c U n_max θ fs' (fs.bktSalt b) b loc = FastState.fpAt c U n_max θ fs (fs.bktSalt b) b loc) (hst : fs'.rebStage = fs.rebStage) (hep : fs'.curEp = fs.curEp) (hdn : fs'.rebDoneFlag b = fs.rebDoneFlag b) (hls : ∀ loc < fs.bktCount b, fs'.locState b loc = fs.locState b loc) (hcnt : fs.bktCount b ≤ fs'.bktCount b) (hlic : fs'.liveInsCount b = fs.liveInsCount b) (hoa : fs'.overmarsActive b = fs.overmarsActive b) (hoc : fs'.overmarsCursor b = fs.overmarsCursor b) (hoi : fs'.overmarsInsCount b = fs.overmarsInsCount b) (hsl : fs'.slices (fs'.overmarsSliceIdx b) = fs.slices (fs.overmarsSliceIdx b)) :
OvermarsBucketInv c U n_max θ fs' b