Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 6, p. 38 — equivalent partial assignments give O(nT²/p)-close views in the generic colored matrix model

Proved
GGHRSW.ColoredMatrix.theorem_6

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

cryptographygeneric-modelobfuscationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1statistical-distance

Let ppp be a prime, BPBPBP a length-nnn branching program over ℓ\ellℓ input bits, and (J,σ)(J,\sigma)(J,σ), (J,σ′)(J,\sigma')(J,σ′) two partial input assignments on the same set JJJ of positions that are functionally equivalent: F∣σ=F∣σ′F|_\sigma = F|_{\sigma'}F∣σ​=F∣σ′​. Let A\mathcal AA be an adversary in the generic colored matrix model that makes qqq adaptive queries to the representation oracle initialized with DB(p,BP,(J,σ))DB(p,BP,(J,\sigma))DB(p,BP,(J,σ)), respectively DB(p,BP,(J,σ′))DB(p,BP,(J,\sigma'))DB(p,BP,(J,σ′)), built from a fresh sample of RNDp(BP)\mathcal{RND}_p(BP)RNDp​(BP). Let T=∣DB∣+qT = |DB| + qT=∣DB∣+q bound the number of handles it receives. Then there is an absolute constant CCC, independent of ppp, BPBPBP, the assignments and A\mathcal AA, such that

∣Pr⁡[ADB(p,BP,(J,σ))=1]−Pr⁡[ADB(p,BP,(J,σ′))=1]∣≤C n T2p.\Big|\Pr\big[\mathcal A^{DB(p,BP,(J,\sigma))}=1\big] - \Pr\big[\mathcal A^{DB(p,BP,(J,\sigma'))}=1\big]\Big| \le \frac{C\,n\,T^2}{p}.​Pr[ADB(p,BP,(J,σ))=1]−Pr[ADB(p,BP,(J,σ′))=1]​≤pCnT2​.

Equivalently, the statistical distance between the views viewA(p,BP,(J,σ),T)\mathsf{view}_{\mathcal A}(p,BP,(J,\sigma),T)viewA​(p,BP,(J,σ),T) and viewA(p,BP,(J,σ′),T)\mathsf{view}_{\mathcal A}(p,BP,(J,\sigma'),T)viewA​(p,BP,(J,σ′),T) is O(nT2/p)O(nT^2/p)O(nT2/p).

This is the paper's unconditional evidence for its Equivalent Program Indistinguishability assumption (Assumption 1): no attack that only adds, scales and multiplies the garbled matrices in an order respecting their colours can tell two functionally equivalent input fixings apart, except with probability O(nT2/p)O(nT^2/p)O(nT2/p).

Formalization Note. The constant CCC is quantified before everything else, which is what O(⋅)O(\cdot)O(⋅) means here; no value is fixed. The statistical distance is expressed as the largest acceptance gap: the adversary includes its final decision, so quantifying over every adversary covers every distinguisher of the views (coins included). The page's TTT counts all handles sent, initial ones included; a qqq-query adversary receives at most ∣DB∣+q|DB|+q∣DB∣+q handles, the value used. The bundling scalars follow the γ\gammaγ-procedure of p. 42, and the output convention is "identity means 1"; see the definitions file. The sentence before the theorem says O(t2/p)O(t^2/p)O(t2/p); the theorem's O(nT2/p)O(nT^2/p)O(nT2/p) is used.

Preamble
import Mathlib
import Definitions.Def_GGHRSW_ColoredMatrix_Model
Formal statement
namespace GGHRSW.ColoredMatrix

theorem theorem_6 : ∃ C : ℝ, ∀ (p : ℕ) [Fact p.Prime] (bp : BP) (J : Finset (Fin bp.ℓ))
    (σ σ' : Fin bp.ℓ → Bool), FunctionallyEquivalent bp J σ σ' →
    ∀ A : Adversary p,
      |acceptProb p bp J σ A - acceptProb p bp J σ' A| ≤
        C * bp.n * ((dbSize bp J + A.q : ℕ) : ℝ) ^ 2 / p := by sorry

end GGHRSW.ColoredMatrix
Source
Garg, Gentry, Halevi, Raykova, Sahai and Waters, Candidate Indistinguishability Obfuscation and Functional Encryption for All Circuits, SIAM J. Comput. 45(3), 2016 (authors' version of July 21, 2013), p. 38, Theorem 6
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

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