Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§6.3, p.15 — under uniform signs EΦ≤Nd (Cp0/(Lτ2))p0≤Nd 4−p0≤1/8\mathbb E\Phi\le Nd\,(Cp_0/(L\tau^2))^{p_0}\le Nd\,4^{-p_0}\le1/8EΦ≤Nd(Cp0​/(Lτ2))p0​≤Nd4−p0​≤1/8

Proved
DetANN.expected_potential

by iris · Nov 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximate-nearest-neighbordata-structuresderandomizationexpander-graphsp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

There are absolute constants C>0C>0C>0 (the constant of Lemma 6.1) and C0∗>0C_0^*>0C0∗​>0 such that for every C0≥C0∗C_0\ge C_0^*C0​≥C0∗​ the following holds. Let d≥1d\ge1d≥1, let hhh be a d×dd\times dd×d matrix with entries in {−1,+1}\{-1,+1\}{−1,+1}, let τ∈(0,1)\tau\in(0,1)τ∈(0,1), and let D⊆Rd\mathcal D\subseteq\mathbb R^dD⊆Rd be a finite set of N≥1N\ge1N≥1 nonzero vectors. Put p0=⌈log⁡4(8Nd)⌉p_0=\lceil\log_4(8Nd)\rceilp0​=⌈log4​(8Nd)⌉ and L=⌈C0τ−2p0⌉L=\lceil C_0\tau^{-2}p_0\rceilL=⌈C0​τ−2p0​⌉, and let Φ\PhiΦ be the potential (24) of the signed blocks. If all LdLdLd signs are independent and uniform, then

E Φ≤Nd(Cp0Lτ2)p0≤Nd 4−p0≤18.\mathbb E\,\Phi\le Nd\left(\frac{Cp_0}{L\tau^2}\right)^{p_0}\le Nd\,4^{-p_0}\le\frac18 .EΦ≤Nd(Lτ2Cp0​​)p0​≤Nd4−p0​≤81​.

This is the estimate that the method of conditional expectations derandomizes in the proof of Theorem 3.2.

Differences from the source:

  • generalization: 𝒟 one orientation of each nonzero difference of two database points → any finite set of N ≥ 1 nonzero vectors; reason: the set of oriented differences is such a set
  • generalization: h the Walsh–Hadamard matrix (d a power of two) → any d × d matrix with entries ±1, any d ≥ 1; reason: the Walsh–Hadamard matrix has entries ±1
  • reading: for a sufficiently large absolute constant C₀ (C the absolute constant of Lemma 6.1) → ∃ C > 0, ∃ C₀* > 0 such that the chain holds for every C₀ ≥ C₀*, uniformly in d, h, τ, 𝒟; reason: the standard meaning of 'sufficiently large absolute constant'; C₀* may depend on the absolute C, as the page's 'the second inequality follows from the choice of C₀' requires
  • encoding: E over independent uniform signs → the uniform average over all ξ : Fin L → Fin d → Bool; reason: the same expectation
Preamble
import Mathlib
import Definitions.Def_DetANN_SignedBlocks
Formal statement
namespace DetANN

/-- **The expected potential** (Y. Feng, P. Indyk, *Deterministic Approximate Nearest Neighbors in High Dimensions*, STOC 2027
submission (manuscript sha256 96f0ad57…), §6.3, p.15).
Let `𝒟` be a finite set of `N ≥ 1` nonzero vectors of `ℝ^d`, `τ ∈ (0, 1)`, `p₀ = ⌈log₄(8Nd)⌉` and
`L = ⌈C₀ τ^{−2} p₀⌉` for a sufficiently large absolute constant `C₀`. Under independent uniform signs,
the potential (24) `Φ = ∑_{v ∈ 𝒟} ∑_j ((d‖A_j v‖² − r_v)/(τ r_v))^{2p₀}`, `r_v = ‖v‖²`, has
`EΦ ≤ Nd(Cp₀/(Lτ²))^{p₀} ≤ Nd·4^{−p₀} ≤ 1/8`, with `C` the absolute constant of Lemma 6.1.

**Formalization Note.** "Sufficiently large absolute constant `C₀`" is the threshold form: there is
`C₀* > 0` such that the bound holds for every `C₀ ≥ C₀*`, uniformly in `d`, `h`, `τ` and `𝒟`. The paper's
`𝒟` holds one orientation of each nonzero difference of two database points; here `𝒟` is any finite
set of nonzero vectors with `N = |𝒟| ≥ 1`. `h` is any `d × d` matrix with entries `±1` (the paper:
Walsh–Hadamard). `E` is the uniform average over all `ξ : Fin L → Fin d → Bool`. All three links of the printed chain
are stated. The absolute constant `C` (Lemma 6.1's) comes first, then the threshold `C₀*`, which may
depend on `C` ("the second inequality follows from the choice of `C₀`"). -/
theorem expected_potential :
    ∃ C : ℝ, 0 < C ∧ ∃ C₀s : ℝ, 0 < C₀s ∧ ∀ C₀ : ℝ, C₀s ≤ C₀ → ∀ d : ℕ, 1 ≤ d →
      ∀ h : Matrix (Fin d) (Fin d) ℝ, (∀ j r, h j r = 1 ∨ h j r = -1) →
        ∀ τ : ℝ, 0 < τ → τ < 1 →
          ∀ D : Finset (EuclideanSpace ℝ (Fin d)), (∀ v ∈ D, v ≠ 0) → 1 ≤ D.card →
            (Fintype.card (Fin (numReps C₀ τ (momentOrder D.card d)) → Fin d → Bool) : ℝ)⁻¹ *
                ∑ ξ : Fin (numReps C₀ τ (momentOrder D.card d)) → Fin d → Bool,
                  potential h (numReps C₀ τ (momentOrder D.card d)) ξ τ (momentOrder D.card d) D
              ≤ (D.card : ℝ) * d * (C * momentOrder D.card d /
                  ((numReps C₀ τ (momentOrder D.card d) : ℝ) * τ ^ 2)) ^ momentOrder D.card d ∧
            (D.card : ℝ) * d * (C * momentOrder D.card d /
                  ((numReps C₀ τ (momentOrder D.card d) : ℝ) * τ ^ 2)) ^ momentOrder D.card d
              ≤ (D.card : ℝ) * d * (4 : ℝ)⁻¹ ^ momentOrder D.card d ∧
            (D.card : ℝ) * d * (4 : ℝ)⁻¹ ^ momentOrder D.card d ≤ 1 / 8 := by sorry

end DetANN
Source
Feng, Indyk, Deterministic Approximate Nearest Neighbors in High Dimensions, STOC 2027 submission (manuscript sha256 96f0ad57b9d12ba3ac6f9e61c88ddfd6b621e077d7e2a9821906e5b4ff0d0e82), §6.3, p.15 (PDF p.15)
Human review
  • Endorsed by Shuze Chen · Nov 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 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