Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 7.5 — an average-case secure sketch for edit distance with loss ⌈n/c⌉log⁡2(n−c+1)+(2c−1)t⌈log⁡(Fc+1)⌉\lceil n/c\rceil\log_2(n-c+1) + (2c-1)t\lceil\log(F^c+1)\rceil⌈n/c⌉log2​(n−c+1)+(2c−1)t⌈log(Fc+1)⌉

Proved
FuzzyExtractors.EditSketch.theorem_7_5

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

edit-distancefuzzy-extractorsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1secure-sketch

Let F\mathcal FF be a finite alphabet with F=∣F∣F = |\mathcal F|F=∣F∣ letters, and let EditF(n)\mathrm{Edit}_{\mathcal F}(n)EditF​(n) be the strings of length nnn over F\mathcal FF, with distance the smallest number of character insertions and deletions transforming one string into the other. For all natural numbers n,c,tn, c, tn,c,t with 1≤c≤n1 \le c \le n1≤c≤n and every real mmm, there is an average-case

(EditF(n), m, m−⌈nc⌉log⁡2(n−c+1)−(2c−1) t ⌈log⁡(Fc+1)⌉, t)\Big(\mathrm{Edit}_{\mathcal F}(n),\ m,\ m - \big\lceil \tfrac nc \big\rceil \log_2(n - c + 1) - (2c - 1)\,t\,\big\lceil \log(F^c + 1) \big\rceil,\ t\Big)(EditF​(n), m, m−⌈cn​⌉log2​(n−c+1)−(2c−1)t⌈log(Fc+1)⌉, t)

secure sketch.

The first term of the entropy loss comes from the shingling embedding and its recovery information, the second from PinSketch run on the shingle set over the universe Fc\mathcal F^cFc embedded into GF(2μ)∗GF(2^\mu)^*GF(2μ)∗ with μ=⌈log⁡(Fc+1)⌉\mu = \lceil \log(F^c + 1) \rceilμ=⌈log(Fc+1)⌉. The parameter ccc trades the two terms off.

Formalization Note. The paper's statement carries "0<ϵ≤10 < \epsilon \le 10<ϵ≤1", a parameter that does not occur in the conclusion (a carry-over from Theorem 7.4); it is dropped. ttt is universally quantified, and the implicit range 1≤c≤n1 \le c \le n1≤c≤n is made explicit. ⌈log⁡(Fc+1)⌉\lceil \log(F^c + 1) \rceil⌈log(Fc+1)⌉ is Nat.clog 2 (F ^ c + 1), the least μ\muμ with Fc+1≤2μF^c + 1 \le 2^\muFc+1≤2μ, and ⌈n/c⌉\lceil n/c \rceil⌈n/c⌉ is ⌈(n : ℝ) / c⌉₊. "Efficient" is dropped. The sketch type and the (possibly randomized) procedures are existentially quantified; the edit distance is the published weighted edit distance with cost 111 per insertion or deletion and 222 per replacement.

Preamble
import Mathlib
import Definitions.Def_FuzzyExtractors_EditSketch_Basic
Formal statement
namespace FuzzyExtractors.EditSketch

theorem theorem_7_5 (𝓕 : Type) [Fintype 𝓕] [DecidableEq 𝓕] (n c t : ℕ) (m : ℝ)
    (hc : 1 ≤ c) (hcn : c ≤ n) :
    ∃ (S : Type) (SS : EditSpace 𝓕 n → PMF S) (Rec : EditSpace 𝓕 n → S → PMF (EditSpace 𝓕 n)),
      FuzzyExtractors.Hamming.IsAvgSecureSketch editDis m
        (m - (⌈(n : ℝ) / c⌉₊ : ℝ) * Real.logb 2 ((n : ℝ) - c + 1)
          - (2 * (c : ℝ) - 1) * t * (Nat.clog 2 (Fintype.card 𝓕 ^ c + 1) : ℝ))
        t SS Rec := by sorry

end FuzzyExtractors.EditSketch
Source
Dodis, Ostrovsky, Reyzin & Smith, Fuzzy Extractors, arXiv:cs/0602007v4, Theorem 7.5, p. 27
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me