Colliding-Fingerprint Buffer Branch of fastInsert #
Internal correctness proof for the hasFpCollision = true branch of fastInsertFresh, inserting
the newly allocated coordinate into the current-epoch buffer trie fs.buf fs.curEp with state
2 + fs.curEp [BFCKK24].
Main results #
Cslib.DataStructure.Dictionary.SuccinctWhp.fastInsertFresh_collision_spec: provesCoreFastInv, off-bucketOvermarsBucketInv, target-bucketPreOvermarsBucketInv, andValidEpochStagein the colliding-fingerprint branch.
References #
theorem Cslib.DataStructure.Dictionary.SuccinctWhp.fastInsertFresh_collision_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} {v : ℕ} {hasFpCollision : Bool} (hbase : FastInsertFreshBase c U V n_max θ fs dict u v hasFpCollision) (hg3 :
¬(hasFpCollision = true ∧ (!bufEverPresent (cTabWhp c) (bCharWhp n_max) (fs.buf fs.curEp) (fpReducedKey c U n_max θ.2 u)) = true ∧ 2 * sMaxWhp c n_max ≤ (fs.buf fs.curEp).itemAlloc)) (hfp_coll : hasFpCollision = true) :
have b := FeistelQuotient.feistelBucket (bWhp n_max) (bktHash c U n_max θ.1) ↑u;
have X := fs.bktCount b;
have fsIns :=
fastInsertFresh c n_max b X (FeistelQuotient.keyQuotient (bWhp n_max) ↑u) v (fpReducedKey c U n_max θ.2 u)
(fpOfSalt c U n_max θ.2 (fs.bktSalt b) u) (fs.liveSliceIdx b) hasFpCollision (fastInsertAlloc n_max b X fs);
CoreFastInv c U V n_max θ fsIns (Function.update dict u (some v)) ∧ (∀ b' < numBucketsWhp n_max, b' ≠ b → OvermarsBucketInv c U n_max θ fsIns b') ∧ PreOvermarsBucketInv c U n_max θ fsIns b ∧ ValidEpochStage c U n_max θ fsIns ∧ fsIns.epochClock = fs.epochClock
Invariant preservation for fastInsertFresh in the hasFpCollision = true branch.