Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2.4 — generalized leftover hash lemma: SD((HX(W),X,I),(Uℓ,X,I))≤122−H~∞(W∣I)2ℓ\mathbf{SD}((H_X(W),X,I),(U_\ell,X,I))\le\frac12\sqrt{2^{-\tilde{\mathbf H}_\infty(W\mid I)}2^\ell}SD((HX​(W),X,I),(Uℓ​,X,I))≤21​2−H~∞​(W∣I)2ℓ​

Proved
FuzzyExtractors.Hamming.lemma_2_4

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

min-entropyp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1randomness-extractorsuniversal-hashing

Let {Hx:α→{0,1}ℓ}x∈X\{H_x:\alpha\to\{0,1\}^\ell\}_{x\in X}{Hx​:α→{0,1}ℓ}x∈X​ be a universal family over a finite set α\alphaα, indexed by a finite nonempty set XXX. Then for every pair of random variables (W,I)(W,I)(W,I), where III takes values in an arbitrary set and XXX is uniform and independent of (W,I)(W,I)(W,I),

SD((HX(W),X,I), (Uℓ,X,I))  ≤  122−H~∞(W∣I) 2ℓ.(2)\mathbf{SD}\big((H_X(W),X,I),\,(U_\ell,X,I)\big)\;\le\;\frac12\sqrt{2^{-\tilde{\mathbf H}_\infty(W\mid I)}\,2^\ell}. \tag{2}SD((HX​(W),X,I),(Uℓ​,X,I))≤21​2−H~∞​(W∣I)2ℓ​.(2)

In particular, for every mmm and every ε>0\varepsilon>0ε>0, the family is an average-case (m,ℓ,ε)(m,\ell,\varepsilon)(m,ℓ,ε)-strong extractor whenever

ℓ  ≤  m−2log⁡(1/ε)+2.\ell\;\le\;m-2\log(1/\varepsilon)+2 .ℓ≤m−2log(1/ε)+2.

Universal hashing therefore extracts from average min-entropy with no loss beyond the usual 2log⁡(1/ε)2\log(1/\varepsilon)2log(1/ε); this is what lets a fuzzy extractor be built from a sketch that leaks information.

Formalization Note {0,1}n\{0,1\}^n{0,1}n is generalized to any finite set α\alphaα; the auxiliary variable III ranges over every type. ε>0\varepsilon>0ε>0 is explicit.

Preamble
import Mathlib
import Definitions.Def_FuzzyExtractors_Hamming_Basic
Formal statement
namespace FuzzyExtractors.Hamming

theorem lemma_2_4 {α X : Type} [Fintype α] [Fintype X] [Nonempty X] {ℓ : ℕ}
    (H : X → α → (Fin ℓ → Bool)) (hH : IsUniversal H) :
    (∀ (ι : Type) (WI : PMF (α × ι)),
      statDist (extractLawAux (fun w x => H x w) WI)
          ((extractLawAux (fun w x => H x w) WI).bind
            fun y => (uniformBits ℓ).map fun u => (u, y.2.1, y.2.2))
        ≤ (1 / 2 : ℝ) * Real.sqrt ((2 : ℝ) ^ (-avgMinEntropy WI) * (2 : ℝ) ^ (ℓ : ℝ))) ∧
    (∀ m ε : ℝ, 0 < ε → (ℓ : ℝ) ≤ m - 2 * Real.logb 2 (1 / ε) + 2 →
      IsAvgStrongExtractor m ε (fun w x => H x w)) := by sorry

end FuzzyExtractors.Hamming
Source
Dodis, Ostrovsky, Reyzin & Smith, Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy Data, arXiv:cs/0602007v4, Lemma 2.4, eq. (2), p. 10
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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me