Documentation

CslibFrontier.DataStructure.Dictionary.SuccinctWhpModelStep.DeleteLast

Fast-Mode Deletion Without Relocation (fastDelete_afterDel_last_spec) #

This module proves fastDelete_afterDel_last_spec: when fastFindLoc locates key u at the terminal bucket coordinate loc_del = fs.bktCount b - 1, fastDeleteRemove followed by fastDeleteShrink preserves CoreFastInv (on Function.update dict u none), OvermarsBucketInv on all other buckets, PreOvermarsBucketInv on bucket b, and ValidEpochStagePreTick.

Main results #

theorem Cslib.DataStructure.Dictionary.SuccinctWhp.fastDelete_afterDel_last_spec {c U V n_max : ℕ} {θ : SeedWhp c U n_max} {fs : FastState} {dict : State U} (hv : ValidFastState c U V n_max θ fs dict) (u : Fin U) {loc_del : ℕ} (hld_lt : loc_del < fs.bktCount (FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u)) (hq_del : fs.quotArr (FastState.physSlot n_max fs (FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u) loc_del) = FeistelQuotient.keyQuotient (bWhp n_max) ↑u) (hnot_lt : ¬loc_del < fs.bktCount (FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u) - 1) :
have b := FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u; have loc_last := fs.bktCount b - 1; have fs1 := fastDeleteRemove c U n_max θ fs u b loc_del; have fsA := fastDeleteShrink n_max b loc_last fs1; CoreFastInv c U V n_max θ fsA (Function.update dict u none) ∧ (∀ b' < numBucketsWhp n_max, b' ≠ b → OvermarsBucketInv c U n_max θ fsA b') ∧ PreOvermarsBucketInv c U n_max θ fsA b ∧ ValidEpochStagePreTick c U n_max θ fsA

Intermediate fsAfterDel invariant when fastFindLoc finds loc_del = loc_last.