Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Claim B.1.1, p. A:43 — for most SSS of size K1−5δK^{1-5\delta}K1−5δ, at most a 4K−4δ4K^{-4\delta}4K−4δ fraction of x∈Sx\in Sx∈S query S∖{x}S\setminus\{x\}S∖{x} (corrected)

Proved
ObfImpossibility.PseudoOracle.property2_averaging

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

averagingp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1pseudorandomnessquery-complexity

Let 0<δ≤1/1000<\delta\le 1/1000<δ≤1/100, let K,LK,LK,L be natural numbers, let DDD be a distinguisher making at most KδK^\deltaKδ oracle queries, and let G:[K]→[L]G:[K]\to[L]G:[K]→[L] be injective. Put s=⌊K1−5δ⌋s=\lfloor K^{1-5\delta}\rfloors=⌊K1−5δ⌋ and choose SSS uniformly among the sss-element subsets of [K][K][K]. Then

Pr⁡S[ #{x∈S: DG(G(x)) queries its oracle at an element of S∖{x}} ≤ 4K−4δ ∣S∣ ] ≥ 34.\Pr_S\Big[\ \#\{x\in S:\ D^G(G(x)) \text{ queries its oracle at an element of } S\setminus\{x\}\}\ \le\ 4K^{-4\delta}\,|S|\ \Big]\ \ge\ \frac34 .SPr​[ #{x∈S: DG(G(x)) queries its oracle at an element of S∖{x}} ≤ 4K−4δ∣S∣ ] ≥ 43​.

This is the averaging step behind Property 2 of Claim B.1.1: since DDD makes at most KδK^\deltaKδ queries and SSS has density about K−5δK^{-5\delta}K−5δ, few x∈Sx\in Sx∈S have runs that hit the rest of SSS, and discarding them leaves a large subset of SSS that the remaining runs avoid.

The statement differs from the printed sentence in two ways. The paper writes "4/K−4δ4/K^{-4\delta}4/K−4δ", a misprint for 4K−4δ4K^{-4\delta}4K−4δ. More importantly, the paper counts queries at any element of SSS, including xxx itself; that version is false. A one-query distinguisher D(y)D(y)D(y) that queries h(y)h(y)h(y) and outputs 111 iff the answer is yyy, where h∘G=idh\circ G=\mathrm{id}h∘G=id, queries xxx on input G(x)G(x)G(x) for every xxx, and every such GGG violates (7). The bound here excludes the query at xxx and holds for every GGG, hence also for GGG drawn from the set of GGG violating (7), as the paper uses it.

Formalization Note The probability is the number of good SSS in Finset.powersetCard s univ divided by (Ks)\binom{K}{s}(sK​). "Fraction of x∈Sx\in Sx∈S" is written multiplicatively, #{… }≤4K−4δ∣S∣\#\{\dots\}\le 4K^{-4\delta}|S|#{…}≤4K−4δ∣S∣, which is the same condition for S≠∅S\ne\emptysetS=∅. The restriction δ≤1/100\delta\le1/100δ≤1/100 is the paper's "sufficiently small δ\deltaδ" made explicit.

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

/-- Proof of Claim B.1.1, p. A:43 (Property 2), corrected: for every `G`, with probability
at least `3/4` over a uniformly random `S ⊆ [K]` of size `⌊K^{1-5δ}⌋`, the run of
`D^G(G(x))` queries its oracle at an element of `S` other than `x` itself for at most a
`4K^{-4δ}` fraction of the `x ∈ S`. The paper prints `4/K^{-4δ}` and does not exclude the
query at `x`; the printed form is false (a one-query `D` that inverts `G` breaks it). -/
theorem property2_averaging :
    ∀ δ : ℝ, 0 < δ → δ ≤ 1 / 100 → ∀ K L : ℕ,
      ∀ D : Fin L → QTree K L, (∀ y, ((D y).depth : ℝ) ≤ (K : ℝ) ^ δ) →
        ∀ G : Fin K ↪ Fin L,
          (3 / 4 : ℝ) ≤
            ((((Finset.univ : Finset (Fin K)).powersetCard ⌊(K : ℝ) ^ (1 - 5 * δ)⌋₊).filter
                fun S => (((S.filter fun x => (D (G x)).hits G (S.erase x) = true).card : ℝ) ≤
                  4 * (K : ℝ) ^ (-(4 * δ)) * (S.card : ℝ))).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 2); corrected: excludes the query at x, reads 4/K^{−4δ} as 4K^{−4δ}
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