Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Inequality (8), p. A:44 — the query-free simulator MMM built from SGS_GSG​ and G∣[K]∖SGG|_{[K]\setminus S_G}G∣[K]∖SG​​ keeps the gap >1/(2Kδ)>1/(2K^\delta)>1/(2Kδ)

Proved
ObfImpossibility.PseudoOracle.inequality_8

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

p2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1pseudorandomnessquery-complexitysimulation

Let K,LK,LK,L be natural numbers, δ∈R\delta\in\mathbb Rδ∈R, DDD a distinguisher, G:[K]→[L]G:[K]\to[L]G:[K]→[L] injective and SG⊆[K]S_G\subseteq[K]SG​⊆[K]. Define M(y)M(y)M(y) to simulate D(y)D(y)D(y), answering each oracle query z∉SGz\notin S_Gz∈/SG​ with G(z)G(z)G(z) and halting with output 000 at a query z∈SGz\in S_Gz∈SG​. Assume

  1. (Property 2 of Claim B.1.1) for every x∈SGx\in S_Gx∈SG​, DG(G(x))D^G(G(x))DG(G(x)) never queries its oracle at an element of SGS_GSG​;
  2. (Property 3, in the sign case at hand) Pr⁡x∈SG[DG(G(x))=1]−Pr⁡y∈LG[DG(y)=1]>12Kδ\Pr_{x\in S_G}[D^G(G(x))=1]-\Pr_{y\in L_G}[D^G(y)=1]>\frac1{2K^\delta}Prx∈SG​​[DG(G(x))=1]−Pry∈LG​​[DG(y)=1]>2Kδ1​, where LG=[L]∖G([K]∖SG)L_G=[L]\setminus G([K]\setminus S_G)LG​=[L]∖G([K]∖SG​).

Then MMM depends only on SGS_GSG​ and the restriction G∣[K]∖SGG|_{[K]\setminus S_G}G∣[K]∖SG​​ (any injective G′G'G′ agreeing with GGG off SGS_GSG​ gives the same MMM), and

Pr⁡x∈SG[M(G(x))=1]−Pr⁡y∈LG[M(y)=1]>12Kδ.(8)\Pr_{x\in S_G}\big[M(G(x))=1\big]-\Pr_{y\in L_G}\big[M(y)=1\big]>\frac{1}{2K^\delta}.\tag{8}x∈SG​Pr​[M(G(x))=1]−y∈LG​Pr​[M(y)=1]>2Kδ1​.(8)

In the proof of Claim B.1.2 this lets the description of GGG replace oracle access to GGG on SGS_GSG​: MMM is computable from the part of GGG already described, and it still separates G(SG)G(S_G)G(SG​) from LGL_GLG​.

Formalization Note As in the paper, the absolute value of Property 3 is dropped and the case Pr⁡x∈SG[⋅]−Pr⁡y∈LG[⋅]>12Kδ\Pr_{x\in S_G}[\cdot]-\Pr_{y\in L_G}[\cdot]>\frac1{2K^\delta}Prx∈SG​​[⋅]−Pry∈LG​​[⋅]>2Kδ1​ is treated; the other case is symmetric (with MMM outputting 111 at a query in SGS_GSG​) and is not stated. M(y)M(y)M(y) is (D y).runAvoid G S_G.

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

/-- Inequality (8), p. A:44 (proof of Claim B.1.2). `M(y) := (D y).runAvoid G S_G`
simulates `D(y)`, answering a query `z ∉ S_G` with `G(z)` and halting with output `0` at a
query `z ∈ S_G`. Then `M` depends only on `S_G` and `G|_{[K] \ S_G}`, and if Property 2 of
Claim B.1.1 holds and `Pr_{x∈S_G}[D^G(G(x)) = 1] - Pr_{y∈L_G}[D^G(y) = 1] > 1/(2K^δ)`, then
`Pr_{x∈S_G}[M(G(x)) = 1] - Pr_{y∈L_G}[M(y) = 1] > 1/(2K^δ)`. -/
theorem inequality_8 (K L : ℕ) (δ : ℝ) (D : Fin L → QTree K L) (G : Fin K ↪ Fin L)
    (SG : Finset (Fin K))
    (hprop2 : ∀ x ∈ SG, (D (G x)).hits G SG = false)
    (hgap : 1 / (2 * (K : ℝ) ^ δ) <
      avg SG (fun x => (D (G x)).run G) - avg (LG G SG) (fun y => (D y).run G)) :
    (∀ G' : Fin K ↪ Fin L, (∀ z, z ∉ SG → G' z = G z) →
        ∀ y, (D y).runAvoid G' SG = (D y).runAvoid G SG) ∧
      1 / (2 * (K : ℝ) ^ δ) <
        avg SG (fun x => (D (G x)).runAvoid G SG) -
          avg (LG G SG) (fun y => (D y).runAvoid G SG) := 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:44, Appendix B, proof of Claim B.1.2, inequality (8)
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