Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Claim B.1.1, p. A:43 — a random SSS of size K1−5δK^{1-5\delta}K1−5δ estimates Pr⁡x∈[K][DG(G(x))=1]\Pr_{x\in[K]}[D^G(G(x))=1]Prx∈[K]​[DG(G(x))=1] within 1/(4Kδ)1/(4K^\delta)1/(4Kδ)

Proved
ObfImpossibility.PseudoOracle.chernoff_over_S

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

concentrationp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1pseudorandomnesssampling-without-replacement

For every 0<δ≤1/1000<\delta\le1/1000<δ≤1/100 there are a constant c>0c>0c>0 and a threshold K0K_0K0​ such that the following holds for all K≥K0K\ge K_0K≥K0​, all LLL, every distinguisher DDD and every injective G:[K]→[L]G:[K]\to[L]G:[K]→[L]. Let SSS be a uniformly random subset of [K][K][K] of size ⌊K1−5δ⌋\lfloor K^{1-5\delta}\rfloor⌊K1−5δ⌋, and let ppp be the probability over SSS that

∣Pr⁡x∈S[DG(G(x))=1]−Pr⁡x∈[K][DG(G(x))=1]∣≤14Kδ.\Big|\Pr_{x\in S}\big[D^G(G(x))=1\big]-\Pr_{x\in[K]}\big[D^G(G(x))=1\big]\Big|\le\frac{1}{4K^\delta}.​x∈SPr​[DG(G(x))=1]−x∈[K]Pr​[DG(G(x))=1]​≤4Kδ1​.

Then

p ≥ 1−exp⁡ ⁣(−c K1−5δ (K−δ)2)andp>34.p\ \ge\ 1-\exp\!\big(-c\,K^{1-5\delta}\,(K^{-\delta})^2\big)\qquad\text{and}\qquad p>\frac34 .p ≥ 1−exp(−cK1−5δ(K−δ)2)andp>43​.

This is the sampling step behind Property 3 of Claim B.1.1: a random set of K1−5δK^{1-5\delta}K1−5δ inputs estimates the acceptance probability of DDD on G(x)G(x)G(x), x∈[K]x\in[K]x∈[K], to within 1/(4Kδ)1/(4K^\delta)1/(4Kδ). The paper prints the exponent as exp⁡(Ω(⋅))\exp(\Omega(\cdot))exp(Ω(⋅)); the minus sign is restored.

Formalization Note Ω(⋅)\Omega(\cdot)Ω(⋅) is rendered as an explicit constant c>0c>0c>0 that may depend on δ\deltaδ but not on KKK, LLL, DDD or GGG. Probabilities over SSS are counting fractions over the (Ks)\binom{K}{s}(sK​) subsets of size s=⌊K1−5δ⌋s=\lfloor K^{1-5\delta}\rfloors=⌊K1−5δ⌋. The query bound on DDD is not needed for this step and is not assumed.

Preamble
import Mathlib
import Definitions.Def_ObfImpossibility_PseudoOracle_Setting
Formal statement
namespace ObfImpossibility.PseudoOracle

/-- Proof of Claim B.1.1, p. A:43 (Property 3), the Chernoff-like bound: for every `D`
and `G`, with probability at least `1 - exp(-Ω(K^{1-5δ}·(K^{-δ})²)) > 3/4` over a
uniformly random `S ⊆ [K]` of size `⌊K^{1-5δ}⌋`,
`|Pr_{x∈S}[D^G(G(x)) = 1] - Pr_{x∈[K]}[D^G(G(x)) = 1]| ≤ 1/(4K^δ)`. -/
theorem chernoff_over_S :
    ∀ δ : ℝ, 0 < δ → δ ≤ 1 / 100 → ∃ c : ℝ, 0 < c ∧ ∃ K₀ : ℕ, ∀ K L : ℕ, K₀ ≤ K →
      ∀ (D : Fin L → QTree K L) (G : Fin K ↪ Fin L),
        1 - Real.exp (-(c * ((K : ℝ) ^ (1 - 5 * δ) * ((K : ℝ) ^ (-δ)) ^ 2))) ≤
            ((((Finset.univ : Finset (Fin K)).powersetCard ⌊(K : ℝ) ^ (1 - 5 * δ)⌋₊).filter
                fun S => |avg S (fun x => (D (G x)).run G) - prX D G| ≤
                  1 / (4 * (K : ℝ) ^ δ)).card : ℝ) /
              ((K.choose ⌊(K : ℝ) ^ (1 - 5 * δ)⌋₊ : ℕ) : ℝ) ∧
          (3 / 4 : ℝ) <
            ((((Finset.univ : Finset (Fin K)).powersetCard ⌊(K : ℝ) ^ (1 - 5 * δ)⌋₊).filter
                fun S => |avg S (fun x => (D (G x)).run G) - prX D G| ≤
                  1 / (4 * (K : ℝ) ^ δ)).card : ℝ) /
              ((K.choose ⌊(K : ℝ) ^ (1 - 5 * δ)⌋₊ : ℕ) : ℝ) := by sorry

end ObfImpossibility.PseudoOracle
Source
Barak et al., On the (Im)possibility of Obfuscating Programs, J. ACM 59(2) (2012), author's copy, p. A:43, Appendix B, proof of Claim B.1.1 (Property 3, Chernoff-like bound)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 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