Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3.2 — Bounded sampling

Proved
GenericGroupWE.Main.lemma_3_2

by mikedeng1 · Nov 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexity-theorycryptographygeneric-groupsp2o-batch-stoc27ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1

There is one bounded polynomial-time oracle program implementing the explicit sampling scheme for all supplied primes and matrix inputs. Its implementation clause applies to m>0m>0m>0 and p≥2mp\ge2^mp≥2m, with matrix data and nnn supplied explicitly. For all m>0m>0m>0, every prime ppp, and n≥0n\ge0n≥0, let δ\deltaδ be the failure probability of the fixed coordinate schedule. Then

δ≤2−n−2.\delta\le2^{-n-2}.δ≤2−n−2.

Both messages have abort mass exactly δ\deltaδ. At every successful ciphertext, the bounded law equals (1−δ)(1-\delta)(1−δ) times the exact ideal encryption law, so conditioning on successful sampling recovers exactly (1). The unused random coordinates are sampled for both messages.

Differences from the source:

  • generalization: the matrices come from the polynomial-time reduction and a supplied prime → one program accepts arbitrary explicit matrices, with m>0 and p>=2^m for its time clause; the distribution bounds hold for all primes; reason: the sampling implementation only needs its coordinate ranges; the supplied-prime bound charges the m handles even for an empty matrix basis
  • encoding: conditional law given successful sampling → pointwise successful masses equal success probability times the ideal law, with the abort mass stated separately; reason: the strictly positive success probability makes these formulations equivalent
  • encoding: polynomial-time algorithms on encoded data → a single CookLevin polynomial-step implementation for each length-faithful encoded map; reason: the time predicate bounds actual Turing steps; clocks also bound rounds and state length
Preamble
import Definitions.Def_GenericGroupWE_Main_Scheme
import Definitions.Def_GenericGroupWE_Main_Complexity
Formal statement
namespace GenericGroupWE.Main

/-- Exact conditional distribution is expressed pointwise together with its success mass. -/
theorem lemma_3_2 :
    (∃ P : OracleProgram, CookLevin.IsPolyTimeComputable P.next ∧
      ∀ (m : ℕ) (p : PrimeOrder) (B : MatrixBundle m p) (n : ℕ) (message : Bool),
        0 < m → 2^m ≤ p.val →
        P.run true (schemeInput B n message) none = boundedEncryption B n message) ∧
    ∀ (m : ℕ) (hm : 0 < m) (p : PrimeOrder) (B : MatrixBundle m p) (n : ℕ),
      samplingFailure B n ≤ (2 : ℝ)^(-(n : ℝ)-2) ∧
      (∀ message : Bool,
        (boundedEncryption B n message) abortCiphertext = (samplingLaw B n) none) ∧
      (∀ (message : Bool) (C : Ciphertext), C.output.isSome →
        (boundedEncryption B n message) C =
          (1 - (samplingLaw B n) none) * (idealEncryption B hm message) C) := by sorry

end GenericGroupWE.Main
Source
Hair and Sahai, Witness Encryption via Prime-Order Generic Groups, STOC 2027 submission #47 (PDF built 2026-11-02; SHA-256 0b7f14e2db9bb3e199883ab907f854b7b5884c7c9f3d1e4c306bb71e89b659cb), https://github.com/sigact-stoc/stoc2027/releases/download/papers-1/47.pdf, Lemma 3.2, PDF p. 9 (printed p. 8).
Human review
  • Endorsed by Shuze Chen · Nov 8, 2026

    Confirmed by the moderator at approval.

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